diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-09-04 16:47:52 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-09-07 13:43:44 -0400 |
commit | 64b6ccc30e42f5e7a655c2d32058eb12f4c03502 (patch) | |
tree | 1dabdec1f7fbbdfdec3bb8d473b7b874af862732 /gnu/packages/ruby.scm | |
parent | ee78d02452208b3cfd971cd5533570a1d3523512 (diff) | |
download | guix-64b6ccc30e42f5e7a655c2d32058eb12f4c03502.tar guix-64b6ccc30e42f5e7a655c2d32058eb12f4c03502.tar.gz |
gnu: Add ruby-rack.
* gnu/packages/ruby.scm (ruby-rack): New variable.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r-- | gnu/packages/ruby.scm | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 1e9ed271f7..ee0acc8639 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -1080,3 +1080,47 @@ build on. It provides breakpoint handling and bindings for stack frames among other things and it comes with a command line interface.") (home-page "http://github.com/deivid-rodriguez/byebug") (license license:bsd-2))) + +(define-public ruby-rack + (package + (name "ruby-rack") + (version "1.6.4") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "rack" version)) + (sha256 + (base32 + "09bs295yq6csjnkzj7ncj50i6chfxrhmzg1pk6p0vd2lb9ac8pj5")))) + (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_file.rb") + (("193") + (number->string (+ 193 size-diff))) + (("bytes(.)22-33" all delimiter) + (string-append "bytes" + delimiter + (number->string (+ 22 size-diff)) + "-" + (number->string (+ 33 size-diff)))))) + #t))))) + (native-inputs + `(("ruby-bacon" ,ruby-bacon))) + (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, +it unifies the API for web servers, web frameworks, and software in between +into a single method call.") + (home-page "http://rack.github.io/") + (license license:expat))) |