Merge branch 'master' into staging
[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, 2020 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 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
25 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
26 ;;;
27 ;;; This file is part of GNU Guix.
28 ;;;
29 ;;; GNU Guix is free software; you can redistribute it and/or modify it
30 ;;; under the terms of the GNU General Public License as published by
31 ;;; the Free Software Foundation; either version 3 of the License, or (at
32 ;;; your option) any later version.
33 ;;;
34 ;;; GNU Guix is distributed in the hope that it will be useful, but
35 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37 ;;; GNU General Public License for more details.
38 ;;;
39 ;;; You should have received a copy of the GNU General Public License
40 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42 (define-module (gnu packages ruby)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages c)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages databases)
52 #:use-module (gnu packages dbm)
53 #:use-module (gnu packages rails)
54 #:use-module (gnu packages readline)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages haskell-xyz)
57 #:use-module (gnu packages java)
58 #:use-module (gnu packages libffi)
59 #:use-module (gnu packages libidn)
60 #:use-module (gnu packages linux)
61 #:use-module (gnu packages lsof)
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages networking)
65 #:use-module (gnu packages node)
66 #:use-module (gnu packages protobuf)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages ragel)
70 #:use-module (gnu packages rsync)
71 #:use-module (gnu packages sqlite)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages version-control)
74 #:use-module (guix packages)
75 #:use-module (guix download)
76 #:use-module (guix git-download)
77 #:use-module (guix utils)
78 #:use-module (guix build-system gnu)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages web)
81 #:use-module (guix build-system ruby)
82 #:use-module ((srfi srfi-1) #:select (alist-delete)))
83
84 (define %prawn-project-licenses
85 ;; This set of licenses applies to most (all?) components of the Prawn
86 ;; project (it is triple licensed).
87 (list license:ruby
88 license:gpl2+
89 license:gpl3+))
90
91 (define-public ruby
92 (package
93 (name "ruby")
94 (version "2.6.5")
95 (source
96 (origin
97 (method url-fetch)
98 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
99 (version-major+minor version)
100 "/ruby-" version ".tar.xz"))
101 (sha256
102 (base32
103 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
104 (modules '((guix build utils)))
105 (snippet `(begin
106 ;; Remove bundled libffi
107 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
108 #t))))
109 (build-system gnu-build-system)
110 (arguments
111 `(#:test-target "test"
112 #:configure-flags '("--enable-shared") ; dynamic linking
113 #:phases
114 (modify-phases %standard-phases
115 (add-before 'configure 'replace-bin-sh-and-remove-libffi
116 (lambda _
117 (substitute* '("Makefile.in"
118 "ext/pty/pty.c"
119 "io.c"
120 "lib/mkmf.rb"
121 "process.c"
122 "test/rubygems/test_gem_ext_configure_builder.rb"
123 "test/rdoc/test_rdoc_parser.rb"
124 "test/ruby/test_rubyoptions.rb"
125 "test/ruby/test_process.rb"
126 "test/ruby/test_system.rb"
127 "tool/rbinstall.rb")
128 (("/bin/sh") (which "sh")))
129 #t)))))
130 (inputs
131 `(("readline" ,readline)
132 ("openssl" ,openssl)
133 ("libffi" ,libffi)
134 ("gdbm" ,gdbm)))
135 (propagated-inputs
136 `(("zlib" ,zlib)))
137 (native-search-paths
138 (list (search-path-specification
139 (variable "GEM_PATH")
140 (files (list (string-append "lib/ruby/vendor_ruby"))))))
141 (synopsis "Programming language interpreter")
142 (description "Ruby is a dynamic object-oriented programming language with
143 a focus on simplicity and productivity.")
144 (home-page "https://www.ruby-lang.org")
145 (license license:ruby)))
146
147 (define-public ruby-2.7
148 (package
149 (inherit ruby)
150 (version "2.7.2")
151 (source
152 (origin
153 (method url-fetch)
154 (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
155 (version-major+minor version)
156 "/ruby-" version ".tar.gz"))
157 (sha256
158 (base32
159 "1m63461mxi3fg4y3bspbgmb0ckbbb1ldgf9xi0piwkpfsk80cmvf"))
160 (modules '((guix build utils)))
161 (snippet `(begin
162 ;; Remove bundled libffi
163 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
164 #t))))
165 (arguments
166 `(#:test-target "test"
167 #:configure-flags '("--enable-shared") ; dynamic linking
168 #:phases
169 (modify-phases %standard-phases
170 (add-before 'configure 'replace-bin-sh-and-remove-libffi
171 (lambda _
172 (substitute* '("configure.ac"
173 "template/Makefile.in"
174 "lib/rubygems/installer.rb"
175 "ext/pty/pty.c"
176 "io.c"
177 "lib/mkmf.rb"
178 "process.c"
179 "test/rubygems/test_gem_ext_configure_builder.rb"
180 "test/rdoc/test_rdoc_parser.rb"
181 "test/ruby/test_rubyoptions.rb"
182 "test/ruby/test_process.rb"
183 "test/ruby/test_system.rb"
184 "tool/rbinstall.rb")
185 (("/bin/sh") (which "sh")))
186 #t)))))
187 (native-inputs
188 `(("autoconf" ,autoconf)))))
189
190 (define-public ruby-2.5
191 (package
192 (inherit ruby)
193 (version "2.5.8")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
198 (version-major+minor version)
199 "/ruby-" version ".tar.xz"))
200 (sha256
201 (base32
202 "0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
203 (modules '((guix build utils)))
204 (snippet `(begin
205 ;; Remove bundled libffi
206 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
207 #t))))))
208
209 (define-public ruby-2.4
210 (package
211 (inherit ruby)
212 (version "2.4.10")
213 (source
214 (origin
215 (method url-fetch)
216 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
217 (version-major+minor version)
218 "/ruby-" version ".tar.xz"))
219 (sha256
220 (base32
221 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
222 (modules '((guix build utils)))
223 (snippet `(begin
224 ;; Remove bundled libffi
225 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
226 #t))))))
227
228 (define-public mruby
229 (package
230 (name "mruby")
231 (version "2.0.0")
232 (source
233 (origin
234 (method git-fetch)
235 (uri (git-reference
236 (url "https://github.com/mruby/mruby")
237 (commit version)))
238 (file-name (git-file-name name version))
239 (sha256
240 (base32
241 "1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"))))
242 (build-system gnu-build-system)
243 (arguments
244 `(#:test-target "test"
245 #:phases
246 (modify-phases %standard-phases
247 (delete 'configure)
248 (add-after 'unpack 'enable-verbose-tests
249 (lambda _
250 (substitute* "Makefile"
251 (("ruby ./minirake" m)
252 (string-append m " --verbose")))
253 #t))
254 (add-after 'unpack 'disable-broken-tests
255 (lambda _
256 (substitute* "mrbgems/mruby-io/test/io.rb"
257 (("assert\\('IO.popen.+$" m)
258 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
259 (("assert\\('IO#isatty.+$" m)
260 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
261 ;; This one is really weird. The *expected* output is all wrong.
262 (("assert\\('`cmd`.*" m)
263 (string-append m "skip \"Disable for Guix\"\n"))
264 (("echo foo")
265 (string-append (which "echo") " foo")))
266 #t))
267 ;; There is no install target
268 (replace 'install
269 (lambda* (#:key outputs #:allow-other-keys)
270 (let* ((out (assoc-ref outputs "out"))
271 (bin (string-append out "/bin"))
272 (lib (string-append out "/lib")))
273 (mkdir-p bin)
274 (copy-recursively "build/host/bin" bin)
275 (mkdir-p lib)
276 (copy-recursively "build/host/lib" lib))
277 #t)))))
278 (native-inputs
279 `(("ruby" ,ruby)
280 ("bison" ,bison)))
281 (home-page "https://github.com/mruby/mruby")
282 (synopsis "Lightweight Ruby")
283 (description "mruby is the lightweight implementation of the Ruby
284 language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
285 embedded within your application.")
286 (license license:expat)))
287
288 (define-public ruby-commander
289 (package
290 (name "ruby-commander")
291 (version "4.4.7")
292 (source
293 (origin
294 (method url-fetch)
295 (uri (rubygems-uri "commander" version))
296 (sha256
297 (base32
298 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
299 (build-system ruby-build-system)
300 (arguments
301 `(#:test-target "spec"
302 #:phases
303 (modify-phases %standard-phases
304 ;; Don't run or require rubocop, the code linting tool, as this is a
305 ;; bit unnecessary.
306 (add-after 'unpack 'dont-run-rubocop
307 (lambda _
308 (substitute* "Rakefile"
309 ((".*rubocop.*") "")
310 ((".*RuboCop.*") ""))
311 #t)))))
312 (propagated-inputs
313 `(("ruby-highline" ,ruby-highline)))
314 (native-inputs
315 `(("bundler" ,bundler)
316 ("ruby-rspec-core" ,ruby-rspec-core)
317 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
318 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
319 ("ruby-simplecov" ,ruby-simplecov)))
320 (home-page "https://github.com/commander-rb/commander")
321 (synopsis "Library for building Ruby command-line executables")
322 (description
323 "Commander aims to be a complete solution for Ruby command-line
324 executables. Commander bridges the gap between other terminal related
325 libraries (OptionParser, HighLine), while providing many new features, and an
326 elegant API.")
327 (license license:expat)))
328
329 (define-public ruby-highline
330 (package
331 (name "ruby-highline")
332 (version "2.0.1")
333 (source
334 (origin
335 (method url-fetch)
336 (uri (rubygems-uri "highline" version))
337 (sha256
338 (base32
339 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
340 (build-system ruby-build-system)
341 (arguments
342 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
343 (native-inputs
344 `(("bundler" ,bundler)
345 ("ruby-code-statistics" ,ruby-code-statistics)))
346 (synopsis
347 "HighLine helps you build command-line interfaces")
348 (description
349 "HighLine provides a high-level IO library that provides validation,
350 type conversion, and more for command-line interfaces. HighLine also includes
351 a menu system for providing multiple options to the user.")
352 (home-page "https://github.com/JEG2/highline")
353 (license (list license:gpl2 license:ruby))))
354
355 (define-public ruby-hoe
356 (package
357 (name "ruby-hoe")
358 (version "3.21.0")
359 (source (origin
360 (method url-fetch)
361 (uri (rubygems-uri "hoe" version))
362 (sha256
363 (base32
364 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
365 (build-system ruby-build-system)
366 (arguments
367 '(#:phases
368 (modify-phases %standard-phases
369 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
370 ;; variable is set, so unset it for the duration of the tests.
371 ;;
372 ;; TestHoe#test_possibly_better
373 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
374 ;; Expected: 2019-11-12 00:00:00 UTC
375 ;; Actual: 1970-01-01 00:00:00 UTC
376 (add-before 'check 'unset-SOURCE-DATE-EPOCH
377 (lambda _
378 (unsetenv "SOURCE_DATE_EPOCH")
379 #t))
380 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
381 (lambda _
382 (setenv "SOURCE_DATE_EPOCH" "1")
383 #t)))))
384 (synopsis "Ruby project management helper")
385 (description
386 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
387 maintain, and release projects and includes a dynamic plug-in system allowing
388 for easy extensibility. Hoe ships with plug-ins for all the usual project
389 tasks including rdoc generation, testing, packaging, deployment, and
390 announcement.")
391 (home-page "https://www.zenspider.com/projects/hoe.html")
392 (license license:expat)))
393
394 (define-public ruby-rake-compiler
395 (package
396 (name "ruby-rake-compiler")
397 (version "1.1.0")
398 (source (origin
399 (method url-fetch)
400 (uri (rubygems-uri "rake-compiler" version))
401 (sha256
402 (base32
403 "0l4hg21v0phfrfsc2hilgmwvn2imxr0byqh8dv16bya1s5d3km0q"))))
404 (build-system ruby-build-system)
405 (arguments
406 '(#:tests? #f)) ; needs cucumber
407 (synopsis "Building and packaging helper for Ruby native extensions")
408 (description "Rake-compiler provides a framework for building and
409 packaging native C and Java extensions in Ruby.")
410 (home-page "https://github.com/rake-compiler/rake-compiler")
411 (license license:expat)))
412
413 (define-public ruby-rsync
414 (package
415 (name "ruby-rsync")
416 (version "1.0.9")
417 (source
418 (origin
419 (method url-fetch)
420 (uri (rubygems-uri "rsync" version))
421 (sha256
422 (base32
423 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
424 (build-system ruby-build-system)
425 (arguments
426 '(#:test-target "spec"
427 #:phases
428 (modify-phases %standard-phases
429 (add-after 'unpack 'remove-coveralls-requirement
430 (lambda _
431 (substitute* "spec/spec_helper.rb"
432 (("require 'coveralls'") "")
433 (("Coveralls.wear!") ""))
434 #t)))))
435 (native-inputs
436 `(("bundler" ,bundler)
437 ("rsync" ,rsync)
438 ("ruby-rspec-core" ,ruby-rspec-core)
439 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
440 ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
441 (home-page "https://github.com/jbussdieker/ruby-rsync")
442 (synopsis "Ruby wrapper around rsync")
443 (description
444 "Ruby Rsync is a Ruby library that can synchronize files between remote
445 hosts by wrapping the @file{rsync} binary.")
446 (license license:expat)))
447
448 (define-public ruby-i18n
449 (package
450 (name "ruby-i18n")
451 (version "1.7.0")
452 (source (origin
453 (method url-fetch)
454 (uri (rubygems-uri "i18n" version))
455 (sha256
456 (base32
457 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
458 (build-system ruby-build-system)
459 (arguments
460 '(#:tests? #f)) ; no tests
461 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
462 (synopsis "Internationalization library for Ruby")
463 (description "Ruby i18n is an internationalization and localization
464 solution for Ruby programs. It features translation and localization,
465 interpolation of values to translations, pluralization, customizable
466 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
467 translation data, custom key/scope separator, custom exception handlers, and
468 an extensible architecture with a swappable backend.")
469 (home-page "https://github.com/ruby-i18n/i18n")
470 (license license:expat)))
471
472 (define-public ruby-iruby
473 (package
474 (name "ruby-iruby")
475 (version "0.3")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (rubygems-uri "iruby" version))
480 (sha256
481 (base32
482 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
483 (build-system ruby-build-system)
484 (arguments
485 ;; TODO: Tests currently fail.
486 ;;
487 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
488 ;;
489 ;; 1) Failure:
490 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
491 ;; In [ expected
492 ;;
493 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
494 '(#:tests? #f
495 #:phases
496 (modify-phases %standard-phases
497 (add-after 'unpack 'patch-ipython
498 (lambda* (#:key inputs #:allow-other-keys)
499 (substitute* "lib/iruby/command.rb"
500 (("version = `")
501 (string-append
502 "version = `"
503 (assoc-ref inputs "python-ipython")
504 "/bin/"))
505 (("Kernel\\.exec\\('")
506 (string-append
507 "Kernel.exec('"
508 (assoc-ref inputs "python-ipython")
509 "/bin/")))
510 #t)))))
511 (inputs
512 `(("python-ipython" ,python-ipython)))
513 (propagated-inputs
514 `(("ruby-bond" ,ruby-bond)
515 ("ruby-data_uri" ,ruby-data_uri)
516 ("ruby-mimemagic" ,ruby-mimemagic)
517 ("ruby-multi-json" ,ruby-multi-json)
518 ("ruby-cztop" ,ruby-cztop)
519 ;; Optional inputs
520 ("ruby-pry" ,ruby-pry)))
521 (synopsis "Ruby kernel for Jupyter/IPython")
522 (description
523 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
524 notebook).")
525 (home-page "https://github.com/SciRuby/iruby")
526 (license license:expat)))
527
528 ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
529 ;; dependencies use RSpec for their test suites! To avoid these circular
530 ;; dependencies, we disable tests for all of the RSpec-related packages.
531 (define-public ruby-rspec-support
532 (package
533 (name "ruby-rspec-support")
534 (version "3.8.0")
535 (source (origin
536 (method url-fetch)
537 (uri (rubygems-uri "rspec-support" version))
538 (sha256
539 (base32
540 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
541 (build-system ruby-build-system)
542 (arguments
543 '(#:tests? #f)) ; avoid dependency cycles
544 (synopsis "RSpec support library")
545 (description "Support utilities for RSpec gems.")
546 (home-page "https://github.com/rspec/rspec-support")
547 (license license:expat)))
548
549 (define-public ruby-rspec-core
550 (package
551 (name "ruby-rspec-core")
552 (version "3.8.0")
553 (source (origin
554 (method url-fetch)
555 (uri (rubygems-uri "rspec-core" version))
556 (sha256
557 (base32
558 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
559 (build-system ruby-build-system)
560 (arguments
561 '(#:tests? #f)) ; avoid dependency cycles
562 (propagated-inputs
563 `(("ruby-rspec-support" ,ruby-rspec-support)))
564 (synopsis "RSpec core library")
565 (description "Rspec-core provides the RSpec test runner and example
566 groups.")
567 (home-page "https://github.com/rspec/rspec-core")
568 (license license:expat)))
569
570 (define-public ruby-rspec-core-2
571 (package (inherit ruby-rspec-core)
572 (version "2.14.8")
573 (source (origin
574 (method url-fetch)
575 (uri (rubygems-uri "rspec-core" version))
576 (sha256
577 (base32
578 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
579 (propagated-inputs `())))
580
581 (define-public ruby-diff-lcs
582 (package
583 (name "ruby-diff-lcs")
584 (version "1.3")
585 (source (origin
586 (method url-fetch)
587 (uri (rubygems-uri "diff-lcs" version))
588 (sha256
589 (base32
590 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
591 (build-system ruby-build-system)
592 (arguments
593 '(#:tests? #f)) ; avoid dependency cycles
594 (synopsis "Compute the difference between two Enumerable sequences")
595 (description "Diff::LCS computes the difference between two Enumerable
596 sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
597 It includes utilities to create a simple HTML diff output format and a
598 standard diff-like tool.")
599 (home-page "https://github.com/halostatue/diff-lcs")
600 (license license:expat)))
601
602 (define-public ruby-rspec-expectations
603 (package
604 (name "ruby-rspec-expectations")
605 (version "3.8.2")
606 (source (origin
607 (method url-fetch)
608 (uri (rubygems-uri "rspec-expectations" version))
609 (sha256
610 (base32
611 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
612 (build-system ruby-build-system)
613 (arguments
614 '(#:tests? #f)) ; avoid dependency cycles
615 (propagated-inputs
616 `(("ruby-rspec-support" ,ruby-rspec-support)
617 ("ruby-diff-lcs" ,ruby-diff-lcs)))
618 (synopsis "RSpec expectations library")
619 (description "Rspec-expectations provides a simple API to express expected
620 outcomes of a code example.")
621 (home-page "https://github.com/rspec/rspec-expectations")
622 (license license:expat)))
623
624 (define-public ruby-rspec-expectations-2
625 (package (inherit ruby-rspec-expectations)
626 (version "2.14.5")
627 (source (origin
628 (method url-fetch)
629 (uri (rubygems-uri "rspec-expectations" version))
630 (sha256
631 (base32
632 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
633 (propagated-inputs
634 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
635
636 (define-public ruby-sorcerer
637 (package
638 (name "ruby-sorcerer")
639 (version "2.0.1")
640 (source
641 (origin
642 (method url-fetch)
643 (uri (rubygems-uri "sorcerer" version))
644 (sha256
645 (base32
646 "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
647 (build-system ruby-build-system)
648 (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
649 (description "Sorcerer generates Ruby code from a Ripper-like abstract
650 syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
651 snippets of Ruby code, expressible in a single line. Longer examples may be
652 re-sourced, but they will be rendered in a single-line format.")
653 (home-page "https://github.com/rspec-given/sorcerer")
654 (license license:expat)))
655
656 (define-public ruby-given-core
657 (package
658 (name "ruby-given-core")
659 (version "3.8.0")
660 (source
661 (origin
662 (method url-fetch)
663 (uri (rubygems-uri "given_core" version))
664 (sha256
665 (base32
666 "1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
667 (build-system ruby-build-system)
668 (arguments '(#:tests? #f)) ;no test suite for the core package
669 (propagated-inputs
670 `(("ruby-sorcerer" ,ruby-sorcerer)))
671 (synopsis "Core abstractions used by rspec-given and minitest-given")
672 (description "Given_core is the basic functionality behind rspec-given and
673 minitest-given, extensions that allow the use of Given/When/Then terminology
674 when defining specifications.")
675 (home-page "https://github.com/rspec-given/rspec-given")
676 (license license:expat)))
677
678 (define-public ruby-rspec-given
679 (package
680 (name "ruby-rspec-given")
681 (version "3.8.0")
682 (source
683 (origin
684 (method url-fetch)
685 (uri (rubygems-uri "rspec-given" version))
686 (sha256
687 (base32
688 "1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
689 (build-system ruby-build-system)
690 (arguments
691 `(#:test-target "rs"
692 #:phases
693 (modify-phases %standard-phases
694 (add-after 'unpack 'fix-rakefile
695 (lambda _
696 (substitute* '("Rakefile" "rakelib/gemspec.rake")
697 (("require '\\./lib/given/.*") "")
698 (("Given::VERSION") (format #f "~s" ,version))
699 ;; Fix the error: "cannot load such file -- example_helper"
700 (("sh \"rspec")
701 "sh \"rspec -Ilib:examples"))
702 #t))
703 (add-after 'extract-gemspec 'delete-failing-tests
704 ;; See: https://github.com/jimweirich/rspec-given/issues/57.
705 (lambda _
706 (substitute* ".gemspec"
707 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
708 "")
709 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
710 ""))
711 (delete-file "spec/lib/given/natural_assertion_spec.rb")
712 (delete-file "examples/integration/failing_messages_spec.rb")
713 #t)))))
714 (native-inputs
715 `(("ruby-rspec" ,ruby-rspec)
716 ("ruby-minitest" ,ruby-minitest)))
717 (propagated-inputs
718 `(("ruby-given-core" ,ruby-given-core)
719 ("ruby-rspec" ,ruby-rspec)))
720 (synopsis "Given/When/Then for RSpec and Minitest")
721 (description "Given is an RSpec extension that allows the use of
722 Given/When/Then terminology when defining specifications, in a way similar to
723 the Cucumber Gherkin language.")
724 (home-page "https://github.com/rspec-given/rspec-given")
725 (license license:expat)))
726
727 (define-public ruby-rspec-its
728 (package
729 (name "ruby-rspec-its")
730 (version "1.3.0")
731 (source
732 (origin
733 (method git-fetch)
734 (uri (git-reference
735 (url "https://github.com/rspec/rspec-its")
736 (commit (string-append "v" version))))
737 (file-name (git-file-name name version))
738 (sha256
739 (base32
740 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
741 (build-system ruby-build-system)
742 (arguments
743 `(#:test-target "spec"
744 #:phases
745 (modify-phases %standard-phases
746 (add-after 'unpack 'dont-install-gems-from-gemfile
747 (lambda _
748 (substitute* "Gemfile"
749 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
750 ""))
751 #t))
752 (add-before 'build 'loosen-ffi-requirement
753 (lambda _
754 ;; Accept any version of ruby-ffi.
755 (substitute* "Gemfile"
756 ((" gem 'ffi', '~> 1\\.9\\.25'")
757 " gem 'ffi'"))
758 #t))
759 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
760 (lambda _
761 (substitute* "rspec-its.gemspec"
762 (("rake.*") "rake'\n")
763 (("spec.add_development_dependency 'cucumber'.*")
764 "spec.add_development_dependency 'cucumber'\n")
765 (("bundler.*") "bundler'\n")
766 (("\"aruba.*") "'aruba'\n"))
767 #t)))))
768 (propagated-inputs
769 `(("ruby-rspec-core" ,ruby-rspec-core)
770 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
771 (native-inputs
772 `(("bundler" ,bundler)
773 ("ruby-cucumber" ,ruby-cucumber)
774 ("ruby-ffi" ,ruby-ffi)
775 ("ruby-aruba" ,ruby-aruba)))
776 (synopsis "RSpec extension that provides the @code{its} method")
777 (description
778 "RSpec::Its provides the its method as a short-hand to specify the expected
779 value of an attribute. For example, one can use @code{its(:size)\\{should
780 eq(1)\\}}.")
781 (home-page "https://github.com/rspec/rspec-its")
782 (license license:expat)))
783
784 ;;; This variant is used to break a cycle with ruby-protobuf.
785 (define-public ruby-rspec-its-minimal
786 (hidden-package
787 (package
788 (inherit ruby-rspec-its)
789 (arguments
790 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
791 ((#:tests? _ #f) #f)))
792 (native-inputs '()))))
793
794 (define-public ruby-rspec-mocks
795 (package
796 (name "ruby-rspec-mocks")
797 (version "3.8.0")
798 (source (origin
799 (method url-fetch)
800 (uri (rubygems-uri "rspec-mocks" version))
801 (sha256
802 (base32
803 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
804 (build-system ruby-build-system)
805 (arguments
806 '(#:tests? #f)) ; avoid dependency cycles
807 (propagated-inputs
808 `(("ruby-rspec-support" ,ruby-rspec-support)
809 ("ruby-diff-lcs" ,ruby-diff-lcs)))
810 (synopsis "RSpec stubbing and mocking library")
811 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
812 support for stubbing and mocking.")
813 (home-page "https://github.com/rspec/rspec-mocks")
814 (license license:expat)))
815
816 (define-public ruby-rspec-mocks-2
817 (package (inherit ruby-rspec-mocks)
818 (version "2.14.6")
819 (source (origin
820 (method url-fetch)
821 (uri (rubygems-uri "rspec-mocks" version))
822 (sha256
823 (base32
824 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
825 (propagated-inputs
826 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
827
828 (define-public ruby-rspec-rerun
829 (package
830 (name "ruby-rspec-rerun")
831 (version "1.1.0")
832 (source
833 (origin
834 (method url-fetch)
835 (uri (rubygems-uri "rspec-rerun" version))
836 (sha256
837 (base32
838 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
839 (build-system ruby-build-system)
840 (arguments
841 '(;; No included tests
842 #:tests? #f))
843 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
844 (synopsis "Track failed RSpec tests to re-run them")
845 (description
846 "This package provides an automated way to track, and then re-run failed
847 RSpec tests.")
848 (home-page "https://github.com/dblock/rspec-rerun")
849 (license license:expat)))
850
851 (define-public ruby-rspec-wait
852 (package
853 (name "ruby-rspec-wait")
854 (version "0.0.9")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (rubygems-uri "rspec-wait" version))
859 (sha256
860 (base32
861 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
862 (build-system ruby-build-system)
863 (arguments
864 '(#:phases
865 (modify-phases %standard-phases
866 (replace 'check
867 (lambda _
868 (invoke "rake" "spec"))))))
869 (native-inputs
870 `(("bundler" ,bundler)))
871 (propagated-inputs
872 `(("ruby-rspec" ,ruby-rspec)))
873 (home-page "https://github.com/laserlemon/rspec-wait")
874 (synopsis "Wait for conditions in RSpec")
875 (description
876 "RSpec::Wait strives to make it easier to test asynchronous or slow
877 interactions.")
878 (license license:expat)))
879
880 (define-public ruby-rspec
881 (package
882 (name "ruby-rspec")
883 (version "3.8.0")
884 (source (origin
885 (method url-fetch)
886 (uri (rubygems-uri "rspec" version))
887 (sha256
888 (base32
889 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
890 (build-system ruby-build-system)
891 (arguments
892 '(#:tests? #f)) ; avoid dependency cycles
893 (propagated-inputs
894 `(("ruby-rspec-core" ,ruby-rspec-core)
895 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
896 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
897 (synopsis "Behavior-driven development framework for Ruby")
898 (description "RSpec is a behavior-driven development (BDD) framework for
899 Ruby. This meta-package includes the RSpec test runner, along with the
900 expectations and mocks frameworks.")
901 (home-page "https://rspec.info/")
902 (license license:expat)))
903
904 (define-public ruby-rspec-2
905 (package (inherit ruby-rspec)
906 (version "2.14.1")
907 (source (origin
908 (method url-fetch)
909 (uri (rubygems-uri "rspec" version))
910 (sha256
911 (base32
912 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
913 (propagated-inputs
914 `(("ruby-rspec-core" ,ruby-rspec-core-2)
915 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
916 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
917
918 ;; Bundler is yet another source of circular dependencies, so we must disable
919 ;; its test suite as well.
920 (define-public bundler
921 (package
922 (name "bundler")
923 (version "2.1.4")
924 (source (origin
925 (method url-fetch)
926 (uri (rubygems-uri "bundler" version))
927 (sha256
928 (base32
929 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
930 (build-system ruby-build-system)
931 (arguments
932 '(#:tests? #f)) ; avoid dependency cycles
933 (synopsis "Ruby gem bundler")
934 (description "Bundler automatically downloads and installs a list of gems
935 specified in a \"Gemfile\", as well as their dependencies.")
936 (home-page "https://bundler.io/")
937 (license license:expat)))
938
939 (define-public ruby-builder
940 (package
941 (name "ruby-builder")
942 (version "3.2.3")
943 (source (origin
944 (method url-fetch)
945 (uri (rubygems-uri "builder" version))
946 (sha256
947 (base32
948 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
949 (build-system ruby-build-system)
950 (arguments
951 `(#:phases
952 (modify-phases %standard-phases
953 (add-after 'unpack 'do-not-use-rvm
954 (lambda _
955 (substitute* "rakelib/tags.rake"
956 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
957 #t)))))
958 (synopsis "Ruby library to create structured data")
959 (description "Builder provides a number of builder objects that make it
960 easy to create structured data. Currently the following builder objects are
961 supported: XML Markup and XML Events.")
962 (home-page "https://github.com/jimweirich/builder")
963 (license license:expat)))
964
965 (define-public ruby-bump
966 (package
967 (name "ruby-bump")
968 (version "0.7.0")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (rubygems-uri "bump" version))
973 (sha256
974 (base32
975 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
976 (build-system ruby-build-system)
977 (arguments
978 '(;; No included tests
979 #:tests? #f))
980 (synopsis "Tool for working with Rubygems")
981 (description
982 "Bump provides commands to manage Rubygem versioning, updating to the
983 next patch version for example.")
984 (home-page "https://github.com/gregorym/bump")
985 (license license:expat)))
986
987 (define-public ruby-rjb
988 (package
989 (name "ruby-rjb")
990 (version "1.5.5")
991 (source (origin
992 (method url-fetch)
993 (uri (rubygems-uri "rjb" version))
994 (sha256
995 (base32
996 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
997 (build-system ruby-build-system)
998 (arguments
999 `(#:tests? #f ; no rakefile
1000 #:phases
1001 (modify-phases %standard-phases
1002 (add-before 'build 'set-java-home
1003 (lambda* (#:key inputs #:allow-other-keys)
1004 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1005 #t)))))
1006 (native-inputs
1007 `(("jdk" ,icedtea "jdk")))
1008 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1009 (description "RJB is a bridge program that connects Ruby and Java via the
1010 Java Native Interface.")
1011 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
1012 (license license:lgpl2.1+)))
1013
1014 (define-public ruby-log4r
1015 (package
1016 (name "ruby-log4r")
1017 (version "1.1.10")
1018 (source
1019 (origin
1020 (method url-fetch)
1021 (uri (rubygems-uri "log4r" version))
1022 (sha256
1023 (base32
1024 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1025 (build-system ruby-build-system)
1026 (arguments
1027 '(#:tests? #f)) ; no Rakefile in gem
1028 (synopsis "Flexible logging library for Ruby")
1029 (description "Comprehensive and flexible logging library written
1030 in Ruby for use in Ruby programs. It features a hierarchical logging
1031 system of any number of levels, custom level names, logger
1032 inheritance, multiple output destinations per log event, execution
1033 tracing, custom formatting, thread safteyness, XML and YAML
1034 configuration, and more.")
1035 (home-page "http://log4r.rubyforge.org/")
1036 (license license:bsd-3)))
1037
1038 (define-public ruby-atoulme-antwrap
1039 (package
1040 (name "ruby-atoulme-antwrap")
1041 (version "0.7.5")
1042 (source (origin
1043 (method url-fetch)
1044 (uri (rubygems-uri "atoulme-Antwrap" version))
1045 (sha256
1046 (base32
1047 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1048 (build-system ruby-build-system)
1049 ;; Test data required for most of the tests are not included.
1050 (arguments `(#:tests? #f))
1051 (native-inputs
1052 `(("ruby-hoe" ,ruby-hoe)))
1053 (inputs
1054 `(("ruby-rjb" ,ruby-rjb)))
1055 (synopsis "Ruby wrapper for the Ant build tool")
1056 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1057 tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1058 script.")
1059 (home-page "http://rubyforge.org/projects/antwrap/")
1060 (license license:expat)))
1061
1062 (define-public ruby-atoulme-saikuro
1063 (package
1064 (name "ruby-atoulme-saikuro")
1065 (version "1.2.1")
1066 (source (origin
1067 (method url-fetch)
1068 (uri (rubygems-uri "atoulme-Saikuro" version))
1069 (sha256
1070 (base32
1071 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1072 (build-system ruby-build-system)
1073 ;; FIXME: There are no unit tests. The tests are demonstrations of the
1074 ;; "saikuro" tool.
1075 (arguments `(#:tests? #f))
1076 (synopsis "Cyclomatic complexity analyzer")
1077 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1078 given Ruby source code Saikuro will generate a report listing the cyclomatic
1079 complexity of each method found. In addition, Saikuro counts the number of
1080 lines per method and can generate a listing of the number of tokens on each
1081 line of code.")
1082 (home-page "http://www.github.com/atoulme/Saikuro")
1083 ;; File headers contain the BSD-3 license and the README.rdoc says that
1084 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1085 ;; of the Expat license.
1086 (license license:bsd-3)))
1087
1088 (define-public ruby-pandoc-ruby
1089 (package
1090 (name "ruby-pandoc-ruby")
1091 (version "2.1.4")
1092 (source
1093 (origin
1094 (method git-fetch) ;the gem lacks many test files
1095 (uri (git-reference
1096 (url "https://github.com/xwmx/pandoc-ruby")
1097 (commit version)))
1098 (file-name (git-file-name name version))
1099 (sha256
1100 (base32
1101 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1102 (build-system ruby-build-system)
1103 (arguments
1104 `(#:phases
1105 (modify-phases %standard-phases
1106 (add-after 'unpack 'disable-failing-tests
1107 ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
1108 ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
1109 (lambda _
1110 (substitute* "test/test_conversions.rb"
1111 (("next if from == to.*" all)
1112 (string-append
1113 all
1114 " next if ['plain', 'beamer'].include? to\n")))
1115 #t))
1116 (add-after 'unpack 'patch-pandoc-path
1117 (lambda* (#:key inputs #:allow-other-keys)
1118 (let ((pandoc (string-append (assoc-ref inputs "pandoc")
1119 "/bin/pandoc")))
1120 (substitute* "lib/pandoc-ruby.rb"
1121 (("@@pandoc_path = 'pandoc'")
1122 (format #f "@@pandoc_path = '~a'" pandoc)))
1123 (substitute* "test/test_pandoc_ruby.rb"
1124 (("('|\")pandoc" _ quote)
1125 (string-append quote pandoc))
1126 (("\\^pandoc")
1127 ".*pandoc"))
1128 #t)))
1129 (add-after 'extract-gemspec 'remove-Gemfile.lock
1130 (lambda _
1131 (delete-file "Gemfile.lock")
1132 (substitute* "pandoc-ruby.gemspec"
1133 (("Gemfile\\.lock") ""))
1134 #t)))))
1135 (native-inputs
1136 `(("ruby-mocha" ,ruby-mocha)))
1137 (inputs
1138 `(("pandoc" ,pandoc)))
1139 (synopsis "Ruby wrapper for Pandoc")
1140 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1141 command line tools for converting one markup format to another. Pandoc can
1142 convert documents from a variety of formats including markdown,
1143 reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1144 variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1145 ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1146 markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1147 more.")
1148 (home-page "https://github.com/xwmx/pandoc-ruby")
1149 (license license:expat)))
1150
1151 (define-public ruby-slim
1152 (package
1153 (name "ruby-slim")
1154 (version "4.1.0")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (rubygems-uri "slim" version))
1159 (sha256
1160 (base32
1161 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1162 (build-system ruby-build-system)
1163 (arguments
1164 `(#:phases
1165 (modify-phases %standard-phases
1166 ;; See: https://github.com/slim-template/slim/issues/857 and
1167 ;; https://github.com/slim-template/slim/issues/858.
1168 (add-after 'unpack 'skip-broken-tests
1169 (lambda _
1170 (substitute* "test/core/test_embedded_engines.rb"
1171 (("def test_render_with_markdown")
1172 "def skipped_test_render_with_markdown"))
1173 (substitute* "test/translator/test_translator.rb"
1174 (("raise (\"Missing test for.*)" _ tail)
1175 (string-append "print " tail)))
1176 #t))
1177 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1178 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1179 (add-after 'unpack 'prevent-bundler-interference
1180 (lambda _
1181 (substitute* "Rakefile"
1182 (("require 'bundler/setup'") "nil")
1183 (("Bundler::GemHelper\\.install_tasks") "nil"))
1184 #t)))))
1185 (native-inputs
1186 `(("ruby-rack-test" ,ruby-rack-test)
1187 ("ruby-sinatra" ,ruby-sinatra)))
1188 (propagated-inputs
1189 `(("ruby-temple" ,ruby-temple)
1190 ("ruby-tilt" ,ruby-tilt)))
1191 (synopsis "Minimalist template language for Ruby")
1192 (description "Slim is a template language for Ruby that aims to reduce the
1193 syntax to the minimum while remaining clear.")
1194 (home-page "http://slim-lang.com/")
1195 (license license:expat)))
1196
1197 (define-public ruby-asciidoctor
1198 (package
1199 (name "ruby-asciidoctor")
1200 (version "2.0.10")
1201 (source
1202 (origin
1203 (method git-fetch) ;the gem release lacks a Rakefile
1204 (uri (git-reference
1205 (url "https://github.com/asciidoctor/asciidoctor")
1206 (commit (string-append "v" version))))
1207 (file-name (git-file-name name version))
1208 (sha256
1209 (base32
1210 "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
1211 (build-system ruby-build-system)
1212 (arguments
1213 `(#:test-target "test:all"
1214 #:phases
1215 (modify-phases %standard-phases
1216 (replace 'replace-git-ls-files
1217 (lambda _
1218 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1219 ;; git ls-files output is merged in ruby-build-system.
1220 (substitute* "asciidoctor.gemspec"
1221 (("`git ls-files -z`")
1222 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1223 #t))
1224 (add-after 'extract-gemspec 'strip-version-requirements
1225 (lambda _
1226 (delete-file "Gemfile")
1227 (substitute* "asciidoctor.gemspec"
1228 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1229 (string-append stripped "\n")))
1230 #t)))))
1231 (native-inputs
1232 `(("ruby-erubis" ,ruby-erubis)
1233 ("ruby-minitest" ,ruby-minitest)
1234 ("ruby-nokogiri" ,ruby-nokogiri)
1235 ("ruby-asciimath" ,ruby-asciimath)
1236 ("ruby-coderay" ,ruby-coderay)
1237 ("ruby-cucumber" ,ruby-cucumber)
1238 ("ruby-haml" ,ruby-haml)
1239 ("ruby-rouge" ,ruby-rouge)
1240 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
1241 ("ruby-simplecov" ,ruby-simplecov)
1242 ("ruby-slim" ,ruby-slim)
1243 ("ruby-tilt" ,ruby-tilt)))
1244 (synopsis "Converter from AsciiDoc content to other formats")
1245 (description "Asciidoctor is a text processor and publishing toolchain for
1246 converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1247 formats.")
1248 (home-page "https://asciidoctor.org")
1249 (license license:expat)))
1250
1251 (define-public ruby-prawn-icon
1252 (package
1253 (name "ruby-prawn-icon")
1254 (version "2.5.0")
1255 (source
1256 (origin
1257 (method url-fetch)
1258 (uri (rubygems-uri "prawn-icon" version))
1259 (sha256
1260 (base32
1261 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1262 (build-system ruby-build-system)
1263 (arguments
1264 `(#:test-target "spec"
1265 #:phases (modify-phases %standard-phases
1266 (add-after 'unpack 'remove-unnecessary-dependencies
1267 (lambda _
1268 (substitute* '("Rakefile" "spec/spec_helper.rb")
1269 ((".*[Bb]undler.*") "")
1270 (("^require 'rubocop.*") "")
1271 (("^RuboCop.*") ""))
1272 #t)))))
1273 (native-inputs
1274 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1275 ("ruby-pdf-reader" ,ruby-pdf-reader)
1276 ("ruby-rspec" ,ruby-rspec)
1277 ("ruby-simplecov" ,ruby-simplecov)))
1278 (propagated-inputs
1279 `(("ruby-prawn" ,ruby-prawn)))
1280 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1281 (description "@code{Prawn::Icon} provides various icon fonts including
1282 FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1283 toolkit.")
1284 (home-page "https://github.com/jessedoyle/prawn-icon/")
1285 (license %prawn-project-licenses)))
1286
1287 (define-public ruby-css-parser
1288 (package
1289 (name "ruby-css-parser")
1290 (version "1.7.1")
1291 (source
1292 (origin
1293 (method url-fetch)
1294 (uri (rubygems-uri "css_parser" version))
1295 (sha256
1296 (base32
1297 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1298 (build-system ruby-build-system)
1299 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1300 (propagated-inputs
1301 `(("ruby-addressable" ,ruby-addressable)))
1302 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1303 (description "This package allows loading, parsing and cascading Cascading
1304 Style Sheets (CSS) rule sets in Ruby.")
1305 (home-page "https://github.com/premailer/css_parser")
1306 (license license:expat)))
1307
1308 (define-public ruby-prawn-svg
1309 (package
1310 (name "ruby-prawn-svg")
1311 (version "0.30.0")
1312 (source
1313 (origin
1314 (method url-fetch)
1315 (uri (rubygems-uri "prawn-svg" version))
1316 (sha256
1317 (base32
1318 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1319 (build-system ruby-build-system)
1320 (arguments
1321 `(#:phases (modify-phases %standard-phases
1322 (add-after 'unpack 'do-not-use-bundler
1323 (lambda _
1324 (substitute* "spec/spec_helper.rb"
1325 ((".*[Bb]undler.*") ""))
1326 #t))
1327 (replace 'check
1328 (lambda* (#:key tests? #:allow-other-keys)
1329 (when tests?
1330 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1331 #t)))))
1332 (native-inputs
1333 `(("ruby-rspec" ,ruby-rspec)))
1334 (propagated-inputs
1335 `(("ruby-css-parser" ,ruby-css-parser)
1336 ("ruby-prawn" ,ruby-prawn)))
1337 (synopsis "SVG renderer for the Prawn PDF library")
1338 (description "This library allows rendering Scalable Vector Graphics (SVG)
1339 graphics directly into a Portable Document Format (PDF) document using the
1340 Prawn module.")
1341 (home-page "https://github.com/mogest/prawn-svg")
1342 (license license:expat)))
1343
1344 (define-public ruby-prawn-templates
1345 (package
1346 (name "ruby-prawn-templates")
1347 (version "0.1.2")
1348 (source
1349 (origin
1350 (method git-fetch)
1351 (uri (git-reference
1352 (url "https://github.com/prawnpdf/prawn-templates.git")
1353 (commit version)))
1354 (file-name (git-file-name name version))
1355 (sha256
1356 (base32
1357 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1358 (build-system ruby-build-system)
1359 (arguments
1360 `(#:phases (modify-phases %standard-phases
1361 (add-after 'unpack 'do-not-use-bundler
1362 (lambda _
1363 (substitute* "spec/spec_helper.rb"
1364 ((".*[Bb]undler.*") ""))
1365 #t))
1366 (replace 'check
1367 (lambda* (#:key tests? #:allow-other-keys)
1368 (when tests?
1369 (invoke "rspec"))
1370 #t)))))
1371 (native-inputs
1372 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1373 ("ruby-rspec" ,ruby-rspec)))
1374 (propagated-inputs
1375 `(("ruby-pdf-reader" ,ruby-pdf-reader)
1376 ("ruby-prawn" ,ruby-prawn)))
1377 (synopsis "Prawn extension to include or combine PDF documents")
1378 (description "This @strong{unmaintained} package provides a Prawn
1379 extension that allows including other Portable Document Format (PDF) documents
1380 as background or combining several PDF documents into one. This functionality
1381 used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1382 of its many longstanding issues.")
1383 (home-page "https://github.com/prawnpdf/prawn-templates")
1384 (license %prawn-project-licenses)))
1385
1386 (define-public ruby-polyglot
1387 (package
1388 (name "ruby-polyglot")
1389 (version "0.3.5")
1390 (source
1391 (origin
1392 (method url-fetch)
1393 (uri (rubygems-uri "polyglot" version))
1394 (sha256
1395 (base32
1396 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1397 (build-system ruby-build-system)
1398 (arguments `(#:tests? #f)) ;no test suite
1399 (synopsis "Augment @code{require} to load non-Ruby file types")
1400 (description "The Polyglot library allows a Ruby module to register a
1401 loader for the file type associated with a filename extension, and it augments
1402 @code{require} to find and load matching files.")
1403 (home-page "https://github.com/cjheath/polyglot")
1404 (license license:expat)))
1405
1406 (define-public ruby-treetop
1407 (package
1408 (name "ruby-treetop")
1409 (version "1.6.10")
1410 (source
1411 (origin
1412 (method git-fetch) ;no test suite in distributed gem
1413 (uri (git-reference
1414 (url "https://github.com/cjheath/treetop.git")
1415 (commit (string-append "v" version))))
1416 (file-name (git-file-name name version))
1417 (sha256
1418 (base32
1419 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1420 (build-system ruby-build-system)
1421 (arguments
1422 `(#:test-target "spec"
1423 #:phases
1424 (modify-phases %standard-phases
1425 (replace 'replace-git-ls-files
1426 (lambda _
1427 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1428 ;; git ls-files output is merged in ruby-build-system.
1429 (substitute* "treetop.gemspec"
1430 (("`git ls-files -z`")
1431 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1432 #t)))))
1433 (native-inputs
1434 `(("ruby-activesupport" ,ruby-activesupport)
1435 ("ruby-rr" ,ruby-rr)
1436 ("ruby-rspec" ,ruby-rspec)))
1437 (propagated-inputs
1438 `(("ruby-polyglot" ,ruby-polyglot)))
1439 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1440 (description "This package provides a Ruby-based Parsing Expression
1441 Grammar (PEG) parser generator Domain Specific Language (DSL).")
1442 (home-page "https://github.com/cjheath/treetop")
1443 (license license:expat)))
1444
1445 (define-public ruby-rubocop-performance
1446 (package
1447 (name "ruby-rubocop-performance")
1448 (version "1.7.1")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (rubygems-uri "rubocop-performance" version))
1453 (sha256
1454 (base32
1455 "04r8d4x62ygv17spvz9yyfxbmbf8qxwhijs0xycfvzr0q4pyg9sw"))))
1456 (build-system ruby-build-system)
1457 (arguments
1458 `(#:tests? #f)) ;no test suite in the distributed gem
1459 (propagated-inputs
1460 `(("ruby-rubocop" ,ruby-rubocop)))
1461 (synopsis "Performance optimizations checkers for Ruby code")
1462 (description "This package provides a collection of RuboCop cops to check
1463 for performance optimizations in Ruby code.")
1464 (home-page "https://docs.rubocop.org/rubocop-performance/")
1465 (license license:expat)))
1466
1467 (define-public ruby-gimme
1468 (let ((revision "1")
1469 (commit "4e71f0236f1271871916dd403261d26533db34c0"))
1470 (package
1471 (name "ruby-gimme")
1472 (version (git-version "0.5.0" revision commit))
1473 (source
1474 (origin
1475 (method git-fetch)
1476 (uri (git-reference
1477 (url "https://github.com/searls/gimme.git")
1478 (commit commit)))
1479 (file-name (git-file-name name version))
1480 (sha256
1481 (base32
1482 "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
1483 (build-system ruby-build-system)
1484 (native-inputs
1485 `(("ruby-coveralls" ,ruby-coveralls)
1486 ("ruby-cucumber" ,ruby-cucumber)
1487 ("ruby-pry" ,ruby-pry)
1488 ("ruby-simplecov" ,ruby-simplecov)
1489 ("ruby-rspec-given" ,ruby-rspec-given)))
1490 (arguments
1491 `(;; The cucumber task fails with error: "index 3 out of matches
1492 ;; (IndexError)", apparently due to our newer Cucumber version.
1493 ;; TODO: Try the "default" task with a future release.
1494 #:test-target "spec"
1495 #:phases
1496 (modify-phases %standard-phases
1497 (add-after 'extract-gemspec 'prepare-for-tests
1498 (lambda _
1499 ;; Delete failing tests (possibly due to our newer rspec
1500 ;; version).
1501 (delete-file "spec/gimme/gives_class_methods_spec.rb")
1502 (delete-file "spec/gimme/rspec_adapter_spec.rb")
1503 (delete-file "spec/gimme/verifies_class_methods_spec.rb")
1504 ;; Fix duplicate version requirements and de-register files.
1505 (delete-file "Gemfile")
1506 (delete-file "Gemfile.lock")
1507 (substitute* "gimme.gemspec"
1508 ((".*\"Gemfile\".*") "")
1509 ((".*\"Gemfile\\.lock\",.*") "")
1510 ((".*(rspec|cucumber).*\">= 0\".*") "")
1511 (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
1512 (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
1513 (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
1514 ;; All of these gems relate to development, and are
1515 ;; unnecessary when running the tests.
1516 ((".*(add|gem).*guard-.*") "")
1517 ((".*(add|gem).*jeweler.*") "")
1518 ((".*(add|gem).*pry.*") "")
1519 ((".*(add|gem).*growl.*") "")
1520 ((".*(add|gem).*rb-fsevent.*") ""))
1521 #t)))))
1522 (synopsis "Lightweight test double library for Ruby")
1523 (description "Gimme is a very lightweight test double library for Ruby,
1524 based on Mockito (a mocking framework for Java). It is an opinionated (but
1525 not noisy) means to facilitate test-driving by enabling the authors to specify
1526 only what they care about.")
1527 (home-page "https://github.com/searls/gimme")
1528 (license license:expat))))
1529
1530 (define-public ruby-standard
1531 (package
1532 (name "ruby-standard")
1533 (version "0.4.7")
1534 (source
1535 (origin
1536 (method git-fetch) ;no test suite in distributed gem
1537 (uri (git-reference
1538 (url "https://github.com/testdouble/standard.git")
1539 (commit (string-append "v" version))))
1540 (file-name (git-file-name name version))
1541 (sha256
1542 (base32
1543 "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
1544 (build-system ruby-build-system)
1545 (arguments
1546 ;; TODO: the tests are currently broken due to using a newer Rubocop.
1547 `(#:tests? #f
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'relax-version-requiremens
1551 (lambda _
1552 (delete-file "Gemfile")
1553 (delete-file "Gemfile.lock")
1554 #t))
1555 (replace 'replace-git-ls-files
1556 (lambda _
1557 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1558 ;; git ls-files output is merged in ruby-build-system.
1559 (substitute* "standard.gemspec"
1560 (("`git ls-files -z`")
1561 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1562 |sort -z|cut -zc3-`"))
1563 #t)))))
1564 (native-inputs
1565 `(("ruby-gimme" ,ruby-gimme)
1566 ("ruby-pry" ,ruby-pry)
1567 ("ruby-simplecov" ,ruby-simplecov)))
1568 (propagated-inputs
1569 `(("ruby-rubocop" ,ruby-rubocop)
1570 ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
1571 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
1572 (description "Standard is a port of StandardJS. Like StandardJS, it aims
1573 to save time in the following ways:
1574 @itemize
1575 @item No configuration.
1576 @item Automatically format code.
1577 @item Catch style issues and programmer errors early.
1578 @end itemize")
1579 (home-page "https://github.com/testdouble/standard")
1580 (license license:expat)))
1581
1582 (define-public ruby-chunky-png
1583 (package
1584 (name "ruby-chunky-png")
1585 (version "1.3.12")
1586 (source
1587 (origin
1588 (method git-fetch)
1589 (uri (git-reference
1590 (url "https://github.com/wvanbergen/chunky_png.git")
1591 (commit (string-append "v" version))))
1592 (file-name (git-file-name name version))
1593 (sha256
1594 (base32
1595 "0hn8ap7iib47qkqdp0awmxgma11z0lmk1ca3lp7c97ykhv7ij1zs"))))
1596 (build-system ruby-build-system)
1597 (arguments
1598 `(#:test-target "spec"
1599 #:phases
1600 (modify-phases %standard-phases
1601 (add-after 'unpack 'disable-bundler
1602 (lambda _
1603 (substitute* (find-files "." "\\.rb$")
1604 (("require.*bundler/setup.*") ""))
1605 #t))
1606 (replace 'replace-git-ls-files
1607 (lambda _
1608 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1609 ;; git ls-files output is merged in ruby-build-system.
1610 (substitute* "chunky_png.gemspec"
1611 (("`git ls-files`")
1612 "`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
1613 #t)))))
1614 (native-inputs
1615 `(("bundler" ,bundler)
1616 ("ruby-rspec" ,ruby-rspec)
1617 ("ruby-standard" ,ruby-standard)
1618 ("ruby-yard" ,ruby-yard)))
1619 (synopsis "Ruby library to handle PNG images")
1620 (description "ChunkyPNG is a pure Ruby library that can read and write
1621 Portable Network Graphics (PNG) images without depending on an external image
1622 library. It tries to be memory efficient and reasonably fast. It has
1623 features such as:
1624 @itemize
1625 @item
1626 Decoding support for any image that the PNG standard allows. This includes all
1627 standard color modes, all bit depths, all transparency, and interlacing and
1628 filtering options.
1629 @item
1630 Encoding support for images of all color modes (true color, grayscale, and
1631 indexed) and transparency for all these color modes. The best color mode is
1632 chosen automatically, based on the amount of used colors.
1633 @item Read/write access to the image's pixels.
1634 @item Read/write access to all image metadata that is stored in chunks.
1635 @item
1636 Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
1637 pixel, depending on the hardware).
1638 @item
1639 Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
1640 integer math and a highly optimized saving routine.
1641 @item Interoperability with RMagick.
1642 @end itemize")
1643 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
1644 (license license:expat)))
1645
1646 (define-public ruby-text-hyphen
1647 (package
1648 (name "ruby-text-hyphen")
1649 (version "1.4.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (rubygems-uri "text-hyphen" version))
1654 (sha256
1655 (base32
1656 "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
1657 (build-system ruby-build-system)
1658 (native-inputs
1659 `(("ruby-hoe" ,ruby-hoe)))
1660 (synopsis "Ruby library to hyphenate words in various languages")
1661 (description "Text::Hyphen is a Ruby library to hyphenate words in various
1662 languages using Ruby-fied versions of TeX hyphenation patterns. It will
1663 properly hyphenate various words according to the rules of the language the
1664 word is written in. The algorithm is based on that of the TeX typesetting
1665 system by Donald E. Knuth.")
1666 (home-page "https://github.com/halostatue/text-hyphen")
1667 ;; The whole is licensed under the Expat license, but parts use various
1668 ;; versions of the LaTeX Project Public License.
1669 (license license:expat)))
1670
1671 (define-public ruby-open-uri-cached
1672 (package
1673 (name "ruby-open-uri-cached")
1674 (version "0.0.5")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (rubygems-uri "open-uri-cached" version))
1679 (sha256
1680 (base32
1681 "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
1682 (build-system ruby-build-system)
1683 (arguments
1684 `(#:tests? #f)) ;no test suite
1685 (synopsis "OpenURI with transparent disk caching")
1686 (description "OpenURI with transparent disk caching, which is
1687 useful to avoid making excessive queries, for example when scraping
1688 web pages.")
1689 (home-page "https://github.com/tigris/open-uri-cached")
1690 (license license:expat)))
1691
1692 (define-public ruby-asciidoctor-pdf
1693 ;; Use the latest commit, as the last tag doesn't build with the
1694 ;; latest Ruby dependencies in Guix.
1695 (let ((revision "1")
1696 (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
1697 (package
1698 (name "ruby-asciidoctor-pdf")
1699 (version (git-version "1.5.3" revision commit))
1700 (source
1701 (origin
1702 (method git-fetch) ;no test suite in the distributed gem
1703 (uri (git-reference
1704 (url "https://github.com/asciidoctor/asciidoctor-pdf.git")
1705 (commit commit)))
1706 (file-name (git-file-name name version))
1707 (sha256
1708 (base32
1709 "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
1710 (build-system ruby-build-system)
1711 (arguments
1712 `(#:test-target "spec"
1713 #:phases
1714 (modify-phases %standard-phases
1715 (add-after 'unpack 'remove-failing-tests
1716 ;; Two tests module fail for unknown reasons, *only* when
1717 ;; ran in the build container (see:
1718 ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
1719 (lambda _
1720 (delete-file "spec/audio_spec.rb")
1721 (delete-file "spec/video_spec.rb")
1722 #t))
1723 (add-after 'extract-gemspec 'strip-version-requirements
1724 (lambda _
1725 (substitute* "asciidoctor-pdf.gemspec"
1726 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1727 (string-append stripped "\n")))
1728 #t))
1729 (replace 'replace-git-ls-files
1730 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1731 ;; git ls-files output is merged in ruby-build-system.
1732 (lambda _
1733 (substitute* "asciidoctor-pdf.gemspec"
1734 (("`git ls-files -z`")
1735 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1736 |sort -z|cut -zc3-`"))
1737 #t))
1738 ;; The tests rely on the Gem being installed, so move the check phase
1739 ;; after the install phase.
1740 (delete 'check)
1741 (add-after 'install 'check
1742 (lambda* (#:key outputs tests? #:allow-other-keys)
1743 (let ((new-gem (string-append (assoc-ref outputs "out")
1744 "/lib/ruby/vendor_ruby")))
1745 (setenv "GEM_PATH"
1746 (string-append (getenv "GEM_PATH") ":" new-gem))
1747 (when tests?
1748 (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
1749 #t))))))
1750 (native-inputs
1751 `(("ruby-chunky-png" ,ruby-chunky-png)
1752 ("ruby-coderay" ,ruby-coderay)
1753 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
1754 ("ruby-rouge" ,ruby-rouge)
1755 ("ruby-rspec" ,ruby-rspec)))
1756 (propagated-inputs
1757 `(("ruby-asciidoctor" ,ruby-asciidoctor)
1758 ("ruby-concurrent-ruby" ,ruby-concurrent)
1759 ("ruby-open-uri-cached" ,ruby-open-uri-cached)
1760 ("ruby-prawn" ,ruby-prawn)
1761 ("ruby-prawn-icon" ,ruby-prawn-icon)
1762 ("ruby-prawn-svg" ,ruby-prawn-svg)
1763 ("ruby-prawn-table" ,ruby-prawn-table)
1764 ("ruby-prawn-templates" ,ruby-prawn-templates)
1765 ("ruby-safe-yaml" ,ruby-safe-yaml)
1766 ("ruby-text-hyphen" ,ruby-text-hyphen)
1767 ("ruby-thread-safe" ,ruby-thread-safe)
1768 ("ruby-treetop" ,ruby-treetop)
1769 ("ruby-ttfunk" ,ruby-ttfunk)))
1770 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1771 (description "Asciidoctor PDF is an extension for Asciidoctor that
1772 converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1773 PDF library. It has features such as:
1774 @itemize
1775 @item Direct AsciiDoc to PDF conversion
1776 @item Configuration-driven theme (style and layout)
1777 @item Scalable Vector Graphics (SVG) support
1778 @item PDF document outline (i.e., bookmarks)
1779 @item Table of contents page(s)
1780 @item Document metadata (title, authors, subject, keywords, etc.)
1781 @item Internal cross reference links
1782 @item Syntax highlighting with Rouge, Pygments, or CodeRay
1783 @item Page numbering
1784 @item Customizable running content (header and footer)
1785 @item
1786 “Keep together” blocks (i.e., page breaks avoided in certain block content)
1787 @item Orphaned section titles avoided
1788 @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1789 @item Table border settings honored
1790 @item Font-based icons
1791 @item Custom TrueType (TTF) fonts
1792 @item Double-sided printing mode (margins alternate on recto and verso pages)
1793 @end itemize")
1794 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1795 (license license:expat))))
1796
1797 (define-public ruby-ast
1798 (package
1799 (name "ruby-ast")
1800 (version "2.4.1")
1801 (source
1802 (origin
1803 (method git-fetch) ;no test included in gem from v2.4.1
1804 (uri (git-reference
1805 (url "https://github.com/whitequark/ast")
1806 (commit (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32
1810 "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
1811 (build-system ruby-build-system)
1812 (arguments
1813 '(#:phases
1814 (modify-phases %standard-phases
1815 (add-after 'unpack 'remove-coveralls-requirement
1816 (lambda _
1817 (substitute* "test/helper.rb"
1818 (("require 'coveralls'") "")
1819 (("Coveralls::SimpleCov::Formatter") ""))
1820 #t))
1821 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1822 (lambda _
1823 (substitute* "ast.gemspec"
1824 ((".*coveralls.*") "\n")
1825 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1826 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1827 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1828 #t)))))
1829 (native-inputs
1830 `(("bundler" ,bundler)
1831 ("ruby-simplecov" ,ruby-simplecov)
1832 ("ruby-json-pure" ,ruby-json-pure)
1833 ("ruby-mime-times" ,ruby-mime-types)
1834 ("ruby-yard" ,ruby-yard)
1835 ("ruby-kramdown" ,ruby-kramdown)
1836 ("ruby-rest-client" ,ruby-rest-client)
1837 ("ruby-bacon" ,ruby-bacon)
1838 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1839 ("ruby-racc" ,ruby-racc)))
1840 (synopsis "Library for working with Abstract Syntax Trees")
1841 (description
1842 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1843 It does this through immutable data structures.")
1844 (home-page "https://whitequark.github.io/ast/")
1845 (license license:expat)))
1846
1847 (define-public ruby-sporkmonger-rack-mount
1848 ;; Testing the addressable gem requires a newer commit than that released, so
1849 ;; use an up to date version.
1850 (let ((revision "1")
1851 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1852 (package
1853 (name "ruby-sporkmonger-rack-mount")
1854 (version (git-version "0.8.3" revision commit))
1855 (source (origin
1856 (method git-fetch)
1857 (uri (git-reference
1858 (url "https://github.com/sporkmonger/rack-mount")
1859 (commit commit)))
1860 (file-name (git-file-name name version))
1861 (sha256
1862 (base32
1863 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1864 (build-system ruby-build-system)
1865 (arguments
1866 ;; Tests currently fail so disable them.
1867 ;; https://github.com/sporkmonger/rack-mount/pull/1
1868 `(#:tests? #f))
1869 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1870 (synopsis "Stackable dynamic tree based Rack router")
1871 (description
1872 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1873 continue trying routes if the response returns pass. This allows multiple
1874 routes to be nested or stacked on top of each other.")
1875 (home-page "https://github.com/sporkmonger/rack-mount")
1876 (license license:expat))))
1877
1878 (define-public ruby-ci-reporter
1879 (package
1880 (name "ruby-ci-reporter")
1881 (version "2.0.0")
1882 (source (origin
1883 (method url-fetch)
1884 (uri (rubygems-uri "ci_reporter" version))
1885 (sha256
1886 (base32
1887 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1888 (build-system ruby-build-system)
1889 (arguments
1890 `(#:test-target "rspec"))
1891 (propagated-inputs
1892 `(("ruby-builder" ,ruby-builder)))
1893 (native-inputs
1894 `(("bundler" ,bundler)
1895 ("ruby-rspec" ,ruby-rspec)))
1896 (synopsis "Generate XML reports of runs test")
1897 (description
1898 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1899 you to generate XML reports of your test runs. The resulting files can be
1900 read by a continuous integration system that understands Ant's JUnit report
1901 format.")
1902 (home-page "https://github.com/nicksieger/ci_reporter")
1903 (license license:expat)))
1904
1905 (define-public ruby-contracts
1906 (package
1907 (name "ruby-contracts")
1908 (version "0.16.0")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (rubygems-uri "contracts" version))
1913 (sha256
1914 (base32
1915 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1916 (build-system ruby-build-system)
1917 (arguments
1918 '(#:test-target "spec"
1919 #:phases
1920 (modify-phases %standard-phases
1921 ;; Don't run or require rubocop, the code linting tool, as this is a
1922 ;; bit unnecessary.
1923 (add-after 'unpack 'dont-run-rubocop
1924 (lambda _
1925 (substitute* "Rakefile"
1926 ((".*rubocop.*") "")
1927 ((".*RuboCop.*") ""))
1928 #t)))))
1929 (native-inputs
1930 `(("ruby-rspec" ,ruby-rspec)))
1931 (synopsis "Method contracts for Ruby")
1932 (description
1933 "This library provides contracts for Ruby. A contract describes the
1934 correct inputs and output for a method, and will raise an error if a incorrect
1935 value is found.")
1936 (home-page "https://github.com/egonSchiele/contracts.ruby")
1937 (license license:bsd-2)))
1938
1939 (define-public ruby-crack
1940 (package
1941 (name "ruby-crack")
1942 (version "0.4.3")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (rubygems-uri "crack" version))
1947 (sha256
1948 (base32
1949 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1950 (build-system ruby-build-system)
1951 (arguments
1952 `(#:phases
1953 (modify-phases %standard-phases
1954 (replace 'check
1955 (lambda* (#:key tests? #:allow-other-keys)
1956 (when tests?
1957 (for-each (lambda (file)
1958 (display file)(display "\n")
1959 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1960 (find-files "test" ".*rb$")))
1961 #t)))))
1962 (propagated-inputs
1963 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1964 (synopsis "Simple JSON and XML parsing for Ruby")
1965 (description
1966 "@code{crack} provides really simple JSON and XML parsing, extracted from
1967 code in Merb and Rails.")
1968 (home-page "https://github.com/jnunemaker/crack")
1969 (license license:expat)))
1970
1971 (define-public ruby-cliver
1972 (package
1973 (name "ruby-cliver")
1974 (version "0.3.2")
1975 (source
1976 (origin
1977 (method url-fetch)
1978 (uri (rubygems-uri "cliver" version))
1979 (sha256
1980 (base32
1981 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1982 (build-system ruby-build-system)
1983 (arguments
1984 '(#:phases
1985 (modify-phases %standard-phases
1986 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1987 ;; would be nice, but the tests look to be incompatible:
1988 ;;
1989 ;; NoMethodError: undefined method `last_comment'
1990 (replace 'check
1991 (lambda* (#:key tests? #:allow-other-keys)
1992 (when tests?
1993 (invoke "rspec"))
1994 #t)))))
1995 (native-inputs
1996 `(("bundler" ,bundler)
1997 ("ruby-rspec" ,ruby-rspec-2)))
1998 (synopsis "Assertions for command-line dependencies in Ruby")
1999 (description
2000 "@code{cliver} provides a way to detect missing command-line
2001 dependencies, including versions.")
2002 (home-page "https://github.com/yaauie/cliver")
2003 (license license:expat)))
2004
2005 (define-public ruby-czmq-ffi-gen
2006 (package
2007 (name "ruby-czmq-ffi-gen")
2008 (version "0.13.0")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (rubygems-uri "czmq-ffi-gen" version))
2013 (sha256
2014 (base32
2015 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2016 (build-system ruby-build-system)
2017 (arguments
2018 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2019 #:phases
2020 (modify-phases %standard-phases
2021 (add-after 'unpack 'patch-lib_dirs
2022 (lambda* (#:key inputs #:allow-other-keys)
2023 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2024 (("lib\\_dirs = \\[.*\\]")
2025 (string-append "lib_dirs = ['"
2026 (assoc-ref inputs "czmq") "/lib"
2027 "']")))
2028 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2029 (("lib\\_dirs = \\[.*\\]")
2030 (string-append "lib_dirs = ['"
2031 (assoc-ref inputs "zeromq") "/lib"
2032 "']"))))))))
2033 (inputs
2034 `(("zeromq" ,zeromq)
2035 ("czmq" ,czmq)))
2036 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
2037 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2038 (description
2039 "These Ruby bindings are not intended to be directly used, but rather
2040 used by higher level bindings like those provided by CZTop.")
2041 (home-page
2042 "https://github.com/paddor/czmq-ffi-gen")
2043 (license license:isc)))
2044
2045 (define-public ruby-cztop
2046 (package
2047 (name "ruby-cztop")
2048 (version "0.12.2")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (rubygems-uri "cztop" version))
2053 (sha256
2054 (base32
2055 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2056 (build-system ruby-build-system)
2057 (arguments
2058 '(#:test-target "spec"
2059 #:phases
2060 (modify-phases %standard-phases
2061 (add-after 'unpack 'patch-lib_paths
2062 (lambda* (#:key inputs #:allow-other-keys)
2063 (substitute* "lib/cztop/poller/zmq.rb"
2064 (("lib\\_paths = \\[.*\\]")
2065 (string-append "lib_paths = ['"
2066 (assoc-ref inputs "zeromq") "/lib"
2067 "']"))))))))
2068 (native-inputs
2069 `(("bundler" ,bundler)
2070 ("ruby-rspec" ,ruby-rspec)))
2071 (inputs
2072 `(("zeromq" ,zeromq)))
2073 (propagated-inputs
2074 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
2075 (synopsis "CZMQ Ruby bindings")
2076 (description
2077 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2078 CZMQ. The focus of of CZTop is on being easy to use and providing first class
2079 support for security mechanisms.")
2080 (home-page "https://github.com/paddor/cztop")
2081 (license license:isc)))
2082
2083 (define-public ruby-saikuro-treemap
2084 (package
2085 (name "ruby-saikuro-treemap")
2086 (version "0.2.0")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (rubygems-uri "saikuro_treemap" version))
2090 (sha256
2091 (base32
2092 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2093 (build-system ruby-build-system)
2094 ;; Some of the tests fail because the generated JSON has keys in a
2095 ;; different order. This is a problem with the test suite rather than any
2096 ;; of the involved libraries.
2097 (arguments `(#:tests? #f))
2098 (propagated-inputs
2099 `(("ruby-json-pure" ,ruby-json-pure)
2100 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
2101 (synopsis "Generate complexity treemap based on saikuro analysis")
2102 (description
2103 "This gem generates a treemap showing the complexity of Ruby code on
2104 which it is run. It uses Saikuro under the covers to analyze Ruby code
2105 complexity.")
2106 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2107 (license license:expat)))
2108
2109 (define-public ruby-oauth2
2110 (package
2111 (name "ruby-oauth2")
2112 (version "1.4.2")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (rubygems-uri "oauth2" version))
2117 (sha256
2118 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
2119 (build-system ruby-build-system)
2120 (arguments
2121 '(#:tests? #f)) ; no included tests
2122 (propagated-inputs
2123 `(("ruby-faraday" ,ruby-faraday)
2124 ("ruby-jwt" ,ruby-jwt)
2125 ("ruby-multi-json" ,ruby-multi-json)
2126 ("ruby-multi-xml" ,ruby-multi-xml)
2127 ("ruby-rack" ,ruby-rack)))
2128 (synopsis "Ruby wrapper for the OAuth 2.0")
2129 (description
2130 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2131 with a similar style to the original OAuth spec.")
2132 (home-page "https://github.com/oauth-xx/oauth2")
2133 (license license:expat)))
2134
2135 (define-public ruby-omniauth
2136 (package
2137 (name "ruby-omniauth")
2138 (version "1.9.1")
2139 (source
2140 (origin
2141 (method url-fetch)
2142 (uri (rubygems-uri "omniauth" version))
2143 (sha256
2144 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
2145 (build-system ruby-build-system)
2146 (arguments
2147 '(#:tests? #f)) ; No included tests
2148 (propagated-inputs
2149 `(("ruby-hashie" ,ruby-hashie)
2150 ("ruby-rack" ,ruby-rack)))
2151 (synopsis "Generalized Rack framework for multiple-provider authentication")
2152 (description
2153 "This package provides a generalized Rack framework for multiple-provider
2154 authentication.")
2155 (home-page "https://github.com/omniauth/omniauth")
2156 (license license:expat)))
2157
2158 (define-public ruby-omniauth-oauth2
2159 (package
2160 (name "ruby-omniauth-oauth2")
2161 (version "1.6.0")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (rubygems-uri "omniauth-oauth2" version))
2166 (sha256
2167 (base32
2168 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
2169 (build-system ruby-build-system)
2170 (arguments
2171 '(#:phases
2172 (modify-phases %standard-phases
2173 (add-after 'unpack 'remove-unnecessary-dependencies
2174 (lambda _
2175 ;; The coveralls gem submits coverage information to an online
2176 ;; service, and is unnecessary when running the tests
2177 (substitute* "Gemfile"
2178 ((".*coveralls\"") ""))
2179 (substitute* "spec/helper.rb"
2180 (("require \"coveralls\"") "")
2181 (("Coveralls::SimpleCov::Formatter") ""))
2182 #t)))))
2183 (propagated-inputs
2184 `(("ruby-oauth2" ,ruby-oauth2)
2185 ("ruby-omniauth" ,ruby-omniauth)))
2186 (native-inputs
2187 `(("bundler" ,bundler)
2188 ("ruby-rspec" ,ruby-rspec)
2189 ("ruby-simplecov" ,ruby-simplecov)
2190 ("ruby-rack-test" ,ruby-rack-test)
2191 ("ruby-webmock" ,ruby-webmock-2)))
2192 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2193 (description
2194 "This library provides a generic OAuth2 strategy for OmniAuth. It
2195 doesn't provide a way to gather user information, so should be used as a
2196 building block for authentication strategies.")
2197 (home-page "https://github.com/omniauth/omniauth-oauth2")
2198 (license license:expat)))
2199
2200 (define-public ruby-open4
2201 (package
2202 (name "ruby-open4")
2203 (version "1.3.4")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (rubygems-uri "open4" version))
2208 (sha256
2209 (base32
2210 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2211 (build-system ruby-build-system)
2212 (arguments
2213 '(#:phases
2214 (modify-phases %standard-phases
2215 (add-after 'unpack 'patch
2216 (lambda _
2217 (substitute* "rakefile"
2218 ;; Update the Rakefile so it works
2219 (("-rubygems") "-rrubygems")
2220 (("Config") "RbConfig"))
2221 #t))
2222 (add-before 'check 'set-LIB
2223 (lambda _
2224 ;; This is used in the rakefile when running the tests
2225 (setenv "LIB" "open4")
2226 #t)))))
2227 (synopsis "Open child processes from Ruby and manage them easily")
2228 (description
2229 "@code{Open4} is a Ruby library to run child processes and manage their
2230 input and output.")
2231 (home-page "https://github.com/ahoward/open4")
2232 (license license:ruby)))
2233
2234 (define-public ruby-options
2235 (package
2236 (name "ruby-options")
2237 (version "2.3.2")
2238 (source
2239 (origin
2240 (method url-fetch)
2241 (uri (rubygems-uri "options" version))
2242 (sha256
2243 (base32
2244 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2245 (build-system ruby-build-system)
2246 (arguments
2247 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2248 #:phases
2249 (modify-phases %standard-phases
2250 (add-before 'check 'set-LIB
2251 (lambda _
2252 ;; This is used in the Rakefile, and setting it avoids an issue
2253 ;; with running the tests.
2254 (setenv "LIB" "options")
2255 #t)))))
2256 (synopsis "Ruby library to parse options from *args cleanly")
2257 (description
2258 "The @code{options} library helps with parsing keyword options in Ruby
2259 functions.")
2260 (home-page "https://github.com/ahoward/options")
2261 (license license:ruby)))
2262
2263 (define-public ruby-erubi
2264 (package
2265 (name "ruby-erubi")
2266 (version "1.8.0")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (rubygems-uri "erubi" version))
2271 (sha256
2272 (base32
2273 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2274 (build-system ruby-build-system)
2275 (synopsis "ERB template engine for Ruby")
2276 (description
2277 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2278 Erubis")
2279 (home-page "https://github.com/jeremyevans/erubi")
2280 (license license:expat)))
2281
2282 (define-public ruby-erubis
2283 (package
2284 (name "ruby-erubis")
2285 (version "2.7.0")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (rubygems-uri "erubis" version))
2290 (sha256
2291 (base32
2292 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2293 (build-system ruby-build-system)
2294 (arguments
2295 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2296 (synopsis "Implementation of embedded Ruby (eRuby)")
2297 (description
2298 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2299 features such as multi-language support, auto escaping, auto trimming spaces
2300 around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2301 support.")
2302 (home-page "http://www.kuwata-lab.com/erubis/")
2303 (license license:expat)))
2304
2305 (define-public ruby-execjs
2306 (package
2307 (name "ruby-execjs")
2308 (version "2.7.0")
2309 (source
2310 (origin
2311 ;; fetch from github as the gem does not contain testing code
2312 (method git-fetch)
2313 (uri (git-reference
2314 (url "https://github.com/rails/execjs")
2315 (commit (string-append "v" version))))
2316 (file-name (git-file-name name version))
2317 (sha256
2318 (base32
2319 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
2320 (build-system ruby-build-system)
2321 (native-inputs
2322 `(("bundler" ,bundler)
2323 ;; The test suite tests all the available backends. Currenly, this just
2324 ;; means the node backend.
2325 ;;
2326 ;; PASSED: test:node
2327 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
2328 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
2329 ("node" ,node)))
2330 (synopsis "Run JavaScript code from Ruby")
2331 (description
2332 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2333 runtime to evaluate your JavaScript program, then returns the result to you as
2334 a Ruby object.")
2335 (home-page "https://github.com/rails/execjs")
2336 (license license:expat)))
2337
2338 (define-public ruby-fakefs
2339 (package
2340 (name "ruby-fakefs")
2341 (version "1.2.2")
2342 (home-page "https://github.com/fakefs/fakefs")
2343 (source (origin
2344 ;; The Rubygems release does not contain tests.
2345 (method git-fetch)
2346 (uri (git-reference
2347 (url home-page)
2348 (commit (string-append "v" version))))
2349 (file-name (git-file-name name version))
2350 (sha256
2351 (base32
2352 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2353 (build-system ruby-build-system)
2354 (arguments
2355 '(#:phases (modify-phases %standard-phases
2356 (replace 'replace-git-ls-files
2357 (lambda _
2358 (substitute* "fakefs.gemspec"
2359 (("`git ls-files lib README.md LICENSE`")
2360 "`find lib README.md LICENSE -type f | sort`"))
2361 #t))
2362 (add-before 'check 'remove-version-constraints
2363 (lambda _
2364 ;; Drop hard version requirements for test dependencies.
2365 (substitute* "fakefs.gemspec"
2366 (("(.*add_development_dependency .*), .*" _ dep)
2367 (string-append dep "\n")))
2368 #t)))))
2369 (native-inputs
2370 `(("ruby-bump" ,ruby-bump)
2371 ("ruby-maxitest" ,ruby-maxitest)
2372 ("ruby-rubocop" ,ruby-rubocop)
2373 ("ruby-rspec" ,ruby-rspec)))
2374 (synopsis "Fake file system for Ruby")
2375 (description
2376 "This package provides a fake file system for use in test suites. It
2377 avoids the need for manually creating temporary directories, or dealing
2378 with platform intricacies in @code{File} and @code{FileUtils}.")
2379 (license license:expat)))
2380
2381 (define-public ruby-orderedhash
2382 (package
2383 (name "ruby-orderedhash")
2384 (version "0.0.6")
2385 (source (origin
2386 (method url-fetch)
2387 (uri (rubygems-uri "orderedhash" version))
2388 (sha256
2389 (base32
2390 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2391 (build-system ruby-build-system)
2392 (arguments
2393 '(#:tests? #f)) ; no test suite
2394 (synopsis "Ruby library providing an order-preserving hash")
2395 (description "Orderedhash is a Ruby library providing a hash
2396 implementation that preserves the order of items and features some array-like
2397 extensions.")
2398 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2399 (license license:public-domain)))
2400
2401 (define-public ruby-libxml
2402 (package
2403 (name "ruby-libxml")
2404 (version "3.0.0")
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (rubygems-uri "libxml-ruby" version))
2409 (sha256
2410 (base32
2411 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
2412 (build-system ruby-build-system)
2413 (inputs
2414 `(("zlib" ,zlib)
2415 ("libxml2" ,libxml2)))
2416 (arguments
2417 '(#:tests? #f ; test suite hangs for unknown reason
2418 #:gem-flags
2419 (list "--no-document" ; TODO: Re-enable when documentation
2420 ; generation works
2421 "--"
2422 (string-append "--with-xml2-include="
2423 (assoc-ref %build-inputs "libxml2")
2424 "/include/libxml2" ))))
2425 (synopsis "Ruby bindings for GNOME Libxml2")
2426 (description "The Libxml-Ruby project provides Ruby language bindings for
2427 the GNOME Libxml2 XML toolkit.")
2428 (home-page "https://xml4r.github.com/libxml-ruby")
2429 (license license:expat)))
2430
2431 (define-public ruby-lino
2432 (package
2433 (name "ruby-lino")
2434 (version "1.1.0")
2435 (source
2436 (origin
2437 (method url-fetch)
2438 (uri (rubygems-uri "lino" version))
2439 (sha256
2440 (base32
2441 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2442 (build-system ruby-build-system)
2443 (arguments
2444 '(#:tests? #f)) ; No included tests
2445 (propagated-inputs
2446 `(("ruby-hamster" ,ruby-hamster)
2447 ("ruby-open4" ,ruby-open4)))
2448 (synopsis "Build and execute commands in Ruby")
2449 (description
2450 "@code{Lino} provides an interface to run external commands. It provides
2451 an interface to add options as well as managing the standard input, output and
2452 error streams.")
2453 (home-page "https://github.com/tobyclemson/lino")
2454 (license license:expat)))
2455
2456 (define-public ruby-xml-simple
2457 (package
2458 (name "ruby-xml-simple")
2459 (version "1.1.5")
2460 (source (origin
2461 (method url-fetch)
2462 (uri (rubygems-uri "xml-simple" version))
2463 (sha256
2464 (base32
2465 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2466 (build-system ruby-build-system)
2467 (arguments
2468 '(#:tests? #f)) ; no test suite
2469 (synopsis "Simple Ruby library for XML processing")
2470 (description "This library provides a simple API for XML processing in
2471 Ruby.")
2472 (home-page "https://github.com/maik/xml-simple")
2473 (license license:ruby)))
2474
2475 (define-public ruby-thor
2476 (package
2477 (name "ruby-thor")
2478 (version "1.0.1")
2479 (source (origin
2480 ;; Pull from git because the gem has no tests.
2481 (method git-fetch)
2482 (uri (git-reference
2483 (url "https://github.com/erikhuda/thor")
2484 (commit (string-append "v" version))))
2485 (file-name (git-file-name name version))
2486 (sha256
2487 (base32
2488 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2489 (build-system ruby-build-system)
2490 (arguments
2491 '(#:phases (modify-phases %standard-phases
2492 (add-after 'unpack 'fix-readline-tests
2493 (lambda _
2494 ;; Ensure Readline is initialized before running the
2495 ;; test to avoid a type clash with the mock ::Readline.
2496 ;; See <https://github.com/erikhuda/thor/pull/717>.
2497 (substitute* "spec/line_editor/readline_spec.rb"
2498 (("unless defined\\? ::Readline" all)
2499 (string-append "Thor::LineEditor::Readline.available?\n"
2500 all)))
2501 #t))
2502 (add-after 'unpack 'remove-coveralls-dependency
2503 (lambda _
2504 ;; Do not hook the test suite into the online
2505 ;; coveralls service.
2506 (substitute* "Gemfile"
2507 ((".*coveralls.*") ""))
2508 (substitute* "spec/helper.rb"
2509 (("require \"coveralls\"") "")
2510 (("Coveralls::SimpleCov::Formatter") "")
2511 ;; Also drop the WebMock dependency which is only
2512 ;; present to allow a coveralls.io connection, and
2513 ;; would otherwise introduce a circular dependency.
2514 (("require \"webmock/rspec\"") "")
2515 (("WebMock\\.disable_net_connect.*") ""))
2516 #t))
2517 (add-after 'unpack 'disable-network-tests
2518 (lambda _
2519 ;; These tests attempt to look up example.com.
2520 (substitute* "spec/actions/file_manipulation_spec.rb"
2521 (("it \"accepts (https?) remote sources" _ proto)
2522 (string-append "xit \"accepts " proto " remote sources")))
2523 #t))
2524 (add-after 'unpack 'disable-quality-tests
2525 (lambda _
2526 ;; These tests attempt to check the git repository for
2527 ;; tabs vs spaces, double vs single quotes, etc, and
2528 ;; depend on the git checkout.
2529 (delete-file "spec/quality_spec.rb")
2530 #t))
2531 (add-before 'check 'make-files-writable
2532 (lambda _
2533 ;; The tests needs rw access to the test suite.
2534 (for-each make-file-writable (find-files "spec"))
2535 #t))
2536 (replace 'check
2537 (lambda _
2538 (invoke "rspec" "spec"))))))
2539 (native-inputs
2540 `(("ruby-rspec" ,ruby-rspec)
2541 ("ruby-simplecov" ,ruby-simplecov)))
2542 (synopsis "Ruby toolkit for building command-line interfaces")
2543 (description "Thor is a toolkit for building powerful command-line
2544 interfaces.")
2545 (home-page "http://whatisthor.com/")
2546 (license license:expat)))
2547
2548 (define-public ruby-lumberjack
2549 (package
2550 (name "ruby-lumberjack")
2551 (version "1.0.13")
2552 (source (origin
2553 (method url-fetch)
2554 (uri (rubygems-uri "lumberjack" version))
2555 (sha256
2556 (base32
2557 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
2558 (build-system ruby-build-system)
2559 (native-inputs
2560 `(("ruby-rspec" ,ruby-rspec)
2561 ("ruby-timecop" ,ruby-timecop)))
2562 (synopsis "Logging utility library for Ruby")
2563 (description "Lumberjack is a simple logging utility that can be a drop in
2564 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2565 for automatically rolling log files even with multiple processes writing the
2566 same log file.")
2567 (home-page "https://github.com/bdurand/lumberjack")
2568 (license license:expat)))
2569
2570 (define-public ruby-rbnacl
2571 (package
2572 (name "ruby-rbnacl")
2573 (version "6.0.1")
2574 (source
2575 (origin
2576 (method url-fetch)
2577 (uri (rubygems-uri "rbnacl" version))
2578 (sha256
2579 (base32
2580 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2581 (build-system ruby-build-system)
2582 (arguments
2583 `(#:phases
2584 (modify-phases %standard-phases
2585 (add-after 'unpack 'remove-unnecessary-dependencies
2586 (lambda _
2587 ;; Coveralls relates to a network service, and Rubocop to code
2588 ;; linting and both are unnecessary to run the tests
2589 (substitute* "Gemfile"
2590 ((".*rubocop.*") "\n")
2591 ((".*guard-rspec.*") "\n")
2592 ((".*coveralls.*") "\n"))
2593 (substitute* "spec/spec_helper.rb"
2594 (("require \"coveralls\"") "")
2595 (("Coveralls.wear!") ""))
2596 #t))
2597 (add-after 'unpack 'use-libsodium-from-store
2598 (lambda* (#:key inputs #:allow-other-keys)
2599 (substitute* '("lib/rbnacl/init.rb"
2600 "lib/rbnacl/sodium.rb")
2601 (("ffi_lib \\[.+\\]")
2602 (string-append "ffi_lib [\""
2603 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2604 "\"]")))
2605 #t))
2606 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2607 (replace 'check
2608 (lambda* (#:key tests? #:allow-other-keys)
2609 (when tests?
2610 (invoke "rspec"))
2611 #t)))))
2612 (propagated-inputs
2613 `(("ruby-ffi" ,ruby-ffi)))
2614 (inputs
2615 `(("libsodium" ,libsodium)))
2616 (native-inputs
2617 `(("bundler" ,bundler)
2618 ("ruby-rspec" ,ruby-rspec)))
2619 (synopsis "Ruby FFI binding to libsodium")
2620 (description
2621 "This package provides Ruby FFI bindings to the Networking and
2622 Cryptography (NaCl) library, also known as libsodium. This provides a
2623 high-level toolkit for building cryptographic systems and protocols.")
2624 (home-page "https://github.com/crypto-rb/rbnacl")
2625 (license license:expat)))
2626
2627 (define-public ruby-nenv
2628 (package
2629 (name "ruby-nenv")
2630 (version "0.3.0")
2631 (source (origin
2632 (method url-fetch)
2633 (uri (rubygems-uri "nenv" version))
2634 (sha256
2635 (base32
2636 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
2637 (build-system ruby-build-system)
2638 (arguments
2639 `(#:tests? #f)) ; no tests included
2640 (native-inputs
2641 `(("ruby-rspec" ,ruby-rspec)
2642 ("bundler" ,bundler)))
2643 (synopsis "Ruby interface for modifying the environment")
2644 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2645 and inspect the environment.")
2646 (home-page "https://github.com/e2/nenv")
2647 (license license:expat)))
2648
2649 (define-public ruby-ptools
2650 (package
2651 (name "ruby-ptools")
2652 (version "1.3.5")
2653 (source (origin
2654 (method url-fetch)
2655 (uri (rubygems-uri "ptools" version))
2656 (sha256
2657 (base32
2658 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2659 (build-system ruby-build-system)
2660 (arguments
2661 '(#:phases (modify-phases %standard-phases
2662 (add-after 'unpack 'patch-/bin/ls
2663 (lambda _
2664 (substitute* "test/test_binary.rb"
2665 (("/bin/ls")
2666 (which "ls")))
2667 #t))
2668 (add-before 'install 'create-gem
2669 (lambda _
2670 ;; Do not attempt to sign the gem.
2671 (substitute* "Rakefile"
2672 (("spec\\.signing_key = .*")
2673 ""))
2674 (invoke "rake" "gem:create"))))))
2675 (synopsis "Extra methods for Ruby's @code{File} class")
2676 (description
2677 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2678 class with many additional methods modelled after common POSIX tools, such as
2679 @code{File.which} for finding executables, @code{File.tail} to print the last
2680 lines of a file, @code{File.wc} to count words, and so on.")
2681 (home-page "https://github.com/djberg96/ptools")
2682 (license license:artistic2.0)))
2683
2684 (define-public ruby-permutation
2685 (package
2686 (name "ruby-permutation")
2687 (version "0.1.8")
2688 (source (origin
2689 (method url-fetch)
2690 (uri (rubygems-uri "permutation" version))
2691 (sha256
2692 (base32
2693 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2694 (build-system ruby-build-system)
2695 (arguments
2696 `(#:phases
2697 (modify-phases %standard-phases
2698 (add-after 'unpack 'fix-rakefile
2699 (lambda _
2700 (substitute* "Rakefile"
2701 (("require 'rake/gempackagetask'")
2702 "require 'rubygems/package_task'")
2703 (("include Config") ""))
2704 #t))
2705 (replace 'check
2706 (lambda _
2707 (invoke "ruby" "-Ilib" "test/test.rb"))))))
2708 (synopsis "Library to perform operations with sequence permutations")
2709 (description "This package provides a Ruby library to perform different
2710 operations with permutations of sequences, such as strings and arrays.")
2711 (home-page "https://flori.github.io/permutation")
2712 (license license:gpl2))) ; GPL 2 only
2713
2714 (define-public ruby-shellany
2715 (package
2716 (name "ruby-shellany")
2717 (version "0.0.1")
2718 (source (origin
2719 (method url-fetch)
2720 (uri (rubygems-uri "shellany" version))
2721 (sha256
2722 (base32
2723 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2724 (build-system ruby-build-system)
2725 (arguments
2726 `(#:test-target "default"
2727 #:phases
2728 (modify-phases %standard-phases
2729 (add-after 'unpack 'fix-version-test
2730 (lambda _
2731 (substitute* "spec/shellany_spec.rb"
2732 (("^RSpec") "require \"shellany\"\nRSpec"))
2733 #t)))))
2734 (native-inputs
2735 `(("ruby-rspec" ,ruby-rspec)
2736 ("ruby-nenv" ,ruby-nenv)
2737 ("bundler" ,bundler)))
2738 (synopsis "Capture command output")
2739 (description "Shellany is a Ruby library providing functions to capture
2740 the output produced by running shell commands.")
2741 (home-page "https://rubygems.org/gems/shellany")
2742 (license license:expat)))
2743
2744 (define-public ruby-notiffany
2745 (package
2746 (name "ruby-notiffany")
2747 (version "0.1.3")
2748 (source (origin
2749 (method url-fetch)
2750 (uri (rubygems-uri "notiffany" version))
2751 (sha256
2752 (base32
2753 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
2754 (build-system ruby-build-system)
2755 ;; Tests are not included in the gem.
2756 (arguments `(#:tests? #f))
2757 (propagated-inputs
2758 `(("ruby-shellany" ,ruby-shellany)
2759 ("ruby-nenv" ,ruby-nenv)))
2760 (native-inputs
2761 `(("bundler" ,bundler)))
2762 (synopsis "Wrapper library for notification libraries")
2763 (description "Notiffany is a Ruby wrapper library for notification
2764 libraries such as Libnotify.")
2765 (home-page "https://github.com/guard/notiffany")
2766 (license license:expat)))
2767
2768 (define-public ruby-forking-test-runner
2769 (package
2770 (name "ruby-forking-test-runner")
2771 (version "1.6.0")
2772 (home-page "https://github.com/grosser/forking_test_runner")
2773 (source (origin
2774 (method git-fetch)
2775 (uri (git-reference (url home-page)
2776 (commit (string-append "v" version))))
2777 (file-name (git-file-name name version))
2778 (sha256
2779 (base32
2780 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2781 (build-system ruby-build-system)
2782 (arguments
2783 '(#:test-target "spec"
2784 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2785 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2786 #:tests? #f
2787 #:phases (modify-phases %standard-phases
2788 (replace 'replace-git-ls-files
2789 (lambda _
2790 (substitute* "forking_test_runner.gemspec"
2791 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2792 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2793 #t))
2794 (add-before 'check 'remove-version-constraints
2795 (lambda _
2796 ;; Ignore hard coded version constraints for the tests.
2797 (delete-file "Gemfile.lock")
2798 #t))
2799 (add-before 'check 'set-HOME
2800 (lambda _
2801 ;; Many tests invoke Bundler, and fails when Bundler
2802 ;; warns that /homeless-shelter does not exist.
2803 (setenv "HOME" "/tmp")
2804 #t)))))
2805 (native-inputs
2806 `(("ruby-activerecord" ,ruby-activerecord)
2807 ("ruby-bump" ,ruby-bump)
2808 ("ruby-rspec" ,ruby-rspec)
2809 ("ruby-sqlite3" ,ruby-sqlite3)
2810 ("ruby-wwtd" ,ruby-wwtd)))
2811 (propagated-inputs
2812 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2813 (synopsis "Run every test in a fork")
2814 (description
2815 "This package is a wrapper around @code{parallel_tests} that runs every
2816 test in a fork to avoid pollution and get clean output per test.")
2817 (license license:expat)))
2818
2819 (define-public ruby-formatador
2820 (package
2821 (name "ruby-formatador")
2822 (version "0.2.5")
2823 (source (origin
2824 (method url-fetch)
2825 (uri (rubygems-uri "formatador" version))
2826 (sha256
2827 (base32
2828 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2829 (build-system ruby-build-system)
2830 ;; Circular dependency: Tests require ruby-shindo, which requires
2831 ;; ruby-formatador at runtime.
2832 (arguments `(#:tests? #f))
2833 (synopsis "Ruby library to format text on stdout")
2834 (description "Formatador is a Ruby library to format text printed to the
2835 standard output stream.")
2836 (home-page "https://github.com/geemus/formatador")
2837 (license license:expat)))
2838
2839 (define-public ruby-fuubar
2840 (package
2841 (name "ruby-fuubar")
2842 (version "2.3.2")
2843 (source
2844 (origin
2845 ;; Fetch from the git repository, as the gem package doesn't include
2846 ;; the tests.
2847 (method git-fetch)
2848 (uri (git-reference
2849 (url "https://github.com/thekompanee/fuubar")
2850 (commit (string-append "releases/v" version))))
2851 (file-name (git-file-name name version))
2852 (sha256
2853 (base32
2854 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2855 (build-system ruby-build-system)
2856 (arguments
2857 '(;; TODO: Some tests fail, unsure why.
2858 ;; 21 examples, 7 failures
2859 #:tests? #f
2860 #:phases
2861 (modify-phases %standard-phases
2862 (add-before 'build 'delete-certificate
2863 (lambda _
2864 ;; Remove 's.cert_chain' as we do not build with a private key
2865 (substitute* "fuubar.gemspec"
2866 ((".*cert_chain.*") "")
2867 ((".*signing_key.*") ""))
2868 #t))
2869 (replace 'check
2870 (lambda* (#:key tests? #:allow-other-keys)
2871 (when tests?
2872 (invoke "rspec"))
2873 #t)))))
2874 (native-inputs
2875 `(("bundler" ,bundler)))
2876 (propagated-inputs
2877 `(("ruby-rspec-core" ,ruby-rspec-core)
2878 ("ruby-progressbar" ,ruby-progressbar)))
2879 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2880 (description
2881 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2882 string of letters and dots as feedback. It also stops on the first test
2883 failure.")
2884 (home-page "https://github.com/thekompanee/fuubar")
2885 (license license:expat)))
2886
2887 (define-public ruby-haml
2888 (package
2889 (name "ruby-haml")
2890 (version "5.0.4")
2891 (source
2892 (origin
2893 (method url-fetch)
2894 (uri (rubygems-uri "haml" version))
2895 (sha256
2896 (base32
2897 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2898 (build-system ruby-build-system)
2899 (arguments
2900 '(#:tests? #f)) ; No included tests
2901 (propagated-inputs
2902 `(("ruby-tilt" ,ruby-tilt)
2903 ("ruby-temple" ,ruby-temple)))
2904 (synopsis "Haml is a Ruby library to generate HTML documents")
2905 (description
2906 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2907 HTML or XML that is designed to express the structure of documents using
2908 indentation rather than closing tags. It was originally envisioned as a
2909 plugin for Ruby on Rails, but it can function as a stand-alone templating
2910 engine.")
2911 (home-page "http://haml.info/")
2912 (license license:expat)))
2913
2914 (define-public ruby-hamster
2915 (package
2916 (name "ruby-hamster")
2917 (version "3.0.0")
2918 (source
2919 (origin
2920 (method url-fetch)
2921 (uri (rubygems-uri "hamster" version))
2922 (sha256
2923 (base32
2924 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2925 (build-system ruby-build-system)
2926 (arguments
2927 '(#:phases
2928 (modify-phases %standard-phases
2929 (add-after 'unpack 'remove-unnecessary-dependencies
2930 (lambda _
2931 ;; pry is a debugging tool, and is unnecessary when running the
2932 ;; tests
2933 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2934 (("require 'pry'") ""))
2935 (substitute* "spec/spec_helper.rb"
2936 (("require \"pry\"") "")
2937 ;; CodeClimate is an online service, and is unnecessary for
2938 ;; running the tests
2939 (("require \"codeclimate-test-reporter\"") "")
2940 (("CodeClimate.*\n") ""))
2941 #t))
2942 ;; No Rakefile is included, so run rspec directly.
2943 (replace 'check
2944 (lambda* (#:key tests? #:allow-other-keys)
2945 (when tests?
2946 (invoke "rspec"))
2947 #t)))))
2948 (propagated-inputs
2949 `(("ruby-concurrent" ,ruby-concurrent)))
2950 (native-inputs
2951 `(("ruby-rspec" ,ruby-rspec)))
2952 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2953 (description
2954 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2955 @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2956 immutable queue or stack).")
2957 (home-page "https://github.com/hamstergem/hamster")
2958 (license license:expat)))
2959
2960 (define-public ruby-hashdiff
2961 (package
2962 (name "ruby-hashdiff")
2963 (version "0.3.8")
2964 (source
2965 (origin
2966 (method url-fetch)
2967 (uri (rubygems-uri "hashdiff" version))
2968 (sha256
2969 (base32
2970 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2971 (build-system ruby-build-system)
2972 (arguments
2973 '(#:phases
2974 (modify-phases %standard-phases
2975 ;; Run tests directly via rspec to avoid Rake issue:
2976 ;; NoMethodError: undefined method `last_comment'
2977 (replace 'check
2978 (lambda* (#:key tests? #:allow-other-keys)
2979 (when tests?
2980 (invoke "rspec"))
2981 #t)))))
2982 (native-inputs
2983 `(("bundler" ,bundler)
2984 ("ruby-rspec" ,ruby-rspec-2)))
2985 (synopsis "HashDiff computes the smallest difference between two hashes")
2986 (description
2987 "HashDiff is a Ruby library to compute the smallest difference between
2988 two hashes.")
2989 (home-page "https://github.com/liufengyun/hashdiff")
2990 (license license:expat)))
2991
2992 (define-public ruby-hydra
2993 ;; No releases yet.
2994 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2995 (revision "0"))
2996 (package
2997 (name "ruby-hydra")
2998 (version (git-version "0.0" revision commit))
2999 (home-page "https://github.com/hyphenation/hydra")
3000 (source (origin
3001 (method git-fetch)
3002 (uri (git-reference (url home-page) (commit commit)))
3003 (file-name (git-file-name name version))
3004 (sha256
3005 (base32
3006 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3007 (build-system ruby-build-system)
3008 (arguments
3009 '(#:phases (modify-phases %standard-phases
3010 (add-after 'unpack 'make-files-writable
3011 (lambda _
3012 (for-each make-file-writable (find-files "."))
3013 #t))
3014 (replace 'check
3015 (lambda _
3016 (invoke "rspec"))))))
3017 (native-inputs
3018 `(("ruby-rspec" ,ruby-rspec)))
3019 (propagated-inputs
3020 `(("ruby-byebug" ,ruby-byebug)))
3021 (synopsis "Ruby hyphenation patterns")
3022 (description
3023 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
3024 (license license:expat))))
3025
3026 (define-public ruby-shindo
3027 (package
3028 (name "ruby-shindo")
3029 (version "0.3.8")
3030 (source (origin
3031 (method url-fetch)
3032 (uri (rubygems-uri "shindo" version))
3033 (sha256
3034 (base32
3035 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
3036 (build-system ruby-build-system)
3037 (arguments
3038 `(#:test-target "shindo_tests"
3039 #:phases
3040 (modify-phases %standard-phases
3041 (add-after 'unpack 'fix-tests
3042 (lambda _
3043 (substitute* "tests/tests_helper.rb"
3044 (("-rubygems") ""))
3045 (substitute* "Rakefile"
3046 (("system \"shindo") "system \"./bin/shindo")
3047 ;; This test doesn't work, so we disable it.
3048 (("fail \"The build_error test should fail") "#")
3049 ((" -rubygems") ""))
3050 #t)))))
3051 (propagated-inputs
3052 `(("ruby-formatador" ,ruby-formatador)))
3053 (synopsis "Simple depth first Ruby testing")
3054 (description "Shindo is a simple depth first testing library for Ruby.")
3055 (home-page "https://github.com/geemus/shindo")
3056 (license license:expat)))
3057
3058 (define-public ruby-rubygems-tasks
3059 (package
3060 (name "ruby-rubygems-tasks")
3061 (version "0.2.5")
3062 (source (origin
3063 (method url-fetch)
3064 (uri (rubygems-uri "rubygems-tasks" version))
3065 (sha256
3066 (base32
3067 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
3068 (build-system ruby-build-system)
3069 ;; Tests need Internet access.
3070 (arguments `(#:tests? #f))
3071 (native-inputs
3072 `(("ruby-rspec" ,ruby-rspec)
3073 ("ruby-yard" ,ruby-yard)))
3074 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3075 (description "Rubygems-task provides Rake tasks for managing and releasing
3076 Ruby Gems.")
3077 (home-page "https://github.com/postmodern/rubygems-tasks")
3078 (license license:expat)))
3079
3080 (define-public ruby-rubyzip
3081 (package
3082 (name "ruby-rubyzip")
3083 (version "1.2.1")
3084 (source
3085 (origin
3086 (method url-fetch)
3087 (uri (rubygems-uri "rubyzip" version))
3088 (sha256
3089 (base32
3090 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
3091 (build-system ruby-build-system)
3092 (arguments
3093 '(#:phases
3094 (modify-phases %standard-phases
3095 (add-before 'check 'patch-tests
3096 (lambda* (#:key inputs #:allow-other-keys)
3097 (substitute* "test/gentestfiles.rb"
3098 (("/usr/bin/zip")
3099 (string-append
3100 (assoc-ref inputs "zip") "/bin/zip")))
3101 (substitute* "test/input_stream_test.rb"
3102 (("/usr/bin/env ruby") (which "ruby")))
3103 #t)))))
3104 (native-inputs
3105 `(("bundler" ,bundler)
3106 ("ruby-simplecov" ,ruby-simplecov)
3107 ("zip" ,zip)
3108 ("unzip" ,unzip)))
3109 (synopsis "Ruby module is for reading and writing zip files")
3110 (description
3111 "The rubyzip module provides ways to read from and create zip files.")
3112 (home-page "https://github.com/rubyzip/rubyzip")
3113 (license license:bsd-2)))
3114
3115 (define-public ruby-simplecov-html
3116 (package
3117 (name "ruby-simplecov-html")
3118 (version "0.10.2")
3119 (source (origin
3120 (method url-fetch)
3121 (uri (rubygems-uri "simplecov-html" version))
3122 (sha256
3123 (base32
3124 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
3125 (build-system ruby-build-system)
3126 (arguments `(#:tests? #f)) ; there are no tests
3127 (native-inputs
3128 `(("bundler" ,bundler)))
3129 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3130 (description "This package provides the default HTML formatter for
3131 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3132 (home-page "https://github.com/colszowka/simplecov-html")
3133 (license license:expat)))
3134
3135 (define-public ruby-simplecov
3136 (package
3137 (name "ruby-simplecov")
3138 (version "0.17.1")
3139 (source (origin
3140 (method url-fetch)
3141 (uri (rubygems-uri "simplecov" version))
3142 (sha256
3143 (base32
3144 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
3145 (build-system ruby-build-system)
3146 ;; Simplecov depends on rubocop for code style checking at build time.
3147 ;; Rubocop needs simplecov at build time.
3148 (arguments `(#:tests? #f))
3149 (propagated-inputs
3150 `(("ruby-json" ,ruby-json)
3151 ("ruby-docile" ,ruby-docile)
3152 ("ruby-simplecov-html" ,ruby-simplecov-html)))
3153 (native-inputs
3154 `(("bundler" ,bundler)))
3155 (synopsis "Code coverage framework for Ruby")
3156 (description "SimpleCov is a code coverage framework for Ruby with a
3157 powerful configuration library and automatic merging of coverage across test
3158 suites.")
3159 (home-page "https://github.com/colszowka/simplecov")
3160 (license license:expat)))
3161
3162 (define-public ruby-useragent
3163 (package
3164 (name "ruby-useragent")
3165 (version "0.16.10")
3166 (source (origin
3167 (method url-fetch)
3168 (uri (rubygems-uri "useragent" version))
3169 (sha256
3170 (base32
3171 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
3172 (build-system ruby-build-system)
3173 (arguments
3174 '(#:tests? #f)) ; no test suite
3175 (synopsis "HTTP user agent parser for Ruby")
3176 (description "UserAgent is a Ruby library that parses and compares HTTP
3177 User Agents.")
3178 (home-page "https://github.com/gshutler/useragent")
3179 (license license:expat)))
3180
3181 (define-public ruby-backports
3182 (package
3183 (name "ruby-backports")
3184 (version "3.11.4")
3185 (source
3186 (origin
3187 (method url-fetch)
3188 (uri (rubygems-uri "backports" version))
3189 (sha256
3190 (base32
3191 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
3192 (build-system ruby-build-system)
3193 (arguments
3194 '(;; TODO: This should be default, but there is one test failure
3195 #:test-target "all_spec"))
3196 (native-inputs
3197 `(("ruby-mspec" ,ruby-mspec)
3198 ("ruby-activesupport" ,ruby-activesupport)))
3199 (synopsis "Backports of the features in newer Ruby versions")
3200 (description
3201 "Backports enables more compatibility across Ruby versions by providing
3202 backports of some features.")
3203 (home-page "https://github.com/marcandre/backports")
3204 (license license:expat)))
3205
3206 (define-public ruby-bacon
3207 (package
3208 (name "ruby-bacon")
3209 (version "1.2.0")
3210 (source (origin
3211 (method url-fetch)
3212 (uri (rubygems-uri "bacon" version))
3213 (sha256
3214 (base32
3215 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
3216 (build-system ruby-build-system)
3217 (synopsis "Small RSpec clone")
3218 (description "Bacon is a small RSpec clone providing all essential
3219 features.")
3220 (home-page "https://github.com/chneukirchen/bacon")
3221 (license license:expat)))
3222
3223 (define-public ruby-bacon-bits
3224 (package
3225 (name "ruby-bacon-bits")
3226 (version "0.1.0")
3227 (source
3228 (origin
3229 (method url-fetch)
3230 (uri (rubygems-uri "bacon-bits" version))
3231 (sha256
3232 (base32
3233 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
3234 (build-system ruby-build-system)
3235 (arguments
3236 ;; No tests
3237 '(#:tests? #f))
3238 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
3239 (synopsis "Extensions to Bacon, for disabling tests, before and after
3240 blocks and more")
3241 (description
3242 "This extends the bacon testing framework with useful extensions to
3243 disable tests, have before and after blocks that run once and more.")
3244 (home-page "https://github.com/cldwalker/bacon-bits")
3245 (license license:expat)))
3246
3247 (define-public ruby-bacon-colored-output
3248 (package
3249 (name "ruby-bacon-colored-output")
3250 (version "1.1.1")
3251 (source
3252 (origin
3253 (method url-fetch)
3254 (uri (rubygems-uri "bacon-colored_output" version))
3255 (sha256
3256 (base32
3257 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
3258 (build-system ruby-build-system)
3259 (arguments
3260 '(;; No included tests
3261 #:tests? #f))
3262 (propagated-inputs
3263 `(("ruby-bacon" ,ruby-bacon)))
3264 (synopsis "Colored output for Bacon test framework")
3265 (description
3266 "This package adds color through ANSI escape codes to Bacon test
3267 output.")
3268 (home-page "https://github.com/whitequark/bacon-colored_output")
3269 (license license:expat)))
3270
3271 (define-public ruby-connection-pool
3272 (package
3273 (name "ruby-connection-pool")
3274 (version "2.2.2")
3275 (source (origin
3276 (method url-fetch)
3277 (uri (rubygems-uri "connection_pool" version))
3278 (sha256
3279 (base32
3280 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
3281 (build-system ruby-build-system)
3282 (native-inputs
3283 `(("bundler" ,bundler)))
3284 (synopsis "Generic connection pool for Ruby")
3285 (description "Connection_pool provides a generic connection pooling
3286 interface for Ruby programs.")
3287 (home-page "https://github.com/mperham/connection_pool")
3288 (license license:expat)))
3289
3290 (define-public ruby-fast-gettext
3291 (package
3292 (name "ruby-fast-gettext")
3293 (version "2.0.3")
3294 (home-page "https://github.com/grosser/fast_gettext")
3295 (source (origin
3296 (method git-fetch)
3297 (uri (git-reference (url home-page)
3298 (commit (string-append "v" version))))
3299 (file-name (git-file-name name version))
3300 (sha256
3301 (base32
3302 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
3303 (build-system ruby-build-system)
3304 (arguments
3305 '(#:test-target "spec"
3306 #:phases (modify-phases %standard-phases
3307 (add-before 'check 'remove-version-constraints
3308 (lambda _
3309 (delete-file "Gemfile.lock")
3310 #t))
3311 (add-before 'check 'remove-activerecord-test
3312 (lambda _
3313 ;; FIXME: This test fails because ActiveRecord depends on
3314 ;; a different version of ruby-sqlite than the currently
3315 ;; available one.
3316 (delete-file
3317 "spec/fast_gettext/translation_repository/db_spec.rb")
3318 #t))
3319 (add-before 'check 'disable-i18n-test
3320 (lambda _
3321 ;; XXX: This test checks i18n intricasies with Rails 3 and
3322 ;; automatically disables itself for Rails 4.0, but does
3323 ;; not know about newer versions as it has not been updated
3324 ;; since 2014. Disable for later versions of Rails too.
3325 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
3326 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
3327 "ActiveRecord::VERSION::MINOR == 0"))
3328 "ActiveRecord::VERSION::MAJOR >= 4"))
3329 #t)))))
3330 (native-inputs
3331 `(;; For tests.
3332 ("ruby-activerecord" ,ruby-activerecord)
3333 ("ruby-activesupport" ,ruby-activesupport)
3334 ("ruby-bump" ,ruby-bump)
3335 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
3336 ("ruby-i18n" ,ruby-i18n)
3337 ("ruby-rubocop" ,ruby-rubocop)
3338 ("ruby-rspec" ,ruby-rspec)
3339 ("ruby-single-cov" ,ruby-single-cov)
3340 ("ruby-sqlite3" ,ruby-sqlite3)
3341 ("ruby-wwtd" ,ruby-wwtd)))
3342 (synopsis "Fast implementation of @code{GetText}")
3343 (description
3344 "This package provides an alternative implementation of the Ruby
3345 @code{GetText} library that is approximately 12x faster yet thread safe.")
3346 ;; Some parts are covered by the Ruby license, see file headers.
3347 (license (list license:expat license:ruby))))
3348
3349 (define-public ruby-net-http-persistent
3350 (package
3351 (name "ruby-net-http-persistent")
3352 (version "3.0.0")
3353 (source (origin
3354 (method url-fetch)
3355 (uri (rubygems-uri "net-http-persistent" version))
3356 (sha256
3357 (base32
3358 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
3359 (build-system ruby-build-system)
3360 (native-inputs
3361 `(("ruby-connection-pool" ,ruby-connection-pool)
3362 ("ruby-hoe" ,ruby-hoe)))
3363 (synopsis "Persistent HTTP connection manager")
3364 (description "Net::HTTP::Persistent manages persistent HTTP connections
3365 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3366 (home-page "https://github.com/drbrain/net-http-persistent")
3367 (license license:expat)))
3368
3369 (define-public ruby-power-assert
3370 (package
3371 (name "ruby-power-assert")
3372 (version "1.1.5")
3373 (source (origin
3374 (method url-fetch)
3375 (uri (rubygems-uri "power_assert" version))
3376 (sha256
3377 (base32
3378 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
3379 (build-system ruby-build-system)
3380 (arguments
3381 '(#:tests? #f)) ; No included tests
3382 (native-inputs
3383 `(("bundler" ,bundler)))
3384 (synopsis "Assert library with descriptive assertion messages")
3385 (description "Power-assert is an assertion library providing descriptive
3386 assertion messages for tests.")
3387 (home-page "https://github.com/k-tsj/power_assert")
3388 (license (list license:bsd-2 license:ruby))))
3389
3390 (define-public ruby-powerpack
3391 (package
3392 (name "ruby-powerpack")
3393 (version "0.1.2")
3394 (source
3395 (origin
3396 (method url-fetch)
3397 (uri (rubygems-uri "powerpack" version))
3398 (sha256
3399 (base32
3400 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3401 (build-system ruby-build-system)
3402 (arguments
3403 '(#:test-target "spec"))
3404 (native-inputs
3405 `(("bundler" ,bundler)
3406 ("ruby-rspec" ,ruby-rspec)
3407 ("ruby-yard" ,ruby-yard)))
3408 (synopsis "Useful extensions to core Ruby classes")
3409 (description
3410 "This package provides a few useful extensions to core Ruby classes,
3411 including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3412 @code{String}.")
3413 (home-page "https://github.com/bbatsov/powerpack")
3414 (license license:expat)))
3415
3416 (define-public ruby-locale
3417 (package
3418 (name "ruby-locale")
3419 (version "2.1.2")
3420 (source (origin
3421 (method url-fetch)
3422 (uri (rubygems-uri "locale" version))
3423 (sha256
3424 (base32
3425 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3426 (build-system ruby-build-system)
3427 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3428 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3429 ;; dependency cycle we disable tests.
3430 (arguments `(#:tests? #f))
3431 (native-inputs
3432 `(("bundler" ,bundler)
3433 ("ruby-yard" ,ruby-yard)))
3434 (synopsis "Ruby library providing basic localization APIs")
3435 (description
3436 "Ruby-Locale is the pure ruby library which provides basic APIs for
3437 localization.")
3438 (home-page "https://github.com/ruby-gettext/locale")
3439 (license (list license:lgpl3+ license:ruby))))
3440
3441 (define-public ruby-temple
3442 (package
3443 (name "ruby-temple")
3444 (version "0.8.2")
3445 (source
3446 (origin
3447 (method url-fetch)
3448 (uri (rubygems-uri "temple" version))
3449 (sha256
3450 (base32
3451 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
3452 (build-system ruby-build-system)
3453 (native-inputs
3454 `(("ruby-tilt" ,ruby-tilt)
3455 ("ruby-bacon" ,ruby-bacon)
3456 ("ruby-erubis" ,ruby-erubis)))
3457 (synopsis "Template compilation framework in Ruby")
3458 (description
3459 "Temple is an abstraction and framework for compiling templates to pure
3460 Ruby.")
3461 (home-page "https://github.com/judofyr/temple")
3462 (license license:expat)))
3463
3464 (define-public ruby-text
3465 (package
3466 (name "ruby-text")
3467 (version "1.3.1")
3468 (source (origin
3469 (method url-fetch)
3470 (uri (rubygems-uri "text" version))
3471 (sha256
3472 (base32
3473 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3474 (build-system ruby-build-system)
3475 (synopsis "Collection of text algorithms for Ruby")
3476 (description
3477 "This package provides a collection of text algorithms: Levenshtein,
3478 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
3479 (home-page "https://github.com/threedaymonk/text")
3480 (license license:expat)))
3481
3482 (define-public ruby-gettext
3483 (package
3484 (name "ruby-gettext")
3485 (version "3.1.7")
3486 (source (origin
3487 (method url-fetch)
3488 (uri (rubygems-uri "gettext" version))
3489 (sha256
3490 (base32
3491 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3492 (build-system ruby-build-system)
3493 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3494 ;; which needs ruby-gettext. To break the dependency cycle we disable
3495 ;; tests.
3496 (arguments `(#:tests? #f))
3497 (propagated-inputs
3498 `(("ruby-locale" ,ruby-locale)
3499 ("ruby-text" ,ruby-text)))
3500 (native-inputs
3501 `(("bundler" ,bundler)
3502 ("ruby-yard" ,ruby-yard)))
3503 (synopsis "GNU gettext-like program for Ruby")
3504 (description
3505 "Gettext is a GNU gettext-like program for Ruby. The catalog
3506 file (po-file) used is the same as that used by GNU gettext, allowing you to
3507 use GNU gettext tools for maintenance.")
3508 (home-page "https://ruby-gettext.github.com/")
3509 (license (list license:lgpl3+ license:ruby))))
3510
3511 (define-public ruby-packnga
3512 (package
3513 (name "ruby-packnga")
3514 (version "1.0.4")
3515 (source (origin
3516 (method url-fetch)
3517 (uri (rubygems-uri "packnga" version))
3518 (sha256
3519 (base32
3520 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
3521 (build-system ruby-build-system)
3522 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3523 ;; To break the dependency cycle we disable tests.
3524 (arguments `(#:tests? #f))
3525 (propagated-inputs
3526 `(("ruby-gettext" ,ruby-gettext)
3527 ("ruby-yard" ,ruby-yard)))
3528 (native-inputs
3529 `(("bundler" ,bundler)))
3530 (synopsis "Utility library to package internationalized libraries")
3531 (description
3532 "Packnga is a library to translate to many languages using YARD.")
3533 (home-page "http://ranguba.org/packnga/")
3534 (license license:lgpl2.0+)))
3535
3536 (define-public ruby-test-construct
3537 (package
3538 (name "ruby-test-construct")
3539 (version "2.0.1")
3540 (source
3541 (origin
3542 (method url-fetch)
3543 (uri (rubygems-uri "test_construct" version))
3544 (sha256
3545 (base32
3546 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3547 (build-system ruby-build-system)
3548 (native-inputs
3549 `(("bundler" ,bundler)
3550 ("ruby-mocha" ,ruby-mocha)
3551 ("ruby-rspec" ,ruby-rspec)))
3552 (synopsis "Creates temporary files and directories for testing")
3553 (description
3554 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3555 temporary files and directories during tests.")
3556 (home-page "https://github.com/bhb/test_construct")
3557 (license license:expat)))
3558
3559 (define-public ruby-test-unit
3560 (package
3561 (name "ruby-test-unit")
3562 (version "3.2.5")
3563 (source (origin
3564 (method url-fetch)
3565 (uri (rubygems-uri "test-unit" version))
3566 (sha256
3567 (base32
3568 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3569 (build-system ruby-build-system)
3570 (propagated-inputs
3571 `(("ruby-power-assert" ,ruby-power-assert)))
3572 (native-inputs
3573 `(("bundler" ,bundler)
3574 ("ruby-packnga" ,ruby-packnga)
3575 ("ruby-yard" ,ruby-yard)))
3576 (synopsis "Unit testing framework for Ruby")
3577 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3578 on xUnit principles. These were originally designed by Kent Beck, creator of
3579 extreme programming software development methodology, for Smalltalk's SUnit.
3580 It allows writing tests, checking results and automated testing in Ruby.")
3581 (home-page "https://test-unit.github.io/")
3582 (license (list license:psfl license:ruby))))
3583
3584 (define-public ruby-markaby
3585 (package
3586 (name "ruby-markaby")
3587 (version "0.9.0")
3588 (source
3589 (origin
3590 (method url-fetch)
3591 (uri (rubygems-uri "markaby" version))
3592 (sha256
3593 (base32
3594 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3595 (build-system ruby-build-system)
3596 (arguments
3597 '(#:phases
3598 (modify-phases %standard-phases
3599 ;; Run rspec manually without using the Rakefile, as the versions of
3600 ;; Rake and RSpec 2 are incompatible:
3601 ;;
3602 ;; NoMethodError: undefined method `last_comment'
3603 (replace 'check
3604 (lambda* (#:key tests? #:allow-other-keys)
3605 (when tests?
3606 (invoke "rspec"))
3607 #t)))))
3608 (propagated-inputs
3609 `(("ruby-builder" ,ruby-builder)))
3610 (native-inputs
3611 `(("bundler" ,bundler)
3612 ("ruby-rspec" ,ruby-rspec-2)))
3613 (synopsis "Write HTML pages in pure Ruby")
3614 (description
3615 "Markaby allows writing HTML packages in pure Ruby. This is similar to
3616 the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
3617 mixture of HTML and additional ERB syntax.")
3618 (home-page "https://markaby.github.io/")
3619 (license license:expat)))
3620
3621 (define-public ruby-maruku
3622 (package
3623 (name "ruby-maruku")
3624 (version "0.7.3")
3625 (source
3626 (origin
3627 (method url-fetch)
3628 (uri (rubygems-uri "maruku" version))
3629 (sha256
3630 (base32
3631 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3632 (build-system ruby-build-system)
3633 (arguments
3634 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3635 #:tests? #f
3636 #:phases
3637 (modify-phases %standard-phases
3638 (replace 'check
3639 (lambda* (#:key tests? #:allow-other-keys)
3640 (when tests?
3641 (invoke "rspec"))
3642 #t)))))
3643 (native-inputs
3644 `(("ruby-rspec" ,ruby-rspec)
3645 ("ruby-simplecov" ,ruby-simplecov)
3646 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3647 (synopsis "Markdown interpreter in Ruby")
3648 (description
3649 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3650 HTML, and PDF through LaTeX.")
3651 (home-page "https://github.com/bhollis/maruku")
3652 (license license:expat)))
3653
3654 (define-public ruby-metaclass
3655 (package
3656 (name "ruby-metaclass")
3657 (version "0.0.4")
3658 (source (origin
3659 (method url-fetch)
3660 (uri (rubygems-uri "metaclass" version))
3661 (sha256
3662 (base32
3663 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3664 (build-system ruby-build-system)
3665 (arguments
3666 `(#:phases
3667 (modify-phases %standard-phases
3668 (add-after 'unpack 'add-test-unit-to-search-path
3669 (lambda* (#:key inputs #:allow-other-keys)
3670 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3671 (substitute* "Rakefile"
3672 (("t\\.libs << \"test\"" line)
3673 (string-append line "; t.libs << \""
3674 test-unit "/lib/ruby/vendor_ruby"
3675 "/gems/test-unit-"
3676 ,(package-version ruby-test-unit)
3677 "/lib\""))))
3678 #t)))))
3679 (native-inputs
3680 `(("bundler" ,bundler)
3681 ("ruby-test-unit" ,ruby-test-unit)))
3682 (synopsis "Ruby library adding metaclass method to all objects")
3683 (description
3684 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3685 objects.")
3686 (home-page "https://github.com/floehopper/metaclass")
3687 (license license:expat)))
3688
3689 (define-public ruby-mkmf-lite
3690 (package
3691 (name "ruby-mkmf-lite")
3692 (version "0.3.2")
3693 (source (origin
3694 (method url-fetch)
3695 (uri (rubygems-uri "mkmf-lite" version))
3696 (sha256
3697 (base32
3698 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3699 (build-system ruby-build-system)
3700 (propagated-inputs
3701 `(("ruby-ptools" ,ruby-ptools)))
3702 (synopsis "Lightweight alternative to @code{mkmf}")
3703 (description
3704 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3705 for use as a library. It does not create packages, builds, or log files of
3706 any kind. Instead, it provides mixin methods that you can use in FFI or tests
3707 to check for the presence of header files, constants, and so on.")
3708 (home-page "https://github.com/djberg96/mkmf-lite")
3709 (license license:asl2.0)))
3710
3711 (define-public ruby-mspec
3712 (package
3713 (name "ruby-mspec")
3714 (version "1.9.1")
3715 (source
3716 (origin
3717 (method url-fetch)
3718 (uri (rubygems-uri "mspec" version))
3719 (sha256
3720 (base32
3721 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3722 (build-system ruby-build-system)
3723 (arguments
3724 '(;; TODO: 3 test failures
3725 ;; ./spec/mocks/mock_spec.rb:82
3726 ;; ./spec/utils/name_map_spec.rb:151
3727 ;; ./spec/utils/name_map_spec.rb:155
3728 #:tests? #f
3729 #:phases
3730 (modify-phases %standard-phases
3731 (add-after 'extract-gemspec 'change-dependency-constraints
3732 (lambda _
3733 (substitute* "mspec.gemspec"
3734 (("rake.*") "rake>)\n")
3735 (("rspec.*") "rspec>)\n"))
3736 #t))
3737 (replace 'check
3738 (lambda* (#:key tests? #:allow-other-keys)
3739 (when tests?
3740 (invoke "rspec" "spec"))
3741 #t)))))
3742 (native-inputs
3743 `(("bundler" ,bundler)
3744 ("ruby-rake" ,ruby-rake)
3745 ("ruby-rspec" ,ruby-rspec)))
3746 (synopsis "MSpec is a specialized framework for RubySpec")
3747 (description
3748 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3749 for basic features. MSpec contains additional features that assist in writing
3750 specs for Ruby implementations in ruby/spec.")
3751 (home-page "http://rubyspec.org")
3752 (license license:expat)))
3753
3754 (define-public ruby-mysql2
3755 (package
3756 (name "ruby-mysql2")
3757 (version "0.5.2")
3758 (source
3759 (origin
3760 (method git-fetch)
3761 (uri (git-reference
3762 (url "https://github.com/brianmario/mysql2")
3763 (commit version)))
3764 (file-name (git-file-name name version))
3765 (sha256
3766 (base32
3767 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3768 (build-system ruby-build-system)
3769 (arguments
3770 '(;; TODO: Tests require a running MySQL/MariaDB service
3771 #:tests? #f
3772 #:phases
3773 (modify-phases %standard-phases
3774 (replace 'replace-git-ls-files
3775 (lambda _
3776 (substitute* "mysql2.gemspec"
3777 (("git ls-files .*`") "find . -type f |sort`"))
3778 #t))
3779 (add-before 'install 'set-MAKEFLAGS
3780 (lambda* (#:key outputs #:allow-other-keys)
3781 (setenv "MAKEFLAGS"
3782 (string-append
3783 "V=1 "
3784 "prefix=" (assoc-ref outputs "out")))
3785 #t))
3786 ;; Move the 'check phase to after 'install, as then you can test
3787 ;; using the installed mysql2 gem in the store.
3788 (delete 'check)
3789 (add-after 'install 'check
3790 (lambda* (#:key outputs tests? #:allow-other-keys)
3791 (setenv "GEM_PATH"
3792 (string-append
3793 (getenv "GEM_PATH")
3794 ":"
3795 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3796 (when tests?
3797 (invoke "rspec"))
3798 #t)))))
3799 (inputs
3800 `(("mariadb-dev" ,mariadb "dev")
3801 ("zlib" ,zlib)))
3802 (native-inputs
3803 `(("ruby-rspec" ,ruby-rspec)
3804 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3805 (synopsis "MySQL library for Ruby, binding to libmysql")
3806 (description
3807 "This package provides a simple, fast MySQL library for Ruby, binding to
3808 libmysql.")
3809 (home-page "https://github.com/brianmario/mysql2")
3810 (license license:expat)))
3811
3812 (define-public ruby-blankslate
3813 (package
3814 (name "ruby-blankslate")
3815 (version "3.1.3")
3816 (source (origin
3817 (method url-fetch)
3818 (uri (rubygems-uri "blankslate" version))
3819 (sha256
3820 (base32
3821 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3822 (build-system ruby-build-system)
3823 (arguments
3824 `(#:phases
3825 (modify-phases %standard-phases
3826 (replace 'check
3827 (lambda _ (invoke "rspec" "spec/"))))))
3828 (native-inputs
3829 `(("bundler" ,bundler)
3830 ("ruby-rspec" ,ruby-rspec)))
3831 (synopsis "Abstract base class with no predefined methods")
3832 (description
3833 "BlankSlate provides an abstract base class with no predefined
3834 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3835 as a base class when writing classes that depend upon
3836 @code{method_missing} (e.g. dynamic proxies).")
3837 (home-page "https://github.com/masover/blankslate")
3838 (license license:expat)))
3839
3840 (define-public ruby-bond
3841 (package
3842 (name "ruby-bond")
3843 (version "0.5.1")
3844 (source
3845 (origin
3846 (method url-fetch)
3847 (uri (rubygems-uri "bond" version))
3848 (sha256
3849 (base32
3850 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3851 (build-system ruby-build-system)
3852 (arguments
3853 ;; The test suite fails (see:
3854 ;; https://github.com/cldwalker/bond/issues/46).
3855 `(#:tests? #f))
3856 (native-inputs
3857 `(("ruby-bacon" ,ruby-bacon)
3858 ("ruby-bacon-bits" ,ruby-bacon-bits)
3859 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3860 (synopsis "Bond can provide custom autocompletion for arguments, methods
3861 and more")
3862 (description
3863 "Bond can autocomplete argument(s) to methods, uniquely completing per
3864 module, per method and per argument. Bond provides a configuration system and
3865 a DSL for creating custom completions and completion rules. Bond can also
3866 load completions that ship with gems. Bond is able to offer more than irb's
3867 completion since it uses the full line of input when completing as opposed to
3868 irb's last-word approach.")
3869 (home-page "http://tagaholic.me/bond/")
3870 (license license:expat)))
3871
3872 (define-public ruby-idn-ruby
3873 (package
3874 (name "ruby-idn-ruby")
3875 (version "0.1.0")
3876 (source
3877 (origin
3878 (method url-fetch)
3879 (uri (rubygems-uri "idn-ruby" version))
3880 (sha256
3881 (base32
3882 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3883 (build-system ruby-build-system)
3884 (arguments
3885 '(#:phases
3886 (modify-phases %standard-phases
3887 (delete 'check)
3888 (add-after 'install 'check
3889 (lambda* (#:key tests? outputs #:allow-other-keys)
3890 (when tests?
3891 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3892 (name-and-version (basename gem-file ".gem")))
3893 (apply invoke
3894 "ruby" "--verbose"
3895 (string-append "-I"
3896 (assoc-ref outputs "out")
3897 "/lib/ruby/vendor_ruby/gems/"
3898 name-and-version
3899 "/lib")
3900 (find-files "./test" ".*\\.rb"))))
3901 #t)))))
3902 (inputs
3903 `(("libidn" ,libidn)))
3904 (synopsis "Ruby Bindings for the GNU LibIDN library")
3905 (description
3906 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3907 Stringprep, Punycode and IDNA specifications. These are used to encode and
3908 decode internationalized domain + names according to the IDNA2003
3909 specifications.
3910
3911 Included are the most important parts of the Stringprep, Punycode and IDNA
3912 APIs like performing Stringprep processings, encoding to and decoding from
3913 Punycode strings and converting entire domain names to and from the ACE
3914 encoded form.")
3915 (home-page "https://github.com/deepfryed/idn-ruby")
3916 (license license:asl2.0)))
3917
3918 (define-public ruby-instantiator
3919 (package
3920 (name "ruby-instantiator")
3921 (version "0.0.7")
3922 (source (origin
3923 (method url-fetch)
3924 (uri (rubygems-uri "instantiator" version))
3925 (sha256
3926 (base32
3927 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
3928 (build-system ruby-build-system)
3929 (arguments
3930 `(#:phases
3931 (modify-phases %standard-phases
3932 (add-after 'unpack 'add-test-unit-to-search-path
3933 (lambda* (#:key inputs #:allow-other-keys)
3934 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3935 (substitute* "Rakefile"
3936 (("t\\.libs << \"test\"" line)
3937 (string-append line "; t.libs << \""
3938 test-unit "/lib/ruby/vendor_ruby"
3939 "/gems/test-unit-"
3940 ,(package-version ruby-test-unit)
3941 "/lib\""))))
3942 #t)))))
3943 (propagated-inputs
3944 `(("ruby-blankslate" ,ruby-blankslate)))
3945 (native-inputs
3946 `(("bundler" ,bundler)
3947 ("ruby-test-unit" ,ruby-test-unit)))
3948 (synopsis "Instantiate an arbitrary Ruby class")
3949 (description
3950 "Instantiator lets you instantiate an arbitrary Ruby class without
3951 knowing anything about the constructor.")
3952 (home-page "https://github.com/floehopper/instantiator")
3953 (license license:expat)))
3954
3955 (define-public ruby-introspection
3956 (package
3957 (name "ruby-introspection")
3958 (version "0.0.4")
3959 (source (origin
3960 (method url-fetch)
3961 (uri (rubygems-uri "introspection" version))
3962 (sha256
3963 (base32
3964 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
3965 (build-system ruby-build-system)
3966 (arguments
3967 `(#:phases
3968 (modify-phases %standard-phases
3969 (add-after 'unpack 'add-test-unit-to-search-path
3970 (lambda* (#:key inputs #:allow-other-keys)
3971 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3972 (substitute* "Rakefile"
3973 (("t\\.libs << \"test\"" line)
3974 (string-append line "; t.libs << \""
3975 test-unit "/lib/ruby/vendor_ruby"
3976 "/gems/test-unit-"
3977 ,(package-version ruby-test-unit)
3978 "/lib\""))))
3979 #t)))))
3980 (propagated-inputs
3981 `(("ruby-instantiator" ,ruby-instantiator)
3982 ("ruby-metaclass" ,ruby-metaclass)))
3983 (native-inputs
3984 `(("bundler" ,bundler)
3985 ("ruby-blankslate" ,ruby-blankslate)
3986 ("ruby-test-unit" ,ruby-test-unit)))
3987 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3988 (description
3989 "Introspection provides tools to inspect the hierarchy of method
3990 definitions on a Ruby object.")
3991 (home-page "https://github.com/floehopper/introspection")
3992 (license license:expat)))
3993
3994 (define-public ruby-redcarpet
3995 (package
3996 (name "ruby-redcarpet")
3997 (version "3.5.0")
3998 (source (origin
3999 (method url-fetch)
4000 (uri (rubygems-uri "redcarpet" version))
4001 (sha256
4002 (base32
4003 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
4004 (build-system ruby-build-system)
4005 (arguments
4006 `(#:phases
4007 (modify-phases %standard-phases
4008 ;; The gem archive does not include the conformance tests.
4009 (add-after 'unpack 'disable-conformance-tests
4010 (lambda _
4011 (substitute* "Rakefile"
4012 (("task :test => %w\\[test:unit test:conformance\\]")
4013 "task :test => %w[test:unit]"))
4014 #t)))))
4015 (native-inputs
4016 `(("bundler" ,bundler)
4017 ("ruby-test-unit" ,ruby-test-unit)
4018 ("ruby-rake-compiler" ,ruby-rake-compiler)))
4019 (synopsis "Extensible Markdown to (X)HTML converter")
4020 (description
4021 "Redcarpet is an extensible Ruby library for Markdown processing and
4022 conversion to (X)HTML.")
4023 (home-page "https://github.com/vmg/redcarpet")
4024 (license license:expat)))
4025
4026 (define-public ruby-rerun
4027 (package
4028 (name "ruby-rerun")
4029 (version "0.13.0")
4030 (source
4031 (origin
4032 (method url-fetch)
4033 (uri (rubygems-uri "rerun" version))
4034 (sha256
4035 (base32
4036 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
4037 (build-system ruby-build-system)
4038 (arguments
4039 '(#:tests? #f)) ; No included tests
4040 (propagated-inputs
4041 `(("ruby-listen" ,ruby-listen)))
4042 (synopsis "Run a process, and restart when some monitored files change")
4043 (description
4044 "Rerun is a tool to launch programs, then monitor the file system, and
4045 restart the program when any of the monitored files change. It's written in
4046 Ruby, but can be used for all programs.")
4047 (home-page "https://github.com/alexch/rerun/")
4048 (license license:expat)))
4049
4050 (define-public ruby-maxitest
4051 (package
4052 (name "ruby-maxitest")
4053 (version "3.6.0")
4054 (home-page "https://github.com/grosser/maxitest")
4055 (source (origin
4056 ;; Pull from git because the gem does not contain tests.
4057 (method git-fetch)
4058 (uri (git-reference
4059 (url home-page)
4060 (commit (string-append "v" version))))
4061 (file-name (git-file-name name version))
4062 (sha256
4063 (base32
4064 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
4065 (build-system ruby-build-system)
4066 (arguments
4067 '(#:test-target "default"
4068 #:phases (modify-phases %standard-phases
4069 (replace 'replace-git-ls-files
4070 (lambda _
4071 (substitute* "maxitest.gemspec"
4072 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
4073 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
4074 #t))
4075 (add-before 'check 'remove-version-constraints
4076 (lambda _
4077 ;; Don't use specific versions of dependencies, instead
4078 ;; take whatever is available in Guix.
4079 (delete-file "Gemfile.lock")
4080 #t))
4081 (add-before 'check 'add-mtest-on-PATH
4082 (lambda _
4083 ;; Tests use 'mtest' which is not automatically added on
4084 ;; PATH.
4085 (setenv "PATH" (string-append (getcwd) "/bin:"
4086 (getenv "PATH")))
4087 #t)))))
4088 (native-inputs
4089 `(("ps" ,procps)
4090 ("ruby-bump" ,ruby-bump)
4091 ("ruby-byebug" ,ruby-byebug)
4092 ("ruby-rspec" ,ruby-rspec)
4093 ("ruby-wwtd" ,ruby-wwtd)))
4094 (propagated-inputs
4095 `(("ruby-minitest" ,ruby-minitest)))
4096 (synopsis "Minitest with extra features")
4097 (description
4098 "Maxitest is a wrapper around Minitest with extra functionality such
4099 as timeouts, an @command{mtest} executable that can run tests by line
4100 number, support for interrupted tests, better backtraces, and more.")
4101 (license license:expat)))
4102
4103 (define-public ruby-mocha
4104 (package
4105 (name "ruby-mocha")
4106 (version "1.11.2")
4107 (source (origin
4108 (method url-fetch)
4109 (uri (rubygems-uri "mocha" version))
4110 (sha256
4111 (base32
4112 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4113 (build-system ruby-build-system)
4114 (arguments
4115 `(#:phases
4116 (modify-phases %standard-phases
4117 (add-before 'check 'remove-rubocop-dependency
4118 (lambda _
4119 ;; Disable dependency on Rubocop, which is just a linter,
4120 ;; and would introduce a circular dependency.
4121 (substitute* "mocha.gemspec"
4122 ((".*rubocop.*")
4123 "true\n"))
4124 #t)))))
4125 (native-inputs
4126 `(("ruby-introspection" ,ruby-introspection)))
4127 (synopsis "Mocking and stubbing library for Ruby")
4128 (description
4129 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
4130 allows mocking and stubbing of methods on real (non-mock) classes.")
4131 (home-page "http://gofreerange.com/mocha/docs")
4132 ;; Mocha can be used with either license at the users choice.
4133 (license (list license:expat license:ruby))))
4134
4135 (define-public ruby-mocha-on-bacon
4136 (package
4137 (name "ruby-mocha-on-bacon")
4138 (version "0.2.3")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (rubygems-uri "mocha-on-bacon" version))
4143 (sha256
4144 (base32
4145 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
4146 (build-system ruby-build-system)
4147 (arguments
4148 ;; rubygems.org release missing tests
4149 '(#:tests? #f))
4150 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
4151 (synopsis "Mocha adapter for Bacon")
4152 (description
4153 "This package provides a Mocha adapter for Bacon, allowing you to use the
4154 Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
4155 (home-page
4156 "https://github.com/alloy/mocha-on-bacon")
4157 (license license:expat)))
4158
4159 (define-public ruby-net-ssh
4160 (package
4161 (name "ruby-net-ssh")
4162 (version "4.2.0")
4163 (source (origin
4164 (method url-fetch)
4165 (uri (rubygems-uri "net-ssh" version))
4166 (sha256
4167 (base32
4168 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
4169 (build-system ruby-build-system)
4170 (native-inputs
4171 `(("bundler" ,bundler)
4172 ("ruby-mocha" ,ruby-mocha)
4173 ("ruby-test-unit" ,ruby-test-unit)))
4174 (synopsis "Ruby implementation of the SSH2 client protocol")
4175 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
4176 client protocol. It allows you to write programs that invoke and interact
4177 with processes on remote servers, via SSH2.")
4178 (home-page "https://github.com/net-ssh/net-ssh")
4179 (license license:expat)))
4180
4181 (define-public ruby-net-scp
4182 (package
4183 (name "ruby-net-scp")
4184 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
4185 (version "1.2.2.rc2")
4186 (source
4187 (origin
4188 (method git-fetch)
4189 (uri (git-reference
4190 (url "https://github.com/net-ssh/net-scp")
4191 (commit (string-append "v" version))))
4192 (file-name (git-file-name name version))
4193 (sha256
4194 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
4195 (build-system ruby-build-system)
4196 (native-inputs
4197 `(("bundler" ,bundler)
4198 ("ruby-test-unit" ,ruby-test-unit)
4199 ("ruby-mocha" ,ruby-mocha)))
4200 (propagated-inputs
4201 `(("ruby-net-ssh" ,ruby-net-ssh)))
4202 (synopsis "Pure-Ruby SCP client library")
4203 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
4204 client protocol.")
4205 (home-page "https://github.com/net-ssh/net-scp")
4206 (license license:expat)))
4207
4208 (define-public ruby-minitest
4209 (package
4210 (name "ruby-minitest")
4211 (version "5.11.3")
4212 (source (origin
4213 (method url-fetch)
4214 (uri (rubygems-uri "minitest" version))
4215 (sha256
4216 (base32
4217 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
4218 (build-system ruby-build-system)
4219 (native-inputs
4220 `(("ruby-hoe" ,ruby-hoe)))
4221 (synopsis "Small test suite library for Ruby")
4222 (description "Minitest provides a complete suite of Ruby testing
4223 facilities supporting TDD, BDD, mocking, and benchmarking.")
4224 (home-page "https://github.com/seattlerb/minitest")
4225 (license license:expat)))
4226
4227 ;; This is the last release of Minitest 4, which is used by some packages.
4228 (define-public ruby-minitest-4
4229 (package (inherit ruby-minitest)
4230 (version "4.7.5")
4231 (source (origin
4232 (method url-fetch)
4233 (uri (rubygems-uri "minitest" version))
4234 (sha256
4235 (base32
4236 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
4237 (arguments
4238 `(#:phases
4239 (modify-phases %standard-phases
4240 (add-after 'unpack 'remove-unsupported-method
4241 (lambda _
4242 (substitute* "Rakefile"
4243 (("self\\.rubyforge_name = .*") ""))
4244 #t))
4245 (add-after 'build 'exclude-failing-tests
4246 (lambda _
4247 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
4248 ;; Fixnum.
4249 (delete-file "test/minitest/test_minitest_spec.rb")
4250 #t)))))))
4251
4252 (define-public ruby-minitest-around
4253 (package
4254 (name "ruby-minitest-around")
4255 (version "0.5.0")
4256 (source
4257 (origin
4258 (method url-fetch)
4259 (uri (rubygems-uri "minitest-around" version))
4260 (sha256
4261 (base32
4262 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
4263 (build-system ruby-build-system)
4264 (arguments
4265 '(#:phases
4266 (modify-phases %standard-phases
4267 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
4268 (lambda _
4269 (substitute* "minitest-around.gemspec"
4270 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
4271 #t)))))
4272 (propagated-inputs
4273 `(("ruby-minitest" ,ruby-minitest)))
4274 (native-inputs
4275 `(("bundler" ,bundler)
4276 ("ruby-cucumber" ,ruby-cucumber)
4277 ("ruby-bump" ,ruby-bump)
4278 ("ruby-test-construct" ,ruby-test-construct)))
4279 (synopsis "Run code around tests in Minitest")
4280 (description
4281 "This library provides a way to run code around tests in Minitest,
4282 written using either the unit test or spec style.")
4283 (home-page "https://github.com/splattael/minitest-around")
4284 (license license:expat)))
4285
4286 (define-public ruby-minitest-sprint
4287 (package
4288 (name "ruby-minitest-sprint")
4289 (version "1.1.0")
4290 (source (origin
4291 (method url-fetch)
4292 (uri (rubygems-uri "minitest-sprint" version))
4293 (sha256
4294 (base32
4295 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
4296 (build-system ruby-build-system)
4297 (native-inputs
4298 `(("ruby-hoe" ,ruby-hoe)
4299 ("ruby-minitest" ,ruby-minitest)))
4300 (synopsis "Fast test suite runner for minitest")
4301 (description "Minitest-sprint is a test runner for minitest that makes it
4302 easier to re-run individual failing tests.")
4303 (home-page "https://github.com/seattlerb/minitest-sprint")
4304 (license license:expat)))
4305
4306 (define-public ruby-minitest-bacon
4307 (package
4308 (name "ruby-minitest-bacon")
4309 (version "1.0.3")
4310 (source (origin
4311 (method url-fetch)
4312 (uri (rubygems-uri "minitest-bacon" version))
4313 (sha256
4314 (base32
4315 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
4316 (build-system ruby-build-system)
4317 (native-inputs
4318 `(("ruby-hoe" ,ruby-hoe)))
4319 (inputs
4320 `(("ruby-minitest" ,ruby-minitest)))
4321 (synopsis "Bacon compatibility library for minitest")
4322 (description "Minitest-bacon extends minitest with bacon-like
4323 functionality, making it easier to migrate test suites from bacon to minitest.")
4324 (home-page "https://github.com/seattlerb/minitest-bacon")
4325 (license license:expat)))
4326
4327 (define-public ruby-minitest-focus
4328 (package
4329 (name "ruby-minitest-focus")
4330 (version "1.1.2")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (rubygems-uri "minitest-focus" version))
4335 (sha256
4336 (base32
4337 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4338 (build-system ruby-build-system)
4339 (propagated-inputs
4340 `(("ruby-minitest" ,ruby-minitest)))
4341 (native-inputs
4342 `(("ruby-hoe" ,ruby-hoe)))
4343 (synopsis "Allows a few specific tests to be focused on")
4344 (description
4345 "@code{minitest-focus} gives the ability focus on a few tests with ease
4346 without having to use command-line arguments. It introduces a @code{focus}
4347 class method for use in testing classes, specifying that the next defined test
4348 is to be run.")
4349 (home-page "https://github.com/seattlerb/minitest-focus")
4350 (license license:expat)))
4351
4352 (define-public ruby-minitest-pretty-diff
4353 ;; Use git reference because gem is out of date and does not contain testing
4354 ;; script. There are no releases on GitHub.
4355 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4356 (package
4357 (name "ruby-minitest-pretty-diff")
4358 (version (string-append "0.1-1." (string-take commit 8)))
4359 (source (origin
4360 (method git-fetch)
4361 (uri (git-reference
4362 (url "https://github.com/adammck/minitest-pretty_diff")
4363 (commit commit)))
4364 (file-name (string-append name "-" version "-checkout"))
4365 (sha256
4366 (base32
4367 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4368 (build-system ruby-build-system)
4369 (arguments
4370 `(#:phases
4371 (modify-phases %standard-phases
4372 (replace 'check
4373 (lambda _
4374 (invoke "script/test"))))))
4375 (native-inputs
4376 `(("bundler" ,bundler)
4377 ("ruby-turn" ,ruby-turn)))
4378 (synopsis "Pretty-print hashes and arrays in MiniTest")
4379 (description
4380 "@code{minitest-pretty_diff} monkey-patches
4381 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4382 diffing them. This makes it easier to spot differences between nested
4383 structures when tests fail.")
4384 (home-page "https://github.com/adammck/minitest-pretty_diff")
4385 (license license:expat))))
4386
4387 (define-public ruby-minitest-moar
4388 (package
4389 (name "ruby-minitest-moar")
4390 (version "0.0.4")
4391 (source
4392 (origin
4393 (method url-fetch)
4394 (uri (rubygems-uri "minitest-moar" version))
4395 (sha256
4396 (base32
4397 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4398 (build-system ruby-build-system)
4399 (arguments
4400 `(#:phases
4401 (modify-phases %standard-phases
4402 (add-before 'check 'clean-dependencies
4403 (lambda _
4404 ;; Remove all gems defined in the Gemfile because these are not
4405 ;; truly needed.
4406 (substitute* "Gemfile"
4407 (("gem .*") ""))
4408 ;; Remove byebug as not needed to run tests.
4409 (substitute* "test/test_helper.rb"
4410 (("require 'byebug'") ""))
4411 #t)))))
4412 (native-inputs
4413 `(("bundler" ,bundler)
4414 ("ruby-minitest" ,ruby-minitest)))
4415 (synopsis "Extra features and changes to MiniTest")
4416 (description "@code{MiniTest Moar} add some additional features and
4417 changes some default behaviours in MiniTest. For instance, Moar replaces the
4418 MiniTest @code{Object#stub} with a global @code{stub} method.")
4419 (home-page "https://github.com/dockyard/minitest-moar")
4420 (license license:expat)))
4421
4422 (define-public ruby-minitest-bonus-assertions
4423 (package
4424 (name "ruby-minitest-bonus-assertions")
4425 (version "3.0")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (rubygems-uri "minitest-bonus-assertions" version))
4430 (sha256
4431 (base32
4432 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
4433 (build-system ruby-build-system)
4434 (arguments
4435 `(#:phases
4436 (modify-phases %standard-phases
4437 (add-before 'check 'clean-dependencies
4438 (lambda _
4439 ;; Remove unneeded require statement that would entail another
4440 ;; dependency.
4441 (substitute* "test/minitest_config.rb"
4442 (("require 'minitest/bisect'") ""))
4443 #t)))))
4444 (native-inputs
4445 `(("ruby-hoe" ,ruby-hoe)
4446 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4447 ("ruby-minitest-focus" ,ruby-minitest-focus)
4448 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4449 (synopsis "Bonus assertions for @code{Minitest}")
4450 (description
4451 "Minitest bonus assertions provides extra MiniTest assertions. For
4452 instance, it provides @code{assert_true}, @code{assert_false} and
4453 @code{assert_set_equal}.")
4454 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4455 (license license:expat)))
4456
4457 (define-public ruby-minitest-reporters
4458 (package
4459 (name "ruby-minitest-reporters")
4460 (version "1.3.6")
4461 (source
4462 (origin
4463 (method url-fetch)
4464 (uri (rubygems-uri "minitest-reporters" version))
4465 (sha256
4466 (base32
4467 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4468 (build-system ruby-build-system)
4469 (arguments
4470 '(#:phases
4471 (modify-phases %standard-phases
4472 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4473 ;; including it as an input can lead to circular dependencies.
4474 (add-after 'unpack 'remove-rubocop-from-Rakefile
4475 (lambda _
4476 (substitute* "Rakefile"
4477 (("require 'rubocop/rake\\_task'") "")
4478 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4479 #t))
4480 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4481 (lambda _
4482 (substitute* "minitest-reporters.gemspec"
4483 ((".*%q<rubocop>.*") "\n"))
4484 #t)))))
4485 (propagated-inputs
4486 `(("ruby-ansi" ,ruby-ansi)
4487 ("ruby-builder" ,ruby-builder)
4488 ("ruby-minitest" ,ruby-minitest)
4489 ("ruby-progressbar" ,ruby-progressbar)))
4490 (native-inputs
4491 `(("bundler" ,bundler)
4492 ("ruby-maruku" ,ruby-maruku)))
4493 (synopsis "Enhanced reporting for Minitest tests")
4494 (description
4495 "@code{minitest/reporters} provides a custom Minitest runner to improve
4496 how the test state is reported. A number of different reporters are
4497 available, including a spec reporter, progress bar reporter, a HTML
4498 reporter.")
4499 (home-page "https://github.com/kern/minitest-reporters")
4500 (license license:expat)))
4501
4502 (define-public ruby-minitest-rg
4503 (package
4504 (name "ruby-minitest-rg")
4505 (version "5.2.0")
4506 (source
4507 (origin
4508 (method url-fetch)
4509 (uri (rubygems-uri "minitest-rg" version))
4510 (sha256
4511 (base32
4512 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4513 (build-system ruby-build-system)
4514 (arguments
4515 ;; Some tests fail even outside Guix, so disable tests.
4516 ;; https://github.com/blowmage/minitest-rg/issues/12
4517 ;; https://github.com/blowmage/minitest-rg/pull/13
4518 `(#:tests? #f))
4519 (propagated-inputs
4520 `(("ruby-minitest" ,ruby-minitest)))
4521 (synopsis "Coloured output for Minitest")
4522 (description
4523 "@code{minitest-rg} changes the colour of the output from Minitest.")
4524 (home-page "https://blowmage.com/minitest-rg/")
4525 (license license:expat)))
4526
4527 (define-public ruby-minitest-global-expectations
4528 (package
4529 (name "ruby-minitest-global-expectations")
4530 (version "1.0.1")
4531 (source
4532 (origin
4533 (method url-fetch)
4534 (uri (rubygems-uri "minitest-global_expectations"
4535 version))
4536 (sha256
4537 (base32
4538 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
4539 (build-system ruby-build-system)
4540 (propagated-inputs
4541 `(("ruby-minitest" ,ruby-minitest)))
4542 (synopsis "Adjust minitest behaviour for calling expectation methods")
4543 (description
4544 "Minitest-global_expectations allows continued use of expectation methods
4545 on all objects. Calling expectation methods on all objects was deprecated in
4546 minitest 5.12, and is planned to be removed from minitest 6.")
4547 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
4548 (license license:expat)))
4549
4550 (define-public ruby-minitest-hooks
4551 (package
4552 (name "ruby-minitest-hooks")
4553 (version "1.4.2")
4554 (source
4555 (origin
4556 (method url-fetch)
4557 (uri (rubygems-uri "minitest-hooks" version))
4558 (sha256
4559 (base32
4560 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
4561 (build-system ruby-build-system)
4562 (arguments
4563 '(#:test-target "spec"))
4564 (native-inputs
4565 `(("ruby-sequel" ,ruby-sequel)
4566 ("ruby-sqlite3" ,ruby-sqlite3)))
4567 (synopsis "Hooks for the minitest framework")
4568 (description
4569 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4570 @code{around_all} hooks for Minitest. This allows, for instance, running each
4571 suite of specs inside a database transaction, running each spec inside its own
4572 savepoint inside that transaction. This can significantly speed up testing
4573 for specs that share expensive database setup code.")
4574 (home-page "https://github.com/jeremyevans/minitest-hooks")
4575 (license license:expat)))
4576
4577 (define-public ruby-daemons
4578 (package
4579 (name "ruby-daemons")
4580 (version "1.2.5")
4581 (source (origin
4582 (method url-fetch)
4583 (uri (rubygems-uri "daemons" version))
4584 (sha256
4585 (base32
4586 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
4587 (build-system ruby-build-system)
4588 (arguments
4589 `(#:tests? #f)) ; no test suite
4590 (synopsis "Daemonize Ruby programs")
4591 (description "Daemons provides a way to wrap existing Ruby scripts to be
4592 run as a daemon and to be controlled by simple start/stop/restart commands.")
4593 (home-page "https://github.com/thuehlinger/daemons")
4594 (license license:expat)))
4595
4596 (define-public ruby-data_uri
4597 (package
4598 (name "ruby-data_uri")
4599 (version "0.1.0")
4600 (source
4601 (origin
4602 (method url-fetch)
4603 (uri (rubygems-uri "data_uri" version))
4604 (sha256
4605 (base32
4606 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4607 (build-system ruby-build-system)
4608 (synopsis "URI class for parsing data URIs")
4609 (description
4610 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4611 embedded inside a URI. The URI::Data class provides support for parsing these
4612 URIs using the normal URI.parse method.")
4613 (home-page "https://github.com/dball/data_uri")
4614 (license license:expat)))
4615
4616 (define-public ruby-deep-merge
4617 (package
4618 (name "ruby-deep-merge")
4619 (version "1.2.1")
4620 (home-page "https://github.com/danielsdeleo/deep_merge")
4621 ;; The Rubygem source does not contain the gemspec required for tests.
4622 (source (origin
4623 (method git-fetch)
4624 (uri (git-reference (url home-page) (commit version)))
4625 (file-name (git-file-name name version))
4626 (sha256
4627 (base32
4628 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4629 (build-system ruby-build-system)
4630 (native-inputs
4631 `(("ruby-minitest" ,ruby-minitest)))
4632 (synopsis "Recursively merge hashes")
4633 (description
4634 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4635 you to merge elements inside a hash together recursively.")
4636 (license license:expat)))
4637
4638 (define-public ruby-git
4639 (package
4640 (name "ruby-git")
4641 (version "1.3.0")
4642 (source (origin
4643 (method url-fetch)
4644 (uri (rubygems-uri "git" version))
4645 (sha256
4646 (base32
4647 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
4648 (build-system ruby-build-system)
4649 (arguments
4650 `(#:tests? #f ; no tests
4651 #:phases (modify-phases %standard-phases
4652 (add-after 'install 'patch-git-binary
4653 (lambda* (#:key inputs outputs #:allow-other-keys)
4654 ;; Make the default git binary an absolute path to the
4655 ;; store.
4656 (let ((git (string-append (assoc-ref inputs "git")
4657 "/bin/git"))
4658 (config (string-append
4659 (assoc-ref outputs "out")
4660 "/lib/ruby/vendor_ruby/gems/git-"
4661 ,version "/lib/git/config.rb")))
4662 (substitute* (list config)
4663 (("'git'")
4664 (string-append "'" git "'")))
4665 #t))))))
4666 (inputs
4667 `(("git" ,git)))
4668 (synopsis "Ruby wrappers for Git")
4669 (description "Ruby/Git is a Ruby library that can be used to create, read
4670 and manipulate Git repositories by wrapping system calls to the git binary.")
4671 (home-page "https://github.com/schacon/ruby-git")
4672 (license license:expat)))
4673
4674 (define-public ruby-hocon
4675 (package
4676 (name "ruby-hocon")
4677 (version "1.3.1")
4678 (home-page "https://github.com/puppetlabs/ruby-hocon")
4679 (source (origin
4680 (method git-fetch)
4681 (uri (git-reference (url home-page) (commit version)))
4682 (file-name (git-file-name name version))
4683 (sha256
4684 (base32
4685 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
4686 (build-system ruby-build-system)
4687 (arguments
4688 '(#:phases (modify-phases %standard-phases
4689 (replace 'check
4690 (lambda* (#:key tests? #:allow-other-keys)
4691 (if tests?
4692 (invoke "rspec")
4693 (format #t "test suite not run~%"))
4694 #t)))))
4695 (native-inputs
4696 `(("bundler" ,bundler)
4697 ("ruby-rspec" ,ruby-rspec)))
4698 (synopsis "HOCON config library")
4699 (description
4700 "This package provides Ruby support for the @acronym{HOCON,
4701 Human-Optimized Config Object Notation} configuration file format. It
4702 supports parsing and modifying HOCON and JSON files, and rendering parsed
4703 objects back to a @code{String}.")
4704 (license license:asl2.0)))
4705
4706 (define-public ruby-slop
4707 (package
4708 (name "ruby-slop")
4709 (version "4.5.0")
4710 (source (origin
4711 (method url-fetch)
4712 (uri (rubygems-uri "slop" version))
4713 (sha256
4714 (base32
4715 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
4716 (build-system ruby-build-system)
4717 (native-inputs
4718 `(("ruby-minitest" ,ruby-minitest)))
4719 (synopsis "Ruby command line option parser")
4720 (description "Slop provides a Ruby domain specific language for gathering
4721 options and parsing command line flags.")
4722 (home-page "https://github.com/leejarvis/slop")
4723 (license license:expat)))
4724
4725 (define-public ruby-slop-3
4726 (package (inherit ruby-slop)
4727 (version "3.6.0")
4728 (source (origin
4729 (method url-fetch)
4730 (uri (rubygems-uri "slop" version))
4731 (sha256
4732 (base32
4733 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4734
4735 (define-public ruby-multi-xml
4736 (package
4737 (name "ruby-multi-xml")
4738 (version "0.6.0")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (rubygems-uri "multi_xml" version))
4743 (sha256
4744 (base32
4745 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4746 (build-system ruby-build-system)
4747 (arguments
4748 '(#:tests? #f)) ; No included tests
4749 (synopsis "Swappable XML backends for Ruby")
4750 (description
4751 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4752 Nokogiri, Ox, or REXML.")
4753 (home-page "https://github.com/sferik/multi_xml")
4754 (license license:expat)))
4755
4756 (define-public ruby-multipart-post
4757 (package
4758 (name "ruby-multipart-post")
4759 (version "2.0.0")
4760 (source (origin
4761 (method url-fetch)
4762 (uri (rubygems-uri "multipart-post" version))
4763 (sha256
4764 (base32
4765 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
4766 (build-system ruby-build-system)
4767 (native-inputs
4768 `(("bundler" ,bundler)))
4769 (synopsis "Multipart POST library for Ruby")
4770 (description "Multipart-Post Adds multipart POST capability to Ruby's
4771 net/http library.")
4772 (home-page "https://github.com/nicksieger/multipart-post")
4773 (license license:expat)))
4774
4775 (define-public ruby-multi-json
4776 (package
4777 (name "ruby-multi-json")
4778 (version "1.13.1")
4779 (source
4780 (origin
4781 (method git-fetch)
4782 ;; Tests are not distributed at rubygems.org so download from GitHub
4783 ;; instead.
4784 (uri (git-reference
4785 (url "https://github.com/intridea/multi_json")
4786 (commit (string-append "v" version))))
4787 (file-name (git-file-name name version))
4788 (sha256
4789 (base32
4790 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
4791 (build-system ruby-build-system)
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (add-after 'unpack 'remove-signing-key-reference
4796 (lambda _
4797 (substitute* "multi_json.gemspec"
4798 ((".*spec.signing_key.*") ""))
4799 #t)))))
4800 (native-inputs
4801 `(("bundler" ,bundler)
4802 ("ruby-rspec" ,ruby-rspec)
4803 ("ruby-yard" ,ruby-yard)
4804 ("ruby-json-pure" ,ruby-json-pure)
4805 ("ruby-oj" ,ruby-oj)
4806 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
4807 (synopsis "Common interface to multiple JSON libraries for Ruby")
4808 (description
4809 "This package provides a common interface to multiple JSON libraries,
4810 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4811 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
4812 (home-page "https://github.com/intridea/multi_json")
4813 (license license:expat)))
4814
4815 (define-public ruby-multi-test
4816 (package
4817 (name "ruby-multi-test")
4818 (version "0.1.2")
4819 (source
4820 (origin
4821 (method url-fetch)
4822 (uri (rubygems-uri "multi_test" version))
4823 (sha256
4824 (base32
4825 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4826 (build-system ruby-build-system)
4827 (arguments
4828 '(;; Tests require different sets of specific gem versions to be available,
4829 ;; and there is no gemfile that specifies the newest versions of
4830 ;; dependencies to be tested.
4831 #:tests? #f))
4832 (synopsis
4833 "Interface to testing libraries loaded into a running Ruby process")
4834 (description
4835 "@code{multi_test} provides a uniform interface onto whatever testing
4836 libraries that have been loaded into a running Ruby process to help control
4837 rogue test/unit/autorun requires.")
4838 (home-page "https://github.com/cucumber/multi_test")
4839 (license license:expat)))
4840
4841 (define-public ruby-arel
4842 (package
4843 (name "ruby-arel")
4844 (version "9.0.0")
4845 (source (origin
4846 (method url-fetch)
4847 (uri (rubygems-uri "arel" version))
4848 (sha256
4849 (base32
4850 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
4851 (build-system ruby-build-system)
4852 (arguments '(#:tests? #f)) ; no tests
4853 (home-page "https://github.com/rails/arel")
4854 (synopsis "SQL AST manager for Ruby")
4855 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4856 Ruby. It simplifies the generation of complex SQL queries and adapts to
4857 various relational database implementations.")
4858 (license license:expat)))
4859
4860 (define-public ruby-marcel
4861 (package
4862 (name "ruby-marcel")
4863 (version "0.3.3")
4864 (source
4865 (origin
4866 (method url-fetch)
4867 (uri (rubygems-uri "marcel" version))
4868 (sha256
4869 (base32
4870 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4871 (build-system ruby-build-system)
4872 (arguments
4873 '(;; No included tests
4874 #:tests? #f))
4875 (propagated-inputs
4876 `(("ruby-mimemagic" ,ruby-mimemagic)))
4877 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4878 (description
4879 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4880 Extensions} type detection using magic numbers, filenames, and extensions")
4881 (home-page "https://github.com/basecamp/marcel")
4882 (license license:expat)))
4883
4884 (define-public ruby-minitar
4885 ;; We package from the GitHub source to fix the security issue reported at
4886 ;; https://github.com/halostatue/minitar/issues/16.
4887 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4888 (package
4889 (name "ruby-minitar")
4890 (version (string-append "0.5.4-1." (string-take commit 8)))
4891 (source
4892 (origin
4893 (method git-fetch)
4894 (uri (git-reference
4895 (url "https://github.com/halostatue/minitar")
4896 (commit commit)))
4897 (file-name (string-append name "-" version "-checkout"))
4898 (sha256
4899 (base32
4900 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4901 (build-system ruby-build-system)
4902 (arguments
4903 '(#:tests? #f)) ; missing a gemspec
4904 (synopsis "Ruby library and utility for handling tar archives")
4905 (description
4906 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
4907 that provides the ability to deal with POSIX tar archive files.")
4908 (home-page "http://www.github.com/atoulme/minitar")
4909 (license (list license:gpl2+ license:ruby)))))
4910
4911 (define-public ruby-mini-portile
4912 (package
4913 (name "ruby-mini-portile")
4914 (version "0.6.2")
4915 (source
4916 (origin
4917 (method url-fetch)
4918 (uri (rubygems-uri "mini_portile" version))
4919 (sha256
4920 (base32
4921 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4922 (build-system ruby-build-system)
4923 (arguments
4924 '(#:tests? #f)) ; tests require network access
4925 (synopsis "Ports system for Ruby developers")
4926 (description "Mini-portile is a port/recipe system for Ruby developers.
4927 It provides a standard way to compile against specific versions of libraries
4928 to reproduce user environments.")
4929 (home-page "https://github.com/flavorjones/mini_portile")
4930 (license license:expat)))
4931
4932 (define-public ruby-mini-portile-2
4933 (package (inherit ruby-mini-portile)
4934 (version "2.4.0")
4935 (source (origin
4936 (method url-fetch)
4937 (uri (rubygems-uri "mini_portile2" version))
4938 (sha256
4939 (base32
4940 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
4941
4942 (define-public ruby-nokogiri
4943 (package
4944 (name "ruby-nokogiri")
4945 (version "1.10.9")
4946 (source (origin
4947 (method url-fetch)
4948 (uri (rubygems-uri "nokogiri" version))
4949 (sha256
4950 (base32
4951 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
4952 (build-system ruby-build-system)
4953 (arguments
4954 ;; Tests fail because Nokogiri can only test with an installed extension,
4955 ;; and also because many test framework dependencies are missing.
4956 `(#:tests? #f
4957 #:gem-flags (list "--" "--use-system-libraries"
4958 (string-append "--with-xml2-include="
4959 (assoc-ref %build-inputs "libxml2")
4960 "/include/libxml2" ))
4961 #:phases
4962 (modify-phases %standard-phases
4963 (add-before 'build 'patch-extconf
4964 ;; 'pkg-config' is not included in the GEM_PATH during
4965 ;; installation, so we add it directly to the load path.
4966 (lambda* (#:key inputs #:allow-other-keys)
4967 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
4968 (substitute* "ext/nokogiri/extconf.rb"
4969 (("gem 'pkg-config'.*")
4970 (string-append "$:.unshift '"
4971 pkg-config "/lib/ruby/vendor_ruby"
4972 "/gems/pkg-config-"
4973 ,(package-version ruby-pkg-config)
4974 "/lib'\n"))))
4975 #t)))))
4976 (native-inputs
4977 `(("ruby-hoe" ,ruby-hoe)))
4978 (inputs
4979 `(("zlib" ,zlib)
4980 ("libxml2" ,libxml2)
4981 ("libxslt" ,libxslt)))
4982 (propagated-inputs
4983 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4984 ("ruby-pkg-config" ,ruby-pkg-config)))
4985 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4986 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4987 both CSS3 selector and XPath 1.0 support.")
4988 (home-page "http://www.nokogiri.org/")
4989 (license license:expat)))
4990
4991 (define-public ruby-method-source
4992 (package
4993 (name "ruby-method-source")
4994 (version "1.0.0")
4995 (source
4996 (origin
4997 (method url-fetch)
4998 (uri (rubygems-uri "method_source" version))
4999 (sha256
5000 (base32
5001 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
5002 (build-system ruby-build-system)
5003 (arguments
5004 `(#:test-target "spec"))
5005 (native-inputs
5006 `(("ruby-rspec" ,ruby-rspec)
5007 ("git" ,git)))
5008 (synopsis "Retrieve the source code for Ruby methods")
5009 (description "Method_source retrieves the source code for Ruby methods.
5010 Additionally, it can extract source code from Proc and Lambda objects or just
5011 extract comments.")
5012 (home-page "https://github.com/banister/method_source")
5013 (license license:expat)))
5014
5015 (define-public ruby-coderay
5016 (package
5017 (name "ruby-coderay")
5018 (version "1.1.2")
5019 (source
5020 (origin
5021 (method url-fetch)
5022 (uri (rubygems-uri "coderay" version))
5023 (sha256
5024 (base32
5025 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
5026 (build-system ruby-build-system)
5027 (arguments
5028 '(#:tests? #f)) ; missing test files
5029 (synopsis "Ruby syntax highlighting library")
5030 (description "Coderay is a Ruby library that provides syntax highlighting
5031 for select languages.")
5032 (home-page "http://coderay.rubychan.de")
5033 (license license:expat)))
5034
5035 (define-public ruby-cuke-modeler
5036 (package
5037 (name "ruby-cuke-modeler")
5038 (version "3.1.0")
5039 (source
5040 (origin
5041 (method url-fetch)
5042 (uri (rubygems-uri "cuke_modeler" version))
5043 (sha256
5044 (base32
5045 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
5046 (build-system ruby-build-system)
5047 (arguments `(#:tests? #f)) ;no test suite in gem
5048 (propagated-inputs
5049 `(("ruby-gherkin" ,ruby-gherkin)))
5050 (synopsis "Gherkin test suite analysis tool")
5051 (description "CukeModeler facilitates modeling a test suite that is
5052 written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
5053 providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
5054 the @code{cucumber-gherkin} generates when parsing features, as well as
5055 providing models for feature files and directories in order to be able to have
5056 a fully traversable model tree of a test suite's structure. These models can
5057 then be analyzed or manipulated more easily than the underlying AST layer.")
5058 (home-page "https://github.com/enkessler/cuke_modeler")
5059 (license license:expat)))
5060
5061 (define-public ruby-parallel-tests
5062 (package
5063 (name "ruby-parallel-tests")
5064 (version "3.0.0")
5065 (home-page "https://github.com/grosser/parallel_tests")
5066 (source (origin
5067 (method git-fetch)
5068 (uri (git-reference
5069 (url home-page)
5070 (commit (string-append "v" version))))
5071 (file-name (string-append name version))
5072 (sha256
5073 (base32
5074 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
5075 (build-system ruby-build-system)
5076 (arguments
5077 '(#:test-target "default"
5078 #:phases (modify-phases %standard-phases
5079 (add-after 'patch-source-shebangs 'patch-shell-invokations
5080 (lambda _
5081 (substitute* '("lib/parallel_tests/tasks.rb"
5082 "spec/parallel_tests/tasks_spec.rb")
5083 (("/bin/sh") (which "sh"))
5084 (("/bin/bash") (which "bash")))
5085 #t))
5086 (add-before 'check 'remove-version-constraints
5087 (lambda _
5088 ;; Remove hard coded version constraints, instead just
5089 ;; use whatever versions are available in Guix.
5090 (delete-file "Gemfile.lock")
5091 (substitute* "Gemfile"
5092 (("'minitest',.*")
5093 "'minitest'\n")
5094 (("'cucumber',.*")
5095 "'cucumber'\n"))
5096 #t))
5097 (add-before 'check 'disable-rails-test
5098 (lambda _
5099 ;; XXX: This test attempts to download and run the test
5100 ;; suites of multiple Rails versions(!) directly.
5101 (delete-file "spec/rails_spec.rb")
5102 #t))
5103 (add-before 'check 'set-HOME
5104 (lambda _
5105 ;; Some tests check the output of Bundler, and fail when
5106 ;; Bundler warns that /homeless-shelter does not exist.
5107 (setenv "HOME" "/tmp")
5108 #t)))))
5109 (native-inputs
5110 `(("ruby-bump" ,ruby-bump)
5111 ("ruby-cucumber" ,ruby-cucumber)
5112 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
5113 ("ruby-minitest" ,ruby-minitest)
5114 ("ruby-rake" ,ruby-rake)
5115 ("ruby-rspec" ,ruby-rspec)
5116 ("ruby-spinach" ,ruby-spinach)))
5117 (propagated-inputs
5118 `(("ruby-parallel" ,ruby-parallel)))
5119 (synopsis "Run tests in parallel")
5120 (description
5121 "This package can speed up @code{Test::Unit}, @code{RSpec},
5122 @code{Cucumber}, and @code{Spinach} tests by running them concurrently
5123 across multiple CPU cores.")
5124 (license license:expat)))
5125
5126 (define-public ruby-parser
5127 (package
5128 (name "ruby-parser")
5129 (version "2.7.1.4")
5130 (source
5131 (origin
5132 (method url-fetch)
5133 (uri (rubygems-uri "parser" version))
5134 (sha256
5135 (base32
5136 "1030znhvhkfn39svwbj6qn4xb6hgl94gnvg57k4d3r76f9bryqmn"))))
5137 (build-system ruby-build-system)
5138 (native-inputs
5139 `(("bundler" ,bundler)
5140 ("ruby-cliver" ,ruby-cliver)
5141 ("ruby-simplecov" ,ruby-simplecov)
5142 ("ruby-racc" ,ruby-racc)))
5143 (inputs
5144 `(("ragel" ,ragel)))
5145 (propagated-inputs
5146 `(("ruby-ast" ,ruby-ast)))
5147 (synopsis "Ruby parser written in pure Ruby")
5148 (description
5149 "This package provides a Ruby parser written in pure Ruby.")
5150 (home-page "https://github.com/whitequark/parser")
5151 (license license:expat)))
5152
5153 (define-public ruby-sexp-processor
5154 (package
5155 (name "ruby-sexp-processor")
5156 (version "4.15.0")
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (rubygems-uri "sexp_processor" version))
5161 (sha256
5162 (base32
5163 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
5164 (build-system ruby-build-system)
5165 (native-inputs
5166 ;; TODO: Add ruby-minitest-proveit once available.
5167 `(("hoe" ,ruby-hoe)))
5168 (synopsis "ParseTree fork which includes generic S-exp processing tools")
5169 (description "The sexp_processor package is derived from ParseTree, but
5170 contrary to ParseTree, it includes all the generic S-exp processing tools.
5171 Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
5172 @code{Environment}")
5173 (home-page "https://github.com/seattlerb/sexp_processor")
5174 (license license:expat)))
5175
5176 (define-public ruby-ruby-parser
5177 (package
5178 (name "ruby-ruby-parser")
5179 (version "3.14.2")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (rubygems-uri "ruby_parser" version))
5184 (sha256
5185 (base32
5186 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
5187 (build-system ruby-build-system)
5188 (native-inputs
5189 `(("hoe" ,ruby-hoe)
5190 ("racc" ,ruby-racc)
5191 ("unifdef" ,unifdef)))
5192 (propagated-inputs
5193 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
5194 (home-page "https://github.com/seattlerb/ruby_parser/")
5195 (synopsis "Ruby parser written in pure Ruby")
5196 (description "The ruby_parser (RP) package provides a Ruby parser written
5197 in pure Ruby. It outputs S-expressions which can be manipulated and converted
5198 back to Ruby via the @code{ruby2ruby} library.")
5199 (license license:expat)))
5200
5201 (define-public ruby-prawn-manual-builder
5202 (package
5203 (name "ruby-prawn-manual-builder")
5204 (version "0.3.1")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (rubygems-uri "prawn-manual_builder" version))
5209 (sha256
5210 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
5211 (build-system ruby-build-system)
5212 (arguments
5213 '(#:tests? #f ; no included tests
5214 #:phases
5215 (modify-phases %standard-phases
5216 (add-after 'extract-gemspec 'patch-gemspec
5217 (lambda _
5218 (substitute* ".gemspec"
5219 ;; Loosen the requirement for pdf-inspector
5220 (("~> 1\\.0\\.7") ">= 0")))))))
5221 (propagated-inputs
5222 `(("ruby-coderay" ,ruby-coderay)))
5223 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
5224 (description
5225 "This package provides a tool for writing manuals for Prawn and Prawn
5226 accessories")
5227 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
5228 (license %prawn-project-licenses)))
5229
5230 (define-public ruby-progress_bar
5231 (package
5232 (name "ruby-progress_bar")
5233 (version "1.1.0")
5234 (source
5235 (origin
5236 (method url-fetch)
5237 (uri (rubygems-uri "progress_bar" version))
5238 (sha256
5239 (base32
5240 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
5241 (build-system ruby-build-system)
5242 (arguments
5243 '(#:test-target "spec"))
5244 (propagated-inputs
5245 `(("ruby-highline" ,ruby-highline)
5246 ("ruby-options" ,ruby-options)))
5247 (native-inputs
5248 `(("bundler" ,bundler)
5249 ("ruby-rspec" ,ruby-rspec)
5250 ("ruby-timecop" ,ruby-timecop)))
5251 (synopsis
5252 "Ruby library for displaying progress bars")
5253 (description
5254 "ProgressBar is a simple library for displaying progress bars. The
5255 maximum value is configurable, and additional information can be displayed
5256 like the percentage completion, estimated time remaining, elapsed time and
5257 rate.")
5258 (home-page "https://github.com/paul/progress_bar")
5259 (license license:wtfpl2)))
5260
5261 (define-public ruby-dep
5262 (package
5263 (name "ruby-dep")
5264 (version "1.5.0")
5265 (source
5266 (origin
5267 (method url-fetch)
5268 (uri (rubygems-uri "ruby_dep" version))
5269 (sha256
5270 (base32
5271 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
5272 (build-system ruby-build-system)
5273 (arguments
5274 '(#:tests? #f)) ; No included tests
5275 (synopsis "Creates a version constraint of supported Rubies")
5276 (description
5277 "This package helps create a version constraint of supported Rubies,
5278 suitable for a gemspec file.")
5279 (home-page "https://github.com/e2/ruby_dep")
5280 (license license:expat)))
5281
5282 (define-public ruby-progressbar
5283 (package
5284 (name "ruby-progressbar")
5285 (version "1.10.1")
5286 (source
5287 (origin
5288 (method url-fetch)
5289 (uri (rubygems-uri "ruby-progressbar" version))
5290 (sha256
5291 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
5292 (build-system ruby-build-system)
5293 (arguments
5294 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
5295 #:tests? #f))
5296 (synopsis "Text progress bar library for Ruby")
5297 (description
5298 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
5299 The output can be customized with a formatting system.")
5300 (home-page "https://github.com/jfelchner/ruby-progressbar")
5301 (license license:expat)))
5302
5303 (define-public ruby-pry
5304 (package
5305 (name "ruby-pry")
5306 (version "0.13.1")
5307 (source
5308 (origin
5309 (method url-fetch)
5310 (uri (rubygems-uri "pry" version))
5311 (sha256
5312 (base32
5313 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
5314 (build-system ruby-build-system)
5315 (arguments
5316 '(#:tests? #f)) ; no tests
5317 (propagated-inputs
5318 `(("ruby-coderay" ,ruby-coderay)
5319 ("ruby-method-source" ,ruby-method-source)))
5320 (synopsis "Ruby REPL")
5321 (description "Pry is an IRB alternative and runtime developer console for
5322 Ruby. It features syntax highlighting, a plugin architecture, runtime
5323 invocation, and source and documentation browsing.")
5324 (home-page "https://cobaltbluemedia.com/pryrepl/")
5325 (license license:expat)))
5326
5327 (define-public ruby-single-cov
5328 (package
5329 (name "ruby-single-cov")
5330 (version "1.3.2")
5331 (home-page "https://github.com/grosser/single_cov")
5332 (source (origin
5333 (method git-fetch)
5334 (uri (git-reference (url home-page)
5335 (commit (string-append "v" version))))
5336 (file-name (git-file-name name version))
5337 (sha256
5338 (base32
5339 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
5340 (build-system ruby-build-system)
5341 (arguments
5342 '(#:test-target "default"
5343 #:phases (modify-phases %standard-phases
5344 (replace 'replace-git-ls-files
5345 (lambda _
5346 (substitute* "single_cov.gemspec"
5347 (("`git ls-files lib/ bin/ MIT-LICENSE`")
5348 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
5349 #t))
5350 (add-before 'check 'remove-version-constraints
5351 (lambda _
5352 (delete-file "Gemfile.lock")
5353 #t))
5354 (add-before 'check 'make-files-writable
5355 (lambda _
5356 ;; Tests need to create local directories and open files
5357 ;; with write permissions.
5358 (for-each make-file-writable
5359 (find-files "specs" #:directories? #t))
5360 #t))
5361 (add-before 'check 'disable-failing-test
5362 (lambda _
5363 ;; XXX: This test copies assets from minitest, but can
5364 ;; not cope with the files being read-only. Just skip
5365 ;; it for now.
5366 (substitute* "specs/single_cov_spec.rb"
5367 (("it \"complains when coverage is bad\"")
5368 "xit \"complains when coverage is bad\""))
5369 #t)))))
5370 (native-inputs
5371 `(("ruby-bump" ,ruby-bump)
5372 ("ruby-minitest" ,ruby-minitest)
5373 ("ruby-rspec" ,ruby-rspec)
5374 ("ruby-simplecov" ,ruby-simplecov)))
5375 (synopsis "Code coverage reporting tool")
5376 (description
5377 "This package provides actionable code coverage reports for Ruby
5378 projects. It has very little overhead and can be easily integrated with
5379 development tools to catch coverage problems early.")
5380 (license license:expat)))
5381
5382 (define-public ruby-guard
5383 (package
5384 (name "ruby-guard")
5385 (version "2.13.0")
5386 (source (origin
5387 (method git-fetch)
5388 ;; The gem does not include a Rakefile, nor does it contain a
5389 ;; gemspec file, nor does it come with the tests. This is why
5390 ;; we fetch the tarball from Github.
5391 (uri (git-reference
5392 (url "https://github.com/guard/guard")
5393 (commit (string-append "v" version))))
5394 (file-name (git-file-name name version))
5395 (sha256
5396 (base32
5397 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
5398 (build-system ruby-build-system)
5399 (arguments
5400 `(#:tests? #f ; tests require cucumber
5401 #:phases
5402 (modify-phases %standard-phases
5403 (add-after 'unpack 'remove-git-ls-files
5404 (lambda* (#:key outputs #:allow-other-keys)
5405 (substitute* "guard.gemspec"
5406 (("git ls-files -z") "find . -type f -print0"))
5407 #t))
5408 (replace 'build
5409 (lambda _
5410 (invoke "gem" "build" "guard.gemspec"))))))
5411 (propagated-inputs
5412 `(("ruby-formatador" ,ruby-formatador)
5413 ("ruby-listen" ,ruby-listen)
5414 ("ruby-lumberjack" ,ruby-lumberjack)
5415 ("ruby-nenv" ,ruby-nenv)
5416 ("ruby-notiffany" ,ruby-notiffany)
5417 ("ruby-pry" ,ruby-pry)
5418 ("ruby-shellany" ,ruby-shellany)
5419 ("ruby-thor" ,ruby-thor)))
5420 (native-inputs
5421 `(("bundler" ,bundler)
5422 ("ruby-rspec" ,ruby-rspec)))
5423 (synopsis "Tool to handle events on file system modifications")
5424 (description
5425 "Guard is a command line tool to easily handle events on file system
5426 modifications. Guard automates various tasks by running custom rules whenever
5427 file or directories are modified.")
5428 (home-page "https://guardgem.org/")
5429 (license license:expat)))
5430
5431 (define-public ruby-spinach
5432 (package
5433 (name "ruby-spinach")
5434 (version "0.11.0")
5435 (home-page "https://github.com/codegram/spinach")
5436 (source (origin
5437 (method url-fetch)
5438 (uri (rubygems-uri "spinach" version))
5439 (sha256
5440 (base32
5441 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5442 (build-system ruby-build-system)
5443 (arguments
5444 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5445 ;; which in turn depends on many other unpackaged gems. Enable once
5446 ;; capybara is available.
5447 '(#:tests? #f))
5448 (propagated-inputs
5449 `(("ruby-colorize" ,ruby-colorize)
5450 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5451 ("ruby-json" ,ruby-json)))
5452 (synopsis "Gherkin-based BDD framework")
5453 (description
5454 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5455 framework that leverages the expressive @code{Gherkin} language to help you
5456 define executable specifications of your code.")
5457 (license license:expat)))
5458
5459 (define-public ruby-tilt
5460 (package
5461 (name "ruby-tilt")
5462 (version "2.0.10")
5463 (source
5464 (origin
5465 (method git-fetch) ;the distributed gem lacks tests
5466 (uri (git-reference
5467 (url "https://github.com/rtomayko/tilt")
5468 (commit (string-append "v" version))))
5469 (file-name (git-file-name name version))
5470 (sha256
5471 (base32
5472 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
5473 (build-system ruby-build-system)
5474 (arguments
5475 '(#:phases
5476 (modify-phases %standard-phases
5477 (add-after 'unpack 'remove-some-dependencies
5478 (lambda _
5479 (substitute* "Gemfile"
5480 ;; TODO ronn is used for generating the manual
5481 (("gem 'ronn'.*") "\n")
5482 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5483 ;; pass it in as a native-input
5484 (("gem 'haml'.*") "\n")
5485 ;; TODO Not all of these gems are packaged for Guix yet:
5486 ;; less, coffee-script, livescript, babel-transpiler,
5487 ;; typescript-node
5488 (("if can_execjs") "if false")
5489 ;; Disable the secondary group to reduce the number of
5490 ;; dependencies. None of the normal approaches work, so patch
5491 ;; the Gemfile instead.
5492 (("group :secondary") "[].each"))
5493 #t)))))
5494 (propagated-inputs
5495 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5496 ("ruby-sassc" ,ruby-sassc)))
5497 (native-inputs
5498 `(("bundler" ,bundler)
5499 ("ruby-yard" ,ruby-yard)
5500 ("ruby-builder" ,ruby-builder)
5501 ("ruby-erubis" ,ruby-erubis)
5502 ("ruby-markaby" ,ruby-markaby)))
5503 (synopsis "Generic interface to multiple Ruby template engines")
5504 (description
5505 "Tilt is a thin interface over a number of different Ruby template
5506 engines in an attempt to make their usage as generic as possible.")
5507 (home-page "https://github.com/rtomayko/tilt/")
5508 (license license:expat)))
5509
5510 (define-public ruby-thread-safe
5511 (package
5512 (name "ruby-thread-safe")
5513 (version "0.3.6")
5514 (source
5515 (origin
5516 (method url-fetch)
5517 (uri (rubygems-uri "thread_safe" version))
5518 (sha256
5519 (base32
5520 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
5521 (build-system ruby-build-system)
5522 (arguments
5523 '(#:tests? #f)) ; needs simplecov, among others
5524 (synopsis "Thread-safe utilities for Ruby")
5525 (description "The thread_safe library provides thread-safe collections and
5526 utilities for Ruby.")
5527 (home-page "https://github.com/ruby-concurrency/thread_safe")
5528 (license license:asl2.0)))
5529
5530 (define-public ruby-tzinfo
5531 (package
5532 (name "ruby-tzinfo")
5533 (version "1.2.4")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (rubygems-uri "tzinfo" version))
5538 (sha256
5539 (base32
5540 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
5541 (build-system ruby-build-system)
5542 (arguments
5543 '(#:phases
5544 (modify-phases %standard-phases
5545 (add-after 'unpack 'skip-safe-tests
5546 (lambda _
5547 (substitute* "test/test_utils.rb"
5548 (("def safe_test\\(options = \\{\\}\\)")
5549 "def safe_test(options = {})
5550 skip('The Guix build environment has an unsafe load path')"))
5551 #t)))))
5552 (propagated-inputs
5553 `(("ruby-thread-safe" ,ruby-thread-safe)))
5554 (synopsis "Time zone library for Ruby")
5555 (description "TZInfo is a Ruby library that provides daylight savings
5556 aware transformations between times in different time zones.")
5557 (home-page "https://tzinfo.github.io")
5558 (license license:expat)))
5559
5560 (define-public ruby-tzinfo-data
5561 (package
5562 (name "ruby-tzinfo-data")
5563 (version "1.2017.3")
5564 (source
5565 (origin
5566 (method git-fetch)
5567 ;; Download from GitHub because the rubygems version does not contain
5568 ;; Rakefile or tests.
5569 (uri (git-reference
5570 (url "https://github.com/tzinfo/tzinfo-data")
5571 (commit (string-append "v" version))))
5572 (file-name (git-file-name name version))
5573 (sha256
5574 (base32
5575 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
5576 ;; Remove the known test failure.
5577 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5578 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5579 (patches (search-patches
5580 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5581 (build-system ruby-build-system)
5582 (propagated-inputs
5583 `(("ruby-tzinfo" ,ruby-tzinfo)))
5584 (synopsis "Data from the IANA Time Zone database")
5585 (description
5586 "This library provides @code{TZInfo::Data}, which contains data from the
5587 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
5588 (home-page "https://tzinfo.github.io")
5589 (license license:expat)))
5590
5591 (define-public ruby-rb-inotify
5592 (package
5593 (name "ruby-rb-inotify")
5594 (version "0.9.10")
5595 (source
5596 (origin
5597 (method url-fetch)
5598 (uri (rubygems-uri "rb-inotify" version))
5599 (sha256
5600 (base32
5601 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
5602 (build-system ruby-build-system)
5603 (arguments
5604 '(#:tests? #f ; there are no tests
5605 #:phases
5606 (modify-phases %standard-phases
5607 ;; Building the gemspec with rake is not working here since it is
5608 ;; generated with Jeweler. It is also unnecessary because the
5609 ;; existing gemspec does not use any development tools to generate a
5610 ;; list of files.
5611 (replace 'build
5612 (lambda _
5613 (invoke "gem" "build" "rb-inotify.gemspec"))))))
5614 (propagated-inputs
5615 `(("ruby-ffi" ,ruby-ffi)))
5616 (native-inputs
5617 `(("ruby-yard" ,ruby-yard)))
5618 (synopsis "Ruby wrapper for Linux's inotify")
5619 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5620 kernel subsystem for monitoring changes to files and directories.")
5621 (home-page "https://github.com/nex3/rb-inotify")
5622 (license license:expat)))
5623
5624 (define-public ruby-pry-editline
5625 (package
5626 (name "ruby-pry-editline")
5627 (version "1.1.2")
5628 (source (origin
5629 (method url-fetch)
5630 (uri (rubygems-uri "pry-editline" version))
5631 (sha256
5632 (base32
5633 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5634 (build-system ruby-build-system)
5635 (arguments `(#:tests? #f)) ; no tests included
5636 (native-inputs
5637 `(("bundler" ,bundler)))
5638 (synopsis "Open the current REPL line in an editor")
5639 (description
5640 "This gem provides a plugin for the Ruby REPL to enable opening the
5641 current line in an external editor.")
5642 (home-page "https://github.com/tpope/pry-editline")
5643 (license license:expat)))
5644
5645 (define-public ruby-sdoc
5646 (package
5647 (name "ruby-sdoc")
5648 (version "1.1.0")
5649 (source (origin
5650 (method url-fetch)
5651 (uri (rubygems-uri "sdoc" version))
5652 (sha256
5653 (base32
5654 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
5655 (build-system ruby-build-system)
5656 (arguments
5657 `(#:phases
5658 (modify-phases %standard-phases
5659 (add-before 'check 'set-rubylib-and-patch-gemfile
5660 (lambda _
5661 (setenv "RUBYLIB" "lib")
5662 (substitute* "sdoc.gemspec"
5663 (("s.add_runtime_dependency.*") "\n")
5664 (("s.add_dependency.*") "\n"))
5665 (substitute* "Gemfile"
5666 (("gem \"rake\".*")
5667 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
5668 #t)))))
5669 (propagated-inputs
5670 `(("ruby-json" ,ruby-json)))
5671 (native-inputs
5672 `(("bundler" ,bundler)
5673 ("ruby-minitest" ,ruby-minitest)
5674 ("ruby-hoe" ,ruby-hoe)))
5675 (synopsis "Generate searchable RDoc documentation")
5676 (description
5677 "SDoc is an RDoc documentation generator to build searchable HTML
5678 documentation for Ruby code.")
5679 (home-page "https://github.com/voloko/sdoc")
5680 (license license:expat)))
5681
5682 (define-public ruby-tins
5683 (package
5684 (name "ruby-tins")
5685 (version "1.15.0")
5686 (source (origin
5687 (method url-fetch)
5688 (uri (rubygems-uri "tins" version))
5689 (sha256
5690 (base32
5691 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
5692 (build-system ruby-build-system)
5693 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5694 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5695 ;; the gemspec.
5696 (arguments
5697 `(#:tests? #f ; there are no tests
5698 #:phases
5699 (modify-phases %standard-phases
5700 (replace 'build
5701 (lambda _
5702 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5703 ;; causes an error.
5704 (substitute* "tins.gemspec"
5705 (("\"lib/spruz\", ") ""))
5706 (invoke "gem" "build" "tins.gemspec"))))))
5707 (synopsis "Assorted tools for Ruby")
5708 (description "Tins is a Ruby library providing assorted tools.")
5709 (home-page "https://github.com/flori/tins")
5710 (license license:expat)))
5711
5712 (define-public ruby-gem-hadar
5713 (package
5714 (name "ruby-gem-hadar")
5715 (version "1.9.1")
5716 (source (origin
5717 (method url-fetch)
5718 (uri (rubygems-uri "gem_hadar" version))
5719 (sha256
5720 (base32
5721 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
5722 (build-system ruby-build-system)
5723 ;; This gem needs itself at development time. We disable rebuilding of the
5724 ;; gemspec to avoid this loop.
5725 (arguments
5726 `(#:tests? #f ; there are no tests
5727 #:phases
5728 (modify-phases %standard-phases
5729 (replace 'build
5730 (lambda _
5731 (invoke "gem" "build" "gem_hadar.gemspec"))))))
5732 (propagated-inputs
5733 `(("git" ,git)
5734 ("ruby-tins" ,ruby-tins)
5735 ("ruby-yard" ,ruby-yard)))
5736 (synopsis "Library for the development of Ruby gems")
5737 (description
5738 "This library contains some useful functionality to support the
5739 development of Ruby gems.")
5740 (home-page "https://github.com/flori/gem_hadar")
5741 (license license:expat)))
5742
5743 (define-public ruby-minitest-tu-shim
5744 (package
5745 (name "ruby-minitest-tu-shim")
5746 (version "1.3.3")
5747 (source (origin
5748 (method url-fetch)
5749 (uri (rubygems-uri "minitest_tu_shim" version))
5750 (sha256
5751 (base32
5752 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5753 (build-system ruby-build-system)
5754 (arguments
5755 `(#:phases
5756 (modify-phases %standard-phases
5757 (add-after 'unpack 'fix-test-include-path
5758 (lambda* (#:key inputs #:allow-other-keys)
5759 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
5760 (substitute* "Rakefile"
5761 (("Hoe\\.add_include_dirs .*")
5762 (string-append "Hoe.add_include_dirs \""
5763 minitest "/lib/ruby/vendor_ruby"
5764 "/gems/minitest-"
5765 ,(package-version ruby-minitest-4)
5766 "/lib" "\""))))
5767 #t))
5768 (add-before 'check 'fix-test-assumptions
5769 (lambda _
5770 ;; The test output includes the file name, so a couple of tests
5771 ;; fail. Changing the regular expressions slightly fixes this
5772 ;; problem.
5773 (substitute* "test/test_mini_test.rb"
5774 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5775 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5776 (("gsub\\(/.*, 'FILE:LINE'\\)")
5777 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5778 #t)))))
5779 (propagated-inputs
5780 `(("ruby-minitest-4" ,ruby-minitest-4)))
5781 (native-inputs
5782 `(("ruby-hoe" ,ruby-hoe)))
5783 (synopsis "Adapter library between minitest and test/unit")
5784 (description
5785 "This library bridges the gap between the small and fast minitest and
5786 Ruby's large and slower test/unit.")
5787 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5788 (license license:expat)))
5789
5790 (define-public ruby-term-ansicolor
5791 (package
5792 (name "ruby-term-ansicolor")
5793 (version "1.6.0")
5794 (source (origin
5795 (method url-fetch)
5796 (uri (rubygems-uri "term-ansicolor" version))
5797 (sha256
5798 (base32
5799 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
5800 (build-system ruby-build-system)
5801 ;; Rebuilding the gemspec seems to require git, even though this is not a
5802 ;; git repository, so we just build the gem from the existing gemspec.
5803 (arguments
5804 `(#:phases
5805 (modify-phases %standard-phases
5806 (add-after 'unpack 'fix-test
5807 (lambda -
5808 (substitute* "tests/hsl_triple_test.rb"
5809 (("0\\\\\\.0%")
5810 "0\\.?0?%"))))
5811 (replace 'build
5812 (lambda _
5813 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
5814 (propagated-inputs
5815 `(("ruby-tins" ,ruby-tins)))
5816 (native-inputs
5817 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5818 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5819 (synopsis "Ruby library to control the attributes of terminal output")
5820 (description
5821 "This Ruby library uses ANSI escape sequences to control the attributes
5822 of terminal output.")
5823 (home-page "https://flori.github.io/term-ansicolor/")
5824 ;; There is no mention of the "or later" clause.
5825 (license license:gpl2)))
5826
5827 (define-public ruby-terraform
5828 (package
5829 (name "ruby-terraform")
5830 (version "0.22.0")
5831 (source
5832 (origin
5833 (method url-fetch)
5834 (uri (rubygems-uri "ruby-terraform" version))
5835 (sha256
5836 (base32
5837 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5838 (build-system ruby-build-system)
5839 (arguments
5840 '(#:tests? #f)) ; No included tests
5841 (propagated-inputs
5842 `(("ruby-lino" ,ruby-lino)))
5843 (synopsis "Ruby wrapper around the Terraform command line interface")
5844 (description
5845 "This package provides a Ruby wrapper around the Terraform command line
5846 interface so that Terraform can be more easily invoked from Ruby code.")
5847 (home-page "https://github.com/infrablocks/ruby_terraform")
5848 (license license:expat)))
5849
5850 (define-public ruby-pstree
5851 (package
5852 (name "ruby-pstree")
5853 (version "0.1.0")
5854 (source (origin
5855 (method url-fetch)
5856 (uri (rubygems-uri "pstree" version))
5857 (sha256
5858 (base32
5859 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5860 (build-system ruby-build-system)
5861 (native-inputs
5862 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5863 ("bundler" ,bundler)))
5864 (synopsis "Create a process tree data structure")
5865 (description
5866 "This library uses the output of the @code{ps} command to create a
5867 process tree data structure for the current host.")
5868 (home-page "https://github.com/flori/pstree")
5869 ;; There is no mention of the "or later" clause.
5870 (license license:gpl2)))
5871
5872 (define-public ruby-utils
5873 (package
5874 (name "ruby-utils")
5875 (version "0.9.0")
5876 (source (origin
5877 (method url-fetch)
5878 (uri (rubygems-uri "utils" version))
5879 (sha256
5880 (base32
5881 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
5882 (build-system ruby-build-system)
5883 (propagated-inputs
5884 `(("ruby-tins" ,ruby-tins)
5885 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5886 ("ruby-pstree" ,ruby-pstree)
5887 ("ruby-pry-editline" ,ruby-pry-editline)))
5888 (native-inputs
5889 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5890 ("bundler" ,bundler)))
5891 (synopsis "Command line tools for working with Ruby")
5892 (description
5893 "This package provides assorted command line tools that may be useful
5894 when working with Ruby code.")
5895 (home-page "https://github.com/flori/utils")
5896 ;; There is no mention of the "or later" clause.
5897 (license license:gpl2)))
5898
5899 (define-public ruby-jaro-winkler
5900 (package
5901 (name "ruby-jaro-winkler")
5902 (version "1.5.4")
5903 (source
5904 (origin
5905 (method url-fetch)
5906 (uri (rubygems-uri "jaro_winkler" version))
5907 (sha256
5908 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
5909 (build-system ruby-build-system)
5910 (arguments
5911 '(#:tests? #f)) ; no included tests
5912 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5913 (description
5914 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5915 algorithm. It is written as a C extension and will fallback to a pure Ruby
5916 implementation on platforms where this is unsupported.")
5917 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5918 (license license:expat)))
5919
5920 (define-public ruby-json
5921 (package
5922 (name "ruby-json")
5923 (version "2.1.0")
5924 (source
5925 (origin
5926 (method url-fetch)
5927 (uri (rubygems-uri "json" version))
5928 (sha256
5929 (base32
5930 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
5931 (build-system ruby-build-system)
5932 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5933 (synopsis "JSON library for Ruby")
5934 (description "This Ruby library provides a JSON implementation written as
5935 a native C extension.")
5936 (home-page "http://json-jruby.rubyforge.org/")
5937 (license (list license:ruby license:gpl2)))) ; GPL2 only
5938
5939 (define-public ruby-json-pure
5940 (package
5941 (name "ruby-json-pure")
5942 (version "2.2.0")
5943 (source (origin
5944 (method url-fetch)
5945 (uri (rubygems-uri "json_pure" version))
5946 (sha256
5947 (base32
5948 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
5949 (build-system ruby-build-system)
5950 (arguments
5951 `(#:phases
5952 (modify-phases %standard-phases
5953 (add-after 'unpack 'fix-rakefile
5954 (lambda _
5955 (substitute* "Rakefile"
5956 ;; Since this is not a git repository, do not call 'git'.
5957 (("`git ls-files`") "`find . -type f |sort`")
5958 ;; Loosen dependency constraint.
5959 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5960 #t))
5961 (add-after 'replace-git-ls-files 'regenerate-gemspec
5962 (lambda _
5963 ;; Regenerate gemspec so loosened dependency constraints are
5964 ;; propagated.
5965 (invoke "rake" "gemspec")))
5966 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5967 (lambda _
5968 ;; This gemspec doesn't look to be generated by the above
5969 ;; command, so patch it separately.
5970 (substitute* "json-java.gemspec"
5971 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5972 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5973 #t)))))
5974 (native-inputs
5975 `(("bundler" ,bundler)
5976 ("ragel" ,ragel)
5977 ("ruby-simplecov" ,ruby-simplecov)
5978 ("ruby-test-unit" ,ruby-test-unit)))
5979 (synopsis "JSON implementation in pure Ruby")
5980 (description
5981 "This package provides a JSON implementation written in pure Ruby.")
5982 (home-page "https://flori.github.com/json/")
5983 (license license:ruby)))
5984
5985 (define-public ruby-jwt
5986 (package
5987 (name "ruby-jwt")
5988 (version "2.1.0")
5989 (source
5990 (origin
5991 (method url-fetch)
5992 (uri (rubygems-uri "jwt" version))
5993 (sha256
5994 (base32
5995 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
5996 (build-system ruby-build-system)
5997 (arguments
5998 '(#:test-target "test"
5999 #:phases
6000 (modify-phases %standard-phases
6001 (add-after 'unpack 'remove-unnecessary-dependencies
6002 (lambda _
6003 (substitute* "spec/spec_helper.rb"
6004 (("require 'simplecov.*") "\n")
6005 ;; Use [].each to disable running the SimpleCov configuration
6006 ;; block
6007 (("SimpleCov\\.configure") "[].each")
6008 (("require 'codeclimate-test-reporter'") "")
6009 (("require 'codacy-coverage'") "")
6010 (("Codacy::Reporter\\.start") ""))
6011 #t)))))
6012 (native-inputs
6013 `(("bundler" ,bundler)
6014 ("ruby-rspec" ,ruby-rspec)
6015 ("ruby-rbnacl" ,ruby-rbnacl)))
6016 (synopsis "Ruby implementation of the JSON Web Token standard")
6017 (description
6018 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
6019 @acronym{JWT, JSON Web Token} standard.")
6020 (home-page "https://github.com/jwt/ruby-jwt")
6021 (license license:expat)))
6022
6023 ;; Even though this package only provides bindings for a Mac OSX API it is
6024 ;; required by "ruby-listen" at runtime.
6025 (define-public ruby-rb-fsevent
6026 (package
6027 (name "ruby-rb-fsevent")
6028 (version "0.10.3")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (rubygems-uri "rb-fsevent" version))
6032 (sha256
6033 (base32
6034 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
6035 (build-system ruby-build-system)
6036 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
6037 ;; "listen", which needs "rb-fsevent" at runtime.
6038 (arguments `(#:tests? #f))
6039 (synopsis "FSEvents API with signals catching")
6040 (description
6041 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
6042 (home-page "https://rubygems.org/gems/rb-fsevent")
6043 (license license:expat)))
6044
6045 (define-public ruby-listen
6046 (package
6047 (name "ruby-listen")
6048 (version "3.2.0")
6049 (source
6050 (origin
6051 ;; The gem does not include a Rakefile, so fetch from the Git
6052 ;; repository.
6053 (method git-fetch)
6054 (uri (git-reference
6055 (url "https://github.com/guard/listen")
6056 (commit (string-append "v" version))))
6057 (file-name (git-file-name name version))
6058 (sha256
6059 (base32
6060 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
6061 (build-system ruby-build-system)
6062 (arguments
6063 `(#:test-target "spec"
6064 #:phases
6065 (modify-phases %standard-phases
6066 (add-after 'unpack 'fix-files-in-gemspec
6067 (lambda _
6068 (substitute* "listen.gemspec"
6069 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
6070 #t))
6071 (add-before 'check 'remove-unnecessary-dependencies'
6072 (lambda _
6073 (substitute* "Rakefile"
6074 ;; Rubocop is for code linting, and is unnecessary for running
6075 ;; the tests.
6076 ((".*rubocop.*") ""))
6077 #t)))))
6078 (native-inputs
6079 `(("bundler" ,bundler)
6080 ("ruby-rspec" ,ruby-rspec)))
6081 (inputs
6082 `(;; ruby-thor is used for the command line interface, and is referenced
6083 ;; in the wrapper, and therefore just needs to be an input.
6084 ("ruby-thor" ,ruby-thor)))
6085 (propagated-inputs
6086 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
6087 ("ruby-rb-inotify" ,ruby-rb-inotify)
6088 ("ruby-dep" ,ruby-dep)))
6089 (synopsis "Listen to file modifications")
6090 (description "The Listen gem listens to file modifications and notifies
6091 you about the changes.")
6092 (home-page "https://github.com/guard/listen")
6093 (license license:expat)))
6094
6095 (define-public ruby-loofah
6096 (package
6097 (name "ruby-loofah")
6098 (version "2.2.3")
6099 (source
6100 (origin
6101 (method url-fetch)
6102 (uri (rubygems-uri "loofah" version))
6103 (sha256
6104 (base32
6105 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
6106 (build-system ruby-build-system)
6107 (arguments
6108 '(#:phases
6109 (modify-phases %standard-phases
6110 (add-after 'unpack 'remove-unnecessary-dependencies
6111 (lambda _
6112 ;; concourse is a development tool which is unused, so remove it
6113 ;; so it's not required.
6114 (substitute* "Gemfile"
6115 ((".*\"concourse\".*") "\n"))
6116 (substitute* "Rakefile"
6117 (("require 'concourse'") "")
6118 (("Concourse\\.new.*") "\n"))
6119 #t)))))
6120 (native-inputs
6121 `(("ruby-hoe" ,ruby-hoe)
6122 ("ruby-rr" ,ruby-rr)))
6123 (propagated-inputs
6124 `(("ruby-nokogiri" ,ruby-nokogiri)
6125 ("ruby-crass" ,ruby-crass)))
6126 (synopsis "Ruby library for manipulating and transforming HTML/XML")
6127 (description
6128 "Loofah is a general library for manipulating and transforming HTML/XML
6129 documents and fragments. It's built on top of Nokogiri and libxml2.")
6130 (home-page "https://github.com/flavorjones/loofah")
6131 (license license:expat)))
6132
6133 (define-public ruby-activesupport
6134 (package
6135 (name "ruby-activesupport")
6136 (version "5.2.2.1")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (rubygems-uri "activesupport" version))
6141 (sha256
6142 (base32
6143 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
6144 (build-system ruby-build-system)
6145 (arguments
6146 `(#:phases
6147 (modify-phases %standard-phases
6148 (replace 'check
6149 (lambda _
6150 ;; There are no tests, instead attempt to load the library.
6151 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
6152 (propagated-inputs
6153 `(("ruby-concurrent" ,ruby-concurrent)
6154 ("ruby-i18n" ,ruby-i18n)
6155 ("ruby-minitest" ,ruby-minitest)
6156 ("ruby-tzinfo" ,ruby-tzinfo)
6157 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
6158 (synopsis "Ruby on Rails utility library")
6159 (description "ActiveSupport is a toolkit of support libraries and Ruby
6160 core extensions extracted from the Rails framework. It includes support for
6161 multibyte strings, internationalization, time zones, and testing.")
6162 (home-page "http://www.rubyonrails.org")
6163 (license license:expat)))
6164
6165 (define-public ruby-crass
6166 (package
6167 (name "ruby-crass")
6168 (version "1.0.6")
6169 (home-page "https://github.com/rgrove/crass")
6170 (source (origin
6171 ;; The gem does not contain tests, so pull from git.
6172 (method git-fetch)
6173 (uri (git-reference
6174 (url home-page)
6175 (commit (string-append "v" version))))
6176 (file-name (git-file-name name version))
6177 (sha256
6178 (base32
6179 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
6180 (build-system ruby-build-system)
6181 (synopsis "Pure Ruby CSS parser")
6182 (description
6183 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
6184 (license license:expat)))
6185
6186 (define-public ruby-nokogumbo
6187 (package
6188 (name "ruby-nokogumbo")
6189 (version "2.0.2")
6190 (source (origin
6191 ;; We use the git reference, because there's no Rakefile in the
6192 ;; published gem and the tarball on Github is outdated.
6193 (method git-fetch)
6194 (uri (git-reference
6195 (url "https://github.com/rubys/nokogumbo")
6196 (commit (string-append "v" version))))
6197 (file-name (string-append name "-" version "-checkout"))
6198 (sha256
6199 (base32
6200 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
6201 (build-system ruby-build-system)
6202 (native-inputs
6203 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
6204 (inputs
6205 `(("gumbo-parser" ,gumbo-parser)))
6206 (propagated-inputs
6207 `(("ruby-nokogiri" ,ruby-nokogiri)))
6208 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
6209 (description
6210 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
6211 access the result as a Nokogiri parsed document.")
6212 (home-page "https://github.com/rubys/nokogumbo/")
6213 (license license:asl2.0)))
6214
6215 (define-public ruby-sanitize
6216 (package
6217 (name "ruby-sanitize")
6218 (version "5.1.0")
6219 (home-page "https://github.com/rgrove/sanitize")
6220 (source (origin
6221 (method git-fetch)
6222 ;; The gem does not include the Rakefile, so we download the
6223 ;; source from Github.
6224 (uri (git-reference
6225 (url home-page)
6226 (commit (string-append "v" version))))
6227 (file-name (git-file-name name version))
6228 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
6229 (sha256
6230 (base32
6231 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
6232 (build-system ruby-build-system)
6233 (propagated-inputs
6234 `(("ruby-crass" ,ruby-crass)
6235 ("ruby-nokogiri" ,ruby-nokogiri)
6236 ("ruby-nokogumbo" ,ruby-nokogumbo)))
6237 (native-inputs
6238 `(("ruby-minitest" ,ruby-minitest)))
6239 (synopsis "Whitelist-based HTML and CSS sanitizer")
6240 (description
6241 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
6242 acceptable elements, attributes, and CSS properties, Sanitize will remove all
6243 unacceptable HTML and/or CSS from a string.")
6244 (license license:expat)))
6245
6246 (define-public ruby-oj
6247 (package
6248 (name "ruby-oj")
6249 (version "3.10.1")
6250 (source
6251 (origin
6252 (method git-fetch)
6253 ;; Version on rubygems.org does not contain Rakefile, so download from
6254 ;; GitHub instead.
6255 (uri (git-reference
6256 (url "https://github.com/ohler55/oj")
6257 (commit (string-append "v" version))))
6258 (file-name (git-file-name name version))
6259 (sha256
6260 (base32
6261 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
6262 (build-system ruby-build-system)
6263 (arguments
6264 '(#:test-target "test_all"
6265 #:phases
6266 (modify-phases %standard-phases
6267 (add-before 'check 'disable-bundler
6268 (lambda _
6269 (substitute* "Rakefile"
6270 (("Bundler\\.with_clean_env") "1.times")
6271 (("bundle exec ") "")))))))
6272 (native-inputs
6273 `(("bundler" ,bundler)
6274 ("ruby-rspec" ,ruby-rspec)
6275 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6276 (synopsis "JSON parser for Ruby optimized for speed")
6277 (description
6278 "Oj is a JSON parser and generator for Ruby, where the encoding and
6279 decoding of JSON is implemented as a C extension to Ruby.")
6280 (home-page "http://www.ohler.com/oj/")
6281 (license (list license:expat ; Ruby code
6282 license:bsd-3)))) ; extension code
6283
6284 (define-public ruby-ox
6285 (package
6286 (name "ruby-ox")
6287 (version "2.6.0")
6288 (source
6289 (origin
6290 (method url-fetch)
6291 (uri (rubygems-uri "ox" version))
6292 (sha256
6293 (base32
6294 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
6295 (build-system ruby-build-system)
6296 (arguments
6297 '(#:tests? #f)) ; no tests
6298 (synopsis "Optimized XML library for Ruby")
6299 (description
6300 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
6301 written as a native C extension. It was designed to be an alternative to
6302 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
6303 alternative to Marshal for Object serialization. ")
6304 (home-page "http://www.ohler.com/ox")
6305 (license license:expat)))
6306
6307 (define-public ruby-redcloth
6308 (package
6309 (name "ruby-redcloth")
6310 (version "4.3.2")
6311 (source (origin
6312 (method url-fetch)
6313 (uri (rubygems-uri "RedCloth" version))
6314 (sha256
6315 (base32
6316 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
6317 (build-system ruby-build-system)
6318 (arguments
6319 `(#:tests? #f ; no tests
6320 #:phases
6321 (modify-phases %standard-phases
6322 ;; Redcloth has complicated rake tasks to build various versions for
6323 ;; multiple targets using RVM. We don't want this so we just use the
6324 ;; existing gemspec.
6325 (replace 'build
6326 (lambda _
6327 (invoke "gem" "build" "redcloth.gemspec"))))))
6328 (native-inputs
6329 `(("bundler" ,bundler)
6330 ("ruby-diff-lcs" ,ruby-diff-lcs)
6331 ("ruby-rspec-2" ,ruby-rspec-2)))
6332 (synopsis "Textile markup language parser for Ruby")
6333 (description
6334 "RedCloth is a Ruby parser for the Textile markup language.")
6335 (home-page "http://redcloth.org")
6336 (license license:expat)))
6337
6338 (define-public ruby-pg
6339 (package
6340 (name "ruby-pg")
6341 (version "1.1.4")
6342 (source
6343 (origin
6344 (method url-fetch)
6345 (uri (rubygems-uri "pg" version))
6346 (sha256
6347 (base32
6348 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
6349 (build-system ruby-build-system)
6350 (arguments
6351 '(#:test-target "spec"))
6352 (native-inputs
6353 `(("ruby-rake-compiler" ,ruby-rake-compiler)
6354 ("ruby-hoe" ,ruby-hoe)
6355 ("ruby-rspec" ,ruby-rspec)))
6356 (inputs
6357 `(("postgresql" ,postgresql)))
6358 (synopsis "Ruby interface to PostgreSQL")
6359 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
6360 with PostgreSQL 9.0 and later.")
6361 (home-page "https://bitbucket.org/ged/ruby-pg")
6362 (license license:ruby)))
6363
6364 (define-public ruby-byebug
6365 (package
6366 (name "ruby-byebug")
6367 (version "9.0.6")
6368 (source
6369 (origin
6370 (method url-fetch)
6371 (uri (rubygems-uri "byebug" version))
6372 (sha256
6373 (base32
6374 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
6375 (build-system ruby-build-system)
6376 (arguments
6377 '(#:tests? #f)) ; no tests
6378 (synopsis "Debugger for Ruby 2")
6379 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6380 TracePoint C API for execution control and the Debug Inspector C API for call
6381 stack navigation. The core component provides support that front-ends can
6382 build on. It provides breakpoint handling and bindings for stack frames among
6383 other things and it comes with a command line interface.")
6384 (home-page "https://github.com/deivid-rodriguez/byebug")
6385 (license license:bsd-2)))
6386
6387 ;;; TODO: Make it the default byebug in core-updates.
6388 (define-public ruby-byebug-11
6389 (package
6390 (inherit ruby-byebug)
6391 (name "ruby-byebug")
6392 (version "11.1.3")
6393 (source
6394 (origin
6395 (method git-fetch)
6396 (uri (git-reference
6397 (url "https://github.com/deivid-rodriguez/byebug")
6398 (commit (string-append "v" version))))
6399 (file-name (git-file-name name version))
6400 (sha256
6401 (base32
6402 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6403 (modules '((guix build utils)))
6404 (snippet
6405 '(begin
6406 ;; Remove wrappers that try to setup a bundle environment.
6407 (with-directory-excursion "bin"
6408 (for-each delete-file '("bundle" "rake" "rubocop"))
6409 ;; ruby-minitest doesn't come with a launcher, so fix the one
6410 ;; provided.
6411 (substitute* "minitest"
6412 (("load File\\.expand_path\\(\"bundle\".*") "")
6413 (("require \"bundler/setup\".*") "")))
6414 #t))))
6415 (arguments
6416 `(#:tests? #t
6417 #:phases
6418 (modify-phases %standard-phases
6419 (add-after 'unpack 'skip-tmp-path-sensitive-test
6420 (lambda _
6421 (substitute* "test/commands/where_test.rb"
6422 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6423 "unless true\n"))
6424 #t))
6425 (add-before 'build 'compile
6426 (lambda _
6427 (invoke "rake" "compile")))
6428 (add-before 'check 'set-home
6429 (lambda _
6430 (setenv "HOME" (getcwd))
6431 #t)))))
6432 (native-inputs
6433 `(("bundler" ,bundler)
6434 ("ruby-chandler" ,ruby-chandler)
6435 ("ruby-minitest" ,ruby-minitest)
6436 ("ruby-pry" ,ruby-pry)
6437 ("ruby-rake-compiler" ,ruby-rake-compiler)
6438 ("ruby-rubocop" ,ruby-rubocop)
6439 ("ruby-yard" ,ruby-yard)))))
6440
6441 (define-public ruby-netrc
6442 (package
6443 (name "ruby-netrc")
6444 (version "0.11.0")
6445 (source (origin
6446 (method url-fetch)
6447 (uri (rubygems-uri "netrc" version))
6448 (sha256
6449 (base32
6450 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6451 (build-system ruby-build-system)
6452 (arguments
6453 `(#:phases
6454 (modify-phases %standard-phases
6455 (replace 'check
6456 ;; There is no Rakefile and minitest can only run one file at once,
6457 ;; so we have to iterate over all test files.
6458 (lambda _
6459 (for-each (lambda (file)
6460 (invoke "ruby" "-Itest" file))
6461 (find-files "./test" "test_.*\\.rb"))
6462 #t)))))
6463 (native-inputs
6464 `(("ruby-minitest" ,ruby-minitest)))
6465 (synopsis "Library to read and update netrc files")
6466 (description
6467 "This library can read and update netrc files, preserving formatting
6468 including comments and whitespace.")
6469 (home-page "https://github.com/geemus/netrc")
6470 (license license:expat)))
6471
6472 (define-public ruby-unf-ext
6473 (package
6474 (name "ruby-unf-ext")
6475 (version "0.0.7.6")
6476 (source (origin
6477 (method url-fetch)
6478 (uri (rubygems-uri "unf_ext" version))
6479 (sha256
6480 (base32
6481 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
6482 (build-system ruby-build-system)
6483 (arguments
6484 `(#:phases
6485 (modify-phases %standard-phases
6486 (add-after 'build 'build-ext
6487 (lambda _ (invoke "rake" "compile:unf_ext")))
6488 (add-before 'check 'lose-rake-compiler-dock-dependency
6489 (lambda _
6490 ;; rake-compiler-dock is listed in the gemspec, but only
6491 ;; required when cross-compiling.
6492 (substitute* "unf_ext.gemspec"
6493 ((".*rake-compiler-dock.*") ""))
6494 #t)))))
6495 (native-inputs
6496 `(("bundler" ,bundler)
6497 ("ruby-rake-compiler" ,ruby-rake-compiler)
6498 ("ruby-test-unit" ,ruby-test-unit)))
6499 (synopsis "Unicode normalization form support library")
6500 (description
6501 "This package provides unicode normalization form support for Ruby.")
6502 (home-page "https://github.com/knu/ruby-unf_ext")
6503 (license license:expat)))
6504
6505 (define-public ruby-tdiff
6506 ;; Use a newer than released snapshot so that rspec-2 is not required.
6507 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6508 (package
6509 (name "ruby-tdiff")
6510 (version (string-append "0.3.3-1." (string-take commit 8)))
6511 (source (origin
6512 (method git-fetch)
6513 (uri (git-reference
6514 (url "https://github.com/postmodern/tdiff")
6515 (commit commit)))
6516 (file-name (string-append name "-" version "-checkout"))
6517 (sha256
6518 (base32
6519 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6520 (build-system ruby-build-system)
6521 (native-inputs
6522 `(("ruby-rspec" ,ruby-rspec)
6523 ("ruby-yard" ,ruby-yard)
6524 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6525 (synopsis "Calculate the differences between two tree-like structures")
6526 (description
6527 "This library provides functions to calculate the differences between two
6528 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
6529 (home-page "https://github.com/postmodern/tdiff")
6530 (license license:expat))))
6531
6532 (define-public ruby-nokogiri-diff
6533 ;; Use a newer than released snapshot so that rspec-2 is not required.
6534 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6535 (package
6536 (name "ruby-nokogiri-diff")
6537 (version (string-append "0.2.0-1." (string-take commit 8)))
6538 (source (origin
6539 (method git-fetch)
6540 (uri (git-reference
6541 (url "https://github.com/postmodern/nokogiri-diff")
6542 (commit commit)))
6543 (file-name (string-append name "-" version "-checkout"))
6544 (sha256
6545 (base32
6546 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6547 (build-system ruby-build-system)
6548 (propagated-inputs
6549 `(("ruby-tdiff" ,ruby-tdiff)
6550 ("ruby-nokogiri" ,ruby-nokogiri)))
6551 (native-inputs
6552 `(("ruby-rspec" ,ruby-rspec)
6553 ("ruby-yard" ,ruby-yard)
6554 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6555 (synopsis "Calculate the differences between two XML/HTML documents")
6556 (description
6557 "@code{Nokogiri::Diff} adds the ability to calculate the
6558 differences (added or removed nodes) between two XML/HTML documents.")
6559 (home-page "https://github.com/postmodern/nokogiri-diff")
6560 (license license:expat))))
6561
6562 (define-public ruby-racc
6563 (package
6564 (name "ruby-racc")
6565 (version "1.4.14")
6566 (source
6567 (origin
6568 (method url-fetch)
6569 (uri (rubygems-uri "racc" version))
6570 (sha256
6571 (base32
6572 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6573 (build-system ruby-build-system)
6574 (native-inputs
6575 `(("ruby-hoe" ,ruby-hoe)
6576 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6577 (synopsis "LALR(1) parser generator for Ruby")
6578 (description
6579 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6580 generates Ruby program.")
6581 (home-page "http://i.loveruby.net/en/projects/racc/")
6582 (license (list
6583 ;; Generally licensed under the LGPL2.1, and some files also
6584 ;; available under the same license as Ruby.
6585 license:lgpl2.1
6586 license:ruby))))
6587
6588 (define-public ruby-rack
6589 (package
6590 (name "ruby-rack")
6591 (version "2.0.6")
6592 (source
6593 (origin
6594 (method git-fetch)
6595 ;; Download from GitHub so that the patch can be applied.
6596 (uri (git-reference
6597 (url "https://github.com/rack/rack")
6598 (commit version)))
6599 (file-name (git-file-name name version))
6600 (sha256
6601 (base32
6602 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
6603 ;; Ignore test which fails inside the build environment but works
6604 ;; outside.
6605 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
6606 (build-system ruby-build-system)
6607 (arguments
6608 '(#:phases
6609 (modify-phases %standard-phases
6610 (add-before 'check 'fix-tests
6611 (lambda _
6612 ;; A few of the tests use the length of a file on disk for
6613 ;; Content-Length and Content-Range headers. However, this file
6614 ;; has a shebang in it which an earlier phase patches, growing
6615 ;; the file size from 193 to 239 bytes when the store prefix is
6616 ;; "/gnu/store".
6617 (let ((size-diff (- (string-length (which "ruby"))
6618 (string-length "/usr/bin/env ruby"))))
6619 (substitute* '("test/spec_file.rb")
6620 (("193")
6621 (number->string (+ 193 size-diff)))
6622 (("bytes(.)22-33" all delimiter)
6623 (string-append "bytes"
6624 delimiter
6625 (number->string (+ 22 size-diff))
6626 "-"
6627 (number->string (+ 33 size-diff))))))
6628 #t))
6629 (add-before 'reset-gzip-timestamps 'make-files-writable
6630 (lambda* (#:key outputs #:allow-other-keys)
6631 ;; Make sure .gz files are writable so that the
6632 ;; 'reset-gzip-timestamps' phase can do its work.
6633 (let ((out (assoc-ref outputs "out")))
6634 (for-each make-file-writable
6635 (find-files out "\\.gz$"))
6636 #t))))))
6637 (native-inputs
6638 `(("ruby-minitest" ,ruby-minitest)
6639 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6640 ("which" ,which)))
6641 (propagated-inputs
6642 `(("ruby-concurrent" ,ruby-concurrent)))
6643 (synopsis "Unified web application interface for Ruby")
6644 (description "Rack provides a minimal, modular and adaptable interface for
6645 developing web applications in Ruby. By wrapping HTTP requests and responses,
6646 it unifies the API for web servers, web frameworks, and software in between
6647 into a single method call.")
6648 (home-page "https://rack.github.io/")
6649 (license license:expat)))
6650
6651 (define-public ruby-rack-test
6652 (package
6653 (name "ruby-rack-test")
6654 (version "0.8.3")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (rubygems-uri "rack-test" version))
6659 (sha256
6660 (base32
6661 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6662 (build-system ruby-build-system)
6663 (arguments
6664 ;; Disable tests because of circular dependencies: requires sinatra,
6665 ;; which requires rack-protection, which requires rack-test. Instead
6666 ;; simply require the library.
6667 `(#:phases
6668 (modify-phases %standard-phases
6669 (replace 'check
6670 (lambda _
6671 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6672 (propagated-inputs
6673 `(("ruby-rack" ,ruby-rack)))
6674 (synopsis "Testing API for Rack applications")
6675 (description
6676 "Rack::Test is a small, simple testing API for Rack applications. It can
6677 be used on its own or as a reusable starting point for Web frameworks and
6678 testing libraries to build on.")
6679 (home-page "https://github.com/rack-test/rack-test")
6680 (license license:expat)))
6681
6682 (define-public ruby-rack-protection
6683 (package
6684 (name "ruby-rack-protection")
6685 (version "2.0.5")
6686 (source
6687 (origin
6688 (method url-fetch)
6689 (uri (rubygems-uri "rack-protection" version))
6690 (sha256
6691 (base32
6692 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
6693 (build-system ruby-build-system)
6694 (arguments
6695 '(;; Tests missing from the gem.
6696 #:tests? #f))
6697 (propagated-inputs
6698 `(("ruby-rack" ,ruby-rack)))
6699 (native-inputs
6700 `(("bundler" ,bundler)
6701 ("ruby-rspec" ,ruby-rspec-2)
6702 ("ruby-rack-test" ,ruby-rack-test)))
6703 (synopsis "Rack middleware that protects against typical web attacks")
6704 (description "Rack middleware that can be used to protect against typical
6705 web attacks. It can protect all Rack apps, including Rails. For instance, it
6706 protects against cross site request forgery, cross site scripting,
6707 clickjacking, directory traversal, session hijacking and IP spoofing.")
6708 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6709 (license license:expat)))
6710
6711 (define-public ruby-rainbow
6712 (package
6713 (name "ruby-rainbow")
6714 (version "3.0.0")
6715 (source
6716 (origin
6717 (method url-fetch)
6718 (uri (rubygems-uri "rainbow" version))
6719 (sha256
6720 (base32
6721 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6722 (build-system ruby-build-system)
6723 (arguments
6724 '(#:phases
6725 (modify-phases %standard-phases
6726 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6727 ;; the Rakefile.
6728 (replace 'check
6729 (lambda* (#:key tests? #:allow-other-keys)
6730 (when tests?
6731 (invoke "rspec"))
6732 #t)))))
6733 (native-inputs
6734 `(("bundler" ,bundler)
6735 ("ruby-rspec" ,ruby-rspec)))
6736 (synopsis "Colorize printed text on ANSI terminals")
6737 (description
6738 "@code{rainbow} provides a string presenter object to colorize strings by
6739 wrapping them in ANSI escape codes.")
6740 (home-page "https://github.com/sickill/rainbow")
6741 (license license:expat)))
6742
6743 (define-public ruby-rr
6744 (package
6745 (name "ruby-rr")
6746 (version "1.2.1")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (rubygems-uri "rr" version))
6751 (sha256
6752 (base32
6753 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6754 (build-system ruby-build-system)
6755 (arguments
6756 '(#:tests? #f)) ; test files not included
6757 (native-inputs
6758 `(("bundler" ,bundler)
6759 ("ruby-rspec" ,ruby-rspec)))
6760 (synopsis "Ruby test double framework")
6761 (description
6762 "RR is a test double framework that features a rich selection of double
6763 techniques and a terse syntax.")
6764 (home-page "https://rr.github.io/rr/")
6765 (license license:expat)))
6766
6767 (define-public ruby-rest-client
6768 (package
6769 (name "ruby-rest-client")
6770 (version "2.0.2")
6771 (source
6772 (origin
6773 (method url-fetch)
6774 (uri (rubygems-uri "rest-client" version))
6775 (sha256
6776 (base32
6777 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6778 (build-system ruby-build-system)
6779 (arguments
6780 '(#:phases
6781 (modify-phases %standard-phases
6782 (add-before 'check 'remove-unnecessary-development-dependencies
6783 (lambda _
6784 (substitute* "rest-client.gemspec"
6785 ;; Remove rubocop as it's unused. Rubocop also indirectly
6786 ;; depends on this package through ruby-parser and ruby-ast so
6787 ;; this avoids a dependency loop.
6788 ((".*rubocop.*") "\n")
6789 ;; Remove pry as it's unused, it's a debugging tool
6790 ((".*pry.*") "\n")
6791 ;; Remove an unnecessarily strict rdoc dependency
6792 ((".*rdoc.*") "\n"))
6793 #t))
6794 (add-before 'check 'delete-network-dependent-tests
6795 (lambda _
6796 (delete-file "spec/integration/request_spec.rb")
6797 (delete-file "spec/integration/httpbin_spec.rb")
6798 #t)))))
6799 (propagated-inputs
6800 `(("ruby-http-cookie" ,ruby-http-cookie)
6801 ("ruby-mime-types" ,ruby-mime-types)
6802 ("ruby-netrc" ,ruby-netrc)))
6803 (native-inputs
6804 `(("bundler" ,bundler)
6805 ("ruby-webmock" ,ruby-webmock-2)
6806 ("ruby-rspec" ,ruby-rspec)))
6807 (synopsis "Simple HTTP and REST client for Ruby")
6808 (description
6809 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6810 inspired by the Sinatra microframework style of specifying actions:
6811 @code{get}, @code{put}, @code{post}, @code{delete}.")
6812 (home-page "https://github.com/rest-client/rest-client")
6813 (license license:expat)))
6814
6815 (define-public ruby-rubocop-ast
6816 (package
6817 (name "ruby-rubocop-ast")
6818 (version "0.3.0")
6819 (source
6820 (origin
6821 (method git-fetch) ;no test suite in distributed gem
6822 (uri (git-reference
6823 (url "https://github.com/rubocop-hq/rubocop-ast.git")
6824 (commit (string-append "v" version))))
6825 (file-name (git-file-name name version))
6826 (sha256
6827 (base32
6828 "1ycf6qcj8nbzk2js72priim4642lkn56w5kbny1nlryjkckxgm04"))))
6829 (build-system ruby-build-system)
6830 (arguments
6831 `(#:test-target "spec"
6832 #:phases (modify-phases %standard-phases
6833 (add-after 'unpack 'disable-bundler
6834 (lambda _
6835 (substitute* "Rakefile"
6836 (("Bundler\\.setup.*") "nil\n"))
6837 #t))
6838 (replace 'replace-git-ls-files
6839 (lambda _
6840 (substitute* "rubocop-ast.gemspec"
6841 (("`git ls-files(.*)`" _ files)
6842 (format #f "`find ~a -type f| sort`" files)))
6843 #t)))))
6844 (native-inputs
6845 `(("ruby-bump" ,ruby-bump)
6846 ("ruby-rspec" ,ruby-rspec)))
6847 (propagated-inputs
6848 `(("ruby-parser" ,ruby-parser)))
6849 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6850 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6851 by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6852 @itemize
6853 @item @code{RuboCop::AST::Node}
6854 @item @code{RuboCop::AST::NodePattern}
6855 @end itemize")
6856 (home-page "https://rubocop.org/")
6857 (license license:expat)))
6858
6859 (define-public ruby-rexml
6860 (package
6861 (name "ruby-rexml")
6862 (version "3.2.4")
6863 (source
6864 (origin
6865 (method git-fetch) ;no tests in distributed gem
6866 (uri (git-reference
6867 (url "https://github.com/ruby/rexml.git")
6868 (commit (string-append "v" version))))
6869 (file-name (git-file-name name version))
6870 (sha256
6871 (base32
6872 "0rhjjbkaq2f2cs8hyr2i4yjqpcyl8m0wmr2cypa401m3fvz4221i"))))
6873 (build-system ruby-build-system)
6874 (synopsis "XML toolkit for Ruby")
6875 (description "Inspired by Electric XML library for Java, REXML aims to be
6876 easy-to-use API, small and fast. It supports both tree and stream document
6877 parsing.")
6878 (home-page "https://github.com/ruby/rexml")
6879 (license license:bsd-2)))
6880
6881 (define-public ruby-character-set
6882 (package
6883 (name "ruby-character-set")
6884 (version "1.4.0")
6885 (source
6886 (origin
6887 (method url-fetch)
6888 (uri (rubygems-uri "character_set" version))
6889 (sha256
6890 (base32
6891 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
6892 (build-system ruby-build-system)
6893 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
6894 (synopsis "Ruby library to manipulate Unicode")
6895 (description "CharacterSet is a C-extended Ruby library to work with sets
6896 of Unicode code points. It can read and write these sets in various formats
6897 and implements the @code{stdlib} @code{Set} interface for them. It also
6898 offers an alternate paradigm of @code{String} processing which grants much
6899 better performance than @code{Regexp} and @code{String} methods from the
6900 @code{stdlib} where applicable. Many parts can be used independently, e.g.:
6901 @itemize
6902 @item @code{CharacterSet::Character}
6903 @item @code{CharacterSet::Parser}
6904 @item @code{CharacterSet::Writer}
6905 @item @code{RangeCompressor}
6906 @end itemize")
6907 (home-page "https://github.com/jaynetics/character_set")
6908 (license license:expat)))
6909
6910 (define-public ruby-range-compressor
6911 (package
6912 (name "ruby-range-compressor")
6913 (version "1.0.0")
6914 (source
6915 (origin
6916 (method git-fetch)
6917 (uri (git-reference
6918 (url "https://github.com/janosch-x/range_compressor.git")
6919 (commit (string-append "v" version))))
6920 (file-name (git-file-name name version))
6921 (sha256
6922 (base32
6923 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
6924 (build-system ruby-build-system)
6925 (arguments
6926 `(#:test-target "spec"
6927 #:phases (modify-phases %standard-phases
6928 (add-after 'extract-gemspec 'strip-version-requirements
6929 (lambda _
6930 (substitute* "range_compressor.gemspec"
6931 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
6932 (string-append stripped "\n")))
6933 #t)))))
6934 (native-inputs
6935 `(("ruby-rspec" ,ruby-rspec)))
6936 (synopsis "Simple arrays of objects to arrays of ranges compressor")
6937 (description "RangeCompresses is a tiny library that allows compressing
6938 arrays of objects into arrays of ranges. For example, it can turn the
6939 following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
6940 (home-page "https://github.com/janosch-x/range_compressor")
6941 (license license:expat)))
6942
6943 (define-public ruby-regexp-property-values
6944 (package
6945 (name "ruby-regexp-property-values")
6946 (version "1.0.0")
6947 (source
6948 (origin
6949 (method git-fetch)
6950 (uri (git-reference ;no test suite in distributed gem
6951 (url "https://github.com/jaynetics/regexp_property_values.git")
6952 (commit (string-append "v" version))))
6953 (file-name (git-file-name name version))
6954 (sha256
6955 (base32
6956 "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
6957 (build-system ruby-build-system)
6958 (arguments
6959 '(#:test-target "default"))
6960 (native-inputs
6961 `(("ruby-character-set" ,ruby-character-set)
6962 ("ruby-rake-compiler" ,ruby-rake-compiler)
6963 ("ruby-range-compressor" ,ruby-range-compressor)
6964 ("ruby-rspec" ,ruby-rspec)))
6965 (synopsis "Inspect Ruby's regex engine property values")
6966 (description "This small library lets you see which property values are
6967 supported by the regular expression engine of the Ruby version you are running
6968 and can directly read out their code point ranges. In other words, it
6969 determines all supported values for @code{\\p{value}} expressions and what
6970 they match.")
6971 (home-page "https://github.com/jaynetics/regexp_property_values")
6972 (license license:expat)))
6973
6974 (define-public ruby-regexp-parser
6975 (package
6976 (name "ruby-regexp-parser")
6977 (version "1.7.1")
6978 (source
6979 (origin
6980 (method git-fetch) ;bin/test missing from gem
6981 (uri (git-reference
6982 (url "https://github.com/ammar/regexp_parser.git")
6983 (commit (string-append "v" version))))
6984 (file-name (git-file-name name version))
6985 (sha256
6986 (base32
6987 "0dk9d4vpw31cc06s29fqyr1kq0kipym1mydifkcrnppvpl3pd53r"))))
6988 (build-system ruby-build-system)
6989 (arguments
6990 '(#:test-target "default"
6991 #:phases (modify-phases %standard-phases
6992 (add-before 'build 'compile-scanner.rb
6993 (lambda _
6994 (invoke "rake" "build")
6995 ;; XXX: This is needed otherwise the install
6996 ;; phase fails to delete the installed cached
6997 ;; gem file.
6998 (delete-file-recursively "pkg")
6999 #t)))))
7000 (native-inputs
7001 `(("ragel" ,ragel)
7002 ("ruby-regexp-property-values" ,ruby-regexp-property-values)
7003 ("ruby-rspec" ,ruby-rspec)))
7004 (synopsis "A regular expression parser library for Ruby ")
7005 (description "A Ruby gem for tokenizing, parsing, and transforming regular
7006 expressions. It comprises the following components:
7007 @itemize
7008 @item A scanner/tokenizer based on Ragel,
7009 @item A lexer that produces a stream of token objects,
7010 @item A parser that produces a tree of Expression objects.
7011 @end itemize")
7012 (home-page "https://github.com/ammar/regexp_parser")
7013 (license license:expat)))
7014
7015 (define-public ruby-test-queue
7016 (package
7017 (name "ruby-test-queue")
7018 (version "0.4.2")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (rubygems-uri "test-queue" version))
7023 (sha256
7024 (base32
7025 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
7026 (build-system ruby-build-system)
7027 (arguments
7028 '(#:phases
7029 (modify-phases %standard-phases
7030 (replace 'check
7031 (lambda* (#:key tests? #:allow-other-keys)
7032 (when tests?
7033 (invoke "rspec"))
7034 #t)))))
7035 (native-inputs
7036 `(("ruby-rspec" ,ruby-rspec)))
7037 (synopsis "Minitest/RSpec parallel test runner for CI environments")
7038 (description "The test-queue module is a parallel test runner,
7039 built using a centralized queue to ensure optimal distribution of
7040 tests between workers. It is specifically optimized for Continuous
7041 Integration (CI) environments: build statistics from each run are
7042 stored locally and used to sort the queue at the beginning of the next
7043 run.")
7044 (home-page "https://github.com/tmm1/test-queue")
7045 (license license:expat)))
7046
7047 (define-public ruby-rubocop
7048 (package
7049 (name "ruby-rubocop")
7050 (version "0.88.0")
7051 (source
7052 (origin
7053 (method git-fetch) ;no tests in distributed gem
7054 (uri (git-reference
7055 (url "https://github.com/rubocop-hq/rubocop.git")
7056 (commit (string-append "v" version))))
7057 (file-name (git-file-name name version))
7058 (sha256
7059 (base32
7060 "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
7061 (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
7062 (build-system ruby-build-system)
7063 (arguments
7064 '(#:test-target "default"
7065 #:phases
7066 (modify-phases %standard-phases
7067 (add-after 'unpack 'remove-problematic-tests
7068 ;; These tests depend on Rubocop extensions, which cannot be
7069 ;; included as they cause a dependency cycle with Rubocop itself.
7070 (lambda _
7071 (delete-file "spec/rubocop/config_loader_spec.rb")
7072 (substitute* "Gemfile"
7073 ((".*'rubocop-performance'.*") "")
7074 ((".*'rubocop-rspec'.*") ""))
7075 ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
7076 ;; errors.
7077 (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
7078 (("# (rubocop:(enable|disable) RSpec.*)" _ what)
7079 (string-append "# Disabled: " what)))
7080 #t))
7081 (add-after 'unpack 'disable-bundler
7082 (lambda _
7083 (substitute* "Rakefile"
7084 (("Bundler\\.setup.*") "nil\n"))
7085 #t))
7086 (replace 'replace-git-ls-files
7087 (lambda _
7088 (substitute* "rubocop.gemspec"
7089 (("`git ls-files(.*)`" _ files)
7090 (format #f "`find ~a -type f| sort`" files)))
7091 #t))
7092 (add-before 'check 'set-home
7093 (lambda _
7094 (setenv "HOME" (getcwd))
7095 #t))
7096 (add-before 'check 'make-adoc-files-writable
7097 (lambda _
7098 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
7099 "\\.adoc$")))
7100 (for-each make-file-writable adoc-files))
7101 #t)))))
7102 (native-inputs
7103 `(("ruby-bump" ,ruby-bump)
7104 ("ruby-pry" ,ruby-pry)
7105 ("ruby-rspec" ,ruby-rspec)
7106 ("ruby-test-queue" ,ruby-test-queue)
7107 ("ruby-webmock" ,ruby-webmock-2)
7108 ("ruby-yard" ,ruby-yard)))
7109 (propagated-inputs
7110 `(("ruby-parallel" ,ruby-parallel)
7111 ("ruby-parser" ,ruby-parser)
7112 ("ruby-rainbow" ,ruby-rainbow)
7113 ("ruby-regexp-parser" ,ruby-regexp-parser)
7114 ("ruby-rexml" ,ruby-rexml)
7115 ("ruby-rubocop-ast" ,ruby-rubocop-ast)
7116 ("ruby-progressbar" ,ruby-progressbar)
7117 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
7118 (synopsis "Ruby code style checking tool")
7119 (description
7120 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
7121 the community-driven Ruby Style Guide.")
7122 (home-page "https://github.com/rubocop-hq/rubocop")
7123 (license license:expat)))
7124
7125 (define-public ruby-contest
7126 (package
7127 (name "ruby-contest")
7128 (version "0.1.3")
7129 (source
7130 (origin
7131 (method url-fetch)
7132 (uri (rubygems-uri "contest" version))
7133 (sha256
7134 (base32
7135 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
7136 (build-system ruby-build-system)
7137 (synopsis "Write declarative tests using nested contexts")
7138 (description
7139 "Contest allows writing declarative @code{Test::Unit} tests using nested
7140 contexts without performance penalties.")
7141 (home-page "https://github.com/citrusbyte/contest")
7142 (license license:expat)))
7143
7144 (define-public ruby-creole
7145 (package
7146 (name "ruby-creole")
7147 (version "0.5.0")
7148 (source
7149 (origin
7150 (method url-fetch)
7151 (uri (rubygems-uri "creole" version))
7152 (sha256
7153 (base32
7154 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
7155 (build-system ruby-build-system)
7156 (native-inputs
7157 `(("ruby-bacon" ,ruby-bacon)))
7158 (synopsis "Creole markup language converter")
7159 (description
7160 "Creole is a lightweight markup language and this library for converting
7161 creole to @code{HTML}.")
7162 (home-page "https://github.com/minad/creole")
7163 (license license:ruby)))
7164
7165 (define-public ruby-docile
7166 (package
7167 (name "ruby-docile")
7168 (version "1.1.5")
7169 (source
7170 (origin
7171 (method url-fetch)
7172 (uri (rubygems-uri "docile" version))
7173 (sha256
7174 (base32
7175 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
7176 (build-system ruby-build-system)
7177 (arguments
7178 '(#:tests? #f)) ; needs github-markup, among others
7179 (synopsis "Ruby EDSL helper library")
7180 (description "Docile is a Ruby library that provides an interface for
7181 creating embedded domain specific languages (EDSLs) that manipulate existing
7182 Ruby classes.")
7183 (home-page "https://ms-ati.github.io/docile/")
7184 (license license:expat)))
7185
7186 (define-public ruby-middleware
7187 (package
7188 (name "ruby-middleware")
7189 (version "0.1.0")
7190 (source
7191 (origin
7192 (method url-fetch)
7193 (uri (rubygems-uri "middleware" version))
7194 (sha256
7195 (base32
7196 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
7197 (build-system ruby-build-system)
7198 (arguments '(#:tests? #f)) ;no test suite
7199 (synopsis "Implementation of a middleware abstraction for Ruby")
7200 (description "Middleware is a generalized implementation of a middleware
7201 abstraction for Ruby.")
7202 (home-page "https://github.com/mitchellh/middleware")
7203 (license license:expat)))
7204
7205 (define-public ruby-benchmark-ips
7206 (package
7207 (name "ruby-benchmark-ips")
7208 (version "2.8.2")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (rubygems-uri "benchmark-ips" version))
7213 (sha256
7214 (base32
7215 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
7216 (build-system ruby-build-system)
7217 (native-inputs
7218 `(("ruby-hoe" ,ruby-hoe)))
7219 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
7220 (description "Benchmark-ips enhances the Ruby Benchmark module with the
7221 iterations per second count. For short snippets of code, it can automatically
7222 figure out how many times to run the code to get interesting data.")
7223 (home-page "https://github.com/evanphx/benchmark-ips")
7224 (license license:expat)))
7225
7226 (define-public ruby-ffi-rzmq-core
7227 (package
7228 (name "ruby-ffi-rzmq-core")
7229 (version "1.0.7")
7230 (source
7231 (origin
7232 (method url-fetch)
7233 (uri (rubygems-uri "ffi-rzmq-core" version))
7234 (sha256
7235 (base32
7236 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
7237 (build-system ruby-build-system)
7238 (arguments
7239 `(#:phases
7240 (modify-phases %standard-phases
7241 (add-after 'unpack 'patch-libzmq-search-path
7242 (lambda* (#:key inputs #:allow-other-keys)
7243 (let ((zeromq (assoc-ref inputs "zeromq")))
7244 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
7245 (("/usr/local/lib")
7246 (string-append zeromq "/lib")))
7247 #t)))
7248 (replace 'check
7249 (lambda _
7250 (invoke "rspec"))))))
7251 (native-inputs
7252 `(("ruby-rspec" ,ruby-rspec)))
7253 (inputs
7254 `(("zeromq" ,zeromq)))
7255 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7256 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
7257 (description "This library only provides the FFI wrapper for the ZeroMQ
7258 networking library. It can be used to implement a Ruby API for the ZeroMQ
7259 library.")
7260 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
7261 (license license:expat)))
7262
7263 (define-public ruby-ffi-rzmq
7264 (package
7265 (name "ruby-ffi-rzmq")
7266 (version "2.0.7")
7267 (source
7268 (origin
7269 (method url-fetch)
7270 (uri (rubygems-uri "ffi-rzmq" version))
7271 (sha256
7272 (base32
7273 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
7274 (build-system ruby-build-system)
7275 (arguments '(#:tests? #t
7276 #:phases (modify-phases %standard-phases
7277 (replace 'check
7278 (lambda _
7279 (invoke "rspec"))))))
7280 (native-inputs
7281 `(("ruby-rspec" ,ruby-rspec)))
7282 (propagated-inputs
7283 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
7284 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
7285 (description "This library provides a high-level API that wraps the ZeroMQ
7286 networking library using the Ruby foreign function interface (FFI). It is a
7287 pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
7288 for FFI.")
7289 (home-page "https://github.com/chuckremes/ffi-rzmq")
7290 (license license:expat)))
7291
7292 (define-public ruby-sawyer
7293 (package
7294 (name "ruby-sawyer")
7295 (version "0.8.2")
7296 (source
7297 (origin
7298 (method url-fetch)
7299 (uri (rubygems-uri "sawyer" version))
7300 (sha256
7301 (base32
7302 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
7303 (build-system ruby-build-system)
7304 (propagated-inputs
7305 `(("ruby-addressable" ,ruby-addressable)
7306 ("ruby-faraday" ,ruby-faraday)))
7307 (synopsis "Experimental hypermedia agent for Ruby")
7308 (description "Sawyer is an experimental hypermedia agent for Ruby built on
7309 top of Faraday.")
7310 (home-page "https://github.com/lostisland/sawyer")
7311 (license license:expat)))
7312
7313 (define-public ruby-octokit
7314 (package
7315 (name "ruby-octokit")
7316 (version "4.18.0")
7317 (source
7318 (origin
7319 (method url-fetch)
7320 (uri (rubygems-uri "octokit" version))
7321 (sha256
7322 (base32
7323 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
7324 (build-system ruby-build-system)
7325 (arguments '(#:tests? #f)) ;no test suite in the gem release
7326 (propagated-inputs
7327 `(("ruby-faraday" ,ruby-faraday)
7328 ("ruby-sawyer" ,ruby-sawyer)))
7329 (synopsis "Ruby toolkit for the GitHub API")
7330 (description "Octokit wraps the GitHub API in a flat API client that
7331 follows Ruby conventions and requires little knowledge of REST.")
7332 (home-page "https://github.com/octokit/octokit.rb")
7333 (license license:expat)))
7334
7335 (define-public ruby-chandler
7336 (package
7337 (name "ruby-chandler")
7338 (version "0.9.0")
7339 (source
7340 (origin
7341 (method url-fetch)
7342 (uri (rubygems-uri "chandler" version))
7343 (sha256
7344 (base32
7345 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
7346 (build-system ruby-build-system)
7347 (native-inputs
7348 `(("ruby-rubocop" ,ruby-rubocop)))
7349 (propagated-inputs
7350 `(("ruby-netrc" ,ruby-netrc)
7351 ("ruby-octokit" ,ruby-octokit)))
7352 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
7353 (description "Chandler syncs a project's CHANGELOG file entries to
7354 GitHub's release notes to remove the need of manually entering release
7355 notes.")
7356 (home-page "https://github.com/mattbrictson/chandler")
7357 (license license:expat)))
7358
7359 (define-public ruby-pry-byebug
7360 (package
7361 (name "ruby-pry-byebug")
7362 (version "3.9.0")
7363 (source
7364 (origin
7365 (method git-fetch)
7366 (uri (git-reference
7367 (url "https://github.com/deivid-rodriguez/pry-byebug")
7368 (commit (string-append "v" version))))
7369 (file-name (git-file-name name version))
7370 (sha256
7371 (base32
7372 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7373 (build-system ruby-build-system)
7374 (arguments
7375 `(#:phases (modify-phases %standard-phases
7376 (add-before 'check 'set-home
7377 (lambda _
7378 (setenv "HOME" (getcwd))
7379 #t)))))
7380 (native-inputs
7381 `(("ruby-chandler" ,ruby-chandler)
7382 ("ruby-rubocop" ,ruby-rubocop)
7383 ("ruby-simplecov" ,ruby-simplecov)))
7384 (propagated-inputs
7385 `(("ruby-byebug" ,ruby-byebug-11)
7386 ("ruby-pry" ,ruby-pry)))
7387 (synopsis "Step-by-step debugging and stack navigation in Pry")
7388 (description "This package adds step-by-step debugging and stack
7389 navigation capabilities to @code{pry}, using @code{byebug}.")
7390 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7391 (license license:expat)))
7392
7393 (define-public ruby-binding-of-caller
7394 (package
7395 (name "ruby-binding-of-caller")
7396 (version "0.8.0")
7397 (source
7398 (origin
7399 (method url-fetch)
7400 (uri (rubygems-uri "binding_of_caller" version))
7401 (sha256
7402 (base32
7403 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7404 (build-system ruby-build-system)
7405 ;; Attempting to run the test suite fails with a rake deprecation error
7406 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7407 (arguments '(#:tests? #f))
7408 (propagated-inputs
7409 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
7410 (synopsis "Retrieve the binding of a method's caller")
7411 (description "The @code{binding_of_caller} module provides the
7412 @code{Binding#of_caller} method. It allows accessing bindings from upper
7413 frames in the call stack and can evaluate code in that context.")
7414 (home-page "https://github.com/banister/binding_of_caller")
7415 (license license:expat)))
7416
7417 (define-public ruby-pry-stack-explorer
7418 (package
7419 (name "ruby-pry-stack-explorer")
7420 (version "0.5.1")
7421 (source
7422 (origin
7423 (method url-fetch)
7424 (uri (rubygems-uri "pry-stack_explorer" version))
7425 (sha256
7426 (base32
7427 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7428 (build-system ruby-build-system)
7429 (arguments '(#:tests? #f)) ;no test suite in gem release
7430 (propagated-inputs
7431 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
7432 ("ruby-pry" ,ruby-pry)))
7433 (synopsis "Call-stack navigation plugin for the Pry REPL")
7434 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7435 add support to navigate the call-stack.")
7436 (home-page "https://github.com/pry/pry-stack_explorer")
7437 (license license:expat)))
7438
7439 (define-public ruby-varint
7440 (package
7441 (name "ruby-varint")
7442 (version "0.1.1")
7443 (source
7444 (origin
7445 (method url-fetch)
7446 (uri (rubygems-uri "varint" version))
7447 (sha256
7448 (base32
7449 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7450 (build-system ruby-build-system)
7451 (arguments '(#:tests? #f)) ;no test suite
7452 (synopsis "Variable length integers (varint) C extension for Ruby")
7453 (description "This package provides a small C extension to speed up
7454 variable length integers (varint) in Ruby Protocol Buffers.")
7455 (home-page "https://github.com/liquidm/varint")
7456 (license license:bsd-3)))
7457
7458 (define-public ruby-ruby-prof
7459 (package
7460 (name "ruby-ruby-prof")
7461 (version "1.4.1")
7462 (source
7463 (origin
7464 (method url-fetch)
7465 (uri (rubygems-uri "ruby-prof" version))
7466 (sha256
7467 (base32
7468 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
7469 (build-system ruby-build-system)
7470 (arguments
7471 `(#:phases
7472 (modify-phases %standard-phases
7473 (add-after 'unpack 'patch-rakefile
7474 ;; This fixes the following error: "NameError: uninitialized
7475 ;; constant Bundler::GemHelper" (see:
7476 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7477 (lambda _
7478 (substitute* "Rakefile"
7479 ((".*require \"bundler/setup\".*" all)
7480 (string-append all " require 'bundler/gem_tasks'\n")))
7481 #t))
7482 ;; The LineNumbersTest test fails non-deterministically (see:
7483 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7484 (add-after 'extract-gemspec 'delete-flaky-test
7485 (lambda _
7486 (delete-file "test/line_number_test.rb")
7487 (substitute* "ruby-prof.gemspec"
7488 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7489 #t))
7490 (add-before 'check 'compile
7491 (lambda _
7492 (invoke "rake" "compile"))))))
7493 (native-inputs
7494 `(("bundler" ,bundler)
7495 ("ruby-minitest" ,ruby-minitest)
7496 ("ruby-rake-compiler" ,ruby-rake-compiler)
7497 ("ruby-rdoc" ,ruby-rdoc)))
7498 (synopsis "Fast code profiler for Ruby")
7499 (description "RubyProf is a fast code profiler for Ruby. Its features
7500 include:
7501 @table @asis
7502 @item Speed
7503 Being a C extension, it is many times faster than the standard Ruby profiler.
7504 @item Measurement Modes
7505 It can measure program wall time, process time, object allocations and memory
7506 usage.
7507 @item Reports
7508 A variety of text and cross-referenced HTML reports can be generated.
7509 @item Threads
7510 Profiling multiple threads simultaneously is supported.
7511 @end table")
7512 (home-page "https://github.com/ruby-prof/ruby-prof")
7513 (license license:bsd-2)))
7514
7515 (define-public ruby-cucumber-messages
7516 (package
7517 (name "ruby-cucumber-messages")
7518 (version "12.2.0")
7519 (source (origin
7520 (method git-fetch)
7521 (uri (git-reference
7522 (url "https://github.com/cucumber/messages-ruby")
7523 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7524 (file-name (git-file-name name version))
7525 (sha256
7526 (base32
7527 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7528 (build-system ruby-build-system)
7529 (arguments
7530 `(#:phases (modify-phases %standard-phases
7531 (add-after 'unpack 'patch-protobuf.rb
7532 (lambda _
7533 (substitute* "rake/protobuf.rb"
7534 (("load 'protobuf/tasks/compile.rake'")
7535 "require 'protobuf/tasks'"))
7536 #t))
7537 (add-before 'build 'compile
7538 (lambda _
7539 (substitute* "Makefile"
7540 (("bundle exec ") "")
7541 (("include default.mk.*" all)
7542 (string-append "#" all)))
7543 (invoke "make")))
7544 (replace 'check
7545 (lambda _
7546 (invoke "rspec"))))))
7547 (propagated-inputs
7548 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7549 (native-inputs
7550 `(("ruby-rspec" ,ruby-rspec)))
7551 (home-page "https://github.com/cucumber/messages-ruby")
7552 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7553 (description "Cucumber Messages for Ruby is a library which allows
7554 serialization and deserialization of the protocol buffer messages used in
7555 Cucumber.")
7556 (license license:expat)))
7557
7558 (define-public ruby-gherkin
7559 (package
7560 (name "ruby-gherkin")
7561 (version "14.0.1")
7562 (source (origin
7563 (method git-fetch)
7564 (uri (git-reference
7565 (url "https://github.com/cucumber/gherkin-ruby")
7566 (commit (string-append "v" version))))
7567 (file-name (git-file-name name version))
7568 (sha256
7569 (base32
7570 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
7571 (build-system ruby-build-system)
7572 (native-inputs
7573 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7574 ("ruby-rspec" ,ruby-rspec)))
7575 (arguments
7576 `(#:test-target "spec"))
7577 (synopsis "Gherkin parser for Ruby")
7578 (description "Gherkin is a parser and compiler for the Gherkin language.
7579 It is intended be used by all Cucumber implementations to parse
7580 @file{.feature} files.")
7581 (home-page "https://github.com/cucumber/gherkin-ruby")
7582 (license license:expat)))
7583
7584 (define-public ruby-gherkin-ruby
7585 (package
7586 (name "ruby-gherkin-ruby")
7587 (version "0.3.2")
7588 (home-page "https://github.com/codegram/gherkin-ruby")
7589 (source (origin
7590 (method url-fetch)
7591 (uri (rubygems-uri "gherkin-ruby" version))
7592 (sha256
7593 (base32
7594 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7595 (build-system ruby-build-system)
7596 (synopsis "Pure Ruby Gherkin parser")
7597 (description
7598 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7599 200 lines of code.")
7600 ;; XXX: No license information anywhere but Readme.md.
7601 (license license:expat)))
7602
7603 (define-public ruby-aruba
7604 (package
7605 (name "ruby-aruba")
7606 (version "0.14.14")
7607 (source
7608 (origin
7609 (method url-fetch)
7610 (uri (rubygems-uri "aruba" version))
7611 (sha256
7612 (base32
7613 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
7614 (build-system ruby-build-system)
7615 (arguments
7616 '(#:test-target "spec"
7617 #:phases
7618 (modify-phases %standard-phases
7619 (add-after 'unpack 'patch
7620 (lambda _
7621 (substitute* "spec/aruba/api_spec.rb"
7622 ;; This resolves some errors in the specs
7623 ;;
7624 ;; undefined method `parse' for Time:Class
7625 (("require 'spec_helper'")
7626 "require 'spec_helper'\nrequire 'time'"))
7627 ;; Avoid shebang issues in this spec file
7628 (substitute* "spec/aruba/matchers/command_spec.rb"
7629 (("/usr/bin/env bash")
7630 (which "bash")))
7631 #t))
7632 (add-before 'check 'remove-unnecessary-dependencies
7633 (lambda _
7634 (substitute* "Gemfile"
7635 ((".*byebug.*") "\n")
7636 ((".*pry.*") "\n")
7637 ((".*yaml.*") "\n")
7638 ((".*bcat.*") "\n")
7639 ((".*kramdown.*") "\n")
7640 ((".*rubocop.*") "\n")
7641 ((".*cucumber-pro.*") "\n")
7642 ((".*cucumber.*") "\n")
7643 ((".*license_finder.*") "\n")
7644 ((".*rake.*") "gem 'rake'\n")
7645 ((".*relish.*") "\n"))
7646 (substitute* "aruba.gemspec"
7647 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7648 "spec.add_runtime_dependency 'cucumber'"))
7649 #t))
7650 (add-before 'check 'set-home
7651 (lambda _ (setenv "HOME" "/tmp") #t)))))
7652 (native-inputs
7653 `(("bundler" ,bundler)
7654 ("ruby-rspec" ,ruby-rspec)
7655 ("ruby-fuubar" ,ruby-fuubar)
7656 ("ruby-simplecov" ,ruby-simplecov)))
7657 (propagated-inputs
7658 `(("ruby-childprocess" ,ruby-childprocess)
7659 ("ruby-contracts" ,ruby-contracts)
7660 ("ruby-cucumber" ,ruby-cucumber)
7661 ("ruby-ffi" ,ruby-ffi)
7662 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
7663 ("ruby-thor" ,ruby-thor)
7664 ("ruby-yard" ,ruby-yard)))
7665 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7666 (description
7667 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7668 command-line applications. It supports applications written in any
7669 language.")
7670 (home-page "https://github.com/cucumber/aruba")
7671 (license license:expat)))
7672
7673 ;; A version of ruby-aruba without tests run so that circular dependencies can
7674 ;; be avoided.
7675 (define ruby-aruba-without-tests
7676 (package
7677 (inherit ruby-aruba)
7678 (arguments '(#:tests? #f))
7679 (propagated-inputs
7680 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7681 ,@(alist-delete "ruby-cucumber"
7682 (package-propagated-inputs ruby-aruba))))
7683 (native-inputs '())))
7684
7685 (define-public ruby-sys-uname
7686 (package
7687 (name "ruby-sys-uname")
7688 (version "1.2.1")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (rubygems-uri "sys-uname" version))
7693 (sha256
7694 (base32
7695 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7696 (build-system ruby-build-system)
7697 (arguments
7698 `(#:test-target "spec"))
7699 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7700 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
7701 (synopsis "Ruby interface for gathering system information")
7702 (description "The sys-uname library provides an interface for gathering
7703 information about your current platform. It allows retrieving information
7704 such as the OS name, OS version, system name, etc.")
7705 (home-page "https://github.com/djberg96/sys-uname")
7706 (license license:asl2.0)))
7707
7708 (define-public ruby-cucumber-create-meta
7709 (package
7710 (name "ruby-cucumber-create-meta")
7711 (version "1.0.0")
7712 (source
7713 (origin
7714 (method url-fetch)
7715 (uri (rubygems-uri "cucumber-create-meta" version))
7716 (sha256
7717 (base32
7718 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7719 (build-system ruby-build-system)
7720 (arguments
7721 `(#:phases (modify-phases %standard-phases
7722 (add-after 'extract-gemspec 'relax-version-requirements
7723 (lambda _
7724 (substitute* ".gemspec"
7725 ((" 12\\.2")
7726 " 12.1"))
7727 #t))
7728 (replace 'check
7729 (lambda _
7730 (invoke "rspec"))))))
7731 (native-inputs
7732 `(("ruby-rspec" ,ruby-rspec)))
7733 (propagated-inputs
7734 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7735 ("ruby-sys-uname" ,ruby-sys-uname)))
7736 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7737 (description "The @code{createMeta} utility function allows generating
7738 system-specific @code{Meta} messages for Cucumber Ruby.")
7739 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7740 (license license:expat)))
7741
7742 (define-public ruby-cucumber-html-formatter
7743 (package
7744 (name "ruby-cucumber-html-formatter")
7745 (version "7.0.0")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (rubygems-uri "cucumber-html-formatter" version))
7750 (sha256
7751 (base32
7752 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7753 (build-system ruby-build-system)
7754 (arguments
7755 `(#:phases (modify-phases %standard-phases
7756 (replace 'check
7757 (lambda _
7758 (invoke "rspec"))))))
7759 (native-inputs
7760 `(("ruby-rspec" ,ruby-rspec)))
7761 (propagated-inputs
7762 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7763 (synopsis "HTML formatter for Cucumber")
7764 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7765 runs. It is built on top of cucumber-react and works with any Cucumber
7766 implementation with a protocol buffer formatter that outputs Cucumber
7767 messages.")
7768 (home-page "https://github.com/cucumber/cucumber/tree/\
7769 master/html-formatter/ruby")
7770 (license license:expat)))
7771
7772 (define-public ruby-cucumber
7773 (package
7774 (name "ruby-cucumber")
7775 (version "4.1.0")
7776 (source
7777 (origin
7778 (method git-fetch)
7779 (uri (git-reference
7780 (url "https://github.com/cucumber/cucumber-ruby")
7781 (commit (string-append "v" version))))
7782 (file-name (git-file-name name version))
7783 (sha256
7784 (base32
7785 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
7786 (build-system ruby-build-system)
7787 (arguments
7788 '(#:test-target "default"
7789 #:phases
7790 (modify-phases %standard-phases
7791 (add-after 'unpack 'disable-rubocop
7792 ;; Rubocop lint check fails with our more recent version.
7793 (lambda _
7794 (substitute* "Rakefile"
7795 (("spec cucumber rubocop")
7796 "spec cucumber"))
7797 #t))
7798 (add-after 'extract-gemspec 'strip-version-requirements
7799 (lambda _
7800 (delete-file "Gemfile") ;do not use Bundler
7801 (substitute* "cucumber.gemspec"
7802 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7803 (string-append stripped "\n")))
7804 #t))
7805 (add-before 'check 'set-home
7806 (lambda _
7807 (setenv "HOME" (getcwd))
7808 #t)))))
7809 (propagated-inputs
7810 `(("ruby-builder" ,ruby-builder)
7811 ("ruby-cucumber-core" ,ruby-cucumber-core)
7812 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7813 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7814 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
7815 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
7816 ("ruby-diff-lcs" ,ruby-diff-lcs)
7817 ("ruby-gherkin" ,ruby-gherkin)
7818 ("ruby-multi-json" ,ruby-multi-json)
7819 ("ruby-multi-test" ,ruby-multi-test)))
7820 (native-inputs
7821 `(;; Use a untested version of aruba, to avoid a circular dependency, as
7822 ;; ruby-aruba depends on ruby-cucumber.
7823 ("ruby-aruba" ,ruby-aruba-without-tests)
7824 ("ruby-rspec" ,ruby-rspec)
7825 ("ruby-pry" ,ruby-pry)
7826 ("ruby-nokogiri" ,ruby-nokogiri)
7827 ("ruby-rubocop" ,ruby-rubocop)))
7828 (synopsis "Describe automated tests in plain language")
7829 (description "Cucumber is a tool for running automated tests written in
7830 plain language. It's designed to support a Behaviour Driven Development (BDD)
7831 software development workflow.")
7832 (home-page "https://cucumber.io/")
7833 (license license:expat)))
7834
7835 (define ruby-cucumber-without-tests
7836 (package (inherit ruby-cucumber)
7837 (arguments
7838 '(#:tests? #f))
7839 (native-inputs
7840 '())))
7841
7842 (define-public ruby-coveralls
7843 (package
7844 (name "ruby-coveralls")
7845 (version "0.8.23")
7846 (source
7847 (origin
7848 (method url-fetch)
7849 (uri (rubygems-uri "coveralls" version))
7850 (sha256
7851 (base32
7852 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7853 (build-system ruby-build-system)
7854 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
7855 ;; because of its nonfree, Hippocratic-derived license.
7856 (arguments
7857 `(#:tests? #f
7858 #:phases (modify-phases %standard-phases
7859 (add-after 'extract-gemspec 'strip-version-requirements
7860 ;; Keeping strict version requirements can cause problems
7861 ;; to users of the library, such as: Gem::ConflictError:
7862 ;; Unable to activate coveralls-0.8.23, because
7863 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
7864 (lambda _
7865 (substitute* "coveralls-ruby.gemspec"
7866 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
7867 (string-append stripped ")\n")))
7868 #t)))))
7869 (propagated-inputs
7870 `(("ruby-json" ,ruby-json)
7871 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
7872 ("ruby-thor" ,ruby-thor)
7873 ("ruby-tins" ,ruby-tins)))
7874 (synopsis "Ruby implementation of the Coveralls API")
7875 (description "This package provides a Ruby implementation of the Coveralls
7876 API.")
7877 (home-page "https://coveralls.io")
7878 (license license:expat)))
7879
7880 (define-public ruby-unindent
7881 (package
7882 (name "ruby-unindent")
7883 (version "1.0")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (rubygems-uri "unindent" version))
7888 (sha256
7889 (base32
7890 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
7891 (build-system ruby-build-system)
7892 (synopsis "Ruby method to unindent strings")
7893 (description "This module provides a @code{String#unindent} Ruby method to
7894 unindent strings, which can be useful to unindent multiline strings embedded
7895 in already-indented code.")
7896 (home-page "https://github.com/mynyml/unindent")
7897 (license license:expat)))
7898
7899 (define-public ruby-cucumber-core
7900 (package
7901 (name "ruby-cucumber-core")
7902 (version "7.1.0")
7903 (source
7904 (origin
7905 (method git-fetch)
7906 (uri (git-reference
7907 (url "https://github.com/cucumber/cucumber-ruby-core")
7908 (commit (string-append "v" version))))
7909 (file-name (git-file-name name version))
7910 (sha256
7911 (base32
7912 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
7913 (build-system ruby-build-system)
7914 (arguments
7915 `(#:test-target "spec"
7916 #:phases
7917 (modify-phases %standard-phases
7918 (add-after 'extract-gemspec 'relax-version-requirements
7919 (lambda _
7920 (substitute* "cucumber-core.gemspec"
7921 (("'cucumber-tag-expressions',.*")
7922 "'cucumber-tag-expressions', '>=2.0.0'\n"))
7923 #t)))))
7924 (native-inputs
7925 `(("ruby-rspec" ,ruby-rspec)
7926 ("ruby-coveralls" ,ruby-coveralls)
7927 ("ruby-rubocop" ,ruby-rubocop)
7928 ("ruby-simplecov" ,ruby-simplecov)
7929 ("ruby-unindent" ,ruby-unindent)))
7930 (propagated-inputs
7931 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7932 ("ruby-gherkin" ,ruby-gherkin)
7933 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
7934 (synopsis "Core library for the Cucumber BDD app")
7935 (description "Cucumber is a tool for running automated tests
7936 written in plain language. Because they're written in plain language,
7937 they can be read by anyone on your team. Because they can be read by
7938 anyone, you can use them to help improve communication, collaboration
7939 and trust on your team.")
7940 (home-page "https://cucumber.io/")
7941 (license license:expat)))
7942
7943 (define-public ruby-cucumber-expressions
7944 (package
7945 (name "ruby-cucumber-expressions")
7946 (version "10.2.0")
7947 (source
7948 (origin
7949 (method git-fetch)
7950 (uri (git-reference
7951 (url "https://github.com/cucumber/cucumber-expressions-ruby")
7952 (commit (string-append "v" version))))
7953 (file-name (git-file-name name version))
7954 (sha256
7955 (base32
7956 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
7957 (build-system ruby-build-system)
7958 (arguments
7959 '(#:test-target "spec"))
7960 (native-inputs
7961 `(("ruby-rspec" ,ruby-rspec)
7962 ("ruby-simplecov" ,ruby-simplecov)))
7963 (synopsis "Simpler alternative to Regular Expressions")
7964 (description "Cucumber Expressions offer similar functionality to Regular
7965 Expressions, with a syntax that is easier to read and write. Cucumber
7966 Expressions are extensible with parameter types.")
7967 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
7968 (license license:expat)))
7969
7970 (define-public ruby-cucumber-wire
7971 (package
7972 (name "ruby-cucumber-wire")
7973 (version "3.1.0")
7974 (source
7975 (origin
7976 (method url-fetch)
7977 (uri (rubygems-uri "cucumber-wire" version))
7978 (sha256
7979 (base32
7980 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
7981 (build-system ruby-build-system)
7982 (arguments
7983 '(#:tests? #f ;tests use cucumber, causing a cycle
7984 #:phases
7985 (modify-phases %standard-phases
7986 (add-after 'extract-gemspec 'relax-version-requirements
7987 (lambda _
7988 (substitute* ".gemspec"
7989 ((" 10\\.1") " 10.2"))
7990 #t)))))
7991 (propagated-inputs
7992 `(("ruby-cucumber-core" ,ruby-cucumber-core)
7993 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
7994 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7995 (synopsis "Cucumber wire protocol plugin")
7996 (description "Cucumber's wire protocol allows step definitions to be
7997 implemented and invoked on any platform.")
7998 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
7999 (license license:expat)))
8000
8001 (define-public ruby-cucumber-tag-expressions
8002 (package
8003 (name "ruby-cucumber-tag-expressions")
8004 (version "3.0.0")
8005 (source
8006 (origin
8007 (method git-fetch)
8008 (uri (git-reference
8009 (url "https://github.com/cucumber/tag-expressions-ruby")
8010 (commit (string-append "v" version))))
8011 (file-name (git-file-name name version))
8012 (sha256
8013 (base32
8014 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
8015 (build-system ruby-build-system)
8016 (arguments
8017 `(#:test-target "spec"))
8018 (native-inputs
8019 `(("ruby-rspec" ,ruby-rspec)))
8020 (synopsis "Cucumber tag expressions for Ruby")
8021 (description "Cucumber tag expression parser for Ruby. A tag expression
8022 is an infix boolean expression used by Cucumber.")
8023 (home-page "https://github.com/cucumber/tag-expressions-ruby")
8024 (license license:expat)))
8025
8026 (define-public ruby-bindex
8027 (package
8028 (name "ruby-bindex")
8029 (version "0.5.0")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (rubygems-uri "bindex" version))
8034 (sha256
8035 (base32
8036 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
8037 (build-system ruby-build-system)
8038 (arguments
8039 '(#:test-target "default"))
8040 (native-inputs
8041 `(("bundler" ,bundler)
8042 ("ruby-rake-compiler" ,ruby-rake-compiler)))
8043 (synopsis "Provides access for bindings relating to Ruby exceptions")
8044 (description
8045 "@code{bindex} provides a way to access the bindings that relate to
8046 exceptions in Ruby, providing more information about the context in which the
8047 exception occurred.")
8048 (home-page "https://github.com/gsamokovarov/bindex")
8049 (license license:expat)))
8050
8051 (define-public ruby-bio-logger
8052 (package
8053 (name "ruby-bio-logger")
8054 (version "1.0.1")
8055 (source
8056 (origin
8057 (method url-fetch)
8058 (uri (rubygems-uri "bio-logger" version))
8059 (sha256
8060 (base32
8061 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
8062 (build-system ruby-build-system)
8063 (arguments
8064 `(#:tests? #f)) ; rake errors, missing shoulda
8065 (propagated-inputs
8066 `(("ruby-log4r" ,ruby-log4r)))
8067 (synopsis "Log4r wrapper for Ruby")
8068 (description "Bio-logger is a wrapper around Log4r adding extra logging
8069 features such as filtering and fine grained logging.")
8070 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
8071 (license license:expat)))
8072
8073 (define-public ruby-yajl-ruby
8074 (package
8075 (name "ruby-yajl-ruby")
8076 (version "1.4.1")
8077 (source
8078 (origin
8079 (method url-fetch)
8080 (uri (rubygems-uri "yajl-ruby" version))
8081 (sha256
8082 (base32
8083 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
8084 (build-system ruby-build-system)
8085 (arguments
8086 '(#:test-target "spec"
8087 #:phases
8088 (modify-phases %standard-phases
8089 (add-before 'check 'patch-test-to-update-load-path
8090 (lambda _
8091 (substitute* "spec/parsing/large_number_spec.rb"
8092 (("require \"yajl\"")
8093 "$LOAD_PATH << 'lib'; require 'yajl'"))
8094 #t)))))
8095 (native-inputs
8096 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8097 ("ruby-rspec" ,ruby-rspec)))
8098 (synopsis "Streaming JSON parsing and encoding library for Ruby")
8099 (description
8100 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
8101 is compatible with the JSON gem, so yajl-ruby can act as a drop in
8102 replacement.
8103
8104 A modified copy of yajl is used, and included in the package.")
8105 (home-page "https://github.com/brianmario/yajl-ruby")
8106 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
8107 license:bsd-3)))) ; Included, modified copy of yajl
8108
8109 (define-public ruby-yard
8110 (package
8111 (name "ruby-yard")
8112 (version "0.9.25")
8113 (source
8114 (origin
8115 (method git-fetch)
8116 ;; Tests do not pass if we build from the distributed gem.
8117 (uri (git-reference
8118 (url "https://github.com/lsegal/yard")
8119 (commit (string-append "v" version))))
8120 (file-name (git-file-name name version))
8121 (sha256
8122 (base32
8123 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
8124 (build-system ruby-build-system)
8125 (arguments
8126 ;; Note: Tests are willfully disabled to alleviate dependency cycle
8127 ;; problems.
8128 `(#:tests? #f
8129 #:phases (modify-phases %standard-phases
8130 (add-after 'unpack 'do-not-set-date-in-gemspec
8131 ;; Fix a reproducibility issue (see:
8132 ;; https://github.com/lsegal/yard/issues/1343).
8133 (lambda _
8134 (substitute* "yard.gemspec"
8135 ((".*s\\.date.*") ""))
8136 #t)))))
8137 (synopsis "Documentation generation tool for Ruby")
8138 (description "YARD is a documentation generation tool for the Ruby
8139 programming language. It enables the user to generate consistent, usable
8140 documentation that can be exported to a number of formats very easily, and
8141 also supports extending for custom Ruby constructs such as custom class level
8142 definitions.")
8143 (home-page "https://yardoc.org")
8144 (license license:expat)))
8145
8146 (define-public ruby-yard-with-tests
8147 (package
8148 (inherit ruby-yard)
8149 (name "ruby-yard-with-tests")
8150 (arguments
8151 (substitute-keyword-arguments (package-arguments ruby-yard)
8152 ((#:tests? _ #t) #t)
8153 ((#:test-target _ "default") "default")
8154 ((#:phases phases '%standard-phases)
8155 `(modify-phases ,phases
8156 (add-before 'check 'prepare-for-tests
8157 (lambda* (#:key tests? #:allow-other-keys)
8158 (when tests?
8159 (substitute* "Rakefile"
8160 ((".*[Ss]amus.*") ""))
8161 ;; Delete the Gemfile to avoid errors relating to it.
8162 (delete-file "Gemfile")
8163 ;; $HOME needs to be set to somewhere writeable for tests to
8164 ;; run.
8165 (setenv "HOME" "/tmp"))
8166 #t))))))
8167 (native-inputs
8168 `(("ruby-rspec" ,ruby-rspec)
8169 ("ruby-rack" ,ruby-rack)
8170 ("ruby-redcloth" ,ruby-redcloth)
8171 ("ruby-asciidoc" ,ruby-asciidoctor)))))
8172
8173 (define-public ruby-spectroscope
8174 (package
8175 (name "ruby-spectroscope")
8176 (version "0.1.0")
8177 (source
8178 (origin
8179 (method url-fetch)
8180 (uri (rubygems-uri "spectroscope" version))
8181 (sha256
8182 (base32
8183 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
8184 (build-system ruby-build-system)
8185 (arguments
8186 `(#:phases
8187 (modify-phases %standard-phases
8188 (replace 'check
8189 (lambda _
8190 (with-output-to-file ".test"
8191 (lambda _
8192 (display
8193 "\
8194 require 'ae/should'
8195 require 'rspec'
8196
8197 include RSpec
8198
8199 Test.run :default do |run|
8200 run.files << 'spec/*_spec.rb'
8201 end")))
8202 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
8203 (native-inputs
8204 `(("ruby-ae" ,ruby-ae)
8205 ("ruby-rspec" ,ruby-rspec)))
8206 (propagated-inputs
8207 `(("ruby-rubytest" ,ruby-rubytest)))
8208 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
8209 (description "Spectroscope is a Behavior-Driven Development (BDD)
8210 framework built on RubyTest, designed to emulate RSpec in most respects. It
8211 is assertion framework independent so any number of assertion systems can be
8212 used, such as Assay or AE.")
8213 (home-page "http://rubyworks.github.com/spectroscope/")
8214 (license license:bsd-2)))
8215
8216 (define-public ruby-tomparse
8217 (package
8218 (name "ruby-tomparse")
8219 (version "0.4.2")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (rubygems-uri "tomparse" version))
8224 (sha256
8225 (base32
8226 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
8227 (build-system ruby-build-system)
8228 ;; TODO: Tests require citron and rulebow, not yet packaged.
8229 (arguments '(#:tests? #f))
8230 (synopsis "TomDoc parser for Ruby")
8231 (description "TomParse is a TomDoc parser for Ruby. It takes a code
8232 comment as input and parses it into a convenient object-oriented structure in
8233 accordance with the TomDoc standard. See
8234 @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
8235 TomDoc format.")
8236 (home-page "http://rubyworks.github.com/tomparse/")
8237 (license license:bsd-2)))
8238
8239 (define-public ruby-yard-tomdoc
8240 (package
8241 (name "ruby-yard-tomdoc")
8242 (version "0.7.1")
8243 (source
8244 (origin
8245 (method url-fetch)
8246 (uri (rubygems-uri "yard-tomdoc" version))
8247 (sha256
8248 (base32
8249 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
8250 (build-system ruby-build-system)
8251 (arguments
8252 `(#:phases (modify-phases %standard-phases
8253 (replace 'check
8254 (lambda _
8255 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8256 (native-inputs
8257 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8258 ("ruby-spectroscope" ,ruby-spectroscope)
8259 ("ruby-ae" ,ruby-ae)))
8260 (propagated-inputs
8261 `(("ruby-tomparse" ,ruby-tomparse)
8262 ("ruby-yard" ,ruby-yard)))
8263 (synopsis "TomDoc syntax for YARD")
8264 (description "This module adds support for the TomDoc documentation format
8265 to YARD, a documentation generation tool for Ruby.")
8266 (home-page "http://rubyworks.github.com/yard-tomdoc/")
8267 (license license:expat)))
8268
8269 (define-public ruby-clap
8270 (package
8271 (name "ruby-clap")
8272 (version "1.0.0")
8273 (source (origin
8274 (method url-fetch)
8275 (uri (rubygems-uri "clap" version))
8276 (sha256
8277 (base32
8278 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
8279 (build-system ruby-build-system)
8280 ;; Clap needs cutest for running tests, but cutest needs clap.
8281 (arguments `(#:tests? #f))
8282 (synopsis "Command line argument parsing for simple applications")
8283 (description
8284 "Clap provides command line argument parsing features. It covers the
8285 simple case of executing code based on the flags or parameters passed.")
8286 (home-page "https://github.com/djanowski/cutest")
8287 (license license:expat)))
8288
8289 (define-public ruby-cutest
8290 (package
8291 (name "ruby-cutest")
8292 (version "1.2.2")
8293 (source (origin
8294 (method url-fetch)
8295 (uri (rubygems-uri "cutest" version))
8296 (sha256
8297 (base32
8298 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
8299 (build-system ruby-build-system)
8300 (propagated-inputs
8301 `(("ruby-clap" ,ruby-clap)))
8302 (synopsis "Run tests in separate processes")
8303 (description
8304 "Cutest runs tests in separate processes to avoid shared state.")
8305 (home-page "https://github.com/djanowski/cutest")
8306 (license license:expat)))
8307
8308 (define-public ruby-pygmentize
8309 (package
8310 (name "ruby-pygmentize")
8311 (version "0.0.3")
8312 (source (origin
8313 (method url-fetch)
8314 (uri (rubygems-uri "pygmentize" version))
8315 (sha256
8316 (base32
8317 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
8318 (build-system ruby-build-system)
8319 (arguments
8320 `(#:phases
8321 (modify-phases %standard-phases
8322 (add-after 'unpack 'fix-pygmentize-path
8323 (lambda _
8324 (substitute* "lib/pygmentize.rb"
8325 (("\"/usr/bin/env python.*")
8326 (string-append "\"" (which "pygmentize") "\"\n")))
8327 #t))
8328 (add-after 'build 'do-not-use-vendor-directory
8329 (lambda _
8330 ;; Remove bundled pygments sources
8331 ;; FIXME: ruby-build-system does not support snippets.
8332 (delete-file-recursively "vendor")
8333 (substitute* "pygmentize.gemspec"
8334 (("\"vendor/\\*\\*/\\*\",") ""))
8335 #t)))))
8336 (inputs
8337 `(("pygments" ,python-pygments)))
8338 (native-inputs
8339 `(("ruby-cutest" ,ruby-cutest)
8340 ("ruby-nokogiri" ,ruby-nokogiri)))
8341 (synopsis "Thin Ruby wrapper around pygmentize")
8342 (description
8343 "Pygmentize provides a simple way to call pygmentize from within a Ruby
8344 application.")
8345 (home-page "https://github.com/djanowski/pygmentize")
8346 (license license:expat)))
8347
8348 (define-public ruby-eventmachine
8349 (package
8350 (name "ruby-eventmachine")
8351 (version "1.2.7")
8352 (source
8353 (origin
8354 (method url-fetch)
8355 (uri (rubygems-uri "eventmachine" version))
8356 (sha256
8357 (base32
8358 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
8359 (build-system ruby-build-system)
8360 (arguments
8361 '(#:tests? #f)) ; test suite tries to connect to google.com
8362 (native-inputs
8363 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
8364 (synopsis "Single-threaded network event framework for Ruby")
8365 (description
8366 "EventMachine implements a single-threaded engine for arbitrary network
8367 communications. EventMachine wraps all interactions with sockets, allowing
8368 programs to concentrate on the implementation of network protocols. It can be
8369 used to create both network servers and clients.")
8370 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8371 (home-page "https://github.com/eventmachine/eventmachine")
8372 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
8373
8374 (define-public ruby-ruby-engine
8375 (package
8376 (name "ruby-ruby-engine")
8377 (version "2.0.0")
8378 (source
8379 (origin
8380 (method url-fetch)
8381 (uri (rubygems-uri "ruby_engine" version))
8382 (sha256
8383 (base32
8384 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
8385 (build-system ruby-build-system)
8386 (arguments
8387 `(#:phases
8388 (modify-phases %standard-phases
8389 (add-after 'extract-gemspec 'clean-up
8390 (lambda _
8391 (delete-file "Gemfile.lock")
8392 (substitute* "ruby_engine.gemspec"
8393 ;; Remove unnecessary imports that would entail further
8394 ;; dependencies.
8395 ((".*<rdoc.*") "")
8396 ((".*<rubygems-tasks.*") "")
8397 ;; Remove extraneous .gem file
8398 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8399 (("\"Gemfile.lock\".freeze, ") "")
8400 ;; Soften rake dependency
8401 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
8402 "%q<rake>.freeze, [\">= 10.0\"]")
8403 ;; Soften the rspec dependency
8404 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
8405 "%q<rspec>.freeze, [\">= 2.4\"]"))
8406 (substitute* "Rakefile"
8407 (("require 'rubygems/tasks'") "")
8408 (("Gem::Tasks.new") ""))
8409 ;; Remove extraneous .gem file that otherwise gets installed.
8410 (delete-file-recursively "pkg")
8411 #t)))))
8412 (native-inputs
8413 `(("bundler" ,bundler)
8414 ("ruby-rake" ,ruby-rake)
8415 ("ruby-rspec" ,ruby-rspec)))
8416 (synopsis "Simplifies checking for Ruby implementation")
8417 (description
8418 "@code{ruby_engine} provides an RubyEngine class that can be used to
8419 check which implementation of Ruby is in use. It can provide the interpreter
8420 name and provides query methods such as @{RubyEngine.mri?}.")
8421 (home-page "https://github.com/janlelis/ruby_engine")
8422 (license license:expat)))
8423
8424 (define-public ruby-turn
8425 (package
8426 (name "ruby-turn")
8427 (version "0.9.7")
8428 (source
8429 (origin
8430 (method url-fetch)
8431 (uri (rubygems-uri "turn" version))
8432 (sha256
8433 (base32
8434 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8435 (build-system ruby-build-system)
8436 (arguments
8437 `(#:phases
8438 (modify-phases %standard-phases
8439 ;; Tests fail because turn changes its environment so can no longer
8440 ;; find test/unit. Instead simply test if the executable runs
8441 ;; without issue.
8442 (replace 'check
8443 (lambda _
8444 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8445 (propagated-inputs
8446 `(("ruby-ansi" ,ruby-ansi)
8447 ("ruby-minitest" ,ruby-minitest-4)))
8448 (synopsis "Alternate set of alternative runners for MiniTest")
8449 (description
8450 "TURN provides a set of alternative runners for MiniTest which are both
8451 colorful and informative. TURN displays each test on a separate line with
8452 failures being displayed immediately instead of at the end of the tests. Note
8453 that TURN is no longer being maintained.")
8454 (home-page "https://rubygems.org/gems/turn")
8455 (license license:expat)))
8456
8457 (define-public ruby-mimemagic
8458 (package
8459 (name "ruby-mimemagic")
8460 (version "0.3.3")
8461 (source
8462 (origin
8463 (method url-fetch)
8464 (uri (rubygems-uri "mimemagic" version))
8465 (sha256
8466 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8467 (build-system ruby-build-system)
8468 (arguments
8469 '(#:phases
8470 (modify-phases %standard-phases
8471 ;; This phase breaks the tests, as it patches some of the test data.
8472 (delete 'patch-source-shebangs))))
8473 (native-inputs
8474 `(("ruby-bacon" ,ruby-bacon)))
8475 (synopsis "Ruby library for MIME detection by extension or content")
8476 (description
8477 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8478 extension or content, using the freedesktop.org.xml shared-mime-info
8479 database.")
8480 (home-page "https://github.com/minad/mimemagic")
8481 (license license:expat)))
8482
8483 (define-public ruby-mime-types-data
8484 (package
8485 (name "ruby-mime-types-data")
8486 (version "3.2016.0521")
8487 (source
8488 (origin
8489 (method url-fetch)
8490 (uri (rubygems-uri "mime-types-data" version))
8491 (sha256
8492 (base32
8493 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
8494 (build-system ruby-build-system)
8495 (native-inputs
8496 `(("ruby-hoe" ,ruby-hoe)))
8497 (synopsis "Registry for information about MIME media type definitions")
8498 (description
8499 "@code{mime-types-data} provides a registry for information about
8500 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8501 be used with the Ruby mime-types library or other software to determine
8502 defined filename extensions for MIME types, or to use filename extensions to
8503 look up the likely MIME type definitions.")
8504 (home-page "https://github.com/mime-types/mime-types-data/")
8505 (license license:expat)))
8506
8507 (define-public ruby-mime-types
8508 (package
8509 (name "ruby-mime-types")
8510 (version "3.1")
8511 (source
8512 (origin
8513 (method url-fetch)
8514 (uri (rubygems-uri "mime-types" version))
8515 (sha256
8516 (base32
8517 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
8518 (build-system ruby-build-system)
8519 (propagated-inputs
8520 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
8521 (native-inputs
8522 `(("ruby-hoe" ,ruby-hoe)
8523 ("ruby-fivemat" ,ruby-fivemat)
8524 ("ruby-minitest-focus" ,ruby-minitest-focus)
8525 ("ruby-minitest-rg" ,ruby-minitest-rg)
8526 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
8527 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
8528 (synopsis "Library and registry for MIME content type definitions")
8529 (description "The mime-types library provides a library and registry for
8530 information about Multipurpose Internet Mail Extensions (MIME) content type
8531 definitions. It can be used to determine defined filename extensions for MIME
8532 types, or to use filename extensions to look up the likely MIME type
8533 definitions.")
8534 (home-page "https://github.com/mime-types/ruby-mime-types")
8535 (license license:expat)))
8536
8537 (define-public ruby-fivemat
8538 (package
8539 (name "ruby-fivemat")
8540 (version "1.3.7")
8541 (source
8542 (origin
8543 (method url-fetch)
8544 (uri (rubygems-uri "fivemat" version))
8545 (sha256
8546 (base32
8547 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
8548 (build-system ruby-build-system)
8549 (arguments
8550 `(#:tests? #f)) ; no tests
8551 (synopsis "Each test file given its own line of dots")
8552 (description
8553 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8554 its own line of dots during testing. It aims to provide test output that is
8555 neither too verbose nor too minimal.")
8556 (home-page "https://github.com/tpope/fivemat")
8557 (license license:expat)))
8558
8559 (define-public ruby-sqlite3
8560 (package
8561 (name "ruby-sqlite3")
8562 (version "1.4.2")
8563 (source
8564 (origin
8565 (method url-fetch)
8566 (uri (rubygems-uri "sqlite3" version))
8567 (sha256
8568 (base32
8569 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
8570 (build-system ruby-build-system)
8571 (arguments
8572 `(#:phases
8573 (modify-phases %standard-phases
8574 (add-before 'check 'add-gemtest-file
8575 ;; This file exists in the repository but is not distributed.
8576 (lambda _ (invoke "touch" ".gemtest"))))))
8577 (inputs
8578 `(("sqlite" ,sqlite)))
8579 (native-inputs
8580 `(("ruby-hoe" ,ruby-hoe)
8581 ("ruby-rake-compiler" ,ruby-rake-compiler)
8582 ("ruby-mini-portile" ,ruby-mini-portile)))
8583 (synopsis "Interface with SQLite3 databases")
8584 (description
8585 "This module allows Ruby programs to interface with the SQLite3 database
8586 engine.")
8587 (home-page
8588 "https://github.com/sparklemotion/sqlite3-ruby")
8589 (license license:bsd-3)))
8590
8591 (define-public ruby-shoulda-context
8592 (package
8593 (name "ruby-shoulda-context")
8594 (version "1.2.2")
8595 (source
8596 (origin
8597 (method url-fetch)
8598 (uri (rubygems-uri "shoulda-context" version))
8599 (sha256
8600 (base32
8601 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
8602 (build-system ruby-build-system)
8603 (arguments
8604 `(#:phases
8605 (modify-phases %standard-phases
8606 (replace 'check
8607 (lambda _
8608 ;; Do not run tests to avoid circular dependence with rails.
8609 ;; Instead just import the library to test.
8610 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
8611 (synopsis "Test::Unit context framework extracted from Shoulda")
8612 (description
8613 "@code{shoulda-context} is the context framework extracted from Shoulda.
8614 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8615 context, setup, and should blocks combine to produce natural test method
8616 names.")
8617 (home-page "https://github.com/thoughtbot/shoulda-context")
8618 (license license:expat)))
8619
8620 (define-public ruby-shoulda-matchers
8621 (package
8622 (name "ruby-shoulda-matchers")
8623 (version "3.1.2")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (rubygems-uri "shoulda-matchers" version))
8628 (sha256
8629 (base32
8630 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
8631 (build-system ruby-build-system)
8632 (arguments
8633 `(#:phases
8634 (modify-phases %standard-phases
8635 (replace 'check
8636 (lambda _
8637 ;; Do not run tests to avoid circular dependence with rails. Instead
8638 ;; just import the library to test.
8639 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
8640 (propagated-inputs
8641 `(("ruby-activesupport" ,ruby-activesupport)))
8642 (synopsis "Collection of testing matchers extracted from Shoulda")
8643 (description
8644 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8645 test common Rails functionality. These tests would otherwise be much longer,
8646 more complex, and error-prone.")
8647 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8648 (license license:expat)))
8649
8650 (define-public ruby-shoulda-matchers-2
8651 (package
8652 (inherit ruby-shoulda-matchers)
8653 (version "2.8.0")
8654 (source (origin
8655 (method url-fetch)
8656 (uri (rubygems-uri "shoulda-matchers" version))
8657 (sha256
8658 (base32
8659 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8660
8661 (define-public ruby-shoulda
8662 (package
8663 (name "ruby-shoulda")
8664 (version "3.5.0")
8665 (source
8666 (origin
8667 (method url-fetch)
8668 (uri (rubygems-uri "shoulda" version))
8669 (sha256
8670 (base32
8671 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8672 (build-system ruby-build-system)
8673 (arguments
8674 `(#:phases
8675 (modify-phases %standard-phases
8676 (replace 'check
8677 ;; Don't run tests to avoid circular dependence with rails. Instead
8678 ;; just import the library to test.
8679 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
8680 (propagated-inputs
8681 `(("ruby-shoulda-context" ,ruby-shoulda-context)
8682 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
8683 (synopsis "Context framework and matchers for testing")
8684 (description
8685 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8686 @code{shoulda-matchers} providing tools for writing tests.")
8687 (home-page "https://github.com/thoughtbot/shoulda")
8688 (license license:expat)))
8689
8690 (define-public ruby-unf
8691 (package
8692 (name "ruby-unf")
8693 (version "0.1.4")
8694 (source
8695 (origin
8696 (method url-fetch)
8697 (uri (rubygems-uri "unf" version))
8698 (sha256
8699 (base32
8700 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8701 (build-system ruby-build-system)
8702 (arguments
8703 `(#:phases
8704 (modify-phases %standard-phases
8705 (add-before 'check 'add-dependency-to-bundler
8706 (lambda _
8707 ;; test-unit is required but not provided by the bundler
8708 ;; environment. This is fixed in the upstream repository but fix
8709 ;; has not been released.
8710 (substitute* "Gemfile"
8711 (("^gemspec") "gem 'test-unit'\ngemspec"))
8712 #t)))))
8713 (propagated-inputs
8714 `(("ruby-unf-ext" ,ruby-unf-ext)))
8715 (native-inputs
8716 `(("ruby-shoulda" ,ruby-shoulda)
8717 ("bundler" ,bundler)
8718 ("ruby-test-unit" ,ruby-test-unit)))
8719 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8720 (description
8721 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8722 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8723 @code{java.text.Normalizer} on JRuby.")
8724 (home-page "https://github.com/knu/ruby-unf")
8725 (license license:bsd-2)))
8726
8727 (define-public ruby-warden
8728 (package
8729 (name "ruby-warden")
8730 (version "1.2.8")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (rubygems-uri "warden" version))
8735 (sha256
8736 (base32
8737 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8738 (build-system ruby-build-system)
8739 (arguments
8740 '(#:tests? #f)) ; No included tests
8741 (propagated-inputs
8742 `(("ruby-rack" ,ruby-rack)))
8743 (synopsis "Rack middleware providing authentication")
8744 (description
8745 "Warden is a Rack-based middleware that provides a mechanism for
8746 authentication in Ruby web applications.")
8747 (home-page "https://github.com/wardencommunity/warden")
8748 (license license:expat)))
8749
8750 (define-public ruby-warden-oauth2
8751 (package
8752 (name "ruby-warden-oauth2")
8753 (version "0.0.1")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (rubygems-uri "warden-oauth2" version))
8758 (sha256
8759 (base32
8760 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8761 (build-system ruby-build-system)
8762 (arguments
8763 '(#:test-target "spec"
8764 #:phases
8765 (modify-phases %standard-phases
8766 (add-after 'unpack 'remove-unnecessary-dependencies
8767 (lambda _
8768 (substitute* "Gemfile"
8769 ;; All of these gems relate to development, and are unnecessary
8770 ;; when running the tests
8771 (("gem 'guard-bundler'") "")
8772 (("gem 'guard'") "")
8773 (("gem 'guard-rspec'") "")
8774 (("gem 'rb-fsevent'") "")
8775 (("gem 'pry'") "")
8776 (("gem 'growl'") ""))
8777 #t))
8778 ;; The test suite doesn't work with rspec@2, and this is incompatible
8779 ;; with the current version of Rake, so invoke Rspec directly
8780 (replace 'check
8781 (lambda* (#:key tests? #:allow-other-keys)
8782 (when tests?
8783 (invoke "bundle" "exec" "rspec"))
8784 #t)))))
8785 (propagated-inputs
8786 `(("ruby-warden" ,ruby-warden)))
8787 (native-inputs
8788 `(("bundler" ,bundler)
8789 ("ruby-rspec" ,ruby-rspec-2)
8790 ("ruby-rack-test" ,ruby-rack-test)))
8791 (synopsis "OAuth 2.0 strategies for Warden")
8792 (description
8793 "This library extends Warden to support OAuth 2.0 authorized API
8794 requests.")
8795 (home-page "https://github.com/opperator/warden-oauth2")
8796 (license license:expat)))
8797
8798 (define-public ruby-webmock-2
8799 (package
8800 (name "ruby-webmock")
8801 (version "2.3.2")
8802 (source
8803 (origin
8804 (method url-fetch)
8805 (uri (rubygems-uri "webmock" version))
8806 (sha256
8807 (base32
8808 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8809 (build-system ruby-build-system)
8810 (native-inputs
8811 `(("bundler" ,bundler)
8812 ("ruby-rspec" ,ruby-rspec)))
8813 (propagated-inputs
8814 `(("ruby-addressable" ,ruby-addressable)
8815 ("ruby-crack" ,ruby-crack)
8816 ("ruby-hashdiff" ,ruby-hashdiff)))
8817 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8818 (description
8819 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8820 requests. This is useful when testing software.")
8821 (home-page "https://github.com/bblimke/webmock")
8822 (license license:expat)))
8823
8824 (define-public ruby-unicode-display-width
8825 (package
8826 (name "ruby-unicode-display-width")
8827 (version "1.6.0")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (rubygems-uri "unicode-display_width" version))
8832 (sha256
8833 (base32
8834 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
8835 (build-system ruby-build-system)
8836 (arguments
8837 '(;; Test data not included.
8838 #:tests? #f))
8839 (synopsis "Determine the monospace display width of Ruby strings")
8840 (description
8841 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8842 display width of strings in Ruby.")
8843 (home-page "https://github.com/janlelis/unicode-display_width")
8844 (license license:expat)))
8845
8846 ;; There is another gem called 'ruby-version' so we use an underscore in this
8847 ;; name
8848 (define-public ruby_version
8849 (package
8850 (name "ruby_version")
8851 (version "1.0.2")
8852 (source
8853 (origin
8854 (method url-fetch)
8855 (uri (rubygems-uri "ruby_version" version))
8856 (sha256
8857 (base32
8858 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
8859 (build-system ruby-build-system)
8860 (arguments
8861 `(#:phases
8862 (modify-phases %standard-phases
8863 (add-before 'check 'fix-dependencies
8864 (lambda _
8865 ;; Remove the Gemfile.lock, as we want to use Guix packages at
8866 ;; whatever versions.
8867 (delete-file "Gemfile.lock")
8868 ;; Remove the included gem files as they unnecessary.
8869 (delete-file-recursively "pkg/")
8870 ;; Accept any version of rake, rdoc and rspec
8871 (substitute* "ruby_version.gemspec"
8872 (("%q<rake.*") "%q<rake>)\n")
8873 (("%q<rdoc.*") "%q<rdoc>)\n")
8874 (("%q<rspec.*") "%q<rspec>)\n"))
8875 ;; Do not use bundler.
8876 (substitute* "Rakefile"
8877 (("Bundler\\.setup.*") "nil\n"))
8878 #t)))))
8879 (native-inputs
8880 `(("ruby-rdoc" ,ruby-rdoc)
8881 ("ruby-rspec" ,ruby-rspec)
8882 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
8883 (synopsis "Ruby library to help check the Ruby version")
8884 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
8885 checking for the right Ruby version in software.")
8886 (home-page "https://github.com/janlelis/ruby_version")
8887 (license license:expat)))
8888
8889 (define-public ruby-websocket-driver
8890 (package
8891 (name "ruby-websocket-driver")
8892 (version "0.7.1")
8893 (source
8894 (origin
8895 (method url-fetch)
8896 (uri (rubygems-uri "websocket-driver" version))
8897 (sha256
8898 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
8899 (build-system ruby-build-system)
8900 (arguments
8901 '(#:tests? #f)) ; no included tests
8902 (propagated-inputs
8903 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
8904 (synopsis "WebSocket protocol handler with pluggable I/O")
8905 (description
8906 "@code{websocket-driver} provides a complete implementation of the
8907 WebSocket protocols that can be hooked up to any TCP library")
8908 (home-page "https://github.com/faye/websocket-driver-ruby")
8909 (license license:expat)))
8910
8911 (define-public ruby-websocket-extensions
8912 (package
8913 (name "ruby-websocket-extensions")
8914 (version "0.1.3")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (rubygems-uri "websocket-extensions" version))
8919 (sha256
8920 (base32
8921 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
8922 (build-system ruby-build-system)
8923 (arguments
8924 '(;; No included tests
8925 #:tests? #f))
8926 (synopsis "Generic extension manager for WebSocket connections")
8927 (description
8928 "@code{websocket-extensions} provides a container for registering
8929 extension plugins.")
8930 (home-page "https://github.com/faye/websocket-extensions-ruby")
8931 (license license:expat)))
8932
8933 (define-public ruby-domain-name
8934 (package
8935 (name "ruby-domain-name")
8936 (version "0.5.20190701")
8937 (source
8938 (origin
8939 (method url-fetch)
8940 (uri (rubygems-uri "domain_name" version))
8941 (sha256
8942 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
8943 (build-system ruby-build-system)
8944 (arguments
8945 `(#:phases
8946 (modify-phases %standard-phases
8947 (add-before 'check 'fix-versions
8948 (lambda _
8949 ;; Fix NameError that appears to already be fixed upstream.
8950 (substitute* "Rakefile"
8951 (("DomainName::VERSION")
8952 "Bundler::GemHelper.gemspec.version"))
8953 ;; Loosen unnecessarily strict test-unit version specification.
8954 (substitute* "domain_name.gemspec"
8955 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
8956 #t)))))
8957 (propagated-inputs
8958 `(("ruby-unf" ,ruby-unf)))
8959 (native-inputs
8960 `(("ruby-shoulda" ,ruby-shoulda)
8961 ("bundler" ,bundler)
8962 ("ruby-test-unit" ,ruby-test-unit)))
8963 (synopsis "Domain name manipulation library")
8964 (description
8965 "@code{domain_name} is a Domain name manipulation library. It parses a
8966 domain name ready for extracting the registered domain and TLD (Top Level
8967 Domain). It can also be used for cookie domain validation based on the Public
8968 Suffix List.")
8969 (home-page "https://github.com/knu/ruby-domain_name")
8970 (license license:bsd-2)))
8971
8972 (define-public ruby-http-cookie
8973 (package
8974 (name "ruby-http-cookie")
8975 (version "1.0.3")
8976 (source
8977 (origin
8978 (method url-fetch)
8979 (uri (rubygems-uri "http-cookie" version))
8980 (sha256
8981 (base32
8982 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
8983 (build-system ruby-build-system)
8984 (arguments
8985 `(#:phases
8986 (modify-phases %standard-phases
8987 (add-before 'check 'add-dependency-to-bundler
8988 (lambda _
8989 ;; Fix NameError
8990 (substitute* "Rakefile"
8991 (("HTTP::Cookie::VERSION")
8992 "Bundler::GemHelper.gemspec.version"))
8993 #t)))))
8994 (propagated-inputs
8995 `(("ruby-domain-name" ,ruby-domain-name)))
8996 (native-inputs
8997 `(("rubysimplecov" ,ruby-simplecov)
8998 ("bundler" ,bundler)
8999 ("ruby-sqlite3" ,ruby-sqlite3)
9000 ("ruby-test-unit" ,ruby-test-unit)))
9001 (synopsis "Handle HTTP Cookies based on RFC 6265")
9002 (description
9003 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
9004 RFC 6265. It has been designed with security, standards compliance and
9005 compatibility in mind, to behave just the same as today's major web browsers.
9006 It has built-in support for the legacy @code{cookies.txt} and
9007 @code{cookies.sqlite} formats of Mozilla Firefox.")
9008 (home-page "https://github.com/sparklemotion/http-cookie")
9009 (license license:expat)))
9010
9011 (define-public ruby-httpclient
9012 (package
9013 (name "ruby-httpclient")
9014 (version "2.8.3")
9015 (source
9016 (origin
9017 (method url-fetch)
9018 (uri (rubygems-uri "httpclient" version))
9019 (sha256
9020 (base32
9021 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
9022 (build-system ruby-build-system)
9023 (arguments
9024 '(;; TODO: Some tests currently fail
9025 ;; ------
9026 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
9027 ;; 2 omissions, 0 notifications
9028 ;; 91.866% passed
9029 ;; ------
9030 ;; 6.49 tests/s, 22.41 assertions/s
9031 #:tests? #f
9032 #:phases
9033 (modify-phases %standard-phases
9034 (replace 'check
9035 (lambda* (#:key tests? #:allow-other-keys)
9036 (if tests?
9037 (invoke "ruby"
9038 "-Ilib"
9039 "test/runner.rb")
9040 #t))))))
9041 (native-inputs
9042 `(("ruby-rack" ,ruby-rack)))
9043 (synopsis
9044 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
9045 (description
9046 "The @code{httpclient} ruby library provides functionality related to
9047 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
9048 Cookie, multithreading and authentication (digest, NTLM) support.
9049
9050 Also provided is a @command{httpclient} command, which can perform HTTP
9051 requests either using arguments or with an interactive prompt.")
9052 (home-page "https://github.com/nahi/httpclient")
9053 (license license:ruby)))
9054
9055 (define-public ruby-ansi
9056 (package
9057 (name "ruby-ansi")
9058 (version "1.5.0")
9059 (source
9060 (origin
9061 (method git-fetch)
9062 ;; Fetch from GitHub as the gem does not contain testing code.
9063 (uri (git-reference
9064 (url "https://github.com/rubyworks/ansi")
9065 (commit version)))
9066 (file-name (git-file-name name version))
9067 (sha256
9068 (base32
9069 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
9070 (build-system ruby-build-system)
9071 (arguments
9072 `(#:phases
9073 (modify-phases %standard-phases
9074 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
9075 ;; cycle ansi, qed, ansi. Instead simply test that the library can
9076 ;; be require'd.
9077 (replace 'check
9078 (lambda _
9079 (invoke "ruby" "-Ilib" "-r" "ansi")))
9080 (add-before 'validate-runpath 'replace-broken-symlink
9081 (lambda* (#:key outputs #:allow-other-keys)
9082 (let* ((out (assoc-ref outputs "out"))
9083 (file (string-append
9084 out "/lib/ruby/vendor_ruby/gems/ansi-"
9085 ,version "/lib/ansi.yml")))
9086 ;; XXX: This symlink is broken since ruby 2.4.
9087 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9088 (delete-file file)
9089 (symlink "../.index" file)
9090 #t))))))
9091 (synopsis "ANSI escape code related libraries")
9092 (description
9093 "This package is a collection of ANSI escape code related libraries
9094 enabling ANSI colorization and stylization of console output. Included in the
9095 library are the @code{Code} module, which defines ANSI codes as constants and
9096 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
9097 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
9098 @code{Terminal} module which provides information about the current output
9099 device.")
9100 (home-page "https://rubyworks.github.io/ansi/")
9101 (license license:bsd-2)))
9102
9103 (define-public ruby-systemu
9104 (package
9105 (name "ruby-systemu")
9106 (version "2.6.5")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (rubygems-uri "systemu" version))
9111 (sha256
9112 (base32
9113 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
9114 (build-system ruby-build-system)
9115 (arguments
9116 `(#:phases
9117 (modify-phases %standard-phases
9118 (add-before 'check 'set-version
9119 (lambda _
9120 (setenv "VERSION" ,version)
9121 #t)))))
9122 (synopsis "Capture of stdout/stderr and handling of child processes")
9123 (description
9124 "Systemu can be used on any platform to return status, stdout, and stderr
9125 of any command. Unlike other methods like @code{open3} and @code{popen4}
9126 there is no danger of full pipes or threading issues hanging your process or
9127 subprocess.")
9128 (home-page "https://github.com/ahoward/systemu")
9129 (license license:ruby)))
9130
9131 (define-public ruby-bio-commandeer
9132 (package
9133 (name "ruby-bio-commandeer")
9134 (version "0.4.0")
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (rubygems-uri "bio-commandeer" version))
9139 (sha256
9140 (base32
9141 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
9142 (build-system ruby-build-system)
9143 (arguments
9144 `(#:phases
9145 (modify-phases %standard-phases
9146 (replace 'check
9147 ;; Run test without calling 'rake' so that jeweler is
9148 ;; not required as an input.
9149 (lambda _
9150 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
9151 (propagated-inputs
9152 `(("ruby-bio-logger" ,ruby-bio-logger)
9153 ("ruby-systemu" ,ruby-systemu)))
9154 (native-inputs
9155 `(("bundler" ,bundler)
9156 ("ruby-rspec" ,ruby-rspec)))
9157 (synopsis "Simplified running of shell commands from within Ruby")
9158 (description
9159 "Bio-commandeer provides an opinionated method of running shell commands
9160 from within Ruby. The advantage of bio-commandeer over other methods of
9161 running external commands is that when something goes wrong, messages printed
9162 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
9163 detail to ease debugging.")
9164 (home-page "https://github.com/wwood/bioruby-commandeer")
9165 (license license:expat)))
9166
9167 (define-public ruby-rubytest
9168 (package
9169 (name "ruby-rubytest")
9170 (version "0.8.1")
9171 (source
9172 (origin
9173 (method url-fetch)
9174 (uri (rubygems-uri "rubytest" version))
9175 (sha256
9176 (base32
9177 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
9178 (build-system ruby-build-system)
9179 (arguments
9180 ;; Disable regular testing to break the cycle rubytest, qed, brass,
9181 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
9182 ;; simply test that the library can be require'd.
9183 `(#:phases
9184 (modify-phases %standard-phases
9185 (replace 'check
9186 (lambda _
9187 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
9188 (propagated-inputs
9189 `(("ruby-ansi" ,ruby-ansi)))
9190 (synopsis "Universal test harness for Ruby")
9191 (description
9192 "Rubytest is a testing meta-framework for Ruby. It can handle any
9193 compliant test framework and can run tests from multiple frameworks in a
9194 single pass.")
9195 (home-page "https://rubyworks.github.io/rubytest")
9196 (license license:bsd-2)))
9197
9198 (define-public ruby-brass
9199 (package
9200 (name "ruby-brass")
9201 (version "1.2.1")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (rubygems-uri "brass" version))
9206 (sha256
9207 (base32
9208 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
9209 (build-system ruby-build-system)
9210 (arguments
9211 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
9212 ;; Instead simply test that the library can be require'd.
9213 `(#:phases
9214 (modify-phases %standard-phases
9215 (replace 'check
9216 (lambda _
9217 (invoke "ruby" "-Ilib" "-r" "brass"))))))
9218 (synopsis "Basic foundational assertions framework")
9219 (description
9220 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
9221 foundational assertions framework for other assertion and test frameworks to
9222 make use of.")
9223 (home-page "https://rubyworks.github.io/brass")
9224 (license license:bsd-2)))
9225
9226 (define-public ruby-qed
9227 (package
9228 (name "ruby-qed")
9229 (version "2.9.2")
9230 (source
9231 (origin
9232 (method url-fetch)
9233 (uri (rubygems-uri "qed" version))
9234 (sha256
9235 (base32
9236 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
9237 (build-system ruby-build-system)
9238 (arguments
9239 ;; Disable testing to break the cycle qed, ansi, qed, among others.
9240 ;; Instead simply test that the executable runs using --copyright.
9241 `(#:phases
9242 (modify-phases %standard-phases
9243 (replace 'check
9244 (lambda _
9245 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
9246 (propagated-inputs
9247 `(("ruby-ansi" ,ruby-ansi)
9248 ("ruby-brass" ,ruby-brass)))
9249 (synopsis "Test framework utilizing literate programming techniques")
9250 (description
9251 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
9252 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
9253 Development} (BDD) utilizing Literate Programming techniques. QED sits
9254 somewhere between lower-level testing tools like @code{Test::Unit} and
9255 requirement specifications systems like Cucumber.")
9256 (home-page "https://rubyworks.github.io/qed")
9257 (license license:bsd-2)))
9258
9259 (define-public ruby-que
9260 (package
9261 (name "ruby-que")
9262 (version "1.0.0.beta3")
9263 (source
9264 (origin
9265 (method url-fetch)
9266 (uri (rubygems-uri "que" version))
9267 (sha256
9268 (base32
9269 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
9270 (build-system ruby-build-system)
9271 (arguments
9272 '(#:tests? #f)) ; No included tests
9273 (synopsis "Job queue using PostgreSQL written in Ruby")
9274 (description
9275 "This package provides a job queue that uses PostgreSQL for storing jobs
9276 and locking between worker processes.")
9277 (home-page "https://github.com/chanks/que")
9278 (license license:expat)))
9279
9280 (define-public ruby-ae
9281 (package
9282 (name "ruby-ae")
9283 (version "1.8.2")
9284 (source
9285 (origin
9286 (method git-fetch)
9287 ;; Fetch from github so tests are included.
9288 (uri (git-reference
9289 (url "https://github.com/rubyworks/ae")
9290 (commit version)))
9291 (file-name (git-file-name name version))
9292 (sha256
9293 (base32
9294 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9295 (build-system ruby-build-system)
9296 (arguments
9297 `(#:phases
9298 (modify-phases %standard-phases
9299 (replace 'check
9300 (lambda _ (invoke "qed")))
9301 (add-before 'validate-runpath 'replace-broken-symlink
9302 (lambda* (#:key outputs #:allow-other-keys)
9303 (let* ((out (assoc-ref outputs "out"))
9304 (file (string-append
9305 out "/lib/ruby/vendor_ruby/gems/ae-"
9306 ,version "/lib/ae.yml")))
9307 ;; XXX: This symlink is broken since ruby 2.4.
9308 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9309 (delete-file file)
9310 (symlink "../.index" file)
9311 #t))))))
9312 (propagated-inputs
9313 `(("ruby-ansi" ,ruby-ansi)))
9314 (native-inputs
9315 `(("ruby-qed" ,ruby-qed)))
9316 (synopsis "Assertions library")
9317 (description
9318 "Assertive Expressive (AE) is an assertions library specifically designed
9319 for reuse by other test frameworks.")
9320 (home-page "https://rubyworks.github.io/ae/")
9321 (license license:bsd-2)))
9322
9323 (define-public ruby-lemon
9324 (package
9325 (name "ruby-lemon")
9326 (version "0.9.1")
9327 (source
9328 (origin
9329 (method url-fetch)
9330 (uri (rubygems-uri "lemon" version))
9331 (sha256
9332 (base32
9333 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
9334 (build-system ruby-build-system)
9335 (arguments
9336 `(#:phases
9337 (modify-phases %standard-phases
9338 (replace 'check (lambda _ (invoke "qed"))))))
9339 (propagated-inputs
9340 `(("ruby-ae" ,ruby-ae)
9341 ("ruby-ansi" ,ruby-ansi)
9342 ("ruby-rubytest" ,ruby-rubytest)))
9343 (native-inputs
9344 `(("ruby-qed" ,ruby-qed)))
9345 (synopsis "Test framework correlating code structure and test unit")
9346 (description
9347 "Lemon is a unit testing framework that enforces highly formal
9348 case-to-class and unit-to-method test construction. This enforcement can help
9349 focus concern on individual units of behavior.")
9350 (home-page "https://rubyworks.github.io/lemon")
9351 (license license:bsd-2)))
9352
9353 (define-public ruby-rubytest-cli
9354 (package
9355 (name "ruby-rubytest-cli")
9356 (version "0.2.0")
9357 (source
9358 (origin
9359 (method url-fetch)
9360 (uri (rubygems-uri "rubytest-cli" version))
9361 (sha256
9362 (base32
9363 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
9364 (build-system ruby-build-system)
9365 (arguments
9366 `(#:tests? #f)) ; no tests
9367 (propagated-inputs
9368 `(("ruby-ansi" ,ruby-ansi)
9369 ("ruby-rubytest" ,ruby-rubytest)))
9370 (synopsis "Command-line interface for rubytest")
9371 (description
9372 "Rubytest CLI is a command-line interface for running tests for
9373 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
9374 (home-page "https://rubyworks.github.io/rubytest-cli")
9375 (license license:bsd-2)))
9376
9377 (define-public ruby-hashery
9378 (package
9379 (name "ruby-hashery")
9380 (version "2.1.2")
9381 (source
9382 (origin
9383 (method url-fetch)
9384 (uri (rubygems-uri "hashery" version))
9385 (sha256
9386 (base32
9387 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
9388 (build-system ruby-build-system)
9389 (arguments
9390 `(#:phases
9391 (modify-phases %standard-phases
9392 (replace 'check
9393 (lambda _
9394 (invoke "qed")
9395 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
9396 (native-inputs
9397 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
9398 ("ruby-qed" ,ruby-qed)
9399 ("ruby-lemon" ,ruby-lemon)))
9400 (synopsis "Hash-like classes with extra features")
9401 (description
9402 "The Hashery is a tight collection of @code{Hash}-like classes.
9403 Included are the auto-sorting @code{Dictionary} class, the efficient
9404 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
9405 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9406 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9407 standard @code{Hash} making it possible to subclass and augment to fit any
9408 specific use case.")
9409 (home-page "https://rubyworks.github.io/hashery")
9410 (license license:bsd-2)))
9411
9412 (define-public ruby-rc4
9413 (package
9414 (name "ruby-rc4")
9415 (version "0.1.5")
9416 (source
9417 (origin
9418 (method url-fetch)
9419 (uri (rubygems-uri "ruby-rc4" version))
9420 (sha256
9421 (base32
9422 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9423 (build-system ruby-build-system)
9424 (arguments
9425 `(#:phases
9426 (modify-phases %standard-phases
9427 (replace 'check
9428 (lambda _
9429 (invoke "rspec" "spec/rc4_spec.rb"))))))
9430 (native-inputs
9431 `(("ruby-rspec" ,ruby-rspec-2)))
9432 (synopsis "Implementation of the RC4 algorithm")
9433 (description
9434 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9435 (home-page "https://github.com/caiges/Ruby-RC4")
9436 (license license:expat)))
9437
9438 (define-public ruby-afm
9439 (package
9440 (name "ruby-afm")
9441 (version "0.2.2")
9442 (source
9443 (origin
9444 (method url-fetch)
9445 (uri (rubygems-uri "afm" version))
9446 (sha256
9447 (base32
9448 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9449 (build-system ruby-build-system)
9450 (native-inputs
9451 `(("bundler" ,bundler)))
9452 (synopsis "Read Adobe Font Metrics (afm) files")
9453 (description
9454 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9455 files and use the data therein.")
9456 (home-page "https://github.com/halfbyte/afm")
9457 (license license:expat)))
9458
9459 (define-public ruby-ascii85
9460 (package
9461 (name "ruby-ascii85")
9462 (version "1.0.3")
9463 (source
9464 (origin
9465 (method url-fetch)
9466 (uri (rubygems-uri "Ascii85" version))
9467 (sha256
9468 (base32
9469 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
9470 (build-system ruby-build-system)
9471 (native-inputs
9472 `(("bundler" ,bundler)))
9473 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9474 (description
9475 "This library provides methods to encode and decode Ascii85
9476 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9477 @dfn{Portable Document Format} (PDF) file formats.")
9478 (home-page "https://github.com/datawraith/ascii85gem")
9479 (license license:expat)))
9480
9481 (define-public ruby-ttfunk
9482 (package
9483 (name "ruby-ttfunk")
9484 (version "1.6.2.1")
9485 (source
9486 (origin
9487 (method git-fetch)
9488 ;; fetch from github as the gem does not contain testing code
9489 (uri (git-reference
9490 (url "https://github.com/prawnpdf/ttfunk")
9491 (commit version)))
9492 (file-name (git-file-name name version))
9493 (sha256
9494 (base32
9495 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
9496 (build-system ruby-build-system)
9497 (arguments
9498 `(#:test-target "spec"
9499 #:phases
9500 (modify-phases %standard-phases
9501 (add-before 'build 'remove-ssh
9502 (lambda _
9503 ;; remove dependency on an ssh key pair that doesn't exist
9504 (substitute* "ttfunk.gemspec"
9505 (("spec.signing_key.*") ""))
9506 #t))
9507 (add-before 'check 'remove-rubocop
9508 (lambda _
9509 ;; remove rubocop as a dependency as not needed for testing
9510 (substitute* "ttfunk.gemspec"
9511 (("spec.add_development_dependency\\('rubocop'.*") ""))
9512 (substitute* "Rakefile"
9513 (("require 'rubocop/rake_task'") "")
9514 (("RuboCop::RakeTask.new") ""))
9515 #t)))))
9516 (native-inputs
9517 `(("ruby-rspec" ,ruby-rspec)
9518 ("ruby-yard" ,ruby-yard)
9519 ("bundler" ,bundler)))
9520 (synopsis "Font metrics parser for the Prawn PDF generator")
9521 (description
9522 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9523 part of the Prawn PDF generator.")
9524 (home-page "https://github.com/prawnpdf/ttfunk")
9525 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9526 ;; for details."
9527 (license %prawn-project-licenses)))
9528
9529 (define-public ruby-puma
9530 (package
9531 (name "ruby-puma")
9532 (version "3.9.1")
9533 (source
9534 (origin
9535 (method git-fetch)
9536 ;; Fetch from GitHub because distributed gem does not contain tests.
9537 (uri (git-reference
9538 (url "https://github.com/puma/puma")
9539 (commit (string-append "v" version))))
9540 (file-name (git-file-name name version))
9541 (sha256
9542 (base32
9543 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9544 (build-system ruby-build-system)
9545 (arguments
9546 `(#:tests? #f ; Tests require an out-dated version of minitest.
9547 #:phases
9548 (modify-phases %standard-phases
9549 (add-before 'build 'fix-gemspec
9550 (lambda _
9551 (substitute* "puma.gemspec"
9552 (("git ls-files") "find * |sort"))
9553 #t)))))
9554 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9555 (description
9556 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9557 for Ruby/Rack applications. Puma is intended for use in both development and
9558 production environments. In order to get the best throughput, it is highly
9559 recommended that you use a Ruby implementation with real threads like Rubinius
9560 or JRuby.")
9561 (home-page "https://puma.io/")
9562 (license license:expat)))
9563
9564 (define-public ruby-hoe-git
9565 (package
9566 (name "ruby-hoe-git")
9567 (version "1.6.0")
9568 (source
9569 (origin
9570 (method url-fetch)
9571 (uri (rubygems-uri "hoe-git" version))
9572 (sha256
9573 (base32
9574 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9575 (build-system ruby-build-system)
9576 (propagated-inputs
9577 `(("ruby-hoe" ,ruby-hoe)))
9578 (synopsis "Hoe plugins for tighter Git integration")
9579 (description
9580 "This package provides a set of Hoe plugins for tighter Git integration.
9581 It provides tasks to automate release tagging and pushing and changelog
9582 generation.")
9583 (home-page "https://github.com/jbarnette/hoe-git")
9584 (license license:expat)))
9585
9586 (define-public ruby-sequel
9587 (package
9588 (name "ruby-sequel")
9589 (version "4.49.0")
9590 (source
9591 (origin
9592 (method url-fetch)
9593 (uri (rubygems-uri "sequel" version))
9594 (sha256
9595 (base32
9596 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
9597 (build-system ruby-build-system)
9598 (arguments
9599 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9600 (synopsis "Database toolkit for Ruby")
9601 (description "Sequel provides thread safety, connection pooling and a
9602 concise DSL for constructing SQL queries and table schemas. It includes a
9603 comprehensive ORM layer for mapping records to Ruby objects and handling
9604 associated records.")
9605 (home-page "https://sequel.jeremyevans.net")
9606 (license license:expat)))
9607
9608 (define-public ruby-timecop
9609 (package
9610 (name "ruby-timecop")
9611 (version "0.9.1")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (rubygems-uri "timecop" version))
9616 (sha256
9617 (base32
9618 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
9619 (build-system ruby-build-system)
9620 (arguments
9621 `(#:phases
9622 (modify-phases %standard-phases
9623 (add-before 'check 'set-check-rubylib
9624 (lambda _
9625 ;; Set RUBYLIB so timecop tests finds its own lib.
9626 (setenv "RUBYLIB" "lib")
9627 #t)))))
9628 (native-inputs
9629 `(("bundler" ,bundler)
9630 ("ruby-minitest-rg" ,ruby-minitest-rg)
9631 ("ruby-mocha" ,ruby-mocha)
9632 ("ruby-activesupport" ,ruby-activesupport)))
9633 (synopsis "Test mocks for time-dependent functions")
9634 (description
9635 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9636 making it easier to test time-dependent code. It provides a unified method to
9637 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9638 call.")
9639 (home-page "https://github.com/travisjeffery/timecop")
9640 (license license:expat)))
9641
9642 (define-public ruby-concurrent
9643 (package
9644 (name "ruby-concurrent")
9645 (version "1.1.5")
9646 (source
9647 (origin
9648 (method git-fetch)
9649 ;; Download from GitHub because the rubygems version does not contain
9650 ;; Rakefile.
9651 (uri (git-reference
9652 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9653 (commit (string-append "v" version))))
9654 (file-name (git-file-name name version))
9655 (sha256
9656 (base32
9657 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
9658 (build-system ruby-build-system)
9659 (arguments
9660 `(#:test-target "ci"
9661 #:phases
9662 (modify-phases %standard-phases
9663 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
9664 (lambda _
9665 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9666 ;; correct one.
9667 (delete-file "concurrent-ruby-edge.gemspec")
9668 (delete-file "concurrent-ruby-ext.gemspec")
9669 #t))
9670 (replace 'replace-git-ls-files
9671 (lambda _
9672 ;; XXX: The default substitution made by this phase is not fully
9673 ;; compatible with "git ls-files". The latter produces file names
9674 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9675 ;; which gives "./lib/foo". That difference in turn breaks the
9676 ;; comparison against a glob pattern in this script.
9677 (substitute* "concurrent-ruby.gemspec"
9678 (("git ls-files") "find * -type f | sort"))
9679 #t))
9680 (add-before 'build 'remove-jar-from-gemspec
9681 (lambda _
9682 ;; The gemspec wants to include a JAR file that we do not build
9683 ;; nor need.
9684 (substitute* "concurrent-ruby.gemspec"
9685 (("'lib/concurrent/concurrent_ruby.jar'")
9686 ""))
9687 #t))
9688 (add-before 'build 'remove-rake_compiler_dock-dependency
9689 (lambda _
9690 ;; This library is only used when building for non-MRI targets.
9691 (substitute* "Rakefile"
9692 (("require 'rake_compiler_dock'")
9693 ""))
9694 #t))
9695 (add-before 'check 'remove-timecop-dependency
9696 ;; Remove timecop-dependent tests as having timecop as a depedency
9697 ;; causes circular depedencies.
9698 (lambda _
9699 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9700 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9701 #t)))))
9702 (native-inputs
9703 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9704 ("ruby-rspec" ,ruby-rspec)))
9705 (synopsis "Concurrency tools for Ruby")
9706 (description
9707 "This library provides modern concurrency tools including agents,
9708 futures, promises, thread pools, actors, supervisors, and more. It is
9709 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9710 patterns.")
9711 (home-page "http://www.concurrent-ruby.com")
9712 (license license:expat)))
9713
9714 (define-public ruby-pkg-config
9715 (package
9716 (name "ruby-pkg-config")
9717 (version "1.2.5")
9718 (source
9719 (origin
9720 (method url-fetch)
9721 (uri (rubygems-uri "pkg-config" version))
9722 (sha256
9723 (base32
9724 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
9725 (build-system ruby-build-system)
9726 (arguments
9727 ;; Tests require extra files not included in the gem.
9728 `(#:tests? #f))
9729 (synopsis "Detect libraries for compiling Ruby native extensions")
9730 (description
9731 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9732 libraries for compiling Ruby native extensions.")
9733 (home-page "https://github.com/ruby-gnome2/pkg-config")
9734 (license license:lgpl2.0+)))
9735
9736 (define-public ruby-net-http-digest-auth
9737 (package
9738 (name "ruby-net-http-digest-auth")
9739 (version "1.4.1")
9740 (source
9741 (origin
9742 (method url-fetch)
9743 (uri (rubygems-uri "net-http-digest_auth" version))
9744 (sha256
9745 (base32
9746 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
9747 (build-system ruby-build-system)
9748 (native-inputs
9749 `(("ruby-hoe" ,ruby-hoe)))
9750 (synopsis "RFC 2617 HTTP digest authentication library")
9751 (description
9752 "This library implements HTTP's digest authentication scheme based on
9753 RFC 2617. This enables the use of the digest authentication scheme instead
9754 of the more insecure basic authentication scheme.")
9755 (home-page "https://github.com/drbrain/net-http-digest_auth")
9756 (license license:expat)))
9757
9758 (define-public ruby-mail
9759 (package
9760 (name "ruby-mail")
9761 (version "2.6.6")
9762 (source
9763 (origin
9764 (method url-fetch)
9765 (uri (rubygems-uri "mail" version))
9766 (sha256
9767 (base32
9768 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
9769 (build-system ruby-build-system)
9770 (propagated-inputs
9771 `(("ruby-mime-types" ,ruby-mime-types)))
9772 (arguments
9773 ;; Tests require extra gems not included in the Gemfile.
9774 ;; XXX: Try enabling this for the next version with mini_mime.
9775 `(#:tests? #f))
9776 (synopsis "Mail library for Ruby")
9777 (description
9778 "Mail is an internet library for Ruby that is designed to handle email
9779 generation, parsing and sending. The purpose of this library is to provide
9780 a single point of access to handle all email functions, including sending
9781 and receiving emails. All network type actions are done through proxy
9782 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9783
9784 Mail has been designed with a very simple object oriented system that
9785 really opens up the email messages you are parsing, if you know what you
9786 are doing, you can fiddle with every last bit of your email directly.")
9787 (home-page "https://github.com/mikel/mail")
9788 (license license:expat)))
9789
9790 (define-public ruby-mathn
9791 (package
9792 (name "ruby-mathn")
9793 (version "0.1.0")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (rubygems-uri "mathn" version))
9798 (sha256
9799 (base32
9800 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9801 (build-system ruby-build-system)
9802 (native-inputs
9803 `(("bundler" ,bundler)
9804 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9805 (synopsis "Extends math operations for increased precision")
9806 (description
9807 "This gem makes mathematical operations more precise in Ruby and
9808 integrates other mathematical standard libraries. Prior to Ruby 2.5,
9809 @code{mathn} was part of the Ruby standard library.")
9810 (home-page "https://github.com/ruby/mathn")
9811 (license license:bsd-2)))
9812
9813 (define-public ruby-code-statistics
9814 (package
9815 (name "ruby-code-statistics")
9816 (version "0.2.13")
9817 (source
9818 (origin
9819 (method url-fetch)
9820 (uri (rubygems-uri "code_statistics" version))
9821 (sha256
9822 (base32
9823 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9824 (build-system ruby-build-system)
9825 (arguments
9826 `(#:tests? #f)) ; Not all test code is included in gem.
9827 (synopsis "Port of the rails 'rake stats' method")
9828 (description
9829 "This gem is a port of the rails 'rake stats' method so it can be made
9830 more robust and work for non rails projects.")
9831 (home-page "https://github.com/danmayer/code_statistics")
9832 (license license:expat)))
9833
9834 (define-public ruby-rubypants
9835 (package
9836 (name "ruby-rubypants")
9837 (version "0.6.0")
9838 (source (origin
9839 (method url-fetch)
9840 (uri (rubygems-uri "rubypants" version))
9841 (sha256
9842 (base32
9843 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9844 (build-system ruby-build-system)
9845 (arguments
9846 '(#:tests? #f)) ; need Codecov
9847 (synopsis "Port of the smart-quotes library SmartyPants")
9848 (description
9849 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9850 original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9851 and BBEdit that easily translates plain ASCII punctuation characters into
9852 smart typographic punctuation HTML entities.")
9853 (home-page "https://github.com/jmcnevin/rubypants")
9854 (license license:bsd-2)))
9855
9856 (define-public ruby-org-ruby
9857 (package
9858 (name "ruby-org-ruby")
9859 (version "0.9.12")
9860 (source (origin
9861 (method url-fetch)
9862 (uri (rubygems-uri "org-ruby" version))
9863 (sha256
9864 (base32
9865 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
9866 (build-system ruby-build-system)
9867 (arguments
9868 '(#:tests? #f)) ; no rakefile
9869 (propagated-inputs
9870 `(("ruby-rubypants" ,ruby-rubypants)))
9871 (synopsis "Org-mode parser written in Ruby")
9872 (description
9873 "Org-ruby is an org-mode parser written in Ruby. The most significant
9874 thing this library does today is convert org-mode files to HTML or Textile or
9875 Markdown.")
9876 (home-page "https://github.com/wallyqs/org-ruby")
9877 (license license:expat)))
9878
9879 (define-public ruby-rake
9880 (package
9881 (name "ruby-rake")
9882 (version "13.0.1")
9883 (source
9884 (origin
9885 (method url-fetch)
9886 (uri (rubygems-uri "rake" version))
9887 (sha256
9888 (base32
9889 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
9890 (build-system ruby-build-system)
9891 (native-inputs
9892 `(("bundler" ,bundler)))
9893 (synopsis "Rake is a Make-like program implemented in Ruby")
9894 (description
9895 "Rake is a Make-like program where tasks and dependencies are specified
9896 in standard Ruby syntax.")
9897 (home-page "https://github.com/ruby/rake")
9898 (license license:expat)))
9899
9900 (define-public ruby-childprocess
9901 (package
9902 (name "ruby-childprocess")
9903 (version "3.0.0")
9904 (source
9905 (origin
9906 (method url-fetch)
9907 (uri (rubygems-uri "childprocess" version))
9908 (sha256
9909 (base32
9910 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
9911 (build-system ruby-build-system)
9912 (arguments
9913 `(#:tests? #f))
9914 (native-inputs
9915 `(("bundler" ,bundler)
9916 ("ruby-rspec" ,ruby-rspec)))
9917 (propagated-inputs
9918 `(("ruby-ffi" ,ruby-ffi)))
9919 (synopsis "Control external programs running in the background, in Ruby")
9920 (description "@code{childprocess} provides a gem to control external
9921 programs running in the background, in Ruby.")
9922 (home-page "https://github.com/enkessler/childprocess")
9923 (license license:expat)))
9924
9925 (define-public ruby-public-suffix
9926 (package
9927 (name "ruby-public-suffix")
9928 (version "4.0.5")
9929 (source (origin
9930 (method url-fetch)
9931 (uri (rubygems-uri "public_suffix" version))
9932 (sha256
9933 (base32
9934 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
9935 (build-system ruby-build-system)
9936 (arguments
9937 '(#:phases
9938 (modify-phases %standard-phases
9939 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
9940 ;; including it as an input can lead to circular dependencies.
9941 (add-after 'unpack 'remove-rubocop-from-Rakefile
9942 (lambda _
9943 (substitute* "Rakefile"
9944 (("require \"rubocop/rake\\_task\"") "")
9945 (("RuboCop::RakeTask\\.new") ""))
9946 #t)))))
9947 (native-inputs
9948 `(("bundler" ,bundler)
9949 ("ruby-yard" ,ruby-yard)
9950 ("ruby-mocha" ,ruby-mocha)
9951 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
9952 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
9953 (synopsis "Domain name parser")
9954 (description "The gem @code{public_suffix} is a domain name parser,
9955 written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
9956 is one under which Internet users can (or historically could) directly
9957 register names. Some examples of public suffixes are @code{.com},
9958 @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
9959 all known public suffixes.")
9960 (license license:expat)))
9961
9962 (define-public ruby-addressable
9963 (package
9964 (name "ruby-addressable")
9965 (version "2.7.0")
9966 (source (origin
9967 (method url-fetch)
9968 (uri (rubygems-uri "addressable" version))
9969 (sha256
9970 (base32
9971 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
9972 (build-system ruby-build-system)
9973 (arguments
9974 '(#:test-target "spec"
9975 #:phases
9976 (modify-phases %standard-phases
9977 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
9978 (lambda _
9979 (substitute* "Gemfile"
9980 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
9981 ((".*launchy.*") "")
9982 ((".*rake.*") "gem 'rake'\n")
9983 ((".*redcarpet.*") ""))
9984 #t))
9985 (add-before 'check 'delete-network-dependent-test
9986 (lambda _
9987 (delete-file "spec/addressable/net_http_compat_spec.rb")
9988 #t)))))
9989 (native-inputs
9990 `(("ruby-rspec" ,ruby-rspec)
9991 ("bundler" ,bundler)
9992 ("ruby-idn-ruby" ,ruby-idn-ruby)
9993 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
9994 ("ruby-rspec-its" ,ruby-rspec-its-minimal)
9995 ("ruby-yard" ,ruby-yard)
9996 ("ruby-simplecov" ,ruby-simplecov)))
9997 (propagated-inputs
9998 `(("ruby-public-suffix" ,ruby-public-suffix)))
9999 (home-page "https://github.com/sporkmonger/addressable")
10000 (synopsis "Alternative URI implementation")
10001 (description "Addressable is a replacement for the URI implementation that
10002 is part of Ruby's standard library. It more closely conforms to RFC 3986,
10003 RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
10004 (license license:asl2.0)))
10005
10006 (define-public ruby-colorize
10007 (package
10008 (name "ruby-colorize")
10009 (version "0.8.1")
10010 (source (origin
10011 (method url-fetch)
10012 (uri (rubygems-uri "colorize" version))
10013 (sha256
10014 (base32
10015 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
10016 (build-system ruby-build-system)
10017 (arguments
10018 '(#:phases (modify-phases %standard-phases
10019 (add-before 'check 'remove-codeclimate-dependency
10020 (lambda _
10021 (substitute* "test/test_colorize.rb"
10022 ;; Do not hook the tests into the online CodeClimate
10023 ;; service which is unnecessary for these tests.
10024 (("require 'codeclimate-test-reporter'")
10025 "")
10026 (("CodeClimate.*") ""))
10027 #t)))))
10028 (synopsis "Add color effects to the @code{String} class")
10029 (description
10030 "This package extends the @code{String} class and adds a
10031 @code{ColorizedString} with methods to set text color, background color,
10032 and text effects.")
10033 (home-page "https://github.com/fazibear/colorize")
10034 (license license:gpl2+)))
10035
10036 (define-public ruby-colorator
10037 (package
10038 (name "ruby-colorator")
10039 (version "1.1.0")
10040 (source (origin
10041 (method url-fetch)
10042 (uri (rubygems-uri "colorator" version))
10043 (sha256
10044 (base32
10045 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
10046 (build-system ruby-build-system)
10047 (arguments
10048 ;; No test target
10049 `(#:tests? #f))
10050 (home-page "http://octopress.org/colorator/")
10051 (synopsis "Terminal color library")
10052 (description "Colorator is a Ruby gem that helps you colorize your text
10053 for the terminal.")
10054 (license license:expat)))
10055
10056 (define-public ruby-command-line-reporter
10057 (package
10058 (name "ruby-command-line-reporter")
10059 (version "4.0.1")
10060 (source (origin
10061 (method url-fetch)
10062 (uri (rubygems-uri "command_line_reporter" version))
10063 (sha256
10064 (base32
10065 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
10066 (build-system ruby-build-system)
10067 (arguments
10068 ;; No Rakefile
10069 `(#:tests? #f
10070 #:phases
10071 (modify-phases %standard-phases
10072 (add-before 'build 'fix-dependencies
10073 (lambda _
10074 (substitute* ".gemspec"
10075 ;; colored is unmaintained
10076 (("colored") "colorator")
10077 ;; colorator version
10078 (("= 1.2") "= 1.1"))
10079 #t)))))
10080 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
10081 (home-page "https://github.com/wbailey/command_line_reporter")
10082 (synopsis "Report production while executing Ruby scripts")
10083 (description "This gem provides a DSL that makes it easy to write reports
10084 of various types in ruby. It eliminates the need to litter your source with
10085 puts statements, instead providing a more readable, expressive interface to
10086 your application.")
10087 (license license:asl2.0)))
10088
10089 (define-public ruby-command-line-reporter-3
10090 (package
10091 (inherit ruby-command-line-reporter)
10092 (version "3.3.6")
10093 (source (origin
10094 (method url-fetch)
10095 (uri (rubygems-uri "command_line_reporter" version))
10096 (sha256
10097 (base32
10098 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
10099
10100 (define-public ruby-kpeg
10101 (package
10102 (name "ruby-kpeg")
10103 (version "1.1.0")
10104 (source
10105 (origin
10106 (method url-fetch)
10107 (uri (rubygems-uri "kpeg" version))
10108 (sha256
10109 (base32
10110 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
10111 (build-system ruby-build-system)
10112 (native-inputs
10113 `(("ruby-hoe" ,ruby-hoe)))
10114 (synopsis "PEG library for Ruby")
10115 (description "KPeg is a simple PEG library for Ruby. It provides an API as
10116 well as native grammar to build the grammar. KPeg supports direct left
10117 recursion of rules via the
10118 @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
10119 technique.")
10120 (home-page "https://github.com/evanphx/kpeg")
10121 (license license:expat)))
10122
10123 (define-public ruby-rdoc
10124 (package
10125 (name "ruby-rdoc")
10126 (version "6.2.0")
10127 (source
10128 (origin
10129 (method git-fetch)
10130 (uri (git-reference
10131 (url "https://github.com/ruby/rdoc")
10132 (commit (string-append "v" version))))
10133 (file-name (git-file-name name version))
10134 (sha256
10135 (base32
10136 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
10137 (build-system ruby-build-system)
10138 (arguments
10139 `(#:phases
10140 (modify-phases %standard-phases
10141 (add-after 'unpack 'patch-gemspec
10142 ;; TODO: Remove after next release is tagged.
10143 (lambda _
10144 (substitute* "rdoc.gemspec"
10145 (("\"lib/rdoc/generator/template/darkfish/js/\
10146 jquery\\.js\", ") ""))
10147 #t))
10148 (add-before 'build 'generate
10149 ;; 'gem build' doesn't honor Rakefile dependencies (see:
10150 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
10151 (lambda _
10152 (invoke "rake" "generate"))))))
10153 (native-inputs
10154 `(("bundler" ,bundler)
10155 ("ruby-kpeg" ,ruby-kpeg)
10156 ("ruby-racc" ,ruby-racc)
10157 ("ruby-rubocop" ,ruby-rubocop)))
10158 (home-page "https://ruby.github.io/rdoc/")
10159 (synopsis "HTML and command-line documentation utility")
10160 (description "RDoc produces HTML and command-line documentation for Ruby
10161 projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
10162 documentation from the command-line.")
10163 (license license:gpl2+)))
10164
10165 (define-public ruby-sass-listen
10166 (package
10167 (name "ruby-sass-listen")
10168 (version "4.0.0")
10169 (source (origin
10170 (method url-fetch)
10171 (uri (rubygems-uri "sass-listen" version))
10172 (sha256
10173 (base32
10174 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
10175 (build-system ruby-build-system)
10176 (arguments
10177 ;; No test target
10178 `(#:tests? #f))
10179 (propagated-inputs
10180 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
10181 ("ruby-rb-inotify" ,ruby-rb-inotify)))
10182 (home-page "https://github.com/sass/listen")
10183 (synopsis "File modification notification library")
10184 (description "The Listen gem listens to file modifications and notifies you
10185 about the changes.")
10186 (license license:expat)))
10187
10188 (define-public ruby-terminfo
10189 (package
10190 (name "ruby-terminfo")
10191 (version "0.1.1")
10192 (source
10193 (origin
10194 (method url-fetch)
10195 (uri (rubygems-uri "ruby-terminfo" version))
10196 (sha256
10197 (base32
10198 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
10199 (build-system ruby-build-system)
10200 (arguments
10201 `(#:test-target "test"
10202 ;; Rakefile requires old packages and would need modification to
10203 ;; work with current software.
10204 #:tests? #f))
10205 (inputs
10206 `(("ncurses" ,ncurses)))
10207 (native-inputs
10208 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
10209 ("ruby-rdoc" ,ruby-rdoc)))
10210 (home-page "http://www.a-k-r.org/ruby-terminfo/")
10211 (synopsis "Terminfo binding for Ruby")
10212 (description "Ruby-terminfo provides terminfo binding for Ruby.")
10213 (license license:bsd-3)))
10214
10215 (define-public ruby-diffy
10216 (package
10217 (name "ruby-diffy")
10218 (version "3.2.1")
10219 (source
10220 (origin
10221 (method url-fetch)
10222 (uri (rubygems-uri "diffy" version))
10223 (sha256
10224 (base32
10225 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
10226 (build-system ruby-build-system)
10227 (arguments
10228 ;; No tests
10229 `(#:tests? #f))
10230 (native-inputs
10231 `(("ruby-rspec" ,ruby-rspec)))
10232 (home-page "https://github.com/samg/diffy")
10233 (synopsis "Convenient diffing in ruby")
10234 (description "Diffy provides a convenient way to generate a diff from two
10235 strings or files.")
10236 (license license:expat)))
10237
10238 (define-public ruby-sass-spec
10239 (package
10240 (name "ruby-sass-spec")
10241 (version "3.5.4")
10242 (source
10243 (origin
10244 (method git-fetch)
10245 (uri (git-reference
10246 (url "https://github.com/sass/sass-spec")
10247 (commit (string-append "v" version))))
10248 (file-name (git-file-name name version))
10249 (sha256
10250 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
10251 (build-system ruby-build-system)
10252 (propagated-inputs
10253 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
10254 ("ruby-diffy" ,ruby-diffy)
10255 ("ruby-terminfo" ,ruby-terminfo)))
10256 (arguments
10257 `(;; This package contains tests for a sass implementation, and the to
10258 ;; avoid any circular dependencies, the tests are not run here
10259 #:tests? #f
10260 #:phases
10261 (modify-phases %standard-phases
10262 (add-after 'unpack 'patch-test
10263 (lambda _
10264 (delete-file "spec/values/colors/alpha_hex-3.5/error")
10265 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
10266 (("string") "color")))))))
10267 (home-page "https://github.com/sass/sass-spec")
10268 (synopsis "Test suite for Sass")
10269 (description "Sass Spec is a test suite for Sass. Test cases are all in
10270 the @file{spec} directory.")
10271 (license license:expat)))
10272
10273 (define-public ruby-sass
10274 (package
10275 (name "ruby-sass")
10276 (version "3.6.0")
10277 (source (origin
10278 (method url-fetch)
10279 (uri (rubygems-uri "sass" version))
10280 (sha256
10281 (base32
10282 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
10283 (build-system ruby-build-system)
10284 (propagated-inputs
10285 `(("ruby-sass-listen" ,ruby-sass-listen)))
10286 (native-inputs
10287 `(("ruby-sass-spec" ,ruby-sass-spec)
10288 ("ruby-mathn" ,ruby-mathn)))
10289 (home-page "https://sass-lang.com/")
10290 (synopsis "CSS extension language")
10291 (description "Sass is a CSS extension language. It extends CSS with
10292 features that don't exist yet like variables, nesting, mixins and inheritance.")
10293 (license license:expat)))
10294
10295 (define-public ruby-sassc
10296 (package
10297 (name "ruby-sassc")
10298 (version "2.2.1")
10299 (source
10300 (origin
10301 (method url-fetch)
10302 (uri (rubygems-uri "sassc" version))
10303 (sha256
10304 (base32
10305 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
10306 (build-system ruby-build-system)
10307 (arguments
10308 '(#:modules ((guix build ruby-build-system)
10309 (guix build utils)
10310 (ice-9 textual-ports))
10311 #:phases
10312 (modify-phases %standard-phases
10313 ;; TODO: This would be better as a snippet, but the ruby-build-system
10314 ;; doesn't seem to support that
10315 (add-after 'unpack 'remove-libsass
10316 (lambda _
10317 (delete-file-recursively "ext")
10318 (with-atomic-file-replacement "sassc.gemspec"
10319 (lambda (in out)
10320 (let* ((gemspec (get-string-all in))
10321 (index (string-contains gemspec "libsass_dir")))
10322 (display (string-append
10323 (string-take gemspec index)
10324 "\nend\n")
10325 out))))
10326 #t))
10327 (add-after 'unpack 'dont-check-the-libsass-version
10328 (lambda _
10329 (substitute* "test/native_test.rb"
10330 (("assert_equal.*Native\\.version") ""))
10331 #t))
10332 (add-after 'unpack 'remove-git-from-gemspec
10333 (lambda _
10334 (substitute* "sassc.gemspec"
10335 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
10336 #t))
10337 (add-after 'unpack 'remove-extensions-from-gemspec
10338 (lambda _
10339 (substitute* "sassc.gemspec"
10340 (("\\[\"ext/extconf.rb\"\\]") "[]"))
10341 #t))
10342 (add-after 'unpack 'fix-Rakefile
10343 (lambda _
10344 (substitute* "Rakefile"
10345 (("test: 'compile:libsass'") ":test"))
10346 #t))
10347 (add-after 'unpack 'remove-unnecessary-dependencies
10348 (lambda _
10349 (substitute* "test/test_helper.rb"
10350 (("require \"pry\"") ""))
10351 #t))
10352 (add-before 'build 'patch-native.rb
10353 (lambda* (#:key inputs #:allow-other-keys)
10354 (substitute* "lib/sassc/native.rb"
10355 ((".*gem_root = spec.gem_dir") "")
10356 (("ffi_lib .*\n")
10357 (string-append
10358 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
10359 #t))
10360 ;; The gemspec still references the libsass files, so just keep the
10361 ;; one in the gem.
10362 (delete 'extract-gemspec))))
10363 (propagated-inputs
10364 `(("ruby-ffi" ,ruby-ffi)
10365 ("ruby-rake" ,ruby-rake)))
10366 (inputs
10367 `(("libsass" ,libsass)))
10368 (native-inputs
10369 `(("bundler" ,bundler)
10370 ("ruby-rake-compiler" ,ruby-rake-compiler)
10371 ("ruby-minitest-around" ,ruby-minitest-around)
10372 ("ruby-test-construct" ,ruby-test-construct)))
10373 (synopsis "Use libsss from Ruby")
10374 (description
10375 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10376 bindings to the libsass library. This enables rendering
10377 @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10378 (home-page "https://github.com/sass/sassc-ruby")
10379 (license license:expat)))
10380
10381 (define-public ruby-jekyll-sass-converter
10382 (package
10383 (name "ruby-jekyll-sass-converter")
10384 (version "1.5.2")
10385 (source (origin
10386 (method url-fetch)
10387 (uri (rubygems-uri "jekyll-sass-converter" version))
10388 (sha256
10389 (base32
10390 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
10391 (build-system ruby-build-system)
10392 (propagated-inputs
10393 `(("ruby-sass" ,ruby-sass)))
10394 (arguments
10395 ;; No rakefile
10396 `(#:tests? #f))
10397 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10398 (synopsis "Sass converter for Jekyll")
10399 (description "This gem provide built-in support for the Sass converter
10400 in Jekyll.")
10401 (license license:expat)))
10402
10403 (define-public ruby-jekyll-watch
10404 (package
10405 (name "ruby-jekyll-watch")
10406 (version "2.1.2")
10407 (source (origin
10408 (method url-fetch)
10409 (uri (rubygems-uri "jekyll-watch" version))
10410 (sha256
10411 (base32
10412 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
10413 (build-system ruby-build-system)
10414 (propagated-inputs
10415 `(("ruby-listen" ,ruby-listen)))
10416 (arguments
10417 ;; No rakefile
10418 `(#:tests? #f))
10419 (home-page "https://github.com/jekyll/jekyll-watch")
10420 (synopsis "Jekyll auto-rebuild support")
10421 (description "This gems add the @code{--watch} switch to the jekyll CLI
10422 interface. It allows Jekyll to rebuild your site when a file changes.")
10423 (license license:expat)))
10424
10425 (define-public ruby-parallel
10426 (package
10427 (name "ruby-parallel")
10428 (version "1.13.0")
10429 (source
10430 (origin
10431 (method git-fetch)
10432 (uri (git-reference
10433 (url "https://github.com/grosser/parallel")
10434 (commit (string-append "v" version))))
10435 (file-name (git-file-name name version))
10436 (sha256
10437 (base32
10438 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
10439 (build-system ruby-build-system)
10440 (arguments
10441 `(;; TODO 3 test failures
10442 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10443 ;; open unnecessary pipes
10444 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10445 ;; SQLite in processes
10446 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10447 ;; SQLite in threads
10448 #:tests? #f
10449 #:test-target "rspec-rerun:spec"
10450 #:phases
10451 (modify-phases %standard-phases
10452 (add-after 'unpack 'patch-Gemfile
10453 (lambda _
10454 (substitute* "Gemfile"
10455 (("gem 'rspec-legacy_formatters'") "")
10456 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10457 (add-before 'check 'delete-Gemfile.lock
10458 (lambda _
10459 ;; Bundler isn't being used for fetching dependendencies, so
10460 ;; delete the Gemfile.lock
10461 (delete-file "Gemfile.lock")
10462 #t))
10463 (add-before 'build 'patch-gemspec
10464 (lambda _
10465 (substitute* "parallel.gemspec"
10466 (("git ls-files") "find"))
10467 #t)))))
10468 (native-inputs
10469 `(("ruby-rspec" ,ruby-rspec)
10470 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
10471 ("bundler" ,bundler)
10472 ("ruby-activerecord" ,ruby-activerecord)
10473 ("ruby-progressbar" ,ruby-progressbar)
10474 ("ruby-bump" ,ruby-bump)
10475 ("procps" ,procps)
10476 ("lsof" ,lsof)
10477 ("ruby-mysql2" ,ruby-mysql2)
10478 ("ruby-sqlite3" ,ruby-sqlite3)
10479 ("ruby-i18n" ,ruby-i18n)))
10480 (home-page "https://github.com/grosser/parallel")
10481 (synopsis "Parallel processing in Ruby")
10482 (description "Parallel allows you to run any code in parallel Processes
10483 (to use all CPUs) or Threads(to speedup blocking operations). It is best
10484 suited for map-reduce or e.g. parallel downloads/uploads.")
10485 (license license:expat)))
10486
10487 (define-public ruby-cane
10488 (package
10489 (name "ruby-cane")
10490 (version "3.0.0")
10491 (source (origin
10492 (method url-fetch)
10493 (uri (rubygems-uri "cane" version))
10494 (sha256
10495 (base32
10496 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10497 (build-system ruby-build-system)
10498 (arguments `(#:tests? #f)); No rakefile
10499 (home-page "https://github.com/square/cane")
10500 (propagated-inputs
10501 `(("ruby-parallel" ,ruby-parallel)))
10502 (synopsis "Code quality threshold checking")
10503 (description "Cane fails your build if code quality thresholds are not met.")
10504 (license license:asl2.0)))
10505
10506 (define-public ruby-morecane
10507 (package
10508 (name "ruby-morecane")
10509 (version "0.2.0")
10510 (source (origin
10511 (method url-fetch)
10512 (uri (rubygems-uri "morecane" version))
10513 (sha256
10514 (base32
10515 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10516 (build-system ruby-build-system)
10517 (home-page "https://github.com/yob/morecane")
10518 (arguments `(#:tests? #f)); No rakefile
10519 (propagated-inputs
10520 `(("ruby-parallel" ,ruby-parallel)))
10521 (synopsis "Extra checks for cane")
10522 (description "The cane gem provides a great framework for running quality
10523 checks over your ruby project as part of continuous integration build. It
10524 comes with a few checks out of the box, but also provides an API for loading
10525 custom checks. This gem provides a set of additional checks.")
10526 (license license:expat)))
10527
10528 (define-public ruby-pdf-reader
10529 (package
10530 (name "ruby-pdf-reader")
10531 (version "2.4.0")
10532 (source (origin
10533 (method git-fetch) ;no test in distributed gem archive
10534 (uri (git-reference
10535 (url "https://github.com/yob/pdf-reader.git")
10536 (commit (string-append "v" version))))
10537 (file-name (git-file-name name version))
10538 (sha256
10539 (base32
10540 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
10541 (build-system ruby-build-system)
10542 (arguments `(#:test-target "spec"
10543 #:phases (modify-phases %standard-phases
10544 (add-after 'unpack 'do-not-use-bundler
10545 (lambda _
10546 (substitute* "spec/spec_helper.rb"
10547 ((".*[Bb]undler.*") ""))
10548 #t)))))
10549 (native-inputs
10550 `(("ruby-rspec" ,ruby-rspec)
10551 ("ruby-cane" ,ruby-cane)
10552 ("ruby-morecane" ,ruby-morecane)))
10553 (propagated-inputs
10554 `(("ruby-afm" ,ruby-afm)
10555 ("ruby-ascii85" ,ruby-ascii85)
10556 ("ruby-hashery" ,ruby-hashery)
10557 ("ruby-rc4" ,ruby-rc4)
10558 ("ruby-ttfunk" ,ruby-ttfunk)))
10559 (home-page "https://github.com/yob/pdf-reader")
10560 (synopsis "PDF parser in Ruby")
10561 (description "The PDF::Reader library implements a PDF parser conforming as
10562 much as possible to the PDF specification from Adobe. It provides programmatic
10563 access to the contents of a PDF file with a high degree of flexibility.")
10564 (license license:gpl3+)))
10565
10566 (define-public ruby-pdf-inspector
10567 (let ((revision "1")
10568 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10569 (package
10570 (name "ruby-pdf-inspector")
10571 (version (git-version "1.3.0" revision commit))
10572 (source (origin
10573 (method git-fetch)
10574 (uri (git-reference
10575 (url "https://github.com/prawnpdf/pdf-inspector.git")
10576 (commit commit)))
10577 (file-name (git-file-name name version))
10578 (sha256
10579 (base32
10580 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10581 (build-system ruby-build-system)
10582 (arguments
10583 `(#:test-target "spec"
10584 #:phases (modify-phases %standard-phases
10585 (add-before 'build 'drop-signing-key-requirement
10586 (lambda _
10587 (substitute* "pdf-inspector.gemspec"
10588 (("spec.signing_key =.*")
10589 "spec.signing_key = nil"))
10590 #t))
10591 (replace 'check
10592 (lambda _
10593 (substitute* "pdf-inspector.gemspec"
10594 ((".*rubocop.*") "")
10595 ((".*yard.*") ""))
10596 (invoke "rspec"))))))
10597 (native-inputs
10598 `(("ruby-rspec" ,ruby-rspec)))
10599 (propagated-inputs
10600 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
10601 (home-page "https://github.com/prawnpdf/pdf-inspector")
10602 (synopsis "Analysis classes for inspecting PDF output")
10603 (description "This library provides a number of PDF::Reader based tools for
10604 use in testing PDF output. Presently, the primary purpose of this tool is to
10605 support the tests found in Prawn, a pure Ruby PDF generation library.")
10606 (license %prawn-project-licenses))))
10607
10608 (define-public ruby-pdf-core
10609 (package
10610 (name "ruby-pdf-core")
10611 (version "0.8.1")
10612 (source (origin
10613 (method url-fetch)
10614 (uri (rubygems-uri "pdf-core" version))
10615 (sha256
10616 (base32
10617 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10618 (build-system ruby-build-system)
10619 (arguments
10620 ; No test target
10621 `(#:tests? #f))
10622 (home-page "https://github.com/prawnpdf/pdf-core")
10623 (synopsis "Low level PDF features for Prawn")
10624 (description "This is an experimental gem that extracts low-level PDF
10625 functionality from Prawn.")
10626 (license license:gpl3+)))
10627
10628 (define-public ruby-prawn
10629 ;; There hasn't been a new release since 2017/03/17.
10630 (let ((revision "1")
10631 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10632 (package
10633 (name "ruby-prawn")
10634 (version (git-version "2.2.2" revision commit))
10635 (source (origin
10636 (method git-fetch)
10637 (uri (git-reference
10638 (url "https://github.com/prawnpdf/prawn.git")
10639 (commit commit)))
10640 (file-name (git-file-name name version))
10641 (sha256
10642 (base32
10643 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10644 (build-system ruby-build-system)
10645 (arguments
10646 `(#:phases
10647 (modify-phases %standard-phases
10648 (add-before 'build 'drop-signing-key-requirement
10649 (lambda _
10650 (substitute* "prawn.gemspec"
10651 (("spec.signing_key =.*")
10652 "spec.signing_key = nil"))
10653 #t))
10654 (replace 'check
10655 (lambda* (#:key tests? #:allow-other-keys)
10656 (when tests?
10657 ;; The Prawn manual test fails (see:
10658 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10659 ;; it.
10660 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10661 #t)))))
10662 (propagated-inputs
10663 `(("ruby-pdf-core" ,ruby-pdf-core)
10664 ("ruby-ttfunk" ,ruby-ttfunk)))
10665 (native-inputs
10666 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
10667 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10668 ("ruby-rspec" ,ruby-rspec)
10669 ("ruby-simplecov" ,ruby-simplecov)
10670 ("ruby-yard" ,ruby-yard)))
10671 (home-page "https://prawnpdf.org/api-docs/2.0/")
10672 (synopsis "PDF generation for Ruby")
10673 (description "Prawn is a pure Ruby PDF generation library.")
10674 (license %prawn-project-licenses))))
10675
10676 (define-public ruby-prawn-table
10677 (package
10678 (name "ruby-prawn-table")
10679 (version "0.2.2")
10680 (source (origin
10681 (method url-fetch)
10682 (uri (rubygems-uri "prawn-table" version))
10683 (sha256
10684 (base32
10685 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10686 (build-system ruby-build-system)
10687 (propagated-inputs
10688 `(("ruby-prawn" ,ruby-prawn)
10689 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
10690 (native-inputs
10691 `(("bundler" ,bundler)
10692 ("ruby-yard" ,ruby-yard)
10693 ("ruby-mocha" ,ruby-mocha)
10694 ("ruby-coderay" ,ruby-coderay)
10695 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10696 ("ruby-simplecov" ,ruby-simplecov)
10697 ("ruby-rspec-2" ,ruby-rspec-2)))
10698 (arguments
10699 '(;; TODO: 1 test fails
10700 ;; Failure/Error: pdf.page_count.should == 1
10701 ;; expected: 1
10702 ;; got: 2 (using ==)
10703 ;; # ./spec/table_spec.rb:1308
10704 ;;
10705 ;; 225 examples, 1 failure
10706 #:tests? #f
10707 #:phases
10708 (modify-phases %standard-phases
10709 (add-before 'check 'patch-gemspec
10710 (lambda _
10711 (substitute* "prawn-table.gemspec"
10712 ;; Loosen the requirement for pdf-inspector
10713 (("~> 1\\.1\\.0") ">= 0")
10714 ;; Loosen the requirement for pdf-reader
10715 (("~> 1\\.2") ">= 0"))))
10716 (replace 'check
10717 (lambda* (#:key tests? #:allow-other-keys)
10718 (when tests?
10719 (invoke "rspec"))
10720 #t)))))
10721 (home-page "https://github.com/prawnpdf/prawn-table")
10722 (synopsis "Tables support for Prawn")
10723 (description "This gem provides tables support for Prawn.")
10724 (license license:gpl3+)))
10725
10726 (define-public ruby-kramdown
10727 (package
10728 (name "ruby-kramdown")
10729 (version "2.3.0")
10730 (source (origin
10731 (method url-fetch)
10732 (uri (rubygems-uri "kramdown" version))
10733 (sha256
10734 (base32
10735 "1vmw752c26ny2jwl0npn0gbyqwgz4hdmlpxnsld9qi9xhk5b1qh7"))))
10736 (build-system ruby-build-system)
10737 (arguments `(#:tests? #f)); FIXME: some test failures
10738 (native-inputs
10739 `(("ruby-prawn" ,ruby-prawn)
10740 ("ruby-prawn-table" ,ruby-prawn-table)))
10741 (home-page "https://kramdown.gettalong.org/")
10742 (synopsis "Markdown parsing and converting library")
10743 (description "Kramdown is a library for parsing and converting a superset
10744 of Markdown. It is completely written in Ruby, supports standard Markdown
10745 (with some minor modifications) and various extensions that have been made
10746 popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10747 (license license:expat)))
10748
10749 (define-public ruby-kramdown-parser-gfm
10750 (package
10751 (name "ruby-kramdown-parser-gfm")
10752 (version "1.1.0")
10753 (source
10754 (origin
10755 (method url-fetch)
10756 (uri (rubygems-uri "kramdown-parser-gfm" version))
10757 (sha256
10758 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
10759 (build-system ruby-build-system)
10760 (arguments
10761 `(#:tests? #f)) ;no rakefile
10762 (propagated-inputs
10763 `(("ruby-kramdown" ,ruby-kramdown)))
10764 (synopsis "Kramdown parser for the GFM dialect of Markdown")
10765 (description
10766 "This is a parser for kramdown that converts Markdown documents in the
10767 GFM dialect to HTML.")
10768 (home-page "https://github.com/kramdown/parser-gfm")
10769 (license license:expat)))
10770
10771 (define-public ruby-http-parser.rb
10772 (package
10773 (name "ruby-http-parser.rb")
10774 (version "0.6.0")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (rubygems-uri "http_parser.rb" version))
10779 (sha256
10780 (base32
10781 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10782 (build-system ruby-build-system)
10783 (arguments
10784 ;; No tests
10785 `(#:tests? #f))
10786 (native-inputs
10787 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10788 ("ruby-rspec" ,ruby-rspec)))
10789 (home-page "https://github.com/tmm1/http_parser.rb")
10790 (synopsis "HTTP parser un Ruby")
10791 (description "This gem is a simple callback-based HTTP request/response
10792 parser for writing http servers, clients and proxies.")
10793 (license license:expat)))
10794
10795 (define-public ruby-em-websocket
10796 (package
10797 (name "ruby-em-websocket")
10798 (version "0.5.1")
10799 (source
10800 (origin
10801 (method url-fetch)
10802 (uri (rubygems-uri "em-websocket" version))
10803 (sha256
10804 (base32
10805 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10806 (build-system ruby-build-system)
10807 (arguments
10808 ;; No tests
10809 `(#:tests? #f))
10810 (propagated-inputs
10811 `(("ruby-eventmachine" ,ruby-eventmachine)
10812 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10813 (native-inputs
10814 `(("bundler" ,bundler)
10815 ("ruby-rspec" ,ruby-rspec)))
10816 (home-page "https://github.com/igrigorik/em-websocket")
10817 (synopsis "EventMachine based WebSocket server")
10818 (description "Em-websocket is an EventMachine based WebSocket server
10819 implementation.")
10820 (license license:expat)))
10821
10822 (define-public ruby-rouge
10823 (package
10824 (name "ruby-rouge")
10825 (version "3.21.0")
10826 (source (origin
10827 (method url-fetch)
10828 (uri (rubygems-uri "rouge" version))
10829 (sha256
10830 (base32
10831 "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
10832 (build-system ruby-build-system)
10833 (arguments `(#:tests? #f)); No rakefile
10834 (home-page "http://rouge.jneen.net/")
10835 (synopsis "Code highlighter")
10836 (description "Rouge is a code highlighter written in Ruby. It supports more
10837 than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10838 is compatible with stylesheets designed for pygments.")
10839 (license (list
10840 ;; rouge is licensed under expat
10841 license:expat
10842 ;; pygments is licensed under bsd-2
10843 license:bsd-2))))
10844
10845 (define-public ruby-rouge-2
10846 (package
10847 (inherit ruby-rouge)
10848 (version "2.2.1")
10849 (source (origin
10850 (method url-fetch)
10851 (uri (rubygems-uri "rouge" version))
10852 (sha256
10853 (base32
10854 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
10855
10856 (define-public ruby-hashie
10857 (package
10858 (name "ruby-hashie")
10859 (version "3.6.0")
10860 (source (origin
10861 (method url-fetch)
10862 (uri (rubygems-uri "hashie" version))
10863 (sha256
10864 (base32
10865 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10866 (build-system ruby-build-system)
10867 (native-inputs
10868 `(("bundler" ,bundler)))
10869 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10870 (home-page "https://github.com/intridea/hashie")
10871 (synopsis "Extensions to Ruby Hashes")
10872 (description "Hashie is a collection of classes and mixins that make Ruby
10873 hashes more powerful.")
10874 (license license:expat)))
10875
10876 (define-public ruby-heredoc-unindent
10877 (package
10878 (name "ruby-heredoc-unindent")
10879 (version "1.2.0")
10880 (source (origin
10881 (method url-fetch)
10882 (uri (rubygems-uri "heredoc_unindent" version))
10883 (sha256
10884 (base32
10885 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
10886 (build-system ruby-build-system)
10887 (native-inputs
10888 `(("ruby-hoe" ,ruby-hoe)))
10889 (home-page "https://github.com/adrianomitre/heredoc_unindent")
10890 (synopsis "Heredoc indentation cleaner")
10891 (description "This gem removes common margin from indented strings, such
10892 as the ones produced by indented heredocs. In other words, it strips out
10893 leading whitespace chars at the beginning of each line, but only as much as
10894 the line with the smallest margin.
10895
10896 It is acknowledged that many strings defined by heredocs are just code and
10897 fact is that most parsers are insensitive to indentation. If, however, the
10898 strings are to be used otherwise, be it for printing or testing, the extra
10899 indentation will probably be an issue and hence this gem.")
10900 (license license:expat)))
10901
10902 (define-public ruby-safe-yaml
10903 (package
10904 (name "ruby-safe-yaml")
10905 (version "1.0.5")
10906 (source
10907 (origin
10908 (method git-fetch)
10909 (uri (git-reference
10910 (url "https://github.com/dtao/safe_yaml")
10911 (commit version)))
10912 (file-name (git-file-name name version))
10913 (sha256
10914 (base32
10915 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
10916 (build-system ruby-build-system)
10917 (native-inputs
10918 `(("ruby-rspec" ,ruby-rspec)
10919 ("ruby-hashie" ,ruby-hashie)
10920 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
10921 (arguments
10922 '(#:test-target "spec"
10923 #:phases
10924 (modify-phases %standard-phases
10925 (add-before 'check 'set-TZ
10926 (lambda _
10927 ;; This test is dependent on the timezone
10928 ;; spec/transform/to_date_spec.rb:35
10929 ;; # SafeYAML::Transform::ToDate converts times to the local
10930 ;; timezone
10931 (setenv "TZ" "UTC-11")
10932 #t)))))
10933 (home-page "https://github.com/dtao/safe_yaml")
10934 (synopsis "YAML parser")
10935 (description "The SafeYAML gem provides an alternative implementation of
10936 YAML.load suitable for accepting user input in Ruby applications.")
10937 (license license:expat)))
10938
10939 (define-public ruby-mercenary
10940 (package
10941 (name "ruby-mercenary")
10942 (version "0.3.6")
10943 (source (origin
10944 (method url-fetch)
10945 (uri (rubygems-uri "mercenary" version))
10946 (sha256
10947 (base32
10948 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
10949 (build-system ruby-build-system)
10950 (arguments `(#:test-target "spec"))
10951 (native-inputs
10952 `(("bundler" ,bundler)))
10953 (home-page "https://github.com/jekyll/mercenary")
10954 (synopsis "Command-line apps library in Ruby")
10955 (description "Mercenary is a lightweight and flexible library for writing
10956 command-line apps in Ruby.")
10957 (license license:expat)))
10958
10959 (define-public ruby-liquid
10960 (package
10961 (name "ruby-liquid")
10962 (version "4.0.0")
10963 (source (origin
10964 (method url-fetch)
10965 (uri (rubygems-uri "liquid" version))
10966 (sha256
10967 (base32
10968 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
10969 (build-system ruby-build-system)
10970 (arguments `(#:tests? #f)); No rakefile
10971 (home-page "https://shopify.github.io/liquid/")
10972 (synopsis "Template language")
10973 (description "Liquid is a template language written in Ruby. It is used
10974 to load dynamic content on storefronts.")
10975 (license license:expat)))
10976
10977 (define-public ruby-forwardable-extended
10978 (package
10979 (name "ruby-forwardable-extended")
10980 (version "2.6.0")
10981 (source (origin
10982 (method url-fetch)
10983 (uri (rubygems-uri "forwardable-extended" version))
10984 (sha256
10985 (base32
10986 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
10987 (build-system ruby-build-system)
10988 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
10989 (home-page "https://github.com/envygeeks/forwardable-extended")
10990 (synopsis "Delegation to hashes and instance variables in Forwardable")
10991 (description "Forwardable Extended provides more @code{Forwardable}
10992 methods for your source as @code{Forwardable::Extended}.")
10993 (license license:expat)))
10994
10995 (define-public ruby-pathutil
10996 (package
10997 (name "ruby-pathutil")
10998 (version "0.16.2")
10999 (source (origin
11000 (method url-fetch)
11001 (uri (rubygems-uri "pathutil" version))
11002 (sha256
11003 (base32
11004 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
11005 (build-system ruby-build-system)
11006 (propagated-inputs
11007 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
11008 (native-inputs
11009 `(("bundler" ,bundler)
11010 ("ruby-rspec" ,ruby-rspec)))
11011 ;; Fails with: cannot load such file --
11012 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
11013 (arguments `(#:tests? #f))
11014 (home-page "https://github.com/envygeeks/pathutil")
11015 (synopsis "Extended implementation of Pathname")
11016 (description "Pathutil tries to be a faster pure Ruby implementation of
11017 Pathname.")
11018 (license license:expat)))
11019
11020 (define-public jekyll
11021 (package
11022 (name "jekyll")
11023 (version "3.8.6")
11024 (source (origin
11025 (method url-fetch)
11026 (uri (rubygems-uri "jekyll" version))
11027 (sha256
11028 (base32
11029 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
11030 (build-system ruby-build-system)
11031 (arguments
11032 ;; No rakefile, but a test subdirectory.
11033 `(#:tests? #f
11034 #:phases
11035 (modify-phases %standard-phases
11036 (add-before 'build 'fix-i18n
11037 (lambda _
11038 (substitute* ".gemspec"
11039 (("~> 0.7") ">= 0.7")
11040 (("~> 1.14") ">= 1.14"))
11041 #t)))))
11042 (propagated-inputs
11043 `(("ruby-addressable" ,ruby-addressable)
11044 ("ruby-colorator" ,ruby-colorator)
11045 ("ruby-em-websocket" ,ruby-em-websocket)
11046 ("ruby-i18n" ,ruby-i18n)
11047 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
11048 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
11049 ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
11050 ("ruby-liquid" ,ruby-liquid)
11051 ("ruby-mercenary" ,ruby-mercenary)
11052 ("ruby-pathutil" ,ruby-pathutil)
11053 ("ruby-rouge" ,ruby-rouge-2)
11054 ("ruby-safe-yaml" ,ruby-safe-yaml)))
11055 (home-page "https://jekyllrb.com/")
11056 (synopsis "Static site generator")
11057 (description "Jekyll is a simple, blog aware, static site generator.")
11058 (license license:expat)))
11059
11060 (define-public ruby-jekyll-paginate-v2
11061 (package
11062 (name "ruby-jekyll-paginate-v2")
11063 (version "3.0.0")
11064 (source (origin
11065 (method url-fetch)
11066 (uri (rubygems-uri "jekyll-paginate-v2" version))
11067 (sha256
11068 (base32
11069 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
11070 (build-system ruby-build-system)
11071 (propagated-inputs
11072 `(("jekyll" ,jekyll)))
11073 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
11074 (synopsis "Pagination Generator for Jekyll 3")
11075 (description "The Pagination Generator forms the core of the pagination
11076 logic in Jekyll. It calculates and generates the pagination pages.")
11077 (license license:expat)))
11078
11079 (define-public ruby-faraday
11080 (package
11081 (name "ruby-faraday")
11082 (version "0.15.4")
11083 (source
11084 (origin
11085 (method url-fetch)
11086 (uri (rubygems-uri "faraday" version))
11087 (sha256
11088 (base32
11089 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
11090 (build-system ruby-build-system)
11091 (arguments
11092 '(#:tests? #f))
11093 (propagated-inputs
11094 `(("ruby-multipart-post" ,ruby-multipart-post)))
11095 (synopsis "Ruby HTTP/REST API client library")
11096 (description
11097 "Faraday is a HTTP/REST API client library which provides a common
11098 interface over different adapters.")
11099 (home-page "https://github.com/lostisland/faraday")
11100 (license license:expat)))
11101
11102 (define-public ruby-nio4r
11103 (package
11104 (name "ruby-nio4r")
11105 (version "2.5.2")
11106 (source
11107 (origin
11108 (method url-fetch)
11109 (uri (rubygems-uri "nio4r" version))
11110 (sha256
11111 (base32
11112 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
11113 (build-system ruby-build-system)
11114 (arguments
11115 '(#:phases
11116 (modify-phases %standard-phases
11117 (add-after 'unpack 'remove-unnecessary-dependencies
11118 (lambda _
11119 (substitute* "spec/spec_helper.rb"
11120 ;; Coveralls is for uploading test coverage information to an
11121 ;; online service, and thus unnecessary for building the Guix
11122 ;; package
11123 (("require \"coveralls\"") "")
11124 (("Coveralls\\.wear!") "")
11125 ;; Remove rspec/retry as we are not retrying the tests
11126 (("require \"rspec/retry\"") "")
11127 (("config\\.display_try_failure_messages = true") "")
11128 (("config\\.verbose_retry = true") ""))
11129 #t))
11130 (add-before 'check 'compile
11131 (lambda _
11132 (invoke "rake" "compile")
11133 #t))
11134 (replace 'check
11135 (lambda* (#:key tests? #:allow-other-keys)
11136 (when tests?
11137 (invoke "rspec"))
11138 #t)))))
11139 (native-inputs
11140 `(("bundler" ,bundler)
11141 ("ruby-rake-compiler" ,ruby-rake-compiler)
11142 ("ruby-rspec" ,ruby-rspec)
11143 ("ruby-rubocop" ,ruby-rubocop)))
11144 (synopsis "New I/O for Ruby")
11145 (description
11146 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
11147 for scalable network clients and servers.")
11148 (home-page "https://github.com/socketry/nio4r")
11149 (license license:expat)))
11150
11151 (define-public ruby-globalid
11152 (package
11153 (name "ruby-globalid")
11154 (version "0.4.2")
11155 (source
11156 (origin
11157 (method url-fetch)
11158 (uri (rubygems-uri "globalid" version))
11159 (sha256
11160 (base32
11161 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
11162 (build-system ruby-build-system)
11163 (arguments
11164 '(;; No included tests
11165 #:tests? #f))
11166 (propagated-inputs
11167 `(("ruby-activesupport" ,ruby-activesupport)))
11168 (synopsis "Generate URIs idenfitying model instances in Ruby")
11169 (description
11170 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
11171 uniquely identify it.")
11172 (home-page "https://rubyonrails.org/")
11173 (license license:expat)))
11174
11175 (define-public ruby-sprockets
11176 (package
11177 (name "ruby-sprockets")
11178 (version "3.7.2")
11179 (source
11180 (origin
11181 (method url-fetch)
11182 (uri (rubygems-uri "sprockets" version))
11183 (sha256
11184 (base32
11185 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
11186 (build-system ruby-build-system)
11187 (arguments
11188 '(;; No included tests
11189 #:tests? #f))
11190 (propagated-inputs
11191 `(("ruby-concurrent" ,ruby-concurrent)
11192 ("ruby-rack" ,ruby-rack)))
11193 (synopsis "Sprockets is a Rack-based asset packaging system")
11194 (description
11195 "Sprockets is a Rack-based asset packaging system that concatenates and
11196 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
11197 (home-page "https://github.com/rails/sprockets")
11198 (license license:expat)))
11199
11200 (define-public ruby-mustache
11201 (package
11202 (name "ruby-mustache")
11203 (version "1.1.1")
11204 (source
11205 (origin
11206 (method url-fetch)
11207 (uri (rubygems-uri "mustache" version))
11208 (sha256
11209 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
11210 (build-system ruby-build-system)
11211 (native-inputs
11212 `(("ruby-simplecov" ,ruby-simplecov)))
11213 (synopsis "framework-agnostic way to render logic-free views")
11214 (description
11215 "Mustache is a framework-agnostic way to render logic-free views.
11216 Think of Mustache as a replacement for your views. Instead of views
11217 consisting of ERB or HAML with random helpers and arbitrary logic,
11218 your views are broken into two parts: a Ruby class and an HTML
11219 template.")
11220 (home-page "https://github.com/mustache/mustache")
11221 (license license:expat)))
11222
11223 (define-public ruby-mustermann
11224 (package
11225 (name "ruby-mustermann")
11226 (version "1.0.3")
11227 (source
11228 (origin
11229 (method url-fetch)
11230 (uri (rubygems-uri "mustermann" version))
11231 (sha256
11232 (base32
11233 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
11234 (build-system ruby-build-system)
11235 (arguments
11236 ;; No tests.
11237 '(#:tests? #f))
11238 (synopsis "Library implementing patterns that behave like regular expressions")
11239 (description "Given a string pattern, Mustermann will turn it into an
11240 object that behaves like a regular expression and has comparable performance
11241 characteristics.")
11242 (home-page "https://github.com/sinatra/mustermann")
11243 (license license:expat)))
11244
11245 (define-public ruby-htmlentities
11246 (package
11247 (name "ruby-htmlentities")
11248 (version "4.3.4")
11249 (source
11250 (origin
11251 (method url-fetch)
11252 (uri (rubygems-uri "htmlentities" version))
11253 (sha256
11254 (base32
11255 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
11256 (build-system ruby-build-system)
11257 (arguments
11258 `(#:phases
11259 (modify-phases %standard-phases
11260 (replace 'check
11261 (lambda _
11262 (map (lambda (file)
11263 (invoke "ruby" "-Itest" file))
11264 (find-files "./test" ".*_test\\.rb")))))))
11265 (synopsis "Encode and decode (X)HTML entities")
11266 (description
11267 "This package provides a module for encoding and decoding (X)HTML
11268 entities.")
11269 (home-page "https://github.com/threedaymonk/htmlentities")
11270 (license license:expat)))
11271
11272 (define-public ruby-sinatra
11273 (package
11274 (name "ruby-sinatra")
11275 (version "2.0.8.1")
11276 (source
11277 (origin
11278 (method url-fetch)
11279 (uri (rubygems-uri "sinatra" version))
11280 (sha256
11281 (base32
11282 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
11283 (build-system ruby-build-system)
11284 (arguments
11285 `(#:phases
11286 (modify-phases %standard-phases
11287 ;; See: https://github.com/sinatra/sinatra/issues/1578.
11288 (add-after 'extract-gemspec 'fix-slow-doc-generation
11289 (lambda _
11290 (substitute* "sinatra.gemspec"
11291 (("\"README.rdoc\"\\.freeze," all)
11292 (string-append all " \"--exclude=.*\\.md\".freeze,")))
11293 #t)))))
11294 (propagated-inputs
11295 `(("ruby-mustermann" ,ruby-mustermann)
11296 ("ruby-rack" ,ruby-rack)
11297 ("ruby-rack-protection" ,ruby-rack-protection)
11298 ("ruby-tilt" ,ruby-tilt)))
11299 (synopsis "DSL for quick web applications creation in Ruby")
11300 (description
11301 "Sinatra is a DSL for quickly creating web applications in Ruby with
11302 minimal effort.")
11303 (home-page "http://sinatrarb.com/")
11304 (license license:expat)))
11305
11306 (define-public ruby-thin
11307 (package
11308 (name "ruby-thin")
11309 (version "1.7.2")
11310 (source
11311 (origin
11312 (method url-fetch)
11313 (uri (rubygems-uri "thin" version))
11314 (sha256
11315 (base32
11316 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
11317 (build-system ruby-build-system)
11318 (arguments
11319 ;; No tests.
11320 '(#:tests? #f))
11321 (propagated-inputs
11322 `(("ruby-daemons" ,ruby-daemons)
11323 ("ruby-eventmachine" ,ruby-eventmachine)
11324 ("ruby-rack" ,ruby-rack)))
11325 (synopsis "Thin and fast web server for Ruby")
11326 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
11327 @itemize
11328 @item the Mongrel parser,
11329 @item Event Machine, a network I/O library with high scalability, performance
11330 and stability,
11331 @item Rack, a minimal interface between webservers and Ruby frameworks.
11332 @end itemize\n")
11333 (home-page "https://github.com/macournoyer/thin")
11334 (license license:ruby)))
11335
11336 (define-public ruby-skinny
11337 (package
11338 (name "ruby-skinny")
11339 (version "0.2.4")
11340 (source
11341 (origin
11342 (method url-fetch)
11343 (uri (rubygems-uri "skinny" version))
11344 (sha256
11345 (base32
11346 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
11347 (build-system ruby-build-system)
11348 (arguments
11349 '(#:tests? #f ; No included tests
11350 #:phases
11351 (modify-phases %standard-phases
11352 (add-before 'build 'patch-gemspec
11353 (lambda _
11354 (substitute* ".gemspec"
11355 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
11356 "<eventmachine>, [\">= 1.0.0\"")
11357 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
11358 #t)))))
11359 (propagated-inputs
11360 `(("ruby-eventmachine" ,ruby-eventmachine)
11361 ("ruby-thin" ,ruby-thin)))
11362 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
11363 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
11364 the Thin library.")
11365 (home-page "https://github.com/sj26/skinny")
11366 (license license:expat)))
11367
11368 (define-public ruby-sys-filesystem
11369 (package
11370 (name "ruby-sys-filesystem")
11371 (version "1.3.4")
11372 (source (origin
11373 (method url-fetch)
11374 (uri (rubygems-uri "sys-filesystem" version))
11375 (sha256
11376 (base32
11377 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
11378 (build-system ruby-build-system)
11379 (arguments
11380 '(#:phases (modify-phases %standard-phases
11381 (add-before 'check 'set-HOME
11382 (lambda _
11383 ;; Some tests attempt to stat $HOME. Let them.
11384 (setenv "HOME" "/tmp")
11385 #t)))))
11386 (propagated-inputs
11387 `(("ruby-ffi" ,ruby-ffi)))
11388 (native-inputs
11389 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
11390 (synopsis "Gather file system information")
11391 (description
11392 "The @code{sys-filesystem} library provides a cross-platform interface
11393 for gathering file system information, such as disk space and mount points.")
11394 (home-page "https://github.com/djberg96/sys-filesystem")
11395 (license license:asl2.0)))
11396
11397 (define-public mailcatcher
11398 (package
11399 (name "mailcatcher")
11400 (version "0.7.1")
11401 (source
11402 (origin
11403 (method url-fetch)
11404 (uri (rubygems-uri "mailcatcher" version))
11405 (sha256
11406 (base32
11407 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
11408 (build-system ruby-build-system)
11409 (arguments
11410 ;; Tests require web/assets which is not included in the output. We
11411 ;; might be able to fix this by adding the Git repository to the GEM_PATH
11412 ;; of the tests. See ruby-mysql2.
11413 '(#:tests? #f
11414 #:phases
11415 (modify-phases %standard-phases
11416 (add-before 'build 'patch-gemspec
11417 (lambda _
11418 (substitute* ".gemspec"
11419 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11420 "<eventmachine>, [\">= 1.0.9.1")
11421 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11422 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11423 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11424 #t))
11425 (add-before 'build 'loosen-dependency-contraint
11426 (lambda _
11427 (substitute* "lib/mail_catcher.rb"
11428 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11429 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11430 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11431 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11432 #t)))))
11433 (inputs
11434 `(("ruby-eventmachine" ,ruby-eventmachine)
11435 ("ruby-mail" ,ruby-mail)
11436 ("ruby-rack" ,ruby-rack)
11437 ("ruby-sinatra" ,ruby-sinatra)
11438 ("ruby-skinny" ,ruby-skinny)
11439 ("ruby-sqlite3" ,ruby-sqlite3)
11440 ("ruby-thin" ,ruby-thin)))
11441 (synopsis "SMTP server which catches messages to display them a browser")
11442 (description
11443 "MailCatcher runs a super simple SMTP server which catches any message
11444 sent to it to display in a web interface. Run mailcatcher, set your favourite
11445 app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11446 then check out http://127.0.0.1:1080 to see the mail.")
11447 (home-page "https://mailcatcher.me")
11448 (license license:expat)))
11449
11450 (define-public ruby-backport
11451 (package
11452 (name "ruby-backport")
11453 (version "1.1.2")
11454 (source
11455 (origin
11456 ;; The gem does not include test code, so fetch from the Git repository.
11457 (method git-fetch)
11458 (uri (git-reference
11459 (url "https://github.com/castwide/backport")
11460 (commit (string-append "v" version))))
11461 (file-name (git-file-name name version))
11462 (sha256
11463 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
11464 (build-system ruby-build-system)
11465 (arguments
11466 `(#:test-target "spec"))
11467 (native-inputs
11468 `(("bundler" ,bundler)
11469 ("ruby-rspec" ,ruby-rspec)))
11470 (inputs
11471 `(("ruby-simplecov" ,ruby-simplecov)))
11472 (synopsis "Pure Ruby library for event-driven IO")
11473 (description
11474 "This package provides a pure Ruby library for event-driven IO.")
11475 (home-page "https://github.com/castwide/backport")
11476 (license license:expat)))
11477
11478 (define-public ruby-json-schema
11479 (package
11480 (name "ruby-json-schema")
11481 (version "2.8.1")
11482 (source
11483 (origin
11484 (method url-fetch)
11485 (uri (rubygems-uri "json-schema" version))
11486 (sha256
11487 (base32
11488 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11489 (build-system ruby-build-system)
11490 (arguments
11491 `(#:tests? #f ; no tests
11492 #:phases
11493 (modify-phases %standard-phases
11494 (replace 'build
11495 (lambda _
11496 (invoke "gem" "build" ".gemspec"))))))
11497 (propagated-inputs
11498 `(("ruby-addressable" ,ruby-addressable)))
11499 (synopsis "Ruby JSON Schema Validator")
11500 (description "This library provides Ruby with an interface for validating
11501 JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11502 support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11503 is also included.")
11504 (home-page "https://github.com/ruby-json-schema/json-schema")
11505 (license license:expat)))
11506
11507 (define-public swagger-diff
11508 (package
11509 (name "swagger-diff")
11510 (version "1.1.2")
11511 (source
11512 (origin
11513 (method url-fetch)
11514 (uri (rubygems-uri "swagger-diff" version))
11515 (sha256
11516 (base32
11517 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11518 (build-system ruby-build-system)
11519 (arguments
11520 `(#:test-target "spec"
11521 #:phases
11522 (modify-phases %standard-phases
11523 ;; Don't run or require rubocop, the code linting tool, as this is a
11524 ;; bit unnecessary.
11525 (add-after 'unpack 'dont-run-rubocop
11526 (lambda _
11527 (substitute* "Rakefile"
11528 ((".*rubocop.*") "")
11529 ((".*RuboCop.*") ""))
11530 #t)))))
11531 (propagated-inputs
11532 `(("ruby-json-schema" ,ruby-json-schema)))
11533 (native-inputs
11534 `(("bundler" ,bundler)
11535 ("ruby-rspec-core" ,ruby-rspec-core)
11536 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
11537 (synopsis
11538 "Compare Open API Initiative specification files")
11539 (description
11540 "Swagger::Diff is a utility for comparing two different Open API
11541 Initiative (OAI) specifications (formerly known as Swagger specifications).
11542 It is intended to determine whether a newer API specification is
11543 backwards-compatible with an older API specification.")
11544 (home-page "https://github.com/civisanalytics/swagger-diff")
11545 (license license:bsd-3)))
11546
11547 (define-public ruby-reverse-markdown
11548 (package
11549 (name "ruby-reverse-markdown")
11550 (version "1.1.0")
11551 (source
11552 (origin
11553 (method url-fetch)
11554 (uri (rubygems-uri "reverse_markdown" version))
11555 (sha256
11556 (base32
11557 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11558 (build-system ruby-build-system)
11559 (propagated-inputs
11560 `(("ruby-nokogiri" ,ruby-nokogiri)))
11561 (native-inputs
11562 `(("bundler" ,bundler)
11563 ("ruby-rspec" ,ruby-rspec)
11564 ("ruby-kramdown" ,ruby-kramdown)
11565 ("ruby-simplecov" ,ruby-simplecov)))
11566 (arguments
11567 `(#:phases
11568 (modify-phases %standard-phases
11569 (replace 'check
11570 (lambda* (#:key tests? #:allow-other-keys)
11571 (when tests?
11572 (invoke "rspec"))
11573 #t)))))
11574 (synopsis "Convert HTML into Markdown")
11575 (description
11576 "This Ruby module allows you to map simple HTML back into
11577 Markdown---e.g., if you want to import existing HTML data in your
11578 application.")
11579 (home-page "https://github.com/xijo/reverse_markdown")
11580 (license license:wtfpl2)))
11581
11582 (define-public ruby-solargraph
11583 (package
11584 (name "ruby-solargraph")
11585 (version "0.36.0")
11586 (source
11587 (origin
11588 (method url-fetch)
11589 (uri (rubygems-uri "solargraph" version))
11590 (sha256
11591 (base32
11592 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
11593 (build-system ruby-build-system)
11594 (propagated-inputs
11595 `(("ruby-backport" ,ruby-backport)
11596 ("bundler" ,bundler)
11597 ("ruby-htmlentities" ,ruby-htmlentities)
11598 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
11599 ("ruby-maruku" ,ruby-maruku)
11600 ("ruby-nokogiri" ,ruby-nokogiri)
11601 ("ruby-parser" ,ruby-parser)
11602 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
11603 ("ruby-rubocop" ,ruby-rubocop)
11604 ("ruby-thor" ,ruby-thor)
11605 ("ruby-tilt" ,ruby-tilt)
11606 ("ruby-yard" ,ruby-yard)))
11607 (native-inputs
11608 `(("ruby-rspec" ,ruby-rspec)
11609 ("ruby-pry" ,ruby-pry)
11610 ("ruby-simplecov" ,ruby-simplecov)
11611 ("ruby-webmock" ,ruby-webmock-2)))
11612 ;; FIXME: can't figure out how to run the tests properly:
11613
11614 ;; An error occurred while loading spec_helper.
11615 ;; Failure/Error: return gem_original_require(path)
11616 ;; LoadError:
11617 ;; cannot load such file -- spec_helper
11618 (arguments
11619 '(#:tests? #f
11620 #:phases
11621 (modify-phases %standard-phases
11622 (replace 'check
11623 (lambda* (#:key tests? #:allow-other-keys)
11624 (when tests?
11625 (invoke "rspec"))
11626 #t)))))
11627 (synopsis
11628 "IDE tools for code completion, inline documentation, and static analysis")
11629 (description
11630 "Solargraph provides a comprehensive suite of tools for Ruby
11631 programming: intellisense, diagnostics, inline documentation, and type
11632 checking.")
11633 (home-page "https://solargraph.org/")
11634 (license license:expat)))
11635
11636 (define-public ruby-wayback-machine-downloader
11637 (package
11638 (name "ruby-wayback-machine-downloader")
11639 (version "2.2.1")
11640 (source
11641 (origin
11642 (method url-fetch)
11643 (uri (rubygems-uri
11644 "wayback_machine_downloader"
11645 version))
11646 (sha256
11647 (base32
11648 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11649 (build-system ruby-build-system)
11650 (arguments
11651 '(#:tests? #f)) ; no tests
11652 (synopsis "Download archived websites from the Wayback Machine")
11653 (description
11654 "Wayback Machine Downloader is a command line tool for downloading
11655 websites from the Internet Archive's Wayback Machine (archive.org).
11656 It allows fine grained control over what to download by specifying
11657 which snapshots to consider and what files to include.")
11658 (home-page
11659 "https://github.com/hartator/wayback-machine-downloader")
11660 (license license:expat)))
11661
11662 (define-public ruby-wwtd
11663 (package
11664 (name "ruby-wwtd")
11665 (version "1.4.1")
11666 (home-page "https://github.com/grosser/wwtd")
11667 (source (origin
11668 (method git-fetch)
11669 (uri (git-reference
11670 (url home-page)
11671 (commit (string-append "v" version))))
11672 (file-name (git-file-name name version))
11673 (sha256
11674 (base32
11675 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11676 (modules '((guix build utils)))
11677 (snippet
11678 '(begin
11679 ;; Remove bundled library.
11680 (delete-file "spec/rake-12.3.0.gem")
11681 #t))))
11682 (build-system ruby-build-system)
11683 (arguments
11684 '(;; XXX: Tests need multiple versions of ruby, wants to run
11685 ;; `bundle install`, etc.
11686 #:tests? #f
11687 #:phases (modify-phases %standard-phases
11688 (replace 'replace-git-ls-files
11689 (lambda _
11690 (substitute* "wwtd.gemspec"
11691 (("git ls-files lib/ bin/`")
11692 "find lib/ bin/ -type f |sort`"))
11693 #t))
11694 (add-before 'check 'remove-version-constraints
11695 (lambda _
11696 (delete-file "Gemfile.lock")
11697 #t))
11698 (replace 'check
11699 (lambda* (#:key tests? #:allow-other-keys)
11700 (if tests?
11701 (invoke "rspec" "spec/")
11702 (format #t "test suite not run~%"))
11703 #t)))))
11704 (native-inputs
11705 `(("ruby-bump" ,ruby-bump)
11706 ("ruby-rspec" ,ruby-rspec)))
11707 (synopsis "Run @file{.travis.yml} files locally")
11708 (description
11709 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
11710 defined in @file{.travis.yml} on your local machine, using @code{rvm},
11711 @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
11712 (license license:expat)))