gnu: ruby-mocha: Update to 1.11.2.
* gnu/packages/ruby.scm (ruby-mocha): Update to 1.11.2. [arguments]: Remove obsolete phases. Add phase to solve a dependency cycle. [native-inputs]: Remove BUNDLER, RUBY-YARD, RUBY-TEST-UNIT, and RUBY-REDCARPET. * gnu/packages/rails.scm (ruby-web-console)[arguments]: Remove workaround for old Mocha version.
This commit is contained in:
parent
def7908a59
commit
2fc3cc244a
2 changed files with 11 additions and 43 deletions
|
@ -555,12 +555,6 @@ application bootup, plugins, generators, and Rake tasks.")
|
||||||
;; tzinfo-data is propagated by ruby-activesupport, but it
|
;; tzinfo-data is propagated by ruby-activesupport, but it
|
||||||
;; needs to be in the Gemfile to become available.
|
;; needs to be in the Gemfile to become available.
|
||||||
(("group :test do") "group :test do\n gem 'tzinfo-data'"))
|
(("group :test do") "group :test do\n gem 'tzinfo-data'"))
|
||||||
#t))
|
|
||||||
(add-after 'unpack 'fix-mocha-minitest-require
|
|
||||||
(lambda _
|
|
||||||
(substitute* "test/test_helper.rb"
|
|
||||||
;; This chanegd in recent versions of Mocha
|
|
||||||
(("mocha/minitest") "mocha/mini_test"))
|
|
||||||
#t)))))
|
#t)))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("ruby-actionview" ,ruby-actionview)
|
`(("ruby-actionview" ,ruby-actionview)
|
||||||
|
|
|
@ -2990,53 +2990,27 @@ Ruby, but can be used for all programs.")
|
||||||
(define-public ruby-mocha
|
(define-public ruby-mocha
|
||||||
(package
|
(package
|
||||||
(name "ruby-mocha")
|
(name "ruby-mocha")
|
||||||
(version "1.1.0")
|
(version "1.11.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (rubygems-uri "mocha" version))
|
(uri (rubygems-uri "mocha" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"107nmnngbv8lq2g7hbjpn5kplb4v2c8gs9lxrg6vs8gdbddkilzi"))))
|
"0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'add-test-unit-to-search-path
|
(add-before 'check 'remove-rubocop-dependency
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
|
||||||
(let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
|
|
||||||
(substitute* "Rakefile"
|
|
||||||
(("t\\.libs << 'test'" line)
|
|
||||||
(string-append line "; t.libs << \""
|
|
||||||
test-unit "/lib/ruby/vendor_ruby"
|
|
||||||
"/gems/test-unit-"
|
|
||||||
,(package-version ruby-test-unit)
|
|
||||||
"/lib\""))))
|
|
||||||
#t))
|
|
||||||
(add-before 'check 'use-latest-redcarpet
|
|
||||||
(lambda _
|
(lambda _
|
||||||
|
;; Disable dependency on Rubocop, which is just a linter,
|
||||||
|
;; and would introduce a circular dependency.
|
||||||
(substitute* "mocha.gemspec"
|
(substitute* "mocha.gemspec"
|
||||||
(("<redcarpet>.freeze, \\[\"~> 1\"\\]")
|
((".*rubocop.*")
|
||||||
"<redcarpet>.freeze, [\">= 3\"]"))
|
"true\n"))
|
||||||
#t))
|
|
||||||
(add-before 'check 'hardcode-version
|
|
||||||
(lambda _
|
|
||||||
;; Mocha is undefined at build time
|
|
||||||
(substitute* "Rakefile"
|
|
||||||
(("#\\{Mocha::VERSION\\}") ,version))
|
|
||||||
#t))
|
|
||||||
(add-before 'check 'remove-failing-test
|
|
||||||
;; FIXME: This test fails for reasons unrelated to Guix packaging.
|
|
||||||
(lambda _
|
|
||||||
(delete-file "test/acceptance/stubbing_nil_test.rb")
|
|
||||||
#t)))))
|
#t)))))
|
||||||
(propagated-inputs
|
|
||||||
`(("ruby-metaclass" ,ruby-metaclass)))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("bundler" ,bundler)
|
`(("ruby-introspection" ,ruby-introspection)))
|
||||||
("ruby-yard" ,ruby-yard)
|
|
||||||
("ruby-introspection" ,ruby-introspection)
|
|
||||||
("ruby-test-unit" ,ruby-test-unit)
|
|
||||||
("ruby-redcarpet" ,ruby-redcarpet)))
|
|
||||||
(synopsis "Mocking and stubbing library for Ruby")
|
(synopsis "Mocking and stubbing library for Ruby")
|
||||||
(description
|
(description
|
||||||
"Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
|
"Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
|
||||||
|
|
Reference in a new issue