X-Git-Url: http://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/cd6cc144e0822482a8ca2b033b7bd6d33f0fd331..28791c1c8d43e14878f8cc67a15b6036699ec252:/gnu/packages/ruby.scm diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 2abb261a45..a770486fd2 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -24,6 +24,7 @@ (define-module (gnu packages ruby) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages readline) @@ -46,7 +47,7 @@ (define-public ruby (package (name "ruby") - (version "2.3.0") + (version "2.3.1") (source (origin (method url-fetch) @@ -55,12 +56,12 @@ "/ruby-" version ".tar.xz")) (sha256 (base32 - "15s0dsb5ynf3d2w5gzawnszq5594fqvapv2y7a0qw16przq5l4kh")) + "0f3395q7pd2hrl2gv26bib80038sjawxgmhl9zn22fjs9m9va9b7")) (modules '((guix build utils))) + (patches (search-patches "ruby-symlinkfix.patch")) (snippet `(begin ;; Remove bundled libffi - (delete-file-recursively - (string-append "ext/fiddle/libffi-3.2.1")) + (delete-file-recursively "ext/fiddle/libffi-3.2.1") #t)))) (build-system gnu-build-system) (arguments @@ -102,7 +103,7 @@ a focus on simplicity and productivity.") (define-public ruby-2.2 (package (inherit ruby) - (version "2.2.4") + (version "2.2.5") (source (origin (method url-fetch) @@ -111,17 +112,11 @@ a focus on simplicity and productivity.") "/ruby-" version ".tar.xz")) (sha256 (base32 - "0g3ps4q3iz7wj9m45n8xyxzw8nh29ljdqb87b0f6i0p3853gz2yj")) - (modules '((guix build utils))) - (snippet `(begin - ;; Remove bundled libffi - (delete-file-recursively - (string-append "ext/fiddle/libffi-3.2.1")) - #t)))))) + "1mw7bzw76g5w37cwhb57r6gxcl2vn9lfrlyf4h4xms3qlnhflvzq")))))) (define-public ruby-2.1 (package (inherit ruby) - (version "2.1.8") + (version "2.1.10") (source (origin (method url-fetch) @@ -130,7 +125,7 @@ a focus on simplicity and productivity.") "/ruby-" version ".tar.bz2")) (sha256 (base32 - "11rkbfc90cg9p9mzg32475alf3ddcn9q8a3ar3fwm5xskic0n395")))) + "1wglbd599mlwxfcb2xgqcxi2shr363pjn5dpbv11m04si9bpaim7")))) (arguments `(#:test-target "test" #:parallel-tests? #f @@ -249,13 +244,13 @@ an extensible architecture with a swappable backend.") (define ruby-rspec-support (package (name "ruby-rspec-support") - (version "3.2.2") + (version "3.5.0") (source (origin (method url-fetch) (uri (rubygems-uri "rspec-support" version)) (sha256 (base32 - "194zry5195ls2hni7r9824vqb5d3qfg4jb15fgj8glfy0rvw3zxl")))) + "10vf3k3d472y573mag2kzfsfrf6rv355s13kadnpryk8d36yq5r0")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -267,13 +262,13 @@ an extensible architecture with a swappable backend.") (define-public ruby-rspec-core (package (name "ruby-rspec-core") - (version "3.2.3") + (version "3.5.1") (source (origin (method url-fetch) (uri (rubygems-uri "rspec-core" version)) (sha256 (base32 - "0k2471iw30gc2cvv67damrx666pmsvx8l0ahk3hm20dhfnmcmpvv")))) + "0brfq51fwkkh5g6vw7smky5fvip46pryi243jmin0nzn7iwh9j5g")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -320,13 +315,13 @@ standard diff-like tool.") (define-public ruby-rspec-expectations (package (name "ruby-rspec-expectations") - (version "3.2.1") + (version "3.5.0") (source (origin (method url-fetch) (uri (rubygems-uri "rspec-expectations" version)) (sha256 (base32 - "01kmchabgpdcaqdsqg8r0g5gy385xhp1k1jsds3w264ypin17n14")))) + "0bbqfrb1x8gmwf8x2xhhwvvlhwbbafq4isbvlibxi6jk602f09gs")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -354,13 +349,13 @@ outcomes of a code example.") (define-public ruby-rspec-mocks (package (name "ruby-rspec-mocks") - (version "3.2.1") + (version "3.5.0") (source (origin (method url-fetch) (uri (rubygems-uri "rspec-mocks" version)) (sha256 (base32 - "09yig1lwgxl8fsns71z3xhv7wkg7zvagydh37pvaqpw92dz55jv2")))) + "0nl3ksivh9wwrjjd47z5dggrwx40v6gpb3a0gzbp1gs06a5dmk24")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -388,13 +383,13 @@ support for stubbing and mocking.") (define-public ruby-rspec (package (name "ruby-rspec") - (version "3.2.0") + (version "3.5.0") (source (origin (method url-fetch) (uri (rubygems-uri "rspec" version)) (sha256 (base32 - "0lkz01j4yxcwb3g5w6r1l9khnyw3sxib4rrh4npd2pxh390fcc4f")))) + "16g3mmih999f0b6vcz2c3qsc7ks5zy4lj1rzjh8hf6wk531nvc6s")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -428,13 +423,13 @@ expectations and mocks frameworks.") (define-public bundler (package (name "bundler") - (version "1.11.2") + (version "1.13.5") (source (origin (method url-fetch) (uri (rubygems-uri "bundler" version)) (sha256 (base32 - "0s37j1hyngc4shq0in8f9y1knjdqkisdg3dd1mfwgq7n1bz8zan7")))) + "0fxr7aq7qhlga423mygy7q96cwxmvqlcy676v2x5swlw8rlha2in")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; avoid dependency cycles @@ -913,13 +908,13 @@ Ruby Gems.") (define-public ruby-ffi (package (name "ruby-ffi") - (version "1.9.10") + (version "1.9.14") (source (origin (method url-fetch) (uri (rubygems-uri "ffi" version)) (sha256 (base32 - "1m5mprppw0xcrv2mkim5zsk70v089ajzqiq5hpyb0xg96fcyzyxj")))) + "1nkcrmxqr0vb1y4rwliclwlj2ajsi4ddpdx2gvzjy0xbkk5iqzfp")))) (build-system ruby-build-system) ;; FIXME: Before running tests the build system attempts to build libffi ;; from sources. @@ -961,13 +956,13 @@ the SimpleCov code coverage tool for Ruby version 1.9 and above.") (define-public ruby-simplecov (package (name "ruby-simplecov") - (version "0.10.0") + (version "0.12.0") (source (origin (method url-fetch) (uri (rubygems-uri "simplecov" version)) (sha256 (base32 - "1q2iq2vgrdvvla5y907gkmqx6ry2qvnvc7a90hlcbwgp1w0sv6z4")))) + "0ffhyrfnq2zm2mc1742a4hqy475g3qa1zf6yfldwg1ldh5sn3qbx")))) (build-system ruby-build-system) ;; Simplecov depends on rubocop for code style checking at build time. ;; Rubocop needs simplecov at build time. @@ -1712,6 +1707,33 @@ instance, it provides @code{assert_true}, @code{assert_false} and (home-page "http://blowmage.com/minitest-rg") (license license:expat))) +(define-public ruby-minitest-hooks + (package + (name "ruby-minitest-hooks") + (version "1.4.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "minitest-hooks" version)) + (sha256 + (base32 + "092fymh0c09v3a585qw3hc15b0zf159s74rxx1ga87drk5jr958z")))) + (build-system ruby-build-system) + (arguments + '(#:test-target "spec")) + (native-inputs + `(("ruby-sequel" ,ruby-sequel) + ("ruby-sqlite3" ,ruby-sqlite3))) + (synopsis "Hooks for the minitest framework") + (description + "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all}, +@code{around_all} hooks for Minitest. This allows, for instance, running each +suite of specs inside a database transaction, running each spec inside its own +savepoint inside that transaction. This can significantly speed up testing +for specs that share expensive database setup code.") + (home-page "http://github.com/jeremyevans/minitest-hooks") + (license license:expat))) + (define-public ruby-daemons (package (name "ruby-daemons") @@ -1817,13 +1839,13 @@ net/http library.") (define-public ruby-arel (package (name "ruby-arel") - (version "6.0.3") + (version "7.1.1") (source (origin (method url-fetch) (uri (rubygems-uri "arel" version)) (sha256 (base32 - "1a270mlajhrmpqbhxcqjqypnvgrq4pgixpv3w9gwp1wrrapnwrzk")))) + "0d6kfsh7qf5gls0n1nrppxv89zyli27kw8nklpq2by3z7cxjcvjg")))) (build-system ruby-build-system) (arguments '(#:tests? #f)) ; no tests (home-page "https://github.com/rails/arel") @@ -1876,42 +1898,59 @@ to reproduce user environments.") (define-public ruby-mini-portile-2 (package (inherit ruby-mini-portile) - (version "2.0.0") + (version "2.1.0") (source (origin (method url-fetch) (uri (rubygems-uri "mini_portile2" version)) (sha256 (base32 - "056drbn5m4khdxly1asmiik14nyllswr6sh3wallvsywwdiryz8l")))))) + "1y25adxb1hgg1wb2rn20g3vl07qziq6fz364jc5694611zz863hb")))))) (define-public ruby-nokogiri (package (name "ruby-nokogiri") - (version "1.6.7.1") + (version "1.6.8") (source (origin (method url-fetch) (uri (rubygems-uri "nokogiri" version)) (sha256 (base32 - "12nwv3lad5k2k73aa1d1xy4x577c143ixks6rs70yp78sinbglk2")))) + "17pjhvm4yigriizxbbpx266nnh6nckdm33m3j4ws9dcg99daz91p")))) (build-system ruby-build-system) (arguments ;; Tests fail because Nokogiri can only test with an installed extension, ;; and also because many test framework dependencies are missing. - '(#:tests? #f + `(#:tests? #f #:gem-flags (list "--" "--use-system-libraries" (string-append "--with-xml2-include=" (assoc-ref %build-inputs "libxml2") - "/include/libxml2" )))) + "/include/libxml2" )) + #:phases + (modify-phases %standard-phases + (add-before 'build 'patch-extconf + ;; 'pkg-config' is not included in the GEM_PATH during + ;; installation, so we add it directly to the load path. + (lambda* (#:key inputs #:allow-other-keys) + (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")) + (pkg-config-home (gem-home pkg-config + ,(package-version ruby)))) + (substitute* "ext/nokogiri/extconf.rb" + (("gem 'pkg-config'.*") + (string-append "$:.unshift '" + pkg-config-home + "/gems/pkg-config-" + ,(package-version ruby-pkg-config) + "/lib'\n")))) + #t))))) (native-inputs - `(("ruby-hoe" ,ruby-hoe) - ("ruby-rake-compiler" ,ruby-rake-compiler))) + `(("ruby-hoe" ,ruby-hoe))) (inputs `(("zlib" ,zlib) ("libxml2" ,libxml2) ("libxslt" ,libxslt))) (propagated-inputs - `(("ruby-mini-portile" ,ruby-mini-portile-2))) + `(("ruby-mini-portile" ,ruby-mini-portile-2) + ("ruby-pkg-config" ,ruby-pkg-config))) (synopsis "HTML, XML, SAX, and Reader parser for Ruby") (description "Nokogiri (鋸) parses and searches XML/HTML, and features both CSS3 selector and XPath 1.0 support.") @@ -2073,6 +2112,38 @@ aware transformations between times in different time zones.") (home-page "http://tzinfo.github.io") (license license:expat))) +(define-public ruby-tzinfo-data + (package + (name "ruby-tzinfo-data") + (version "1.2016.9") + (source + (origin + (method url-fetch) + ;; Download from GitHub because the rubygems version does not contain + ;; Rakefile or tests. + (uri (string-append + "https://github.com/tzinfo/tzinfo-data/archive/v" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0i8vz2j7wmcpr4pd066qvlg4if5blscjrgxk2imavfa49nq5lp06")) + ;; Remove the known test failure. + ;; https://github.com/tzinfo/tzinfo-data/issues/10 + ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128 + (patches (search-patches + "ruby-tzinfo-data-ignore-broken-test.patch")))) + (build-system ruby-build-system) + (propagated-inputs + `(("ruby-tzinfo" ,ruby-tzinfo))) + (synopsis "Data from the IANA Time Zone database") + (description + "This library provides @code{TZInfo::Data}, which contains data from the +IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.") + (home-page "http://tzinfo.github.io") + (license license:expat))) + (define-public ruby-rb-inotify (package (name "ruby-rb-inotify") @@ -2406,6 +2477,8 @@ a native C extension.") (substitute* "Rakefile" (("FileList\\[`git ls-files`\\.split\\(/\\\\n/\\)\\]") (string-append "FileList" files)))) + (substitute* "Gemfile" + ((".*json-java.*") "\n")) #t))))) (native-inputs `(("ruby-permutation" ,ruby-permutation) @@ -2465,23 +2538,28 @@ you about the changes.") (define-public ruby-activesupport (package (name "ruby-activesupport") - (version "4.2.4") + (version "5.0.0") (source (origin (method url-fetch) (uri (rubygems-uri "activesupport" version)) (sha256 (base32 - "19n38rj6r1gyxgka18qvcxyla0fwan8a5p3ghq0pp8aj93sbmr6f")))) + "0k7zhnz0aw1ym8phs10r85f91ja45vsd058fm9v0h2k0igw12cpf")))) (build-system ruby-build-system) (arguments - '(#:tests? #f)) ; no tests + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; There is no tests, instead attempt to load the library. + (zero? (system* "ruby" "-Ilib" "-r" "active_support"))))))) (propagated-inputs - `(("ruby-i18n" ,ruby-i18n) - ("ruby-json" ,ruby-json) + `(("ruby-concurrent" ,ruby-concurrent) + ("ruby-i18n" ,ruby-i18n) ("ruby-minitest" ,ruby-minitest) - ("ruby-thread-safe" ,ruby-thread-safe) - ("ruby-tzinfo" ,ruby-tzinfo))) + ("ruby-tzinfo" ,ruby-tzinfo) + ("ruby-tzinfo-data" ,ruby-tzinfo-data))) (synopsis "Ruby on Rails utility library") (description "ActiveSupport is a toolkit of support libraries and Ruby core extensions extracted from the Rails framework. It includes support for @@ -2510,67 +2588,68 @@ multibyte strings, internationalization, time zones, and testing.") (license license:expat))) (define-public ruby-nokogumbo - (package - (name "ruby-nokogumbo") - (version "1.4.6") - (source (origin - ;; We use the git reference, because there's no Rakefile in the - ;; published gem and the tarball on Github is outdated. - (method git-fetch) - (uri (git-reference - (url "https://github.com/rubys/nokogumbo.git") - (commit "d56f954d20a"))) - (file-name (string-append name "-" version "-checkout")) - (sha256 - (base32 - "0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl")))) - (build-system ruby-build-system) - (arguments - `(#:modules ((guix build ruby-build-system) - (guix build utils) - (ice-9 rdelim)) - #:phases - (modify-phases %standard-phases - (add-before 'build 'build-gemspec - (lambda _ - (substitute* "Rakefile" - ;; Build Makefile even without a copy of gumbo-parser sources - (("'gumbo-parser/src',") "") - ;; We don't bundle gumbo-parser sources - (("'gumbo-parser/src/\\*',") "") - (("'gumbo-parser/visualc/include/\\*',") "") - ;; The definition of SOURCES will be cut in gemspec, and - ;; "FileList" will be undefined. - (("SOURCES \\+ FileList\\[") - "['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', ")) - - ;; Copy the Rakefile and cut out the gemspec. - (copy-file "Rakefile" ".gemspec") - (with-atomic-file-replacement ".gemspec" - (lambda (in out) - (let loop ((line (read-line in 'concat)) - (skipping? #t)) - (if (eof-object? line) - #t - (let ((skip-next? (if skipping? - (not (string-prefix? "SPEC =" line)) - (string-prefix? "end" line)))) - (when (or (not skipping?) - (and skipping? (not skip-next?))) - (format #t "~a" line) - (display line out)) - (loop (read-line in 'concat) skip-next?)))))) - #t))))) - (inputs - `(("gumbo-parser" ,gumbo-parser))) - (propagated-inputs - `(("ruby-nokogiri" ,ruby-nokogiri))) - (synopsis "Ruby bindings to the Gumbo HTML5 parser") - (description - "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and + (let ((commit "fb51ff299a1c34346837580b6d1d9a60fadf5dbd")) + (package + (name "ruby-nokogumbo") + (version (string-append "1.4.7-1." (string-take commit 8))) + (source (origin + ;; We use the git reference, because there's no Rakefile in the + ;; published gem and the tarball on Github is outdated. + (method git-fetch) + (uri (git-reference + (url "https://github.com/rubys/nokogumbo.git") + (commit "d56f954d20a"))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl")))) + (build-system ruby-build-system) + (arguments + `(#:modules ((guix build ruby-build-system) + (guix build utils) + (ice-9 rdelim)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'build-gemspec + (lambda _ + (substitute* "Rakefile" + ;; Build Makefile even without a copy of gumbo-parser sources + (("'gumbo-parser/src',") "") + ;; We don't bundle gumbo-parser sources + (("'gumbo-parser/src/\\*',") "") + (("'gumbo-parser/visualc/include/\\*',") "") + ;; The definition of SOURCES will be cut in gemspec, and + ;; "FileList" will be undefined. + (("SOURCES \\+ FileList\\[") + "['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', ")) + + ;; Copy the Rakefile and cut out the gemspec. + (copy-file "Rakefile" ".gemspec") + (with-atomic-file-replacement ".gemspec" + (lambda (in out) + (let loop ((line (read-line in 'concat)) + (skipping? #t)) + (if (eof-object? line) + #t + (let ((skip-next? (if skipping? + (not (string-prefix? "SPEC =" line)) + (string-prefix? "end" line)))) + (when (or (not skipping?) + (and skipping? (not skip-next?))) + (format #t "~a" line) + (display line out)) + (loop (read-line in 'concat) skip-next?)))))) + #t))))) + (inputs + `(("gumbo-parser" ,gumbo-parser))) + (propagated-inputs + `(("ruby-nokogiri" ,ruby-nokogiri))) + (synopsis "Ruby bindings to the Gumbo HTML5 parser") + (description + "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and access the result as a Nokogiri parsed document.") - (home-page "https://github.com/rubys/nokogumbo/") - (license license:asl2.0))) + (home-page "https://github.com/rubys/nokogumbo/") + (license license:asl2.0)))) (define-public ruby-sanitize (package @@ -2821,14 +2900,22 @@ differences (added or removed nodes) between two XML/HTML documents.") (define-public ruby-rack (package (name "ruby-rack") - (version "1.6.4") + (version "2.0.1") (source (origin (method url-fetch) - (uri (rubygems-uri "rack" version)) + ;; Download from GitHub so that the patch can be applied. + (uri (string-append + "https://github.com/rack/rack/archive/" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "09bs295yq6csjnkzj7ncj50i6chfxrhmzg1pk6p0vd2lb9ac8pj5")))) + "00k62v8lpyjzghkn0h0awrnqj1jmlcs2wp57py27m43y65v89cp3")) + ;; Ignore test which fails inside the build environment but works + ;; outside. + (patches (search-patches "ruby-rack-ignore-failing-test.patch")))) (build-system ruby-build-system) (arguments '(#:phases @@ -2853,7 +2940,11 @@ differences (added or removed nodes) between two XML/HTML documents.") (number->string (+ 33 size-diff)))))) #t))))) (native-inputs - `(("ruby-bacon" ,ruby-bacon))) + `(("ruby-minitest" ,ruby-minitest) + ("ruby-minitest-sprint" ,ruby-minitest-sprint) + ("which" ,which))) + (propagated-inputs + `(("ruby-concurrent" ,ruby-concurrent))) (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, @@ -2883,43 +2974,43 @@ Ruby classes.") (home-page "https://ms-ati.github.io/docile/") (license license:expat))) -(define-public ruby-gherkin3 +(define-public ruby-gherkin (package - (name "ruby-gherkin3") - (version "3.1.1") + (name "ruby-gherkin") + (version "4.0.0") (source (origin (method url-fetch) - (uri (rubygems-uri "gherkin3" version)) + (uri (rubygems-uri "gherkin" version)) (sha256 (base32 - "0xsyxhqa1gwcxzvsdy4didaiq5vam8ma3fbwbw2w60via4k6r1z9")))) + "1ripjv97hg746xszx9isal8z8vrlb98asc2rdxl291b3hr6pj0pr")))) (build-system ruby-build-system) (native-inputs `(("bundler" ,bundler))) (arguments '(#:tests? #f)) ; needs simplecov, among others (synopsis "Gherkin parser for Ruby") - (description "Gherkin 3 is a parser and compiler for the Gherkin language. -It is intended to replace Gherkin 2 and be used by all Cucumber -implementations to parse '.feature' files.") + (description "Gherkin is a parser and compiler for the Gherkin language. +It is intended be used by all Cucumber implementations to parse '.feature' +files.") (home-page "https://github.com/cucumber/gherkin3") (license license:expat))) (define-public ruby-cucumber-core (package (name "ruby-cucumber-core") - (version "1.3.0") + (version "1.5.0") (source (origin (method url-fetch) (uri (rubygems-uri "cucumber-core" version)) (sha256 (base32 - "12mrzf0s96izpq0k10lahlkgwc4fjs0zfs344rh8r8h3w3jyppr8")))) + "0qj2fsqvp94nggnikbnrfvnmzr1pl6ifmdsxj69kdw1kkab30jjr")))) (build-system ruby-build-system) (propagated-inputs - `(("ruby-gherkin3" ,ruby-gherkin3))) + `(("ruby-gherkin" ,ruby-gherkin))) (native-inputs `(("bundler" ,bundler))) (arguments @@ -3134,14 +3225,14 @@ that TURN is no longer being maintained.") (define-public ruby-mime-types-data (package (name "ruby-mime-types-data") - (version "3.2015.1120") + (version "3.2016.0521") (source (origin (method url-fetch) (uri (rubygems-uri "mime-types-data" version)) (sha256 (base32 - "04fzvy02w8d0rrsg8avncn7h58pvwdxj82aps54srb3sam2dkhic")))) + "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm")))) (build-system ruby-build-system) (native-inputs `(("ruby-hoe" ,ruby-hoe))) @@ -3158,14 +3249,14 @@ look up the likely MIME type definitions.") (define-public ruby-mime-types (package (name "ruby-mime-types") - (version "3.0") + (version "3.1") (source (origin (method url-fetch) (uri (rubygems-uri "mime-types" version)) (sha256 (base32 - "1snjc38a9vqvy8j41xld1i1byq9prbl955pbjw7dxqcfcirqlzra")))) + "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m")))) (build-system ruby-build-system) (propagated-inputs `(("ruby-mime-types-data" ,ruby-mime-types-data))) @@ -3174,7 +3265,8 @@ look up the likely MIME type definitions.") ("ruby-fivemat" ,ruby-fivemat) ("ruby-minitest-focus" ,ruby-minitest-focus) ("ruby-minitest-rg" ,ruby-minitest-rg) - ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions))) + ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions) + ("ruby-minitest-hooks" ,ruby-minitest-hooks))) (synopsis "Library and registry for MIME content type definitions") (description "The mime-types library provides a library and registry for information about Multipurpose Internet Mail Extensions (MIME) content type @@ -3209,14 +3301,14 @@ neither too verbose nor too minimal.") (define-public ruby-sqlite3 (package (name "ruby-sqlite3") - (version "1.3.11") + (version "1.3.12") (source (origin (method url-fetch) (uri (rubygems-uri "sqlite3" version)) (sha256 (base32 - "19r06wglnm6479ffj9dl0fa4p5j2wi6dj7k6k3d0rbx7036cv3ny")))) + "0hld87rvwyy31xsxzhicv2lj3g3kmvmwfxj09kw13g6lacdjz4bx")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3241,14 +3333,14 @@ engine.") (define-public ruby-shoulda-context (package (name "ruby-shoulda-context") - (version "1.2.1") + (version "1.2.2") (source (origin (method url-fetch) (uri (rubygems-uri "shoulda-context" version)) (sha256 (base32 - "06wv2ika5zrbxn0m3qxwk0zkbspxids3zmlq3xxays5qmvl1qb55")))) + "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3270,26 +3362,18 @@ names.") (define-public ruby-shoulda-matchers (package (name "ruby-shoulda-matchers") - (version "3.0.1") + (version "3.1.1") (source (origin (method url-fetch) (uri (rubygems-uri "shoulda-matchers" version)) (sha256 (base32 - "1agabvb8i39mjrp3kb78nvhl41xk1i258hdwdlj0fm8nj9yzn1jb")))) + "1cf6d2d9br82vylr9p362yk9cfrd14jz8v77n0yb0lbcxdbk7xzq")))) (build-system ruby-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-before 'build 'fix-import - (lambda _ - ;; A presumed bug reported upstream at - ;; https://github.com/thoughtbot/shoulda-matchers/pull/871 - (substitute* (string-append "lib/shoulda/matchers/active_model/" - "validate_inclusion_of_matcher.rb") - (("^require 'bigdecimal'") - "require 'bigdecimal'; require 'date'")))) (replace 'check (lambda _ ;; Do not run tests to avoid circular dependence with rails. Instead @@ -3385,14 +3469,14 @@ support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and (define-public ruby-domain-name (package (name "ruby-domain-name") - (version "0.5.25") + (version "0.5.20161021") (source (origin (method url-fetch) (uri (rubygems-uri "domain_name" version)) (sha256 (base32 - "16qvfrmcwlzz073aas55mpw2nhyhjcn96s524w0g1wlml242hjav")))) + "1y5c96gzyh6z4nrnkisljqngfvljdba36dww657ka0x7khzvx7jl")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3425,14 +3509,14 @@ Suffix List.") (define-public ruby-http-cookie (package (name "ruby-http-cookie") - (version "1.0.2") + (version "1.0.3") (source (origin (method url-fetch) (uri (rubygems-uri "http-cookie" version)) (sha256 (base32 - "0cz2fdkngs3jc5w32a6xcl511hy03a7zdiy988jk1sf3bf5v3hdw")))) + "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3528,14 +3612,14 @@ subprocess.") (define-public ruby-bio-commandeer (package (name "ruby-bio-commandeer") - (version "0.1.2") + (version "0.1.3") (source (origin (method url-fetch) (uri (rubygems-uri "bio-commandeer" version)) (sha256 (base32 - "061jxa6km92qfwzl058r2gp8gfcsbyr7m643nw1pxvmjdswaf6ly")))) + "0lin6l99ldqqjc90l9ihcrv882c4xgbgqm16jqkdy6jf955jd9a8")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3742,14 +3826,14 @@ Rubytest-based test frameworks. It provides the @code{rubytest} executable.") (define-public ruby-hashery (package (name "ruby-hashery") - (version "2.1.1") + (version "2.1.2") (source (origin (method url-fetch) (uri (rubygems-uri "hashery" version)) (sha256 (base32 - "0xawbljsjarl9l7700bka672ixwznzwih4s9i38p1y9mp8hyx54g")))) + "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj")))) (build-system ruby-build-system) (arguments `(#:phases @@ -3883,3 +3967,213 @@ part of the Prawn PDF generator.") ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE ;; for details." (license (list license:gpl2 license:gpl3 license:ruby)))) + +(define-public ruby-puma + (package + (name "ruby-puma") + (version "3.6.0") + (source + (origin + (method url-fetch) + ;; Fetch from GitHub because distributed gem does not contain tests. + (uri (string-append "https://github.com/puma/puma/archive/v" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "08aws79n9slcr50d9lwm011cp1pxvr1409c2jmyjxywvrc0a30v1")) + ;; Ignore broken tests reported upstream. + ;; https://github.com/puma/puma/issues/995 + ;; https://github.com/puma/puma/issues/1044 + (patches (search-patches "ruby-puma-ignore-broken-test.patch")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'delete-integration-tests + (lambda _ + ;; One broken test in this file cannot be easily removed in + ;; isolation, it probably causes race conditions. So we delete + ;; the entire file. + (delete-file "test/test_integration.rb") + #t)) + (add-before 'build 'fix-gemspec + (lambda _ + (substitute* "puma.gemspec" + (("git ls-files") "find * |sort")) + #t))))) + (native-inputs + `(("ruby-hoe" ,ruby-hoe) + ("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-hoe-git" ,ruby-hoe-git) + ("ruby-rack" ,ruby-rack))) + (synopsis "Simple, concurrent HTTP server for Ruby/Rack") + (description + "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server +for Ruby/Rack applications. Puma is intended for use in both development and +production environments. In order to get the best throughput, it is highly +recommended that you use a Ruby implementation with real threads like Rubinius +or JRuby.") + (home-page "http://puma.io") + (license license:expat))) + +(define-public ruby-hoe-git + (package + (name "ruby-hoe-git") + (version "1.6.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "hoe-git" version)) + (sha256 + (base32 + "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650")))) + (build-system ruby-build-system) + (propagated-inputs + `(("ruby-hoe" ,ruby-hoe) + ("git" ,git))) + (synopsis "Hoe plugins for tighter Git integration") + (description + "This package provides a set of Hoe plugins for tighter Git integration. +It provides tasks to automate release tagging and pushing and changelog +generation.") + (home-page "http://github.com/jbarnette/hoe-git") + (license license:expat))) + +(define-public ruby-sequel + (package + (name "ruby-sequel") + (version "4.40.0") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "sequel" version)) + (sha256 + (base32 + "0r39dv3yprai0cy7hslfxswjr4fg783xwxskmbih8ry24f18lbk0")))) + (build-system ruby-build-system) + (arguments + '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks. + (synopsis "Database toolkit for Ruby") + (description "Sequel provides thread safety, connection pooling and a +concise DSL for constructing SQL queries and table schemas. It includes a +comprehensive ORM layer for mapping records to Ruby objects and handling +associated records.") + (home-page "http://sequel.jeremyevans.net") + (license license:expat))) + +(define-public ruby-timecop + (package + (name "ruby-timecop") + (version "0.8.1") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "timecop" version)) + (sha256 + (base32 + "0vwbkwqyxhavzvr1820hqwz43ylnfcf6w4x6sag0nghi44sr9kmx")))) + (build-system ruby-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-check-rubylib + (lambda _ + ;; Set RUBYLIB so timecop tests finds its own lib. + (setenv "RUBYLIB" "lib") + #t))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-minitest-rg" ,ruby-minitest-rg) + ("ruby-mocha" ,ruby-mocha) + ("ruby-activesupport" ,ruby-activesupport))) + (synopsis "Test mocks for time-dependent functions") + (description + "Timecop provides \"time travel\" and \"time freezing\" capabilities, +making it easier to test time-dependent code. It provides a unified method to +mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single +call.") + (home-page "https://github.com/travisjeffery/timecop") + (license license:expat))) + +(define-public ruby-concurrent + (package + (name "ruby-concurrent") + (version "1.0.2") + (source + (origin + (method url-fetch) + ;; Download from GitHub because the rubygems version does not contain + ;; Rakefile. + (uri (string-append + "https://github.com/ruby-concurrency/concurrent-ruby/archive/v" + version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1x3g2admp14ykwfxidsicqbhlfsnxh9wyc806np4i15hws4if1d8")) + ;; Exclude failing test reported at + ;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534 + (patches (search-patches "ruby-concurrent-ignore-broken-test.patch")))) + (build-system ruby-build-system) + (arguments + `(#:test-target "spec" + #:phases + (modify-phases %standard-phases + (add-before 'replace-git-ls-files 'remove-extra-gemspecs + (lambda _ + ;; Delete extra gemspec files so 'first-gemspec' chooses the + ;; correct one. + (delete-file "concurrent-ruby-edge.gemspec") + (delete-file "concurrent-ruby-ext.gemspec") + #t)) + (add-before 'build 'replace-git-ls-files2 + (lambda _ + (substitute* "support/file_map.rb" + (("git ls-files") "find * |sort")) + #t)) + (add-before 'check 'rake-compile + ;; Fix the test error described at + ;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408 + (lambda _ (zero? (system* "rake" "compile")))) + (add-before 'check 'remove-timecop-dependency + ;; Remove timecop-dependent tests as having timecop as a depedency + ;; causes circular depedencies. + (lambda _ + (delete-file "spec/concurrent/executor/timer_set_spec.rb") + (delete-file "spec/concurrent/scheduled_task_spec.rb") + #t))))) + (native-inputs + `(("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-rspec" ,ruby-rspec))) + (synopsis "Concurrency tools for Ruby") + (description + "This library provides modern concurrency tools including agents, +futures, promises, thread pools, actors, supervisors, and more. It is +inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency +patterns.") + (home-page "http://www.concurrent-ruby.com") + (license license:expat))) + +(define-public ruby-pkg-config + (package + (name "ruby-pkg-config") + (version "1.1.7") + (source + (origin + (method url-fetch) + (uri (rubygems-uri "pkg-config" version)) + (sha256 + (base32 + "0lljiqnm0b4z6iy87lzapwrdfa6ps63x2z5zbs038iig8dqx2g0z")))) + (build-system ruby-build-system) + (arguments + ;; Tests require extra files not included in the gem. + `(#:tests? #f)) + (synopsis "Detect libraries for compiling Ruby native extensions") + (description + "@code{pkg-config} can be used in your extconf.rb to properly detect need +libraries for compiling Ruby native extensions.") + (home-page "https://github.com/ruby-gnome2/pkg-config") + (license license:lgpl2.0+)))