mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-20 01:33:18 -05:00
gnu: ruby-yard: Refactor package and some dependencies.
Replace ruby-yard and ruby-yard-with-tests with ruby-yard and ruby-yard/minimal. This introduced some cycles, so add some additional minimal variants to avoid this. * gnu/packages/ruby.scm (ruby-asciidoctor/minimal, ruby-test-unit/minimal, ruby-yard/minimal): New variables. (ruby-rubygems-tasks)[native-inputs]: Remove unnecessary ruby-spec and ruby-yard. (ruby-locale, ruby-gettext, ruby-tdiff, ruby-nokogiri-diff, ruby-public-suffix, ruby-addressable)[native-inputs]: Switch to ruby-yard/minimal. (ruby-metaclass)[native-inputs]: Switch to ruby-test-unit/minimal. (ruby-yard): Update to 0.9.34. [arguments]: Update style, don't disable tests, specify #:test-target, and patch spec/cli/diff_spec.rb. [native-inputs]: Add from ruby-yard-with-tests. (ruby-yard-with-tests): Remove variable.
This commit is contained in:
parent
a6e0ecfa77
commit
97a934d45f
1 changed files with 71 additions and 43 deletions
|
@ -1597,6 +1597,16 @@ (define-public ruby-asciidoctor
|
||||||
(home-page "https://asciidoctor.org")
|
(home-page "https://asciidoctor.org")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
(define-public ruby-asciidoctor/minimal
|
||||||
|
(hidden-package
|
||||||
|
(package
|
||||||
|
(inherit ruby-asciidoctor)
|
||||||
|
(arguments
|
||||||
|
(ensure-keyword-arguments
|
||||||
|
(package-arguments ruby-asciidoctor)
|
||||||
|
(list #:tests? #f)))
|
||||||
|
(native-inputs '()))))
|
||||||
|
|
||||||
(define-public ruby-asciidoctor-multipage
|
(define-public ruby-asciidoctor-multipage
|
||||||
(package
|
(package
|
||||||
(name "ruby-asciidoctor-multipage")
|
(name "ruby-asciidoctor-multipage")
|
||||||
|
@ -3812,8 +3822,6 @@ (define-public ruby-rubygems-tasks
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
;; Tests need Internet access.
|
;; Tests need Internet access.
|
||||||
(arguments `(#:tests? #f))
|
(arguments `(#:tests? #f))
|
||||||
(native-inputs
|
|
||||||
(list ruby-rspec ruby-yard))
|
|
||||||
(synopsis "Rake tasks for managing and releasing Ruby Gems")
|
(synopsis "Rake tasks for managing and releasing Ruby Gems")
|
||||||
(description "Rubygems-task provides Rake tasks for managing and releasing
|
(description "Rubygems-task provides Rake tasks for managing and releasing
|
||||||
Ruby Gems.")
|
Ruby Gems.")
|
||||||
|
@ -4552,7 +4560,7 @@ (define-public ruby-locale
|
||||||
;; dependency cycle we disable tests.
|
;; dependency cycle we disable tests.
|
||||||
(arguments `(#:tests? #f))
|
(arguments `(#:tests? #f))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list bundler ruby-yard))
|
(list bundler ruby-yard/minimal))
|
||||||
(synopsis "Ruby library providing basic localization APIs")
|
(synopsis "Ruby library providing basic localization APIs")
|
||||||
(description
|
(description
|
||||||
"Ruby-Locale is the pure ruby library which provides basic APIs for
|
"Ruby-Locale is the pure ruby library which provides basic APIs for
|
||||||
|
@ -4634,7 +4642,7 @@ (define-public ruby-gettext
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list ruby-locale ruby-text ruby-erubi))
|
(list ruby-locale ruby-text ruby-erubi))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list bundler ruby-yard))
|
(list bundler ruby-yard/minimal))
|
||||||
(synopsis "GNU gettext-like program for Ruby")
|
(synopsis "GNU gettext-like program for Ruby")
|
||||||
(description
|
(description
|
||||||
"Gettext is a GNU gettext-like program for Ruby. The catalog
|
"Gettext is a GNU gettext-like program for Ruby. The catalog
|
||||||
|
@ -4714,6 +4722,16 @@ (define-public ruby-test-unit
|
||||||
(home-page "https://test-unit.github.io/")
|
(home-page "https://test-unit.github.io/")
|
||||||
(license (list license:psfl license:ruby))))
|
(license (list license:psfl license:ruby))))
|
||||||
|
|
||||||
|
(define-public ruby-test-unit/minimal
|
||||||
|
(hidden-package
|
||||||
|
(package
|
||||||
|
(inherit ruby-test-unit)
|
||||||
|
(arguments
|
||||||
|
(ensure-keyword-arguments
|
||||||
|
(package-arguments ruby-test-unit)
|
||||||
|
(list #:tests? #f)))
|
||||||
|
(native-inputs '()))))
|
||||||
|
|
||||||
(define-public ruby-mapping
|
(define-public ruby-mapping
|
||||||
(package
|
(package
|
||||||
(name "ruby-mapping")
|
(name "ruby-mapping")
|
||||||
|
@ -4847,7 +4865,7 @@ (define-public ruby-metaclass
|
||||||
"/lib\""))))
|
"/lib\""))))
|
||||||
#t)))))
|
#t)))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list bundler ruby-test-unit))
|
(list bundler ruby-test-unit/minimal))
|
||||||
(synopsis "Ruby library adding metaclass method to all objects")
|
(synopsis "Ruby library adding metaclass method to all objects")
|
||||||
(description
|
(description
|
||||||
"Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
|
"Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
|
||||||
|
@ -8275,7 +8293,7 @@ (define-public ruby-tdiff
|
||||||
"0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
|
"0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list ruby-rspec ruby-yard ruby-rubygems-tasks))
|
(list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
|
||||||
(synopsis "Calculate the differences between two tree-like structures")
|
(synopsis "Calculate the differences between two tree-like structures")
|
||||||
(description
|
(description
|
||||||
"This library provides functions to calculate the differences between two
|
"This library provides functions to calculate the differences between two
|
||||||
|
@ -8303,7 +8321,7 @@ (define-public ruby-nokogiri-diff
|
||||||
(list ruby-tdiff
|
(list ruby-tdiff
|
||||||
ruby-nokogiri))
|
ruby-nokogiri))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list ruby-rspec ruby-yard ruby-rubygems-tasks))
|
(list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
|
||||||
(synopsis "Calculate the differences between two XML/HTML documents")
|
(synopsis "Calculate the differences between two XML/HTML documents")
|
||||||
(description
|
(description
|
||||||
"@code{Nokogiri::Diff} adds the ability to calculate the
|
"@code{Nokogiri::Diff} adds the ability to calculate the
|
||||||
|
@ -10196,7 +10214,7 @@ (define-public ruby-yajl-ruby
|
||||||
(define-public ruby-yard
|
(define-public ruby-yard
|
||||||
(package
|
(package
|
||||||
(name "ruby-yard")
|
(name "ruby-yard")
|
||||||
(version "0.9.25")
|
(version "0.9.34")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -10207,20 +10225,42 @@ (define-public ruby-yard
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
|
"10jq0hyzyy0d6l63jxld32g36fhrclkb3rwnyp47igcik73kbagb"))))
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
;; Note: Tests are willfully disabled to alleviate dependency cycle
|
(list
|
||||||
;; problems.
|
#:test-target "default"
|
||||||
`(#:tests? #f
|
#:phases
|
||||||
#:phases (modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'do-not-set-date-in-gemspec
|
(add-after 'unpack 'do-not-set-date-in-gemspec
|
||||||
;; Fix a reproducibility issue (see:
|
;; Fix a reproducibility issue (see:
|
||||||
;; https://github.com/lsegal/yard/issues/1343).
|
;; https://github.com/lsegal/yard/issues/1343).
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "yard.gemspec"
|
(substitute* "yard.gemspec"
|
||||||
((".*s\\.date.*") ""))
|
((".*s\\.date.*") ""))))
|
||||||
#t)))))
|
(add-before 'check 'prepare-for-tests
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(substitute* "Rakefile"
|
||||||
|
((".*[Ss]amus.*") ""))
|
||||||
|
;; Delete the Gemfile to avoid errors relating to it.
|
||||||
|
(delete-file "Gemfile")
|
||||||
|
;; $HOME needs to be set to somewhere writeable for tests to
|
||||||
|
;; run.
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
|
;; This test fails
|
||||||
|
;; #<File (class)> received :open with unexpected arguments
|
||||||
|
;; expected: ("gem1.gem", "rb")
|
||||||
|
;; got: ("/gnu/store/.../lib/ruby/vendor_ruby/specifications/asciidoctor-2.0.18.gemspec", "r:UTF-8:-")
|
||||||
|
(substitute* "spec/cli/diff_spec.rb"
|
||||||
|
(("it \"searches for .gem file")
|
||||||
|
"xit \"searches for .gem file"))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list ruby-rspec
|
||||||
|
ruby-rack
|
||||||
|
ruby-redcloth
|
||||||
|
ruby-webrick
|
||||||
|
ruby-asciidoctor/minimal))
|
||||||
(synopsis "Documentation generation tool for Ruby")
|
(synopsis "Documentation generation tool for Ruby")
|
||||||
(description "YARD is a documentation generation tool for the Ruby
|
(description "YARD is a documentation generation tool for the Ruby
|
||||||
programming language. It enables the user to generate consistent, usable
|
programming language. It enables the user to generate consistent, usable
|
||||||
|
@ -10230,27 +10270,15 @@ (define-public ruby-yard
|
||||||
(home-page "https://yardoc.org")
|
(home-page "https://yardoc.org")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public ruby-yard-with-tests
|
(define-public ruby-yard/minimal
|
||||||
(package
|
(hidden-package
|
||||||
(inherit ruby-yard)
|
(package
|
||||||
(name "ruby-yard-with-tests")
|
(inherit ruby-yard)
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments
|
(ensure-keyword-arguments
|
||||||
(strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
|
(package-arguments ruby-yard)
|
||||||
((#:test-target _ "default") "default")
|
(list #:tests? #f)))
|
||||||
((#:phases phases '%standard-phases)
|
(native-inputs '()))))
|
||||||
`(modify-phases ,phases
|
|
||||||
(add-before 'check 'prepare-for-tests
|
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
|
||||||
(when tests?
|
|
||||||
(substitute* "Rakefile"
|
|
||||||
((".*[Ss]amus.*") ""))
|
|
||||||
;; Delete the Gemfile to avoid errors relating to it.
|
|
||||||
(delete-file "Gemfile")
|
|
||||||
;; $HOME needs to be set to somewhere writeable for tests to
|
|
||||||
;; run.
|
|
||||||
(setenv "HOME" "/tmp"))))))))
|
|
||||||
(native-inputs (list ruby-rspec ruby-rack ruby-redcloth ruby-asciidoctor))))
|
|
||||||
|
|
||||||
(define-public ruby-spectroscope
|
(define-public ruby-spectroscope
|
||||||
(package
|
(package
|
||||||
|
@ -12622,7 +12650,7 @@ (define-public ruby-public-suffix
|
||||||
(("RuboCop::RakeTask\\.new") ""))
|
(("RuboCop::RakeTask\\.new") ""))
|
||||||
#t)))))
|
#t)))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list bundler ruby-yard ruby-mocha ruby-minitest-reporters))
|
(list bundler ruby-yard/minimal ruby-mocha ruby-minitest-reporters))
|
||||||
(home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
|
(home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
|
||||||
(synopsis "Domain name parser")
|
(synopsis "Domain name parser")
|
||||||
(description "The gem @code{public_suffix} is a domain name parser,
|
(description "The gem @code{public_suffix} is a domain name parser,
|
||||||
|
@ -12669,7 +12697,7 @@ (define-public ruby-addressable
|
||||||
ruby-rspec-its-minimal
|
ruby-rspec-its-minimal
|
||||||
ruby-simplecov
|
ruby-simplecov
|
||||||
ruby-sporkmonger-rack-mount
|
ruby-sporkmonger-rack-mount
|
||||||
ruby-yard))
|
ruby-yard/minimal))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list ruby-public-suffix))
|
(list ruby-public-suffix))
|
||||||
(home-page "https://github.com/sporkmonger/addressable")
|
(home-page "https://github.com/sporkmonger/addressable")
|
||||||
|
|
Loading…
Reference in a new issue