diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-08 16:58:15 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-28 22:22:21 -0400 |
commit | e5dbe4cc0094008734b8c78349e54f67400fd03b (patch) | |
tree | 1d9877108b590f43da2b2e3b703b014fb853011c /gnu/packages | |
parent | 01ca99e7089b5231a23d66264c00b449339c85f8 (diff) | |
download | guix-e5dbe4cc0094008734b8c78349e54f67400fd03b.tar.gz guix-e5dbe4cc0094008734b8c78349e54f67400fd03b.zip |
gnu: ruby-rack: Update to 2.2.6.3.
* gnu/packages/ruby.scm (ruby-rack): Update to 2.2.6.3.
[source]: Move snippet to...
[arguments]: ... the fix-test phase. Use gexps and delete trailing #t.
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/ruby.scm | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 751c698699..c6db3615be 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -7115,50 +7115,46 @@ generates Ruby program.") (define-public ruby-rack (package (name "ruby-rack") - (version "2.2.3") + ;; Do not upgrade to version 3, as Rails doesn't support it yet. + (version "2.2.6.3") (source (origin - (method git-fetch) - ;; Download from GitHub so that the snippet can be applied and tests run. + (method git-fetch) ;for tests (uri (git-reference - (url "https://github.com/rack/rack") - (commit version))) + (url "https://github.com/rack/rack") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4")) - ;; Ignore test which fails inside the build environment but works - ;; outside. - (modules '((guix build utils))) - (snippet - '(begin (substitute* "test/spec_files.rb" - (("res.body.must_equal expected_body") "")) - #t)))) + "19n33q0v15qjh7kbp2painyzyqg16kkf0mp68vcnlswghmmjcyzq")))) (build-system ruby-build-system) (arguments - '(#:phases - (modify-phases %standard-phases - (add-before 'check 'fix-tests - (lambda _ - ;; A few of the tests use the length of a file on disk for - ;; Content-Length and Content-Range headers. However, this file - ;; has a shebang in it which an earlier phase patches, growing - ;; the file size from 193 to 239 bytes when the store prefix is - ;; "/gnu/store". - (let ((size-diff (- (string-length (which "ruby")) - (string-length "/usr/bin/env ruby")))) - (substitute* '("test/spec_files.rb") - (("208" bytes) - (number->string (+ (string->number bytes) size-diff))) - (("bytes(.)22-33" all delimiter) - (string-append "bytes" - delimiter - (number->string (+ 22 size-diff)) - "-" - (number->string (+ 33 size-diff)))))) - #t))))) - (native-inputs - (list ruby-minitest ruby-minitest-global-expectations)) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'fix-tests + (lambda _ + ;; This test fails in the build environment (and passes outside + ;; of it). + (substitute* "test/spec_files.rb" + (("res.body.must_equal expected_body") "")) + ;; A few of the tests use the length of a file on disk for + ;; Content-Length and Content-Range headers. However, this file + ;; has a shebang in it which an earlier phase patches, growing + ;; the file size from 193 to 239 bytes when the store prefix is + ;; "/gnu/store". + (let ((size-diff (- (string-length (which "ruby")) + (string-length "/usr/bin/env ruby")))) + (substitute* '("test/spec_files.rb") + (("208" bytes) + (number->string (+ (string->number bytes) size-diff))) + (("bytes(.)22-33" all delimiter) + (string-append "bytes" + delimiter + (number->string (+ 22 size-diff)) + "-" + (number->string (+ 33 size-diff))))))))))) + (native-inputs (list ruby-minitest ruby-minitest-global-expectations)) (synopsis "Unified web application interface for Ruby") (description "Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses, |