gnu: ruby-standard: Update to 1.37.0.

* gnu/packages/ruby.scm (ruby-standard): Update to 1.37.0.
[arguments]<#:phases>: Update phases 'delete-problematic-tests and
'relax-requirements. Use gexp.
[native-inputs]: Remove ruby-gimme, ruby-pry.
[propagated-inputs]: Add ruby-lint-roller, ruby-standard-custom,
ruby-standard-performance.

Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves 2025-02-16 01:34:32 +01:00 committed by Andreas Enge
parent 0109fc3142
commit 6dda9f8ff6
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -2393,7 +2393,7 @@ as defaults in Standard Ruby.")
(define-public ruby-standard (define-public ruby-standard
(package (package
(name "ruby-standard") (name "ruby-standard")
(version "1.25.3") (version "1.37.0")
(source (source
(origin (origin
(method git-fetch) ;no test suite in distributed gem (method git-fetch) ;no test suite in distributed gem
@ -2402,12 +2402,12 @@ as defaults in Standard Ruby.")
(commit (string-append "v" version)))) (commit (string-append "v" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "0gm9fn6fz41aya34xz7kzda8xxs7h98n7cjx66qbcy2w0qhs40wc"))))
"0q42gv7wgrc818a5hm599sy07vjq69hbijzpkpgh6jws6x7wzyh3"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'set-HOME (add-after 'unpack 'set-HOME
(lambda _ (lambda _
;; Some tests fail otherwise. ;; Some tests fail otherwise.
@ -2415,26 +2415,36 @@ as defaults in Standard Ruby.")
(add-after 'unpack 'relax-requirements (add-after 'unpack 'relax-requirements
(lambda _ (lambda _
(substitute* "standard.gemspec" (substitute* "standard.gemspec"
(("\"rubocop\", \"1.44.1\"") (("\"rubocop\", \".*\"")
"\"rubocop\", \">= 1.44.1\"") (string-append
(("\"rubocop-performance\", \"1.15.2\"") "\"rubocop\", \"~> "
"\"rubocop-performance\", \">= 1.15.2\"")))) #$(package-version
(this-package-input "ruby-rubocop"))
"\""))
(("\"rubocop-performance\", \".*\"")
(string-append
"\"rubocop-performance\", \"~> "
#$(package-version
(this-package-input "ruby-rubocop-performance"))
"\"")))))
(add-after 'unpack 'delete-problematic-tests (add-after 'unpack 'delete-problematic-tests
;; These tests fail for unknown reasons (see: ;; These tests fail for unknown reasons (see:
;; https://github.com/testdouble/standard/issues/532). ;; https://github.com/testdouble/standard/issues/532).
(lambda _ (lambda _
(for-each (delete-file "test/standard_test.rb")
delete-file (substitute* "test/standard/base_test.rb"
'("test/standard_test.rb" ((".*test_configures_all_rubocop_cops.*" all)
"test/standard/cop/block_single_line_braces_test.rb"))))))) (string-append all
" skip('fails on guix')\n"))))))))
(native-inputs (native-inputs
(list ruby-gimme (list ruby-simplecov))
ruby-pry
ruby-simplecov))
(propagated-inputs (propagated-inputs
(list ruby-language-server-protocol (list ruby-language-server-protocol
ruby-lint-roller
ruby-rubocop ruby-rubocop
ruby-rubocop-performance)) ruby-rubocop-performance
ruby-standard-custom
ruby-standard-performance))
(synopsis "Ruby Style Guide, with linter & automatic code fixer") (synopsis "Ruby Style Guide, with linter & automatic code fixer")
(description "Standard is a port of StandardJS. Like StandardJS, it aims (description "Standard is a port of StandardJS. Like StandardJS, it aims
to save time in the following ways: to save time in the following ways: