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")
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")
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")
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")
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.14")
1586 (source
1587 (origin
1588 (method git-fetch)
1589 (uri (git-reference
1590 (url "https://github.com/wvanbergen/chunky_png")
1591 (commit (string-append "v" version))))
1592 (file-name (git-file-name name version))
1593 (sha256
1594 (base32 "1m7y11ix38h5a2pj5v81qdmvqh980ql9hp62hk2dxwkwsa4nh22h"))))
1595 (build-system ruby-build-system)
1596 (arguments
1597 `(#:test-target "spec"
1598 #:phases
1599 (modify-phases %standard-phases
1600 (add-after 'unpack 'disable-bundler
1601 (lambda _
1602 (substitute* (find-files "." "\\.rb$")
1603 (("require.*bundler/setup.*") ""))
1604 #t))
1605 (replace 'replace-git-ls-files
1606 (lambda _
1607 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1608 ;; git ls-files output is merged in ruby-build-system.
1609 (substitute* "chunky_png.gemspec"
1610 (("`git ls-files`")
1611 "`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
1612 #t)))))
1613 (native-inputs
1614 `(("bundler" ,bundler)
1615 ("ruby-rspec" ,ruby-rspec)
1616 ("ruby-standard" ,ruby-standard)
1617 ("ruby-yard" ,ruby-yard)))
1618 (synopsis "Ruby library to handle PNG images")
1619 (description "ChunkyPNG is a pure Ruby library that can read and write
1620 Portable Network Graphics (PNG) images without depending on an external image
1621 library. It tries to be memory efficient and reasonably fast. It has
1622 features such as:
1623 @itemize
1624 @item
1625 Decoding support for any image that the PNG standard allows. This includes all
1626 standard color modes, all bit depths, all transparency, and interlacing and
1627 filtering options.
1628 @item
1629 Encoding support for images of all color modes (true color, grayscale, and
1630 indexed) and transparency for all these color modes. The best color mode is
1631 chosen automatically, based on the amount of used colors.
1632 @item Read/write access to the image's pixels.
1633 @item Read/write access to all image metadata that is stored in chunks.
1634 @item
1635 Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
1636 pixel, depending on the hardware).
1637 @item
1638 Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
1639 integer math and a highly optimized saving routine.
1640 @item Interoperability with RMagick.
1641 @end itemize
1642
1643 ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
1644 loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
1645 Deal with untrusted images in a separate process, e.g., by using @code{fork}
1646 or a background processing library.")
1647 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
1648 (license license:expat)))
1649
1650 (define-public ruby-text-hyphen
1651 (package
1652 (name "ruby-text-hyphen")
1653 (version "1.4.1")
1654 (source
1655 (origin
1656 (method url-fetch)
1657 (uri (rubygems-uri "text-hyphen" version))
1658 (sha256
1659 (base32
1660 "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
1661 (build-system ruby-build-system)
1662 (native-inputs
1663 `(("ruby-hoe" ,ruby-hoe)))
1664 (synopsis "Ruby library to hyphenate words in various languages")
1665 (description "Text::Hyphen is a Ruby library to hyphenate words in various
1666 languages using Ruby-fied versions of TeX hyphenation patterns. It will
1667 properly hyphenate various words according to the rules of the language the
1668 word is written in. The algorithm is based on that of the TeX typesetting
1669 system by Donald E. Knuth.")
1670 (home-page "https://github.com/halostatue/text-hyphen")
1671 ;; The whole is licensed under the Expat license, but parts use various
1672 ;; versions of the LaTeX Project Public License.
1673 (license license:expat)))
1674
1675 (define-public ruby-open-uri-cached
1676 (package
1677 (name "ruby-open-uri-cached")
1678 (version "0.0.5")
1679 (source
1680 (origin
1681 (method url-fetch)
1682 (uri (rubygems-uri "open-uri-cached" version))
1683 (sha256
1684 (base32
1685 "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
1686 (build-system ruby-build-system)
1687 (arguments
1688 `(#:tests? #f)) ;no test suite
1689 (synopsis "OpenURI with transparent disk caching")
1690 (description "OpenURI with transparent disk caching, which is
1691 useful to avoid making excessive queries, for example when scraping
1692 web pages.")
1693 (home-page "https://github.com/tigris/open-uri-cached")
1694 (license license:expat)))
1695
1696 (define-public ruby-asciidoctor-pdf
1697 ;; Use the latest commit, as the last tag doesn't build with the
1698 ;; latest Ruby dependencies in Guix.
1699 (let ((revision "1")
1700 (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
1701 (package
1702 (name "ruby-asciidoctor-pdf")
1703 (version (git-version "1.5.3" revision commit))
1704 (source
1705 (origin
1706 (method git-fetch) ;no test suite in the distributed gem
1707 (uri (git-reference
1708 (url "https://github.com/asciidoctor/asciidoctor-pdf")
1709 (commit commit)))
1710 (file-name (git-file-name name version))
1711 (sha256
1712 (base32
1713 "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
1714 (build-system ruby-build-system)
1715 (arguments
1716 `(#:test-target "spec"
1717 #:phases
1718 (modify-phases %standard-phases
1719 (add-after 'unpack 'remove-failing-tests
1720 ;; Two tests module fail for unknown reasons, *only* when
1721 ;; ran in the build container (see:
1722 ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
1723 (lambda _
1724 (delete-file "spec/audio_spec.rb")
1725 (delete-file "spec/video_spec.rb")
1726 #t))
1727 (add-after 'extract-gemspec 'strip-version-requirements
1728 (lambda _
1729 (substitute* "asciidoctor-pdf.gemspec"
1730 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1731 (string-append stripped "\n")))
1732 #t))
1733 (replace 'replace-git-ls-files
1734 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1735 ;; git ls-files output is merged in ruby-build-system.
1736 (lambda _
1737 (substitute* "asciidoctor-pdf.gemspec"
1738 (("`git ls-files -z`")
1739 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1740 |sort -z|cut -zc3-`"))
1741 #t))
1742 ;; The tests rely on the Gem being installed, so move the check phase
1743 ;; after the install phase.
1744 (delete 'check)
1745 (add-after 'install 'check
1746 (lambda* (#:key outputs tests? #:allow-other-keys)
1747 (let ((new-gem (string-append (assoc-ref outputs "out")
1748 "/lib/ruby/vendor_ruby")))
1749 (setenv "GEM_PATH"
1750 (string-append (getenv "GEM_PATH") ":" new-gem))
1751 (when tests?
1752 (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
1753 #t))))))
1754 (native-inputs
1755 `(("ruby-chunky-png" ,ruby-chunky-png)
1756 ("ruby-coderay" ,ruby-coderay)
1757 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
1758 ("ruby-rouge" ,ruby-rouge)
1759 ("ruby-rspec" ,ruby-rspec)))
1760 (propagated-inputs
1761 `(("ruby-asciidoctor" ,ruby-asciidoctor)
1762 ("ruby-concurrent-ruby" ,ruby-concurrent)
1763 ("ruby-open-uri-cached" ,ruby-open-uri-cached)
1764 ("ruby-prawn" ,ruby-prawn)
1765 ("ruby-prawn-icon" ,ruby-prawn-icon)
1766 ("ruby-prawn-svg" ,ruby-prawn-svg)
1767 ("ruby-prawn-table" ,ruby-prawn-table)
1768 ("ruby-prawn-templates" ,ruby-prawn-templates)
1769 ("ruby-safe-yaml" ,ruby-safe-yaml)
1770 ("ruby-text-hyphen" ,ruby-text-hyphen)
1771 ("ruby-thread-safe" ,ruby-thread-safe)
1772 ("ruby-treetop" ,ruby-treetop)
1773 ("ruby-ttfunk" ,ruby-ttfunk)))
1774 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1775 (description "Asciidoctor PDF is an extension for Asciidoctor that
1776 converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1777 PDF library. It has features such as:
1778 @itemize
1779 @item Direct AsciiDoc to PDF conversion
1780 @item Configuration-driven theme (style and layout)
1781 @item Scalable Vector Graphics (SVG) support
1782 @item PDF document outline (i.e., bookmarks)
1783 @item Table of contents page(s)
1784 @item Document metadata (title, authors, subject, keywords, etc.)
1785 @item Internal cross reference links
1786 @item Syntax highlighting with Rouge, Pygments, or CodeRay
1787 @item Page numbering
1788 @item Customizable running content (header and footer)
1789 @item
1790 “Keep together” blocks (i.e., page breaks avoided in certain block content)
1791 @item Orphaned section titles avoided
1792 @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1793 @item Table border settings honored
1794 @item Font-based icons
1795 @item Custom TrueType (TTF) fonts
1796 @item Double-sided printing mode (margins alternate on recto and verso pages)
1797 @end itemize")
1798 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1799 (license license:expat))))
1800
1801 (define-public ruby-ast
1802 (package
1803 (name "ruby-ast")
1804 (version "2.4.1")
1805 (source
1806 (origin
1807 (method git-fetch) ;no test included in gem from v2.4.1
1808 (uri (git-reference
1809 (url "https://github.com/whitequark/ast")
1810 (commit (string-append "v" version))))
1811 (file-name (git-file-name name version))
1812 (sha256
1813 (base32
1814 "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
1815 (build-system ruby-build-system)
1816 (arguments
1817 '(#:phases
1818 (modify-phases %standard-phases
1819 (add-after 'unpack 'remove-coveralls-requirement
1820 (lambda _
1821 (substitute* "test/helper.rb"
1822 (("require 'coveralls'") "")
1823 (("Coveralls::SimpleCov::Formatter") ""))
1824 #t))
1825 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1826 (lambda _
1827 (substitute* "ast.gemspec"
1828 ((".*coveralls.*") "\n")
1829 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1830 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1831 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1832 #t)))))
1833 (native-inputs
1834 `(("bundler" ,bundler)
1835 ("ruby-simplecov" ,ruby-simplecov)
1836 ("ruby-json-pure" ,ruby-json-pure)
1837 ("ruby-mime-times" ,ruby-mime-types)
1838 ("ruby-yard" ,ruby-yard)
1839 ("ruby-kramdown" ,ruby-kramdown)
1840 ("ruby-rest-client" ,ruby-rest-client)
1841 ("ruby-bacon" ,ruby-bacon)
1842 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1843 ("ruby-racc" ,ruby-racc)))
1844 (synopsis "Library for working with Abstract Syntax Trees")
1845 (description
1846 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1847 It does this through immutable data structures.")
1848 (home-page "https://whitequark.github.io/ast/")
1849 (license license:expat)))
1850
1851 (define-public ruby-sporkmonger-rack-mount
1852 ;; Testing the addressable gem requires a newer commit than that released, so
1853 ;; use an up to date version.
1854 (let ((revision "1")
1855 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1856 (package
1857 (name "ruby-sporkmonger-rack-mount")
1858 (version (git-version "0.8.3" revision commit))
1859 (source (origin
1860 (method git-fetch)
1861 (uri (git-reference
1862 (url "https://github.com/sporkmonger/rack-mount")
1863 (commit commit)))
1864 (file-name (git-file-name name version))
1865 (sha256
1866 (base32
1867 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1868 (build-system ruby-build-system)
1869 (arguments
1870 ;; Tests currently fail so disable them.
1871 ;; https://github.com/sporkmonger/rack-mount/pull/1
1872 `(#:tests? #f))
1873 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1874 (synopsis "Stackable dynamic tree based Rack router")
1875 (description
1876 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1877 continue trying routes if the response returns pass. This allows multiple
1878 routes to be nested or stacked on top of each other.")
1879 (home-page "https://github.com/sporkmonger/rack-mount")
1880 (license license:expat))))
1881
1882 (define-public ruby-ci-reporter
1883 (package
1884 (name "ruby-ci-reporter")
1885 (version "2.0.0")
1886 (source (origin
1887 (method url-fetch)
1888 (uri (rubygems-uri "ci_reporter" version))
1889 (sha256
1890 (base32
1891 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1892 (build-system ruby-build-system)
1893 (arguments
1894 `(#:test-target "rspec"))
1895 (propagated-inputs
1896 `(("ruby-builder" ,ruby-builder)))
1897 (native-inputs
1898 `(("bundler" ,bundler)
1899 ("ruby-rspec" ,ruby-rspec)))
1900 (synopsis "Generate XML reports of runs test")
1901 (description
1902 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1903 you to generate XML reports of your test runs. The resulting files can be
1904 read by a continuous integration system that understands Ant's JUnit report
1905 format.")
1906 (home-page "https://github.com/nicksieger/ci_reporter")
1907 (license license:expat)))
1908
1909 (define-public ruby-contracts
1910 (package
1911 (name "ruby-contracts")
1912 (version "0.16.0")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (rubygems-uri "contracts" version))
1917 (sha256
1918 (base32
1919 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1920 (build-system ruby-build-system)
1921 (arguments
1922 '(#:test-target "spec"
1923 #:phases
1924 (modify-phases %standard-phases
1925 ;; Don't run or require rubocop, the code linting tool, as this is a
1926 ;; bit unnecessary.
1927 (add-after 'unpack 'dont-run-rubocop
1928 (lambda _
1929 (substitute* "Rakefile"
1930 ((".*rubocop.*") "")
1931 ((".*RuboCop.*") ""))
1932 #t)))))
1933 (native-inputs
1934 `(("ruby-rspec" ,ruby-rspec)))
1935 (synopsis "Method contracts for Ruby")
1936 (description
1937 "This library provides contracts for Ruby. A contract describes the
1938 correct inputs and output for a method, and will raise an error if a incorrect
1939 value is found.")
1940 (home-page "https://github.com/egonSchiele/contracts.ruby")
1941 (license license:bsd-2)))
1942
1943 (define-public ruby-crack
1944 (package
1945 (name "ruby-crack")
1946 (version "0.4.3")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (rubygems-uri "crack" version))
1951 (sha256
1952 (base32
1953 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1954 (build-system ruby-build-system)
1955 (arguments
1956 `(#:phases
1957 (modify-phases %standard-phases
1958 (replace 'check
1959 (lambda* (#:key tests? #:allow-other-keys)
1960 (when tests?
1961 (for-each (lambda (file)
1962 (display file)(display "\n")
1963 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1964 (find-files "test" ".*rb$")))
1965 #t)))))
1966 (propagated-inputs
1967 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1968 (synopsis "Simple JSON and XML parsing for Ruby")
1969 (description
1970 "@code{crack} provides really simple JSON and XML parsing, extracted from
1971 code in Merb and Rails.")
1972 (home-page "https://github.com/jnunemaker/crack")
1973 (license license:expat)))
1974
1975 (define-public ruby-cliver
1976 (package
1977 (name "ruby-cliver")
1978 (version "0.3.2")
1979 (source
1980 (origin
1981 (method url-fetch)
1982 (uri (rubygems-uri "cliver" version))
1983 (sha256
1984 (base32
1985 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1986 (build-system ruby-build-system)
1987 (arguments
1988 '(#:phases
1989 (modify-phases %standard-phases
1990 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1991 ;; would be nice, but the tests look to be incompatible:
1992 ;;
1993 ;; NoMethodError: undefined method `last_comment'
1994 (replace 'check
1995 (lambda* (#:key tests? #:allow-other-keys)
1996 (when tests?
1997 (invoke "rspec"))
1998 #t)))))
1999 (native-inputs
2000 `(("bundler" ,bundler)
2001 ("ruby-rspec" ,ruby-rspec-2)))
2002 (synopsis "Assertions for command-line dependencies in Ruby")
2003 (description
2004 "@code{cliver} provides a way to detect missing command-line
2005 dependencies, including versions.")
2006 (home-page "https://github.com/yaauie/cliver")
2007 (license license:expat)))
2008
2009 (define-public ruby-czmq-ffi-gen
2010 (package
2011 (name "ruby-czmq-ffi-gen")
2012 (version "0.13.0")
2013 (source
2014 (origin
2015 (method url-fetch)
2016 (uri (rubygems-uri "czmq-ffi-gen" version))
2017 (sha256
2018 (base32
2019 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2020 (build-system ruby-build-system)
2021 (arguments
2022 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2023 #:phases
2024 (modify-phases %standard-phases
2025 (add-after 'unpack 'patch-lib_dirs
2026 (lambda* (#:key inputs #:allow-other-keys)
2027 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2028 (("lib\\_dirs = \\[.*\\]")
2029 (string-append "lib_dirs = ['"
2030 (assoc-ref inputs "czmq") "/lib"
2031 "']")))
2032 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2033 (("lib\\_dirs = \\[.*\\]")
2034 (string-append "lib_dirs = ['"
2035 (assoc-ref inputs "zeromq") "/lib"
2036 "']"))))))))
2037 (inputs
2038 `(("zeromq" ,zeromq)
2039 ("czmq" ,czmq)))
2040 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
2041 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2042 (description
2043 "These Ruby bindings are not intended to be directly used, but rather
2044 used by higher level bindings like those provided by CZTop.")
2045 (home-page
2046 "https://github.com/paddor/czmq-ffi-gen")
2047 (license license:isc)))
2048
2049 (define-public ruby-cztop
2050 (package
2051 (name "ruby-cztop")
2052 (version "0.12.2")
2053 (source
2054 (origin
2055 (method url-fetch)
2056 (uri (rubygems-uri "cztop" version))
2057 (sha256
2058 (base32
2059 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2060 (build-system ruby-build-system)
2061 (arguments
2062 '(#:test-target "spec"
2063 #:phases
2064 (modify-phases %standard-phases
2065 (add-after 'unpack 'patch-lib_paths
2066 (lambda* (#:key inputs #:allow-other-keys)
2067 (substitute* "lib/cztop/poller/zmq.rb"
2068 (("lib\\_paths = \\[.*\\]")
2069 (string-append "lib_paths = ['"
2070 (assoc-ref inputs "zeromq") "/lib"
2071 "']"))))))))
2072 (native-inputs
2073 `(("bundler" ,bundler)
2074 ("ruby-rspec" ,ruby-rspec)))
2075 (inputs
2076 `(("zeromq" ,zeromq)))
2077 (propagated-inputs
2078 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
2079 (synopsis "CZMQ Ruby bindings")
2080 (description
2081 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2082 CZMQ. The focus of of CZTop is on being easy to use and providing first class
2083 support for security mechanisms.")
2084 (home-page "https://github.com/paddor/cztop")
2085 (license license:isc)))
2086
2087 (define-public ruby-saikuro-treemap
2088 (package
2089 (name "ruby-saikuro-treemap")
2090 (version "0.2.0")
2091 (source (origin
2092 (method url-fetch)
2093 (uri (rubygems-uri "saikuro_treemap" version))
2094 (sha256
2095 (base32
2096 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2097 (build-system ruby-build-system)
2098 ;; Some of the tests fail because the generated JSON has keys in a
2099 ;; different order. This is a problem with the test suite rather than any
2100 ;; of the involved libraries.
2101 (arguments `(#:tests? #f))
2102 (propagated-inputs
2103 `(("ruby-json-pure" ,ruby-json-pure)
2104 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
2105 (synopsis "Generate complexity treemap based on saikuro analysis")
2106 (description
2107 "This gem generates a treemap showing the complexity of Ruby code on
2108 which it is run. It uses Saikuro under the covers to analyze Ruby code
2109 complexity.")
2110 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2111 (license license:expat)))
2112
2113 (define-public ruby-oauth2
2114 (package
2115 (name "ruby-oauth2")
2116 (version "1.4.2")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (rubygems-uri "oauth2" version))
2121 (sha256
2122 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
2123 (build-system ruby-build-system)
2124 (arguments
2125 '(#:tests? #f)) ; no included tests
2126 (propagated-inputs
2127 `(("ruby-faraday" ,ruby-faraday)
2128 ("ruby-jwt" ,ruby-jwt)
2129 ("ruby-multi-json" ,ruby-multi-json)
2130 ("ruby-multi-xml" ,ruby-multi-xml)
2131 ("ruby-rack" ,ruby-rack)))
2132 (synopsis "Ruby wrapper for the OAuth 2.0")
2133 (description
2134 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2135 with a similar style to the original OAuth spec.")
2136 (home-page "https://github.com/oauth-xx/oauth2")
2137 (license license:expat)))
2138
2139 (define-public ruby-omniauth
2140 (package
2141 (name "ruby-omniauth")
2142 (version "1.9.1")
2143 (source
2144 (origin
2145 (method url-fetch)
2146 (uri (rubygems-uri "omniauth" version))
2147 (sha256
2148 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
2149 (build-system ruby-build-system)
2150 (arguments
2151 '(#:tests? #f)) ; No included tests
2152 (propagated-inputs
2153 `(("ruby-hashie" ,ruby-hashie)
2154 ("ruby-rack" ,ruby-rack)))
2155 (synopsis "Generalized Rack framework for multiple-provider authentication")
2156 (description
2157 "This package provides a generalized Rack framework for multiple-provider
2158 authentication.")
2159 (home-page "https://github.com/omniauth/omniauth")
2160 (license license:expat)))
2161
2162 (define-public ruby-omniauth-oauth2
2163 (package
2164 (name "ruby-omniauth-oauth2")
2165 (version "1.6.0")
2166 (source
2167 (origin
2168 (method url-fetch)
2169 (uri (rubygems-uri "omniauth-oauth2" version))
2170 (sha256
2171 (base32
2172 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
2173 (build-system ruby-build-system)
2174 (arguments
2175 '(#:phases
2176 (modify-phases %standard-phases
2177 (add-after 'unpack 'remove-unnecessary-dependencies
2178 (lambda _
2179 ;; The coveralls gem submits coverage information to an online
2180 ;; service, and is unnecessary when running the tests
2181 (substitute* "Gemfile"
2182 ((".*coveralls\"") ""))
2183 (substitute* "spec/helper.rb"
2184 (("require \"coveralls\"") "")
2185 (("Coveralls::SimpleCov::Formatter") ""))
2186 #t)))))
2187 (propagated-inputs
2188 `(("ruby-oauth2" ,ruby-oauth2)
2189 ("ruby-omniauth" ,ruby-omniauth)))
2190 (native-inputs
2191 `(("bundler" ,bundler)
2192 ("ruby-rspec" ,ruby-rspec)
2193 ("ruby-simplecov" ,ruby-simplecov)
2194 ("ruby-rack-test" ,ruby-rack-test)
2195 ("ruby-webmock" ,ruby-webmock-2)))
2196 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2197 (description
2198 "This library provides a generic OAuth2 strategy for OmniAuth. It
2199 doesn't provide a way to gather user information, so should be used as a
2200 building block for authentication strategies.")
2201 (home-page "https://github.com/omniauth/omniauth-oauth2")
2202 (license license:expat)))
2203
2204 (define-public ruby-open4
2205 (package
2206 (name "ruby-open4")
2207 (version "1.3.4")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (rubygems-uri "open4" version))
2212 (sha256
2213 (base32
2214 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2215 (build-system ruby-build-system)
2216 (arguments
2217 '(#:phases
2218 (modify-phases %standard-phases
2219 (add-after 'unpack 'patch
2220 (lambda _
2221 (substitute* "rakefile"
2222 ;; Update the Rakefile so it works
2223 (("-rubygems") "-rrubygems")
2224 (("Config") "RbConfig"))
2225 #t))
2226 (add-before 'check 'set-LIB
2227 (lambda _
2228 ;; This is used in the rakefile when running the tests
2229 (setenv "LIB" "open4")
2230 #t)))))
2231 (synopsis "Open child processes from Ruby and manage them easily")
2232 (description
2233 "@code{Open4} is a Ruby library to run child processes and manage their
2234 input and output.")
2235 (home-page "https://github.com/ahoward/open4")
2236 (license license:ruby)))
2237
2238 (define-public ruby-options
2239 (package
2240 (name "ruby-options")
2241 (version "2.3.2")
2242 (source
2243 (origin
2244 (method url-fetch)
2245 (uri (rubygems-uri "options" version))
2246 (sha256
2247 (base32
2248 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2249 (build-system ruby-build-system)
2250 (arguments
2251 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2252 #:phases
2253 (modify-phases %standard-phases
2254 (add-before 'check 'set-LIB
2255 (lambda _
2256 ;; This is used in the Rakefile, and setting it avoids an issue
2257 ;; with running the tests.
2258 (setenv "LIB" "options")
2259 #t)))))
2260 (synopsis "Ruby library to parse options from *args cleanly")
2261 (description
2262 "The @code{options} library helps with parsing keyword options in Ruby
2263 functions.")
2264 (home-page "https://github.com/ahoward/options")
2265 (license license:ruby)))
2266
2267 (define-public ruby-erubi
2268 (package
2269 (name "ruby-erubi")
2270 (version "1.8.0")
2271 (source
2272 (origin
2273 (method url-fetch)
2274 (uri (rubygems-uri "erubi" version))
2275 (sha256
2276 (base32
2277 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2278 (build-system ruby-build-system)
2279 (synopsis "ERB template engine for Ruby")
2280 (description
2281 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2282 Erubis")
2283 (home-page "https://github.com/jeremyevans/erubi")
2284 (license license:expat)))
2285
2286 (define-public ruby-erubis
2287 (package
2288 (name "ruby-erubis")
2289 (version "2.7.0")
2290 (source
2291 (origin
2292 (method url-fetch)
2293 (uri (rubygems-uri "erubis" version))
2294 (sha256
2295 (base32
2296 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2297 (build-system ruby-build-system)
2298 (arguments
2299 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2300 (synopsis "Implementation of embedded Ruby (eRuby)")
2301 (description
2302 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2303 features such as multi-language support, auto escaping, auto trimming spaces
2304 around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2305 support.")
2306 (home-page "http://www.kuwata-lab.com/erubis/")
2307 (license license:expat)))
2308
2309 (define-public ruby-execjs
2310 (package
2311 (name "ruby-execjs")
2312 (version "2.7.0")
2313 (source
2314 (origin
2315 ;; fetch from github as the gem does not contain testing code
2316 (method git-fetch)
2317 (uri (git-reference
2318 (url "https://github.com/rails/execjs")
2319 (commit (string-append "v" version))))
2320 (file-name (git-file-name name version))
2321 (sha256
2322 (base32
2323 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
2324 (build-system ruby-build-system)
2325 (native-inputs
2326 `(("bundler" ,bundler)
2327 ;; The test suite tests all the available backends. Currenly, this just
2328 ;; means the node backend.
2329 ;;
2330 ;; PASSED: test:node
2331 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
2332 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
2333 ("node" ,node)))
2334 (synopsis "Run JavaScript code from Ruby")
2335 (description
2336 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2337 runtime to evaluate your JavaScript program, then returns the result to you as
2338 a Ruby object.")
2339 (home-page "https://github.com/rails/execjs")
2340 (license license:expat)))
2341
2342 (define-public ruby-fakefs
2343 (package
2344 (name "ruby-fakefs")
2345 (version "1.2.2")
2346 (home-page "https://github.com/fakefs/fakefs")
2347 (source (origin
2348 ;; The Rubygems release does not contain tests.
2349 (method git-fetch)
2350 (uri (git-reference
2351 (url home-page)
2352 (commit (string-append "v" version))))
2353 (file-name (git-file-name name version))
2354 (sha256
2355 (base32
2356 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2357 (build-system ruby-build-system)
2358 (arguments
2359 '(#:phases (modify-phases %standard-phases
2360 (replace 'replace-git-ls-files
2361 (lambda _
2362 (substitute* "fakefs.gemspec"
2363 (("`git ls-files lib README.md LICENSE`")
2364 "`find lib README.md LICENSE -type f | sort`"))
2365 #t))
2366 (add-before 'check 'remove-version-constraints
2367 (lambda _
2368 ;; Drop hard version requirements for test dependencies.
2369 (substitute* "fakefs.gemspec"
2370 (("(.*add_development_dependency .*), .*" _ dep)
2371 (string-append dep "\n")))
2372 #t)))))
2373 (native-inputs
2374 `(("ruby-bump" ,ruby-bump)
2375 ("ruby-maxitest" ,ruby-maxitest)
2376 ("ruby-rubocop" ,ruby-rubocop)
2377 ("ruby-rspec" ,ruby-rspec)))
2378 (synopsis "Fake file system for Ruby")
2379 (description
2380 "This package provides a fake file system for use in test suites. It
2381 avoids the need for manually creating temporary directories, or dealing
2382 with platform intricacies in @code{File} and @code{FileUtils}.")
2383 (license license:expat)))
2384
2385 (define-public ruby-orderedhash
2386 (package
2387 (name "ruby-orderedhash")
2388 (version "0.0.6")
2389 (source (origin
2390 (method url-fetch)
2391 (uri (rubygems-uri "orderedhash" version))
2392 (sha256
2393 (base32
2394 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2395 (build-system ruby-build-system)
2396 (arguments
2397 '(#:tests? #f)) ; no test suite
2398 (synopsis "Ruby library providing an order-preserving hash")
2399 (description "Orderedhash is a Ruby library providing a hash
2400 implementation that preserves the order of items and features some array-like
2401 extensions.")
2402 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2403 (license license:public-domain)))
2404
2405 (define-public ruby-libxml
2406 (package
2407 (name "ruby-libxml")
2408 (version "3.0.0")
2409 (source
2410 (origin
2411 (method url-fetch)
2412 (uri (rubygems-uri "libxml-ruby" version))
2413 (sha256
2414 (base32
2415 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
2416 (build-system ruby-build-system)
2417 (inputs
2418 `(("zlib" ,zlib)
2419 ("libxml2" ,libxml2)))
2420 (arguments
2421 '(#:tests? #f ; test suite hangs for unknown reason
2422 #:gem-flags
2423 (list "--no-document" ; TODO: Re-enable when documentation
2424 ; generation works
2425 "--"
2426 (string-append "--with-xml2-include="
2427 (assoc-ref %build-inputs "libxml2")
2428 "/include/libxml2" ))))
2429 (synopsis "Ruby bindings for GNOME Libxml2")
2430 (description "The Libxml-Ruby project provides Ruby language bindings for
2431 the GNOME Libxml2 XML toolkit.")
2432 (home-page "https://xml4r.github.com/libxml-ruby")
2433 (license license:expat)))
2434
2435 (define-public ruby-lino
2436 (package
2437 (name "ruby-lino")
2438 (version "1.1.0")
2439 (source
2440 (origin
2441 (method url-fetch)
2442 (uri (rubygems-uri "lino" version))
2443 (sha256
2444 (base32
2445 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2446 (build-system ruby-build-system)
2447 (arguments
2448 '(#:tests? #f)) ; No included tests
2449 (propagated-inputs
2450 `(("ruby-hamster" ,ruby-hamster)
2451 ("ruby-open4" ,ruby-open4)))
2452 (synopsis "Build and execute commands in Ruby")
2453 (description
2454 "@code{Lino} provides an interface to run external commands. It provides
2455 an interface to add options as well as managing the standard input, output and
2456 error streams.")
2457 (home-page "https://github.com/tobyclemson/lino")
2458 (license license:expat)))
2459
2460 (define-public ruby-xml-simple
2461 (package
2462 (name "ruby-xml-simple")
2463 (version "1.1.5")
2464 (source (origin
2465 (method url-fetch)
2466 (uri (rubygems-uri "xml-simple" version))
2467 (sha256
2468 (base32
2469 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2470 (build-system ruby-build-system)
2471 (arguments
2472 '(#:tests? #f)) ; no test suite
2473 (synopsis "Simple Ruby library for XML processing")
2474 (description "This library provides a simple API for XML processing in
2475 Ruby.")
2476 (home-page "https://github.com/maik/xml-simple")
2477 (license license:ruby)))
2478
2479 (define-public ruby-thor
2480 (package
2481 (name "ruby-thor")
2482 (version "1.0.1")
2483 (source (origin
2484 ;; Pull from git because the gem has no tests.
2485 (method git-fetch)
2486 (uri (git-reference
2487 (url "https://github.com/erikhuda/thor")
2488 (commit (string-append "v" version))))
2489 (file-name (git-file-name name version))
2490 (sha256
2491 (base32
2492 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2493 (build-system ruby-build-system)
2494 (arguments
2495 '(#:phases (modify-phases %standard-phases
2496 (add-after 'unpack 'fix-readline-tests
2497 (lambda _
2498 ;; Ensure Readline is initialized before running the
2499 ;; test to avoid a type clash with the mock ::Readline.
2500 ;; See <https://github.com/erikhuda/thor/pull/717>.
2501 (substitute* "spec/line_editor/readline_spec.rb"
2502 (("unless defined\\? ::Readline" all)
2503 (string-append "Thor::LineEditor::Readline.available?\n"
2504 all)))
2505 #t))
2506 (add-after 'unpack 'remove-coveralls-dependency
2507 (lambda _
2508 ;; Do not hook the test suite into the online
2509 ;; coveralls service.
2510 (substitute* "Gemfile"
2511 ((".*coveralls.*") ""))
2512 (substitute* "spec/helper.rb"
2513 (("require \"coveralls\"") "")
2514 (("Coveralls::SimpleCov::Formatter") "")
2515 ;; Also drop the WebMock dependency which is only
2516 ;; present to allow a coveralls.io connection, and
2517 ;; would otherwise introduce a circular dependency.
2518 (("require \"webmock/rspec\"") "")
2519 (("WebMock\\.disable_net_connect.*") ""))
2520 #t))
2521 (add-after 'unpack 'disable-network-tests
2522 (lambda _
2523 ;; These tests attempt to look up example.com.
2524 (substitute* "spec/actions/file_manipulation_spec.rb"
2525 (("it \"accepts (https?) remote sources" _ proto)
2526 (string-append "xit \"accepts " proto " remote sources")))
2527 #t))
2528 (add-after 'unpack 'disable-quality-tests
2529 (lambda _
2530 ;; These tests attempt to check the git repository for
2531 ;; tabs vs spaces, double vs single quotes, etc, and
2532 ;; depend on the git checkout.
2533 (delete-file "spec/quality_spec.rb")
2534 #t))
2535 (add-before 'check 'make-files-writable
2536 (lambda _
2537 ;; The tests needs rw access to the test suite.
2538 (for-each make-file-writable (find-files "spec"))
2539 #t))
2540 (replace 'check
2541 (lambda _
2542 (invoke "rspec" "spec"))))))
2543 (native-inputs
2544 `(("ruby-rspec" ,ruby-rspec)
2545 ("ruby-simplecov" ,ruby-simplecov)))
2546 (synopsis "Ruby toolkit for building command-line interfaces")
2547 (description "Thor is a toolkit for building powerful command-line
2548 interfaces.")
2549 (home-page "http://whatisthor.com/")
2550 (license license:expat)))
2551
2552 (define-public ruby-lumberjack
2553 (package
2554 (name "ruby-lumberjack")
2555 (version "1.0.13")
2556 (source (origin
2557 (method url-fetch)
2558 (uri (rubygems-uri "lumberjack" version))
2559 (sha256
2560 (base32
2561 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
2562 (build-system ruby-build-system)
2563 (native-inputs
2564 `(("ruby-rspec" ,ruby-rspec)
2565 ("ruby-timecop" ,ruby-timecop)))
2566 (synopsis "Logging utility library for Ruby")
2567 (description "Lumberjack is a simple logging utility that can be a drop in
2568 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2569 for automatically rolling log files even with multiple processes writing the
2570 same log file.")
2571 (home-page "https://github.com/bdurand/lumberjack")
2572 (license license:expat)))
2573
2574 (define-public ruby-rbnacl
2575 (package
2576 (name "ruby-rbnacl")
2577 (version "6.0.1")
2578 (source
2579 (origin
2580 (method url-fetch)
2581 (uri (rubygems-uri "rbnacl" version))
2582 (sha256
2583 (base32
2584 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2585 (build-system ruby-build-system)
2586 (arguments
2587 `(#:phases
2588 (modify-phases %standard-phases
2589 (add-after 'unpack 'remove-unnecessary-dependencies
2590 (lambda _
2591 ;; Coveralls relates to a network service, and Rubocop to code
2592 ;; linting and both are unnecessary to run the tests
2593 (substitute* "Gemfile"
2594 ((".*rubocop.*") "\n")
2595 ((".*guard-rspec.*") "\n")
2596 ((".*coveralls.*") "\n"))
2597 (substitute* "spec/spec_helper.rb"
2598 (("require \"coveralls\"") "")
2599 (("Coveralls.wear!") ""))
2600 #t))
2601 (add-after 'unpack 'use-libsodium-from-store
2602 (lambda* (#:key inputs #:allow-other-keys)
2603 (substitute* '("lib/rbnacl/init.rb"
2604 "lib/rbnacl/sodium.rb")
2605 (("ffi_lib \\[.+\\]")
2606 (string-append "ffi_lib [\""
2607 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2608 "\"]")))
2609 #t))
2610 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2611 (replace 'check
2612 (lambda* (#:key tests? #:allow-other-keys)
2613 (when tests?
2614 (invoke "rspec"))
2615 #t)))))
2616 (propagated-inputs
2617 `(("ruby-ffi" ,ruby-ffi)))
2618 (inputs
2619 `(("libsodium" ,libsodium)))
2620 (native-inputs
2621 `(("bundler" ,bundler)
2622 ("ruby-rspec" ,ruby-rspec)))
2623 (synopsis "Ruby FFI binding to libsodium")
2624 (description
2625 "This package provides Ruby FFI bindings to the Networking and
2626 Cryptography (NaCl) library, also known as libsodium. This provides a
2627 high-level toolkit for building cryptographic systems and protocols.")
2628 (home-page "https://github.com/crypto-rb/rbnacl")
2629 (license license:expat)))
2630
2631 (define-public ruby-nenv
2632 (package
2633 (name "ruby-nenv")
2634 (version "0.3.0")
2635 (source (origin
2636 (method url-fetch)
2637 (uri (rubygems-uri "nenv" version))
2638 (sha256
2639 (base32
2640 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
2641 (build-system ruby-build-system)
2642 (arguments
2643 `(#:tests? #f)) ; no tests included
2644 (native-inputs
2645 `(("ruby-rspec" ,ruby-rspec)
2646 ("bundler" ,bundler)))
2647 (synopsis "Ruby interface for modifying the environment")
2648 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2649 and inspect the environment.")
2650 (home-page "https://github.com/e2/nenv")
2651 (license license:expat)))
2652
2653 (define-public ruby-ptools
2654 (package
2655 (name "ruby-ptools")
2656 (version "1.3.5")
2657 (source (origin
2658 (method url-fetch)
2659 (uri (rubygems-uri "ptools" version))
2660 (sha256
2661 (base32
2662 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2663 (build-system ruby-build-system)
2664 (arguments
2665 '(#:phases (modify-phases %standard-phases
2666 (add-after 'unpack 'patch-/bin/ls
2667 (lambda _
2668 (substitute* "test/test_binary.rb"
2669 (("/bin/ls")
2670 (which "ls")))
2671 #t))
2672 (add-before 'install 'create-gem
2673 (lambda _
2674 ;; Do not attempt to sign the gem.
2675 (substitute* "Rakefile"
2676 (("spec\\.signing_key = .*")
2677 ""))
2678 (invoke "rake" "gem:create"))))))
2679 (synopsis "Extra methods for Ruby's @code{File} class")
2680 (description
2681 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2682 class with many additional methods modelled after common POSIX tools, such as
2683 @code{File.which} for finding executables, @code{File.tail} to print the last
2684 lines of a file, @code{File.wc} to count words, and so on.")
2685 (home-page "https://github.com/djberg96/ptools")
2686 (license license:artistic2.0)))
2687
2688 (define-public ruby-permutation
2689 (package
2690 (name "ruby-permutation")
2691 (version "0.1.8")
2692 (source (origin
2693 (method url-fetch)
2694 (uri (rubygems-uri "permutation" version))
2695 (sha256
2696 (base32
2697 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2698 (build-system ruby-build-system)
2699 (arguments
2700 `(#:phases
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'fix-rakefile
2703 (lambda _
2704 (substitute* "Rakefile"
2705 (("require 'rake/gempackagetask'")
2706 "require 'rubygems/package_task'")
2707 (("include Config") ""))
2708 #t))
2709 (replace 'check
2710 (lambda _
2711 (invoke "ruby" "-Ilib" "test/test.rb"))))))
2712 (synopsis "Library to perform operations with sequence permutations")
2713 (description "This package provides a Ruby library to perform different
2714 operations with permutations of sequences, such as strings and arrays.")
2715 (home-page "https://flori.github.io/permutation")
2716 (license license:gpl2))) ; GPL 2 only
2717
2718 (define-public ruby-shellany
2719 (package
2720 (name "ruby-shellany")
2721 (version "0.0.1")
2722 (source (origin
2723 (method url-fetch)
2724 (uri (rubygems-uri "shellany" version))
2725 (sha256
2726 (base32
2727 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2728 (build-system ruby-build-system)
2729 (arguments
2730 `(#:test-target "default"
2731 #:phases
2732 (modify-phases %standard-phases
2733 (add-after 'unpack 'fix-version-test
2734 (lambda _
2735 (substitute* "spec/shellany_spec.rb"
2736 (("^RSpec") "require \"shellany\"\nRSpec"))
2737 #t)))))
2738 (native-inputs
2739 `(("ruby-rspec" ,ruby-rspec)
2740 ("ruby-nenv" ,ruby-nenv)
2741 ("bundler" ,bundler)))
2742 (synopsis "Capture command output")
2743 (description "Shellany is a Ruby library providing functions to capture
2744 the output produced by running shell commands.")
2745 (home-page "https://rubygems.org/gems/shellany")
2746 (license license:expat)))
2747
2748 (define-public ruby-notiffany
2749 (package
2750 (name "ruby-notiffany")
2751 (version "0.1.3")
2752 (source (origin
2753 (method url-fetch)
2754 (uri (rubygems-uri "notiffany" version))
2755 (sha256
2756 (base32
2757 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
2758 (build-system ruby-build-system)
2759 ;; Tests are not included in the gem.
2760 (arguments `(#:tests? #f))
2761 (propagated-inputs
2762 `(("ruby-shellany" ,ruby-shellany)
2763 ("ruby-nenv" ,ruby-nenv)))
2764 (native-inputs
2765 `(("bundler" ,bundler)))
2766 (synopsis "Wrapper library for notification libraries")
2767 (description "Notiffany is a Ruby wrapper library for notification
2768 libraries such as Libnotify.")
2769 (home-page "https://github.com/guard/notiffany")
2770 (license license:expat)))
2771
2772 (define-public ruby-forking-test-runner
2773 (package
2774 (name "ruby-forking-test-runner")
2775 (version "1.6.0")
2776 (home-page "https://github.com/grosser/forking_test_runner")
2777 (source (origin
2778 (method git-fetch)
2779 (uri (git-reference (url home-page)
2780 (commit (string-append "v" version))))
2781 (file-name (git-file-name name version))
2782 (sha256
2783 (base32
2784 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2785 (build-system ruby-build-system)
2786 (arguments
2787 '(#:test-target "spec"
2788 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2789 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2790 #:tests? #f
2791 #:phases (modify-phases %standard-phases
2792 (replace 'replace-git-ls-files
2793 (lambda _
2794 (substitute* "forking_test_runner.gemspec"
2795 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2796 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2797 #t))
2798 (add-before 'check 'remove-version-constraints
2799 (lambda _
2800 ;; Ignore hard coded version constraints for the tests.
2801 (delete-file "Gemfile.lock")
2802 #t))
2803 (add-before 'check 'set-HOME
2804 (lambda _
2805 ;; Many tests invoke Bundler, and fails when Bundler
2806 ;; warns that /homeless-shelter does not exist.
2807 (setenv "HOME" "/tmp")
2808 #t)))))
2809 (native-inputs
2810 `(("ruby-activerecord" ,ruby-activerecord)
2811 ("ruby-bump" ,ruby-bump)
2812 ("ruby-rspec" ,ruby-rspec)
2813 ("ruby-sqlite3" ,ruby-sqlite3)
2814 ("ruby-wwtd" ,ruby-wwtd)))
2815 (propagated-inputs
2816 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2817 (synopsis "Run every test in a fork")
2818 (description
2819 "This package is a wrapper around @code{parallel_tests} that runs every
2820 test in a fork to avoid pollution and get clean output per test.")
2821 (license license:expat)))
2822
2823 (define-public ruby-formatador
2824 (package
2825 (name "ruby-formatador")
2826 (version "0.2.5")
2827 (source (origin
2828 (method url-fetch)
2829 (uri (rubygems-uri "formatador" version))
2830 (sha256
2831 (base32
2832 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2833 (build-system ruby-build-system)
2834 ;; Circular dependency: Tests require ruby-shindo, which requires
2835 ;; ruby-formatador at runtime.
2836 (arguments `(#:tests? #f))
2837 (synopsis "Ruby library to format text on stdout")
2838 (description "Formatador is a Ruby library to format text printed to the
2839 standard output stream.")
2840 (home-page "https://github.com/geemus/formatador")
2841 (license license:expat)))
2842
2843 (define-public ruby-fuubar
2844 (package
2845 (name "ruby-fuubar")
2846 (version "2.3.2")
2847 (source
2848 (origin
2849 ;; Fetch from the git repository, as the gem package doesn't include
2850 ;; the tests.
2851 (method git-fetch)
2852 (uri (git-reference
2853 (url "https://github.com/thekompanee/fuubar")
2854 (commit (string-append "releases/v" version))))
2855 (file-name (git-file-name name version))
2856 (sha256
2857 (base32
2858 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2859 (build-system ruby-build-system)
2860 (arguments
2861 '(;; TODO: Some tests fail, unsure why.
2862 ;; 21 examples, 7 failures
2863 #:tests? #f
2864 #:phases
2865 (modify-phases %standard-phases
2866 (add-before 'build 'delete-certificate
2867 (lambda _
2868 ;; Remove 's.cert_chain' as we do not build with a private key
2869 (substitute* "fuubar.gemspec"
2870 ((".*cert_chain.*") "")
2871 ((".*signing_key.*") ""))
2872 #t))
2873 (replace 'check
2874 (lambda* (#:key tests? #:allow-other-keys)
2875 (when tests?
2876 (invoke "rspec"))
2877 #t)))))
2878 (native-inputs
2879 `(("bundler" ,bundler)))
2880 (propagated-inputs
2881 `(("ruby-rspec-core" ,ruby-rspec-core)
2882 ("ruby-progressbar" ,ruby-progressbar)))
2883 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2884 (description
2885 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2886 string of letters and dots as feedback. It also stops on the first test
2887 failure.")
2888 (home-page "https://github.com/thekompanee/fuubar")
2889 (license license:expat)))
2890
2891 (define-public ruby-haml
2892 (package
2893 (name "ruby-haml")
2894 (version "5.0.4")
2895 (source
2896 (origin
2897 (method url-fetch)
2898 (uri (rubygems-uri "haml" version))
2899 (sha256
2900 (base32
2901 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2902 (build-system ruby-build-system)
2903 (arguments
2904 '(#:tests? #f)) ; No included tests
2905 (propagated-inputs
2906 `(("ruby-tilt" ,ruby-tilt)
2907 ("ruby-temple" ,ruby-temple)))
2908 (synopsis "Haml is a Ruby library to generate HTML documents")
2909 (description
2910 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2911 HTML or XML that is designed to express the structure of documents using
2912 indentation rather than closing tags. It was originally envisioned as a
2913 plugin for Ruby on Rails, but it can function as a stand-alone templating
2914 engine.")
2915 (home-page "http://haml.info/")
2916 (license license:expat)))
2917
2918 (define-public ruby-hamster
2919 (package
2920 (name "ruby-hamster")
2921 (version "3.0.0")
2922 (source
2923 (origin
2924 (method url-fetch)
2925 (uri (rubygems-uri "hamster" version))
2926 (sha256
2927 (base32
2928 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2929 (build-system ruby-build-system)
2930 (arguments
2931 '(#:phases
2932 (modify-phases %standard-phases
2933 (add-after 'unpack 'remove-unnecessary-dependencies
2934 (lambda _
2935 ;; pry is a debugging tool, and is unnecessary when running the
2936 ;; tests
2937 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2938 (("require 'pry'") ""))
2939 (substitute* "spec/spec_helper.rb"
2940 (("require \"pry\"") "")
2941 ;; CodeClimate is an online service, and is unnecessary for
2942 ;; running the tests
2943 (("require \"codeclimate-test-reporter\"") "")
2944 (("CodeClimate.*\n") ""))
2945 #t))
2946 ;; No Rakefile is included, so run rspec directly.
2947 (replace 'check
2948 (lambda* (#:key tests? #:allow-other-keys)
2949 (when tests?
2950 (invoke "rspec"))
2951 #t)))))
2952 (propagated-inputs
2953 `(("ruby-concurrent" ,ruby-concurrent)))
2954 (native-inputs
2955 `(("ruby-rspec" ,ruby-rspec)))
2956 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2957 (description
2958 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2959 @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2960 immutable queue or stack).")
2961 (home-page "https://github.com/hamstergem/hamster")
2962 (license license:expat)))
2963
2964 (define-public ruby-hashdiff
2965 (package
2966 (name "ruby-hashdiff")
2967 (version "0.3.8")
2968 (source
2969 (origin
2970 (method url-fetch)
2971 (uri (rubygems-uri "hashdiff" version))
2972 (sha256
2973 (base32
2974 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2975 (build-system ruby-build-system)
2976 (arguments
2977 '(#:phases
2978 (modify-phases %standard-phases
2979 ;; Run tests directly via rspec to avoid Rake issue:
2980 ;; NoMethodError: undefined method `last_comment'
2981 (replace 'check
2982 (lambda* (#:key tests? #:allow-other-keys)
2983 (when tests?
2984 (invoke "rspec"))
2985 #t)))))
2986 (native-inputs
2987 `(("bundler" ,bundler)
2988 ("ruby-rspec" ,ruby-rspec-2)))
2989 (synopsis "HashDiff computes the smallest difference between two hashes")
2990 (description
2991 "HashDiff is a Ruby library to compute the smallest difference between
2992 two hashes.")
2993 (home-page "https://github.com/liufengyun/hashdiff")
2994 (license license:expat)))
2995
2996 (define-public ruby-hydra
2997 ;; No releases yet.
2998 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2999 (revision "0"))
3000 (package
3001 (name "ruby-hydra")
3002 (version (git-version "0.0" revision commit))
3003 (home-page "https://github.com/hyphenation/hydra")
3004 (source (origin
3005 (method git-fetch)
3006 (uri (git-reference (url home-page) (commit commit)))
3007 (file-name (git-file-name name version))
3008 (sha256
3009 (base32
3010 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3011 (build-system ruby-build-system)
3012 (arguments
3013 '(#:phases (modify-phases %standard-phases
3014 (add-after 'unpack 'make-files-writable
3015 (lambda _
3016 (for-each make-file-writable (find-files "."))
3017 #t))
3018 (replace 'check
3019 (lambda _
3020 (invoke "rspec"))))))
3021 (native-inputs
3022 `(("ruby-rspec" ,ruby-rspec)))
3023 (propagated-inputs
3024 `(("ruby-byebug" ,ruby-byebug)))
3025 (synopsis "Ruby hyphenation patterns")
3026 (description
3027 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
3028 (license license:expat))))
3029
3030 (define-public ruby-shindo
3031 (package
3032 (name "ruby-shindo")
3033 (version "0.3.8")
3034 (source (origin
3035 (method url-fetch)
3036 (uri (rubygems-uri "shindo" version))
3037 (sha256
3038 (base32
3039 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
3040 (build-system ruby-build-system)
3041 (arguments
3042 `(#:test-target "shindo_tests"
3043 #:phases
3044 (modify-phases %standard-phases
3045 (add-after 'unpack 'fix-tests
3046 (lambda _
3047 (substitute* "tests/tests_helper.rb"
3048 (("-rubygems") ""))
3049 (substitute* "Rakefile"
3050 (("system \"shindo") "system \"./bin/shindo")
3051 ;; This test doesn't work, so we disable it.
3052 (("fail \"The build_error test should fail") "#")
3053 ((" -rubygems") ""))
3054 #t)))))
3055 (propagated-inputs
3056 `(("ruby-formatador" ,ruby-formatador)))
3057 (synopsis "Simple depth first Ruby testing")
3058 (description "Shindo is a simple depth first testing library for Ruby.")
3059 (home-page "https://github.com/geemus/shindo")
3060 (license license:expat)))
3061
3062 (define-public ruby-rubygems-tasks
3063 (package
3064 (name "ruby-rubygems-tasks")
3065 (version "0.2.5")
3066 (source (origin
3067 (method url-fetch)
3068 (uri (rubygems-uri "rubygems-tasks" version))
3069 (sha256
3070 (base32
3071 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
3072 (build-system ruby-build-system)
3073 ;; Tests need Internet access.
3074 (arguments `(#:tests? #f))
3075 (native-inputs
3076 `(("ruby-rspec" ,ruby-rspec)
3077 ("ruby-yard" ,ruby-yard)))
3078 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3079 (description "Rubygems-task provides Rake tasks for managing and releasing
3080 Ruby Gems.")
3081 (home-page "https://github.com/postmodern/rubygems-tasks")
3082 (license license:expat)))
3083
3084 (define-public ruby-rubyzip
3085 (package
3086 (name "ruby-rubyzip")
3087 (version "1.2.1")
3088 (source
3089 (origin
3090 (method url-fetch)
3091 (uri (rubygems-uri "rubyzip" version))
3092 (sha256
3093 (base32
3094 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
3095 (build-system ruby-build-system)
3096 (arguments
3097 '(#:phases
3098 (modify-phases %standard-phases
3099 (add-before 'check 'patch-tests
3100 (lambda* (#:key inputs #:allow-other-keys)
3101 (substitute* "test/gentestfiles.rb"
3102 (("/usr/bin/zip")
3103 (string-append
3104 (assoc-ref inputs "zip") "/bin/zip")))
3105 (substitute* "test/input_stream_test.rb"
3106 (("/usr/bin/env ruby") (which "ruby")))
3107 #t)))))
3108 (native-inputs
3109 `(("bundler" ,bundler)
3110 ("ruby-simplecov" ,ruby-simplecov)
3111 ("zip" ,zip)
3112 ("unzip" ,unzip)))
3113 (synopsis "Ruby module is for reading and writing zip files")
3114 (description
3115 "The rubyzip module provides ways to read from and create zip files.")
3116 (home-page "https://github.com/rubyzip/rubyzip")
3117 (license license:bsd-2)))
3118
3119 (define-public ruby-simplecov-html
3120 (package
3121 (name "ruby-simplecov-html")
3122 (version "0.10.2")
3123 (source (origin
3124 (method url-fetch)
3125 (uri (rubygems-uri "simplecov-html" version))
3126 (sha256
3127 (base32
3128 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
3129 (build-system ruby-build-system)
3130 (arguments `(#:tests? #f)) ; there are no tests
3131 (native-inputs
3132 `(("bundler" ,bundler)))
3133 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3134 (description "This package provides the default HTML formatter for
3135 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3136 (home-page "https://github.com/colszowka/simplecov-html")
3137 (license license:expat)))
3138
3139 (define-public ruby-simplecov
3140 (package
3141 (name "ruby-simplecov")
3142 (version "0.17.1")
3143 (source (origin
3144 (method url-fetch)
3145 (uri (rubygems-uri "simplecov" version))
3146 (sha256
3147 (base32
3148 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
3149 (build-system ruby-build-system)
3150 ;; Simplecov depends on rubocop for code style checking at build time.
3151 ;; Rubocop needs simplecov at build time.
3152 (arguments `(#:tests? #f))
3153 (propagated-inputs
3154 `(("ruby-json" ,ruby-json)
3155 ("ruby-docile" ,ruby-docile)
3156 ("ruby-simplecov-html" ,ruby-simplecov-html)))
3157 (native-inputs
3158 `(("bundler" ,bundler)))
3159 (synopsis "Code coverage framework for Ruby")
3160 (description "SimpleCov is a code coverage framework for Ruby with a
3161 powerful configuration library and automatic merging of coverage across test
3162 suites.")
3163 (home-page "https://github.com/colszowka/simplecov")
3164 (license license:expat)))
3165
3166 (define-public ruby-useragent
3167 (package
3168 (name "ruby-useragent")
3169 (version "0.16.10")
3170 (source (origin
3171 (method url-fetch)
3172 (uri (rubygems-uri "useragent" version))
3173 (sha256
3174 (base32
3175 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
3176 (build-system ruby-build-system)
3177 (arguments
3178 '(#:tests? #f)) ; no test suite
3179 (synopsis "HTTP user agent parser for Ruby")
3180 (description "UserAgent is a Ruby library that parses and compares HTTP
3181 User Agents.")
3182 (home-page "https://github.com/gshutler/useragent")
3183 (license license:expat)))
3184
3185 (define-public ruby-backports
3186 (package
3187 (name "ruby-backports")
3188 (version "3.11.4")
3189 (source
3190 (origin
3191 (method url-fetch)
3192 (uri (rubygems-uri "backports" version))
3193 (sha256
3194 (base32
3195 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
3196 (build-system ruby-build-system)
3197 (arguments
3198 '(;; TODO: This should be default, but there is one test failure
3199 #:test-target "all_spec"))
3200 (native-inputs
3201 `(("ruby-mspec" ,ruby-mspec)
3202 ("ruby-activesupport" ,ruby-activesupport)))
3203 (synopsis "Backports of the features in newer Ruby versions")
3204 (description
3205 "Backports enables more compatibility across Ruby versions by providing
3206 backports of some features.")
3207 (home-page "https://github.com/marcandre/backports")
3208 (license license:expat)))
3209
3210 (define-public ruby-bacon
3211 (package
3212 (name "ruby-bacon")
3213 (version "1.2.0")
3214 (source (origin
3215 (method url-fetch)
3216 (uri (rubygems-uri "bacon" version))
3217 (sha256
3218 (base32
3219 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
3220 (build-system ruby-build-system)
3221 (synopsis "Small RSpec clone")
3222 (description "Bacon is a small RSpec clone providing all essential
3223 features.")
3224 (home-page "https://github.com/chneukirchen/bacon")
3225 (license license:expat)))
3226
3227 (define-public ruby-bacon-bits
3228 (package
3229 (name "ruby-bacon-bits")
3230 (version "0.1.0")
3231 (source
3232 (origin
3233 (method url-fetch)
3234 (uri (rubygems-uri "bacon-bits" version))
3235 (sha256
3236 (base32
3237 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
3238 (build-system ruby-build-system)
3239 (arguments
3240 ;; No tests
3241 '(#:tests? #f))
3242 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
3243 (synopsis "Extensions to Bacon, for disabling tests, before and after
3244 blocks and more")
3245 (description
3246 "This extends the bacon testing framework with useful extensions to
3247 disable tests, have before and after blocks that run once and more.")
3248 (home-page "https://github.com/cldwalker/bacon-bits")
3249 (license license:expat)))
3250
3251 (define-public ruby-bacon-colored-output
3252 (package
3253 (name "ruby-bacon-colored-output")
3254 (version "1.1.1")
3255 (source
3256 (origin
3257 (method url-fetch)
3258 (uri (rubygems-uri "bacon-colored_output" version))
3259 (sha256
3260 (base32
3261 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
3262 (build-system ruby-build-system)
3263 (arguments
3264 '(;; No included tests
3265 #:tests? #f))
3266 (propagated-inputs
3267 `(("ruby-bacon" ,ruby-bacon)))
3268 (synopsis "Colored output for Bacon test framework")
3269 (description
3270 "This package adds color through ANSI escape codes to Bacon test
3271 output.")
3272 (home-page "https://github.com/whitequark/bacon-colored_output")
3273 (license license:expat)))
3274
3275 (define-public ruby-connection-pool
3276 (package
3277 (name "ruby-connection-pool")
3278 (version "2.2.2")
3279 (source (origin
3280 (method url-fetch)
3281 (uri (rubygems-uri "connection_pool" version))
3282 (sha256
3283 (base32
3284 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
3285 (build-system ruby-build-system)
3286 (native-inputs
3287 `(("bundler" ,bundler)))
3288 (synopsis "Generic connection pool for Ruby")
3289 (description "Connection_pool provides a generic connection pooling
3290 interface for Ruby programs.")
3291 (home-page "https://github.com/mperham/connection_pool")
3292 (license license:expat)))
3293
3294 (define-public ruby-fast-gettext
3295 (package
3296 (name "ruby-fast-gettext")
3297 (version "2.0.3")
3298 (home-page "https://github.com/grosser/fast_gettext")
3299 (source (origin
3300 (method git-fetch)
3301 (uri (git-reference (url home-page)
3302 (commit (string-append "v" version))))
3303 (file-name (git-file-name name version))
3304 (sha256
3305 (base32
3306 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
3307 (build-system ruby-build-system)
3308 (arguments
3309 '(#:test-target "spec"
3310 #:phases (modify-phases %standard-phases
3311 (add-before 'check 'remove-version-constraints
3312 (lambda _
3313 (delete-file "Gemfile.lock")
3314 #t))
3315 (add-before 'check 'remove-activerecord-test
3316 (lambda _
3317 ;; FIXME: This test fails because ActiveRecord depends on
3318 ;; a different version of ruby-sqlite than the currently
3319 ;; available one.
3320 (delete-file
3321 "spec/fast_gettext/translation_repository/db_spec.rb")
3322 #t))
3323 (add-before 'check 'disable-i18n-test
3324 (lambda _
3325 ;; XXX: This test checks i18n intricasies with Rails 3 and
3326 ;; automatically disables itself for Rails 4.0, but does
3327 ;; not know about newer versions as it has not been updated
3328 ;; since 2014. Disable for later versions of Rails too.
3329 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
3330 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
3331 "ActiveRecord::VERSION::MINOR == 0"))
3332 "ActiveRecord::VERSION::MAJOR >= 4"))
3333 #t)))))
3334 (native-inputs
3335 `(;; For tests.
3336 ("ruby-activerecord" ,ruby-activerecord)
3337 ("ruby-activesupport" ,ruby-activesupport)
3338 ("ruby-bump" ,ruby-bump)
3339 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
3340 ("ruby-i18n" ,ruby-i18n)
3341 ("ruby-rubocop" ,ruby-rubocop)
3342 ("ruby-rspec" ,ruby-rspec)
3343 ("ruby-single-cov" ,ruby-single-cov)
3344 ("ruby-sqlite3" ,ruby-sqlite3)
3345 ("ruby-wwtd" ,ruby-wwtd)))
3346 (synopsis "Fast implementation of @code{GetText}")
3347 (description
3348 "This package provides an alternative implementation of the Ruby
3349 @code{GetText} library that is approximately 12x faster yet thread safe.")
3350 ;; Some parts are covered by the Ruby license, see file headers.
3351 (license (list license:expat license:ruby))))
3352
3353 (define-public ruby-net-http-persistent
3354 (package
3355 (name "ruby-net-http-persistent")
3356 (version "3.0.0")
3357 (source (origin
3358 (method url-fetch)
3359 (uri (rubygems-uri "net-http-persistent" version))
3360 (sha256
3361 (base32
3362 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
3363 (build-system ruby-build-system)
3364 (native-inputs
3365 `(("ruby-connection-pool" ,ruby-connection-pool)
3366 ("ruby-hoe" ,ruby-hoe)))
3367 (synopsis "Persistent HTTP connection manager")
3368 (description "Net::HTTP::Persistent manages persistent HTTP connections
3369 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3370 (home-page "https://github.com/drbrain/net-http-persistent")
3371 (license license:expat)))
3372
3373 (define-public ruby-power-assert
3374 (package
3375 (name "ruby-power-assert")
3376 (version "1.1.5")
3377 (source (origin
3378 (method url-fetch)
3379 (uri (rubygems-uri "power_assert" version))
3380 (sha256
3381 (base32
3382 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
3383 (build-system ruby-build-system)
3384 (arguments
3385 '(#:tests? #f)) ; No included tests
3386 (native-inputs
3387 `(("bundler" ,bundler)))
3388 (synopsis "Assert library with descriptive assertion messages")
3389 (description "Power-assert is an assertion library providing descriptive
3390 assertion messages for tests.")
3391 (home-page "https://github.com/k-tsj/power_assert")
3392 (license (list license:bsd-2 license:ruby))))
3393
3394 (define-public ruby-powerpack
3395 (package
3396 (name "ruby-powerpack")
3397 (version "0.1.2")
3398 (source
3399 (origin
3400 (method url-fetch)
3401 (uri (rubygems-uri "powerpack" version))
3402 (sha256
3403 (base32
3404 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3405 (build-system ruby-build-system)
3406 (arguments
3407 '(#:test-target "spec"))
3408 (native-inputs
3409 `(("bundler" ,bundler)
3410 ("ruby-rspec" ,ruby-rspec)
3411 ("ruby-yard" ,ruby-yard)))
3412 (synopsis "Useful extensions to core Ruby classes")
3413 (description
3414 "This package provides a few useful extensions to core Ruby classes,
3415 including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3416 @code{String}.")
3417 (home-page "https://github.com/bbatsov/powerpack")
3418 (license license:expat)))
3419
3420 (define-public ruby-locale
3421 (package
3422 (name "ruby-locale")
3423 (version "2.1.2")
3424 (source (origin
3425 (method url-fetch)
3426 (uri (rubygems-uri "locale" version))
3427 (sha256
3428 (base32
3429 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3430 (build-system ruby-build-system)
3431 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3432 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3433 ;; dependency cycle we disable tests.
3434 (arguments `(#:tests? #f))
3435 (native-inputs
3436 `(("bundler" ,bundler)
3437 ("ruby-yard" ,ruby-yard)))
3438 (synopsis "Ruby library providing basic localization APIs")
3439 (description
3440 "Ruby-Locale is the pure ruby library which provides basic APIs for
3441 localization.")
3442 (home-page "https://github.com/ruby-gettext/locale")
3443 (license (list license:lgpl3+ license:ruby))))
3444
3445 (define-public ruby-temple
3446 (package
3447 (name "ruby-temple")
3448 (version "0.8.2")
3449 (source
3450 (origin
3451 (method url-fetch)
3452 (uri (rubygems-uri "temple" version))
3453 (sha256
3454 (base32
3455 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
3456 (build-system ruby-build-system)
3457 (native-inputs
3458 `(("ruby-tilt" ,ruby-tilt)
3459 ("ruby-bacon" ,ruby-bacon)
3460 ("ruby-erubis" ,ruby-erubis)))
3461 (synopsis "Template compilation framework in Ruby")
3462 (description
3463 "Temple is an abstraction and framework for compiling templates to pure
3464 Ruby.")
3465 (home-page "https://github.com/judofyr/temple")
3466 (license license:expat)))
3467
3468 (define-public ruby-text
3469 (package
3470 (name "ruby-text")
3471 (version "1.3.1")
3472 (source (origin
3473 (method url-fetch)
3474 (uri (rubygems-uri "text" version))
3475 (sha256
3476 (base32
3477 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3478 (build-system ruby-build-system)
3479 (synopsis "Collection of text algorithms for Ruby")
3480 (description
3481 "This package provides a collection of text algorithms: Levenshtein,
3482 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
3483 (home-page "https://github.com/threedaymonk/text")
3484 (license license:expat)))
3485
3486 (define-public ruby-gettext
3487 (package
3488 (name "ruby-gettext")
3489 (version "3.1.7")
3490 (source (origin
3491 (method url-fetch)
3492 (uri (rubygems-uri "gettext" version))
3493 (sha256
3494 (base32
3495 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3496 (build-system ruby-build-system)
3497 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3498 ;; which needs ruby-gettext. To break the dependency cycle we disable
3499 ;; tests.
3500 (arguments `(#:tests? #f))
3501 (propagated-inputs
3502 `(("ruby-locale" ,ruby-locale)
3503 ("ruby-text" ,ruby-text)))
3504 (native-inputs
3505 `(("bundler" ,bundler)
3506 ("ruby-yard" ,ruby-yard)))
3507 (synopsis "GNU gettext-like program for Ruby")
3508 (description
3509 "Gettext is a GNU gettext-like program for Ruby. The catalog
3510 file (po-file) used is the same as that used by GNU gettext, allowing you to
3511 use GNU gettext tools for maintenance.")
3512 (home-page "https://ruby-gettext.github.com/")
3513 (license (list license:lgpl3+ license:ruby))))
3514
3515 (define-public ruby-packnga
3516 (package
3517 (name "ruby-packnga")
3518 (version "1.0.4")
3519 (source (origin
3520 (method url-fetch)
3521 (uri (rubygems-uri "packnga" version))
3522 (sha256
3523 (base32
3524 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
3525 (build-system ruby-build-system)
3526 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3527 ;; To break the dependency cycle we disable tests.
3528 (arguments `(#:tests? #f))
3529 (propagated-inputs
3530 `(("ruby-gettext" ,ruby-gettext)
3531 ("ruby-yard" ,ruby-yard)))
3532 (native-inputs
3533 `(("bundler" ,bundler)))
3534 (synopsis "Utility library to package internationalized libraries")
3535 (description
3536 "Packnga is a library to translate to many languages using YARD.")
3537 (home-page "http://ranguba.org/packnga/")
3538 (license license:lgpl2.0+)))
3539
3540 (define-public ruby-test-construct
3541 (package
3542 (name "ruby-test-construct")
3543 (version "2.0.1")
3544 (source
3545 (origin
3546 (method url-fetch)
3547 (uri (rubygems-uri "test_construct" version))
3548 (sha256
3549 (base32
3550 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3551 (build-system ruby-build-system)
3552 (native-inputs
3553 `(("bundler" ,bundler)
3554 ("ruby-mocha" ,ruby-mocha)
3555 ("ruby-rspec" ,ruby-rspec)))
3556 (synopsis "Creates temporary files and directories for testing")
3557 (description
3558 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3559 temporary files and directories during tests.")
3560 (home-page "https://github.com/bhb/test_construct")
3561 (license license:expat)))
3562
3563 (define-public ruby-test-unit
3564 (package
3565 (name "ruby-test-unit")
3566 (version "3.2.5")
3567 (source (origin
3568 (method url-fetch)
3569 (uri (rubygems-uri "test-unit" version))
3570 (sha256
3571 (base32
3572 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3573 (build-system ruby-build-system)
3574 (propagated-inputs
3575 `(("ruby-power-assert" ,ruby-power-assert)))
3576 (native-inputs
3577 `(("bundler" ,bundler)
3578 ("ruby-packnga" ,ruby-packnga)
3579 ("ruby-yard" ,ruby-yard)))
3580 (synopsis "Unit testing framework for Ruby")
3581 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3582 on xUnit principles. These were originally designed by Kent Beck, creator of
3583 extreme programming software development methodology, for Smalltalk's SUnit.
3584 It allows writing tests, checking results and automated testing in Ruby.")
3585 (home-page "https://test-unit.github.io/")
3586 (license (list license:psfl license:ruby))))
3587
3588 (define-public ruby-markaby
3589 (package
3590 (name "ruby-markaby")
3591 (version "0.9.0")
3592 (source
3593 (origin
3594 (method url-fetch)
3595 (uri (rubygems-uri "markaby" version))
3596 (sha256
3597 (base32
3598 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3599 (build-system ruby-build-system)
3600 (arguments
3601 '(#:phases
3602 (modify-phases %standard-phases
3603 ;; Run rspec manually without using the Rakefile, as the versions of
3604 ;; Rake and RSpec 2 are incompatible:
3605 ;;
3606 ;; NoMethodError: undefined method `last_comment'
3607 (replace 'check
3608 (lambda* (#:key tests? #:allow-other-keys)
3609 (when tests?
3610 (invoke "rspec"))
3611 #t)))))
3612 (propagated-inputs
3613 `(("ruby-builder" ,ruby-builder)))
3614 (native-inputs
3615 `(("bundler" ,bundler)
3616 ("ruby-rspec" ,ruby-rspec-2)))
3617 (synopsis "Write HTML pages in pure Ruby")
3618 (description
3619 "Markaby allows writing HTML packages in pure Ruby. This is similar to
3620 the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
3621 mixture of HTML and additional ERB syntax.")
3622 (home-page "https://markaby.github.io/")
3623 (license license:expat)))
3624
3625 (define-public ruby-maruku
3626 (package
3627 (name "ruby-maruku")
3628 (version "0.7.3")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (rubygems-uri "maruku" version))
3633 (sha256
3634 (base32
3635 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3636 (build-system ruby-build-system)
3637 (arguments
3638 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3639 #:tests? #f
3640 #:phases
3641 (modify-phases %standard-phases
3642 (replace 'check
3643 (lambda* (#:key tests? #:allow-other-keys)
3644 (when tests?
3645 (invoke "rspec"))
3646 #t)))))
3647 (native-inputs
3648 `(("ruby-rspec" ,ruby-rspec)
3649 ("ruby-simplecov" ,ruby-simplecov)
3650 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3651 (synopsis "Markdown interpreter in Ruby")
3652 (description
3653 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3654 HTML, and PDF through LaTeX.")
3655 (home-page "https://github.com/bhollis/maruku")
3656 (license license:expat)))
3657
3658 (define-public ruby-metaclass
3659 (package
3660 (name "ruby-metaclass")
3661 (version "0.0.4")
3662 (source (origin
3663 (method url-fetch)
3664 (uri (rubygems-uri "metaclass" version))
3665 (sha256
3666 (base32
3667 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3668 (build-system ruby-build-system)
3669 (arguments
3670 `(#:phases
3671 (modify-phases %standard-phases
3672 (add-after 'unpack 'add-test-unit-to-search-path
3673 (lambda* (#:key inputs #:allow-other-keys)
3674 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3675 (substitute* "Rakefile"
3676 (("t\\.libs << \"test\"" line)
3677 (string-append line "; t.libs << \""
3678 test-unit "/lib/ruby/vendor_ruby"
3679 "/gems/test-unit-"
3680 ,(package-version ruby-test-unit)
3681 "/lib\""))))
3682 #t)))))
3683 (native-inputs
3684 `(("bundler" ,bundler)
3685 ("ruby-test-unit" ,ruby-test-unit)))
3686 (synopsis "Ruby library adding metaclass method to all objects")
3687 (description
3688 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3689 objects.")
3690 (home-page "https://github.com/floehopper/metaclass")
3691 (license license:expat)))
3692
3693 (define-public ruby-mkmf-lite
3694 (package
3695 (name "ruby-mkmf-lite")
3696 (version "0.3.2")
3697 (source (origin
3698 (method url-fetch)
3699 (uri (rubygems-uri "mkmf-lite" version))
3700 (sha256
3701 (base32
3702 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3703 (build-system ruby-build-system)
3704 (propagated-inputs
3705 `(("ruby-ptools" ,ruby-ptools)))
3706 (synopsis "Lightweight alternative to @code{mkmf}")
3707 (description
3708 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3709 for use as a library. It does not create packages, builds, or log files of
3710 any kind. Instead, it provides mixin methods that you can use in FFI or tests
3711 to check for the presence of header files, constants, and so on.")
3712 (home-page "https://github.com/djberg96/mkmf-lite")
3713 (license license:asl2.0)))
3714
3715 (define-public ruby-mspec
3716 (package
3717 (name "ruby-mspec")
3718 (version "1.9.1")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (rubygems-uri "mspec" version))
3723 (sha256
3724 (base32
3725 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3726 (build-system ruby-build-system)
3727 (arguments
3728 '(;; TODO: 3 test failures
3729 ;; ./spec/mocks/mock_spec.rb:82
3730 ;; ./spec/utils/name_map_spec.rb:151
3731 ;; ./spec/utils/name_map_spec.rb:155
3732 #:tests? #f
3733 #:phases
3734 (modify-phases %standard-phases
3735 (add-after 'extract-gemspec 'change-dependency-constraints
3736 (lambda _
3737 (substitute* "mspec.gemspec"
3738 (("rake.*") "rake>)\n")
3739 (("rspec.*") "rspec>)\n"))
3740 #t))
3741 (replace 'check
3742 (lambda* (#:key tests? #:allow-other-keys)
3743 (when tests?
3744 (invoke "rspec" "spec"))
3745 #t)))))
3746 (native-inputs
3747 `(("bundler" ,bundler)
3748 ("ruby-rake" ,ruby-rake)
3749 ("ruby-rspec" ,ruby-rspec)))
3750 (synopsis "MSpec is a specialized framework for RubySpec")
3751 (description
3752 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3753 for basic features. MSpec contains additional features that assist in writing
3754 specs for Ruby implementations in ruby/spec.")
3755 (home-page "http://rubyspec.org")
3756 (license license:expat)))
3757
3758 (define-public ruby-mysql2
3759 (package
3760 (name "ruby-mysql2")
3761 (version "0.5.2")
3762 (source
3763 (origin
3764 (method git-fetch)
3765 (uri (git-reference
3766 (url "https://github.com/brianmario/mysql2")
3767 (commit version)))
3768 (file-name (git-file-name name version))
3769 (sha256
3770 (base32
3771 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3772 (build-system ruby-build-system)
3773 (arguments
3774 '(;; TODO: Tests require a running MySQL/MariaDB service
3775 #:tests? #f
3776 #:phases
3777 (modify-phases %standard-phases
3778 (replace 'replace-git-ls-files
3779 (lambda _
3780 (substitute* "mysql2.gemspec"
3781 (("git ls-files .*`") "find . -type f |sort`"))
3782 #t))
3783 (add-before 'install 'set-MAKEFLAGS
3784 (lambda* (#:key outputs #:allow-other-keys)
3785 (setenv "MAKEFLAGS"
3786 (string-append
3787 "V=1 "
3788 "prefix=" (assoc-ref outputs "out")))
3789 #t))
3790 ;; Move the 'check phase to after 'install, as then you can test
3791 ;; using the installed mysql2 gem in the store.
3792 (delete 'check)
3793 (add-after 'install 'check
3794 (lambda* (#:key outputs tests? #:allow-other-keys)
3795 (setenv "GEM_PATH"
3796 (string-append
3797 (getenv "GEM_PATH")
3798 ":"
3799 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3800 (when tests?
3801 (invoke "rspec"))
3802 #t)))))
3803 (inputs
3804 `(("mariadb-dev" ,mariadb "dev")
3805 ("zlib" ,zlib)))
3806 (native-inputs
3807 `(("ruby-rspec" ,ruby-rspec)
3808 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3809 (synopsis "MySQL library for Ruby, binding to libmysql")
3810 (description
3811 "This package provides a simple, fast MySQL library for Ruby, binding to
3812 libmysql.")
3813 (home-page "https://github.com/brianmario/mysql2")
3814 (license license:expat)))
3815
3816 (define-public ruby-blankslate
3817 (package
3818 (name "ruby-blankslate")
3819 (version "3.1.3")
3820 (source (origin
3821 (method url-fetch)
3822 (uri (rubygems-uri "blankslate" version))
3823 (sha256
3824 (base32
3825 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3826 (build-system ruby-build-system)
3827 (arguments
3828 `(#:phases
3829 (modify-phases %standard-phases
3830 (replace 'check
3831 (lambda _ (invoke "rspec" "spec/"))))))
3832 (native-inputs
3833 `(("bundler" ,bundler)
3834 ("ruby-rspec" ,ruby-rspec)))
3835 (synopsis "Abstract base class with no predefined methods")
3836 (description
3837 "BlankSlate provides an abstract base class with no predefined
3838 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3839 as a base class when writing classes that depend upon
3840 @code{method_missing} (e.g. dynamic proxies).")
3841 (home-page "https://github.com/masover/blankslate")
3842 (license license:expat)))
3843
3844 (define-public ruby-bond
3845 (package
3846 (name "ruby-bond")
3847 (version "0.5.1")
3848 (source
3849 (origin
3850 (method url-fetch)
3851 (uri (rubygems-uri "bond" version))
3852 (sha256
3853 (base32
3854 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3855 (build-system ruby-build-system)
3856 (arguments
3857 ;; The test suite fails (see:
3858 ;; https://github.com/cldwalker/bond/issues/46).
3859 `(#:tests? #f))
3860 (native-inputs
3861 `(("ruby-bacon" ,ruby-bacon)
3862 ("ruby-bacon-bits" ,ruby-bacon-bits)
3863 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3864 (synopsis "Bond can provide custom autocompletion for arguments, methods
3865 and more")
3866 (description
3867 "Bond can autocomplete argument(s) to methods, uniquely completing per
3868 module, per method and per argument. Bond provides a configuration system and
3869 a DSL for creating custom completions and completion rules. Bond can also
3870 load completions that ship with gems. Bond is able to offer more than irb's
3871 completion since it uses the full line of input when completing as opposed to
3872 irb's last-word approach.")
3873 (home-page "http://tagaholic.me/bond/")
3874 (license license:expat)))
3875
3876 (define-public ruby-idn-ruby
3877 (package
3878 (name "ruby-idn-ruby")
3879 (version "0.1.0")
3880 (source
3881 (origin
3882 (method url-fetch)
3883 (uri (rubygems-uri "idn-ruby" version))
3884 (sha256
3885 (base32
3886 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3887 (build-system ruby-build-system)
3888 (arguments
3889 '(#:phases
3890 (modify-phases %standard-phases
3891 (delete 'check)
3892 (add-after 'install 'check
3893 (lambda* (#:key tests? outputs #:allow-other-keys)
3894 (when tests?
3895 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3896 (name-and-version (basename gem-file ".gem")))
3897 (apply invoke
3898 "ruby" "--verbose"
3899 (string-append "-I"
3900 (assoc-ref outputs "out")
3901 "/lib/ruby/vendor_ruby/gems/"
3902 name-and-version
3903 "/lib")
3904 (find-files "./test" ".*\\.rb"))))
3905 #t)))))
3906 (inputs
3907 `(("libidn" ,libidn)))
3908 (synopsis "Ruby Bindings for the GNU LibIDN library")
3909 (description
3910 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3911 Stringprep, Punycode and IDNA specifications. These are used to encode and
3912 decode internationalized domain + names according to the IDNA2003
3913 specifications.
3914
3915 Included are the most important parts of the Stringprep, Punycode and IDNA
3916 APIs like performing Stringprep processings, encoding to and decoding from
3917 Punycode strings and converting entire domain names to and from the ACE
3918 encoded form.")
3919 (home-page "https://github.com/deepfryed/idn-ruby")
3920 (license license:asl2.0)))
3921
3922 (define-public ruby-instantiator
3923 (package
3924 (name "ruby-instantiator")
3925 (version "0.0.7")
3926 (source (origin
3927 (method url-fetch)
3928 (uri (rubygems-uri "instantiator" version))
3929 (sha256
3930 (base32
3931 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
3932 (build-system ruby-build-system)
3933 (arguments
3934 `(#:phases
3935 (modify-phases %standard-phases
3936 (add-after 'unpack 'add-test-unit-to-search-path
3937 (lambda* (#:key inputs #:allow-other-keys)
3938 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3939 (substitute* "Rakefile"
3940 (("t\\.libs << \"test\"" line)
3941 (string-append line "; t.libs << \""
3942 test-unit "/lib/ruby/vendor_ruby"
3943 "/gems/test-unit-"
3944 ,(package-version ruby-test-unit)
3945 "/lib\""))))
3946 #t)))))
3947 (propagated-inputs
3948 `(("ruby-blankslate" ,ruby-blankslate)))
3949 (native-inputs
3950 `(("bundler" ,bundler)
3951 ("ruby-test-unit" ,ruby-test-unit)))
3952 (synopsis "Instantiate an arbitrary Ruby class")
3953 (description
3954 "Instantiator lets you instantiate an arbitrary Ruby class without
3955 knowing anything about the constructor.")
3956 (home-page "https://github.com/floehopper/instantiator")
3957 (license license:expat)))
3958
3959 (define-public ruby-introspection
3960 (package
3961 (name "ruby-introspection")
3962 (version "0.0.4")
3963 (source (origin
3964 (method url-fetch)
3965 (uri (rubygems-uri "introspection" version))
3966 (sha256
3967 (base32
3968 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
3969 (build-system ruby-build-system)
3970 (arguments
3971 `(#:phases
3972 (modify-phases %standard-phases
3973 (add-after 'unpack 'add-test-unit-to-search-path
3974 (lambda* (#:key inputs #:allow-other-keys)
3975 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3976 (substitute* "Rakefile"
3977 (("t\\.libs << \"test\"" line)
3978 (string-append line "; t.libs << \""
3979 test-unit "/lib/ruby/vendor_ruby"
3980 "/gems/test-unit-"
3981 ,(package-version ruby-test-unit)
3982 "/lib\""))))
3983 #t)))))
3984 (propagated-inputs
3985 `(("ruby-instantiator" ,ruby-instantiator)
3986 ("ruby-metaclass" ,ruby-metaclass)))
3987 (native-inputs
3988 `(("bundler" ,bundler)
3989 ("ruby-blankslate" ,ruby-blankslate)
3990 ("ruby-test-unit" ,ruby-test-unit)))
3991 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3992 (description
3993 "Introspection provides tools to inspect the hierarchy of method
3994 definitions on a Ruby object.")
3995 (home-page "https://github.com/floehopper/introspection")
3996 (license license:expat)))
3997
3998 (define-public ruby-redcarpet
3999 (package
4000 (name "ruby-redcarpet")
4001 (version "3.5.0")
4002 (source (origin
4003 (method url-fetch)
4004 (uri (rubygems-uri "redcarpet" version))
4005 (sha256
4006 (base32
4007 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
4008 (build-system ruby-build-system)
4009 (arguments
4010 `(#:phases
4011 (modify-phases %standard-phases
4012 ;; The gem archive does not include the conformance tests.
4013 (add-after 'unpack 'disable-conformance-tests
4014 (lambda _
4015 (substitute* "Rakefile"
4016 (("task :test => %w\\[test:unit test:conformance\\]")
4017 "task :test => %w[test:unit]"))
4018 #t)))))
4019 (native-inputs
4020 `(("bundler" ,bundler)
4021 ("ruby-test-unit" ,ruby-test-unit)
4022 ("ruby-rake-compiler" ,ruby-rake-compiler)))
4023 (synopsis "Extensible Markdown to (X)HTML converter")
4024 (description
4025 "Redcarpet is an extensible Ruby library for Markdown processing and
4026 conversion to (X)HTML.")
4027 (home-page "https://github.com/vmg/redcarpet")
4028 (license license:expat)))
4029
4030 (define-public ruby-rerun
4031 (package
4032 (name "ruby-rerun")
4033 (version "0.13.0")
4034 (source
4035 (origin
4036 (method url-fetch)
4037 (uri (rubygems-uri "rerun" version))
4038 (sha256
4039 (base32
4040 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
4041 (build-system ruby-build-system)
4042 (arguments
4043 '(#:tests? #f)) ; No included tests
4044 (propagated-inputs
4045 `(("ruby-listen" ,ruby-listen)))
4046 (synopsis "Run a process, and restart when some monitored files change")
4047 (description
4048 "Rerun is a tool to launch programs, then monitor the file system, and
4049 restart the program when any of the monitored files change. It's written in
4050 Ruby, but can be used for all programs.")
4051 (home-page "https://github.com/alexch/rerun/")
4052 (license license:expat)))
4053
4054 (define-public ruby-maxitest
4055 (package
4056 (name "ruby-maxitest")
4057 (version "3.6.0")
4058 (home-page "https://github.com/grosser/maxitest")
4059 (source (origin
4060 ;; Pull from git because the gem does not contain tests.
4061 (method git-fetch)
4062 (uri (git-reference
4063 (url home-page)
4064 (commit (string-append "v" version))))
4065 (file-name (git-file-name name version))
4066 (sha256
4067 (base32
4068 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
4069 (build-system ruby-build-system)
4070 (arguments
4071 '(#:test-target "default"
4072 #:phases (modify-phases %standard-phases
4073 (replace 'replace-git-ls-files
4074 (lambda _
4075 (substitute* "maxitest.gemspec"
4076 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
4077 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
4078 #t))
4079 (add-before 'check 'remove-version-constraints
4080 (lambda _
4081 ;; Don't use specific versions of dependencies, instead
4082 ;; take whatever is available in Guix.
4083 (delete-file "Gemfile.lock")
4084 #t))
4085 (add-before 'check 'add-mtest-on-PATH
4086 (lambda _
4087 ;; Tests use 'mtest' which is not automatically added on
4088 ;; PATH.
4089 (setenv "PATH" (string-append (getcwd) "/bin:"
4090 (getenv "PATH")))
4091 #t)))))
4092 (native-inputs
4093 `(("ps" ,procps)
4094 ("ruby-bump" ,ruby-bump)
4095 ("ruby-byebug" ,ruby-byebug)
4096 ("ruby-rspec" ,ruby-rspec)
4097 ("ruby-wwtd" ,ruby-wwtd)))
4098 (propagated-inputs
4099 `(("ruby-minitest" ,ruby-minitest)))
4100 (synopsis "Minitest with extra features")
4101 (description
4102 "Maxitest is a wrapper around Minitest with extra functionality such
4103 as timeouts, an @command{mtest} executable that can run tests by line
4104 number, support for interrupted tests, better backtraces, and more.")
4105 (license license:expat)))
4106
4107 (define-public ruby-mocha
4108 (package
4109 (name "ruby-mocha")
4110 (version "1.11.2")
4111 (source (origin
4112 (method url-fetch)
4113 (uri (rubygems-uri "mocha" version))
4114 (sha256
4115 (base32
4116 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4117 (build-system ruby-build-system)
4118 (arguments
4119 `(#:phases
4120 (modify-phases %standard-phases
4121 (add-before 'check 'remove-rubocop-dependency
4122 (lambda _
4123 ;; Disable dependency on Rubocop, which is just a linter,
4124 ;; and would introduce a circular dependency.
4125 (substitute* "mocha.gemspec"
4126 ((".*rubocop.*")
4127 "true\n"))
4128 #t)))))
4129 (native-inputs
4130 `(("ruby-introspection" ,ruby-introspection)))
4131 (synopsis "Mocking and stubbing library for Ruby")
4132 (description
4133 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
4134 allows mocking and stubbing of methods on real (non-mock) classes.")
4135 (home-page "http://gofreerange.com/mocha/docs")
4136 ;; Mocha can be used with either license at the users choice.
4137 (license (list license:expat license:ruby))))
4138
4139 (define-public ruby-mocha-on-bacon
4140 (package
4141 (name "ruby-mocha-on-bacon")
4142 (version "0.2.3")
4143 (source
4144 (origin
4145 (method url-fetch)
4146 (uri (rubygems-uri "mocha-on-bacon" version))
4147 (sha256
4148 (base32
4149 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
4150 (build-system ruby-build-system)
4151 (arguments
4152 ;; rubygems.org release missing tests
4153 '(#:tests? #f))
4154 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
4155 (synopsis "Mocha adapter for Bacon")
4156 (description
4157 "This package provides a Mocha adapter for Bacon, allowing you to use the
4158 Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
4159 (home-page
4160 "https://github.com/alloy/mocha-on-bacon")
4161 (license license:expat)))
4162
4163 (define-public ruby-net-ssh
4164 (package
4165 (name "ruby-net-ssh")
4166 (version "4.2.0")
4167 (source (origin
4168 (method url-fetch)
4169 (uri (rubygems-uri "net-ssh" version))
4170 (sha256
4171 (base32
4172 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
4173 (build-system ruby-build-system)
4174 (native-inputs
4175 `(("bundler" ,bundler)
4176 ("ruby-mocha" ,ruby-mocha)
4177 ("ruby-test-unit" ,ruby-test-unit)))
4178 (synopsis "Ruby implementation of the SSH2 client protocol")
4179 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
4180 client protocol. It allows you to write programs that invoke and interact
4181 with processes on remote servers, via SSH2.")
4182 (home-page "https://github.com/net-ssh/net-ssh")
4183 (license license:expat)))
4184
4185 (define-public ruby-net-scp
4186 (package
4187 (name "ruby-net-scp")
4188 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
4189 (version "1.2.2.rc2")
4190 (source
4191 (origin
4192 (method git-fetch)
4193 (uri (git-reference
4194 (url "https://github.com/net-ssh/net-scp")
4195 (commit (string-append "v" version))))
4196 (file-name (git-file-name name version))
4197 (sha256
4198 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
4199 (build-system ruby-build-system)
4200 (native-inputs
4201 `(("bundler" ,bundler)
4202 ("ruby-test-unit" ,ruby-test-unit)
4203 ("ruby-mocha" ,ruby-mocha)))
4204 (propagated-inputs
4205 `(("ruby-net-ssh" ,ruby-net-ssh)))
4206 (synopsis "Pure-Ruby SCP client library")
4207 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
4208 client protocol.")
4209 (home-page "https://github.com/net-ssh/net-scp")
4210 (license license:expat)))
4211
4212 (define-public ruby-minitest
4213 (package
4214 (name "ruby-minitest")
4215 (version "5.11.3")
4216 (source (origin
4217 (method url-fetch)
4218 (uri (rubygems-uri "minitest" version))
4219 (sha256
4220 (base32
4221 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
4222 (build-system ruby-build-system)
4223 (native-inputs
4224 `(("ruby-hoe" ,ruby-hoe)))
4225 (synopsis "Small test suite library for Ruby")
4226 (description "Minitest provides a complete suite of Ruby testing
4227 facilities supporting TDD, BDD, mocking, and benchmarking.")
4228 (home-page "https://github.com/seattlerb/minitest")
4229 (license license:expat)))
4230
4231 ;; This is the last release of Minitest 4, which is used by some packages.
4232 (define-public ruby-minitest-4
4233 (package (inherit ruby-minitest)
4234 (version "4.7.5")
4235 (source (origin
4236 (method url-fetch)
4237 (uri (rubygems-uri "minitest" version))
4238 (sha256
4239 (base32
4240 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
4241 (arguments
4242 `(#:phases
4243 (modify-phases %standard-phases
4244 (add-after 'unpack 'remove-unsupported-method
4245 (lambda _
4246 (substitute* "Rakefile"
4247 (("self\\.rubyforge_name = .*") ""))
4248 #t))
4249 (add-after 'build 'exclude-failing-tests
4250 (lambda _
4251 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
4252 ;; Fixnum.
4253 (delete-file "test/minitest/test_minitest_spec.rb")
4254 #t)))))))
4255
4256 (define-public ruby-minitest-around
4257 (package
4258 (name "ruby-minitest-around")
4259 (version "0.5.0")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (rubygems-uri "minitest-around" version))
4264 (sha256
4265 (base32
4266 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
4267 (build-system ruby-build-system)
4268 (arguments
4269 '(#:phases
4270 (modify-phases %standard-phases
4271 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
4272 (lambda _
4273 (substitute* "minitest-around.gemspec"
4274 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
4275 #t)))))
4276 (propagated-inputs
4277 `(("ruby-minitest" ,ruby-minitest)))
4278 (native-inputs
4279 `(("bundler" ,bundler)
4280 ("ruby-cucumber" ,ruby-cucumber)
4281 ("ruby-bump" ,ruby-bump)
4282 ("ruby-test-construct" ,ruby-test-construct)))
4283 (synopsis "Run code around tests in Minitest")
4284 (description
4285 "This library provides a way to run code around tests in Minitest,
4286 written using either the unit test or spec style.")
4287 (home-page "https://github.com/splattael/minitest-around")
4288 (license license:expat)))
4289
4290 (define-public ruby-minitest-sprint
4291 (package
4292 (name "ruby-minitest-sprint")
4293 (version "1.1.0")
4294 (source (origin
4295 (method url-fetch)
4296 (uri (rubygems-uri "minitest-sprint" version))
4297 (sha256
4298 (base32
4299 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
4300 (build-system ruby-build-system)
4301 (native-inputs
4302 `(("ruby-hoe" ,ruby-hoe)
4303 ("ruby-minitest" ,ruby-minitest)))
4304 (synopsis "Fast test suite runner for minitest")
4305 (description "Minitest-sprint is a test runner for minitest that makes it
4306 easier to re-run individual failing tests.")
4307 (home-page "https://github.com/seattlerb/minitest-sprint")
4308 (license license:expat)))
4309
4310 (define-public ruby-minitest-bacon
4311 (package
4312 (name "ruby-minitest-bacon")
4313 (version "1.0.3")
4314 (source (origin
4315 (method url-fetch)
4316 (uri (rubygems-uri "minitest-bacon" version))
4317 (sha256
4318 (base32
4319 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
4320 (build-system ruby-build-system)
4321 (native-inputs
4322 `(("ruby-hoe" ,ruby-hoe)))
4323 (inputs
4324 `(("ruby-minitest" ,ruby-minitest)))
4325 (synopsis "Bacon compatibility library for minitest")
4326 (description "Minitest-bacon extends minitest with bacon-like
4327 functionality, making it easier to migrate test suites from bacon to minitest.")
4328 (home-page "https://github.com/seattlerb/minitest-bacon")
4329 (license license:expat)))
4330
4331 (define-public ruby-minitest-focus
4332 (package
4333 (name "ruby-minitest-focus")
4334 (version "1.1.2")
4335 (source
4336 (origin
4337 (method url-fetch)
4338 (uri (rubygems-uri "minitest-focus" version))
4339 (sha256
4340 (base32
4341 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4342 (build-system ruby-build-system)
4343 (propagated-inputs
4344 `(("ruby-minitest" ,ruby-minitest)))
4345 (native-inputs
4346 `(("ruby-hoe" ,ruby-hoe)))
4347 (synopsis "Allows a few specific tests to be focused on")
4348 (description
4349 "@code{minitest-focus} gives the ability focus on a few tests with ease
4350 without having to use command-line arguments. It introduces a @code{focus}
4351 class method for use in testing classes, specifying that the next defined test
4352 is to be run.")
4353 (home-page "https://github.com/seattlerb/minitest-focus")
4354 (license license:expat)))
4355
4356 (define-public ruby-minitest-pretty-diff
4357 ;; Use git reference because gem is out of date and does not contain testing
4358 ;; script. There are no releases on GitHub.
4359 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4360 (package
4361 (name "ruby-minitest-pretty-diff")
4362 (version (string-append "0.1-1." (string-take commit 8)))
4363 (source (origin
4364 (method git-fetch)
4365 (uri (git-reference
4366 (url "https://github.com/adammck/minitest-pretty_diff")
4367 (commit commit)))
4368 (file-name (string-append name "-" version "-checkout"))
4369 (sha256
4370 (base32
4371 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4372 (build-system ruby-build-system)
4373 (arguments
4374 `(#:phases
4375 (modify-phases %standard-phases
4376 (replace 'check
4377 (lambda _
4378 (invoke "script/test"))))))
4379 (native-inputs
4380 `(("bundler" ,bundler)
4381 ("ruby-turn" ,ruby-turn)))
4382 (synopsis "Pretty-print hashes and arrays in MiniTest")
4383 (description
4384 "@code{minitest-pretty_diff} monkey-patches
4385 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4386 diffing them. This makes it easier to spot differences between nested
4387 structures when tests fail.")
4388 (home-page "https://github.com/adammck/minitest-pretty_diff")
4389 (license license:expat))))
4390
4391 (define-public ruby-minitest-moar
4392 (package
4393 (name "ruby-minitest-moar")
4394 (version "0.0.4")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (rubygems-uri "minitest-moar" version))
4399 (sha256
4400 (base32
4401 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4402 (build-system ruby-build-system)
4403 (arguments
4404 `(#:phases
4405 (modify-phases %standard-phases
4406 (add-before 'check 'clean-dependencies
4407 (lambda _
4408 ;; Remove all gems defined in the Gemfile because these are not
4409 ;; truly needed.
4410 (substitute* "Gemfile"
4411 (("gem .*") ""))
4412 ;; Remove byebug as not needed to run tests.
4413 (substitute* "test/test_helper.rb"
4414 (("require 'byebug'") ""))
4415 #t)))))
4416 (native-inputs
4417 `(("bundler" ,bundler)
4418 ("ruby-minitest" ,ruby-minitest)))
4419 (synopsis "Extra features and changes to MiniTest")
4420 (description "@code{MiniTest Moar} add some additional features and
4421 changes some default behaviours in MiniTest. For instance, Moar replaces the
4422 MiniTest @code{Object#stub} with a global @code{stub} method.")
4423 (home-page "https://github.com/dockyard/minitest-moar")
4424 (license license:expat)))
4425
4426 (define-public ruby-minitest-bonus-assertions
4427 (package
4428 (name "ruby-minitest-bonus-assertions")
4429 (version "3.0")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (rubygems-uri "minitest-bonus-assertions" version))
4434 (sha256
4435 (base32
4436 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
4437 (build-system ruby-build-system)
4438 (arguments
4439 `(#:phases
4440 (modify-phases %standard-phases
4441 (add-before 'check 'clean-dependencies
4442 (lambda _
4443 ;; Remove unneeded require statement that would entail another
4444 ;; dependency.
4445 (substitute* "test/minitest_config.rb"
4446 (("require 'minitest/bisect'") ""))
4447 #t)))))
4448 (native-inputs
4449 `(("ruby-hoe" ,ruby-hoe)
4450 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4451 ("ruby-minitest-focus" ,ruby-minitest-focus)
4452 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4453 (synopsis "Bonus assertions for @code{Minitest}")
4454 (description
4455 "Minitest bonus assertions provides extra MiniTest assertions. For
4456 instance, it provides @code{assert_true}, @code{assert_false} and
4457 @code{assert_set_equal}.")
4458 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4459 (license license:expat)))
4460
4461 (define-public ruby-minitest-reporters
4462 (package
4463 (name "ruby-minitest-reporters")
4464 (version "1.3.6")
4465 (source
4466 (origin
4467 (method url-fetch)
4468 (uri (rubygems-uri "minitest-reporters" version))
4469 (sha256
4470 (base32
4471 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4472 (build-system ruby-build-system)
4473 (arguments
4474 '(#:phases
4475 (modify-phases %standard-phases
4476 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4477 ;; including it as an input can lead to circular dependencies.
4478 (add-after 'unpack 'remove-rubocop-from-Rakefile
4479 (lambda _
4480 (substitute* "Rakefile"
4481 (("require 'rubocop/rake\\_task'") "")
4482 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4483 #t))
4484 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4485 (lambda _
4486 (substitute* "minitest-reporters.gemspec"
4487 ((".*%q<rubocop>.*") "\n"))
4488 #t)))))
4489 (propagated-inputs
4490 `(("ruby-ansi" ,ruby-ansi)
4491 ("ruby-builder" ,ruby-builder)
4492 ("ruby-minitest" ,ruby-minitest)
4493 ("ruby-progressbar" ,ruby-progressbar)))
4494 (native-inputs
4495 `(("bundler" ,bundler)
4496 ("ruby-maruku" ,ruby-maruku)))
4497 (synopsis "Enhanced reporting for Minitest tests")
4498 (description
4499 "@code{minitest/reporters} provides a custom Minitest runner to improve
4500 how the test state is reported. A number of different reporters are
4501 available, including a spec reporter, progress bar reporter, a HTML
4502 reporter.")
4503 (home-page "https://github.com/kern/minitest-reporters")
4504 (license license:expat)))
4505
4506 (define-public ruby-minitest-rg
4507 (package
4508 (name "ruby-minitest-rg")
4509 (version "5.2.0")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (rubygems-uri "minitest-rg" version))
4514 (sha256
4515 (base32
4516 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4517 (build-system ruby-build-system)
4518 (arguments
4519 ;; Some tests fail even outside Guix, so disable tests.
4520 ;; https://github.com/blowmage/minitest-rg/issues/12
4521 ;; https://github.com/blowmage/minitest-rg/pull/13
4522 `(#:tests? #f))
4523 (propagated-inputs
4524 `(("ruby-minitest" ,ruby-minitest)))
4525 (synopsis "Coloured output for Minitest")
4526 (description
4527 "@code{minitest-rg} changes the colour of the output from Minitest.")
4528 (home-page "https://blowmage.com/minitest-rg/")
4529 (license license:expat)))
4530
4531 (define-public ruby-minitest-global-expectations
4532 (package
4533 (name "ruby-minitest-global-expectations")
4534 (version "1.0.1")
4535 (source
4536 (origin
4537 (method url-fetch)
4538 (uri (rubygems-uri "minitest-global_expectations"
4539 version))
4540 (sha256
4541 (base32
4542 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
4543 (build-system ruby-build-system)
4544 (propagated-inputs
4545 `(("ruby-minitest" ,ruby-minitest)))
4546 (synopsis "Adjust minitest behaviour for calling expectation methods")
4547 (description
4548 "Minitest-global_expectations allows continued use of expectation methods
4549 on all objects. Calling expectation methods on all objects was deprecated in
4550 minitest 5.12, and is planned to be removed from minitest 6.")
4551 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
4552 (license license:expat)))
4553
4554 (define-public ruby-minitest-hooks
4555 (package
4556 (name "ruby-minitest-hooks")
4557 (version "1.4.2")
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (rubygems-uri "minitest-hooks" version))
4562 (sha256
4563 (base32
4564 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
4565 (build-system ruby-build-system)
4566 (arguments
4567 '(#:test-target "spec"))
4568 (native-inputs
4569 `(("ruby-sequel" ,ruby-sequel)
4570 ("ruby-sqlite3" ,ruby-sqlite3)))
4571 (synopsis "Hooks for the minitest framework")
4572 (description
4573 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4574 @code{around_all} hooks for Minitest. This allows, for instance, running each
4575 suite of specs inside a database transaction, running each spec inside its own
4576 savepoint inside that transaction. This can significantly speed up testing
4577 for specs that share expensive database setup code.")
4578 (home-page "https://github.com/jeremyevans/minitest-hooks")
4579 (license license:expat)))
4580
4581 (define-public ruby-daemons
4582 (package
4583 (name "ruby-daemons")
4584 (version "1.2.5")
4585 (source (origin
4586 (method url-fetch)
4587 (uri (rubygems-uri "daemons" version))
4588 (sha256
4589 (base32
4590 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
4591 (build-system ruby-build-system)
4592 (arguments
4593 `(#:tests? #f)) ; no test suite
4594 (synopsis "Daemonize Ruby programs")
4595 (description "Daemons provides a way to wrap existing Ruby scripts to be
4596 run as a daemon and to be controlled by simple start/stop/restart commands.")
4597 (home-page "https://github.com/thuehlinger/daemons")
4598 (license license:expat)))
4599
4600 (define-public ruby-data_uri
4601 (package
4602 (name "ruby-data_uri")
4603 (version "0.1.0")
4604 (source
4605 (origin
4606 (method url-fetch)
4607 (uri (rubygems-uri "data_uri" version))
4608 (sha256
4609 (base32
4610 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4611 (build-system ruby-build-system)
4612 (synopsis "URI class for parsing data URIs")
4613 (description
4614 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4615 embedded inside a URI. The URI::Data class provides support for parsing these
4616 URIs using the normal URI.parse method.")
4617 (home-page "https://github.com/dball/data_uri")
4618 (license license:expat)))
4619
4620 (define-public ruby-deep-merge
4621 (package
4622 (name "ruby-deep-merge")
4623 (version "1.2.1")
4624 (home-page "https://github.com/danielsdeleo/deep_merge")
4625 ;; The Rubygem source does not contain the gemspec required for tests.
4626 (source (origin
4627 (method git-fetch)
4628 (uri (git-reference (url home-page) (commit version)))
4629 (file-name (git-file-name name version))
4630 (sha256
4631 (base32
4632 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4633 (build-system ruby-build-system)
4634 (native-inputs
4635 `(("ruby-minitest" ,ruby-minitest)))
4636 (synopsis "Recursively merge hashes")
4637 (description
4638 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4639 you to merge elements inside a hash together recursively.")
4640 (license license:expat)))
4641
4642 (define-public ruby-git
4643 (package
4644 (name "ruby-git")
4645 (version "1.3.0")
4646 (source (origin
4647 (method url-fetch)
4648 (uri (rubygems-uri "git" version))
4649 (sha256
4650 (base32
4651 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
4652 (build-system ruby-build-system)
4653 (arguments
4654 `(#:tests? #f ; no tests
4655 #:phases (modify-phases %standard-phases
4656 (add-after 'install 'patch-git-binary
4657 (lambda* (#:key inputs outputs #:allow-other-keys)
4658 ;; Make the default git binary an absolute path to the
4659 ;; store.
4660 (let ((git (string-append (assoc-ref inputs "git")
4661 "/bin/git"))
4662 (config (string-append
4663 (assoc-ref outputs "out")
4664 "/lib/ruby/vendor_ruby/gems/git-"
4665 ,version "/lib/git/config.rb")))
4666 (substitute* (list config)
4667 (("'git'")
4668 (string-append "'" git "'")))
4669 #t))))))
4670 (inputs
4671 `(("git" ,git)))
4672 (synopsis "Ruby wrappers for Git")
4673 (description "Ruby/Git is a Ruby library that can be used to create, read
4674 and manipulate Git repositories by wrapping system calls to the git binary.")
4675 (home-page "https://github.com/schacon/ruby-git")
4676 (license license:expat)))
4677
4678 (define-public ruby-hocon
4679 (package
4680 (name "ruby-hocon")
4681 (version "1.3.1")
4682 (home-page "https://github.com/puppetlabs/ruby-hocon")
4683 (source (origin
4684 (method git-fetch)
4685 (uri (git-reference (url home-page) (commit version)))
4686 (file-name (git-file-name name version))
4687 (sha256
4688 (base32
4689 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
4690 (build-system ruby-build-system)
4691 (arguments
4692 '(#:phases (modify-phases %standard-phases
4693 (replace 'check
4694 (lambda* (#:key tests? #:allow-other-keys)
4695 (if tests?
4696 (invoke "rspec")
4697 (format #t "test suite not run~%"))
4698 #t)))))
4699 (native-inputs
4700 `(("bundler" ,bundler)
4701 ("ruby-rspec" ,ruby-rspec)))
4702 (synopsis "HOCON config library")
4703 (description
4704 "This package provides Ruby support for the @acronym{HOCON,
4705 Human-Optimized Config Object Notation} configuration file format. It
4706 supports parsing and modifying HOCON and JSON files, and rendering parsed
4707 objects back to a @code{String}.")
4708 (license license:asl2.0)))
4709
4710 (define-public ruby-slop
4711 (package
4712 (name "ruby-slop")
4713 (version "4.5.0")
4714 (source (origin
4715 (method url-fetch)
4716 (uri (rubygems-uri "slop" version))
4717 (sha256
4718 (base32
4719 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
4720 (build-system ruby-build-system)
4721 (native-inputs
4722 `(("ruby-minitest" ,ruby-minitest)))
4723 (synopsis "Ruby command line option parser")
4724 (description "Slop provides a Ruby domain specific language for gathering
4725 options and parsing command line flags.")
4726 (home-page "https://github.com/leejarvis/slop")
4727 (license license:expat)))
4728
4729 (define-public ruby-slop-3
4730 (package (inherit ruby-slop)
4731 (version "3.6.0")
4732 (source (origin
4733 (method url-fetch)
4734 (uri (rubygems-uri "slop" version))
4735 (sha256
4736 (base32
4737 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4738
4739 (define-public ruby-multi-xml
4740 (package
4741 (name "ruby-multi-xml")
4742 (version "0.6.0")
4743 (source
4744 (origin
4745 (method url-fetch)
4746 (uri (rubygems-uri "multi_xml" version))
4747 (sha256
4748 (base32
4749 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4750 (build-system ruby-build-system)
4751 (arguments
4752 '(#:tests? #f)) ; No included tests
4753 (synopsis "Swappable XML backends for Ruby")
4754 (description
4755 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4756 Nokogiri, Ox, or REXML.")
4757 (home-page "https://github.com/sferik/multi_xml")
4758 (license license:expat)))
4759
4760 (define-public ruby-multipart-post
4761 (package
4762 (name "ruby-multipart-post")
4763 (version "2.0.0")
4764 (source (origin
4765 (method url-fetch)
4766 (uri (rubygems-uri "multipart-post" version))
4767 (sha256
4768 (base32
4769 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
4770 (build-system ruby-build-system)
4771 (native-inputs
4772 `(("bundler" ,bundler)))
4773 (synopsis "Multipart POST library for Ruby")
4774 (description "Multipart-Post Adds multipart POST capability to Ruby's
4775 net/http library.")
4776 (home-page "https://github.com/nicksieger/multipart-post")
4777 (license license:expat)))
4778
4779 (define-public ruby-multi-json
4780 (package
4781 (name "ruby-multi-json")
4782 (version "1.13.1")
4783 (source
4784 (origin
4785 (method git-fetch)
4786 ;; Tests are not distributed at rubygems.org so download from GitHub
4787 ;; instead.
4788 (uri (git-reference
4789 (url "https://github.com/intridea/multi_json")
4790 (commit (string-append "v" version))))
4791 (file-name (git-file-name name version))
4792 (sha256
4793 (base32
4794 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
4795 (build-system ruby-build-system)
4796 (arguments
4797 `(#:phases
4798 (modify-phases %standard-phases
4799 (add-after 'unpack 'remove-signing-key-reference
4800 (lambda _
4801 (substitute* "multi_json.gemspec"
4802 ((".*spec.signing_key.*") ""))
4803 #t)))))
4804 (native-inputs
4805 `(("bundler" ,bundler)
4806 ("ruby-rspec" ,ruby-rspec)
4807 ("ruby-yard" ,ruby-yard)
4808 ("ruby-json-pure" ,ruby-json-pure)
4809 ("ruby-oj" ,ruby-oj)
4810 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
4811 (synopsis "Common interface to multiple JSON libraries for Ruby")
4812 (description
4813 "This package provides a common interface to multiple JSON libraries,
4814 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4815 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
4816 (home-page "https://github.com/intridea/multi_json")
4817 (license license:expat)))
4818
4819 (define-public ruby-multi-test
4820 (package
4821 (name "ruby-multi-test")
4822 (version "0.1.2")
4823 (source
4824 (origin
4825 (method url-fetch)
4826 (uri (rubygems-uri "multi_test" version))
4827 (sha256
4828 (base32
4829 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4830 (build-system ruby-build-system)
4831 (arguments
4832 '(;; Tests require different sets of specific gem versions to be available,
4833 ;; and there is no gemfile that specifies the newest versions of
4834 ;; dependencies to be tested.
4835 #:tests? #f))
4836 (synopsis
4837 "Interface to testing libraries loaded into a running Ruby process")
4838 (description
4839 "@code{multi_test} provides a uniform interface onto whatever testing
4840 libraries that have been loaded into a running Ruby process to help control
4841 rogue test/unit/autorun requires.")
4842 (home-page "https://github.com/cucumber/multi_test")
4843 (license license:expat)))
4844
4845 (define-public ruby-arel
4846 (package
4847 (name "ruby-arel")
4848 (version "9.0.0")
4849 (source (origin
4850 (method url-fetch)
4851 (uri (rubygems-uri "arel" version))
4852 (sha256
4853 (base32
4854 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
4855 (build-system ruby-build-system)
4856 (arguments '(#:tests? #f)) ; no tests
4857 (home-page "https://github.com/rails/arel")
4858 (synopsis "SQL AST manager for Ruby")
4859 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4860 Ruby. It simplifies the generation of complex SQL queries and adapts to
4861 various relational database implementations.")
4862 (license license:expat)))
4863
4864 (define-public ruby-marcel
4865 (package
4866 (name "ruby-marcel")
4867 (version "0.3.3")
4868 (source
4869 (origin
4870 (method url-fetch)
4871 (uri (rubygems-uri "marcel" version))
4872 (sha256
4873 (base32
4874 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4875 (build-system ruby-build-system)
4876 (arguments
4877 '(;; No included tests
4878 #:tests? #f))
4879 (propagated-inputs
4880 `(("ruby-mimemagic" ,ruby-mimemagic)))
4881 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4882 (description
4883 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4884 Extensions} type detection using magic numbers, filenames, and extensions")
4885 (home-page "https://github.com/basecamp/marcel")
4886 (license license:expat)))
4887
4888 (define-public ruby-minitar
4889 ;; We package from the GitHub source to fix the security issue reported at
4890 ;; https://github.com/halostatue/minitar/issues/16.
4891 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4892 (package
4893 (name "ruby-minitar")
4894 (version (string-append "0.5.4-1." (string-take commit 8)))
4895 (source
4896 (origin
4897 (method git-fetch)
4898 (uri (git-reference
4899 (url "https://github.com/halostatue/minitar")
4900 (commit commit)))
4901 (file-name (string-append name "-" version "-checkout"))
4902 (sha256
4903 (base32
4904 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4905 (build-system ruby-build-system)
4906 (arguments
4907 '(#:tests? #f)) ; missing a gemspec
4908 (synopsis "Ruby library and utility for handling tar archives")
4909 (description
4910 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
4911 that provides the ability to deal with POSIX tar archive files.")
4912 (home-page "http://www.github.com/atoulme/minitar")
4913 (license (list license:gpl2+ license:ruby)))))
4914
4915 (define-public ruby-mini-portile
4916 (package
4917 (name "ruby-mini-portile")
4918 (version "0.6.2")
4919 (source
4920 (origin
4921 (method url-fetch)
4922 (uri (rubygems-uri "mini_portile" version))
4923 (sha256
4924 (base32
4925 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4926 (build-system ruby-build-system)
4927 (arguments
4928 '(#:tests? #f)) ; tests require network access
4929 (synopsis "Ports system for Ruby developers")
4930 (description "Mini-portile is a port/recipe system for Ruby developers.
4931 It provides a standard way to compile against specific versions of libraries
4932 to reproduce user environments.")
4933 (home-page "https://github.com/flavorjones/mini_portile")
4934 (license license:expat)))
4935
4936 (define-public ruby-mini-portile-2
4937 (package (inherit ruby-mini-portile)
4938 (version "2.4.0")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (rubygems-uri "mini_portile2" version))
4942 (sha256
4943 (base32
4944 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
4945
4946 (define-public ruby-nokogiri
4947 (package
4948 (name "ruby-nokogiri")
4949 (version "1.10.9")
4950 (source (origin
4951 (method url-fetch)
4952 (uri (rubygems-uri "nokogiri" version))
4953 (sha256
4954 (base32
4955 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
4956 (build-system ruby-build-system)
4957 (arguments
4958 ;; Tests fail because Nokogiri can only test with an installed extension,
4959 ;; and also because many test framework dependencies are missing.
4960 `(#:tests? #f
4961 #:gem-flags (list "--" "--use-system-libraries"
4962 (string-append "--with-xml2-include="
4963 (assoc-ref %build-inputs "libxml2")
4964 "/include/libxml2" ))
4965 #:phases
4966 (modify-phases %standard-phases
4967 (add-before 'build 'patch-extconf
4968 ;; 'pkg-config' is not included in the GEM_PATH during
4969 ;; installation, so we add it directly to the load path.
4970 (lambda* (#:key inputs #:allow-other-keys)
4971 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
4972 (substitute* "ext/nokogiri/extconf.rb"
4973 (("gem 'pkg-config'.*")
4974 (string-append "$:.unshift '"
4975 pkg-config "/lib/ruby/vendor_ruby"
4976 "/gems/pkg-config-"
4977 ,(package-version ruby-pkg-config)
4978 "/lib'\n"))))
4979 #t)))))
4980 (native-inputs
4981 `(("ruby-hoe" ,ruby-hoe)))
4982 (inputs
4983 `(("zlib" ,zlib)
4984 ("libxml2" ,libxml2)
4985 ("libxslt" ,libxslt)))
4986 (propagated-inputs
4987 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4988 ("ruby-pkg-config" ,ruby-pkg-config)))
4989 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4990 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4991 both CSS3 selector and XPath 1.0 support.")
4992 (home-page "http://www.nokogiri.org/")
4993 (license license:expat)))
4994
4995 (define-public ruby-method-source
4996 (package
4997 (name "ruby-method-source")
4998 (version "1.0.0")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (rubygems-uri "method_source" version))
5003 (sha256
5004 (base32
5005 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
5006 (build-system ruby-build-system)
5007 (arguments
5008 `(#:test-target "spec"))
5009 (native-inputs
5010 `(("ruby-rspec" ,ruby-rspec)
5011 ("git" ,git)))
5012 (synopsis "Retrieve the source code for Ruby methods")
5013 (description "Method_source retrieves the source code for Ruby methods.
5014 Additionally, it can extract source code from Proc and Lambda objects or just
5015 extract comments.")
5016 (home-page "https://github.com/banister/method_source")
5017 (license license:expat)))
5018
5019 (define-public ruby-coderay
5020 (package
5021 (name "ruby-coderay")
5022 (version "1.1.2")
5023 (source
5024 (origin
5025 (method url-fetch)
5026 (uri (rubygems-uri "coderay" version))
5027 (sha256
5028 (base32
5029 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
5030 (build-system ruby-build-system)
5031 (arguments
5032 '(#:tests? #f)) ; missing test files
5033 (synopsis "Ruby syntax highlighting library")
5034 (description "Coderay is a Ruby library that provides syntax highlighting
5035 for select languages.")
5036 (home-page "http://coderay.rubychan.de")
5037 (license license:expat)))
5038
5039 (define-public ruby-cuke-modeler
5040 (package
5041 (name "ruby-cuke-modeler")
5042 (version "3.1.0")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (rubygems-uri "cuke_modeler" version))
5047 (sha256
5048 (base32
5049 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
5050 (build-system ruby-build-system)
5051 (arguments `(#:tests? #f)) ;no test suite in gem
5052 (propagated-inputs
5053 `(("ruby-gherkin" ,ruby-gherkin)))
5054 (synopsis "Gherkin test suite analysis tool")
5055 (description "CukeModeler facilitates modeling a test suite that is
5056 written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
5057 providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
5058 the @code{cucumber-gherkin} generates when parsing features, as well as
5059 providing models for feature files and directories in order to be able to have
5060 a fully traversable model tree of a test suite's structure. These models can
5061 then be analyzed or manipulated more easily than the underlying AST layer.")
5062 (home-page "https://github.com/enkessler/cuke_modeler")
5063 (license license:expat)))
5064
5065 (define-public ruby-parallel-tests
5066 (package
5067 (name "ruby-parallel-tests")
5068 (version "3.0.0")
5069 (home-page "https://github.com/grosser/parallel_tests")
5070 (source (origin
5071 (method git-fetch)
5072 (uri (git-reference
5073 (url home-page)
5074 (commit (string-append "v" version))))
5075 (file-name (string-append name version))
5076 (sha256
5077 (base32
5078 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
5079 (build-system ruby-build-system)
5080 (arguments
5081 '(#:test-target "default"
5082 #:phases (modify-phases %standard-phases
5083 (add-after 'patch-source-shebangs 'patch-shell-invokations
5084 (lambda _
5085 (substitute* '("lib/parallel_tests/tasks.rb"
5086 "spec/parallel_tests/tasks_spec.rb")
5087 (("/bin/sh") (which "sh"))
5088 (("/bin/bash") (which "bash")))
5089 #t))
5090 (add-before 'check 'remove-version-constraints
5091 (lambda _
5092 ;; Remove hard coded version constraints, instead just
5093 ;; use whatever versions are available in Guix.
5094 (delete-file "Gemfile.lock")
5095 (substitute* "Gemfile"
5096 (("'minitest',.*")
5097 "'minitest'\n")
5098 (("'cucumber',.*")
5099 "'cucumber'\n"))
5100 #t))
5101 (add-before 'check 'disable-rails-test
5102 (lambda _
5103 ;; XXX: This test attempts to download and run the test
5104 ;; suites of multiple Rails versions(!) directly.
5105 (delete-file "spec/rails_spec.rb")
5106 #t))
5107 (add-before 'check 'set-HOME
5108 (lambda _
5109 ;; Some tests check the output of Bundler, and fail when
5110 ;; Bundler warns that /homeless-shelter does not exist.
5111 (setenv "HOME" "/tmp")
5112 #t)))))
5113 (native-inputs
5114 `(("ruby-bump" ,ruby-bump)
5115 ("ruby-cucumber" ,ruby-cucumber)
5116 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
5117 ("ruby-minitest" ,ruby-minitest)
5118 ("ruby-rake" ,ruby-rake)
5119 ("ruby-rspec" ,ruby-rspec)
5120 ("ruby-spinach" ,ruby-spinach)))
5121 (propagated-inputs
5122 `(("ruby-parallel" ,ruby-parallel)))
5123 (synopsis "Run tests in parallel")
5124 (description
5125 "This package can speed up @code{Test::Unit}, @code{RSpec},
5126 @code{Cucumber}, and @code{Spinach} tests by running them concurrently
5127 across multiple CPU cores.")
5128 (license license:expat)))
5129
5130 (define-public ruby-parser
5131 (package
5132 (name "ruby-parser")
5133 (version "2.7.1.4")
5134 (source
5135 (origin
5136 (method url-fetch)
5137 (uri (rubygems-uri "parser" version))
5138 (sha256
5139 (base32
5140 "1030znhvhkfn39svwbj6qn4xb6hgl94gnvg57k4d3r76f9bryqmn"))))
5141 (build-system ruby-build-system)
5142 (native-inputs
5143 `(("bundler" ,bundler)
5144 ("ruby-cliver" ,ruby-cliver)
5145 ("ruby-simplecov" ,ruby-simplecov)
5146 ("ruby-racc" ,ruby-racc)))
5147 (inputs
5148 `(("ragel" ,ragel)))
5149 (propagated-inputs
5150 `(("ruby-ast" ,ruby-ast)))
5151 (synopsis "Ruby parser written in pure Ruby")
5152 (description
5153 "This package provides a Ruby parser written in pure Ruby.")
5154 (home-page "https://github.com/whitequark/parser")
5155 (license license:expat)))
5156
5157 (define-public ruby-sexp-processor
5158 (package
5159 (name "ruby-sexp-processor")
5160 (version "4.15.0")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (rubygems-uri "sexp_processor" version))
5165 (sha256
5166 (base32
5167 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
5168 (build-system ruby-build-system)
5169 (native-inputs
5170 ;; TODO: Add ruby-minitest-proveit once available.
5171 `(("hoe" ,ruby-hoe)))
5172 (synopsis "ParseTree fork which includes generic S-exp processing tools")
5173 (description "The sexp_processor package is derived from ParseTree, but
5174 contrary to ParseTree, it includes all the generic S-exp processing tools.
5175 Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
5176 @code{Environment}")
5177 (home-page "https://github.com/seattlerb/sexp_processor")
5178 (license license:expat)))
5179
5180 (define-public ruby-ruby-parser
5181 (package
5182 (name "ruby-ruby-parser")
5183 (version "3.14.2")
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (rubygems-uri "ruby_parser" version))
5188 (sha256
5189 (base32
5190 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
5191 (build-system ruby-build-system)
5192 (native-inputs
5193 `(("hoe" ,ruby-hoe)
5194 ("racc" ,ruby-racc)
5195 ("unifdef" ,unifdef)))
5196 (propagated-inputs
5197 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
5198 (home-page "https://github.com/seattlerb/ruby_parser/")
5199 (synopsis "Ruby parser written in pure Ruby")
5200 (description "The ruby_parser (RP) package provides a Ruby parser written
5201 in pure Ruby. It outputs S-expressions which can be manipulated and converted
5202 back to Ruby via the @code{ruby2ruby} library.")
5203 (license license:expat)))
5204
5205 (define-public ruby-prawn-manual-builder
5206 (package
5207 (name "ruby-prawn-manual-builder")
5208 (version "0.3.1")
5209 (source
5210 (origin
5211 (method url-fetch)
5212 (uri (rubygems-uri "prawn-manual_builder" version))
5213 (sha256
5214 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
5215 (build-system ruby-build-system)
5216 (arguments
5217 '(#:tests? #f ; no included tests
5218 #:phases
5219 (modify-phases %standard-phases
5220 (add-after 'extract-gemspec 'patch-gemspec
5221 (lambda _
5222 (substitute* ".gemspec"
5223 ;; Loosen the requirement for pdf-inspector
5224 (("~> 1\\.0\\.7") ">= 0")))))))
5225 (propagated-inputs
5226 `(("ruby-coderay" ,ruby-coderay)))
5227 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
5228 (description
5229 "This package provides a tool for writing manuals for Prawn and Prawn
5230 accessories")
5231 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
5232 (license %prawn-project-licenses)))
5233
5234 (define-public ruby-progress_bar
5235 (package
5236 (name "ruby-progress_bar")
5237 (version "1.1.0")
5238 (source
5239 (origin
5240 (method url-fetch)
5241 (uri (rubygems-uri "progress_bar" version))
5242 (sha256
5243 (base32
5244 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
5245 (build-system ruby-build-system)
5246 (arguments
5247 '(#:test-target "spec"))
5248 (propagated-inputs
5249 `(("ruby-highline" ,ruby-highline)
5250 ("ruby-options" ,ruby-options)))
5251 (native-inputs
5252 `(("bundler" ,bundler)
5253 ("ruby-rspec" ,ruby-rspec)
5254 ("ruby-timecop" ,ruby-timecop)))
5255 (synopsis
5256 "Ruby library for displaying progress bars")
5257 (description
5258 "ProgressBar is a simple library for displaying progress bars. The
5259 maximum value is configurable, and additional information can be displayed
5260 like the percentage completion, estimated time remaining, elapsed time and
5261 rate.")
5262 (home-page "https://github.com/paul/progress_bar")
5263 (license license:wtfpl2)))
5264
5265 (define-public ruby-dep
5266 (package
5267 (name "ruby-dep")
5268 (version "1.5.0")
5269 (source
5270 (origin
5271 (method url-fetch)
5272 (uri (rubygems-uri "ruby_dep" version))
5273 (sha256
5274 (base32
5275 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
5276 (build-system ruby-build-system)
5277 (arguments
5278 '(#:tests? #f)) ; No included tests
5279 (synopsis "Creates a version constraint of supported Rubies")
5280 (description
5281 "This package helps create a version constraint of supported Rubies,
5282 suitable for a gemspec file.")
5283 (home-page "https://github.com/e2/ruby_dep")
5284 (license license:expat)))
5285
5286 (define-public ruby-progressbar
5287 (package
5288 (name "ruby-progressbar")
5289 (version "1.10.1")
5290 (source
5291 (origin
5292 (method url-fetch)
5293 (uri (rubygems-uri "ruby-progressbar" version))
5294 (sha256
5295 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
5296 (build-system ruby-build-system)
5297 (arguments
5298 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
5299 #:tests? #f))
5300 (synopsis "Text progress bar library for Ruby")
5301 (description
5302 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
5303 The output can be customized with a formatting system.")
5304 (home-page "https://github.com/jfelchner/ruby-progressbar")
5305 (license license:expat)))
5306
5307 (define-public ruby-pry
5308 (package
5309 (name "ruby-pry")
5310 (version "0.13.1")
5311 (source
5312 (origin
5313 (method url-fetch)
5314 (uri (rubygems-uri "pry" version))
5315 (sha256
5316 (base32
5317 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
5318 (build-system ruby-build-system)
5319 (arguments
5320 '(#:tests? #f)) ; no tests
5321 (propagated-inputs
5322 `(("ruby-coderay" ,ruby-coderay)
5323 ("ruby-method-source" ,ruby-method-source)))
5324 (synopsis "Ruby REPL")
5325 (description "Pry is an IRB alternative and runtime developer console for
5326 Ruby. It features syntax highlighting, a plugin architecture, runtime
5327 invocation, and source and documentation browsing.")
5328 (home-page "https://cobaltbluemedia.com/pryrepl/")
5329 (license license:expat)))
5330
5331 (define-public ruby-single-cov
5332 (package
5333 (name "ruby-single-cov")
5334 (version "1.3.2")
5335 (home-page "https://github.com/grosser/single_cov")
5336 (source (origin
5337 (method git-fetch)
5338 (uri (git-reference (url home-page)
5339 (commit (string-append "v" version))))
5340 (file-name (git-file-name name version))
5341 (sha256
5342 (base32
5343 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
5344 (build-system ruby-build-system)
5345 (arguments
5346 '(#:test-target "default"
5347 #:phases (modify-phases %standard-phases
5348 (replace 'replace-git-ls-files
5349 (lambda _
5350 (substitute* "single_cov.gemspec"
5351 (("`git ls-files lib/ bin/ MIT-LICENSE`")
5352 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
5353 #t))
5354 (add-before 'check 'remove-version-constraints
5355 (lambda _
5356 (delete-file "Gemfile.lock")
5357 #t))
5358 (add-before 'check 'make-files-writable
5359 (lambda _
5360 ;; Tests need to create local directories and open files
5361 ;; with write permissions.
5362 (for-each make-file-writable
5363 (find-files "specs" #:directories? #t))
5364 #t))
5365 (add-before 'check 'disable-failing-test
5366 (lambda _
5367 ;; XXX: This test copies assets from minitest, but can
5368 ;; not cope with the files being read-only. Just skip
5369 ;; it for now.
5370 (substitute* "specs/single_cov_spec.rb"
5371 (("it \"complains when coverage is bad\"")
5372 "xit \"complains when coverage is bad\""))
5373 #t)))))
5374 (native-inputs
5375 `(("ruby-bump" ,ruby-bump)
5376 ("ruby-minitest" ,ruby-minitest)
5377 ("ruby-rspec" ,ruby-rspec)
5378 ("ruby-simplecov" ,ruby-simplecov)))
5379 (synopsis "Code coverage reporting tool")
5380 (description
5381 "This package provides actionable code coverage reports for Ruby
5382 projects. It has very little overhead and can be easily integrated with
5383 development tools to catch coverage problems early.")
5384 (license license:expat)))
5385
5386 (define-public ruby-guard
5387 (package
5388 (name "ruby-guard")
5389 (version "2.13.0")
5390 (source (origin
5391 (method git-fetch)
5392 ;; The gem does not include a Rakefile, nor does it contain a
5393 ;; gemspec file, nor does it come with the tests. This is why
5394 ;; we fetch the tarball from Github.
5395 (uri (git-reference
5396 (url "https://github.com/guard/guard")
5397 (commit (string-append "v" version))))
5398 (file-name (git-file-name name version))
5399 (sha256
5400 (base32
5401 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
5402 (build-system ruby-build-system)
5403 (arguments
5404 `(#:tests? #f ; tests require cucumber
5405 #:phases
5406 (modify-phases %standard-phases
5407 (add-after 'unpack 'remove-git-ls-files
5408 (lambda* (#:key outputs #:allow-other-keys)
5409 (substitute* "guard.gemspec"
5410 (("git ls-files -z") "find . -type f -print0"))
5411 #t))
5412 (replace 'build
5413 (lambda _
5414 (invoke "gem" "build" "guard.gemspec"))))))
5415 (propagated-inputs
5416 `(("ruby-formatador" ,ruby-formatador)
5417 ("ruby-listen" ,ruby-listen)
5418 ("ruby-lumberjack" ,ruby-lumberjack)
5419 ("ruby-nenv" ,ruby-nenv)
5420 ("ruby-notiffany" ,ruby-notiffany)
5421 ("ruby-pry" ,ruby-pry)
5422 ("ruby-shellany" ,ruby-shellany)
5423 ("ruby-thor" ,ruby-thor)))
5424 (native-inputs
5425 `(("bundler" ,bundler)
5426 ("ruby-rspec" ,ruby-rspec)))
5427 (synopsis "Tool to handle events on file system modifications")
5428 (description
5429 "Guard is a command line tool to easily handle events on file system
5430 modifications. Guard automates various tasks by running custom rules whenever
5431 file or directories are modified.")
5432 (home-page "https://guardgem.org/")
5433 (license license:expat)))
5434
5435 (define-public ruby-spinach
5436 (package
5437 (name "ruby-spinach")
5438 (version "0.11.0")
5439 (home-page "https://github.com/codegram/spinach")
5440 (source (origin
5441 (method url-fetch)
5442 (uri (rubygems-uri "spinach" version))
5443 (sha256
5444 (base32
5445 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5446 (build-system ruby-build-system)
5447 (arguments
5448 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5449 ;; which in turn depends on many other unpackaged gems. Enable once
5450 ;; capybara is available.
5451 '(#:tests? #f))
5452 (propagated-inputs
5453 `(("ruby-colorize" ,ruby-colorize)
5454 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5455 ("ruby-json" ,ruby-json)))
5456 (synopsis "Gherkin-based BDD framework")
5457 (description
5458 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5459 framework that leverages the expressive @code{Gherkin} language to help you
5460 define executable specifications of your code.")
5461 (license license:expat)))
5462
5463 (define-public ruby-tilt
5464 (package
5465 (name "ruby-tilt")
5466 (version "2.0.10")
5467 (source
5468 (origin
5469 (method git-fetch) ;the distributed gem lacks tests
5470 (uri (git-reference
5471 (url "https://github.com/rtomayko/tilt")
5472 (commit (string-append "v" version))))
5473 (file-name (git-file-name name version))
5474 (sha256
5475 (base32
5476 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
5477 (build-system ruby-build-system)
5478 (arguments
5479 '(#:phases
5480 (modify-phases %standard-phases
5481 (add-after 'unpack 'remove-some-dependencies
5482 (lambda _
5483 (substitute* "Gemfile"
5484 ;; TODO ronn is used for generating the manual
5485 (("gem 'ronn'.*") "\n")
5486 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5487 ;; pass it in as a native-input
5488 (("gem 'haml'.*") "\n")
5489 ;; TODO Not all of these gems are packaged for Guix yet:
5490 ;; less, coffee-script, livescript, babel-transpiler,
5491 ;; typescript-node
5492 (("if can_execjs") "if false")
5493 ;; Disable the secondary group to reduce the number of
5494 ;; dependencies. None of the normal approaches work, so patch
5495 ;; the Gemfile instead.
5496 (("group :secondary") "[].each"))
5497 #t)))))
5498 (propagated-inputs
5499 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5500 ("ruby-sassc" ,ruby-sassc)))
5501 (native-inputs
5502 `(("bundler" ,bundler)
5503 ("ruby-yard" ,ruby-yard)
5504 ("ruby-builder" ,ruby-builder)
5505 ("ruby-erubis" ,ruby-erubis)
5506 ("ruby-markaby" ,ruby-markaby)))
5507 (synopsis "Generic interface to multiple Ruby template engines")
5508 (description
5509 "Tilt is a thin interface over a number of different Ruby template
5510 engines in an attempt to make their usage as generic as possible.")
5511 (home-page "https://github.com/rtomayko/tilt/")
5512 (license license:expat)))
5513
5514 (define-public ruby-thread-safe
5515 (package
5516 (name "ruby-thread-safe")
5517 (version "0.3.6")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (rubygems-uri "thread_safe" version))
5522 (sha256
5523 (base32
5524 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
5525 (build-system ruby-build-system)
5526 (arguments
5527 '(#:tests? #f)) ; needs simplecov, among others
5528 (synopsis "Thread-safe utilities for Ruby")
5529 (description "The thread_safe library provides thread-safe collections and
5530 utilities for Ruby.")
5531 (home-page "https://github.com/ruby-concurrency/thread_safe")
5532 (license license:asl2.0)))
5533
5534 (define-public ruby-tzinfo
5535 (package
5536 (name "ruby-tzinfo")
5537 (version "1.2.4")
5538 (source
5539 (origin
5540 (method url-fetch)
5541 (uri (rubygems-uri "tzinfo" version))
5542 (sha256
5543 (base32
5544 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
5545 (build-system ruby-build-system)
5546 (arguments
5547 '(#:phases
5548 (modify-phases %standard-phases
5549 (add-after 'unpack 'skip-safe-tests
5550 (lambda _
5551 (substitute* "test/test_utils.rb"
5552 (("def safe_test\\(options = \\{\\}\\)")
5553 "def safe_test(options = {})
5554 skip('The Guix build environment has an unsafe load path')"))
5555 #t)))))
5556 (propagated-inputs
5557 `(("ruby-thread-safe" ,ruby-thread-safe)))
5558 (synopsis "Time zone library for Ruby")
5559 (description "TZInfo is a Ruby library that provides daylight savings
5560 aware transformations between times in different time zones.")
5561 (home-page "https://tzinfo.github.io")
5562 (license license:expat)))
5563
5564 (define-public ruby-tzinfo-data
5565 (package
5566 (name "ruby-tzinfo-data")
5567 (version "1.2017.3")
5568 (source
5569 (origin
5570 (method git-fetch)
5571 ;; Download from GitHub because the rubygems version does not contain
5572 ;; Rakefile or tests.
5573 (uri (git-reference
5574 (url "https://github.com/tzinfo/tzinfo-data")
5575 (commit (string-append "v" version))))
5576 (file-name (git-file-name name version))
5577 (sha256
5578 (base32
5579 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
5580 ;; Remove the known test failure.
5581 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5582 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5583 (patches (search-patches
5584 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5585 (build-system ruby-build-system)
5586 (propagated-inputs
5587 `(("ruby-tzinfo" ,ruby-tzinfo)))
5588 (synopsis "Data from the IANA Time Zone database")
5589 (description
5590 "This library provides @code{TZInfo::Data}, which contains data from the
5591 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
5592 (home-page "https://tzinfo.github.io")
5593 (license license:expat)))
5594
5595 (define-public ruby-rb-inotify
5596 (package
5597 (name "ruby-rb-inotify")
5598 (version "0.9.10")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (rubygems-uri "rb-inotify" version))
5603 (sha256
5604 (base32
5605 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
5606 (build-system ruby-build-system)
5607 (arguments
5608 '(#:tests? #f ; there are no tests
5609 #:phases
5610 (modify-phases %standard-phases
5611 ;; Building the gemspec with rake is not working here since it is
5612 ;; generated with Jeweler. It is also unnecessary because the
5613 ;; existing gemspec does not use any development tools to generate a
5614 ;; list of files.
5615 (replace 'build
5616 (lambda _
5617 (invoke "gem" "build" "rb-inotify.gemspec"))))))
5618 (propagated-inputs
5619 `(("ruby-ffi" ,ruby-ffi)))
5620 (native-inputs
5621 `(("ruby-yard" ,ruby-yard)))
5622 (synopsis "Ruby wrapper for Linux's inotify")
5623 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5624 kernel subsystem for monitoring changes to files and directories.")
5625 (home-page "https://github.com/nex3/rb-inotify")
5626 (license license:expat)))
5627
5628 (define-public ruby-pry-editline
5629 (package
5630 (name "ruby-pry-editline")
5631 (version "1.1.2")
5632 (source (origin
5633 (method url-fetch)
5634 (uri (rubygems-uri "pry-editline" version))
5635 (sha256
5636 (base32
5637 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5638 (build-system ruby-build-system)
5639 (arguments `(#:tests? #f)) ; no tests included
5640 (native-inputs
5641 `(("bundler" ,bundler)))
5642 (synopsis "Open the current REPL line in an editor")
5643 (description
5644 "This gem provides a plugin for the Ruby REPL to enable opening the
5645 current line in an external editor.")
5646 (home-page "https://github.com/tpope/pry-editline")
5647 (license license:expat)))
5648
5649 (define-public ruby-sdoc
5650 (package
5651 (name "ruby-sdoc")
5652 (version "1.1.0")
5653 (source (origin
5654 (method url-fetch)
5655 (uri (rubygems-uri "sdoc" version))
5656 (sha256
5657 (base32
5658 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
5659 (build-system ruby-build-system)
5660 (arguments
5661 `(#:phases
5662 (modify-phases %standard-phases
5663 (add-before 'check 'set-rubylib-and-patch-gemfile
5664 (lambda _
5665 (setenv "RUBYLIB" "lib")
5666 (substitute* "sdoc.gemspec"
5667 (("s.add_runtime_dependency.*") "\n")
5668 (("s.add_dependency.*") "\n"))
5669 (substitute* "Gemfile"
5670 (("gem \"rake\".*")
5671 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
5672 #t)))))
5673 (propagated-inputs
5674 `(("ruby-json" ,ruby-json)))
5675 (native-inputs
5676 `(("bundler" ,bundler)
5677 ("ruby-minitest" ,ruby-minitest)
5678 ("ruby-hoe" ,ruby-hoe)))
5679 (synopsis "Generate searchable RDoc documentation")
5680 (description
5681 "SDoc is an RDoc documentation generator to build searchable HTML
5682 documentation for Ruby code.")
5683 (home-page "https://github.com/voloko/sdoc")
5684 (license license:expat)))
5685
5686 (define-public ruby-tins
5687 (package
5688 (name "ruby-tins")
5689 (version "1.15.0")
5690 (source (origin
5691 (method url-fetch)
5692 (uri (rubygems-uri "tins" version))
5693 (sha256
5694 (base32
5695 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
5696 (build-system ruby-build-system)
5697 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5698 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5699 ;; the gemspec.
5700 (arguments
5701 `(#:tests? #f ; there are no tests
5702 #:phases
5703 (modify-phases %standard-phases
5704 (replace 'build
5705 (lambda _
5706 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5707 ;; causes an error.
5708 (substitute* "tins.gemspec"
5709 (("\"lib/spruz\", ") ""))
5710 (invoke "gem" "build" "tins.gemspec"))))))
5711 (synopsis "Assorted tools for Ruby")
5712 (description "Tins is a Ruby library providing assorted tools.")
5713 (home-page "https://github.com/flori/tins")
5714 (license license:expat)))
5715
5716 (define-public ruby-gem-hadar
5717 (package
5718 (name "ruby-gem-hadar")
5719 (version "1.9.1")
5720 (source (origin
5721 (method url-fetch)
5722 (uri (rubygems-uri "gem_hadar" version))
5723 (sha256
5724 (base32
5725 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
5726 (build-system ruby-build-system)
5727 ;; This gem needs itself at development time. We disable rebuilding of the
5728 ;; gemspec to avoid this loop.
5729 (arguments
5730 `(#:tests? #f ; there are no tests
5731 #:phases
5732 (modify-phases %standard-phases
5733 (replace 'build
5734 (lambda _
5735 (invoke "gem" "build" "gem_hadar.gemspec"))))))
5736 (propagated-inputs
5737 `(("git" ,git)
5738 ("ruby-tins" ,ruby-tins)
5739 ("ruby-yard" ,ruby-yard)))
5740 (synopsis "Library for the development of Ruby gems")
5741 (description
5742 "This library contains some useful functionality to support the
5743 development of Ruby gems.")
5744 (home-page "https://github.com/flori/gem_hadar")
5745 (license license:expat)))
5746
5747 (define-public ruby-minitest-tu-shim
5748 (package
5749 (name "ruby-minitest-tu-shim")
5750 (version "1.3.3")
5751 (source (origin
5752 (method url-fetch)
5753 (uri (rubygems-uri "minitest_tu_shim" version))
5754 (sha256
5755 (base32
5756 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5757 (build-system ruby-build-system)
5758 (arguments
5759 `(#:phases
5760 (modify-phases %standard-phases
5761 (add-after 'unpack 'fix-test-include-path
5762 (lambda* (#:key inputs #:allow-other-keys)
5763 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
5764 (substitute* "Rakefile"
5765 (("Hoe\\.add_include_dirs .*")
5766 (string-append "Hoe.add_include_dirs \""
5767 minitest "/lib/ruby/vendor_ruby"
5768 "/gems/minitest-"
5769 ,(package-version ruby-minitest-4)
5770 "/lib" "\""))))
5771 #t))
5772 (add-before 'check 'fix-test-assumptions
5773 (lambda _
5774 ;; The test output includes the file name, so a couple of tests
5775 ;; fail. Changing the regular expressions slightly fixes this
5776 ;; problem.
5777 (substitute* "test/test_mini_test.rb"
5778 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5779 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5780 (("gsub\\(/.*, 'FILE:LINE'\\)")
5781 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5782 #t)))))
5783 (propagated-inputs
5784 `(("ruby-minitest-4" ,ruby-minitest-4)))
5785 (native-inputs
5786 `(("ruby-hoe" ,ruby-hoe)))
5787 (synopsis "Adapter library between minitest and test/unit")
5788 (description
5789 "This library bridges the gap between the small and fast minitest and
5790 Ruby's large and slower test/unit.")
5791 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5792 (license license:expat)))
5793
5794 (define-public ruby-term-ansicolor
5795 (package
5796 (name "ruby-term-ansicolor")
5797 (version "1.6.0")
5798 (source (origin
5799 (method url-fetch)
5800 (uri (rubygems-uri "term-ansicolor" version))
5801 (sha256
5802 (base32
5803 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
5804 (build-system ruby-build-system)
5805 ;; Rebuilding the gemspec seems to require git, even though this is not a
5806 ;; git repository, so we just build the gem from the existing gemspec.
5807 (arguments
5808 `(#:phases
5809 (modify-phases %standard-phases
5810 (add-after 'unpack 'fix-test
5811 (lambda -
5812 (substitute* "tests/hsl_triple_test.rb"
5813 (("0\\\\\\.0%")
5814 "0\\.?0?%"))))
5815 (replace 'build
5816 (lambda _
5817 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
5818 (propagated-inputs
5819 `(("ruby-tins" ,ruby-tins)))
5820 (native-inputs
5821 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5822 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5823 (synopsis "Ruby library to control the attributes of terminal output")
5824 (description
5825 "This Ruby library uses ANSI escape sequences to control the attributes
5826 of terminal output.")
5827 (home-page "https://flori.github.io/term-ansicolor/")
5828 ;; There is no mention of the "or later" clause.
5829 (license license:gpl2)))
5830
5831 (define-public ruby-terraform
5832 (package
5833 (name "ruby-terraform")
5834 (version "0.22.0")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (rubygems-uri "ruby-terraform" version))
5839 (sha256
5840 (base32
5841 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5842 (build-system ruby-build-system)
5843 (arguments
5844 '(#:tests? #f)) ; No included tests
5845 (propagated-inputs
5846 `(("ruby-lino" ,ruby-lino)))
5847 (synopsis "Ruby wrapper around the Terraform command line interface")
5848 (description
5849 "This package provides a Ruby wrapper around the Terraform command line
5850 interface so that Terraform can be more easily invoked from Ruby code.")
5851 (home-page "https://github.com/infrablocks/ruby_terraform")
5852 (license license:expat)))
5853
5854 (define-public ruby-pstree
5855 (package
5856 (name "ruby-pstree")
5857 (version "0.1.0")
5858 (source (origin
5859 (method url-fetch)
5860 (uri (rubygems-uri "pstree" version))
5861 (sha256
5862 (base32
5863 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5864 (build-system ruby-build-system)
5865 (native-inputs
5866 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5867 ("bundler" ,bundler)))
5868 (synopsis "Create a process tree data structure")
5869 (description
5870 "This library uses the output of the @code{ps} command to create a
5871 process tree data structure for the current host.")
5872 (home-page "https://github.com/flori/pstree")
5873 ;; There is no mention of the "or later" clause.
5874 (license license:gpl2)))
5875
5876 (define-public ruby-utils
5877 (package
5878 (name "ruby-utils")
5879 (version "0.9.0")
5880 (source (origin
5881 (method url-fetch)
5882 (uri (rubygems-uri "utils" version))
5883 (sha256
5884 (base32
5885 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
5886 (build-system ruby-build-system)
5887 (propagated-inputs
5888 `(("ruby-tins" ,ruby-tins)
5889 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5890 ("ruby-pstree" ,ruby-pstree)
5891 ("ruby-pry-editline" ,ruby-pry-editline)))
5892 (native-inputs
5893 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5894 ("bundler" ,bundler)))
5895 (synopsis "Command line tools for working with Ruby")
5896 (description
5897 "This package provides assorted command line tools that may be useful
5898 when working with Ruby code.")
5899 (home-page "https://github.com/flori/utils")
5900 ;; There is no mention of the "or later" clause.
5901 (license license:gpl2)))
5902
5903 (define-public ruby-jaro-winkler
5904 (package
5905 (name "ruby-jaro-winkler")
5906 (version "1.5.4")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (rubygems-uri "jaro_winkler" version))
5911 (sha256
5912 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
5913 (build-system ruby-build-system)
5914 (arguments
5915 '(#:tests? #f)) ; no included tests
5916 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5917 (description
5918 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5919 algorithm. It is written as a C extension and will fallback to a pure Ruby
5920 implementation on platforms where this is unsupported.")
5921 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5922 (license license:expat)))
5923
5924 (define-public ruby-json
5925 (package
5926 (name "ruby-json")
5927 (version "2.1.0")
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (rubygems-uri "json" version))
5932 (sha256
5933 (base32
5934 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
5935 (build-system ruby-build-system)
5936 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5937 (synopsis "JSON library for Ruby")
5938 (description "This Ruby library provides a JSON implementation written as
5939 a native C extension.")
5940 (home-page "http://json-jruby.rubyforge.org/")
5941 (license (list license:ruby license:gpl2)))) ; GPL2 only
5942
5943 (define-public ruby-json-pure
5944 (package
5945 (name "ruby-json-pure")
5946 (version "2.2.0")
5947 (source (origin
5948 (method url-fetch)
5949 (uri (rubygems-uri "json_pure" version))
5950 (sha256
5951 (base32
5952 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
5953 (build-system ruby-build-system)
5954 (arguments
5955 `(#:phases
5956 (modify-phases %standard-phases
5957 (add-after 'unpack 'fix-rakefile
5958 (lambda _
5959 (substitute* "Rakefile"
5960 ;; Since this is not a git repository, do not call 'git'.
5961 (("`git ls-files`") "`find . -type f |sort`")
5962 ;; Loosen dependency constraint.
5963 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5964 #t))
5965 (add-after 'replace-git-ls-files 'regenerate-gemspec
5966 (lambda _
5967 ;; Regenerate gemspec so loosened dependency constraints are
5968 ;; propagated.
5969 (invoke "rake" "gemspec")))
5970 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5971 (lambda _
5972 ;; This gemspec doesn't look to be generated by the above
5973 ;; command, so patch it separately.
5974 (substitute* "json-java.gemspec"
5975 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5976 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5977 #t)))))
5978 (native-inputs
5979 `(("bundler" ,bundler)
5980 ("ragel" ,ragel)
5981 ("ruby-simplecov" ,ruby-simplecov)
5982 ("ruby-test-unit" ,ruby-test-unit)))
5983 (synopsis "JSON implementation in pure Ruby")
5984 (description
5985 "This package provides a JSON implementation written in pure Ruby.")
5986 (home-page "https://flori.github.com/json/")
5987 (license license:ruby)))
5988
5989 (define-public ruby-jwt
5990 (package
5991 (name "ruby-jwt")
5992 (version "2.1.0")
5993 (source
5994 (origin
5995 (method url-fetch)
5996 (uri (rubygems-uri "jwt" version))
5997 (sha256
5998 (base32
5999 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
6000 (build-system ruby-build-system)
6001 (arguments
6002 '(#:test-target "test"
6003 #:phases
6004 (modify-phases %standard-phases
6005 (add-after 'unpack 'remove-unnecessary-dependencies
6006 (lambda _
6007 (substitute* "spec/spec_helper.rb"
6008 (("require 'simplecov.*") "\n")
6009 ;; Use [].each to disable running the SimpleCov configuration
6010 ;; block
6011 (("SimpleCov\\.configure") "[].each")
6012 (("require 'codeclimate-test-reporter'") "")
6013 (("require 'codacy-coverage'") "")
6014 (("Codacy::Reporter\\.start") ""))
6015 #t)))))
6016 (native-inputs
6017 `(("bundler" ,bundler)
6018 ("ruby-rspec" ,ruby-rspec)
6019 ("ruby-rbnacl" ,ruby-rbnacl)))
6020 (synopsis "Ruby implementation of the JSON Web Token standard")
6021 (description
6022 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
6023 @acronym{JWT, JSON Web Token} standard.")
6024 (home-page "https://github.com/jwt/ruby-jwt")
6025 (license license:expat)))
6026
6027 ;; Even though this package only provides bindings for a Mac OSX API it is
6028 ;; required by "ruby-listen" at runtime.
6029 (define-public ruby-rb-fsevent
6030 (package
6031 (name "ruby-rb-fsevent")
6032 (version "0.10.3")
6033 (source (origin
6034 (method url-fetch)
6035 (uri (rubygems-uri "rb-fsevent" version))
6036 (sha256
6037 (base32
6038 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
6039 (build-system ruby-build-system)
6040 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
6041 ;; "listen", which needs "rb-fsevent" at runtime.
6042 (arguments `(#:tests? #f))
6043 (synopsis "FSEvents API with signals catching")
6044 (description
6045 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
6046 (home-page "https://rubygems.org/gems/rb-fsevent")
6047 (license license:expat)))
6048
6049 (define-public ruby-listen
6050 (package
6051 (name "ruby-listen")
6052 (version "3.2.0")
6053 (source
6054 (origin
6055 ;; The gem does not include a Rakefile, so fetch from the Git
6056 ;; repository.
6057 (method git-fetch)
6058 (uri (git-reference
6059 (url "https://github.com/guard/listen")
6060 (commit (string-append "v" version))))
6061 (file-name (git-file-name name version))
6062 (sha256
6063 (base32
6064 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
6065 (build-system ruby-build-system)
6066 (arguments
6067 `(#:test-target "spec"
6068 #:phases
6069 (modify-phases %standard-phases
6070 (add-after 'unpack 'fix-files-in-gemspec
6071 (lambda _
6072 (substitute* "listen.gemspec"
6073 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
6074 #t))
6075 (add-before 'check 'remove-unnecessary-dependencies'
6076 (lambda _
6077 (substitute* "Rakefile"
6078 ;; Rubocop is for code linting, and is unnecessary for running
6079 ;; the tests.
6080 ((".*rubocop.*") ""))
6081 #t)))))
6082 (native-inputs
6083 `(("bundler" ,bundler)
6084 ("ruby-rspec" ,ruby-rspec)))
6085 (inputs
6086 `(;; ruby-thor is used for the command line interface, and is referenced
6087 ;; in the wrapper, and therefore just needs to be an input.
6088 ("ruby-thor" ,ruby-thor)))
6089 (propagated-inputs
6090 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
6091 ("ruby-rb-inotify" ,ruby-rb-inotify)
6092 ("ruby-dep" ,ruby-dep)))
6093 (synopsis "Listen to file modifications")
6094 (description "The Listen gem listens to file modifications and notifies
6095 you about the changes.")
6096 (home-page "https://github.com/guard/listen")
6097 (license license:expat)))
6098
6099 (define-public ruby-loofah
6100 (package
6101 (name "ruby-loofah")
6102 (version "2.2.3")
6103 (source
6104 (origin
6105 (method url-fetch)
6106 (uri (rubygems-uri "loofah" version))
6107 (sha256
6108 (base32
6109 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
6110 (build-system ruby-build-system)
6111 (arguments
6112 '(#:phases
6113 (modify-phases %standard-phases
6114 (add-after 'unpack 'remove-unnecessary-dependencies
6115 (lambda _
6116 ;; concourse is a development tool which is unused, so remove it
6117 ;; so it's not required.
6118 (substitute* "Gemfile"
6119 ((".*\"concourse\".*") "\n"))
6120 (substitute* "Rakefile"
6121 (("require 'concourse'") "")
6122 (("Concourse\\.new.*") "\n"))
6123 #t)))))
6124 (native-inputs
6125 `(("ruby-hoe" ,ruby-hoe)
6126 ("ruby-rr" ,ruby-rr)))
6127 (propagated-inputs
6128 `(("ruby-nokogiri" ,ruby-nokogiri)
6129 ("ruby-crass" ,ruby-crass)))
6130 (synopsis "Ruby library for manipulating and transforming HTML/XML")
6131 (description
6132 "Loofah is a general library for manipulating and transforming HTML/XML
6133 documents and fragments. It's built on top of Nokogiri and libxml2.")
6134 (home-page "https://github.com/flavorjones/loofah")
6135 (license license:expat)))
6136
6137 (define-public ruby-activesupport
6138 (package
6139 (name "ruby-activesupport")
6140 (version "5.2.2.1")
6141 (source
6142 (origin
6143 (method url-fetch)
6144 (uri (rubygems-uri "activesupport" version))
6145 (sha256
6146 (base32
6147 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
6148 (build-system ruby-build-system)
6149 (arguments
6150 `(#:phases
6151 (modify-phases %standard-phases
6152 (replace 'check
6153 (lambda _
6154 ;; There are no tests, instead attempt to load the library.
6155 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
6156 (propagated-inputs
6157 `(("ruby-concurrent" ,ruby-concurrent)
6158 ("ruby-i18n" ,ruby-i18n)
6159 ("ruby-minitest" ,ruby-minitest)
6160 ("ruby-tzinfo" ,ruby-tzinfo)
6161 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
6162 (synopsis "Ruby on Rails utility library")
6163 (description "ActiveSupport is a toolkit of support libraries and Ruby
6164 core extensions extracted from the Rails framework. It includes support for
6165 multibyte strings, internationalization, time zones, and testing.")
6166 (home-page "http://www.rubyonrails.org")
6167 (license license:expat)))
6168
6169 (define-public ruby-crass
6170 (package
6171 (name "ruby-crass")
6172 (version "1.0.6")
6173 (home-page "https://github.com/rgrove/crass")
6174 (source (origin
6175 ;; The gem does not contain tests, so pull from git.
6176 (method git-fetch)
6177 (uri (git-reference
6178 (url home-page)
6179 (commit (string-append "v" version))))
6180 (file-name (git-file-name name version))
6181 (sha256
6182 (base32
6183 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
6184 (build-system ruby-build-system)
6185 (synopsis "Pure Ruby CSS parser")
6186 (description
6187 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
6188 (license license:expat)))
6189
6190 (define-public ruby-nokogumbo
6191 (package
6192 (name "ruby-nokogumbo")
6193 (version "2.0.2")
6194 (source (origin
6195 ;; We use the git reference, because there's no Rakefile in the
6196 ;; published gem and the tarball on Github is outdated.
6197 (method git-fetch)
6198 (uri (git-reference
6199 (url "https://github.com/rubys/nokogumbo")
6200 (commit (string-append "v" version))))
6201 (file-name (string-append name "-" version "-checkout"))
6202 (sha256
6203 (base32
6204 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
6205 (build-system ruby-build-system)
6206 (native-inputs
6207 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
6208 (inputs
6209 `(("gumbo-parser" ,gumbo-parser)))
6210 (propagated-inputs
6211 `(("ruby-nokogiri" ,ruby-nokogiri)))
6212 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
6213 (description
6214 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
6215 access the result as a Nokogiri parsed document.")
6216 (home-page "https://github.com/rubys/nokogumbo/")
6217 (license license:asl2.0)))
6218
6219 (define-public ruby-sanitize
6220 (package
6221 (name "ruby-sanitize")
6222 (version "5.1.0")
6223 (home-page "https://github.com/rgrove/sanitize")
6224 (source (origin
6225 (method git-fetch)
6226 ;; The gem does not include the Rakefile, so we download the
6227 ;; source from Github.
6228 (uri (git-reference
6229 (url home-page)
6230 (commit (string-append "v" version))))
6231 (file-name (git-file-name name version))
6232 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
6233 (sha256
6234 (base32
6235 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
6236 (build-system ruby-build-system)
6237 (propagated-inputs
6238 `(("ruby-crass" ,ruby-crass)
6239 ("ruby-nokogiri" ,ruby-nokogiri)
6240 ("ruby-nokogumbo" ,ruby-nokogumbo)))
6241 (native-inputs
6242 `(("ruby-minitest" ,ruby-minitest)))
6243 (synopsis "Whitelist-based HTML and CSS sanitizer")
6244 (description
6245 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
6246 acceptable elements, attributes, and CSS properties, Sanitize will remove all
6247 unacceptable HTML and/or CSS from a string.")
6248 (license license:expat)))
6249
6250 (define-public ruby-oj
6251 (package
6252 (name "ruby-oj")
6253 (version "3.10.1")
6254 (source
6255 (origin
6256 (method git-fetch)
6257 ;; Version on rubygems.org does not contain Rakefile, so download from
6258 ;; GitHub instead.
6259 (uri (git-reference
6260 (url "https://github.com/ohler55/oj")
6261 (commit (string-append "v" version))))
6262 (file-name (git-file-name name version))
6263 (sha256
6264 (base32
6265 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
6266 (build-system ruby-build-system)
6267 (arguments
6268 '(#:test-target "test_all"
6269 #:phases
6270 (modify-phases %standard-phases
6271 (add-before 'check 'disable-bundler
6272 (lambda _
6273 (substitute* "Rakefile"
6274 (("Bundler\\.with_clean_env") "1.times")
6275 (("bundle exec ") "")))))))
6276 (native-inputs
6277 `(("bundler" ,bundler)
6278 ("ruby-rspec" ,ruby-rspec)
6279 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6280 (synopsis "JSON parser for Ruby optimized for speed")
6281 (description
6282 "Oj is a JSON parser and generator for Ruby, where the encoding and
6283 decoding of JSON is implemented as a C extension to Ruby.")
6284 (home-page "http://www.ohler.com/oj/")
6285 (license (list license:expat ; Ruby code
6286 license:bsd-3)))) ; extension code
6287
6288 (define-public ruby-ox
6289 (package
6290 (name "ruby-ox")
6291 (version "2.6.0")
6292 (source
6293 (origin
6294 (method url-fetch)
6295 (uri (rubygems-uri "ox" version))
6296 (sha256
6297 (base32
6298 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
6299 (build-system ruby-build-system)
6300 (arguments
6301 '(#:tests? #f)) ; no tests
6302 (synopsis "Optimized XML library for Ruby")
6303 (description
6304 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
6305 written as a native C extension. It was designed to be an alternative to
6306 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
6307 alternative to Marshal for Object serialization. ")
6308 (home-page "http://www.ohler.com/ox")
6309 (license license:expat)))
6310
6311 (define-public ruby-redcloth
6312 (package
6313 (name "ruby-redcloth")
6314 (version "4.3.2")
6315 (source (origin
6316 (method url-fetch)
6317 (uri (rubygems-uri "RedCloth" version))
6318 (sha256
6319 (base32
6320 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
6321 (build-system ruby-build-system)
6322 (arguments
6323 `(#:tests? #f ; no tests
6324 #:phases
6325 (modify-phases %standard-phases
6326 ;; Redcloth has complicated rake tasks to build various versions for
6327 ;; multiple targets using RVM. We don't want this so we just use the
6328 ;; existing gemspec.
6329 (replace 'build
6330 (lambda _
6331 (invoke "gem" "build" "redcloth.gemspec"))))))
6332 (native-inputs
6333 `(("bundler" ,bundler)
6334 ("ruby-diff-lcs" ,ruby-diff-lcs)
6335 ("ruby-rspec-2" ,ruby-rspec-2)))
6336 (synopsis "Textile markup language parser for Ruby")
6337 (description
6338 "RedCloth is a Ruby parser for the Textile markup language.")
6339 (home-page "http://redcloth.org")
6340 (license license:expat)))
6341
6342 (define-public ruby-pg
6343 (package
6344 (name "ruby-pg")
6345 (version "1.1.4")
6346 (source
6347 (origin
6348 (method url-fetch)
6349 (uri (rubygems-uri "pg" version))
6350 (sha256
6351 (base32
6352 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
6353 (build-system ruby-build-system)
6354 (arguments
6355 '(#:test-target "spec"))
6356 (native-inputs
6357 `(("ruby-rake-compiler" ,ruby-rake-compiler)
6358 ("ruby-hoe" ,ruby-hoe)
6359 ("ruby-rspec" ,ruby-rspec)))
6360 (inputs
6361 `(("postgresql" ,postgresql)))
6362 (synopsis "Ruby interface to PostgreSQL")
6363 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
6364 with PostgreSQL 9.0 and later.")
6365 (home-page "https://bitbucket.org/ged/ruby-pg")
6366 (license license:ruby)))
6367
6368 (define-public ruby-byebug
6369 (package
6370 (name "ruby-byebug")
6371 (version "9.0.6")
6372 (source
6373 (origin
6374 (method url-fetch)
6375 (uri (rubygems-uri "byebug" version))
6376 (sha256
6377 (base32
6378 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
6379 (build-system ruby-build-system)
6380 (arguments
6381 '(#:tests? #f)) ; no tests
6382 (synopsis "Debugger for Ruby 2")
6383 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6384 TracePoint C API for execution control and the Debug Inspector C API for call
6385 stack navigation. The core component provides support that front-ends can
6386 build on. It provides breakpoint handling and bindings for stack frames among
6387 other things and it comes with a command line interface.")
6388 (home-page "https://github.com/deivid-rodriguez/byebug")
6389 (license license:bsd-2)))
6390
6391 ;;; TODO: Make it the default byebug in core-updates.
6392 (define-public ruby-byebug-11
6393 (package
6394 (inherit ruby-byebug)
6395 (name "ruby-byebug")
6396 (version "11.1.3")
6397 (source
6398 (origin
6399 (method git-fetch)
6400 (uri (git-reference
6401 (url "https://github.com/deivid-rodriguez/byebug")
6402 (commit (string-append "v" version))))
6403 (file-name (git-file-name name version))
6404 (sha256
6405 (base32
6406 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6407 (modules '((guix build utils)))
6408 (snippet
6409 '(begin
6410 ;; Remove wrappers that try to setup a bundle environment.
6411 (with-directory-excursion "bin"
6412 (for-each delete-file '("bundle" "rake" "rubocop"))
6413 ;; ruby-minitest doesn't come with a launcher, so fix the one
6414 ;; provided.
6415 (substitute* "minitest"
6416 (("load File\\.expand_path\\(\"bundle\".*") "")
6417 (("require \"bundler/setup\".*") "")))
6418 #t))))
6419 (arguments
6420 `(#:tests? #t
6421 #:phases
6422 (modify-phases %standard-phases
6423 (add-after 'unpack 'skip-tmp-path-sensitive-test
6424 (lambda _
6425 (substitute* "test/commands/where_test.rb"
6426 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6427 "unless true\n"))
6428 #t))
6429 (add-before 'build 'compile
6430 (lambda _
6431 (invoke "rake" "compile")))
6432 (add-before 'check 'set-home
6433 (lambda _
6434 (setenv "HOME" (getcwd))
6435 #t)))))
6436 (native-inputs
6437 `(("bundler" ,bundler)
6438 ("ruby-chandler" ,ruby-chandler)
6439 ("ruby-minitest" ,ruby-minitest)
6440 ("ruby-pry" ,ruby-pry)
6441 ("ruby-rake-compiler" ,ruby-rake-compiler)
6442 ("ruby-rubocop" ,ruby-rubocop)
6443 ("ruby-yard" ,ruby-yard)))))
6444
6445 (define-public ruby-netrc
6446 (package
6447 (name "ruby-netrc")
6448 (version "0.11.0")
6449 (source (origin
6450 (method url-fetch)
6451 (uri (rubygems-uri "netrc" version))
6452 (sha256
6453 (base32
6454 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6455 (build-system ruby-build-system)
6456 (arguments
6457 `(#:phases
6458 (modify-phases %standard-phases
6459 (replace 'check
6460 ;; There is no Rakefile and minitest can only run one file at once,
6461 ;; so we have to iterate over all test files.
6462 (lambda _
6463 (for-each (lambda (file)
6464 (invoke "ruby" "-Itest" file))
6465 (find-files "./test" "test_.*\\.rb"))
6466 #t)))))
6467 (native-inputs
6468 `(("ruby-minitest" ,ruby-minitest)))
6469 (synopsis "Library to read and update netrc files")
6470 (description
6471 "This library can read and update netrc files, preserving formatting
6472 including comments and whitespace.")
6473 (home-page "https://github.com/geemus/netrc")
6474 (license license:expat)))
6475
6476 (define-public ruby-unf-ext
6477 (package
6478 (name "ruby-unf-ext")
6479 (version "0.0.7.6")
6480 (source (origin
6481 (method url-fetch)
6482 (uri (rubygems-uri "unf_ext" version))
6483 (sha256
6484 (base32
6485 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
6486 (build-system ruby-build-system)
6487 (arguments
6488 `(#:phases
6489 (modify-phases %standard-phases
6490 (add-after 'build 'build-ext
6491 (lambda _ (invoke "rake" "compile:unf_ext")))
6492 (add-before 'check 'lose-rake-compiler-dock-dependency
6493 (lambda _
6494 ;; rake-compiler-dock is listed in the gemspec, but only
6495 ;; required when cross-compiling.
6496 (substitute* "unf_ext.gemspec"
6497 ((".*rake-compiler-dock.*") ""))
6498 #t)))))
6499 (native-inputs
6500 `(("bundler" ,bundler)
6501 ("ruby-rake-compiler" ,ruby-rake-compiler)
6502 ("ruby-test-unit" ,ruby-test-unit)))
6503 (synopsis "Unicode normalization form support library")
6504 (description
6505 "This package provides unicode normalization form support for Ruby.")
6506 (home-page "https://github.com/knu/ruby-unf_ext")
6507 (license license:expat)))
6508
6509 (define-public ruby-tdiff
6510 ;; Use a newer than released snapshot so that rspec-2 is not required.
6511 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6512 (package
6513 (name "ruby-tdiff")
6514 (version (string-append "0.3.3-1." (string-take commit 8)))
6515 (source (origin
6516 (method git-fetch)
6517 (uri (git-reference
6518 (url "https://github.com/postmodern/tdiff")
6519 (commit commit)))
6520 (file-name (string-append name "-" version "-checkout"))
6521 (sha256
6522 (base32
6523 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6524 (build-system ruby-build-system)
6525 (native-inputs
6526 `(("ruby-rspec" ,ruby-rspec)
6527 ("ruby-yard" ,ruby-yard)
6528 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6529 (synopsis "Calculate the differences between two tree-like structures")
6530 (description
6531 "This library provides functions to calculate the differences between two
6532 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
6533 (home-page "https://github.com/postmodern/tdiff")
6534 (license license:expat))))
6535
6536 (define-public ruby-nokogiri-diff
6537 ;; Use a newer than released snapshot so that rspec-2 is not required.
6538 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6539 (package
6540 (name "ruby-nokogiri-diff")
6541 (version (string-append "0.2.0-1." (string-take commit 8)))
6542 (source (origin
6543 (method git-fetch)
6544 (uri (git-reference
6545 (url "https://github.com/postmodern/nokogiri-diff")
6546 (commit commit)))
6547 (file-name (string-append name "-" version "-checkout"))
6548 (sha256
6549 (base32
6550 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6551 (build-system ruby-build-system)
6552 (propagated-inputs
6553 `(("ruby-tdiff" ,ruby-tdiff)
6554 ("ruby-nokogiri" ,ruby-nokogiri)))
6555 (native-inputs
6556 `(("ruby-rspec" ,ruby-rspec)
6557 ("ruby-yard" ,ruby-yard)
6558 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6559 (synopsis "Calculate the differences between two XML/HTML documents")
6560 (description
6561 "@code{Nokogiri::Diff} adds the ability to calculate the
6562 differences (added or removed nodes) between two XML/HTML documents.")
6563 (home-page "https://github.com/postmodern/nokogiri-diff")
6564 (license license:expat))))
6565
6566 (define-public ruby-racc
6567 (package
6568 (name "ruby-racc")
6569 (version "1.4.14")
6570 (source
6571 (origin
6572 (method url-fetch)
6573 (uri (rubygems-uri "racc" version))
6574 (sha256
6575 (base32
6576 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6577 (build-system ruby-build-system)
6578 (native-inputs
6579 `(("ruby-hoe" ,ruby-hoe)
6580 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6581 (synopsis "LALR(1) parser generator for Ruby")
6582 (description
6583 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6584 generates Ruby program.")
6585 (home-page "http://i.loveruby.net/en/projects/racc/")
6586 (license (list
6587 ;; Generally licensed under the LGPL2.1, and some files also
6588 ;; available under the same license as Ruby.
6589 license:lgpl2.1
6590 license:ruby))))
6591
6592 (define-public ruby-rack
6593 (package
6594 (name "ruby-rack")
6595 (version "2.0.6")
6596 (source
6597 (origin
6598 (method git-fetch)
6599 ;; Download from GitHub so that the patch can be applied.
6600 (uri (git-reference
6601 (url "https://github.com/rack/rack")
6602 (commit version)))
6603 (file-name (git-file-name name version))
6604 (sha256
6605 (base32
6606 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
6607 ;; Ignore test which fails inside the build environment but works
6608 ;; outside.
6609 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
6610 (build-system ruby-build-system)
6611 (arguments
6612 '(#:phases
6613 (modify-phases %standard-phases
6614 (add-before 'check 'fix-tests
6615 (lambda _
6616 ;; A few of the tests use the length of a file on disk for
6617 ;; Content-Length and Content-Range headers. However, this file
6618 ;; has a shebang in it which an earlier phase patches, growing
6619 ;; the file size from 193 to 239 bytes when the store prefix is
6620 ;; "/gnu/store".
6621 (let ((size-diff (- (string-length (which "ruby"))
6622 (string-length "/usr/bin/env ruby"))))
6623 (substitute* '("test/spec_file.rb")
6624 (("193")
6625 (number->string (+ 193 size-diff)))
6626 (("bytes(.)22-33" all delimiter)
6627 (string-append "bytes"
6628 delimiter
6629 (number->string (+ 22 size-diff))
6630 "-"
6631 (number->string (+ 33 size-diff))))))
6632 #t))
6633 (add-before 'reset-gzip-timestamps 'make-files-writable
6634 (lambda* (#:key outputs #:allow-other-keys)
6635 ;; Make sure .gz files are writable so that the
6636 ;; 'reset-gzip-timestamps' phase can do its work.
6637 (let ((out (assoc-ref outputs "out")))
6638 (for-each make-file-writable
6639 (find-files out "\\.gz$"))
6640 #t))))))
6641 (native-inputs
6642 `(("ruby-minitest" ,ruby-minitest)
6643 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6644 ("which" ,which)))
6645 (propagated-inputs
6646 `(("ruby-concurrent" ,ruby-concurrent)))
6647 (synopsis "Unified web application interface for Ruby")
6648 (description "Rack provides a minimal, modular and adaptable interface for
6649 developing web applications in Ruby. By wrapping HTTP requests and responses,
6650 it unifies the API for web servers, web frameworks, and software in between
6651 into a single method call.")
6652 (home-page "https://rack.github.io/")
6653 (license license:expat)))
6654
6655 (define-public ruby-rack-test
6656 (package
6657 (name "ruby-rack-test")
6658 (version "0.8.3")
6659 (source
6660 (origin
6661 (method url-fetch)
6662 (uri (rubygems-uri "rack-test" version))
6663 (sha256
6664 (base32
6665 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6666 (build-system ruby-build-system)
6667 (arguments
6668 ;; Disable tests because of circular dependencies: requires sinatra,
6669 ;; which requires rack-protection, which requires rack-test. Instead
6670 ;; simply require the library.
6671 `(#:phases
6672 (modify-phases %standard-phases
6673 (replace 'check
6674 (lambda _
6675 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6676 (propagated-inputs
6677 `(("ruby-rack" ,ruby-rack)))
6678 (synopsis "Testing API for Rack applications")
6679 (description
6680 "Rack::Test is a small, simple testing API for Rack applications. It can
6681 be used on its own or as a reusable starting point for Web frameworks and
6682 testing libraries to build on.")
6683 (home-page "https://github.com/rack-test/rack-test")
6684 (license license:expat)))
6685
6686 (define-public ruby-rack-protection
6687 (package
6688 (name "ruby-rack-protection")
6689 (version "2.0.5")
6690 (source
6691 (origin
6692 (method url-fetch)
6693 (uri (rubygems-uri "rack-protection" version))
6694 (sha256
6695 (base32
6696 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
6697 (build-system ruby-build-system)
6698 (arguments
6699 '(;; Tests missing from the gem.
6700 #:tests? #f))
6701 (propagated-inputs
6702 `(("ruby-rack" ,ruby-rack)))
6703 (native-inputs
6704 `(("bundler" ,bundler)
6705 ("ruby-rspec" ,ruby-rspec-2)
6706 ("ruby-rack-test" ,ruby-rack-test)))
6707 (synopsis "Rack middleware that protects against typical web attacks")
6708 (description "Rack middleware that can be used to protect against typical
6709 web attacks. It can protect all Rack apps, including Rails. For instance, it
6710 protects against cross site request forgery, cross site scripting,
6711 clickjacking, directory traversal, session hijacking and IP spoofing.")
6712 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6713 (license license:expat)))
6714
6715 (define-public ruby-rainbow
6716 (package
6717 (name "ruby-rainbow")
6718 (version "3.0.0")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (rubygems-uri "rainbow" version))
6723 (sha256
6724 (base32
6725 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6726 (build-system ruby-build-system)
6727 (arguments
6728 '(#:phases
6729 (modify-phases %standard-phases
6730 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6731 ;; the Rakefile.
6732 (replace 'check
6733 (lambda* (#:key tests? #:allow-other-keys)
6734 (when tests?
6735 (invoke "rspec"))
6736 #t)))))
6737 (native-inputs
6738 `(("bundler" ,bundler)
6739 ("ruby-rspec" ,ruby-rspec)))
6740 (synopsis "Colorize printed text on ANSI terminals")
6741 (description
6742 "@code{rainbow} provides a string presenter object to colorize strings by
6743 wrapping them in ANSI escape codes.")
6744 (home-page "https://github.com/sickill/rainbow")
6745 (license license:expat)))
6746
6747 (define-public ruby-rr
6748 (package
6749 (name "ruby-rr")
6750 (version "1.2.1")
6751 (source
6752 (origin
6753 (method url-fetch)
6754 (uri (rubygems-uri "rr" version))
6755 (sha256
6756 (base32
6757 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6758 (build-system ruby-build-system)
6759 (arguments
6760 '(#:tests? #f)) ; test files not included
6761 (native-inputs
6762 `(("bundler" ,bundler)
6763 ("ruby-rspec" ,ruby-rspec)))
6764 (synopsis "Ruby test double framework")
6765 (description
6766 "RR is a test double framework that features a rich selection of double
6767 techniques and a terse syntax.")
6768 (home-page "https://rr.github.io/rr/")
6769 (license license:expat)))
6770
6771 (define-public ruby-rest-client
6772 (package
6773 (name "ruby-rest-client")
6774 (version "2.0.2")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (rubygems-uri "rest-client" version))
6779 (sha256
6780 (base32
6781 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6782 (build-system ruby-build-system)
6783 (arguments
6784 '(#:phases
6785 (modify-phases %standard-phases
6786 (add-before 'check 'remove-unnecessary-development-dependencies
6787 (lambda _
6788 (substitute* "rest-client.gemspec"
6789 ;; Remove rubocop as it's unused. Rubocop also indirectly
6790 ;; depends on this package through ruby-parser and ruby-ast so
6791 ;; this avoids a dependency loop.
6792 ((".*rubocop.*") "\n")
6793 ;; Remove pry as it's unused, it's a debugging tool
6794 ((".*pry.*") "\n")
6795 ;; Remove an unnecessarily strict rdoc dependency
6796 ((".*rdoc.*") "\n"))
6797 #t))
6798 (add-before 'check 'delete-network-dependent-tests
6799 (lambda _
6800 (delete-file "spec/integration/request_spec.rb")
6801 (delete-file "spec/integration/httpbin_spec.rb")
6802 #t)))))
6803 (propagated-inputs
6804 `(("ruby-http-cookie" ,ruby-http-cookie)
6805 ("ruby-mime-types" ,ruby-mime-types)
6806 ("ruby-netrc" ,ruby-netrc)))
6807 (native-inputs
6808 `(("bundler" ,bundler)
6809 ("ruby-webmock" ,ruby-webmock-2)
6810 ("ruby-rspec" ,ruby-rspec)))
6811 (synopsis "Simple HTTP and REST client for Ruby")
6812 (description
6813 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6814 inspired by the Sinatra microframework style of specifying actions:
6815 @code{get}, @code{put}, @code{post}, @code{delete}.")
6816 (home-page "https://github.com/rest-client/rest-client")
6817 (license license:expat)))
6818
6819 (define-public ruby-rubocop-ast
6820 (package
6821 (name "ruby-rubocop-ast")
6822 (version "0.3.0")
6823 (source
6824 (origin
6825 (method git-fetch) ;no test suite in distributed gem
6826 (uri (git-reference
6827 (url "https://github.com/rubocop-hq/rubocop-ast")
6828 (commit (string-append "v" version))))
6829 (file-name (git-file-name name version))
6830 (sha256
6831 (base32
6832 "1ycf6qcj8nbzk2js72priim4642lkn56w5kbny1nlryjkckxgm04"))))
6833 (build-system ruby-build-system)
6834 (arguments
6835 `(#:test-target "spec"
6836 #:phases (modify-phases %standard-phases
6837 (add-after 'unpack 'disable-bundler
6838 (lambda _
6839 (substitute* "Rakefile"
6840 (("Bundler\\.setup.*") "nil\n"))
6841 #t))
6842 (replace 'replace-git-ls-files
6843 (lambda _
6844 (substitute* "rubocop-ast.gemspec"
6845 (("`git ls-files(.*)`" _ files)
6846 (format #f "`find ~a -type f| sort`" files)))
6847 #t)))))
6848 (native-inputs
6849 `(("ruby-bump" ,ruby-bump)
6850 ("ruby-rspec" ,ruby-rspec)))
6851 (propagated-inputs
6852 `(("ruby-parser" ,ruby-parser)))
6853 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6854 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6855 by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6856 @itemize
6857 @item @code{RuboCop::AST::Node}
6858 @item @code{RuboCop::AST::NodePattern}
6859 @end itemize")
6860 (home-page "https://rubocop.org/")
6861 (license license:expat)))
6862
6863 (define-public ruby-rexml
6864 (package
6865 (name "ruby-rexml")
6866 (version "3.2.4")
6867 (source
6868 (origin
6869 (method git-fetch) ;no tests in distributed gem
6870 (uri (git-reference
6871 (url "https://github.com/ruby/rexml")
6872 (commit (string-append "v" version))))
6873 (file-name (git-file-name name version))
6874 (sha256
6875 (base32
6876 "0rhjjbkaq2f2cs8hyr2i4yjqpcyl8m0wmr2cypa401m3fvz4221i"))))
6877 (build-system ruby-build-system)
6878 (synopsis "XML toolkit for Ruby")
6879 (description "Inspired by Electric XML library for Java, REXML aims to be
6880 easy-to-use API, small and fast. It supports both tree and stream document
6881 parsing.")
6882 (home-page "https://github.com/ruby/rexml")
6883 (license license:bsd-2)))
6884
6885 (define-public ruby-character-set
6886 (package
6887 (name "ruby-character-set")
6888 (version "1.4.0")
6889 (source
6890 (origin
6891 (method url-fetch)
6892 (uri (rubygems-uri "character_set" version))
6893 (sha256
6894 (base32
6895 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
6896 (build-system ruby-build-system)
6897 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
6898 (synopsis "Ruby library to manipulate Unicode")
6899 (description "CharacterSet is a C-extended Ruby library to work with sets
6900 of Unicode code points. It can read and write these sets in various formats
6901 and implements the @code{stdlib} @code{Set} interface for them. It also
6902 offers an alternate paradigm of @code{String} processing which grants much
6903 better performance than @code{Regexp} and @code{String} methods from the
6904 @code{stdlib} where applicable. Many parts can be used independently, e.g.:
6905 @itemize
6906 @item @code{CharacterSet::Character}
6907 @item @code{CharacterSet::Parser}
6908 @item @code{CharacterSet::Writer}
6909 @item @code{RangeCompressor}
6910 @end itemize")
6911 (home-page "https://github.com/jaynetics/character_set")
6912 (license license:expat)))
6913
6914 (define-public ruby-range-compressor
6915 (package
6916 (name "ruby-range-compressor")
6917 (version "1.0.0")
6918 (source
6919 (origin
6920 (method git-fetch)
6921 (uri (git-reference
6922 (url "https://github.com/janosch-x/range_compressor")
6923 (commit (string-append "v" version))))
6924 (file-name (git-file-name name version))
6925 (sha256
6926 (base32
6927 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
6928 (build-system ruby-build-system)
6929 (arguments
6930 `(#:test-target "spec"
6931 #:phases (modify-phases %standard-phases
6932 (add-after 'extract-gemspec 'strip-version-requirements
6933 (lambda _
6934 (substitute* "range_compressor.gemspec"
6935 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
6936 (string-append stripped "\n")))
6937 #t)))))
6938 (native-inputs
6939 `(("ruby-rspec" ,ruby-rspec)))
6940 (synopsis "Simple arrays of objects to arrays of ranges compressor")
6941 (description "RangeCompresses is a tiny library that allows compressing
6942 arrays of objects into arrays of ranges. For example, it can turn the
6943 following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
6944 (home-page "https://github.com/janosch-x/range_compressor")
6945 (license license:expat)))
6946
6947 (define-public ruby-regexp-property-values
6948 (package
6949 (name "ruby-regexp-property-values")
6950 (version "1.0.0")
6951 (source
6952 (origin
6953 (method git-fetch)
6954 (uri (git-reference ;no test suite in distributed gem
6955 (url "https://github.com/jaynetics/regexp_property_values")
6956 (commit (string-append "v" version))))
6957 (file-name (git-file-name name version))
6958 (sha256
6959 (base32
6960 "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
6961 (build-system ruby-build-system)
6962 (arguments
6963 '(#:test-target "default"))
6964 (native-inputs
6965 `(("ruby-character-set" ,ruby-character-set)
6966 ("ruby-rake-compiler" ,ruby-rake-compiler)
6967 ("ruby-range-compressor" ,ruby-range-compressor)
6968 ("ruby-rspec" ,ruby-rspec)))
6969 (synopsis "Inspect Ruby's regex engine property values")
6970 (description "This small library lets you see which property values are
6971 supported by the regular expression engine of the Ruby version you are running
6972 and can directly read out their code point ranges. In other words, it
6973 determines all supported values for @code{\\p{value}} expressions and what
6974 they match.")
6975 (home-page "https://github.com/jaynetics/regexp_property_values")
6976 (license license:expat)))
6977
6978 (define-public ruby-regexp-parser
6979 (package
6980 (name "ruby-regexp-parser")
6981 (version "1.7.1")
6982 (source
6983 (origin
6984 (method git-fetch) ;bin/test missing from gem
6985 (uri (git-reference
6986 (url "https://github.com/ammar/regexp_parser")
6987 (commit (string-append "v" version))))
6988 (file-name (git-file-name name version))
6989 (sha256
6990 (base32
6991 "0dk9d4vpw31cc06s29fqyr1kq0kipym1mydifkcrnppvpl3pd53r"))))
6992 (build-system ruby-build-system)
6993 (arguments
6994 '(#:test-target "default"
6995 #:phases (modify-phases %standard-phases
6996 (add-before 'build 'compile-scanner.rb
6997 (lambda _
6998 (invoke "rake" "build")
6999 ;; XXX: This is needed otherwise the install
7000 ;; phase fails to delete the installed cached
7001 ;; gem file.
7002 (delete-file-recursively "pkg")
7003 #t)))))
7004 (native-inputs
7005 `(("ragel" ,ragel)
7006 ("ruby-regexp-property-values" ,ruby-regexp-property-values)
7007 ("ruby-rspec" ,ruby-rspec)))
7008 (synopsis "A regular expression parser library for Ruby ")
7009 (description "A Ruby gem for tokenizing, parsing, and transforming regular
7010 expressions. It comprises the following components:
7011 @itemize
7012 @item A scanner/tokenizer based on Ragel,
7013 @item A lexer that produces a stream of token objects,
7014 @item A parser that produces a tree of Expression objects.
7015 @end itemize")
7016 (home-page "https://github.com/ammar/regexp_parser")
7017 (license license:expat)))
7018
7019 (define-public ruby-test-queue
7020 (package
7021 (name "ruby-test-queue")
7022 (version "0.4.2")
7023 (source
7024 (origin
7025 (method url-fetch)
7026 (uri (rubygems-uri "test-queue" version))
7027 (sha256
7028 (base32
7029 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
7030 (build-system ruby-build-system)
7031 (arguments
7032 '(#:phases
7033 (modify-phases %standard-phases
7034 (replace 'check
7035 (lambda* (#:key tests? #:allow-other-keys)
7036 (when tests?
7037 (invoke "rspec"))
7038 #t)))))
7039 (native-inputs
7040 `(("ruby-rspec" ,ruby-rspec)))
7041 (synopsis "Minitest/RSpec parallel test runner for CI environments")
7042 (description "The test-queue module is a parallel test runner,
7043 built using a centralized queue to ensure optimal distribution of
7044 tests between workers. It is specifically optimized for Continuous
7045 Integration (CI) environments: build statistics from each run are
7046 stored locally and used to sort the queue at the beginning of the next
7047 run.")
7048 (home-page "https://github.com/tmm1/test-queue")
7049 (license license:expat)))
7050
7051 (define-public ruby-rubocop
7052 (package
7053 (name "ruby-rubocop")
7054 (version "0.88.0")
7055 (source
7056 (origin
7057 (method git-fetch) ;no tests in distributed gem
7058 (uri (git-reference
7059 (url "https://github.com/rubocop-hq/rubocop")
7060 (commit (string-append "v" version))))
7061 (file-name (git-file-name name version))
7062 (sha256
7063 (base32
7064 "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
7065 (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
7066 (build-system ruby-build-system)
7067 (arguments
7068 '(#:test-target "default"
7069 #:phases
7070 (modify-phases %standard-phases
7071 (add-after 'unpack 'remove-problematic-tests
7072 ;; These tests depend on Rubocop extensions, which cannot be
7073 ;; included as they cause a dependency cycle with Rubocop itself.
7074 (lambda _
7075 (delete-file "spec/rubocop/config_loader_spec.rb")
7076 (substitute* "Gemfile"
7077 ((".*'rubocop-performance'.*") "")
7078 ((".*'rubocop-rspec'.*") ""))
7079 ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
7080 ;; errors.
7081 (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
7082 (("# (rubocop:(enable|disable) RSpec.*)" _ what)
7083 (string-append "# Disabled: " what)))
7084 #t))
7085 (add-after 'unpack 'disable-bundler
7086 (lambda _
7087 (substitute* "Rakefile"
7088 (("Bundler\\.setup.*") "nil\n"))
7089 #t))
7090 (replace 'replace-git-ls-files
7091 (lambda _
7092 (substitute* "rubocop.gemspec"
7093 (("`git ls-files(.*)`" _ files)
7094 (format #f "`find ~a -type f| sort`" files)))
7095 #t))
7096 (add-before 'check 'set-home
7097 (lambda _
7098 (setenv "HOME" (getcwd))
7099 #t))
7100 (add-before 'check 'make-adoc-files-writable
7101 (lambda _
7102 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
7103 "\\.adoc$")))
7104 (for-each make-file-writable adoc-files))
7105 #t)))))
7106 (native-inputs
7107 `(("ruby-bump" ,ruby-bump)
7108 ("ruby-pry" ,ruby-pry)
7109 ("ruby-rspec" ,ruby-rspec)
7110 ("ruby-test-queue" ,ruby-test-queue)
7111 ("ruby-webmock" ,ruby-webmock-2)
7112 ("ruby-yard" ,ruby-yard)))
7113 (propagated-inputs
7114 `(("ruby-parallel" ,ruby-parallel)
7115 ("ruby-parser" ,ruby-parser)
7116 ("ruby-rainbow" ,ruby-rainbow)
7117 ("ruby-regexp-parser" ,ruby-regexp-parser)
7118 ("ruby-rexml" ,ruby-rexml)
7119 ("ruby-rubocop-ast" ,ruby-rubocop-ast)
7120 ("ruby-progressbar" ,ruby-progressbar)
7121 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
7122 (synopsis "Ruby code style checking tool")
7123 (description
7124 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
7125 the community-driven Ruby Style Guide.")
7126 (home-page "https://github.com/rubocop-hq/rubocop")
7127 (license license:expat)))
7128
7129 (define-public ruby-contest
7130 (package
7131 (name "ruby-contest")
7132 (version "0.1.3")
7133 (source
7134 (origin
7135 (method url-fetch)
7136 (uri (rubygems-uri "contest" version))
7137 (sha256
7138 (base32
7139 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
7140 (build-system ruby-build-system)
7141 (synopsis "Write declarative tests using nested contexts")
7142 (description
7143 "Contest allows writing declarative @code{Test::Unit} tests using nested
7144 contexts without performance penalties.")
7145 (home-page "https://github.com/citrusbyte/contest")
7146 (license license:expat)))
7147
7148 (define-public ruby-creole
7149 (package
7150 (name "ruby-creole")
7151 (version "0.5.0")
7152 (source
7153 (origin
7154 (method url-fetch)
7155 (uri (rubygems-uri "creole" version))
7156 (sha256
7157 (base32
7158 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
7159 (build-system ruby-build-system)
7160 (native-inputs
7161 `(("ruby-bacon" ,ruby-bacon)))
7162 (synopsis "Creole markup language converter")
7163 (description
7164 "Creole is a lightweight markup language and this library for converting
7165 creole to @code{HTML}.")
7166 (home-page "https://github.com/minad/creole")
7167 (license license:ruby)))
7168
7169 (define-public ruby-docile
7170 (package
7171 (name "ruby-docile")
7172 (version "1.1.5")
7173 (source
7174 (origin
7175 (method url-fetch)
7176 (uri (rubygems-uri "docile" version))
7177 (sha256
7178 (base32
7179 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
7180 (build-system ruby-build-system)
7181 (arguments
7182 '(#:tests? #f)) ; needs github-markup, among others
7183 (synopsis "Ruby EDSL helper library")
7184 (description "Docile is a Ruby library that provides an interface for
7185 creating embedded domain specific languages (EDSLs) that manipulate existing
7186 Ruby classes.")
7187 (home-page "https://ms-ati.github.io/docile/")
7188 (license license:expat)))
7189
7190 (define-public ruby-middleware
7191 (package
7192 (name "ruby-middleware")
7193 (version "0.1.0")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (rubygems-uri "middleware" version))
7198 (sha256
7199 (base32
7200 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
7201 (build-system ruby-build-system)
7202 (arguments '(#:tests? #f)) ;no test suite
7203 (synopsis "Implementation of a middleware abstraction for Ruby")
7204 (description "Middleware is a generalized implementation of a middleware
7205 abstraction for Ruby.")
7206 (home-page "https://github.com/mitchellh/middleware")
7207 (license license:expat)))
7208
7209 (define-public ruby-benchmark-ips
7210 (package
7211 (name "ruby-benchmark-ips")
7212 (version "2.8.2")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (rubygems-uri "benchmark-ips" version))
7217 (sha256
7218 (base32
7219 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
7220 (build-system ruby-build-system)
7221 (native-inputs
7222 `(("ruby-hoe" ,ruby-hoe)))
7223 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
7224 (description "Benchmark-ips enhances the Ruby Benchmark module with the
7225 iterations per second count. For short snippets of code, it can automatically
7226 figure out how many times to run the code to get interesting data.")
7227 (home-page "https://github.com/evanphx/benchmark-ips")
7228 (license license:expat)))
7229
7230 (define-public ruby-ffi-rzmq-core
7231 (package
7232 (name "ruby-ffi-rzmq-core")
7233 (version "1.0.7")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (rubygems-uri "ffi-rzmq-core" version))
7238 (sha256
7239 (base32
7240 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
7241 (build-system ruby-build-system)
7242 (arguments
7243 `(#:phases
7244 (modify-phases %standard-phases
7245 (add-after 'unpack 'patch-libzmq-search-path
7246 (lambda* (#:key inputs #:allow-other-keys)
7247 (let ((zeromq (assoc-ref inputs "zeromq")))
7248 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
7249 (("/usr/local/lib")
7250 (string-append zeromq "/lib")))
7251 #t)))
7252 (replace 'check
7253 (lambda _
7254 (invoke "rspec"))))))
7255 (native-inputs
7256 `(("ruby-rspec" ,ruby-rspec)))
7257 (inputs
7258 `(("zeromq" ,zeromq)))
7259 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7260 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
7261 (description "This library only provides the FFI wrapper for the ZeroMQ
7262 networking library. It can be used to implement a Ruby API for the ZeroMQ
7263 library.")
7264 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
7265 (license license:expat)))
7266
7267 (define-public ruby-ffi-rzmq
7268 (package
7269 (name "ruby-ffi-rzmq")
7270 (version "2.0.7")
7271 (source
7272 (origin
7273 (method url-fetch)
7274 (uri (rubygems-uri "ffi-rzmq" version))
7275 (sha256
7276 (base32
7277 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
7278 (build-system ruby-build-system)
7279 (arguments '(#:tests? #t
7280 #:phases (modify-phases %standard-phases
7281 (replace 'check
7282 (lambda _
7283 (invoke "rspec"))))))
7284 (native-inputs
7285 `(("ruby-rspec" ,ruby-rspec)))
7286 (propagated-inputs
7287 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
7288 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
7289 (description "This library provides a high-level API that wraps the ZeroMQ
7290 networking library using the Ruby foreign function interface (FFI). It is a
7291 pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
7292 for FFI.")
7293 (home-page "https://github.com/chuckremes/ffi-rzmq")
7294 (license license:expat)))
7295
7296 (define-public ruby-sawyer
7297 (package
7298 (name "ruby-sawyer")
7299 (version "0.8.2")
7300 (source
7301 (origin
7302 (method url-fetch)
7303 (uri (rubygems-uri "sawyer" version))
7304 (sha256
7305 (base32
7306 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
7307 (build-system ruby-build-system)
7308 (propagated-inputs
7309 `(("ruby-addressable" ,ruby-addressable)
7310 ("ruby-faraday" ,ruby-faraday)))
7311 (synopsis "Experimental hypermedia agent for Ruby")
7312 (description "Sawyer is an experimental hypermedia agent for Ruby built on
7313 top of Faraday.")
7314 (home-page "https://github.com/lostisland/sawyer")
7315 (license license:expat)))
7316
7317 (define-public ruby-octokit
7318 (package
7319 (name "ruby-octokit")
7320 (version "4.18.0")
7321 (source
7322 (origin
7323 (method url-fetch)
7324 (uri (rubygems-uri "octokit" version))
7325 (sha256
7326 (base32
7327 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
7328 (build-system ruby-build-system)
7329 (arguments '(#:tests? #f)) ;no test suite in the gem release
7330 (propagated-inputs
7331 `(("ruby-faraday" ,ruby-faraday)
7332 ("ruby-sawyer" ,ruby-sawyer)))
7333 (synopsis "Ruby toolkit for the GitHub API")
7334 (description "Octokit wraps the GitHub API in a flat API client that
7335 follows Ruby conventions and requires little knowledge of REST.")
7336 (home-page "https://github.com/octokit/octokit.rb")
7337 (license license:expat)))
7338
7339 (define-public ruby-chandler
7340 (package
7341 (name "ruby-chandler")
7342 (version "0.9.0")
7343 (source
7344 (origin
7345 (method url-fetch)
7346 (uri (rubygems-uri "chandler" version))
7347 (sha256
7348 (base32
7349 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
7350 (build-system ruby-build-system)
7351 (native-inputs
7352 `(("ruby-rubocop" ,ruby-rubocop)))
7353 (propagated-inputs
7354 `(("ruby-netrc" ,ruby-netrc)
7355 ("ruby-octokit" ,ruby-octokit)))
7356 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
7357 (description "Chandler syncs a project's CHANGELOG file entries to
7358 GitHub's release notes to remove the need of manually entering release
7359 notes.")
7360 (home-page "https://github.com/mattbrictson/chandler")
7361 (license license:expat)))
7362
7363 (define-public ruby-pry-byebug
7364 (package
7365 (name "ruby-pry-byebug")
7366 (version "3.9.0")
7367 (source
7368 (origin
7369 (method git-fetch)
7370 (uri (git-reference
7371 (url "https://github.com/deivid-rodriguez/pry-byebug")
7372 (commit (string-append "v" version))))
7373 (file-name (git-file-name name version))
7374 (sha256
7375 (base32
7376 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7377 (build-system ruby-build-system)
7378 (arguments
7379 `(#:phases (modify-phases %standard-phases
7380 (add-before 'check 'set-home
7381 (lambda _
7382 (setenv "HOME" (getcwd))
7383 #t)))))
7384 (native-inputs
7385 `(("ruby-chandler" ,ruby-chandler)
7386 ("ruby-rubocop" ,ruby-rubocop)
7387 ("ruby-simplecov" ,ruby-simplecov)))
7388 (propagated-inputs
7389 `(("ruby-byebug" ,ruby-byebug-11)
7390 ("ruby-pry" ,ruby-pry)))
7391 (synopsis "Step-by-step debugging and stack navigation in Pry")
7392 (description "This package adds step-by-step debugging and stack
7393 navigation capabilities to @code{pry}, using @code{byebug}.")
7394 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7395 (license license:expat)))
7396
7397 (define-public ruby-binding-of-caller
7398 (package
7399 (name "ruby-binding-of-caller")
7400 (version "0.8.0")
7401 (source
7402 (origin
7403 (method url-fetch)
7404 (uri (rubygems-uri "binding_of_caller" version))
7405 (sha256
7406 (base32
7407 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7408 (build-system ruby-build-system)
7409 ;; Attempting to run the test suite fails with a rake deprecation error
7410 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7411 (arguments '(#:tests? #f))
7412 (propagated-inputs
7413 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
7414 (synopsis "Retrieve the binding of a method's caller")
7415 (description "The @code{binding_of_caller} module provides the
7416 @code{Binding#of_caller} method. It allows accessing bindings from upper
7417 frames in the call stack and can evaluate code in that context.")
7418 (home-page "https://github.com/banister/binding_of_caller")
7419 (license license:expat)))
7420
7421 (define-public ruby-pry-stack-explorer
7422 (package
7423 (name "ruby-pry-stack-explorer")
7424 (version "0.5.1")
7425 (source
7426 (origin
7427 (method url-fetch)
7428 (uri (rubygems-uri "pry-stack_explorer" version))
7429 (sha256
7430 (base32
7431 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7432 (build-system ruby-build-system)
7433 (arguments '(#:tests? #f)) ;no test suite in gem release
7434 (propagated-inputs
7435 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
7436 ("ruby-pry" ,ruby-pry)))
7437 (synopsis "Call-stack navigation plugin for the Pry REPL")
7438 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7439 add support to navigate the call-stack.")
7440 (home-page "https://github.com/pry/pry-stack_explorer")
7441 (license license:expat)))
7442
7443 (define-public ruby-varint
7444 (package
7445 (name "ruby-varint")
7446 (version "0.1.1")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (rubygems-uri "varint" version))
7451 (sha256
7452 (base32
7453 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7454 (build-system ruby-build-system)
7455 (arguments '(#:tests? #f)) ;no test suite
7456 (synopsis "Variable length integers (varint) C extension for Ruby")
7457 (description "This package provides a small C extension to speed up
7458 variable length integers (varint) in Ruby Protocol Buffers.")
7459 (home-page "https://github.com/liquidm/varint")
7460 (license license:bsd-3)))
7461
7462 (define-public ruby-ruby-prof
7463 (package
7464 (name "ruby-ruby-prof")
7465 (version "1.4.1")
7466 (source
7467 (origin
7468 (method url-fetch)
7469 (uri (rubygems-uri "ruby-prof" version))
7470 (sha256
7471 (base32
7472 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
7473 (build-system ruby-build-system)
7474 (arguments
7475 `(#:phases
7476 (modify-phases %standard-phases
7477 (add-after 'unpack 'patch-rakefile
7478 ;; This fixes the following error: "NameError: uninitialized
7479 ;; constant Bundler::GemHelper" (see:
7480 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7481 (lambda _
7482 (substitute* "Rakefile"
7483 ((".*require \"bundler/setup\".*" all)
7484 (string-append all " require 'bundler/gem_tasks'\n")))
7485 #t))
7486 ;; The LineNumbersTest test fails non-deterministically (see:
7487 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7488 (add-after 'extract-gemspec 'delete-flaky-test
7489 (lambda _
7490 (delete-file "test/line_number_test.rb")
7491 (substitute* "ruby-prof.gemspec"
7492 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7493 #t))
7494 (add-before 'check 'compile
7495 (lambda _
7496 (invoke "rake" "compile"))))))
7497 (native-inputs
7498 `(("bundler" ,bundler)
7499 ("ruby-minitest" ,ruby-minitest)
7500 ("ruby-rake-compiler" ,ruby-rake-compiler)
7501 ("ruby-rdoc" ,ruby-rdoc)))
7502 (synopsis "Fast code profiler for Ruby")
7503 (description "RubyProf is a fast code profiler for Ruby. Its features
7504 include:
7505 @table @asis
7506 @item Speed
7507 Being a C extension, it is many times faster than the standard Ruby profiler.
7508 @item Measurement Modes
7509 It can measure program wall time, process time, object allocations and memory
7510 usage.
7511 @item Reports
7512 A variety of text and cross-referenced HTML reports can be generated.
7513 @item Threads
7514 Profiling multiple threads simultaneously is supported.
7515 @end table")
7516 (home-page "https://github.com/ruby-prof/ruby-prof")
7517 (license license:bsd-2)))
7518
7519 (define-public ruby-cucumber-messages
7520 (package
7521 (name "ruby-cucumber-messages")
7522 (version "12.2.0")
7523 (source (origin
7524 (method git-fetch)
7525 (uri (git-reference
7526 (url "https://github.com/cucumber/messages-ruby")
7527 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7528 (file-name (git-file-name name version))
7529 (sha256
7530 (base32
7531 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7532 (build-system ruby-build-system)
7533 (arguments
7534 `(#:phases (modify-phases %standard-phases
7535 (add-after 'unpack 'patch-protobuf.rb
7536 (lambda _
7537 (substitute* "rake/protobuf.rb"
7538 (("load 'protobuf/tasks/compile.rake'")
7539 "require 'protobuf/tasks'"))
7540 #t))
7541 (add-before 'build 'compile
7542 (lambda _
7543 (substitute* "Makefile"
7544 (("bundle exec ") "")
7545 (("include default.mk.*" all)
7546 (string-append "#" all)))
7547 (invoke "make")))
7548 (replace 'check
7549 (lambda _
7550 (invoke "rspec"))))))
7551 (propagated-inputs
7552 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7553 (native-inputs
7554 `(("ruby-rspec" ,ruby-rspec)))
7555 (home-page "https://github.com/cucumber/messages-ruby")
7556 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7557 (description "Cucumber Messages for Ruby is a library which allows
7558 serialization and deserialization of the protocol buffer messages used in
7559 Cucumber.")
7560 (license license:expat)))
7561
7562 (define-public ruby-gherkin
7563 (package
7564 (name "ruby-gherkin")
7565 (version "14.0.1")
7566 (source (origin
7567 (method git-fetch)
7568 (uri (git-reference
7569 (url "https://github.com/cucumber/gherkin-ruby")
7570 (commit (string-append "v" version))))
7571 (file-name (git-file-name name version))
7572 (sha256
7573 (base32
7574 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
7575 (build-system ruby-build-system)
7576 (native-inputs
7577 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7578 ("ruby-rspec" ,ruby-rspec)))
7579 (arguments
7580 `(#:test-target "spec"))
7581 (synopsis "Gherkin parser for Ruby")
7582 (description "Gherkin is a parser and compiler for the Gherkin language.
7583 It is intended be used by all Cucumber implementations to parse
7584 @file{.feature} files.")
7585 (home-page "https://github.com/cucumber/gherkin-ruby")
7586 (license license:expat)))
7587
7588 (define-public ruby-gherkin-ruby
7589 (package
7590 (name "ruby-gherkin-ruby")
7591 (version "0.3.2")
7592 (home-page "https://github.com/codegram/gherkin-ruby")
7593 (source (origin
7594 (method url-fetch)
7595 (uri (rubygems-uri "gherkin-ruby" version))
7596 (sha256
7597 (base32
7598 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7599 (build-system ruby-build-system)
7600 (synopsis "Pure Ruby Gherkin parser")
7601 (description
7602 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7603 200 lines of code.")
7604 ;; XXX: No license information anywhere but Readme.md.
7605 (license license:expat)))
7606
7607 (define-public ruby-aruba
7608 (package
7609 (name "ruby-aruba")
7610 (version "0.14.14")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (rubygems-uri "aruba" version))
7615 (sha256
7616 (base32
7617 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
7618 (build-system ruby-build-system)
7619 (arguments
7620 '(#:test-target "spec"
7621 #:phases
7622 (modify-phases %standard-phases
7623 (add-after 'unpack 'patch
7624 (lambda _
7625 (substitute* "spec/aruba/api_spec.rb"
7626 ;; This resolves some errors in the specs
7627 ;;
7628 ;; undefined method `parse' for Time:Class
7629 (("require 'spec_helper'")
7630 "require 'spec_helper'\nrequire 'time'"))
7631 ;; Avoid shebang issues in this spec file
7632 (substitute* "spec/aruba/matchers/command_spec.rb"
7633 (("/usr/bin/env bash")
7634 (which "bash")))
7635 #t))
7636 (add-before 'check 'remove-unnecessary-dependencies
7637 (lambda _
7638 (substitute* "Gemfile"
7639 ((".*byebug.*") "\n")
7640 ((".*pry.*") "\n")
7641 ((".*yaml.*") "\n")
7642 ((".*bcat.*") "\n")
7643 ((".*kramdown.*") "\n")
7644 ((".*rubocop.*") "\n")
7645 ((".*cucumber-pro.*") "\n")
7646 ((".*cucumber.*") "\n")
7647 ((".*license_finder.*") "\n")
7648 ((".*rake.*") "gem 'rake'\n")
7649 ((".*relish.*") "\n"))
7650 (substitute* "aruba.gemspec"
7651 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7652 "spec.add_runtime_dependency 'cucumber'"))
7653 #t))
7654 (add-before 'check 'set-home
7655 (lambda _ (setenv "HOME" "/tmp") #t)))))
7656 (native-inputs
7657 `(("bundler" ,bundler)
7658 ("ruby-rspec" ,ruby-rspec)
7659 ("ruby-fuubar" ,ruby-fuubar)
7660 ("ruby-simplecov" ,ruby-simplecov)))
7661 (propagated-inputs
7662 `(("ruby-childprocess" ,ruby-childprocess)
7663 ("ruby-contracts" ,ruby-contracts)
7664 ("ruby-cucumber" ,ruby-cucumber)
7665 ("ruby-ffi" ,ruby-ffi)
7666 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
7667 ("ruby-thor" ,ruby-thor)
7668 ("ruby-yard" ,ruby-yard)))
7669 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7670 (description
7671 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7672 command-line applications. It supports applications written in any
7673 language.")
7674 (home-page "https://github.com/cucumber/aruba")
7675 (license license:expat)))
7676
7677 ;; A version of ruby-aruba without tests run so that circular dependencies can
7678 ;; be avoided.
7679 (define ruby-aruba-without-tests
7680 (package
7681 (inherit ruby-aruba)
7682 (arguments '(#:tests? #f))
7683 (propagated-inputs
7684 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7685 ,@(alist-delete "ruby-cucumber"
7686 (package-propagated-inputs ruby-aruba))))
7687 (native-inputs '())))
7688
7689 (define-public ruby-sys-uname
7690 (package
7691 (name "ruby-sys-uname")
7692 (version "1.2.1")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (rubygems-uri "sys-uname" version))
7697 (sha256
7698 (base32
7699 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7700 (build-system ruby-build-system)
7701 (arguments
7702 `(#:test-target "spec"))
7703 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7704 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
7705 (synopsis "Ruby interface for gathering system information")
7706 (description "The sys-uname library provides an interface for gathering
7707 information about your current platform. It allows retrieving information
7708 such as the OS name, OS version, system name, etc.")
7709 (home-page "https://github.com/djberg96/sys-uname")
7710 (license license:asl2.0)))
7711
7712 (define-public ruby-cucumber-create-meta
7713 (package
7714 (name "ruby-cucumber-create-meta")
7715 (version "1.0.0")
7716 (source
7717 (origin
7718 (method url-fetch)
7719 (uri (rubygems-uri "cucumber-create-meta" version))
7720 (sha256
7721 (base32
7722 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7723 (build-system ruby-build-system)
7724 (arguments
7725 `(#:phases (modify-phases %standard-phases
7726 (add-after 'extract-gemspec 'relax-version-requirements
7727 (lambda _
7728 (substitute* ".gemspec"
7729 ((" 12\\.2")
7730 " 12.1"))
7731 #t))
7732 (replace 'check
7733 (lambda _
7734 (invoke "rspec"))))))
7735 (native-inputs
7736 `(("ruby-rspec" ,ruby-rspec)))
7737 (propagated-inputs
7738 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7739 ("ruby-sys-uname" ,ruby-sys-uname)))
7740 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7741 (description "The @code{createMeta} utility function allows generating
7742 system-specific @code{Meta} messages for Cucumber Ruby.")
7743 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7744 (license license:expat)))
7745
7746 (define-public ruby-cucumber-html-formatter
7747 (package
7748 (name "ruby-cucumber-html-formatter")
7749 (version "7.0.0")
7750 (source
7751 (origin
7752 (method url-fetch)
7753 (uri (rubygems-uri "cucumber-html-formatter" version))
7754 (sha256
7755 (base32
7756 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7757 (build-system ruby-build-system)
7758 (arguments
7759 `(#:phases (modify-phases %standard-phases
7760 (replace 'check
7761 (lambda _
7762 (invoke "rspec"))))))
7763 (native-inputs
7764 `(("ruby-rspec" ,ruby-rspec)))
7765 (propagated-inputs
7766 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7767 (synopsis "HTML formatter for Cucumber")
7768 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7769 runs. It is built on top of cucumber-react and works with any Cucumber
7770 implementation with a protocol buffer formatter that outputs Cucumber
7771 messages.")
7772 (home-page "https://github.com/cucumber/cucumber/tree/\
7773 master/html-formatter/ruby")
7774 (license license:expat)))
7775
7776 (define-public ruby-cucumber
7777 (package
7778 (name "ruby-cucumber")
7779 (version "4.1.0")
7780 (source
7781 (origin
7782 (method git-fetch)
7783 (uri (git-reference
7784 (url "https://github.com/cucumber/cucumber-ruby")
7785 (commit (string-append "v" version))))
7786 (file-name (git-file-name name version))
7787 (sha256
7788 (base32
7789 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
7790 (build-system ruby-build-system)
7791 (arguments
7792 '(#:test-target "default"
7793 #:phases
7794 (modify-phases %standard-phases
7795 (add-after 'unpack 'disable-rubocop
7796 ;; Rubocop lint check fails with our more recent version.
7797 (lambda _
7798 (substitute* "Rakefile"
7799 (("spec cucumber rubocop")
7800 "spec cucumber"))
7801 #t))
7802 (add-after 'extract-gemspec 'strip-version-requirements
7803 (lambda _
7804 (delete-file "Gemfile") ;do not use Bundler
7805 (substitute* "cucumber.gemspec"
7806 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7807 (string-append stripped "\n")))
7808 #t))
7809 (add-before 'check 'set-home
7810 (lambda _
7811 (setenv "HOME" (getcwd))
7812 #t)))))
7813 (propagated-inputs
7814 `(("ruby-builder" ,ruby-builder)
7815 ("ruby-cucumber-core" ,ruby-cucumber-core)
7816 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7817 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7818 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
7819 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
7820 ("ruby-diff-lcs" ,ruby-diff-lcs)
7821 ("ruby-gherkin" ,ruby-gherkin)
7822 ("ruby-multi-json" ,ruby-multi-json)
7823 ("ruby-multi-test" ,ruby-multi-test)))
7824 (native-inputs
7825 `(;; Use a untested version of aruba, to avoid a circular dependency, as
7826 ;; ruby-aruba depends on ruby-cucumber.
7827 ("ruby-aruba" ,ruby-aruba-without-tests)
7828 ("ruby-rspec" ,ruby-rspec)
7829 ("ruby-pry" ,ruby-pry)
7830 ("ruby-nokogiri" ,ruby-nokogiri)
7831 ("ruby-rubocop" ,ruby-rubocop)))
7832 (synopsis "Describe automated tests in plain language")
7833 (description "Cucumber is a tool for running automated tests written in
7834 plain language. It's designed to support a Behaviour Driven Development (BDD)
7835 software development workflow.")
7836 (home-page "https://cucumber.io/")
7837 (license license:expat)))
7838
7839 (define ruby-cucumber-without-tests
7840 (package (inherit ruby-cucumber)
7841 (arguments
7842 '(#:tests? #f))
7843 (native-inputs
7844 '())))
7845
7846 (define-public ruby-coveralls
7847 (package
7848 (name "ruby-coveralls")
7849 (version "0.8.23")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (rubygems-uri "coveralls" version))
7854 (sha256
7855 (base32
7856 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7857 (build-system ruby-build-system)
7858 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
7859 ;; because of its nonfree, Hippocratic-derived license.
7860 (arguments
7861 `(#:tests? #f
7862 #:phases (modify-phases %standard-phases
7863 (add-after 'extract-gemspec 'strip-version-requirements
7864 ;; Keeping strict version requirements can cause problems
7865 ;; to users of the library, such as: Gem::ConflictError:
7866 ;; Unable to activate coveralls-0.8.23, because
7867 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
7868 (lambda _
7869 (substitute* "coveralls-ruby.gemspec"
7870 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
7871 (string-append stripped ")\n")))
7872 #t)))))
7873 (propagated-inputs
7874 `(("ruby-json" ,ruby-json)
7875 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
7876 ("ruby-thor" ,ruby-thor)
7877 ("ruby-tins" ,ruby-tins)))
7878 (synopsis "Ruby implementation of the Coveralls API")
7879 (description "This package provides a Ruby implementation of the Coveralls
7880 API.")
7881 (home-page "https://coveralls.io")
7882 (license license:expat)))
7883
7884 (define-public ruby-unindent
7885 (package
7886 (name "ruby-unindent")
7887 (version "1.0")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (rubygems-uri "unindent" version))
7892 (sha256
7893 (base32
7894 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
7895 (build-system ruby-build-system)
7896 (synopsis "Ruby method to unindent strings")
7897 (description "This module provides a @code{String#unindent} Ruby method to
7898 unindent strings, which can be useful to unindent multiline strings embedded
7899 in already-indented code.")
7900 (home-page "https://github.com/mynyml/unindent")
7901 (license license:expat)))
7902
7903 (define-public ruby-cucumber-core
7904 (package
7905 (name "ruby-cucumber-core")
7906 (version "7.1.0")
7907 (source
7908 (origin
7909 (method git-fetch)
7910 (uri (git-reference
7911 (url "https://github.com/cucumber/cucumber-ruby-core")
7912 (commit (string-append "v" version))))
7913 (file-name (git-file-name name version))
7914 (sha256
7915 (base32
7916 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
7917 (build-system ruby-build-system)
7918 (arguments
7919 `(#:test-target "spec"
7920 #:phases
7921 (modify-phases %standard-phases
7922 (add-after 'extract-gemspec 'relax-version-requirements
7923 (lambda _
7924 (substitute* "cucumber-core.gemspec"
7925 (("'cucumber-tag-expressions',.*")
7926 "'cucumber-tag-expressions', '>=2.0.0'\n"))
7927 #t)))))
7928 (native-inputs
7929 `(("ruby-rspec" ,ruby-rspec)
7930 ("ruby-coveralls" ,ruby-coveralls)
7931 ("ruby-rubocop" ,ruby-rubocop)
7932 ("ruby-simplecov" ,ruby-simplecov)
7933 ("ruby-unindent" ,ruby-unindent)))
7934 (propagated-inputs
7935 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7936 ("ruby-gherkin" ,ruby-gherkin)
7937 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
7938 (synopsis "Core library for the Cucumber BDD app")
7939 (description "Cucumber is a tool for running automated tests
7940 written in plain language. Because they're written in plain language,
7941 they can be read by anyone on your team. Because they can be read by
7942 anyone, you can use them to help improve communication, collaboration
7943 and trust on your team.")
7944 (home-page "https://cucumber.io/")
7945 (license license:expat)))
7946
7947 (define-public ruby-cucumber-expressions
7948 (package
7949 (name "ruby-cucumber-expressions")
7950 (version "10.2.0")
7951 (source
7952 (origin
7953 (method git-fetch)
7954 (uri (git-reference
7955 (url "https://github.com/cucumber/cucumber-expressions-ruby")
7956 (commit (string-append "v" version))))
7957 (file-name (git-file-name name version))
7958 (sha256
7959 (base32
7960 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
7961 (build-system ruby-build-system)
7962 (arguments
7963 '(#:test-target "spec"))
7964 (native-inputs
7965 `(("ruby-rspec" ,ruby-rspec)
7966 ("ruby-simplecov" ,ruby-simplecov)))
7967 (synopsis "Simpler alternative to Regular Expressions")
7968 (description "Cucumber Expressions offer similar functionality to Regular
7969 Expressions, with a syntax that is easier to read and write. Cucumber
7970 Expressions are extensible with parameter types.")
7971 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
7972 (license license:expat)))
7973
7974 (define-public ruby-cucumber-wire
7975 (package
7976 (name "ruby-cucumber-wire")
7977 (version "3.1.0")
7978 (source
7979 (origin
7980 (method url-fetch)
7981 (uri (rubygems-uri "cucumber-wire" version))
7982 (sha256
7983 (base32
7984 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
7985 (build-system ruby-build-system)
7986 (arguments
7987 '(#:tests? #f ;tests use cucumber, causing a cycle
7988 #:phases
7989 (modify-phases %standard-phases
7990 (add-after 'extract-gemspec 'relax-version-requirements
7991 (lambda _
7992 (substitute* ".gemspec"
7993 ((" 10\\.1") " 10.2"))
7994 #t)))))
7995 (propagated-inputs
7996 `(("ruby-cucumber-core" ,ruby-cucumber-core)
7997 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
7998 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7999 (synopsis "Cucumber wire protocol plugin")
8000 (description "Cucumber's wire protocol allows step definitions to be
8001 implemented and invoked on any platform.")
8002 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
8003 (license license:expat)))
8004
8005 (define-public ruby-cucumber-tag-expressions
8006 (package
8007 (name "ruby-cucumber-tag-expressions")
8008 (version "3.0.0")
8009 (source
8010 (origin
8011 (method git-fetch)
8012 (uri (git-reference
8013 (url "https://github.com/cucumber/tag-expressions-ruby")
8014 (commit (string-append "v" version))))
8015 (file-name (git-file-name name version))
8016 (sha256
8017 (base32
8018 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
8019 (build-system ruby-build-system)
8020 (arguments
8021 `(#:test-target "spec"))
8022 (native-inputs
8023 `(("ruby-rspec" ,ruby-rspec)))
8024 (synopsis "Cucumber tag expressions for Ruby")
8025 (description "Cucumber tag expression parser for Ruby. A tag expression
8026 is an infix boolean expression used by Cucumber.")
8027 (home-page "https://github.com/cucumber/tag-expressions-ruby")
8028 (license license:expat)))
8029
8030 (define-public ruby-bindex
8031 (package
8032 (name "ruby-bindex")
8033 (version "0.5.0")
8034 (source
8035 (origin
8036 (method url-fetch)
8037 (uri (rubygems-uri "bindex" version))
8038 (sha256
8039 (base32
8040 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
8041 (build-system ruby-build-system)
8042 (arguments
8043 '(#:test-target "default"))
8044 (native-inputs
8045 `(("bundler" ,bundler)
8046 ("ruby-rake-compiler" ,ruby-rake-compiler)))
8047 (synopsis "Provides access for bindings relating to Ruby exceptions")
8048 (description
8049 "@code{bindex} provides a way to access the bindings that relate to
8050 exceptions in Ruby, providing more information about the context in which the
8051 exception occurred.")
8052 (home-page "https://github.com/gsamokovarov/bindex")
8053 (license license:expat)))
8054
8055 (define-public ruby-bio-logger
8056 (package
8057 (name "ruby-bio-logger")
8058 (version "1.0.1")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 (uri (rubygems-uri "bio-logger" version))
8063 (sha256
8064 (base32
8065 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
8066 (build-system ruby-build-system)
8067 (arguments
8068 `(#:tests? #f)) ; rake errors, missing shoulda
8069 (propagated-inputs
8070 `(("ruby-log4r" ,ruby-log4r)))
8071 (synopsis "Log4r wrapper for Ruby")
8072 (description "Bio-logger is a wrapper around Log4r adding extra logging
8073 features such as filtering and fine grained logging.")
8074 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
8075 (license license:expat)))
8076
8077 (define-public ruby-yajl-ruby
8078 (package
8079 (name "ruby-yajl-ruby")
8080 (version "1.4.1")
8081 (source
8082 (origin
8083 (method url-fetch)
8084 (uri (rubygems-uri "yajl-ruby" version))
8085 (sha256
8086 (base32
8087 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
8088 (build-system ruby-build-system)
8089 (arguments
8090 '(#:test-target "spec"
8091 #:phases
8092 (modify-phases %standard-phases
8093 (add-before 'check 'patch-test-to-update-load-path
8094 (lambda _
8095 (substitute* "spec/parsing/large_number_spec.rb"
8096 (("require \"yajl\"")
8097 "$LOAD_PATH << 'lib'; require 'yajl'"))
8098 #t)))))
8099 (native-inputs
8100 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8101 ("ruby-rspec" ,ruby-rspec)))
8102 (synopsis "Streaming JSON parsing and encoding library for Ruby")
8103 (description
8104 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
8105 is compatible with the JSON gem, so yajl-ruby can act as a drop in
8106 replacement.
8107
8108 A modified copy of yajl is used, and included in the package.")
8109 (home-page "https://github.com/brianmario/yajl-ruby")
8110 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
8111 license:bsd-3)))) ; Included, modified copy of yajl
8112
8113 (define-public ruby-yard
8114 (package
8115 (name "ruby-yard")
8116 (version "0.9.25")
8117 (source
8118 (origin
8119 (method git-fetch)
8120 ;; Tests do not pass if we build from the distributed gem.
8121 (uri (git-reference
8122 (url "https://github.com/lsegal/yard")
8123 (commit (string-append "v" version))))
8124 (file-name (git-file-name name version))
8125 (sha256
8126 (base32
8127 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
8128 (build-system ruby-build-system)
8129 (arguments
8130 ;; Note: Tests are willfully disabled to alleviate dependency cycle
8131 ;; problems.
8132 `(#:tests? #f
8133 #:phases (modify-phases %standard-phases
8134 (add-after 'unpack 'do-not-set-date-in-gemspec
8135 ;; Fix a reproducibility issue (see:
8136 ;; https://github.com/lsegal/yard/issues/1343).
8137 (lambda _
8138 (substitute* "yard.gemspec"
8139 ((".*s\\.date.*") ""))
8140 #t)))))
8141 (synopsis "Documentation generation tool for Ruby")
8142 (description "YARD is a documentation generation tool for the Ruby
8143 programming language. It enables the user to generate consistent, usable
8144 documentation that can be exported to a number of formats very easily, and
8145 also supports extending for custom Ruby constructs such as custom class level
8146 definitions.")
8147 (home-page "https://yardoc.org")
8148 (license license:expat)))
8149
8150 (define-public ruby-yard-with-tests
8151 (package
8152 (inherit ruby-yard)
8153 (name "ruby-yard-with-tests")
8154 (arguments
8155 (substitute-keyword-arguments (package-arguments ruby-yard)
8156 ((#:tests? _ #t) #t)
8157 ((#:test-target _ "default") "default")
8158 ((#:phases phases '%standard-phases)
8159 `(modify-phases ,phases
8160 (add-before 'check 'prepare-for-tests
8161 (lambda* (#:key tests? #:allow-other-keys)
8162 (when tests?
8163 (substitute* "Rakefile"
8164 ((".*[Ss]amus.*") ""))
8165 ;; Delete the Gemfile to avoid errors relating to it.
8166 (delete-file "Gemfile")
8167 ;; $HOME needs to be set to somewhere writeable for tests to
8168 ;; run.
8169 (setenv "HOME" "/tmp"))
8170 #t))))))
8171 (native-inputs
8172 `(("ruby-rspec" ,ruby-rspec)
8173 ("ruby-rack" ,ruby-rack)
8174 ("ruby-redcloth" ,ruby-redcloth)
8175 ("ruby-asciidoc" ,ruby-asciidoctor)))))
8176
8177 (define-public ruby-spectroscope
8178 (package
8179 (name "ruby-spectroscope")
8180 (version "0.1.0")
8181 (source
8182 (origin
8183 (method url-fetch)
8184 (uri (rubygems-uri "spectroscope" version))
8185 (sha256
8186 (base32
8187 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
8188 (build-system ruby-build-system)
8189 (arguments
8190 `(#:phases
8191 (modify-phases %standard-phases
8192 (replace 'check
8193 (lambda _
8194 (with-output-to-file ".test"
8195 (lambda _
8196 (display
8197 "\
8198 require 'ae/should'
8199 require 'rspec'
8200
8201 include RSpec
8202
8203 Test.run :default do |run|
8204 run.files << 'spec/*_spec.rb'
8205 end")))
8206 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
8207 (native-inputs
8208 `(("ruby-ae" ,ruby-ae)
8209 ("ruby-rspec" ,ruby-rspec)))
8210 (propagated-inputs
8211 `(("ruby-rubytest" ,ruby-rubytest)))
8212 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
8213 (description "Spectroscope is a Behavior-Driven Development (BDD)
8214 framework built on RubyTest, designed to emulate RSpec in most respects. It
8215 is assertion framework independent so any number of assertion systems can be
8216 used, such as Assay or AE.")
8217 (home-page "http://rubyworks.github.com/spectroscope/")
8218 (license license:bsd-2)))
8219
8220 (define-public ruby-tomparse
8221 (package
8222 (name "ruby-tomparse")
8223 (version "0.4.2")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (rubygems-uri "tomparse" version))
8228 (sha256
8229 (base32
8230 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
8231 (build-system ruby-build-system)
8232 ;; TODO: Tests require citron and rulebow, not yet packaged.
8233 (arguments '(#:tests? #f))
8234 (synopsis "TomDoc parser for Ruby")
8235 (description "TomParse is a TomDoc parser for Ruby. It takes a code
8236 comment as input and parses it into a convenient object-oriented structure in
8237 accordance with the TomDoc standard. See
8238 @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
8239 TomDoc format.")
8240 (home-page "http://rubyworks.github.com/tomparse/")
8241 (license license:bsd-2)))
8242
8243 (define-public ruby-yard-tomdoc
8244 (package
8245 (name "ruby-yard-tomdoc")
8246 (version "0.7.1")
8247 (source
8248 (origin
8249 (method url-fetch)
8250 (uri (rubygems-uri "yard-tomdoc" version))
8251 (sha256
8252 (base32
8253 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
8254 (build-system ruby-build-system)
8255 (arguments
8256 `(#:phases (modify-phases %standard-phases
8257 (replace 'check
8258 (lambda _
8259 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8260 (native-inputs
8261 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8262 ("ruby-spectroscope" ,ruby-spectroscope)
8263 ("ruby-ae" ,ruby-ae)))
8264 (propagated-inputs
8265 `(("ruby-tomparse" ,ruby-tomparse)
8266 ("ruby-yard" ,ruby-yard)))
8267 (synopsis "TomDoc syntax for YARD")
8268 (description "This module adds support for the TomDoc documentation format
8269 to YARD, a documentation generation tool for Ruby.")
8270 (home-page "http://rubyworks.github.com/yard-tomdoc/")
8271 (license license:expat)))
8272
8273 (define-public ruby-clap
8274 (package
8275 (name "ruby-clap")
8276 (version "1.0.0")
8277 (source (origin
8278 (method url-fetch)
8279 (uri (rubygems-uri "clap" version))
8280 (sha256
8281 (base32
8282 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
8283 (build-system ruby-build-system)
8284 ;; Clap needs cutest for running tests, but cutest needs clap.
8285 (arguments `(#:tests? #f))
8286 (synopsis "Command line argument parsing for simple applications")
8287 (description
8288 "Clap provides command line argument parsing features. It covers the
8289 simple case of executing code based on the flags or parameters passed.")
8290 (home-page "https://github.com/djanowski/cutest")
8291 (license license:expat)))
8292
8293 (define-public ruby-cutest
8294 (package
8295 (name "ruby-cutest")
8296 (version "1.2.2")
8297 (source (origin
8298 (method url-fetch)
8299 (uri (rubygems-uri "cutest" version))
8300 (sha256
8301 (base32
8302 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
8303 (build-system ruby-build-system)
8304 (propagated-inputs
8305 `(("ruby-clap" ,ruby-clap)))
8306 (synopsis "Run tests in separate processes")
8307 (description
8308 "Cutest runs tests in separate processes to avoid shared state.")
8309 (home-page "https://github.com/djanowski/cutest")
8310 (license license:expat)))
8311
8312 (define-public ruby-pygmentize
8313 (package
8314 (name "ruby-pygmentize")
8315 (version "0.0.3")
8316 (source (origin
8317 (method url-fetch)
8318 (uri (rubygems-uri "pygmentize" version))
8319 (sha256
8320 (base32
8321 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
8322 (build-system ruby-build-system)
8323 (arguments
8324 `(#:phases
8325 (modify-phases %standard-phases
8326 (add-after 'unpack 'fix-pygmentize-path
8327 (lambda _
8328 (substitute* "lib/pygmentize.rb"
8329 (("\"/usr/bin/env python.*")
8330 (string-append "\"" (which "pygmentize") "\"\n")))
8331 #t))
8332 (add-after 'build 'do-not-use-vendor-directory
8333 (lambda _
8334 ;; Remove bundled pygments sources
8335 ;; FIXME: ruby-build-system does not support snippets.
8336 (delete-file-recursively "vendor")
8337 (substitute* "pygmentize.gemspec"
8338 (("\"vendor/\\*\\*/\\*\",") ""))
8339 #t)))))
8340 (inputs
8341 `(("pygments" ,python-pygments)))
8342 (native-inputs
8343 `(("ruby-cutest" ,ruby-cutest)
8344 ("ruby-nokogiri" ,ruby-nokogiri)))
8345 (synopsis "Thin Ruby wrapper around pygmentize")
8346 (description
8347 "Pygmentize provides a simple way to call pygmentize from within a Ruby
8348 application.")
8349 (home-page "https://github.com/djanowski/pygmentize")
8350 (license license:expat)))
8351
8352 (define-public ruby-eventmachine
8353 (package
8354 (name "ruby-eventmachine")
8355 (version "1.2.7")
8356 (source
8357 (origin
8358 (method url-fetch)
8359 (uri (rubygems-uri "eventmachine" version))
8360 (sha256
8361 (base32
8362 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
8363 (build-system ruby-build-system)
8364 (arguments
8365 '(#:tests? #f)) ; test suite tries to connect to google.com
8366 (native-inputs
8367 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
8368 (synopsis "Single-threaded network event framework for Ruby")
8369 (description
8370 "EventMachine implements a single-threaded engine for arbitrary network
8371 communications. EventMachine wraps all interactions with sockets, allowing
8372 programs to concentrate on the implementation of network protocols. It can be
8373 used to create both network servers and clients.")
8374 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8375 (home-page "https://github.com/eventmachine/eventmachine")
8376 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
8377
8378 (define-public ruby-ruby-engine
8379 (package
8380 (name "ruby-ruby-engine")
8381 (version "2.0.0")
8382 (source
8383 (origin
8384 (method url-fetch)
8385 (uri (rubygems-uri "ruby_engine" version))
8386 (sha256
8387 (base32
8388 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
8389 (build-system ruby-build-system)
8390 (arguments
8391 `(#:phases
8392 (modify-phases %standard-phases
8393 (add-after 'extract-gemspec 'clean-up
8394 (lambda _
8395 (delete-file "Gemfile.lock")
8396 (substitute* "ruby_engine.gemspec"
8397 ;; Remove unnecessary imports that would entail further
8398 ;; dependencies.
8399 ((".*<rdoc.*") "")
8400 ((".*<rubygems-tasks.*") "")
8401 ;; Remove extraneous .gem file
8402 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8403 (("\"Gemfile.lock\".freeze, ") "")
8404 ;; Soften rake dependency
8405 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
8406 "%q<rake>.freeze, [\">= 10.0\"]")
8407 ;; Soften the rspec dependency
8408 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
8409 "%q<rspec>.freeze, [\">= 2.4\"]"))
8410 (substitute* "Rakefile"
8411 (("require 'rubygems/tasks'") "")
8412 (("Gem::Tasks.new") ""))
8413 ;; Remove extraneous .gem file that otherwise gets installed.
8414 (delete-file-recursively "pkg")
8415 #t)))))
8416 (native-inputs
8417 `(("bundler" ,bundler)
8418 ("ruby-rake" ,ruby-rake)
8419 ("ruby-rspec" ,ruby-rspec)))
8420 (synopsis "Simplifies checking for Ruby implementation")
8421 (description
8422 "@code{ruby_engine} provides an RubyEngine class that can be used to
8423 check which implementation of Ruby is in use. It can provide the interpreter
8424 name and provides query methods such as @{RubyEngine.mri?}.")
8425 (home-page "https://github.com/janlelis/ruby_engine")
8426 (license license:expat)))
8427
8428 (define-public ruby-turn
8429 (package
8430 (name "ruby-turn")
8431 (version "0.9.7")
8432 (source
8433 (origin
8434 (method url-fetch)
8435 (uri (rubygems-uri "turn" version))
8436 (sha256
8437 (base32
8438 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8439 (build-system ruby-build-system)
8440 (arguments
8441 `(#:phases
8442 (modify-phases %standard-phases
8443 ;; Tests fail because turn changes its environment so can no longer
8444 ;; find test/unit. Instead simply test if the executable runs
8445 ;; without issue.
8446 (replace 'check
8447 (lambda _
8448 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8449 (propagated-inputs
8450 `(("ruby-ansi" ,ruby-ansi)
8451 ("ruby-minitest" ,ruby-minitest-4)))
8452 (synopsis "Alternate set of alternative runners for MiniTest")
8453 (description
8454 "TURN provides a set of alternative runners for MiniTest which are both
8455 colorful and informative. TURN displays each test on a separate line with
8456 failures being displayed immediately instead of at the end of the tests. Note
8457 that TURN is no longer being maintained.")
8458 (home-page "https://rubygems.org/gems/turn")
8459 (license license:expat)))
8460
8461 (define-public ruby-mimemagic
8462 (package
8463 (name "ruby-mimemagic")
8464 (version "0.3.3")
8465 (source
8466 (origin
8467 (method url-fetch)
8468 (uri (rubygems-uri "mimemagic" version))
8469 (sha256
8470 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8471 (build-system ruby-build-system)
8472 (arguments
8473 '(#:phases
8474 (modify-phases %standard-phases
8475 ;; This phase breaks the tests, as it patches some of the test data.
8476 (delete 'patch-source-shebangs))))
8477 (native-inputs
8478 `(("ruby-bacon" ,ruby-bacon)))
8479 (synopsis "Ruby library for MIME detection by extension or content")
8480 (description
8481 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8482 extension or content, using the freedesktop.org.xml shared-mime-info
8483 database.")
8484 (home-page "https://github.com/minad/mimemagic")
8485 (license license:expat)))
8486
8487 (define-public ruby-mime-types-data
8488 (package
8489 (name "ruby-mime-types-data")
8490 (version "3.2016.0521")
8491 (source
8492 (origin
8493 (method url-fetch)
8494 (uri (rubygems-uri "mime-types-data" version))
8495 (sha256
8496 (base32
8497 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
8498 (build-system ruby-build-system)
8499 (native-inputs
8500 `(("ruby-hoe" ,ruby-hoe)))
8501 (synopsis "Registry for information about MIME media type definitions")
8502 (description
8503 "@code{mime-types-data} provides a registry for information about
8504 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8505 be used with the Ruby mime-types library or other software to determine
8506 defined filename extensions for MIME types, or to use filename extensions to
8507 look up the likely MIME type definitions.")
8508 (home-page "https://github.com/mime-types/mime-types-data/")
8509 (license license:expat)))
8510
8511 (define-public ruby-mime-types
8512 (package
8513 (name "ruby-mime-types")
8514 (version "3.1")
8515 (source
8516 (origin
8517 (method url-fetch)
8518 (uri (rubygems-uri "mime-types" version))
8519 (sha256
8520 (base32
8521 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
8522 (build-system ruby-build-system)
8523 (propagated-inputs
8524 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
8525 (native-inputs
8526 `(("ruby-hoe" ,ruby-hoe)
8527 ("ruby-fivemat" ,ruby-fivemat)
8528 ("ruby-minitest-focus" ,ruby-minitest-focus)
8529 ("ruby-minitest-rg" ,ruby-minitest-rg)
8530 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
8531 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
8532 (synopsis "Library and registry for MIME content type definitions")
8533 (description "The mime-types library provides a library and registry for
8534 information about Multipurpose Internet Mail Extensions (MIME) content type
8535 definitions. It can be used to determine defined filename extensions for MIME
8536 types, or to use filename extensions to look up the likely MIME type
8537 definitions.")
8538 (home-page "https://github.com/mime-types/ruby-mime-types")
8539 (license license:expat)))
8540
8541 (define-public ruby-fivemat
8542 (package
8543 (name "ruby-fivemat")
8544 (version "1.3.7")
8545 (source
8546 (origin
8547 (method url-fetch)
8548 (uri (rubygems-uri "fivemat" version))
8549 (sha256
8550 (base32
8551 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
8552 (build-system ruby-build-system)
8553 (arguments
8554 `(#:tests? #f)) ; no tests
8555 (synopsis "Each test file given its own line of dots")
8556 (description
8557 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8558 its own line of dots during testing. It aims to provide test output that is
8559 neither too verbose nor too minimal.")
8560 (home-page "https://github.com/tpope/fivemat")
8561 (license license:expat)))
8562
8563 (define-public ruby-sqlite3
8564 (package
8565 (name "ruby-sqlite3")
8566 (version "1.4.2")
8567 (source
8568 (origin
8569 (method url-fetch)
8570 (uri (rubygems-uri "sqlite3" version))
8571 (sha256
8572 (base32
8573 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
8574 (build-system ruby-build-system)
8575 (arguments
8576 `(#:phases
8577 (modify-phases %standard-phases
8578 (add-before 'check 'add-gemtest-file
8579 ;; This file exists in the repository but is not distributed.
8580 (lambda _ (invoke "touch" ".gemtest"))))))
8581 (inputs
8582 `(("sqlite" ,sqlite)))
8583 (native-inputs
8584 `(("ruby-hoe" ,ruby-hoe)
8585 ("ruby-rake-compiler" ,ruby-rake-compiler)
8586 ("ruby-mini-portile" ,ruby-mini-portile)))
8587 (synopsis "Interface with SQLite3 databases")
8588 (description
8589 "This module allows Ruby programs to interface with the SQLite3 database
8590 engine.")
8591 (home-page
8592 "https://github.com/sparklemotion/sqlite3-ruby")
8593 (license license:bsd-3)))
8594
8595 (define-public ruby-shoulda-context
8596 (package
8597 (name "ruby-shoulda-context")
8598 (version "1.2.2")
8599 (source
8600 (origin
8601 (method url-fetch)
8602 (uri (rubygems-uri "shoulda-context" version))
8603 (sha256
8604 (base32
8605 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
8606 (build-system ruby-build-system)
8607 (arguments
8608 `(#:phases
8609 (modify-phases %standard-phases
8610 (replace 'check
8611 (lambda _
8612 ;; Do not run tests to avoid circular dependence with rails.
8613 ;; Instead just import the library to test.
8614 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
8615 (synopsis "Test::Unit context framework extracted from Shoulda")
8616 (description
8617 "@code{shoulda-context} is the context framework extracted from Shoulda.
8618 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8619 context, setup, and should blocks combine to produce natural test method
8620 names.")
8621 (home-page "https://github.com/thoughtbot/shoulda-context")
8622 (license license:expat)))
8623
8624 (define-public ruby-shoulda-matchers
8625 (package
8626 (name "ruby-shoulda-matchers")
8627 (version "3.1.2")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (rubygems-uri "shoulda-matchers" version))
8632 (sha256
8633 (base32
8634 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
8635 (build-system ruby-build-system)
8636 (arguments
8637 `(#:phases
8638 (modify-phases %standard-phases
8639 (replace 'check
8640 (lambda _
8641 ;; Do not run tests to avoid circular dependence with rails. Instead
8642 ;; just import the library to test.
8643 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
8644 (propagated-inputs
8645 `(("ruby-activesupport" ,ruby-activesupport)))
8646 (synopsis "Collection of testing matchers extracted from Shoulda")
8647 (description
8648 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8649 test common Rails functionality. These tests would otherwise be much longer,
8650 more complex, and error-prone.")
8651 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8652 (license license:expat)))
8653
8654 (define-public ruby-shoulda-matchers-2
8655 (package
8656 (inherit ruby-shoulda-matchers)
8657 (version "2.8.0")
8658 (source (origin
8659 (method url-fetch)
8660 (uri (rubygems-uri "shoulda-matchers" version))
8661 (sha256
8662 (base32
8663 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8664
8665 (define-public ruby-shoulda
8666 (package
8667 (name "ruby-shoulda")
8668 (version "3.5.0")
8669 (source
8670 (origin
8671 (method url-fetch)
8672 (uri (rubygems-uri "shoulda" version))
8673 (sha256
8674 (base32
8675 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8676 (build-system ruby-build-system)
8677 (arguments
8678 `(#:phases
8679 (modify-phases %standard-phases
8680 (replace 'check
8681 ;; Don't run tests to avoid circular dependence with rails. Instead
8682 ;; just import the library to test.
8683 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
8684 (propagated-inputs
8685 `(("ruby-shoulda-context" ,ruby-shoulda-context)
8686 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
8687 (synopsis "Context framework and matchers for testing")
8688 (description
8689 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8690 @code{shoulda-matchers} providing tools for writing tests.")
8691 (home-page "https://github.com/thoughtbot/shoulda")
8692 (license license:expat)))
8693
8694 (define-public ruby-unf
8695 (package
8696 (name "ruby-unf")
8697 (version "0.1.4")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (rubygems-uri "unf" version))
8702 (sha256
8703 (base32
8704 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8705 (build-system ruby-build-system)
8706 (arguments
8707 `(#:phases
8708 (modify-phases %standard-phases
8709 (add-before 'check 'add-dependency-to-bundler
8710 (lambda _
8711 ;; test-unit is required but not provided by the bundler
8712 ;; environment. This is fixed in the upstream repository but fix
8713 ;; has not been released.
8714 (substitute* "Gemfile"
8715 (("^gemspec") "gem 'test-unit'\ngemspec"))
8716 #t)))))
8717 (propagated-inputs
8718 `(("ruby-unf-ext" ,ruby-unf-ext)))
8719 (native-inputs
8720 `(("ruby-shoulda" ,ruby-shoulda)
8721 ("bundler" ,bundler)
8722 ("ruby-test-unit" ,ruby-test-unit)))
8723 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8724 (description
8725 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8726 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8727 @code{java.text.Normalizer} on JRuby.")
8728 (home-page "https://github.com/knu/ruby-unf")
8729 (license license:bsd-2)))
8730
8731 (define-public ruby-warden
8732 (package
8733 (name "ruby-warden")
8734 (version "1.2.8")
8735 (source
8736 (origin
8737 (method url-fetch)
8738 (uri (rubygems-uri "warden" version))
8739 (sha256
8740 (base32
8741 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8742 (build-system ruby-build-system)
8743 (arguments
8744 '(#:tests? #f)) ; No included tests
8745 (propagated-inputs
8746 `(("ruby-rack" ,ruby-rack)))
8747 (synopsis "Rack middleware providing authentication")
8748 (description
8749 "Warden is a Rack-based middleware that provides a mechanism for
8750 authentication in Ruby web applications.")
8751 (home-page "https://github.com/wardencommunity/warden")
8752 (license license:expat)))
8753
8754 (define-public ruby-warden-oauth2
8755 (package
8756 (name "ruby-warden-oauth2")
8757 (version "0.0.1")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (rubygems-uri "warden-oauth2" version))
8762 (sha256
8763 (base32
8764 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8765 (build-system ruby-build-system)
8766 (arguments
8767 '(#:test-target "spec"
8768 #:phases
8769 (modify-phases %standard-phases
8770 (add-after 'unpack 'remove-unnecessary-dependencies
8771 (lambda _
8772 (substitute* "Gemfile"
8773 ;; All of these gems relate to development, and are unnecessary
8774 ;; when running the tests
8775 (("gem 'guard-bundler'") "")
8776 (("gem 'guard'") "")
8777 (("gem 'guard-rspec'") "")
8778 (("gem 'rb-fsevent'") "")
8779 (("gem 'pry'") "")
8780 (("gem 'growl'") ""))
8781 #t))
8782 ;; The test suite doesn't work with rspec@2, and this is incompatible
8783 ;; with the current version of Rake, so invoke Rspec directly
8784 (replace 'check
8785 (lambda* (#:key tests? #:allow-other-keys)
8786 (when tests?
8787 (invoke "bundle" "exec" "rspec"))
8788 #t)))))
8789 (propagated-inputs
8790 `(("ruby-warden" ,ruby-warden)))
8791 (native-inputs
8792 `(("bundler" ,bundler)
8793 ("ruby-rspec" ,ruby-rspec-2)
8794 ("ruby-rack-test" ,ruby-rack-test)))
8795 (synopsis "OAuth 2.0 strategies for Warden")
8796 (description
8797 "This library extends Warden to support OAuth 2.0 authorized API
8798 requests.")
8799 (home-page "https://github.com/opperator/warden-oauth2")
8800 (license license:expat)))
8801
8802 (define-public ruby-webmock-2
8803 (package
8804 (name "ruby-webmock")
8805 (version "2.3.2")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (rubygems-uri "webmock" version))
8810 (sha256
8811 (base32
8812 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8813 (build-system ruby-build-system)
8814 (native-inputs
8815 `(("bundler" ,bundler)
8816 ("ruby-rspec" ,ruby-rspec)))
8817 (propagated-inputs
8818 `(("ruby-addressable" ,ruby-addressable)
8819 ("ruby-crack" ,ruby-crack)
8820 ("ruby-hashdiff" ,ruby-hashdiff)))
8821 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8822 (description
8823 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8824 requests. This is useful when testing software.")
8825 (home-page "https://github.com/bblimke/webmock")
8826 (license license:expat)))
8827
8828 (define-public ruby-unicode-display-width
8829 (package
8830 (name "ruby-unicode-display-width")
8831 (version "1.6.0")
8832 (source
8833 (origin
8834 (method url-fetch)
8835 (uri (rubygems-uri "unicode-display_width" version))
8836 (sha256
8837 (base32
8838 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
8839 (build-system ruby-build-system)
8840 (arguments
8841 '(;; Test data not included.
8842 #:tests? #f))
8843 (synopsis "Determine the monospace display width of Ruby strings")
8844 (description
8845 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8846 display width of strings in Ruby.")
8847 (home-page "https://github.com/janlelis/unicode-display_width")
8848 (license license:expat)))
8849
8850 ;; There is another gem called 'ruby-version' so we use an underscore in this
8851 ;; name
8852 (define-public ruby_version
8853 (package
8854 (name "ruby_version")
8855 (version "1.0.2")
8856 (source
8857 (origin
8858 (method url-fetch)
8859 (uri (rubygems-uri "ruby_version" version))
8860 (sha256
8861 (base32
8862 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
8863 (build-system ruby-build-system)
8864 (arguments
8865 `(#:phases
8866 (modify-phases %standard-phases
8867 (add-before 'check 'fix-dependencies
8868 (lambda _
8869 ;; Remove the Gemfile.lock, as we want to use Guix packages at
8870 ;; whatever versions.
8871 (delete-file "Gemfile.lock")
8872 ;; Remove the included gem files as they unnecessary.
8873 (delete-file-recursively "pkg/")
8874 ;; Accept any version of rake, rdoc and rspec
8875 (substitute* "ruby_version.gemspec"
8876 (("%q<rake.*") "%q<rake>)\n")
8877 (("%q<rdoc.*") "%q<rdoc>)\n")
8878 (("%q<rspec.*") "%q<rspec>)\n"))
8879 ;; Do not use bundler.
8880 (substitute* "Rakefile"
8881 (("Bundler\\.setup.*") "nil\n"))
8882 #t)))))
8883 (native-inputs
8884 `(("ruby-rdoc" ,ruby-rdoc)
8885 ("ruby-rspec" ,ruby-rspec)
8886 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
8887 (synopsis "Ruby library to help check the Ruby version")
8888 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
8889 checking for the right Ruby version in software.")
8890 (home-page "https://github.com/janlelis/ruby_version")
8891 (license license:expat)))
8892
8893 (define-public ruby-websocket-driver
8894 (package
8895 (name "ruby-websocket-driver")
8896 (version "0.7.1")
8897 (source
8898 (origin
8899 (method url-fetch)
8900 (uri (rubygems-uri "websocket-driver" version))
8901 (sha256
8902 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
8903 (build-system ruby-build-system)
8904 (arguments
8905 '(#:tests? #f)) ; no included tests
8906 (propagated-inputs
8907 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
8908 (synopsis "WebSocket protocol handler with pluggable I/O")
8909 (description
8910 "@code{websocket-driver} provides a complete implementation of the
8911 WebSocket protocols that can be hooked up to any TCP library")
8912 (home-page "https://github.com/faye/websocket-driver-ruby")
8913 (license license:expat)))
8914
8915 (define-public ruby-websocket-extensions
8916 (package
8917 (name "ruby-websocket-extensions")
8918 (version "0.1.3")
8919 (source
8920 (origin
8921 (method url-fetch)
8922 (uri (rubygems-uri "websocket-extensions" version))
8923 (sha256
8924 (base32
8925 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
8926 (build-system ruby-build-system)
8927 (arguments
8928 '(;; No included tests
8929 #:tests? #f))
8930 (synopsis "Generic extension manager for WebSocket connections")
8931 (description
8932 "@code{websocket-extensions} provides a container for registering
8933 extension plugins.")
8934 (home-page "https://github.com/faye/websocket-extensions-ruby")
8935 (license license:expat)))
8936
8937 (define-public ruby-domain-name
8938 (package
8939 (name "ruby-domain-name")
8940 (version "0.5.20190701")
8941 (source
8942 (origin
8943 (method url-fetch)
8944 (uri (rubygems-uri "domain_name" version))
8945 (sha256
8946 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
8947 (build-system ruby-build-system)
8948 (arguments
8949 `(#:phases
8950 (modify-phases %standard-phases
8951 (add-before 'check 'fix-versions
8952 (lambda _
8953 ;; Fix NameError that appears to already be fixed upstream.
8954 (substitute* "Rakefile"
8955 (("DomainName::VERSION")
8956 "Bundler::GemHelper.gemspec.version"))
8957 ;; Loosen unnecessarily strict test-unit version specification.
8958 (substitute* "domain_name.gemspec"
8959 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
8960 #t)))))
8961 (propagated-inputs
8962 `(("ruby-unf" ,ruby-unf)))
8963 (native-inputs
8964 `(("ruby-shoulda" ,ruby-shoulda)
8965 ("bundler" ,bundler)
8966 ("ruby-test-unit" ,ruby-test-unit)))
8967 (synopsis "Domain name manipulation library")
8968 (description
8969 "@code{domain_name} is a Domain name manipulation library. It parses a
8970 domain name ready for extracting the registered domain and TLD (Top Level
8971 Domain). It can also be used for cookie domain validation based on the Public
8972 Suffix List.")
8973 (home-page "https://github.com/knu/ruby-domain_name")
8974 (license license:bsd-2)))
8975
8976 (define-public ruby-http-cookie
8977 (package
8978 (name "ruby-http-cookie")
8979 (version "1.0.3")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (rubygems-uri "http-cookie" version))
8984 (sha256
8985 (base32
8986 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
8987 (build-system ruby-build-system)
8988 (arguments
8989 `(#:phases
8990 (modify-phases %standard-phases
8991 (add-before 'check 'add-dependency-to-bundler
8992 (lambda _
8993 ;; Fix NameError
8994 (substitute* "Rakefile"
8995 (("HTTP::Cookie::VERSION")
8996 "Bundler::GemHelper.gemspec.version"))
8997 #t)))))
8998 (propagated-inputs
8999 `(("ruby-domain-name" ,ruby-domain-name)))
9000 (native-inputs
9001 `(("rubysimplecov" ,ruby-simplecov)
9002 ("bundler" ,bundler)
9003 ("ruby-sqlite3" ,ruby-sqlite3)
9004 ("ruby-test-unit" ,ruby-test-unit)))
9005 (synopsis "Handle HTTP Cookies based on RFC 6265")
9006 (description
9007 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
9008 RFC 6265. It has been designed with security, standards compliance and
9009 compatibility in mind, to behave just the same as today's major web browsers.
9010 It has built-in support for the legacy @code{cookies.txt} and
9011 @code{cookies.sqlite} formats of Mozilla Firefox.")
9012 (home-page "https://github.com/sparklemotion/http-cookie")
9013 (license license:expat)))
9014
9015 (define-public ruby-httpclient
9016 (package
9017 (name "ruby-httpclient")
9018 (version "2.8.3")
9019 (source
9020 (origin
9021 (method url-fetch)
9022 (uri (rubygems-uri "httpclient" version))
9023 (sha256
9024 (base32
9025 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
9026 (build-system ruby-build-system)
9027 (arguments
9028 '(;; TODO: Some tests currently fail
9029 ;; ------
9030 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
9031 ;; 2 omissions, 0 notifications
9032 ;; 91.866% passed
9033 ;; ------
9034 ;; 6.49 tests/s, 22.41 assertions/s
9035 #:tests? #f
9036 #:phases
9037 (modify-phases %standard-phases
9038 (replace 'check
9039 (lambda* (#:key tests? #:allow-other-keys)
9040 (if tests?
9041 (invoke "ruby"
9042 "-Ilib"
9043 "test/runner.rb")
9044 #t))))))
9045 (native-inputs
9046 `(("ruby-rack" ,ruby-rack)))
9047 (synopsis
9048 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
9049 (description
9050 "The @code{httpclient} ruby library provides functionality related to
9051 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
9052 Cookie, multithreading and authentication (digest, NTLM) support.
9053
9054 Also provided is a @command{httpclient} command, which can perform HTTP
9055 requests either using arguments or with an interactive prompt.")
9056 (home-page "https://github.com/nahi/httpclient")
9057 (license license:ruby)))
9058
9059 (define-public ruby-ansi
9060 (package
9061 (name "ruby-ansi")
9062 (version "1.5.0")
9063 (source
9064 (origin
9065 (method git-fetch)
9066 ;; Fetch from GitHub as the gem does not contain testing code.
9067 (uri (git-reference
9068 (url "https://github.com/rubyworks/ansi")
9069 (commit version)))
9070 (file-name (git-file-name name version))
9071 (sha256
9072 (base32
9073 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
9074 (build-system ruby-build-system)
9075 (arguments
9076 `(#:phases
9077 (modify-phases %standard-phases
9078 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
9079 ;; cycle ansi, qed, ansi. Instead simply test that the library can
9080 ;; be require'd.
9081 (replace 'check
9082 (lambda _
9083 (invoke "ruby" "-Ilib" "-r" "ansi")))
9084 (add-before 'validate-runpath 'replace-broken-symlink
9085 (lambda* (#:key outputs #:allow-other-keys)
9086 (let* ((out (assoc-ref outputs "out"))
9087 (file (string-append
9088 out "/lib/ruby/vendor_ruby/gems/ansi-"
9089 ,version "/lib/ansi.yml")))
9090 ;; XXX: This symlink is broken since ruby 2.4.
9091 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9092 (delete-file file)
9093 (symlink "../.index" file)
9094 #t))))))
9095 (synopsis "ANSI escape code related libraries")
9096 (description
9097 "This package is a collection of ANSI escape code related libraries
9098 enabling ANSI colorization and stylization of console output. Included in the
9099 library are the @code{Code} module, which defines ANSI codes as constants and
9100 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
9101 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
9102 @code{Terminal} module which provides information about the current output
9103 device.")
9104 (home-page "https://rubyworks.github.io/ansi/")
9105 (license license:bsd-2)))
9106
9107 (define-public ruby-systemu
9108 (package
9109 (name "ruby-systemu")
9110 (version "2.6.5")
9111 (source
9112 (origin
9113 (method url-fetch)
9114 (uri (rubygems-uri "systemu" version))
9115 (sha256
9116 (base32
9117 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
9118 (build-system ruby-build-system)
9119 (arguments
9120 `(#:phases
9121 (modify-phases %standard-phases
9122 (add-before 'check 'set-version
9123 (lambda _
9124 (setenv "VERSION" ,version)
9125 #t)))))
9126 (synopsis "Capture of stdout/stderr and handling of child processes")
9127 (description
9128 "Systemu can be used on any platform to return status, stdout, and stderr
9129 of any command. Unlike other methods like @code{open3} and @code{popen4}
9130 there is no danger of full pipes or threading issues hanging your process or
9131 subprocess.")
9132 (home-page "https://github.com/ahoward/systemu")
9133 (license license:ruby)))
9134
9135 (define-public ruby-bio-commandeer
9136 (package
9137 (name "ruby-bio-commandeer")
9138 (version "0.4.0")
9139 (source
9140 (origin
9141 (method url-fetch)
9142 (uri (rubygems-uri "bio-commandeer" version))
9143 (sha256
9144 (base32
9145 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
9146 (build-system ruby-build-system)
9147 (arguments
9148 `(#:phases
9149 (modify-phases %standard-phases
9150 (replace 'check
9151 ;; Run test without calling 'rake' so that jeweler is
9152 ;; not required as an input.
9153 (lambda _
9154 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
9155 (propagated-inputs
9156 `(("ruby-bio-logger" ,ruby-bio-logger)
9157 ("ruby-systemu" ,ruby-systemu)))
9158 (native-inputs
9159 `(("bundler" ,bundler)
9160 ("ruby-rspec" ,ruby-rspec)))
9161 (synopsis "Simplified running of shell commands from within Ruby")
9162 (description
9163 "Bio-commandeer provides an opinionated method of running shell commands
9164 from within Ruby. The advantage of bio-commandeer over other methods of
9165 running external commands is that when something goes wrong, messages printed
9166 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
9167 detail to ease debugging.")
9168 (home-page "https://github.com/wwood/bioruby-commandeer")
9169 (license license:expat)))
9170
9171 (define-public ruby-rubytest
9172 (package
9173 (name "ruby-rubytest")
9174 (version "0.8.1")
9175 (source
9176 (origin
9177 (method url-fetch)
9178 (uri (rubygems-uri "rubytest" version))
9179 (sha256
9180 (base32
9181 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
9182 (build-system ruby-build-system)
9183 (arguments
9184 ;; Disable regular testing to break the cycle rubytest, qed, brass,
9185 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
9186 ;; simply test that the library can be require'd.
9187 `(#:phases
9188 (modify-phases %standard-phases
9189 (replace 'check
9190 (lambda _
9191 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
9192 (propagated-inputs
9193 `(("ruby-ansi" ,ruby-ansi)))
9194 (synopsis "Universal test harness for Ruby")
9195 (description
9196 "Rubytest is a testing meta-framework for Ruby. It can handle any
9197 compliant test framework and can run tests from multiple frameworks in a
9198 single pass.")
9199 (home-page "https://rubyworks.github.io/rubytest")
9200 (license license:bsd-2)))
9201
9202 (define-public ruby-brass
9203 (package
9204 (name "ruby-brass")
9205 (version "1.2.1")
9206 (source
9207 (origin
9208 (method url-fetch)
9209 (uri (rubygems-uri "brass" version))
9210 (sha256
9211 (base32
9212 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
9213 (build-system ruby-build-system)
9214 (arguments
9215 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
9216 ;; Instead simply test that the library can be require'd.
9217 `(#:phases
9218 (modify-phases %standard-phases
9219 (replace 'check
9220 (lambda _
9221 (invoke "ruby" "-Ilib" "-r" "brass"))))))
9222 (synopsis "Basic foundational assertions framework")
9223 (description
9224 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
9225 foundational assertions framework for other assertion and test frameworks to
9226 make use of.")
9227 (home-page "https://rubyworks.github.io/brass")
9228 (license license:bsd-2)))
9229
9230 (define-public ruby-qed
9231 (package
9232 (name "ruby-qed")
9233 (version "2.9.2")
9234 (source
9235 (origin
9236 (method url-fetch)
9237 (uri (rubygems-uri "qed" version))
9238 (sha256
9239 (base32
9240 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
9241 (build-system ruby-build-system)
9242 (arguments
9243 ;; Disable testing to break the cycle qed, ansi, qed, among others.
9244 ;; Instead simply test that the executable runs using --copyright.
9245 `(#:phases
9246 (modify-phases %standard-phases
9247 (replace 'check
9248 (lambda _
9249 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
9250 (propagated-inputs
9251 `(("ruby-ansi" ,ruby-ansi)
9252 ("ruby-brass" ,ruby-brass)))
9253 (synopsis "Test framework utilizing literate programming techniques")
9254 (description
9255 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
9256 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
9257 Development} (BDD) utilizing Literate Programming techniques. QED sits
9258 somewhere between lower-level testing tools like @code{Test::Unit} and
9259 requirement specifications systems like Cucumber.")
9260 (home-page "https://rubyworks.github.io/qed")
9261 (license license:bsd-2)))
9262
9263 (define-public ruby-que
9264 (package
9265 (name "ruby-que")
9266 (version "1.0.0.beta3")
9267 (source
9268 (origin
9269 (method url-fetch)
9270 (uri (rubygems-uri "que" version))
9271 (sha256
9272 (base32
9273 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
9274 (build-system ruby-build-system)
9275 (arguments
9276 '(#:tests? #f)) ; No included tests
9277 (synopsis "Job queue using PostgreSQL written in Ruby")
9278 (description
9279 "This package provides a job queue that uses PostgreSQL for storing jobs
9280 and locking between worker processes.")
9281 (home-page "https://github.com/chanks/que")
9282 (license license:expat)))
9283
9284 (define-public ruby-ae
9285 (package
9286 (name "ruby-ae")
9287 (version "1.8.2")
9288 (source
9289 (origin
9290 (method git-fetch)
9291 ;; Fetch from github so tests are included.
9292 (uri (git-reference
9293 (url "https://github.com/rubyworks/ae")
9294 (commit version)))
9295 (file-name (git-file-name name version))
9296 (sha256
9297 (base32
9298 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9299 (build-system ruby-build-system)
9300 (arguments
9301 `(#:phases
9302 (modify-phases %standard-phases
9303 (replace 'check
9304 (lambda _ (invoke "qed")))
9305 (add-before 'validate-runpath 'replace-broken-symlink
9306 (lambda* (#:key outputs #:allow-other-keys)
9307 (let* ((out (assoc-ref outputs "out"))
9308 (file (string-append
9309 out "/lib/ruby/vendor_ruby/gems/ae-"
9310 ,version "/lib/ae.yml")))
9311 ;; XXX: This symlink is broken since ruby 2.4.
9312 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9313 (delete-file file)
9314 (symlink "../.index" file)
9315 #t))))))
9316 (propagated-inputs
9317 `(("ruby-ansi" ,ruby-ansi)))
9318 (native-inputs
9319 `(("ruby-qed" ,ruby-qed)))
9320 (synopsis "Assertions library")
9321 (description
9322 "Assertive Expressive (AE) is an assertions library specifically designed
9323 for reuse by other test frameworks.")
9324 (home-page "https://rubyworks.github.io/ae/")
9325 (license license:bsd-2)))
9326
9327 (define-public ruby-lemon
9328 (package
9329 (name "ruby-lemon")
9330 (version "0.9.1")
9331 (source
9332 (origin
9333 (method url-fetch)
9334 (uri (rubygems-uri "lemon" version))
9335 (sha256
9336 (base32
9337 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
9338 (build-system ruby-build-system)
9339 (arguments
9340 `(#:phases
9341 (modify-phases %standard-phases
9342 (replace 'check (lambda _ (invoke "qed"))))))
9343 (propagated-inputs
9344 `(("ruby-ae" ,ruby-ae)
9345 ("ruby-ansi" ,ruby-ansi)
9346 ("ruby-rubytest" ,ruby-rubytest)))
9347 (native-inputs
9348 `(("ruby-qed" ,ruby-qed)))
9349 (synopsis "Test framework correlating code structure and test unit")
9350 (description
9351 "Lemon is a unit testing framework that enforces highly formal
9352 case-to-class and unit-to-method test construction. This enforcement can help
9353 focus concern on individual units of behavior.")
9354 (home-page "https://rubyworks.github.io/lemon")
9355 (license license:bsd-2)))
9356
9357 (define-public ruby-rubytest-cli
9358 (package
9359 (name "ruby-rubytest-cli")
9360 (version "0.2.0")
9361 (source
9362 (origin
9363 (method url-fetch)
9364 (uri (rubygems-uri "rubytest-cli" version))
9365 (sha256
9366 (base32
9367 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
9368 (build-system ruby-build-system)
9369 (arguments
9370 `(#:tests? #f)) ; no tests
9371 (propagated-inputs
9372 `(("ruby-ansi" ,ruby-ansi)
9373 ("ruby-rubytest" ,ruby-rubytest)))
9374 (synopsis "Command-line interface for rubytest")
9375 (description
9376 "Rubytest CLI is a command-line interface for running tests for
9377 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
9378 (home-page "https://rubyworks.github.io/rubytest-cli")
9379 (license license:bsd-2)))
9380
9381 (define-public ruby-hashery
9382 (package
9383 (name "ruby-hashery")
9384 (version "2.1.2")
9385 (source
9386 (origin
9387 (method url-fetch)
9388 (uri (rubygems-uri "hashery" version))
9389 (sha256
9390 (base32
9391 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
9392 (build-system ruby-build-system)
9393 (arguments
9394 `(#:phases
9395 (modify-phases %standard-phases
9396 (replace 'check
9397 (lambda _
9398 (invoke "qed")
9399 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
9400 (native-inputs
9401 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
9402 ("ruby-qed" ,ruby-qed)
9403 ("ruby-lemon" ,ruby-lemon)))
9404 (synopsis "Hash-like classes with extra features")
9405 (description
9406 "The Hashery is a tight collection of @code{Hash}-like classes.
9407 Included are the auto-sorting @code{Dictionary} class, the efficient
9408 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
9409 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9410 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9411 standard @code{Hash} making it possible to subclass and augment to fit any
9412 specific use case.")
9413 (home-page "https://rubyworks.github.io/hashery")
9414 (license license:bsd-2)))
9415
9416 (define-public ruby-rc4
9417 (package
9418 (name "ruby-rc4")
9419 (version "0.1.5")
9420 (source
9421 (origin
9422 (method url-fetch)
9423 (uri (rubygems-uri "ruby-rc4" version))
9424 (sha256
9425 (base32
9426 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9427 (build-system ruby-build-system)
9428 (arguments
9429 `(#:phases
9430 (modify-phases %standard-phases
9431 (replace 'check
9432 (lambda _
9433 (invoke "rspec" "spec/rc4_spec.rb"))))))
9434 (native-inputs
9435 `(("ruby-rspec" ,ruby-rspec-2)))
9436 (synopsis "Implementation of the RC4 algorithm")
9437 (description
9438 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9439 (home-page "https://github.com/caiges/Ruby-RC4")
9440 (license license:expat)))
9441
9442 (define-public ruby-afm
9443 (package
9444 (name "ruby-afm")
9445 (version "0.2.2")
9446 (source
9447 (origin
9448 (method url-fetch)
9449 (uri (rubygems-uri "afm" version))
9450 (sha256
9451 (base32
9452 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9453 (build-system ruby-build-system)
9454 (native-inputs
9455 `(("bundler" ,bundler)))
9456 (synopsis "Read Adobe Font Metrics (afm) files")
9457 (description
9458 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9459 files and use the data therein.")
9460 (home-page "https://github.com/halfbyte/afm")
9461 (license license:expat)))
9462
9463 (define-public ruby-ascii85
9464 (package
9465 (name "ruby-ascii85")
9466 (version "1.0.3")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (rubygems-uri "Ascii85" version))
9471 (sha256
9472 (base32
9473 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
9474 (build-system ruby-build-system)
9475 (native-inputs
9476 `(("bundler" ,bundler)))
9477 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9478 (description
9479 "This library provides methods to encode and decode Ascii85
9480 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9481 @dfn{Portable Document Format} (PDF) file formats.")
9482 (home-page "https://github.com/datawraith/ascii85gem")
9483 (license license:expat)))
9484
9485 (define-public ruby-ttfunk
9486 (package
9487 (name "ruby-ttfunk")
9488 (version "1.6.2.1")
9489 (source
9490 (origin
9491 (method git-fetch)
9492 ;; fetch from github as the gem does not contain testing code
9493 (uri (git-reference
9494 (url "https://github.com/prawnpdf/ttfunk")
9495 (commit version)))
9496 (file-name (git-file-name name version))
9497 (sha256
9498 (base32
9499 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
9500 (build-system ruby-build-system)
9501 (arguments
9502 `(#:test-target "spec"
9503 #:phases
9504 (modify-phases %standard-phases
9505 (add-before 'build 'remove-ssh
9506 (lambda _
9507 ;; remove dependency on an ssh key pair that doesn't exist
9508 (substitute* "ttfunk.gemspec"
9509 (("spec.signing_key.*") ""))
9510 #t))
9511 (add-before 'check 'remove-rubocop
9512 (lambda _
9513 ;; remove rubocop as a dependency as not needed for testing
9514 (substitute* "ttfunk.gemspec"
9515 (("spec.add_development_dependency\\('rubocop'.*") ""))
9516 (substitute* "Rakefile"
9517 (("require 'rubocop/rake_task'") "")
9518 (("RuboCop::RakeTask.new") ""))
9519 #t)))))
9520 (native-inputs
9521 `(("ruby-rspec" ,ruby-rspec)
9522 ("ruby-yard" ,ruby-yard)
9523 ("bundler" ,bundler)))
9524 (synopsis "Font metrics parser for the Prawn PDF generator")
9525 (description
9526 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9527 part of the Prawn PDF generator.")
9528 (home-page "https://github.com/prawnpdf/ttfunk")
9529 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9530 ;; for details."
9531 (license %prawn-project-licenses)))
9532
9533 (define-public ruby-puma
9534 (package
9535 (name "ruby-puma")
9536 (version "3.9.1")
9537 (source
9538 (origin
9539 (method git-fetch)
9540 ;; Fetch from GitHub because distributed gem does not contain tests.
9541 (uri (git-reference
9542 (url "https://github.com/puma/puma")
9543 (commit (string-append "v" version))))
9544 (file-name (git-file-name name version))
9545 (sha256
9546 (base32
9547 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9548 (build-system ruby-build-system)
9549 (arguments
9550 `(#:tests? #f ; Tests require an out-dated version of minitest.
9551 #:phases
9552 (modify-phases %standard-phases
9553 (add-before 'build 'fix-gemspec
9554 (lambda _
9555 (substitute* "puma.gemspec"
9556 (("git ls-files") "find * |sort"))
9557 #t)))))
9558 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9559 (description
9560 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9561 for Ruby/Rack applications. Puma is intended for use in both development and
9562 production environments. In order to get the best throughput, it is highly
9563 recommended that you use a Ruby implementation with real threads like Rubinius
9564 or JRuby.")
9565 (home-page "https://puma.io/")
9566 (license license:expat)))
9567
9568 (define-public ruby-hoe-git
9569 (package
9570 (name "ruby-hoe-git")
9571 (version "1.6.0")
9572 (source
9573 (origin
9574 (method url-fetch)
9575 (uri (rubygems-uri "hoe-git" version))
9576 (sha256
9577 (base32
9578 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9579 (build-system ruby-build-system)
9580 (propagated-inputs
9581 `(("ruby-hoe" ,ruby-hoe)))
9582 (synopsis "Hoe plugins for tighter Git integration")
9583 (description
9584 "This package provides a set of Hoe plugins for tighter Git integration.
9585 It provides tasks to automate release tagging and pushing and changelog
9586 generation.")
9587 (home-page "https://github.com/jbarnette/hoe-git")
9588 (license license:expat)))
9589
9590 (define-public ruby-sequel
9591 (package
9592 (name "ruby-sequel")
9593 (version "4.49.0")
9594 (source
9595 (origin
9596 (method url-fetch)
9597 (uri (rubygems-uri "sequel" version))
9598 (sha256
9599 (base32
9600 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
9601 (build-system ruby-build-system)
9602 (arguments
9603 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9604 (synopsis "Database toolkit for Ruby")
9605 (description "Sequel provides thread safety, connection pooling and a
9606 concise DSL for constructing SQL queries and table schemas. It includes a
9607 comprehensive ORM layer for mapping records to Ruby objects and handling
9608 associated records.")
9609 (home-page "https://sequel.jeremyevans.net")
9610 (license license:expat)))
9611
9612 (define-public ruby-timecop
9613 (package
9614 (name "ruby-timecop")
9615 (version "0.9.1")
9616 (source
9617 (origin
9618 (method url-fetch)
9619 (uri (rubygems-uri "timecop" version))
9620 (sha256
9621 (base32
9622 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
9623 (build-system ruby-build-system)
9624 (arguments
9625 `(#:phases
9626 (modify-phases %standard-phases
9627 (add-before 'check 'set-check-rubylib
9628 (lambda _
9629 ;; Set RUBYLIB so timecop tests finds its own lib.
9630 (setenv "RUBYLIB" "lib")
9631 #t)))))
9632 (native-inputs
9633 `(("bundler" ,bundler)
9634 ("ruby-minitest-rg" ,ruby-minitest-rg)
9635 ("ruby-mocha" ,ruby-mocha)
9636 ("ruby-activesupport" ,ruby-activesupport)))
9637 (synopsis "Test mocks for time-dependent functions")
9638 (description
9639 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9640 making it easier to test time-dependent code. It provides a unified method to
9641 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9642 call.")
9643 (home-page "https://github.com/travisjeffery/timecop")
9644 (license license:expat)))
9645
9646 (define-public ruby-concurrent
9647 (package
9648 (name "ruby-concurrent")
9649 (version "1.1.5")
9650 (source
9651 (origin
9652 (method git-fetch)
9653 ;; Download from GitHub because the rubygems version does not contain
9654 ;; Rakefile.
9655 (uri (git-reference
9656 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9657 (commit (string-append "v" version))))
9658 (file-name (git-file-name name version))
9659 (sha256
9660 (base32
9661 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
9662 (build-system ruby-build-system)
9663 (arguments
9664 `(#:test-target "ci"
9665 #:phases
9666 (modify-phases %standard-phases
9667 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
9668 (lambda _
9669 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9670 ;; correct one.
9671 (delete-file "concurrent-ruby-edge.gemspec")
9672 (delete-file "concurrent-ruby-ext.gemspec")
9673 #t))
9674 (replace 'replace-git-ls-files
9675 (lambda _
9676 ;; XXX: The default substitution made by this phase is not fully
9677 ;; compatible with "git ls-files". The latter produces file names
9678 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9679 ;; which gives "./lib/foo". That difference in turn breaks the
9680 ;; comparison against a glob pattern in this script.
9681 (substitute* "concurrent-ruby.gemspec"
9682 (("git ls-files") "find * -type f | sort"))
9683 #t))
9684 (add-before 'build 'remove-jar-from-gemspec
9685 (lambda _
9686 ;; The gemspec wants to include a JAR file that we do not build
9687 ;; nor need.
9688 (substitute* "concurrent-ruby.gemspec"
9689 (("'lib/concurrent/concurrent_ruby.jar'")
9690 ""))
9691 #t))
9692 (add-before 'build 'remove-rake_compiler_dock-dependency
9693 (lambda _
9694 ;; This library is only used when building for non-MRI targets.
9695 (substitute* "Rakefile"
9696 (("require 'rake_compiler_dock'")
9697 ""))
9698 #t))
9699 (add-before 'check 'remove-timecop-dependency
9700 ;; Remove timecop-dependent tests as having timecop as a depedency
9701 ;; causes circular depedencies.
9702 (lambda _
9703 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9704 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9705 #t)))))
9706 (native-inputs
9707 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9708 ("ruby-rspec" ,ruby-rspec)))
9709 (synopsis "Concurrency tools for Ruby")
9710 (description
9711 "This library provides modern concurrency tools including agents,
9712 futures, promises, thread pools, actors, supervisors, and more. It is
9713 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9714 patterns.")
9715 (home-page "http://www.concurrent-ruby.com")
9716 (license license:expat)))
9717
9718 (define-public ruby-pkg-config
9719 (package
9720 (name "ruby-pkg-config")
9721 (version "1.2.5")
9722 (source
9723 (origin
9724 (method url-fetch)
9725 (uri (rubygems-uri "pkg-config" version))
9726 (sha256
9727 (base32
9728 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
9729 (build-system ruby-build-system)
9730 (arguments
9731 ;; Tests require extra files not included in the gem.
9732 `(#:tests? #f))
9733 (synopsis "Detect libraries for compiling Ruby native extensions")
9734 (description
9735 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9736 libraries for compiling Ruby native extensions.")
9737 (home-page "https://github.com/ruby-gnome2/pkg-config")
9738 (license license:lgpl2.0+)))
9739
9740 (define-public ruby-net-http-digest-auth
9741 (package
9742 (name "ruby-net-http-digest-auth")
9743 (version "1.4.1")
9744 (source
9745 (origin
9746 (method url-fetch)
9747 (uri (rubygems-uri "net-http-digest_auth" version))
9748 (sha256
9749 (base32
9750 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
9751 (build-system ruby-build-system)
9752 (native-inputs
9753 `(("ruby-hoe" ,ruby-hoe)))
9754 (synopsis "RFC 2617 HTTP digest authentication library")
9755 (description
9756 "This library implements HTTP's digest authentication scheme based on
9757 RFC 2617. This enables the use of the digest authentication scheme instead
9758 of the more insecure basic authentication scheme.")
9759 (home-page "https://github.com/drbrain/net-http-digest_auth")
9760 (license license:expat)))
9761
9762 (define-public ruby-mail
9763 (package
9764 (name "ruby-mail")
9765 (version "2.6.6")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (rubygems-uri "mail" version))
9770 (sha256
9771 (base32
9772 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
9773 (build-system ruby-build-system)
9774 (propagated-inputs
9775 `(("ruby-mime-types" ,ruby-mime-types)))
9776 (arguments
9777 ;; Tests require extra gems not included in the Gemfile.
9778 ;; XXX: Try enabling this for the next version with mini_mime.
9779 `(#:tests? #f))
9780 (synopsis "Mail library for Ruby")
9781 (description
9782 "Mail is an internet library for Ruby that is designed to handle email
9783 generation, parsing and sending. The purpose of this library is to provide
9784 a single point of access to handle all email functions, including sending
9785 and receiving emails. All network type actions are done through proxy
9786 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9787
9788 Mail has been designed with a very simple object oriented system that
9789 really opens up the email messages you are parsing, if you know what you
9790 are doing, you can fiddle with every last bit of your email directly.")
9791 (home-page "https://github.com/mikel/mail")
9792 (license license:expat)))
9793
9794 (define-public ruby-mathn
9795 (package
9796 (name "ruby-mathn")
9797 (version "0.1.0")
9798 (source
9799 (origin
9800 (method url-fetch)
9801 (uri (rubygems-uri "mathn" version))
9802 (sha256
9803 (base32
9804 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9805 (build-system ruby-build-system)
9806 (native-inputs
9807 `(("bundler" ,bundler)
9808 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9809 (synopsis "Extends math operations for increased precision")
9810 (description
9811 "This gem makes mathematical operations more precise in Ruby and
9812 integrates other mathematical standard libraries. Prior to Ruby 2.5,
9813 @code{mathn} was part of the Ruby standard library.")
9814 (home-page "https://github.com/ruby/mathn")
9815 (license license:bsd-2)))
9816
9817 (define-public ruby-code-statistics
9818 (package
9819 (name "ruby-code-statistics")
9820 (version "0.2.13")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (rubygems-uri "code_statistics" version))
9825 (sha256
9826 (base32
9827 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9828 (build-system ruby-build-system)
9829 (arguments
9830 `(#:tests? #f)) ; Not all test code is included in gem.
9831 (synopsis "Port of the rails 'rake stats' method")
9832 (description
9833 "This gem is a port of the rails 'rake stats' method so it can be made
9834 more robust and work for non rails projects.")
9835 (home-page "https://github.com/danmayer/code_statistics")
9836 (license license:expat)))
9837
9838 (define-public ruby-rubypants
9839 (package
9840 (name "ruby-rubypants")
9841 (version "0.6.0")
9842 (source (origin
9843 (method url-fetch)
9844 (uri (rubygems-uri "rubypants" version))
9845 (sha256
9846 (base32
9847 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9848 (build-system ruby-build-system)
9849 (arguments
9850 '(#:tests? #f)) ; need Codecov
9851 (synopsis "Port of the smart-quotes library SmartyPants")
9852 (description
9853 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9854 original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9855 and BBEdit that easily translates plain ASCII punctuation characters into
9856 smart typographic punctuation HTML entities.")
9857 (home-page "https://github.com/jmcnevin/rubypants")
9858 (license license:bsd-2)))
9859
9860 (define-public ruby-org-ruby
9861 (package
9862 (name "ruby-org-ruby")
9863 (version "0.9.12")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (rubygems-uri "org-ruby" version))
9867 (sha256
9868 (base32
9869 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
9870 (build-system ruby-build-system)
9871 (arguments
9872 '(#:tests? #f)) ; no rakefile
9873 (propagated-inputs
9874 `(("ruby-rubypants" ,ruby-rubypants)))
9875 (synopsis "Org-mode parser written in Ruby")
9876 (description
9877 "Org-ruby is an org-mode parser written in Ruby. The most significant
9878 thing this library does today is convert org-mode files to HTML or Textile or
9879 Markdown.")
9880 (home-page "https://github.com/wallyqs/org-ruby")
9881 (license license:expat)))
9882
9883 (define-public ruby-rake
9884 (package
9885 (name "ruby-rake")
9886 (version "13.0.1")
9887 (source
9888 (origin
9889 (method url-fetch)
9890 (uri (rubygems-uri "rake" version))
9891 (sha256
9892 (base32
9893 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
9894 (build-system ruby-build-system)
9895 (native-inputs
9896 `(("bundler" ,bundler)))
9897 (synopsis "Rake is a Make-like program implemented in Ruby")
9898 (description
9899 "Rake is a Make-like program where tasks and dependencies are specified
9900 in standard Ruby syntax.")
9901 (home-page "https://github.com/ruby/rake")
9902 (license license:expat)))
9903
9904 (define-public ruby-childprocess
9905 (package
9906 (name "ruby-childprocess")
9907 (version "3.0.0")
9908 (source
9909 (origin
9910 (method url-fetch)
9911 (uri (rubygems-uri "childprocess" version))
9912 (sha256
9913 (base32
9914 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
9915 (build-system ruby-build-system)
9916 (arguments
9917 `(#:tests? #f))
9918 (native-inputs
9919 `(("bundler" ,bundler)
9920 ("ruby-rspec" ,ruby-rspec)))
9921 (propagated-inputs
9922 `(("ruby-ffi" ,ruby-ffi)))
9923 (synopsis "Control external programs running in the background, in Ruby")
9924 (description "@code{childprocess} provides a gem to control external
9925 programs running in the background, in Ruby.")
9926 (home-page "https://github.com/enkessler/childprocess")
9927 (license license:expat)))
9928
9929 (define-public ruby-public-suffix
9930 (package
9931 (name "ruby-public-suffix")
9932 (version "4.0.5")
9933 (source (origin
9934 (method url-fetch)
9935 (uri (rubygems-uri "public_suffix" version))
9936 (sha256
9937 (base32
9938 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
9939 (build-system ruby-build-system)
9940 (arguments
9941 '(#:phases
9942 (modify-phases %standard-phases
9943 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
9944 ;; including it as an input can lead to circular dependencies.
9945 (add-after 'unpack 'remove-rubocop-from-Rakefile
9946 (lambda _
9947 (substitute* "Rakefile"
9948 (("require \"rubocop/rake\\_task\"") "")
9949 (("RuboCop::RakeTask\\.new") ""))
9950 #t)))))
9951 (native-inputs
9952 `(("bundler" ,bundler)
9953 ("ruby-yard" ,ruby-yard)
9954 ("ruby-mocha" ,ruby-mocha)
9955 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
9956 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
9957 (synopsis "Domain name parser")
9958 (description "The gem @code{public_suffix} is a domain name parser,
9959 written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
9960 is one under which Internet users can (or historically could) directly
9961 register names. Some examples of public suffixes are @code{.com},
9962 @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
9963 all known public suffixes.")
9964 (license license:expat)))
9965
9966 (define-public ruby-addressable
9967 (package
9968 (name "ruby-addressable")
9969 (version "2.7.0")
9970 (source (origin
9971 (method url-fetch)
9972 (uri (rubygems-uri "addressable" version))
9973 (sha256
9974 (base32
9975 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
9976 (build-system ruby-build-system)
9977 (arguments
9978 '(#:test-target "spec"
9979 #:phases
9980 (modify-phases %standard-phases
9981 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
9982 (lambda _
9983 (substitute* "Gemfile"
9984 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
9985 ((".*launchy.*") "")
9986 ((".*rake.*") "gem 'rake'\n")
9987 ((".*redcarpet.*") ""))
9988 #t))
9989 (add-before 'check 'delete-network-dependent-test
9990 (lambda _
9991 (delete-file "spec/addressable/net_http_compat_spec.rb")
9992 #t)))))
9993 (native-inputs
9994 `(("ruby-rspec" ,ruby-rspec)
9995 ("bundler" ,bundler)
9996 ("ruby-idn-ruby" ,ruby-idn-ruby)
9997 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
9998 ("ruby-rspec-its" ,ruby-rspec-its-minimal)
9999 ("ruby-yard" ,ruby-yard)
10000 ("ruby-simplecov" ,ruby-simplecov)))
10001 (propagated-inputs
10002 `(("ruby-public-suffix" ,ruby-public-suffix)))
10003 (home-page "https://github.com/sporkmonger/addressable")
10004 (synopsis "Alternative URI implementation")
10005 (description "Addressable is a replacement for the URI implementation that
10006 is part of Ruby's standard library. It more closely conforms to RFC 3986,
10007 RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
10008 (license license:asl2.0)))
10009
10010 (define-public ruby-colorize
10011 (package
10012 (name "ruby-colorize")
10013 (version "0.8.1")
10014 (source (origin
10015 (method url-fetch)
10016 (uri (rubygems-uri "colorize" version))
10017 (sha256
10018 (base32
10019 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
10020 (build-system ruby-build-system)
10021 (arguments
10022 '(#:phases (modify-phases %standard-phases
10023 (add-before 'check 'remove-codeclimate-dependency
10024 (lambda _
10025 (substitute* "test/test_colorize.rb"
10026 ;; Do not hook the tests into the online CodeClimate
10027 ;; service which is unnecessary for these tests.
10028 (("require 'codeclimate-test-reporter'")
10029 "")
10030 (("CodeClimate.*") ""))
10031 #t)))))
10032 (synopsis "Add color effects to the @code{String} class")
10033 (description
10034 "This package extends the @code{String} class and adds a
10035 @code{ColorizedString} with methods to set text color, background color,
10036 and text effects.")
10037 (home-page "https://github.com/fazibear/colorize")
10038 (license license:gpl2+)))
10039
10040 (define-public ruby-colorator
10041 (package
10042 (name "ruby-colorator")
10043 (version "1.1.0")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (rubygems-uri "colorator" version))
10047 (sha256
10048 (base32
10049 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
10050 (build-system ruby-build-system)
10051 (arguments
10052 ;; No test target
10053 `(#:tests? #f))
10054 (home-page "http://octopress.org/colorator/")
10055 (synopsis "Terminal color library")
10056 (description "Colorator is a Ruby gem that helps you colorize your text
10057 for the terminal.")
10058 (license license:expat)))
10059
10060 (define-public ruby-command-line-reporter
10061 (package
10062 (name "ruby-command-line-reporter")
10063 (version "4.0.1")
10064 (source (origin
10065 (method url-fetch)
10066 (uri (rubygems-uri "command_line_reporter" version))
10067 (sha256
10068 (base32
10069 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
10070 (build-system ruby-build-system)
10071 (arguments
10072 ;; No Rakefile
10073 `(#:tests? #f
10074 #:phases
10075 (modify-phases %standard-phases
10076 (add-before 'build 'fix-dependencies
10077 (lambda _
10078 (substitute* ".gemspec"
10079 ;; colored is unmaintained
10080 (("colored") "colorator")
10081 ;; colorator version
10082 (("= 1.2") "= 1.1"))
10083 #t)))))
10084 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
10085 (home-page "https://github.com/wbailey/command_line_reporter")
10086 (synopsis "Report production while executing Ruby scripts")
10087 (description "This gem provides a DSL that makes it easy to write reports
10088 of various types in ruby. It eliminates the need to litter your source with
10089 puts statements, instead providing a more readable, expressive interface to
10090 your application.")
10091 (license license:asl2.0)))
10092
10093 (define-public ruby-command-line-reporter-3
10094 (package
10095 (inherit ruby-command-line-reporter)
10096 (version "3.3.6")
10097 (source (origin
10098 (method url-fetch)
10099 (uri (rubygems-uri "command_line_reporter" version))
10100 (sha256
10101 (base32
10102 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
10103
10104 (define-public ruby-kpeg
10105 (package
10106 (name "ruby-kpeg")
10107 (version "1.1.0")
10108 (source
10109 (origin
10110 (method url-fetch)
10111 (uri (rubygems-uri "kpeg" version))
10112 (sha256
10113 (base32
10114 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
10115 (build-system ruby-build-system)
10116 (native-inputs
10117 `(("ruby-hoe" ,ruby-hoe)))
10118 (synopsis "PEG library for Ruby")
10119 (description "KPeg is a simple PEG library for Ruby. It provides an API as
10120 well as native grammar to build the grammar. KPeg supports direct left
10121 recursion of rules via the
10122 @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
10123 technique.")
10124 (home-page "https://github.com/evanphx/kpeg")
10125 (license license:expat)))
10126
10127 (define-public ruby-rdoc
10128 (package
10129 (name "ruby-rdoc")
10130 (version "6.2.0")
10131 (source
10132 (origin
10133 (method git-fetch)
10134 (uri (git-reference
10135 (url "https://github.com/ruby/rdoc")
10136 (commit (string-append "v" version))))
10137 (file-name (git-file-name name version))
10138 (sha256
10139 (base32
10140 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
10141 (build-system ruby-build-system)
10142 (arguments
10143 `(#:phases
10144 (modify-phases %standard-phases
10145 (add-after 'unpack 'patch-gemspec
10146 ;; TODO: Remove after next release is tagged.
10147 (lambda _
10148 (substitute* "rdoc.gemspec"
10149 (("\"lib/rdoc/generator/template/darkfish/js/\
10150 jquery\\.js\", ") ""))
10151 #t))
10152 (add-before 'build 'generate
10153 ;; 'gem build' doesn't honor Rakefile dependencies (see:
10154 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
10155 (lambda _
10156 (invoke "rake" "generate"))))))
10157 (native-inputs
10158 `(("bundler" ,bundler)
10159 ("ruby-kpeg" ,ruby-kpeg)
10160 ("ruby-racc" ,ruby-racc)
10161 ("ruby-rubocop" ,ruby-rubocop)))
10162 (home-page "https://ruby.github.io/rdoc/")
10163 (synopsis "HTML and command-line documentation utility")
10164 (description "RDoc produces HTML and command-line documentation for Ruby
10165 projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
10166 documentation from the command-line.")
10167 (license license:gpl2+)))
10168
10169 (define-public ruby-sass-listen
10170 (package
10171 (name "ruby-sass-listen")
10172 (version "4.0.0")
10173 (source (origin
10174 (method url-fetch)
10175 (uri (rubygems-uri "sass-listen" version))
10176 (sha256
10177 (base32
10178 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
10179 (build-system ruby-build-system)
10180 (arguments
10181 ;; No test target
10182 `(#:tests? #f))
10183 (propagated-inputs
10184 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
10185 ("ruby-rb-inotify" ,ruby-rb-inotify)))
10186 (home-page "https://github.com/sass/listen")
10187 (synopsis "File modification notification library")
10188 (description "The Listen gem listens to file modifications and notifies you
10189 about the changes.")
10190 (license license:expat)))
10191
10192 (define-public ruby-terminfo
10193 (package
10194 (name "ruby-terminfo")
10195 (version "0.1.1")
10196 (source
10197 (origin
10198 (method url-fetch)
10199 (uri (rubygems-uri "ruby-terminfo" version))
10200 (sha256
10201 (base32
10202 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
10203 (build-system ruby-build-system)
10204 (arguments
10205 `(#:test-target "test"
10206 ;; Rakefile requires old packages and would need modification to
10207 ;; work with current software.
10208 #:tests? #f))
10209 (inputs
10210 `(("ncurses" ,ncurses)))
10211 (native-inputs
10212 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
10213 ("ruby-rdoc" ,ruby-rdoc)))
10214 (home-page "http://www.a-k-r.org/ruby-terminfo/")
10215 (synopsis "Terminfo binding for Ruby")
10216 (description "Ruby-terminfo provides terminfo binding for Ruby.")
10217 (license license:bsd-3)))
10218
10219 (define-public ruby-diffy
10220 (package
10221 (name "ruby-diffy")
10222 (version "3.2.1")
10223 (source
10224 (origin
10225 (method url-fetch)
10226 (uri (rubygems-uri "diffy" version))
10227 (sha256
10228 (base32
10229 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
10230 (build-system ruby-build-system)
10231 (arguments
10232 ;; No tests
10233 `(#:tests? #f))
10234 (native-inputs
10235 `(("ruby-rspec" ,ruby-rspec)))
10236 (home-page "https://github.com/samg/diffy")
10237 (synopsis "Convenient diffing in ruby")
10238 (description "Diffy provides a convenient way to generate a diff from two
10239 strings or files.")
10240 (license license:expat)))
10241
10242 (define-public ruby-sass-spec
10243 (package
10244 (name "ruby-sass-spec")
10245 (version "3.5.4")
10246 (source
10247 (origin
10248 (method git-fetch)
10249 (uri (git-reference
10250 (url "https://github.com/sass/sass-spec")
10251 (commit (string-append "v" version))))
10252 (file-name (git-file-name name version))
10253 (sha256
10254 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
10255 (build-system ruby-build-system)
10256 (propagated-inputs
10257 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
10258 ("ruby-diffy" ,ruby-diffy)
10259 ("ruby-terminfo" ,ruby-terminfo)))
10260 (arguments
10261 `(;; This package contains tests for a sass implementation, and the to
10262 ;; avoid any circular dependencies, the tests are not run here
10263 #:tests? #f
10264 #:phases
10265 (modify-phases %standard-phases
10266 (add-after 'unpack 'patch-test
10267 (lambda _
10268 (delete-file "spec/values/colors/alpha_hex-3.5/error")
10269 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
10270 (("string") "color")))))))
10271 (home-page "https://github.com/sass/sass-spec")
10272 (synopsis "Test suite for Sass")
10273 (description "Sass Spec is a test suite for Sass. Test cases are all in
10274 the @file{spec} directory.")
10275 (license license:expat)))
10276
10277 (define-public ruby-sass
10278 (package
10279 (name "ruby-sass")
10280 (version "3.6.0")
10281 (source (origin
10282 (method url-fetch)
10283 (uri (rubygems-uri "sass" version))
10284 (sha256
10285 (base32
10286 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
10287 (build-system ruby-build-system)
10288 (propagated-inputs
10289 `(("ruby-sass-listen" ,ruby-sass-listen)))
10290 (native-inputs
10291 `(("ruby-sass-spec" ,ruby-sass-spec)
10292 ("ruby-mathn" ,ruby-mathn)))
10293 (home-page "https://sass-lang.com/")
10294 (synopsis "CSS extension language")
10295 (description "Sass is a CSS extension language. It extends CSS with
10296 features that don't exist yet like variables, nesting, mixins and inheritance.")
10297 (license license:expat)))
10298
10299 (define-public ruby-sassc
10300 (package
10301 (name "ruby-sassc")
10302 (version "2.2.1")
10303 (source
10304 (origin
10305 (method url-fetch)
10306 (uri (rubygems-uri "sassc" version))
10307 (sha256
10308 (base32
10309 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
10310 (build-system ruby-build-system)
10311 (arguments
10312 '(#:modules ((guix build ruby-build-system)
10313 (guix build utils)
10314 (ice-9 textual-ports))
10315 #:phases
10316 (modify-phases %standard-phases
10317 ;; TODO: This would be better as a snippet, but the ruby-build-system
10318 ;; doesn't seem to support that
10319 (add-after 'unpack 'remove-libsass
10320 (lambda _
10321 (delete-file-recursively "ext")
10322 (with-atomic-file-replacement "sassc.gemspec"
10323 (lambda (in out)
10324 (let* ((gemspec (get-string-all in))
10325 (index (string-contains gemspec "libsass_dir")))
10326 (display (string-append
10327 (string-take gemspec index)
10328 "\nend\n")
10329 out))))
10330 #t))
10331 (add-after 'unpack 'dont-check-the-libsass-version
10332 (lambda _
10333 (substitute* "test/native_test.rb"
10334 (("assert_equal.*Native\\.version") ""))
10335 #t))
10336 (add-after 'unpack 'remove-git-from-gemspec
10337 (lambda _
10338 (substitute* "sassc.gemspec"
10339 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
10340 #t))
10341 (add-after 'unpack 'remove-extensions-from-gemspec
10342 (lambda _
10343 (substitute* "sassc.gemspec"
10344 (("\\[\"ext/extconf.rb\"\\]") "[]"))
10345 #t))
10346 (add-after 'unpack 'fix-Rakefile
10347 (lambda _
10348 (substitute* "Rakefile"
10349 (("test: 'compile:libsass'") ":test"))
10350 #t))
10351 (add-after 'unpack 'remove-unnecessary-dependencies
10352 (lambda _
10353 (substitute* "test/test_helper.rb"
10354 (("require \"pry\"") ""))
10355 #t))
10356 (add-before 'build 'patch-native.rb
10357 (lambda* (#:key inputs #:allow-other-keys)
10358 (substitute* "lib/sassc/native.rb"
10359 ((".*gem_root = spec.gem_dir") "")
10360 (("ffi_lib .*\n")
10361 (string-append
10362 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
10363 #t))
10364 ;; The gemspec still references the libsass files, so just keep the
10365 ;; one in the gem.
10366 (delete 'extract-gemspec))))
10367 (propagated-inputs
10368 `(("ruby-ffi" ,ruby-ffi)
10369 ("ruby-rake" ,ruby-rake)))
10370 (inputs
10371 `(("libsass" ,libsass)))
10372 (native-inputs
10373 `(("bundler" ,bundler)
10374 ("ruby-rake-compiler" ,ruby-rake-compiler)
10375 ("ruby-minitest-around" ,ruby-minitest-around)
10376 ("ruby-test-construct" ,ruby-test-construct)))
10377 (synopsis "Use libsss from Ruby")
10378 (description
10379 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10380 bindings to the libsass library. This enables rendering
10381 @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10382 (home-page "https://github.com/sass/sassc-ruby")
10383 (license license:expat)))
10384
10385 (define-public ruby-jekyll-sass-converter
10386 (package
10387 (name "ruby-jekyll-sass-converter")
10388 (version "1.5.2")
10389 (source (origin
10390 (method url-fetch)
10391 (uri (rubygems-uri "jekyll-sass-converter" version))
10392 (sha256
10393 (base32
10394 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
10395 (build-system ruby-build-system)
10396 (propagated-inputs
10397 `(("ruby-sass" ,ruby-sass)))
10398 (arguments
10399 ;; No rakefile
10400 `(#:tests? #f))
10401 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10402 (synopsis "Sass converter for Jekyll")
10403 (description "This gem provide built-in support for the Sass converter
10404 in Jekyll.")
10405 (license license:expat)))
10406
10407 (define-public ruby-jekyll-watch
10408 (package
10409 (name "ruby-jekyll-watch")
10410 (version "2.1.2")
10411 (source (origin
10412 (method url-fetch)
10413 (uri (rubygems-uri "jekyll-watch" version))
10414 (sha256
10415 (base32
10416 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
10417 (build-system ruby-build-system)
10418 (propagated-inputs
10419 `(("ruby-listen" ,ruby-listen)))
10420 (arguments
10421 ;; No rakefile
10422 `(#:tests? #f))
10423 (home-page "https://github.com/jekyll/jekyll-watch")
10424 (synopsis "Jekyll auto-rebuild support")
10425 (description "This gems add the @code{--watch} switch to the jekyll CLI
10426 interface. It allows Jekyll to rebuild your site when a file changes.")
10427 (license license:expat)))
10428
10429 (define-public ruby-parallel
10430 (package
10431 (name "ruby-parallel")
10432 (version "1.13.0")
10433 (source
10434 (origin
10435 (method git-fetch)
10436 (uri (git-reference
10437 (url "https://github.com/grosser/parallel")
10438 (commit (string-append "v" version))))
10439 (file-name (git-file-name name version))
10440 (sha256
10441 (base32
10442 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
10443 (build-system ruby-build-system)
10444 (arguments
10445 `(;; TODO 3 test failures
10446 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10447 ;; open unnecessary pipes
10448 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10449 ;; SQLite in processes
10450 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10451 ;; SQLite in threads
10452 #:tests? #f
10453 #:test-target "rspec-rerun:spec"
10454 #:phases
10455 (modify-phases %standard-phases
10456 (add-after 'unpack 'patch-Gemfile
10457 (lambda _
10458 (substitute* "Gemfile"
10459 (("gem 'rspec-legacy_formatters'") "")
10460 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10461 (add-before 'check 'delete-Gemfile.lock
10462 (lambda _
10463 ;; Bundler isn't being used for fetching dependendencies, so
10464 ;; delete the Gemfile.lock
10465 (delete-file "Gemfile.lock")
10466 #t))
10467 (add-before 'build 'patch-gemspec
10468 (lambda _
10469 (substitute* "parallel.gemspec"
10470 (("git ls-files") "find"))
10471 #t)))))
10472 (native-inputs
10473 `(("ruby-rspec" ,ruby-rspec)
10474 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
10475 ("bundler" ,bundler)
10476 ("ruby-activerecord" ,ruby-activerecord)
10477 ("ruby-progressbar" ,ruby-progressbar)
10478 ("ruby-bump" ,ruby-bump)
10479 ("procps" ,procps)
10480 ("lsof" ,lsof)
10481 ("ruby-mysql2" ,ruby-mysql2)
10482 ("ruby-sqlite3" ,ruby-sqlite3)
10483 ("ruby-i18n" ,ruby-i18n)))
10484 (home-page "https://github.com/grosser/parallel")
10485 (synopsis "Parallel processing in Ruby")
10486 (description "Parallel allows you to run any code in parallel Processes
10487 (to use all CPUs) or Threads(to speedup blocking operations). It is best
10488 suited for map-reduce or e.g. parallel downloads/uploads.")
10489 (license license:expat)))
10490
10491 (define-public ruby-cane
10492 (package
10493 (name "ruby-cane")
10494 (version "3.0.0")
10495 (source (origin
10496 (method url-fetch)
10497 (uri (rubygems-uri "cane" version))
10498 (sha256
10499 (base32
10500 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10501 (build-system ruby-build-system)
10502 (arguments `(#:tests? #f)); No rakefile
10503 (home-page "https://github.com/square/cane")
10504 (propagated-inputs
10505 `(("ruby-parallel" ,ruby-parallel)))
10506 (synopsis "Code quality threshold checking")
10507 (description "Cane fails your build if code quality thresholds are not met.")
10508 (license license:asl2.0)))
10509
10510 (define-public ruby-morecane
10511 (package
10512 (name "ruby-morecane")
10513 (version "0.2.0")
10514 (source (origin
10515 (method url-fetch)
10516 (uri (rubygems-uri "morecane" version))
10517 (sha256
10518 (base32
10519 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10520 (build-system ruby-build-system)
10521 (home-page "https://github.com/yob/morecane")
10522 (arguments `(#:tests? #f)); No rakefile
10523 (propagated-inputs
10524 `(("ruby-parallel" ,ruby-parallel)))
10525 (synopsis "Extra checks for cane")
10526 (description "The cane gem provides a great framework for running quality
10527 checks over your ruby project as part of continuous integration build. It
10528 comes with a few checks out of the box, but also provides an API for loading
10529 custom checks. This gem provides a set of additional checks.")
10530 (license license:expat)))
10531
10532 (define-public ruby-pdf-reader
10533 (package
10534 (name "ruby-pdf-reader")
10535 (version "2.4.0")
10536 (source (origin
10537 (method git-fetch) ;no test in distributed gem archive
10538 (uri (git-reference
10539 (url "https://github.com/yob/pdf-reader")
10540 (commit (string-append "v" version))))
10541 (file-name (git-file-name name version))
10542 (sha256
10543 (base32
10544 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
10545 (build-system ruby-build-system)
10546 (arguments `(#:test-target "spec"
10547 #:phases (modify-phases %standard-phases
10548 (add-after 'unpack 'do-not-use-bundler
10549 (lambda _
10550 (substitute* "spec/spec_helper.rb"
10551 ((".*[Bb]undler.*") ""))
10552 #t)))))
10553 (native-inputs
10554 `(("ruby-rspec" ,ruby-rspec)
10555 ("ruby-cane" ,ruby-cane)
10556 ("ruby-morecane" ,ruby-morecane)))
10557 (propagated-inputs
10558 `(("ruby-afm" ,ruby-afm)
10559 ("ruby-ascii85" ,ruby-ascii85)
10560 ("ruby-hashery" ,ruby-hashery)
10561 ("ruby-rc4" ,ruby-rc4)
10562 ("ruby-ttfunk" ,ruby-ttfunk)))
10563 (home-page "https://github.com/yob/pdf-reader")
10564 (synopsis "PDF parser in Ruby")
10565 (description "The PDF::Reader library implements a PDF parser conforming as
10566 much as possible to the PDF specification from Adobe. It provides programmatic
10567 access to the contents of a PDF file with a high degree of flexibility.")
10568 (license license:gpl3+)))
10569
10570 (define-public ruby-pdf-inspector
10571 (let ((revision "1")
10572 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10573 (package
10574 (name "ruby-pdf-inspector")
10575 (version (git-version "1.3.0" revision commit))
10576 (source (origin
10577 (method git-fetch)
10578 (uri (git-reference
10579 (url "https://github.com/prawnpdf/pdf-inspector")
10580 (commit commit)))
10581 (file-name (git-file-name name version))
10582 (sha256
10583 (base32
10584 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10585 (build-system ruby-build-system)
10586 (arguments
10587 `(#:test-target "spec"
10588 #:phases (modify-phases %standard-phases
10589 (add-before 'build 'drop-signing-key-requirement
10590 (lambda _
10591 (substitute* "pdf-inspector.gemspec"
10592 (("spec.signing_key =.*")
10593 "spec.signing_key = nil"))
10594 #t))
10595 (replace 'check
10596 (lambda _
10597 (substitute* "pdf-inspector.gemspec"
10598 ((".*rubocop.*") "")
10599 ((".*yard.*") ""))
10600 (invoke "rspec"))))))
10601 (native-inputs
10602 `(("ruby-rspec" ,ruby-rspec)))
10603 (propagated-inputs
10604 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
10605 (home-page "https://github.com/prawnpdf/pdf-inspector")
10606 (synopsis "Analysis classes for inspecting PDF output")
10607 (description "This library provides a number of PDF::Reader based tools for
10608 use in testing PDF output. Presently, the primary purpose of this tool is to
10609 support the tests found in Prawn, a pure Ruby PDF generation library.")
10610 (license %prawn-project-licenses))))
10611
10612 (define-public ruby-pdf-core
10613 (package
10614 (name "ruby-pdf-core")
10615 (version "0.8.1")
10616 (source (origin
10617 (method url-fetch)
10618 (uri (rubygems-uri "pdf-core" version))
10619 (sha256
10620 (base32
10621 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10622 (build-system ruby-build-system)
10623 (arguments
10624 ; No test target
10625 `(#:tests? #f))
10626 (home-page "https://github.com/prawnpdf/pdf-core")
10627 (synopsis "Low level PDF features for Prawn")
10628 (description "This is an experimental gem that extracts low-level PDF
10629 functionality from Prawn.")
10630 (license license:gpl3+)))
10631
10632 (define-public ruby-prawn
10633 ;; There hasn't been a new release since 2017/03/17.
10634 (let ((revision "1")
10635 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10636 (package
10637 (name "ruby-prawn")
10638 (version (git-version "2.2.2" revision commit))
10639 (source (origin
10640 (method git-fetch)
10641 (uri (git-reference
10642 (url "https://github.com/prawnpdf/prawn")
10643 (commit commit)))
10644 (file-name (git-file-name name version))
10645 (sha256
10646 (base32
10647 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10648 (build-system ruby-build-system)
10649 (arguments
10650 `(#:phases
10651 (modify-phases %standard-phases
10652 (add-before 'build 'drop-signing-key-requirement
10653 (lambda _
10654 (substitute* "prawn.gemspec"
10655 (("spec.signing_key =.*")
10656 "spec.signing_key = nil"))
10657 #t))
10658 (replace 'check
10659 (lambda* (#:key tests? #:allow-other-keys)
10660 (when tests?
10661 ;; The Prawn manual test fails (see:
10662 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10663 ;; it.
10664 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10665 #t)))))
10666 (propagated-inputs
10667 `(("ruby-pdf-core" ,ruby-pdf-core)
10668 ("ruby-ttfunk" ,ruby-ttfunk)))
10669 (native-inputs
10670 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
10671 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10672 ("ruby-rspec" ,ruby-rspec)
10673 ("ruby-simplecov" ,ruby-simplecov)
10674 ("ruby-yard" ,ruby-yard)))
10675 (home-page "https://prawnpdf.org/api-docs/2.0/")
10676 (synopsis "PDF generation for Ruby")
10677 (description "Prawn is a pure Ruby PDF generation library.")
10678 (license %prawn-project-licenses))))
10679
10680 (define-public ruby-prawn-table
10681 (package
10682 (name "ruby-prawn-table")
10683 (version "0.2.2")
10684 (source (origin
10685 (method url-fetch)
10686 (uri (rubygems-uri "prawn-table" version))
10687 (sha256
10688 (base32
10689 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10690 (build-system ruby-build-system)
10691 (propagated-inputs
10692 `(("ruby-prawn" ,ruby-prawn)
10693 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
10694 (native-inputs
10695 `(("bundler" ,bundler)
10696 ("ruby-yard" ,ruby-yard)
10697 ("ruby-mocha" ,ruby-mocha)
10698 ("ruby-coderay" ,ruby-coderay)
10699 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10700 ("ruby-simplecov" ,ruby-simplecov)
10701 ("ruby-rspec-2" ,ruby-rspec-2)))
10702 (arguments
10703 '(;; TODO: 1 test fails
10704 ;; Failure/Error: pdf.page_count.should == 1
10705 ;; expected: 1
10706 ;; got: 2 (using ==)
10707 ;; # ./spec/table_spec.rb:1308
10708 ;;
10709 ;; 225 examples, 1 failure
10710 #:tests? #f
10711 #:phases
10712 (modify-phases %standard-phases
10713 (add-before 'check 'patch-gemspec
10714 (lambda _
10715 (substitute* "prawn-table.gemspec"
10716 ;; Loosen the requirement for pdf-inspector
10717 (("~> 1\\.1\\.0") ">= 0")
10718 ;; Loosen the requirement for pdf-reader
10719 (("~> 1\\.2") ">= 0"))))
10720 (replace 'check
10721 (lambda* (#:key tests? #:allow-other-keys)
10722 (when tests?
10723 (invoke "rspec"))
10724 #t)))))
10725 (home-page "https://github.com/prawnpdf/prawn-table")
10726 (synopsis "Tables support for Prawn")
10727 (description "This gem provides tables support for Prawn.")
10728 (license license:gpl3+)))
10729
10730 (define-public ruby-kramdown
10731 (package
10732 (name "ruby-kramdown")
10733 (version "2.3.0")
10734 (source (origin
10735 (method url-fetch)
10736 (uri (rubygems-uri "kramdown" version))
10737 (sha256
10738 (base32
10739 "1vmw752c26ny2jwl0npn0gbyqwgz4hdmlpxnsld9qi9xhk5b1qh7"))))
10740 (build-system ruby-build-system)
10741 (arguments `(#:tests? #f)); FIXME: some test failures
10742 (native-inputs
10743 `(("ruby-prawn" ,ruby-prawn)
10744 ("ruby-prawn-table" ,ruby-prawn-table)))
10745 (home-page "https://kramdown.gettalong.org/")
10746 (synopsis "Markdown parsing and converting library")
10747 (description "Kramdown is a library for parsing and converting a superset
10748 of Markdown. It is completely written in Ruby, supports standard Markdown
10749 (with some minor modifications) and various extensions that have been made
10750 popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10751 (license license:expat)))
10752
10753 (define-public ruby-kramdown-parser-gfm
10754 (package
10755 (name "ruby-kramdown-parser-gfm")
10756 (version "1.1.0")
10757 (source
10758 (origin
10759 (method url-fetch)
10760 (uri (rubygems-uri "kramdown-parser-gfm" version))
10761 (sha256
10762 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
10763 (build-system ruby-build-system)
10764 (arguments
10765 `(#:tests? #f)) ;no rakefile
10766 (propagated-inputs
10767 `(("ruby-kramdown" ,ruby-kramdown)))
10768 (synopsis "Kramdown parser for the GFM dialect of Markdown")
10769 (description
10770 "This is a parser for kramdown that converts Markdown documents in the
10771 GFM dialect to HTML.")
10772 (home-page "https://github.com/kramdown/parser-gfm")
10773 (license license:expat)))
10774
10775 (define-public ruby-http-parser.rb
10776 (package
10777 (name "ruby-http-parser.rb")
10778 (version "0.6.0")
10779 (source
10780 (origin
10781 (method url-fetch)
10782 (uri (rubygems-uri "http_parser.rb" version))
10783 (sha256
10784 (base32
10785 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10786 (build-system ruby-build-system)
10787 (arguments
10788 ;; No tests
10789 `(#:tests? #f))
10790 (native-inputs
10791 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10792 ("ruby-rspec" ,ruby-rspec)))
10793 (home-page "https://github.com/tmm1/http_parser.rb")
10794 (synopsis "HTTP parser un Ruby")
10795 (description "This gem is a simple callback-based HTTP request/response
10796 parser for writing http servers, clients and proxies.")
10797 (license license:expat)))
10798
10799 (define-public ruby-em-websocket
10800 (package
10801 (name "ruby-em-websocket")
10802 (version "0.5.1")
10803 (source
10804 (origin
10805 (method url-fetch)
10806 (uri (rubygems-uri "em-websocket" version))
10807 (sha256
10808 (base32
10809 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10810 (build-system ruby-build-system)
10811 (arguments
10812 ;; No tests
10813 `(#:tests? #f))
10814 (propagated-inputs
10815 `(("ruby-eventmachine" ,ruby-eventmachine)
10816 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10817 (native-inputs
10818 `(("bundler" ,bundler)
10819 ("ruby-rspec" ,ruby-rspec)))
10820 (home-page "https://github.com/igrigorik/em-websocket")
10821 (synopsis "EventMachine based WebSocket server")
10822 (description "Em-websocket is an EventMachine based WebSocket server
10823 implementation.")
10824 (license license:expat)))
10825
10826 (define-public ruby-rouge
10827 (package
10828 (name "ruby-rouge")
10829 (version "3.21.0")
10830 (source (origin
10831 (method url-fetch)
10832 (uri (rubygems-uri "rouge" version))
10833 (sha256
10834 (base32
10835 "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
10836 (build-system ruby-build-system)
10837 (arguments `(#:tests? #f)); No rakefile
10838 (home-page "http://rouge.jneen.net/")
10839 (synopsis "Code highlighter")
10840 (description "Rouge is a code highlighter written in Ruby. It supports more
10841 than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10842 is compatible with stylesheets designed for pygments.")
10843 (license (list
10844 ;; rouge is licensed under expat
10845 license:expat
10846 ;; pygments is licensed under bsd-2
10847 license:bsd-2))))
10848
10849 (define-public ruby-rouge-2
10850 (package
10851 (inherit ruby-rouge)
10852 (version "2.2.1")
10853 (source (origin
10854 (method url-fetch)
10855 (uri (rubygems-uri "rouge" version))
10856 (sha256
10857 (base32
10858 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
10859
10860 (define-public ruby-hashie
10861 (package
10862 (name "ruby-hashie")
10863 (version "3.6.0")
10864 (source (origin
10865 (method url-fetch)
10866 (uri (rubygems-uri "hashie" version))
10867 (sha256
10868 (base32
10869 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10870 (build-system ruby-build-system)
10871 (native-inputs
10872 `(("bundler" ,bundler)))
10873 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10874 (home-page "https://github.com/intridea/hashie")
10875 (synopsis "Extensions to Ruby Hashes")
10876 (description "Hashie is a collection of classes and mixins that make Ruby
10877 hashes more powerful.")
10878 (license license:expat)))
10879
10880 (define-public ruby-heredoc-unindent
10881 (package
10882 (name "ruby-heredoc-unindent")
10883 (version "1.2.0")
10884 (source (origin
10885 (method url-fetch)
10886 (uri (rubygems-uri "heredoc_unindent" version))
10887 (sha256
10888 (base32
10889 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
10890 (build-system ruby-build-system)
10891 (native-inputs
10892 `(("ruby-hoe" ,ruby-hoe)))
10893 (home-page "https://github.com/adrianomitre/heredoc_unindent")
10894 (synopsis "Heredoc indentation cleaner")
10895 (description "This gem removes common margin from indented strings, such
10896 as the ones produced by indented heredocs. In other words, it strips out
10897 leading whitespace chars at the beginning of each line, but only as much as
10898 the line with the smallest margin.
10899
10900 It is acknowledged that many strings defined by heredocs are just code and
10901 fact is that most parsers are insensitive to indentation. If, however, the
10902 strings are to be used otherwise, be it for printing or testing, the extra
10903 indentation will probably be an issue and hence this gem.")
10904 (license license:expat)))
10905
10906 (define-public ruby-safe-yaml
10907 (package
10908 (name "ruby-safe-yaml")
10909 (version "1.0.5")
10910 (source
10911 (origin
10912 (method git-fetch)
10913 (uri (git-reference
10914 (url "https://github.com/dtao/safe_yaml")
10915 (commit version)))
10916 (file-name (git-file-name name version))
10917 (sha256
10918 (base32
10919 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
10920 (build-system ruby-build-system)
10921 (native-inputs
10922 `(("ruby-rspec" ,ruby-rspec)
10923 ("ruby-hashie" ,ruby-hashie)
10924 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
10925 (arguments
10926 '(#:test-target "spec"
10927 #:phases
10928 (modify-phases %standard-phases
10929 (add-before 'check 'set-TZ
10930 (lambda _
10931 ;; This test is dependent on the timezone
10932 ;; spec/transform/to_date_spec.rb:35
10933 ;; # SafeYAML::Transform::ToDate converts times to the local
10934 ;; timezone
10935 (setenv "TZ" "UTC-11")
10936 #t)))))
10937 (home-page "https://github.com/dtao/safe_yaml")
10938 (synopsis "YAML parser")
10939 (description "The SafeYAML gem provides an alternative implementation of
10940 YAML.load suitable for accepting user input in Ruby applications.")
10941 (license license:expat)))
10942
10943 (define-public ruby-mercenary
10944 (package
10945 (name "ruby-mercenary")
10946 (version "0.3.6")
10947 (source (origin
10948 (method url-fetch)
10949 (uri (rubygems-uri "mercenary" version))
10950 (sha256
10951 (base32
10952 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
10953 (build-system ruby-build-system)
10954 (arguments `(#:test-target "spec"))
10955 (native-inputs
10956 `(("bundler" ,bundler)))
10957 (home-page "https://github.com/jekyll/mercenary")
10958 (synopsis "Command-line apps library in Ruby")
10959 (description "Mercenary is a lightweight and flexible library for writing
10960 command-line apps in Ruby.")
10961 (license license:expat)))
10962
10963 (define-public ruby-liquid
10964 (package
10965 (name "ruby-liquid")
10966 (version "4.0.0")
10967 (source (origin
10968 (method url-fetch)
10969 (uri (rubygems-uri "liquid" version))
10970 (sha256
10971 (base32
10972 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
10973 (build-system ruby-build-system)
10974 (arguments `(#:tests? #f)); No rakefile
10975 (home-page "https://shopify.github.io/liquid/")
10976 (synopsis "Template language")
10977 (description "Liquid is a template language written in Ruby. It is used
10978 to load dynamic content on storefronts.")
10979 (license license:expat)))
10980
10981 (define-public ruby-forwardable-extended
10982 (package
10983 (name "ruby-forwardable-extended")
10984 (version "2.6.0")
10985 (source (origin
10986 (method url-fetch)
10987 (uri (rubygems-uri "forwardable-extended" version))
10988 (sha256
10989 (base32
10990 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
10991 (build-system ruby-build-system)
10992 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
10993 (home-page "https://github.com/envygeeks/forwardable-extended")
10994 (synopsis "Delegation to hashes and instance variables in Forwardable")
10995 (description "Forwardable Extended provides more @code{Forwardable}
10996 methods for your source as @code{Forwardable::Extended}.")
10997 (license license:expat)))
10998
10999 (define-public ruby-pathutil
11000 (package
11001 (name "ruby-pathutil")
11002 (version "0.16.2")
11003 (source (origin
11004 (method url-fetch)
11005 (uri (rubygems-uri "pathutil" version))
11006 (sha256
11007 (base32
11008 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
11009 (build-system ruby-build-system)
11010 (propagated-inputs
11011 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
11012 (native-inputs
11013 `(("bundler" ,bundler)
11014 ("ruby-rspec" ,ruby-rspec)))
11015 ;; Fails with: cannot load such file --
11016 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
11017 (arguments `(#:tests? #f))
11018 (home-page "https://github.com/envygeeks/pathutil")
11019 (synopsis "Extended implementation of Pathname")
11020 (description "Pathutil tries to be a faster pure Ruby implementation of
11021 Pathname.")
11022 (license license:expat)))
11023
11024 (define-public jekyll
11025 (package
11026 (name "jekyll")
11027 (version "3.8.6")
11028 (source (origin
11029 (method url-fetch)
11030 (uri (rubygems-uri "jekyll" version))
11031 (sha256
11032 (base32
11033 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
11034 (build-system ruby-build-system)
11035 (arguments
11036 ;; No rakefile, but a test subdirectory.
11037 `(#:tests? #f
11038 #:phases
11039 (modify-phases %standard-phases
11040 (add-before 'build 'fix-i18n
11041 (lambda _
11042 (substitute* ".gemspec"
11043 (("~> 0.7") ">= 0.7")
11044 (("~> 1.14") ">= 1.14"))
11045 #t)))))
11046 (propagated-inputs
11047 `(("ruby-addressable" ,ruby-addressable)
11048 ("ruby-colorator" ,ruby-colorator)
11049 ("ruby-em-websocket" ,ruby-em-websocket)
11050 ("ruby-i18n" ,ruby-i18n)
11051 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
11052 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
11053 ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
11054 ("ruby-liquid" ,ruby-liquid)
11055 ("ruby-mercenary" ,ruby-mercenary)
11056 ("ruby-pathutil" ,ruby-pathutil)
11057 ("ruby-rouge" ,ruby-rouge-2)
11058 ("ruby-safe-yaml" ,ruby-safe-yaml)))
11059 (home-page "https://jekyllrb.com/")
11060 (synopsis "Static site generator")
11061 (description "Jekyll is a simple, blog aware, static site generator.")
11062 (license license:expat)))
11063
11064 (define-public ruby-jekyll-paginate-v2
11065 (package
11066 (name "ruby-jekyll-paginate-v2")
11067 (version "3.0.0")
11068 (source (origin
11069 (method url-fetch)
11070 (uri (rubygems-uri "jekyll-paginate-v2" version))
11071 (sha256
11072 (base32
11073 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
11074 (build-system ruby-build-system)
11075 (propagated-inputs
11076 `(("jekyll" ,jekyll)))
11077 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
11078 (synopsis "Pagination Generator for Jekyll 3")
11079 (description "The Pagination Generator forms the core of the pagination
11080 logic in Jekyll. It calculates and generates the pagination pages.")
11081 (license license:expat)))
11082
11083 (define-public ruby-faraday
11084 (package
11085 (name "ruby-faraday")
11086 (version "0.15.4")
11087 (source
11088 (origin
11089 (method url-fetch)
11090 (uri (rubygems-uri "faraday" version))
11091 (sha256
11092 (base32
11093 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
11094 (build-system ruby-build-system)
11095 (arguments
11096 '(#:tests? #f))
11097 (propagated-inputs
11098 `(("ruby-multipart-post" ,ruby-multipart-post)))
11099 (synopsis "Ruby HTTP/REST API client library")
11100 (description
11101 "Faraday is a HTTP/REST API client library which provides a common
11102 interface over different adapters.")
11103 (home-page "https://github.com/lostisland/faraday")
11104 (license license:expat)))
11105
11106 (define-public ruby-nio4r
11107 (package
11108 (name "ruby-nio4r")
11109 (version "2.5.2")
11110 (source
11111 (origin
11112 (method url-fetch)
11113 (uri (rubygems-uri "nio4r" version))
11114 (sha256
11115 (base32
11116 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
11117 (build-system ruby-build-system)
11118 (arguments
11119 '(#:phases
11120 (modify-phases %standard-phases
11121 (add-after 'unpack 'remove-unnecessary-dependencies
11122 (lambda _
11123 (substitute* "spec/spec_helper.rb"
11124 ;; Coveralls is for uploading test coverage information to an
11125 ;; online service, and thus unnecessary for building the Guix
11126 ;; package
11127 (("require \"coveralls\"") "")
11128 (("Coveralls\\.wear!") "")
11129 ;; Remove rspec/retry as we are not retrying the tests
11130 (("require \"rspec/retry\"") "")
11131 (("config\\.display_try_failure_messages = true") "")
11132 (("config\\.verbose_retry = true") ""))
11133 #t))
11134 (add-before 'check 'compile
11135 (lambda _
11136 (invoke "rake" "compile")
11137 #t))
11138 (replace 'check
11139 (lambda* (#:key tests? #:allow-other-keys)
11140 (when tests?
11141 (invoke "rspec"))
11142 #t)))))
11143 (native-inputs
11144 `(("bundler" ,bundler)
11145 ("ruby-rake-compiler" ,ruby-rake-compiler)
11146 ("ruby-rspec" ,ruby-rspec)
11147 ("ruby-rubocop" ,ruby-rubocop)))
11148 (synopsis "New I/O for Ruby")
11149 (description
11150 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
11151 for scalable network clients and servers.")
11152 (home-page "https://github.com/socketry/nio4r")
11153 (license license:expat)))
11154
11155 (define-public ruby-globalid
11156 (package
11157 (name "ruby-globalid")
11158 (version "0.4.2")
11159 (source
11160 (origin
11161 (method url-fetch)
11162 (uri (rubygems-uri "globalid" version))
11163 (sha256
11164 (base32
11165 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
11166 (build-system ruby-build-system)
11167 (arguments
11168 '(;; No included tests
11169 #:tests? #f))
11170 (propagated-inputs
11171 `(("ruby-activesupport" ,ruby-activesupport)))
11172 (synopsis "Generate URIs idenfitying model instances in Ruby")
11173 (description
11174 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
11175 uniquely identify it.")
11176 (home-page "https://rubyonrails.org/")
11177 (license license:expat)))
11178
11179 (define-public ruby-sprockets
11180 (package
11181 (name "ruby-sprockets")
11182 (version "3.7.2")
11183 (source
11184 (origin
11185 (method url-fetch)
11186 (uri (rubygems-uri "sprockets" version))
11187 (sha256
11188 (base32
11189 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
11190 (build-system ruby-build-system)
11191 (arguments
11192 '(;; No included tests
11193 #:tests? #f))
11194 (propagated-inputs
11195 `(("ruby-concurrent" ,ruby-concurrent)
11196 ("ruby-rack" ,ruby-rack)))
11197 (synopsis "Sprockets is a Rack-based asset packaging system")
11198 (description
11199 "Sprockets is a Rack-based asset packaging system that concatenates and
11200 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
11201 (home-page "https://github.com/rails/sprockets")
11202 (license license:expat)))
11203
11204 (define-public ruby-mustache
11205 (package
11206 (name "ruby-mustache")
11207 (version "1.1.1")
11208 (source
11209 (origin
11210 (method url-fetch)
11211 (uri (rubygems-uri "mustache" version))
11212 (sha256
11213 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
11214 (build-system ruby-build-system)
11215 (native-inputs
11216 `(("ruby-simplecov" ,ruby-simplecov)))
11217 (synopsis "framework-agnostic way to render logic-free views")
11218 (description
11219 "Mustache is a framework-agnostic way to render logic-free views.
11220 Think of Mustache as a replacement for your views. Instead of views
11221 consisting of ERB or HAML with random helpers and arbitrary logic,
11222 your views are broken into two parts: a Ruby class and an HTML
11223 template.")
11224 (home-page "https://github.com/mustache/mustache")
11225 (license license:expat)))
11226
11227 (define-public ruby-mustermann
11228 (package
11229 (name "ruby-mustermann")
11230 (version "1.0.3")
11231 (source
11232 (origin
11233 (method url-fetch)
11234 (uri (rubygems-uri "mustermann" version))
11235 (sha256
11236 (base32
11237 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
11238 (build-system ruby-build-system)
11239 (arguments
11240 ;; No tests.
11241 '(#:tests? #f))
11242 (synopsis "Library implementing patterns that behave like regular expressions")
11243 (description "Given a string pattern, Mustermann will turn it into an
11244 object that behaves like a regular expression and has comparable performance
11245 characteristics.")
11246 (home-page "https://github.com/sinatra/mustermann")
11247 (license license:expat)))
11248
11249 (define-public ruby-htmlentities
11250 (package
11251 (name "ruby-htmlentities")
11252 (version "4.3.4")
11253 (source
11254 (origin
11255 (method url-fetch)
11256 (uri (rubygems-uri "htmlentities" version))
11257 (sha256
11258 (base32
11259 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
11260 (build-system ruby-build-system)
11261 (arguments
11262 `(#:phases
11263 (modify-phases %standard-phases
11264 (replace 'check
11265 (lambda _
11266 (map (lambda (file)
11267 (invoke "ruby" "-Itest" file))
11268 (find-files "./test" ".*_test\\.rb")))))))
11269 (synopsis "Encode and decode (X)HTML entities")
11270 (description
11271 "This package provides a module for encoding and decoding (X)HTML
11272 entities.")
11273 (home-page "https://github.com/threedaymonk/htmlentities")
11274 (license license:expat)))
11275
11276 (define-public ruby-sinatra
11277 (package
11278 (name "ruby-sinatra")
11279 (version "2.0.8.1")
11280 (source
11281 (origin
11282 (method url-fetch)
11283 (uri (rubygems-uri "sinatra" version))
11284 (sha256
11285 (base32
11286 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
11287 (build-system ruby-build-system)
11288 (arguments
11289 `(#:phases
11290 (modify-phases %standard-phases
11291 ;; See: https://github.com/sinatra/sinatra/issues/1578.
11292 (add-after 'extract-gemspec 'fix-slow-doc-generation
11293 (lambda _
11294 (substitute* "sinatra.gemspec"
11295 (("\"README.rdoc\"\\.freeze," all)
11296 (string-append all " \"--exclude=.*\\.md\".freeze,")))
11297 #t)))))
11298 (propagated-inputs
11299 `(("ruby-mustermann" ,ruby-mustermann)
11300 ("ruby-rack" ,ruby-rack)
11301 ("ruby-rack-protection" ,ruby-rack-protection)
11302 ("ruby-tilt" ,ruby-tilt)))
11303 (synopsis "DSL for quick web applications creation in Ruby")
11304 (description
11305 "Sinatra is a DSL for quickly creating web applications in Ruby with
11306 minimal effort.")
11307 (home-page "http://sinatrarb.com/")
11308 (license license:expat)))
11309
11310 (define-public ruby-thin
11311 (package
11312 (name "ruby-thin")
11313 (version "1.7.2")
11314 (source
11315 (origin
11316 (method url-fetch)
11317 (uri (rubygems-uri "thin" version))
11318 (sha256
11319 (base32
11320 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
11321 (build-system ruby-build-system)
11322 (arguments
11323 ;; No tests.
11324 '(#:tests? #f))
11325 (propagated-inputs
11326 `(("ruby-daemons" ,ruby-daemons)
11327 ("ruby-eventmachine" ,ruby-eventmachine)
11328 ("ruby-rack" ,ruby-rack)))
11329 (synopsis "Thin and fast web server for Ruby")
11330 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
11331 @itemize
11332 @item the Mongrel parser,
11333 @item Event Machine, a network I/O library with high scalability, performance
11334 and stability,
11335 @item Rack, a minimal interface between webservers and Ruby frameworks.
11336 @end itemize\n")
11337 (home-page "https://github.com/macournoyer/thin")
11338 (license license:ruby)))
11339
11340 (define-public ruby-skinny
11341 (package
11342 (name "ruby-skinny")
11343 (version "0.2.4")
11344 (source
11345 (origin
11346 (method url-fetch)
11347 (uri (rubygems-uri "skinny" version))
11348 (sha256
11349 (base32
11350 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
11351 (build-system ruby-build-system)
11352 (arguments
11353 '(#:tests? #f ; No included tests
11354 #:phases
11355 (modify-phases %standard-phases
11356 (add-before 'build 'patch-gemspec
11357 (lambda _
11358 (substitute* ".gemspec"
11359 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
11360 "<eventmachine>, [\">= 1.0.0\"")
11361 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
11362 #t)))))
11363 (propagated-inputs
11364 `(("ruby-eventmachine" ,ruby-eventmachine)
11365 ("ruby-thin" ,ruby-thin)))
11366 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
11367 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
11368 the Thin library.")
11369 (home-page "https://github.com/sj26/skinny")
11370 (license license:expat)))
11371
11372 (define-public ruby-sys-filesystem
11373 (package
11374 (name "ruby-sys-filesystem")
11375 (version "1.3.4")
11376 (source (origin
11377 (method url-fetch)
11378 (uri (rubygems-uri "sys-filesystem" version))
11379 (sha256
11380 (base32
11381 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
11382 (build-system ruby-build-system)
11383 (arguments
11384 '(#:phases (modify-phases %standard-phases
11385 (add-before 'check 'set-HOME
11386 (lambda _
11387 ;; Some tests attempt to stat $HOME. Let them.
11388 (setenv "HOME" "/tmp")
11389 #t)))))
11390 (propagated-inputs
11391 `(("ruby-ffi" ,ruby-ffi)))
11392 (native-inputs
11393 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
11394 (synopsis "Gather file system information")
11395 (description
11396 "The @code{sys-filesystem} library provides a cross-platform interface
11397 for gathering file system information, such as disk space and mount points.")
11398 (home-page "https://github.com/djberg96/sys-filesystem")
11399 (license license:asl2.0)))
11400
11401 (define-public mailcatcher
11402 (package
11403 (name "mailcatcher")
11404 (version "0.7.1")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (rubygems-uri "mailcatcher" version))
11409 (sha256
11410 (base32
11411 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
11412 (build-system ruby-build-system)
11413 (arguments
11414 ;; Tests require web/assets which is not included in the output. We
11415 ;; might be able to fix this by adding the Git repository to the GEM_PATH
11416 ;; of the tests. See ruby-mysql2.
11417 '(#:tests? #f
11418 #:phases
11419 (modify-phases %standard-phases
11420 (add-before 'build 'patch-gemspec
11421 (lambda _
11422 (substitute* ".gemspec"
11423 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11424 "<eventmachine>, [\">= 1.0.9.1")
11425 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11426 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11427 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11428 #t))
11429 (add-before 'build 'loosen-dependency-contraint
11430 (lambda _
11431 (substitute* "lib/mail_catcher.rb"
11432 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11433 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11434 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11435 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11436 #t)))))
11437 (inputs
11438 `(("ruby-eventmachine" ,ruby-eventmachine)
11439 ("ruby-mail" ,ruby-mail)
11440 ("ruby-rack" ,ruby-rack)
11441 ("ruby-sinatra" ,ruby-sinatra)
11442 ("ruby-skinny" ,ruby-skinny)
11443 ("ruby-sqlite3" ,ruby-sqlite3)
11444 ("ruby-thin" ,ruby-thin)))
11445 (synopsis "SMTP server which catches messages to display them a browser")
11446 (description
11447 "MailCatcher runs a super simple SMTP server which catches any message
11448 sent to it to display in a web interface. Run mailcatcher, set your favourite
11449 app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11450 then check out http://127.0.0.1:1080 to see the mail.")
11451 (home-page "https://mailcatcher.me")
11452 (license license:expat)))
11453
11454 (define-public ruby-backport
11455 (package
11456 (name "ruby-backport")
11457 (version "1.1.2")
11458 (source
11459 (origin
11460 ;; The gem does not include test code, so fetch from the Git repository.
11461 (method git-fetch)
11462 (uri (git-reference
11463 (url "https://github.com/castwide/backport")
11464 (commit (string-append "v" version))))
11465 (file-name (git-file-name name version))
11466 (sha256
11467 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
11468 (build-system ruby-build-system)
11469 (arguments
11470 `(#:test-target "spec"))
11471 (native-inputs
11472 `(("bundler" ,bundler)
11473 ("ruby-rspec" ,ruby-rspec)))
11474 (inputs
11475 `(("ruby-simplecov" ,ruby-simplecov)))
11476 (synopsis "Pure Ruby library for event-driven IO")
11477 (description
11478 "This package provides a pure Ruby library for event-driven IO.")
11479 (home-page "https://github.com/castwide/backport")
11480 (license license:expat)))
11481
11482 (define-public ruby-json-schema
11483 (package
11484 (name "ruby-json-schema")
11485 (version "2.8.1")
11486 (source
11487 (origin
11488 (method url-fetch)
11489 (uri (rubygems-uri "json-schema" version))
11490 (sha256
11491 (base32
11492 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11493 (build-system ruby-build-system)
11494 (arguments
11495 `(#:tests? #f ; no tests
11496 #:phases
11497 (modify-phases %standard-phases
11498 (replace 'build
11499 (lambda _
11500 (invoke "gem" "build" ".gemspec"))))))
11501 (propagated-inputs
11502 `(("ruby-addressable" ,ruby-addressable)))
11503 (synopsis "Ruby JSON Schema Validator")
11504 (description "This library provides Ruby with an interface for validating
11505 JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11506 support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11507 is also included.")
11508 (home-page "https://github.com/ruby-json-schema/json-schema")
11509 (license license:expat)))
11510
11511 (define-public swagger-diff
11512 (package
11513 (name "swagger-diff")
11514 (version "1.1.2")
11515 (source
11516 (origin
11517 (method url-fetch)
11518 (uri (rubygems-uri "swagger-diff" version))
11519 (sha256
11520 (base32
11521 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11522 (build-system ruby-build-system)
11523 (arguments
11524 `(#:test-target "spec"
11525 #:phases
11526 (modify-phases %standard-phases
11527 ;; Don't run or require rubocop, the code linting tool, as this is a
11528 ;; bit unnecessary.
11529 (add-after 'unpack 'dont-run-rubocop
11530 (lambda _
11531 (substitute* "Rakefile"
11532 ((".*rubocop.*") "")
11533 ((".*RuboCop.*") ""))
11534 #t)))))
11535 (propagated-inputs
11536 `(("ruby-json-schema" ,ruby-json-schema)))
11537 (native-inputs
11538 `(("bundler" ,bundler)
11539 ("ruby-rspec-core" ,ruby-rspec-core)
11540 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
11541 (synopsis
11542 "Compare Open API Initiative specification files")
11543 (description
11544 "Swagger::Diff is a utility for comparing two different Open API
11545 Initiative (OAI) specifications (formerly known as Swagger specifications).
11546 It is intended to determine whether a newer API specification is
11547 backwards-compatible with an older API specification.")
11548 (home-page "https://github.com/civisanalytics/swagger-diff")
11549 (license license:bsd-3)))
11550
11551 (define-public ruby-reverse-markdown
11552 (package
11553 (name "ruby-reverse-markdown")
11554 (version "1.1.0")
11555 (source
11556 (origin
11557 (method url-fetch)
11558 (uri (rubygems-uri "reverse_markdown" version))
11559 (sha256
11560 (base32
11561 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11562 (build-system ruby-build-system)
11563 (propagated-inputs
11564 `(("ruby-nokogiri" ,ruby-nokogiri)))
11565 (native-inputs
11566 `(("bundler" ,bundler)
11567 ("ruby-rspec" ,ruby-rspec)
11568 ("ruby-kramdown" ,ruby-kramdown)
11569 ("ruby-simplecov" ,ruby-simplecov)))
11570 (arguments
11571 `(#:phases
11572 (modify-phases %standard-phases
11573 (replace 'check
11574 (lambda* (#:key tests? #:allow-other-keys)
11575 (when tests?
11576 (invoke "rspec"))
11577 #t)))))
11578 (synopsis "Convert HTML into Markdown")
11579 (description
11580 "This Ruby module allows you to map simple HTML back into
11581 Markdown---e.g., if you want to import existing HTML data in your
11582 application.")
11583 (home-page "https://github.com/xijo/reverse_markdown")
11584 (license license:wtfpl2)))
11585
11586 (define-public ruby-solargraph
11587 (package
11588 (name "ruby-solargraph")
11589 (version "0.36.0")
11590 (source
11591 (origin
11592 (method url-fetch)
11593 (uri (rubygems-uri "solargraph" version))
11594 (sha256
11595 (base32
11596 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
11597 (build-system ruby-build-system)
11598 (propagated-inputs
11599 `(("ruby-backport" ,ruby-backport)
11600 ("bundler" ,bundler)
11601 ("ruby-htmlentities" ,ruby-htmlentities)
11602 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
11603 ("ruby-maruku" ,ruby-maruku)
11604 ("ruby-nokogiri" ,ruby-nokogiri)
11605 ("ruby-parser" ,ruby-parser)
11606 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
11607 ("ruby-rubocop" ,ruby-rubocop)
11608 ("ruby-thor" ,ruby-thor)
11609 ("ruby-tilt" ,ruby-tilt)
11610 ("ruby-yard" ,ruby-yard)))
11611 (native-inputs
11612 `(("ruby-rspec" ,ruby-rspec)
11613 ("ruby-pry" ,ruby-pry)
11614 ("ruby-simplecov" ,ruby-simplecov)
11615 ("ruby-webmock" ,ruby-webmock-2)))
11616 ;; FIXME: can't figure out how to run the tests properly:
11617
11618 ;; An error occurred while loading spec_helper.
11619 ;; Failure/Error: return gem_original_require(path)
11620 ;; LoadError:
11621 ;; cannot load such file -- spec_helper
11622 (arguments
11623 '(#:tests? #f
11624 #:phases
11625 (modify-phases %standard-phases
11626 (replace 'check
11627 (lambda* (#:key tests? #:allow-other-keys)
11628 (when tests?
11629 (invoke "rspec"))
11630 #t)))))
11631 (synopsis
11632 "IDE tools for code completion, inline documentation, and static analysis")
11633 (description
11634 "Solargraph provides a comprehensive suite of tools for Ruby
11635 programming: intellisense, diagnostics, inline documentation, and type
11636 checking.")
11637 (home-page "https://solargraph.org/")
11638 (license license:expat)))
11639
11640 (define-public ruby-wayback-machine-downloader
11641 (package
11642 (name "ruby-wayback-machine-downloader")
11643 (version "2.2.1")
11644 (source
11645 (origin
11646 (method url-fetch)
11647 (uri (rubygems-uri
11648 "wayback_machine_downloader"
11649 version))
11650 (sha256
11651 (base32
11652 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11653 (build-system ruby-build-system)
11654 (arguments
11655 '(#:tests? #f)) ; no tests
11656 (synopsis "Download archived websites from the Wayback Machine")
11657 (description
11658 "Wayback Machine Downloader is a command line tool for downloading
11659 websites from the Internet Archive's Wayback Machine (archive.org).
11660 It allows fine grained control over what to download by specifying
11661 which snapshots to consider and what files to include.")
11662 (home-page
11663 "https://github.com/hartator/wayback-machine-downloader")
11664 (license license:expat)))
11665
11666 (define-public ruby-wwtd
11667 (package
11668 (name "ruby-wwtd")
11669 (version "1.4.1")
11670 (home-page "https://github.com/grosser/wwtd")
11671 (source (origin
11672 (method git-fetch)
11673 (uri (git-reference
11674 (url home-page)
11675 (commit (string-append "v" version))))
11676 (file-name (git-file-name name version))
11677 (sha256
11678 (base32
11679 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11680 (modules '((guix build utils)))
11681 (snippet
11682 '(begin
11683 ;; Remove bundled library.
11684 (delete-file "spec/rake-12.3.0.gem")
11685 #t))))
11686 (build-system ruby-build-system)
11687 (arguments
11688 '(;; XXX: Tests need multiple versions of ruby, wants to run
11689 ;; `bundle install`, etc.
11690 #:tests? #f
11691 #:phases (modify-phases %standard-phases
11692 (replace 'replace-git-ls-files
11693 (lambda _
11694 (substitute* "wwtd.gemspec"
11695 (("git ls-files lib/ bin/`")
11696 "find lib/ bin/ -type f |sort`"))
11697 #t))
11698 (add-before 'check 'remove-version-constraints
11699 (lambda _
11700 (delete-file "Gemfile.lock")
11701 #t))
11702 (replace 'check
11703 (lambda* (#:key tests? #:allow-other-keys)
11704 (if tests?
11705 (invoke "rspec" "spec/")
11706 (format #t "test suite not run~%"))
11707 #t)))))
11708 (native-inputs
11709 `(("ruby-bump" ,ruby-bump)
11710 ("ruby-rspec" ,ruby-rspec)))
11711 (synopsis "Run @file{.travis.yml} files locally")
11712 (description
11713 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
11714 defined in @file{.travis.yml} on your local machine, using @code{rvm},
11715 @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
11716 (license license:expat)))