Toggle diff (461 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index bbfa5c1b39..c34fdb952d 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -36,6 +36,7 @@
;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023, 2024 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -130,8 +131,7 @@ (define-public ruby-2.6
(modules '((guix build utils)))
(snippet `(begin
;; Remove bundled libffi
- (delete-file-recursively "ext/fiddle/libffi-3.2.1")
- #t))))
+ (delete-file-recursively "ext/fiddle/libffi-3.2.1")))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
@@ -157,8 +157,7 @@ (define-public ruby-2.6
"test/ruby/test_process.rb"
"test/ruby/test_system.rb"
"tool/rbinstall.rb")
- (("/bin/sh") (which "sh")))
- #t)))))
+ (("/bin/sh") (which "sh"))))))))
(native-inputs (if (%current-target-system)
(list this-package)
'()))
@@ -215,8 +214,7 @@ (define-public ruby-2.7
"test/ruby/test_process.rb"
"test/ruby/test_system.rb"
"tool/rbinstall.rb")
- (("/bin/sh") (which "sh")))
- #t))
+ (("/bin/sh") (which "sh")))))
,@(if (system-hurd?)
'((add-after 'unpack 'skip-tests
(lambda _
@@ -317,8 +315,7 @@ (define-public mruby
(lambda _
(substitute* "Makefile"
(("ruby ./minirake" m)
- (string-append m " --verbose")))
- #t))
+ (string-append m " --verbose")))))
(add-after 'unpack 'disable-broken-tests
(lambda _
(substitute* "mrbgems/mruby-io/test/io.rb"
@@ -326,8 +323,7 @@ (define-public mruby
(string-append m "skip \"Hangs in the Guix build environment\"\n"))
;; This one is really weird. The *expected* output is all wrong.
(("assert\\('`cmd`.*" m)
- (string-append m "skip \"Disable for Guix\"\n")))
- #t))
+ (string-append m "skip \"Disable for Guix\"\n")))))
;; There is no install target
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
@@ -337,8 +333,7 @@ (define-public mruby
(mkdir-p bin)
(copy-recursively "build/host/bin" bin)
(mkdir-p lib)
- (copy-recursively "build/host/lib" lib))
- #t)))))
+ (copy-recursively "build/host/lib" lib)))))))
(native-inputs
(list ruby bison))
(home-page "https://github.com/mruby/mruby")
@@ -505,8 +500,7 @@ (define-public ruby-rsync
(lambda _
(substitute* "spec/spec_helper.rb"
(("require 'coveralls'") "")
- (("Coveralls.wear!") ""))
- #t)))))
+ (("Coveralls.wear!") "")))))))
(native-inputs
(list bundler rsync ruby-rspec-core ruby-rspec-expectations
ruby-rspec-mocks))
@@ -637,8 +631,7 @@ (define-public ruby-iruby
(string-append
"Kernel.exec('"
(assoc-ref inputs "python-ipython")
- "/bin/")))
- #t)))))
+ "/bin/"))))))))
(inputs
(list python-ipython))
(propagated-inputs
@@ -949,15 +942,13 @@ (define-public ruby-rspec-its
(lambda _
(substitute* "Gemfile"
(("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
- ""))
- #t))
+ ""))))
(add-before 'build 'loosen-ffi-requirement
(lambda _
;; Accept any version of ruby-ffi.
(substitute* "Gemfile"
((" gem 'ffi', '~> 1\\.9\\.25'")
- " gem 'ffi'"))
- #t))
+ " gem 'ffi'"))))
(add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
(lambda _
(substitute* "rspec-its.gemspec"
@@ -965,8 +956,7 @@ (define-public ruby-rspec-its
(("spec.add_development_dependency 'cucumber'.*")
"spec.add_development_dependency 'cucumber'\n")
(("bundler.*") "bundler'\n")
- (("\"aruba.*") "'aruba'\n"))
- #t)))))
+ (("\"aruba.*") "'aruba'\n")))))))
(propagated-inputs
(list ruby-rspec-core ruby-rspec-expectations))
(native-inputs
@@ -1899,13 +1889,11 @@ (define-public ruby-prawn-templates
(add-after 'unpack 'do-not-use-bundler
(lambda _
(substitute* "spec/spec_helper.rb"
- ((".*[Bb]undler.*") ""))
- #t))
+ ((".*[Bb]undler.*") ""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(native-inputs
(list ruby-pdf-inspector ruby-rspec))
(propagated-inputs
@@ -2238,8 +2226,7 @@ (define-public ruby-gimme
((".*(add|gem).*jeweler.*") "")
((".*(add|gem).*pry.*") "")
((".*(add|gem).*growl.*") "")
- ((".*(add|gem).*rb-fsevent.*") ""))
- #t)))))
+ ((".*(add|gem).*rb-fsevent.*") "")))))))
(synopsis "Lightweight test double library for Ruby")
(description "Gimme is a very lightweight test double library for Ruby,
based on Mockito (a mocking framework for Java). It is an opinionated (but
@@ -2549,8 +2536,7 @@ (define-public ruby-ast
(lambda _
(substitute* "test/helper.rb"
(("require 'coveralls'") "")
- (("Coveralls::SimpleCov::Formatter") ""))
- #t))
+ (("Coveralls::SimpleCov::Formatter") ""))))
(add-after 'extract-gemspec 'remove-unnecessary-requirements
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "ast.gemspec"
@@ -2558,8 +2544,7 @@ (define-public ruby-ast
(("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
(("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
(("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
- (("12\\.3") "13.0"))
- #t)))))
+ (("12\\.3") "13.0")))))))
(native-inputs
(list bundler
ruby-bacon
@@ -2718,8 +2703,7 @@ (define-public ruby-crack
(for-each (lambda (file)
(display file)(display "\n")
(invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
- (find-files "test" ".*rb$")))
- #t)))))
+ (find-files "test" ".*rb$"))))))))
(synopsis "Simple JSON and XML parsing for Ruby")
(description
"@code{crack} provides really simple JSON and XML parsing, extracted from
@@ -2777,8 +2761,7 @@ (define-public ruby-cliver
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(native-inputs
(list bundler ruby-rspec-2))
(synopsis "Assertions for command-line dependencies in Ruby")
@@ -3030,13 +3013,11 @@ (define-public ruby-open4
(substitute* "rakefile"
;; Update the Rakefile so it works
(("-rubygems") "-rrubygems")
- (("Config") "RbConfig"))
- #t))
+ (("Config") "RbConfig"))))
(add-before 'check 'set-LIB
(lambda _
;; This is used in the rakefile when running the tests
- (setenv "LIB" "open4")
- #t)))))
+ (setenv "LIB" "open4"))))))
(synopsis "Open child processes from Ruby and manage them easily")
(description
"@code{Open4} is a Ruby library to run child processes and manage their
@@ -3064,8 +3045,7 @@ (define-public ruby-options
(lambda _
;; This is used in the Rakefile, and setting it avoids an issue
;; with running the tests.
- (setenv "LIB" "options")
- #t)))))
+ (setenv "LIB" "options"))))))
(synopsis "Ruby library to parse options from *args cleanly")
(description
"The @code{options} library helps with parsing keyword options in Ruby
@@ -3202,15 +3182,13 @@ (define-public ruby-fakefs
(lambda _
(substitute* "fakefs.gemspec"
(("`git ls-files lib README.md LICENSE`")
- "`find lib README.md LICENSE -type f | sort`"))
- #t))
+ "`find lib README.md LICENSE -type f | sort`"))))
(add-before 'check 'remove-version-constraints
(lambda _
;; Drop hard version requirements for test dependencies.
(substitute* "fakefs.gemspec"
(("(.*add_development_dependency .*), .*" _ dep)
- (string-append dep "\n")))
- #t)))))
+ (string-append dep "\n"))))))))
(native-inputs
(list ruby-bump ruby-maxitest ruby-rubocop ruby-rspec))
(synopsis "Fake file system for Ruby")
@@ -3679,8 +3657,7 @@ (define-public ruby-permutation
(substitute* "Rakefile"
(("require 'rake/gempackagetask'")
"require 'rubygems/package_task'")
- (("include Config") ""))
- #t))
+ (("include Config") ""))))
(replace 'check
(lambda _
(invoke "ruby" "-Ilib" "test/test.rb"))))))
@@ -3708,8 +3685,7 @@ (define-public ruby-shellany
(add-after 'unpack 'fix-version-test
(lambda _
(substitute* "spec/shellany_spec.rb"
- (("^RSpec") "require \"shellany\"\nRSpec"))
- #t)))))
+ (("^RSpec") "require \"shellany\"\nRSpec")))))))
(native-inputs
(list ruby-rspec ruby-nenv bundler))
(synopsis "Capture command output")
@@ -3765,19 +3741,16 @@ (define-public ruby-forking-test-runner
(lambda _
(substitute* "forking_test_runner.gemspec"
(("`git ls-files lib/ bin/ MIT-LICENSE`")
- "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
- #t))
+ "`find lib/ bin/ MIT-LICENSE -type f | sort`"))))
(add-before 'check 'remove-version-constraints
(lambda _
;; Ignore hard coded version constraints for the tests.
- (delete-file "Gemfile.lock")
- #t))
+ (delete-file "Gemfile.lock")))
(add-before 'check 'set-HOME
(lambda _
;; Many tests invoke Bundler, and fails when Bundler
;; warns that /homeless-shelter does not exist.
- (setenv "HOME" "/tmp")
- #t)))))
+ (setenv "HOME" "/tmp"))))))
(native-inputs
(list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
(propagated-inputs
@@ -3836,13 +3809,11 @@ (define-public ruby-fuubar
;; Remove 's.cert_chain' as we do not build with a private key
(substitute* "fuubar.gemspec"
((".*cert_chain.*") "")
- ((".*signing_key.*") ""))
- #t))
+ ((".*signing_key.*") ""))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(native-inputs
(list bundler))
(propagated-inputs
@@ -3947,8 +3918,7 @@ (define-public ruby-hashdiff
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(native-inputs
(list bundler ruby-rspec-2))
(synopsis "HashDiff computes the smallest difference between two hashes")
@@ -5193,8 +5163,7 @@ (define-public ruby-maruku
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(native-inputs
(list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
(synopsis "Markdown interpreter in Ruby")
@@ -5227,8 +5196,7 @@ (define-public ruby-metaclass
test-unit "/lib/ruby/vendor_ruby"
"/gems/test-unit-"
,(package-version ruby-test-unit)
- "/lib\""))))
- #t)))))
+ "/lib\"")))))))))
(native-inputs
(list bundler ruby-test-unit/minimal))
(synopsis "Ruby library adding metaclass method to all objects")
@@ -5322,13 +5290,11 @@ (define-public ruby-mspec
(lambda _
(substitute* "mspec.gemspec"
(("rake.*") "rake>)\n")
- (("rspec.*") "rspec>)\n"))
- #t))
+ (("rspec.*") "rspec>)\n"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "rspec" "spec"))
- #t)))))
+ (invoke "rspec" "spec")))))))
(native-inputs
(list bundler ruby-rake ruby-rspec))
(synopsis "MSpec is a specialized framework for RubySpec")
@@ -5362,15 +5328,13 @@ (define-public ruby-mysql2
(replace 'replace-git-ls-files
(lambda _
(substitute* "mysql2.gemspec"
- (("git ls-files .*`") "find . -type f |sort`"))
- #t))
+ (("git ls-files .*`") "find . -type f |sort`"))))
(add-before 'install 'set-MAKEFLAGS
(lambda* (#:key outputs #:allow-other-keys)
(setenv "MAKEFLAGS"
(string-append
"V=1 "
- "prefix=" (assoc-ref outputs "out")))
- #t))
+ "prefix=" (assoc-ref outputs "out")))))
;; Move the 'check phase to after 'install, as then you can test
;; using the installed mysql2 gem in the store.
(delete 'check)
@@ -5382,8 +5346,7 @@ (define-public ruby-mysql2
":"
(assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
(when tests?
- (invoke "rspec"))
- #t)))))
+ (invoke "rspec")))))))
(inputs
`(("mariadb-dev" ,mariadb "dev")
("zlib" ,zlib)))
@@ -5481,8 +5444,7 @@ (define-public ruby-idn-ruby
"/lib/ruby/vendor_ruby/gems/"
name-and-version
"/lib")
- (find-files "./test" ".*\\.rb"))))
- #t)))))
+ (find-files "./test" ".*\\.rb")))))))))
(inputs
(list libidn))
(synopsis "Ruby Bindings for the GNU LibIDN library")
@@ -5564,8 +5526,7 @@ (define-public ruby-redcarpet
(lambda _
(substitute* "Rakefile"
(("task :test => %w\\[test:unit test:conformance\\]")
- "task :test => %w[test:unit]"))
- #t)))))
+ "task :test => %w[test:unit]")))))))
(native-inputs
(list bundler ruby-test-unit ruby-rake-compiler))
(synopsis "Extensible Markdown to (X)HTML converter")
@@ -5915,8 +5876,7 @@ (define-public ruby-minitest-around
(add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
(lambda _
(substitute* "minitest-around.gemspec"
- (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
- #t)))))
+ (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n")))))))
(propagated-inputs
(list ruby-minitest))
(native-inputs
@@ -6144,8 +6104,7 @@ (define-public ruby-minitest-moar
(("gem .*") ""))
;; Remove byebug as not needed to run tests.
(substitute* "test/test_helper.rb"
- (("require 'byebug'") ""))
- #t)))))
+ (("require 'byebug'") "")))))))
(native-inputs
(list bundler ruby-minitest))
(synopsis "Extra features and changes to MiniTest")
@@ -6211,13 +6170,11 @@ (define-public ruby-minitest-reporters
(lambda _
(substitute* "Rakefile"
(("require 'rubocop/rake\\_task'") "")
- (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
- #t))
+ (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))))
(add-after 'extract-gemspec 'remove-rubocop-from-gemspec
(lambda _
(substitute* "minitest-reporters.gemspec"
- ((".*%q<rubocop>.*") "\n"))
- #t)))))
+ ((".*%q<rubocop>.*") "\n")))))))
(propagated-inputs
(list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
(native-inputs
@@ -6498,8 +6455,7 @@ (define-public ruby-git
,version "/lib/git/config.rb")))
(substitute* (list config)
(("'git'")
- (string-append "'" git "'")))
- #t))))))
+ (string-append "'" git "'")))))))))
(inputs
(list git))
(synopsis "Ruby wrappers for Git")
@@ -6876,8 +6832,7 @@ (define-public ruby-method-source
(add-after 'unpack 'remove-git-ls-files
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Rakefile"
- (("git ls-files") "find . -type f"))
- #t)))))
+ (("git ls-files") "find . -type f")))))))
(native-inputs
(list ruby-rspec))
(synopsis "Retrieve the source code for Ruby methods")
@@ -7445,8 +7400,7 @@ (define-public ruby-guard
(add-after 'unpack 'remove-git-ls-files
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "guard.gemspec"
- (("git ls-files -z") "find . -type f -print0"))
- #t))
+ (("git ls-files -z") "find . -type f -print0"))))
(replace 'build
(lambda _
(invoke "gem" "build" "guard.gemspec"))))))
@@ -7823,8 +7777,7 @@ (define-public ruby-sdoc
(("s.add_dependency.*") "\n"))
(substitute* "Gemfile"
(("gem \"rake\".*")
- "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
- #t)))))
+ "gem 'rake'\ngem 'rdoc'\ngem 'json'\n")))))))
(propagated-inputs
(list ruby-json))
(native-inputs
@@ -9083,8 +9036,7 @@ (define-public ruby-rainbow
(replace 'ch