Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
index af7b1af..877f229 100644 (file)
@@ -4,7 +4,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -46,7 +46,7 @@
 (define-public ruby
   (package
     (name "ruby")
-    (version "2.2.4")
+    (version "2.3.1")
     (source
      (origin
        (method url-fetch)
                            "/ruby-" version ".tar.xz"))
        (sha256
         (base32
-         "0g3ps4q3iz7wj9m45n8xyxzw8nh29ljdqb87b0f6i0p3853gz2yj"))))
+         "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"))
+                   #t))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
-       #:parallel-tests? #f
        #:phases
-       (alist-cons-before
-        'configure 'replace-bin-sh
-        (lambda _
-          (substitute* '("Makefile.in"
-                         "ext/pty/pty.c"
-                         "io.c"
-                         "lib/mkmf.rb"
-                         "process.c"
-                         "test/rubygems/test_gem_ext_configure_builder.rb"
-                         "test/rdoc/test_rdoc_parser.rb"
-                         "test/ruby/test_rubyoptions.rb"
-                         "test/ruby/test_process.rb"
-                         "test/ruby/test_system.rb"
-                         "tool/rbinstall.rb")
-            (("/bin/sh") (which "sh"))))
-        %standard-phases)))
+       (modify-phases %standard-phases
+         (add-before 'configure 'replace-bin-sh-and-remove-libffi
+           (lambda _
+             (substitute* '("Makefile.in"
+                            "ext/pty/pty.c"
+                            "io.c"
+                            "lib/mkmf.rb"
+                            "process.c"
+                            "test/rubygems/test_gem_ext_configure_builder.rb"
+                            "test/rdoc/test_rdoc_parser.rb"
+                            "test/ruby/test_rubyoptions.rb"
+                            "test/ruby/test_process.rb"
+                            "test/ruby/test_system.rb"
+                            "tool/rbinstall.rb")
+               (("/bin/sh") (which "sh")))
+             #t)))))
     (inputs
      `(("readline" ,readline)
        ("openssl" ,openssl)
@@ -95,9 +101,22 @@ a focus on simplicity and productivity.")
     (home-page "https://ruby-lang.org")
     (license license:ruby)))
 
+(define-public ruby-2.2
+  (package (inherit ruby)
+    (version "2.2.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
+                           (version-major+minor version)
+                           "/ruby-" version ".tar.xz"))
+       (sha256
+        (base32
+         "1mw7bzw76g5w37cwhb57r6gxcl2vn9lfrlyf4h4xms3qlnhflvzq"))))))
+
 (define-public ruby-2.1
   (package (inherit ruby)
-    (version "2.1.8")
+    (version "2.1.10")
     (source
      (origin
        (method url-fetch)
@@ -106,7 +125,7 @@ a focus on simplicity and productivity.")
                            "/ruby-" version ".tar.bz2"))
        (sha256
         (base32
-         "11rkbfc90cg9p9mzg32475alf3ddcn9q8a3ar3fwm5xskic0n395"))))
+         "1wglbd599mlwxfcb2xgqcxi2shr363pjn5dpbv11m04si9bpaim7"))))
     (arguments
      `(#:test-target "test"
        #:parallel-tests? #f
@@ -404,13 +423,13 @@ expectations and mocks frameworks.")
 (define-public bundler
   (package
     (name "bundler")
-    (version "1.10.6")
+    (version "1.12.5")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "bundler" version))
               (sha256
                (base32
-                "1vlzfq0bkkj4jyq6av0y55mh5nj5n0f3mfbmmifwgkh44g8k6agv"))))
+                "1q84xiwm9j771lpmiply0ls9l2bpvl5axn3jblxjvrldh8di2pkc"))))
     (build-system ruby-build-system)
     (arguments
      '(#:tests? #f)) ; avoid dependency cycles
@@ -1059,13 +1078,13 @@ using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
 (define-public ruby-power-assert
   (package
     (name "ruby-power-assert")
-    (version "0.2.6")
+    (version "0.2.7")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "power_assert" version))
               (sha256
                (base32
-                "0gbj379jhnff8rbb6m3kzdm282szjz1a021xzxa38d1bnswj2jx3"))))
+                "0ka6w71lcan4wgf111xi3pcn9ma9lhakv31jg8w007nwzi0xfjbi"))))
     (build-system ruby-build-system)
     (native-inputs
      `(("bundler" ,bundler)))
@@ -1212,15 +1231,18 @@ It allows writing tests, checking results and automated testing in Ruby.")
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'add-test-unit-to-search-path
-          (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "Rakefile"
-              (("t\\.libs << \"test\"" line)
-               (string-append line "; t.libs << \""
-                              (assoc-ref inputs "ruby-test-unit")
-                              "/lib/ruby/gems/2.2.0/gems/test-unit-"
-                              ,(package-version ruby-test-unit)
-                              "/lib\"")))
-            #t)))))
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
+                    (test-unit-home (gem-home test-unit
+                                              ,(package-version ruby))))
+               (substitute* "Rakefile"
+                 (("t\\.libs << \"test\"" line)
+                  (string-append line "; t.libs << \""
+                                 test-unit-home
+                                 "/gems/test-unit-"
+                                 ,(package-version ruby-test-unit)
+                                 "/lib\""))))
+             #t)))))
     (native-inputs
      `(("bundler" ,bundler)
        ("ruby-test-unit" ,ruby-test-unit)))
@@ -1274,15 +1296,18 @@ as a base class when writing classes that depend upon
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'add-test-unit-to-search-path
-          (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "Rakefile"
-              (("t\\.libs << \"test\"" line)
-               (string-append line "; t.libs << \""
-                              (assoc-ref inputs "ruby-test-unit")
-                              "/lib/ruby/gems/2.2.0/gems/test-unit-"
-                              ,(package-version ruby-test-unit)
-                              "/lib\"")))
-            #t)))))
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
+                    (test-unit-home (gem-home test-unit ,(package-version
+                                                          ruby))))
+               (substitute* "Rakefile"
+                 (("t\\.libs << \"test\"" line)
+                  (string-append line "; t.libs << \""
+                                 test-unit-home
+                                 "/gems/test-unit-"
+                                 ,(package-version ruby-test-unit)
+                                 "/lib\""))))
+             #t)))))
     (propagated-inputs
      `(("ruby-blankslate" ,ruby-blankslate)))
     (native-inputs
@@ -1311,13 +1336,16 @@ knowing anything about the constructor.")
        (modify-phases %standard-phases
          (add-after 'unpack 'add-test-unit-to-search-path
           (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "Rakefile"
-              (("t\\.libs << \"test\"" line)
-               (string-append line "; t.libs << \""
-                              (assoc-ref inputs "ruby-test-unit")
-                              "/lib/ruby/gems/2.2.0/gems/test-unit-"
-                              ,(package-version ruby-test-unit)
-                              "/lib\"")))
+            (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
+                   (test-unit-home (gem-home test-unit ,(package-version
+                                                         ruby))))
+              (substitute* "Rakefile"
+                (("t\\.libs << \"test\"" line)
+                 (string-append line "; t.libs << \""
+                                test-unit-home
+                                "/gems/test-unit-"
+                                ,(package-version ruby-test-unit)
+                                "/lib\""))))
             #t)))))
     (propagated-inputs
      `(("ruby-instantiator" ,ruby-instantiator)
@@ -1381,13 +1409,16 @@ conversion to (X)HTML.")
        (modify-phases %standard-phases
          (add-after 'unpack 'add-test-unit-to-search-path
           (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "Rakefile"
-              (("t\\.libs << 'test'" line)
-               (string-append line "; t.libs << \""
-                              (assoc-ref inputs "ruby-test-unit")
-                              "/lib/ruby/gems/2.2.0/gems/test-unit-"
-                              ,(package-version ruby-test-unit)
-                              "/lib\"")))
+            (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
+                   (test-unit-home (gem-home test-unit
+                                             ,(package-version ruby))))
+              (substitute* "Rakefile"
+                (("t\\.libs << 'test'" line)
+                 (string-append line "; t.libs << \""
+                                test-unit-home
+                                "/gems/test-unit-"
+                                ,(package-version ruby-test-unit)
+                                "/lib\""))))
             #t))
          (add-before 'check 'use-latest-redcarpet
           (lambda _
@@ -1521,6 +1552,188 @@ functionality, making it easier to migrate test suites from bacon to minitest.")
     (home-page "https://github.com/seattlerb/minitest-bacon")
     (license license:expat)))
 
+(define-public ruby-minitest-focus
+  (package
+    (name "ruby-minitest-focus")
+    (version "1.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "minitest-focus" version))
+       (sha256
+        (base32
+         "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
+    (build-system ruby-build-system)
+    (propagated-inputs
+     `(("ruby-minitest" ,ruby-minitest)))
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)))
+    (synopsis "Allows a few specific tests to be focused on")
+    (description
+     "@code{minitest-focus} gives the ability focus on a few tests with ease
+without having to use command-line arguments.  It introduces a @code{focus}
+class method for use in testing classes, specifying that the next defined test
+is to be run.")
+    (home-page "https://github.com/seattlerb/minitest-focus")
+    (license license:expat)))
+
+(define-public ruby-minitest-pretty-diff
+  ;; Use git reference because gem is out of date and does not contain testing
+  ;; script.  There are no releases on GitHub.
+  (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
+    (package
+      (name "ruby-minitest-pretty-diff")
+      (version (string-append "0.1-1." (string-take commit 8)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/adammck/minitest-pretty_diff.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
+      (build-system ruby-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (replace 'check
+             (lambda _
+               (zero? (system* "script/test")))))))
+      (native-inputs
+       `(("bundler" ,bundler)
+         ("ruby-turn" ,ruby-turn)))
+      (synopsis "Pretty-print hashes and arrays in MiniTest")
+      (description
+       "@code{minitest-pretty_diff} monkey-patches
+@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
+diffing them.  This makes it easier to spot differences between nested
+structures when tests fail.")
+      (home-page "https://github.com/adammck/minitest-pretty_diff")
+      (license license:expat))))
+
+(define-public ruby-minitest-moar
+  (package
+    (name "ruby-minitest-moar")
+    (version "0.0.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "minitest-moar" version))
+       (sha256
+        (base32
+         "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'clean-dependencies
+           (lambda _
+             ;; Remove all gems defined in the Gemfile because these are not
+             ;; truly needed.
+             (substitute* "Gemfile"
+               (("gem .*") ""))
+             ;; Remove byebug as not needed to run tests.
+             (substitute* "test/test_helper.rb"
+               (("require 'byebug'") ""))
+             #t)))))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-minitest" ,ruby-minitest)))
+    (synopsis "Extra features and changes to MiniTest")
+    (description "@code{MiniTest Moar} add some additional features and
+changes some default behaviours in MiniTest.  For instance, Moar replaces the
+MiniTest @code{Object#stub} with a global @code{stub} method.")
+    (home-page "https://github.com/dockyard/minitest-moar")
+    (license license:expat)))
+
+(define-public ruby-minitest-bonus-assertions
+  (package
+    (name "ruby-minitest-bonus-assertions")
+    (version "2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "minitest-bonus-assertions" version))
+       (sha256
+        (base32
+         "11nrd32kwy61ndg9csk7l1ifya79ghrrv3vsrxj57k50m7na6jkm"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'clean-dependencies
+           (lambda _
+             ;; Remove unneeded require statement that would entail another
+             ;; dependency.
+             (substitute* "test/minitest_config.rb"
+               (("require 'minitest/bisect'") ""))
+             #t)))))
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)
+       ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
+       ("ruby-minitest-focus" ,ruby-minitest-focus)
+       ("ruby-minitest-moar" ,ruby-minitest-moar)))
+    (synopsis "Bonus assertions for @code{Minitest}")
+    (description
+     "Minitest bonus assertions provides extra MiniTest assertions.  For
+instance, it provides @code{assert_true}, @code{assert_false} and
+@code{assert_set_equal}.")
+    (home-page "https://github.com/halostatue/minitest-bonus-assertions")
+    (license license:expat)))
+
+(define-public ruby-minitest-rg
+  (package
+    (name "ruby-minitest-rg")
+    (version "5.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "minitest-rg" version))
+       (sha256
+        (base32
+         "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
+    (build-system ruby-build-system)
+    (arguments
+     ;; Some tests fail even outside Guix, so disable tests.
+     ;; https://github.com/blowmage/minitest-rg/issues/12
+     ;; https://github.com/blowmage/minitest-rg/pull/13
+     `(#:tests? #f))
+    (propagated-inputs
+     `(("ruby-minitest" ,ruby-minitest)))
+    (synopsis "Coloured output for Minitest")
+    (description
+     "@code{minitest-rg} changes the colour of the output from Minitest.")
+    (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")
@@ -1685,24 +1898,24 @@ 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.7.2")
     (source (origin
               (method url-fetch)
               (uri (rubygems-uri "nokogiri" version))
               (sha256
                (base32
-                "12nwv3lad5k2k73aa1d1xy4x577c143ixks6rs70yp78sinbglk2"))))
+                "11sbmpy60ynak6s3794q32lc99hs448msjy8rkp84ay7mq7zqspv"))))
     (build-system ruby-build-system)
     (arguments
      ;; Tests fail because Nokogiri can only test with an installed extension,
@@ -1711,10 +1924,16 @@ to reproduce user environments.")
        #: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-after 'extract-gemspec 'update-dependency
+           (lambda _
+             (substitute* ".gemspec" (("2.0.0.rc2") "2.0"))
+             #t)))))
     (native-inputs
      `(("ruby-hoe" ,ruby-hoe)
-       ("ruby-rake-compiler"ruby-rake-compiler)))
+       ("ruby-rake-compiler" ,ruby-rake-compiler)))
     (inputs
      `(("zlib" ,zlib)
        ("libxml2" ,libxml2)
@@ -1882,6 +2101,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.4")
+    (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
+         "0jnm8i379hn48cq5n39j7wzm08i0mw73kqzx3cqbxpiwlb1hnz80"))
+       ;; 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")
@@ -2047,13 +2298,17 @@ development of Ruby gems.")
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-test-include-path
           (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "Rakefile"
-              (("Hoe\\.add_include_dirs .*")
-               (string-append "Hoe.add_include_dirs \""
-                              (assoc-ref inputs "ruby-minitest-4")
-                              "/lib/ruby/gems/2.2.0/gems/minitest-"
-                              ,(package-version ruby-minitest-4)
-                              "/lib" "\"")))))
+             (let* ((minitest (assoc-ref inputs "ruby-minitest-4"))
+                    (minitest-home (gem-home minitest
+                                             ,(package-version ruby))))
+               (substitute* "Rakefile"
+                 (("Hoe\\.add_include_dirs .*")
+                  (string-append "Hoe.add_include_dirs \""
+                                 minitest-home
+                                 "/gems/minitest-"
+                                 ,(package-version ruby-minitest-4)
+                                 "/lib" "\""))))
+             #t))
          (add-before 'check 'fix-test-assumptions
           (lambda _
             ;; The test output includes the file name, so a couple of tests
@@ -2286,7 +2541,8 @@ you about the changes.")
        ("ruby-json" ,ruby-json)
        ("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
@@ -2315,67 +2571,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-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
 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
@@ -2776,9 +3033,17 @@ features such as filtering and fine grained logging.")
      `(#:test-target "specs"
        #:phases
        (modify-phases %standard-phases
-         (add-before 'check 'set-HOME
-          ;; $HOME needs to be set to somewhere writeable for tests to run
-          (lambda _ (setenv "HOME" "/tmp") #t)))))
+         (add-before 'check 'set-HOME-and-disable-failing-test
+           (lambda _
+             ;; $HOME needs to be set to somewhere writeable for tests to run
+             (setenv "HOME" "/tmp")
+             ;; Disable tests which fails on Ruby 2.3.  See
+             ;; https://github.com/lsegal/yard/issues/927
+             (substitute* "spec/parser/ruby/ruby_parser_spec.rb"
+               (("comment.type.should == :comment") "")
+               (("comment.docstring_hash_flag.should be_true") "")
+               (("comment.docstring.strip.should == .*") ""))
+             #t)))))
     (native-inputs
      `(("ruby-rspec" ,ruby-rspec-2)
        ("ruby-rack" ,ruby-rack)))
@@ -2895,6 +3160,362 @@ used to create both network servers and clients.")
     (home-page "http://rubyeventmachine.com")
     (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
 
+(define-public ruby-turn
+  (package
+    (name "ruby-turn")
+    (version "0.9.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "turn" version))
+       (sha256
+        (base32
+         "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Tests fail because turn changes its environment so can no longer
+         ;; find test/unit.  Instead simply test if the executable runs
+         ;; without issue.
+         (replace 'check
+           (lambda _
+             (zero? (system* "ruby" "-Ilib" "bin/turn" "-h")))))))
+    (propagated-inputs
+     `(("ruby-ansi" ,ruby-ansi)
+       ("ruby-minitest" ,ruby-minitest-4)))
+    (synopsis "Alternate set of alternative runners for MiniTest")
+    (description
+     "TURN provides a set of alternative runners for MiniTest which are both
+colorful and informative.  TURN displays each test on a separate line with
+failures being displayed immediately instead of at the end of the tests.  Note
+that TURN is no longer being maintained.")
+    (home-page "http://rubygems.org/gems/turn")
+    (license license:expat)))
+
+(define-public ruby-mime-types-data
+  (package
+    (name "ruby-mime-types-data")
+    (version "3.2016.0221")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "mime-types-data" version))
+       (sha256
+        (base32
+         "05ygjn0nnfh6yp1wsi574jckk95wqg9a6g598wk4svvrkmkrzkpn"))))
+    (build-system ruby-build-system)
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)))
+    (synopsis "Registry for information about MIME media type definitions")
+    (description
+     "@code{mime-types-data} provides a registry for information about
+Multipurpose Internet Mail Extensions (MIME) media type definitions.  It can
+be used with the Ruby mime-types library or other software to determine
+defined filename extensions for MIME types, or to use filename extensions to
+look up the likely MIME type definitions.")
+    (home-page "https://github.com/mime-types/mime-types-data/")
+    (license license:expat)))
+
+(define-public ruby-mime-types
+  (package
+    (name "ruby-mime-types")
+    (version "3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "mime-types" version))
+       (sha256
+        (base32
+         "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
+    (build-system ruby-build-system)
+    (propagated-inputs
+     `(("ruby-mime-types-data" ,ruby-mime-types-data)))
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)
+       ("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-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
+definitions.  It can be used to determine defined filename extensions for MIME
+types, or to use filename extensions to look up the likely MIME type
+definitions.")
+    (home-page "https://github.com/mime-types/ruby-mime-types")
+    (license license:expat)))
+
+(define-public ruby-fivemat
+  (package
+    (name "ruby-fivemat")
+    (version "1.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "fivemat" version))
+       (sha256
+        (base32
+         "1gvw6g4yc96l2pcyvigahyfsjxpdjx21iiwzvf965zippchdh6gk"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:tests? #f)) ; no tests
+    (synopsis "Each test file given its own line of dots")
+    (description
+     "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
+its own line of dots during testing.  It aims to provide test output that is
+neither too verbose nor too minimal.")
+    (home-page "https://github.com/tpope/fivemat")
+    (license license:expat)))
+
+(define-public ruby-sqlite3
+  (package
+    (name "ruby-sqlite3")
+    (version "1.3.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "sqlite3" version))
+       (sha256
+        (base32
+         "19r06wglnm6479ffj9dl0fa4p5j2wi6dj7k6k3d0rbx7036cv3ny"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'add-gemtest-file
+           ;; This file exists in the repository but is not distributed.
+           (lambda _ (zero? (system* "touch" ".gemtest")))))))
+    (inputs
+     `(("sqlite" ,sqlite)))
+    (native-inputs
+     `(("ruby-hoe" ,ruby-hoe)
+       ("ruby-rake-compiler" ,ruby-rake-compiler)
+       ("ruby-mini-portile" ,ruby-mini-portile)))
+    (synopsis "Interface with SQLite3 databases")
+    (description
+     "This module allows Ruby programs to interface with the SQLite3 database
+engine.")
+    (home-page
+     "https://github.com/sparklemotion/sqlite3-ruby")
+    (license license:bsd-3)))
+
+(define-public ruby-shoulda-context
+  (package
+    (name "ruby-shoulda-context")
+    (version "1.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "shoulda-context" version))
+       (sha256
+        (base32
+         "06wv2ika5zrbxn0m3qxwk0zkbspxids3zmlq3xxays5qmvl1qb55"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             ;; Do not run tests to avoid circular dependence with rails.
+             ;; Instead just import the library to test.
+             (zero? (system* "ruby" "-Ilib" "-r" "shoulda-context")))))))
+    (synopsis "Test::Unit context framework extracted from Shoulda")
+    (description
+     "@code{shoulda-context} is the context framework extracted from Shoulda.
+Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
+context, setup, and should blocks combine to produce natural test method
+names.")
+    (home-page "https://github.com/thoughtbot/shoulda-context")
+    (license license:expat)))
+
+(define-public ruby-shoulda-matchers
+  (package
+    (name "ruby-shoulda-matchers")
+    (version "3.1.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "shoulda-matchers" version))
+       (sha256
+        (base32
+         "1cf6d2d9br82vylr9p362yk9cfrd14jz8v77n0yb0lbcxdbk7xzq"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             ;; Do not run tests to avoid circular dependence with rails.  Instead
+             ;; just import the library to test.
+             (zero? (system* "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
+    (propagated-inputs
+     `(("ruby-activesupport" ,ruby-activesupport)))
+    (synopsis "Collection of testing matchers extracted from Shoulda")
+    (description
+     "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
+test common Rails functionality.  These tests would otherwise be much longer,
+more complex, and error-prone.")
+    (home-page "https://github.com/thoughtbot/shoulda-matchers")
+    (license license:expat)))
+
+(define-public ruby-shoulda-matchers-2
+  (package
+    (inherit ruby-shoulda-matchers)
+    (version "2.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (rubygems-uri "shoulda-matchers" version))
+              (sha256
+               (base32
+                "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
+
+(define-public ruby-shoulda
+  (package
+    (name "ruby-shoulda")
+    (version "3.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "shoulda" version))
+       (sha256
+        (base32
+         "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           ;; Don't run tests to avoid circular dependence with rails.  Instead
+           ;; just import the library to test.
+           (lambda _ (zero? (system* "ruby" "-Ilib" "-r" "shoulda")))))))
+    (propagated-inputs
+     `(("ruby-shoulda-context" ,ruby-shoulda-context)
+       ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
+    (synopsis "Context framework and matchers for testing")
+    (description
+     "@code{shoulda} is a meta-package combining @code{shoulda-context} and
+@code{shoulda-matchers} providing tools for writing tests.")
+    (home-page "https://github.com/thoughtbot/shoulda")
+    (license license:expat)))
+
+(define-public ruby-unf
+  (package
+    (name "ruby-unf")
+    (version "0.1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "unf" version))
+       (sha256
+        (base32
+         "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'add-dependency-to-bundler
+           (lambda _
+             ;; test-unit is required but not provided by the bundler
+             ;; environment.  This is fixed in the upstream repository but fix
+             ;; has not been released.
+             (substitute* "Gemfile"
+               (("^gemspec") "gem 'test-unit'\ngemspec"))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-unf-ext" ,ruby-unf-ext)))
+    (native-inputs
+     `(("ruby-shoulda" ,ruby-shoulda)
+       ("bundler" ,bundler)
+       ("ruby-test-unit" ,ruby-test-unit)))
+    (synopsis "Unicode Normalization Form support to Ruby and JRuby")
+    (description
+     "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
+support to both Ruby and JRuby.  It uses @code{unf_ext} on CRuby and
+@code{java.text.Normalizer} on JRuby.")
+    (home-page "https://github.com/knu/ruby-unf")
+    (license license:bsd-2)))
+
+(define-public ruby-domain-name
+  (package
+    (name "ruby-domain-name")
+    (version "0.5.20160310")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "domain_name" version))
+       (sha256
+        (base32
+         "0g1175zspkqhlvl9s11g7p2nbmqpvpxxv02q8csd0ryc81laapys"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'fix-versions
+           (lambda _
+             ;; Fix NameError that appears to already be fixed upstream.
+             (substitute* "Rakefile"
+               (("DomainName::VERSION")
+                "Bundler::GemHelper.gemspec.version"))
+             ;; Loosen unnecessarily strict test-unit version specification.
+             (substitute* "domain_name.gemspec"
+               (("<test-unit>, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-unf" ,ruby-unf)))
+    (native-inputs
+     `(("ruby-shoulda" ,ruby-shoulda)
+       ("bundler" ,bundler)
+       ("ruby-test-unit" ,ruby-test-unit)))
+    (synopsis "Domain name manipulation library")
+    (description
+     "@code{domain_name} is a Domain name manipulation library.  It parses a
+domain name ready for extracting the registered domain and TLD (Top Level
+Domain).  It can also be used for cookie domain validation based on the Public
+Suffix List.")
+    (home-page "https://github.com/knu/ruby-domain_name")
+    (license license:bsd-2)))
+
+(define-public ruby-http-cookie
+  (package
+    (name "ruby-http-cookie")
+    (version "1.0.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "http-cookie" version))
+       (sha256
+        (base32
+         "0cz2fdkngs3jc5w32a6xcl511hy03a7zdiy988jk1sf3bf5v3hdw"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'add-dependency-to-bundler
+           (lambda _
+             ;; Fix NameError
+             (substitute* "Rakefile"
+               (("HTTP::Cookie::VERSION")
+                "Bundler::GemHelper.gemspec.version"))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-domain-name" ,ruby-domain-name)))
+    (native-inputs
+     `(("rubysimplecov" ,ruby-simplecov)
+       ("bundler" ,bundler)
+       ("ruby-sqlite3" ,ruby-sqlite3)
+       ("ruby-test-unit" ,ruby-test-unit)))
+    (synopsis "Handle HTTP Cookies based on RFC 6265")
+    (description
+     "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
+RFC 6265.  It has been designed with security, standards compliance and
+compatibility in mind, to behave just the same as today's major web browsers.
+It has built-in support for the legacy @code{cookies.txt} and
+@code{cookies.sqlite} formats of Mozilla Firefox.")
+    (home-page "https://github.com/sparklemotion/http-cookie")
+    (license license:expat)))
+
 (define-public ruby-ansi
   (package
     (name "ruby-ansi")
@@ -2962,14 +3583,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
@@ -3176,14 +3797,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
@@ -3317,3 +3938,182 @@ 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.4.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
+         "10svyj2jk949y1dmkxyzipk1ddzl4iz9limrcws1zhpganpvq3j8"))
+       ;; Ignore broken test reported upstream.
+       ;; https://github.com/puma/puma/issues/995
+       (patches (search-patches "ruby-puma-ignore-broken-test.patch"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (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.34.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "sequel" version))
+       (sha256
+        (base32
+         "0qscddpfwcajggxvbm4a4jv8kkpn6q056bgdg03km34bz8bis1x1"))))
+    (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 'build 'remove-git-lsfiles-and-extra-gemspecs
+           (lambda _
+             (for-each (lambda (file)
+                         (substitute* file
+                           (("git ls-files") "find * |sort")))
+                       (list "concurrent-ruby.gemspec"
+                             "support/file_map.rb"))
+             #t))
+         (add-before 'build '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 'check 'rake-compile
+           ;; Fix the test error described at
+           ;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408
+           (lambda _ (zero? (system* "rake" "compile")))))))
+    (native-inputs
+     `(("ruby-rake-compiler" ,ruby-rake-compiler)
+       ("ruby-yard" ,ruby-yard)
+       ("ruby-rspec" ,ruby-rspec)
+       ("ruby-timecop" ,ruby-timecop)))
+    (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)))
+