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.master
parent
01ca99e708
commit
e5dbe4cc00
|
@ -7115,50 +7115,46 @@ generates Ruby program.")
|
||||||
(define-public ruby-rack
|
(define-public ruby-rack
|
||||||
(package
|
(package
|
||||||
(name "ruby-rack")
|
(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
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch) ;for tests
|
||||||
;; Download from GitHub so that the snippet can be applied and tests run.
|
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/rack/rack")
|
(url "https://github.com/rack/rack")
|
||||||
(commit version)))
|
(commit (string-append "v" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4"))
|
"19n33q0v15qjh7kbp2painyzyqg16kkf0mp68vcnlswghmmjcyzq"))))
|
||||||
;; 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))))
|
|
||||||
(build-system ruby-build-system)
|
(build-system ruby-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-before 'check 'fix-tests
|
#~(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-before 'check 'fix-tests
|
||||||
;; A few of the tests use the length of a file on disk for
|
(lambda _
|
||||||
;; Content-Length and Content-Range headers. However, this file
|
;; This test fails in the build environment (and passes outside
|
||||||
;; has a shebang in it which an earlier phase patches, growing
|
;; of it).
|
||||||
;; the file size from 193 to 239 bytes when the store prefix is
|
(substitute* "test/spec_files.rb"
|
||||||
;; "/gnu/store".
|
(("res.body.must_equal expected_body") ""))
|
||||||
(let ((size-diff (- (string-length (which "ruby"))
|
;; A few of the tests use the length of a file on disk for
|
||||||
(string-length "/usr/bin/env ruby"))))
|
;; Content-Length and Content-Range headers. However, this file
|
||||||
(substitute* '("test/spec_files.rb")
|
;; has a shebang in it which an earlier phase patches, growing
|
||||||
(("208" bytes)
|
;; the file size from 193 to 239 bytes when the store prefix is
|
||||||
(number->string (+ (string->number bytes) size-diff)))
|
;; "/gnu/store".
|
||||||
(("bytes(.)22-33" all delimiter)
|
(let ((size-diff (- (string-length (which "ruby"))
|
||||||
(string-append "bytes"
|
(string-length "/usr/bin/env ruby"))))
|
||||||
delimiter
|
(substitute* '("test/spec_files.rb")
|
||||||
(number->string (+ 22 size-diff))
|
(("208" bytes)
|
||||||
"-"
|
(number->string (+ (string->number bytes) size-diff)))
|
||||||
(number->string (+ 33 size-diff))))))
|
(("bytes(.)22-33" all delimiter)
|
||||||
#t)))))
|
(string-append "bytes"
|
||||||
(native-inputs
|
delimiter
|
||||||
(list ruby-minitest ruby-minitest-global-expectations))
|
(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")
|
(synopsis "Unified web application interface for Ruby")
|
||||||
(description "Rack provides a minimal, modular and adaptable interface for
|
(description "Rack provides a minimal, modular and adaptable interface for
|
||||||
developing web applications in Ruby. By wrapping HTTP requests and responses,
|
developing web applications in Ruby. By wrapping HTTP requests and responses,
|
||||||
|
|
Reference in New Issue