685ee0489aae6ae4849664e08b05dac94abd1278
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
3 ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
8 ;;; Copyright © 2017 Nikita <nikita@n0.is>
9 ;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
13 ;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
14 ;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
15 ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
16 ;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
17 ;;; Copyright © 2019 Mikhail Kirillov <w96k.ru@gmail.com>
18 ;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
19 ;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
20 ;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
21 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
22 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.de>
23 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
24 ;;;
25 ;;; This file is part of GNU Guix.
26 ;;;
27 ;;; GNU Guix is free software; you can redistribute it and/or modify it
28 ;;; under the terms of the GNU General Public License as published by
29 ;;; the Free Software Foundation; either version 3 of the License, or (at
30 ;;; your option) any later version.
31 ;;;
32 ;;; GNU Guix is distributed in the hope that it will be useful, but
33 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 ;;; GNU General Public License for more details.
36 ;;;
37 ;;; You should have received a copy of the GNU General Public License
38 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40 (define-module (gnu packages ruby)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bison)
45 #:use-module (gnu packages c)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages crypto)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages dbm)
51 #:use-module (gnu packages rails)
52 #:use-module (gnu packages readline)
53 #:use-module (gnu packages autotools)
54 #:use-module (gnu packages java)
55 #:use-module (gnu packages libffi)
56 #:use-module (gnu packages libidn)
57 #:use-module (gnu packages linux)
58 #:use-module (gnu packages lsof)
59 #:use-module (gnu packages maths)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages networking)
62 #:use-module (gnu packages node)
63 #:use-module (gnu packages protobuf)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages ragel)
67 #:use-module (gnu packages rsync)
68 #:use-module (gnu packages sqlite)
69 #:use-module (gnu packages tls)
70 #:use-module (gnu packages version-control)
71 #:use-module (guix packages)
72 #:use-module (guix download)
73 #:use-module (guix git-download)
74 #:use-module (guix utils)
75 #:use-module (guix build-system gnu)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages web)
78 #:use-module (guix build-system ruby)
79 #:use-module ((srfi srfi-1) #:select (alist-delete)))
80
81 (define-public ruby
82 (package
83 (name "ruby")
84 (version "2.6.5")
85 (source
86 (origin
87 (method url-fetch)
88 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
89 (version-major+minor version)
90 "/ruby-" version ".tar.xz"))
91 (sha256
92 (base32
93 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
94 (modules '((guix build utils)))
95 (snippet `(begin
96 ;; Remove bundled libffi
97 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
98 #t))))
99 (build-system gnu-build-system)
100 (arguments
101 `(#:test-target "test"
102 #:configure-flags '("--enable-shared") ; dynamic linking
103 #:phases
104 (modify-phases %standard-phases
105 (add-before 'configure 'replace-bin-sh-and-remove-libffi
106 (lambda _
107 (substitute* '("Makefile.in"
108 "ext/pty/pty.c"
109 "io.c"
110 "lib/mkmf.rb"
111 "process.c"
112 "test/rubygems/test_gem_ext_configure_builder.rb"
113 "test/rdoc/test_rdoc_parser.rb"
114 "test/ruby/test_rubyoptions.rb"
115 "test/ruby/test_process.rb"
116 "test/ruby/test_system.rb"
117 "tool/rbinstall.rb")
118 (("/bin/sh") (which "sh")))
119 #t)))))
120 (inputs
121 `(("readline" ,readline)
122 ("openssl" ,openssl)
123 ("libffi" ,libffi)
124 ("gdbm" ,gdbm)))
125 (propagated-inputs
126 `(("zlib" ,zlib)))
127 (native-search-paths
128 (list (search-path-specification
129 (variable "GEM_PATH")
130 (files (list (string-append "lib/ruby/vendor_ruby"))))))
131 (synopsis "Programming language interpreter")
132 (description "Ruby is a dynamic object-oriented programming language with
133 a focus on simplicity and productivity.")
134 (home-page "https://www.ruby-lang.org")
135 (license license:ruby)))
136
137 (define-public ruby-2.7
138 (package
139 (inherit ruby)
140 (version "2.7.1")
141 (source
142 (origin
143 (method url-fetch)
144 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
145 (version-major+minor version)
146 "/ruby-" version ".tar.gz"))
147 (sha256
148 (base32
149 "0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
150 (modules '((guix build utils)))
151 (snippet `(begin
152 ;; Remove bundled libffi
153 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
154 #t))))
155 (arguments
156 `(#:test-target "test"
157 #:configure-flags '("--enable-shared") ; dynamic linking
158 #:phases
159 (modify-phases %standard-phases
160 (add-before 'configure 'replace-bin-sh-and-remove-libffi
161 (lambda _
162 (substitute* '("configure.ac"
163 "template/Makefile.in"
164 "lib/rubygems/installer.rb"
165 "ext/pty/pty.c"
166 "io.c"
167 "lib/mkmf.rb"
168 "process.c"
169 "test/rubygems/test_gem_ext_configure_builder.rb"
170 "test/rdoc/test_rdoc_parser.rb"
171 "test/ruby/test_rubyoptions.rb"
172 "test/ruby/test_process.rb"
173 "test/ruby/test_system.rb"
174 "tool/rbinstall.rb")
175 (("/bin/sh") (which "sh")))
176 #t)))))
177 (native-inputs
178 `(("autoconf" ,autoconf)))))
179
180 (define-public ruby-2.5
181 (package
182 (inherit ruby)
183 (version "2.5.8")
184 (source
185 (origin
186 (method url-fetch)
187 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
188 (version-major+minor version)
189 "/ruby-" version ".tar.xz"))
190 (sha256
191 (base32
192 "0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
193 (modules '((guix build utils)))
194 (snippet `(begin
195 ;; Remove bundled libffi
196 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
197 #t))))))
198
199 (define-public ruby-2.4
200 (package
201 (inherit ruby)
202 (version "2.4.10")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
207 (version-major+minor version)
208 "/ruby-" version ".tar.xz"))
209 (sha256
210 (base32
211 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
212 (modules '((guix build utils)))
213 (snippet `(begin
214 ;; Remove bundled libffi
215 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
216 #t))))))
217
218 (define-public mruby
219 (package
220 (name "mruby")
221 (version "2.0.0")
222 (source
223 (origin
224 (method git-fetch)
225 (uri (git-reference
226 (url "https://github.com/mruby/mruby.git")
227 (commit version)))
228 (file-name (git-file-name name version))
229 (sha256
230 (base32
231 "1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"))))
232 (build-system gnu-build-system)
233 (arguments
234 `(#:test-target "test"
235 #:phases
236 (modify-phases %standard-phases
237 (delete 'configure)
238 (add-after 'unpack 'enable-verbose-tests
239 (lambda _
240 (substitute* "Makefile"
241 (("ruby ./minirake" m)
242 (string-append m " --verbose")))
243 #t))
244 (add-after 'unpack 'disable-broken-tests
245 (lambda _
246 (substitute* "mrbgems/mruby-io/test/io.rb"
247 (("assert\\('IO.popen.+$" m)
248 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
249 (("assert\\('IO#isatty.+$" m)
250 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
251 ;; This one is really weird. The *expected* output is all wrong.
252 (("assert\\('`cmd`.*" m)
253 (string-append m "skip \"Disable for Guix\"\n"))
254 (("echo foo")
255 (string-append (which "echo") " foo")))
256 #t))
257 ;; There is no install target
258 (replace 'install
259 (lambda* (#:key outputs #:allow-other-keys)
260 (let* ((out (assoc-ref outputs "out"))
261 (bin (string-append out "/bin"))
262 (lib (string-append out "/lib")))
263 (mkdir-p bin)
264 (copy-recursively "build/host/bin" bin)
265 (mkdir-p lib)
266 (copy-recursively "build/host/lib" lib))
267 #t)))))
268 (native-inputs
269 `(("ruby" ,ruby)
270 ("bison" ,bison)))
271 (home-page "https://github.com/mruby/mruby")
272 (synopsis "Lightweight Ruby")
273 (description "mruby is the lightweight implementation of the Ruby
274 language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
275 embedded within your application.")
276 (license license:expat)))
277
278 (define-public ruby-commander
279 (package
280 (name "ruby-commander")
281 (version "4.4.7")
282 (source
283 (origin
284 (method url-fetch)
285 (uri (rubygems-uri "commander" version))
286 (sha256
287 (base32
288 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
289 (build-system ruby-build-system)
290 (arguments
291 `(#:test-target "spec"
292 #:phases
293 (modify-phases %standard-phases
294 ;; Don't run or require rubocop, the code linting tool, as this is a
295 ;; bit unnecessary.
296 (add-after 'unpack 'dont-run-rubocop
297 (lambda _
298 (substitute* "Rakefile"
299 ((".*rubocop.*") "")
300 ((".*RuboCop.*") ""))
301 #t)))))
302 (propagated-inputs
303 `(("ruby-highline" ,ruby-highline)))
304 (native-inputs
305 `(("bundler" ,bundler)
306 ("ruby-rspec-core" ,ruby-rspec-core)
307 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
308 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
309 ("ruby-simplecov" ,ruby-simplecov)))
310 (home-page "https://github.com/commander-rb/commander")
311 (synopsis "Library for building Ruby command-line executables")
312 (description
313 "Commander aims to be a complete solution for Ruby command-line
314 executables. Commander bridges the gap between other terminal related
315 libraries (OptionParser, HighLine), while providing many new features, and an
316 elegant API.")
317 (license license:expat)))
318
319 (define-public ruby-highline
320 (package
321 (name "ruby-highline")
322 (version "2.0.1")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (rubygems-uri "highline" version))
327 (sha256
328 (base32
329 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
330 (build-system ruby-build-system)
331 (arguments
332 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
333 (native-inputs
334 `(("bundler" ,bundler)
335 ("ruby-code-statistics" ,ruby-code-statistics)))
336 (synopsis
337 "HighLine helps you build command-line interfaces")
338 (description
339 "HighLine provides a high-level IO library that provides validation,
340 type conversion, and more for command-line interfaces. HighLine also includes
341 a menu system for providing multiple options to the user.")
342 (home-page "https://github.com/JEG2/highline")
343 (license (list license:gpl2 license:ruby))))
344
345 (define-public ruby-hoe
346 (package
347 (name "ruby-hoe")
348 (version "3.21.0")
349 (source (origin
350 (method url-fetch)
351 (uri (rubygems-uri "hoe" version))
352 (sha256
353 (base32
354 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
355 (build-system ruby-build-system)
356 (arguments
357 '(#:phases
358 (modify-phases %standard-phases
359 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
360 ;; variable is set, so unset it for the duration of the tests.
361 ;;
362 ;; TestHoe#test_possibly_better
363 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
364 ;; Expected: 2019-11-12 00:00:00 UTC
365 ;; Actual: 1970-01-01 00:00:00 UTC
366 (add-before 'check 'unset-SOURCE-DATE-EPOCH
367 (lambda _
368 (unsetenv "SOURCE_DATE_EPOCH")
369 #t))
370 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
371 (lambda _
372 (setenv "SOURCE_DATE_EPOCH" "1")
373 #t)))))
374 (synopsis "Ruby project management helper")
375 (description
376 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
377 maintain, and release projects and includes a dynamic plug-in system allowing
378 for easy extensibility. Hoe ships with plug-ins for all the usual project
379 tasks including rdoc generation, testing, packaging, deployment, and
380 announcement.")
381 (home-page "https://www.zenspider.com/projects/hoe.html")
382 (license license:expat)))
383
384 (define-public ruby-rake-compiler
385 (package
386 (name "ruby-rake-compiler")
387 (version "1.1.0")
388 (source (origin
389 (method url-fetch)
390 (uri (rubygems-uri "rake-compiler" version))
391 (sha256
392 (base32
393 "0l4hg21v0phfrfsc2hilgmwvn2imxr0byqh8dv16bya1s5d3km0q"))))
394 (build-system ruby-build-system)
395 (arguments
396 '(#:tests? #f)) ; needs cucumber
397 (synopsis "Building and packaging helper for Ruby native extensions")
398 (description "Rake-compiler provides a framework for building and
399 packaging native C and Java extensions in Ruby.")
400 (home-page "https://github.com/rake-compiler/rake-compiler")
401 (license license:expat)))
402
403 (define-public ruby-rsync
404 (package
405 (name "ruby-rsync")
406 (version "1.0.9")
407 (source
408 (origin
409 (method url-fetch)
410 (uri (rubygems-uri "rsync" version))
411 (sha256
412 (base32
413 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
414 (build-system ruby-build-system)
415 (arguments
416 '(#:test-target "spec"
417 #:phases
418 (modify-phases %standard-phases
419 (add-after 'unpack 'remove-coveralls-requirement
420 (lambda _
421 (substitute* "spec/spec_helper.rb"
422 (("require 'coveralls'") "")
423 (("Coveralls.wear!") ""))
424 #t)))))
425 (native-inputs
426 `(("bundler" ,bundler)
427 ("rsync" ,rsync)
428 ("ruby-rspec-core" ,ruby-rspec-core)
429 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
430 ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
431 (home-page "https://github.com/jbussdieker/ruby-rsync")
432 (synopsis "Ruby wrapper around rsync")
433 (description
434 "Ruby Rsync is a Ruby library that can synchronize files between remote
435 hosts by wrapping the @file{rsync} binary.")
436 (license license:expat)))
437
438 (define-public ruby-i18n
439 (package
440 (name "ruby-i18n")
441 (version "1.7.0")
442 (source (origin
443 (method url-fetch)
444 (uri (rubygems-uri "i18n" version))
445 (sha256
446 (base32
447 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
448 (build-system ruby-build-system)
449 (arguments
450 '(#:tests? #f)) ; no tests
451 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
452 (synopsis "Internationalization library for Ruby")
453 (description "Ruby i18n is an internationalization and localization
454 solution for Ruby programs. It features translation and localization,
455 interpolation of values to translations, pluralization, customizable
456 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
457 translation data, custom key/scope separator, custom exception handlers, and
458 an extensible architecture with a swappable backend.")
459 (home-page "https://github.com/ruby-i18n/i18n")
460 (license license:expat)))
461
462 (define-public ruby-iruby
463 (package
464 (name "ruby-iruby")
465 (version "0.3")
466 (source
467 (origin
468 (method url-fetch)
469 (uri (rubygems-uri "iruby" version))
470 (sha256
471 (base32
472 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
473 (build-system ruby-build-system)
474 (arguments
475 ;; TODO: Tests currently fail.
476 ;;
477 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
478 ;;
479 ;; 1) Failure:
480 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
481 ;; In [ expected
482 ;;
483 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
484 '(#:tests? #f
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'patch-ipython
488 (lambda* (#:key inputs #:allow-other-keys)
489 (substitute* "lib/iruby/command.rb"
490 (("version = `")
491 (string-append
492 "version = `"
493 (assoc-ref inputs "python-ipython")
494 "/bin/"))
495 (("Kernel\\.exec\\('")
496 (string-append
497 "Kernel.exec('"
498 (assoc-ref inputs "python-ipython")
499 "/bin/")))
500 #t)))))
501 (inputs
502 `(("python-ipython" ,python-ipython)))
503 (propagated-inputs
504 `(("ruby-bond" ,ruby-bond)
505 ("ruby-data_uri" ,ruby-data_uri)
506 ("ruby-mimemagic" ,ruby-mimemagic)
507 ("ruby-multi-json" ,ruby-multi-json)
508 ("ruby-cztop" ,ruby-cztop)
509 ;; Optional inputs
510 ("ruby-pry" ,ruby-pry)))
511 (synopsis "Ruby kernel for Jupyter/IPython")
512 (description
513 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
514 notebook).")
515 (home-page "https://github.com/SciRuby/iruby")
516 (license license:expat)))
517
518 ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
519 ;; dependencies use RSpec for their test suites! To avoid these circular
520 ;; dependencies, we disable tests for all of the RSpec-related packages.
521 (define-public ruby-rspec-support
522 (package
523 (name "ruby-rspec-support")
524 (version "3.8.0")
525 (source (origin
526 (method url-fetch)
527 (uri (rubygems-uri "rspec-support" version))
528 (sha256
529 (base32
530 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
531 (build-system ruby-build-system)
532 (arguments
533 '(#:tests? #f)) ; avoid dependency cycles
534 (synopsis "RSpec support library")
535 (description "Support utilities for RSpec gems.")
536 (home-page "https://github.com/rspec/rspec-support")
537 (license license:expat)))
538
539 (define-public ruby-rspec-core
540 (package
541 (name "ruby-rspec-core")
542 (version "3.8.0")
543 (source (origin
544 (method url-fetch)
545 (uri (rubygems-uri "rspec-core" version))
546 (sha256
547 (base32
548 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
549 (build-system ruby-build-system)
550 (arguments
551 '(#:tests? #f)) ; avoid dependency cycles
552 (propagated-inputs
553 `(("ruby-rspec-support" ,ruby-rspec-support)))
554 (synopsis "RSpec core library")
555 (description "Rspec-core provides the RSpec test runner and example
556 groups.")
557 (home-page "https://github.com/rspec/rspec-core")
558 (license license:expat)))
559
560 (define-public ruby-rspec-core-2
561 (package (inherit ruby-rspec-core)
562 (version "2.14.8")
563 (source (origin
564 (method url-fetch)
565 (uri (rubygems-uri "rspec-core" version))
566 (sha256
567 (base32
568 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
569 (propagated-inputs `())))
570
571 (define-public ruby-diff-lcs
572 (package
573 (name "ruby-diff-lcs")
574 (version "1.3")
575 (source (origin
576 (method url-fetch)
577 (uri (rubygems-uri "diff-lcs" version))
578 (sha256
579 (base32
580 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
581 (build-system ruby-build-system)
582 (arguments
583 '(#:tests? #f)) ; avoid dependency cycles
584 (synopsis "Compute the difference between two Enumerable sequences")
585 (description "Diff::LCS computes the difference between two Enumerable
586 sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
587 It includes utilities to create a simple HTML diff output format and a
588 standard diff-like tool.")
589 (home-page "https://github.com/halostatue/diff-lcs")
590 (license license:expat)))
591
592 (define-public ruby-rspec-expectations
593 (package
594 (name "ruby-rspec-expectations")
595 (version "3.8.2")
596 (source (origin
597 (method url-fetch)
598 (uri (rubygems-uri "rspec-expectations" version))
599 (sha256
600 (base32
601 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
602 (build-system ruby-build-system)
603 (arguments
604 '(#:tests? #f)) ; avoid dependency cycles
605 (propagated-inputs
606 `(("ruby-rspec-support" ,ruby-rspec-support)
607 ("ruby-diff-lcs" ,ruby-diff-lcs)))
608 (synopsis "RSpec expectations library")
609 (description "Rspec-expectations provides a simple API to express expected
610 outcomes of a code example.")
611 (home-page "https://github.com/rspec/rspec-expectations")
612 (license license:expat)))
613
614 (define-public ruby-rspec-expectations-2
615 (package (inherit ruby-rspec-expectations)
616 (version "2.14.5")
617 (source (origin
618 (method url-fetch)
619 (uri (rubygems-uri "rspec-expectations" version))
620 (sha256
621 (base32
622 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
623 (propagated-inputs
624 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
625
626 (define-public ruby-rspec-its
627 (package
628 (name "ruby-rspec-its")
629 (version "1.3.0")
630 (source
631 (origin
632 (method git-fetch)
633 (uri (git-reference
634 (url "https://github.com/rspec/rspec-its.git")
635 (commit (string-append "v" version))))
636 (file-name (git-file-name name version))
637 (sha256
638 (base32
639 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
640 (build-system ruby-build-system)
641 (arguments
642 `(#:test-target "spec"
643 #:phases
644 (modify-phases %standard-phases
645 (add-after 'unpack 'dont-install-gems-from-gemfile
646 (lambda _
647 (substitute* "Gemfile"
648 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
649 ""))
650 #t))
651 (add-before 'build 'loosen-ffi-requirement
652 (lambda _
653 ;; Accept any version of ruby-ffi.
654 (substitute* "Gemfile"
655 ((" gem 'ffi', '~> 1\\.9\\.25'")
656 " gem 'ffi'"))
657 #t))
658 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
659 (lambda _
660 (substitute* "rspec-its.gemspec"
661 (("rake.*") "rake'\n")
662 (("spec.add_development_dependency 'cucumber'.*")
663 "spec.add_development_dependency 'cucumber'\n")
664 (("bundler.*") "bundler'\n")
665 (("\"aruba.*") "'aruba'\n"))
666 #t)))))
667 (propagated-inputs
668 `(("ruby-rspec-core" ,ruby-rspec-core)
669 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
670 (native-inputs
671 `(("bundler" ,bundler)
672 ("ruby-cucumber" ,ruby-cucumber)
673 ("ruby-ffi" ,ruby-ffi)
674 ("ruby-aruba" ,ruby-aruba)))
675 (synopsis "RSpec extension that provides the @code{its} method")
676 (description
677 "RSpec::Its provides the its method as a short-hand to specify the expected
678 value of an attribute. For example, one can use @code{its(:size)\\{should
679 eq(1)\\}}.")
680 (home-page "https://github.com/rspec/rspec-its")
681 (license license:expat)))
682
683 ;;; This variant is used to break a cycle with ruby-protobuf.
684 (define-public ruby-rspec-its-minimal
685 (hidden-package
686 (package
687 (inherit ruby-rspec-its)
688 (arguments
689 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
690 ((#:tests? _ #f) #f)))
691 (native-inputs '()))))
692
693 (define-public ruby-rspec-mocks
694 (package
695 (name "ruby-rspec-mocks")
696 (version "3.8.0")
697 (source (origin
698 (method url-fetch)
699 (uri (rubygems-uri "rspec-mocks" version))
700 (sha256
701 (base32
702 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
703 (build-system ruby-build-system)
704 (arguments
705 '(#:tests? #f)) ; avoid dependency cycles
706 (propagated-inputs
707 `(("ruby-rspec-support" ,ruby-rspec-support)
708 ("ruby-diff-lcs" ,ruby-diff-lcs)))
709 (synopsis "RSpec stubbing and mocking library")
710 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
711 support for stubbing and mocking.")
712 (home-page "https://github.com/rspec/rspec-mocks")
713 (license license:expat)))
714
715 (define-public ruby-rspec-mocks-2
716 (package (inherit ruby-rspec-mocks)
717 (version "2.14.6")
718 (source (origin
719 (method url-fetch)
720 (uri (rubygems-uri "rspec-mocks" version))
721 (sha256
722 (base32
723 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
724 (propagated-inputs
725 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
726
727 (define-public ruby-rspec-rerun
728 (package
729 (name "ruby-rspec-rerun")
730 (version "1.1.0")
731 (source
732 (origin
733 (method url-fetch)
734 (uri (rubygems-uri "rspec-rerun" version))
735 (sha256
736 (base32
737 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
738 (build-system ruby-build-system)
739 (arguments
740 '(;; No included tests
741 #:tests? #f))
742 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
743 (synopsis "Track failed RSpec tests to re-run them")
744 (description
745 "This package provides an automated way to track, and then re-run failed
746 RSpec tests.")
747 (home-page "https://github.com/dblock/rspec-rerun")
748 (license license:expat)))
749
750 (define-public ruby-rspec-wait
751 (package
752 (name "ruby-rspec-wait")
753 (version "0.0.9")
754 (source
755 (origin
756 (method url-fetch)
757 (uri (rubygems-uri "rspec-wait" version))
758 (sha256
759 (base32
760 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
761 (build-system ruby-build-system)
762 (arguments
763 '(#:phases
764 (modify-phases %standard-phases
765 (replace 'check
766 (lambda _
767 (invoke "rake" "spec"))))))
768 (native-inputs
769 `(("bundler" ,bundler)))
770 (propagated-inputs
771 `(("ruby-rspec" ,ruby-rspec)))
772 (home-page "https://github.com/laserlemon/rspec-wait")
773 (synopsis "Wait for conditions in RSpec")
774 (description
775 "RSpec::Wait strives to make it easier to test asynchronous or slow
776 interactions.")
777 (license license:expat)))
778
779 (define-public ruby-rspec
780 (package
781 (name "ruby-rspec")
782 (version "3.8.0")
783 (source (origin
784 (method url-fetch)
785 (uri (rubygems-uri "rspec" version))
786 (sha256
787 (base32
788 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
789 (build-system ruby-build-system)
790 (arguments
791 '(#:tests? #f)) ; avoid dependency cycles
792 (propagated-inputs
793 `(("ruby-rspec-core" ,ruby-rspec-core)
794 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
795 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
796 (synopsis "Behavior-driven development framework for Ruby")
797 (description "RSpec is a behavior-driven development (BDD) framework for
798 Ruby. This meta-package includes the RSpec test runner, along with the
799 expectations and mocks frameworks.")
800 (home-page "https://rspec.info/")
801 (license license:expat)))
802
803 (define-public ruby-rspec-2
804 (package (inherit ruby-rspec)
805 (version "2.14.1")
806 (source (origin
807 (method url-fetch)
808 (uri (rubygems-uri "rspec" version))
809 (sha256
810 (base32
811 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
812 (propagated-inputs
813 `(("ruby-rspec-core" ,ruby-rspec-core-2)
814 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
815 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
816
817 ;; Bundler is yet another source of circular dependencies, so we must disable
818 ;; its test suite as well.
819 (define-public bundler
820 (package
821 (name "bundler")
822 (version "2.1.4")
823 (source (origin
824 (method url-fetch)
825 (uri (rubygems-uri "bundler" version))
826 (sha256
827 (base32
828 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
829 (build-system ruby-build-system)
830 (arguments
831 '(#:tests? #f)) ; avoid dependency cycles
832 (synopsis "Ruby gem bundler")
833 (description "Bundler automatically downloads and installs a list of gems
834 specified in a \"Gemfile\", as well as their dependencies.")
835 (home-page "https://bundler.io/")
836 (license license:expat)))
837
838 (define-public ruby-builder
839 (package
840 (name "ruby-builder")
841 (version "3.2.3")
842 (source (origin
843 (method url-fetch)
844 (uri (rubygems-uri "builder" version))
845 (sha256
846 (base32
847 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
848 (build-system ruby-build-system)
849 (arguments
850 `(#:phases
851 (modify-phases %standard-phases
852 (add-after 'unpack 'do-not-use-rvm
853 (lambda _
854 (substitute* "rakelib/tags.rake"
855 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
856 #t)))))
857 (synopsis "Ruby library to create structured data")
858 (description "Builder provides a number of builder objects that make it
859 easy to create structured data. Currently the following builder objects are
860 supported: XML Markup and XML Events.")
861 (home-page "https://github.com/jimweirich/builder")
862 (license license:expat)))
863
864 (define-public ruby-bump
865 (package
866 (name "ruby-bump")
867 (version "0.7.0")
868 (source
869 (origin
870 (method url-fetch)
871 (uri (rubygems-uri "bump" version))
872 (sha256
873 (base32
874 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
875 (build-system ruby-build-system)
876 (arguments
877 '(;; No included tests
878 #:tests? #f))
879 (synopsis "Tool for working with Rubygems")
880 (description
881 "Bump provides commands to manage Rubygem versioning, updating to the
882 next patch version for example.")
883 (home-page "https://github.com/gregorym/bump")
884 (license license:expat)))
885
886 (define-public ruby-rjb
887 (package
888 (name "ruby-rjb")
889 (version "1.5.5")
890 (source (origin
891 (method url-fetch)
892 (uri (rubygems-uri "rjb" version))
893 (sha256
894 (base32
895 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
896 (build-system ruby-build-system)
897 (arguments
898 `(#:tests? #f ; no rakefile
899 #:phases
900 (modify-phases %standard-phases
901 (add-before 'build 'set-java-home
902 (lambda* (#:key inputs #:allow-other-keys)
903 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
904 #t)))))
905 (native-inputs
906 `(("jdk" ,icedtea "jdk")))
907 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
908 (description "RJB is a bridge program that connects Ruby and Java via the
909 Java Native Interface.")
910 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
911 (license license:lgpl2.1+)))
912
913 (define-public ruby-log4r
914 (package
915 (name "ruby-log4r")
916 (version "1.1.10")
917 (source
918 (origin
919 (method url-fetch)
920 (uri (rubygems-uri "log4r" version))
921 (sha256
922 (base32
923 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
924 (build-system ruby-build-system)
925 (arguments
926 '(#:tests? #f)) ; no Rakefile in gem
927 (synopsis "Flexible logging library for Ruby")
928 (description "Comprehensive and flexible logging library written
929 in Ruby for use in Ruby programs. It features a hierarchical logging
930 system of any number of levels, custom level names, logger
931 inheritance, multiple output destinations per log event, execution
932 tracing, custom formatting, thread safteyness, XML and YAML
933 configuration, and more.")
934 (home-page "http://log4r.rubyforge.org/")
935 (license license:bsd-3)))
936
937 (define-public ruby-atoulme-antwrap
938 (package
939 (name "ruby-atoulme-antwrap")
940 (version "0.7.5")
941 (source (origin
942 (method url-fetch)
943 (uri (rubygems-uri "atoulme-Antwrap" version))
944 (sha256
945 (base32
946 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
947 (build-system ruby-build-system)
948 ;; Test data required for most of the tests are not included.
949 (arguments `(#:tests? #f))
950 (native-inputs
951 `(("ruby-hoe" ,ruby-hoe)))
952 (inputs
953 `(("ruby-rjb" ,ruby-rjb)))
954 (synopsis "Ruby wrapper for the Ant build tool")
955 (description "Antwrap is a Ruby module that wraps the Apache Ant build
956 tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
957 script.")
958 (home-page "http://rubyforge.org/projects/antwrap/")
959 (license license:expat)))
960
961 (define-public ruby-atoulme-saikuro
962 (package
963 (name "ruby-atoulme-saikuro")
964 (version "1.2.1")
965 (source (origin
966 (method url-fetch)
967 (uri (rubygems-uri "atoulme-Saikuro" version))
968 (sha256
969 (base32
970 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
971 (build-system ruby-build-system)
972 ;; FIXME: There are no unit tests. The tests are demonstrations of the
973 ;; "saikuro" tool.
974 (arguments `(#:tests? #f))
975 (synopsis "Cyclomatic complexity analyzer")
976 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
977 given Ruby source code Saikuro will generate a report listing the cyclomatic
978 complexity of each method found. In addition, Saikuro counts the number of
979 lines per method and can generate a listing of the number of tokens on each
980 line of code.")
981 (home-page "http://www.github.com/atoulme/Saikuro")
982 ;; File headers contain the BSD-3 license and the README.rdoc says that
983 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
984 ;; of the Expat license.
985 (license license:bsd-3)))
986
987 (define-public ruby-asciidoctor
988 (package
989 (name "ruby-asciidoctor")
990 (version "1.5.7.1")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (rubygems-uri "asciidoctor" version))
995 (sha256
996 (base32
997 "0v52bzc72cvg7zfgq27pa4mgyf29dx9m20fghrw1xmvwgd519n1w"))))
998 (build-system ruby-build-system)
999 (arguments
1000 `(#:test-target "test:all"
1001 #:phases
1002 (modify-phases %standard-phases
1003 (add-before 'check 'remove-circular-tests
1004 (lambda _
1005 ;; Remove tests that require circular dependencies to load or pass.
1006 (delete-file "test/invoker_test.rb")
1007 (delete-file "test/converter_test.rb")
1008 (delete-file "test/options_test.rb")
1009 #t)))))
1010 (native-inputs
1011 `(("ruby-minitest" ,ruby-minitest)
1012 ("ruby-nokogiri" ,ruby-nokogiri)
1013 ("ruby-asciimath" ,ruby-asciimath)
1014 ("ruby-coderay" ,ruby-coderay)))
1015 (synopsis "Converter from AsciiDoc content to other formats")
1016 (description
1017 "Asciidoctor is a text processor and publishing toolchain for converting
1018 AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other formats.")
1019 (home-page "https://asciidoctor.org")
1020 (license license:expat)))
1021
1022 (define-public ruby-ast
1023 (package
1024 (name "ruby-ast")
1025 (version "2.4.0")
1026 (source
1027 (origin
1028 (method url-fetch)
1029 (uri (rubygems-uri "ast" version))
1030 (sha256
1031 (base32
1032 "184ssy3w93nkajlz2c70ifm79jp3j737294kbc5fjw69v1w0n9x7"))))
1033 (build-system ruby-build-system)
1034 (arguments
1035 '(#:phases
1036 (modify-phases %standard-phases
1037 (add-after 'unpack 'remove-coveralls-requirement
1038 (lambda _
1039 (substitute* "test/helper.rb"
1040 (("require 'coveralls'") "")
1041 (("Coveralls::SimpleCov::Formatter") ""))
1042 #t))
1043 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1044 (lambda _
1045 (substitute* "ast.gemspec"
1046 ((".*coveralls.*") "\n")
1047 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1048 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1049 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1050 #t)))))
1051 (native-inputs
1052 `(("bundler" ,bundler)
1053 ("ruby-simplecov" ,ruby-simplecov)
1054 ("ruby-json-pure" ,ruby-json-pure)
1055 ("ruby-mime-times" ,ruby-mime-types)
1056 ("ruby-yard" ,ruby-yard)
1057 ("ruby-kramdown" ,ruby-kramdown)
1058 ("ruby-rest-client" ,ruby-rest-client)
1059 ("ruby-bacon" ,ruby-bacon)
1060 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1061 ("ruby-racc" ,ruby-racc)))
1062 (synopsis "Library for working with Abstract Syntax Trees")
1063 (description
1064 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1065 It does this through immutable data structures.")
1066 (home-page "https://whitequark.github.io/ast/")
1067 (license license:expat)))
1068
1069 (define-public ruby-sporkmonger-rack-mount
1070 ;; Testing the addressable gem requires a newer commit than that released, so
1071 ;; use an up to date version.
1072 (let ((revision "1")
1073 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1074 (package
1075 (name "ruby-sporkmonger-rack-mount")
1076 (version (git-version "0.8.3" revision commit))
1077 (source (origin
1078 (method git-fetch)
1079 (uri (git-reference
1080 (url "https://github.com/sporkmonger/rack-mount.git")
1081 (commit commit)))
1082 (file-name (git-file-name name version))
1083 (sha256
1084 (base32
1085 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1086 (build-system ruby-build-system)
1087 (arguments
1088 ;; Tests currently fail so disable them.
1089 ;; https://github.com/sporkmonger/rack-mount/pull/1
1090 `(#:tests? #f))
1091 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1092 (synopsis "Stackable dynamic tree based Rack router")
1093 (description
1094 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1095 continue trying routes if the response returns pass. This allows multiple
1096 routes to be nested or stacked on top of each other.")
1097 (home-page "https://github.com/sporkmonger/rack-mount")
1098 (license license:expat))))
1099
1100 (define-public ruby-ci-reporter
1101 (package
1102 (name "ruby-ci-reporter")
1103 (version "2.0.0")
1104 (source (origin
1105 (method url-fetch)
1106 (uri (rubygems-uri "ci_reporter" version))
1107 (sha256
1108 (base32
1109 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1110 (build-system ruby-build-system)
1111 (arguments
1112 `(#:test-target "rspec"))
1113 (propagated-inputs
1114 `(("ruby-builder" ,ruby-builder)))
1115 (native-inputs
1116 `(("bundler" ,bundler)
1117 ("ruby-rspec" ,ruby-rspec)))
1118 (synopsis "Generate XML reports of runs test")
1119 (description
1120 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1121 you to generate XML reports of your test runs. The resulting files can be
1122 read by a continuous integration system that understands Ant's JUnit report
1123 format.")
1124 (home-page "https://github.com/nicksieger/ci_reporter")
1125 (license license:expat)))
1126
1127 (define-public ruby-contracts
1128 (package
1129 (name "ruby-contracts")
1130 (version "0.16.0")
1131 (source
1132 (origin
1133 (method url-fetch)
1134 (uri (rubygems-uri "contracts" version))
1135 (sha256
1136 (base32
1137 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1138 (build-system ruby-build-system)
1139 (arguments
1140 '(#:test-target "spec"
1141 #:phases
1142 (modify-phases %standard-phases
1143 ;; Don't run or require rubocop, the code linting tool, as this is a
1144 ;; bit unnecessary.
1145 (add-after 'unpack 'dont-run-rubocop
1146 (lambda _
1147 (substitute* "Rakefile"
1148 ((".*rubocop.*") "")
1149 ((".*RuboCop.*") ""))
1150 #t)))))
1151 (native-inputs
1152 `(("ruby-rspec" ,ruby-rspec)))
1153 (synopsis "Method contracts for Ruby")
1154 (description
1155 "This library provides contracts for Ruby. A contract describes the
1156 correct inputs and output for a method, and will raise an error if a incorrect
1157 value is found.")
1158 (home-page "https://github.com/egonSchiele/contracts.ruby")
1159 (license license:bsd-2)))
1160
1161 (define-public ruby-crack
1162 (package
1163 (name "ruby-crack")
1164 (version "0.4.3")
1165 (source
1166 (origin
1167 (method url-fetch)
1168 (uri (rubygems-uri "crack" version))
1169 (sha256
1170 (base32
1171 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1172 (build-system ruby-build-system)
1173 (arguments
1174 `(#:phases
1175 (modify-phases %standard-phases
1176 (replace 'check
1177 (lambda* (#:key tests? #:allow-other-keys)
1178 (when tests?
1179 (for-each (lambda (file)
1180 (display file)(display "\n")
1181 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1182 (find-files "test" ".*rb$")))
1183 #t)))))
1184 (propagated-inputs
1185 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1186 (synopsis "Simple JSON and XML parsing for Ruby")
1187 (description
1188 "@code{crack} provides really simple JSON and XML parsing, extracted from
1189 code in Merb and Rails.")
1190 (home-page "https://github.com/jnunemaker/crack")
1191 (license license:expat)))
1192
1193 (define-public ruby-cliver
1194 (package
1195 (name "ruby-cliver")
1196 (version "0.3.2")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (rubygems-uri "cliver" version))
1201 (sha256
1202 (base32
1203 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1204 (build-system ruby-build-system)
1205 (arguments
1206 '(#:phases
1207 (modify-phases %standard-phases
1208 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1209 ;; would be nice, but the tests look to be incompatible:
1210 ;;
1211 ;; NoMethodError: undefined method `last_comment'
1212 (replace 'check
1213 (lambda* (#:key tests? #:allow-other-keys)
1214 (when tests?
1215 (invoke "rspec"))
1216 #t)))))
1217 (native-inputs
1218 `(("bundler" ,bundler)
1219 ("ruby-rspec" ,ruby-rspec-2)))
1220 (synopsis "Assertions for command-line dependencies in Ruby")
1221 (description
1222 "@code{cliver} provides a way to detect missing command-line
1223 dependencies, including versions.")
1224 (home-page "https://github.com/yaauie/cliver")
1225 (license license:expat)))
1226
1227 (define-public ruby-czmq-ffi-gen
1228 (package
1229 (name "ruby-czmq-ffi-gen")
1230 (version "0.13.0")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (rubygems-uri "czmq-ffi-gen" version))
1235 (sha256
1236 (base32
1237 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
1238 (build-system ruby-build-system)
1239 (arguments
1240 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
1241 #:phases
1242 (modify-phases %standard-phases
1243 (add-after 'unpack 'patch-lib_dirs
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
1246 (("lib\\_dirs = \\[.*\\]")
1247 (string-append "lib_dirs = ['"
1248 (assoc-ref inputs "czmq") "/lib"
1249 "']")))
1250 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
1251 (("lib\\_dirs = \\[.*\\]")
1252 (string-append "lib_dirs = ['"
1253 (assoc-ref inputs "zeromq") "/lib"
1254 "']"))))))))
1255 (inputs
1256 `(("zeromq" ,zeromq)
1257 ("czmq" ,czmq)))
1258 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
1259 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
1260 (description
1261 "These Ruby bindings are not intended to be directly used, but rather
1262 used by higher level bindings like those provided by CZTop.")
1263 (home-page
1264 "https://github.com/paddor/czmq-ffi-gen")
1265 (license license:isc)))
1266
1267 (define-public ruby-cztop
1268 (package
1269 (name "ruby-cztop")
1270 (version "0.12.2")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (rubygems-uri "cztop" version))
1275 (sha256
1276 (base32
1277 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
1278 (build-system ruby-build-system)
1279 (arguments
1280 '(#:test-target "spec"
1281 #:phases
1282 (modify-phases %standard-phases
1283 (add-after 'unpack 'patch-lib_paths
1284 (lambda* (#:key inputs #:allow-other-keys)
1285 (substitute* "lib/cztop/poller/zmq.rb"
1286 (("lib\\_paths = \\[.*\\]")
1287 (string-append "lib_paths = ['"
1288 (assoc-ref inputs "zeromq") "/lib"
1289 "']"))))))))
1290 (native-inputs
1291 `(("bundler" ,bundler)
1292 ("ruby-rspec" ,ruby-rspec)))
1293 (inputs
1294 `(("zeromq" ,zeromq)))
1295 (propagated-inputs
1296 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
1297 (synopsis "CZMQ Ruby bindings")
1298 (description
1299 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
1300 CZMQ. The focus of of CZTop is on being easy to use and providing first class
1301 support for security mechanisms.")
1302 (home-page "https://github.com/paddor/cztop")
1303 (license license:isc)))
1304
1305 (define-public ruby-saikuro-treemap
1306 (package
1307 (name "ruby-saikuro-treemap")
1308 (version "0.2.0")
1309 (source (origin
1310 (method url-fetch)
1311 (uri (rubygems-uri "saikuro_treemap" version))
1312 (sha256
1313 (base32
1314 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
1315 (build-system ruby-build-system)
1316 ;; Some of the tests fail because the generated JSON has keys in a
1317 ;; different order. This is a problem with the test suite rather than any
1318 ;; of the involved libraries.
1319 (arguments `(#:tests? #f))
1320 (propagated-inputs
1321 `(("ruby-json-pure" ,ruby-json-pure)
1322 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
1323 (synopsis "Generate complexity treemap based on saikuro analysis")
1324 (description
1325 "This gem generates a treemap showing the complexity of Ruby code on
1326 which it is run. It uses Saikuro under the covers to analyze Ruby code
1327 complexity.")
1328 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
1329 (license license:expat)))
1330
1331 (define-public ruby-oauth2
1332 (package
1333 (name "ruby-oauth2")
1334 (version "1.4.2")
1335 (source
1336 (origin
1337 (method url-fetch)
1338 (uri (rubygems-uri "oauth2" version))
1339 (sha256
1340 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
1341 (build-system ruby-build-system)
1342 (arguments
1343 '(#:tests? #f)) ; no included tests
1344 (propagated-inputs
1345 `(("ruby-faraday" ,ruby-faraday)
1346 ("ruby-jwt" ,ruby-jwt)
1347 ("ruby-multi-json" ,ruby-multi-json)
1348 ("ruby-multi-xml" ,ruby-multi-xml)
1349 ("ruby-rack" ,ruby-rack)))
1350 (synopsis "Ruby wrapper for the OAuth 2.0")
1351 (description
1352 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
1353 with a similar style to the original OAuth spec.")
1354 (home-page "https://github.com/oauth-xx/oauth2")
1355 (license license:expat)))
1356
1357 (define-public ruby-omniauth
1358 (package
1359 (name "ruby-omniauth")
1360 (version "1.9.1")
1361 (source
1362 (origin
1363 (method url-fetch)
1364 (uri (rubygems-uri "omniauth" version))
1365 (sha256
1366 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
1367 (build-system ruby-build-system)
1368 (arguments
1369 '(#:tests? #f)) ; No included tests
1370 (propagated-inputs
1371 `(("ruby-hashie" ,ruby-hashie)
1372 ("ruby-rack" ,ruby-rack)))
1373 (synopsis "Generalized Rack framework for multiple-provider authentication")
1374 (description
1375 "This package provides a generalized Rack framework for multiple-provider
1376 authentication.")
1377 (home-page "https://github.com/omniauth/omniauth")
1378 (license license:expat)))
1379
1380 (define-public ruby-omniauth-oauth2
1381 (package
1382 (name "ruby-omniauth-oauth2")
1383 (version "1.6.0")
1384 (source
1385 (origin
1386 (method url-fetch)
1387 (uri (rubygems-uri "omniauth-oauth2" version))
1388 (sha256
1389 (base32
1390 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
1391 (build-system ruby-build-system)
1392 (arguments
1393 '(#:phases
1394 (modify-phases %standard-phases
1395 (add-after 'unpack 'remove-unnecessary-dependencies
1396 (lambda _
1397 ;; The coveralls gem submits coverage information to an online
1398 ;; service, and is unnecessary when running the tests
1399 (substitute* "Gemfile"
1400 ((".*coveralls\"") ""))
1401 (substitute* "spec/helper.rb"
1402 (("require \"coveralls\"") "")
1403 (("Coveralls::SimpleCov::Formatter") ""))
1404 #t)))))
1405 (propagated-inputs
1406 `(("ruby-oauth2" ,ruby-oauth2)
1407 ("ruby-omniauth" ,ruby-omniauth)))
1408 (native-inputs
1409 `(("bundler" ,bundler)
1410 ("ruby-rspec" ,ruby-rspec)
1411 ("ruby-simplecov" ,ruby-simplecov)
1412 ("ruby-rack-test" ,ruby-rack-test)
1413 ("ruby-webmock" ,ruby-webmock-2)))
1414 (synopsis "Abstract OAuth2 strategy for OmniAuth")
1415 (description
1416 "This library provides a generic OAuth2 strategy for OmniAuth. It
1417 doesn't provide a way to gather user information, so should be used as a
1418 building block for authentication strategies.")
1419 (home-page "https://github.com/omniauth/omniauth-oauth2")
1420 (license license:expat)))
1421
1422 (define-public ruby-open4
1423 (package
1424 (name "ruby-open4")
1425 (version "1.3.4")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (rubygems-uri "open4" version))
1430 (sha256
1431 (base32
1432 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
1433 (build-system ruby-build-system)
1434 (arguments
1435 '(#:phases
1436 (modify-phases %standard-phases
1437 (add-after 'unpack 'patch
1438 (lambda _
1439 (substitute* "rakefile"
1440 ;; Update the Rakefile so it works
1441 (("-rubygems") "-rrubygems")
1442 (("Config") "RbConfig"))
1443 #t))
1444 (add-before 'check 'set-LIB
1445 (lambda _
1446 ;; This is used in the rakefile when running the tests
1447 (setenv "LIB" "open4")
1448 #t)))))
1449 (synopsis "Open child processes from Ruby and manage them easily")
1450 (description
1451 "@code{Open4} is a Ruby library to run child processes and manage their
1452 input and output.")
1453 (home-page "https://github.com/ahoward/open4")
1454 (license license:ruby)))
1455
1456 (define-public ruby-options
1457 (package
1458 (name "ruby-options")
1459 (version "2.3.2")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (rubygems-uri "options" version))
1464 (sha256
1465 (base32
1466 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
1467 (build-system ruby-build-system)
1468 (arguments
1469 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
1470 #:phases
1471 (modify-phases %standard-phases
1472 (add-before 'check 'set-LIB
1473 (lambda _
1474 ;; This is used in the Rakefile, and setting it avoids an issue
1475 ;; with running the tests.
1476 (setenv "LIB" "options")
1477 #t)))))
1478 (synopsis "Ruby library to parse options from *args cleanly")
1479 (description
1480 "The @code{options} library helps with parsing keyword options in Ruby
1481 functions.")
1482 (home-page "https://github.com/ahoward/options")
1483 (license license:ruby)))
1484
1485 (define-public ruby-erubi
1486 (package
1487 (name "ruby-erubi")
1488 (version "1.8.0")
1489 (source
1490 (origin
1491 (method url-fetch)
1492 (uri (rubygems-uri "erubi" version))
1493 (sha256
1494 (base32
1495 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
1496 (build-system ruby-build-system)
1497 (synopsis "ERB template engine for Ruby")
1498 (description
1499 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
1500 Erubis")
1501 (home-page "https://github.com/jeremyevans/erubi")
1502 (license license:expat)))
1503
1504 (define-public ruby-erubis
1505 (package
1506 (name "ruby-erubis")
1507 (version "2.7.0")
1508 (source
1509 (origin
1510 (method url-fetch)
1511 (uri (rubygems-uri "erubis" version))
1512 (sha256
1513 (base32
1514 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
1515 (build-system ruby-build-system)
1516 (arguments
1517 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
1518 (synopsis "Implementation of embedded Ruby (eRuby)")
1519 (description
1520 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
1521 features such as multi-language support, auto escaping, auto trimming spaces
1522 around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
1523 support.")
1524 (home-page "http://www.kuwata-lab.com/erubis/")
1525 (license license:expat)))
1526
1527 (define-public ruby-execjs
1528 (package
1529 (name "ruby-execjs")
1530 (version "2.7.0")
1531 (source
1532 (origin
1533 ;; fetch from github as the gem does not contain testing code
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/rails/execjs.git")
1537 (commit (string-append "v" version))))
1538 (file-name (git-file-name name version))
1539 (sha256
1540 (base32
1541 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
1542 (build-system ruby-build-system)
1543 (native-inputs
1544 `(("bundler" ,bundler)
1545 ;; The test suite tests all the available backends. Currenly, this just
1546 ;; means the node backend.
1547 ;;
1548 ;; PASSED: test:node
1549 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
1550 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
1551 ("node" ,node)))
1552 (synopsis "Run JavaScript code from Ruby")
1553 (description
1554 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
1555 runtime to evaluate your JavaScript program, then returns the result to you as
1556 a Ruby object.")
1557 (home-page "https://github.com/rails/execjs")
1558 (license license:expat)))
1559
1560 (define-public ruby-fakefs
1561 (package
1562 (name "ruby-fakefs")
1563 (version "1.2.2")
1564 (home-page "https://github.com/fakefs/fakefs")
1565 (source (origin
1566 ;; The Rubygems release does not contain tests.
1567 (method git-fetch)
1568 (uri (git-reference
1569 (url home-page)
1570 (commit (string-append "v" version))))
1571 (file-name (git-file-name name version))
1572 (sha256
1573 (base32
1574 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
1575 (build-system ruby-build-system)
1576 (arguments
1577 '(#:phases (modify-phases %standard-phases
1578 (replace 'replace-git-ls-files
1579 (lambda _
1580 (substitute* "fakefs.gemspec"
1581 (("`git ls-files lib README.md LICENSE`")
1582 "`find lib README.md LICENSE -type f | sort`"))
1583 #t))
1584 (add-before 'check 'remove-version-constraints
1585 (lambda _
1586 ;; Drop hard version requirements for test dependencies.
1587 (substitute* "fakefs.gemspec"
1588 (("(.*add_development_dependency .*), .*" _ dep)
1589 (string-append dep "\n")))
1590 #t)))))
1591 (native-inputs
1592 `(("ruby-bump" ,ruby-bump)
1593 ("ruby-maxitest" ,ruby-maxitest)
1594 ("ruby-rubocop" ,ruby-rubocop)
1595 ("ruby-rspec" ,ruby-rspec)))
1596 (synopsis "Fake file system for Ruby")
1597 (description
1598 "This package provides a fake file system for use in test suites. It
1599 avoids the need for manually creating temporary directories, or dealing
1600 with platform intricacies in @code{File} and @code{FileUtils}.")
1601 (license license:expat)))
1602
1603 (define-public ruby-orderedhash
1604 (package
1605 (name "ruby-orderedhash")
1606 (version "0.0.6")
1607 (source (origin
1608 (method url-fetch)
1609 (uri (rubygems-uri "orderedhash" version))
1610 (sha256
1611 (base32
1612 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
1613 (build-system ruby-build-system)
1614 (arguments
1615 '(#:tests? #f)) ; no test suite
1616 (synopsis "Ruby library providing an order-preserving hash")
1617 (description "Orderedhash is a Ruby library providing a hash
1618 implementation that preserves the order of items and features some array-like
1619 extensions.")
1620 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
1621 (license license:public-domain)))
1622
1623 (define-public ruby-libxml
1624 (package
1625 (name "ruby-libxml")
1626 (version "3.0.0")
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri (rubygems-uri "libxml-ruby" version))
1631 (sha256
1632 (base32
1633 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
1634 (build-system ruby-build-system)
1635 (inputs
1636 `(("zlib" ,zlib)
1637 ("libxml2" ,libxml2)))
1638 (arguments
1639 '(#:tests? #f ; test suite hangs for unknown reason
1640 #:gem-flags
1641 (list "--"
1642 (string-append "--with-xml2-include="
1643 (assoc-ref %build-inputs "libxml2")
1644 "/include/libxml2" ))))
1645 (synopsis "Ruby bindings for GNOME Libxml2")
1646 (description "The Libxml-Ruby project provides Ruby language bindings for
1647 the GNOME Libxml2 XML toolkit.")
1648 (home-page "https://xml4r.github.com/libxml-ruby")
1649 (license license:expat)))
1650
1651 (define-public ruby-lino
1652 (package
1653 (name "ruby-lino")
1654 (version "1.1.0")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (rubygems-uri "lino" version))
1659 (sha256
1660 (base32
1661 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
1662 (build-system ruby-build-system)
1663 (arguments
1664 '(#:tests? #f)) ; No included tests
1665 (propagated-inputs
1666 `(("ruby-hamster" ,ruby-hamster)
1667 ("ruby-open4" ,ruby-open4)))
1668 (synopsis "Build and execute commands in Ruby")
1669 (description
1670 "@code{Lino} provides an interface to run external commands. It provides
1671 an interface to add options as well as managing the standard input, output and
1672 error streams.")
1673 (home-page "https://github.com/tobyclemson/lino")
1674 (license license:expat)))
1675
1676 (define-public ruby-xml-simple
1677 (package
1678 (name "ruby-xml-simple")
1679 (version "1.1.5")
1680 (source (origin
1681 (method url-fetch)
1682 (uri (rubygems-uri "xml-simple" version))
1683 (sha256
1684 (base32
1685 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
1686 (build-system ruby-build-system)
1687 (arguments
1688 '(#:tests? #f)) ; no test suite
1689 (synopsis "Simple Ruby library for XML processing")
1690 (description "This library provides a simple API for XML processing in
1691 Ruby.")
1692 (home-page "https://github.com/maik/xml-simple")
1693 (license license:ruby)))
1694
1695 (define-public ruby-thor
1696 (package
1697 (name "ruby-thor")
1698 (version "1.0.1")
1699 (source (origin
1700 ;; Pull from git because the gem has no tests.
1701 (method git-fetch)
1702 (uri (git-reference
1703 (url "https://github.com/erikhuda/thor")
1704 (commit (string-append "v" version))))
1705 (file-name (git-file-name name version))
1706 (sha256
1707 (base32
1708 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
1709 (build-system ruby-build-system)
1710 (arguments
1711 '(#:phases (modify-phases %standard-phases
1712 (add-after 'unpack 'fix-readline-tests
1713 (lambda _
1714 ;; Ensure Readline is initialized before running the
1715 ;; test to avoid a type clash with the mock ::Readline.
1716 ;; See <https://github.com/erikhuda/thor/pull/717>.
1717 (substitute* "spec/line_editor/readline_spec.rb"
1718 (("unless defined\\? ::Readline" all)
1719 (string-append "Thor::LineEditor::Readline.available?\n"
1720 all)))
1721 #t))
1722 (add-after 'unpack 'remove-coveralls-dependency
1723 (lambda _
1724 ;; Do not hook the test suite into the online
1725 ;; coveralls service.
1726 (substitute* "Gemfile"
1727 ((".*coveralls.*") ""))
1728 (substitute* "spec/helper.rb"
1729 (("require \"coveralls\"") "")
1730 (("Coveralls::SimpleCov::Formatter") "")
1731 ;; Also drop the WebMock dependency which is only
1732 ;; present to allow a coveralls.io connection, and
1733 ;; would otherwise introduce a circular dependency.
1734 (("require \"webmock/rspec\"") "")
1735 (("WebMock\\.disable_net_connect.*") ""))
1736 #t))
1737 (add-after 'unpack 'disable-network-tests
1738 (lambda _
1739 ;; These tests attempt to look up example.com.
1740 (substitute* "spec/actions/file_manipulation_spec.rb"
1741 (("it \"accepts (https?) remote sources" _ proto)
1742 (string-append "xit \"accepts " proto " remote sources")))
1743 #t))
1744 (add-after 'unpack 'disable-quality-tests
1745 (lambda _
1746 ;; These tests attempt to check the git repository for
1747 ;; tabs vs spaces, double vs single quotes, etc, and
1748 ;; depend on the git checkout.
1749 (delete-file "spec/quality_spec.rb")
1750 #t))
1751 (add-before 'check 'make-files-writable
1752 (lambda _
1753 ;; The tests needs rw access to the test suite.
1754 (for-each make-file-writable (find-files "spec"))
1755 #t))
1756 (replace 'check
1757 (lambda _
1758 (invoke "rspec" "spec"))))))
1759 (native-inputs
1760 `(("ruby-rspec" ,ruby-rspec)
1761 ("ruby-simplecov" ,ruby-simplecov)))
1762 (synopsis "Ruby toolkit for building command-line interfaces")
1763 (description "Thor is a toolkit for building powerful command-line
1764 interfaces.")
1765 (home-page "http://whatisthor.com/")
1766 (license license:expat)))
1767
1768 (define-public ruby-lumberjack
1769 (package
1770 (name "ruby-lumberjack")
1771 (version "1.0.13")
1772 (source (origin
1773 (method url-fetch)
1774 (uri (rubygems-uri "lumberjack" version))
1775 (sha256
1776 (base32
1777 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
1778 (build-system ruby-build-system)
1779 (native-inputs
1780 `(("ruby-rspec" ,ruby-rspec)
1781 ("ruby-timecop" ,ruby-timecop)))
1782 (synopsis "Logging utility library for Ruby")
1783 (description "Lumberjack is a simple logging utility that can be a drop in
1784 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
1785 for automatically rolling log files even with multiple processes writing the
1786 same log file.")
1787 (home-page "https://github.com/bdurand/lumberjack")
1788 (license license:expat)))
1789
1790 (define-public ruby-rbnacl
1791 (package
1792 (name "ruby-rbnacl")
1793 (version "6.0.1")
1794 (source
1795 (origin
1796 (method url-fetch)
1797 (uri (rubygems-uri "rbnacl" version))
1798 (sha256
1799 (base32
1800 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
1801 (build-system ruby-build-system)
1802 (arguments
1803 `(#:phases
1804 (modify-phases %standard-phases
1805 (add-after 'unpack 'remove-unnecessary-dependencies
1806 (lambda _
1807 ;; Coveralls relates to a network service, and Rubocop to code
1808 ;; linting and both are unnecessary to run the tests
1809 (substitute* "Gemfile"
1810 ((".*rubocop.*") "\n")
1811 ((".*guard-rspec.*") "\n")
1812 ((".*coveralls.*") "\n"))
1813 (substitute* "spec/spec_helper.rb"
1814 (("require \"coveralls\"") "")
1815 (("Coveralls.wear!") ""))
1816 #t))
1817 (add-after 'unpack 'use-libsodium-from-store
1818 (lambda* (#:key inputs #:allow-other-keys)
1819 (substitute* '("lib/rbnacl/init.rb"
1820 "lib/rbnacl/sodium.rb")
1821 (("ffi_lib \\[.+\\]")
1822 (string-append "ffi_lib [\""
1823 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
1824 "\"]")))
1825 #t))
1826 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
1827 (replace 'check
1828 (lambda* (#:key tests? #:allow-other-keys)
1829 (when tests?
1830 (invoke "rspec"))
1831 #t)))))
1832 (propagated-inputs
1833 `(("ruby-ffi" ,ruby-ffi)))
1834 (inputs
1835 `(("libsodium" ,libsodium)))
1836 (native-inputs
1837 `(("bundler" ,bundler)
1838 ("ruby-rspec" ,ruby-rspec)))
1839 (synopsis "Ruby FFI binding to libsodium")
1840 (description
1841 "This package provides Ruby FFI bindings to the Networking and
1842 Cryptography (NaCl) library, also known as libsodium. This provides a
1843 high-level toolkit for building cryptographic systems and protocols.")
1844 (home-page "https://github.com/crypto-rb/rbnacl")
1845 (license license:expat)))
1846
1847 (define-public ruby-nenv
1848 (package
1849 (name "ruby-nenv")
1850 (version "0.3.0")
1851 (source (origin
1852 (method url-fetch)
1853 (uri (rubygems-uri "nenv" version))
1854 (sha256
1855 (base32
1856 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
1857 (build-system ruby-build-system)
1858 (arguments
1859 `(#:tests? #f)) ; no tests included
1860 (native-inputs
1861 `(("ruby-rspec" ,ruby-rspec)
1862 ("bundler" ,bundler)))
1863 (synopsis "Ruby interface for modifying the environment")
1864 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
1865 and inspect the environment.")
1866 (home-page "https://github.com/e2/nenv")
1867 (license license:expat)))
1868
1869 (define-public ruby-ptools
1870 (package
1871 (name "ruby-ptools")
1872 (version "1.3.5")
1873 (source (origin
1874 (method url-fetch)
1875 (uri (rubygems-uri "ptools" version))
1876 (sha256
1877 (base32
1878 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
1879 (build-system ruby-build-system)
1880 (arguments
1881 '(#:phases (modify-phases %standard-phases
1882 (add-after 'unpack 'patch-/bin/ls
1883 (lambda _
1884 (substitute* "test/test_binary.rb"
1885 (("/bin/ls")
1886 (which "ls")))
1887 #t))
1888 (add-before 'install 'create-gem
1889 (lambda _
1890 ;; Do not attempt to sign the gem.
1891 (substitute* "Rakefile"
1892 (("spec\\.signing_key = .*")
1893 ""))
1894 (invoke "rake" "gem:create"))))))
1895 (synopsis "Extra methods for Ruby's @code{File} class")
1896 (description
1897 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
1898 class with many additional methods modelled after common POSIX tools, such as
1899 @code{File.which} for finding executables, @code{File.tail} to print the last
1900 lines of a file, @code{File.wc} to count words, and so on.")
1901 (home-page "https://github.com/djberg96/ptools")
1902 (license license:artistic2.0)))
1903
1904 (define-public ruby-permutation
1905 (package
1906 (name "ruby-permutation")
1907 (version "0.1.8")
1908 (source (origin
1909 (method url-fetch)
1910 (uri (rubygems-uri "permutation" version))
1911 (sha256
1912 (base32
1913 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
1914 (build-system ruby-build-system)
1915 (arguments
1916 `(#:phases
1917 (modify-phases %standard-phases
1918 (add-after 'unpack 'fix-rakefile
1919 (lambda _
1920 (substitute* "Rakefile"
1921 (("require 'rake/gempackagetask'")
1922 "require 'rubygems/package_task'")
1923 (("include Config") ""))
1924 #t))
1925 (replace 'check
1926 (lambda _
1927 (invoke "ruby" "-Ilib" "test/test.rb"))))))
1928 (synopsis "Library to perform operations with sequence permutations")
1929 (description "This package provides a Ruby library to perform different
1930 operations with permutations of sequences, such as strings and arrays.")
1931 (home-page "https://flori.github.io/permutation")
1932 (license license:gpl2))) ; GPL 2 only
1933
1934 (define-public ruby-shellany
1935 (package
1936 (name "ruby-shellany")
1937 (version "0.0.1")
1938 (source (origin
1939 (method url-fetch)
1940 (uri (rubygems-uri "shellany" version))
1941 (sha256
1942 (base32
1943 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
1944 (build-system ruby-build-system)
1945 (arguments
1946 `(#:test-target "default"
1947 #:phases
1948 (modify-phases %standard-phases
1949 (add-after 'unpack 'fix-version-test
1950 (lambda _
1951 (substitute* "spec/shellany_spec.rb"
1952 (("^RSpec") "require \"shellany\"\nRSpec"))
1953 #t)))))
1954 (native-inputs
1955 `(("ruby-rspec" ,ruby-rspec)
1956 ("ruby-nenv" ,ruby-nenv)
1957 ("bundler" ,bundler)))
1958 (synopsis "Capture command output")
1959 (description "Shellany is a Ruby library providing functions to capture
1960 the output produced by running shell commands.")
1961 (home-page "https://rubygems.org/gems/shellany")
1962 (license license:expat)))
1963
1964 (define-public ruby-notiffany
1965 (package
1966 (name "ruby-notiffany")
1967 (version "0.1.3")
1968 (source (origin
1969 (method url-fetch)
1970 (uri (rubygems-uri "notiffany" version))
1971 (sha256
1972 (base32
1973 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
1974 (build-system ruby-build-system)
1975 ;; Tests are not included in the gem.
1976 (arguments `(#:tests? #f))
1977 (propagated-inputs
1978 `(("ruby-shellany" ,ruby-shellany)
1979 ("ruby-nenv" ,ruby-nenv)))
1980 (native-inputs
1981 `(("bundler" ,bundler)))
1982 (synopsis "Wrapper library for notification libraries")
1983 (description "Notiffany is a Ruby wrapper library for notification
1984 libraries such as Libnotify.")
1985 (home-page "https://github.com/guard/notiffany")
1986 (license license:expat)))
1987
1988 (define-public ruby-forking-test-runner
1989 (package
1990 (name "ruby-forking-test-runner")
1991 (version "1.6.0")
1992 (home-page "https://github.com/grosser/forking_test_runner")
1993 (source (origin
1994 (method git-fetch)
1995 (uri (git-reference (url home-page)
1996 (commit (string-append "v" version))))
1997 (file-name (git-file-name name version))
1998 (sha256
1999 (base32
2000 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2001 (build-system ruby-build-system)
2002 (arguments
2003 '(#:test-target "spec"
2004 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2005 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2006 #:tests? #f
2007 #:phases (modify-phases %standard-phases
2008 (replace 'replace-git-ls-files
2009 (lambda _
2010 (substitute* "forking_test_runner.gemspec"
2011 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2012 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2013 #t))
2014 (add-before 'check 'remove-version-constraints
2015 (lambda _
2016 ;; Ignore hard coded version constraints for the tests.
2017 (delete-file "Gemfile.lock")
2018 #t))
2019 (add-before 'check 'set-HOME
2020 (lambda _
2021 ;; Many tests invoke Bundler, and fails when Bundler
2022 ;; warns that /homeless-shelter does not exist.
2023 (setenv "HOME" "/tmp")
2024 #t)))))
2025 (native-inputs
2026 `(("ruby-activerecord" ,ruby-activerecord)
2027 ("ruby-bump" ,ruby-bump)
2028 ("ruby-rspec" ,ruby-rspec)
2029 ("ruby-sqlite3" ,ruby-sqlite3)
2030 ("ruby-wwtd" ,ruby-wwtd)))
2031 (propagated-inputs
2032 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2033 (synopsis "Run every test in a fork")
2034 (description
2035 "This package is a wrapper around @code{parallel_tests} that runs every
2036 test in a fork to avoid pollution and get clean output per test.")
2037 (license license:expat)))
2038
2039 (define-public ruby-formatador
2040 (package
2041 (name "ruby-formatador")
2042 (version "0.2.5")
2043 (source (origin
2044 (method url-fetch)
2045 (uri (rubygems-uri "formatador" version))
2046 (sha256
2047 (base32
2048 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2049 (build-system ruby-build-system)
2050 ;; Circular dependency: Tests require ruby-shindo, which requires
2051 ;; ruby-formatador at runtime.
2052 (arguments `(#:tests? #f))
2053 (synopsis "Ruby library to format text on stdout")
2054 (description "Formatador is a Ruby library to format text printed to the
2055 standard output stream.")
2056 (home-page "https://github.com/geemus/formatador")
2057 (license license:expat)))
2058
2059 (define-public ruby-fuubar
2060 (package
2061 (name "ruby-fuubar")
2062 (version "2.3.2")
2063 (source
2064 (origin
2065 ;; Fetch from the git repository, as the gem package doesn't include
2066 ;; the tests.
2067 (method git-fetch)
2068 (uri (git-reference
2069 (url "https://github.com/thekompanee/fuubar.git")
2070 (commit (string-append "releases/v" version))))
2071 (file-name (git-file-name name version))
2072 (sha256
2073 (base32
2074 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2075 (build-system ruby-build-system)
2076 (arguments
2077 '(;; TODO: Some tests fail, unsure why.
2078 ;; 21 examples, 7 failures
2079 #:tests? #f
2080 #:phases
2081 (modify-phases %standard-phases
2082 (add-before 'build 'delete-certificate
2083 (lambda _
2084 ;; Remove 's.cert_chain' as we do not build with a private key
2085 (substitute* "fuubar.gemspec"
2086 ((".*cert_chain.*") "")
2087 ((".*signing_key.*") ""))
2088 #t))
2089 (replace 'check
2090 (lambda* (#:key tests? #:allow-other-keys)
2091 (when tests?
2092 (invoke "rspec"))
2093 #t)))))
2094 (native-inputs
2095 `(("bundler" ,bundler)))
2096 (propagated-inputs
2097 `(("ruby-rspec-core" ,ruby-rspec-core)
2098 ("ruby-progressbar" ,ruby-progressbar)))
2099 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2100 (description
2101 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2102 string of letters and dots as feedback. It also stops on the first test
2103 failure.")
2104 (home-page "https://github.com/thekompanee/fuubar")
2105 (license license:expat)))
2106
2107 (define-public ruby-haml
2108 (package
2109 (name "ruby-haml")
2110 (version "5.0.4")
2111 (source
2112 (origin
2113 (method url-fetch)
2114 (uri (rubygems-uri "haml" version))
2115 (sha256
2116 (base32
2117 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2118 (build-system ruby-build-system)
2119 (arguments
2120 '(#:tests? #f)) ; No included tests
2121 (propagated-inputs
2122 `(("ruby-tilt" ,ruby-tilt)
2123 ("ruby-temple" ,ruby-temple)))
2124 (synopsis "Haml is a Ruby library to generate HTML documents")
2125 (description
2126 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2127 HTML or XML that is designed to express the structure of documents using
2128 indentation rather than closing tags. It was originally envisioned as a
2129 plugin for Ruby on Rails, but it can function as a stand-alone templating
2130 engine.")
2131 (home-page "http://haml.info/")
2132 (license license:expat)))
2133
2134 (define-public ruby-hamster
2135 (package
2136 (name "ruby-hamster")
2137 (version "3.0.0")
2138 (source
2139 (origin
2140 (method url-fetch)
2141 (uri (rubygems-uri "hamster" version))
2142 (sha256
2143 (base32
2144 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2145 (build-system ruby-build-system)
2146 (arguments
2147 '(#:phases
2148 (modify-phases %standard-phases
2149 (add-after 'unpack 'remove-unnecessary-dependencies
2150 (lambda _
2151 ;; pry is a debugging tool, and is unnecessary when running the
2152 ;; tests
2153 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2154 (("require 'pry'") ""))
2155 (substitute* "spec/spec_helper.rb"
2156 (("require \"pry\"") "")
2157 ;; CodeClimate is an online service, and is unnecessary for
2158 ;; running the tests
2159 (("require \"codeclimate-test-reporter\"") "")
2160 (("CodeClimate.*\n") ""))
2161 #t))
2162 ;; No Rakefile is included, so run rspec directly.
2163 (replace 'check
2164 (lambda* (#:key tests? #:allow-other-keys)
2165 (when tests?
2166 (invoke "rspec"))
2167 #t)))))
2168 (propagated-inputs
2169 `(("ruby-concurrent" ,ruby-concurrent)))
2170 (native-inputs
2171 `(("ruby-rspec" ,ruby-rspec)))
2172 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2173 (description
2174 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2175 @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2176 immutable queue or stack).")
2177 (home-page "https://github.com/hamstergem/hamster")
2178 (license license:expat)))
2179
2180 (define-public ruby-hashdiff
2181 (package
2182 (name "ruby-hashdiff")
2183 (version "0.3.8")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (rubygems-uri "hashdiff" version))
2188 (sha256
2189 (base32
2190 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2191 (build-system ruby-build-system)
2192 (arguments
2193 '(#:phases
2194 (modify-phases %standard-phases
2195 ;; Run tests directly via rspec to avoid Rake issue:
2196 ;; NoMethodError: undefined method `last_comment'
2197 (replace 'check
2198 (lambda* (#:key tests? #:allow-other-keys)
2199 (when tests?
2200 (invoke "rspec"))
2201 #t)))))
2202 (native-inputs
2203 `(("bundler" ,bundler)
2204 ("ruby-rspec" ,ruby-rspec-2)))
2205 (synopsis "HashDiff computes the smallest difference between two hashes")
2206 (description
2207 "HashDiff is a Ruby library to compute the smallest difference between
2208 two hashes.")
2209 (home-page "https://github.com/liufengyun/hashdiff")
2210 (license license:expat)))
2211
2212 (define-public ruby-hydra
2213 ;; No releases yet.
2214 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2215 (revision "0"))
2216 (package
2217 (name "ruby-hydra")
2218 (version (git-version "0.0" revision commit))
2219 (home-page "https://github.com/hyphenation/hydra")
2220 (source (origin
2221 (method git-fetch)
2222 (uri (git-reference (url home-page) (commit commit)))
2223 (file-name (git-file-name name version))
2224 (sha256
2225 (base32
2226 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
2227 (build-system ruby-build-system)
2228 (arguments
2229 '(#:phases (modify-phases %standard-phases
2230 (add-after 'unpack 'make-files-writable
2231 (lambda _
2232 (for-each make-file-writable (find-files "."))
2233 #t))
2234 (replace 'check
2235 (lambda _
2236 (invoke "rspec"))))))
2237 (native-inputs
2238 `(("ruby-rspec" ,ruby-rspec)))
2239 (propagated-inputs
2240 `(("ruby-byebug" ,ruby-byebug)))
2241 (synopsis "Ruby hyphenation patterns")
2242 (description
2243 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
2244 (license license:expat))))
2245
2246 (define-public ruby-shindo
2247 (package
2248 (name "ruby-shindo")
2249 (version "0.3.8")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (rubygems-uri "shindo" version))
2253 (sha256
2254 (base32
2255 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
2256 (build-system ruby-build-system)
2257 (arguments
2258 `(#:test-target "shindo_tests"
2259 #:phases
2260 (modify-phases %standard-phases
2261 (add-after 'unpack 'fix-tests
2262 (lambda _
2263 (substitute* "tests/tests_helper.rb"
2264 (("-rubygems") ""))
2265 (substitute* "Rakefile"
2266 (("system \"shindo") "system \"./bin/shindo")
2267 ;; This test doesn't work, so we disable it.
2268 (("fail \"The build_error test should fail") "#")
2269 ((" -rubygems") ""))
2270 #t)))))
2271 (propagated-inputs
2272 `(("ruby-formatador" ,ruby-formatador)))
2273 (synopsis "Simple depth first Ruby testing")
2274 (description "Shindo is a simple depth first testing library for Ruby.")
2275 (home-page "https://github.com/geemus/shindo")
2276 (license license:expat)))
2277
2278 (define-public ruby-rubygems-tasks
2279 (package
2280 (name "ruby-rubygems-tasks")
2281 (version "0.2.5")
2282 (source (origin
2283 (method url-fetch)
2284 (uri (rubygems-uri "rubygems-tasks" version))
2285 (sha256
2286 (base32
2287 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
2288 (build-system ruby-build-system)
2289 ;; Tests need Internet access.
2290 (arguments `(#:tests? #f))
2291 (native-inputs
2292 `(("ruby-rspec" ,ruby-rspec)
2293 ("ruby-yard" ,ruby-yard)))
2294 (synopsis "Rake tasks for managing and releasing Ruby Gems")
2295 (description "Rubygems-task provides Rake tasks for managing and releasing
2296 Ruby Gems.")
2297 (home-page "https://github.com/postmodern/rubygems-tasks")
2298 (license license:expat)))
2299
2300 (define-public ruby-rubyzip
2301 (package
2302 (name "ruby-rubyzip")
2303 (version "1.2.1")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (rubygems-uri "rubyzip" version))
2308 (sha256
2309 (base32
2310 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
2311 (build-system ruby-build-system)
2312 (arguments
2313 '(#:phases
2314 (modify-phases %standard-phases
2315 (add-before 'check 'patch-tests
2316 (lambda* (#:key inputs #:allow-other-keys)
2317 (substitute* "test/gentestfiles.rb"
2318 (("/usr/bin/zip")
2319 (string-append
2320 (assoc-ref inputs "zip") "/bin/zip")))
2321 (substitute* "test/input_stream_test.rb"
2322 (("/usr/bin/env ruby") (which "ruby")))
2323 #t)))))
2324 (native-inputs
2325 `(("bundler" ,bundler)
2326 ("ruby-simplecov" ,ruby-simplecov)
2327 ("zip" ,zip)
2328 ("unzip" ,unzip)))
2329 (synopsis "Ruby module is for reading and writing zip files")
2330 (description
2331 "The rubyzip module provides ways to read from and create zip files.")
2332 (home-page "http://github.com/rubyzip/rubyzip")
2333 (license license:bsd-2)))
2334
2335 (define-public ruby-simplecov-html
2336 (package
2337 (name "ruby-simplecov-html")
2338 (version "0.10.2")
2339 (source (origin
2340 (method url-fetch)
2341 (uri (rubygems-uri "simplecov-html" version))
2342 (sha256
2343 (base32
2344 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
2345 (build-system ruby-build-system)
2346 (arguments `(#:tests? #f)) ; there are no tests
2347 (native-inputs
2348 `(("bundler" ,bundler)))
2349 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
2350 (description "This package provides the default HTML formatter for
2351 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
2352 (home-page "https://github.com/colszowka/simplecov-html")
2353 (license license:expat)))
2354
2355 (define-public ruby-simplecov
2356 (package
2357 (name "ruby-simplecov")
2358 (version "0.17.1")
2359 (source (origin
2360 (method url-fetch)
2361 (uri (rubygems-uri "simplecov" version))
2362 (sha256
2363 (base32
2364 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
2365 (build-system ruby-build-system)
2366 ;; Simplecov depends on rubocop for code style checking at build time.
2367 ;; Rubocop needs simplecov at build time.
2368 (arguments `(#:tests? #f))
2369 (propagated-inputs
2370 `(("ruby-json" ,ruby-json)
2371 ("ruby-docile" ,ruby-docile)
2372 ("ruby-simplecov-html" ,ruby-simplecov-html)))
2373 (native-inputs
2374 `(("bundler" ,bundler)))
2375 (synopsis "Code coverage framework for Ruby")
2376 (description "SimpleCov is a code coverage framework for Ruby with a
2377 powerful configuration library and automatic merging of coverage across test
2378 suites.")
2379 (home-page "https://github.com/colszowka/simplecov")
2380 (license license:expat)))
2381
2382 (define-public ruby-useragent
2383 (package
2384 (name "ruby-useragent")
2385 (version "0.16.10")
2386 (source (origin
2387 (method url-fetch)
2388 (uri (rubygems-uri "useragent" version))
2389 (sha256
2390 (base32
2391 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
2392 (build-system ruby-build-system)
2393 (arguments
2394 '(#:tests? #f)) ; no test suite
2395 (synopsis "HTTP user agent parser for Ruby")
2396 (description "UserAgent is a Ruby library that parses and compares HTTP
2397 User Agents.")
2398 (home-page "https://github.com/gshutler/useragent")
2399 (license license:expat)))
2400
2401 (define-public ruby-backports
2402 (package
2403 (name "ruby-backports")
2404 (version "3.11.4")
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (rubygems-uri "backports" version))
2409 (sha256
2410 (base32
2411 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
2412 (build-system ruby-build-system)
2413 (arguments
2414 '(;; TODO: This should be default, but there is one test failure
2415 #:test-target "all_spec"))
2416 (native-inputs
2417 `(("ruby-mspec" ,ruby-mspec)
2418 ("ruby-activesupport" ,ruby-activesupport)))
2419 (synopsis "Backports of the features in newer Ruby versions")
2420 (description
2421 "Backports enables more compatibility across Ruby versions by providing
2422 backports of some features.")
2423 (home-page "https://github.com/marcandre/backports")
2424 (license license:expat)))
2425
2426 (define-public ruby-bacon
2427 (package
2428 (name "ruby-bacon")
2429 (version "1.2.0")
2430 (source (origin
2431 (method url-fetch)
2432 (uri (rubygems-uri "bacon" version))
2433 (sha256
2434 (base32
2435 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
2436 (build-system ruby-build-system)
2437 (synopsis "Small RSpec clone")
2438 (description "Bacon is a small RSpec clone providing all essential
2439 features.")
2440 (home-page "https://github.com/chneukirchen/bacon")
2441 (license license:expat)))
2442
2443 (define-public ruby-bacon-bits
2444 (package
2445 (name "ruby-bacon-bits")
2446 (version "0.1.0")
2447 (source
2448 (origin
2449 (method url-fetch)
2450 (uri (rubygems-uri "bacon-bits" version))
2451 (sha256
2452 (base32
2453 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
2454 (build-system ruby-build-system)
2455 (arguments
2456 ;; No tests
2457 '(#:tests? #f))
2458 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
2459 (synopsis "Extensions to Bacon, for disabling tests, before and after
2460 blocks and more")
2461 (description
2462 "This extends the bacon testing framework with useful extensions to
2463 disable tests, have before and after blocks that run once and more.")
2464 (home-page "https://github.com/cldwalker/bacon-bits")
2465 (license license:expat)))
2466
2467 (define-public ruby-bacon-colored-output
2468 (package
2469 (name "ruby-bacon-colored-output")
2470 (version "1.1.1")
2471 (source
2472 (origin
2473 (method url-fetch)
2474 (uri (rubygems-uri "bacon-colored_output" version))
2475 (sha256
2476 (base32
2477 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
2478 (build-system ruby-build-system)
2479 (arguments
2480 '(;; No included tests
2481 #:tests? #f))
2482 (propagated-inputs
2483 `(("ruby-bacon" ,ruby-bacon)))
2484 (synopsis "Colored output for Bacon test framework")
2485 (description
2486 "This package adds color through ANSI escape codes to Bacon test
2487 output.")
2488 (home-page "https://github.com/whitequark/bacon-colored_output")
2489 (license license:expat)))
2490
2491 (define-public ruby-connection-pool
2492 (package
2493 (name "ruby-connection-pool")
2494 (version "2.2.2")
2495 (source (origin
2496 (method url-fetch)
2497 (uri (rubygems-uri "connection_pool" version))
2498 (sha256
2499 (base32
2500 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
2501 (build-system ruby-build-system)
2502 (native-inputs
2503 `(("bundler" ,bundler)))
2504 (synopsis "Generic connection pool for Ruby")
2505 (description "Connection_pool provides a generic connection pooling
2506 interface for Ruby programs.")
2507 (home-page "https://github.com/mperham/connection_pool")
2508 (license license:expat)))
2509
2510 (define-public ruby-fast-gettext
2511 (package
2512 (name "ruby-fast-gettext")
2513 (version "2.0.3")
2514 (home-page "https://github.com/grosser/fast_gettext")
2515 (source (origin
2516 (method git-fetch)
2517 (uri (git-reference (url home-page)
2518 (commit (string-append "v" version))))
2519 (file-name (git-file-name name version))
2520 (sha256
2521 (base32
2522 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
2523 (build-system ruby-build-system)
2524 (arguments
2525 '(#:test-target "spec"
2526 #:phases (modify-phases %standard-phases
2527 (add-before 'check 'remove-version-constraints
2528 (lambda _
2529 (delete-file "Gemfile.lock")
2530 #t))
2531 (add-before 'check 'remove-activerecord-test
2532 (lambda _
2533 ;; FIXME: This test fails because ActiveRecord depends on
2534 ;; a different version of ruby-sqlite than the currently
2535 ;; available one.
2536 (delete-file
2537 "spec/fast_gettext/translation_repository/db_spec.rb")
2538 #t))
2539 (add-before 'check 'disable-i18n-test
2540 (lambda _
2541 ;; XXX: This test checks i18n intricasies with Rails 3 and
2542 ;; automatically disables itself for Rails 4.0, but does
2543 ;; not know about newer versions as it has not been updated
2544 ;; since 2014. Disable for later versions of Rails too.
2545 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
2546 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
2547 "ActiveRecord::VERSION::MINOR == 0"))
2548 "ActiveRecord::VERSION::MAJOR >= 4"))
2549 #t)))))
2550 (native-inputs
2551 `(;; For tests.
2552 ("ruby-activerecord" ,ruby-activerecord)
2553 ("ruby-activesupport" ,ruby-activesupport)
2554 ("ruby-bump" ,ruby-bump)
2555 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
2556 ("ruby-i18n" ,ruby-i18n)
2557 ("ruby-rubocop" ,ruby-rubocop)
2558 ("ruby-rspec" ,ruby-rspec)
2559 ("ruby-single-cov" ,ruby-single-cov)
2560 ("ruby-sqlite3" ,ruby-sqlite3)
2561 ("ruby-wwtd" ,ruby-wwtd)))
2562 (synopsis "Fast implementation of @code{GetText}")
2563 (description
2564 "This package provides an alternative implementation of the Ruby
2565 @code{GetText} library that is approximately 12x faster yet thread safe.")
2566 ;; Some parts are covered by the Ruby license, see file headers.
2567 (license (list license:expat license:ruby))))
2568
2569 (define-public ruby-net-http-persistent
2570 (package
2571 (name "ruby-net-http-persistent")
2572 (version "3.0.0")
2573 (source (origin
2574 (method url-fetch)
2575 (uri (rubygems-uri "net-http-persistent" version))
2576 (sha256
2577 (base32
2578 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
2579 (build-system ruby-build-system)
2580 (native-inputs
2581 `(("ruby-connection-pool" ,ruby-connection-pool)
2582 ("ruby-hoe" ,ruby-hoe)))
2583 (synopsis "Persistent HTTP connection manager")
2584 (description "Net::HTTP::Persistent manages persistent HTTP connections
2585 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
2586 (home-page "https://github.com/drbrain/net-http-persistent")
2587 (license license:expat)))
2588
2589 (define-public ruby-power-assert
2590 (package
2591 (name "ruby-power-assert")
2592 (version "1.1.5")
2593 (source (origin
2594 (method url-fetch)
2595 (uri (rubygems-uri "power_assert" version))
2596 (sha256
2597 (base32
2598 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
2599 (build-system ruby-build-system)
2600 (arguments
2601 '(#:tests? #f)) ; No included tests
2602 (native-inputs
2603 `(("bundler" ,bundler)))
2604 (synopsis "Assert library with descriptive assertion messages")
2605 (description "Power-assert is an assertion library providing descriptive
2606 assertion messages for tests.")
2607 (home-page "https://github.com/k-tsj/power_assert")
2608 (license (list license:bsd-2 license:ruby))))
2609
2610 (define-public ruby-powerpack
2611 (package
2612 (name "ruby-powerpack")
2613 (version "0.1.2")
2614 (source
2615 (origin
2616 (method url-fetch)
2617 (uri (rubygems-uri "powerpack" version))
2618 (sha256
2619 (base32
2620 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
2621 (build-system ruby-build-system)
2622 (arguments
2623 '(#:test-target "spec"))
2624 (native-inputs
2625 `(("bundler" ,bundler)
2626 ("ruby-rspec" ,ruby-rspec)
2627 ("ruby-yard" ,ruby-yard)))
2628 (synopsis "Useful extensions to core Ruby classes")
2629 (description
2630 "This package provides a few useful extensions to core Ruby classes,
2631 including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
2632 @code{String}.")
2633 (home-page "https://github.com/bbatsov/powerpack")
2634 (license license:expat)))
2635
2636 (define-public ruby-locale
2637 (package
2638 (name "ruby-locale")
2639 (version "2.1.2")
2640 (source (origin
2641 (method url-fetch)
2642 (uri (rubygems-uri "locale" version))
2643 (sha256
2644 (base32
2645 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
2646 (build-system ruby-build-system)
2647 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
2648 ;; which needs ruby-gettext, which needs ruby-locale. To break the
2649 ;; dependency cycle we disable tests.
2650 (arguments `(#:tests? #f))
2651 (native-inputs
2652 `(("bundler" ,bundler)
2653 ("ruby-yard" ,ruby-yard)))
2654 (synopsis "Ruby library providing basic localization APIs")
2655 (description
2656 "Ruby-Locale is the pure ruby library which provides basic APIs for
2657 localization.")
2658 (home-page "https://github.com/ruby-gettext/locale")
2659 (license (list license:lgpl3+ license:ruby))))
2660
2661 (define-public ruby-temple
2662 (package
2663 (name "ruby-temple")
2664 (version "0.8.1")
2665 (source
2666 (origin
2667 (method url-fetch)
2668 (uri (rubygems-uri "temple" version))
2669 (sha256
2670 (base32
2671 "158d7ygbwcifqnvrph219p7m78yjdjazhykv5darbkms7bxm5y09"))))
2672 (build-system ruby-build-system)
2673 (native-inputs
2674 `(("ruby-tilt" ,ruby-tilt)
2675 ("ruby-bacon" ,ruby-bacon)
2676 ("ruby-erubis" ,ruby-erubis)))
2677 (synopsis "Template compilation framework in Ruby")
2678 (description
2679 "Temple is an abstraction and framework for compiling templates to pure
2680 Ruby.")
2681 (home-page "https://github.com/judofyr/temple")
2682 (license license:expat)))
2683
2684 (define-public ruby-text
2685 (package
2686 (name "ruby-text")
2687 (version "1.3.1")
2688 (source (origin
2689 (method url-fetch)
2690 (uri (rubygems-uri "text" version))
2691 (sha256
2692 (base32
2693 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
2694 (build-system ruby-build-system)
2695 (synopsis "Collection of text algorithms for Ruby")
2696 (description
2697 "This package provides a collection of text algorithms: Levenshtein,
2698 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
2699 (home-page "https://github.com/threedaymonk/text")
2700 (license license:expat)))
2701
2702 (define-public ruby-gettext
2703 (package
2704 (name "ruby-gettext")
2705 (version "3.1.7")
2706 (source (origin
2707 (method url-fetch)
2708 (uri (rubygems-uri "gettext" version))
2709 (sha256
2710 (base32
2711 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
2712 (build-system ruby-build-system)
2713 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
2714 ;; which needs ruby-gettext. To break the dependency cycle we disable
2715 ;; tests.
2716 (arguments `(#:tests? #f))
2717 (propagated-inputs
2718 `(("ruby-locale" ,ruby-locale)
2719 ("ruby-text" ,ruby-text)))
2720 (native-inputs
2721 `(("bundler" ,bundler)
2722 ("ruby-yard" ,ruby-yard)))
2723 (synopsis "GNU gettext-like program for Ruby")
2724 (description
2725 "Gettext is a GNU gettext-like program for Ruby. The catalog
2726 file (po-file) used is the same as that used by GNU gettext, allowing you to
2727 use GNU gettext tools for maintenance.")
2728 (home-page "https://ruby-gettext.github.com/")
2729 (license (list license:lgpl3+ license:ruby))))
2730
2731 (define-public ruby-packnga
2732 (package
2733 (name "ruby-packnga")
2734 (version "1.0.4")
2735 (source (origin
2736 (method url-fetch)
2737 (uri (rubygems-uri "packnga" version))
2738 (sha256
2739 (base32
2740 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
2741 (build-system ruby-build-system)
2742 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
2743 ;; To break the dependency cycle we disable tests.
2744 (arguments `(#:tests? #f))
2745 (propagated-inputs
2746 `(("ruby-gettext" ,ruby-gettext)
2747 ("ruby-yard" ,ruby-yard)))
2748 (native-inputs
2749 `(("bundler" ,bundler)))
2750 (synopsis "Utility library to package internationalized libraries")
2751 (description
2752 "Packnga is a library to translate to many languages using YARD.")
2753 (home-page "http://ranguba.org/packnga/")
2754 (license license:lgpl2.0+)))
2755
2756 (define-public ruby-test-construct
2757 (package
2758 (name "ruby-test-construct")
2759 (version "2.0.1")
2760 (source
2761 (origin
2762 (method url-fetch)
2763 (uri (rubygems-uri "test_construct" version))
2764 (sha256
2765 (base32
2766 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
2767 (build-system ruby-build-system)
2768 (native-inputs
2769 `(("bundler" ,bundler)
2770 ("ruby-mocha" ,ruby-mocha)
2771 ("ruby-rspec" ,ruby-rspec)))
2772 (synopsis "Creates temporary files and directories for testing")
2773 (description
2774 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
2775 temporary files and directories during tests.")
2776 (home-page "https://github.com/bhb/test_construct")
2777 (license license:expat)))
2778
2779 (define-public ruby-test-unit
2780 (package
2781 (name "ruby-test-unit")
2782 (version "3.2.5")
2783 (source (origin
2784 (method url-fetch)
2785 (uri (rubygems-uri "test-unit" version))
2786 (sha256
2787 (base32
2788 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
2789 (build-system ruby-build-system)
2790 (propagated-inputs
2791 `(("ruby-power-assert" ,ruby-power-assert)))
2792 (native-inputs
2793 `(("bundler" ,bundler)
2794 ("ruby-packnga" ,ruby-packnga)
2795 ("ruby-yard" ,ruby-yard)))
2796 (synopsis "Unit testing framework for Ruby")
2797 (description "@code{Test::Unit} is unit testing framework for Ruby, based
2798 on xUnit principles. These were originally designed by Kent Beck, creator of
2799 extreme programming software development methodology, for Smalltalk's SUnit.
2800 It allows writing tests, checking results and automated testing in Ruby.")
2801 (home-page "https://test-unit.github.io/")
2802 (license (list license:psfl license:ruby))))
2803
2804 (define-public ruby-markaby
2805 (package
2806 (name "ruby-markaby")
2807 (version "0.9.0")
2808 (source
2809 (origin
2810 (method url-fetch)
2811 (uri (rubygems-uri "markaby" version))
2812 (sha256
2813 (base32
2814 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
2815 (build-system ruby-build-system)
2816 (arguments
2817 '(#:phases
2818 (modify-phases %standard-phases
2819 ;; Run rspec manually without using the Rakefile, as the versions of
2820 ;; Rake and RSpec 2 are incompatible:
2821 ;;
2822 ;; NoMethodError: undefined method `last_comment'
2823 (replace 'check
2824 (lambda* (#:key tests? #:allow-other-keys)
2825 (when tests?
2826 (invoke "rspec"))
2827 #t)))))
2828 (propagated-inputs
2829 `(("ruby-builder" ,ruby-builder)))
2830 (native-inputs
2831 `(("bundler" ,bundler)
2832 ("ruby-rspec" ,ruby-rspec-2)))
2833 (synopsis "Write HTML pages in pure Ruby")
2834 (description
2835 "Markaby allows writing HTML packages in pure Ruby. This is similar to
2836 the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
2837 mixture of HTML and additional ERB syntax.")
2838 (home-page "https://markaby.github.io/")
2839 (license license:expat)))
2840
2841 (define-public ruby-maruku
2842 (package
2843 (name "ruby-maruku")
2844 (version "0.7.3")
2845 (source
2846 (origin
2847 (method url-fetch)
2848 (uri (rubygems-uri "maruku" version))
2849 (sha256
2850 (base32
2851 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
2852 (build-system ruby-build-system)
2853 (arguments
2854 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
2855 #:tests? #f
2856 #:phases
2857 (modify-phases %standard-phases
2858 (replace 'check
2859 (lambda* (#:key tests? #:allow-other-keys)
2860 (when tests?
2861 (invoke "rspec"))
2862 #t)))))
2863 (native-inputs
2864 `(("ruby-rspec" ,ruby-rspec)
2865 ("ruby-simplecov" ,ruby-simplecov)
2866 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
2867 (synopsis "Markdown interpreter in Ruby")
2868 (description
2869 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
2870 HTML, and PDF through LaTeX.")
2871 (home-page "https://github.com/bhollis/maruku")
2872 (license license:expat)))
2873
2874 (define-public ruby-metaclass
2875 (package
2876 (name "ruby-metaclass")
2877 (version "0.0.4")
2878 (source (origin
2879 (method url-fetch)
2880 (uri (rubygems-uri "metaclass" version))
2881 (sha256
2882 (base32
2883 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
2884 (build-system ruby-build-system)
2885 (arguments
2886 `(#:phases
2887 (modify-phases %standard-phases
2888 (add-after 'unpack 'add-test-unit-to-search-path
2889 (lambda* (#:key inputs #:allow-other-keys)
2890 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
2891 (substitute* "Rakefile"
2892 (("t\\.libs << \"test\"" line)
2893 (string-append line "; t.libs << \""
2894 test-unit "/lib/ruby/vendor_ruby"
2895 "/gems/test-unit-"
2896 ,(package-version ruby-test-unit)
2897 "/lib\""))))
2898 #t)))))
2899 (native-inputs
2900 `(("bundler" ,bundler)
2901 ("ruby-test-unit" ,ruby-test-unit)))
2902 (synopsis "Ruby library adding metaclass method to all objects")
2903 (description
2904 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
2905 objects.")
2906 (home-page "https://github.com/floehopper/metaclass")
2907 (license license:expat)))
2908
2909 (define-public ruby-mkmf-lite
2910 (package
2911 (name "ruby-mkmf-lite")
2912 (version "0.3.2")
2913 (source (origin
2914 (method url-fetch)
2915 (uri (rubygems-uri "mkmf-lite" version))
2916 (sha256
2917 (base32
2918 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
2919 (build-system ruby-build-system)
2920 (propagated-inputs
2921 `(("ruby-ptools" ,ruby-ptools)))
2922 (synopsis "Lightweight alternative to @code{mkmf}")
2923 (description
2924 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
2925 for use as a library. It does not create packages, builds, or log files of
2926 any kind. Instead, it provides mixin methods that you can use in FFI or tests
2927 to check for the presence of header files, constants, and so on.")
2928 (home-page "https://github.com/djberg96/mkmf-lite")
2929 (license license:asl2.0)))
2930
2931 (define-public ruby-mspec
2932 (package
2933 (name "ruby-mspec")
2934 (version "1.9.1")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (rubygems-uri "mspec" version))
2939 (sha256
2940 (base32
2941 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
2942 (build-system ruby-build-system)
2943 (arguments
2944 '(;; TODO: 3 test failures
2945 ;; ./spec/mocks/mock_spec.rb:82
2946 ;; ./spec/utils/name_map_spec.rb:151
2947 ;; ./spec/utils/name_map_spec.rb:155
2948 #:tests? #f
2949 #:phases
2950 (modify-phases %standard-phases
2951 (add-after 'extract-gemspec 'change-dependency-constraints
2952 (lambda _
2953 (substitute* "mspec.gemspec"
2954 (("rake.*") "rake>)\n")
2955 (("rspec.*") "rspec>)\n"))
2956 #t))
2957 (replace 'check
2958 (lambda* (#:key tests? #:allow-other-keys)
2959 (when tests?
2960 (invoke "rspec" "spec"))
2961 #t)))))
2962 (native-inputs
2963 `(("bundler" ,bundler)
2964 ("ruby-rake" ,ruby-rake)
2965 ("ruby-rspec" ,ruby-rspec)))
2966 (synopsis "MSpec is a specialized framework for RubySpec")
2967 (description
2968 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
2969 for basic features. MSpec contains additional features that assist in writing
2970 specs for Ruby implementations in ruby/spec.")
2971 (home-page "http://rubyspec.org")
2972 (license license:expat)))
2973
2974 (define-public ruby-mysql2
2975 (package
2976 (name "ruby-mysql2")
2977 (version "0.5.2")
2978 (source
2979 (origin
2980 (method git-fetch)
2981 (uri (git-reference
2982 (url "https://github.com/brianmario/mysql2.git")
2983 (commit version)))
2984 (file-name (git-file-name name version))
2985 (sha256
2986 (base32
2987 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
2988 (build-system ruby-build-system)
2989 (arguments
2990 '(;; TODO: Tests require a running MySQL/MariaDB service
2991 #:tests? #f
2992 #:phases
2993 (modify-phases %standard-phases
2994 (replace 'replace-git-ls-files
2995 (lambda _
2996 (substitute* "mysql2.gemspec"
2997 (("git ls-files .*`") "find . -type f |sort`"))
2998 #t))
2999 (add-before 'install 'set-MAKEFLAGS
3000 (lambda* (#:key outputs #:allow-other-keys)
3001 (setenv "MAKEFLAGS"
3002 (string-append
3003 "V=1 "
3004 "prefix=" (assoc-ref outputs "out")))
3005 #t))
3006 ;; Move the 'check phase to after 'install, as then you can test
3007 ;; using the installed mysql2 gem in the store.
3008 (delete 'check)
3009 (add-after 'install 'check
3010 (lambda* (#:key outputs tests? #:allow-other-keys)
3011 (setenv "GEM_PATH"
3012 (string-append
3013 (getenv "GEM_PATH")
3014 ":"
3015 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3016 (when tests?
3017 (invoke "rspec"))
3018 #t)))))
3019 (inputs
3020 `(("mariadb" ,mariadb "lib")
3021 ("mariadb-dev" ,mariadb "dev")
3022 ("zlib" ,zlib)))
3023 (native-inputs
3024 `(("ruby-rspec" ,ruby-rspec)
3025 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3026 (synopsis "MySQL library for Ruby, binding to libmysql")
3027 (description
3028 "This package provides a simple, fast MySQL library for Ruby, binding to
3029 libmysql.")
3030 (home-page "https://github.com/brianmario/mysql2")
3031 (license license:expat)))
3032
3033 (define-public ruby-blankslate
3034 (package
3035 (name "ruby-blankslate")
3036 (version "3.1.3")
3037 (source (origin
3038 (method url-fetch)
3039 (uri (rubygems-uri "blankslate" version))
3040 (sha256
3041 (base32
3042 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3043 (build-system ruby-build-system)
3044 (arguments
3045 `(#:phases
3046 (modify-phases %standard-phases
3047 (replace 'check
3048 (lambda _ (invoke "rspec" "spec/"))))))
3049 (native-inputs
3050 `(("bundler" ,bundler)
3051 ("ruby-rspec" ,ruby-rspec)))
3052 (synopsis "Abstract base class with no predefined methods")
3053 (description
3054 "BlankSlate provides an abstract base class with no predefined
3055 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3056 as a base class when writing classes that depend upon
3057 @code{method_missing} (e.g. dynamic proxies).")
3058 (home-page "https://github.com/masover/blankslate")
3059 (license license:expat)))
3060
3061 (define-public ruby-bond
3062 (package
3063 (name "ruby-bond")
3064 (version "0.5.1")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (rubygems-uri "bond" version))
3069 (sha256
3070 (base32
3071 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3072 (build-system ruby-build-system)
3073 (native-inputs
3074 `(("ruby-bacon" ,ruby-bacon)
3075 ("ruby-bacon-bits" ,ruby-bacon-bits)
3076 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3077 (synopsis "Bond can provide custom autocompletion for arguments, methods
3078 and more")
3079 (description
3080 "Bond can autocomplete argument(s) to methods, uniquely completing per
3081 module, per method and per argument. Bond provides a configuration system and
3082 a DSL for creating custom completions and completion rules. Bond can also
3083 load completions that ship with gems. Bond is able to offer more than irb's
3084 completion since it uses the full line of input when completing as opposed to
3085 irb's last-word approach.")
3086 (home-page "http://tagaholic.me/bond/")
3087 (license license:expat)))
3088
3089 (define-public ruby-idn-ruby
3090 (package
3091 (name "ruby-idn-ruby")
3092 (version "0.1.0")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (rubygems-uri "idn-ruby" version))
3097 (sha256
3098 (base32
3099 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3100 (build-system ruby-build-system)
3101 (arguments
3102 '(#:phases
3103 (modify-phases %standard-phases
3104 (delete 'check)
3105 (add-after 'install 'check
3106 (lambda* (#:key tests? outputs #:allow-other-keys)
3107 (when tests?
3108 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3109 (name-and-version (basename gem-file ".gem")))
3110 (apply invoke
3111 "ruby" "--verbose"
3112 (string-append "-I"
3113 (assoc-ref outputs "out")
3114 "/lib/ruby/vendor_ruby/gems/"
3115 name-and-version
3116 "/lib")
3117 (find-files "./test" ".*\\.rb"))))
3118 #t)))))
3119 (inputs
3120 `(("libidn" ,libidn)))
3121 (synopsis "Ruby Bindings for the GNU LibIDN library")
3122 (description
3123 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3124 Stringprep, Punycode and IDNA specifications. These are used to encode and
3125 decode internationalized domain + names according to the IDNA2003
3126 specifications.
3127
3128 Included are the most important parts of the Stringprep, Punycode and IDNA
3129 APIs like performing Stringprep processings, encoding to and decoding from
3130 Punycode strings and converting entire domain names to and from the ACE
3131 encoded form.")
3132 (home-page "https://github.com/deepfryed/idn-ruby")
3133 (license license:asl2.0)))
3134
3135 (define-public ruby-instantiator
3136 (package
3137 (name "ruby-instantiator")
3138 (version "0.0.7")
3139 (source (origin
3140 (method url-fetch)
3141 (uri (rubygems-uri "instantiator" version))
3142 (sha256
3143 (base32
3144 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
3145 (build-system ruby-build-system)
3146 (arguments
3147 `(#:phases
3148 (modify-phases %standard-phases
3149 (add-after 'unpack 'add-test-unit-to-search-path
3150 (lambda* (#:key inputs #:allow-other-keys)
3151 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3152 (substitute* "Rakefile"
3153 (("t\\.libs << \"test\"" line)
3154 (string-append line "; t.libs << \""
3155 test-unit "/lib/ruby/vendor_ruby"
3156 "/gems/test-unit-"
3157 ,(package-version ruby-test-unit)
3158 "/lib\""))))
3159 #t)))))
3160 (propagated-inputs
3161 `(("ruby-blankslate" ,ruby-blankslate)))
3162 (native-inputs
3163 `(("bundler" ,bundler)
3164 ("ruby-test-unit" ,ruby-test-unit)))
3165 (synopsis "Instantiate an arbitrary Ruby class")
3166 (description
3167 "Instantiator lets you instantiate an arbitrary Ruby class without
3168 knowing anything about the constructor.")
3169 (home-page "https://github.com/floehopper/instantiator")
3170 (license license:expat)))
3171
3172 (define-public ruby-introspection
3173 (package
3174 (name "ruby-introspection")
3175 (version "0.0.4")
3176 (source (origin
3177 (method url-fetch)
3178 (uri (rubygems-uri "introspection" version))
3179 (sha256
3180 (base32
3181 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
3182 (build-system ruby-build-system)
3183 (arguments
3184 `(#:phases
3185 (modify-phases %standard-phases
3186 (add-after 'unpack 'add-test-unit-to-search-path
3187 (lambda* (#:key inputs #:allow-other-keys)
3188 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3189 (substitute* "Rakefile"
3190 (("t\\.libs << \"test\"" line)
3191 (string-append line "; t.libs << \""
3192 test-unit "/lib/ruby/vendor_ruby"
3193 "/gems/test-unit-"
3194 ,(package-version ruby-test-unit)
3195 "/lib\""))))
3196 #t)))))
3197 (propagated-inputs
3198 `(("ruby-instantiator" ,ruby-instantiator)
3199 ("ruby-metaclass" ,ruby-metaclass)))
3200 (native-inputs
3201 `(("bundler" ,bundler)
3202 ("ruby-blankslate" ,ruby-blankslate)
3203 ("ruby-test-unit" ,ruby-test-unit)))
3204 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3205 (description
3206 "Introspection provides tools to inspect the hierarchy of method
3207 definitions on a Ruby object.")
3208 (home-page "https://github.com/floehopper/introspection")
3209 (license license:expat)))
3210
3211 (define-public ruby-redcarpet
3212 (package
3213 (name "ruby-redcarpet")
3214 (version "3.5.0")
3215 (source (origin
3216 (method url-fetch)
3217 (uri (rubygems-uri "redcarpet" version))
3218 (sha256
3219 (base32
3220 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
3221 (build-system ruby-build-system)
3222 (arguments
3223 `(#:phases
3224 (modify-phases %standard-phases
3225 ;; The gem archive does not include the conformance tests.
3226 (add-after 'unpack 'disable-conformance-tests
3227 (lambda _
3228 (substitute* "Rakefile"
3229 (("task :test => %w\\[test:unit test:conformance\\]")
3230 "task :test => %w[test:unit]"))
3231 #t)))))
3232 (native-inputs
3233 `(("bundler" ,bundler)
3234 ("ruby-test-unit" ,ruby-test-unit)
3235 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3236 (synopsis "Extensible Markdown to (X)HTML converter")
3237 (description
3238 "Redcarpet is an extensible Ruby library for Markdown processing and
3239 conversion to (X)HTML.")
3240 (home-page "https://github.com/vmg/redcarpet")
3241 (license license:expat)))
3242
3243 (define-public ruby-rerun
3244 (package
3245 (name "ruby-rerun")
3246 (version "0.13.0")
3247 (source
3248 (origin
3249 (method url-fetch)
3250 (uri (rubygems-uri "rerun" version))
3251 (sha256
3252 (base32
3253 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
3254 (build-system ruby-build-system)
3255 (arguments
3256 '(#:tests? #f)) ; No included tests
3257 (propagated-inputs
3258 `(("ruby-listen" ,ruby-listen)))
3259 (synopsis "Run a process, and restart when some monitored files change")
3260 (description
3261 "Rerun is a tool to launch programs, then monitor the file system, and
3262 restart the program when any of the monitored files change. It's written in
3263 Ruby, but can be used for all programs.")
3264 (home-page "https://github.com/alexch/rerun/")
3265 (license license:expat)))
3266
3267 (define-public ruby-maxitest
3268 (package
3269 (name "ruby-maxitest")
3270 (version "3.6.0")
3271 (home-page "https://github.com/grosser/maxitest")
3272 (source (origin
3273 ;; Pull from git because the gem does not contain tests.
3274 (method git-fetch)
3275 (uri (git-reference
3276 (url home-page)
3277 (commit (string-append "v" version))))
3278 (file-name (git-file-name name version))
3279 (sha256
3280 (base32
3281 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
3282 (build-system ruby-build-system)
3283 (arguments
3284 '(#:test-target "default"
3285 #:phases (modify-phases %standard-phases
3286 (replace 'replace-git-ls-files
3287 (lambda _
3288 (substitute* "maxitest.gemspec"
3289 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
3290 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
3291 #t))
3292 (add-before 'check 'remove-version-constraints
3293 (lambda _
3294 ;; Don't use specific versions of dependencies, instead
3295 ;; take whatever is available in Guix.
3296 (delete-file "Gemfile.lock")
3297 #t))
3298 (add-before 'check 'add-mtest-on-PATH
3299 (lambda _
3300 ;; Tests use 'mtest' which is not automatically added on
3301 ;; PATH.
3302 (setenv "PATH" (string-append (getcwd) "/bin:"
3303 (getenv "PATH")))
3304 #t)))))
3305 (native-inputs
3306 `(("ps" ,procps)
3307 ("ruby-bump" ,ruby-bump)
3308 ("ruby-byebug" ,ruby-byebug)
3309 ("ruby-rspec" ,ruby-rspec)
3310 ("ruby-wwtd" ,ruby-wwtd)))
3311 (propagated-inputs
3312 `(("ruby-minitest" ,ruby-minitest)))
3313 (synopsis "Minitest with extra features")
3314 (description
3315 "Maxitest is a wrapper around Minitest with extra functionality such
3316 as timeouts, an @command{mtest} executable that can run tests by line
3317 number, support for interrupted tests, better backtraces, and more.")
3318 (license license:expat)))
3319
3320 (define-public ruby-mocha
3321 (package
3322 (name "ruby-mocha")
3323 (version "1.11.2")
3324 (source (origin
3325 (method url-fetch)
3326 (uri (rubygems-uri "mocha" version))
3327 (sha256
3328 (base32
3329 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
3330 (build-system ruby-build-system)
3331 (arguments
3332 `(#:phases
3333 (modify-phases %standard-phases
3334 (add-before 'check 'remove-rubocop-dependency
3335 (lambda _
3336 ;; Disable dependency on Rubocop, which is just a linter,
3337 ;; and would introduce a circular dependency.
3338 (substitute* "mocha.gemspec"
3339 ((".*rubocop.*")
3340 "true\n"))
3341 #t)))))
3342 (native-inputs
3343 `(("ruby-introspection" ,ruby-introspection)))
3344 (synopsis "Mocking and stubbing library for Ruby")
3345 (description
3346 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
3347 allows mocking and stubbing of methods on real (non-mock) classes.")
3348 (home-page "http://gofreerange.com/mocha/docs")
3349 ;; Mocha can be used with either license at the users choice.
3350 (license (list license:expat license:ruby))))
3351
3352 (define-public ruby-mocha-on-bacon
3353 (package
3354 (name "ruby-mocha-on-bacon")
3355 (version "0.2.3")
3356 (source
3357 (origin
3358 (method url-fetch)
3359 (uri (rubygems-uri "mocha-on-bacon" version))
3360 (sha256
3361 (base32
3362 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
3363 (build-system ruby-build-system)
3364 (arguments
3365 ;; rubygems.org release missing tests
3366 '(#:tests? #f))
3367 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
3368 (synopsis "Mocha adapter for Bacon")
3369 (description
3370 "This package provides a Mocha adapter for Bacon, allowing you to use the
3371 Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
3372 (home-page
3373 "https://github.com/alloy/mocha-on-bacon")
3374 (license license:expat)))
3375
3376 (define-public ruby-net-ssh
3377 (package
3378 (name "ruby-net-ssh")
3379 (version "4.2.0")
3380 (source (origin
3381 (method url-fetch)
3382 (uri (rubygems-uri "net-ssh" version))
3383 (sha256
3384 (base32
3385 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
3386 (build-system ruby-build-system)
3387 (native-inputs
3388 `(("bundler" ,bundler)
3389 ("ruby-mocha" ,ruby-mocha)
3390 ("ruby-test-unit" ,ruby-test-unit)))
3391 (synopsis "Ruby implementation of the SSH2 client protocol")
3392 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
3393 client protocol. It allows you to write programs that invoke and interact
3394 with processes on remote servers, via SSH2.")
3395 (home-page "https://github.com/net-ssh/net-ssh")
3396 (license license:expat)))
3397
3398 (define-public ruby-net-scp
3399 (package
3400 (name "ruby-net-scp")
3401 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
3402 (version "1.2.2.rc2")
3403 (source
3404 (origin
3405 (method git-fetch)
3406 (uri (git-reference
3407 (url "https://github.com/net-ssh/net-scp.git")
3408 (commit (string-append "v" version))))
3409 (file-name (git-file-name name version))
3410 (sha256
3411 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
3412 (build-system ruby-build-system)
3413 (native-inputs
3414 `(("bundler" ,bundler)
3415 ("ruby-test-unit" ,ruby-test-unit)
3416 ("ruby-mocha" ,ruby-mocha)))
3417 (propagated-inputs
3418 `(("ruby-net-ssh" ,ruby-net-ssh)))
3419 (synopsis "Pure-Ruby SCP client library")
3420 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
3421 client protocol.")
3422 (home-page "https://github.com/net-ssh/net-scp")
3423 (license license:expat)))
3424
3425 (define-public ruby-minitest
3426 (package
3427 (name "ruby-minitest")
3428 (version "5.11.3")
3429 (source (origin
3430 (method url-fetch)
3431 (uri (rubygems-uri "minitest" version))
3432 (sha256
3433 (base32
3434 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
3435 (build-system ruby-build-system)
3436 (native-inputs
3437 `(("ruby-hoe" ,ruby-hoe)))
3438 (synopsis "Small test suite library for Ruby")
3439 (description "Minitest provides a complete suite of Ruby testing
3440 facilities supporting TDD, BDD, mocking, and benchmarking.")
3441 (home-page "https://github.com/seattlerb/minitest")
3442 (license license:expat)))
3443
3444 ;; This is the last release of Minitest 4, which is used by some packages.
3445 (define-public ruby-minitest-4
3446 (package (inherit ruby-minitest)
3447 (version "4.7.5")
3448 (source (origin
3449 (method url-fetch)
3450 (uri (rubygems-uri "minitest" version))
3451 (sha256
3452 (base32
3453 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
3454 (arguments
3455 `(#:phases
3456 (modify-phases %standard-phases
3457 (add-after 'unpack 'remove-unsupported-method
3458 (lambda _
3459 (substitute* "Rakefile"
3460 (("self\\.rubyforge_name = .*") ""))
3461 #t))
3462 (add-after 'build 'exclude-failing-tests
3463 (lambda _
3464 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
3465 ;; Fixnum.
3466 (delete-file "test/minitest/test_minitest_spec.rb")
3467 #t)))))))
3468
3469 (define-public ruby-minitest-around
3470 (package
3471 (name "ruby-minitest-around")
3472 (version "0.5.0")
3473 (source
3474 (origin
3475 (method url-fetch)
3476 (uri (rubygems-uri "minitest-around" version))
3477 (sha256
3478 (base32
3479 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
3480 (build-system ruby-build-system)
3481 (arguments
3482 '(#:phases
3483 (modify-phases %standard-phases
3484 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
3485 (lambda _
3486 (substitute* "minitest-around.gemspec"
3487 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
3488 #t)))))
3489 (propagated-inputs
3490 `(("ruby-minitest" ,ruby-minitest)))
3491 (native-inputs
3492 `(("bundler" ,bundler)
3493 ("ruby-cucumber" ,ruby-cucumber)
3494 ("ruby-bump" ,ruby-bump)
3495 ("ruby-test-construct" ,ruby-test-construct)))
3496 (synopsis "Run code around tests in Minitest")
3497 (description
3498 "This library provides a way to run code around tests in Minitest,
3499 written using either the unit test or spec style.")
3500 (home-page "https://github.com/splattael/minitest-around")
3501 (license license:expat)))
3502
3503 (define-public ruby-minitest-sprint
3504 (package
3505 (name "ruby-minitest-sprint")
3506 (version "1.1.0")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (rubygems-uri "minitest-sprint" version))
3510 (sha256
3511 (base32
3512 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
3513 (build-system ruby-build-system)
3514 (native-inputs
3515 `(("ruby-hoe" ,ruby-hoe)
3516 ("ruby-minitest" ,ruby-minitest)))
3517 (synopsis "Fast test suite runner for minitest")
3518 (description "Minitest-sprint is a test runner for minitest that makes it
3519 easier to re-run individual failing tests.")
3520 (home-page "https://github.com/seattlerb/minitest-sprint")
3521 (license license:expat)))
3522
3523 (define-public ruby-minitest-bacon
3524 (package
3525 (name "ruby-minitest-bacon")
3526 (version "1.0.3")
3527 (source (origin
3528 (method url-fetch)
3529 (uri (rubygems-uri "minitest-bacon" version))
3530 (sha256
3531 (base32
3532 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
3533 (build-system ruby-build-system)
3534 (native-inputs
3535 `(("ruby-hoe" ,ruby-hoe)))
3536 (inputs
3537 `(("ruby-minitest" ,ruby-minitest)))
3538 (synopsis "Bacon compatibility library for minitest")
3539 (description "Minitest-bacon extends minitest with bacon-like
3540 functionality, making it easier to migrate test suites from bacon to minitest.")
3541 (home-page "https://github.com/seattlerb/minitest-bacon")
3542 (license license:expat)))
3543
3544 (define-public ruby-minitest-focus
3545 (package
3546 (name "ruby-minitest-focus")
3547 (version "1.1.2")
3548 (source
3549 (origin
3550 (method url-fetch)
3551 (uri (rubygems-uri "minitest-focus" version))
3552 (sha256
3553 (base32
3554 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
3555 (build-system ruby-build-system)
3556 (propagated-inputs
3557 `(("ruby-minitest" ,ruby-minitest)))
3558 (native-inputs
3559 `(("ruby-hoe" ,ruby-hoe)))
3560 (synopsis "Allows a few specific tests to be focused on")
3561 (description
3562 "@code{minitest-focus} gives the ability focus on a few tests with ease
3563 without having to use command-line arguments. It introduces a @code{focus}
3564 class method for use in testing classes, specifying that the next defined test
3565 is to be run.")
3566 (home-page "https://github.com/seattlerb/minitest-focus")
3567 (license license:expat)))
3568
3569 (define-public ruby-minitest-pretty-diff
3570 ;; Use git reference because gem is out of date and does not contain testing
3571 ;; script. There are no releases on GitHub.
3572 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
3573 (package
3574 (name "ruby-minitest-pretty-diff")
3575 (version (string-append "0.1-1." (string-take commit 8)))
3576 (source (origin
3577 (method git-fetch)
3578 (uri (git-reference
3579 (url "https://github.com/adammck/minitest-pretty_diff.git")
3580 (commit commit)))
3581 (file-name (string-append name "-" version "-checkout"))
3582 (sha256
3583 (base32
3584 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
3585 (build-system ruby-build-system)
3586 (arguments
3587 `(#:phases
3588 (modify-phases %standard-phases
3589 (replace 'check
3590 (lambda _
3591 (invoke "script/test"))))))
3592 (native-inputs
3593 `(("bundler" ,bundler)
3594 ("ruby-turn" ,ruby-turn)))
3595 (synopsis "Pretty-print hashes and arrays in MiniTest")
3596 (description
3597 "@code{minitest-pretty_diff} monkey-patches
3598 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
3599 diffing them. This makes it easier to spot differences between nested
3600 structures when tests fail.")
3601 (home-page "https://github.com/adammck/minitest-pretty_diff")
3602 (license license:expat))))
3603
3604 (define-public ruby-minitest-moar
3605 (package
3606 (name "ruby-minitest-moar")
3607 (version "0.0.4")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (rubygems-uri "minitest-moar" version))
3612 (sha256
3613 (base32
3614 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
3615 (build-system ruby-build-system)
3616 (arguments
3617 `(#:phases
3618 (modify-phases %standard-phases
3619 (add-before 'check 'clean-dependencies
3620 (lambda _
3621 ;; Remove all gems defined in the Gemfile because these are not
3622 ;; truly needed.
3623 (substitute* "Gemfile"
3624 (("gem .*") ""))
3625 ;; Remove byebug as not needed to run tests.
3626 (substitute* "test/test_helper.rb"
3627 (("require 'byebug'") ""))
3628 #t)))))
3629 (native-inputs
3630 `(("bundler" ,bundler)
3631 ("ruby-minitest" ,ruby-minitest)))
3632 (synopsis "Extra features and changes to MiniTest")
3633 (description "@code{MiniTest Moar} add some additional features and
3634 changes some default behaviours in MiniTest. For instance, Moar replaces the
3635 MiniTest @code{Object#stub} with a global @code{stub} method.")
3636 (home-page "https://github.com/dockyard/minitest-moar")
3637 (license license:expat)))
3638
3639 (define-public ruby-minitest-bonus-assertions
3640 (package
3641 (name "ruby-minitest-bonus-assertions")
3642 (version "3.0")
3643 (source
3644 (origin
3645 (method url-fetch)
3646 (uri (rubygems-uri "minitest-bonus-assertions" version))
3647 (sha256
3648 (base32
3649 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
3650 (build-system ruby-build-system)
3651 (arguments
3652 `(#:phases
3653 (modify-phases %standard-phases
3654 (add-before 'check 'clean-dependencies
3655 (lambda _
3656 ;; Remove unneeded require statement that would entail another
3657 ;; dependency.
3658 (substitute* "test/minitest_config.rb"
3659 (("require 'minitest/bisect'") ""))
3660 #t)))))
3661 (native-inputs
3662 `(("ruby-hoe" ,ruby-hoe)
3663 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
3664 ("ruby-minitest-focus" ,ruby-minitest-focus)
3665 ("ruby-minitest-moar" ,ruby-minitest-moar)))
3666 (synopsis "Bonus assertions for @code{Minitest}")
3667 (description
3668 "Minitest bonus assertions provides extra MiniTest assertions. For
3669 instance, it provides @code{assert_true}, @code{assert_false} and
3670 @code{assert_set_equal}.")
3671 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
3672 (license license:expat)))
3673
3674 (define-public ruby-minitest-reporters
3675 (package
3676 (name "ruby-minitest-reporters")
3677 (version "1.3.6")
3678 (source
3679 (origin
3680 (method url-fetch)
3681 (uri (rubygems-uri "minitest-reporters" version))
3682 (sha256
3683 (base32
3684 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
3685 (build-system ruby-build-system)
3686 (arguments
3687 '(#:phases
3688 (modify-phases %standard-phases
3689 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
3690 ;; including it as an input can lead to circular dependencies.
3691 (add-after 'unpack 'remove-rubocop-from-Rakefile
3692 (lambda _
3693 (substitute* "Rakefile"
3694 (("require 'rubocop/rake\\_task'") "")
3695 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
3696 #t))
3697 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
3698 (lambda _
3699 (substitute* "minitest-reporters.gemspec"
3700 ((".*%q<rubocop>.*") "\n"))
3701 #t)))))
3702 (propagated-inputs
3703 `(("ruby-ansi" ,ruby-ansi)
3704 ("ruby-builder" ,ruby-builder)
3705 ("ruby-minitest" ,ruby-minitest)
3706 ("ruby-progressbar" ,ruby-progressbar)))
3707 (native-inputs
3708 `(("bundler" ,bundler)
3709 ("ruby-maruku" ,ruby-maruku)))
3710 (synopsis "Enhanced reporting for Minitest tests")
3711 (description
3712 "@code{minitest/reporters} provides a custom Minitest runner to improve
3713 how the test state is reported. A number of different reporters are
3714 available, including a spec reporter, progress bar reporter, a HTML
3715 reporter.")
3716 (home-page "https://github.com/kern/minitest-reporters")
3717 (license license:expat)))
3718
3719 (define-public ruby-minitest-rg
3720 (package
3721 (name "ruby-minitest-rg")
3722 (version "5.2.0")
3723 (source
3724 (origin
3725 (method url-fetch)
3726 (uri (rubygems-uri "minitest-rg" version))
3727 (sha256
3728 (base32
3729 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
3730 (build-system ruby-build-system)
3731 (arguments
3732 ;; Some tests fail even outside Guix, so disable tests.
3733 ;; https://github.com/blowmage/minitest-rg/issues/12
3734 ;; https://github.com/blowmage/minitest-rg/pull/13
3735 `(#:tests? #f))
3736 (propagated-inputs
3737 `(("ruby-minitest" ,ruby-minitest)))
3738 (synopsis "Coloured output for Minitest")
3739 (description
3740 "@code{minitest-rg} changes the colour of the output from Minitest.")
3741 (home-page "https://blowmage.com/minitest-rg/")
3742 (license license:expat)))
3743
3744 (define-public ruby-minitest-hooks
3745 (package
3746 (name "ruby-minitest-hooks")
3747 (version "1.4.2")
3748 (source
3749 (origin
3750 (method url-fetch)
3751 (uri (rubygems-uri "minitest-hooks" version))
3752 (sha256
3753 (base32
3754 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
3755 (build-system ruby-build-system)
3756 (arguments
3757 '(#:test-target "spec"))
3758 (native-inputs
3759 `(("ruby-sequel" ,ruby-sequel)
3760 ("ruby-sqlite3" ,ruby-sqlite3)))
3761 (synopsis "Hooks for the minitest framework")
3762 (description
3763 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
3764 @code{around_all} hooks for Minitest. This allows, for instance, running each
3765 suite of specs inside a database transaction, running each spec inside its own
3766 savepoint inside that transaction. This can significantly speed up testing
3767 for specs that share expensive database setup code.")
3768 (home-page "https://github.com/jeremyevans/minitest-hooks")
3769 (license license:expat)))
3770
3771 (define-public ruby-daemons
3772 (package
3773 (name "ruby-daemons")
3774 (version "1.2.5")
3775 (source (origin
3776 (method url-fetch)
3777 (uri (rubygems-uri "daemons" version))
3778 (sha256
3779 (base32
3780 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
3781 (build-system ruby-build-system)
3782 (arguments
3783 `(#:tests? #f)) ; no test suite
3784 (synopsis "Daemonize Ruby programs")
3785 (description "Daemons provides a way to wrap existing Ruby scripts to be
3786 run as a daemon and to be controlled by simple start/stop/restart commands.")
3787 (home-page "https://github.com/thuehlinger/daemons")
3788 (license license:expat)))
3789
3790 (define-public ruby-data_uri
3791 (package
3792 (name "ruby-data_uri")
3793 (version "0.1.0")
3794 (source
3795 (origin
3796 (method url-fetch)
3797 (uri (rubygems-uri "data_uri" version))
3798 (sha256
3799 (base32
3800 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
3801 (build-system ruby-build-system)
3802 (synopsis "URI class for parsing data URIs")
3803 (description
3804 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
3805 embedded inside a URI. The URI::Data class provides support for parsing these
3806 URIs using the normal URI.parse method.")
3807 (home-page "https://github.com/dball/data_uri")
3808 (license license:expat)))
3809
3810 (define-public ruby-deep-merge
3811 (package
3812 (name "ruby-deep-merge")
3813 (version "1.2.1")
3814 (home-page "https://github.com/danielsdeleo/deep_merge")
3815 ;; The Rubygem source does not contain the gemspec required for tests.
3816 (source (origin
3817 (method git-fetch)
3818 (uri (git-reference (url home-page) (commit version)))
3819 (file-name (git-file-name name version))
3820 (sha256
3821 (base32
3822 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
3823 (build-system ruby-build-system)
3824 (native-inputs
3825 `(("ruby-minitest" ,ruby-minitest)))
3826 (synopsis "Recursively merge hashes")
3827 (description
3828 "Deep Merge is a set of utility functions for @code{Hash}. It permits
3829 you to merge elements inside a hash together recursively.")
3830 (license license:expat)))
3831
3832 (define-public ruby-git
3833 (package
3834 (name "ruby-git")
3835 (version "1.3.0")
3836 (source (origin
3837 (method url-fetch)
3838 (uri (rubygems-uri "git" version))
3839 (sha256
3840 (base32
3841 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
3842 (build-system ruby-build-system)
3843 (arguments
3844 `(#:tests? #f ; no tests
3845 #:phases (modify-phases %standard-phases
3846 (add-after 'install 'patch-git-binary
3847 (lambda* (#:key inputs outputs #:allow-other-keys)
3848 ;; Make the default git binary an absolute path to the
3849 ;; store.
3850 (let ((git (string-append (assoc-ref inputs "git")
3851 "/bin/git"))
3852 (config (string-append
3853 (assoc-ref outputs "out")
3854 "/lib/ruby/vendor_ruby/gems/git-"
3855 ,version "/lib/git/config.rb")))
3856 (substitute* (list config)
3857 (("'git'")
3858 (string-append "'" git "'")))
3859 #t))))))
3860 (inputs
3861 `(("git" ,git)))
3862 (synopsis "Ruby wrappers for Git")
3863 (description "Ruby/Git is a Ruby library that can be used to create, read
3864 and manipulate Git repositories by wrapping system calls to the git binary.")
3865 (home-page "https://github.com/schacon/ruby-git")
3866 (license license:expat)))
3867
3868 (define-public ruby-hocon
3869 (package
3870 (name "ruby-hocon")
3871 (version "1.3.1")
3872 (home-page "https://github.com/puppetlabs/ruby-hocon")
3873 (source (origin
3874 (method git-fetch)
3875 (uri (git-reference (url home-page) (commit version)))
3876 (file-name (git-file-name name version))
3877 (sha256
3878 (base32
3879 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
3880 (build-system ruby-build-system)
3881 (arguments
3882 '(#:phases (modify-phases %standard-phases
3883 (replace 'check
3884 (lambda* (#:key tests? #:allow-other-keys)
3885 (if tests?
3886 (invoke "rspec")
3887 (format #t "test suite not run~%"))
3888 #t)))))
3889 (native-inputs
3890 `(("bundler" ,bundler)
3891 ("ruby-rspec" ,ruby-rspec)))
3892 (synopsis "HOCON config library")
3893 (description
3894 "This package provides Ruby support for the @acronym{HOCON,
3895 Human-Optimized Config Object Notation} configuration file format. It
3896 supports parsing and modifying HOCON and JSON files, and rendering parsed
3897 objects back to a @code{String}.")
3898 (license license:asl2.0)))
3899
3900 (define-public ruby-slop
3901 (package
3902 (name "ruby-slop")
3903 (version "4.5.0")
3904 (source (origin
3905 (method url-fetch)
3906 (uri (rubygems-uri "slop" version))
3907 (sha256
3908 (base32
3909 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
3910 (build-system ruby-build-system)
3911 (native-inputs
3912 `(("ruby-minitest" ,ruby-minitest)))
3913 (synopsis "Ruby command line option parser")
3914 (description "Slop provides a Ruby domain specific language for gathering
3915 options and parsing command line flags.")
3916 (home-page "https://github.com/leejarvis/slop")
3917 (license license:expat)))
3918
3919 (define-public ruby-slop-3
3920 (package (inherit ruby-slop)
3921 (version "3.6.0")
3922 (source (origin
3923 (method url-fetch)
3924 (uri (rubygems-uri "slop" version))
3925 (sha256
3926 (base32
3927 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
3928
3929 (define-public ruby-multi-xml
3930 (package
3931 (name "ruby-multi-xml")
3932 (version "0.6.0")
3933 (source
3934 (origin
3935 (method url-fetch)
3936 (uri (rubygems-uri "multi_xml" version))
3937 (sha256
3938 (base32
3939 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
3940 (build-system ruby-build-system)
3941 (arguments
3942 '(#:tests? #f)) ; No included tests
3943 (synopsis "Swappable XML backends for Ruby")
3944 (description
3945 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
3946 Nokogiri, Ox, or REXML.")
3947 (home-page "https://github.com/sferik/multi_xml")
3948 (license license:expat)))
3949
3950 (define-public ruby-multipart-post
3951 (package
3952 (name "ruby-multipart-post")
3953 (version "2.0.0")
3954 (source (origin
3955 (method url-fetch)
3956 (uri (rubygems-uri "multipart-post" version))
3957 (sha256
3958 (base32
3959 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
3960 (build-system ruby-build-system)
3961 (native-inputs
3962 `(("bundler" ,bundler)))
3963 (synopsis "Multipart POST library for Ruby")
3964 (description "Multipart-Post Adds multipart POST capability to Ruby's
3965 net/http library.")
3966 (home-page "https://github.com/nicksieger/multipart-post")
3967 (license license:expat)))
3968
3969 (define-public ruby-multi-json
3970 (package
3971 (name "ruby-multi-json")
3972 (version "1.13.1")
3973 (source
3974 (origin
3975 (method git-fetch)
3976 ;; Tests are not distributed at rubygems.org so download from GitHub
3977 ;; instead.
3978 (uri (git-reference
3979 (url "https://github.com/intridea/multi_json")
3980 (commit (string-append "v" version))))
3981 (file-name (git-file-name name version))
3982 (sha256
3983 (base32
3984 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
3985 (build-system ruby-build-system)
3986 (arguments
3987 `(#:phases
3988 (modify-phases %standard-phases
3989 (add-after 'unpack 'remove-signing-key-reference
3990 (lambda _
3991 (substitute* "multi_json.gemspec"
3992 ((".*spec.signing_key.*") ""))
3993 #t)))))
3994 (native-inputs
3995 `(("bundler" ,bundler)
3996 ("ruby-rspec" ,ruby-rspec)
3997 ("ruby-yard" ,ruby-yard)
3998 ("ruby-json-pure" ,ruby-json-pure)
3999 ("ruby-oj" ,ruby-oj)
4000 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
4001 (synopsis "Common interface to multiple JSON libraries for Ruby")
4002 (description
4003 "This package provides a common interface to multiple JSON libraries,
4004 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4005 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
4006 (home-page "https://github.com/intridea/multi_json")
4007 (license license:expat)))
4008
4009 (define-public ruby-multi-test
4010 (package
4011 (name "ruby-multi-test")
4012 (version "0.1.2")
4013 (source
4014 (origin
4015 (method url-fetch)
4016 (uri (rubygems-uri "multi_test" version))
4017 (sha256
4018 (base32
4019 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4020 (build-system ruby-build-system)
4021 (arguments
4022 '(;; Tests require different sets of specific gem versions to be available,
4023 ;; and there is no gemfile that specifies the newest versions of
4024 ;; dependencies to be tested.
4025 #:tests? #f))
4026 (synopsis
4027 "Interface to testing libraries loaded into a running Ruby process")
4028 (description
4029 "@code{multi_test} provides a uniform interface onto whatever testing
4030 libraries that have been loaded into a running Ruby process to help control
4031 rogue test/unit/autorun requires.")
4032 (home-page "https://github.com/cucumber/multi_test")
4033 (license license:expat)))
4034
4035 (define-public ruby-arel
4036 (package
4037 (name "ruby-arel")
4038 (version "9.0.0")
4039 (source (origin
4040 (method url-fetch)
4041 (uri (rubygems-uri "arel" version))
4042 (sha256
4043 (base32
4044 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
4045 (build-system ruby-build-system)
4046 (arguments '(#:tests? #f)) ; no tests
4047 (home-page "https://github.com/rails/arel")
4048 (synopsis "SQL AST manager for Ruby")
4049 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4050 Ruby. It simplifies the generation of complex SQL queries and adapts to
4051 various relational database implementations.")
4052 (license license:expat)))
4053
4054 (define-public ruby-marcel
4055 (package
4056 (name "ruby-marcel")
4057 (version "0.3.3")
4058 (source
4059 (origin
4060 (method url-fetch)
4061 (uri (rubygems-uri "marcel" version))
4062 (sha256
4063 (base32
4064 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4065 (build-system ruby-build-system)
4066 (arguments
4067 '(;; No included tests
4068 #:tests? #f))
4069 (propagated-inputs
4070 `(("ruby-mimemagic" ,ruby-mimemagic)))
4071 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4072 (description
4073 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4074 Extensions} type detection using magic numbers, filenames, and extensions")
4075 (home-page "https://github.com/basecamp/marcel")
4076 (license license:expat)))
4077
4078 (define-public ruby-minitar
4079 ;; We package from the GitHub source to fix the security issue reported at
4080 ;; https://github.com/halostatue/minitar/issues/16.
4081 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4082 (package
4083 (name "ruby-minitar")
4084 (version (string-append "0.5.4-1." (string-take commit 8)))
4085 (source
4086 (origin
4087 (method git-fetch)
4088 (uri (git-reference
4089 (url "https://github.com/halostatue/minitar.git")
4090 (commit commit)))
4091 (file-name (string-append name "-" version "-checkout"))
4092 (sha256
4093 (base32
4094 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4095 (build-system ruby-build-system)
4096 (arguments
4097 '(#:tests? #f)) ; missing a gemspec
4098 (synopsis "Ruby library and utility for handling tar archives")
4099 (description
4100 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
4101 that provides the ability to deal with POSIX tar archive files.")
4102 (home-page "http://www.github.com/atoulme/minitar")
4103 (license (list license:gpl2+ license:ruby)))))
4104
4105 (define-public ruby-mini-portile
4106 (package
4107 (name "ruby-mini-portile")
4108 (version "0.6.2")
4109 (source
4110 (origin
4111 (method url-fetch)
4112 (uri (rubygems-uri "mini_portile" version))
4113 (sha256
4114 (base32
4115 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4116 (build-system ruby-build-system)
4117 (arguments
4118 '(#:tests? #f)) ; tests require network access
4119 (synopsis "Ports system for Ruby developers")
4120 (description "Mini-portile is a port/recipe system for Ruby developers.
4121 It provides a standard way to compile against specific versions of libraries
4122 to reproduce user environments.")
4123 (home-page "https://github.com/flavorjones/mini_portile")
4124 (license license:expat)))
4125
4126 (define-public ruby-mini-portile-2
4127 (package (inherit ruby-mini-portile)
4128 (version "2.4.0")
4129 (source (origin
4130 (method url-fetch)
4131 (uri (rubygems-uri "mini_portile2" version))
4132 (sha256
4133 (base32
4134 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
4135
4136 (define-public ruby-nokogiri
4137 (package
4138 (name "ruby-nokogiri")
4139 (version "1.10.9")
4140 (source (origin
4141 (method url-fetch)
4142 (uri (rubygems-uri "nokogiri" version))
4143 (sha256
4144 (base32
4145 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
4146 (build-system ruby-build-system)
4147 (arguments
4148 ;; Tests fail because Nokogiri can only test with an installed extension,
4149 ;; and also because many test framework dependencies are missing.
4150 `(#:tests? #f
4151 #:gem-flags (list "--" "--use-system-libraries"
4152 (string-append "--with-xml2-include="
4153 (assoc-ref %build-inputs "libxml2")
4154 "/include/libxml2" ))
4155 #:phases
4156 (modify-phases %standard-phases
4157 (add-before 'build 'patch-extconf
4158 ;; 'pkg-config' is not included in the GEM_PATH during
4159 ;; installation, so we add it directly to the load path.
4160 (lambda* (#:key inputs #:allow-other-keys)
4161 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
4162 (substitute* "ext/nokogiri/extconf.rb"
4163 (("gem 'pkg-config'.*")
4164 (string-append "$:.unshift '"
4165 pkg-config "/lib/ruby/vendor_ruby"
4166 "/gems/pkg-config-"
4167 ,(package-version ruby-pkg-config)
4168 "/lib'\n"))))
4169 #t)))))
4170 (native-inputs
4171 `(("ruby-hoe" ,ruby-hoe)))
4172 (inputs
4173 `(("zlib" ,zlib)
4174 ("libxml2" ,libxml2)
4175 ("libxslt" ,libxslt)))
4176 (propagated-inputs
4177 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4178 ("ruby-pkg-config" ,ruby-pkg-config)))
4179 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4180 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4181 both CSS3 selector and XPath 1.0 support.")
4182 (home-page "http://www.nokogiri.org/")
4183 (license license:expat)))
4184
4185 (define-public ruby-method-source
4186 (package
4187 (name "ruby-method-source")
4188 (version "1.0.0")
4189 (source
4190 (origin
4191 (method url-fetch)
4192 (uri (rubygems-uri "method_source" version))
4193 (sha256
4194 (base32
4195 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
4196 (build-system ruby-build-system)
4197 (arguments
4198 `(#:test-target "spec"))
4199 (native-inputs
4200 `(("ruby-rspec" ,ruby-rspec)
4201 ("git" ,git)))
4202 (synopsis "Retrieve the source code for Ruby methods")
4203 (description "Method_source retrieves the source code for Ruby methods.
4204 Additionally, it can extract source code from Proc and Lambda objects or just
4205 extract comments.")
4206 (home-page "https://github.com/banister/method_source")
4207 (license license:expat)))
4208
4209 (define-public ruby-coderay
4210 (package
4211 (name "ruby-coderay")
4212 (version "1.1.2")
4213 (source
4214 (origin
4215 (method url-fetch)
4216 (uri (rubygems-uri "coderay" version))
4217 (sha256
4218 (base32
4219 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
4220 (build-system ruby-build-system)
4221 (arguments
4222 '(#:tests? #f)) ; missing test files
4223 (synopsis "Ruby syntax highlighting library")
4224 (description "Coderay is a Ruby library that provides syntax highlighting
4225 for select languages.")
4226 (home-page "http://coderay.rubychan.de")
4227 (license license:expat)))
4228
4229 (define-public ruby-cuke-modeler
4230 (package
4231 (name "ruby-cuke-modeler")
4232 (version "3.1.0")
4233 (source
4234 (origin
4235 (method url-fetch)
4236 (uri (rubygems-uri "cuke_modeler" version))
4237 (sha256
4238 (base32
4239 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
4240 (build-system ruby-build-system)
4241 (arguments `(#:tests? #f)) ;no test suite in gem
4242 (propagated-inputs
4243 `(("ruby-gherkin" ,ruby-gherkin)))
4244 (synopsis "Gherkin test suite analysis tool")
4245 (description "CukeModeler facilitates modeling a test suite that is
4246 written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
4247 providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
4248 the @code{cucumber-gherkin} generates when parsing features, as well as
4249 providing models for feature files and directories in order to be able to have
4250 a fully traversable model tree of a test suite's structure. These models can
4251 then be analyzed or manipulated more easily than the underlying AST layer.")
4252 (home-page "https://github.com/enkessler/cuke_modeler")
4253 (license license:expat)))
4254
4255 (define-public ruby-parallel-tests
4256 (package
4257 (name "ruby-parallel-tests")
4258 (version "3.0.0")
4259 (home-page "https://github.com/grosser/parallel_tests")
4260 (source (origin
4261 (method git-fetch)
4262 (uri (git-reference
4263 (url home-page)
4264 (commit (string-append "v" version))))
4265 (file-name (string-append name version))
4266 (sha256
4267 (base32
4268 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
4269 (build-system ruby-build-system)
4270 (arguments
4271 '(#:test-target "default"
4272 #:phases (modify-phases %standard-phases
4273 (add-after 'patch-source-shebangs 'patch-shell-invokations
4274 (lambda _
4275 (substitute* '("lib/parallel_tests/tasks.rb"
4276 "spec/parallel_tests/tasks_spec.rb")
4277 (("/bin/sh") (which "sh"))
4278 (("/bin/bash") (which "bash")))
4279 #t))
4280 (add-before 'check 'remove-version-constraints
4281 (lambda _
4282 ;; Remove hard coded version constraints, instead just
4283 ;; use whatever versions are available in Guix.
4284 (delete-file "Gemfile.lock")
4285 (substitute* "Gemfile"
4286 (("'minitest',.*")
4287 "'minitest'\n")
4288 (("'cucumber',.*")
4289 "'cucumber'\n"))
4290 #t))
4291 (add-before 'check 'disable-rails-test
4292 (lambda _
4293 ;; XXX: This test attempts to download and run the test
4294 ;; suites of multiple Rails versions(!) directly.
4295 (delete-file "spec/rails_spec.rb")
4296 #t))
4297 (add-before 'check 'set-HOME
4298 (lambda _
4299 ;; Some tests check the output of Bundler, and fail when
4300 ;; Bundler warns that /homeless-shelter does not exist.
4301 (setenv "HOME" "/tmp")
4302 #t)))))
4303 (native-inputs
4304 `(("ruby-bump" ,ruby-bump)
4305 ("ruby-cucumber" ,ruby-cucumber)
4306 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
4307 ("ruby-minitest" ,ruby-minitest)
4308 ("ruby-rake" ,ruby-rake)
4309 ("ruby-rspec" ,ruby-rspec)
4310 ("ruby-spinach" ,ruby-spinach)))
4311 (propagated-inputs
4312 `(("ruby-parallel" ,ruby-parallel)))
4313 (synopsis "Run tests in parallel")
4314 (description
4315 "This package can speed up @code{Test::Unit}, @code{RSpec},
4316 @code{Cucumber}, and @code{Spinach} tests by running them concurrently
4317 across multiple CPU cores.")
4318 (license license:expat)))
4319
4320 (define-public ruby-parser
4321 (package
4322 (name "ruby-parser")
4323 (version "2.6.0.0")
4324 (source
4325 (origin
4326 (method url-fetch)
4327 (uri (rubygems-uri "parser" version))
4328 (sha256
4329 (base32
4330 "1hhz2k5417vr2k1llwqgjdnmyrhlpqicy0y2arr6r1gp04fg9wlm"))))
4331 (build-system ruby-build-system)
4332 (native-inputs
4333 `(("bundler" ,bundler)
4334 ("ruby-cliver" ,ruby-cliver)
4335 ("ruby-simplecov" ,ruby-simplecov)
4336 ("ruby-racc" ,ruby-racc)))
4337 (inputs
4338 `(("ragel" ,ragel)))
4339 (propagated-inputs
4340 `(("ruby-ast" ,ruby-ast)))
4341 (synopsis "Ruby parser written in pure Ruby")
4342 (description
4343 "This package provides a Ruby parser written in pure Ruby.")
4344 (home-page "https://github.com/whitequark/parser")
4345 (license license:expat)))
4346
4347 (define-public ruby-sexp-processor
4348 (package
4349 (name "ruby-sexp-processor")
4350 (version "4.15.0")
4351 (source
4352 (origin
4353 (method url-fetch)
4354 (uri (rubygems-uri "sexp_processor" version))
4355 (sha256
4356 (base32
4357 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
4358 (build-system ruby-build-system)
4359 (native-inputs
4360 ;; TODO: Add ruby-minitest-proveit once available.
4361 `(("hoe" ,ruby-hoe)))
4362 (synopsis "ParseTree fork which includes generic S-exp processing tools")
4363 (description "The sexp_processor package is derived from ParseTree, but
4364 contrary to ParseTree, it includes all the generic S-exp processing tools.
4365 Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
4366 @code{Environment}")
4367 (home-page "https://github.com/seattlerb/sexp_processor")
4368 (license license:expat)))
4369
4370 (define-public ruby-ruby-parser
4371 (package
4372 (name "ruby-ruby-parser")
4373 (version "3.14.2")
4374 (source
4375 (origin
4376 (method url-fetch)
4377 (uri (rubygems-uri "ruby_parser" version))
4378 (sha256
4379 (base32
4380 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
4381 (build-system ruby-build-system)
4382 (native-inputs
4383 `(("hoe" ,ruby-hoe)
4384 ("racc" ,ruby-racc)
4385 ("unifdef" ,unifdef)))
4386 (propagated-inputs
4387 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
4388 (home-page "https://github.com/seattlerb/ruby_parser/")
4389 (synopsis "Ruby parser written in pure Ruby")
4390 (description "The ruby_parser (RP) package provides a Ruby parser written
4391 in pure Ruby. It outputs S-expressions which can be manipulated and converted
4392 back to Ruby via the @code{ruby2ruby} library.")
4393 (license license:expat)))
4394
4395 (define-public ruby-prawn-manual-builder
4396 (package
4397 (name "ruby-prawn-manual-builder")
4398 (version "0.3.1")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (rubygems-uri "prawn-manual_builder" version))
4403 (sha256
4404 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
4405 (build-system ruby-build-system)
4406 (arguments
4407 '(#:tests? #f ; no included tests
4408 #:phases
4409 (modify-phases %standard-phases
4410 (add-after 'extract-gemspec 'patch-gemspec
4411 (lambda _
4412 (substitute* ".gemspec"
4413 ;; Loosen the requirement for pdf-inspector
4414 (("~> 1\\.0\\.7") ">= 0")))))))
4415 (propagated-inputs
4416 `(("ruby-coderay" ,ruby-coderay)))
4417 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
4418 (description
4419 "This package provides a tool for writing manuals for Prawn and Prawn
4420 accessories")
4421 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
4422 (license (list
4423 ;; GPLv2 or GPLv3 or custom license described in LICENSE file
4424 license:gpl2
4425 license:gpl3))))
4426
4427 (define-public ruby-progress_bar
4428 (package
4429 (name "ruby-progress_bar")
4430 (version "1.1.0")
4431 (source
4432 (origin
4433 (method url-fetch)
4434 (uri (rubygems-uri "progress_bar" version))
4435 (sha256
4436 (base32
4437 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
4438 (build-system ruby-build-system)
4439 (arguments
4440 '(#:test-target "spec"))
4441 (propagated-inputs
4442 `(("ruby-highline" ,ruby-highline)
4443 ("ruby-options" ,ruby-options)))
4444 (native-inputs
4445 `(("bundler" ,bundler)
4446 ("ruby-rspec" ,ruby-rspec)
4447 ("ruby-timecop" ,ruby-timecop)))
4448 (synopsis
4449 "Ruby library for displaying progress bars")
4450 (description
4451 "ProgressBar is a simple library for displaying progress bars. The
4452 maximum value is configurable, and additional information can be displayed
4453 like the percentage completion, estimated time remaining, elapsed time and
4454 rate.")
4455 (home-page "https://github.com/paul/progress_bar")
4456 (license license:wtfpl2)))
4457
4458 (define-public ruby-dep
4459 (package
4460 (name "ruby-dep")
4461 (version "1.5.0")
4462 (source
4463 (origin
4464 (method url-fetch)
4465 (uri (rubygems-uri "ruby_dep" version))
4466 (sha256
4467 (base32
4468 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
4469 (build-system ruby-build-system)
4470 (arguments
4471 '(#:tests? #f)) ; No included tests
4472 (synopsis "Creates a version constraint of supported Rubies")
4473 (description
4474 "This package helps create a version constraint of supported Rubies,
4475 suitable for a gemspec file.")
4476 (home-page "https://github.com/e2/ruby_dep")
4477 (license license:expat)))
4478
4479 (define-public ruby-progressbar
4480 (package
4481 (name "ruby-progressbar")
4482 (version "1.10.1")
4483 (source
4484 (origin
4485 (method url-fetch)
4486 (uri (rubygems-uri "ruby-progressbar" version))
4487 (sha256
4488 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
4489 (build-system ruby-build-system)
4490 (arguments
4491 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
4492 #:tests? #f))
4493 (synopsis "Text progress bar library for Ruby")
4494 (description
4495 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
4496 The output can be customized with a formatting system.")
4497 (home-page "https://github.com/jfelchner/ruby-progressbar")
4498 (license license:expat)))
4499
4500 (define-public ruby-pry
4501 (package
4502 (name "ruby-pry")
4503 (version "0.13.1")
4504 (source
4505 (origin
4506 (method url-fetch)
4507 (uri (rubygems-uri "pry" version))
4508 (sha256
4509 (base32
4510 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
4511 (build-system ruby-build-system)
4512 (arguments
4513 '(#:tests? #f)) ; no tests
4514 (propagated-inputs
4515 `(("ruby-coderay" ,ruby-coderay)
4516 ("ruby-method-source" ,ruby-method-source)))
4517 (synopsis "Ruby REPL")
4518 (description "Pry is an IRB alternative and runtime developer console for
4519 Ruby. It features syntax highlighting, a plugin architecture, runtime
4520 invocation, and source and documentation browsing.")
4521 (home-page "https://cobaltbluemedia.com/pryrepl/")
4522 (license license:expat)))
4523
4524 (define-public ruby-single-cov
4525 (package
4526 (name "ruby-single-cov")
4527 (version "1.3.2")
4528 (home-page "https://github.com/grosser/single_cov")
4529 (source (origin
4530 (method git-fetch)
4531 (uri (git-reference (url home-page)
4532 (commit (string-append "v" version))))
4533 (file-name (git-file-name name version))
4534 (sha256
4535 (base32
4536 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
4537 (build-system ruby-build-system)
4538 (arguments
4539 '(#:test-target "default"
4540 #:phases (modify-phases %standard-phases
4541 (replace 'replace-git-ls-files
4542 (lambda _
4543 (substitute* "single_cov.gemspec"
4544 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4545 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
4546 #t))
4547 (add-before 'check 'remove-version-constraints
4548 (lambda _
4549 (delete-file "Gemfile.lock")
4550 #t))
4551 (add-before 'check 'make-files-writable
4552 (lambda _
4553 ;; Tests need to create local directories and open files
4554 ;; with write permissions.
4555 (for-each make-file-writable
4556 (find-files "specs" #:directories? #t))
4557 #t))
4558 (add-before 'check 'disable-failing-test
4559 (lambda _
4560 ;; XXX: This test copies assets from minitest, but can
4561 ;; not cope with the files being read-only. Just skip
4562 ;; it for now.
4563 (substitute* "specs/single_cov_spec.rb"
4564 (("it \"complains when coverage is bad\"")
4565 "xit \"complains when coverage is bad\""))
4566 #t)))))
4567 (native-inputs
4568 `(("ruby-bump" ,ruby-bump)
4569 ("ruby-minitest" ,ruby-minitest)
4570 ("ruby-rspec" ,ruby-rspec)
4571 ("ruby-simplecov" ,ruby-simplecov)))
4572 (synopsis "Code coverage reporting tool")
4573 (description
4574 "This package provides actionable code coverage reports for Ruby
4575 projects. It has very little overhead and can be easily integrated with
4576 development tools to catch coverage problems early.")
4577 (license license:expat)))
4578
4579 (define-public ruby-guard
4580 (package
4581 (name "ruby-guard")
4582 (version "2.13.0")
4583 (source (origin
4584 (method git-fetch)
4585 ;; The gem does not include a Rakefile, nor does it contain a
4586 ;; gemspec file, nor does it come with the tests. This is why
4587 ;; we fetch the tarball from Github.
4588 (uri (git-reference
4589 (url "https://github.com/guard/guard")
4590 (commit (string-append "v" version))))
4591 (file-name (git-file-name name version))
4592 (sha256
4593 (base32
4594 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
4595 (build-system ruby-build-system)
4596 (arguments
4597 `(#:tests? #f ; tests require cucumber
4598 #:phases
4599 (modify-phases %standard-phases
4600 (add-after 'unpack 'remove-git-ls-files
4601 (lambda* (#:key outputs #:allow-other-keys)
4602 (substitute* "guard.gemspec"
4603 (("git ls-files -z") "find . -type f -print0"))
4604 #t))
4605 (replace 'build
4606 (lambda _
4607 (invoke "gem" "build" "guard.gemspec"))))))
4608 (propagated-inputs
4609 `(("ruby-formatador" ,ruby-formatador)
4610 ("ruby-listen" ,ruby-listen)
4611 ("ruby-lumberjack" ,ruby-lumberjack)
4612 ("ruby-nenv" ,ruby-nenv)
4613 ("ruby-notiffany" ,ruby-notiffany)
4614 ("ruby-pry" ,ruby-pry)
4615 ("ruby-shellany" ,ruby-shellany)
4616 ("ruby-thor" ,ruby-thor)))
4617 (native-inputs
4618 `(("bundler" ,bundler)
4619 ("ruby-rspec" ,ruby-rspec)))
4620 (synopsis "Tool to handle events on file system modifications")
4621 (description
4622 "Guard is a command line tool to easily handle events on file system
4623 modifications. Guard automates various tasks by running custom rules whenever
4624 file or directories are modified.")
4625 (home-page "https://guardgem.org/")
4626 (license license:expat)))
4627
4628 (define-public ruby-spinach
4629 (package
4630 (name "ruby-spinach")
4631 (version "0.11.0")
4632 (home-page "http://github.com/codegram/spinach")
4633 (source (origin
4634 (method url-fetch)
4635 (uri (rubygems-uri "spinach" version))
4636 (sha256
4637 (base32
4638 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
4639 (build-system ruby-build-system)
4640 (arguments
4641 ;; FIXME: Disable tests altogether because they depend on 'capybara'
4642 ;; which in turn depends on many other unpackaged gems. Enable once
4643 ;; capybara is available.
4644 '(#:tests? #f))
4645 (propagated-inputs
4646 `(("ruby-colorize" ,ruby-colorize)
4647 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
4648 ("ruby-json" ,ruby-json)))
4649 (synopsis "Gherkin-based BDD framework")
4650 (description
4651 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
4652 framework that leverages the expressive @code{Gherkin} language to help you
4653 define executable specifications of your code.")
4654 (license license:expat)))
4655
4656 (define-public ruby-tilt
4657 (package
4658 (name "ruby-tilt")
4659 (version "2.0.9")
4660 (source
4661 (origin
4662 (method url-fetch)
4663 (uri (rubygems-uri "tilt" version))
4664 (sha256
4665 (base32
4666 "0ca4k0clwf0rkvy7726x4nxpjxkpv67w043i39saxgldxd97zmwz"))))
4667 (build-system ruby-build-system)
4668 (arguments
4669 '(#:phases
4670 (modify-phases %standard-phases
4671 (add-after 'unpack 'remove-some-dependencies
4672 (lambda _
4673 (substitute* "Gemfile"
4674 ;; TODO ronn is used for generating the manual
4675 (("gem 'ronn'.*") "\n")
4676 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
4677 ;; pass it in as a native-input
4678 (("gem 'haml'.*") "\n")
4679 ;; TODO Not all of these gems are packaged for Guix yet:
4680 ;; less, coffee-script, livescript, babel-transpiler,
4681 ;; typescript-node
4682 (("if can_execjs") "if false")
4683 ;; Disable the secondary group to reduce the number of
4684 ;; dependencies. None of the normal approaches work, so patch
4685 ;; the Gemfile instead.
4686 (("group :secondary") "[].each"))
4687 #t)))))
4688 (native-inputs
4689 `(("bundler" ,bundler)
4690 ("ruby-yard" ,ruby-yard)
4691 ("ruby-builder" ,ruby-builder)
4692 ("ruby-erubis" ,ruby-erubis)
4693 ("ruby-markaby" ,ruby-markaby)
4694 ("ruby-sassc" ,ruby-sassc)))
4695 (synopsis "Generic interface to multiple Ruby template engines")
4696 (description
4697 "Tilt is a thin interface over a number of different Ruby template
4698 engines in an attempt to make their usage as generic as possible.")
4699 (home-page "https://github.com/rtomayko/tilt/")
4700 (license license:expat)))
4701
4702 (define-public ruby-thread-safe
4703 (package
4704 (name "ruby-thread-safe")
4705 (version "0.3.6")
4706 (source
4707 (origin
4708 (method url-fetch)
4709 (uri (rubygems-uri "thread_safe" version))
4710 (sha256
4711 (base32
4712 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
4713 (build-system ruby-build-system)
4714 (arguments
4715 '(#:tests? #f)) ; needs simplecov, among others
4716 (synopsis "Thread-safe utilities for Ruby")
4717 (description "The thread_safe library provides thread-safe collections and
4718 utilities for Ruby.")
4719 (home-page "https://github.com/ruby-concurrency/thread_safe")
4720 (license license:asl2.0)))
4721
4722 (define-public ruby-tzinfo
4723 (package
4724 (name "ruby-tzinfo")
4725 (version "1.2.4")
4726 (source
4727 (origin
4728 (method url-fetch)
4729 (uri (rubygems-uri "tzinfo" version))
4730 (sha256
4731 (base32
4732 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
4733 (build-system ruby-build-system)
4734 (arguments
4735 '(#:phases
4736 (modify-phases %standard-phases
4737 (add-after 'unpack 'skip-safe-tests
4738 (lambda _
4739 (substitute* "test/test_utils.rb"
4740 (("def safe_test\\(options = \\{\\}\\)")
4741 "def safe_test(options = {})
4742 skip('The Guix build environment has an unsafe load path')"))
4743 #t)))))
4744 (propagated-inputs
4745 `(("ruby-thread-safe" ,ruby-thread-safe)))
4746 (synopsis "Time zone library for Ruby")
4747 (description "TZInfo is a Ruby library that provides daylight savings
4748 aware transformations between times in different time zones.")
4749 (home-page "https://tzinfo.github.io")
4750 (license license:expat)))
4751
4752 (define-public ruby-tzinfo-data
4753 (package
4754 (name "ruby-tzinfo-data")
4755 (version "1.2017.3")
4756 (source
4757 (origin
4758 (method git-fetch)
4759 ;; Download from GitHub because the rubygems version does not contain
4760 ;; Rakefile or tests.
4761 (uri (git-reference
4762 (url "https://github.com/tzinfo/tzinfo-data")
4763 (commit (string-append "v" version))))
4764 (file-name (git-file-name name version))
4765 (sha256
4766 (base32
4767 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
4768 ;; Remove the known test failure.
4769 ;; https://github.com/tzinfo/tzinfo-data/issues/10
4770 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
4771 (patches (search-patches
4772 "ruby-tzinfo-data-ignore-broken-test.patch"))))
4773 (build-system ruby-build-system)
4774 (propagated-inputs
4775 `(("ruby-tzinfo" ,ruby-tzinfo)))
4776 (synopsis "Data from the IANA Time Zone database")
4777 (description
4778 "This library provides @code{TZInfo::Data}, which contains data from the
4779 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
4780 (home-page "https://tzinfo.github.io")
4781 (license license:expat)))
4782
4783 (define-public ruby-rb-inotify
4784 (package
4785 (name "ruby-rb-inotify")
4786 (version "0.9.10")
4787 (source
4788 (origin
4789 (method url-fetch)
4790 (uri (rubygems-uri "rb-inotify" version))
4791 (sha256
4792 (base32
4793 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
4794 (build-system ruby-build-system)
4795 (arguments
4796 '(#:tests? #f ; there are no tests
4797 #:phases
4798 (modify-phases %standard-phases
4799 ;; Building the gemspec with rake is not working here since it is
4800 ;; generated with Jeweler. It is also unnecessary because the
4801 ;; existing gemspec does not use any development tools to generate a
4802 ;; list of files.
4803 (replace 'build
4804 (lambda _
4805 (invoke "gem" "build" "rb-inotify.gemspec"))))))
4806 (propagated-inputs
4807 `(("ruby-ffi" ,ruby-ffi)))
4808 (native-inputs
4809 `(("ruby-yard" ,ruby-yard)))
4810 (synopsis "Ruby wrapper for Linux's inotify")
4811 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
4812 kernel subsystem for monitoring changes to files and directories.")
4813 (home-page "https://github.com/nex3/rb-inotify")
4814 (license license:expat)))
4815
4816 (define-public ruby-pry-editline
4817 (package
4818 (name "ruby-pry-editline")
4819 (version "1.1.2")
4820 (source (origin
4821 (method url-fetch)
4822 (uri (rubygems-uri "pry-editline" version))
4823 (sha256
4824 (base32
4825 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
4826 (build-system ruby-build-system)
4827 (arguments `(#:tests? #f)) ; no tests included
4828 (native-inputs
4829 `(("bundler" ,bundler)))
4830 (synopsis "Open the current REPL line in an editor")
4831 (description
4832 "This gem provides a plugin for the Ruby REPL to enable opening the
4833 current line in an external editor.")
4834 (home-page "https://github.com/tpope/pry-editline")
4835 (license license:expat)))
4836
4837 (define-public ruby-sdoc
4838 (package
4839 (name "ruby-sdoc")
4840 (version "1.1.0")
4841 (source (origin
4842 (method url-fetch)
4843 (uri (rubygems-uri "sdoc" version))
4844 (sha256
4845 (base32
4846 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
4847 (build-system ruby-build-system)
4848 (arguments
4849 `(#:phases
4850 (modify-phases %standard-phases
4851 (add-before 'check 'set-rubylib-and-patch-gemfile
4852 (lambda _
4853 (setenv "RUBYLIB" "lib")
4854 (substitute* "sdoc.gemspec"
4855 (("s.add_runtime_dependency.*") "\n")
4856 (("s.add_dependency.*") "\n"))
4857 (substitute* "Gemfile"
4858 (("gem \"rake\".*")
4859 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
4860 #t)))))
4861 (propagated-inputs
4862 `(("ruby-json" ,ruby-json)))
4863 (native-inputs
4864 `(("bundler" ,bundler)
4865 ("ruby-minitest" ,ruby-minitest)
4866 ("ruby-hoe" ,ruby-hoe)))
4867 (synopsis "Generate searchable RDoc documentation")
4868 (description
4869 "SDoc is an RDoc documentation generator to build searchable HTML
4870 documentation for Ruby code.")
4871 (home-page "https://github.com/voloko/sdoc")
4872 (license license:expat)))
4873
4874 (define-public ruby-tins
4875 (package
4876 (name "ruby-tins")
4877 (version "1.15.0")
4878 (source (origin
4879 (method url-fetch)
4880 (uri (rubygems-uri "tins" version))
4881 (sha256
4882 (base32
4883 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
4884 (build-system ruby-build-system)
4885 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
4886 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
4887 ;; the gemspec.
4888 (arguments
4889 `(#:tests? #f ; there are no tests
4890 #:phases
4891 (modify-phases %standard-phases
4892 (replace 'build
4893 (lambda _
4894 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
4895 ;; causes an error.
4896 (substitute* "tins.gemspec"
4897 (("\"lib/spruz\", ") ""))
4898 (invoke "gem" "build" "tins.gemspec"))))))
4899 (synopsis "Assorted tools for Ruby")
4900 (description "Tins is a Ruby library providing assorted tools.")
4901 (home-page "https://github.com/flori/tins")
4902 (license license:expat)))
4903
4904 (define-public ruby-gem-hadar
4905 (package
4906 (name "ruby-gem-hadar")
4907 (version "1.9.1")
4908 (source (origin
4909 (method url-fetch)
4910 (uri (rubygems-uri "gem_hadar" version))
4911 (sha256
4912 (base32
4913 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
4914 (build-system ruby-build-system)
4915 ;; This gem needs itself at development time. We disable rebuilding of the
4916 ;; gemspec to avoid this loop.
4917 (arguments
4918 `(#:tests? #f ; there are no tests
4919 #:phases
4920 (modify-phases %standard-phases
4921 (replace 'build
4922 (lambda _
4923 (invoke "gem" "build" "gem_hadar.gemspec"))))))
4924 (propagated-inputs
4925 `(("git" ,git)
4926 ("ruby-tins" ,ruby-tins)
4927 ("ruby-yard" ,ruby-yard)))
4928 (synopsis "Library for the development of Ruby gems")
4929 (description
4930 "This library contains some useful functionality to support the
4931 development of Ruby gems.")
4932 (home-page "https://github.com/flori/gem_hadar")
4933 (license license:expat)))
4934
4935 (define-public ruby-minitest-tu-shim
4936 (package
4937 (name "ruby-minitest-tu-shim")
4938 (version "1.3.3")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (rubygems-uri "minitest_tu_shim" version))
4942 (sha256
4943 (base32
4944 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
4945 (build-system ruby-build-system)
4946 (arguments
4947 `(#:phases
4948 (modify-phases %standard-phases
4949 (add-after 'unpack 'fix-test-include-path
4950 (lambda* (#:key inputs #:allow-other-keys)
4951 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
4952 (substitute* "Rakefile"
4953 (("Hoe\\.add_include_dirs .*")
4954 (string-append "Hoe.add_include_dirs \""
4955 minitest "/lib/ruby/vendor_ruby"
4956 "/gems/minitest-"
4957 ,(package-version ruby-minitest-4)
4958 "/lib" "\""))))
4959 #t))
4960 (add-before 'check 'fix-test-assumptions
4961 (lambda _
4962 ;; The test output includes the file name, so a couple of tests
4963 ;; fail. Changing the regular expressions slightly fixes this
4964 ;; problem.
4965 (substitute* "test/test_mini_test.rb"
4966 (("output.sub!\\(.*, 'FILE:LINE'\\)")
4967 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
4968 (("gsub\\(/.*, 'FILE:LINE'\\)")
4969 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
4970 #t)))))
4971 (propagated-inputs
4972 `(("ruby-minitest-4" ,ruby-minitest-4)))
4973 (native-inputs
4974 `(("ruby-hoe" ,ruby-hoe)))
4975 (synopsis "Adapter library between minitest and test/unit")
4976 (description
4977 "This library bridges the gap between the small and fast minitest and
4978 Ruby's large and slower test/unit.")
4979 (home-page "https://rubygems.org/gems/minitest_tu_shim")
4980 (license license:expat)))
4981
4982 (define-public ruby-term-ansicolor
4983 (package
4984 (name "ruby-term-ansicolor")
4985 (version "1.6.0")
4986 (source (origin
4987 (method url-fetch)
4988 (uri (rubygems-uri "term-ansicolor" version))
4989 (sha256
4990 (base32
4991 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
4992 (build-system ruby-build-system)
4993 ;; Rebuilding the gemspec seems to require git, even though this is not a
4994 ;; git repository, so we just build the gem from the existing gemspec.
4995 (arguments
4996 `(#:phases
4997 (modify-phases %standard-phases
4998 (add-after 'unpack 'fix-test
4999 (lambda -
5000 (substitute* "tests/hsl_triple_test.rb"
5001 (("0\\\\\\.0%")
5002 "0\\.?0?%"))))
5003 (replace 'build
5004 (lambda _
5005 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
5006 (propagated-inputs
5007 `(("ruby-tins" ,ruby-tins)))
5008 (native-inputs
5009 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5010 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5011 (synopsis "Ruby library to control the attributes of terminal output")
5012 (description
5013 "This Ruby library uses ANSI escape sequences to control the attributes
5014 of terminal output.")
5015 (home-page "https://flori.github.io/term-ansicolor/")
5016 ;; There is no mention of the "or later" clause.
5017 (license license:gpl2)))
5018
5019 (define-public ruby-terraform
5020 (package
5021 (name "ruby-terraform")
5022 (version "0.22.0")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (rubygems-uri "ruby-terraform" version))
5027 (sha256
5028 (base32
5029 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5030 (build-system ruby-build-system)
5031 (arguments
5032 '(#:tests? #f)) ; No included tests
5033 (propagated-inputs
5034 `(("ruby-lino" ,ruby-lino)))
5035 (synopsis "Ruby wrapper around the Terraform command line interface")
5036 (description
5037 "This package provides a Ruby wrapper around the Terraform command line
5038 interface so that Terraform can be more easily invoked from Ruby code.")
5039 (home-page "https://github.com/infrablocks/ruby_terraform")
5040 (license license:expat)))
5041
5042 (define-public ruby-pstree
5043 (package
5044 (name "ruby-pstree")
5045 (version "0.1.0")
5046 (source (origin
5047 (method url-fetch)
5048 (uri (rubygems-uri "pstree" version))
5049 (sha256
5050 (base32
5051 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5052 (build-system ruby-build-system)
5053 (native-inputs
5054 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5055 ("bundler" ,bundler)))
5056 (synopsis "Create a process tree data structure")
5057 (description
5058 "This library uses the output of the @code{ps} command to create a
5059 process tree data structure for the current host.")
5060 (home-page "https://github.com/flori/pstree")
5061 ;; There is no mention of the "or later" clause.
5062 (license license:gpl2)))
5063
5064 (define-public ruby-utils
5065 (package
5066 (name "ruby-utils")
5067 (version "0.9.0")
5068 (source (origin
5069 (method url-fetch)
5070 (uri (rubygems-uri "utils" version))
5071 (sha256
5072 (base32
5073 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
5074 (build-system ruby-build-system)
5075 (propagated-inputs
5076 `(("ruby-tins" ,ruby-tins)
5077 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5078 ("ruby-pstree" ,ruby-pstree)
5079 ("ruby-pry-editline" ,ruby-pry-editline)))
5080 (native-inputs
5081 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5082 ("bundler" ,bundler)))
5083 (synopsis "Command line tools for working with Ruby")
5084 (description
5085 "This package provides assorted command line tools that may be useful
5086 when working with Ruby code.")
5087 (home-page "https://github.com/flori/utils")
5088 ;; There is no mention of the "or later" clause.
5089 (license license:gpl2)))
5090
5091 (define-public ruby-jaro-winkler
5092 (package
5093 (name "ruby-jaro-winkler")
5094 (version "1.5.4")
5095 (source
5096 (origin
5097 (method url-fetch)
5098 (uri (rubygems-uri "jaro_winkler" version))
5099 (sha256
5100 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
5101 (build-system ruby-build-system)
5102 (arguments
5103 '(#:tests? #f)) ; no included tests
5104 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5105 (description
5106 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5107 algorithm. It is written as a C extension and will fallback to a pure Ruby
5108 implementation on platforms where this is unsupported.")
5109 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5110 (license license:expat)))
5111
5112 (define-public ruby-json
5113 (package
5114 (name "ruby-json")
5115 (version "2.1.0")
5116 (source
5117 (origin
5118 (method url-fetch)
5119 (uri (rubygems-uri "json" version))
5120 (sha256
5121 (base32
5122 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
5123 (build-system ruby-build-system)
5124 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5125 (synopsis "JSON library for Ruby")
5126 (description "This Ruby library provides a JSON implementation written as
5127 a native C extension.")
5128 (home-page "http://json-jruby.rubyforge.org/")
5129 (license (list license:ruby license:gpl2)))) ; GPL2 only
5130
5131 (define-public ruby-json-pure
5132 (package
5133 (name "ruby-json-pure")
5134 (version "2.2.0")
5135 (source (origin
5136 (method url-fetch)
5137 (uri (rubygems-uri "json_pure" version))
5138 (sha256
5139 (base32
5140 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
5141 (build-system ruby-build-system)
5142 (arguments
5143 `(#:phases
5144 (modify-phases %standard-phases
5145 (add-after 'unpack 'fix-rakefile
5146 (lambda _
5147 (substitute* "Rakefile"
5148 ;; Since this is not a git repository, do not call 'git'.
5149 (("`git ls-files`") "`find . -type f |sort`")
5150 ;; Loosen dependency constraint.
5151 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5152 #t))
5153 (add-after 'replace-git-ls-files 'regenerate-gemspec
5154 (lambda _
5155 ;; Regenerate gemspec so loosened dependency constraints are
5156 ;; propagated.
5157 (invoke "rake" "gemspec")))
5158 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5159 (lambda _
5160 ;; This gemspec doesn't look to be generated by the above
5161 ;; command, so patch it separately.
5162 (substitute* "json-java.gemspec"
5163 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5164 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5165 #t)))))
5166 (native-inputs
5167 `(("bundler" ,bundler)
5168 ("ragel" ,ragel)
5169 ("ruby-simplecov" ,ruby-simplecov)
5170 ("ruby-test-unit" ,ruby-test-unit)))
5171 (synopsis "JSON implementation in pure Ruby")
5172 (description
5173 "This package provides a JSON implementation written in pure Ruby.")
5174 (home-page "https://flori.github.com/json/")
5175 (license license:ruby)))
5176
5177 (define-public ruby-jwt
5178 (package
5179 (name "ruby-jwt")
5180 (version "2.1.0")
5181 (source
5182 (origin
5183 (method url-fetch)
5184 (uri (rubygems-uri "jwt" version))
5185 (sha256
5186 (base32
5187 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
5188 (build-system ruby-build-system)
5189 (arguments
5190 '(#:test-target "test"
5191 #:phases
5192 (modify-phases %standard-phases
5193 (add-after 'unpack 'remove-unnecessary-dependencies
5194 (lambda _
5195 (substitute* "spec/spec_helper.rb"
5196 (("require 'simplecov.*") "\n")
5197 ;; Use [].each to disable running the SimpleCov configuration
5198 ;; block
5199 (("SimpleCov\\.configure") "[].each")
5200 (("require 'codeclimate-test-reporter'") "")
5201 (("require 'codacy-coverage'") "")
5202 (("Codacy::Reporter\\.start") ""))
5203 #t)))))
5204 (native-inputs
5205 `(("bundler" ,bundler)
5206 ("ruby-rspec" ,ruby-rspec)
5207 ("ruby-rbnacl" ,ruby-rbnacl)))
5208 (synopsis "Ruby implementation of the JSON Web Token standard")
5209 (description
5210 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
5211 @acronym{JWT, JSON Web Token} standard.")
5212 (home-page "https://github.com/jwt/ruby-jwt")
5213 (license license:expat)))
5214
5215 ;; Even though this package only provides bindings for a Mac OSX API it is
5216 ;; required by "ruby-listen" at runtime.
5217 (define-public ruby-rb-fsevent
5218 (package
5219 (name "ruby-rb-fsevent")
5220 (version "0.10.3")
5221 (source (origin
5222 (method url-fetch)
5223 (uri (rubygems-uri "rb-fsevent" version))
5224 (sha256
5225 (base32
5226 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
5227 (build-system ruby-build-system)
5228 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
5229 ;; "listen", which needs "rb-fsevent" at runtime.
5230 (arguments `(#:tests? #f))
5231 (synopsis "FSEvents API with signals catching")
5232 (description
5233 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
5234 (home-page "https://rubygems.org/gems/rb-fsevent")
5235 (license license:expat)))
5236
5237 (define-public ruby-listen
5238 (package
5239 (name "ruby-listen")
5240 (version "3.2.0")
5241 (source
5242 (origin
5243 ;; The gem does not include a Rakefile, so fetch from the Git
5244 ;; repository.
5245 (method git-fetch)
5246 (uri (git-reference
5247 (url "https://github.com/guard/listen.git")
5248 (commit (string-append "v" version))))
5249 (file-name (git-file-name name version))
5250 (sha256
5251 (base32
5252 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
5253 (build-system ruby-build-system)
5254 (arguments
5255 `(#:test-target "spec"
5256 #:phases
5257 (modify-phases %standard-phases
5258 (add-after 'unpack 'fix-files-in-gemspec
5259 (lambda _
5260 (substitute* "listen.gemspec"
5261 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
5262 #t))
5263 (add-before 'check 'remove-unnecessary-dependencies'
5264 (lambda _
5265 (substitute* "Rakefile"
5266 ;; Rubocop is for code linting, and is unnecessary for running
5267 ;; the tests.
5268 ((".*rubocop.*") ""))
5269 #t)))))
5270 (native-inputs
5271 `(("bundler" ,bundler)
5272 ("ruby-rspec" ,ruby-rspec)))
5273 (inputs
5274 `(;; ruby-thor is used for the command line interface, and is referenced
5275 ;; in the wrapper, and therefore just needs to be an input.
5276 ("ruby-thor" ,ruby-thor)))
5277 (propagated-inputs
5278 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
5279 ("ruby-rb-inotify" ,ruby-rb-inotify)
5280 ("ruby-dep" ,ruby-dep)))
5281 (synopsis "Listen to file modifications")
5282 (description "The Listen gem listens to file modifications and notifies
5283 you about the changes.")
5284 (home-page "https://github.com/guard/listen")
5285 (license license:expat)))
5286
5287 (define-public ruby-loofah
5288 (package
5289 (name "ruby-loofah")
5290 (version "2.2.3")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (rubygems-uri "loofah" version))
5295 (sha256
5296 (base32
5297 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
5298 (build-system ruby-build-system)
5299 (arguments
5300 '(#:phases
5301 (modify-phases %standard-phases
5302 (add-after 'unpack 'remove-unnecessary-dependencies
5303 (lambda _
5304 ;; concourse is a development tool which is unused, so remove it
5305 ;; so it's not required.
5306 (substitute* "Gemfile"
5307 ((".*\"concourse\".*") "\n"))
5308 (substitute* "Rakefile"
5309 (("require 'concourse'") "")
5310 (("Concourse\\.new.*") "\n"))
5311 #t)))))
5312 (native-inputs
5313 `(("ruby-hoe" ,ruby-hoe)
5314 ("ruby-rr" ,ruby-rr)))
5315 (propagated-inputs
5316 `(("ruby-nokogiri" ,ruby-nokogiri)
5317 ("ruby-crass" ,ruby-crass)))
5318 (synopsis "Ruby library for manipulating and transforming HTML/XML")
5319 (description
5320 "Loofah is a general library for manipulating and transforming HTML/XML
5321 documents and fragments. It's built on top of Nokogiri and libxml2.")
5322 (home-page "https://github.com/flavorjones/loofah")
5323 (license license:expat)))
5324
5325 (define-public ruby-activesupport
5326 (package
5327 (name "ruby-activesupport")
5328 (version "5.2.2.1")
5329 (source
5330 (origin
5331 (method url-fetch)
5332 (uri (rubygems-uri "activesupport" version))
5333 (sha256
5334 (base32
5335 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
5336 (build-system ruby-build-system)
5337 (arguments
5338 `(#:phases
5339 (modify-phases %standard-phases
5340 (replace 'check
5341 (lambda _
5342 ;; There are no tests, instead attempt to load the library.
5343 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
5344 (propagated-inputs
5345 `(("ruby-concurrent" ,ruby-concurrent)
5346 ("ruby-i18n" ,ruby-i18n)
5347 ("ruby-minitest" ,ruby-minitest)
5348 ("ruby-tzinfo" ,ruby-tzinfo)
5349 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
5350 (synopsis "Ruby on Rails utility library")
5351 (description "ActiveSupport is a toolkit of support libraries and Ruby
5352 core extensions extracted from the Rails framework. It includes support for
5353 multibyte strings, internationalization, time zones, and testing.")
5354 (home-page "http://www.rubyonrails.org")
5355 (license license:expat)))
5356
5357 (define-public ruby-crass
5358 (package
5359 (name "ruby-crass")
5360 (version "1.0.6")
5361 (home-page "https://github.com/rgrove/crass")
5362 (source (origin
5363 ;; The gem does not contain tests, so pull from git.
5364 (method git-fetch)
5365 (uri (git-reference
5366 (url home-page)
5367 (commit (string-append "v" version))))
5368 (file-name (git-file-name name version))
5369 (sha256
5370 (base32
5371 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
5372 (build-system ruby-build-system)
5373 (synopsis "Pure Ruby CSS parser")
5374 (description
5375 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
5376 (license license:expat)))
5377
5378 (define-public ruby-nokogumbo
5379 (package
5380 (name "ruby-nokogumbo")
5381 (version "2.0.2")
5382 (source (origin
5383 ;; We use the git reference, because there's no Rakefile in the
5384 ;; published gem and the tarball on Github is outdated.
5385 (method git-fetch)
5386 (uri (git-reference
5387 (url "https://github.com/rubys/nokogumbo.git")
5388 (commit (string-append "v" version))))
5389 (file-name (string-append name "-" version "-checkout"))
5390 (sha256
5391 (base32
5392 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
5393 (build-system ruby-build-system)
5394 (native-inputs
5395 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
5396 (inputs
5397 `(("gumbo-parser" ,gumbo-parser)))
5398 (propagated-inputs
5399 `(("ruby-nokogiri" ,ruby-nokogiri)))
5400 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
5401 (description
5402 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
5403 access the result as a Nokogiri parsed document.")
5404 (home-page "https://github.com/rubys/nokogumbo/")
5405 (license license:asl2.0)))
5406
5407 (define-public ruby-sanitize
5408 (package
5409 (name "ruby-sanitize")
5410 (version "5.1.0")
5411 (home-page "https://github.com/rgrove/sanitize")
5412 (source (origin
5413 (method git-fetch)
5414 ;; The gem does not include the Rakefile, so we download the
5415 ;; source from Github.
5416 (uri (git-reference
5417 (url home-page)
5418 (commit (string-append "v" version))))
5419 (file-name (git-file-name name version))
5420 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
5421 (sha256
5422 (base32
5423 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
5424 (build-system ruby-build-system)
5425 (propagated-inputs
5426 `(("ruby-crass" ,ruby-crass)
5427 ("ruby-nokogiri" ,ruby-nokogiri)
5428 ("ruby-nokogumbo" ,ruby-nokogumbo)))
5429 (native-inputs
5430 `(("ruby-minitest" ,ruby-minitest)))
5431 (synopsis "Whitelist-based HTML and CSS sanitizer")
5432 (description
5433 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
5434 acceptable elements, attributes, and CSS properties, Sanitize will remove all
5435 unacceptable HTML and/or CSS from a string.")
5436 (license license:expat)))
5437
5438 (define-public ruby-oj
5439 (package
5440 (name "ruby-oj")
5441 (version "3.10.1")
5442 (source
5443 (origin
5444 (method git-fetch)
5445 ;; Version on rubygems.org does not contain Rakefile, so download from
5446 ;; GitHub instead.
5447 (uri (git-reference
5448 (url "https://github.com/ohler55/oj")
5449 (commit (string-append "v" version))))
5450 (file-name (git-file-name name version))
5451 (sha256
5452 (base32
5453 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
5454 (build-system ruby-build-system)
5455 (arguments
5456 '(#:test-target "test_all"
5457 #:phases
5458 (modify-phases %standard-phases
5459 (add-before 'check 'disable-bundler
5460 (lambda _
5461 (substitute* "Rakefile"
5462 (("Bundler\\.with_clean_env") "1.times")
5463 (("bundle exec ") "")))))))
5464 (native-inputs
5465 `(("bundler" ,bundler)
5466 ("ruby-rspec" ,ruby-rspec)
5467 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5468 (synopsis "JSON parser for Ruby optimized for speed")
5469 (description
5470 "Oj is a JSON parser and generator for Ruby, where the encoding and
5471 decoding of JSON is implemented as a C extension to Ruby.")
5472 (home-page "http://www.ohler.com/oj/")
5473 (license (list license:expat ; Ruby code
5474 license:bsd-3)))) ; extension code
5475
5476 (define-public ruby-ox
5477 (package
5478 (name "ruby-ox")
5479 (version "2.6.0")
5480 (source
5481 (origin
5482 (method url-fetch)
5483 (uri (rubygems-uri "ox" version))
5484 (sha256
5485 (base32
5486 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
5487 (build-system ruby-build-system)
5488 (arguments
5489 '(#:tests? #f)) ; no tests
5490 (synopsis "Optimized XML library for Ruby")
5491 (description
5492 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
5493 written as a native C extension. It was designed to be an alternative to
5494 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
5495 alternative to Marshal for Object serialization. ")
5496 (home-page "http://www.ohler.com/ox")
5497 (license license:expat)))
5498
5499 (define-public ruby-redcloth
5500 (package
5501 (name "ruby-redcloth")
5502 (version "4.3.2")
5503 (source (origin
5504 (method url-fetch)
5505 (uri (rubygems-uri "RedCloth" version))
5506 (sha256
5507 (base32
5508 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
5509 (build-system ruby-build-system)
5510 (arguments
5511 `(#:tests? #f ; no tests
5512 #:phases
5513 (modify-phases %standard-phases
5514 ;; Redcloth has complicated rake tasks to build various versions for
5515 ;; multiple targets using RVM. We don't want this so we just use the
5516 ;; existing gemspec.
5517 (replace 'build
5518 (lambda _
5519 (invoke "gem" "build" "redcloth.gemspec"))))))
5520 (native-inputs
5521 `(("bundler" ,bundler)
5522 ("ruby-diff-lcs" ,ruby-diff-lcs)
5523 ("ruby-rspec-2" ,ruby-rspec-2)))
5524 (synopsis "Textile markup language parser for Ruby")
5525 (description
5526 "RedCloth is a Ruby parser for the Textile markup language.")
5527 (home-page "http://redcloth.org")
5528 (license license:expat)))
5529
5530 (define-public ruby-pg
5531 (package
5532 (name "ruby-pg")
5533 (version "1.1.4")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (rubygems-uri "pg" version))
5538 (sha256
5539 (base32
5540 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
5541 (build-system ruby-build-system)
5542 (arguments
5543 '(#:test-target "spec"))
5544 (native-inputs
5545 `(("ruby-rake-compiler" ,ruby-rake-compiler)
5546 ("ruby-hoe" ,ruby-hoe)
5547 ("ruby-rspec" ,ruby-rspec)))
5548 (inputs
5549 `(("postgresql" ,postgresql)))
5550 (synopsis "Ruby interface to PostgreSQL")
5551 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
5552 with PostgreSQL 9.0 and later.")
5553 (home-page "https://bitbucket.org/ged/ruby-pg")
5554 (license license:ruby)))
5555
5556 (define-public ruby-byebug
5557 (package
5558 (name "ruby-byebug")
5559 (version "9.0.6")
5560 (source
5561 (origin
5562 (method url-fetch)
5563 (uri (rubygems-uri "byebug" version))
5564 (sha256
5565 (base32
5566 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
5567 (build-system ruby-build-system)
5568 (arguments
5569 '(#:tests? #f)) ; no tests
5570 (synopsis "Debugger for Ruby 2")
5571 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
5572 TracePoint C API for execution control and the Debug Inspector C API for call
5573 stack navigation. The core component provides support that front-ends can
5574 build on. It provides breakpoint handling and bindings for stack frames among
5575 other things and it comes with a command line interface.")
5576 (home-page "https://github.com/deivid-rodriguez/byebug")
5577 (license license:bsd-2)))
5578
5579 ;;; TODO: Make it the default byebug in core-updates.
5580 (define-public ruby-byebug-11
5581 (package
5582 (inherit ruby-byebug)
5583 (name "ruby-byebug")
5584 (version "11.1.3")
5585 (source
5586 (origin
5587 (method git-fetch)
5588 (uri (git-reference
5589 (url "https://github.com/deivid-rodriguez/byebug.git")
5590 (commit (string-append "v" version))))
5591 (file-name (git-file-name name version))
5592 (sha256
5593 (base32
5594 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
5595 (modules '((guix build utils)))
5596 (snippet
5597 '(begin
5598 ;; Remove wrappers that try to setup a bundle environment.
5599 (with-directory-excursion "bin"
5600 (for-each delete-file '("bundle" "rake" "rubocop"))
5601 ;; ruby-minitest doesn't come with a launcher, so fix the one
5602 ;; provided.
5603 (substitute* "minitest"
5604 (("load File\\.expand_path\\(\"bundle\".*") "")
5605 (("require \"bundler/setup\".*") "")))
5606 #t))))
5607 (arguments
5608 `(#:tests? #t
5609 #:phases
5610 (modify-phases %standard-phases
5611 (add-after 'unpack 'skip-tmp-path-sensitive-test
5612 (lambda _
5613 (substitute* "test/commands/where_test.rb"
5614 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
5615 "unless true\n"))
5616 #t))
5617 (add-before 'build 'compile
5618 (lambda _
5619 (invoke "rake" "compile")))
5620 (add-before 'check 'set-home
5621 (lambda _
5622 (setenv "HOME" (getcwd))
5623 #t)))))
5624 (native-inputs
5625 `(("bundler" ,bundler)
5626 ("ruby-chandler" ,ruby-chandler)
5627 ("ruby-minitest" ,ruby-minitest)
5628 ("ruby-pry" ,ruby-pry)
5629 ("ruby-rake-compiler" ,ruby-rake-compiler)
5630 ("ruby-rubocop" ,ruby-rubocop)
5631 ("ruby-yard" ,ruby-yard)))))
5632
5633 (define-public ruby-netrc
5634 (package
5635 (name "ruby-netrc")
5636 (version "0.11.0")
5637 (source (origin
5638 (method url-fetch)
5639 (uri (rubygems-uri "netrc" version))
5640 (sha256
5641 (base32
5642 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
5643 (build-system ruby-build-system)
5644 (arguments
5645 `(#:phases
5646 (modify-phases %standard-phases
5647 (replace 'check
5648 ;; There is no Rakefile and minitest can only run one file at once,
5649 ;; so we have to iterate over all test files.
5650 (lambda _
5651 (map (lambda (file)
5652 (invoke "ruby" "-Itest" file))
5653 (find-files "./test" "test_.*\\.rb")))))))
5654 (native-inputs
5655 `(("ruby-minitest" ,ruby-minitest)))
5656 (synopsis "Library to read and update netrc files")
5657 (description
5658 "This library can read and update netrc files, preserving formatting
5659 including comments and whitespace.")
5660 (home-page "https://github.com/geemus/netrc")
5661 (license license:expat)))
5662
5663 (define-public ruby-unf-ext
5664 (package
5665 (name "ruby-unf-ext")
5666 (version "0.0.7.6")
5667 (source (origin
5668 (method url-fetch)
5669 (uri (rubygems-uri "unf_ext" version))
5670 (sha256
5671 (base32
5672 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
5673 (build-system ruby-build-system)
5674 (arguments
5675 `(#:phases
5676 (modify-phases %standard-phases
5677 (add-after 'build 'build-ext
5678 (lambda _ (invoke "rake" "compile:unf_ext")))
5679 (add-before 'check 'lose-rake-compiler-dock-dependency
5680 (lambda _
5681 ;; rake-compiler-dock is listed in the gemspec, but only
5682 ;; required when cross-compiling.
5683 (substitute* "unf_ext.gemspec"
5684 ((".*rake-compiler-dock.*") ""))
5685 #t)))))
5686 (native-inputs
5687 `(("bundler" ,bundler)
5688 ("ruby-rake-compiler" ,ruby-rake-compiler)
5689 ("ruby-test-unit" ,ruby-test-unit)))
5690 (synopsis "Unicode normalization form support library")
5691 (description
5692 "This package provides unicode normalization form support for Ruby.")
5693 (home-page "https://github.com/knu/ruby-unf_ext")
5694 (license license:expat)))
5695
5696 (define-public ruby-tdiff
5697 ;; Use a newer than released snapshot so that rspec-2 is not required.
5698 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
5699 (package
5700 (name "ruby-tdiff")
5701 (version (string-append "0.3.3-1." (string-take commit 8)))
5702 (source (origin
5703 (method git-fetch)
5704 (uri (git-reference
5705 (url "https://github.com/postmodern/tdiff.git")
5706 (commit commit)))
5707 (file-name (string-append name "-" version "-checkout"))
5708 (sha256
5709 (base32
5710 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
5711 (build-system ruby-build-system)
5712 (native-inputs
5713 `(("ruby-rspec" ,ruby-rspec)
5714 ("ruby-yard" ,ruby-yard)
5715 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
5716 (synopsis "Calculate the differences between two tree-like structures")
5717 (description
5718 "This library provides functions to calculate the differences between two
5719 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
5720 (home-page "https://github.com/postmodern/tdiff")
5721 (license license:expat))))
5722
5723 (define-public ruby-nokogiri-diff
5724 ;; Use a newer than released snapshot so that rspec-2 is not required.
5725 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
5726 (package
5727 (name "ruby-nokogiri-diff")
5728 (version (string-append "0.2.0-1." (string-take commit 8)))
5729 (source (origin
5730 (method git-fetch)
5731 (uri (git-reference
5732 (url "https://github.com/postmodern/nokogiri-diff.git")
5733 (commit commit)))
5734 (file-name (string-append name "-" version "-checkout"))
5735 (sha256
5736 (base32
5737 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
5738 (build-system ruby-build-system)
5739 (propagated-inputs
5740 `(("ruby-tdiff" ,ruby-tdiff)
5741 ("ruby-nokogiri" ,ruby-nokogiri)))
5742 (native-inputs
5743 `(("ruby-rspec" ,ruby-rspec)
5744 ("ruby-yard" ,ruby-yard)
5745 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
5746 (synopsis "Calculate the differences between two XML/HTML documents")
5747 (description
5748 "@code{Nokogiri::Diff} adds the ability to calculate the
5749 differences (added or removed nodes) between two XML/HTML documents.")
5750 (home-page "https://github.com/postmodern/nokogiri-diff")
5751 (license license:expat))))
5752
5753 (define-public ruby-racc
5754 (package
5755 (name "ruby-racc")
5756 (version "1.4.14")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 (uri (rubygems-uri "racc" version))
5761 (sha256
5762 (base32
5763 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
5764 (build-system ruby-build-system)
5765 (native-inputs
5766 `(("ruby-hoe" ,ruby-hoe)
5767 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5768 (synopsis "LALR(1) parser generator for Ruby")
5769 (description
5770 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
5771 generates Ruby program.")
5772 (home-page "http://i.loveruby.net/en/projects/racc/")
5773 (license (list
5774 ;; Generally licensed under the LGPL2.1, and some files also
5775 ;; available under the same license as Ruby.
5776 license:lgpl2.1
5777 license:ruby))))
5778
5779 (define-public ruby-rack
5780 (package
5781 (name "ruby-rack")
5782 (version "2.0.6")
5783 (source
5784 (origin
5785 (method git-fetch)
5786 ;; Download from GitHub so that the patch can be applied.
5787 (uri (git-reference
5788 (url "https://github.com/rack/rack")
5789 (commit version)))
5790 (file-name (git-file-name name version))
5791 (sha256
5792 (base32
5793 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
5794 ;; Ignore test which fails inside the build environment but works
5795 ;; outside.
5796 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
5797 (build-system ruby-build-system)
5798 (arguments
5799 '(#:phases
5800 (modify-phases %standard-phases
5801 (add-before 'check 'fix-tests
5802 (lambda _
5803 ;; A few of the tests use the length of a file on disk for
5804 ;; Content-Length and Content-Range headers. However, this file
5805 ;; has a shebang in it which an earlier phase patches, growing
5806 ;; the file size from 193 to 239 bytes when the store prefix is
5807 ;; "/gnu/store".
5808 (let ((size-diff (- (string-length (which "ruby"))
5809 (string-length "/usr/bin/env ruby"))))
5810 (substitute* '("test/spec_file.rb")
5811 (("193")
5812 (number->string (+ 193 size-diff)))
5813 (("bytes(.)22-33" all delimiter)
5814 (string-append "bytes"
5815 delimiter
5816 (number->string (+ 22 size-diff))
5817 "-"
5818 (number->string (+ 33 size-diff))))))
5819 #t))
5820 (add-before 'reset-gzip-timestamps 'make-files-writable
5821 (lambda* (#:key outputs #:allow-other-keys)
5822 ;; Make sure .gz files are writable so that the
5823 ;; 'reset-gzip-timestamps' phase can do its work.
5824 (let ((out (assoc-ref outputs "out")))
5825 (for-each make-file-writable
5826 (find-files out "\\.gz$"))
5827 #t))))))
5828 (native-inputs
5829 `(("ruby-minitest" ,ruby-minitest)
5830 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
5831 ("which" ,which)))
5832 (propagated-inputs
5833 `(("ruby-concurrent" ,ruby-concurrent)))
5834 (synopsis "Unified web application interface for Ruby")
5835 (description "Rack provides a minimal, modular and adaptable interface for
5836 developing web applications in Ruby. By wrapping HTTP requests and responses,
5837 it unifies the API for web servers, web frameworks, and software in between
5838 into a single method call.")
5839 (home-page "https://rack.github.io/")
5840 (license license:expat)))
5841
5842 (define-public ruby-rack-test
5843 (package
5844 (name "ruby-rack-test")
5845 (version "0.8.3")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (rubygems-uri "rack-test" version))
5850 (sha256
5851 (base32
5852 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
5853 (build-system ruby-build-system)
5854 (arguments
5855 ;; Disable tests because of circular dependencies: requires sinatra,
5856 ;; which requires rack-protection, which requires rack-test. Instead
5857 ;; simply require the library.
5858 `(#:phases
5859 (modify-phases %standard-phases
5860 (replace 'check
5861 (lambda _
5862 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
5863 (propagated-inputs
5864 `(("ruby-rack" ,ruby-rack)))
5865 (synopsis "Testing API for Rack applications")
5866 (description
5867 "Rack::Test is a small, simple testing API for Rack applications. It can
5868 be used on its own or as a reusable starting point for Web frameworks and
5869 testing libraries to build on.")
5870 (home-page "https://github.com/rack-test/rack-test")
5871 (license license:expat)))
5872
5873 (define-public ruby-rack-protection
5874 (package
5875 (name "ruby-rack-protection")
5876 (version "2.0.5")
5877 (source
5878 (origin
5879 (method url-fetch)
5880 (uri (rubygems-uri "rack-protection" version))
5881 (sha256
5882 (base32
5883 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
5884 (build-system ruby-build-system)
5885 (arguments
5886 '(;; Tests missing from the gem.
5887 #:tests? #f))
5888 (propagated-inputs
5889 `(("ruby-rack" ,ruby-rack)))
5890 (native-inputs
5891 `(("bundler" ,bundler)
5892 ("ruby-rspec" ,ruby-rspec-2)
5893 ("ruby-rack-test" ,ruby-rack-test)))
5894 (synopsis "Rack middleware that protects against typical web attacks")
5895 (description "Rack middleware that can be used to protect against typical
5896 web attacks. It can protect all Rack apps, including Rails. For instance, it
5897 protects against cross site request forgery, cross site scripting,
5898 clickjacking, directory traversal, session hijacking and IP spoofing.")
5899 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
5900 (license license:expat)))
5901
5902 (define-public ruby-rainbow
5903 (package
5904 (name "ruby-rainbow")
5905 (version "3.0.0")
5906 (source
5907 (origin
5908 (method url-fetch)
5909 (uri (rubygems-uri "rainbow" version))
5910 (sha256
5911 (base32
5912 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
5913 (build-system ruby-build-system)
5914 (arguments
5915 '(#:phases
5916 (modify-phases %standard-phases
5917 ;; Run rspec directly, to avoid requiring Rubocop which is used from
5918 ;; the Rakefile.
5919 (replace 'check
5920 (lambda* (#:key tests? #:allow-other-keys)
5921 (when tests?
5922 (invoke "rspec"))
5923 #t)))))
5924 (native-inputs
5925 `(("bundler" ,bundler)
5926 ("ruby-rspec" ,ruby-rspec)))
5927 (synopsis "Colorize printed text on ANSI terminals")
5928 (description
5929 "@code{rainbow} provides a string presenter object to colorize strings by
5930 wrapping them in ANSI escape codes.")
5931 (home-page "https://github.com/sickill/rainbow")
5932 (license license:expat)))
5933
5934 (define-public ruby-rr
5935 (package
5936 (name "ruby-rr")
5937 (version "1.2.1")
5938 (source
5939 (origin
5940 (method url-fetch)
5941 (uri (rubygems-uri "rr" version))
5942 (sha256
5943 (base32
5944 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
5945 (build-system ruby-build-system)
5946 (arguments
5947 '(#:tests? #f)) ; test files not included
5948 (native-inputs
5949 `(("bundler" ,bundler)
5950 ("ruby-rspec" ,ruby-rspec)))
5951 (synopsis "Ruby test double framework")
5952 (description
5953 "RR is a test double framework that features a rich selection of double
5954 techniques and a terse syntax.")
5955 (home-page "https://rr.github.io/rr/")
5956 (license license:expat)))
5957
5958 (define-public ruby-rest-client
5959 (package
5960 (name "ruby-rest-client")
5961 (version "2.0.2")
5962 (source
5963 (origin
5964 (method url-fetch)
5965 (uri (rubygems-uri "rest-client" version))
5966 (sha256
5967 (base32
5968 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
5969 (build-system ruby-build-system)
5970 (arguments
5971 '(#:phases
5972 (modify-phases %standard-phases
5973 (add-before 'check 'remove-unnecessary-development-dependencies
5974 (lambda _
5975 (substitute* "rest-client.gemspec"
5976 ;; Remove rubocop as it's unused. Rubocop also indirectly
5977 ;; depends on this package through ruby-parser and ruby-ast so
5978 ;; this avoids a dependency loop.
5979 ((".*rubocop.*") "\n")
5980 ;; Remove pry as it's unused, it's a debugging tool
5981 ((".*pry.*") "\n")
5982 ;; Remove an unnecessarily strict rdoc dependency
5983 ((".*rdoc.*") "\n"))
5984 #t))
5985 (add-before 'check 'delete-network-dependent-tests
5986 (lambda _
5987 (delete-file "spec/integration/request_spec.rb")
5988 (delete-file "spec/integration/httpbin_spec.rb")
5989 #t)))))
5990 (propagated-inputs
5991 `(("ruby-http-cookie" ,ruby-http-cookie)
5992 ("ruby-mime-types" ,ruby-mime-types)
5993 ("ruby-netrc" ,ruby-netrc)))
5994 (native-inputs
5995 `(("bundler" ,bundler)
5996 ("ruby-webmock" ,ruby-webmock-2)
5997 ("ruby-rspec" ,ruby-rspec)))
5998 (synopsis "Simple HTTP and REST client for Ruby")
5999 (description
6000 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6001 inspired by the Sinatra microframework style of specifying actions:
6002 @code{get}, @code{put}, @code{post}, @code{delete}.")
6003 (home-page "https://github.com/rest-client/rest-client")
6004 (license license:expat)))
6005
6006 (define-public ruby-rubocop
6007 (package
6008 (name "ruby-rubocop")
6009 (version "0.77.0")
6010 (source
6011 (origin
6012 (method url-fetch)
6013 (uri (rubygems-uri "rubocop" version))
6014 (sha256
6015 (base32
6016 "0m88b1bgbhmmbdnz2xv6n0il0j4q5qm9jbc0vf1zsaxmxqp06nx9"))))
6017 (build-system ruby-build-system)
6018 (arguments
6019 '(;; No included tests
6020 #:tests? #f))
6021 (propagated-inputs
6022 `(("ruby-parser" ,ruby-parser)
6023 ("ruby-powerpack" ,ruby-powerpack)
6024 ("ruby-rainbow" ,ruby-rainbow)
6025 ("ruby-progressbar" ,ruby-progressbar)
6026 ("ruby-parallel" ,ruby-parallel)
6027 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
6028 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
6029 (synopsis "Ruby code style checking tool")
6030 (description
6031 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
6032 the community-driven Ruby Style Guide.")
6033 (home-page "https://github.com/rubocop-hq/rubocop")
6034 (license license:expat)))
6035
6036 (define-public ruby-contest
6037 (package
6038 (name "ruby-contest")
6039 (version "0.1.3")
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (rubygems-uri "contest" version))
6044 (sha256
6045 (base32
6046 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
6047 (build-system ruby-build-system)
6048 (synopsis "Write declarative tests using nested contexts")
6049 (description
6050 "Contest allows writing declarative @code{Test::Unit} tests using nested
6051 contexts without performance penalties.")
6052 (home-page "https://github.com/citrusbyte/contest")
6053 (license license:expat)))
6054
6055 (define-public ruby-creole
6056 (package
6057 (name "ruby-creole")
6058 (version "0.5.0")
6059 (source
6060 (origin
6061 (method url-fetch)
6062 (uri (rubygems-uri "creole" version))
6063 (sha256
6064 (base32
6065 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
6066 (build-system ruby-build-system)
6067 (native-inputs
6068 `(("ruby-bacon" ,ruby-bacon)))
6069 (synopsis "Creole markup language converter")
6070 (description
6071 "Creole is a lightweight markup language and this library for converting
6072 creole to @code{HTML}.")
6073 (home-page "https://github.com/minad/creole")
6074 (license license:ruby)))
6075
6076 (define-public ruby-docile
6077 (package
6078 (name "ruby-docile")
6079 (version "1.1.5")
6080 (source
6081 (origin
6082 (method url-fetch)
6083 (uri (rubygems-uri "docile" version))
6084 (sha256
6085 (base32
6086 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
6087 (build-system ruby-build-system)
6088 (arguments
6089 '(#:tests? #f)) ; needs github-markup, among others
6090 (synopsis "Ruby EDSL helper library")
6091 (description "Docile is a Ruby library that provides an interface for
6092 creating embedded domain specific languages (EDSLs) that manipulate existing
6093 Ruby classes.")
6094 (home-page "https://ms-ati.github.io/docile/")
6095 (license license:expat)))
6096
6097 (define-public ruby-middleware
6098 (package
6099 (name "ruby-middleware")
6100 (version "0.1.0")
6101 (source
6102 (origin
6103 (method url-fetch)
6104 (uri (rubygems-uri "middleware" version))
6105 (sha256
6106 (base32
6107 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
6108 (build-system ruby-build-system)
6109 (arguments '(#:tests? #f)) ;no test suite
6110 (synopsis "Implementation of a middleware abstraction for Ruby")
6111 (description "Middleware is a generalized implementation of a middleware
6112 abstraction for Ruby.")
6113 (home-page "https://github.com/mitchellh/middleware")
6114 (license license:expat)))
6115
6116 (define-public ruby-benchmark-ips
6117 (package
6118 (name "ruby-benchmark-ips")
6119 (version "2.8.2")
6120 (source
6121 (origin
6122 (method url-fetch)
6123 (uri (rubygems-uri "benchmark-ips" version))
6124 (sha256
6125 (base32
6126 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
6127 (build-system ruby-build-system)
6128 (native-inputs
6129 `(("ruby-hoe" ,ruby-hoe)))
6130 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
6131 (description "Benchmark-ips enhances the Ruby Benchmark module with the
6132 iterations per second count. For short snippets of code, it can automatically
6133 figure out how many times to run the code to get interesting data.")
6134 (home-page "https://github.com/evanphx/benchmark-ips")
6135 (license license:expat)))
6136
6137 (define-public ruby-ffi-rzmq-core
6138 (package
6139 (name "ruby-ffi-rzmq-core")
6140 (version "1.0.7")
6141 (source
6142 (origin
6143 (method url-fetch)
6144 (uri (rubygems-uri "ffi-rzmq-core" version))
6145 (sha256
6146 (base32
6147 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
6148 (build-system ruby-build-system)
6149 (arguments
6150 `(#:phases
6151 (modify-phases %standard-phases
6152 (add-after 'unpack 'patch-libzmq-search-path
6153 (lambda* (#:key inputs #:allow-other-keys)
6154 (let ((zeromq (assoc-ref inputs "zeromq")))
6155 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
6156 (("/usr/local/lib")
6157 (string-append zeromq "/lib")))
6158 #t)))
6159 (replace 'check
6160 (lambda _
6161 (invoke "rspec"))))))
6162 (native-inputs
6163 `(("ruby-rspec" ,ruby-rspec)))
6164 (inputs
6165 `(("zeromq" ,zeromq)))
6166 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
6167 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
6168 (description "This library only provides the FFI wrapper for the ZeroMQ
6169 networking library. It can be used to implement a Ruby API for the ZeroMQ
6170 library.")
6171 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
6172 (license license:expat)))
6173
6174 (define-public ruby-ffi-rzmq
6175 (package
6176 (name "ruby-ffi-rzmq")
6177 (version "2.0.7")
6178 (source
6179 (origin
6180 (method url-fetch)
6181 (uri (rubygems-uri "ffi-rzmq" version))
6182 (sha256
6183 (base32
6184 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
6185 (build-system ruby-build-system)
6186 (arguments '(#:tests? #t
6187 #:phases (modify-phases %standard-phases
6188 (replace 'check
6189 (lambda _
6190 (invoke "rspec"))))))
6191 (native-inputs
6192 `(("ruby-rspec" ,ruby-rspec)))
6193 (propagated-inputs
6194 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
6195 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
6196 (description "This library provides a high-level API that wraps the ZeroMQ
6197 networking library using the Ruby foreign function interface (FFI). It is a
6198 pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
6199 for FFI.")
6200 (home-page "https://github.com/chuckremes/ffi-rzmq")
6201 (license license:expat)))
6202
6203 (define-public ruby-sawyer
6204 (package
6205 (name "ruby-sawyer")
6206 (version "0.8.2")
6207 (source
6208 (origin
6209 (method url-fetch)
6210 (uri (rubygems-uri "sawyer" version))
6211 (sha256
6212 (base32
6213 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
6214 (build-system ruby-build-system)
6215 (propagated-inputs
6216 `(("ruby-addressable" ,ruby-addressable)
6217 ("ruby-faraday" ,ruby-faraday)))
6218 (synopsis "Experimental hypermedia agent for Ruby")
6219 (description "Sawyer is an experimental hypermedia agent for Ruby built on
6220 top of Faraday.")
6221 (home-page "https://github.com/lostisland/sawyer")
6222 (license license:expat)))
6223
6224 (define-public ruby-octokit
6225 (package
6226 (name "ruby-octokit")
6227 (version "4.18.0")
6228 (source
6229 (origin
6230 (method url-fetch)
6231 (uri (rubygems-uri "octokit" version))
6232 (sha256
6233 (base32
6234 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
6235 (build-system ruby-build-system)
6236 (arguments '(#:tests? #f)) ;no test suite in the gem release
6237 (propagated-inputs
6238 `(("ruby-faraday" ,ruby-faraday)
6239 ("ruby-sawyer" ,ruby-sawyer)))
6240 (synopsis "Ruby toolkit for the GitHub API")
6241 (description "Octokit wraps the GitHub API in a flat API client that
6242 follows Ruby conventions and requires little knowledge of REST.")
6243 (home-page "https://github.com/octokit/octokit.rb")
6244 (license license:expat)))
6245
6246 (define-public ruby-chandler
6247 (package
6248 (name "ruby-chandler")
6249 (version "0.9.0")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (rubygems-uri "chandler" version))
6254 (sha256
6255 (base32
6256 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
6257 (build-system ruby-build-system)
6258 (native-inputs
6259 `(("ruby-rubocop" ,ruby-rubocop)))
6260 (propagated-inputs
6261 `(("ruby-netrc" ,ruby-netrc)
6262 ("ruby-octokit" ,ruby-octokit)))
6263 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
6264 (description "Chandler syncs a project's CHANGELOG file entries to
6265 GitHub's release notes to remove the need of manually entering release
6266 notes.")
6267 (home-page "https://github.com/mattbrictson/chandler")
6268 (license license:expat)))
6269
6270 (define-public ruby-pry-byebug
6271 (package
6272 (name "ruby-pry-byebug")
6273 (version "3.9.0")
6274 (source
6275 (origin
6276 (method git-fetch)
6277 (uri (git-reference
6278 (url "https://github.com/deivid-rodriguez/pry-byebug.git")
6279 (commit (string-append "v" version))))
6280 (file-name (git-file-name name version))
6281 (sha256
6282 (base32
6283 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
6284 (build-system ruby-build-system)
6285 (arguments
6286 `(#:phases (modify-phases %standard-phases
6287 (add-before 'check 'set-home
6288 (lambda _
6289 (setenv "HOME" (getcwd))
6290 #t)))))
6291 (native-inputs
6292 `(("ruby-chandler" ,ruby-chandler)
6293 ("ruby-rubocop" ,ruby-rubocop)
6294 ("ruby-simplecov" ,ruby-simplecov)))
6295 (propagated-inputs
6296 `(("ruby-byebug" ,ruby-byebug-11)
6297 ("ruby-pry" ,ruby-pry)))
6298 (synopsis "Step-by-step debugging and stack navigation in Pry")
6299 (description "This package adds step-by-step debugging and stack
6300 navigation capabilities to @code{pry}, using @code{byebug}.")
6301 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
6302 (license license:expat)))
6303
6304 (define-public ruby-binding-of-caller
6305 (package
6306 (name "ruby-binding-of-caller")
6307 (version "0.8.0")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (rubygems-uri "binding_of_caller" version))
6312 (sha256
6313 (base32
6314 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
6315 (build-system ruby-build-system)
6316 ;; Attempting to run the test suite fails with a rake deprecation error
6317 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
6318 (arguments '(#:tests? #f))
6319 (propagated-inputs
6320 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
6321 (synopsis "Retrieve the binding of a method's caller")
6322 (description "The @code{binding_of_caller} module provides the
6323 @code{Binding#of_caller} method. It allows accessing bindings from upper
6324 frames in the call stack and can evaluate code in that context.")
6325 (home-page "https://github.com/banister/binding_of_caller")
6326 (license license:expat)))
6327
6328 (define-public ruby-pry-stack-explorer
6329 (package
6330 (name "ruby-pry-stack-explorer")
6331 (version "0.5.1")
6332 (source
6333 (origin
6334 (method url-fetch)
6335 (uri (rubygems-uri "pry-stack_explorer" version))
6336 (sha256
6337 (base32
6338 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
6339 (build-system ruby-build-system)
6340 (arguments '(#:tests? #f)) ;no test suite in gem release
6341 (propagated-inputs
6342 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
6343 ("ruby-pry" ,ruby-pry)))
6344 (synopsis "Call-stack navigation plugin for the Pry REPL")
6345 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
6346 add support to navigate the call-stack.")
6347 (home-page "https://github.com/pry/pry-stack_explorer")
6348 (license license:expat)))
6349
6350 (define-public ruby-varint
6351 (package
6352 (name "ruby-varint")
6353 (version "0.1.1")
6354 (source
6355 (origin
6356 (method url-fetch)
6357 (uri (rubygems-uri "varint" version))
6358 (sha256
6359 (base32
6360 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
6361 (build-system ruby-build-system)
6362 (arguments '(#:tests? #f)) ;no test suite
6363 (synopsis "Variable length integers (varint) C extension for Ruby")
6364 (description "This package provides a small C extension to speed up
6365 variable length integers (varint) in Ruby Protocol Buffers.")
6366 (home-page "https://github.com/liquidm/varint")
6367 (license license:bsd-3)))
6368
6369 (define-public ruby-ruby-prof
6370 (package
6371 (name "ruby-ruby-prof")
6372 (version "1.4.1")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (rubygems-uri "ruby-prof" version))
6377 (sha256
6378 (base32
6379 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
6380 (build-system ruby-build-system)
6381 (arguments
6382 `(#:phases
6383 (modify-phases %standard-phases
6384 (add-after 'unpack 'patch-rakefile
6385 ;; This fixes the following error: "NameError: uninitialized
6386 ;; constant Bundler::GemHelper" (see:
6387 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
6388 (lambda _
6389 (substitute* "Rakefile"
6390 ((".*require \"bundler/setup\".*" all)
6391 (string-append all " require 'bundler/gem_tasks'\n")))
6392 #t))
6393 (add-before 'check 'compile
6394 (lambda _
6395 (invoke "rake" "compile"))))))
6396 (native-inputs
6397 `(("bundler" ,bundler)
6398 ("ruby-minitest" ,ruby-minitest)
6399 ("ruby-rake-compiler" ,ruby-rake-compiler)
6400 ("ruby-rdoc" ,ruby-rdoc)))
6401 (synopsis "Fast code profiler for Ruby")
6402 (description "RubyProf is a fast code profiler for Ruby. Its features
6403 include:
6404 @table @asis
6405 @item Speed
6406 Being a C extension, it is many times faster than the standard Ruby profiler.
6407 @item Measurement Modes
6408 It can measure program wall time, process time, object allocations and memory
6409 usage.
6410 @item Reports
6411 A variety of text and cross-referenced HTML reports can be generated.
6412 @item Threads
6413 Profiling multiple threads simultaneously is supported.
6414 @end table")
6415 (home-page "https://github.com/ruby-prof/ruby-prof")
6416 (license license:bsd-2)))
6417
6418 (define-public ruby-cucumber-messages
6419 (package
6420 (name "ruby-cucumber-messages")
6421 (version "12.2.0")
6422 (source (origin
6423 (method git-fetch)
6424 (uri (git-reference
6425 (url "https://github.com/cucumber/messages-ruby.git")
6426 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
6427 (file-name (git-file-name name version))
6428 (sha256
6429 (base32
6430 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
6431 (build-system ruby-build-system)
6432 (arguments
6433 `(#:phases (modify-phases %standard-phases
6434 (add-after 'unpack 'patch-protobuf.rb
6435 (lambda _
6436 (substitute* "rake/protobuf.rb"
6437 (("load 'protobuf/tasks/compile.rake'")
6438 "require 'protobuf/tasks'"))
6439 #t))
6440 (add-before 'build 'compile
6441 (lambda _
6442 (substitute* "Makefile"
6443 (("bundle exec ") "")
6444 (("include default.mk.*" all)
6445 (string-append "#" all)))
6446 (invoke "make")))
6447 (replace 'check
6448 (lambda _
6449 (invoke "rspec"))))))
6450 (propagated-inputs
6451 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
6452 (native-inputs
6453 `(("ruby-rspec" ,ruby-rspec)))
6454 (home-page "https://github.com/cucumber/messages-ruby")
6455 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
6456 (description "Cucumber Messages for Ruby is a library which allows
6457 serialization and deserialization of the protocol buffer messages used in
6458 Cucumber.")
6459 (license license:expat)))
6460
6461 (define-public ruby-gherkin
6462 (package
6463 (name "ruby-gherkin")
6464 (version "14.0.1")
6465 (source (origin
6466 (method git-fetch)
6467 (uri (git-reference
6468 (url "https://github.com/cucumber/gherkin-ruby")
6469 (commit (string-append "v" version))))
6470 (file-name (git-file-name name version))
6471 (sha256
6472 (base32
6473 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
6474 (build-system ruby-build-system)
6475 (native-inputs
6476 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
6477 ("ruby-rspec" ,ruby-rspec)))
6478 (arguments
6479 `(#:test-target "spec"))
6480 (synopsis "Gherkin parser for Ruby")
6481 (description "Gherkin is a parser and compiler for the Gherkin language.
6482 It is intended be used by all Cucumber implementations to parse
6483 @file{.feature} files.")
6484 (home-page "https://github.com/cucumber/gherkin-ruby")
6485 (license license:expat)))
6486
6487 (define-public ruby-gherkin-ruby
6488 (package
6489 (name "ruby-gherkin-ruby")
6490 (version "0.3.2")
6491 (home-page "http://github.com/codegram/gherkin-ruby")
6492 (source (origin
6493 (method url-fetch)
6494 (uri (rubygems-uri "gherkin-ruby" version))
6495 (sha256
6496 (base32
6497 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
6498 (build-system ruby-build-system)
6499 (synopsis "Pure Ruby Gherkin parser")
6500 (description
6501 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
6502 200 lines of code.")
6503 ;; XXX: No license information anywhere but Readme.md.
6504 (license license:expat)))
6505
6506 (define-public ruby-aruba
6507 (package
6508 (name "ruby-aruba")
6509 (version "0.14.14")
6510 (source
6511 (origin
6512 (method url-fetch)
6513 (uri (rubygems-uri "aruba" version))
6514 (sha256
6515 (base32
6516 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
6517 (build-system ruby-build-system)
6518 (arguments
6519 '(#:test-target "spec"
6520 #:phases
6521 (modify-phases %standard-phases
6522 (add-after 'unpack 'patch
6523 (lambda _
6524 (substitute* "spec/aruba/api_spec.rb"
6525 ;; This resolves some errors in the specs
6526 ;;
6527 ;; undefined method `parse' for Time:Class
6528 (("require 'spec_helper'")
6529 "require 'spec_helper'\nrequire 'time'"))
6530 ;; Avoid shebang issues in this spec file
6531 (substitute* "spec/aruba/matchers/command_spec.rb"
6532 (("/usr/bin/env bash")
6533 (which "bash")))
6534 #t))
6535 (add-before 'check 'remove-unnecessary-dependencies
6536 (lambda _
6537 (substitute* "Gemfile"
6538 ((".*byebug.*") "\n")
6539 ((".*pry.*") "\n")
6540 ((".*yaml.*") "\n")
6541 ((".*bcat.*") "\n")
6542 ((".*kramdown.*") "\n")
6543 ((".*rubocop.*") "\n")
6544 ((".*cucumber-pro.*") "\n")
6545 ((".*cucumber.*") "\n")
6546 ((".*license_finder.*") "\n")
6547 ((".*rake.*") "gem 'rake'\n")
6548 ((".*relish.*") "\n"))
6549 (substitute* "aruba.gemspec"
6550 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
6551 "spec.add_runtime_dependency 'cucumber'"))
6552 #t))
6553 (add-before 'check 'set-home
6554 (lambda _ (setenv "HOME" "/tmp") #t)))))
6555 (native-inputs
6556 `(("bundler" ,bundler)
6557 ("ruby-rspec" ,ruby-rspec)
6558 ("ruby-fuubar" ,ruby-fuubar)
6559 ("ruby-simplecov" ,ruby-simplecov)))
6560 (propagated-inputs
6561 `(("ruby-childprocess" ,ruby-childprocess)
6562 ("ruby-contracts" ,ruby-contracts)
6563 ("ruby-cucumber" ,ruby-cucumber)
6564 ("ruby-ffi" ,ruby-ffi)
6565 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
6566 ("ruby-thor" ,ruby-thor)
6567 ("ruby-yard" ,ruby-yard)))
6568 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
6569 (description
6570 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
6571 command-line applications. It supports applications written in any
6572 language.")
6573 (home-page "https://github.com/cucumber/aruba")
6574 (license license:expat)))
6575
6576 ;; A version of ruby-aruba without tests run so that circular dependencies can
6577 ;; be avoided.
6578 (define ruby-aruba-without-tests
6579 (package
6580 (inherit ruby-aruba)
6581 (arguments '(#:tests? #f))
6582 (propagated-inputs
6583 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
6584 ,@(alist-delete "ruby-cucumber"
6585 (package-propagated-inputs ruby-aruba))))
6586 (native-inputs '())))
6587
6588 (define-public ruby-sys-uname
6589 (package
6590 (name "ruby-sys-uname")
6591 (version "1.2.1")
6592 (source
6593 (origin
6594 (method url-fetch)
6595 (uri (rubygems-uri "sys-uname" version))
6596 (sha256
6597 (base32
6598 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
6599 (build-system ruby-build-system)
6600 (arguments
6601 `(#:test-target "spec"))
6602 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
6603 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
6604 (synopsis "Ruby interface for gathering system information")
6605 (description "The sys-uname library provides an interface for gathering
6606 information about your current platform. It allows retrieving information
6607 such as the OS name, OS version, system name, etc.")
6608 (home-page "https://github.com/djberg96/sys-uname")
6609 (license license:asl2.0)))
6610
6611 (define-public ruby-cucumber-create-meta
6612 (package
6613 (name "ruby-cucumber-create-meta")
6614 (version "1.0.0")
6615 (source
6616 (origin
6617 (method url-fetch)
6618 (uri (rubygems-uri "cucumber-create-meta" version))
6619 (sha256
6620 (base32
6621 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
6622 (build-system ruby-build-system)
6623 (arguments
6624 `(#:phases (modify-phases %standard-phases
6625 (add-after 'extract-gemspec 'relax-version-requirements
6626 (lambda _
6627 (substitute* ".gemspec"
6628 ((" 12\\.2")
6629 " 12.1"))
6630 #t))
6631 (replace 'check
6632 (lambda _
6633 (invoke "rspec"))))))
6634 (native-inputs
6635 `(("ruby-rspec" ,ruby-rspec)))
6636 (propagated-inputs
6637 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
6638 ("ruby-sys-uname" ,ruby-sys-uname)))
6639 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
6640 (description "The @code{createMeta} utility function allows generating
6641 system-specific @code{Meta} messages for Cucumber Ruby.")
6642 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
6643 (license license:expat)))
6644
6645 (define-public ruby-cucumber-html-formatter
6646 (package
6647 (name "ruby-cucumber-html-formatter")
6648 (version "7.0.0")
6649 (source
6650 (origin
6651 (method url-fetch)
6652 (uri (rubygems-uri "cucumber-html-formatter" version))
6653 (sha256
6654 (base32
6655 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
6656 (build-system ruby-build-system)
6657 (arguments
6658 `(#:phases (modify-phases %standard-phases
6659 (replace 'check
6660 (lambda _
6661 (invoke "rspec"))))))
6662 (native-inputs
6663 `(("ruby-rspec" ,ruby-rspec)))
6664 (propagated-inputs
6665 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
6666 (synopsis "HTML formatter for Cucumber")
6667 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
6668 runs. It is built on top of cucumber-react and works with any Cucumber
6669 implementation with a protocol buffer formatter that outputs Cucumber
6670 messages.")
6671 (home-page "https://github.com/cucumber/cucumber/tree/\
6672 master/html-formatter/ruby")
6673 (license license:expat)))
6674
6675 (define-public ruby-cucumber
6676 (package
6677 (name "ruby-cucumber")
6678 (version "4.1.0")
6679 (source
6680 (origin
6681 (method git-fetch)
6682 (uri (git-reference
6683 (url "https://github.com/cucumber/cucumber-ruby.git")
6684 (commit (string-append "v" version))))
6685 (file-name (git-file-name name version))
6686 (sha256
6687 (base32
6688 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
6689 (build-system ruby-build-system)
6690 (arguments
6691 '(#:test-target "spec"
6692 #:phases
6693 (modify-phases %standard-phases
6694 (add-after 'extract-gemspec 'strip-version-requirements
6695 (lambda _
6696 (substitute* "cucumber.gemspec"
6697 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
6698 (string-append stripped "\n")))
6699 #t)))))
6700 (propagated-inputs
6701 `(("ruby-builder" ,ruby-builder)
6702 ("ruby-cucumber-core" ,ruby-cucumber-core)
6703 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
6704 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
6705 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
6706 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
6707 ("ruby-diff-lcs" ,ruby-diff-lcs)
6708 ("ruby-gherkin" ,ruby-gherkin)
6709 ("ruby-multi-json" ,ruby-multi-json)
6710 ("ruby-multi-test" ,ruby-multi-test)))
6711 (native-inputs
6712 `(;; Use a untested version of aruba, to avoid a circular dependency, as
6713 ;; ruby-aruba depends on ruby-cucumber.
6714 ("ruby-aruba", ruby-aruba-without-tests)
6715 ("ruby-rspec" ,ruby-rspec)
6716 ("ruby-pry" ,ruby-pry)
6717 ("ruby-nokogiri" ,ruby-nokogiri)
6718 ("ruby-rubocop" ,ruby-rubocop)))
6719 (synopsis "Describe automated tests in plain language")
6720 (description "Cucumber is a tool for running automated tests written in
6721 plain language. It's designed to support a Behaviour Driven Development (BDD)
6722 software development workflow.")
6723 (home-page "https://cucumber.io/")
6724 (license license:expat)))
6725
6726 (define ruby-cucumber-without-tests
6727 (package (inherit ruby-cucumber)
6728 (arguments
6729 '(#:tests? #f))
6730 (native-inputs
6731 '())))
6732
6733 (define-public ruby-coveralls
6734 (package
6735 (name "ruby-coveralls")
6736 (version "0.8.23")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (rubygems-uri "coveralls" version))
6741 (sha256
6742 (base32
6743 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
6744 (build-system ruby-build-system)
6745 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
6746 ;; because of its nonfree, Hippocratic derived license.
6747 (arguments '(#:tests? #f))
6748 (propagated-inputs
6749 `(("ruby-json" ,ruby-json)
6750 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
6751 ("ruby-thor" ,ruby-thor)
6752 ("ruby-tins" ,ruby-tins)))
6753 (synopsis "Ruby implementation of the Coveralls API")
6754 (description "This package provides a Ruby implementation of the Coveralls
6755 API.")
6756 (home-page "https://coveralls.io")
6757 (license license:expat)))
6758
6759 (define-public ruby-unindent
6760 (package
6761 (name "ruby-unindent")
6762 (version "1.0")
6763 (source
6764 (origin
6765 (method url-fetch)
6766 (uri (rubygems-uri "unindent" version))
6767 (sha256
6768 (base32
6769 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
6770 (build-system ruby-build-system)
6771 (synopsis "Ruby method to unindent strings")
6772 (description "This module provides a @code{String#unindent} Ruby method to
6773 unindent strings, which can be useful to unindent multiline strings embedded
6774 in already-indented code.")
6775 (home-page "https://github.com/mynyml/unindent")
6776 (license license:expat)))
6777
6778 (define-public ruby-cucumber-core
6779 (package
6780 (name "ruby-cucumber-core")
6781 (version "7.1.0")
6782 (source
6783 (origin
6784 (method git-fetch)
6785 (uri (git-reference
6786 (url "https://github.com/cucumber/cucumber-ruby-core.git")
6787 (commit (string-append "v" version))))
6788 (file-name (git-file-name name version))
6789 (sha256
6790 (base32
6791 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
6792 (build-system ruby-build-system)
6793 (arguments
6794 `(#:test-target "spec"
6795 #:phases
6796 (modify-phases %standard-phases
6797 (add-after 'extract-gemspec 'relax-version-requirements
6798 (lambda _
6799 (substitute* "cucumber-core.gemspec"
6800 (("'cucumber-tag-expressions',.*")
6801 "'cucumber-tag-expressions', '>=2.0.0'\n"))
6802 #t)))))
6803 (native-inputs
6804 `(("ruby-rspec" ,ruby-rspec)
6805 ("ruby-coveralls" ,ruby-coveralls)
6806 ("ruby-rubocop" ,ruby-rubocop)
6807 ("ruby-simplecov" ,ruby-simplecov)
6808 ("ruby-unindent" ,ruby-unindent)))
6809 (propagated-inputs
6810 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
6811 ("ruby-gherkin" ,ruby-gherkin)
6812 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
6813 (synopsis "Core library for the Cucumber BDD app")
6814 (description "Cucumber is a tool for running automated tests
6815 written in plain language. Because they're written in plain language,
6816 they can be read by anyone on your team. Because they can be read by
6817 anyone, you can use them to help improve communication, collaboration
6818 and trust on your team.")
6819 (home-page "https://cucumber.io/")
6820 (license license:expat)))
6821
6822 (define-public ruby-cucumber-expressions
6823 (package
6824 (name "ruby-cucumber-expressions")
6825 (version "10.2.0")
6826 (source
6827 (origin
6828 (method git-fetch)
6829 (uri (git-reference
6830 (url "https://github.com/cucumber/cucumber-expressions-ruby.git")
6831 (commit (string-append "v" version))))
6832 (file-name (git-file-name name version))
6833 (sha256
6834 (base32
6835 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
6836 (build-system ruby-build-system)
6837 (arguments
6838 '(#:test-target "spec"))
6839 (native-inputs
6840 `(("ruby-rspec" ,ruby-rspec)
6841 ("ruby-simplecov" ,ruby-simplecov)))
6842 (synopsis "Simpler alternative to Regular Expressions")
6843 (description "Cucumber Expressions offer similar functionality to Regular
6844 Expressions, with a syntax that is easier to read and write. Cucumber
6845 Expressions are extensible with parameter types.")
6846 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
6847 (license license:expat)))
6848
6849 (define-public ruby-cucumber-wire
6850 (package
6851 (name "ruby-cucumber-wire")
6852 (version "3.1.0")
6853 (source
6854 (origin
6855 (method url-fetch)
6856 (uri (rubygems-uri "cucumber-wire" version))
6857 (sha256
6858 (base32
6859 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
6860 (build-system ruby-build-system)
6861 (arguments
6862 '(#:tests? #f ;tests use cucumber, causing a cycle
6863 #:phases
6864 (modify-phases %standard-phases
6865 (add-after 'extract-gemspec 'relax-version-requirements
6866 (lambda _
6867 (substitute* ".gemspec"
6868 ((" 10\\.1") " 10.2"))
6869 #t)))))
6870 (propagated-inputs
6871 `(("ruby-cucumber-core" ,ruby-cucumber-core)
6872 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
6873 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
6874 (synopsis "Cucumber wire protocol plugin")
6875 (description "Cucumber's wire protocol allows step definitions to be
6876 implemented and invoked on any platform.")
6877 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
6878 (license license:expat)))
6879
6880 (define-public ruby-cucumber-tag-expressions
6881 (package
6882 (name "ruby-cucumber-tag-expressions")
6883 (version "3.0.0")
6884 (source
6885 (origin
6886 (method git-fetch)
6887 (uri (git-reference
6888 (url "https://github.com/cucumber/tag-expressions-ruby.git")
6889 (commit (string-append "v" version))))
6890 (file-name (git-file-name name version))
6891 (sha256
6892 (base32
6893 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
6894 (build-system ruby-build-system)
6895 (arguments
6896 `(#:test-target "spec"))
6897 (native-inputs
6898 `(("ruby-rspec" ,ruby-rspec)))
6899 (synopsis "Cucumber tag expressions for Ruby")
6900 (description "Cucumber tag expression parser for Ruby. A tag expression
6901 is an infix boolean expression used by Cucumber.")
6902 (home-page "https://github.com/cucumber/tag-expressions-ruby")
6903 (license license:expat)))
6904
6905 (define-public ruby-bindex
6906 (package
6907 (name "ruby-bindex")
6908 (version "0.5.0")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (rubygems-uri "bindex" version))
6913 (sha256
6914 (base32
6915 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
6916 (build-system ruby-build-system)
6917 (arguments
6918 '(#:test-target "default"))
6919 (native-inputs
6920 `(("bundler" ,bundler)
6921 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6922 (synopsis "Provides access for bindings relating to Ruby exceptions")
6923 (description
6924 "@code{bindex} provides a way to access the bindings that relate to
6925 exceptions in Ruby, providing more information about the context in which the
6926 exception occurred.")
6927 (home-page "https://github.com/gsamokovarov/bindex")
6928 (license license:expat)))
6929
6930 (define-public ruby-bio-logger
6931 (package
6932 (name "ruby-bio-logger")
6933 (version "1.0.1")
6934 (source
6935 (origin
6936 (method url-fetch)
6937 (uri (rubygems-uri "bio-logger" version))
6938 (sha256
6939 (base32
6940 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
6941 (build-system ruby-build-system)
6942 (arguments
6943 `(#:tests? #f)) ; rake errors, missing shoulda
6944 (propagated-inputs
6945 `(("ruby-log4r" ,ruby-log4r)))
6946 (synopsis "Log4r wrapper for Ruby")
6947 (description "Bio-logger is a wrapper around Log4r adding extra logging
6948 features such as filtering and fine grained logging.")
6949 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
6950 (license license:expat)))
6951
6952 (define-public ruby-yajl-ruby
6953 (package
6954 (name "ruby-yajl-ruby")
6955 (version "1.4.1")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (rubygems-uri "yajl-ruby" version))
6960 (sha256
6961 (base32
6962 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
6963 (build-system ruby-build-system)
6964 (arguments
6965 '(#:test-target "spec"
6966 #:phases
6967 (modify-phases %standard-phases
6968 (add-before 'check 'patch-test-to-update-load-path
6969 (lambda _
6970 (substitute* "spec/parsing/large_number_spec.rb"
6971 (("require \"yajl\"")
6972 "$LOAD_PATH << 'lib'; require 'yajl'"))
6973 #t)))))
6974 (native-inputs
6975 `(("ruby-rake-compiler" ,ruby-rake-compiler)
6976 ("ruby-rspec" ,ruby-rspec)))
6977 (synopsis "Streaming JSON parsing and encoding library for Ruby")
6978 (description
6979 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
6980 is compatible with the JSON gem, so yajl-ruby can act as a drop in
6981 replacement.
6982
6983 A modified copy of yajl is used, and included in the package.")
6984 (home-page "https://github.com/brianmario/yajl-ruby")
6985 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
6986 license:bsd-3)))) ; Included, modified copy of yajl
6987
6988 (define-public ruby-yard
6989 (package
6990 (name "ruby-yard")
6991 (version "0.9.25")
6992 (source
6993 (origin
6994 (method git-fetch)
6995 ;; Tests do not pass if we build from the distributed gem.
6996 (uri (git-reference
6997 (url "https://github.com/lsegal/yard")
6998 (commit (string-append "v" version))))
6999 (file-name (git-file-name name version))
7000 (sha256
7001 (base32
7002 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
7003 (build-system ruby-build-system)
7004 (arguments
7005 ;; Note: Tests are willfully disabled to alleviate dependency cycle
7006 ;; problems.
7007 `(#:tests? #f))
7008 (synopsis "Documentation generation tool for Ruby")
7009 (description "YARD is a documentation generation tool for the Ruby
7010 programming language. It enables the user to generate consistent, usable
7011 documentation that can be exported to a number of formats very easily, and
7012 also supports extending for custom Ruby constructs such as custom class level
7013 definitions.")
7014 (home-page "https://yardoc.org")
7015 (license license:expat)))
7016
7017 (define-public ruby-yard-with-tests
7018 (package
7019 (inherit ruby-yard)
7020 (name "ruby-yard-with-tests")
7021 (arguments
7022 (substitute-keyword-arguments (package-arguments ruby-yard)
7023 ((#:tests? _ #t) #t)
7024 ((#:test-target _ "default") "default")
7025 ((#:phases phases '%standard-phases)
7026 `(modify-phases ,phases
7027 (add-before 'check 'prepare-for-tests
7028 (lambda* (#:key tests? #:allow-other-keys)
7029 (when tests?
7030 (substitute* "Rakefile"
7031 ((".*[Ss]amus.*") ""))
7032 ;; Delete the Gemfile to avoid errors relating to it.
7033 (delete-file "Gemfile")
7034 ;; $HOME needs to be set to somewhere writeable for tests to
7035 ;; run.
7036 (setenv "HOME" "/tmp"))
7037 #t))))))
7038 (native-inputs
7039 `(("ruby-rspec" ,ruby-rspec)
7040 ("ruby-rack" ,ruby-rack)
7041 ("ruby-redcloth" ,ruby-redcloth)
7042 ("ruby-asciidoc" ,ruby-asciidoctor)))))
7043
7044 (define-public ruby-clap
7045 (package
7046 (name "ruby-clap")
7047 (version "1.0.0")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (rubygems-uri "clap" version))
7051 (sha256
7052 (base32
7053 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
7054 (build-system ruby-build-system)
7055 ;; Clap needs cutest for running tests, but cutest needs clap.
7056 (arguments `(#:tests? #f))
7057 (synopsis "Command line argument parsing for simple applications")
7058 (description
7059 "Clap provides command line argument parsing features. It covers the
7060 simple case of executing code based on the flags or parameters passed.")
7061 (home-page "https://github.com/djanowski/cutest")
7062 (license license:expat)))
7063
7064 (define-public ruby-cutest
7065 (package
7066 (name "ruby-cutest")
7067 (version "1.2.2")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (rubygems-uri "cutest" version))
7071 (sha256
7072 (base32
7073 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
7074 (build-system ruby-build-system)
7075 (propagated-inputs
7076 `(("ruby-clap" ,ruby-clap)))
7077 (synopsis "Run tests in separate processes")
7078 (description
7079 "Cutest runs tests in separate processes to avoid shared state.")
7080 (home-page "https://github.com/djanowski/cutest")
7081 (license license:expat)))
7082
7083 (define-public ruby-pygmentize
7084 (package
7085 (name "ruby-pygmentize")
7086 (version "0.0.3")
7087 (source (origin
7088 (method url-fetch)
7089 (uri (rubygems-uri "pygmentize" version))
7090 (sha256
7091 (base32
7092 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
7093 (build-system ruby-build-system)
7094 (arguments
7095 `(#:phases
7096 (modify-phases %standard-phases
7097 (add-after 'unpack 'fix-pygmentize-path
7098 (lambda _
7099 (substitute* "lib/pygmentize.rb"
7100 (("\"/usr/bin/env python.*")
7101 (string-append "\"" (which "pygmentize") "\"\n")))
7102 #t))
7103 (add-after 'build 'do-not-use-vendor-directory
7104 (lambda _
7105 ;; Remove bundled pygments sources
7106 ;; FIXME: ruby-build-system does not support snippets.
7107 (delete-file-recursively "vendor")
7108 (substitute* "pygmentize.gemspec"
7109 (("\"vendor/\\*\\*/\\*\",") ""))
7110 #t)))))
7111 (inputs
7112 `(("pygments" ,python-pygments)))
7113 (native-inputs
7114 `(("ruby-cutest" ,ruby-cutest)
7115 ("ruby-nokogiri" ,ruby-nokogiri)))
7116 (synopsis "Thin Ruby wrapper around pygmentize")
7117 (description
7118 "Pygmentize provides a simple way to call pygmentize from within a Ruby
7119 application.")
7120 (home-page "https://github.com/djanowski/pygmentize")
7121 (license license:expat)))
7122
7123 (define-public ruby-eventmachine
7124 (package
7125 (name "ruby-eventmachine")
7126 (version "1.2.7")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (rubygems-uri "eventmachine" version))
7131 (sha256
7132 (base32
7133 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
7134 (build-system ruby-build-system)
7135 (arguments
7136 '(#:tests? #f)) ; test suite tries to connect to google.com
7137 (native-inputs
7138 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
7139 (synopsis "Single-threaded network event framework for Ruby")
7140 (description
7141 "EventMachine implements a single-threaded engine for arbitrary network
7142 communications. EventMachine wraps all interactions with sockets, allowing
7143 programs to concentrate on the implementation of network protocols. It can be
7144 used to create both network servers and clients.")
7145 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
7146 (home-page "https://github.com/eventmachine/eventmachine")
7147 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
7148
7149 (define-public ruby-ruby-engine
7150 (package
7151 (name "ruby-ruby-engine")
7152 (version "2.0.0")
7153 (source
7154 (origin
7155 (method url-fetch)
7156 (uri (rubygems-uri "ruby_engine" version))
7157 (sha256
7158 (base32
7159 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
7160 (build-system ruby-build-system)
7161 (arguments
7162 `(#:phases
7163 (modify-phases %standard-phases
7164 (add-after 'extract-gemspec 'clean-up
7165 (lambda _
7166 (delete-file "Gemfile.lock")
7167 (substitute* "ruby_engine.gemspec"
7168 ;; Remove unnecessary imports that would entail further
7169 ;; dependencies.
7170 ((".*<rdoc.*") "")
7171 ((".*<rubygems-tasks.*") "")
7172 ;; Remove extraneous .gem file
7173 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
7174 (("\"Gemfile.lock\".freeze, ") "")
7175 ;; Soften rake dependency
7176 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
7177 "%q<rake>.freeze, [\">= 10.0\"]")
7178 ;; Soften the rspec dependency
7179 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
7180 "%q<rspec>.freeze, [\">= 2.4\"]"))
7181 (substitute* "Rakefile"
7182 (("require 'rubygems/tasks'") "")
7183 (("Gem::Tasks.new") ""))
7184 ;; Remove extraneous .gem file that otherwise gets installed.
7185 (delete-file-recursively "pkg")
7186 #t)))))
7187 (native-inputs
7188 `(("bundler" ,bundler)
7189 ("ruby-rake" ,ruby-rake)
7190 ("ruby-rspec" ,ruby-rspec)))
7191 (synopsis "Simplifies checking for Ruby implementation")
7192 (description
7193 "@code{ruby_engine} provides an RubyEngine class that can be used to
7194 check which implementation of Ruby is in use. It can provide the interpreter
7195 name and provides query methods such as @{RubyEngine.mri?}.")
7196 (home-page "https://github.com/janlelis/ruby_engine")
7197 (license license:expat)))
7198
7199 (define-public ruby-turn
7200 (package
7201 (name "ruby-turn")
7202 (version "0.9.7")
7203 (source
7204 (origin
7205 (method url-fetch)
7206 (uri (rubygems-uri "turn" version))
7207 (sha256
7208 (base32
7209 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
7210 (build-system ruby-build-system)
7211 (arguments
7212 `(#:phases
7213 (modify-phases %standard-phases
7214 ;; Tests fail because turn changes its environment so can no longer
7215 ;; find test/unit. Instead simply test if the executable runs
7216 ;; without issue.
7217 (replace 'check
7218 (lambda _
7219 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
7220 (propagated-inputs
7221 `(("ruby-ansi" ,ruby-ansi)
7222 ("ruby-minitest" ,ruby-minitest-4)))
7223 (synopsis "Alternate set of alternative runners for MiniTest")
7224 (description
7225 "TURN provides a set of alternative runners for MiniTest which are both
7226 colorful and informative. TURN displays each test on a separate line with
7227 failures being displayed immediately instead of at the end of the tests. Note
7228 that TURN is no longer being maintained.")
7229 (home-page "https://rubygems.org/gems/turn")
7230 (license license:expat)))
7231
7232 (define-public ruby-mimemagic
7233 (package
7234 (name "ruby-mimemagic")
7235 (version "0.3.3")
7236 (source
7237 (origin
7238 (method url-fetch)
7239 (uri (rubygems-uri "mimemagic" version))
7240 (sha256
7241 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
7242 (build-system ruby-build-system)
7243 (arguments
7244 '(#:phases
7245 (modify-phases %standard-phases
7246 ;; This phase breaks the tests, as it patches some of the test data.
7247 (delete 'patch-source-shebangs))))
7248 (native-inputs
7249 `(("ruby-bacon" ,ruby-bacon)))
7250 (synopsis "Ruby library for MIME detection by extension or content")
7251 (description
7252 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
7253 extension or content, using the freedesktop.org.xml shared-mime-info
7254 database.")
7255 (home-page "https://github.com/minad/mimemagic")
7256 (license license:expat)))
7257
7258 (define-public ruby-mime-types-data
7259 (package
7260 (name "ruby-mime-types-data")
7261 (version "3.2016.0521")
7262 (source
7263 (origin
7264 (method url-fetch)
7265 (uri (rubygems-uri "mime-types-data" version))
7266 (sha256
7267 (base32
7268 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
7269 (build-system ruby-build-system)
7270 (native-inputs
7271 `(("ruby-hoe" ,ruby-hoe)))
7272 (synopsis "Registry for information about MIME media type definitions")
7273 (description
7274 "@code{mime-types-data} provides a registry for information about
7275 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
7276 be used with the Ruby mime-types library or other software to determine
7277 defined filename extensions for MIME types, or to use filename extensions to
7278 look up the likely MIME type definitions.")
7279 (home-page "https://github.com/mime-types/mime-types-data/")
7280 (license license:expat)))
7281
7282 (define-public ruby-mime-types
7283 (package
7284 (name "ruby-mime-types")
7285 (version "3.1")
7286 (source
7287 (origin
7288 (method url-fetch)
7289 (uri (rubygems-uri "mime-types" version))
7290 (sha256
7291 (base32
7292 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
7293 (build-system ruby-build-system)
7294 (propagated-inputs
7295 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
7296 (native-inputs
7297 `(("ruby-hoe" ,ruby-hoe)
7298 ("ruby-fivemat" ,ruby-fivemat)
7299 ("ruby-minitest-focus" ,ruby-minitest-focus)
7300 ("ruby-minitest-rg" ,ruby-minitest-rg)
7301 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
7302 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
7303 (synopsis "Library and registry for MIME content type definitions")
7304 (description "The mime-types library provides a library and registry for
7305 information about Multipurpose Internet Mail Extensions (MIME) content type
7306 definitions. It can be used to determine defined filename extensions for MIME
7307 types, or to use filename extensions to look up the likely MIME type
7308 definitions.")
7309 (home-page "https://github.com/mime-types/ruby-mime-types")
7310 (license license:expat)))
7311
7312 (define-public ruby-fivemat
7313 (package
7314 (name "ruby-fivemat")
7315 (version "1.3.7")
7316 (source
7317 (origin
7318 (method url-fetch)
7319 (uri (rubygems-uri "fivemat" version))
7320 (sha256
7321 (base32
7322 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
7323 (build-system ruby-build-system)
7324 (arguments
7325 `(#:tests? #f)) ; no tests
7326 (synopsis "Each test file given its own line of dots")
7327 (description
7328 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
7329 its own line of dots during testing. It aims to provide test output that is
7330 neither too verbose nor too minimal.")
7331 (home-page "https://github.com/tpope/fivemat")
7332 (license license:expat)))
7333
7334 (define-public ruby-sqlite3
7335 (package
7336 (name "ruby-sqlite3")
7337 (version "1.4.2")
7338 (source
7339 (origin
7340 (method url-fetch)
7341 (uri (rubygems-uri "sqlite3" version))
7342 (sha256
7343 (base32
7344 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
7345 (build-system ruby-build-system)
7346 (arguments
7347 `(#:phases
7348 (modify-phases %standard-phases
7349 (add-before 'check 'add-gemtest-file
7350 ;; This file exists in the repository but is not distributed.
7351 (lambda _ (invoke "touch" ".gemtest"))))))
7352 (inputs
7353 `(("sqlite" ,sqlite)))
7354 (native-inputs
7355 `(("ruby-hoe" ,ruby-hoe)
7356 ("ruby-rake-compiler" ,ruby-rake-compiler)
7357 ("ruby-mini-portile" ,ruby-mini-portile)))
7358 (synopsis "Interface with SQLite3 databases")
7359 (description
7360 "This module allows Ruby programs to interface with the SQLite3 database
7361 engine.")
7362 (home-page
7363 "https://github.com/sparklemotion/sqlite3-ruby")
7364 (license license:bsd-3)))
7365
7366 (define-public ruby-shoulda-context
7367 (package
7368 (name "ruby-shoulda-context")
7369 (version "1.2.2")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (rubygems-uri "shoulda-context" version))
7374 (sha256
7375 (base32
7376 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
7377 (build-system ruby-build-system)
7378 (arguments
7379 `(#:phases
7380 (modify-phases %standard-phases
7381 (replace 'check
7382 (lambda _
7383 ;; Do not run tests to avoid circular dependence with rails.
7384 ;; Instead just import the library to test.
7385 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
7386 (synopsis "Test::Unit context framework extracted from Shoulda")
7387 (description
7388 "@code{shoulda-context} is the context framework extracted from Shoulda.
7389 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
7390 context, setup, and should blocks combine to produce natural test method
7391 names.")
7392 (home-page "https://github.com/thoughtbot/shoulda-context")
7393 (license license:expat)))
7394
7395 (define-public ruby-shoulda-matchers
7396 (package
7397 (name "ruby-shoulda-matchers")
7398 (version "3.1.2")
7399 (source
7400 (origin
7401 (method url-fetch)
7402 (uri (rubygems-uri "shoulda-matchers" version))
7403 (sha256
7404 (base32
7405 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
7406 (build-system ruby-build-system)
7407 (arguments
7408 `(#:phases
7409 (modify-phases %standard-phases
7410 (replace 'check
7411 (lambda _
7412 ;; Do not run tests to avoid circular dependence with rails. Instead
7413 ;; just import the library to test.
7414 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
7415 (propagated-inputs
7416 `(("ruby-activesupport" ,ruby-activesupport)))
7417 (synopsis "Collection of testing matchers extracted from Shoulda")
7418 (description
7419 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
7420 test common Rails functionality. These tests would otherwise be much longer,
7421 more complex, and error-prone.")
7422 (home-page "https://github.com/thoughtbot/shoulda-matchers")
7423 (license license:expat)))
7424
7425 (define-public ruby-shoulda-matchers-2
7426 (package
7427 (inherit ruby-shoulda-matchers)
7428 (version "2.8.0")
7429 (source (origin
7430 (method url-fetch)
7431 (uri (rubygems-uri "shoulda-matchers" version))
7432 (sha256
7433 (base32
7434 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
7435
7436 (define-public ruby-shoulda
7437 (package
7438 (name "ruby-shoulda")
7439 (version "3.5.0")
7440 (source
7441 (origin
7442 (method url-fetch)
7443 (uri (rubygems-uri "shoulda" version))
7444 (sha256
7445 (base32
7446 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
7447 (build-system ruby-build-system)
7448 (arguments
7449 `(#:phases
7450 (modify-phases %standard-phases
7451 (replace 'check
7452 ;; Don't run tests to avoid circular dependence with rails. Instead
7453 ;; just import the library to test.
7454 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
7455 (propagated-inputs
7456 `(("ruby-shoulda-context" ,ruby-shoulda-context)
7457 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
7458 (synopsis "Context framework and matchers for testing")
7459 (description
7460 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
7461 @code{shoulda-matchers} providing tools for writing tests.")
7462 (home-page "https://github.com/thoughtbot/shoulda")
7463 (license license:expat)))
7464
7465 (define-public ruby-unf
7466 (package
7467 (name "ruby-unf")
7468 (version "0.1.4")
7469 (source
7470 (origin
7471 (method url-fetch)
7472 (uri (rubygems-uri "unf" version))
7473 (sha256
7474 (base32
7475 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
7476 (build-system ruby-build-system)
7477 (arguments
7478 `(#:phases
7479 (modify-phases %standard-phases
7480 (add-before 'check 'add-dependency-to-bundler
7481 (lambda _
7482 ;; test-unit is required but not provided by the bundler
7483 ;; environment. This is fixed in the upstream repository but fix
7484 ;; has not been released.
7485 (substitute* "Gemfile"
7486 (("^gemspec") "gem 'test-unit'\ngemspec"))
7487 #t)))))
7488 (propagated-inputs
7489 `(("ruby-unf-ext" ,ruby-unf-ext)))
7490 (native-inputs
7491 `(("ruby-shoulda" ,ruby-shoulda)
7492 ("bundler" ,bundler)
7493 ("ruby-test-unit" ,ruby-test-unit)))
7494 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
7495 (description
7496 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
7497 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
7498 @code{java.text.Normalizer} on JRuby.")
7499 (home-page "https://github.com/knu/ruby-unf")
7500 (license license:bsd-2)))
7501
7502 (define-public ruby-warden
7503 (package
7504 (name "ruby-warden")
7505 (version "1.2.8")
7506 (source
7507 (origin
7508 (method url-fetch)
7509 (uri (rubygems-uri "warden" version))
7510 (sha256
7511 (base32
7512 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
7513 (build-system ruby-build-system)
7514 (arguments
7515 '(#:tests? #f)) ; No included tests
7516 (propagated-inputs
7517 `(("ruby-rack" ,ruby-rack)))
7518 (synopsis "Rack middleware providing authentication")
7519 (description
7520 "Warden is a Rack-based middleware that provides a mechanism for
7521 authentication in Ruby web applications.")
7522 (home-page "https://github.com/wardencommunity/warden")
7523 (license license:expat)))
7524
7525 (define-public ruby-warden-oauth2
7526 (package
7527 (name "ruby-warden-oauth2")
7528 (version "0.0.1")
7529 (source
7530 (origin
7531 (method url-fetch)
7532 (uri (rubygems-uri "warden-oauth2" version))
7533 (sha256
7534 (base32
7535 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
7536 (build-system ruby-build-system)
7537 (arguments
7538 '(#:test-target "spec"
7539 #:phases
7540 (modify-phases %standard-phases
7541 (add-after 'unpack 'remove-unnecessary-dependencies
7542 (lambda _
7543 (substitute* "Gemfile"
7544 ;; All of these gems relate to development, and are unnecessary
7545 ;; when running the tests
7546 (("gem 'guard-bundler'") "")
7547 (("gem 'guard'") "")
7548 (("gem 'guard-rspec'") "")
7549 (("gem 'rb-fsevent'") "")
7550 (("gem 'pry'") "")
7551 (("gem 'growl'") ""))
7552 #t))
7553 ;; The test suite doesn't work with rspec@2, and this is incompatible
7554 ;; with the current version of Rake, so invoke Rspec directly
7555 (replace 'check
7556 (lambda* (#:key tests? #:allow-other-keys)
7557 (when tests?
7558 (invoke "bundle" "exec" "rspec"))
7559 #t)))))
7560 (propagated-inputs
7561 `(("ruby-warden" ,ruby-warden)))
7562 (native-inputs
7563 `(("bundler" ,bundler)
7564 ("ruby-rspec" ,ruby-rspec-2)
7565 ("ruby-rack-test" ,ruby-rack-test)))
7566 (synopsis "OAuth 2.0 strategies for Warden")
7567 (description
7568 "This library extends Warden to support OAuth 2.0 authorized API
7569 requests.")
7570 (home-page "https://github.com/opperator/warden-oauth2")
7571 (license license:expat)))
7572
7573 (define-public ruby-webmock-2
7574 (package
7575 (name "ruby-webmock")
7576 (version "2.3.2")
7577 (source
7578 (origin
7579 (method url-fetch)
7580 (uri (rubygems-uri "webmock" version))
7581 (sha256
7582 (base32
7583 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
7584 (build-system ruby-build-system)
7585 (native-inputs
7586 `(("bundler" ,bundler)
7587 ("ruby-rspec" ,ruby-rspec)))
7588 (propagated-inputs
7589 `(("ruby-addressable" ,ruby-addressable)
7590 ("ruby-crack" ,ruby-crack)
7591 ("ruby-hashdiff" ,ruby-hashdiff)))
7592 (synopsis "Allows stubbing and setting expectations on HTTP requests")
7593 (description
7594 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
7595 requests. This is useful when testing software.")
7596 (home-page "https://github.com/bblimke/webmock")
7597 (license license:expat)))
7598
7599 (define-public ruby-unicode-display-width
7600 (package
7601 (name "ruby-unicode-display-width")
7602 (version "1.6.0")
7603 (source
7604 (origin
7605 (method url-fetch)
7606 (uri (rubygems-uri "unicode-display_width" version))
7607 (sha256
7608 (base32
7609 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
7610 (build-system ruby-build-system)
7611 (arguments
7612 '(;; Test data not included.
7613 #:tests? #f))
7614 (synopsis "Determine the monospace display width of Ruby strings")
7615 (description
7616 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
7617 display width of strings in Ruby.")
7618 (home-page "https://github.com/janlelis/unicode-display_width")
7619 (license license:expat)))
7620
7621 ;; There is another gem called 'ruby-version' so we use an underscore in this
7622 ;; name
7623 (define-public ruby_version
7624 (package
7625 (name "ruby_version")
7626 (version "1.0.2")
7627 (source
7628 (origin
7629 (method url-fetch)
7630 (uri (rubygems-uri "ruby_version" version))
7631 (sha256
7632 (base32
7633 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
7634 (build-system ruby-build-system)
7635 (arguments
7636 `(#:phases
7637 (modify-phases %standard-phases
7638 (add-before 'check 'fix-dependencies
7639 (lambda _
7640 ;; Remove the Gemfile.lock, as we want to use Guix packages at
7641 ;; whatever versions.
7642 (delete-file "Gemfile.lock")
7643 ;; Remove the included gem files as they unnecessary.
7644 (delete-file-recursively "pkg/")
7645 ;; Accept any version of rake, rdoc and rspec
7646 (substitute* "ruby_version.gemspec"
7647 (("%q<rake.*") "%q<rake>)\n")
7648 (("%q<rdoc.*") "%q<rdoc>)\n")
7649 (("%q<rspec.*") "%q<rspec>)\n"))
7650 ;; Do not use bundler.
7651 (substitute* "Rakefile"
7652 (("Bundler\\.setup.*") "nil\n"))
7653 #t)))))
7654 (native-inputs
7655 `(("ruby-rdoc" ,ruby-rdoc)
7656 ("ruby-rspec" ,ruby-rspec)
7657 ("ruby-rubygems-tasks", ruby-rubygems-tasks)))
7658 (synopsis "Ruby library to help check the Ruby version")
7659 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
7660 checking for the right Ruby version in software.")
7661 (home-page "https://github.com/janlelis/ruby_version")
7662 (license license:expat)))
7663
7664 (define-public ruby-websocket-driver
7665 (package
7666 (name "ruby-websocket-driver")
7667 (version "0.7.1")
7668 (source
7669 (origin
7670 (method url-fetch)
7671 (uri (rubygems-uri "websocket-driver" version))
7672 (sha256
7673 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
7674 (build-system ruby-build-system)
7675 (arguments
7676 '(#:tests? #f)) ; no included tests
7677 (propagated-inputs
7678 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
7679 (synopsis "WebSocket protocol handler with pluggable I/O")
7680 (description
7681 "@code{websocket-driver} provides a complete implementation of the
7682 WebSocket protocols that can be hooked up to any TCP library")
7683 (home-page "https://github.com/faye/websocket-driver-ruby")
7684 (license license:expat)))
7685
7686 (define-public ruby-websocket-extensions
7687 (package
7688 (name "ruby-websocket-extensions")
7689 (version "0.1.3")
7690 (source
7691 (origin
7692 (method url-fetch)
7693 (uri (rubygems-uri "websocket-extensions" version))
7694 (sha256
7695 (base32
7696 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
7697 (build-system ruby-build-system)
7698 (arguments
7699 '(;; No included tests
7700 #:tests? #f))
7701 (synopsis "Generic extension manager for WebSocket connections")
7702 (description
7703 "@code{websocket-extensions} provides a container for registering
7704 extension plugins.")
7705 (home-page "https://github.com/faye/websocket-extensions-ruby")
7706 (license license:expat)))
7707
7708 (define-public ruby-domain-name
7709 (package
7710 (name "ruby-domain-name")
7711 (version "0.5.20180417")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (rubygems-uri "domain_name" version))
7716 (sha256
7717 (base32
7718 "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"))))
7719 (build-system ruby-build-system)
7720 (arguments
7721 `(#:phases
7722 (modify-phases %standard-phases
7723 (add-before 'check 'fix-versions
7724 (lambda _
7725 ;; Fix NameError that appears to already be fixed upstream.
7726 (substitute* "Rakefile"
7727 (("DomainName::VERSION")
7728 "Bundler::GemHelper.gemspec.version"))
7729 ;; Loosen unnecessarily strict test-unit version specification.
7730 (substitute* "domain_name.gemspec"
7731 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
7732 #t)))))
7733 (propagated-inputs
7734 `(("ruby-unf" ,ruby-unf)))
7735 (native-inputs
7736 `(("ruby-shoulda" ,ruby-shoulda)
7737 ("bundler" ,bundler)
7738 ("ruby-test-unit" ,ruby-test-unit)))
7739 (synopsis "Domain name manipulation library")
7740 (description
7741 "@code{domain_name} is a Domain name manipulation library. It parses a
7742 domain name ready for extracting the registered domain and TLD (Top Level
7743 Domain). It can also be used for cookie domain validation based on the Public
7744 Suffix List.")
7745 (home-page "https://github.com/knu/ruby-domain_name")
7746 (license license:bsd-2)))
7747
7748 (define-public ruby-http-cookie
7749 (package
7750 (name "ruby-http-cookie")
7751 (version "1.0.3")
7752 (source
7753 (origin
7754 (method url-fetch)
7755 (uri (rubygems-uri "http-cookie" version))
7756 (sha256
7757 (base32
7758 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
7759 (build-system ruby-build-system)
7760 (arguments
7761 `(#:phases
7762 (modify-phases %standard-phases
7763 (add-before 'check 'add-dependency-to-bundler
7764 (lambda _
7765 ;; Fix NameError
7766 (substitute* "Rakefile"
7767 (("HTTP::Cookie::VERSION")
7768 "Bundler::GemHelper.gemspec.version"))
7769 #t)))))
7770 (propagated-inputs
7771 `(("ruby-domain-name" ,ruby-domain-name)))
7772 (native-inputs
7773 `(("rubysimplecov" ,ruby-simplecov)
7774 ("bundler" ,bundler)
7775 ("ruby-sqlite3" ,ruby-sqlite3)
7776 ("ruby-test-unit" ,ruby-test-unit)))
7777 (synopsis "Handle HTTP Cookies based on RFC 6265")
7778 (description
7779 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
7780 RFC 6265. It has been designed with security, standards compliance and
7781 compatibility in mind, to behave just the same as today's major web browsers.
7782 It has built-in support for the legacy @code{cookies.txt} and
7783 @code{cookies.sqlite} formats of Mozilla Firefox.")
7784 (home-page "https://github.com/sparklemotion/http-cookie")
7785 (license license:expat)))
7786
7787 (define-public ruby-httpclient
7788 (package
7789 (name "ruby-httpclient")
7790 (version "2.8.3")
7791 (source
7792 (origin
7793 (method url-fetch)
7794 (uri (rubygems-uri "httpclient" version))
7795 (sha256
7796 (base32
7797 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
7798 (build-system ruby-build-system)
7799 (arguments
7800 '(;; TODO: Some tests currently fail
7801 ;; ------
7802 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
7803 ;; 2 omissions, 0 notifications
7804 ;; 91.866% passed
7805 ;; ------
7806 ;; 6.49 tests/s, 22.41 assertions/s
7807 #:tests? #f
7808 #:phases
7809 (modify-phases %standard-phases
7810 (replace 'check
7811 (lambda* (#:key tests? #:allow-other-keys)
7812 (if tests?
7813 (invoke "ruby"
7814 "-Ilib"
7815 "test/runner.rb")
7816 #t))))))
7817 (native-inputs
7818 `(("ruby-rack" ,ruby-rack)))
7819 (synopsis
7820 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
7821 (description
7822 "The @code{httpclient} ruby library provides functionality related to
7823 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
7824 Cookie, multithreading and authentication (digest, NTLM) support.
7825
7826 Also provided is a @command{httpclient} command, which can perform HTTP
7827 requests either using arguments or with an interactive prompt.")
7828 (home-page "https://github.com/nahi/httpclient")
7829 (license license:ruby)))
7830
7831 (define-public ruby-ansi
7832 (package
7833 (name "ruby-ansi")
7834 (version "1.5.0")
7835 (source
7836 (origin
7837 (method git-fetch)
7838 ;; Fetch from GitHub as the gem does not contain testing code.
7839 (uri (git-reference
7840 (url "https://github.com/rubyworks/ansi")
7841 (commit version)))
7842 (file-name (git-file-name name version))
7843 (sha256
7844 (base32
7845 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
7846 (build-system ruby-build-system)
7847 (arguments
7848 `(#:phases
7849 (modify-phases %standard-phases
7850 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
7851 ;; cycle ansi, qed, ansi. Instead simply test that the library can
7852 ;; be require'd.
7853 (replace 'check
7854 (lambda _
7855 (invoke "ruby" "-Ilib" "-r" "ansi")))
7856 (add-before 'validate-runpath 'replace-broken-symlink
7857 (lambda* (#:key outputs #:allow-other-keys)
7858 (let* ((out (assoc-ref outputs "out"))
7859 (file (string-append
7860 out "/lib/ruby/vendor_ruby/gems/ansi-"
7861 ,version "/lib/ansi.yml")))
7862 ;; XXX: This symlink is broken since ruby 2.4.
7863 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
7864 (delete-file file)
7865 (symlink "../.index" file)
7866 #t))))))
7867 (synopsis "ANSI escape code related libraries")
7868 (description
7869 "This package is a collection of ANSI escape code related libraries
7870 enabling ANSI colorization and stylization of console output. Included in the
7871 library are the @code{Code} module, which defines ANSI codes as constants and
7872 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
7873 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
7874 @code{Terminal} module which provides information about the current output
7875 device.")
7876 (home-page "https://rubyworks.github.io/ansi/")
7877 (license license:bsd-2)))
7878
7879 (define-public ruby-systemu
7880 (package
7881 (name "ruby-systemu")
7882 (version "2.6.5")
7883 (source
7884 (origin
7885 (method url-fetch)
7886 (uri (rubygems-uri "systemu" version))
7887 (sha256
7888 (base32
7889 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
7890 (build-system ruby-build-system)
7891 (arguments
7892 `(#:phases
7893 (modify-phases %standard-phases
7894 (add-before 'check 'set-version
7895 (lambda _
7896 (setenv "VERSION" ,version)
7897 #t)))))
7898 (synopsis "Capture of stdout/stderr and handling of child processes")
7899 (description
7900 "Systemu can be used on any platform to return status, stdout, and stderr
7901 of any command. Unlike other methods like @code{open3} and @code{popen4}
7902 there is no danger of full pipes or threading issues hanging your process or
7903 subprocess.")
7904 (home-page "https://github.com/ahoward/systemu")
7905 (license license:ruby)))
7906
7907 (define-public ruby-bio-commandeer
7908 (package
7909 (name "ruby-bio-commandeer")
7910 (version "0.4.0")
7911 (source
7912 (origin
7913 (method url-fetch)
7914 (uri (rubygems-uri "bio-commandeer" version))
7915 (sha256
7916 (base32
7917 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
7918 (build-system ruby-build-system)
7919 (arguments
7920 `(#:phases
7921 (modify-phases %standard-phases
7922 (replace 'check
7923 ;; Run test without calling 'rake' so that jeweler is
7924 ;; not required as an input.
7925 (lambda _
7926 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
7927 (propagated-inputs
7928 `(("ruby-bio-logger" ,ruby-bio-logger)
7929 ("ruby-systemu" ,ruby-systemu)))
7930 (native-inputs
7931 `(("bundler" ,bundler)
7932 ("ruby-rspec" ,ruby-rspec)))
7933 (synopsis "Simplified running of shell commands from within Ruby")
7934 (description
7935 "Bio-commandeer provides an opinionated method of running shell commands
7936 from within Ruby. The advantage of bio-commandeer over other methods of
7937 running external commands is that when something goes wrong, messages printed
7938 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
7939 detail to ease debugging.")
7940 (home-page "https://github.com/wwood/bioruby-commandeer")
7941 (license license:expat)))
7942
7943 (define-public ruby-rubytest
7944 (package
7945 (name "ruby-rubytest")
7946 (version "0.8.1")
7947 (source
7948 (origin
7949 (method url-fetch)
7950 (uri (rubygems-uri "rubytest" version))
7951 (sha256
7952 (base32
7953 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
7954 (build-system ruby-build-system)
7955 (arguments
7956 ;; Disable regular testing to break the cycle rubytest, qed, brass,
7957 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
7958 ;; simply test that the library can be require'd.
7959 `(#:phases
7960 (modify-phases %standard-phases
7961 (replace 'check
7962 (lambda _
7963 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
7964 (propagated-inputs
7965 `(("ruby-ansi" ,ruby-ansi)))
7966 (synopsis "Universal test harness for Ruby")
7967 (description
7968 "Rubytest is a testing meta-framework for Ruby. It can handle any
7969 compliant test framework and can run tests from multiple frameworks in a
7970 single pass.")
7971 (home-page "https://rubyworks.github.io/rubytest")
7972 (license license:bsd-2)))
7973
7974 (define-public ruby-brass
7975 (package
7976 (name "ruby-brass")
7977 (version "1.2.1")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (rubygems-uri "brass" version))
7982 (sha256
7983 (base32
7984 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
7985 (build-system ruby-build-system)
7986 (arguments
7987 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
7988 ;; Instead simply test that the library can be require'd.
7989 `(#:phases
7990 (modify-phases %standard-phases
7991 (replace 'check
7992 (lambda _
7993 (invoke "ruby" "-Ilib" "-r" "brass"))))))
7994 (synopsis "Basic foundational assertions framework")
7995 (description
7996 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
7997 foundational assertions framework for other assertion and test frameworks to
7998 make use of.")
7999 (home-page "https://rubyworks.github.io/brass")
8000 (license license:bsd-2)))
8001
8002 (define-public ruby-qed
8003 (package
8004 (name "ruby-qed")
8005 (version "2.9.2")
8006 (source
8007 (origin
8008 (method url-fetch)
8009 (uri (rubygems-uri "qed" version))
8010 (sha256
8011 (base32
8012 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
8013 (build-system ruby-build-system)
8014 (arguments
8015 ;; Disable testing to break the cycle qed, ansi, qed, among others.
8016 ;; Instead simply test that the executable runs using --copyright.
8017 `(#:phases
8018 (modify-phases %standard-phases
8019 (replace 'check
8020 (lambda _
8021 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
8022 (propagated-inputs
8023 `(("ruby-ansi" ,ruby-ansi)
8024 ("ruby-brass" ,ruby-brass)))
8025 (synopsis "Test framework utilizing literate programming techniques")
8026 (description
8027 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
8028 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
8029 Development} (BDD) utilizing Literate Programming techniques. QED sits
8030 somewhere between lower-level testing tools like @code{Test::Unit} and
8031 requirement specifications systems like Cucumber.")
8032 (home-page "https://rubyworks.github.io/qed")
8033 (license license:bsd-2)))
8034
8035 (define-public ruby-que
8036 (package
8037 (name "ruby-que")
8038 (version "1.0.0.beta3")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (rubygems-uri "que" version))
8043 (sha256
8044 (base32
8045 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
8046 (build-system ruby-build-system)
8047 (arguments
8048 '(#:tests? #f)) ; No included tests
8049 (synopsis "Job queue using PostgreSQL written in Ruby")
8050 (description
8051 "This package provides a job queue that uses PostgreSQL for storing jobs
8052 and locking between worker processes.")
8053 (home-page "https://github.com/chanks/que")
8054 (license license:expat)))
8055
8056 (define-public ruby-ae
8057 (package
8058 (name "ruby-ae")
8059 (version "1.8.2")
8060 (source
8061 (origin
8062 (method git-fetch)
8063 ;; Fetch from github so tests are included.
8064 (uri (git-reference
8065 (url "https://github.com/rubyworks/ae")
8066 (commit version)))
8067 (file-name (git-file-name name version))
8068 (sha256
8069 (base32
8070 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
8071 (build-system ruby-build-system)
8072 (arguments
8073 `(#:phases
8074 (modify-phases %standard-phases
8075 (replace 'check
8076 (lambda _ (invoke "qed")))
8077 (add-before 'validate-runpath 'replace-broken-symlink
8078 (lambda* (#:key outputs #:allow-other-keys)
8079 (let* ((out (assoc-ref outputs "out"))
8080 (file (string-append
8081 out "/lib/ruby/vendor_ruby/gems/ae-"
8082 ,version "/lib/ae.yml")))
8083 ;; XXX: This symlink is broken since ruby 2.4.
8084 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
8085 (delete-file file)
8086 (symlink "../.index" file)
8087 #t))))))
8088 (propagated-inputs
8089 `(("ruby-ansi" ,ruby-ansi)))
8090 (native-inputs
8091 `(("ruby-qed" ,ruby-qed)))
8092 (synopsis "Assertions library")
8093 (description
8094 "Assertive Expressive (AE) is an assertions library specifically designed
8095 for reuse by other test frameworks.")
8096 (home-page "https://rubyworks.github.io/ae/")
8097 (license license:bsd-2)))
8098
8099 (define-public ruby-lemon
8100 (package
8101 (name "ruby-lemon")
8102 (version "0.9.1")
8103 (source
8104 (origin
8105 (method url-fetch)
8106 (uri (rubygems-uri "lemon" version))
8107 (sha256
8108 (base32
8109 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
8110 (build-system ruby-build-system)
8111 (arguments
8112 `(#:phases
8113 (modify-phases %standard-phases
8114 (replace 'check (lambda _ (invoke "qed"))))))
8115 (propagated-inputs
8116 `(("ruby-ae" ,ruby-ae)
8117 ("ruby-ansi" ,ruby-ansi)
8118 ("ruby-rubytest" ,ruby-rubytest)))
8119 (native-inputs
8120 `(("ruby-qed" ,ruby-qed)))
8121 (synopsis "Test framework correlating code structure and test unit")
8122 (description
8123 "Lemon is a unit testing framework that enforces highly formal
8124 case-to-class and unit-to-method test construction. This enforcement can help
8125 focus concern on individual units of behavior.")
8126 (home-page "https://rubyworks.github.io/lemon")
8127 (license license:bsd-2)))
8128
8129 (define-public ruby-rubytest-cli
8130 (package
8131 (name "ruby-rubytest-cli")
8132 (version "0.2.0")
8133 (source
8134 (origin
8135 (method url-fetch)
8136 (uri (rubygems-uri "rubytest-cli" version))
8137 (sha256
8138 (base32
8139 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
8140 (build-system ruby-build-system)
8141 (arguments
8142 `(#:tests? #f)) ; no tests
8143 (propagated-inputs
8144 `(("ruby-ansi" ,ruby-ansi)
8145 ("ruby-rubytest" ,ruby-rubytest)))
8146 (synopsis "Command-line interface for rubytest")
8147 (description
8148 "Rubytest CLI is a command-line interface for running tests for
8149 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
8150 (home-page "https://rubyworks.github.io/rubytest-cli")
8151 (license license:bsd-2)))
8152
8153 (define-public ruby-hashery
8154 (package
8155 (name "ruby-hashery")
8156 (version "2.1.2")
8157 (source
8158 (origin
8159 (method url-fetch)
8160 (uri (rubygems-uri "hashery" version))
8161 (sha256
8162 (base32
8163 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
8164 (build-system ruby-build-system)
8165 (arguments
8166 `(#:phases
8167 (modify-phases %standard-phases
8168 (replace 'check
8169 (lambda _
8170 (invoke "qed")
8171 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8172 (native-inputs
8173 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8174 ("ruby-qed" ,ruby-qed)
8175 ("ruby-lemon" ,ruby-lemon)))
8176 (synopsis "Hash-like classes with extra features")
8177 (description
8178 "The Hashery is a tight collection of @code{Hash}-like classes.
8179 Included are the auto-sorting @code{Dictionary} class, the efficient
8180 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
8181 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
8182 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
8183 standard @code{Hash} making it possible to subclass and augment to fit any
8184 specific use case.")
8185 (home-page "https://rubyworks.github.io/hashery")
8186 (license license:bsd-2)))
8187
8188 (define-public ruby-rc4
8189 (package
8190 (name "ruby-rc4")
8191 (version "0.1.5")
8192 (source
8193 (origin
8194 (method url-fetch)
8195 (uri (rubygems-uri "ruby-rc4" version))
8196 (sha256
8197 (base32
8198 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
8199 (build-system ruby-build-system)
8200 (arguments
8201 `(#:phases
8202 (modify-phases %standard-phases
8203 (replace 'check
8204 (lambda _
8205 (invoke "rspec" "spec/rc4_spec.rb"))))))
8206 (native-inputs
8207 `(("ruby-rspec" ,ruby-rspec-2)))
8208 (synopsis "Implementation of the RC4 algorithm")
8209 (description
8210 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
8211 (home-page "https://github.com/caiges/Ruby-RC4")
8212 (license license:expat)))
8213
8214 (define-public ruby-afm
8215 (package
8216 (name "ruby-afm")
8217 (version "0.2.2")
8218 (source
8219 (origin
8220 (method url-fetch)
8221 (uri (rubygems-uri "afm" version))
8222 (sha256
8223 (base32
8224 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
8225 (build-system ruby-build-system)
8226 (native-inputs
8227 `(("bundler" ,bundler)))
8228 (synopsis "Read Adobe Font Metrics (afm) files")
8229 (description
8230 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
8231 files and use the data therein.")
8232 (home-page "https://github.com/halfbyte/afm")
8233 (license license:expat)))
8234
8235 (define-public ruby-ascii85
8236 (package
8237 (name "ruby-ascii85")
8238 (version "1.0.3")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (rubygems-uri "Ascii85" version))
8243 (sha256
8244 (base32
8245 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
8246 (build-system ruby-build-system)
8247 (native-inputs
8248 `(("bundler" ,bundler)))
8249 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
8250 (description
8251 "This library provides methods to encode and decode Ascii85
8252 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
8253 @dfn{Portable Document Format} (PDF) file formats.")
8254 (home-page "https://github.com/datawraith/ascii85gem")
8255 (license license:expat)))
8256
8257 (define-public ruby-ttfunk
8258 (package
8259 (name "ruby-ttfunk")
8260 (version "1.5.1")
8261 (source
8262 (origin
8263 (method git-fetch)
8264 ;; fetch from github as the gem does not contain testing code
8265 (uri (git-reference
8266 (url "https://github.com/prawnpdf/ttfunk")
8267 (commit version)))
8268 (file-name (git-file-name name version))
8269 (sha256
8270 (base32
8271 "0dx9891zcli0sjrslmsvrwalv86hbjbqlmbrcasnjr069v05h9v9"))))
8272 (build-system ruby-build-system)
8273 (arguments
8274 `(#:test-target "spec"
8275 #:phases
8276 (modify-phases %standard-phases
8277 (add-before 'build 'remove-ssh
8278 (lambda _
8279 ;; remove dependency on an ssh key pair that doesn't exist
8280 (substitute* "ttfunk.gemspec"
8281 (("spec.signing_key.*") ""))
8282 #t))
8283 (add-before 'check 'remove-rubocop
8284 (lambda _
8285 ;; remove rubocop as a dependency as not needed for testing
8286 (substitute* "ttfunk.gemspec"
8287 (("spec.add_development_dependency\\('rubocop'.*") ""))
8288 (substitute* "Rakefile"
8289 (("require 'rubocop/rake_task'") "")
8290 (("RuboCop::RakeTask.new") ""))
8291 #t)))))
8292 (native-inputs
8293 `(("ruby-rspec" ,ruby-rspec)
8294 ("ruby-yard" ,ruby-yard)
8295 ("bundler" ,bundler)))
8296 (synopsis "Font metrics parser for the Prawn PDF generator")
8297 (description
8298 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
8299 part of the Prawn PDF generator.")
8300 (home-page "https://github.com/prawnpdf/ttfunk")
8301 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
8302 ;; for details."
8303 (license (list license:gpl2 license:gpl3 license:ruby))))
8304
8305 (define-public ruby-puma
8306 (package
8307 (name "ruby-puma")
8308 (version "3.9.1")
8309 (source
8310 (origin
8311 (method git-fetch)
8312 ;; Fetch from GitHub because distributed gem does not contain tests.
8313 (uri (git-reference
8314 (url "https://github.com/puma/puma")
8315 (commit (string-append "v" version))))
8316 (file-name (git-file-name name version))
8317 (sha256
8318 (base32
8319 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
8320 (build-system ruby-build-system)
8321 (arguments
8322 `(#:tests? #f ; Tests require an out-dated version of minitest.
8323 #:phases
8324 (modify-phases %standard-phases
8325 (add-before 'build 'fix-gemspec
8326 (lambda _
8327 (substitute* "puma.gemspec"
8328 (("git ls-files") "find * |sort"))
8329 #t)))))
8330 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
8331 (description
8332 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
8333 for Ruby/Rack applications. Puma is intended for use in both development and
8334 production environments. In order to get the best throughput, it is highly
8335 recommended that you use a Ruby implementation with real threads like Rubinius
8336 or JRuby.")
8337 (home-page "https://puma.io/")
8338 (license license:expat)))
8339
8340 (define-public ruby-hoe-git
8341 (package
8342 (name "ruby-hoe-git")
8343 (version "1.6.0")
8344 (source
8345 (origin
8346 (method url-fetch)
8347 (uri (rubygems-uri "hoe-git" version))
8348 (sha256
8349 (base32
8350 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
8351 (build-system ruby-build-system)
8352 (propagated-inputs
8353 `(("ruby-hoe" ,ruby-hoe)
8354 ("git" ,git)))
8355 (synopsis "Hoe plugins for tighter Git integration")
8356 (description
8357 "This package provides a set of Hoe plugins for tighter Git integration.
8358 It provides tasks to automate release tagging and pushing and changelog
8359 generation.")
8360 (home-page "https://github.com/jbarnette/hoe-git")
8361 (license license:expat)))
8362
8363 (define-public ruby-sequel
8364 (package
8365 (name "ruby-sequel")
8366 (version "4.49.0")
8367 (source
8368 (origin
8369 (method url-fetch)
8370 (uri (rubygems-uri "sequel" version))
8371 (sha256
8372 (base32
8373 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
8374 (build-system ruby-build-system)
8375 (arguments
8376 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
8377 (synopsis "Database toolkit for Ruby")
8378 (description "Sequel provides thread safety, connection pooling and a
8379 concise DSL for constructing SQL queries and table schemas. It includes a
8380 comprehensive ORM layer for mapping records to Ruby objects and handling
8381 associated records.")
8382 (home-page "https://sequel.jeremyevans.net")
8383 (license license:expat)))
8384
8385 (define-public ruby-timecop
8386 (package
8387 (name "ruby-timecop")
8388 (version "0.9.1")
8389 (source
8390 (origin
8391 (method url-fetch)
8392 (uri (rubygems-uri "timecop" version))
8393 (sha256
8394 (base32
8395 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
8396 (build-system ruby-build-system)
8397 (arguments
8398 `(#:phases
8399 (modify-phases %standard-phases
8400 (add-before 'check 'set-check-rubylib
8401 (lambda _
8402 ;; Set RUBYLIB so timecop tests finds its own lib.
8403 (setenv "RUBYLIB" "lib")
8404 #t)))))
8405 (native-inputs
8406 `(("bundler" ,bundler)
8407 ("ruby-minitest-rg" ,ruby-minitest-rg)
8408 ("ruby-mocha" ,ruby-mocha)
8409 ("ruby-activesupport" ,ruby-activesupport)))
8410 (synopsis "Test mocks for time-dependent functions")
8411 (description
8412 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
8413 making it easier to test time-dependent code. It provides a unified method to
8414 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
8415 call.")
8416 (home-page "https://github.com/travisjeffery/timecop")
8417 (license license:expat)))
8418
8419 (define-public ruby-concurrent
8420 (package
8421 (name "ruby-concurrent")
8422 (version "1.1.5")
8423 (source
8424 (origin
8425 (method git-fetch)
8426 ;; Download from GitHub because the rubygems version does not contain
8427 ;; Rakefile.
8428 (uri (git-reference
8429 (url "https://github.com/ruby-concurrency/concurrent-ruby")
8430 (commit (string-append "v" version))))
8431 (file-name (git-file-name name version))
8432 (sha256
8433 (base32
8434 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
8435 (build-system ruby-build-system)
8436 (arguments
8437 `(#:test-target "ci"
8438 #:phases
8439 (modify-phases %standard-phases
8440 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
8441 (lambda _
8442 ;; Delete extra gemspec files so 'first-gemspec' chooses the
8443 ;; correct one.
8444 (delete-file "concurrent-ruby-edge.gemspec")
8445 (delete-file "concurrent-ruby-ext.gemspec")
8446 #t))
8447 (replace 'replace-git-ls-files
8448 (lambda _
8449 ;; XXX: The default substitution made by this phase is not fully
8450 ;; compatible with "git ls-files". The latter produces file names
8451 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
8452 ;; which gives "./lib/foo". That difference in turn breaks the
8453 ;; comparison against a glob pattern in this script.
8454 (substitute* "concurrent-ruby.gemspec"
8455 (("git ls-files") "find * -type f | sort"))
8456 #t))
8457 (add-before 'build 'remove-jar-from-gemspec
8458 (lambda _
8459 ;; The gemspec wants to include a JAR file that we do not build
8460 ;; nor need.
8461 (substitute* "concurrent-ruby.gemspec"
8462 (("'lib/concurrent/concurrent_ruby.jar'")
8463 ""))
8464 #t))
8465 (add-before 'build 'remove-rake_compiler_dock-dependency
8466 (lambda _
8467 ;; This library is only used when building for non-MRI targets.
8468 (substitute* "Rakefile"
8469 (("require 'rake_compiler_dock'")
8470 ""))
8471 #t))
8472 (add-before 'check 'remove-timecop-dependency
8473 ;; Remove timecop-dependent tests as having timecop as a depedency
8474 ;; causes circular depedencies.
8475 (lambda _
8476 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
8477 (delete-file "spec/concurrent/scheduled_task_spec.rb")
8478 #t)))))
8479 (native-inputs
8480 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8481 ("ruby-rspec" ,ruby-rspec)))
8482 (synopsis "Concurrency tools for Ruby")
8483 (description
8484 "This library provides modern concurrency tools including agents,
8485 futures, promises, thread pools, actors, supervisors, and more. It is
8486 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
8487 patterns.")
8488 (home-page "http://www.concurrent-ruby.com")
8489 (license license:expat)))
8490
8491 (define-public ruby-pkg-config
8492 (package
8493 (name "ruby-pkg-config")
8494 (version "1.2.5")
8495 (source
8496 (origin
8497 (method url-fetch)
8498 (uri (rubygems-uri "pkg-config" version))
8499 (sha256
8500 (base32
8501 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
8502 (build-system ruby-build-system)
8503 (arguments
8504 ;; Tests require extra files not included in the gem.
8505 `(#:tests? #f))
8506 (synopsis "Detect libraries for compiling Ruby native extensions")
8507 (description
8508 "@code{pkg-config} can be used in your extconf.rb to properly detect need
8509 libraries for compiling Ruby native extensions.")
8510 (home-page "https://github.com/ruby-gnome2/pkg-config")
8511 (license license:lgpl2.0+)))
8512
8513 (define-public ruby-net-http-digest-auth
8514 (package
8515 (name "ruby-net-http-digest-auth")
8516 (version "1.4.1")
8517 (source
8518 (origin
8519 (method url-fetch)
8520 (uri (rubygems-uri "net-http-digest_auth" version))
8521 (sha256
8522 (base32
8523 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
8524 (build-system ruby-build-system)
8525 (native-inputs
8526 `(("ruby-hoe" ,ruby-hoe)))
8527 (synopsis "RFC 2617 HTTP digest authentication library")
8528 (description
8529 "This library implements HTTP's digest authentication scheme based on
8530 RFC 2617. This enables the use of the digest authentication scheme instead
8531 of the more insecure basic authentication scheme.")
8532 (home-page "https://github.com/drbrain/net-http-digest_auth")
8533 (license license:expat)))
8534
8535 (define-public ruby-mail
8536 (package
8537 (name "ruby-mail")
8538 (version "2.6.6")
8539 (source
8540 (origin
8541 (method url-fetch)
8542 (uri (rubygems-uri "mail" version))
8543 (sha256
8544 (base32
8545 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
8546 (build-system ruby-build-system)
8547 (propagated-inputs
8548 `(("ruby-mime-types" ,ruby-mime-types)))
8549 (arguments
8550 ;; Tests require extra gems not included in the Gemfile.
8551 ;; XXX: Try enabling this for the next version with mini_mime.
8552 `(#:tests? #f))
8553 (synopsis "Mail library for Ruby")
8554 (description
8555 "Mail is an internet library for Ruby that is designed to handle email
8556 generation, parsing and sending. The purpose of this library is to provide
8557 a single point of access to handle all email functions, including sending
8558 and receiving emails. All network type actions are done through proxy
8559 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
8560
8561 Mail has been designed with a very simple object oriented system that
8562 really opens up the email messages you are parsing, if you know what you
8563 are doing, you can fiddle with every last bit of your email directly.")
8564 (home-page "https://github.com/mikel/mail")
8565 (license license:expat)))
8566
8567 (define-public ruby-mathn
8568 (package
8569 (name "ruby-mathn")
8570 (version "0.1.0")
8571 (source
8572 (origin
8573 (method url-fetch)
8574 (uri (rubygems-uri "mathn" version))
8575 (sha256
8576 (base32
8577 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
8578 (build-system ruby-build-system)
8579 (native-inputs
8580 `(("bundler" ,bundler)
8581 ("ruby-rake-compiler" ,ruby-rake-compiler)))
8582 (synopsis "Extends math operations for increased precision")
8583 (description
8584 "This gem makes mathematical operations more precise in Ruby and
8585 integrates other mathematical standard libraries. Prior to Ruby 2.5,
8586 @code{mathn} was part of the Ruby standard library.")
8587 (home-page "https://github.com/ruby/mathn")
8588 (license license:bsd-2)))
8589
8590 (define-public ruby-code-statistics
8591 (package
8592 (name "ruby-code-statistics")
8593 (version "0.2.13")
8594 (source
8595 (origin
8596 (method url-fetch)
8597 (uri (rubygems-uri "code_statistics" version))
8598 (sha256
8599 (base32
8600 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
8601 (build-system ruby-build-system)
8602 (arguments
8603 `(#:tests? #f)) ; Not all test code is included in gem.
8604 (synopsis "Port of the rails 'rake stats' method")
8605 (description
8606 "This gem is a port of the rails 'rake stats' method so it can be made
8607 more robust and work for non rails projects.")
8608 (home-page "http://github.com/danmayer/code_statistics")
8609 (license license:expat)))
8610
8611 (define-public ruby-rubypants
8612 (package
8613 (name "ruby-rubypants")
8614 (version "0.6.0")
8615 (source (origin
8616 (method url-fetch)
8617 (uri (rubygems-uri "rubypants" version))
8618 (sha256
8619 (base32
8620 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
8621 (build-system ruby-build-system)
8622 (arguments
8623 '(#:tests? #f)) ; need Codecov
8624 (synopsis "Port of the smart-quotes library SmartyPants")
8625 (description
8626 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
8627 original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
8628 and BBEdit that easily translates plain ASCII punctuation characters into
8629 smart typographic punctuation HTML entities.")
8630 (home-page "https://github.com/jmcnevin/rubypants")
8631 (license license:bsd-2)))
8632
8633 (define-public ruby-org-ruby
8634 (package
8635 (name "ruby-org-ruby")
8636 (version "0.9.12")
8637 (source (origin
8638 (method url-fetch)
8639 (uri (rubygems-uri "org-ruby" version))
8640 (sha256
8641 (base32
8642 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
8643 (build-system ruby-build-system)
8644 (arguments
8645 '(#:tests? #f)) ; no rakefile
8646 (propagated-inputs
8647 `(("ruby-rubypants" ,ruby-rubypants)))
8648 (synopsis "Org-mode parser written in Ruby")
8649 (description
8650 "Org-ruby is an org-mode parser written in Ruby. The most significant
8651 thing this library does today is convert org-mode files to HTML or Textile or
8652 Markdown.")
8653 (home-page "https://github.com/wallyqs/org-ruby")
8654 (license license:expat)))
8655
8656 (define-public ruby-rake
8657 (package
8658 (name "ruby-rake")
8659 (version "13.0.1")
8660 (source
8661 (origin
8662 (method url-fetch)
8663 (uri (rubygems-uri "rake" version))
8664 (sha256
8665 (base32
8666 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
8667 (build-system ruby-build-system)
8668 (native-inputs
8669 `(("bundler" ,bundler)))
8670 (synopsis "Rake is a Make-like program implemented in Ruby")
8671 (description
8672 "Rake is a Make-like program where tasks and dependencies are specified
8673 in standard Ruby syntax.")
8674 (home-page "https://github.com/ruby/rake")
8675 (license license:expat)))
8676
8677 (define-public ruby-childprocess
8678 (package
8679 (name "ruby-childprocess")
8680 (version "3.0.0")
8681 (source
8682 (origin
8683 (method url-fetch)
8684 (uri (rubygems-uri "childprocess" version))
8685 (sha256
8686 (base32
8687 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
8688 (build-system ruby-build-system)
8689 (arguments
8690 `(#:tests? #f))
8691 (native-inputs
8692 `(("bundler" ,bundler)
8693 ("ruby-rspec" ,ruby-rspec)))
8694 (propagated-inputs
8695 `(("ruby-ffi" ,ruby-ffi)))
8696 (synopsis "Control external programs running in the background, in Ruby")
8697 (description "@code{childprocess} provides a gem to control external
8698 programs running in the background, in Ruby.")
8699 (home-page "https://github.com/enkessler/childprocess")
8700 (license license:expat)))
8701
8702 (define-public ruby-public-suffix
8703 (package
8704 (name "ruby-public-suffix")
8705 (version "4.0.1")
8706 (source (origin
8707 (method url-fetch)
8708 (uri (rubygems-uri "public_suffix" version))
8709 (sha256
8710 (base32
8711 "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"))))
8712 (build-system ruby-build-system)
8713 (arguments
8714 '(#:phases
8715 (modify-phases %standard-phases
8716 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
8717 ;; including it as an input can lead to circular dependencies.
8718 (add-after 'unpack 'remove-rubocop-from-Rakefile
8719 (lambda _
8720 (substitute* "Rakefile"
8721 (("require \"rubocop/rake\\_task\"") "")
8722 (("RuboCop::RakeTask\\.new") ""))
8723 #t)))))
8724 (native-inputs
8725 `(("bundler" ,bundler)
8726 ("ruby-yard" ,ruby-yard)
8727 ("ruby-mocha" ,ruby-mocha)
8728 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
8729 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
8730 (synopsis "Domain name parser")
8731 (description "The gem @code{public_suffix} is a domain name parser,
8732 written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
8733 is one under which Internet users can (or historically could) directly
8734 register names. Some examples of public suffixes are @code{.com},
8735 @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
8736 all known public suffixes.")
8737 (license license:expat)))
8738
8739 (define-public ruby-addressable
8740 (package
8741 (name "ruby-addressable")
8742 (version "2.7.0")
8743 (source (origin
8744 (method url-fetch)
8745 (uri (rubygems-uri "addressable" version))
8746 (sha256
8747 (base32
8748 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
8749 (build-system ruby-build-system)
8750 (arguments
8751 '(#:test-target "spec"
8752 #:phases
8753 (modify-phases %standard-phases
8754 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
8755 (lambda _
8756 (substitute* "Gemfile"
8757 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
8758 ((".*launchy.*") "")
8759 ((".*rake.*") "gem 'rake'\n")
8760 ((".*redcarpet.*") ""))
8761 #t))
8762 (add-before 'check 'delete-network-dependent-test
8763 (lambda _
8764 (delete-file "spec/addressable/net_http_compat_spec.rb")
8765 #t)))))
8766 (native-inputs
8767 `(("ruby-rspec" ,ruby-rspec)
8768 ("bundler" ,bundler)
8769 ("ruby-idn-ruby" ,ruby-idn-ruby)
8770 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
8771 ("ruby-rspec-its", ruby-rspec-its-minimal)
8772 ("ruby-yard" ,ruby-yard)
8773 ("ruby-simplecov" ,ruby-simplecov)))
8774 (propagated-inputs
8775 `(("ruby-public-suffix" ,ruby-public-suffix)))
8776 (home-page "https://github.com/sporkmonger/addressable")
8777 (synopsis "Alternative URI implementation")
8778 (description "Addressable is a replacement for the URI implementation that
8779 is part of Ruby's standard library. It more closely conforms to RFC 3986,
8780 RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
8781 (license license:asl2.0)))
8782
8783 (define-public ruby-colorize
8784 (package
8785 (name "ruby-colorize")
8786 (version "0.8.1")
8787 (source (origin
8788 (method url-fetch)
8789 (uri (rubygems-uri "colorize" version))
8790 (sha256
8791 (base32
8792 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
8793 (build-system ruby-build-system)
8794 (arguments
8795 '(#:phases (modify-phases %standard-phases
8796 (add-before 'check 'remove-codeclimate-dependency
8797 (lambda _
8798 (substitute* "test/test_colorize.rb"
8799 ;; Do not hook the tests into the online CodeClimate
8800 ;; service which is unnecessary for these tests.
8801 (("require 'codeclimate-test-reporter'")
8802 "")
8803 (("CodeClimate.*") ""))
8804 #t)))))
8805 (synopsis "Add color effects to the @code{String} class")
8806 (description
8807 "This package extends the @code{String} class and adds a
8808 @code{ColorizedString} with methods to set text color, background color,
8809 and text effects.")
8810 (home-page "http://github.com/fazibear/colorize")
8811 (license license:gpl2+)))
8812
8813 (define-public ruby-colorator
8814 (package
8815 (name "ruby-colorator")
8816 (version "1.1.0")
8817 (source (origin
8818 (method url-fetch)
8819 (uri (rubygems-uri "colorator" version))
8820 (sha256
8821 (base32
8822 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
8823 (build-system ruby-build-system)
8824 (arguments
8825 ;; No test target
8826 `(#:tests? #f))
8827 (home-page "http://octopress.org/colorator/")
8828 (synopsis "Terminal color library")
8829 (description "Colorator is a Ruby gem that helps you colorize your text
8830 for the terminal.")
8831 (license license:expat)))
8832
8833 (define-public ruby-command-line-reporter
8834 (package
8835 (name "ruby-command-line-reporter")
8836 (version "4.0.1")
8837 (source (origin
8838 (method url-fetch)
8839 (uri (rubygems-uri "command_line_reporter" version))
8840 (sha256
8841 (base32
8842 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
8843 (build-system ruby-build-system)
8844 (arguments
8845 ;; No Rakefile
8846 `(#:tests? #f
8847 #:phases
8848 (modify-phases %standard-phases
8849 (add-before 'build 'fix-dependencies
8850 (lambda _
8851 (substitute* ".gemspec"
8852 ;; colored is unmaintained
8853 (("colored") "colorator")
8854 ;; colorator version
8855 (("= 1.2") "= 1.1"))
8856 #t)))))
8857 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
8858 (home-page "https://github.com/wbailey/command_line_reporter")
8859 (synopsis "Report production while executing Ruby scripts")
8860 (description "This gem provides a DSL that makes it easy to write reports
8861 of various types in ruby. It eliminates the need to litter your source with
8862 puts statements, instead providing a more readable, expressive interface to
8863 your application.")
8864 (license license:asl2.0)))
8865
8866 (define-public ruby-command-line-reporter-3
8867 (package
8868 (inherit ruby-command-line-reporter)
8869 (version "3.3.6")
8870 (source (origin
8871 (method url-fetch)
8872 (uri (rubygems-uri "command_line_reporter" version))
8873 (sha256
8874 (base32
8875 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
8876
8877 (define-public ruby-kpeg
8878 (package
8879 (name "ruby-kpeg")
8880 (version "1.1.0")
8881 (source
8882 (origin
8883 (method url-fetch)
8884 (uri (rubygems-uri "kpeg" version))
8885 (sha256
8886 (base32
8887 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
8888 (build-system ruby-build-system)
8889 (native-inputs
8890 `(("ruby-hoe" ,ruby-hoe)))
8891 (synopsis "PEG library for Ruby")
8892 (description "KPeg is a simple PEG library for Ruby. It provides an API as
8893 well as native grammar to build the grammar. KPeg supports direct left
8894 recursion of rules via the
8895 @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
8896 technique.")
8897 (home-page "https://github.com/evanphx/kpeg")
8898 (license license:expat)))
8899
8900 (define-public ruby-rdoc
8901 (package
8902 (name "ruby-rdoc")
8903 (version "6.2.0")
8904 (source
8905 (origin
8906 (method git-fetch)
8907 (uri (git-reference
8908 (url "https://github.com/ruby/rdoc.git")
8909 (commit (string-append "v" version))))
8910 (file-name (git-file-name name version))
8911 (sha256
8912 (base32
8913 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
8914 (build-system ruby-build-system)
8915 (arguments
8916 `(#:phases
8917 (modify-phases %standard-phases
8918 (add-after 'unpack 'patch-gemspec
8919 ;; TODO: Remove after next release is tagged.
8920 (lambda _
8921 (substitute* "rdoc.gemspec"
8922 (("\"lib/rdoc/generator/template/darkfish/js/\
8923 jquery\\.js\", ") ""))
8924 #t))
8925 (add-before 'build 'generate
8926 ;; 'gem build' doesn't honor Rakefile dependencies (see:
8927 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
8928 (lambda _
8929 (invoke "rake" "generate"))))))
8930 (native-inputs
8931 `(("bundler" ,bundler)
8932 ("ruby-kpeg" ,ruby-kpeg)
8933 ("ruby-racc" ,ruby-racc)
8934 ("ruby-rubocop" ,ruby-rubocop)))
8935 (home-page "https://ruby.github.io/rdoc/")
8936 (synopsis "HTML and command-line documentation utility")
8937 (description "RDoc produces HTML and command-line documentation for Ruby
8938 projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
8939 documentation from the command-line.")
8940 (license license:gpl2+)))
8941
8942 (define-public ruby-sass-listen
8943 (package
8944 (name "ruby-sass-listen")
8945 (version "4.0.0")
8946 (source (origin
8947 (method url-fetch)
8948 (uri (rubygems-uri "sass-listen" version))
8949 (sha256
8950 (base32
8951 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
8952 (build-system ruby-build-system)
8953 (arguments
8954 ;; No test target
8955 `(#:tests? #f))
8956 (propagated-inputs
8957 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
8958 ("ruby-rb-inotify" ,ruby-rb-inotify)))
8959 (home-page "https://github.com/sass/listen")
8960 (synopsis "File modification notification library")
8961 (description "The Listen gem listens to file modifications and notifies you
8962 about the changes.")
8963 (license license:expat)))
8964
8965 (define-public ruby-terminfo
8966 (package
8967 (name "ruby-terminfo")
8968 (version "0.1.1")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (rubygems-uri "ruby-terminfo" version))
8973 (sha256
8974 (base32
8975 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
8976 (build-system ruby-build-system)
8977 (arguments
8978 `(#:test-target "test"
8979 ;; Rakefile requires old packages and would need modification to
8980 ;; work with current software.
8981 #:tests? #f))
8982 (inputs
8983 `(("ncurses" ,ncurses)))
8984 (native-inputs
8985 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
8986 ("ruby-rdoc" ,ruby-rdoc)))
8987 (home-page "http://www.a-k-r.org/ruby-terminfo/")
8988 (synopsis "Terminfo binding for Ruby")
8989 (description "Ruby-terminfo provides terminfo binding for Ruby.")
8990 (license license:bsd-3)))
8991
8992 (define-public ruby-diffy
8993 (package
8994 (name "ruby-diffy")
8995 (version "3.2.1")
8996 (source
8997 (origin
8998 (method url-fetch)
8999 (uri (rubygems-uri "diffy" version))
9000 (sha256
9001 (base32
9002 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
9003 (build-system ruby-build-system)
9004 (arguments
9005 ;; No tests
9006 `(#:tests? #f))
9007 (native-inputs
9008 `(("ruby-rspec" ,ruby-rspec)))
9009 (home-page "https://github.com/samg/diffy")
9010 (synopsis "Convenient diffing in ruby")
9011 (description "Diffy provides a convenient way to generate a diff from two
9012 strings or files.")
9013 (license license:expat)))
9014
9015 (define-public ruby-sass-spec
9016 (package
9017 (name "ruby-sass-spec")
9018 (version "3.5.4")
9019 (source
9020 (origin
9021 (method git-fetch)
9022 (uri (git-reference
9023 (url "https://github.com/sass/sass-spec.git")
9024 (commit (string-append "v" version))))
9025 (file-name (git-file-name name version))
9026 (sha256
9027 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
9028 (build-system ruby-build-system)
9029 (propagated-inputs
9030 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
9031 ("ruby-diffy" ,ruby-diffy)
9032 ("ruby-terminfo" ,ruby-terminfo)))
9033 (arguments
9034 `(;; This package contains tests for a sass implementation, and the to
9035 ;; avoid any circular dependencies, the tests are not run here
9036 #:tests? #f
9037 #:phases
9038 (modify-phases %standard-phases
9039 (add-after 'unpack 'patch-test
9040 (lambda _
9041 (delete-file "spec/values/colors/alpha_hex-3.5/error")
9042 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
9043 (("string") "color")))))))
9044 (home-page "https://github.com/sass/sass-spec")
9045 (synopsis "Test suite for Sass")
9046 (description "Sass Spec is a test suite for Sass. Test cases are all in
9047 the @file{spec} directory.")
9048 (license license:expat)))
9049
9050 (define-public ruby-sass
9051 (package
9052 (name "ruby-sass")
9053 (version "3.6.0")
9054 (source (origin
9055 (method url-fetch)
9056 (uri (rubygems-uri "sass" version))
9057 (sha256
9058 (base32
9059 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
9060 (build-system ruby-build-system)
9061 (propagated-inputs
9062 `(("ruby-sass-listen" ,ruby-sass-listen)))
9063 (native-inputs
9064 `(("ruby-sass-spec" ,ruby-sass-spec)
9065 ("ruby-mathn" ,ruby-mathn)))
9066 (home-page "https://sass-lang.com/")
9067 (synopsis "CSS extension language")
9068 (description "Sass is a CSS extension language. It extends CSS with
9069 features that don't exist yet like variables, nesting, mixins and inheritance.")
9070 (license license:expat)))
9071
9072 (define-public ruby-sassc
9073 (package
9074 (name "ruby-sassc")
9075 (version "2.2.1")
9076 (source
9077 (origin
9078 (method url-fetch)
9079 (uri (rubygems-uri "sassc" version))
9080 (sha256
9081 (base32
9082 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
9083 (build-system ruby-build-system)
9084 (arguments
9085 '(#:modules ((guix build ruby-build-system)
9086 (guix build utils)
9087 (ice-9 textual-ports))
9088 #:phases
9089 (modify-phases %standard-phases
9090 ;; TODO: This would be better as a snippet, but the ruby-build-system
9091 ;; doesn't seem to support that
9092 (add-after 'unpack 'remove-libsass
9093 (lambda _
9094 (delete-file-recursively "ext")
9095 (with-atomic-file-replacement "sassc.gemspec"
9096 (lambda (in out)
9097 (let* ((gemspec (get-string-all in))
9098 (index (string-contains gemspec "libsass_dir")))
9099 (display (string-append
9100 (string-take gemspec index)
9101 "\nend\n")
9102 out))))
9103 #t))
9104 (add-after 'unpack 'dont-check-the-libsass-version
9105 (lambda _
9106 (substitute* "test/native_test.rb"
9107 (("assert_equal.*Native\\.version") ""))
9108 #t))
9109 (add-after 'unpack 'remove-git-from-gemspec
9110 (lambda _
9111 (substitute* "sassc.gemspec"
9112 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
9113 #t))
9114 (add-after 'unpack 'remove-extensions-from-gemspec
9115 (lambda _
9116 (substitute* "sassc.gemspec"
9117 (("\\[\"ext/extconf.rb\"\\]") "[]"))
9118 #t))
9119 (add-after 'unpack 'fix-Rakefile
9120 (lambda _
9121 (substitute* "Rakefile"
9122 (("test: 'compile:libsass'") ":test"))
9123 #t))
9124 (add-after 'unpack 'remove-unnecessary-dependencies
9125 (lambda _
9126 (substitute* "test/test_helper.rb"
9127 (("require \"pry\"") ""))
9128 #t))
9129 (add-before 'build 'patch-native.rb
9130 (lambda* (#:key inputs #:allow-other-keys)
9131 (substitute* "lib/sassc/native.rb"
9132 ((".*gem_root = spec.gem_dir") "")
9133 (("ffi_lib .*\n")
9134 (string-append
9135 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
9136 #t))
9137 ;; The gemspec still references the libsass files, so just keep the
9138 ;; one in the gem.
9139 (delete 'extract-gemspec))))
9140 (propagated-inputs
9141 `(("ruby-ffi" ,ruby-ffi)
9142 ("ruby-rake" ,ruby-rake)))
9143 (inputs
9144 `(("libsass" ,libsass)))
9145 (native-inputs
9146 `(("bundler" ,bundler)
9147 ("ruby-rake-compiler" ,ruby-rake-compiler)
9148 ("ruby-minitest-around" ,ruby-minitest-around)
9149 ("ruby-test-construct" ,ruby-test-construct)))
9150 (synopsis "Use libsss from Ruby")
9151 (description
9152 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
9153 bindings to the libsass library. This enables rendering
9154 @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
9155 (home-page "https://github.com/sass/sassc-ruby")
9156 (license license:expat)))
9157
9158 (define-public ruby-jekyll-sass-converter
9159 (package
9160 (name "ruby-jekyll-sass-converter")
9161 (version "1.5.2")
9162 (source (origin
9163 (method url-fetch)
9164 (uri (rubygems-uri "jekyll-sass-converter" version))
9165 (sha256
9166 (base32
9167 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
9168 (build-system ruby-build-system)
9169 (propagated-inputs
9170 `(("ruby-sass" ,ruby-sass)))
9171 (arguments
9172 ;; No rakefile
9173 `(#:tests? #f))
9174 (home-page "https://github.com/jekyll/jekyll-sass-converter")
9175 (synopsis "Sass converter for Jekyll")
9176 (description "This gem provide built-in support for the Sass converter
9177 in Jekyll.")
9178 (license license:expat)))
9179
9180 (define-public ruby-jekyll-watch
9181 (package
9182 (name "ruby-jekyll-watch")
9183 (version "2.1.2")
9184 (source (origin
9185 (method url-fetch)
9186 (uri (rubygems-uri "jekyll-watch" version))
9187 (sha256
9188 (base32
9189 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
9190 (build-system ruby-build-system)
9191 (propagated-inputs
9192 `(("ruby-listen" ,ruby-listen)))
9193 (arguments
9194 ;; No rakefile
9195 `(#:tests? #f))
9196 (home-page "https://github.com/jekyll/jekyll-watch")
9197 (synopsis "Jekyll auto-rebuild support")
9198 (description "This gems add the @code{--watch} switch to the jekyll CLI
9199 interface. It allows Jekyll to rebuild your site when a file changes.")
9200 (license license:expat)))
9201
9202 (define-public ruby-parallel
9203 (package
9204 (name "ruby-parallel")
9205 (version "1.13.0")
9206 (source
9207 (origin
9208 (method git-fetch)
9209 (uri (git-reference
9210 (url "https://github.com/grosser/parallel.git")
9211 (commit (string-append "v" version))))
9212 (file-name (git-file-name name version))
9213 (sha256
9214 (base32
9215 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
9216 (build-system ruby-build-system)
9217 (arguments
9218 `(;; TODO 3 test failures
9219 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
9220 ;; open unnecessary pipes
9221 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
9222 ;; SQLite in processes
9223 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
9224 ;; SQLite in threads
9225 #:tests? #f
9226 #:test-target "rspec-rerun:spec"
9227 #:phases
9228 (modify-phases %standard-phases
9229 (add-after 'unpack 'patch-Gemfile
9230 (lambda _
9231 (substitute* "Gemfile"
9232 (("gem 'rspec-legacy_formatters'") "")
9233 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
9234 (add-before 'check 'delete-Gemfile.lock
9235 (lambda _
9236 ;; Bundler isn't being used for fetching dependendencies, so
9237 ;; delete the Gemfile.lock
9238 (delete-file "Gemfile.lock")
9239 #t))
9240 (add-before 'build 'patch-gemspec
9241 (lambda _
9242 (substitute* "parallel.gemspec"
9243 (("git ls-files") "find"))
9244 #t)))))
9245 (native-inputs
9246 `(("ruby-rspec" ,ruby-rspec)
9247 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
9248 ("bundler" ,bundler)
9249 ("ruby-activerecord" ,ruby-activerecord)
9250 ("ruby-progressbar" ,ruby-progressbar)
9251 ("ruby-bump" ,ruby-bump)
9252 ("procps" ,procps)
9253 ("lsof" ,lsof)
9254 ("ruby-mysql2" ,ruby-mysql2)
9255 ("ruby-sqlite3" ,ruby-sqlite3)
9256 ("ruby-i18n" ,ruby-i18n)))
9257 (home-page "https://github.com/grosser/parallel")
9258 (synopsis "Parallel processing in Ruby")
9259 (description "Parallel allows you to run any code in parallel Processes
9260 (to use all CPUs) or Threads(to speedup blocking operations). It is best
9261 suited for map-reduce or e.g. parallel downloads/uploads.")
9262 (license license:expat)))
9263
9264 (define-public ruby-cane
9265 (package
9266 (name "ruby-cane")
9267 (version "3.0.0")
9268 (source (origin
9269 (method url-fetch)
9270 (uri (rubygems-uri "cane" version))
9271 (sha256
9272 (base32
9273 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
9274 (build-system ruby-build-system)
9275 (arguments `(#:tests? #f)); No rakefile
9276 (home-page "https://github.com/square/cane")
9277 (propagated-inputs
9278 `(("ruby-parallel" ,ruby-parallel)))
9279 (synopsis "Code quality threshold checking")
9280 (description "Cane fails your build if code quality thresholds are not met.")
9281 (license license:asl2.0)))
9282
9283 (define-public ruby-morecane
9284 (package
9285 (name "ruby-morecane")
9286 (version "0.2.0")
9287 (source (origin
9288 (method url-fetch)
9289 (uri (rubygems-uri "morecane" version))
9290 (sha256
9291 (base32
9292 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
9293 (build-system ruby-build-system)
9294 (home-page "https://github.com/yob/morecane")
9295 (arguments `(#:tests? #f)); No rakefile
9296 (propagated-inputs
9297 `(("ruby-parallel" ,ruby-parallel)))
9298 (synopsis "Extra checks for cane")
9299 (description "The cane gem provides a great framework for running quality
9300 checks over your ruby project as part of continuous integration build. It
9301 comes with a few checks out of the box, but also provides an API for loading
9302 custom checks. This gem provides a set of additional checks.")
9303 (license license:expat)))
9304
9305 (define-public ruby-pdf-reader
9306 (package
9307 (name "ruby-pdf-reader")
9308 (version "2.1.0")
9309 (source (origin
9310 (method url-fetch)
9311 (uri (rubygems-uri "pdf-reader" version))
9312 (sha256
9313 (base32
9314 "1b3ig4wpcgdbqa7yw0ahwbmikkkywn2a22bfmrknl5ls7g066x45"))))
9315 (build-system ruby-build-system)
9316 (arguments `(#:test-target "spec"))
9317 (native-inputs
9318 `(("bundler" ,bundler)
9319 ("ruby-rspec" ,ruby-rspec)
9320 ("ruby-cane" ,ruby-cane)
9321 ("ruby-morecane" ,ruby-morecane)))
9322 (propagated-inputs
9323 `(("ruby-afm" ,ruby-afm)
9324 ("ruby-ascii85" ,ruby-ascii85)
9325 ("ruby-hashery" ,ruby-hashery)
9326 ("ruby-rc4" ,ruby-rc4)
9327 ("ruby-ttfunk" ,ruby-ttfunk)))
9328 (home-page "https://github.com/yob/pdf-reader")
9329 (synopsis "PDF parser in Ruby")
9330 (description "The PDF::Reader library implements a PDF parser conforming as
9331 much as possible to the PDF specification from Adobe. It provides programmatic
9332 access to the contents of a PDF file with a high degree of flexibility.")
9333 (license license:gpl3+)))
9334
9335 (define-public ruby-pdf-inspector
9336 (package
9337 (name "ruby-pdf-inspector")
9338 (version "1.3.0")
9339 (source (origin
9340 (method url-fetch)
9341 (uri (rubygems-uri "pdf-inspector" version))
9342 (sha256
9343 (base32
9344 "1g853az4xzgqxr5xiwhb76g4sqmjg4s79mm35mp676zjsrwpa47w"))))
9345 (build-system ruby-build-system)
9346 (propagated-inputs
9347 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
9348 (arguments `(#:tests? #f)); No rakefile
9349 (home-page "https://github.com/prawnpdf/pdf-inspector")
9350 (synopsis "Analysis classes for inspecting PDF output")
9351 (description "This library provides a number of PDF::Reader based tools for
9352 use in testing PDF output. Presently, the primary purpose of this tool is to
9353 support the tests found in Prawn, a pure Ruby PDF generation library.")
9354 (license license:gpl3+)))
9355
9356 (define-public ruby-pdf-core
9357 (package
9358 (name "ruby-pdf-core")
9359 (version "0.8.1")
9360 (source (origin
9361 (method url-fetch)
9362 (uri (rubygems-uri "pdf-core" version))
9363 (sha256
9364 (base32
9365 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
9366 (build-system ruby-build-system)
9367 (arguments
9368 ; No test target
9369 `(#:tests? #f))
9370 (home-page "https://github.com/prawnpdf/pdf-core")
9371 (synopsis "Low level PDF features for Prawn")
9372 (description "This is an experimental gem that extracts low-level PDF
9373 functionality from Prawn.")
9374 (license license:gpl3+)))
9375
9376 (define-public ruby-prawn
9377 (package
9378 (name "ruby-prawn")
9379 (version "2.2.2")
9380 (source (origin
9381 (method url-fetch)
9382 (uri (rubygems-uri "prawn" version))
9383 (sha256
9384 (base32
9385 "1qdjf1v6sfl44g3rqxlg8k4jrzkwaxgvh2l4xws97a8f3xv4na4m"))))
9386 (build-system ruby-build-system)
9387 (arguments
9388 ; No tests
9389 `(#:tests? #f
9390 #:phases
9391 (modify-phases %standard-phases
9392 (add-before 'build 'fix-dependencies
9393 (lambda _
9394 (substitute* "prawn.gemspec"
9395 (("~> 0.7.0") "~> 0.7"))
9396 #t)))))
9397 (propagated-inputs
9398 `(("ruby-pdf-core" ,ruby-pdf-core)
9399 ("ruby-ttfunk" ,ruby-ttfunk)))
9400 (native-inputs
9401 `(("bundler" ,bundler)
9402 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
9403 ("ruby-rspec" ,ruby-rspec)
9404 ("ruby-simplecov" ,ruby-simplecov)
9405 ("ruby-yard" ,ruby-yard)))
9406 (home-page "http://prawnpdf.org/api-docs/2.0/")
9407 (synopsis "PDF generation for Ruby")
9408 (description "Prawn is a pure Ruby PDF generation library.")
9409 (license license:gpl3+)))
9410
9411 (define-public ruby-prawn-table
9412 (package
9413 (name "ruby-prawn-table")
9414 (version "0.2.2")
9415 (source (origin
9416 (method url-fetch)
9417 (uri (rubygems-uri "prawn-table" version))
9418 (sha256
9419 (base32
9420 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
9421 (build-system ruby-build-system)
9422 (propagated-inputs
9423 `(("ruby-prawn" ,ruby-prawn)
9424 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
9425 (native-inputs
9426 `(("bundler" ,bundler)
9427 ("ruby-yard" ,ruby-yard)
9428 ("ruby-mocha" ,ruby-mocha)
9429 ("ruby-coderay" ,ruby-coderay)
9430 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
9431 ("ruby-simplecov" ,ruby-simplecov)
9432 ("ruby-rspec-2" ,ruby-rspec-2)))
9433 (arguments
9434 '(;; TODO: 1 test fails
9435 ;; Failure/Error: pdf.page_count.should == 1
9436 ;; expected: 1
9437 ;; got: 2 (using ==)
9438 ;; # ./spec/table_spec.rb:1308
9439 ;;
9440 ;; 225 examples, 1 failure
9441 #:tests? #f
9442 #:phases
9443 (modify-phases %standard-phases
9444 (add-before 'check 'patch-gemspec
9445 (lambda _
9446 (substitute* "prawn-table.gemspec"
9447 ;; Loosen the requirement for pdf-inspector
9448 (("~> 1\\.1\\.0") ">= 0")
9449 ;; Loosen the requirement for pdf-reader
9450 (("~> 1\\.2") ">= 0"))))
9451 (replace 'check
9452 (lambda* (#:key tests? #:allow-other-keys)
9453 (when tests?
9454 (invoke "rspec"))
9455 #t)))))
9456 (home-page "https://github.com/prawnpdf/prawn-table")
9457 (synopsis "Tables support for Prawn")
9458 (description "This gem provides tables support for Prawn.")
9459 (license license:gpl3+)))
9460
9461 (define-public ruby-kramdown
9462 (package
9463 (name "ruby-kramdown")
9464 (version "1.17.0")
9465 (source (origin
9466 (method url-fetch)
9467 (uri (rubygems-uri "kramdown" version))
9468 (sha256
9469 (base32
9470 "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq"))))
9471 (build-system ruby-build-system)
9472 (arguments `(#:tests? #f)); FIXME: some test failures
9473 (native-inputs
9474 `(("ruby-prawn" ,ruby-prawn)
9475 ("ruby-prawn-table" ,ruby-prawn-table)))
9476 (home-page "https://kramdown.gettalong.org/")
9477 (synopsis "Markdown parsing and converting library")
9478 (description "Kramdown is a library for parsing and converting a superset
9479 of Markdown. It is completely written in Ruby, supports standard Markdown
9480 (with some minor modifications) and various extensions that have been made
9481 popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
9482 (license license:expat)))
9483
9484 (define-public ruby-http-parser.rb
9485 (package
9486 (name "ruby-http-parser.rb")
9487 (version "0.6.0")
9488 (source
9489 (origin
9490 (method url-fetch)
9491 (uri (rubygems-uri "http_parser.rb" version))
9492 (sha256
9493 (base32
9494 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
9495 (build-system ruby-build-system)
9496 (arguments
9497 ;; No tests
9498 `(#:tests? #f))
9499 (native-inputs
9500 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9501 ("ruby-rspec" ,ruby-rspec)))
9502 (home-page "https://github.com/tmm1/http_parser.rb")
9503 (synopsis "HTTP parser un Ruby")
9504 (description "This gem is a simple callback-based HTTP request/response
9505 parser for writing http servers, clients and proxies.")
9506 (license license:expat)))
9507
9508 (define-public ruby-em-websocket
9509 (package
9510 (name "ruby-em-websocket")
9511 (version "0.5.1")
9512 (source
9513 (origin
9514 (method url-fetch)
9515 (uri (rubygems-uri "em-websocket" version))
9516 (sha256
9517 (base32
9518 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
9519 (build-system ruby-build-system)
9520 (arguments
9521 ;; No tests
9522 `(#:tests? #f))
9523 (propagated-inputs
9524 `(("ruby-eventmachine" ,ruby-eventmachine)
9525 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
9526 (native-inputs
9527 `(("bundler" ,bundler)
9528 ("ruby-rspec" ,ruby-rspec)))
9529 (home-page "https://github.com/igrigorik/em-websocket")
9530 (synopsis "EventMachine based WebSocket server")
9531 (description "Em-websocket is an EventMachine based WebSocket server
9532 implementation.")
9533 (license license:expat)))
9534
9535 (define-public ruby-rouge
9536 (package
9537 (name "ruby-rouge")
9538 (version "3.13.0")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (rubygems-uri "rouge" version))
9542 (sha256
9543 (base32
9544 "1y90nx9ph9adnrpcsvs2adca2l3dyz8am2d2kzxkwd3a086ji7aw"))))
9545 (build-system ruby-build-system)
9546 (arguments `(#:tests? #f)); No rakefile
9547 (home-page "http://rouge.jneen.net/")
9548 (synopsis "Code highlighter")
9549 (description "Rouge is a code highlighter written in Ruby. It supports more
9550 than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
9551 is compatible with stylesheets designed for pygments.")
9552 (license (list
9553 ;; rouge is licensed under expat
9554 license:expat
9555 ;; pygments is licensed under bsd-2
9556 license:bsd-2))))
9557
9558 (define-public ruby-rouge-2
9559 (package
9560 (inherit ruby-rouge)
9561 (version "2.2.1")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (rubygems-uri "rouge" version))
9565 (sha256
9566 (base32
9567 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
9568
9569 (define-public ruby-hashie
9570 (package
9571 (name "ruby-hashie")
9572 (version "3.6.0")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (rubygems-uri "hashie" version))
9576 (sha256
9577 (base32
9578 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
9579 (build-system ruby-build-system)
9580 (native-inputs
9581 `(("bundler" ,bundler)))
9582 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
9583 (home-page "https://github.com/intridea/hashie")
9584 (synopsis "Extensions to Ruby Hashes")
9585 (description "Hashie is a collection of classes and mixins that make Ruby
9586 hashes more powerful.")
9587 (license license:expat)))
9588
9589 (define-public ruby-heredoc-unindent
9590 (package
9591 (name "ruby-heredoc-unindent")
9592 (version "1.2.0")
9593 (source (origin
9594 (method url-fetch)
9595 (uri (rubygems-uri "heredoc_unindent" version))
9596 (sha256
9597 (base32
9598 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
9599 (build-system ruby-build-system)
9600 (native-inputs
9601 `(("ruby-hoe" ,ruby-hoe)))
9602 (home-page "https://github.com/adrianomitre/heredoc_unindent")
9603 (synopsis "Heredoc indentation cleaner")
9604 (description "This gem removes common margin from indented strings, such
9605 as the ones produced by indented heredocs. In other words, it strips out
9606 leading whitespace chars at the beginning of each line, but only as much as
9607 the line with the smallest margin.
9608
9609 It is acknowledged that many strings defined by heredocs are just code and
9610 fact is that most parsers are insensitive to indentation. If, however, the
9611 strings are to be used otherwise, be it for printing or testing, the extra
9612 indentation will probably be an issue and hence this gem.")
9613 (license license:expat)))
9614
9615 (define-public ruby-safe-yaml
9616 (package
9617 (name "ruby-safe-yaml")
9618 (version "1.0.5")
9619 (source
9620 (origin
9621 (method git-fetch)
9622 (uri (git-reference
9623 (url "https://github.com/dtao/safe_yaml.git")
9624 (commit version)))
9625 (file-name (git-file-name name version))
9626 (sha256
9627 (base32
9628 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
9629 (build-system ruby-build-system)
9630 (native-inputs
9631 `(("ruby-rspec" ,ruby-rspec)
9632 ("ruby-hashie" ,ruby-hashie)
9633 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
9634 (arguments
9635 '(#:test-target "spec"
9636 #:phases
9637 (modify-phases %standard-phases
9638 (add-before 'check 'set-TZ
9639 (lambda _
9640 ;; This test is dependent on the timezone
9641 ;; spec/transform/to_date_spec.rb:35
9642 ;; # SafeYAML::Transform::ToDate converts times to the local
9643 ;; timezone
9644 (setenv "TZ" "UTC-11")
9645 #t)))))
9646 (home-page "https://github.com/dtao/safe_yaml")
9647 (synopsis "YAML parser")
9648 (description "The SafeYAML gem provides an alternative implementation of
9649 YAML.load suitable for accepting user input in Ruby applications.")
9650 (license license:expat)))
9651
9652 (define-public ruby-mercenary
9653 (package
9654 (name "ruby-mercenary")
9655 (version "0.3.6")
9656 (source (origin
9657 (method url-fetch)
9658 (uri (rubygems-uri "mercenary" version))
9659 (sha256
9660 (base32
9661 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
9662 (build-system ruby-build-system)
9663 (arguments `(#:test-target "spec"))
9664 (native-inputs
9665 `(("bundler" ,bundler)))
9666 (home-page "https://github.com/jekyll/mercenary")
9667 (synopsis "Command-line apps library in Ruby")
9668 (description "Mercenary is a lightweight and flexible library for writing
9669 command-line apps in Ruby.")
9670 (license license:expat)))
9671
9672 (define-public ruby-liquid
9673 (package
9674 (name "ruby-liquid")
9675 (version "4.0.0")
9676 (source (origin
9677 (method url-fetch)
9678 (uri (rubygems-uri "liquid" version))
9679 (sha256
9680 (base32
9681 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
9682 (build-system ruby-build-system)
9683 (arguments `(#:tests? #f)); No rakefile
9684 (home-page "https://shopify.github.io/liquid/")
9685 (synopsis "Template language")
9686 (description "Liquid is a template language written in Ruby. It is used
9687 to load dynamic content on storefronts.")
9688 (license license:expat)))
9689
9690 (define-public ruby-forwardable-extended
9691 (package
9692 (name "ruby-forwardable-extended")
9693 (version "2.6.0")
9694 (source (origin
9695 (method url-fetch)
9696 (uri (rubygems-uri "forwardable-extended" version))
9697 (sha256
9698 (base32
9699 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
9700 (build-system ruby-build-system)
9701 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
9702 (home-page "https://github.com/envygeeks/forwardable-extended")
9703 (synopsis "Delegation to hashes and instance variables in Forwardable")
9704 (description "Forwardable Extended provides more @code{Forwardable}
9705 methods for your source as @code{Forwardable::Extended}.")
9706 (license license:expat)))
9707
9708 (define-public ruby-pathutil
9709 (package
9710 (name "ruby-pathutil")
9711 (version "0.16.2")
9712 (source (origin
9713 (method url-fetch)
9714 (uri (rubygems-uri "pathutil" version))
9715 (sha256
9716 (base32
9717 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
9718 (build-system ruby-build-system)
9719 (propagated-inputs
9720 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
9721 (native-inputs
9722 `(("bundler" ,bundler)
9723 ("ruby-rspec" ,ruby-rspec)))
9724 ;; Fails with: cannot load such file --
9725 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
9726 (arguments `(#:tests? #f))
9727 (home-page "https://github.com/envygeeks/pathutil")
9728 (synopsis "Extended implementation of Pathname")
9729 (description "Pathutil tries to be a faster pure Ruby implementation of
9730 Pathname.")
9731 (license license:expat)))
9732
9733 (define-public jekyll
9734 (package
9735 (name "jekyll")
9736 (version "3.8.6")
9737 (source (origin
9738 (method url-fetch)
9739 (uri (rubygems-uri "jekyll" version))
9740 (sha256
9741 (base32
9742 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
9743 (build-system ruby-build-system)
9744 (arguments
9745 ;; No rakefile, but a test subdirectory.
9746 `(#:tests? #f
9747 #:phases
9748 (modify-phases %standard-phases
9749 (add-before 'build 'fix-i18n
9750 (lambda _
9751 (substitute* ".gemspec"
9752 (("~> 0.7") ">= 0.7"))
9753 #t)))))
9754 (propagated-inputs
9755 `(("ruby-addressable" ,ruby-addressable)
9756 ("ruby-colorator" ,ruby-colorator)
9757 ("ruby-em-websocket" ,ruby-em-websocket)
9758 ("ruby-i18n" ,ruby-i18n)
9759 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
9760 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
9761 ("ruby-kramdown" ,ruby-kramdown)
9762 ("ruby-liquid" ,ruby-liquid)
9763 ("ruby-mercenary" ,ruby-mercenary)
9764 ("ruby-pathutil" ,ruby-pathutil)
9765 ("ruby-rouge" ,ruby-rouge-2)
9766 ("ruby-safe-yaml" ,ruby-safe-yaml)))
9767 (home-page "https://jekyllrb.com/")
9768 (synopsis "Static site generator")
9769 (description "Jekyll is a simple, blog aware, static site generator.")
9770 (license license:expat)))
9771
9772 (define-public ruby-jekyll-paginate-v2
9773 (package
9774 (name "ruby-jekyll-paginate-v2")
9775 (version "2.0.0")
9776 (source (origin
9777 (method url-fetch)
9778 (uri (rubygems-uri "jekyll-paginate-v2" version))
9779 (sha256
9780 (base32
9781 "154bfpyml6abxww9868hhyfvxasl8qhsc5zy2q30c7dxaj0igdib"))))
9782 (build-system ruby-build-system)
9783 (propagated-inputs
9784 `(("jekyll" ,jekyll)))
9785 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
9786 (synopsis "Pagination Generator for Jekyll 3")
9787 (description "The Pagination Generator forms the core of the pagination
9788 logic in Jekyll. It calculates and generates the pagination pages.")
9789 (license license:expat)))
9790
9791 (define-public ruby-faraday
9792 (package
9793 (name "ruby-faraday")
9794 (version "0.15.4")
9795 (source
9796 (origin
9797 (method url-fetch)
9798 (uri (rubygems-uri "faraday" version))
9799 (sha256
9800 (base32
9801 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
9802 (build-system ruby-build-system)
9803 (arguments
9804 '(#:tests? #f))
9805 (propagated-inputs
9806 `(("ruby-multipart-post" ,ruby-multipart-post)))
9807 (synopsis "Ruby HTTP/REST API client library")
9808 (description
9809 "Faraday is a HTTP/REST API client library which provides a common
9810 interface over different adapters.")
9811 (home-page "https://github.com/lostisland/faraday")
9812 (license license:expat)))
9813
9814 (define-public ruby-nio4r
9815 (package
9816 (name "ruby-nio4r")
9817 (version "2.5.2")
9818 (source
9819 (origin
9820 (method url-fetch)
9821 (uri (rubygems-uri "nio4r" version))
9822 (sha256
9823 (base32
9824 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
9825 (build-system ruby-build-system)
9826 (arguments
9827 '(#:phases
9828 (modify-phases %standard-phases
9829 (add-after 'unpack 'remove-unnecessary-dependencies
9830 (lambda _
9831 (substitute* "spec/spec_helper.rb"
9832 ;; Coveralls is for uploading test coverage information to an
9833 ;; online service, and thus unnecessary for building the Guix
9834 ;; package
9835 (("require \"coveralls\"") "")
9836 (("Coveralls\\.wear!") "")
9837 ;; Remove rspec/retry as we are not retrying the tests
9838 (("require \"rspec/retry\"") "")
9839 (("config\\.display_try_failure_messages = true") "")
9840 (("config\\.verbose_retry = true") ""))
9841 #t))
9842 (add-before 'check 'compile
9843 (lambda _
9844 (invoke "rake" "compile")
9845 #t))
9846 (replace 'check
9847 (lambda* (#:key tests? #:allow-other-keys)
9848 (when tests?
9849 (invoke "rspec"))
9850 #t)))))
9851 (native-inputs
9852 `(("bundler" ,bundler)
9853 ("ruby-rake-compiler" ,ruby-rake-compiler)
9854 ("ruby-rspec" ,ruby-rspec)
9855 ("ruby-rubocop" ,ruby-rubocop)))
9856 (synopsis "New I/O for Ruby")
9857 (description
9858 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
9859 for scalable network clients and servers.")
9860 (home-page "https://github.com/socketry/nio4r")
9861 (license license:expat)))
9862
9863 (define-public ruby-globalid
9864 (package
9865 (name "ruby-globalid")
9866 (version "0.4.2")
9867 (source
9868 (origin
9869 (method url-fetch)
9870 (uri (rubygems-uri "globalid" version))
9871 (sha256
9872 (base32
9873 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
9874 (build-system ruby-build-system)
9875 (arguments
9876 '(;; No included tests
9877 #:tests? #f))
9878 (propagated-inputs
9879 `(("ruby-activesupport" ,ruby-activesupport)))
9880 (synopsis "Generate URIs idenfitying model instances in Ruby")
9881 (description
9882 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
9883 uniquely identify it.")
9884 (home-page "https://rubyonrails.org/")
9885 (license license:expat)))
9886
9887 (define-public ruby-sprockets
9888 (package
9889 (name "ruby-sprockets")
9890 (version "3.7.2")
9891 (source
9892 (origin
9893 (method url-fetch)
9894 (uri (rubygems-uri "sprockets" version))
9895 (sha256
9896 (base32
9897 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
9898 (build-system ruby-build-system)
9899 (arguments
9900 '(;; No included tests
9901 #:tests? #f))
9902 (propagated-inputs
9903 `(("ruby-concurrent" ,ruby-concurrent)
9904 ("ruby-rack" ,ruby-rack)))
9905 (synopsis "Sprockets is a Rack-based asset packaging system")
9906 (description
9907 "Sprockets is a Rack-based asset packaging system that concatenates and
9908 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
9909 (home-page "https://github.com/rails/sprockets")
9910 (license license:expat)))
9911
9912 (define-public ruby-mustermann
9913 (package
9914 (name "ruby-mustermann")
9915 (version "1.0.3")
9916 (source
9917 (origin
9918 (method url-fetch)
9919 (uri (rubygems-uri "mustermann" version))
9920 (sha256
9921 (base32
9922 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
9923 (build-system ruby-build-system)
9924 (arguments
9925 ;; No tests.
9926 '(#:tests? #f))
9927 (synopsis "Library implementing patterns that behave like regular expressions")
9928 (description "Given a string pattern, Mustermann will turn it into an
9929 object that behaves like a regular expression and has comparable performance
9930 characteristics.")
9931 (home-page "https://github.com/sinatra/mustermann")
9932 (license license:expat)))
9933
9934 (define-public ruby-htmlentities
9935 (package
9936 (name "ruby-htmlentities")
9937 (version "4.3.4")
9938 (source
9939 (origin
9940 (method url-fetch)
9941 (uri (rubygems-uri "htmlentities" version))
9942 (sha256
9943 (base32
9944 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
9945 (build-system ruby-build-system)
9946 (arguments
9947 `(#:phases
9948 (modify-phases %standard-phases
9949 (replace 'check
9950 (lambda _
9951 (map (lambda (file)
9952 (invoke "ruby" "-Itest" file))
9953 (find-files "./test" ".*_test\\.rb")))))))
9954 (synopsis "Encode and decode (X)HTML entities")
9955 (description
9956 "This package provides a module for encoding and decoding (X)HTML
9957 entities.")
9958 (home-page "https://github.com/threedaymonk/htmlentities")
9959 (license license:expat)))
9960
9961 (define-public ruby-sinatra
9962 (package
9963 (name "ruby-sinatra")
9964 (version "2.0.8.1")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (rubygems-uri "sinatra" version))
9969 (sha256
9970 (base32
9971 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
9972 (build-system ruby-build-system)
9973 (arguments
9974 `(#:phases
9975 (modify-phases %standard-phases
9976 ;; See: https://github.com/sinatra/sinatra/issues/1578.
9977 (add-after 'extract-gemspec 'fix-slow-doc-generation
9978 (lambda _
9979 (substitute* "sinatra.gemspec"
9980 (("\"README.rdoc\"\\.freeze," all)
9981 (string-append all " \"--exclude=.*\\.md\".freeze,")))
9982 #t)))))
9983 (propagated-inputs
9984 `(("ruby-mustermann" ,ruby-mustermann)
9985 ("ruby-rack" ,ruby-rack)
9986 ("ruby-rack-protection" ,ruby-rack-protection)
9987 ("ruby-tilt" ,ruby-tilt)))
9988 (synopsis "DSL for quick web applications creation in Ruby")
9989 (description
9990 "Sinatra is a DSL for quickly creating web applications in Ruby with
9991 minimal effort.")
9992 (home-page "http://sinatrarb.com/")
9993 (license license:expat)))
9994
9995 (define-public ruby-thin
9996 (package
9997 (name "ruby-thin")
9998 (version "1.7.2")
9999 (source
10000 (origin
10001 (method url-fetch)
10002 (uri (rubygems-uri "thin" version))
10003 (sha256
10004 (base32
10005 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
10006 (build-system ruby-build-system)
10007 (arguments
10008 ;; No tests.
10009 '(#:tests? #f))
10010 (propagated-inputs
10011 `(("ruby-daemons" ,ruby-daemons)
10012 ("ruby-eventmachine" ,ruby-eventmachine)
10013 ("ruby-rack" ,ruby-rack)))
10014 (synopsis "Thin and fast web server for Ruby")
10015 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
10016 @itemize
10017 @item the Mongrel parser,
10018 @item Event Machine, a network I/O library with high scalability, performance
10019 and stability,
10020 @item Rack, a minimal interface between webservers and Ruby frameworks.
10021 @end itemize\n")
10022 (home-page "https://github.com/macournoyer/thin")
10023 (license license:ruby)))
10024
10025 (define-public ruby-skinny
10026 (package
10027 (name "ruby-skinny")
10028 (version "0.2.4")
10029 (source
10030 (origin
10031 (method url-fetch)
10032 (uri (rubygems-uri "skinny" version))
10033 (sha256
10034 (base32
10035 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
10036 (build-system ruby-build-system)
10037 (arguments
10038 '(#:tests? #f ; No included tests
10039 #:phases
10040 (modify-phases %standard-phases
10041 (add-before 'build 'patch-gemspec
10042 (lambda _
10043 (substitute* ".gemspec"
10044 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
10045 "<eventmachine>, [\">= 1.0.0\"")
10046 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
10047 #t)))))
10048 (propagated-inputs
10049 `(("ruby-eventmachine" ,ruby-eventmachine)
10050 ("ruby-thin" ,ruby-thin)))
10051 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
10052 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
10053 the Thin library.")
10054 (home-page "https://github.com/sj26/skinny")
10055 (license license:expat)))
10056
10057 (define-public ruby-sys-filesystem
10058 (package
10059 (name "ruby-sys-filesystem")
10060 (version "1.3.4")
10061 (source (origin
10062 (method url-fetch)
10063 (uri (rubygems-uri "sys-filesystem" version))
10064 (sha256
10065 (base32
10066 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
10067 (build-system ruby-build-system)
10068 (arguments
10069 '(#:phases (modify-phases %standard-phases
10070 (add-before 'check 'set-HOME
10071 (lambda _
10072 ;; Some tests attempt to stat $HOME. Let them.
10073 (setenv "HOME" "/tmp")
10074 #t)))))
10075 (propagated-inputs
10076 `(("ruby-ffi" ,ruby-ffi)))
10077 (native-inputs
10078 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
10079 (synopsis "Gather file system information")
10080 (description
10081 "The @code{sys-filesystem} library provides a cross-platform interface
10082 for gathering file system information, such as disk space and mount points.")
10083 (home-page "https://github.com/djberg96/sys-filesystem")
10084 (license license:asl2.0)))
10085
10086 (define-public mailcatcher
10087 (package
10088 (name "mailcatcher")
10089 (version "0.7.1")
10090 (source
10091 (origin
10092 (method url-fetch)
10093 (uri (rubygems-uri "mailcatcher" version))
10094 (sha256
10095 (base32
10096 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
10097 (build-system ruby-build-system)
10098 (arguments
10099 ;; Tests require web/assets which is not included in the output. We
10100 ;; might be able to fix this by adding the Git repository to the GEM_PATH
10101 ;; of the tests. See ruby-mysql2.
10102 '(#:tests? #f
10103 #:phases
10104 (modify-phases %standard-phases
10105 (add-before 'build 'patch-gemspec
10106 (lambda _
10107 (substitute* ".gemspec"
10108 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
10109 "<eventmachine>, [\">= 1.0.9.1")
10110 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
10111 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
10112 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
10113 #t))
10114 (add-before 'build 'loosen-dependency-contraint
10115 (lambda _
10116 (substitute* "lib/mail_catcher.rb"
10117 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
10118 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
10119 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
10120 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
10121 #t)))))
10122 (inputs
10123 `(("ruby-eventmachine" ,ruby-eventmachine)
10124 ("ruby-mail" ,ruby-mail)
10125 ("ruby-rack" ,ruby-rack)
10126 ("ruby-sinatra" ,ruby-sinatra)
10127 ("ruby-skinny" ,ruby-skinny)
10128 ("ruby-sqlite3" ,ruby-sqlite3)
10129 ("ruby-thin" ,ruby-thin)))
10130 (synopsis "SMTP server which catches messages to display them a browser")
10131 (description
10132 "MailCatcher runs a super simple SMTP server which catches any message
10133 sent to it to display in a web interface. Run mailcatcher, set your favourite
10134 app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
10135 then check out http://127.0.0.1:1080 to see the mail.")
10136 (home-page "https://mailcatcher.me")
10137 (license license:expat)))
10138
10139 (define-public ruby-backport
10140 (package
10141 (name "ruby-backport")
10142 (version "1.1.2")
10143 (source
10144 (origin
10145 ;; The gem does not include test code, so fetch from the Git repository.
10146 (method git-fetch)
10147 (uri (git-reference
10148 (url "https://github.com/castwide/backport.git")
10149 (commit (string-append "v" version))))
10150 (file-name (git-file-name name version))
10151 (sha256
10152 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
10153 (build-system ruby-build-system)
10154 (arguments
10155 `(#:test-target "spec"))
10156 (native-inputs
10157 `(("bundler" ,bundler)
10158 ("ruby-rspec" ,ruby-rspec)))
10159 (inputs
10160 `(("ruby-simplecov" ,ruby-simplecov)))
10161 (synopsis "Pure Ruby library for event-driven IO")
10162 (description
10163 "This package provides a pure Ruby library for event-driven IO.")
10164 (home-page "https://github.com/castwide/backport")
10165 (license license:expat)))
10166
10167 (define-public ruby-json-schema
10168 (package
10169 (name "ruby-json-schema")
10170 (version "2.8.1")
10171 (source
10172 (origin
10173 (method url-fetch)
10174 (uri (rubygems-uri "json-schema" version))
10175 (sha256
10176 (base32
10177 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
10178 (build-system ruby-build-system)
10179 (arguments
10180 `(#:tests? #f ; no tests
10181 #:phases
10182 (modify-phases %standard-phases
10183 (replace 'build
10184 (lambda _
10185 (invoke "gem" "build" ".gemspec"))))))
10186 (propagated-inputs
10187 `(("ruby-addressable" ,ruby-addressable)))
10188 (synopsis "Ruby JSON Schema Validator")
10189 (description "This library provides Ruby with an interface for validating
10190 JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
10191 support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
10192 is also included.")
10193 (home-page "https://github.com/ruby-json-schema/json-schema")
10194 (license license:expat)))
10195
10196 (define-public swagger-diff
10197 (package
10198 (name "swagger-diff")
10199 (version "1.1.2")
10200 (source
10201 (origin
10202 (method url-fetch)
10203 (uri (rubygems-uri "swagger-diff" version))
10204 (sha256
10205 (base32
10206 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
10207 (build-system ruby-build-system)
10208 (arguments
10209 `(#:test-target "spec"
10210 #:phases
10211 (modify-phases %standard-phases
10212 ;; Don't run or require rubocop, the code linting tool, as this is a
10213 ;; bit unnecessary.
10214 (add-after 'unpack 'dont-run-rubocop
10215 (lambda _
10216 (substitute* "Rakefile"
10217 ((".*rubocop.*") "")
10218 ((".*RuboCop.*") ""))
10219 #t)))))
10220 (propagated-inputs
10221 `(("ruby-json-schema" ,ruby-json-schema)))
10222 (native-inputs
10223 `(("bundler" ,bundler)
10224 ("ruby-rspec-core" ,ruby-rspec-core)
10225 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
10226 (synopsis
10227 "Compare Open API Initiative specification files")
10228 (description
10229 "Swagger::Diff is a utility for comparing two different Open API
10230 Initiative (OAI) specifications (formerly known as Swagger specifications).
10231 It is intended to determine whether a newer API specification is
10232 backwards-compatible with an older API specification.")
10233 (home-page "https://github.com/civisanalytics/swagger-diff")
10234 (license license:bsd-3)))
10235
10236 (define-public ruby-reverse-markdown
10237 (package
10238 (name "ruby-reverse-markdown")
10239 (version "1.1.0")
10240 (source
10241 (origin
10242 (method url-fetch)
10243 (uri (rubygems-uri "reverse_markdown" version))
10244 (sha256
10245 (base32
10246 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
10247 (build-system ruby-build-system)
10248 (propagated-inputs
10249 `(("ruby-nokogiri" ,ruby-nokogiri)))
10250 (native-inputs
10251 `(("bundler" ,bundler)
10252 ("ruby-rspec" ,ruby-rspec)
10253 ("ruby-kramdown" ,ruby-kramdown)
10254 ("ruby-simplecov" ,ruby-simplecov)))
10255 (arguments
10256 `(#:phases
10257 (modify-phases %standard-phases
10258 (replace 'check
10259 (lambda* (#:key tests? #:allow-other-keys)
10260 (when tests?
10261 (invoke "rspec"))
10262 #t)))))
10263 (synopsis "Convert HTML into Markdown")
10264 (description
10265 "This Ruby module allows you to map simple HTML back into
10266 Markdown---e.g., if you want to import existing HTML data in your
10267 application.")
10268 (home-page "https://github.com/xijo/reverse_markdown")
10269 (license license:wtfpl2)))
10270
10271 (define-public ruby-solargraph
10272 (package
10273 (name "ruby-solargraph")
10274 (version "0.36.0")
10275 (source
10276 (origin
10277 (method url-fetch)
10278 (uri (rubygems-uri "solargraph" version))
10279 (sha256
10280 (base32
10281 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
10282 (build-system ruby-build-system)
10283 (propagated-inputs
10284 `(("ruby-backport" ,ruby-backport)
10285 ("bundler" ,bundler)
10286 ("ruby-htmlentities" ,ruby-htmlentities)
10287 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
10288 ("ruby-maruku" ,ruby-maruku)
10289 ("ruby-nokogiri" ,ruby-nokogiri)
10290 ("ruby-parser" ,ruby-parser)
10291 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
10292 ("ruby-rubocop" ,ruby-rubocop)
10293 ("ruby-thor" ,ruby-thor)
10294 ("ruby-tilt" ,ruby-tilt)
10295 ("ruby-yard" ,ruby-yard)))
10296 (native-inputs
10297 `(("ruby-rspec" ,ruby-rspec)
10298 ("ruby-pry" ,ruby-pry)
10299 ("ruby-simplecov" ,ruby-simplecov)
10300 ("ruby-webmock" ,ruby-webmock-2)))
10301 ;; FIXME: can't figure out how to run the tests properly:
10302
10303 ;; An error occurred while loading spec_helper.
10304 ;; Failure/Error: return gem_original_require(path)
10305 ;; LoadError:
10306 ;; cannot load such file -- spec_helper
10307 (arguments
10308 '(#:tests? #f
10309 #:phases
10310 (modify-phases %standard-phases
10311 (replace 'check
10312 (lambda* (#:key tests? #:allow-other-keys)
10313 (when tests?
10314 (invoke "rspec"))
10315 #t)))))
10316 (synopsis
10317 "IDE tools for code completion, inline documentation, and static analysis")
10318 (description
10319 "Solargraph provides a comprehensive suite of tools for Ruby
10320 programming: intellisense, diagnostics, inline documentation, and type
10321 checking.")
10322 (home-page "https://solargraph.org/")
10323 (license license:expat)))
10324
10325 (define-public ruby-wayback-machine-downloader
10326 (package
10327 (name "ruby-wayback-machine-downloader")
10328 (version "2.2.1")
10329 (source
10330 (origin
10331 (method url-fetch)
10332 (uri (rubygems-uri
10333 "wayback_machine_downloader"
10334 version))
10335 (sha256
10336 (base32
10337 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
10338 (build-system ruby-build-system)
10339 (arguments
10340 '(#:tests? #f)) ; no tests
10341 (synopsis "Download archived websites from the Wayback Machine")
10342 (description
10343 "Wayback Machine Downloader is a command line tool for downloading
10344 websites from the Internet Archive's Wayback Machine (archive.org).
10345 It allows fine grained control over what to download by specifying
10346 which snapshots to consider and what files to include.")
10347 (home-page
10348 "https://github.com/hartator/wayback-machine-downloader")
10349 (license license:expat)))
10350
10351 (define-public ruby-wwtd
10352 (package
10353 (name "ruby-wwtd")
10354 (version "1.4.1")
10355 (home-page "http://github.com/grosser/wwtd")
10356 (source (origin
10357 (method git-fetch)
10358 (uri (git-reference
10359 (url home-page)
10360 (commit (string-append "v" version))))
10361 (file-name (git-file-name name version))
10362 (sha256
10363 (base32
10364 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
10365 (modules '((guix build utils)))
10366 (snippet
10367 '(begin
10368 ;; Remove bundled library.
10369 (delete-file "spec/rake-12.3.0.gem")
10370 #t))))
10371 (build-system ruby-build-system)
10372 (arguments
10373 '(;; XXX: Tests need multiple versions of ruby, wants to run
10374 ;; `bundle install`, etc.
10375 #:tests? #f
10376 #:phases (modify-phases %standard-phases
10377 (replace 'replace-git-ls-files
10378 (lambda _
10379 (substitute* "wwtd.gemspec"
10380 (("git ls-files lib/ bin/`")
10381 "find lib/ bin/ -type f |sort`"))
10382 #t))
10383 (add-before 'check 'remove-version-constraints
10384 (lambda _
10385 (delete-file "Gemfile.lock")
10386 #t))
10387 (replace 'check
10388 (lambda* (#:key tests? #:allow-other-keys)
10389 (if tests?
10390 (invoke "rspec" "spec/")
10391 (format #t "test suite not run~%"))
10392 #t)))))
10393 (native-inputs
10394 `(("ruby-bump" ,ruby-bump)
10395 ("ruby-rspec" ,ruby-rspec)))
10396 (synopsis "Run @file{.travis.yml} files locally")
10397 (description
10398 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
10399 defined in @file{.travis.yml} on your local machine, using @code{rvm},
10400 @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
10401 (license license:expat)))