gnu: calibre: Wrap QTWEBENGINEPROCESS_PATH.
[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.1")
151 (source
152 (origin
153 (method url-fetch)
154 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
155 (version-major+minor version)
156 "/ruby-" version ".tar.gz"))
157 (sha256
158 (base32
159 "0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
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, expressable 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 "ghc-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 `(("ghc-pandoc" ,ghc-pandoc)))
1139 (synopsis "Ruby wrapper for Pandoc")
1140 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1141 command line tools for converting one markup format to another. Pandoc can
1142 convert documents from a variety of formats including markdown,
1143 reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1144 variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1145 ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1146 markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1147 more.")
1148 (home-page "https://github.com/xwmx/pandoc-ruby")
1149 (license license:expat)))
1150
1151 (define-public ruby-slim
1152 (package
1153 (name "ruby-slim")
1154 (version "4.1.0")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (rubygems-uri "slim" version))
1159 (sha256
1160 (base32
1161 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1162 (build-system ruby-build-system)
1163 (arguments
1164 `(#:phases
1165 (modify-phases %standard-phases
1166 ;; See: https://github.com/slim-template/slim/issues/857 and
1167 ;; https://github.com/slim-template/slim/issues/858.
1168 (add-after 'unpack 'skip-broken-tests
1169 (lambda _
1170 (substitute* "test/core/test_embedded_engines.rb"
1171 (("def test_render_with_markdown")
1172 "def skipped_test_render_with_markdown"))
1173 (substitute* "test/translator/test_translator.rb"
1174 (("raise (\"Missing test for.*)" _ tail)
1175 (string-append "print " tail)))
1176 #t))
1177 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1178 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1179 (add-after 'unpack 'prevent-bundler-interference
1180 (lambda _
1181 (substitute* "Rakefile"
1182 (("require 'bundler/setup'") "nil")
1183 (("Bundler::GemHelper\\.install_tasks") "nil"))
1184 #t)))))
1185 (native-inputs
1186 `(("ruby-rack-test" ,ruby-rack-test)
1187 ("ruby-sinatra" ,ruby-sinatra)))
1188 (propagated-inputs
1189 `(("ruby-temple" ,ruby-temple)
1190 ("ruby-tilt" ,ruby-tilt)))
1191 (synopsis "Minimalist template language for Ruby")
1192 (description "Slim is a template language for Ruby that aims to reduce the
1193 syntax to the minimum while remaining clear.")
1194 (home-page "http://slim-lang.com/")
1195 (license license:expat)))
1196
1197 (define-public ruby-asciidoctor
1198 (package
1199 (name "ruby-asciidoctor")
1200 (version "2.0.10")
1201 (source
1202 (origin
1203 (method git-fetch) ;the gem release lacks a Rakefile
1204 (uri (git-reference
1205 (url "https://github.com/asciidoctor/asciidoctor")
1206 (commit (string-append "v" version))))
1207 (file-name (git-file-name name version))
1208 (sha256
1209 (base32
1210 "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
1211 (build-system ruby-build-system)
1212 (arguments
1213 `(#:test-target "test:all"
1214 #:phases
1215 (modify-phases %standard-phases
1216 (replace 'replace-git-ls-files
1217 (lambda _
1218 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1219 ;; git ls-files output is merged in ruby-build-system.
1220 (substitute* "asciidoctor.gemspec"
1221 (("`git ls-files -z`")
1222 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1223 #t))
1224 (add-after 'extract-gemspec 'strip-version-requirements
1225 (lambda _
1226 (delete-file "Gemfile")
1227 (substitute* "asciidoctor.gemspec"
1228 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1229 (string-append stripped "\n")))
1230 #t)))))
1231 (native-inputs
1232 `(("ruby-erubis" ,ruby-erubis)
1233 ("ruby-minitest" ,ruby-minitest)
1234 ("ruby-nokogiri" ,ruby-nokogiri)
1235 ("ruby-asciimath" ,ruby-asciimath)
1236 ("ruby-coderay" ,ruby-coderay)
1237 ("ruby-cucumber" ,ruby-cucumber)
1238 ("ruby-haml" ,ruby-haml)
1239 ("ruby-rouge" ,ruby-rouge)
1240 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
1241 ("ruby-simplecov" ,ruby-simplecov)
1242 ("ruby-slim" ,ruby-slim)
1243 ("ruby-tilt" ,ruby-tilt)))
1244 (synopsis "Converter from AsciiDoc content to other formats")
1245 (description "Asciidoctor is a text processor and publishing toolchain for
1246 converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1247 formats.")
1248 (home-page "https://asciidoctor.org")
1249 (license license:expat)))
1250
1251 (define-public ruby-prawn-icon
1252 (package
1253 (name "ruby-prawn-icon")
1254 (version "2.5.0")
1255 (source
1256 (origin
1257 (method url-fetch)
1258 (uri (rubygems-uri "prawn-icon" version))
1259 (sha256
1260 (base32
1261 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1262 (build-system ruby-build-system)
1263 (arguments
1264 `(#:test-target "spec"
1265 #:phases (modify-phases %standard-phases
1266 (add-after 'unpack 'remove-unnecessary-dependencies
1267 (lambda _
1268 (substitute* '("Rakefile" "spec/spec_helper.rb")
1269 ((".*[Bb]undler.*") "")
1270 (("^require 'rubocop.*") "")
1271 (("^RuboCop.*") ""))
1272 #t)))))
1273 (native-inputs
1274 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1275 ("ruby-pdf-reader" ,ruby-pdf-reader)
1276 ("ruby-rspec" ,ruby-rspec)
1277 ("ruby-simplecov" ,ruby-simplecov)))
1278 (propagated-inputs
1279 `(("ruby-prawn" ,ruby-prawn)))
1280 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1281 (description "@code{Prawn::Icon} provides various icon fonts including
1282 FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1283 toolkit.")
1284 (home-page "https://github.com/jessedoyle/prawn-icon/")
1285 (license %prawn-project-licenses)))
1286
1287 (define-public ruby-css-parser
1288 (package
1289 (name "ruby-css-parser")
1290 (version "1.7.1")
1291 (source
1292 (origin
1293 (method url-fetch)
1294 (uri (rubygems-uri "css_parser" version))
1295 (sha256
1296 (base32
1297 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1298 (build-system ruby-build-system)
1299 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1300 (propagated-inputs
1301 `(("ruby-addressable" ,ruby-addressable)))
1302 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1303 (description "This package allows loading, parsing and cascading Cascading
1304 Style Sheets (CSS) rule sets in Ruby.")
1305 (home-page "https://github.com/premailer/css_parser")
1306 (license license:expat)))
1307
1308 (define-public ruby-prawn-svg
1309 (package
1310 (name "ruby-prawn-svg")
1311 (version "0.30.0")
1312 (source
1313 (origin
1314 (method url-fetch)
1315 (uri (rubygems-uri "prawn-svg" version))
1316 (sha256
1317 (base32
1318 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1319 (build-system ruby-build-system)
1320 (arguments
1321 `(#:phases (modify-phases %standard-phases
1322 (add-after 'unpack 'do-not-use-bundler
1323 (lambda _
1324 (substitute* "spec/spec_helper.rb"
1325 ((".*[Bb]undler.*") ""))
1326 #t))
1327 (replace 'check
1328 (lambda* (#:key tests? #:allow-other-keys)
1329 (when tests?
1330 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1331 #t)))))
1332 (native-inputs
1333 `(("ruby-rspec" ,ruby-rspec)))
1334 (propagated-inputs
1335 `(("ruby-css-parser" ,ruby-css-parser)
1336 ("ruby-prawn" ,ruby-prawn)))
1337 (synopsis "SVG renderer for the Prawn PDF library")
1338 (description "This library allows rendering Scalable Vector Graphics (SVG)
1339 graphics directly into a Portable Document Format (PDF) document using the
1340 Prawn module.")
1341 (home-page "https://github.com/mogest/prawn-svg")
1342 (license license:expat)))
1343
1344 (define-public ruby-prawn-templates
1345 (package
1346 (name "ruby-prawn-templates")
1347 (version "0.1.2")
1348 (source
1349 (origin
1350 (method git-fetch)
1351 (uri (git-reference
1352 (url "https://github.com/prawnpdf/prawn-templates.git")
1353 (commit version)))
1354 (file-name (git-file-name name version))
1355 (sha256
1356 (base32
1357 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1358 (build-system ruby-build-system)
1359 (arguments
1360 `(#:phases (modify-phases %standard-phases
1361 (add-after 'unpack 'do-not-use-bundler
1362 (lambda _
1363 (substitute* "spec/spec_helper.rb"
1364 ((".*[Bb]undler.*") ""))
1365 #t))
1366 (replace 'check
1367 (lambda* (#:key tests? #:allow-other-keys)
1368 (when tests?
1369 (invoke "rspec"))
1370 #t)))))
1371 (native-inputs
1372 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1373 ("ruby-rspec" ,ruby-rspec)))
1374 (propagated-inputs
1375 `(("ruby-pdf-reader" ,ruby-pdf-reader)
1376 ("ruby-prawn" ,ruby-prawn)))
1377 (synopsis "Prawn extension to include or combine PDF documents")
1378 (description "This @strong{unmaintained} package provides a Prawn
1379 extension that allows including other Portable Document Format (PDF) documents
1380 as background or combining several PDF documents into one. This functionality
1381 used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1382 of its many longstanding issues.")
1383 (home-page "https://github.com/prawnpdf/prawn-templates")
1384 (license %prawn-project-licenses)))
1385
1386 (define-public ruby-polyglot
1387 (package
1388 (name "ruby-polyglot")
1389 (version "0.3.5")
1390 (source
1391 (origin
1392 (method url-fetch)
1393 (uri (rubygems-uri "polyglot" version))
1394 (sha256
1395 (base32
1396 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1397 (build-system ruby-build-system)
1398 (arguments `(#:tests? #f)) ;no test suite
1399 (synopsis "Augment @code{require} to load non-Ruby file types")
1400 (description "The Polyglot library allows a Ruby module to register a
1401 loader for the file type associated with a filename extension, and it augments
1402 @code{require} to find and load matching files.")
1403 (home-page "https://github.com/cjheath/polyglot")
1404 (license license:expat)))
1405
1406 (define-public ruby-treetop
1407 (package
1408 (name "ruby-treetop")
1409 (version "1.6.10")
1410 (source
1411 (origin
1412 (method git-fetch) ;no test suite in distributed gem
1413 (uri (git-reference
1414 (url "https://github.com/cjheath/treetop.git")
1415 (commit (string-append "v" version))))
1416 (file-name (git-file-name name version))
1417 (sha256
1418 (base32
1419 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1420 (build-system ruby-build-system)
1421 (arguments
1422 `(#:test-target "spec"
1423 #:phases
1424 (modify-phases %standard-phases
1425 (replace 'replace-git-ls-files
1426 (lambda _
1427 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1428 ;; git ls-files output is merged in ruby-build-system.
1429 (substitute* "treetop.gemspec"
1430 (("`git ls-files -z`")
1431 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1432 #t)))))
1433 (native-inputs
1434 `(("ruby-activesupport" ,ruby-activesupport)
1435 ("ruby-rr" ,ruby-rr)
1436 ("ruby-rspec" ,ruby-rspec)))
1437 (propagated-inputs
1438 `(("ruby-polyglot" ,ruby-polyglot)))
1439 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1440 (description "This package provides a Ruby-based Parsing Expression
1441 Grammar (PEG) parser generator Domain Specific Language (DSL).")
1442 (home-page "https://github.com/cjheath/treetop")
1443 (license license:expat)))
1444
1445 (define-public ruby-rubocop-performance
1446 (package
1447 (name "ruby-rubocop-performance")
1448 (version "1.7.1")
1449 (source
1450 (origin
1451 (method url-fetch)
1452 (uri (rubygems-uri "rubocop-performance" version))
1453 (sha256
1454 (base32
1455 "04r8d4x62ygv17spvz9yyfxbmbf8qxwhijs0xycfvzr0q4pyg9sw"))))
1456 (build-system ruby-build-system)
1457 (arguments
1458 `(#:tests? #f)) ;no test suite in the distributed gem
1459 (propagated-inputs
1460 `(("ruby-rubocop" ,ruby-rubocop)))
1461 (synopsis "Performance optimizations checkers for Ruby code")
1462 (description "This package provides a collection of RuboCop cops to check
1463 for performance optimizations in Ruby code.")
1464 (home-page "https://docs.rubocop.org/rubocop-performance/")
1465 (license license:expat)))
1466
1467 (define-public ruby-gimme
1468 (let ((revision "1")
1469 (commit "4e71f0236f1271871916dd403261d26533db34c0"))
1470 (package
1471 (name "ruby-gimme")
1472 (version (git-version "0.5.0" revision commit))
1473 (source
1474 (origin
1475 (method git-fetch)
1476 (uri (git-reference
1477 (url "https://github.com/searls/gimme.git")
1478 (commit commit)))
1479 (file-name (git-file-name name version))
1480 (sha256
1481 (base32
1482 "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
1483 (build-system ruby-build-system)
1484 (native-inputs
1485 `(("ruby-coveralls" ,ruby-coveralls)
1486 ("ruby-cucumber" ,ruby-cucumber)
1487 ("ruby-pry" ,ruby-pry)
1488 ("ruby-simplecov" ,ruby-simplecov)
1489 ("ruby-rspec-given" ,ruby-rspec-given)))
1490 (arguments
1491 `(;; The cucumber task fails with error: "index 3 out of matches
1492 ;; (IndexError)", apparently due to our newer Cucumber version.
1493 ;; TODO: Try the "default" task with a future release.
1494 #:test-target "spec"
1495 #:phases
1496 (modify-phases %standard-phases
1497 (add-after 'extract-gemspec 'prepare-for-tests
1498 (lambda _
1499 ;; Delete failing tests (possibly due to our newer rspec
1500 ;; version).
1501 (delete-file "spec/gimme/gives_class_methods_spec.rb")
1502 (delete-file "spec/gimme/rspec_adapter_spec.rb")
1503 (delete-file "spec/gimme/verifies_class_methods_spec.rb")
1504 ;; Fix duplicate version requirements and de-register files.
1505 (delete-file "Gemfile")
1506 (delete-file "Gemfile.lock")
1507 (substitute* "gimme.gemspec"
1508 ((".*\"Gemfile\".*") "")
1509 ((".*\"Gemfile\\.lock\",.*") "")
1510 ((".*(rspec|cucumber).*\">= 0\".*") "")
1511 (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
1512 (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
1513 (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
1514 ;; All of these gems relate to development, and are
1515 ;; unnecessary when running the tests.
1516 ((".*(add|gem).*guard-.*") "")
1517 ((".*(add|gem).*jeweler.*") "")
1518 ((".*(add|gem).*pry.*") "")
1519 ((".*(add|gem).*growl.*") "")
1520 ((".*(add|gem).*rb-fsevent.*") ""))
1521 #t)))))
1522 (synopsis "Lightweight test double library for Ruby")
1523 (description "Gimme is a very lightweight test double library for Ruby,
1524 based on Mockito (a mocking framework for Java). It is an opinionated (but
1525 not noisy) means to facilitate test-driving by enabling the authors to specify
1526 only what they care about.")
1527 (home-page "https://github.com/searls/gimme")
1528 (license license:expat))))
1529
1530 (define-public ruby-standard
1531 (package
1532 (name "ruby-standard")
1533 (version "0.4.7")
1534 (source
1535 (origin
1536 (method git-fetch) ;no test suite in distributed gem
1537 (uri (git-reference
1538 (url "https://github.com/testdouble/standard.git")
1539 (commit (string-append "v" version))))
1540 (file-name (git-file-name name version))
1541 (sha256
1542 (base32
1543 "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
1544 (build-system ruby-build-system)
1545 (arguments
1546 ;; TODO: the tests are currently broken due to using a newer Rubocop.
1547 `(#:tests? #f
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'relax-version-requiremens
1551 (lambda _
1552 (delete-file "Gemfile")
1553 (delete-file "Gemfile.lock")
1554 #t))
1555 (replace 'replace-git-ls-files
1556 (lambda _
1557 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1558 ;; git ls-files output is merged in ruby-build-system.
1559 (substitute* "standard.gemspec"
1560 (("`git ls-files -z`")
1561 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1562 |sort -z|cut -zc3-`"))
1563 #t)))))
1564 (native-inputs
1565 `(("ruby-gimme" ,ruby-gimme)
1566 ("ruby-pry" ,ruby-pry)
1567 ("ruby-simplecov" ,ruby-simplecov)))
1568 (propagated-inputs
1569 `(("ruby-rubocop" ,ruby-rubocop)
1570 ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
1571 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
1572 (description "Standard is a port of StandardJS. Like StandardJS, it aims
1573 to save time in the following ways:
1574 @itemize
1575 @item No configuration.
1576 @item Automatically format code.
1577 @item Catch style issues and programmer errors early.
1578 @end itemize")
1579 (home-page "https://github.com/testdouble/standard")
1580 (license license:expat)))
1581
1582 (define-public ruby-chunky-png
1583 (package
1584 (name "ruby-chunky-png")
1585 (version "1.3.12")
1586 (source
1587 (origin
1588 (method git-fetch)
1589 (uri (git-reference
1590 (url "https://github.com/wvanbergen/chunky_png.git")
1591 (commit (string-append "v" version))))
1592 (file-name (git-file-name name version))
1593 (sha256
1594 (base32
1595 "0hn8ap7iib47qkqdp0awmxgma11z0lmk1ca3lp7c97ykhv7ij1zs"))))
1596 (build-system ruby-build-system)
1597 (arguments
1598 `(#:test-target "spec"
1599 #:phases
1600 (modify-phases %standard-phases
1601 (add-after 'unpack 'disable-bundler
1602 (lambda _
1603 (substitute* (find-files "." "\\.rb$")
1604 (("require.*bundler/setup.*") ""))
1605 #t))
1606 (replace 'replace-git-ls-files
1607 (lambda _
1608 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1609 ;; git ls-files output is merged in ruby-build-system.
1610 (substitute* "chunky_png.gemspec"
1611 (("`git ls-files`")
1612 "`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
1613 #t)))))
1614 (native-inputs
1615 `(("bundler" ,bundler)
1616 ("ruby-rspec" ,ruby-rspec)
1617 ("ruby-standard" ,ruby-standard)
1618 ("ruby-yard" ,ruby-yard)))
1619 (synopsis "Ruby library to handle PNG images")
1620 (description "ChunkyPNG is a pure Ruby library that can read and write
1621 Portable Network Graphics (PNG) images without depending on an external image
1622 library. It tries to be memory efficient and reasonably fast. It has
1623 features such as:
1624 @itemize
1625 @item
1626 Decoding support for any image that the PNG standard allows. This includes all
1627 standard color modes, all bit depths, all transparency, and interlacing and
1628 filtering options.
1629 @item
1630 Encoding support for images of all color modes (true color, grayscale, and
1631 indexed) and transparency for all these color modes. The best color mode is
1632 chosen automatically, based on the amount of used colors.
1633 @item Read/write access to the image's pixels.
1634 @item Read/write access to all image metadata that is stored in chunks.
1635 @item
1636 Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
1637 pixel, depending on the hardware).
1638 @item
1639 Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
1640 integer math and a highly optimized saving routine.
1641 @item Interoperability with RMagick.
1642 @end itemize")
1643 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
1644 (license license:expat)))
1645
1646 (define-public ruby-text-hyphen
1647 (package
1648 (name "ruby-text-hyphen")
1649 (version "1.4.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (rubygems-uri "text-hyphen" version))
1654 (sha256
1655 (base32
1656 "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
1657 (build-system ruby-build-system)
1658 (native-inputs
1659 `(("ruby-hoe" ,ruby-hoe)))
1660 (synopsis "Ruby library to hyphenate words in various languages")
1661 (description "Text::Hyphen is a Ruby library to hyphenate words in various
1662 languages using Ruby-fied versions of TeX hyphenation patterns. It will
1663 properly hyphenate various words according to the rules of the language the
1664 word is written in. The algorithm is based on that of the TeX typesetting
1665 system by Donald E. Knuth.")
1666 (home-page "https://github.com/halostatue/text-hyphen")
1667 ;; The whole is licensed under the Expat license, but parts use various
1668 ;; versions of the LaTeX Project Public License.
1669 (license license:expat)))
1670
1671 (define-public ruby-open-uri-cached
1672 (package
1673 (name "ruby-open-uri-cached")
1674 (version "0.0.5")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (rubygems-uri "open-uri-cached" version))
1679 (sha256
1680 (base32
1681 "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
1682 (build-system ruby-build-system)
1683 (arguments
1684 `(#:tests? #f)) ;no test suite
1685 (synopsis "OpenURI with transparent disk caching")
1686 (description "OpenURI with transparent disk caching, which is
1687 useful to avoid making excessive queries, for example when scraping
1688 web pages.")
1689 (home-page "https://github.com/tigris/open-uri-cached")
1690 (license license:expat)))
1691
1692 (define-public ruby-asciidoctor-pdf
1693 ;; Use the latest commit, as the last tag doesn't build with the
1694 ;; latest Ruby dependencies in Guix.
1695 (let ((revision "1")
1696 (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
1697 (package
1698 (name "ruby-asciidoctor-pdf")
1699 (version (git-version "1.5.3" revision commit))
1700 (source
1701 (origin
1702 (method git-fetch) ;no test suite in the distributed gem
1703 (uri (git-reference
1704 (url "https://github.com/asciidoctor/asciidoctor-pdf.git")
1705 (commit commit)))
1706 (file-name (git-file-name name version))
1707 (sha256
1708 (base32
1709 "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
1710 (build-system ruby-build-system)
1711 (arguments
1712 `(#:test-target "spec"
1713 #:phases
1714 (modify-phases %standard-phases
1715 (add-after 'unpack 'remove-failing-tests
1716 ;; Two tests module fail for unknown reasons, *only* when
1717 ;; ran in the build container (see:
1718 ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
1719 (lambda _
1720 (delete-file "spec/audio_spec.rb")
1721 (delete-file "spec/video_spec.rb")
1722 #t))
1723 (add-after 'extract-gemspec 'strip-version-requirements
1724 (lambda _
1725 (substitute* "asciidoctor-pdf.gemspec"
1726 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1727 (string-append stripped "\n")))
1728 #t))
1729 (replace 'replace-git-ls-files
1730 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1731 ;; git ls-files output is merged in ruby-build-system.
1732 (lambda _
1733 (substitute* "asciidoctor-pdf.gemspec"
1734 (("`git ls-files -z`")
1735 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1736 |sort -z|cut -zc3-`"))
1737 #t))
1738 ;; The tests rely on the Gem being installed, so move the check phase
1739 ;; after the install phase.
1740 (delete 'check)
1741 (add-after 'install 'check
1742 (lambda* (#:key outputs tests? #:allow-other-keys)
1743 (let ((new-gem (string-append (assoc-ref outputs "out")
1744 "/lib/ruby/vendor_ruby")))
1745 (setenv "GEM_PATH"
1746 (string-append (getenv "GEM_PATH") ":" new-gem))
1747 (when tests?
1748 (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
1749 #t))))))
1750 (native-inputs
1751 `(("ruby-chunky-png" ,ruby-chunky-png)
1752 ("ruby-coderay" ,ruby-coderay)
1753 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
1754 ("ruby-rouge" ,ruby-rouge)
1755 ("ruby-rspec" ,ruby-rspec)))
1756 (propagated-inputs
1757 `(("ruby-asciidoctor" ,ruby-asciidoctor)
1758 ("ruby-concurrent-ruby" ,ruby-concurrent)
1759 ("ruby-open-uri-cached" ,ruby-open-uri-cached)
1760 ("ruby-prawn" ,ruby-prawn)
1761 ("ruby-prawn-icon" ,ruby-prawn-icon)
1762 ("ruby-prawn-svg" ,ruby-prawn-svg)
1763 ("ruby-prawn-table" ,ruby-prawn-table)
1764 ("ruby-prawn-templates" ,ruby-prawn-templates)
1765 ("ruby-safe-yaml" ,ruby-safe-yaml)
1766 ("ruby-text-hyphen" ,ruby-text-hyphen)
1767 ("ruby-thread-safe" ,ruby-thread-safe)
1768 ("ruby-treetop" ,ruby-treetop)
1769 ("ruby-ttfunk" ,ruby-ttfunk)))
1770 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1771 (description "Asciidoctor PDF is an extension for Asciidoctor that
1772 converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1773 PDF library. It has features such as:
1774 @itemize
1775 @item Direct AsciiDoc to PDF conversion
1776 @item Configuration-driven theme (style and layout)
1777 @item Scalable Vector Graphics (SVG) support
1778 @item PDF document outline (i.e., bookmarks)
1779 @item Table of contents page(s)
1780 @item Document metadata (title, authors, subject, keywords, etc.)
1781 @item Internal cross reference links
1782 @item Syntax highlighting with Rouge, Pygments, or CodeRay
1783 @item Page numbering
1784 @item Customizable running content (header and footer)
1785 @item
1786 “Keep together” blocks (i.e., page breaks avoided in certain block content)
1787 @item Orphaned section titles avoided
1788 @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1789 @item Table border settings honored
1790 @item Font-based icons
1791 @item Custom TrueType (TTF) fonts
1792 @item Double-sided printing mode (margins alternate on recto and verso pages)
1793 @end itemize")
1794 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1795 (license license:expat))))
1796
1797 (define-public ruby-ast
1798 (package
1799 (name "ruby-ast")
1800 (version "2.4.1")
1801 (source
1802 (origin
1803 (method git-fetch) ;no test included in gem from v2.4.1
1804 (uri (git-reference
1805 (url "https://github.com/whitequark/ast")
1806 (commit (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32
1810 "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
1811 (build-system ruby-build-system)
1812 (arguments
1813 '(#:phases
1814 (modify-phases %standard-phases
1815 (add-after 'unpack 'remove-coveralls-requirement
1816 (lambda _
1817 (substitute* "test/helper.rb"
1818 (("require 'coveralls'") "")
1819 (("Coveralls::SimpleCov::Formatter") ""))
1820 #t))
1821 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1822 (lambda _
1823 (substitute* "ast.gemspec"
1824 ((".*coveralls.*") "\n")
1825 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1826 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1827 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1828 #t)))))
1829 (native-inputs
1830 `(("bundler" ,bundler)
1831 ("ruby-simplecov" ,ruby-simplecov)
1832 ("ruby-json-pure" ,ruby-json-pure)
1833 ("ruby-mime-times" ,ruby-mime-types)
1834 ("ruby-yard" ,ruby-yard)
1835 ("ruby-kramdown" ,ruby-kramdown)
1836 ("ruby-rest-client" ,ruby-rest-client)
1837 ("ruby-bacon" ,ruby-bacon)
1838 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1839 ("ruby-racc" ,ruby-racc)))
1840 (synopsis "Library for working with Abstract Syntax Trees")
1841 (description
1842 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1843 It does this through immutable data structures.")
1844 (home-page "https://whitequark.github.io/ast/")
1845 (license license:expat)))
1846
1847 (define-public ruby-sporkmonger-rack-mount
1848 ;; Testing the addressable gem requires a newer commit than that released, so
1849 ;; use an up to date version.
1850 (let ((revision "1")
1851 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1852 (package
1853 (name "ruby-sporkmonger-rack-mount")
1854 (version (git-version "0.8.3" revision commit))
1855 (source (origin
1856 (method git-fetch)
1857 (uri (git-reference
1858 (url "https://github.com/sporkmonger/rack-mount")
1859 (commit commit)))
1860 (file-name (git-file-name name version))
1861 (sha256
1862 (base32
1863 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1864 (build-system ruby-build-system)
1865 (arguments
1866 ;; Tests currently fail so disable them.
1867 ;; https://github.com/sporkmonger/rack-mount/pull/1
1868 `(#:tests? #f))
1869 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1870 (synopsis "Stackable dynamic tree based Rack router")
1871 (description
1872 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1873 continue trying routes if the response returns pass. This allows multiple
1874 routes to be nested or stacked on top of each other.")
1875 (home-page "https://github.com/sporkmonger/rack-mount")
1876 (license license:expat))))
1877
1878 (define-public ruby-ci-reporter
1879 (package
1880 (name "ruby-ci-reporter")
1881 (version "2.0.0")
1882 (source (origin
1883 (method url-fetch)
1884 (uri (rubygems-uri "ci_reporter" version))
1885 (sha256
1886 (base32
1887 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1888 (build-system ruby-build-system)
1889 (arguments
1890 `(#:test-target "rspec"))
1891 (propagated-inputs
1892 `(("ruby-builder" ,ruby-builder)))
1893 (native-inputs
1894 `(("bundler" ,bundler)
1895 ("ruby-rspec" ,ruby-rspec)))
1896 (synopsis "Generate XML reports of runs test")
1897 (description
1898 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1899 you to generate XML reports of your test runs. The resulting files can be
1900 read by a continuous integration system that understands Ant's JUnit report
1901 format.")
1902 (home-page "https://github.com/nicksieger/ci_reporter")
1903 (license license:expat)))
1904
1905 (define-public ruby-contracts
1906 (package
1907 (name "ruby-contracts")
1908 (version "0.16.0")
1909 (source
1910 (origin
1911 (method url-fetch)
1912 (uri (rubygems-uri "contracts" version))
1913 (sha256
1914 (base32
1915 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1916 (build-system ruby-build-system)
1917 (arguments
1918 '(#:test-target "spec"
1919 #:phases
1920 (modify-phases %standard-phases
1921 ;; Don't run or require rubocop, the code linting tool, as this is a
1922 ;; bit unnecessary.
1923 (add-after 'unpack 'dont-run-rubocop
1924 (lambda _
1925 (substitute* "Rakefile"
1926 ((".*rubocop.*") "")
1927 ((".*RuboCop.*") ""))
1928 #t)))))
1929 (native-inputs
1930 `(("ruby-rspec" ,ruby-rspec)))
1931 (synopsis "Method contracts for Ruby")
1932 (description
1933 "This library provides contracts for Ruby. A contract describes the
1934 correct inputs and output for a method, and will raise an error if a incorrect
1935 value is found.")
1936 (home-page "https://github.com/egonSchiele/contracts.ruby")
1937 (license license:bsd-2)))
1938
1939 (define-public ruby-crack
1940 (package
1941 (name "ruby-crack")
1942 (version "0.4.3")
1943 (source
1944 (origin
1945 (method url-fetch)
1946 (uri (rubygems-uri "crack" version))
1947 (sha256
1948 (base32
1949 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1950 (build-system ruby-build-system)
1951 (arguments
1952 `(#:phases
1953 (modify-phases %standard-phases
1954 (replace 'check
1955 (lambda* (#:key tests? #:allow-other-keys)
1956 (when tests?
1957 (for-each (lambda (file)
1958 (display file)(display "\n")
1959 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1960 (find-files "test" ".*rb$")))
1961 #t)))))
1962 (propagated-inputs
1963 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1964 (synopsis "Simple JSON and XML parsing for Ruby")
1965 (description
1966 "@code{crack} provides really simple JSON and XML parsing, extracted from
1967 code in Merb and Rails.")
1968 (home-page "https://github.com/jnunemaker/crack")
1969 (license license:expat)))
1970
1971 (define-public ruby-cliver
1972 (package
1973 (name "ruby-cliver")
1974 (version "0.3.2")
1975 (source
1976 (origin
1977 (method url-fetch)
1978 (uri (rubygems-uri "cliver" version))
1979 (sha256
1980 (base32
1981 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1982 (build-system ruby-build-system)
1983 (arguments
1984 '(#:phases
1985 (modify-phases %standard-phases
1986 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1987 ;; would be nice, but the tests look to be incompatible:
1988 ;;
1989 ;; NoMethodError: undefined method `last_comment'
1990 (replace 'check
1991 (lambda* (#:key tests? #:allow-other-keys)
1992 (when tests?
1993 (invoke "rspec"))
1994 #t)))))
1995 (native-inputs
1996 `(("bundler" ,bundler)
1997 ("ruby-rspec" ,ruby-rspec-2)))
1998 (synopsis "Assertions for command-line dependencies in Ruby")
1999 (description
2000 "@code{cliver} provides a way to detect missing command-line
2001 dependencies, including versions.")
2002 (home-page "https://github.com/yaauie/cliver")
2003 (license license:expat)))
2004
2005 (define-public ruby-czmq-ffi-gen
2006 (package
2007 (name "ruby-czmq-ffi-gen")
2008 (version "0.13.0")
2009 (source
2010 (origin
2011 (method url-fetch)
2012 (uri (rubygems-uri "czmq-ffi-gen" version))
2013 (sha256
2014 (base32
2015 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2016 (build-system ruby-build-system)
2017 (arguments
2018 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2019 #:phases
2020 (modify-phases %standard-phases
2021 (add-after 'unpack 'patch-lib_dirs
2022 (lambda* (#:key inputs #:allow-other-keys)
2023 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2024 (("lib\\_dirs = \\[.*\\]")
2025 (string-append "lib_dirs = ['"
2026 (assoc-ref inputs "czmq") "/lib"
2027 "']")))
2028 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2029 (("lib\\_dirs = \\[.*\\]")
2030 (string-append "lib_dirs = ['"
2031 (assoc-ref inputs "zeromq") "/lib"
2032 "']"))))))))
2033 (inputs
2034 `(("zeromq" ,zeromq)
2035 ("czmq" ,czmq)))
2036 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
2037 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2038 (description
2039 "These Ruby bindings are not intended to be directly used, but rather
2040 used by higher level bindings like those provided by CZTop.")
2041 (home-page
2042 "https://github.com/paddor/czmq-ffi-gen")
2043 (license license:isc)))
2044
2045 (define-public ruby-cztop
2046 (package
2047 (name "ruby-cztop")
2048 (version "0.12.2")
2049 (source
2050 (origin
2051 (method url-fetch)
2052 (uri (rubygems-uri "cztop" version))
2053 (sha256
2054 (base32
2055 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2056 (build-system ruby-build-system)
2057 (arguments
2058 '(#:test-target "spec"
2059 #:phases
2060 (modify-phases %standard-phases
2061 (add-after 'unpack 'patch-lib_paths
2062 (lambda* (#:key inputs #:allow-other-keys)
2063 (substitute* "lib/cztop/poller/zmq.rb"
2064 (("lib\\_paths = \\[.*\\]")
2065 (string-append "lib_paths = ['"
2066 (assoc-ref inputs "zeromq") "/lib"
2067 "']"))))))))
2068 (native-inputs
2069 `(("bundler" ,bundler)
2070 ("ruby-rspec" ,ruby-rspec)))
2071 (inputs
2072 `(("zeromq" ,zeromq)))
2073 (propagated-inputs
2074 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
2075 (synopsis "CZMQ Ruby bindings")
2076 (description
2077 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2078 CZMQ. The focus of of CZTop is on being easy to use and providing first class
2079 support for security mechanisms.")
2080 (home-page "https://github.com/paddor/cztop")
2081 (license license:isc)))
2082
2083 (define-public ruby-saikuro-treemap
2084 (package
2085 (name "ruby-saikuro-treemap")
2086 (version "0.2.0")
2087 (source (origin
2088 (method url-fetch)
2089 (uri (rubygems-uri "saikuro_treemap" version))
2090 (sha256
2091 (base32
2092 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2093 (build-system ruby-build-system)
2094 ;; Some of the tests fail because the generated JSON has keys in a
2095 ;; different order. This is a problem with the test suite rather than any
2096 ;; of the involved libraries.
2097 (arguments `(#:tests? #f))
2098 (propagated-inputs
2099 `(("ruby-json-pure" ,ruby-json-pure)
2100 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
2101 (synopsis "Generate complexity treemap based on saikuro analysis")
2102 (description
2103 "This gem generates a treemap showing the complexity of Ruby code on
2104 which it is run. It uses Saikuro under the covers to analyze Ruby code
2105 complexity.")
2106 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2107 (license license:expat)))
2108
2109 (define-public ruby-oauth2
2110 (package
2111 (name "ruby-oauth2")
2112 (version "1.4.2")
2113 (source
2114 (origin
2115 (method url-fetch)
2116 (uri (rubygems-uri "oauth2" version))
2117 (sha256
2118 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
2119 (build-system ruby-build-system)
2120 (arguments
2121 '(#:tests? #f)) ; no included tests
2122 (propagated-inputs
2123 `(("ruby-faraday" ,ruby-faraday)
2124 ("ruby-jwt" ,ruby-jwt)
2125 ("ruby-multi-json" ,ruby-multi-json)
2126 ("ruby-multi-xml" ,ruby-multi-xml)
2127 ("ruby-rack" ,ruby-rack)))
2128 (synopsis "Ruby wrapper for the OAuth 2.0")
2129 (description
2130 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2131 with a similar style to the original OAuth spec.")
2132 (home-page "https://github.com/oauth-xx/oauth2")
2133 (license license:expat)))
2134
2135 (define-public ruby-omniauth
2136 (package
2137 (name "ruby-omniauth")
2138 (version "1.9.1")
2139 (source
2140 (origin
2141 (method url-fetch)
2142 (uri (rubygems-uri "omniauth" version))
2143 (sha256
2144 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
2145 (build-system ruby-build-system)
2146 (arguments
2147 '(#:tests? #f)) ; No included tests
2148 (propagated-inputs
2149 `(("ruby-hashie" ,ruby-hashie)
2150 ("ruby-rack" ,ruby-rack)))
2151 (synopsis "Generalized Rack framework for multiple-provider authentication")
2152 (description
2153 "This package provides a generalized Rack framework for multiple-provider
2154 authentication.")
2155 (home-page "https://github.com/omniauth/omniauth")
2156 (license license:expat)))
2157
2158 (define-public ruby-omniauth-oauth2
2159 (package
2160 (name "ruby-omniauth-oauth2")
2161 (version "1.6.0")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (rubygems-uri "omniauth-oauth2" version))
2166 (sha256
2167 (base32
2168 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
2169 (build-system ruby-build-system)
2170 (arguments
2171 '(#:phases
2172 (modify-phases %standard-phases
2173 (add-after 'unpack 'remove-unnecessary-dependencies
2174 (lambda _
2175 ;; The coveralls gem submits coverage information to an online
2176 ;; service, and is unnecessary when running the tests
2177 (substitute* "Gemfile"
2178 ((".*coveralls\"") ""))
2179 (substitute* "spec/helper.rb"
2180 (("require \"coveralls\"") "")
2181 (("Coveralls::SimpleCov::Formatter") ""))
2182 #t)))))
2183 (propagated-inputs
2184 `(("ruby-oauth2" ,ruby-oauth2)
2185 ("ruby-omniauth" ,ruby-omniauth)))
2186 (native-inputs
2187 `(("bundler" ,bundler)
2188 ("ruby-rspec" ,ruby-rspec)
2189 ("ruby-simplecov" ,ruby-simplecov)
2190 ("ruby-rack-test" ,ruby-rack-test)
2191 ("ruby-webmock" ,ruby-webmock-2)))
2192 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2193 (description
2194 "This library provides a generic OAuth2 strategy for OmniAuth. It
2195 doesn't provide a way to gather user information, so should be used as a
2196 building block for authentication strategies.")
2197 (home-page "https://github.com/omniauth/omniauth-oauth2")
2198 (license license:expat)))
2199
2200 (define-public ruby-open4
2201 (package
2202 (name "ruby-open4")
2203 (version "1.3.4")
2204 (source
2205 (origin
2206 (method url-fetch)
2207 (uri (rubygems-uri "open4" version))
2208 (sha256
2209 (base32
2210 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2211 (build-system ruby-build-system)
2212 (arguments
2213 '(#:phases
2214 (modify-phases %standard-phases
2215 (add-after 'unpack 'patch
2216 (lambda _
2217 (substitute* "rakefile"
2218 ;; Update the Rakefile so it works
2219 (("-rubygems") "-rrubygems")
2220 (("Config") "RbConfig"))
2221 #t))
2222 (add-before 'check 'set-LIB
2223 (lambda _
2224 ;; This is used in the rakefile when running the tests
2225 (setenv "LIB" "open4")
2226 #t)))))
2227 (synopsis "Open child processes from Ruby and manage them easily")
2228 (description
2229 "@code{Open4} is a Ruby library to run child processes and manage their
2230 input and output.")
2231 (home-page "https://github.com/ahoward/open4")
2232 (license license:ruby)))
2233
2234 (define-public ruby-options
2235 (package
2236 (name "ruby-options")
2237 (version "2.3.2")
2238 (source
2239 (origin
2240 (method url-fetch)
2241 (uri (rubygems-uri "options" version))
2242 (sha256
2243 (base32
2244 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2245 (build-system ruby-build-system)
2246 (arguments
2247 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2248 #:phases
2249 (modify-phases %standard-phases
2250 (add-before 'check 'set-LIB
2251 (lambda _
2252 ;; This is used in the Rakefile, and setting it avoids an issue
2253 ;; with running the tests.
2254 (setenv "LIB" "options")
2255 #t)))))
2256 (synopsis "Ruby library to parse options from *args cleanly")
2257 (description
2258 "The @code{options} library helps with parsing keyword options in Ruby
2259 functions.")
2260 (home-page "https://github.com/ahoward/options")
2261 (license license:ruby)))
2262
2263 (define-public ruby-erubi
2264 (package
2265 (name "ruby-erubi")
2266 (version "1.8.0")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (rubygems-uri "erubi" version))
2271 (sha256
2272 (base32
2273 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2274 (build-system ruby-build-system)
2275 (synopsis "ERB template engine for Ruby")
2276 (description
2277 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2278 Erubis")
2279 (home-page "https://github.com/jeremyevans/erubi")
2280 (license license:expat)))
2281
2282 (define-public ruby-erubis
2283 (package
2284 (name "ruby-erubis")
2285 (version "2.7.0")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (rubygems-uri "erubis" version))
2290 (sha256
2291 (base32
2292 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2293 (build-system ruby-build-system)
2294 (arguments
2295 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2296 (synopsis "Implementation of embedded Ruby (eRuby)")
2297 (description
2298 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2299 features such as multi-language support, auto escaping, auto trimming spaces
2300 around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2301 support.")
2302 (home-page "http://www.kuwata-lab.com/erubis/")
2303 (license license:expat)))
2304
2305 (define-public ruby-execjs
2306 (package
2307 (name "ruby-execjs")
2308 (version "2.7.0")
2309 (source
2310 (origin
2311 ;; fetch from github as the gem does not contain testing code
2312 (method git-fetch)
2313 (uri (git-reference
2314 (url "https://github.com/rails/execjs")
2315 (commit (string-append "v" version))))
2316 (file-name (git-file-name name version))
2317 (sha256
2318 (base32
2319 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
2320 (build-system ruby-build-system)
2321 (native-inputs
2322 `(("bundler" ,bundler)
2323 ;; The test suite tests all the available backends. Currenly, this just
2324 ;; means the node backend.
2325 ;;
2326 ;; PASSED: test:node
2327 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
2328 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
2329 ("node" ,node)))
2330 (synopsis "Run JavaScript code from Ruby")
2331 (description
2332 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2333 runtime to evaluate your JavaScript program, then returns the result to you as
2334 a Ruby object.")
2335 (home-page "https://github.com/rails/execjs")
2336 (license license:expat)))
2337
2338 (define-public ruby-fakefs
2339 (package
2340 (name "ruby-fakefs")
2341 (version "1.2.2")
2342 (home-page "https://github.com/fakefs/fakefs")
2343 (source (origin
2344 ;; The Rubygems release does not contain tests.
2345 (method git-fetch)
2346 (uri (git-reference
2347 (url home-page)
2348 (commit (string-append "v" version))))
2349 (file-name (git-file-name name version))
2350 (sha256
2351 (base32
2352 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2353 (build-system ruby-build-system)
2354 (arguments
2355 '(#:phases (modify-phases %standard-phases
2356 (replace 'replace-git-ls-files
2357 (lambda _
2358 (substitute* "fakefs.gemspec"
2359 (("`git ls-files lib README.md LICENSE`")
2360 "`find lib README.md LICENSE -type f | sort`"))
2361 #t))
2362 (add-before 'check 'remove-version-constraints
2363 (lambda _
2364 ;; Drop hard version requirements for test dependencies.
2365 (substitute* "fakefs.gemspec"
2366 (("(.*add_development_dependency .*), .*" _ dep)
2367 (string-append dep "\n")))
2368 #t)))))
2369 (native-inputs
2370 `(("ruby-bump" ,ruby-bump)
2371 ("ruby-maxitest" ,ruby-maxitest)
2372 ("ruby-rubocop" ,ruby-rubocop)
2373 ("ruby-rspec" ,ruby-rspec)))
2374 (synopsis "Fake file system for Ruby")
2375 (description
2376 "This package provides a fake file system for use in test suites. It
2377 avoids the need for manually creating temporary directories, or dealing
2378 with platform intricacies in @code{File} and @code{FileUtils}.")
2379 (license license:expat)))
2380
2381 (define-public ruby-orderedhash
2382 (package
2383 (name "ruby-orderedhash")
2384 (version "0.0.6")
2385 (source (origin
2386 (method url-fetch)
2387 (uri (rubygems-uri "orderedhash" version))
2388 (sha256
2389 (base32
2390 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2391 (build-system ruby-build-system)
2392 (arguments
2393 '(#:tests? #f)) ; no test suite
2394 (synopsis "Ruby library providing an order-preserving hash")
2395 (description "Orderedhash is a Ruby library providing a hash
2396 implementation that preserves the order of items and features some array-like
2397 extensions.")
2398 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2399 (license license:public-domain)))
2400
2401 (define-public ruby-libxml
2402 (package
2403 (name "ruby-libxml")
2404 (version "3.0.0")
2405 (source
2406 (origin
2407 (method url-fetch)
2408 (uri (rubygems-uri "libxml-ruby" version))
2409 (sha256
2410 (base32
2411 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
2412 (build-system ruby-build-system)
2413 (inputs
2414 `(("zlib" ,zlib)
2415 ("libxml2" ,libxml2)))
2416 (arguments
2417 '(#:tests? #f ; test suite hangs for unknown reason
2418 #:gem-flags
2419 (list "--"
2420 (string-append "--with-xml2-include="
2421 (assoc-ref %build-inputs "libxml2")
2422 "/include/libxml2" ))))
2423 (synopsis "Ruby bindings for GNOME Libxml2")
2424 (description "The Libxml-Ruby project provides Ruby language bindings for
2425 the GNOME Libxml2 XML toolkit.")
2426 (home-page "https://xml4r.github.com/libxml-ruby")
2427 (license license:expat)))
2428
2429 (define-public ruby-lino
2430 (package
2431 (name "ruby-lino")
2432 (version "1.1.0")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (rubygems-uri "lino" version))
2437 (sha256
2438 (base32
2439 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2440 (build-system ruby-build-system)
2441 (arguments
2442 '(#:tests? #f)) ; No included tests
2443 (propagated-inputs
2444 `(("ruby-hamster" ,ruby-hamster)
2445 ("ruby-open4" ,ruby-open4)))
2446 (synopsis "Build and execute commands in Ruby")
2447 (description
2448 "@code{Lino} provides an interface to run external commands. It provides
2449 an interface to add options as well as managing the standard input, output and
2450 error streams.")
2451 (home-page "https://github.com/tobyclemson/lino")
2452 (license license:expat)))
2453
2454 (define-public ruby-xml-simple
2455 (package
2456 (name "ruby-xml-simple")
2457 (version "1.1.5")
2458 (source (origin
2459 (method url-fetch)
2460 (uri (rubygems-uri "xml-simple" version))
2461 (sha256
2462 (base32
2463 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2464 (build-system ruby-build-system)
2465 (arguments
2466 '(#:tests? #f)) ; no test suite
2467 (synopsis "Simple Ruby library for XML processing")
2468 (description "This library provides a simple API for XML processing in
2469 Ruby.")
2470 (home-page "https://github.com/maik/xml-simple")
2471 (license license:ruby)))
2472
2473 (define-public ruby-thor
2474 (package
2475 (name "ruby-thor")
2476 (version "1.0.1")
2477 (source (origin
2478 ;; Pull from git because the gem has no tests.
2479 (method git-fetch)
2480 (uri (git-reference
2481 (url "https://github.com/erikhuda/thor")
2482 (commit (string-append "v" version))))
2483 (file-name (git-file-name name version))
2484 (sha256
2485 (base32
2486 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2487 (build-system ruby-build-system)
2488 (arguments
2489 '(#:phases (modify-phases %standard-phases
2490 (add-after 'unpack 'fix-readline-tests
2491 (lambda _
2492 ;; Ensure Readline is initialized before running the
2493 ;; test to avoid a type clash with the mock ::Readline.
2494 ;; See <https://github.com/erikhuda/thor/pull/717>.
2495 (substitute* "spec/line_editor/readline_spec.rb"
2496 (("unless defined\\? ::Readline" all)
2497 (string-append "Thor::LineEditor::Readline.available?\n"
2498 all)))
2499 #t))
2500 (add-after 'unpack 'remove-coveralls-dependency
2501 (lambda _
2502 ;; Do not hook the test suite into the online
2503 ;; coveralls service.
2504 (substitute* "Gemfile"
2505 ((".*coveralls.*") ""))
2506 (substitute* "spec/helper.rb"
2507 (("require \"coveralls\"") "")
2508 (("Coveralls::SimpleCov::Formatter") "")
2509 ;; Also drop the WebMock dependency which is only
2510 ;; present to allow a coveralls.io connection, and
2511 ;; would otherwise introduce a circular dependency.
2512 (("require \"webmock/rspec\"") "")
2513 (("WebMock\\.disable_net_connect.*") ""))
2514 #t))
2515 (add-after 'unpack 'disable-network-tests
2516 (lambda _
2517 ;; These tests attempt to look up example.com.
2518 (substitute* "spec/actions/file_manipulation_spec.rb"
2519 (("it \"accepts (https?) remote sources" _ proto)
2520 (string-append "xit \"accepts " proto " remote sources")))
2521 #t))
2522 (add-after 'unpack 'disable-quality-tests
2523 (lambda _
2524 ;; These tests attempt to check the git repository for
2525 ;; tabs vs spaces, double vs single quotes, etc, and
2526 ;; depend on the git checkout.
2527 (delete-file "spec/quality_spec.rb")
2528 #t))
2529 (add-before 'check 'make-files-writable
2530 (lambda _
2531 ;; The tests needs rw access to the test suite.
2532 (for-each make-file-writable (find-files "spec"))
2533 #t))
2534 (replace 'check
2535 (lambda _
2536 (invoke "rspec" "spec"))))))
2537 (native-inputs
2538 `(("ruby-rspec" ,ruby-rspec)
2539 ("ruby-simplecov" ,ruby-simplecov)))
2540 (synopsis "Ruby toolkit for building command-line interfaces")
2541 (description "Thor is a toolkit for building powerful command-line
2542 interfaces.")
2543 (home-page "http://whatisthor.com/")
2544 (license license:expat)))
2545
2546 (define-public ruby-lumberjack
2547 (package
2548 (name "ruby-lumberjack")
2549 (version "1.0.13")
2550 (source (origin
2551 (method url-fetch)
2552 (uri (rubygems-uri "lumberjack" version))
2553 (sha256
2554 (base32
2555 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
2556 (build-system ruby-build-system)
2557 (native-inputs
2558 `(("ruby-rspec" ,ruby-rspec)
2559 ("ruby-timecop" ,ruby-timecop)))
2560 (synopsis "Logging utility library for Ruby")
2561 (description "Lumberjack is a simple logging utility that can be a drop in
2562 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2563 for automatically rolling log files even with multiple processes writing the
2564 same log file.")
2565 (home-page "https://github.com/bdurand/lumberjack")
2566 (license license:expat)))
2567
2568 (define-public ruby-rbnacl
2569 (package
2570 (name "ruby-rbnacl")
2571 (version "6.0.1")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (rubygems-uri "rbnacl" version))
2576 (sha256
2577 (base32
2578 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2579 (build-system ruby-build-system)
2580 (arguments
2581 `(#:phases
2582 (modify-phases %standard-phases
2583 (add-after 'unpack 'remove-unnecessary-dependencies
2584 (lambda _
2585 ;; Coveralls relates to a network service, and Rubocop to code
2586 ;; linting and both are unnecessary to run the tests
2587 (substitute* "Gemfile"
2588 ((".*rubocop.*") "\n")
2589 ((".*guard-rspec.*") "\n")
2590 ((".*coveralls.*") "\n"))
2591 (substitute* "spec/spec_helper.rb"
2592 (("require \"coveralls\"") "")
2593 (("Coveralls.wear!") ""))
2594 #t))
2595 (add-after 'unpack 'use-libsodium-from-store
2596 (lambda* (#:key inputs #:allow-other-keys)
2597 (substitute* '("lib/rbnacl/init.rb"
2598 "lib/rbnacl/sodium.rb")
2599 (("ffi_lib \\[.+\\]")
2600 (string-append "ffi_lib [\""
2601 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2602 "\"]")))
2603 #t))
2604 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2605 (replace 'check
2606 (lambda* (#:key tests? #:allow-other-keys)
2607 (when tests?
2608 (invoke "rspec"))
2609 #t)))))
2610 (propagated-inputs
2611 `(("ruby-ffi" ,ruby-ffi)))
2612 (inputs
2613 `(("libsodium" ,libsodium)))
2614 (native-inputs
2615 `(("bundler" ,bundler)
2616 ("ruby-rspec" ,ruby-rspec)))
2617 (synopsis "Ruby FFI binding to libsodium")
2618 (description
2619 "This package provides Ruby FFI bindings to the Networking and
2620 Cryptography (NaCl) library, also known as libsodium. This provides a
2621 high-level toolkit for building cryptographic systems and protocols.")
2622 (home-page "https://github.com/crypto-rb/rbnacl")
2623 (license license:expat)))
2624
2625 (define-public ruby-nenv
2626 (package
2627 (name "ruby-nenv")
2628 (version "0.3.0")
2629 (source (origin
2630 (method url-fetch)
2631 (uri (rubygems-uri "nenv" version))
2632 (sha256
2633 (base32
2634 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
2635 (build-system ruby-build-system)
2636 (arguments
2637 `(#:tests? #f)) ; no tests included
2638 (native-inputs
2639 `(("ruby-rspec" ,ruby-rspec)
2640 ("bundler" ,bundler)))
2641 (synopsis "Ruby interface for modifying the environment")
2642 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2643 and inspect the environment.")
2644 (home-page "https://github.com/e2/nenv")
2645 (license license:expat)))
2646
2647 (define-public ruby-ptools
2648 (package
2649 (name "ruby-ptools")
2650 (version "1.3.5")
2651 (source (origin
2652 (method url-fetch)
2653 (uri (rubygems-uri "ptools" version))
2654 (sha256
2655 (base32
2656 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2657 (build-system ruby-build-system)
2658 (arguments
2659 '(#:phases (modify-phases %standard-phases
2660 (add-after 'unpack 'patch-/bin/ls
2661 (lambda _
2662 (substitute* "test/test_binary.rb"
2663 (("/bin/ls")
2664 (which "ls")))
2665 #t))
2666 (add-before 'install 'create-gem
2667 (lambda _
2668 ;; Do not attempt to sign the gem.
2669 (substitute* "Rakefile"
2670 (("spec\\.signing_key = .*")
2671 ""))
2672 (invoke "rake" "gem:create"))))))
2673 (synopsis "Extra methods for Ruby's @code{File} class")
2674 (description
2675 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2676 class with many additional methods modelled after common POSIX tools, such as
2677 @code{File.which} for finding executables, @code{File.tail} to print the last
2678 lines of a file, @code{File.wc} to count words, and so on.")
2679 (home-page "https://github.com/djberg96/ptools")
2680 (license license:artistic2.0)))
2681
2682 (define-public ruby-permutation
2683 (package
2684 (name "ruby-permutation")
2685 (version "0.1.8")
2686 (source (origin
2687 (method url-fetch)
2688 (uri (rubygems-uri "permutation" version))
2689 (sha256
2690 (base32
2691 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2692 (build-system ruby-build-system)
2693 (arguments
2694 `(#:phases
2695 (modify-phases %standard-phases
2696 (add-after 'unpack 'fix-rakefile
2697 (lambda _
2698 (substitute* "Rakefile"
2699 (("require 'rake/gempackagetask'")
2700 "require 'rubygems/package_task'")
2701 (("include Config") ""))
2702 #t))
2703 (replace 'check
2704 (lambda _
2705 (invoke "ruby" "-Ilib" "test/test.rb"))))))
2706 (synopsis "Library to perform operations with sequence permutations")
2707 (description "This package provides a Ruby library to perform different
2708 operations with permutations of sequences, such as strings and arrays.")
2709 (home-page "https://flori.github.io/permutation")
2710 (license license:gpl2))) ; GPL 2 only
2711
2712 (define-public ruby-shellany
2713 (package
2714 (name "ruby-shellany")
2715 (version "0.0.1")
2716 (source (origin
2717 (method url-fetch)
2718 (uri (rubygems-uri "shellany" version))
2719 (sha256
2720 (base32
2721 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2722 (build-system ruby-build-system)
2723 (arguments
2724 `(#:test-target "default"
2725 #:phases
2726 (modify-phases %standard-phases
2727 (add-after 'unpack 'fix-version-test
2728 (lambda _
2729 (substitute* "spec/shellany_spec.rb"
2730 (("^RSpec") "require \"shellany\"\nRSpec"))
2731 #t)))))
2732 (native-inputs
2733 `(("ruby-rspec" ,ruby-rspec)
2734 ("ruby-nenv" ,ruby-nenv)
2735 ("bundler" ,bundler)))
2736 (synopsis "Capture command output")
2737 (description "Shellany is a Ruby library providing functions to capture
2738 the output produced by running shell commands.")
2739 (home-page "https://rubygems.org/gems/shellany")
2740 (license license:expat)))
2741
2742 (define-public ruby-notiffany
2743 (package
2744 (name "ruby-notiffany")
2745 (version "0.1.3")
2746 (source (origin
2747 (method url-fetch)
2748 (uri (rubygems-uri "notiffany" version))
2749 (sha256
2750 (base32
2751 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
2752 (build-system ruby-build-system)
2753 ;; Tests are not included in the gem.
2754 (arguments `(#:tests? #f))
2755 (propagated-inputs
2756 `(("ruby-shellany" ,ruby-shellany)
2757 ("ruby-nenv" ,ruby-nenv)))
2758 (native-inputs
2759 `(("bundler" ,bundler)))
2760 (synopsis "Wrapper library for notification libraries")
2761 (description "Notiffany is a Ruby wrapper library for notification
2762 libraries such as Libnotify.")
2763 (home-page "https://github.com/guard/notiffany")
2764 (license license:expat)))
2765
2766 (define-public ruby-forking-test-runner
2767 (package
2768 (name "ruby-forking-test-runner")
2769 (version "1.6.0")
2770 (home-page "https://github.com/grosser/forking_test_runner")
2771 (source (origin
2772 (method git-fetch)
2773 (uri (git-reference (url home-page)
2774 (commit (string-append "v" version))))
2775 (file-name (git-file-name name version))
2776 (sha256
2777 (base32
2778 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2779 (build-system ruby-build-system)
2780 (arguments
2781 '(#:test-target "spec"
2782 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2783 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2784 #:tests? #f
2785 #:phases (modify-phases %standard-phases
2786 (replace 'replace-git-ls-files
2787 (lambda _
2788 (substitute* "forking_test_runner.gemspec"
2789 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2790 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2791 #t))
2792 (add-before 'check 'remove-version-constraints
2793 (lambda _
2794 ;; Ignore hard coded version constraints for the tests.
2795 (delete-file "Gemfile.lock")
2796 #t))
2797 (add-before 'check 'set-HOME
2798 (lambda _
2799 ;; Many tests invoke Bundler, and fails when Bundler
2800 ;; warns that /homeless-shelter does not exist.
2801 (setenv "HOME" "/tmp")
2802 #t)))))
2803 (native-inputs
2804 `(("ruby-activerecord" ,ruby-activerecord)
2805 ("ruby-bump" ,ruby-bump)
2806 ("ruby-rspec" ,ruby-rspec)
2807 ("ruby-sqlite3" ,ruby-sqlite3)
2808 ("ruby-wwtd" ,ruby-wwtd)))
2809 (propagated-inputs
2810 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2811 (synopsis "Run every test in a fork")
2812 (description
2813 "This package is a wrapper around @code{parallel_tests} that runs every
2814 test in a fork to avoid pollution and get clean output per test.")
2815 (license license:expat)))
2816
2817 (define-public ruby-formatador
2818 (package
2819 (name "ruby-formatador")
2820 (version "0.2.5")
2821 (source (origin
2822 (method url-fetch)
2823 (uri (rubygems-uri "formatador" version))
2824 (sha256
2825 (base32
2826 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2827 (build-system ruby-build-system)
2828 ;; Circular dependency: Tests require ruby-shindo, which requires
2829 ;; ruby-formatador at runtime.
2830 (arguments `(#:tests? #f))
2831 (synopsis "Ruby library to format text on stdout")
2832 (description "Formatador is a Ruby library to format text printed to the
2833 standard output stream.")
2834 (home-page "https://github.com/geemus/formatador")
2835 (license license:expat)))
2836
2837 (define-public ruby-fuubar
2838 (package
2839 (name "ruby-fuubar")
2840 (version "2.3.2")
2841 (source
2842 (origin
2843 ;; Fetch from the git repository, as the gem package doesn't include
2844 ;; the tests.
2845 (method git-fetch)
2846 (uri (git-reference
2847 (url "https://github.com/thekompanee/fuubar")
2848 (commit (string-append "releases/v" version))))
2849 (file-name (git-file-name name version))
2850 (sha256
2851 (base32
2852 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2853 (build-system ruby-build-system)
2854 (arguments
2855 '(;; TODO: Some tests fail, unsure why.
2856 ;; 21 examples, 7 failures
2857 #:tests? #f
2858 #:phases
2859 (modify-phases %standard-phases
2860 (add-before 'build 'delete-certificate
2861 (lambda _
2862 ;; Remove 's.cert_chain' as we do not build with a private key
2863 (substitute* "fuubar.gemspec"
2864 ((".*cert_chain.*") "")
2865 ((".*signing_key.*") ""))
2866 #t))
2867 (replace 'check
2868 (lambda* (#:key tests? #:allow-other-keys)
2869 (when tests?
2870 (invoke "rspec"))
2871 #t)))))
2872 (native-inputs
2873 `(("bundler" ,bundler)))
2874 (propagated-inputs
2875 `(("ruby-rspec-core" ,ruby-rspec-core)
2876 ("ruby-progressbar" ,ruby-progressbar)))
2877 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2878 (description
2879 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2880 string of letters and dots as feedback. It also stops on the first test
2881 failure.")
2882 (home-page "https://github.com/thekompanee/fuubar")
2883 (license license:expat)))
2884
2885 (define-public ruby-haml
2886 (package
2887 (name "ruby-haml")
2888 (version "5.0.4")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (rubygems-uri "haml" version))
2893 (sha256
2894 (base32
2895 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2896 (build-system ruby-build-system)
2897 (arguments
2898 '(#:tests? #f)) ; No included tests
2899 (propagated-inputs
2900 `(("ruby-tilt" ,ruby-tilt)
2901 ("ruby-temple" ,ruby-temple)))
2902 (synopsis "Haml is a Ruby library to generate HTML documents")
2903 (description
2904 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2905 HTML or XML that is designed to express the structure of documents using
2906 indentation rather than closing tags. It was originally envisioned as a
2907 plugin for Ruby on Rails, but it can function as a stand-alone templating
2908 engine.")
2909 (home-page "http://haml.info/")
2910 (license license:expat)))
2911
2912 (define-public ruby-hamster
2913 (package
2914 (name "ruby-hamster")
2915 (version "3.0.0")
2916 (source
2917 (origin
2918 (method url-fetch)
2919 (uri (rubygems-uri "hamster" version))
2920 (sha256
2921 (base32
2922 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2923 (build-system ruby-build-system)
2924 (arguments
2925 '(#:phases
2926 (modify-phases %standard-phases
2927 (add-after 'unpack 'remove-unnecessary-dependencies
2928 (lambda _
2929 ;; pry is a debugging tool, and is unnecessary when running the
2930 ;; tests
2931 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2932 (("require 'pry'") ""))
2933 (substitute* "spec/spec_helper.rb"
2934 (("require \"pry\"") "")
2935 ;; CodeClimate is an online service, and is unnecessary for
2936 ;; running the tests
2937 (("require \"codeclimate-test-reporter\"") "")
2938 (("CodeClimate.*\n") ""))
2939 #t))
2940 ;; No Rakefile is included, so run rspec directly.
2941 (replace 'check
2942 (lambda* (#:key tests? #:allow-other-keys)
2943 (when tests?
2944 (invoke "rspec"))
2945 #t)))))
2946 (propagated-inputs
2947 `(("ruby-concurrent" ,ruby-concurrent)))
2948 (native-inputs
2949 `(("ruby-rspec" ,ruby-rspec)))
2950 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2951 (description
2952 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2953 @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2954 immutable queue or stack).")
2955 (home-page "https://github.com/hamstergem/hamster")
2956 (license license:expat)))
2957
2958 (define-public ruby-hashdiff
2959 (package
2960 (name "ruby-hashdiff")
2961 (version "0.3.8")
2962 (source
2963 (origin
2964 (method url-fetch)
2965 (uri (rubygems-uri "hashdiff" version))
2966 (sha256
2967 (base32
2968 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2969 (build-system ruby-build-system)
2970 (arguments
2971 '(#:phases
2972 (modify-phases %standard-phases
2973 ;; Run tests directly via rspec to avoid Rake issue:
2974 ;; NoMethodError: undefined method `last_comment'
2975 (replace 'check
2976 (lambda* (#:key tests? #:allow-other-keys)
2977 (when tests?
2978 (invoke "rspec"))
2979 #t)))))
2980 (native-inputs
2981 `(("bundler" ,bundler)
2982 ("ruby-rspec" ,ruby-rspec-2)))
2983 (synopsis "HashDiff computes the smallest difference between two hashes")
2984 (description
2985 "HashDiff is a Ruby library to compute the smallest difference between
2986 two hashes.")
2987 (home-page "https://github.com/liufengyun/hashdiff")
2988 (license license:expat)))
2989
2990 (define-public ruby-hydra
2991 ;; No releases yet.
2992 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2993 (revision "0"))
2994 (package
2995 (name "ruby-hydra")
2996 (version (git-version "0.0" revision commit))
2997 (home-page "https://github.com/hyphenation/hydra")
2998 (source (origin
2999 (method git-fetch)
3000 (uri (git-reference (url home-page) (commit commit)))
3001 (file-name (git-file-name name version))
3002 (sha256
3003 (base32
3004 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3005 (build-system ruby-build-system)
3006 (arguments
3007 '(#:phases (modify-phases %standard-phases
3008 (add-after 'unpack 'make-files-writable
3009 (lambda _
3010 (for-each make-file-writable (find-files "."))
3011 #t))
3012 (replace 'check
3013 (lambda _
3014 (invoke "rspec"))))))
3015 (native-inputs
3016 `(("ruby-rspec" ,ruby-rspec)))
3017 (propagated-inputs
3018 `(("ruby-byebug" ,ruby-byebug)))
3019 (synopsis "Ruby hyphenation patterns")
3020 (description
3021 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
3022 (license license:expat))))
3023
3024 (define-public ruby-shindo
3025 (package
3026 (name "ruby-shindo")
3027 (version "0.3.8")
3028 (source (origin
3029 (method url-fetch)
3030 (uri (rubygems-uri "shindo" version))
3031 (sha256
3032 (base32
3033 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
3034 (build-system ruby-build-system)
3035 (arguments
3036 `(#:test-target "shindo_tests"
3037 #:phases
3038 (modify-phases %standard-phases
3039 (add-after 'unpack 'fix-tests
3040 (lambda _
3041 (substitute* "tests/tests_helper.rb"
3042 (("-rubygems") ""))
3043 (substitute* "Rakefile"
3044 (("system \"shindo") "system \"./bin/shindo")
3045 ;; This test doesn't work, so we disable it.
3046 (("fail \"The build_error test should fail") "#")
3047 ((" -rubygems") ""))
3048 #t)))))
3049 (propagated-inputs
3050 `(("ruby-formatador" ,ruby-formatador)))
3051 (synopsis "Simple depth first Ruby testing")
3052 (description "Shindo is a simple depth first testing library for Ruby.")
3053 (home-page "https://github.com/geemus/shindo")
3054 (license license:expat)))
3055
3056 (define-public ruby-rubygems-tasks
3057 (package
3058 (name "ruby-rubygems-tasks")
3059 (version "0.2.5")
3060 (source (origin
3061 (method url-fetch)
3062 (uri (rubygems-uri "rubygems-tasks" version))
3063 (sha256
3064 (base32
3065 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
3066 (build-system ruby-build-system)
3067 ;; Tests need Internet access.
3068 (arguments `(#:tests? #f))
3069 (native-inputs
3070 `(("ruby-rspec" ,ruby-rspec)
3071 ("ruby-yard" ,ruby-yard)))
3072 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3073 (description "Rubygems-task provides Rake tasks for managing and releasing
3074 Ruby Gems.")
3075 (home-page "https://github.com/postmodern/rubygems-tasks")
3076 (license license:expat)))
3077
3078 (define-public ruby-rubyzip
3079 (package
3080 (name "ruby-rubyzip")
3081 (version "1.2.1")
3082 (source
3083 (origin
3084 (method url-fetch)
3085 (uri (rubygems-uri "rubyzip" version))
3086 (sha256
3087 (base32
3088 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
3089 (build-system ruby-build-system)
3090 (arguments
3091 '(#:phases
3092 (modify-phases %standard-phases
3093 (add-before 'check 'patch-tests
3094 (lambda* (#:key inputs #:allow-other-keys)
3095 (substitute* "test/gentestfiles.rb"
3096 (("/usr/bin/zip")
3097 (string-append
3098 (assoc-ref inputs "zip") "/bin/zip")))
3099 (substitute* "test/input_stream_test.rb"
3100 (("/usr/bin/env ruby") (which "ruby")))
3101 #t)))))
3102 (native-inputs
3103 `(("bundler" ,bundler)
3104 ("ruby-simplecov" ,ruby-simplecov)
3105 ("zip" ,zip)
3106 ("unzip" ,unzip)))
3107 (synopsis "Ruby module is for reading and writing zip files")
3108 (description
3109 "The rubyzip module provides ways to read from and create zip files.")
3110 (home-page "https://github.com/rubyzip/rubyzip")
3111 (license license:bsd-2)))
3112
3113 (define-public ruby-simplecov-html
3114 (package
3115 (name "ruby-simplecov-html")
3116 (version "0.10.2")
3117 (source (origin
3118 (method url-fetch)
3119 (uri (rubygems-uri "simplecov-html" version))
3120 (sha256
3121 (base32
3122 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
3123 (build-system ruby-build-system)
3124 (arguments `(#:tests? #f)) ; there are no tests
3125 (native-inputs
3126 `(("bundler" ,bundler)))
3127 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3128 (description "This package provides the default HTML formatter for
3129 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3130 (home-page "https://github.com/colszowka/simplecov-html")
3131 (license license:expat)))
3132
3133 (define-public ruby-simplecov
3134 (package
3135 (name "ruby-simplecov")
3136 (version "0.17.1")
3137 (source (origin
3138 (method url-fetch)
3139 (uri (rubygems-uri "simplecov" version))
3140 (sha256
3141 (base32
3142 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
3143 (build-system ruby-build-system)
3144 ;; Simplecov depends on rubocop for code style checking at build time.
3145 ;; Rubocop needs simplecov at build time.
3146 (arguments `(#:tests? #f))
3147 (propagated-inputs
3148 `(("ruby-json" ,ruby-json)
3149 ("ruby-docile" ,ruby-docile)
3150 ("ruby-simplecov-html" ,ruby-simplecov-html)))
3151 (native-inputs
3152 `(("bundler" ,bundler)))
3153 (synopsis "Code coverage framework for Ruby")
3154 (description "SimpleCov is a code coverage framework for Ruby with a
3155 powerful configuration library and automatic merging of coverage across test
3156 suites.")
3157 (home-page "https://github.com/colszowka/simplecov")
3158 (license license:expat)))
3159
3160 (define-public ruby-useragent
3161 (package
3162 (name "ruby-useragent")
3163 (version "0.16.10")
3164 (source (origin
3165 (method url-fetch)
3166 (uri (rubygems-uri "useragent" version))
3167 (sha256
3168 (base32
3169 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
3170 (build-system ruby-build-system)
3171 (arguments
3172 '(#:tests? #f)) ; no test suite
3173 (synopsis "HTTP user agent parser for Ruby")
3174 (description "UserAgent is a Ruby library that parses and compares HTTP
3175 User Agents.")
3176 (home-page "https://github.com/gshutler/useragent")
3177 (license license:expat)))
3178
3179 (define-public ruby-backports
3180 (package
3181 (name "ruby-backports")
3182 (version "3.11.4")
3183 (source
3184 (origin
3185 (method url-fetch)
3186 (uri (rubygems-uri "backports" version))
3187 (sha256
3188 (base32
3189 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
3190 (build-system ruby-build-system)
3191 (arguments
3192 '(;; TODO: This should be default, but there is one test failure
3193 #:test-target "all_spec"))
3194 (native-inputs
3195 `(("ruby-mspec" ,ruby-mspec)
3196 ("ruby-activesupport" ,ruby-activesupport)))
3197 (synopsis "Backports of the features in newer Ruby versions")
3198 (description
3199 "Backports enables more compatibility across Ruby versions by providing
3200 backports of some features.")
3201 (home-page "https://github.com/marcandre/backports")
3202 (license license:expat)))
3203
3204 (define-public ruby-bacon
3205 (package
3206 (name "ruby-bacon")
3207 (version "1.2.0")
3208 (source (origin
3209 (method url-fetch)
3210 (uri (rubygems-uri "bacon" version))
3211 (sha256
3212 (base32
3213 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
3214 (build-system ruby-build-system)
3215 (synopsis "Small RSpec clone")
3216 (description "Bacon is a small RSpec clone providing all essential
3217 features.")
3218 (home-page "https://github.com/chneukirchen/bacon")
3219 (license license:expat)))
3220
3221 (define-public ruby-bacon-bits
3222 (package
3223 (name "ruby-bacon-bits")
3224 (version "0.1.0")
3225 (source
3226 (origin
3227 (method url-fetch)
3228 (uri (rubygems-uri "bacon-bits" version))
3229 (sha256
3230 (base32
3231 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
3232 (build-system ruby-build-system)
3233 (arguments
3234 ;; No tests
3235 '(#:tests? #f))
3236 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
3237 (synopsis "Extensions to Bacon, for disabling tests, before and after
3238 blocks and more")
3239 (description
3240 "This extends the bacon testing framework with useful extensions to
3241 disable tests, have before and after blocks that run once and more.")
3242 (home-page "https://github.com/cldwalker/bacon-bits")
3243 (license license:expat)))
3244
3245 (define-public ruby-bacon-colored-output
3246 (package
3247 (name "ruby-bacon-colored-output")
3248 (version "1.1.1")
3249 (source
3250 (origin
3251 (method url-fetch)
3252 (uri (rubygems-uri "bacon-colored_output" version))
3253 (sha256
3254 (base32
3255 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
3256 (build-system ruby-build-system)
3257 (arguments
3258 '(;; No included tests
3259 #:tests? #f))
3260 (propagated-inputs
3261 `(("ruby-bacon" ,ruby-bacon)))
3262 (synopsis "Colored output for Bacon test framework")
3263 (description
3264 "This package adds color through ANSI escape codes to Bacon test
3265 output.")
3266 (home-page "https://github.com/whitequark/bacon-colored_output")
3267 (license license:expat)))
3268
3269 (define-public ruby-connection-pool
3270 (package
3271 (name "ruby-connection-pool")
3272 (version "2.2.2")
3273 (source (origin
3274 (method url-fetch)
3275 (uri (rubygems-uri "connection_pool" version))
3276 (sha256
3277 (base32
3278 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
3279 (build-system ruby-build-system)
3280 (native-inputs
3281 `(("bundler" ,bundler)))
3282 (synopsis "Generic connection pool for Ruby")
3283 (description "Connection_pool provides a generic connection pooling
3284 interface for Ruby programs.")
3285 (home-page "https://github.com/mperham/connection_pool")
3286 (license license:expat)))
3287
3288 (define-public ruby-fast-gettext
3289 (package
3290 (name "ruby-fast-gettext")
3291 (version "2.0.3")
3292 (home-page "https://github.com/grosser/fast_gettext")
3293 (source (origin
3294 (method git-fetch)
3295 (uri (git-reference (url home-page)
3296 (commit (string-append "v" version))))
3297 (file-name (git-file-name name version))
3298 (sha256
3299 (base32
3300 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
3301 (build-system ruby-build-system)
3302 (arguments
3303 '(#:test-target "spec"
3304 #:phases (modify-phases %standard-phases
3305 (add-before 'check 'remove-version-constraints
3306 (lambda _
3307 (delete-file "Gemfile.lock")
3308 #t))
3309 (add-before 'check 'remove-activerecord-test
3310 (lambda _
3311 ;; FIXME: This test fails because ActiveRecord depends on
3312 ;; a different version of ruby-sqlite than the currently
3313 ;; available one.
3314 (delete-file
3315 "spec/fast_gettext/translation_repository/db_spec.rb")
3316 #t))
3317 (add-before 'check 'disable-i18n-test
3318 (lambda _
3319 ;; XXX: This test checks i18n intricasies with Rails 3 and
3320 ;; automatically disables itself for Rails 4.0, but does
3321 ;; not know about newer versions as it has not been updated
3322 ;; since 2014. Disable for later versions of Rails too.
3323 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
3324 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
3325 "ActiveRecord::VERSION::MINOR == 0"))
3326 "ActiveRecord::VERSION::MAJOR >= 4"))
3327 #t)))))
3328 (native-inputs
3329 `(;; For tests.
3330 ("ruby-activerecord" ,ruby-activerecord)
3331 ("ruby-activesupport" ,ruby-activesupport)
3332 ("ruby-bump" ,ruby-bump)
3333 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
3334 ("ruby-i18n" ,ruby-i18n)
3335 ("ruby-rubocop" ,ruby-rubocop)
3336 ("ruby-rspec" ,ruby-rspec)
3337 ("ruby-single-cov" ,ruby-single-cov)
3338 ("ruby-sqlite3" ,ruby-sqlite3)
3339 ("ruby-wwtd" ,ruby-wwtd)))
3340 (synopsis "Fast implementation of @code{GetText}")
3341 (description
3342 "This package provides an alternative implementation of the Ruby
3343 @code{GetText} library that is approximately 12x faster yet thread safe.")
3344 ;; Some parts are covered by the Ruby license, see file headers.
3345 (license (list license:expat license:ruby))))
3346
3347 (define-public ruby-net-http-persistent
3348 (package
3349 (name "ruby-net-http-persistent")
3350 (version "3.0.0")
3351 (source (origin
3352 (method url-fetch)
3353 (uri (rubygems-uri "net-http-persistent" version))
3354 (sha256
3355 (base32
3356 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
3357 (build-system ruby-build-system)
3358 (native-inputs
3359 `(("ruby-connection-pool" ,ruby-connection-pool)
3360 ("ruby-hoe" ,ruby-hoe)))
3361 (synopsis "Persistent HTTP connection manager")
3362 (description "Net::HTTP::Persistent manages persistent HTTP connections
3363 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3364 (home-page "https://github.com/drbrain/net-http-persistent")
3365 (license license:expat)))
3366
3367 (define-public ruby-power-assert
3368 (package
3369 (name "ruby-power-assert")
3370 (version "1.1.5")
3371 (source (origin
3372 (method url-fetch)
3373 (uri (rubygems-uri "power_assert" version))
3374 (sha256
3375 (base32
3376 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
3377 (build-system ruby-build-system)
3378 (arguments
3379 '(#:tests? #f)) ; No included tests
3380 (native-inputs
3381 `(("bundler" ,bundler)))
3382 (synopsis "Assert library with descriptive assertion messages")
3383 (description "Power-assert is an assertion library providing descriptive
3384 assertion messages for tests.")
3385 (home-page "https://github.com/k-tsj/power_assert")
3386 (license (list license:bsd-2 license:ruby))))
3387
3388 (define-public ruby-powerpack
3389 (package
3390 (name "ruby-powerpack")
3391 (version "0.1.2")
3392 (source
3393 (origin
3394 (method url-fetch)
3395 (uri (rubygems-uri "powerpack" version))
3396 (sha256
3397 (base32
3398 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3399 (build-system ruby-build-system)
3400 (arguments
3401 '(#:test-target "spec"))
3402 (native-inputs
3403 `(("bundler" ,bundler)
3404 ("ruby-rspec" ,ruby-rspec)
3405 ("ruby-yard" ,ruby-yard)))
3406 (synopsis "Useful extensions to core Ruby classes")
3407 (description
3408 "This package provides a few useful extensions to core Ruby classes,
3409 including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3410 @code{String}.")
3411 (home-page "https://github.com/bbatsov/powerpack")
3412 (license license:expat)))
3413
3414 (define-public ruby-locale
3415 (package
3416 (name "ruby-locale")
3417 (version "2.1.2")
3418 (source (origin
3419 (method url-fetch)
3420 (uri (rubygems-uri "locale" version))
3421 (sha256
3422 (base32
3423 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3424 (build-system ruby-build-system)
3425 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3426 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3427 ;; dependency cycle we disable tests.
3428 (arguments `(#:tests? #f))
3429 (native-inputs
3430 `(("bundler" ,bundler)
3431 ("ruby-yard" ,ruby-yard)))
3432 (synopsis "Ruby library providing basic localization APIs")
3433 (description
3434 "Ruby-Locale is the pure ruby library which provides basic APIs for
3435 localization.")
3436 (home-page "https://github.com/ruby-gettext/locale")
3437 (license (list license:lgpl3+ license:ruby))))
3438
3439 (define-public ruby-temple
3440 (package
3441 (name "ruby-temple")
3442 (version "0.8.2")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (rubygems-uri "temple" version))
3447 (sha256
3448 (base32
3449 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
3450 (build-system ruby-build-system)
3451 (native-inputs
3452 `(("ruby-tilt" ,ruby-tilt)
3453 ("ruby-bacon" ,ruby-bacon)
3454 ("ruby-erubis" ,ruby-erubis)))
3455 (synopsis "Template compilation framework in Ruby")
3456 (description
3457 "Temple is an abstraction and framework for compiling templates to pure
3458 Ruby.")
3459 (home-page "https://github.com/judofyr/temple")
3460 (license license:expat)))
3461
3462 (define-public ruby-text
3463 (package
3464 (name "ruby-text")
3465 (version "1.3.1")
3466 (source (origin
3467 (method url-fetch)
3468 (uri (rubygems-uri "text" version))
3469 (sha256
3470 (base32
3471 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3472 (build-system ruby-build-system)
3473 (synopsis "Collection of text algorithms for Ruby")
3474 (description
3475 "This package provides a collection of text algorithms: Levenshtein,
3476 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
3477 (home-page "https://github.com/threedaymonk/text")
3478 (license license:expat)))
3479
3480 (define-public ruby-gettext
3481 (package
3482 (name "ruby-gettext")
3483 (version "3.1.7")
3484 (source (origin
3485 (method url-fetch)
3486 (uri (rubygems-uri "gettext" version))
3487 (sha256
3488 (base32
3489 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3490 (build-system ruby-build-system)
3491 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3492 ;; which needs ruby-gettext. To break the dependency cycle we disable
3493 ;; tests.
3494 (arguments `(#:tests? #f))
3495 (propagated-inputs
3496 `(("ruby-locale" ,ruby-locale)
3497 ("ruby-text" ,ruby-text)))
3498 (native-inputs
3499 `(("bundler" ,bundler)
3500 ("ruby-yard" ,ruby-yard)))
3501 (synopsis "GNU gettext-like program for Ruby")
3502 (description
3503 "Gettext is a GNU gettext-like program for Ruby. The catalog
3504 file (po-file) used is the same as that used by GNU gettext, allowing you to
3505 use GNU gettext tools for maintenance.")
3506 (home-page "https://ruby-gettext.github.com/")
3507 (license (list license:lgpl3+ license:ruby))))
3508
3509 (define-public ruby-packnga
3510 (package
3511 (name "ruby-packnga")
3512 (version "1.0.4")
3513 (source (origin
3514 (method url-fetch)
3515 (uri (rubygems-uri "packnga" version))
3516 (sha256
3517 (base32
3518 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
3519 (build-system ruby-build-system)
3520 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3521 ;; To break the dependency cycle we disable tests.
3522 (arguments `(#:tests? #f))
3523 (propagated-inputs
3524 `(("ruby-gettext" ,ruby-gettext)
3525 ("ruby-yard" ,ruby-yard)))
3526 (native-inputs
3527 `(("bundler" ,bundler)))
3528 (synopsis "Utility library to package internationalized libraries")
3529 (description
3530 "Packnga is a library to translate to many languages using YARD.")
3531 (home-page "http://ranguba.org/packnga/")
3532 (license license:lgpl2.0+)))
3533
3534 (define-public ruby-test-construct
3535 (package
3536 (name "ruby-test-construct")
3537 (version "2.0.1")
3538 (source
3539 (origin
3540 (method url-fetch)
3541 (uri (rubygems-uri "test_construct" version))
3542 (sha256
3543 (base32
3544 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3545 (build-system ruby-build-system)
3546 (native-inputs
3547 `(("bundler" ,bundler)
3548 ("ruby-mocha" ,ruby-mocha)
3549 ("ruby-rspec" ,ruby-rspec)))
3550 (synopsis "Creates temporary files and directories for testing")
3551 (description
3552 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3553 temporary files and directories during tests.")
3554 (home-page "https://github.com/bhb/test_construct")
3555 (license license:expat)))
3556
3557 (define-public ruby-test-unit
3558 (package
3559 (name "ruby-test-unit")
3560 (version "3.2.5")
3561 (source (origin
3562 (method url-fetch)
3563 (uri (rubygems-uri "test-unit" version))
3564 (sha256
3565 (base32
3566 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3567 (build-system ruby-build-system)
3568 (propagated-inputs
3569 `(("ruby-power-assert" ,ruby-power-assert)))
3570 (native-inputs
3571 `(("bundler" ,bundler)
3572 ("ruby-packnga" ,ruby-packnga)
3573 ("ruby-yard" ,ruby-yard)))
3574 (synopsis "Unit testing framework for Ruby")
3575 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3576 on xUnit principles. These were originally designed by Kent Beck, creator of
3577 extreme programming software development methodology, for Smalltalk's SUnit.
3578 It allows writing tests, checking results and automated testing in Ruby.")
3579 (home-page "https://test-unit.github.io/")
3580 (license (list license:psfl license:ruby))))
3581
3582 (define-public ruby-markaby
3583 (package
3584 (name "ruby-markaby")
3585 (version "0.9.0")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (rubygems-uri "markaby" version))
3590 (sha256
3591 (base32
3592 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3593 (build-system ruby-build-system)
3594 (arguments
3595 '(#:phases
3596 (modify-phases %standard-phases
3597 ;; Run rspec manually without using the Rakefile, as the versions of
3598 ;; Rake and RSpec 2 are incompatible:
3599 ;;
3600 ;; NoMethodError: undefined method `last_comment'
3601 (replace 'check
3602 (lambda* (#:key tests? #:allow-other-keys)
3603 (when tests?
3604 (invoke "rspec"))
3605 #t)))))
3606 (propagated-inputs
3607 `(("ruby-builder" ,ruby-builder)))
3608 (native-inputs
3609 `(("bundler" ,bundler)
3610 ("ruby-rspec" ,ruby-rspec-2)))
3611 (synopsis "Write HTML pages in pure Ruby")
3612 (description
3613 "Markaby allows writing HTML packages in pure Ruby. This is similar to
3614 the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
3615 mixture of HTML and additional ERB syntax.")
3616 (home-page "https://markaby.github.io/")
3617 (license license:expat)))
3618
3619 (define-public ruby-maruku
3620 (package
3621 (name "ruby-maruku")
3622 (version "0.7.3")
3623 (source
3624 (origin
3625 (method url-fetch)
3626 (uri (rubygems-uri "maruku" version))
3627 (sha256
3628 (base32
3629 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3630 (build-system ruby-build-system)
3631 (arguments
3632 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3633 #:tests? #f
3634 #:phases
3635 (modify-phases %standard-phases
3636 (replace 'check
3637 (lambda* (#:key tests? #:allow-other-keys)
3638 (when tests?
3639 (invoke "rspec"))
3640 #t)))))
3641 (native-inputs
3642 `(("ruby-rspec" ,ruby-rspec)
3643 ("ruby-simplecov" ,ruby-simplecov)
3644 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3645 (synopsis "Markdown interpreter in Ruby")
3646 (description
3647 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3648 HTML, and PDF through LaTeX.")
3649 (home-page "https://github.com/bhollis/maruku")
3650 (license license:expat)))
3651
3652 (define-public ruby-metaclass
3653 (package
3654 (name "ruby-metaclass")
3655 (version "0.0.4")
3656 (source (origin
3657 (method url-fetch)
3658 (uri (rubygems-uri "metaclass" version))
3659 (sha256
3660 (base32
3661 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3662 (build-system ruby-build-system)
3663 (arguments
3664 `(#:phases
3665 (modify-phases %standard-phases
3666 (add-after 'unpack 'add-test-unit-to-search-path
3667 (lambda* (#:key inputs #:allow-other-keys)
3668 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3669 (substitute* "Rakefile"
3670 (("t\\.libs << \"test\"" line)
3671 (string-append line "; t.libs << \""
3672 test-unit "/lib/ruby/vendor_ruby"
3673 "/gems/test-unit-"
3674 ,(package-version ruby-test-unit)
3675 "/lib\""))))
3676 #t)))))
3677 (native-inputs
3678 `(("bundler" ,bundler)
3679 ("ruby-test-unit" ,ruby-test-unit)))
3680 (synopsis "Ruby library adding metaclass method to all objects")
3681 (description
3682 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3683 objects.")
3684 (home-page "https://github.com/floehopper/metaclass")
3685 (license license:expat)))
3686
3687 (define-public ruby-mkmf-lite
3688 (package
3689 (name "ruby-mkmf-lite")
3690 (version "0.3.2")
3691 (source (origin
3692 (method url-fetch)
3693 (uri (rubygems-uri "mkmf-lite" version))
3694 (sha256
3695 (base32
3696 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3697 (build-system ruby-build-system)
3698 (propagated-inputs
3699 `(("ruby-ptools" ,ruby-ptools)))
3700 (synopsis "Lightweight alternative to @code{mkmf}")
3701 (description
3702 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3703 for use as a library. It does not create packages, builds, or log files of
3704 any kind. Instead, it provides mixin methods that you can use in FFI or tests
3705 to check for the presence of header files, constants, and so on.")
3706 (home-page "https://github.com/djberg96/mkmf-lite")
3707 (license license:asl2.0)))
3708
3709 (define-public ruby-mspec
3710 (package
3711 (name "ruby-mspec")
3712 (version "1.9.1")
3713 (source
3714 (origin
3715 (method url-fetch)
3716 (uri (rubygems-uri "mspec" version))
3717 (sha256
3718 (base32
3719 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3720 (build-system ruby-build-system)
3721 (arguments
3722 '(;; TODO: 3 test failures
3723 ;; ./spec/mocks/mock_spec.rb:82
3724 ;; ./spec/utils/name_map_spec.rb:151
3725 ;; ./spec/utils/name_map_spec.rb:155
3726 #:tests? #f
3727 #:phases
3728 (modify-phases %standard-phases
3729 (add-after 'extract-gemspec 'change-dependency-constraints
3730 (lambda _
3731 (substitute* "mspec.gemspec"
3732 (("rake.*") "rake>)\n")
3733 (("rspec.*") "rspec>)\n"))
3734 #t))
3735 (replace 'check
3736 (lambda* (#:key tests? #:allow-other-keys)
3737 (when tests?
3738 (invoke "rspec" "spec"))
3739 #t)))))
3740 (native-inputs
3741 `(("bundler" ,bundler)
3742 ("ruby-rake" ,ruby-rake)
3743 ("ruby-rspec" ,ruby-rspec)))
3744 (synopsis "MSpec is a specialized framework for RubySpec")
3745 (description
3746 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3747 for basic features. MSpec contains additional features that assist in writing
3748 specs for Ruby implementations in ruby/spec.")
3749 (home-page "http://rubyspec.org")
3750 (license license:expat)))
3751
3752 (define-public ruby-mysql2
3753 (package
3754 (name "ruby-mysql2")
3755 (version "0.5.2")
3756 (source
3757 (origin
3758 (method git-fetch)
3759 (uri (git-reference
3760 (url "https://github.com/brianmario/mysql2")
3761 (commit version)))
3762 (file-name (git-file-name name version))
3763 (sha256
3764 (base32
3765 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3766 (build-system ruby-build-system)
3767 (arguments
3768 '(;; TODO: Tests require a running MySQL/MariaDB service
3769 #:tests? #f
3770 #:phases
3771 (modify-phases %standard-phases
3772 (replace 'replace-git-ls-files
3773 (lambda _
3774 (substitute* "mysql2.gemspec"
3775 (("git ls-files .*`") "find . -type f |sort`"))
3776 #t))
3777 (add-before 'install 'set-MAKEFLAGS
3778 (lambda* (#:key outputs #:allow-other-keys)
3779 (setenv "MAKEFLAGS"
3780 (string-append
3781 "V=1 "
3782 "prefix=" (assoc-ref outputs "out")))
3783 #t))
3784 ;; Move the 'check phase to after 'install, as then you can test
3785 ;; using the installed mysql2 gem in the store.
3786 (delete 'check)
3787 (add-after 'install 'check
3788 (lambda* (#:key outputs tests? #:allow-other-keys)
3789 (setenv "GEM_PATH"
3790 (string-append
3791 (getenv "GEM_PATH")
3792 ":"
3793 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3794 (when tests?
3795 (invoke "rspec"))
3796 #t)))))
3797 (inputs
3798 `(("mariadb" ,mariadb "lib")
3799 ("mariadb-dev" ,mariadb "dev")
3800 ("zlib" ,zlib)))
3801 (native-inputs
3802 `(("ruby-rspec" ,ruby-rspec)
3803 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3804 (synopsis "MySQL library for Ruby, binding to libmysql")
3805 (description
3806 "This package provides a simple, fast MySQL library for Ruby, binding to
3807 libmysql.")
3808 (home-page "https://github.com/brianmario/mysql2")
3809 (license license:expat)))
3810
3811 (define-public ruby-blankslate
3812 (package
3813 (name "ruby-blankslate")
3814 (version "3.1.3")
3815 (source (origin
3816 (method url-fetch)
3817 (uri (rubygems-uri "blankslate" version))
3818 (sha256
3819 (base32
3820 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3821 (build-system ruby-build-system)
3822 (arguments
3823 `(#:phases
3824 (modify-phases %standard-phases
3825 (replace 'check
3826 (lambda _ (invoke "rspec" "spec/"))))))
3827 (native-inputs
3828 `(("bundler" ,bundler)
3829 ("ruby-rspec" ,ruby-rspec)))
3830 (synopsis "Abstract base class with no predefined methods")
3831 (description
3832 "BlankSlate provides an abstract base class with no predefined
3833 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3834 as a base class when writing classes that depend upon
3835 @code{method_missing} (e.g. dynamic proxies).")
3836 (home-page "https://github.com/masover/blankslate")
3837 (license license:expat)))
3838
3839 (define-public ruby-bond
3840 (package
3841 (name "ruby-bond")
3842 (version "0.5.1")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 (uri (rubygems-uri "bond" version))
3847 (sha256
3848 (base32
3849 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3850 (build-system ruby-build-system)
3851 (native-inputs
3852 `(("ruby-bacon" ,ruby-bacon)
3853 ("ruby-bacon-bits" ,ruby-bacon-bits)
3854 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3855 (synopsis "Bond can provide custom autocompletion for arguments, methods
3856 and more")
3857 (description
3858 "Bond can autocomplete argument(s) to methods, uniquely completing per
3859 module, per method and per argument. Bond provides a configuration system and
3860 a DSL for creating custom completions and completion rules. Bond can also
3861 load completions that ship with gems. Bond is able to offer more than irb's
3862 completion since it uses the full line of input when completing as opposed to
3863 irb's last-word approach.")
3864 (home-page "http://tagaholic.me/bond/")
3865 (license license:expat)))
3866
3867 (define-public ruby-idn-ruby
3868 (package
3869 (name "ruby-idn-ruby")
3870 (version "0.1.0")
3871 (source
3872 (origin
3873 (method url-fetch)
3874 (uri (rubygems-uri "idn-ruby" version))
3875 (sha256
3876 (base32
3877 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3878 (build-system ruby-build-system)
3879 (arguments
3880 '(#:phases
3881 (modify-phases %standard-phases
3882 (delete 'check)
3883 (add-after 'install 'check
3884 (lambda* (#:key tests? outputs #:allow-other-keys)
3885 (when tests?
3886 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3887 (name-and-version (basename gem-file ".gem")))
3888 (apply invoke
3889 "ruby" "--verbose"
3890 (string-append "-I"
3891 (assoc-ref outputs "out")
3892 "/lib/ruby/vendor_ruby/gems/"
3893 name-and-version
3894 "/lib")
3895 (find-files "./test" ".*\\.rb"))))
3896 #t)))))
3897 (inputs
3898 `(("libidn" ,libidn)))
3899 (synopsis "Ruby Bindings for the GNU LibIDN library")
3900 (description
3901 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3902 Stringprep, Punycode and IDNA specifications. These are used to encode and
3903 decode internationalized domain + names according to the IDNA2003
3904 specifications.
3905
3906 Included are the most important parts of the Stringprep, Punycode and IDNA
3907 APIs like performing Stringprep processings, encoding to and decoding from
3908 Punycode strings and converting entire domain names to and from the ACE
3909 encoded form.")
3910 (home-page "https://github.com/deepfryed/idn-ruby")
3911 (license license:asl2.0)))
3912
3913 (define-public ruby-instantiator
3914 (package
3915 (name "ruby-instantiator")
3916 (version "0.0.7")
3917 (source (origin
3918 (method url-fetch)
3919 (uri (rubygems-uri "instantiator" version))
3920 (sha256
3921 (base32
3922 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
3923 (build-system ruby-build-system)
3924 (arguments
3925 `(#:phases
3926 (modify-phases %standard-phases
3927 (add-after 'unpack 'add-test-unit-to-search-path
3928 (lambda* (#:key inputs #:allow-other-keys)
3929 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3930 (substitute* "Rakefile"
3931 (("t\\.libs << \"test\"" line)
3932 (string-append line "; t.libs << \""
3933 test-unit "/lib/ruby/vendor_ruby"
3934 "/gems/test-unit-"
3935 ,(package-version ruby-test-unit)
3936 "/lib\""))))
3937 #t)))))
3938 (propagated-inputs
3939 `(("ruby-blankslate" ,ruby-blankslate)))
3940 (native-inputs
3941 `(("bundler" ,bundler)
3942 ("ruby-test-unit" ,ruby-test-unit)))
3943 (synopsis "Instantiate an arbitrary Ruby class")
3944 (description
3945 "Instantiator lets you instantiate an arbitrary Ruby class without
3946 knowing anything about the constructor.")
3947 (home-page "https://github.com/floehopper/instantiator")
3948 (license license:expat)))
3949
3950 (define-public ruby-introspection
3951 (package
3952 (name "ruby-introspection")
3953 (version "0.0.4")
3954 (source (origin
3955 (method url-fetch)
3956 (uri (rubygems-uri "introspection" version))
3957 (sha256
3958 (base32
3959 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
3960 (build-system ruby-build-system)
3961 (arguments
3962 `(#:phases
3963 (modify-phases %standard-phases
3964 (add-after 'unpack 'add-test-unit-to-search-path
3965 (lambda* (#:key inputs #:allow-other-keys)
3966 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3967 (substitute* "Rakefile"
3968 (("t\\.libs << \"test\"" line)
3969 (string-append line "; t.libs << \""
3970 test-unit "/lib/ruby/vendor_ruby"
3971 "/gems/test-unit-"
3972 ,(package-version ruby-test-unit)
3973 "/lib\""))))
3974 #t)))))
3975 (propagated-inputs
3976 `(("ruby-instantiator" ,ruby-instantiator)
3977 ("ruby-metaclass" ,ruby-metaclass)))
3978 (native-inputs
3979 `(("bundler" ,bundler)
3980 ("ruby-blankslate" ,ruby-blankslate)
3981 ("ruby-test-unit" ,ruby-test-unit)))
3982 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3983 (description
3984 "Introspection provides tools to inspect the hierarchy of method
3985 definitions on a Ruby object.")
3986 (home-page "https://github.com/floehopper/introspection")
3987 (license license:expat)))
3988
3989 (define-public ruby-redcarpet
3990 (package
3991 (name "ruby-redcarpet")
3992 (version "3.5.0")
3993 (source (origin
3994 (method url-fetch)
3995 (uri (rubygems-uri "redcarpet" version))
3996 (sha256
3997 (base32
3998 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
3999 (build-system ruby-build-system)
4000 (arguments
4001 `(#:phases
4002 (modify-phases %standard-phases
4003 ;; The gem archive does not include the conformance tests.
4004 (add-after 'unpack 'disable-conformance-tests
4005 (lambda _
4006 (substitute* "Rakefile"
4007 (("task :test => %w\\[test:unit test:conformance\\]")
4008 "task :test => %w[test:unit]"))
4009 #t)))))
4010 (native-inputs
4011 `(("bundler" ,bundler)
4012 ("ruby-test-unit" ,ruby-test-unit)
4013 ("ruby-rake-compiler" ,ruby-rake-compiler)))
4014 (synopsis "Extensible Markdown to (X)HTML converter")
4015 (description
4016 "Redcarpet is an extensible Ruby library for Markdown processing and
4017 conversion to (X)HTML.")
4018 (home-page "https://github.com/vmg/redcarpet")
4019 (license license:expat)))
4020
4021 (define-public ruby-rerun
4022 (package
4023 (name "ruby-rerun")
4024 (version "0.13.0")
4025 (source
4026 (origin
4027 (method url-fetch)
4028 (uri (rubygems-uri "rerun" version))
4029 (sha256
4030 (base32
4031 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
4032 (build-system ruby-build-system)
4033 (arguments
4034 '(#:tests? #f)) ; No included tests
4035 (propagated-inputs
4036 `(("ruby-listen" ,ruby-listen)))
4037 (synopsis "Run a process, and restart when some monitored files change")
4038 (description
4039 "Rerun is a tool to launch programs, then monitor the file system, and
4040 restart the program when any of the monitored files change. It's written in
4041 Ruby, but can be used for all programs.")
4042 (home-page "https://github.com/alexch/rerun/")
4043 (license license:expat)))
4044
4045 (define-public ruby-maxitest
4046 (package
4047 (name "ruby-maxitest")
4048 (version "3.6.0")
4049 (home-page "https://github.com/grosser/maxitest")
4050 (source (origin
4051 ;; Pull from git because the gem does not contain tests.
4052 (method git-fetch)
4053 (uri (git-reference
4054 (url home-page)
4055 (commit (string-append "v" version))))
4056 (file-name (git-file-name name version))
4057 (sha256
4058 (base32
4059 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
4060 (build-system ruby-build-system)
4061 (arguments
4062 '(#:test-target "default"
4063 #:phases (modify-phases %standard-phases
4064 (replace 'replace-git-ls-files
4065 (lambda _
4066 (substitute* "maxitest.gemspec"
4067 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
4068 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
4069 #t))
4070 (add-before 'check 'remove-version-constraints
4071 (lambda _
4072 ;; Don't use specific versions of dependencies, instead
4073 ;; take whatever is available in Guix.
4074 (delete-file "Gemfile.lock")
4075 #t))
4076 (add-before 'check 'add-mtest-on-PATH
4077 (lambda _
4078 ;; Tests use 'mtest' which is not automatically added on
4079 ;; PATH.
4080 (setenv "PATH" (string-append (getcwd) "/bin:"
4081 (getenv "PATH")))
4082 #t)))))
4083 (native-inputs
4084 `(("ps" ,procps)
4085 ("ruby-bump" ,ruby-bump)
4086 ("ruby-byebug" ,ruby-byebug)
4087 ("ruby-rspec" ,ruby-rspec)
4088 ("ruby-wwtd" ,ruby-wwtd)))
4089 (propagated-inputs
4090 `(("ruby-minitest" ,ruby-minitest)))
4091 (synopsis "Minitest with extra features")
4092 (description
4093 "Maxitest is a wrapper around Minitest with extra functionality such
4094 as timeouts, an @command{mtest} executable that can run tests by line
4095 number, support for interrupted tests, better backtraces, and more.")
4096 (license license:expat)))
4097
4098 (define-public ruby-mocha
4099 (package
4100 (name "ruby-mocha")
4101 (version "1.11.2")
4102 (source (origin
4103 (method url-fetch)
4104 (uri (rubygems-uri "mocha" version))
4105 (sha256
4106 (base32
4107 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4108 (build-system ruby-build-system)
4109 (arguments
4110 `(#:phases
4111 (modify-phases %standard-phases
4112 (add-before 'check 'remove-rubocop-dependency
4113 (lambda _
4114 ;; Disable dependency on Rubocop, which is just a linter,
4115 ;; and would introduce a circular dependency.
4116 (substitute* "mocha.gemspec"
4117 ((".*rubocop.*")
4118 "true\n"))
4119 #t)))))
4120 (native-inputs
4121 `(("ruby-introspection" ,ruby-introspection)))
4122 (synopsis "Mocking and stubbing library for Ruby")
4123 (description
4124 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
4125 allows mocking and stubbing of methods on real (non-mock) classes.")
4126 (home-page "http://gofreerange.com/mocha/docs")
4127 ;; Mocha can be used with either license at the users choice.
4128 (license (list license:expat license:ruby))))
4129
4130 (define-public ruby-mocha-on-bacon
4131 (package
4132 (name "ruby-mocha-on-bacon")
4133 (version "0.2.3")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (rubygems-uri "mocha-on-bacon" version))
4138 (sha256
4139 (base32
4140 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
4141 (build-system ruby-build-system)
4142 (arguments
4143 ;; rubygems.org release missing tests
4144 '(#:tests? #f))
4145 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
4146 (synopsis "Mocha adapter for Bacon")
4147 (description
4148 "This package provides a Mocha adapter for Bacon, allowing you to use the
4149 Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
4150 (home-page
4151 "https://github.com/alloy/mocha-on-bacon")
4152 (license license:expat)))
4153
4154 (define-public ruby-net-ssh
4155 (package
4156 (name "ruby-net-ssh")
4157 (version "4.2.0")
4158 (source (origin
4159 (method url-fetch)
4160 (uri (rubygems-uri "net-ssh" version))
4161 (sha256
4162 (base32
4163 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
4164 (build-system ruby-build-system)
4165 (native-inputs
4166 `(("bundler" ,bundler)
4167 ("ruby-mocha" ,ruby-mocha)
4168 ("ruby-test-unit" ,ruby-test-unit)))
4169 (synopsis "Ruby implementation of the SSH2 client protocol")
4170 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
4171 client protocol. It allows you to write programs that invoke and interact
4172 with processes on remote servers, via SSH2.")
4173 (home-page "https://github.com/net-ssh/net-ssh")
4174 (license license:expat)))
4175
4176 (define-public ruby-net-scp
4177 (package
4178 (name "ruby-net-scp")
4179 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
4180 (version "1.2.2.rc2")
4181 (source
4182 (origin
4183 (method git-fetch)
4184 (uri (git-reference
4185 (url "https://github.com/net-ssh/net-scp")
4186 (commit (string-append "v" version))))
4187 (file-name (git-file-name name version))
4188 (sha256
4189 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
4190 (build-system ruby-build-system)
4191 (native-inputs
4192 `(("bundler" ,bundler)
4193 ("ruby-test-unit" ,ruby-test-unit)
4194 ("ruby-mocha" ,ruby-mocha)))
4195 (propagated-inputs
4196 `(("ruby-net-ssh" ,ruby-net-ssh)))
4197 (synopsis "Pure-Ruby SCP client library")
4198 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
4199 client protocol.")
4200 (home-page "https://github.com/net-ssh/net-scp")
4201 (license license:expat)))
4202
4203 (define-public ruby-minitest
4204 (package
4205 (name "ruby-minitest")
4206 (version "5.11.3")
4207 (source (origin
4208 (method url-fetch)
4209 (uri (rubygems-uri "minitest" version))
4210 (sha256
4211 (base32
4212 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
4213 (build-system ruby-build-system)
4214 (native-inputs
4215 `(("ruby-hoe" ,ruby-hoe)))
4216 (synopsis "Small test suite library for Ruby")
4217 (description "Minitest provides a complete suite of Ruby testing
4218 facilities supporting TDD, BDD, mocking, and benchmarking.")
4219 (home-page "https://github.com/seattlerb/minitest")
4220 (license license:expat)))
4221
4222 ;; This is the last release of Minitest 4, which is used by some packages.
4223 (define-public ruby-minitest-4
4224 (package (inherit ruby-minitest)
4225 (version "4.7.5")
4226 (source (origin
4227 (method url-fetch)
4228 (uri (rubygems-uri "minitest" version))
4229 (sha256
4230 (base32
4231 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
4232 (arguments
4233 `(#:phases
4234 (modify-phases %standard-phases
4235 (add-after 'unpack 'remove-unsupported-method
4236 (lambda _
4237 (substitute* "Rakefile"
4238 (("self\\.rubyforge_name = .*") ""))
4239 #t))
4240 (add-after 'build 'exclude-failing-tests
4241 (lambda _
4242 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
4243 ;; Fixnum.
4244 (delete-file "test/minitest/test_minitest_spec.rb")
4245 #t)))))))
4246
4247 (define-public ruby-minitest-around
4248 (package
4249 (name "ruby-minitest-around")
4250 (version "0.5.0")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (rubygems-uri "minitest-around" version))
4255 (sha256
4256 (base32
4257 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
4258 (build-system ruby-build-system)
4259 (arguments
4260 '(#:phases
4261 (modify-phases %standard-phases
4262 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
4263 (lambda _
4264 (substitute* "minitest-around.gemspec"
4265 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
4266 #t)))))
4267 (propagated-inputs
4268 `(("ruby-minitest" ,ruby-minitest)))
4269 (native-inputs
4270 `(("bundler" ,bundler)
4271 ("ruby-cucumber" ,ruby-cucumber)
4272 ("ruby-bump" ,ruby-bump)
4273 ("ruby-test-construct" ,ruby-test-construct)))
4274 (synopsis "Run code around tests in Minitest")
4275 (description
4276 "This library provides a way to run code around tests in Minitest,
4277 written using either the unit test or spec style.")
4278 (home-page "https://github.com/splattael/minitest-around")
4279 (license license:expat)))
4280
4281 (define-public ruby-minitest-sprint
4282 (package
4283 (name "ruby-minitest-sprint")
4284 (version "1.1.0")
4285 (source (origin
4286 (method url-fetch)
4287 (uri (rubygems-uri "minitest-sprint" version))
4288 (sha256
4289 (base32
4290 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
4291 (build-system ruby-build-system)
4292 (native-inputs
4293 `(("ruby-hoe" ,ruby-hoe)
4294 ("ruby-minitest" ,ruby-minitest)))
4295 (synopsis "Fast test suite runner for minitest")
4296 (description "Minitest-sprint is a test runner for minitest that makes it
4297 easier to re-run individual failing tests.")
4298 (home-page "https://github.com/seattlerb/minitest-sprint")
4299 (license license:expat)))
4300
4301 (define-public ruby-minitest-bacon
4302 (package
4303 (name "ruby-minitest-bacon")
4304 (version "1.0.3")
4305 (source (origin
4306 (method url-fetch)
4307 (uri (rubygems-uri "minitest-bacon" version))
4308 (sha256
4309 (base32
4310 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
4311 (build-system ruby-build-system)
4312 (native-inputs
4313 `(("ruby-hoe" ,ruby-hoe)))
4314 (inputs
4315 `(("ruby-minitest" ,ruby-minitest)))
4316 (synopsis "Bacon compatibility library for minitest")
4317 (description "Minitest-bacon extends minitest with bacon-like
4318 functionality, making it easier to migrate test suites from bacon to minitest.")
4319 (home-page "https://github.com/seattlerb/minitest-bacon")
4320 (license license:expat)))
4321
4322 (define-public ruby-minitest-focus
4323 (package
4324 (name "ruby-minitest-focus")
4325 (version "1.1.2")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (rubygems-uri "minitest-focus" version))
4330 (sha256
4331 (base32
4332 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4333 (build-system ruby-build-system)
4334 (propagated-inputs
4335 `(("ruby-minitest" ,ruby-minitest)))
4336 (native-inputs
4337 `(("ruby-hoe" ,ruby-hoe)))
4338 (synopsis "Allows a few specific tests to be focused on")
4339 (description
4340 "@code{minitest-focus} gives the ability focus on a few tests with ease
4341 without having to use command-line arguments. It introduces a @code{focus}
4342 class method for use in testing classes, specifying that the next defined test
4343 is to be run.")
4344 (home-page "https://github.com/seattlerb/minitest-focus")
4345 (license license:expat)))
4346
4347 (define-public ruby-minitest-pretty-diff
4348 ;; Use git reference because gem is out of date and does not contain testing
4349 ;; script. There are no releases on GitHub.
4350 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4351 (package
4352 (name "ruby-minitest-pretty-diff")
4353 (version (string-append "0.1-1." (string-take commit 8)))
4354 (source (origin
4355 (method git-fetch)
4356 (uri (git-reference
4357 (url "https://github.com/adammck/minitest-pretty_diff")
4358 (commit commit)))
4359 (file-name (string-append name "-" version "-checkout"))
4360 (sha256
4361 (base32
4362 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4363 (build-system ruby-build-system)
4364 (arguments
4365 `(#:phases
4366 (modify-phases %standard-phases
4367 (replace 'check
4368 (lambda _
4369 (invoke "script/test"))))))
4370 (native-inputs
4371 `(("bundler" ,bundler)
4372 ("ruby-turn" ,ruby-turn)))
4373 (synopsis "Pretty-print hashes and arrays in MiniTest")
4374 (description
4375 "@code{minitest-pretty_diff} monkey-patches
4376 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4377 diffing them. This makes it easier to spot differences between nested
4378 structures when tests fail.")
4379 (home-page "https://github.com/adammck/minitest-pretty_diff")
4380 (license license:expat))))
4381
4382 (define-public ruby-minitest-moar
4383 (package
4384 (name "ruby-minitest-moar")
4385 (version "0.0.4")
4386 (source
4387 (origin
4388 (method url-fetch)
4389 (uri (rubygems-uri "minitest-moar" version))
4390 (sha256
4391 (base32
4392 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4393 (build-system ruby-build-system)
4394 (arguments
4395 `(#:phases
4396 (modify-phases %standard-phases
4397 (add-before 'check 'clean-dependencies
4398 (lambda _
4399 ;; Remove all gems defined in the Gemfile because these are not
4400 ;; truly needed.
4401 (substitute* "Gemfile"
4402 (("gem .*") ""))
4403 ;; Remove byebug as not needed to run tests.
4404 (substitute* "test/test_helper.rb"
4405 (("require 'byebug'") ""))
4406 #t)))))
4407 (native-inputs
4408 `(("bundler" ,bundler)
4409 ("ruby-minitest" ,ruby-minitest)))
4410 (synopsis "Extra features and changes to MiniTest")
4411 (description "@code{MiniTest Moar} add some additional features and
4412 changes some default behaviours in MiniTest. For instance, Moar replaces the
4413 MiniTest @code{Object#stub} with a global @code{stub} method.")
4414 (home-page "https://github.com/dockyard/minitest-moar")
4415 (license license:expat)))
4416
4417 (define-public ruby-minitest-bonus-assertions
4418 (package
4419 (name "ruby-minitest-bonus-assertions")
4420 (version "3.0")
4421 (source
4422 (origin
4423 (method url-fetch)
4424 (uri (rubygems-uri "minitest-bonus-assertions" version))
4425 (sha256
4426 (base32
4427 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
4428 (build-system ruby-build-system)
4429 (arguments
4430 `(#:phases
4431 (modify-phases %standard-phases
4432 (add-before 'check 'clean-dependencies
4433 (lambda _
4434 ;; Remove unneeded require statement that would entail another
4435 ;; dependency.
4436 (substitute* "test/minitest_config.rb"
4437 (("require 'minitest/bisect'") ""))
4438 #t)))))
4439 (native-inputs
4440 `(("ruby-hoe" ,ruby-hoe)
4441 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4442 ("ruby-minitest-focus" ,ruby-minitest-focus)
4443 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4444 (synopsis "Bonus assertions for @code{Minitest}")
4445 (description
4446 "Minitest bonus assertions provides extra MiniTest assertions. For
4447 instance, it provides @code{assert_true}, @code{assert_false} and
4448 @code{assert_set_equal}.")
4449 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4450 (license license:expat)))
4451
4452 (define-public ruby-minitest-reporters
4453 (package
4454 (name "ruby-minitest-reporters")
4455 (version "1.3.6")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (rubygems-uri "minitest-reporters" version))
4460 (sha256
4461 (base32
4462 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4463 (build-system ruby-build-system)
4464 (arguments
4465 '(#:phases
4466 (modify-phases %standard-phases
4467 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4468 ;; including it as an input can lead to circular dependencies.
4469 (add-after 'unpack 'remove-rubocop-from-Rakefile
4470 (lambda _
4471 (substitute* "Rakefile"
4472 (("require 'rubocop/rake\\_task'") "")
4473 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4474 #t))
4475 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4476 (lambda _
4477 (substitute* "minitest-reporters.gemspec"
4478 ((".*%q<rubocop>.*") "\n"))
4479 #t)))))
4480 (propagated-inputs
4481 `(("ruby-ansi" ,ruby-ansi)
4482 ("ruby-builder" ,ruby-builder)
4483 ("ruby-minitest" ,ruby-minitest)
4484 ("ruby-progressbar" ,ruby-progressbar)))
4485 (native-inputs
4486 `(("bundler" ,bundler)
4487 ("ruby-maruku" ,ruby-maruku)))
4488 (synopsis "Enhanced reporting for Minitest tests")
4489 (description
4490 "@code{minitest/reporters} provides a custom Minitest runner to improve
4491 how the test state is reported. A number of different reporters are
4492 available, including a spec reporter, progress bar reporter, a HTML
4493 reporter.")
4494 (home-page "https://github.com/kern/minitest-reporters")
4495 (license license:expat)))
4496
4497 (define-public ruby-minitest-rg
4498 (package
4499 (name "ruby-minitest-rg")
4500 (version "5.2.0")
4501 (source
4502 (origin
4503 (method url-fetch)
4504 (uri (rubygems-uri "minitest-rg" version))
4505 (sha256
4506 (base32
4507 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4508 (build-system ruby-build-system)
4509 (arguments
4510 ;; Some tests fail even outside Guix, so disable tests.
4511 ;; https://github.com/blowmage/minitest-rg/issues/12
4512 ;; https://github.com/blowmage/minitest-rg/pull/13
4513 `(#:tests? #f))
4514 (propagated-inputs
4515 `(("ruby-minitest" ,ruby-minitest)))
4516 (synopsis "Coloured output for Minitest")
4517 (description
4518 "@code{minitest-rg} changes the colour of the output from Minitest.")
4519 (home-page "https://blowmage.com/minitest-rg/")
4520 (license license:expat)))
4521
4522 (define-public ruby-minitest-hooks
4523 (package
4524 (name "ruby-minitest-hooks")
4525 (version "1.4.2")
4526 (source
4527 (origin
4528 (method url-fetch)
4529 (uri (rubygems-uri "minitest-hooks" version))
4530 (sha256
4531 (base32
4532 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
4533 (build-system ruby-build-system)
4534 (arguments
4535 '(#:test-target "spec"))
4536 (native-inputs
4537 `(("ruby-sequel" ,ruby-sequel)
4538 ("ruby-sqlite3" ,ruby-sqlite3)))
4539 (synopsis "Hooks for the minitest framework")
4540 (description
4541 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4542 @code{around_all} hooks for Minitest. This allows, for instance, running each
4543 suite of specs inside a database transaction, running each spec inside its own
4544 savepoint inside that transaction. This can significantly speed up testing
4545 for specs that share expensive database setup code.")
4546 (home-page "https://github.com/jeremyevans/minitest-hooks")
4547 (license license:expat)))
4548
4549 (define-public ruby-daemons
4550 (package
4551 (name "ruby-daemons")
4552 (version "1.2.5")
4553 (source (origin
4554 (method url-fetch)
4555 (uri (rubygems-uri "daemons" version))
4556 (sha256
4557 (base32
4558 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
4559 (build-system ruby-build-system)
4560 (arguments
4561 `(#:tests? #f)) ; no test suite
4562 (synopsis "Daemonize Ruby programs")
4563 (description "Daemons provides a way to wrap existing Ruby scripts to be
4564 run as a daemon and to be controlled by simple start/stop/restart commands.")
4565 (home-page "https://github.com/thuehlinger/daemons")
4566 (license license:expat)))
4567
4568 (define-public ruby-data_uri
4569 (package
4570 (name "ruby-data_uri")
4571 (version "0.1.0")
4572 (source
4573 (origin
4574 (method url-fetch)
4575 (uri (rubygems-uri "data_uri" version))
4576 (sha256
4577 (base32
4578 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4579 (build-system ruby-build-system)
4580 (synopsis "URI class for parsing data URIs")
4581 (description
4582 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4583 embedded inside a URI. The URI::Data class provides support for parsing these
4584 URIs using the normal URI.parse method.")
4585 (home-page "https://github.com/dball/data_uri")
4586 (license license:expat)))
4587
4588 (define-public ruby-deep-merge
4589 (package
4590 (name "ruby-deep-merge")
4591 (version "1.2.1")
4592 (home-page "https://github.com/danielsdeleo/deep_merge")
4593 ;; The Rubygem source does not contain the gemspec required for tests.
4594 (source (origin
4595 (method git-fetch)
4596 (uri (git-reference (url home-page) (commit version)))
4597 (file-name (git-file-name name version))
4598 (sha256
4599 (base32
4600 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4601 (build-system ruby-build-system)
4602 (native-inputs
4603 `(("ruby-minitest" ,ruby-minitest)))
4604 (synopsis "Recursively merge hashes")
4605 (description
4606 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4607 you to merge elements inside a hash together recursively.")
4608 (license license:expat)))
4609
4610 (define-public ruby-git
4611 (package
4612 (name "ruby-git")
4613 (version "1.3.0")
4614 (source (origin
4615 (method url-fetch)
4616 (uri (rubygems-uri "git" version))
4617 (sha256
4618 (base32
4619 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
4620 (build-system ruby-build-system)
4621 (arguments
4622 `(#:tests? #f ; no tests
4623 #:phases (modify-phases %standard-phases
4624 (add-after 'install 'patch-git-binary
4625 (lambda* (#:key inputs outputs #:allow-other-keys)
4626 ;; Make the default git binary an absolute path to the
4627 ;; store.
4628 (let ((git (string-append (assoc-ref inputs "git")
4629 "/bin/git"))
4630 (config (string-append
4631 (assoc-ref outputs "out")
4632 "/lib/ruby/vendor_ruby/gems/git-"
4633 ,version "/lib/git/config.rb")))
4634 (substitute* (list config)
4635 (("'git'")
4636 (string-append "'" git "'")))
4637 #t))))))
4638 (inputs
4639 `(("git" ,git)))
4640 (synopsis "Ruby wrappers for Git")
4641 (description "Ruby/Git is a Ruby library that can be used to create, read
4642 and manipulate Git repositories by wrapping system calls to the git binary.")
4643 (home-page "https://github.com/schacon/ruby-git")
4644 (license license:expat)))
4645
4646 (define-public ruby-hocon
4647 (package
4648 (name "ruby-hocon")
4649 (version "1.3.1")
4650 (home-page "https://github.com/puppetlabs/ruby-hocon")
4651 (source (origin
4652 (method git-fetch)
4653 (uri (git-reference (url home-page) (commit version)))
4654 (file-name (git-file-name name version))
4655 (sha256
4656 (base32
4657 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
4658 (build-system ruby-build-system)
4659 (arguments
4660 '(#:phases (modify-phases %standard-phases
4661 (replace 'check
4662 (lambda* (#:key tests? #:allow-other-keys)
4663 (if tests?
4664 (invoke "rspec")
4665 (format #t "test suite not run~%"))
4666 #t)))))
4667 (native-inputs
4668 `(("bundler" ,bundler)
4669 ("ruby-rspec" ,ruby-rspec)))
4670 (synopsis "HOCON config library")
4671 (description
4672 "This package provides Ruby support for the @acronym{HOCON,
4673 Human-Optimized Config Object Notation} configuration file format. It
4674 supports parsing and modifying HOCON and JSON files, and rendering parsed
4675 objects back to a @code{String}.")
4676 (license license:asl2.0)))
4677
4678 (define-public ruby-slop
4679 (package
4680 (name "ruby-slop")
4681 (version "4.5.0")
4682 (source (origin
4683 (method url-fetch)
4684 (uri (rubygems-uri "slop" version))
4685 (sha256
4686 (base32
4687 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
4688 (build-system ruby-build-system)
4689 (native-inputs
4690 `(("ruby-minitest" ,ruby-minitest)))
4691 (synopsis "Ruby command line option parser")
4692 (description "Slop provides a Ruby domain specific language for gathering
4693 options and parsing command line flags.")
4694 (home-page "https://github.com/leejarvis/slop")
4695 (license license:expat)))
4696
4697 (define-public ruby-slop-3
4698 (package (inherit ruby-slop)
4699 (version "3.6.0")
4700 (source (origin
4701 (method url-fetch)
4702 (uri (rubygems-uri "slop" version))
4703 (sha256
4704 (base32
4705 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4706
4707 (define-public ruby-multi-xml
4708 (package
4709 (name "ruby-multi-xml")
4710 (version "0.6.0")
4711 (source
4712 (origin
4713 (method url-fetch)
4714 (uri (rubygems-uri "multi_xml" version))
4715 (sha256
4716 (base32
4717 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4718 (build-system ruby-build-system)
4719 (arguments
4720 '(#:tests? #f)) ; No included tests
4721 (synopsis "Swappable XML backends for Ruby")
4722 (description
4723 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4724 Nokogiri, Ox, or REXML.")
4725 (home-page "https://github.com/sferik/multi_xml")
4726 (license license:expat)))
4727
4728 (define-public ruby-multipart-post
4729 (package
4730 (name "ruby-multipart-post")
4731 (version "2.0.0")
4732 (source (origin
4733 (method url-fetch)
4734 (uri (rubygems-uri "multipart-post" version))
4735 (sha256
4736 (base32
4737 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
4738 (build-system ruby-build-system)
4739 (native-inputs
4740 `(("bundler" ,bundler)))
4741 (synopsis "Multipart POST library for Ruby")
4742 (description "Multipart-Post Adds multipart POST capability to Ruby's
4743 net/http library.")
4744 (home-page "https://github.com/nicksieger/multipart-post")
4745 (license license:expat)))
4746
4747 (define-public ruby-multi-json
4748 (package
4749 (name "ruby-multi-json")
4750 (version "1.13.1")
4751 (source
4752 (origin
4753 (method git-fetch)
4754 ;; Tests are not distributed at rubygems.org so download from GitHub
4755 ;; instead.
4756 (uri (git-reference
4757 (url "https://github.com/intridea/multi_json")
4758 (commit (string-append "v" version))))
4759 (file-name (git-file-name name version))
4760 (sha256
4761 (base32
4762 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
4763 (build-system ruby-build-system)
4764 (arguments
4765 `(#:phases
4766 (modify-phases %standard-phases
4767 (add-after 'unpack 'remove-signing-key-reference
4768 (lambda _
4769 (substitute* "multi_json.gemspec"
4770 ((".*spec.signing_key.*") ""))
4771 #t)))))
4772 (native-inputs
4773 `(("bundler" ,bundler)
4774 ("ruby-rspec" ,ruby-rspec)
4775 ("ruby-yard" ,ruby-yard)
4776 ("ruby-json-pure" ,ruby-json-pure)
4777 ("ruby-oj" ,ruby-oj)
4778 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
4779 (synopsis "Common interface to multiple JSON libraries for Ruby")
4780 (description
4781 "This package provides a common interface to multiple JSON libraries,
4782 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4783 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
4784 (home-page "https://github.com/intridea/multi_json")
4785 (license license:expat)))
4786
4787 (define-public ruby-multi-test
4788 (package
4789 (name "ruby-multi-test")
4790 (version "0.1.2")
4791 (source
4792 (origin
4793 (method url-fetch)
4794 (uri (rubygems-uri "multi_test" version))
4795 (sha256
4796 (base32
4797 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4798 (build-system ruby-build-system)
4799 (arguments
4800 '(;; Tests require different sets of specific gem versions to be available,
4801 ;; and there is no gemfile that specifies the newest versions of
4802 ;; dependencies to be tested.
4803 #:tests? #f))
4804 (synopsis
4805 "Interface to testing libraries loaded into a running Ruby process")
4806 (description
4807 "@code{multi_test} provides a uniform interface onto whatever testing
4808 libraries that have been loaded into a running Ruby process to help control
4809 rogue test/unit/autorun requires.")
4810 (home-page "https://github.com/cucumber/multi_test")
4811 (license license:expat)))
4812
4813 (define-public ruby-arel
4814 (package
4815 (name "ruby-arel")
4816 (version "9.0.0")
4817 (source (origin
4818 (method url-fetch)
4819 (uri (rubygems-uri "arel" version))
4820 (sha256
4821 (base32
4822 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
4823 (build-system ruby-build-system)
4824 (arguments '(#:tests? #f)) ; no tests
4825 (home-page "https://github.com/rails/arel")
4826 (synopsis "SQL AST manager for Ruby")
4827 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4828 Ruby. It simplifies the generation of complex SQL queries and adapts to
4829 various relational database implementations.")
4830 (license license:expat)))
4831
4832 (define-public ruby-marcel
4833 (package
4834 (name "ruby-marcel")
4835 (version "0.3.3")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (rubygems-uri "marcel" version))
4840 (sha256
4841 (base32
4842 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4843 (build-system ruby-build-system)
4844 (arguments
4845 '(;; No included tests
4846 #:tests? #f))
4847 (propagated-inputs
4848 `(("ruby-mimemagic" ,ruby-mimemagic)))
4849 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4850 (description
4851 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4852 Extensions} type detection using magic numbers, filenames, and extensions")
4853 (home-page "https://github.com/basecamp/marcel")
4854 (license license:expat)))
4855
4856 (define-public ruby-minitar
4857 ;; We package from the GitHub source to fix the security issue reported at
4858 ;; https://github.com/halostatue/minitar/issues/16.
4859 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4860 (package
4861 (name "ruby-minitar")
4862 (version (string-append "0.5.4-1." (string-take commit 8)))
4863 (source
4864 (origin
4865 (method git-fetch)
4866 (uri (git-reference
4867 (url "https://github.com/halostatue/minitar")
4868 (commit commit)))
4869 (file-name (string-append name "-" version "-checkout"))
4870 (sha256
4871 (base32
4872 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4873 (build-system ruby-build-system)
4874 (arguments
4875 '(#:tests? #f)) ; missing a gemspec
4876 (synopsis "Ruby library and utility for handling tar archives")
4877 (description
4878 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
4879 that provides the ability to deal with POSIX tar archive files.")
4880 (home-page "http://www.github.com/atoulme/minitar")
4881 (license (list license:gpl2+ license:ruby)))))
4882
4883 (define-public ruby-mini-portile
4884 (package
4885 (name "ruby-mini-portile")
4886 (version "0.6.2")
4887 (source
4888 (origin
4889 (method url-fetch)
4890 (uri (rubygems-uri "mini_portile" version))
4891 (sha256
4892 (base32
4893 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4894 (build-system ruby-build-system)
4895 (arguments
4896 '(#:tests? #f)) ; tests require network access
4897 (synopsis "Ports system for Ruby developers")
4898 (description "Mini-portile is a port/recipe system for Ruby developers.
4899 It provides a standard way to compile against specific versions of libraries
4900 to reproduce user environments.")
4901 (home-page "https://github.com/flavorjones/mini_portile")
4902 (license license:expat)))
4903
4904 (define-public ruby-mini-portile-2
4905 (package (inherit ruby-mini-portile)
4906 (version "2.4.0")
4907 (source (origin
4908 (method url-fetch)
4909 (uri (rubygems-uri "mini_portile2" version))
4910 (sha256
4911 (base32
4912 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
4913
4914 (define-public ruby-nokogiri
4915 (package
4916 (name "ruby-nokogiri")
4917 (version "1.10.9")
4918 (source (origin
4919 (method url-fetch)
4920 (uri (rubygems-uri "nokogiri" version))
4921 (sha256
4922 (base32
4923 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
4924 (build-system ruby-build-system)
4925 (arguments
4926 ;; Tests fail because Nokogiri can only test with an installed extension,
4927 ;; and also because many test framework dependencies are missing.
4928 `(#:tests? #f
4929 #:gem-flags (list "--" "--use-system-libraries"
4930 (string-append "--with-xml2-include="
4931 (assoc-ref %build-inputs "libxml2")
4932 "/include/libxml2" ))
4933 #:phases
4934 (modify-phases %standard-phases
4935 (add-before 'build 'patch-extconf
4936 ;; 'pkg-config' is not included in the GEM_PATH during
4937 ;; installation, so we add it directly to the load path.
4938 (lambda* (#:key inputs #:allow-other-keys)
4939 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
4940 (substitute* "ext/nokogiri/extconf.rb"
4941 (("gem 'pkg-config'.*")
4942 (string-append "$:.unshift '"
4943 pkg-config "/lib/ruby/vendor_ruby"
4944 "/gems/pkg-config-"
4945 ,(package-version ruby-pkg-config)
4946 "/lib'\n"))))
4947 #t)))))
4948 (native-inputs
4949 `(("ruby-hoe" ,ruby-hoe)))
4950 (inputs
4951 `(("zlib" ,zlib)
4952 ("libxml2" ,libxml2)
4953 ("libxslt" ,libxslt)))
4954 (propagated-inputs
4955 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4956 ("ruby-pkg-config" ,ruby-pkg-config)))
4957 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4958 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4959 both CSS3 selector and XPath 1.0 support.")
4960 (home-page "http://www.nokogiri.org/")
4961 (license license:expat)))
4962
4963 (define-public ruby-method-source
4964 (package
4965 (name "ruby-method-source")
4966 (version "1.0.0")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (rubygems-uri "method_source" version))
4971 (sha256
4972 (base32
4973 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
4974 (build-system ruby-build-system)
4975 (arguments
4976 `(#:test-target "spec"))
4977 (native-inputs
4978 `(("ruby-rspec" ,ruby-rspec)
4979 ("git" ,git)))
4980 (synopsis "Retrieve the source code for Ruby methods")
4981 (description "Method_source retrieves the source code for Ruby methods.
4982 Additionally, it can extract source code from Proc and Lambda objects or just
4983 extract comments.")
4984 (home-page "https://github.com/banister/method_source")
4985 (license license:expat)))
4986
4987 (define-public ruby-coderay
4988 (package
4989 (name "ruby-coderay")
4990 (version "1.1.2")
4991 (source
4992 (origin
4993 (method url-fetch)
4994 (uri (rubygems-uri "coderay" version))
4995 (sha256
4996 (base32
4997 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
4998 (build-system ruby-build-system)
4999 (arguments
5000 '(#:tests? #f)) ; missing test files
5001 (synopsis "Ruby syntax highlighting library")
5002 (description "Coderay is a Ruby library that provides syntax highlighting
5003 for select languages.")
5004 (home-page "http://coderay.rubychan.de")
5005 (license license:expat)))
5006
5007 (define-public ruby-cuke-modeler
5008 (package
5009 (name "ruby-cuke-modeler")
5010 (version "3.1.0")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (rubygems-uri "cuke_modeler" version))
5015 (sha256
5016 (base32
5017 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
5018 (build-system ruby-build-system)
5019 (arguments `(#:tests? #f)) ;no test suite in gem
5020 (propagated-inputs
5021 `(("ruby-gherkin" ,ruby-gherkin)))
5022 (synopsis "Gherkin test suite analysis tool")
5023 (description "CukeModeler facilitates modeling a test suite that is
5024 written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
5025 providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
5026 the @code{cucumber-gherkin} generates when parsing features, as well as
5027 providing models for feature files and directories in order to be able to have
5028 a fully traversable model tree of a test suite's structure. These models can
5029 then be analyzed or manipulated more easily than the underlying AST layer.")
5030 (home-page "https://github.com/enkessler/cuke_modeler")
5031 (license license:expat)))
5032
5033 (define-public ruby-parallel-tests
5034 (package
5035 (name "ruby-parallel-tests")
5036 (version "3.0.0")
5037 (home-page "https://github.com/grosser/parallel_tests")
5038 (source (origin
5039 (method git-fetch)
5040 (uri (git-reference
5041 (url home-page)
5042 (commit (string-append "v" version))))
5043 (file-name (string-append name version))
5044 (sha256
5045 (base32
5046 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
5047 (build-system ruby-build-system)
5048 (arguments
5049 '(#:test-target "default"
5050 #:phases (modify-phases %standard-phases
5051 (add-after 'patch-source-shebangs 'patch-shell-invokations
5052 (lambda _
5053 (substitute* '("lib/parallel_tests/tasks.rb"
5054 "spec/parallel_tests/tasks_spec.rb")
5055 (("/bin/sh") (which "sh"))
5056 (("/bin/bash") (which "bash")))
5057 #t))
5058 (add-before 'check 'remove-version-constraints
5059 (lambda _
5060 ;; Remove hard coded version constraints, instead just
5061 ;; use whatever versions are available in Guix.
5062 (delete-file "Gemfile.lock")
5063 (substitute* "Gemfile"
5064 (("'minitest',.*")
5065 "'minitest'\n")
5066 (("'cucumber',.*")
5067 "'cucumber'\n"))
5068 #t))
5069 (add-before 'check 'disable-rails-test
5070 (lambda _
5071 ;; XXX: This test attempts to download and run the test
5072 ;; suites of multiple Rails versions(!) directly.
5073 (delete-file "spec/rails_spec.rb")
5074 #t))
5075 (add-before 'check 'set-HOME
5076 (lambda _
5077 ;; Some tests check the output of Bundler, and fail when
5078 ;; Bundler warns that /homeless-shelter does not exist.
5079 (setenv "HOME" "/tmp")
5080 #t)))))
5081 (native-inputs
5082 `(("ruby-bump" ,ruby-bump)
5083 ("ruby-cucumber" ,ruby-cucumber)
5084 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
5085 ("ruby-minitest" ,ruby-minitest)
5086 ("ruby-rake" ,ruby-rake)
5087 ("ruby-rspec" ,ruby-rspec)
5088 ("ruby-spinach" ,ruby-spinach)))
5089 (propagated-inputs
5090 `(("ruby-parallel" ,ruby-parallel)))
5091 (synopsis "Run tests in parallel")
5092 (description
5093 "This package can speed up @code{Test::Unit}, @code{RSpec},
5094 @code{Cucumber}, and @code{Spinach} tests by running them concurrently
5095 across multiple CPU cores.")
5096 (license license:expat)))
5097
5098 (define-public ruby-parser
5099 (package
5100 (name "ruby-parser")
5101 (version "2.7.1.4")
5102 (source
5103 (origin
5104 (method url-fetch)
5105 (uri (rubygems-uri "parser" version))
5106 (sha256
5107 (base32
5108 "1030znhvhkfn39svwbj6qn4xb6hgl94gnvg57k4d3r76f9bryqmn"))))
5109 (build-system ruby-build-system)
5110 (native-inputs
5111 `(("bundler" ,bundler)
5112 ("ruby-cliver" ,ruby-cliver)
5113 ("ruby-simplecov" ,ruby-simplecov)
5114 ("ruby-racc" ,ruby-racc)))
5115 (inputs
5116 `(("ragel" ,ragel)))
5117 (propagated-inputs
5118 `(("ruby-ast" ,ruby-ast)))
5119 (synopsis "Ruby parser written in pure Ruby")
5120 (description
5121 "This package provides a Ruby parser written in pure Ruby.")
5122 (home-page "https://github.com/whitequark/parser")
5123 (license license:expat)))
5124
5125 (define-public ruby-sexp-processor
5126 (package
5127 (name "ruby-sexp-processor")
5128 (version "4.15.0")
5129 (source
5130 (origin
5131 (method url-fetch)
5132 (uri (rubygems-uri "sexp_processor" version))
5133 (sha256
5134 (base32
5135 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
5136 (build-system ruby-build-system)
5137 (native-inputs
5138 ;; TODO: Add ruby-minitest-proveit once available.
5139 `(("hoe" ,ruby-hoe)))
5140 (synopsis "ParseTree fork which includes generic S-exp processing tools")
5141 (description "The sexp_processor package is derived from ParseTree, but
5142 contrary to ParseTree, it includes all the generic S-exp processing tools.
5143 Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
5144 @code{Environment}")
5145 (home-page "https://github.com/seattlerb/sexp_processor")
5146 (license license:expat)))
5147
5148 (define-public ruby-ruby-parser
5149 (package
5150 (name "ruby-ruby-parser")
5151 (version "3.14.2")
5152 (source
5153 (origin
5154 (method url-fetch)
5155 (uri (rubygems-uri "ruby_parser" version))
5156 (sha256
5157 (base32
5158 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
5159 (build-system ruby-build-system)
5160 (native-inputs
5161 `(("hoe" ,ruby-hoe)
5162 ("racc" ,ruby-racc)
5163 ("unifdef" ,unifdef)))
5164 (propagated-inputs
5165 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
5166 (home-page "https://github.com/seattlerb/ruby_parser/")
5167 (synopsis "Ruby parser written in pure Ruby")
5168 (description "The ruby_parser (RP) package provides a Ruby parser written
5169 in pure Ruby. It outputs S-expressions which can be manipulated and converted
5170 back to Ruby via the @code{ruby2ruby} library.")
5171 (license license:expat)))
5172
5173 (define-public ruby-prawn-manual-builder
5174 (package
5175 (name "ruby-prawn-manual-builder")
5176 (version "0.3.1")
5177 (source
5178 (origin
5179 (method url-fetch)
5180 (uri (rubygems-uri "prawn-manual_builder" version))
5181 (sha256
5182 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
5183 (build-system ruby-build-system)
5184 (arguments
5185 '(#:tests? #f ; no included tests
5186 #:phases
5187 (modify-phases %standard-phases
5188 (add-after 'extract-gemspec 'patch-gemspec
5189 (lambda _
5190 (substitute* ".gemspec"
5191 ;; Loosen the requirement for pdf-inspector
5192 (("~> 1\\.0\\.7") ">= 0")))))))
5193 (propagated-inputs
5194 `(("ruby-coderay" ,ruby-coderay)))
5195 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
5196 (description
5197 "This package provides a tool for writing manuals for Prawn and Prawn
5198 accessories")
5199 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
5200 (license %prawn-project-licenses)))
5201
5202 (define-public ruby-progress_bar
5203 (package
5204 (name "ruby-progress_bar")
5205 (version "1.1.0")
5206 (source
5207 (origin
5208 (method url-fetch)
5209 (uri (rubygems-uri "progress_bar" version))
5210 (sha256
5211 (base32
5212 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
5213 (build-system ruby-build-system)
5214 (arguments
5215 '(#:test-target "spec"))
5216 (propagated-inputs
5217 `(("ruby-highline" ,ruby-highline)
5218 ("ruby-options" ,ruby-options)))
5219 (native-inputs
5220 `(("bundler" ,bundler)
5221 ("ruby-rspec" ,ruby-rspec)
5222 ("ruby-timecop" ,ruby-timecop)))
5223 (synopsis
5224 "Ruby library for displaying progress bars")
5225 (description
5226 "ProgressBar is a simple library for displaying progress bars. The
5227 maximum value is configurable, and additional information can be displayed
5228 like the percentage completion, estimated time remaining, elapsed time and
5229 rate.")
5230 (home-page "https://github.com/paul/progress_bar")
5231 (license license:wtfpl2)))
5232
5233 (define-public ruby-dep
5234 (package
5235 (name "ruby-dep")
5236 (version "1.5.0")
5237 (source
5238 (origin
5239 (method url-fetch)
5240 (uri (rubygems-uri "ruby_dep" version))
5241 (sha256
5242 (base32
5243 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
5244 (build-system ruby-build-system)
5245 (arguments
5246 '(#:tests? #f)) ; No included tests
5247 (synopsis "Creates a version constraint of supported Rubies")
5248 (description
5249 "This package helps create a version constraint of supported Rubies,
5250 suitable for a gemspec file.")
5251 (home-page "https://github.com/e2/ruby_dep")
5252 (license license:expat)))
5253
5254 (define-public ruby-progressbar
5255 (package
5256 (name "ruby-progressbar")
5257 (version "1.10.1")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (rubygems-uri "ruby-progressbar" version))
5262 (sha256
5263 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
5264 (build-system ruby-build-system)
5265 (arguments
5266 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
5267 #:tests? #f))
5268 (synopsis "Text progress bar library for Ruby")
5269 (description
5270 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
5271 The output can be customized with a formatting system.")
5272 (home-page "https://github.com/jfelchner/ruby-progressbar")
5273 (license license:expat)))
5274
5275 (define-public ruby-pry
5276 (package
5277 (name "ruby-pry")
5278 (version "0.13.1")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (rubygems-uri "pry" version))
5283 (sha256
5284 (base32
5285 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
5286 (build-system ruby-build-system)
5287 (arguments
5288 '(#:tests? #f)) ; no tests
5289 (propagated-inputs
5290 `(("ruby-coderay" ,ruby-coderay)
5291 ("ruby-method-source" ,ruby-method-source)))
5292 (synopsis "Ruby REPL")
5293 (description "Pry is an IRB alternative and runtime developer console for
5294 Ruby. It features syntax highlighting, a plugin architecture, runtime
5295 invocation, and source and documentation browsing.")
5296 (home-page "https://cobaltbluemedia.com/pryrepl/")
5297 (license license:expat)))
5298
5299 (define-public ruby-single-cov
5300 (package
5301 (name "ruby-single-cov")
5302 (version "1.3.2")
5303 (home-page "https://github.com/grosser/single_cov")
5304 (source (origin
5305 (method git-fetch)
5306 (uri (git-reference (url home-page)
5307 (commit (string-append "v" version))))
5308 (file-name (git-file-name name version))
5309 (sha256
5310 (base32
5311 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
5312 (build-system ruby-build-system)
5313 (arguments
5314 '(#:test-target "default"
5315 #:phases (modify-phases %standard-phases
5316 (replace 'replace-git-ls-files
5317 (lambda _
5318 (substitute* "single_cov.gemspec"
5319 (("`git ls-files lib/ bin/ MIT-LICENSE`")
5320 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
5321 #t))
5322 (add-before 'check 'remove-version-constraints
5323 (lambda _
5324 (delete-file "Gemfile.lock")
5325 #t))
5326 (add-before 'check 'make-files-writable
5327 (lambda _
5328 ;; Tests need to create local directories and open files
5329 ;; with write permissions.
5330 (for-each make-file-writable
5331 (find-files "specs" #:directories? #t))
5332 #t))
5333 (add-before 'check 'disable-failing-test
5334 (lambda _
5335 ;; XXX: This test copies assets from minitest, but can
5336 ;; not cope with the files being read-only. Just skip
5337 ;; it for now.
5338 (substitute* "specs/single_cov_spec.rb"
5339 (("it \"complains when coverage is bad\"")
5340 "xit \"complains when coverage is bad\""))
5341 #t)))))
5342 (native-inputs
5343 `(("ruby-bump" ,ruby-bump)
5344 ("ruby-minitest" ,ruby-minitest)
5345 ("ruby-rspec" ,ruby-rspec)
5346 ("ruby-simplecov" ,ruby-simplecov)))
5347 (synopsis "Code coverage reporting tool")
5348 (description
5349 "This package provides actionable code coverage reports for Ruby
5350 projects. It has very little overhead and can be easily integrated with
5351 development tools to catch coverage problems early.")
5352 (license license:expat)))
5353
5354 (define-public ruby-guard
5355 (package
5356 (name "ruby-guard")
5357 (version "2.13.0")
5358 (source (origin
5359 (method git-fetch)
5360 ;; The gem does not include a Rakefile, nor does it contain a
5361 ;; gemspec file, nor does it come with the tests. This is why
5362 ;; we fetch the tarball from Github.
5363 (uri (git-reference
5364 (url "https://github.com/guard/guard")
5365 (commit (string-append "v" version))))
5366 (file-name (git-file-name name version))
5367 (sha256
5368 (base32
5369 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
5370 (build-system ruby-build-system)
5371 (arguments
5372 `(#:tests? #f ; tests require cucumber
5373 #:phases
5374 (modify-phases %standard-phases
5375 (add-after 'unpack 'remove-git-ls-files
5376 (lambda* (#:key outputs #:allow-other-keys)
5377 (substitute* "guard.gemspec"
5378 (("git ls-files -z") "find . -type f -print0"))
5379 #t))
5380 (replace 'build
5381 (lambda _
5382 (invoke "gem" "build" "guard.gemspec"))))))
5383 (propagated-inputs
5384 `(("ruby-formatador" ,ruby-formatador)
5385 ("ruby-listen" ,ruby-listen)
5386 ("ruby-lumberjack" ,ruby-lumberjack)
5387 ("ruby-nenv" ,ruby-nenv)
5388 ("ruby-notiffany" ,ruby-notiffany)
5389 ("ruby-pry" ,ruby-pry)
5390 ("ruby-shellany" ,ruby-shellany)
5391 ("ruby-thor" ,ruby-thor)))
5392 (native-inputs
5393 `(("bundler" ,bundler)
5394 ("ruby-rspec" ,ruby-rspec)))
5395 (synopsis "Tool to handle events on file system modifications")
5396 (description
5397 "Guard is a command line tool to easily handle events on file system
5398 modifications. Guard automates various tasks by running custom rules whenever
5399 file or directories are modified.")
5400 (home-page "https://guardgem.org/")
5401 (license license:expat)))
5402
5403 (define-public ruby-spinach
5404 (package
5405 (name "ruby-spinach")
5406 (version "0.11.0")
5407 (home-page "https://github.com/codegram/spinach")
5408 (source (origin
5409 (method url-fetch)
5410 (uri (rubygems-uri "spinach" version))
5411 (sha256
5412 (base32
5413 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5414 (build-system ruby-build-system)
5415 (arguments
5416 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5417 ;; which in turn depends on many other unpackaged gems. Enable once
5418 ;; capybara is available.
5419 '(#:tests? #f))
5420 (propagated-inputs
5421 `(("ruby-colorize" ,ruby-colorize)
5422 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5423 ("ruby-json" ,ruby-json)))
5424 (synopsis "Gherkin-based BDD framework")
5425 (description
5426 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5427 framework that leverages the expressive @code{Gherkin} language to help you
5428 define executable specifications of your code.")
5429 (license license:expat)))
5430
5431 (define-public ruby-tilt
5432 (package
5433 (name "ruby-tilt")
5434 (version "2.0.10")
5435 (source
5436 (origin
5437 (method git-fetch) ;the distributed gem lacks tests
5438 (uri (git-reference
5439 (url "https://github.com/rtomayko/tilt")
5440 (commit (string-append "v" version))))
5441 (file-name (git-file-name name version))
5442 (sha256
5443 (base32
5444 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
5445 (build-system ruby-build-system)
5446 (arguments
5447 '(#:phases
5448 (modify-phases %standard-phases
5449 (add-after 'unpack 'remove-some-dependencies
5450 (lambda _
5451 (substitute* "Gemfile"
5452 ;; TODO ronn is used for generating the manual
5453 (("gem 'ronn'.*") "\n")
5454 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5455 ;; pass it in as a native-input
5456 (("gem 'haml'.*") "\n")
5457 ;; TODO Not all of these gems are packaged for Guix yet:
5458 ;; less, coffee-script, livescript, babel-transpiler,
5459 ;; typescript-node
5460 (("if can_execjs") "if false")
5461 ;; Disable the secondary group to reduce the number of
5462 ;; dependencies. None of the normal approaches work, so patch
5463 ;; the Gemfile instead.
5464 (("group :secondary") "[].each"))
5465 #t)))))
5466 (propagated-inputs
5467 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5468 ("ruby-sassc" ,ruby-sassc)))
5469 (native-inputs
5470 `(("bundler" ,bundler)
5471 ("ruby-yard" ,ruby-yard)
5472 ("ruby-builder" ,ruby-builder)
5473 ("ruby-erubis" ,ruby-erubis)
5474 ("ruby-markaby" ,ruby-markaby)))
5475 (synopsis "Generic interface to multiple Ruby template engines")
5476 (description
5477 "Tilt is a thin interface over a number of different Ruby template
5478 engines in an attempt to make their usage as generic as possible.")
5479 (home-page "https://github.com/rtomayko/tilt/")
5480 (license license:expat)))
5481
5482 (define-public ruby-thread-safe
5483 (package
5484 (name "ruby-thread-safe")
5485 (version "0.3.6")
5486 (source
5487 (origin
5488 (method url-fetch)
5489 (uri (rubygems-uri "thread_safe" version))
5490 (sha256
5491 (base32
5492 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
5493 (build-system ruby-build-system)
5494 (arguments
5495 '(#:tests? #f)) ; needs simplecov, among others
5496 (synopsis "Thread-safe utilities for Ruby")
5497 (description "The thread_safe library provides thread-safe collections and
5498 utilities for Ruby.")
5499 (home-page "https://github.com/ruby-concurrency/thread_safe")
5500 (license license:asl2.0)))
5501
5502 (define-public ruby-tzinfo
5503 (package
5504 (name "ruby-tzinfo")
5505 (version "1.2.4")
5506 (source
5507 (origin
5508 (method url-fetch)
5509 (uri (rubygems-uri "tzinfo" version))
5510 (sha256
5511 (base32
5512 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
5513 (build-system ruby-build-system)
5514 (arguments
5515 '(#:phases
5516 (modify-phases %standard-phases
5517 (add-after 'unpack 'skip-safe-tests
5518 (lambda _
5519 (substitute* "test/test_utils.rb"
5520 (("def safe_test\\(options = \\{\\}\\)")
5521 "def safe_test(options = {})
5522 skip('The Guix build environment has an unsafe load path')"))
5523 #t)))))
5524 (propagated-inputs
5525 `(("ruby-thread-safe" ,ruby-thread-safe)))
5526 (synopsis "Time zone library for Ruby")
5527 (description "TZInfo is a Ruby library that provides daylight savings
5528 aware transformations between times in different time zones.")
5529 (home-page "https://tzinfo.github.io")
5530 (license license:expat)))
5531
5532 (define-public ruby-tzinfo-data
5533 (package
5534 (name "ruby-tzinfo-data")
5535 (version "1.2017.3")
5536 (source
5537 (origin
5538 (method git-fetch)
5539 ;; Download from GitHub because the rubygems version does not contain
5540 ;; Rakefile or tests.
5541 (uri (git-reference
5542 (url "https://github.com/tzinfo/tzinfo-data")
5543 (commit (string-append "v" version))))
5544 (file-name (git-file-name name version))
5545 (sha256
5546 (base32
5547 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
5548 ;; Remove the known test failure.
5549 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5550 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5551 (patches (search-patches
5552 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5553 (build-system ruby-build-system)
5554 (propagated-inputs
5555 `(("ruby-tzinfo" ,ruby-tzinfo)))
5556 (synopsis "Data from the IANA Time Zone database")
5557 (description
5558 "This library provides @code{TZInfo::Data}, which contains data from the
5559 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
5560 (home-page "https://tzinfo.github.io")
5561 (license license:expat)))
5562
5563 (define-public ruby-rb-inotify
5564 (package
5565 (name "ruby-rb-inotify")
5566 (version "0.9.10")
5567 (source
5568 (origin
5569 (method url-fetch)
5570 (uri (rubygems-uri "rb-inotify" version))
5571 (sha256
5572 (base32
5573 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
5574 (build-system ruby-build-system)
5575 (arguments
5576 '(#:tests? #f ; there are no tests
5577 #:phases
5578 (modify-phases %standard-phases
5579 ;; Building the gemspec with rake is not working here since it is
5580 ;; generated with Jeweler. It is also unnecessary because the
5581 ;; existing gemspec does not use any development tools to generate a
5582 ;; list of files.
5583 (replace 'build
5584 (lambda _
5585 (invoke "gem" "build" "rb-inotify.gemspec"))))))
5586 (propagated-inputs
5587 `(("ruby-ffi" ,ruby-ffi)))
5588 (native-inputs
5589 `(("ruby-yard" ,ruby-yard)))
5590 (synopsis "Ruby wrapper for Linux's inotify")
5591 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5592 kernel subsystem for monitoring changes to files and directories.")
5593 (home-page "https://github.com/nex3/rb-inotify")
5594 (license license:expat)))
5595
5596 (define-public ruby-pry-editline
5597 (package
5598 (name "ruby-pry-editline")
5599 (version "1.1.2")
5600 (source (origin
5601 (method url-fetch)
5602 (uri (rubygems-uri "pry-editline" version))
5603 (sha256
5604 (base32
5605 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5606 (build-system ruby-build-system)
5607 (arguments `(#:tests? #f)) ; no tests included
5608 (native-inputs
5609 `(("bundler" ,bundler)))
5610 (synopsis "Open the current REPL line in an editor")
5611 (description
5612 "This gem provides a plugin for the Ruby REPL to enable opening the
5613 current line in an external editor.")
5614 (home-page "https://github.com/tpope/pry-editline")
5615 (license license:expat)))
5616
5617 (define-public ruby-sdoc
5618 (package
5619 (name "ruby-sdoc")
5620 (version "1.1.0")
5621 (source (origin
5622 (method url-fetch)
5623 (uri (rubygems-uri "sdoc" version))
5624 (sha256
5625 (base32
5626 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
5627 (build-system ruby-build-system)
5628 (arguments
5629 `(#:phases
5630 (modify-phases %standard-phases
5631 (add-before 'check 'set-rubylib-and-patch-gemfile
5632 (lambda _
5633 (setenv "RUBYLIB" "lib")
5634 (substitute* "sdoc.gemspec"
5635 (("s.add_runtime_dependency.*") "\n")
5636 (("s.add_dependency.*") "\n"))
5637 (substitute* "Gemfile"
5638 (("gem \"rake\".*")
5639 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
5640 #t)))))
5641 (propagated-inputs
5642 `(("ruby-json" ,ruby-json)))
5643 (native-inputs
5644 `(("bundler" ,bundler)
5645 ("ruby-minitest" ,ruby-minitest)
5646 ("ruby-hoe" ,ruby-hoe)))
5647 (synopsis "Generate searchable RDoc documentation")
5648 (description
5649 "SDoc is an RDoc documentation generator to build searchable HTML
5650 documentation for Ruby code.")
5651 (home-page "https://github.com/voloko/sdoc")
5652 (license license:expat)))
5653
5654 (define-public ruby-tins
5655 (package
5656 (name "ruby-tins")
5657 (version "1.15.0")
5658 (source (origin
5659 (method url-fetch)
5660 (uri (rubygems-uri "tins" version))
5661 (sha256
5662 (base32
5663 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
5664 (build-system ruby-build-system)
5665 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5666 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5667 ;; the gemspec.
5668 (arguments
5669 `(#:tests? #f ; there are no tests
5670 #:phases
5671 (modify-phases %standard-phases
5672 (replace 'build
5673 (lambda _
5674 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5675 ;; causes an error.
5676 (substitute* "tins.gemspec"
5677 (("\"lib/spruz\", ") ""))
5678 (invoke "gem" "build" "tins.gemspec"))))))
5679 (synopsis "Assorted tools for Ruby")
5680 (description "Tins is a Ruby library providing assorted tools.")
5681 (home-page "https://github.com/flori/tins")
5682 (license license:expat)))
5683
5684 (define-public ruby-gem-hadar
5685 (package
5686 (name "ruby-gem-hadar")
5687 (version "1.9.1")
5688 (source (origin
5689 (method url-fetch)
5690 (uri (rubygems-uri "gem_hadar" version))
5691 (sha256
5692 (base32
5693 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
5694 (build-system ruby-build-system)
5695 ;; This gem needs itself at development time. We disable rebuilding of the
5696 ;; gemspec to avoid this loop.
5697 (arguments
5698 `(#:tests? #f ; there are no tests
5699 #:phases
5700 (modify-phases %standard-phases
5701 (replace 'build
5702 (lambda _
5703 (invoke "gem" "build" "gem_hadar.gemspec"))))))
5704 (propagated-inputs
5705 `(("git" ,git)
5706 ("ruby-tins" ,ruby-tins)
5707 ("ruby-yard" ,ruby-yard)))
5708 (synopsis "Library for the development of Ruby gems")
5709 (description
5710 "This library contains some useful functionality to support the
5711 development of Ruby gems.")
5712 (home-page "https://github.com/flori/gem_hadar")
5713 (license license:expat)))
5714
5715 (define-public ruby-minitest-tu-shim
5716 (package
5717 (name "ruby-minitest-tu-shim")
5718 (version "1.3.3")
5719 (source (origin
5720 (method url-fetch)
5721 (uri (rubygems-uri "minitest_tu_shim" version))
5722 (sha256
5723 (base32
5724 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5725 (build-system ruby-build-system)
5726 (arguments
5727 `(#:phases
5728 (modify-phases %standard-phases
5729 (add-after 'unpack 'fix-test-include-path
5730 (lambda* (#:key inputs #:allow-other-keys)
5731 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
5732 (substitute* "Rakefile"
5733 (("Hoe\\.add_include_dirs .*")
5734 (string-append "Hoe.add_include_dirs \""
5735 minitest "/lib/ruby/vendor_ruby"
5736 "/gems/minitest-"
5737 ,(package-version ruby-minitest-4)
5738 "/lib" "\""))))
5739 #t))
5740 (add-before 'check 'fix-test-assumptions
5741 (lambda _
5742 ;; The test output includes the file name, so a couple of tests
5743 ;; fail. Changing the regular expressions slightly fixes this
5744 ;; problem.
5745 (substitute* "test/test_mini_test.rb"
5746 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5747 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5748 (("gsub\\(/.*, 'FILE:LINE'\\)")
5749 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5750 #t)))))
5751 (propagated-inputs
5752 `(("ruby-minitest-4" ,ruby-minitest-4)))
5753 (native-inputs
5754 `(("ruby-hoe" ,ruby-hoe)))
5755 (synopsis "Adapter library between minitest and test/unit")
5756 (description
5757 "This library bridges the gap between the small and fast minitest and
5758 Ruby's large and slower test/unit.")
5759 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5760 (license license:expat)))
5761
5762 (define-public ruby-term-ansicolor
5763 (package
5764 (name "ruby-term-ansicolor")
5765 (version "1.6.0")
5766 (source (origin
5767 (method url-fetch)
5768 (uri (rubygems-uri "term-ansicolor" version))
5769 (sha256
5770 (base32
5771 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
5772 (build-system ruby-build-system)
5773 ;; Rebuilding the gemspec seems to require git, even though this is not a
5774 ;; git repository, so we just build the gem from the existing gemspec.
5775 (arguments
5776 `(#:phases
5777 (modify-phases %standard-phases
5778 (add-after 'unpack 'fix-test
5779 (lambda -
5780 (substitute* "tests/hsl_triple_test.rb"
5781 (("0\\\\\\.0%")
5782 "0\\.?0?%"))))
5783 (replace 'build
5784 (lambda _
5785 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
5786 (propagated-inputs
5787 `(("ruby-tins" ,ruby-tins)))
5788 (native-inputs
5789 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5790 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5791 (synopsis "Ruby library to control the attributes of terminal output")
5792 (description
5793 "This Ruby library uses ANSI escape sequences to control the attributes
5794 of terminal output.")
5795 (home-page "https://flori.github.io/term-ansicolor/")
5796 ;; There is no mention of the "or later" clause.
5797 (license license:gpl2)))
5798
5799 (define-public ruby-terraform
5800 (package
5801 (name "ruby-terraform")
5802 (version "0.22.0")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (rubygems-uri "ruby-terraform" version))
5807 (sha256
5808 (base32
5809 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5810 (build-system ruby-build-system)
5811 (arguments
5812 '(#:tests? #f)) ; No included tests
5813 (propagated-inputs
5814 `(("ruby-lino" ,ruby-lino)))
5815 (synopsis "Ruby wrapper around the Terraform command line interface")
5816 (description
5817 "This package provides a Ruby wrapper around the Terraform command line
5818 interface so that Terraform can be more easily invoked from Ruby code.")
5819 (home-page "https://github.com/infrablocks/ruby_terraform")
5820 (license license:expat)))
5821
5822 (define-public ruby-pstree
5823 (package
5824 (name "ruby-pstree")
5825 (version "0.1.0")
5826 (source (origin
5827 (method url-fetch)
5828 (uri (rubygems-uri "pstree" version))
5829 (sha256
5830 (base32
5831 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5832 (build-system ruby-build-system)
5833 (native-inputs
5834 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5835 ("bundler" ,bundler)))
5836 (synopsis "Create a process tree data structure")
5837 (description
5838 "This library uses the output of the @code{ps} command to create a
5839 process tree data structure for the current host.")
5840 (home-page "https://github.com/flori/pstree")
5841 ;; There is no mention of the "or later" clause.
5842 (license license:gpl2)))
5843
5844 (define-public ruby-utils
5845 (package
5846 (name "ruby-utils")
5847 (version "0.9.0")
5848 (source (origin
5849 (method url-fetch)
5850 (uri (rubygems-uri "utils" version))
5851 (sha256
5852 (base32
5853 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
5854 (build-system ruby-build-system)
5855 (propagated-inputs
5856 `(("ruby-tins" ,ruby-tins)
5857 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5858 ("ruby-pstree" ,ruby-pstree)
5859 ("ruby-pry-editline" ,ruby-pry-editline)))
5860 (native-inputs
5861 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5862 ("bundler" ,bundler)))
5863 (synopsis "Command line tools for working with Ruby")
5864 (description
5865 "This package provides assorted command line tools that may be useful
5866 when working with Ruby code.")
5867 (home-page "https://github.com/flori/utils")
5868 ;; There is no mention of the "or later" clause.
5869 (license license:gpl2)))
5870
5871 (define-public ruby-jaro-winkler
5872 (package
5873 (name "ruby-jaro-winkler")
5874 (version "1.5.4")
5875 (source
5876 (origin
5877 (method url-fetch)
5878 (uri (rubygems-uri "jaro_winkler" version))
5879 (sha256
5880 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
5881 (build-system ruby-build-system)
5882 (arguments
5883 '(#:tests? #f)) ; no included tests
5884 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5885 (description
5886 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5887 algorithm. It is written as a C extension and will fallback to a pure Ruby
5888 implementation on platforms where this is unsupported.")
5889 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5890 (license license:expat)))
5891
5892 (define-public ruby-json
5893 (package
5894 (name "ruby-json")
5895 (version "2.1.0")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (rubygems-uri "json" version))
5900 (sha256
5901 (base32
5902 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
5903 (build-system ruby-build-system)
5904 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5905 (synopsis "JSON library for Ruby")
5906 (description "This Ruby library provides a JSON implementation written as
5907 a native C extension.")
5908 (home-page "http://json-jruby.rubyforge.org/")
5909 (license (list license:ruby license:gpl2)))) ; GPL2 only
5910
5911 (define-public ruby-json-pure
5912 (package
5913 (name "ruby-json-pure")
5914 (version "2.2.0")
5915 (source (origin
5916 (method url-fetch)
5917 (uri (rubygems-uri "json_pure" version))
5918 (sha256
5919 (base32
5920 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
5921 (build-system ruby-build-system)
5922 (arguments
5923 `(#:phases
5924 (modify-phases %standard-phases
5925 (add-after 'unpack 'fix-rakefile
5926 (lambda _
5927 (substitute* "Rakefile"
5928 ;; Since this is not a git repository, do not call 'git'.
5929 (("`git ls-files`") "`find . -type f |sort`")
5930 ;; Loosen dependency constraint.
5931 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5932 #t))
5933 (add-after 'replace-git-ls-files 'regenerate-gemspec
5934 (lambda _
5935 ;; Regenerate gemspec so loosened dependency constraints are
5936 ;; propagated.
5937 (invoke "rake" "gemspec")))
5938 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5939 (lambda _
5940 ;; This gemspec doesn't look to be generated by the above
5941 ;; command, so patch it separately.
5942 (substitute* "json-java.gemspec"
5943 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5944 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5945 #t)))))
5946 (native-inputs
5947 `(("bundler" ,bundler)
5948 ("ragel" ,ragel)
5949 ("ruby-simplecov" ,ruby-simplecov)
5950 ("ruby-test-unit" ,ruby-test-unit)))
5951 (synopsis "JSON implementation in pure Ruby")
5952 (description
5953 "This package provides a JSON implementation written in pure Ruby.")
5954 (home-page "https://flori.github.com/json/")
5955 (license license:ruby)))
5956
5957 (define-public ruby-jwt
5958 (package
5959 (name "ruby-jwt")
5960 (version "2.1.0")
5961 (source
5962 (origin
5963 (method url-fetch)
5964 (uri (rubygems-uri "jwt" version))
5965 (sha256
5966 (base32
5967 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
5968 (build-system ruby-build-system)
5969 (arguments
5970 '(#:test-target "test"
5971 #:phases
5972 (modify-phases %standard-phases
5973 (add-after 'unpack 'remove-unnecessary-dependencies
5974 (lambda _
5975 (substitute* "spec/spec_helper.rb"
5976 (("require 'simplecov.*") "\n")
5977 ;; Use [].each to disable running the SimpleCov configuration
5978 ;; block
5979 (("SimpleCov\\.configure") "[].each")
5980 (("require 'codeclimate-test-reporter'") "")
5981 (("require 'codacy-coverage'") "")
5982 (("Codacy::Reporter\\.start") ""))
5983 #t)))))
5984 (native-inputs
5985 `(("bundler" ,bundler)
5986 ("ruby-rspec" ,ruby-rspec)
5987 ("ruby-rbnacl" ,ruby-rbnacl)))
5988 (synopsis "Ruby implementation of the JSON Web Token standard")
5989 (description
5990 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
5991 @acronym{JWT, JSON Web Token} standard.")
5992 (home-page "https://github.com/jwt/ruby-jwt")
5993 (license license:expat)))
5994
5995 ;; Even though this package only provides bindings for a Mac OSX API it is
5996 ;; required by "ruby-listen" at runtime.
5997 (define-public ruby-rb-fsevent
5998 (package
5999 (name "ruby-rb-fsevent")
6000 (version "0.10.3")
6001 (source (origin
6002 (method url-fetch)
6003 (uri (rubygems-uri "rb-fsevent" version))
6004 (sha256
6005 (base32
6006 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
6007 (build-system ruby-build-system)
6008 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
6009 ;; "listen", which needs "rb-fsevent" at runtime.
6010 (arguments `(#:tests? #f))
6011 (synopsis "FSEvents API with signals catching")
6012 (description
6013 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
6014 (home-page "https://rubygems.org/gems/rb-fsevent")
6015 (license license:expat)))
6016
6017 (define-public ruby-listen
6018 (package
6019 (name "ruby-listen")
6020 (version "3.2.0")
6021 (source
6022 (origin
6023 ;; The gem does not include a Rakefile, so fetch from the Git
6024 ;; repository.
6025 (method git-fetch)
6026 (uri (git-reference
6027 (url "https://github.com/guard/listen")
6028 (commit (string-append "v" version))))
6029 (file-name (git-file-name name version))
6030 (sha256
6031 (base32
6032 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
6033 (build-system ruby-build-system)
6034 (arguments
6035 `(#:test-target "spec"
6036 #:phases
6037 (modify-phases %standard-phases
6038 (add-after 'unpack 'fix-files-in-gemspec
6039 (lambda _
6040 (substitute* "listen.gemspec"
6041 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
6042 #t))
6043 (add-before 'check 'remove-unnecessary-dependencies'
6044 (lambda _
6045 (substitute* "Rakefile"
6046 ;; Rubocop is for code linting, and is unnecessary for running
6047 ;; the tests.
6048 ((".*rubocop.*") ""))
6049 #t)))))
6050 (native-inputs
6051 `(("bundler" ,bundler)
6052 ("ruby-rspec" ,ruby-rspec)))
6053 (inputs
6054 `(;; ruby-thor is used for the command line interface, and is referenced
6055 ;; in the wrapper, and therefore just needs to be an input.
6056 ("ruby-thor" ,ruby-thor)))
6057 (propagated-inputs
6058 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
6059 ("ruby-rb-inotify" ,ruby-rb-inotify)
6060 ("ruby-dep" ,ruby-dep)))
6061 (synopsis "Listen to file modifications")
6062 (description "The Listen gem listens to file modifications and notifies
6063 you about the changes.")
6064 (home-page "https://github.com/guard/listen")
6065 (license license:expat)))
6066
6067 (define-public ruby-loofah
6068 (package
6069 (name "ruby-loofah")
6070 (version "2.2.3")
6071 (source
6072 (origin
6073 (method url-fetch)
6074 (uri (rubygems-uri "loofah" version))
6075 (sha256
6076 (base32
6077 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
6078 (build-system ruby-build-system)
6079 (arguments
6080 '(#:phases
6081 (modify-phases %standard-phases
6082 (add-after 'unpack 'remove-unnecessary-dependencies
6083 (lambda _
6084 ;; concourse is a development tool which is unused, so remove it
6085 ;; so it's not required.
6086 (substitute* "Gemfile"
6087 ((".*\"concourse\".*") "\n"))
6088 (substitute* "Rakefile"
6089 (("require 'concourse'") "")
6090 (("Concourse\\.new.*") "\n"))
6091 #t)))))
6092 (native-inputs
6093 `(("ruby-hoe" ,ruby-hoe)
6094 ("ruby-rr" ,ruby-rr)))
6095 (propagated-inputs
6096 `(("ruby-nokogiri" ,ruby-nokogiri)
6097 ("ruby-crass" ,ruby-crass)))
6098 (synopsis "Ruby library for manipulating and transforming HTML/XML")
6099 (description
6100 "Loofah is a general library for manipulating and transforming HTML/XML
6101 documents and fragments. It's built on top of Nokogiri and libxml2.")
6102 (home-page "https://github.com/flavorjones/loofah")
6103 (license license:expat)))
6104
6105 (define-public ruby-activesupport
6106 (package
6107 (name "ruby-activesupport")
6108 (version "5.2.2.1")
6109 (source
6110 (origin
6111 (method url-fetch)
6112 (uri (rubygems-uri "activesupport" version))
6113 (sha256
6114 (base32
6115 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
6116 (build-system ruby-build-system)
6117 (arguments
6118 `(#:phases
6119 (modify-phases %standard-phases
6120 (replace 'check
6121 (lambda _
6122 ;; There are no tests, instead attempt to load the library.
6123 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
6124 (propagated-inputs
6125 `(("ruby-concurrent" ,ruby-concurrent)
6126 ("ruby-i18n" ,ruby-i18n)
6127 ("ruby-minitest" ,ruby-minitest)
6128 ("ruby-tzinfo" ,ruby-tzinfo)
6129 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
6130 (synopsis "Ruby on Rails utility library")
6131 (description "ActiveSupport is a toolkit of support libraries and Ruby
6132 core extensions extracted from the Rails framework. It includes support for
6133 multibyte strings, internationalization, time zones, and testing.")
6134 (home-page "http://www.rubyonrails.org")
6135 (license license:expat)))
6136
6137 (define-public ruby-crass
6138 (package
6139 (name "ruby-crass")
6140 (version "1.0.6")
6141 (home-page "https://github.com/rgrove/crass")
6142 (source (origin
6143 ;; The gem does not contain tests, so pull from git.
6144 (method git-fetch)
6145 (uri (git-reference
6146 (url home-page)
6147 (commit (string-append "v" version))))
6148 (file-name (git-file-name name version))
6149 (sha256
6150 (base32
6151 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
6152 (build-system ruby-build-system)
6153 (synopsis "Pure Ruby CSS parser")
6154 (description
6155 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
6156 (license license:expat)))
6157
6158 (define-public ruby-nokogumbo
6159 (package
6160 (name "ruby-nokogumbo")
6161 (version "2.0.2")
6162 (source (origin
6163 ;; We use the git reference, because there's no Rakefile in the
6164 ;; published gem and the tarball on Github is outdated.
6165 (method git-fetch)
6166 (uri (git-reference
6167 (url "https://github.com/rubys/nokogumbo")
6168 (commit (string-append "v" version))))
6169 (file-name (string-append name "-" version "-checkout"))
6170 (sha256
6171 (base32
6172 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
6173 (build-system ruby-build-system)
6174 (native-inputs
6175 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
6176 (inputs
6177 `(("gumbo-parser" ,gumbo-parser)))
6178 (propagated-inputs
6179 `(("ruby-nokogiri" ,ruby-nokogiri)))
6180 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
6181 (description
6182 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
6183 access the result as a Nokogiri parsed document.")
6184 (home-page "https://github.com/rubys/nokogumbo/")
6185 (license license:asl2.0)))
6186
6187 (define-public ruby-sanitize
6188 (package
6189 (name "ruby-sanitize")
6190 (version "5.1.0")
6191 (home-page "https://github.com/rgrove/sanitize")
6192 (source (origin
6193 (method git-fetch)
6194 ;; The gem does not include the Rakefile, so we download the
6195 ;; source from Github.
6196 (uri (git-reference
6197 (url home-page)
6198 (commit (string-append "v" version))))
6199 (file-name (git-file-name name version))
6200 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
6201 (sha256
6202 (base32
6203 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
6204 (build-system ruby-build-system)
6205 (propagated-inputs
6206 `(("ruby-crass" ,ruby-crass)
6207 ("ruby-nokogiri" ,ruby-nokogiri)
6208 ("ruby-nokogumbo" ,ruby-nokogumbo)))
6209 (native-inputs
6210 `(("ruby-minitest" ,ruby-minitest)))
6211 (synopsis "Whitelist-based HTML and CSS sanitizer")
6212 (description
6213 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
6214 acceptable elements, attributes, and CSS properties, Sanitize will remove all
6215 unacceptable HTML and/or CSS from a string.")
6216 (license license:expat)))
6217
6218 (define-public ruby-oj
6219 (package
6220 (name "ruby-oj")
6221 (version "3.10.1")
6222 (source
6223 (origin
6224 (method git-fetch)
6225 ;; Version on rubygems.org does not contain Rakefile, so download from
6226 ;; GitHub instead.
6227 (uri (git-reference
6228 (url "https://github.com/ohler55/oj")
6229 (commit (string-append "v" version))))
6230 (file-name (git-file-name name version))
6231 (sha256
6232 (base32
6233 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
6234 (build-system ruby-build-system)
6235 (arguments
6236 '(#:test-target "test_all"
6237 #:phases
6238 (modify-phases %standard-phases
6239 (add-before 'check 'disable-bundler
6240 (lambda _
6241 (substitute* "Rakefile"
6242 (("Bundler\\.with_clean_env") "1.times")
6243 (("bundle exec ") "")))))))
6244 (native-inputs
6245 `(("bundler" ,bundler)
6246 ("ruby-rspec" ,ruby-rspec)
6247 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6248 (synopsis "JSON parser for Ruby optimized for speed")
6249 (description
6250 "Oj is a JSON parser and generator for Ruby, where the encoding and
6251 decoding of JSON is implemented as a C extension to Ruby.")
6252 (home-page "http://www.ohler.com/oj/")
6253 (license (list license:expat ; Ruby code
6254 license:bsd-3)))) ; extension code
6255
6256 (define-public ruby-ox
6257 (package
6258 (name "ruby-ox")
6259 (version "2.6.0")
6260 (source
6261 (origin
6262 (method url-fetch)
6263 (uri (rubygems-uri "ox" version))
6264 (sha256
6265 (base32
6266 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
6267 (build-system ruby-build-system)
6268 (arguments
6269 '(#:tests? #f)) ; no tests
6270 (synopsis "Optimized XML library for Ruby")
6271 (description
6272 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
6273 written as a native C extension. It was designed to be an alternative to
6274 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
6275 alternative to Marshal for Object serialization. ")
6276 (home-page "http://www.ohler.com/ox")
6277 (license license:expat)))
6278
6279 (define-public ruby-redcloth
6280 (package
6281 (name "ruby-redcloth")
6282 (version "4.3.2")
6283 (source (origin
6284 (method url-fetch)
6285 (uri (rubygems-uri "RedCloth" version))
6286 (sha256
6287 (base32
6288 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
6289 (build-system ruby-build-system)
6290 (arguments
6291 `(#:tests? #f ; no tests
6292 #:phases
6293 (modify-phases %standard-phases
6294 ;; Redcloth has complicated rake tasks to build various versions for
6295 ;; multiple targets using RVM. We don't want this so we just use the
6296 ;; existing gemspec.
6297 (replace 'build
6298 (lambda _
6299 (invoke "gem" "build" "redcloth.gemspec"))))))
6300 (native-inputs
6301 `(("bundler" ,bundler)
6302 ("ruby-diff-lcs" ,ruby-diff-lcs)
6303 ("ruby-rspec-2" ,ruby-rspec-2)))
6304 (synopsis "Textile markup language parser for Ruby")
6305 (description
6306 "RedCloth is a Ruby parser for the Textile markup language.")
6307 (home-page "http://redcloth.org")
6308 (license license:expat)))
6309
6310 (define-public ruby-pg
6311 (package
6312 (name "ruby-pg")
6313 (version "1.1.4")
6314 (source
6315 (origin
6316 (method url-fetch)
6317 (uri (rubygems-uri "pg" version))
6318 (sha256
6319 (base32
6320 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
6321 (build-system ruby-build-system)
6322 (arguments
6323 '(#:test-target "spec"))
6324 (native-inputs
6325 `(("ruby-rake-compiler" ,ruby-rake-compiler)
6326 ("ruby-hoe" ,ruby-hoe)
6327 ("ruby-rspec" ,ruby-rspec)))
6328 (inputs
6329 `(("postgresql" ,postgresql)))
6330 (synopsis "Ruby interface to PostgreSQL")
6331 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
6332 with PostgreSQL 9.0 and later.")
6333 (home-page "https://bitbucket.org/ged/ruby-pg")
6334 (license license:ruby)))
6335
6336 (define-public ruby-byebug
6337 (package
6338 (name "ruby-byebug")
6339 (version "9.0.6")
6340 (source
6341 (origin
6342 (method url-fetch)
6343 (uri (rubygems-uri "byebug" version))
6344 (sha256
6345 (base32
6346 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
6347 (build-system ruby-build-system)
6348 (arguments
6349 '(#:tests? #f)) ; no tests
6350 (synopsis "Debugger for Ruby 2")
6351 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6352 TracePoint C API for execution control and the Debug Inspector C API for call
6353 stack navigation. The core component provides support that front-ends can
6354 build on. It provides breakpoint handling and bindings for stack frames among
6355 other things and it comes with a command line interface.")
6356 (home-page "https://github.com/deivid-rodriguez/byebug")
6357 (license license:bsd-2)))
6358
6359 ;;; TODO: Make it the default byebug in core-updates.
6360 (define-public ruby-byebug-11
6361 (package
6362 (inherit ruby-byebug)
6363 (name "ruby-byebug")
6364 (version "11.1.3")
6365 (source
6366 (origin
6367 (method git-fetch)
6368 (uri (git-reference
6369 (url "https://github.com/deivid-rodriguez/byebug")
6370 (commit (string-append "v" version))))
6371 (file-name (git-file-name name version))
6372 (sha256
6373 (base32
6374 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6375 (modules '((guix build utils)))
6376 (snippet
6377 '(begin
6378 ;; Remove wrappers that try to setup a bundle environment.
6379 (with-directory-excursion "bin"
6380 (for-each delete-file '("bundle" "rake" "rubocop"))
6381 ;; ruby-minitest doesn't come with a launcher, so fix the one
6382 ;; provided.
6383 (substitute* "minitest"
6384 (("load File\\.expand_path\\(\"bundle\".*") "")
6385 (("require \"bundler/setup\".*") "")))
6386 #t))))
6387 (arguments
6388 `(#:tests? #t
6389 #:phases
6390 (modify-phases %standard-phases
6391 (add-after 'unpack 'skip-tmp-path-sensitive-test
6392 (lambda _
6393 (substitute* "test/commands/where_test.rb"
6394 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6395 "unless true\n"))
6396 #t))
6397 (add-before 'build 'compile
6398 (lambda _
6399 (invoke "rake" "compile")))
6400 (add-before 'check 'set-home
6401 (lambda _
6402 (setenv "HOME" (getcwd))
6403 #t)))))
6404 (native-inputs
6405 `(("bundler" ,bundler)
6406 ("ruby-chandler" ,ruby-chandler)
6407 ("ruby-minitest" ,ruby-minitest)
6408 ("ruby-pry" ,ruby-pry)
6409 ("ruby-rake-compiler" ,ruby-rake-compiler)
6410 ("ruby-rubocop" ,ruby-rubocop)
6411 ("ruby-yard" ,ruby-yard)))))
6412
6413 (define-public ruby-netrc
6414 (package
6415 (name "ruby-netrc")
6416 (version "0.11.0")
6417 (source (origin
6418 (method url-fetch)
6419 (uri (rubygems-uri "netrc" version))
6420 (sha256
6421 (base32
6422 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6423 (build-system ruby-build-system)
6424 (arguments
6425 `(#:phases
6426 (modify-phases %standard-phases
6427 (replace 'check
6428 ;; There is no Rakefile and minitest can only run one file at once,
6429 ;; so we have to iterate over all test files.
6430 (lambda _
6431 (for-each (lambda (file)
6432 (invoke "ruby" "-Itest" file))
6433 (find-files "./test" "test_.*\\.rb"))
6434 #t)))))
6435 (native-inputs
6436 `(("ruby-minitest" ,ruby-minitest)))
6437 (synopsis "Library to read and update netrc files")
6438 (description
6439 "This library can read and update netrc files, preserving formatting
6440 including comments and whitespace.")
6441 (home-page "https://github.com/geemus/netrc")
6442 (license license:expat)))
6443
6444 (define-public ruby-unf-ext
6445 (package
6446 (name "ruby-unf-ext")
6447 (version "0.0.7.6")
6448 (source (origin
6449 (method url-fetch)
6450 (uri (rubygems-uri "unf_ext" version))
6451 (sha256
6452 (base32
6453 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
6454 (build-system ruby-build-system)
6455 (arguments
6456 `(#:phases
6457 (modify-phases %standard-phases
6458 (add-after 'build 'build-ext
6459 (lambda _ (invoke "rake" "compile:unf_ext")))
6460 (add-before 'check 'lose-rake-compiler-dock-dependency
6461 (lambda _
6462 ;; rake-compiler-dock is listed in the gemspec, but only
6463 ;; required when cross-compiling.
6464 (substitute* "unf_ext.gemspec"
6465 ((".*rake-compiler-dock.*") ""))
6466 #t)))))
6467 (native-inputs
6468 `(("bundler" ,bundler)
6469 ("ruby-rake-compiler" ,ruby-rake-compiler)
6470 ("ruby-test-unit" ,ruby-test-unit)))
6471 (synopsis "Unicode normalization form support library")
6472 (description
6473 "This package provides unicode normalization form support for Ruby.")
6474 (home-page "https://github.com/knu/ruby-unf_ext")
6475 (license license:expat)))
6476
6477 (define-public ruby-tdiff
6478 ;; Use a newer than released snapshot so that rspec-2 is not required.
6479 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6480 (package
6481 (name "ruby-tdiff")
6482 (version (string-append "0.3.3-1." (string-take commit 8)))
6483 (source (origin
6484 (method git-fetch)
6485 (uri (git-reference
6486 (url "https://github.com/postmodern/tdiff")
6487 (commit commit)))
6488 (file-name (string-append name "-" version "-checkout"))
6489 (sha256
6490 (base32
6491 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6492 (build-system ruby-build-system)
6493 (native-inputs
6494 `(("ruby-rspec" ,ruby-rspec)
6495 ("ruby-yard" ,ruby-yard)
6496 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6497 (synopsis "Calculate the differences between two tree-like structures")
6498 (description
6499 "This library provides functions to calculate the differences between two
6500 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
6501 (home-page "https://github.com/postmodern/tdiff")
6502 (license license:expat))))
6503
6504 (define-public ruby-nokogiri-diff
6505 ;; Use a newer than released snapshot so that rspec-2 is not required.
6506 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6507 (package
6508 (name "ruby-nokogiri-diff")
6509 (version (string-append "0.2.0-1." (string-take commit 8)))
6510 (source (origin
6511 (method git-fetch)
6512 (uri (git-reference
6513 (url "https://github.com/postmodern/nokogiri-diff")
6514 (commit commit)))
6515 (file-name (string-append name "-" version "-checkout"))
6516 (sha256
6517 (base32
6518 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6519 (build-system ruby-build-system)
6520 (propagated-inputs
6521 `(("ruby-tdiff" ,ruby-tdiff)
6522 ("ruby-nokogiri" ,ruby-nokogiri)))
6523 (native-inputs
6524 `(("ruby-rspec" ,ruby-rspec)
6525 ("ruby-yard" ,ruby-yard)
6526 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6527 (synopsis "Calculate the differences between two XML/HTML documents")
6528 (description
6529 "@code{Nokogiri::Diff} adds the ability to calculate the
6530 differences (added or removed nodes) between two XML/HTML documents.")
6531 (home-page "https://github.com/postmodern/nokogiri-diff")
6532 (license license:expat))))
6533
6534 (define-public ruby-racc
6535 (package
6536 (name "ruby-racc")
6537 (version "1.4.14")
6538 (source
6539 (origin
6540 (method url-fetch)
6541 (uri (rubygems-uri "racc" version))
6542 (sha256
6543 (base32
6544 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6545 (build-system ruby-build-system)
6546 (native-inputs
6547 `(("ruby-hoe" ,ruby-hoe)
6548 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6549 (synopsis "LALR(1) parser generator for Ruby")
6550 (description
6551 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6552 generates Ruby program.")
6553 (home-page "http://i.loveruby.net/en/projects/racc/")
6554 (license (list
6555 ;; Generally licensed under the LGPL2.1, and some files also
6556 ;; available under the same license as Ruby.
6557 license:lgpl2.1
6558 license:ruby))))
6559
6560 (define-public ruby-rack
6561 (package
6562 (name "ruby-rack")
6563 (version "2.0.6")
6564 (source
6565 (origin
6566 (method git-fetch)
6567 ;; Download from GitHub so that the patch can be applied.
6568 (uri (git-reference
6569 (url "https://github.com/rack/rack")
6570 (commit version)))
6571 (file-name (git-file-name name version))
6572 (sha256
6573 (base32
6574 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
6575 ;; Ignore test which fails inside the build environment but works
6576 ;; outside.
6577 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
6578 (build-system ruby-build-system)
6579 (arguments
6580 '(#:phases
6581 (modify-phases %standard-phases
6582 (add-before 'check 'fix-tests
6583 (lambda _
6584 ;; A few of the tests use the length of a file on disk for
6585 ;; Content-Length and Content-Range headers. However, this file
6586 ;; has a shebang in it which an earlier phase patches, growing
6587 ;; the file size from 193 to 239 bytes when the store prefix is
6588 ;; "/gnu/store".
6589 (let ((size-diff (- (string-length (which "ruby"))
6590 (string-length "/usr/bin/env ruby"))))
6591 (substitute* '("test/spec_file.rb")
6592 (("193")
6593 (number->string (+ 193 size-diff)))
6594 (("bytes(.)22-33" all delimiter)
6595 (string-append "bytes"
6596 delimiter
6597 (number->string (+ 22 size-diff))
6598 "-"
6599 (number->string (+ 33 size-diff))))))
6600 #t))
6601 (add-before 'reset-gzip-timestamps 'make-files-writable
6602 (lambda* (#:key outputs #:allow-other-keys)
6603 ;; Make sure .gz files are writable so that the
6604 ;; 'reset-gzip-timestamps' phase can do its work.
6605 (let ((out (assoc-ref outputs "out")))
6606 (for-each make-file-writable
6607 (find-files out "\\.gz$"))
6608 #t))))))
6609 (native-inputs
6610 `(("ruby-minitest" ,ruby-minitest)
6611 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6612 ("which" ,which)))
6613 (propagated-inputs
6614 `(("ruby-concurrent" ,ruby-concurrent)))
6615 (synopsis "Unified web application interface for Ruby")
6616 (description "Rack provides a minimal, modular and adaptable interface for
6617 developing web applications in Ruby. By wrapping HTTP requests and responses,
6618 it unifies the API for web servers, web frameworks, and software in between
6619 into a single method call.")
6620 (home-page "https://rack.github.io/")
6621 (license license:expat)))
6622
6623 (define-public ruby-rack-test
6624 (package
6625 (name "ruby-rack-test")
6626 (version "0.8.3")
6627 (source
6628 (origin
6629 (method url-fetch)
6630 (uri (rubygems-uri "rack-test" version))
6631 (sha256
6632 (base32
6633 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6634 (build-system ruby-build-system)
6635 (arguments
6636 ;; Disable tests because of circular dependencies: requires sinatra,
6637 ;; which requires rack-protection, which requires rack-test. Instead
6638 ;; simply require the library.
6639 `(#:phases
6640 (modify-phases %standard-phases
6641 (replace 'check
6642 (lambda _
6643 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6644 (propagated-inputs
6645 `(("ruby-rack" ,ruby-rack)))
6646 (synopsis "Testing API for Rack applications")
6647 (description
6648 "Rack::Test is a small, simple testing API for Rack applications. It can
6649 be used on its own or as a reusable starting point for Web frameworks and
6650 testing libraries to build on.")
6651 (home-page "https://github.com/rack-test/rack-test")
6652 (license license:expat)))
6653
6654 (define-public ruby-rack-protection
6655 (package
6656 (name "ruby-rack-protection")
6657 (version "2.0.5")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (rubygems-uri "rack-protection" version))
6662 (sha256
6663 (base32
6664 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
6665 (build-system ruby-build-system)
6666 (arguments
6667 '(;; Tests missing from the gem.
6668 #:tests? #f))
6669 (propagated-inputs
6670 `(("ruby-rack" ,ruby-rack)))
6671 (native-inputs
6672 `(("bundler" ,bundler)
6673 ("ruby-rspec" ,ruby-rspec-2)
6674 ("ruby-rack-test" ,ruby-rack-test)))
6675 (synopsis "Rack middleware that protects against typical web attacks")
6676 (description "Rack middleware that can be used to protect against typical
6677 web attacks. It can protect all Rack apps, including Rails. For instance, it
6678 protects against cross site request forgery, cross site scripting,
6679 clickjacking, directory traversal, session hijacking and IP spoofing.")
6680 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6681 (license license:expat)))
6682
6683 (define-public ruby-rainbow
6684 (package
6685 (name "ruby-rainbow")
6686 (version "3.0.0")
6687 (source
6688 (origin
6689 (method url-fetch)
6690 (uri (rubygems-uri "rainbow" version))
6691 (sha256
6692 (base32
6693 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6694 (build-system ruby-build-system)
6695 (arguments
6696 '(#:phases
6697 (modify-phases %standard-phases
6698 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6699 ;; the Rakefile.
6700 (replace 'check
6701 (lambda* (#:key tests? #:allow-other-keys)
6702 (when tests?
6703 (invoke "rspec"))
6704 #t)))))
6705 (native-inputs
6706 `(("bundler" ,bundler)
6707 ("ruby-rspec" ,ruby-rspec)))
6708 (synopsis "Colorize printed text on ANSI terminals")
6709 (description
6710 "@code{rainbow} provides a string presenter object to colorize strings by
6711 wrapping them in ANSI escape codes.")
6712 (home-page "https://github.com/sickill/rainbow")
6713 (license license:expat)))
6714
6715 (define-public ruby-rr
6716 (package
6717 (name "ruby-rr")
6718 (version "1.2.1")
6719 (source
6720 (origin
6721 (method url-fetch)
6722 (uri (rubygems-uri "rr" version))
6723 (sha256
6724 (base32
6725 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6726 (build-system ruby-build-system)
6727 (arguments
6728 '(#:tests? #f)) ; test files not included
6729 (native-inputs
6730 `(("bundler" ,bundler)
6731 ("ruby-rspec" ,ruby-rspec)))
6732 (synopsis "Ruby test double framework")
6733 (description
6734 "RR is a test double framework that features a rich selection of double
6735 techniques and a terse syntax.")
6736 (home-page "https://rr.github.io/rr/")
6737 (license license:expat)))
6738
6739 (define-public ruby-rest-client
6740 (package
6741 (name "ruby-rest-client")
6742 (version "2.0.2")
6743 (source
6744 (origin
6745 (method url-fetch)
6746 (uri (rubygems-uri "rest-client" version))
6747 (sha256
6748 (base32
6749 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6750 (build-system ruby-build-system)
6751 (arguments
6752 '(#:phases
6753 (modify-phases %standard-phases
6754 (add-before 'check 'remove-unnecessary-development-dependencies
6755 (lambda _
6756 (substitute* "rest-client.gemspec"
6757 ;; Remove rubocop as it's unused. Rubocop also indirectly
6758 ;; depends on this package through ruby-parser and ruby-ast so
6759 ;; this avoids a dependency loop.
6760 ((".*rubocop.*") "\n")
6761 ;; Remove pry as it's unused, it's a debugging tool
6762 ((".*pry.*") "\n")
6763 ;; Remove an unnecessarily strict rdoc dependency
6764 ((".*rdoc.*") "\n"))
6765 #t))
6766 (add-before 'check 'delete-network-dependent-tests
6767 (lambda _
6768 (delete-file "spec/integration/request_spec.rb")
6769 (delete-file "spec/integration/httpbin_spec.rb")
6770 #t)))))
6771 (propagated-inputs
6772 `(("ruby-http-cookie" ,ruby-http-cookie)
6773 ("ruby-mime-types" ,ruby-mime-types)
6774 ("ruby-netrc" ,ruby-netrc)))
6775 (native-inputs
6776 `(("bundler" ,bundler)
6777 ("ruby-webmock" ,ruby-webmock-2)
6778 ("ruby-rspec" ,ruby-rspec)))
6779 (synopsis "Simple HTTP and REST client for Ruby")
6780 (description
6781 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6782 inspired by the Sinatra microframework style of specifying actions:
6783 @code{get}, @code{put}, @code{post}, @code{delete}.")
6784 (home-page "https://github.com/rest-client/rest-client")
6785 (license license:expat)))
6786
6787 (define-public ruby-rubocop-ast
6788 (package
6789 (name "ruby-rubocop-ast")
6790 (version "0.3.0")
6791 (source
6792 (origin
6793 (method git-fetch) ;no test suite in distributed gem
6794 (uri (git-reference
6795 (url "https://github.com/rubocop-hq/rubocop-ast.git")
6796 (commit (string-append "v" version))))
6797 (file-name (git-file-name name version))
6798 (sha256
6799 (base32
6800 "1ycf6qcj8nbzk2js72priim4642lkn56w5kbny1nlryjkckxgm04"))))
6801 (build-system ruby-build-system)
6802 (arguments
6803 `(#:test-target "spec"
6804 #:phases (modify-phases %standard-phases
6805 (add-after 'unpack 'disable-bundler
6806 (lambda _
6807 (substitute* "Rakefile"
6808 (("Bundler\\.setup.*") "nil\n"))
6809 #t))
6810 (replace 'replace-git-ls-files
6811 (lambda _
6812 (substitute* "rubocop-ast.gemspec"
6813 (("`git ls-files(.*)`" _ files)
6814 (format #f "`find ~a -type f| sort`" files)))
6815 #t)))))
6816 (native-inputs
6817 `(("ruby-bump" ,ruby-bump)
6818 ("ruby-rspec" ,ruby-rspec)))
6819 (propagated-inputs
6820 `(("ruby-parser" ,ruby-parser)))
6821 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6822 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6823 by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6824 @itemize
6825 @item @code{RuboCop::AST::Node}
6826 @item @code{RuboCop::AST::NodePattern}
6827 @end itemize")
6828 (home-page "https://rubocop.org/")
6829 (license license:expat)))
6830
6831 (define-public ruby-rexml
6832 (package
6833 (name "ruby-rexml")
6834 (version "3.2.4")
6835 (source
6836 (origin
6837 (method git-fetch) ;no tests in distributed gem
6838 (uri (git-reference
6839 (url "https://github.com/ruby/rexml.git")
6840 (commit (string-append "v" version))))
6841 (file-name (git-file-name name version))
6842 (sha256
6843 (base32
6844 "0rhjjbkaq2f2cs8hyr2i4yjqpcyl8m0wmr2cypa401m3fvz4221i"))))
6845 (build-system ruby-build-system)
6846 (synopsis "XML toolkit for Ruby")
6847 (description "Inspired by Electric XML library for Java, REXML aims to be
6848 easy-to-use API, small and fast. It supports both tree and stream document
6849 parsing.")
6850 (home-page "https://github.com/ruby/rexml")
6851 (license license:bsd-2)))
6852
6853 (define-public ruby-character-set
6854 (package
6855 (name "ruby-character-set")
6856 (version "1.4.0")
6857 (source
6858 (origin
6859 (method url-fetch)
6860 (uri (rubygems-uri "character_set" version))
6861 (sha256
6862 (base32
6863 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
6864 (build-system ruby-build-system)
6865 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
6866 (synopsis "Ruby library to manipulate Unicode")
6867 (description "CharacterSet is a C-extended Ruby library to work with sets
6868 of Unicode code points. It can read and write these sets in various formats
6869 and implements the @code{stdlib} @code{Set} interface for them. It also
6870 offers an alternate paradigm of @code{String} processing which grants much
6871 better performance than @code{Regexp} and @code{String} methods from the
6872 @code{stdlib} where applicable. Many parts can be used independently, e.g.:
6873 @itemize
6874 @item @code{CharacterSet::Character}
6875 @item @code{CharacterSet::Parser}
6876 @item @code{CharacterSet::Writer}
6877 @item @code{RangeCompressor}
6878 @end itemize")
6879 (home-page "https://github.com/jaynetics/character_set")
6880 (license license:expat)))
6881
6882 (define-public ruby-range-compressor
6883 (package
6884 (name "ruby-range-compressor")
6885 (version "1.0.0")
6886 (source
6887 (origin
6888 (method git-fetch)
6889 (uri (git-reference
6890 (url "https://github.com/janosch-x/range_compressor.git")
6891 (commit (string-append "v" version))))
6892 (file-name (git-file-name name version))
6893 (sha256
6894 (base32
6895 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
6896 (build-system ruby-build-system)
6897 (arguments
6898 `(#:test-target "spec"
6899 #:phases (modify-phases %standard-phases
6900 (add-after 'extract-gemspec 'strip-version-requirements
6901 (lambda _
6902 (substitute* "range_compressor.gemspec"
6903 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
6904 (string-append stripped "\n")))
6905 #t)))))
6906 (native-inputs
6907 `(("ruby-rspec" ,ruby-rspec)))
6908 (synopsis "Simple arrays of objects to arrays of ranges compressor")
6909 (description "RangeCompresses is a tiny library that allows compressing
6910 arrays of objects into arrays of ranges. For example, it can turn the
6911 following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
6912 (home-page "https://github.com/janosch-x/range_compressor")
6913 (license license:expat)))
6914
6915 (define-public ruby-regexp-property-values
6916 (package
6917 (name "ruby-regexp-property-values")
6918 (version "1.0.0")
6919 (source
6920 (origin
6921 (method git-fetch)
6922 (uri (git-reference ;no test suite in distributed gem
6923 (url "https://github.com/jaynetics/regexp_property_values.git")
6924 (commit (string-append "v" version))))
6925 (file-name (git-file-name name version))
6926 (sha256
6927 (base32
6928 "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
6929 (build-system ruby-build-system)
6930 (arguments
6931 '(#:test-target "default"))
6932 (native-inputs
6933 `(("ruby-character-set" ,ruby-character-set)
6934 ("ruby-rake-compiler" ,ruby-rake-compiler)
6935 ("ruby-range-compressor" ,ruby-range-compressor)
6936 ("ruby-rspec" ,ruby-rspec)))
6937 (synopsis "Inspect Ruby's regex engine property values")
6938 (description "This small library lets you see which property values are
6939 supported by the regular expression engine of the Ruby version you are running
6940 and can directly read out their code point ranges. In other words, it
6941 determines all supported values for @code{\\p{value}} expressions and what
6942 they match.")
6943 (home-page "https://github.com/jaynetics/regexp_property_values")
6944 (license license:expat)))
6945
6946 (define-public ruby-regexp-parser
6947 (package
6948 (name "ruby-regexp-parser")
6949 (version "1.7.1")
6950 (source
6951 (origin
6952 (method git-fetch) ;bin/test missing from gem
6953 (uri (git-reference
6954 (url "https://github.com/ammar/regexp_parser.git")
6955 (commit (string-append "v" version))))
6956 (file-name (git-file-name name version))
6957 (sha256
6958 (base32
6959 "0dk9d4vpw31cc06s29fqyr1kq0kipym1mydifkcrnppvpl3pd53r"))))
6960 (build-system ruby-build-system)
6961 (arguments
6962 '(#:test-target "default"
6963 #:phases (modify-phases %standard-phases
6964 (add-before 'build 'compile-scanner.rb
6965 (lambda _
6966 (invoke "rake" "build")
6967 ;; XXX: This is needed otherwise the install
6968 ;; phase fails to delete the installed cached
6969 ;; gem file.
6970 (delete-file-recursively "pkg")
6971 #t)))))
6972 (native-inputs
6973 `(("ragel" ,ragel)
6974 ("ruby-regexp-property-values" ,ruby-regexp-property-values)
6975 ("ruby-rspec" ,ruby-rspec)))
6976 (synopsis "A regular expression parser library for Ruby ")
6977 (description "A Ruby gem for tokenizing, parsing, and transforming regular
6978 expressions. It comprises the following components:
6979 @itemize
6980 @item A scanner/tokenizer based on Ragel,
6981 @item A lexer that produces a stream of token objects,
6982 @item A parser that produces a tree of Expression objects.
6983 @end itemize")
6984 (home-page "https://github.com/ammar/regexp_parser")
6985 (license license:expat)))
6986
6987 (define-public ruby-test-queue
6988 (package
6989 (name "ruby-test-queue")
6990 (version "0.4.2")
6991 (source
6992 (origin
6993 (method url-fetch)
6994 (uri (rubygems-uri "test-queue" version))
6995 (sha256
6996 (base32
6997 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
6998 (build-system ruby-build-system)
6999 (arguments
7000 '(#:phases
7001 (modify-phases %standard-phases
7002 (replace 'check
7003 (lambda* (#:key tests? #:allow-other-keys)
7004 (when tests?
7005 (invoke "rspec"))
7006 #t)))))
7007 (native-inputs
7008 `(("ruby-rspec" ,ruby-rspec)))
7009 (synopsis "Minitest/RSpec parallel test runner for CI environments")
7010 (description "The test-queue module is a parallel test runner,
7011 built using a centralized queue to ensure optimal distribution of
7012 tests between workers. It is specifically optimized for Continuous
7013 Integration (CI) environments: build statistics from each run are
7014 stored locally and used to sort the queue at the beginning of the next
7015 run.")
7016 (home-page "https://github.com/tmm1/test-queue")
7017 (license license:expat)))
7018
7019 (define-public ruby-rubocop
7020 (package
7021 (name "ruby-rubocop")
7022 (version "0.88.0")
7023 (source
7024 (origin
7025 (method git-fetch) ;no tests in distributed gem
7026 (uri (git-reference
7027 (url "https://github.com/rubocop-hq/rubocop.git")
7028 (commit (string-append "v" version))))
7029 (file-name (git-file-name name version))
7030 (sha256
7031 (base32
7032 "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
7033 (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
7034 (build-system ruby-build-system)
7035 (arguments
7036 '(#:test-target "default"
7037 #:phases
7038 (modify-phases %standard-phases
7039 (add-after 'unpack 'remove-problematic-tests
7040 ;; These tests depend on Rubocop extensions, which cannot be
7041 ;; included as they cause a dependency cycle with Rubocop itself.
7042 (lambda _
7043 (delete-file "spec/rubocop/config_loader_spec.rb")
7044 (substitute* "Gemfile"
7045 ((".*'rubocop-performance'.*") "")
7046 ((".*'rubocop-rspec'.*") ""))
7047 ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
7048 ;; errors.
7049 (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
7050 (("# (rubocop:(enable|disable) RSpec.*)" _ what)
7051 (string-append "# Disabled: " what)))
7052 #t))
7053 (add-after 'unpack 'disable-bundler
7054 (lambda _
7055 (substitute* "Rakefile"
7056 (("Bundler\\.setup.*") "nil\n"))
7057 #t))
7058 (replace 'replace-git-ls-files
7059 (lambda _
7060 (substitute* "rubocop.gemspec"
7061 (("`git ls-files(.*)`" _ files)
7062 (format #f "`find ~a -type f| sort`" files)))
7063 #t))
7064 (add-before 'check 'set-home
7065 (lambda _
7066 (setenv "HOME" (getcwd))
7067 #t))
7068 (add-before 'check 'make-adoc-files-writable
7069 (lambda _
7070 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
7071 "\\.adoc$")))
7072 (for-each make-file-writable adoc-files))
7073 #t)))))
7074 (native-inputs
7075 `(("ruby-bump" ,ruby-bump)
7076 ("ruby-pry" ,ruby-pry)
7077 ("ruby-rspec" ,ruby-rspec)
7078 ("ruby-test-queue" ,ruby-test-queue)
7079 ("ruby-webmock" ,ruby-webmock-2)
7080 ("ruby-yard" ,ruby-yard)))
7081 (propagated-inputs
7082 `(("ruby-parallel" ,ruby-parallel)
7083 ("ruby-parser" ,ruby-parser)
7084 ("ruby-rainbow" ,ruby-rainbow)
7085 ("ruby-regexp-parser" ,ruby-regexp-parser)
7086 ("ruby-rexml" ,ruby-rexml)
7087 ("ruby-rubocop-ast" ,ruby-rubocop-ast)
7088 ("ruby-progressbar" ,ruby-progressbar)
7089 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
7090 (synopsis "Ruby code style checking tool")
7091 (description
7092 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
7093 the community-driven Ruby Style Guide.")
7094 (home-page "https://github.com/rubocop-hq/rubocop")
7095 (license license:expat)))
7096
7097 (define-public ruby-contest
7098 (package
7099 (name "ruby-contest")
7100 (version "0.1.3")
7101 (source
7102 (origin
7103 (method url-fetch)
7104 (uri (rubygems-uri "contest" version))
7105 (sha256
7106 (base32
7107 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
7108 (build-system ruby-build-system)
7109 (synopsis "Write declarative tests using nested contexts")
7110 (description
7111 "Contest allows writing declarative @code{Test::Unit} tests using nested
7112 contexts without performance penalties.")
7113 (home-page "https://github.com/citrusbyte/contest")
7114 (license license:expat)))
7115
7116 (define-public ruby-creole
7117 (package
7118 (name "ruby-creole")
7119 (version "0.5.0")
7120 (source
7121 (origin
7122 (method url-fetch)
7123 (uri (rubygems-uri "creole" version))
7124 (sha256
7125 (base32
7126 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
7127 (build-system ruby-build-system)
7128 (native-inputs
7129 `(("ruby-bacon" ,ruby-bacon)))
7130 (synopsis "Creole markup language converter")
7131 (description
7132 "Creole is a lightweight markup language and this library for converting
7133 creole to @code{HTML}.")
7134 (home-page "https://github.com/minad/creole")
7135 (license license:ruby)))
7136
7137 (define-public ruby-docile
7138 (package
7139 (name "ruby-docile")
7140 (version "1.1.5")
7141 (source
7142 (origin
7143 (method url-fetch)
7144 (uri (rubygems-uri "docile" version))
7145 (sha256
7146 (base32
7147 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
7148 (build-system ruby-build-system)
7149 (arguments
7150 '(#:tests? #f)) ; needs github-markup, among others
7151 (synopsis "Ruby EDSL helper library")
7152 (description "Docile is a Ruby library that provides an interface for
7153 creating embedded domain specific languages (EDSLs) that manipulate existing
7154 Ruby classes.")
7155 (home-page "https://ms-ati.github.io/docile/")
7156 (license license:expat)))
7157
7158 (define-public ruby-middleware
7159 (package
7160 (name "ruby-middleware")
7161 (version "0.1.0")
7162 (source
7163 (origin
7164 (method url-fetch)
7165 (uri (rubygems-uri "middleware" version))
7166 (sha256
7167 (base32
7168 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
7169 (build-system ruby-build-system)
7170 (arguments '(#:tests? #f)) ;no test suite
7171 (synopsis "Implementation of a middleware abstraction for Ruby")
7172 (description "Middleware is a generalized implementation of a middleware
7173 abstraction for Ruby.")
7174 (home-page "https://github.com/mitchellh/middleware")
7175 (license license:expat)))
7176
7177 (define-public ruby-benchmark-ips
7178 (package
7179 (name "ruby-benchmark-ips")
7180 (version "2.8.2")
7181 (source
7182 (origin
7183 (method url-fetch)
7184 (uri (rubygems-uri "benchmark-ips" version))
7185 (sha256
7186 (base32
7187 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
7188 (build-system ruby-build-system)
7189 (native-inputs
7190 `(("ruby-hoe" ,ruby-hoe)))
7191 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
7192 (description "Benchmark-ips enhances the Ruby Benchmark module with the
7193 iterations per second count. For short snippets of code, it can automatically
7194 figure out how many times to run the code to get interesting data.")
7195 (home-page "https://github.com/evanphx/benchmark-ips")
7196 (license license:expat)))
7197
7198 (define-public ruby-ffi-rzmq-core
7199 (package
7200 (name "ruby-ffi-rzmq-core")
7201 (version "1.0.7")
7202 (source
7203 (origin
7204 (method url-fetch)
7205 (uri (rubygems-uri "ffi-rzmq-core" version))
7206 (sha256
7207 (base32
7208 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
7209 (build-system ruby-build-system)
7210 (arguments
7211 `(#:phases
7212 (modify-phases %standard-phases
7213 (add-after 'unpack 'patch-libzmq-search-path
7214 (lambda* (#:key inputs #:allow-other-keys)
7215 (let ((zeromq (assoc-ref inputs "zeromq")))
7216 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
7217 (("/usr/local/lib")
7218 (string-append zeromq "/lib")))
7219 #t)))
7220 (replace 'check
7221 (lambda _
7222 (invoke "rspec"))))))
7223 (native-inputs
7224 `(("ruby-rspec" ,ruby-rspec)))
7225 (inputs
7226 `(("zeromq" ,zeromq)))
7227 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7228 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
7229 (description "This library only provides the FFI wrapper for the ZeroMQ
7230 networking library. It can be used to implement a Ruby API for the ZeroMQ
7231 library.")
7232 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
7233 (license license:expat)))
7234
7235 (define-public ruby-ffi-rzmq
7236 (package
7237 (name "ruby-ffi-rzmq")
7238 (version "2.0.7")
7239 (source
7240 (origin
7241 (method url-fetch)
7242 (uri (rubygems-uri "ffi-rzmq" version))
7243 (sha256
7244 (base32
7245 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
7246 (build-system ruby-build-system)
7247 (arguments '(#:tests? #t
7248 #:phases (modify-phases %standard-phases
7249 (replace 'check
7250 (lambda _
7251 (invoke "rspec"))))))
7252 (native-inputs
7253 `(("ruby-rspec" ,ruby-rspec)))
7254 (propagated-inputs
7255 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
7256 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
7257 (description "This library provides a high-level API that wraps the ZeroMQ
7258 networking library using the Ruby foreign function interface (FFI). It is a
7259 pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
7260 for FFI.")
7261 (home-page "https://github.com/chuckremes/ffi-rzmq")
7262 (license license:expat)))
7263
7264 (define-public ruby-sawyer
7265 (package
7266 (name "ruby-sawyer")
7267 (version "0.8.2")
7268 (source
7269 (origin
7270 (method url-fetch)
7271 (uri (rubygems-uri "sawyer" version))
7272 (sha256
7273 (base32
7274 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
7275 (build-system ruby-build-system)
7276 (propagated-inputs
7277 `(("ruby-addressable" ,ruby-addressable)
7278 ("ruby-faraday" ,ruby-faraday)))
7279 (synopsis "Experimental hypermedia agent for Ruby")
7280 (description "Sawyer is an experimental hypermedia agent for Ruby built on
7281 top of Faraday.")
7282 (home-page "https://github.com/lostisland/sawyer")
7283 (license license:expat)))
7284
7285 (define-public ruby-octokit
7286 (package
7287 (name "ruby-octokit")
7288 (version "4.18.0")
7289 (source
7290 (origin
7291 (method url-fetch)
7292 (uri (rubygems-uri "octokit" version))
7293 (sha256
7294 (base32
7295 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
7296 (build-system ruby-build-system)
7297 (arguments '(#:tests? #f)) ;no test suite in the gem release
7298 (propagated-inputs
7299 `(("ruby-faraday" ,ruby-faraday)
7300 ("ruby-sawyer" ,ruby-sawyer)))
7301 (synopsis "Ruby toolkit for the GitHub API")
7302 (description "Octokit wraps the GitHub API in a flat API client that
7303 follows Ruby conventions and requires little knowledge of REST.")
7304 (home-page "https://github.com/octokit/octokit.rb")
7305 (license license:expat)))
7306
7307 (define-public ruby-chandler
7308 (package
7309 (name "ruby-chandler")
7310 (version "0.9.0")
7311 (source
7312 (origin
7313 (method url-fetch)
7314 (uri (rubygems-uri "chandler" version))
7315 (sha256
7316 (base32
7317 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
7318 (build-system ruby-build-system)
7319 (native-inputs
7320 `(("ruby-rubocop" ,ruby-rubocop)))
7321 (propagated-inputs
7322 `(("ruby-netrc" ,ruby-netrc)
7323 ("ruby-octokit" ,ruby-octokit)))
7324 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
7325 (description "Chandler syncs a project's CHANGELOG file entries to
7326 GitHub's release notes to remove the need of manually entering release
7327 notes.")
7328 (home-page "https://github.com/mattbrictson/chandler")
7329 (license license:expat)))
7330
7331 (define-public ruby-pry-byebug
7332 (package
7333 (name "ruby-pry-byebug")
7334 (version "3.9.0")
7335 (source
7336 (origin
7337 (method git-fetch)
7338 (uri (git-reference
7339 (url "https://github.com/deivid-rodriguez/pry-byebug")
7340 (commit (string-append "v" version))))
7341 (file-name (git-file-name name version))
7342 (sha256
7343 (base32
7344 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7345 (build-system ruby-build-system)
7346 (arguments
7347 `(#:phases (modify-phases %standard-phases
7348 (add-before 'check 'set-home
7349 (lambda _
7350 (setenv "HOME" (getcwd))
7351 #t)))))
7352 (native-inputs
7353 `(("ruby-chandler" ,ruby-chandler)
7354 ("ruby-rubocop" ,ruby-rubocop)
7355 ("ruby-simplecov" ,ruby-simplecov)))
7356 (propagated-inputs
7357 `(("ruby-byebug" ,ruby-byebug-11)
7358 ("ruby-pry" ,ruby-pry)))
7359 (synopsis "Step-by-step debugging and stack navigation in Pry")
7360 (description "This package adds step-by-step debugging and stack
7361 navigation capabilities to @code{pry}, using @code{byebug}.")
7362 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7363 (license license:expat)))
7364
7365 (define-public ruby-binding-of-caller
7366 (package
7367 (name "ruby-binding-of-caller")
7368 (version "0.8.0")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (rubygems-uri "binding_of_caller" version))
7373 (sha256
7374 (base32
7375 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7376 (build-system ruby-build-system)
7377 ;; Attempting to run the test suite fails with a rake deprecation error
7378 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7379 (arguments '(#:tests? #f))
7380 (propagated-inputs
7381 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
7382 (synopsis "Retrieve the binding of a method's caller")
7383 (description "The @code{binding_of_caller} module provides the
7384 @code{Binding#of_caller} method. It allows accessing bindings from upper
7385 frames in the call stack and can evaluate code in that context.")
7386 (home-page "https://github.com/banister/binding_of_caller")
7387 (license license:expat)))
7388
7389 (define-public ruby-pry-stack-explorer
7390 (package
7391 (name "ruby-pry-stack-explorer")
7392 (version "0.5.1")
7393 (source
7394 (origin
7395 (method url-fetch)
7396 (uri (rubygems-uri "pry-stack_explorer" version))
7397 (sha256
7398 (base32
7399 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7400 (build-system ruby-build-system)
7401 (arguments '(#:tests? #f)) ;no test suite in gem release
7402 (propagated-inputs
7403 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
7404 ("ruby-pry" ,ruby-pry)))
7405 (synopsis "Call-stack navigation plugin for the Pry REPL")
7406 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7407 add support to navigate the call-stack.")
7408 (home-page "https://github.com/pry/pry-stack_explorer")
7409 (license license:expat)))
7410
7411 (define-public ruby-varint
7412 (package
7413 (name "ruby-varint")
7414 (version "0.1.1")
7415 (source
7416 (origin
7417 (method url-fetch)
7418 (uri (rubygems-uri "varint" version))
7419 (sha256
7420 (base32
7421 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7422 (build-system ruby-build-system)
7423 (arguments '(#:tests? #f)) ;no test suite
7424 (synopsis "Variable length integers (varint) C extension for Ruby")
7425 (description "This package provides a small C extension to speed up
7426 variable length integers (varint) in Ruby Protocol Buffers.")
7427 (home-page "https://github.com/liquidm/varint")
7428 (license license:bsd-3)))
7429
7430 (define-public ruby-ruby-prof
7431 (package
7432 (name "ruby-ruby-prof")
7433 (version "1.4.1")
7434 (source
7435 (origin
7436 (method url-fetch)
7437 (uri (rubygems-uri "ruby-prof" version))
7438 (sha256
7439 (base32
7440 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
7441 (build-system ruby-build-system)
7442 (arguments
7443 `(#:phases
7444 (modify-phases %standard-phases
7445 (add-after 'unpack 'patch-rakefile
7446 ;; This fixes the following error: "NameError: uninitialized
7447 ;; constant Bundler::GemHelper" (see:
7448 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7449 (lambda _
7450 (substitute* "Rakefile"
7451 ((".*require \"bundler/setup\".*" all)
7452 (string-append all " require 'bundler/gem_tasks'\n")))
7453 #t))
7454 ;; The LineNumbersTest test fails non-deterministically (see:
7455 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7456 (add-after 'extract-gemspec 'delete-flaky-test
7457 (lambda _
7458 (delete-file "test/line_number_test.rb")
7459 (substitute* "ruby-prof.gemspec"
7460 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7461 #t))
7462 (add-before 'check 'compile
7463 (lambda _
7464 (invoke "rake" "compile"))))))
7465 (native-inputs
7466 `(("bundler" ,bundler)
7467 ("ruby-minitest" ,ruby-minitest)
7468 ("ruby-rake-compiler" ,ruby-rake-compiler)
7469 ("ruby-rdoc" ,ruby-rdoc)))
7470 (synopsis "Fast code profiler for Ruby")
7471 (description "RubyProf is a fast code profiler for Ruby. Its features
7472 include:
7473 @table @asis
7474 @item Speed
7475 Being a C extension, it is many times faster than the standard Ruby profiler.
7476 @item Measurement Modes
7477 It can measure program wall time, process time, object allocations and memory
7478 usage.
7479 @item Reports
7480 A variety of text and cross-referenced HTML reports can be generated.
7481 @item Threads
7482 Profiling multiple threads simultaneously is supported.
7483 @end table")
7484 (home-page "https://github.com/ruby-prof/ruby-prof")
7485 (license license:bsd-2)))
7486
7487 (define-public ruby-cucumber-messages
7488 (package
7489 (name "ruby-cucumber-messages")
7490 (version "12.2.0")
7491 (source (origin
7492 (method git-fetch)
7493 (uri (git-reference
7494 (url "https://github.com/cucumber/messages-ruby")
7495 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7496 (file-name (git-file-name name version))
7497 (sha256
7498 (base32
7499 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7500 (build-system ruby-build-system)
7501 (arguments
7502 `(#:phases (modify-phases %standard-phases
7503 (add-after 'unpack 'patch-protobuf.rb
7504 (lambda _
7505 (substitute* "rake/protobuf.rb"
7506 (("load 'protobuf/tasks/compile.rake'")
7507 "require 'protobuf/tasks'"))
7508 #t))
7509 (add-before 'build 'compile
7510 (lambda _
7511 (substitute* "Makefile"
7512 (("bundle exec ") "")
7513 (("include default.mk.*" all)
7514 (string-append "#" all)))
7515 (invoke "make")))
7516 (replace 'check
7517 (lambda _
7518 (invoke "rspec"))))))
7519 (propagated-inputs
7520 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7521 (native-inputs
7522 `(("ruby-rspec" ,ruby-rspec)))
7523 (home-page "https://github.com/cucumber/messages-ruby")
7524 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7525 (description "Cucumber Messages for Ruby is a library which allows
7526 serialization and deserialization of the protocol buffer messages used in
7527 Cucumber.")
7528 (license license:expat)))
7529
7530 (define-public ruby-gherkin
7531 (package
7532 (name "ruby-gherkin")
7533 (version "14.0.1")
7534 (source (origin
7535 (method git-fetch)
7536 (uri (git-reference
7537 (url "https://github.com/cucumber/gherkin-ruby")
7538 (commit (string-append "v" version))))
7539 (file-name (git-file-name name version))
7540 (sha256
7541 (base32
7542 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
7543 (build-system ruby-build-system)
7544 (native-inputs
7545 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7546 ("ruby-rspec" ,ruby-rspec)))
7547 (arguments
7548 `(#:test-target "spec"))
7549 (synopsis "Gherkin parser for Ruby")
7550 (description "Gherkin is a parser and compiler for the Gherkin language.
7551 It is intended be used by all Cucumber implementations to parse
7552 @file{.feature} files.")
7553 (home-page "https://github.com/cucumber/gherkin-ruby")
7554 (license license:expat)))
7555
7556 (define-public ruby-gherkin-ruby
7557 (package
7558 (name "ruby-gherkin-ruby")
7559 (version "0.3.2")
7560 (home-page "https://github.com/codegram/gherkin-ruby")
7561 (source (origin
7562 (method url-fetch)
7563 (uri (rubygems-uri "gherkin-ruby" version))
7564 (sha256
7565 (base32
7566 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7567 (build-system ruby-build-system)
7568 (synopsis "Pure Ruby Gherkin parser")
7569 (description
7570 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7571 200 lines of code.")
7572 ;; XXX: No license information anywhere but Readme.md.
7573 (license license:expat)))
7574
7575 (define-public ruby-aruba
7576 (package
7577 (name "ruby-aruba")
7578 (version "0.14.14")
7579 (source
7580 (origin
7581 (method url-fetch)
7582 (uri (rubygems-uri "aruba" version))
7583 (sha256
7584 (base32
7585 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
7586 (build-system ruby-build-system)
7587 (arguments
7588 '(#:test-target "spec"
7589 #:phases
7590 (modify-phases %standard-phases
7591 (add-after 'unpack 'patch
7592 (lambda _
7593 (substitute* "spec/aruba/api_spec.rb"
7594 ;; This resolves some errors in the specs
7595 ;;
7596 ;; undefined method `parse' for Time:Class
7597 (("require 'spec_helper'")
7598 "require 'spec_helper'\nrequire 'time'"))
7599 ;; Avoid shebang issues in this spec file
7600 (substitute* "spec/aruba/matchers/command_spec.rb"
7601 (("/usr/bin/env bash")
7602 (which "bash")))
7603 #t))
7604 (add-before 'check 'remove-unnecessary-dependencies
7605 (lambda _
7606 (substitute* "Gemfile"
7607 ((".*byebug.*") "\n")
7608 ((".*pry.*") "\n")
7609 ((".*yaml.*") "\n")
7610 ((".*bcat.*") "\n")
7611 ((".*kramdown.*") "\n")
7612 ((".*rubocop.*") "\n")
7613 ((".*cucumber-pro.*") "\n")
7614 ((".*cucumber.*") "\n")
7615 ((".*license_finder.*") "\n")
7616 ((".*rake.*") "gem 'rake'\n")
7617 ((".*relish.*") "\n"))
7618 (substitute* "aruba.gemspec"
7619 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7620 "spec.add_runtime_dependency 'cucumber'"))
7621 #t))
7622 (add-before 'check 'set-home
7623 (lambda _ (setenv "HOME" "/tmp") #t)))))
7624 (native-inputs
7625 `(("bundler" ,bundler)
7626 ("ruby-rspec" ,ruby-rspec)
7627 ("ruby-fuubar" ,ruby-fuubar)
7628 ("ruby-simplecov" ,ruby-simplecov)))
7629 (propagated-inputs
7630 `(("ruby-childprocess" ,ruby-childprocess)
7631 ("ruby-contracts" ,ruby-contracts)
7632 ("ruby-cucumber" ,ruby-cucumber)
7633 ("ruby-ffi" ,ruby-ffi)
7634 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
7635 ("ruby-thor" ,ruby-thor)
7636 ("ruby-yard" ,ruby-yard)))
7637 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7638 (description
7639 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7640 command-line applications. It supports applications written in any
7641 language.")
7642 (home-page "https://github.com/cucumber/aruba")
7643 (license license:expat)))
7644
7645 ;; A version of ruby-aruba without tests run so that circular dependencies can
7646 ;; be avoided.
7647 (define ruby-aruba-without-tests
7648 (package
7649 (inherit ruby-aruba)
7650 (arguments '(#:tests? #f))
7651 (propagated-inputs
7652 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7653 ,@(alist-delete "ruby-cucumber"
7654 (package-propagated-inputs ruby-aruba))))
7655 (native-inputs '())))
7656
7657 (define-public ruby-sys-uname
7658 (package
7659 (name "ruby-sys-uname")
7660 (version "1.2.1")
7661 (source
7662 (origin
7663 (method url-fetch)
7664 (uri (rubygems-uri "sys-uname" version))
7665 (sha256
7666 (base32
7667 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7668 (build-system ruby-build-system)
7669 (arguments
7670 `(#:test-target "spec"))
7671 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7672 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
7673 (synopsis "Ruby interface for gathering system information")
7674 (description "The sys-uname library provides an interface for gathering
7675 information about your current platform. It allows retrieving information
7676 such as the OS name, OS version, system name, etc.")
7677 (home-page "https://github.com/djberg96/sys-uname")
7678 (license license:asl2.0)))
7679
7680 (define-public ruby-cucumber-create-meta
7681 (package
7682 (name "ruby-cucumber-create-meta")
7683 (version "1.0.0")
7684 (source
7685 (origin
7686 (method url-fetch)
7687 (uri (rubygems-uri "cucumber-create-meta" version))
7688 (sha256
7689 (base32
7690 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7691 (build-system ruby-build-system)
7692 (arguments
7693 `(#:phases (modify-phases %standard-phases
7694 (add-after 'extract-gemspec 'relax-version-requirements
7695 (lambda _
7696 (substitute* ".gemspec"
7697 ((" 12\\.2")
7698 " 12.1"))
7699 #t))
7700 (replace 'check
7701 (lambda _
7702 (invoke "rspec"))))))
7703 (native-inputs
7704 `(("ruby-rspec" ,ruby-rspec)))
7705 (propagated-inputs
7706 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7707 ("ruby-sys-uname" ,ruby-sys-uname)))
7708 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7709 (description "The @code{createMeta} utility function allows generating
7710 system-specific @code{Meta} messages for Cucumber Ruby.")
7711 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7712 (license license:expat)))
7713
7714 (define-public ruby-cucumber-html-formatter
7715 (package
7716 (name "ruby-cucumber-html-formatter")
7717 (version "7.0.0")
7718 (source
7719 (origin
7720 (method url-fetch)
7721 (uri (rubygems-uri "cucumber-html-formatter" version))
7722 (sha256
7723 (base32
7724 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7725 (build-system ruby-build-system)
7726 (arguments
7727 `(#:phases (modify-phases %standard-phases
7728 (replace 'check
7729 (lambda _
7730 (invoke "rspec"))))))
7731 (native-inputs
7732 `(("ruby-rspec" ,ruby-rspec)))
7733 (propagated-inputs
7734 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7735 (synopsis "HTML formatter for Cucumber")
7736 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7737 runs. It is built on top of cucumber-react and works with any Cucumber
7738 implementation with a protocol buffer formatter that outputs Cucumber
7739 messages.")
7740 (home-page "https://github.com/cucumber/cucumber/tree/\
7741 master/html-formatter/ruby")
7742 (license license:expat)))
7743
7744 (define-public ruby-cucumber
7745 (package
7746 (name "ruby-cucumber")
7747 (version "4.1.0")
7748 (source
7749 (origin
7750 (method git-fetch)
7751 (uri (git-reference
7752 (url "https://github.com/cucumber/cucumber-ruby")
7753 (commit (string-append "v" version))))
7754 (file-name (git-file-name name version))
7755 (sha256
7756 (base32
7757 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
7758 (build-system ruby-build-system)
7759 (arguments
7760 '(#:test-target "default"
7761 #:phases
7762 (modify-phases %standard-phases
7763 (add-after 'unpack 'disable-rubocop
7764 ;; Rubocop lint check fails with our more recent version.
7765 (lambda _
7766 (substitute* "Rakefile"
7767 (("spec cucumber rubocop")
7768 "spec cucumber"))
7769 #t))
7770 (add-after 'extract-gemspec 'strip-version-requirements
7771 (lambda _
7772 (delete-file "Gemfile") ;do not use Bundler
7773 (substitute* "cucumber.gemspec"
7774 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7775 (string-append stripped "\n")))
7776 #t))
7777 (add-before 'check 'set-home
7778 (lambda _
7779 (setenv "HOME" (getcwd))
7780 #t)))))
7781 (propagated-inputs
7782 `(("ruby-builder" ,ruby-builder)
7783 ("ruby-cucumber-core" ,ruby-cucumber-core)
7784 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7785 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7786 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
7787 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
7788 ("ruby-diff-lcs" ,ruby-diff-lcs)
7789 ("ruby-gherkin" ,ruby-gherkin)
7790 ("ruby-multi-json" ,ruby-multi-json)
7791 ("ruby-multi-test" ,ruby-multi-test)))
7792 (native-inputs
7793 `(;; Use a untested version of aruba, to avoid a circular dependency, as
7794 ;; ruby-aruba depends on ruby-cucumber.
7795 ("ruby-aruba", ruby-aruba-without-tests)
7796 ("ruby-rspec" ,ruby-rspec)
7797 ("ruby-pry" ,ruby-pry)
7798 ("ruby-nokogiri" ,ruby-nokogiri)
7799 ("ruby-rubocop" ,ruby-rubocop)))
7800 (synopsis "Describe automated tests in plain language")
7801 (description "Cucumber is a tool for running automated tests written in
7802 plain language. It's designed to support a Behaviour Driven Development (BDD)
7803 software development workflow.")
7804 (home-page "https://cucumber.io/")
7805 (license license:expat)))
7806
7807 (define ruby-cucumber-without-tests
7808 (package (inherit ruby-cucumber)
7809 (arguments
7810 '(#:tests? #f))
7811 (native-inputs
7812 '())))
7813
7814 (define-public ruby-coveralls
7815 (package
7816 (name "ruby-coveralls")
7817 (version "0.8.23")
7818 (source
7819 (origin
7820 (method url-fetch)
7821 (uri (rubygems-uri "coveralls" version))
7822 (sha256
7823 (base32
7824 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7825 (build-system ruby-build-system)
7826 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
7827 ;; because of its nonfree, Hippocratic-derived license.
7828 (arguments
7829 `(#:tests? #f
7830 #:phases (modify-phases %standard-phases
7831 (add-after 'extract-gemspec 'strip-version-requirements
7832 ;; Keeping strict version requirements can cause problems
7833 ;; to users of the library, such as: Gem::ConflictError:
7834 ;; Unable to activate coveralls-0.8.23, because
7835 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
7836 (lambda _
7837 (substitute* "coveralls-ruby.gemspec"
7838 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
7839 (string-append stripped ")\n")))
7840 #t)))))
7841 (propagated-inputs
7842 `(("ruby-json" ,ruby-json)
7843 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
7844 ("ruby-thor" ,ruby-thor)
7845 ("ruby-tins" ,ruby-tins)))
7846 (synopsis "Ruby implementation of the Coveralls API")
7847 (description "This package provides a Ruby implementation of the Coveralls
7848 API.")
7849 (home-page "https://coveralls.io")
7850 (license license:expat)))
7851
7852 (define-public ruby-unindent
7853 (package
7854 (name "ruby-unindent")
7855 (version "1.0")
7856 (source
7857 (origin
7858 (method url-fetch)
7859 (uri (rubygems-uri "unindent" version))
7860 (sha256
7861 (base32
7862 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
7863 (build-system ruby-build-system)
7864 (synopsis "Ruby method to unindent strings")
7865 (description "This module provides a @code{String#unindent} Ruby method to
7866 unindent strings, which can be useful to unindent multiline strings embedded
7867 in already-indented code.")
7868 (home-page "https://github.com/mynyml/unindent")
7869 (license license:expat)))
7870
7871 (define-public ruby-cucumber-core
7872 (package
7873 (name "ruby-cucumber-core")
7874 (version "7.1.0")
7875 (source
7876 (origin
7877 (method git-fetch)
7878 (uri (git-reference
7879 (url "https://github.com/cucumber/cucumber-ruby-core")
7880 (commit (string-append "v" version))))
7881 (file-name (git-file-name name version))
7882 (sha256
7883 (base32
7884 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
7885 (build-system ruby-build-system)
7886 (arguments
7887 `(#:test-target "spec"
7888 #:phases
7889 (modify-phases %standard-phases
7890 (add-after 'extract-gemspec 'relax-version-requirements
7891 (lambda _
7892 (substitute* "cucumber-core.gemspec"
7893 (("'cucumber-tag-expressions',.*")
7894 "'cucumber-tag-expressions', '>=2.0.0'\n"))
7895 #t)))))
7896 (native-inputs
7897 `(("ruby-rspec" ,ruby-rspec)
7898 ("ruby-coveralls" ,ruby-coveralls)
7899 ("ruby-rubocop" ,ruby-rubocop)
7900 ("ruby-simplecov" ,ruby-simplecov)
7901 ("ruby-unindent" ,ruby-unindent)))
7902 (propagated-inputs
7903 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7904 ("ruby-gherkin" ,ruby-gherkin)
7905 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
7906 (synopsis "Core library for the Cucumber BDD app")
7907 (description "Cucumber is a tool for running automated tests
7908 written in plain language. Because they're written in plain language,
7909 they can be read by anyone on your team. Because they can be read by
7910 anyone, you can use them to help improve communication, collaboration
7911 and trust on your team.")
7912 (home-page "https://cucumber.io/")
7913 (license license:expat)))
7914
7915 (define-public ruby-cucumber-expressions
7916 (package
7917 (name "ruby-cucumber-expressions")
7918 (version "10.2.0")
7919 (source
7920 (origin
7921 (method git-fetch)
7922 (uri (git-reference
7923 (url "https://github.com/cucumber/cucumber-expressions-ruby")
7924 (commit (string-append "v" version))))
7925 (file-name (git-file-name name version))
7926 (sha256
7927 (base32
7928 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
7929 (build-system ruby-build-system)
7930 (arguments
7931 '(#:test-target "spec"))
7932 (native-inputs
7933 `(("ruby-rspec" ,ruby-rspec)
7934 ("ruby-simplecov" ,ruby-simplecov)))
7935 (synopsis "Simpler alternative to Regular Expressions")
7936 (description "Cucumber Expressions offer similar functionality to Regular
7937 Expressions, with a syntax that is easier to read and write. Cucumber
7938 Expressions are extensible with parameter types.")
7939 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
7940 (license license:expat)))
7941
7942 (define-public ruby-cucumber-wire
7943 (package
7944 (name "ruby-cucumber-wire")
7945 (version "3.1.0")
7946 (source
7947 (origin
7948 (method url-fetch)
7949 (uri (rubygems-uri "cucumber-wire" version))
7950 (sha256
7951 (base32
7952 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
7953 (build-system ruby-build-system)
7954 (arguments
7955 '(#:tests? #f ;tests use cucumber, causing a cycle
7956 #:phases
7957 (modify-phases %standard-phases
7958 (add-after 'extract-gemspec 'relax-version-requirements
7959 (lambda _
7960 (substitute* ".gemspec"
7961 ((" 10\\.1") " 10.2"))
7962 #t)))))
7963 (propagated-inputs
7964 `(("ruby-cucumber-core" ,ruby-cucumber-core)
7965 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
7966 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7967 (synopsis "Cucumber wire protocol plugin")
7968 (description "Cucumber's wire protocol allows step definitions to be
7969 implemented and invoked on any platform.")
7970 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
7971 (license license:expat)))
7972
7973 (define-public ruby-cucumber-tag-expressions
7974 (package
7975 (name "ruby-cucumber-tag-expressions")
7976 (version "3.0.0")
7977 (source
7978 (origin
7979 (method git-fetch)
7980 (uri (git-reference
7981 (url "https://github.com/cucumber/tag-expressions-ruby")
7982 (commit (string-append "v" version))))
7983 (file-name (git-file-name name version))
7984 (sha256
7985 (base32
7986 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
7987 (build-system ruby-build-system)
7988 (arguments
7989 `(#:test-target "spec"))
7990 (native-inputs
7991 `(("ruby-rspec" ,ruby-rspec)))
7992 (synopsis "Cucumber tag expressions for Ruby")
7993 (description "Cucumber tag expression parser for Ruby. A tag expression
7994 is an infix boolean expression used by Cucumber.")
7995 (home-page "https://github.com/cucumber/tag-expressions-ruby")
7996 (license license:expat)))
7997
7998 (define-public ruby-bindex
7999 (package
8000 (name "ruby-bindex")
8001 (version "0.5.0")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (rubygems-uri "bindex" version))
8006 (sha256
8007 (base32
8008 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
8009 (build-system ruby-build-system)
8010 (arguments
8011 '(#:test-target "default"))
8012 (native-inputs
8013 `(("bundler" ,bundler)
8014 ("ruby-rake-compiler" ,ruby-rake-compiler)))
8015 (synopsis "Provides access for bindings relating to Ruby exceptions")
8016 (description
8017 "@code{bindex} provides a way to access the bindings that relate to
8018 exceptions in Ruby, providing more information about the context in which the
8019 exception occurred.")
8020 (home-page "https://github.com/gsamokovarov/bindex")
8021 (license license:expat)))
8022
8023 (define-public ruby-bio-logger
8024 (package
8025 (name "ruby-bio-logger")
8026 (version "1.0.1")
8027 (source
8028 (origin
8029 (method url-fetch)
8030 (uri (rubygems-uri "bio-logger" version))
8031 (sha256
8032 (base32
8033 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
8034 (build-system ruby-build-system)
8035 (arguments
8036 `(#:tests? #f)) ; rake errors, missing shoulda
8037 (propagated-inputs
8038 `(("ruby-log4r" ,ruby-log4r)))
8039 (synopsis "Log4r wrapper for Ruby")
8040 (description "Bio-logger is a wrapper around Log4r adding extra logging
8041 features such as filtering and fine grained logging.")
8042 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
8043 (license license:expat)))
8044
8045 (define-public ruby-yajl-ruby
8046 (package
8047 (name "ruby-yajl-ruby")
8048 (version "1.4.1")
8049 (source
8050 (origin
8051 (method url-fetch)
8052 (uri (rubygems-uri "yajl-ruby" version))
8053 (sha256
8054 (base32
8055 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
8056 (build-system ruby-build-system)
8057 (arguments
8058 '(#:test-target "spec"
8059 #:phases
8060 (modify-phases %standard-phases
8061 (add-before 'check 'patch-test-to-update-load-path
8062 (lambda _
8063 (substitute* "spec/parsing/large_number_spec.rb"
8064 (("require \"yajl\"")
8065 "$LOAD_PATH << 'lib'; require 'yajl'"))
8066 #t)))))
8067 (native-inputs
8068 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8069 ("ruby-rspec" ,ruby-rspec)))
8070 (synopsis "Streaming JSON parsing and encoding library for Ruby")
8071 (description
8072 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
8073 is compatible with the JSON gem, so yajl-ruby can act as a drop in
8074 replacement.
8075
8076 A modified copy of yajl is used, and included in the package.")
8077 (home-page "https://github.com/brianmario/yajl-ruby")
8078 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
8079 license:bsd-3)))) ; Included, modified copy of yajl
8080
8081 (define-public ruby-yard
8082 (package
8083 (name "ruby-yard")
8084 (version "0.9.25")
8085 (source
8086 (origin
8087 (method git-fetch)
8088 ;; Tests do not pass if we build from the distributed gem.
8089 (uri (git-reference
8090 (url "https://github.com/lsegal/yard")
8091 (commit (string-append "v" version))))
8092 (file-name (git-file-name name version))
8093 (sha256
8094 (base32
8095 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
8096 (build-system ruby-build-system)
8097 (arguments
8098 ;; Note: Tests are willfully disabled to alleviate dependency cycle
8099 ;; problems.
8100 `(#:tests? #f
8101 #:phases (modify-phases %standard-phases
8102 (add-after 'unpack 'do-not-set-date-in-gemspec
8103 ;; Fix a reproducibility issue (see:
8104 ;; https://github.com/lsegal/yard/issues/1343).
8105 (lambda _
8106 (substitute* "yard.gemspec"
8107 ((".*s\\.date.*") ""))
8108 #t)))))
8109 (synopsis "Documentation generation tool for Ruby")
8110 (description "YARD is a documentation generation tool for the Ruby
8111 programming language. It enables the user to generate consistent, usable
8112 documentation that can be exported to a number of formats very easily, and
8113 also supports extending for custom Ruby constructs such as custom class level
8114 definitions.")
8115 (home-page "https://yardoc.org")
8116 (license license:expat)))
8117
8118 (define-public ruby-yard-with-tests
8119 (package
8120 (inherit ruby-yard)
8121 (name "ruby-yard-with-tests")
8122 (arguments
8123 (substitute-keyword-arguments (package-arguments ruby-yard)
8124 ((#:tests? _ #t) #t)
8125 ((#:test-target _ "default") "default")
8126 ((#:phases phases '%standard-phases)
8127 `(modify-phases ,phases
8128 (add-before 'check 'prepare-for-tests
8129 (lambda* (#:key tests? #:allow-other-keys)
8130 (when tests?
8131 (substitute* "Rakefile"
8132 ((".*[Ss]amus.*") ""))
8133 ;; Delete the Gemfile to avoid errors relating to it.
8134 (delete-file "Gemfile")
8135 ;; $HOME needs to be set to somewhere writeable for tests to
8136 ;; run.
8137 (setenv "HOME" "/tmp"))
8138 #t))))))
8139 (native-inputs
8140 `(("ruby-rspec" ,ruby-rspec)
8141 ("ruby-rack" ,ruby-rack)
8142 ("ruby-redcloth" ,ruby-redcloth)
8143 ("ruby-asciidoc" ,ruby-asciidoctor)))))
8144
8145 (define-public ruby-spectroscope
8146 (package
8147 (name "ruby-spectroscope")
8148 (version "0.1.0")
8149 (source
8150 (origin
8151 (method url-fetch)
8152 (uri (rubygems-uri "spectroscope" version))
8153 (sha256
8154 (base32
8155 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
8156 (build-system ruby-build-system)
8157 (arguments
8158 `(#:phases
8159 (modify-phases %standard-phases
8160 (replace 'check
8161 (lambda _
8162 (with-output-to-file ".test"
8163 (lambda _
8164 (display
8165 "\
8166 require 'ae/should'
8167 require 'rspec'
8168
8169 include RSpec
8170
8171 Test.run :default do |run|
8172 run.files << 'spec/*_spec.rb'
8173 end")))
8174 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
8175 (native-inputs
8176 `(("ruby-ae" ,ruby-ae)
8177 ("ruby-rspec" ,ruby-rspec)))
8178 (propagated-inputs
8179 `(("ruby-rubytest" ,ruby-rubytest)))
8180 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
8181 (description "Spectroscope is a Behavior-Driven Development (BDD)
8182 framework built on RubyTest, designed to emulate RSpec in most respects. It
8183 is assertion framework independent so any number of assertion systems can be
8184 used, such as Assay or AE.")
8185 (home-page "http://rubyworks.github.com/spectroscope/")
8186 (license license:bsd-2)))
8187
8188 (define-public ruby-tomparse
8189 (package
8190 (name "ruby-tomparse")
8191 (version "0.4.2")
8192 (source
8193 (origin
8194 (method url-fetch)
8195 (uri (rubygems-uri "tomparse" version))
8196 (sha256
8197 (base32
8198 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
8199 (build-system ruby-build-system)
8200 ;; TODO: Tests require citron and rulebow, not yet packaged.
8201 (arguments '(#:tests? #f))
8202 (synopsis "TomDoc parser for Ruby")
8203 (description "TomParse is a TomDoc parser for Ruby. It takes a code
8204 comment as input and parses it into a convenient object-oriented structure in
8205 accordance with the TomDoc standard. See
8206 @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
8207 TomDoc format.")
8208 (home-page "http://rubyworks.github.com/tomparse/")
8209 (license license:bsd-2)))
8210
8211 (define-public ruby-yard-tomdoc
8212 (package
8213 (name "ruby-yard-tomdoc")
8214 (version "0.7.1")
8215 (source
8216 (origin
8217 (method url-fetch)
8218 (uri (rubygems-uri "yard-tomdoc" version))
8219 (sha256
8220 (base32
8221 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
8222 (build-system ruby-build-system)
8223 (arguments
8224 `(#:phases (modify-phases %standard-phases
8225 (replace 'check
8226 (lambda _
8227 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8228 (native-inputs
8229 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8230 ("ruby-spectroscope" ,ruby-spectroscope)
8231 ("ruby-ae" ,ruby-ae)))
8232 (propagated-inputs
8233 `(("ruby-tomparse" ,ruby-tomparse)
8234 ("ruby-yard" ,ruby-yard)))
8235 (synopsis "TomDoc syntax for YARD")
8236 (description "This module adds support for the TomDoc documentation format
8237 to YARD, a documentation generation tool for Ruby.")
8238 (home-page "http://rubyworks.github.com/yard-tomdoc/")
8239 (license license:expat)))
8240
8241 (define-public ruby-clap
8242 (package
8243 (name "ruby-clap")
8244 (version "1.0.0")
8245 (source (origin
8246 (method url-fetch)
8247 (uri (rubygems-uri "clap" version))
8248 (sha256
8249 (base32
8250 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
8251 (build-system ruby-build-system)
8252 ;; Clap needs cutest for running tests, but cutest needs clap.
8253 (arguments `(#:tests? #f))
8254 (synopsis "Command line argument parsing for simple applications")
8255 (description
8256 "Clap provides command line argument parsing features. It covers the
8257 simple case of executing code based on the flags or parameters passed.")
8258 (home-page "https://github.com/djanowski/cutest")
8259 (license license:expat)))
8260
8261 (define-public ruby-cutest
8262 (package
8263 (name "ruby-cutest")
8264 (version "1.2.2")
8265 (source (origin
8266 (method url-fetch)
8267 (uri (rubygems-uri "cutest" version))
8268 (sha256
8269 (base32
8270 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
8271 (build-system ruby-build-system)
8272 (propagated-inputs
8273 `(("ruby-clap" ,ruby-clap)))
8274 (synopsis "Run tests in separate processes")
8275 (description
8276 "Cutest runs tests in separate processes to avoid shared state.")
8277 (home-page "https://github.com/djanowski/cutest")
8278 (license license:expat)))
8279
8280 (define-public ruby-pygmentize
8281 (package
8282 (name "ruby-pygmentize")
8283 (version "0.0.3")
8284 (source (origin
8285 (method url-fetch)
8286 (uri (rubygems-uri "pygmentize" version))
8287 (sha256
8288 (base32
8289 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
8290 (build-system ruby-build-system)
8291 (arguments
8292 `(#:phases
8293 (modify-phases %standard-phases
8294 (add-after 'unpack 'fix-pygmentize-path
8295 (lambda _
8296 (substitute* "lib/pygmentize.rb"
8297 (("\"/usr/bin/env python.*")
8298 (string-append "\"" (which "pygmentize") "\"\n")))
8299 #t))
8300 (add-after 'build 'do-not-use-vendor-directory
8301 (lambda _
8302 ;; Remove bundled pygments sources
8303 ;; FIXME: ruby-build-system does not support snippets.
8304 (delete-file-recursively "vendor")
8305 (substitute* "pygmentize.gemspec"
8306 (("\"vendor/\\*\\*/\\*\",") ""))
8307 #t)))))
8308 (inputs
8309 `(("pygments" ,python-pygments)))
8310 (native-inputs
8311 `(("ruby-cutest" ,ruby-cutest)
8312 ("ruby-nokogiri" ,ruby-nokogiri)))
8313 (synopsis "Thin Ruby wrapper around pygmentize")
8314 (description
8315 "Pygmentize provides a simple way to call pygmentize from within a Ruby
8316 application.")
8317 (home-page "https://github.com/djanowski/pygmentize")
8318 (license license:expat)))
8319
8320 (define-public ruby-eventmachine
8321 (package
8322 (name "ruby-eventmachine")
8323 (version "1.2.7")
8324 (source
8325 (origin
8326 (method url-fetch)
8327 (uri (rubygems-uri "eventmachine" version))
8328 (sha256
8329 (base32
8330 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
8331 (build-system ruby-build-system)
8332 (arguments
8333 '(#:tests? #f)) ; test suite tries to connect to google.com
8334 (native-inputs
8335 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
8336 (synopsis "Single-threaded network event framework for Ruby")
8337 (description
8338 "EventMachine implements a single-threaded engine for arbitrary network
8339 communications. EventMachine wraps all interactions with sockets, allowing
8340 programs to concentrate on the implementation of network protocols. It can be
8341 used to create both network servers and clients.")
8342 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8343 (home-page "https://github.com/eventmachine/eventmachine")
8344 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
8345
8346 (define-public ruby-ruby-engine
8347 (package
8348 (name "ruby-ruby-engine")
8349 (version "2.0.0")
8350 (source
8351 (origin
8352 (method url-fetch)
8353 (uri (rubygems-uri "ruby_engine" version))
8354 (sha256
8355 (base32
8356 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
8357 (build-system ruby-build-system)
8358 (arguments
8359 `(#:phases
8360 (modify-phases %standard-phases
8361 (add-after 'extract-gemspec 'clean-up
8362 (lambda _
8363 (delete-file "Gemfile.lock")
8364 (substitute* "ruby_engine.gemspec"
8365 ;; Remove unnecessary imports that would entail further
8366 ;; dependencies.
8367 ((".*<rdoc.*") "")
8368 ((".*<rubygems-tasks.*") "")
8369 ;; Remove extraneous .gem file
8370 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8371 (("\"Gemfile.lock\".freeze, ") "")
8372 ;; Soften rake dependency
8373 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
8374 "%q<rake>.freeze, [\">= 10.0\"]")
8375 ;; Soften the rspec dependency
8376 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
8377 "%q<rspec>.freeze, [\">= 2.4\"]"))
8378 (substitute* "Rakefile"
8379 (("require 'rubygems/tasks'") "")
8380 (("Gem::Tasks.new") ""))
8381 ;; Remove extraneous .gem file that otherwise gets installed.
8382 (delete-file-recursively "pkg")
8383 #t)))))
8384 (native-inputs
8385 `(("bundler" ,bundler)
8386 ("ruby-rake" ,ruby-rake)
8387 ("ruby-rspec" ,ruby-rspec)))
8388 (synopsis "Simplifies checking for Ruby implementation")
8389 (description
8390 "@code{ruby_engine} provides an RubyEngine class that can be used to
8391 check which implementation of Ruby is in use. It can provide the interpreter
8392 name and provides query methods such as @{RubyEngine.mri?}.")
8393 (home-page "https://github.com/janlelis/ruby_engine")
8394 (license license:expat)))
8395
8396 (define-public ruby-turn
8397 (package
8398 (name "ruby-turn")
8399 (version "0.9.7")
8400 (source
8401 (origin
8402 (method url-fetch)
8403 (uri (rubygems-uri "turn" version))
8404 (sha256
8405 (base32
8406 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8407 (build-system ruby-build-system)
8408 (arguments
8409 `(#:phases
8410 (modify-phases %standard-phases
8411 ;; Tests fail because turn changes its environment so can no longer
8412 ;; find test/unit. Instead simply test if the executable runs
8413 ;; without issue.
8414 (replace 'check
8415 (lambda _
8416 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8417 (propagated-inputs
8418 `(("ruby-ansi" ,ruby-ansi)
8419 ("ruby-minitest" ,ruby-minitest-4)))
8420 (synopsis "Alternate set of alternative runners for MiniTest")
8421 (description
8422 "TURN provides a set of alternative runners for MiniTest which are both
8423 colorful and informative. TURN displays each test on a separate line with
8424 failures being displayed immediately instead of at the end of the tests. Note
8425 that TURN is no longer being maintained.")
8426 (home-page "https://rubygems.org/gems/turn")
8427 (license license:expat)))
8428
8429 (define-public ruby-mimemagic
8430 (package
8431 (name "ruby-mimemagic")
8432 (version "0.3.3")
8433 (source
8434 (origin
8435 (method url-fetch)
8436 (uri (rubygems-uri "mimemagic" version))
8437 (sha256
8438 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8439 (build-system ruby-build-system)
8440 (arguments
8441 '(#:phases
8442 (modify-phases %standard-phases
8443 ;; This phase breaks the tests, as it patches some of the test data.
8444 (delete 'patch-source-shebangs))))
8445 (native-inputs
8446 `(("ruby-bacon" ,ruby-bacon)))
8447 (synopsis "Ruby library for MIME detection by extension or content")
8448 (description
8449 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8450 extension or content, using the freedesktop.org.xml shared-mime-info
8451 database.")
8452 (home-page "https://github.com/minad/mimemagic")
8453 (license license:expat)))
8454
8455 (define-public ruby-mime-types-data
8456 (package
8457 (name "ruby-mime-types-data")
8458 (version "3.2016.0521")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (rubygems-uri "mime-types-data" version))
8463 (sha256
8464 (base32
8465 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
8466 (build-system ruby-build-system)
8467 (native-inputs
8468 `(("ruby-hoe" ,ruby-hoe)))
8469 (synopsis "Registry for information about MIME media type definitions")
8470 (description
8471 "@code{mime-types-data} provides a registry for information about
8472 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8473 be used with the Ruby mime-types library or other software to determine
8474 defined filename extensions for MIME types, or to use filename extensions to
8475 look up the likely MIME type definitions.")
8476 (home-page "https://github.com/mime-types/mime-types-data/")
8477 (license license:expat)))
8478
8479 (define-public ruby-mime-types
8480 (package
8481 (name "ruby-mime-types")
8482 (version "3.1")
8483 (source
8484 (origin
8485 (method url-fetch)
8486 (uri (rubygems-uri "mime-types" version))
8487 (sha256
8488 (base32
8489 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
8490 (build-system ruby-build-system)
8491 (propagated-inputs
8492 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
8493 (native-inputs
8494 `(("ruby-hoe" ,ruby-hoe)
8495 ("ruby-fivemat" ,ruby-fivemat)
8496 ("ruby-minitest-focus" ,ruby-minitest-focus)
8497 ("ruby-minitest-rg" ,ruby-minitest-rg)
8498 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
8499 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
8500 (synopsis "Library and registry for MIME content type definitions")
8501 (description "The mime-types library provides a library and registry for
8502 information about Multipurpose Internet Mail Extensions (MIME) content type
8503 definitions. It can be used to determine defined filename extensions for MIME
8504 types, or to use filename extensions to look up the likely MIME type
8505 definitions.")
8506 (home-page "https://github.com/mime-types/ruby-mime-types")
8507 (license license:expat)))
8508
8509 (define-public ruby-fivemat
8510 (package
8511 (name "ruby-fivemat")
8512 (version "1.3.7")
8513 (source
8514 (origin
8515 (method url-fetch)
8516 (uri (rubygems-uri "fivemat" version))
8517 (sha256
8518 (base32
8519 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
8520 (build-system ruby-build-system)
8521 (arguments
8522 `(#:tests? #f)) ; no tests
8523 (synopsis "Each test file given its own line of dots")
8524 (description
8525 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8526 its own line of dots during testing. It aims to provide test output that is
8527 neither too verbose nor too minimal.")
8528 (home-page "https://github.com/tpope/fivemat")
8529 (license license:expat)))
8530
8531 (define-public ruby-sqlite3
8532 (package
8533 (name "ruby-sqlite3")
8534 (version "1.4.2")
8535 (source
8536 (origin
8537 (method url-fetch)
8538 (uri (rubygems-uri "sqlite3" version))
8539 (sha256
8540 (base32
8541 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
8542 (build-system ruby-build-system)
8543 (arguments
8544 `(#:phases
8545 (modify-phases %standard-phases
8546 (add-before 'check 'add-gemtest-file
8547 ;; This file exists in the repository but is not distributed.
8548 (lambda _ (invoke "touch" ".gemtest"))))))
8549 (inputs
8550 `(("sqlite" ,sqlite)))
8551 (native-inputs
8552 `(("ruby-hoe" ,ruby-hoe)
8553 ("ruby-rake-compiler" ,ruby-rake-compiler)
8554 ("ruby-mini-portile" ,ruby-mini-portile)))
8555 (synopsis "Interface with SQLite3 databases")
8556 (description
8557 "This module allows Ruby programs to interface with the SQLite3 database
8558 engine.")
8559 (home-page
8560 "https://github.com/sparklemotion/sqlite3-ruby")
8561 (license license:bsd-3)))
8562
8563 (define-public ruby-shoulda-context
8564 (package
8565 (name "ruby-shoulda-context")
8566 (version "1.2.2")
8567 (source
8568 (origin
8569 (method url-fetch)
8570 (uri (rubygems-uri "shoulda-context" version))
8571 (sha256
8572 (base32
8573 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
8574 (build-system ruby-build-system)
8575 (arguments
8576 `(#:phases
8577 (modify-phases %standard-phases
8578 (replace 'check
8579 (lambda _
8580 ;; Do not run tests to avoid circular dependence with rails.
8581 ;; Instead just import the library to test.
8582 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
8583 (synopsis "Test::Unit context framework extracted from Shoulda")
8584 (description
8585 "@code{shoulda-context} is the context framework extracted from Shoulda.
8586 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8587 context, setup, and should blocks combine to produce natural test method
8588 names.")
8589 (home-page "https://github.com/thoughtbot/shoulda-context")
8590 (license license:expat)))
8591
8592 (define-public ruby-shoulda-matchers
8593 (package
8594 (name "ruby-shoulda-matchers")
8595 (version "3.1.2")
8596 (source
8597 (origin
8598 (method url-fetch)
8599 (uri (rubygems-uri "shoulda-matchers" version))
8600 (sha256
8601 (base32
8602 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
8603 (build-system ruby-build-system)
8604 (arguments
8605 `(#:phases
8606 (modify-phases %standard-phases
8607 (replace 'check
8608 (lambda _
8609 ;; Do not run tests to avoid circular dependence with rails. Instead
8610 ;; just import the library to test.
8611 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
8612 (propagated-inputs
8613 `(("ruby-activesupport" ,ruby-activesupport)))
8614 (synopsis "Collection of testing matchers extracted from Shoulda")
8615 (description
8616 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8617 test common Rails functionality. These tests would otherwise be much longer,
8618 more complex, and error-prone.")
8619 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8620 (license license:expat)))
8621
8622 (define-public ruby-shoulda-matchers-2
8623 (package
8624 (inherit ruby-shoulda-matchers)
8625 (version "2.8.0")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (rubygems-uri "shoulda-matchers" version))
8629 (sha256
8630 (base32
8631 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8632
8633 (define-public ruby-shoulda
8634 (package
8635 (name "ruby-shoulda")
8636 (version "3.5.0")
8637 (source
8638 (origin
8639 (method url-fetch)
8640 (uri (rubygems-uri "shoulda" version))
8641 (sha256
8642 (base32
8643 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8644 (build-system ruby-build-system)
8645 (arguments
8646 `(#:phases
8647 (modify-phases %standard-phases
8648 (replace 'check
8649 ;; Don't run tests to avoid circular dependence with rails. Instead
8650 ;; just import the library to test.
8651 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
8652 (propagated-inputs
8653 `(("ruby-shoulda-context" ,ruby-shoulda-context)
8654 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
8655 (synopsis "Context framework and matchers for testing")
8656 (description
8657 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8658 @code{shoulda-matchers} providing tools for writing tests.")
8659 (home-page "https://github.com/thoughtbot/shoulda")
8660 (license license:expat)))
8661
8662 (define-public ruby-unf
8663 (package
8664 (name "ruby-unf")
8665 (version "0.1.4")
8666 (source
8667 (origin
8668 (method url-fetch)
8669 (uri (rubygems-uri "unf" version))
8670 (sha256
8671 (base32
8672 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8673 (build-system ruby-build-system)
8674 (arguments
8675 `(#:phases
8676 (modify-phases %standard-phases
8677 (add-before 'check 'add-dependency-to-bundler
8678 (lambda _
8679 ;; test-unit is required but not provided by the bundler
8680 ;; environment. This is fixed in the upstream repository but fix
8681 ;; has not been released.
8682 (substitute* "Gemfile"
8683 (("^gemspec") "gem 'test-unit'\ngemspec"))
8684 #t)))))
8685 (propagated-inputs
8686 `(("ruby-unf-ext" ,ruby-unf-ext)))
8687 (native-inputs
8688 `(("ruby-shoulda" ,ruby-shoulda)
8689 ("bundler" ,bundler)
8690 ("ruby-test-unit" ,ruby-test-unit)))
8691 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8692 (description
8693 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8694 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8695 @code{java.text.Normalizer} on JRuby.")
8696 (home-page "https://github.com/knu/ruby-unf")
8697 (license license:bsd-2)))
8698
8699 (define-public ruby-warden
8700 (package
8701 (name "ruby-warden")
8702 (version "1.2.8")
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (rubygems-uri "warden" version))
8707 (sha256
8708 (base32
8709 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8710 (build-system ruby-build-system)
8711 (arguments
8712 '(#:tests? #f)) ; No included tests
8713 (propagated-inputs
8714 `(("ruby-rack" ,ruby-rack)))
8715 (synopsis "Rack middleware providing authentication")
8716 (description
8717 "Warden is a Rack-based middleware that provides a mechanism for
8718 authentication in Ruby web applications.")
8719 (home-page "https://github.com/wardencommunity/warden")
8720 (license license:expat)))
8721
8722 (define-public ruby-warden-oauth2
8723 (package
8724 (name "ruby-warden-oauth2")
8725 (version "0.0.1")
8726 (source
8727 (origin
8728 (method url-fetch)
8729 (uri (rubygems-uri "warden-oauth2" version))
8730 (sha256
8731 (base32
8732 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8733 (build-system ruby-build-system)
8734 (arguments
8735 '(#:test-target "spec"
8736 #:phases
8737 (modify-phases %standard-phases
8738 (add-after 'unpack 'remove-unnecessary-dependencies
8739 (lambda _
8740 (substitute* "Gemfile"
8741 ;; All of these gems relate to development, and are unnecessary
8742 ;; when running the tests
8743 (("gem 'guard-bundler'") "")
8744 (("gem 'guard'") "")
8745 (("gem 'guard-rspec'") "")
8746 (("gem 'rb-fsevent'") "")
8747 (("gem 'pry'") "")
8748 (("gem 'growl'") ""))
8749 #t))
8750 ;; The test suite doesn't work with rspec@2, and this is incompatible
8751 ;; with the current version of Rake, so invoke Rspec directly
8752 (replace 'check
8753 (lambda* (#:key tests? #:allow-other-keys)
8754 (when tests?
8755 (invoke "bundle" "exec" "rspec"))
8756 #t)))))
8757 (propagated-inputs
8758 `(("ruby-warden" ,ruby-warden)))
8759 (native-inputs
8760 `(("bundler" ,bundler)
8761 ("ruby-rspec" ,ruby-rspec-2)
8762 ("ruby-rack-test" ,ruby-rack-test)))
8763 (synopsis "OAuth 2.0 strategies for Warden")
8764 (description
8765 "This library extends Warden to support OAuth 2.0 authorized API
8766 requests.")
8767 (home-page "https://github.com/opperator/warden-oauth2")
8768 (license license:expat)))
8769
8770 (define-public ruby-webmock-2
8771 (package
8772 (name "ruby-webmock")
8773 (version "2.3.2")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (rubygems-uri "webmock" version))
8778 (sha256
8779 (base32
8780 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8781 (build-system ruby-build-system)
8782 (native-inputs
8783 `(("bundler" ,bundler)
8784 ("ruby-rspec" ,ruby-rspec)))
8785 (propagated-inputs
8786 `(("ruby-addressable" ,ruby-addressable)
8787 ("ruby-crack" ,ruby-crack)
8788 ("ruby-hashdiff" ,ruby-hashdiff)))
8789 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8790 (description
8791 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8792 requests. This is useful when testing software.")
8793 (home-page "https://github.com/bblimke/webmock")
8794 (license license:expat)))
8795
8796 (define-public ruby-unicode-display-width
8797 (package
8798 (name "ruby-unicode-display-width")
8799 (version "1.6.0")
8800 (source
8801 (origin
8802 (method url-fetch)
8803 (uri (rubygems-uri "unicode-display_width" version))
8804 (sha256
8805 (base32
8806 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
8807 (build-system ruby-build-system)
8808 (arguments
8809 '(;; Test data not included.
8810 #:tests? #f))
8811 (synopsis "Determine the monospace display width of Ruby strings")
8812 (description
8813 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8814 display width of strings in Ruby.")
8815 (home-page "https://github.com/janlelis/unicode-display_width")
8816 (license license:expat)))
8817
8818 ;; There is another gem called 'ruby-version' so we use an underscore in this
8819 ;; name
8820 (define-public ruby_version
8821 (package
8822 (name "ruby_version")
8823 (version "1.0.2")
8824 (source
8825 (origin
8826 (method url-fetch)
8827 (uri (rubygems-uri "ruby_version" version))
8828 (sha256
8829 (base32
8830 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
8831 (build-system ruby-build-system)
8832 (arguments
8833 `(#:phases
8834 (modify-phases %standard-phases
8835 (add-before 'check 'fix-dependencies
8836 (lambda _
8837 ;; Remove the Gemfile.lock, as we want to use Guix packages at
8838 ;; whatever versions.
8839 (delete-file "Gemfile.lock")
8840 ;; Remove the included gem files as they unnecessary.
8841 (delete-file-recursively "pkg/")
8842 ;; Accept any version of rake, rdoc and rspec
8843 (substitute* "ruby_version.gemspec"
8844 (("%q<rake.*") "%q<rake>)\n")
8845 (("%q<rdoc.*") "%q<rdoc>)\n")
8846 (("%q<rspec.*") "%q<rspec>)\n"))
8847 ;; Do not use bundler.
8848 (substitute* "Rakefile"
8849 (("Bundler\\.setup.*") "nil\n"))
8850 #t)))))
8851 (native-inputs
8852 `(("ruby-rdoc" ,ruby-rdoc)
8853 ("ruby-rspec" ,ruby-rspec)
8854 ("ruby-rubygems-tasks", ruby-rubygems-tasks)))
8855 (synopsis "Ruby library to help check the Ruby version")
8856 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
8857 checking for the right Ruby version in software.")
8858 (home-page "https://github.com/janlelis/ruby_version")
8859 (license license:expat)))
8860
8861 (define-public ruby-websocket-driver
8862 (package
8863 (name "ruby-websocket-driver")
8864 (version "0.7.1")
8865 (source
8866 (origin
8867 (method url-fetch)
8868 (uri (rubygems-uri "websocket-driver" version))
8869 (sha256
8870 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
8871 (build-system ruby-build-system)
8872 (arguments
8873 '(#:tests? #f)) ; no included tests
8874 (propagated-inputs
8875 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
8876 (synopsis "WebSocket protocol handler with pluggable I/O")
8877 (description
8878 "@code{websocket-driver} provides a complete implementation of the
8879 WebSocket protocols that can be hooked up to any TCP library")
8880 (home-page "https://github.com/faye/websocket-driver-ruby")
8881 (license license:expat)))
8882
8883 (define-public ruby-websocket-extensions
8884 (package
8885 (name "ruby-websocket-extensions")
8886 (version "0.1.3")
8887 (source
8888 (origin
8889 (method url-fetch)
8890 (uri (rubygems-uri "websocket-extensions" version))
8891 (sha256
8892 (base32
8893 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
8894 (build-system ruby-build-system)
8895 (arguments
8896 '(;; No included tests
8897 #:tests? #f))
8898 (synopsis "Generic extension manager for WebSocket connections")
8899 (description
8900 "@code{websocket-extensions} provides a container for registering
8901 extension plugins.")
8902 (home-page "https://github.com/faye/websocket-extensions-ruby")
8903 (license license:expat)))
8904
8905 (define-public ruby-domain-name
8906 (package
8907 (name "ruby-domain-name")
8908 (version "0.5.20190701")
8909 (source
8910 (origin
8911 (method url-fetch)
8912 (uri (rubygems-uri "domain_name" version))
8913 (sha256
8914 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
8915 (build-system ruby-build-system)
8916 (arguments
8917 `(#:phases
8918 (modify-phases %standard-phases
8919 (add-before 'check 'fix-versions
8920 (lambda _
8921 ;; Fix NameError that appears to already be fixed upstream.
8922 (substitute* "Rakefile"
8923 (("DomainName::VERSION")
8924 "Bundler::GemHelper.gemspec.version"))
8925 ;; Loosen unnecessarily strict test-unit version specification.
8926 (substitute* "domain_name.gemspec"
8927 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
8928 #t)))))
8929 (propagated-inputs
8930 `(("ruby-unf" ,ruby-unf)))
8931 (native-inputs
8932 `(("ruby-shoulda" ,ruby-shoulda)
8933 ("bundler" ,bundler)
8934 ("ruby-test-unit" ,ruby-test-unit)))
8935 (synopsis "Domain name manipulation library")
8936 (description
8937 "@code{domain_name} is a Domain name manipulation library. It parses a
8938 domain name ready for extracting the registered domain and TLD (Top Level
8939 Domain). It can also be used for cookie domain validation based on the Public
8940 Suffix List.")
8941 (home-page "https://github.com/knu/ruby-domain_name")
8942 (license license:bsd-2)))
8943
8944 (define-public ruby-http-cookie
8945 (package
8946 (name "ruby-http-cookie")
8947 (version "1.0.3")
8948 (source
8949 (origin
8950 (method url-fetch)
8951 (uri (rubygems-uri "http-cookie" version))
8952 (sha256
8953 (base32
8954 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
8955 (build-system ruby-build-system)
8956 (arguments
8957 `(#:phases
8958 (modify-phases %standard-phases
8959 (add-before 'check 'add-dependency-to-bundler
8960 (lambda _
8961 ;; Fix NameError
8962 (substitute* "Rakefile"
8963 (("HTTP::Cookie::VERSION")
8964 "Bundler::GemHelper.gemspec.version"))
8965 #t)))))
8966 (propagated-inputs
8967 `(("ruby-domain-name" ,ruby-domain-name)))
8968 (native-inputs
8969 `(("rubysimplecov" ,ruby-simplecov)
8970 ("bundler" ,bundler)
8971 ("ruby-sqlite3" ,ruby-sqlite3)
8972 ("ruby-test-unit" ,ruby-test-unit)))
8973 (synopsis "Handle HTTP Cookies based on RFC 6265")
8974 (description
8975 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
8976 RFC 6265. It has been designed with security, standards compliance and
8977 compatibility in mind, to behave just the same as today's major web browsers.
8978 It has built-in support for the legacy @code{cookies.txt} and
8979 @code{cookies.sqlite} formats of Mozilla Firefox.")
8980 (home-page "https://github.com/sparklemotion/http-cookie")
8981 (license license:expat)))
8982
8983 (define-public ruby-httpclient
8984 (package
8985 (name "ruby-httpclient")
8986 (version "2.8.3")
8987 (source
8988 (origin
8989 (method url-fetch)
8990 (uri (rubygems-uri "httpclient" version))
8991 (sha256
8992 (base32
8993 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
8994 (build-system ruby-build-system)
8995 (arguments
8996 '(;; TODO: Some tests currently fail
8997 ;; ------
8998 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
8999 ;; 2 omissions, 0 notifications
9000 ;; 91.866% passed
9001 ;; ------
9002 ;; 6.49 tests/s, 22.41 assertions/s
9003 #:tests? #f
9004 #:phases
9005 (modify-phases %standard-phases
9006 (replace 'check
9007 (lambda* (#:key tests? #:allow-other-keys)
9008 (if tests?
9009 (invoke "ruby"
9010 "-Ilib"
9011 "test/runner.rb")
9012 #t))))))
9013 (native-inputs
9014 `(("ruby-rack" ,ruby-rack)))
9015 (synopsis
9016 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
9017 (description
9018 "The @code{httpclient} ruby library provides functionality related to
9019 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
9020 Cookie, multithreading and authentication (digest, NTLM) support.
9021
9022 Also provided is a @command{httpclient} command, which can perform HTTP
9023 requests either using arguments or with an interactive prompt.")
9024 (home-page "https://github.com/nahi/httpclient")
9025 (license license:ruby)))
9026
9027 (define-public ruby-ansi
9028 (package
9029 (name "ruby-ansi")
9030 (version "1.5.0")
9031 (source
9032 (origin
9033 (method git-fetch)
9034 ;; Fetch from GitHub as the gem does not contain testing code.
9035 (uri (git-reference
9036 (url "https://github.com/rubyworks/ansi")
9037 (commit version)))
9038 (file-name (git-file-name name version))
9039 (sha256
9040 (base32
9041 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
9042 (build-system ruby-build-system)
9043 (arguments
9044 `(#:phases
9045 (modify-phases %standard-phases
9046 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
9047 ;; cycle ansi, qed, ansi. Instead simply test that the library can
9048 ;; be require'd.
9049 (replace 'check
9050 (lambda _
9051 (invoke "ruby" "-Ilib" "-r" "ansi")))
9052 (add-before 'validate-runpath 'replace-broken-symlink
9053 (lambda* (#:key outputs #:allow-other-keys)
9054 (let* ((out (assoc-ref outputs "out"))
9055 (file (string-append
9056 out "/lib/ruby/vendor_ruby/gems/ansi-"
9057 ,version "/lib/ansi.yml")))
9058 ;; XXX: This symlink is broken since ruby 2.4.
9059 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9060 (delete-file file)
9061 (symlink "../.index" file)
9062 #t))))))
9063 (synopsis "ANSI escape code related libraries")
9064 (description
9065 "This package is a collection of ANSI escape code related libraries
9066 enabling ANSI colorization and stylization of console output. Included in the
9067 library are the @code{Code} module, which defines ANSI codes as constants and
9068 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
9069 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
9070 @code{Terminal} module which provides information about the current output
9071 device.")
9072 (home-page "https://rubyworks.github.io/ansi/")
9073 (license license:bsd-2)))
9074
9075 (define-public ruby-systemu
9076 (package
9077 (name "ruby-systemu")
9078 (version "2.6.5")
9079 (source
9080 (origin
9081 (method url-fetch)
9082 (uri (rubygems-uri "systemu" version))
9083 (sha256
9084 (base32
9085 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
9086 (build-system ruby-build-system)
9087 (arguments
9088 `(#:phases
9089 (modify-phases %standard-phases
9090 (add-before 'check 'set-version
9091 (lambda _
9092 (setenv "VERSION" ,version)
9093 #t)))))
9094 (synopsis "Capture of stdout/stderr and handling of child processes")
9095 (description
9096 "Systemu can be used on any platform to return status, stdout, and stderr
9097 of any command. Unlike other methods like @code{open3} and @code{popen4}
9098 there is no danger of full pipes or threading issues hanging your process or
9099 subprocess.")
9100 (home-page "https://github.com/ahoward/systemu")
9101 (license license:ruby)))
9102
9103 (define-public ruby-bio-commandeer
9104 (package
9105 (name "ruby-bio-commandeer")
9106 (version "0.4.0")
9107 (source
9108 (origin
9109 (method url-fetch)
9110 (uri (rubygems-uri "bio-commandeer" version))
9111 (sha256
9112 (base32
9113 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
9114 (build-system ruby-build-system)
9115 (arguments
9116 `(#:phases
9117 (modify-phases %standard-phases
9118 (replace 'check
9119 ;; Run test without calling 'rake' so that jeweler is
9120 ;; not required as an input.
9121 (lambda _
9122 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
9123 (propagated-inputs
9124 `(("ruby-bio-logger" ,ruby-bio-logger)
9125 ("ruby-systemu" ,ruby-systemu)))
9126 (native-inputs
9127 `(("bundler" ,bundler)
9128 ("ruby-rspec" ,ruby-rspec)))
9129 (synopsis "Simplified running of shell commands from within Ruby")
9130 (description
9131 "Bio-commandeer provides an opinionated method of running shell commands
9132 from within Ruby. The advantage of bio-commandeer over other methods of
9133 running external commands is that when something goes wrong, messages printed
9134 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
9135 detail to ease debugging.")
9136 (home-page "https://github.com/wwood/bioruby-commandeer")
9137 (license license:expat)))
9138
9139 (define-public ruby-rubytest
9140 (package
9141 (name "ruby-rubytest")
9142 (version "0.8.1")
9143 (source
9144 (origin
9145 (method url-fetch)
9146 (uri (rubygems-uri "rubytest" version))
9147 (sha256
9148 (base32
9149 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
9150 (build-system ruby-build-system)
9151 (arguments
9152 ;; Disable regular testing to break the cycle rubytest, qed, brass,
9153 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
9154 ;; simply test that the library can be require'd.
9155 `(#:phases
9156 (modify-phases %standard-phases
9157 (replace 'check
9158 (lambda _
9159 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
9160 (propagated-inputs
9161 `(("ruby-ansi" ,ruby-ansi)))
9162 (synopsis "Universal test harness for Ruby")
9163 (description
9164 "Rubytest is a testing meta-framework for Ruby. It can handle any
9165 compliant test framework and can run tests from multiple frameworks in a
9166 single pass.")
9167 (home-page "https://rubyworks.github.io/rubytest")
9168 (license license:bsd-2)))
9169
9170 (define-public ruby-brass
9171 (package
9172 (name "ruby-brass")
9173 (version "1.2.1")
9174 (source
9175 (origin
9176 (method url-fetch)
9177 (uri (rubygems-uri "brass" version))
9178 (sha256
9179 (base32
9180 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
9181 (build-system ruby-build-system)
9182 (arguments
9183 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
9184 ;; Instead simply test that the library can be require'd.
9185 `(#:phases
9186 (modify-phases %standard-phases
9187 (replace 'check
9188 (lambda _
9189 (invoke "ruby" "-Ilib" "-r" "brass"))))))
9190 (synopsis "Basic foundational assertions framework")
9191 (description
9192 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
9193 foundational assertions framework for other assertion and test frameworks to
9194 make use of.")
9195 (home-page "https://rubyworks.github.io/brass")
9196 (license license:bsd-2)))
9197
9198 (define-public ruby-qed
9199 (package
9200 (name "ruby-qed")
9201 (version "2.9.2")
9202 (source
9203 (origin
9204 (method url-fetch)
9205 (uri (rubygems-uri "qed" version))
9206 (sha256
9207 (base32
9208 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
9209 (build-system ruby-build-system)
9210 (arguments
9211 ;; Disable testing to break the cycle qed, ansi, qed, among others.
9212 ;; Instead simply test that the executable runs using --copyright.
9213 `(#:phases
9214 (modify-phases %standard-phases
9215 (replace 'check
9216 (lambda _
9217 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
9218 (propagated-inputs
9219 `(("ruby-ansi" ,ruby-ansi)
9220 ("ruby-brass" ,ruby-brass)))
9221 (synopsis "Test framework utilizing literate programming techniques")
9222 (description
9223 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
9224 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
9225 Development} (BDD) utilizing Literate Programming techniques. QED sits
9226 somewhere between lower-level testing tools like @code{Test::Unit} and
9227 requirement specifications systems like Cucumber.")
9228 (home-page "https://rubyworks.github.io/qed")
9229 (license license:bsd-2)))
9230
9231 (define-public ruby-que
9232 (package
9233 (name "ruby-que")
9234 (version "1.0.0.beta3")
9235 (source
9236 (origin
9237 (method url-fetch)
9238 (uri (rubygems-uri "que" version))
9239 (sha256
9240 (base32
9241 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
9242 (build-system ruby-build-system)
9243 (arguments
9244 '(#:tests? #f)) ; No included tests
9245 (synopsis "Job queue using PostgreSQL written in Ruby")
9246 (description
9247 "This package provides a job queue that uses PostgreSQL for storing jobs
9248 and locking between worker processes.")
9249 (home-page "https://github.com/chanks/que")
9250 (license license:expat)))
9251
9252 (define-public ruby-ae
9253 (package
9254 (name "ruby-ae")
9255 (version "1.8.2")
9256 (source
9257 (origin
9258 (method git-fetch)
9259 ;; Fetch from github so tests are included.
9260 (uri (git-reference
9261 (url "https://github.com/rubyworks/ae")
9262 (commit version)))
9263 (file-name (git-file-name name version))
9264 (sha256
9265 (base32
9266 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9267 (build-system ruby-build-system)
9268 (arguments
9269 `(#:phases
9270 (modify-phases %standard-phases
9271 (replace 'check
9272 (lambda _ (invoke "qed")))
9273 (add-before 'validate-runpath 'replace-broken-symlink
9274 (lambda* (#:key outputs #:allow-other-keys)
9275 (let* ((out (assoc-ref outputs "out"))
9276 (file (string-append
9277 out "/lib/ruby/vendor_ruby/gems/ae-"
9278 ,version "/lib/ae.yml")))
9279 ;; XXX: This symlink is broken since ruby 2.4.
9280 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9281 (delete-file file)
9282 (symlink "../.index" file)
9283 #t))))))
9284 (propagated-inputs
9285 `(("ruby-ansi" ,ruby-ansi)))
9286 (native-inputs
9287 `(("ruby-qed" ,ruby-qed)))
9288 (synopsis "Assertions library")
9289 (description
9290 "Assertive Expressive (AE) is an assertions library specifically designed
9291 for reuse by other test frameworks.")
9292 (home-page "https://rubyworks.github.io/ae/")
9293 (license license:bsd-2)))
9294
9295 (define-public ruby-lemon
9296 (package
9297 (name "ruby-lemon")
9298 (version "0.9.1")
9299 (source
9300 (origin
9301 (method url-fetch)
9302 (uri (rubygems-uri "lemon" version))
9303 (sha256
9304 (base32
9305 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
9306 (build-system ruby-build-system)
9307 (arguments
9308 `(#:phases
9309 (modify-phases %standard-phases
9310 (replace 'check (lambda _ (invoke "qed"))))))
9311 (propagated-inputs
9312 `(("ruby-ae" ,ruby-ae)
9313 ("ruby-ansi" ,ruby-ansi)
9314 ("ruby-rubytest" ,ruby-rubytest)))
9315 (native-inputs
9316 `(("ruby-qed" ,ruby-qed)))
9317 (synopsis "Test framework correlating code structure and test unit")
9318 (description
9319 "Lemon is a unit testing framework that enforces highly formal
9320 case-to-class and unit-to-method test construction. This enforcement can help
9321 focus concern on individual units of behavior.")
9322 (home-page "https://rubyworks.github.io/lemon")
9323 (license license:bsd-2)))
9324
9325 (define-public ruby-rubytest-cli
9326 (package
9327 (name "ruby-rubytest-cli")
9328 (version "0.2.0")
9329 (source
9330 (origin
9331 (method url-fetch)
9332 (uri (rubygems-uri "rubytest-cli" version))
9333 (sha256
9334 (base32
9335 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
9336 (build-system ruby-build-system)
9337 (arguments
9338 `(#:tests? #f)) ; no tests
9339 (propagated-inputs
9340 `(("ruby-ansi" ,ruby-ansi)
9341 ("ruby-rubytest" ,ruby-rubytest)))
9342 (synopsis "Command-line interface for rubytest")
9343 (description
9344 "Rubytest CLI is a command-line interface for running tests for
9345 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
9346 (home-page "https://rubyworks.github.io/rubytest-cli")
9347 (license license:bsd-2)))
9348
9349 (define-public ruby-hashery
9350 (package
9351 (name "ruby-hashery")
9352 (version "2.1.2")
9353 (source
9354 (origin
9355 (method url-fetch)
9356 (uri (rubygems-uri "hashery" version))
9357 (sha256
9358 (base32
9359 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
9360 (build-system ruby-build-system)
9361 (arguments
9362 `(#:phases
9363 (modify-phases %standard-phases
9364 (replace 'check
9365 (lambda _
9366 (invoke "qed")
9367 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
9368 (native-inputs
9369 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
9370 ("ruby-qed" ,ruby-qed)
9371 ("ruby-lemon" ,ruby-lemon)))
9372 (synopsis "Hash-like classes with extra features")
9373 (description
9374 "The Hashery is a tight collection of @code{Hash}-like classes.
9375 Included are the auto-sorting @code{Dictionary} class, the efficient
9376 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
9377 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9378 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9379 standard @code{Hash} making it possible to subclass and augment to fit any
9380 specific use case.")
9381 (home-page "https://rubyworks.github.io/hashery")
9382 (license license:bsd-2)))
9383
9384 (define-public ruby-rc4
9385 (package
9386 (name "ruby-rc4")
9387 (version "0.1.5")
9388 (source
9389 (origin
9390 (method url-fetch)
9391 (uri (rubygems-uri "ruby-rc4" version))
9392 (sha256
9393 (base32
9394 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9395 (build-system ruby-build-system)
9396 (arguments
9397 `(#:phases
9398 (modify-phases %standard-phases
9399 (replace 'check
9400 (lambda _
9401 (invoke "rspec" "spec/rc4_spec.rb"))))))
9402 (native-inputs
9403 `(("ruby-rspec" ,ruby-rspec-2)))
9404 (synopsis "Implementation of the RC4 algorithm")
9405 (description
9406 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9407 (home-page "https://github.com/caiges/Ruby-RC4")
9408 (license license:expat)))
9409
9410 (define-public ruby-afm
9411 (package
9412 (name "ruby-afm")
9413 (version "0.2.2")
9414 (source
9415 (origin
9416 (method url-fetch)
9417 (uri (rubygems-uri "afm" version))
9418 (sha256
9419 (base32
9420 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9421 (build-system ruby-build-system)
9422 (native-inputs
9423 `(("bundler" ,bundler)))
9424 (synopsis "Read Adobe Font Metrics (afm) files")
9425 (description
9426 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9427 files and use the data therein.")
9428 (home-page "https://github.com/halfbyte/afm")
9429 (license license:expat)))
9430
9431 (define-public ruby-ascii85
9432 (package
9433 (name "ruby-ascii85")
9434 (version "1.0.3")
9435 (source
9436 (origin
9437 (method url-fetch)
9438 (uri (rubygems-uri "Ascii85" version))
9439 (sha256
9440 (base32
9441 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
9442 (build-system ruby-build-system)
9443 (native-inputs
9444 `(("bundler" ,bundler)))
9445 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9446 (description
9447 "This library provides methods to encode and decode Ascii85
9448 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9449 @dfn{Portable Document Format} (PDF) file formats.")
9450 (home-page "https://github.com/datawraith/ascii85gem")
9451 (license license:expat)))
9452
9453 (define-public ruby-ttfunk
9454 (package
9455 (name "ruby-ttfunk")
9456 (version "1.6.2.1")
9457 (source
9458 (origin
9459 (method git-fetch)
9460 ;; fetch from github as the gem does not contain testing code
9461 (uri (git-reference
9462 (url "https://github.com/prawnpdf/ttfunk")
9463 (commit version)))
9464 (file-name (git-file-name name version))
9465 (sha256
9466 (base32
9467 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
9468 (build-system ruby-build-system)
9469 (arguments
9470 `(#:test-target "spec"
9471 #:phases
9472 (modify-phases %standard-phases
9473 (add-before 'build 'remove-ssh
9474 (lambda _
9475 ;; remove dependency on an ssh key pair that doesn't exist
9476 (substitute* "ttfunk.gemspec"
9477 (("spec.signing_key.*") ""))
9478 #t))
9479 (add-before 'check 'remove-rubocop
9480 (lambda _
9481 ;; remove rubocop as a dependency as not needed for testing
9482 (substitute* "ttfunk.gemspec"
9483 (("spec.add_development_dependency\\('rubocop'.*") ""))
9484 (substitute* "Rakefile"
9485 (("require 'rubocop/rake_task'") "")
9486 (("RuboCop::RakeTask.new") ""))
9487 #t)))))
9488 (native-inputs
9489 `(("ruby-rspec" ,ruby-rspec)
9490 ("ruby-yard" ,ruby-yard)
9491 ("bundler" ,bundler)))
9492 (synopsis "Font metrics parser for the Prawn PDF generator")
9493 (description
9494 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9495 part of the Prawn PDF generator.")
9496 (home-page "https://github.com/prawnpdf/ttfunk")
9497 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9498 ;; for details."
9499 (license %prawn-project-licenses)))
9500
9501 (define-public ruby-puma
9502 (package
9503 (name "ruby-puma")
9504 (version "3.9.1")
9505 (source
9506 (origin
9507 (method git-fetch)
9508 ;; Fetch from GitHub because distributed gem does not contain tests.
9509 (uri (git-reference
9510 (url "https://github.com/puma/puma")
9511 (commit (string-append "v" version))))
9512 (file-name (git-file-name name version))
9513 (sha256
9514 (base32
9515 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9516 (build-system ruby-build-system)
9517 (arguments
9518 `(#:tests? #f ; Tests require an out-dated version of minitest.
9519 #:phases
9520 (modify-phases %standard-phases
9521 (add-before 'build 'fix-gemspec
9522 (lambda _
9523 (substitute* "puma.gemspec"
9524 (("git ls-files") "find * |sort"))
9525 #t)))))
9526 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9527 (description
9528 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9529 for Ruby/Rack applications. Puma is intended for use in both development and
9530 production environments. In order to get the best throughput, it is highly
9531 recommended that you use a Ruby implementation with real threads like Rubinius
9532 or JRuby.")
9533 (home-page "https://puma.io/")
9534 (license license:expat)))
9535
9536 (define-public ruby-hoe-git
9537 (package
9538 (name "ruby-hoe-git")
9539 (version "1.6.0")
9540 (source
9541 (origin
9542 (method url-fetch)
9543 (uri (rubygems-uri "hoe-git" version))
9544 (sha256
9545 (base32
9546 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9547 (build-system ruby-build-system)
9548 (propagated-inputs
9549 `(("ruby-hoe" ,ruby-hoe)))
9550 (synopsis "Hoe plugins for tighter Git integration")
9551 (description
9552 "This package provides a set of Hoe plugins for tighter Git integration.
9553 It provides tasks to automate release tagging and pushing and changelog
9554 generation.")
9555 (home-page "https://github.com/jbarnette/hoe-git")
9556 (license license:expat)))
9557
9558 (define-public ruby-sequel
9559 (package
9560 (name "ruby-sequel")
9561 (version "4.49.0")
9562 (source
9563 (origin
9564 (method url-fetch)
9565 (uri (rubygems-uri "sequel" version))
9566 (sha256
9567 (base32
9568 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
9569 (build-system ruby-build-system)
9570 (arguments
9571 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9572 (synopsis "Database toolkit for Ruby")
9573 (description "Sequel provides thread safety, connection pooling and a
9574 concise DSL for constructing SQL queries and table schemas. It includes a
9575 comprehensive ORM layer for mapping records to Ruby objects and handling
9576 associated records.")
9577 (home-page "https://sequel.jeremyevans.net")
9578 (license license:expat)))
9579
9580 (define-public ruby-timecop
9581 (package
9582 (name "ruby-timecop")
9583 (version "0.9.1")
9584 (source
9585 (origin
9586 (method url-fetch)
9587 (uri (rubygems-uri "timecop" version))
9588 (sha256
9589 (base32
9590 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
9591 (build-system ruby-build-system)
9592 (arguments
9593 `(#:phases
9594 (modify-phases %standard-phases
9595 (add-before 'check 'set-check-rubylib
9596 (lambda _
9597 ;; Set RUBYLIB so timecop tests finds its own lib.
9598 (setenv "RUBYLIB" "lib")
9599 #t)))))
9600 (native-inputs
9601 `(("bundler" ,bundler)
9602 ("ruby-minitest-rg" ,ruby-minitest-rg)
9603 ("ruby-mocha" ,ruby-mocha)
9604 ("ruby-activesupport" ,ruby-activesupport)))
9605 (synopsis "Test mocks for time-dependent functions")
9606 (description
9607 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9608 making it easier to test time-dependent code. It provides a unified method to
9609 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9610 call.")
9611 (home-page "https://github.com/travisjeffery/timecop")
9612 (license license:expat)))
9613
9614 (define-public ruby-concurrent
9615 (package
9616 (name "ruby-concurrent")
9617 (version "1.1.5")
9618 (source
9619 (origin
9620 (method git-fetch)
9621 ;; Download from GitHub because the rubygems version does not contain
9622 ;; Rakefile.
9623 (uri (git-reference
9624 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9625 (commit (string-append "v" version))))
9626 (file-name (git-file-name name version))
9627 (sha256
9628 (base32
9629 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
9630 (build-system ruby-build-system)
9631 (arguments
9632 `(#:test-target "ci"
9633 #:phases
9634 (modify-phases %standard-phases
9635 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
9636 (lambda _
9637 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9638 ;; correct one.
9639 (delete-file "concurrent-ruby-edge.gemspec")
9640 (delete-file "concurrent-ruby-ext.gemspec")
9641 #t))
9642 (replace 'replace-git-ls-files
9643 (lambda _
9644 ;; XXX: The default substitution made by this phase is not fully
9645 ;; compatible with "git ls-files". The latter produces file names
9646 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9647 ;; which gives "./lib/foo". That difference in turn breaks the
9648 ;; comparison against a glob pattern in this script.
9649 (substitute* "concurrent-ruby.gemspec"
9650 (("git ls-files") "find * -type f | sort"))
9651 #t))
9652 (add-before 'build 'remove-jar-from-gemspec
9653 (lambda _
9654 ;; The gemspec wants to include a JAR file that we do not build
9655 ;; nor need.
9656 (substitute* "concurrent-ruby.gemspec"
9657 (("'lib/concurrent/concurrent_ruby.jar'")
9658 ""))
9659 #t))
9660 (add-before 'build 'remove-rake_compiler_dock-dependency
9661 (lambda _
9662 ;; This library is only used when building for non-MRI targets.
9663 (substitute* "Rakefile"
9664 (("require 'rake_compiler_dock'")
9665 ""))
9666 #t))
9667 (add-before 'check 'remove-timecop-dependency
9668 ;; Remove timecop-dependent tests as having timecop as a depedency
9669 ;; causes circular depedencies.
9670 (lambda _
9671 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9672 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9673 #t)))))
9674 (native-inputs
9675 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9676 ("ruby-rspec" ,ruby-rspec)))
9677 (synopsis "Concurrency tools for Ruby")
9678 (description
9679 "This library provides modern concurrency tools including agents,
9680 futures, promises, thread pools, actors, supervisors, and more. It is
9681 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9682 patterns.")
9683 (home-page "http://www.concurrent-ruby.com")
9684 (license license:expat)))
9685
9686 (define-public ruby-pkg-config
9687 (package
9688 (name "ruby-pkg-config")
9689 (version "1.2.5")
9690 (source
9691 (origin
9692 (method url-fetch)
9693 (uri (rubygems-uri "pkg-config" version))
9694 (sha256
9695 (base32
9696 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
9697 (build-system ruby-build-system)
9698 (arguments
9699 ;; Tests require extra files not included in the gem.
9700 `(#:tests? #f))
9701 (synopsis "Detect libraries for compiling Ruby native extensions")
9702 (description
9703 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9704 libraries for compiling Ruby native extensions.")
9705 (home-page "https://github.com/ruby-gnome2/pkg-config")
9706 (license license:lgpl2.0+)))
9707
9708 (define-public ruby-net-http-digest-auth
9709 (package
9710 (name "ruby-net-http-digest-auth")
9711 (version "1.4.1")
9712 (source
9713 (origin
9714 (method url-fetch)
9715 (uri (rubygems-uri "net-http-digest_auth" version))
9716 (sha256
9717 (base32
9718 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
9719 (build-system ruby-build-system)
9720 (native-inputs
9721 `(("ruby-hoe" ,ruby-hoe)))
9722 (synopsis "RFC 2617 HTTP digest authentication library")
9723 (description
9724 "This library implements HTTP's digest authentication scheme based on
9725 RFC 2617. This enables the use of the digest authentication scheme instead
9726 of the more insecure basic authentication scheme.")
9727 (home-page "https://github.com/drbrain/net-http-digest_auth")
9728 (license license:expat)))
9729
9730 (define-public ruby-mail
9731 (package
9732 (name "ruby-mail")
9733 (version "2.6.6")
9734 (source
9735 (origin
9736 (method url-fetch)
9737 (uri (rubygems-uri "mail" version))
9738 (sha256
9739 (base32
9740 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
9741 (build-system ruby-build-system)
9742 (propagated-inputs
9743 `(("ruby-mime-types" ,ruby-mime-types)))
9744 (arguments
9745 ;; Tests require extra gems not included in the Gemfile.
9746 ;; XXX: Try enabling this for the next version with mini_mime.
9747 `(#:tests? #f))
9748 (synopsis "Mail library for Ruby")
9749 (description
9750 "Mail is an internet library for Ruby that is designed to handle email
9751 generation, parsing and sending. The purpose of this library is to provide
9752 a single point of access to handle all email functions, including sending
9753 and receiving emails. All network type actions are done through proxy
9754 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9755
9756 Mail has been designed with a very simple object oriented system that
9757 really opens up the email messages you are parsing, if you know what you
9758 are doing, you can fiddle with every last bit of your email directly.")
9759 (home-page "https://github.com/mikel/mail")
9760 (license license:expat)))
9761
9762 (define-public ruby-mathn
9763 (package
9764 (name "ruby-mathn")
9765 (version "0.1.0")
9766 (source
9767 (origin
9768 (method url-fetch)
9769 (uri (rubygems-uri "mathn" version))
9770 (sha256
9771 (base32
9772 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9773 (build-system ruby-build-system)
9774 (native-inputs
9775 `(("bundler" ,bundler)
9776 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9777 (synopsis "Extends math operations for increased precision")
9778 (description
9779 "This gem makes mathematical operations more precise in Ruby and
9780 integrates other mathematical standard libraries. Prior to Ruby 2.5,
9781 @code{mathn} was part of the Ruby standard library.")
9782 (home-page "https://github.com/ruby/mathn")
9783 (license license:bsd-2)))
9784
9785 (define-public ruby-code-statistics
9786 (package
9787 (name "ruby-code-statistics")
9788 (version "0.2.13")
9789 (source
9790 (origin
9791 (method url-fetch)
9792 (uri (rubygems-uri "code_statistics" version))
9793 (sha256
9794 (base32
9795 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9796 (build-system ruby-build-system)
9797 (arguments
9798 `(#:tests? #f)) ; Not all test code is included in gem.
9799 (synopsis "Port of the rails 'rake stats' method")
9800 (description
9801 "This gem is a port of the rails 'rake stats' method so it can be made
9802 more robust and work for non rails projects.")
9803 (home-page "https://github.com/danmayer/code_statistics")
9804 (license license:expat)))
9805
9806 (define-public ruby-rubypants
9807 (package
9808 (name "ruby-rubypants")
9809 (version "0.6.0")
9810 (source (origin
9811 (method url-fetch)
9812 (uri (rubygems-uri "rubypants" version))
9813 (sha256
9814 (base32
9815 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9816 (build-system ruby-build-system)
9817 (arguments
9818 '(#:tests? #f)) ; need Codecov
9819 (synopsis "Port of the smart-quotes library SmartyPants")
9820 (description
9821 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9822 original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9823 and BBEdit that easily translates plain ASCII punctuation characters into
9824 smart typographic punctuation HTML entities.")
9825 (home-page "https://github.com/jmcnevin/rubypants")
9826 (license license:bsd-2)))
9827
9828 (define-public ruby-org-ruby
9829 (package
9830 (name "ruby-org-ruby")
9831 (version "0.9.12")
9832 (source (origin
9833 (method url-fetch)
9834 (uri (rubygems-uri "org-ruby" version))
9835 (sha256
9836 (base32
9837 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
9838 (build-system ruby-build-system)
9839 (arguments
9840 '(#:tests? #f)) ; no rakefile
9841 (propagated-inputs
9842 `(("ruby-rubypants" ,ruby-rubypants)))
9843 (synopsis "Org-mode parser written in Ruby")
9844 (description
9845 "Org-ruby is an org-mode parser written in Ruby. The most significant
9846 thing this library does today is convert org-mode files to HTML or Textile or
9847 Markdown.")
9848 (home-page "https://github.com/wallyqs/org-ruby")
9849 (license license:expat)))
9850
9851 (define-public ruby-rake
9852 (package
9853 (name "ruby-rake")
9854 (version "13.0.1")
9855 (source
9856 (origin
9857 (method url-fetch)
9858 (uri (rubygems-uri "rake" version))
9859 (sha256
9860 (base32
9861 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
9862 (build-system ruby-build-system)
9863 (native-inputs
9864 `(("bundler" ,bundler)))
9865 (synopsis "Rake is a Make-like program implemented in Ruby")
9866 (description
9867 "Rake is a Make-like program where tasks and dependencies are specified
9868 in standard Ruby syntax.")
9869 (home-page "https://github.com/ruby/rake")
9870 (license license:expat)))
9871
9872 (define-public ruby-childprocess
9873 (package
9874 (name "ruby-childprocess")
9875 (version "3.0.0")
9876 (source
9877 (origin
9878 (method url-fetch)
9879 (uri (rubygems-uri "childprocess" version))
9880 (sha256
9881 (base32
9882 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
9883 (build-system ruby-build-system)
9884 (arguments
9885 `(#:tests? #f))
9886 (native-inputs
9887 `(("bundler" ,bundler)
9888 ("ruby-rspec" ,ruby-rspec)))
9889 (propagated-inputs
9890 `(("ruby-ffi" ,ruby-ffi)))
9891 (synopsis "Control external programs running in the background, in Ruby")
9892 (description "@code{childprocess} provides a gem to control external
9893 programs running in the background, in Ruby.")
9894 (home-page "https://github.com/enkessler/childprocess")
9895 (license license:expat)))
9896
9897 (define-public ruby-public-suffix
9898 (package
9899 (name "ruby-public-suffix")
9900 (version "4.0.5")
9901 (source (origin
9902 (method url-fetch)
9903 (uri (rubygems-uri "public_suffix" version))
9904 (sha256
9905 (base32
9906 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
9907 (build-system ruby-build-system)
9908 (arguments
9909 '(#:phases
9910 (modify-phases %standard-phases
9911 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
9912 ;; including it as an input can lead to circular dependencies.
9913 (add-after 'unpack 'remove-rubocop-from-Rakefile
9914 (lambda _
9915 (substitute* "Rakefile"
9916 (("require \"rubocop/rake\\_task\"") "")
9917 (("RuboCop::RakeTask\\.new") ""))
9918 #t)))))
9919 (native-inputs
9920 `(("bundler" ,bundler)
9921 ("ruby-yard" ,ruby-yard)
9922 ("ruby-mocha" ,ruby-mocha)
9923 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
9924 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
9925 (synopsis "Domain name parser")
9926 (description "The gem @code{public_suffix} is a domain name parser,
9927 written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
9928 is one under which Internet users can (or historically could) directly
9929 register names. Some examples of public suffixes are @code{.com},
9930 @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
9931 all known public suffixes.")
9932 (license license:expat)))
9933
9934 (define-public ruby-addressable
9935 (package
9936 (name "ruby-addressable")
9937 (version "2.7.0")
9938 (source (origin
9939 (method url-fetch)
9940 (uri (rubygems-uri "addressable" version))
9941 (sha256
9942 (base32
9943 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
9944 (build-system ruby-build-system)
9945 (arguments
9946 '(#:test-target "spec"
9947 #:phases
9948 (modify-phases %standard-phases
9949 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
9950 (lambda _
9951 (substitute* "Gemfile"
9952 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
9953 ((".*launchy.*") "")
9954 ((".*rake.*") "gem 'rake'\n")
9955 ((".*redcarpet.*") ""))
9956 #t))
9957 (add-before 'check 'delete-network-dependent-test
9958 (lambda _
9959 (delete-file "spec/addressable/net_http_compat_spec.rb")
9960 #t)))))
9961 (native-inputs
9962 `(("ruby-rspec" ,ruby-rspec)
9963 ("bundler" ,bundler)
9964 ("ruby-idn-ruby" ,ruby-idn-ruby)
9965 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
9966 ("ruby-rspec-its", ruby-rspec-its-minimal)
9967 ("ruby-yard" ,ruby-yard)
9968 ("ruby-simplecov" ,ruby-simplecov)))
9969 (propagated-inputs
9970 `(("ruby-public-suffix" ,ruby-public-suffix)))
9971 (home-page "https://github.com/sporkmonger/addressable")
9972 (synopsis "Alternative URI implementation")
9973 (description "Addressable is a replacement for the URI implementation that
9974 is part of Ruby's standard library. It more closely conforms to RFC 3986,
9975 RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
9976 (license license:asl2.0)))
9977
9978 (define-public ruby-colorize
9979 (package
9980 (name "ruby-colorize")
9981 (version "0.8.1")
9982 (source (origin
9983 (method url-fetch)
9984 (uri (rubygems-uri "colorize" version))
9985 (sha256
9986 (base32
9987 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
9988 (build-system ruby-build-system)
9989 (arguments
9990 '(#:phases (modify-phases %standard-phases
9991 (add-before 'check 'remove-codeclimate-dependency
9992 (lambda _
9993 (substitute* "test/test_colorize.rb"
9994 ;; Do not hook the tests into the online CodeClimate
9995 ;; service which is unnecessary for these tests.
9996 (("require 'codeclimate-test-reporter'")
9997 "")
9998 (("CodeClimate.*") ""))
9999 #t)))))
10000 (synopsis "Add color effects to the @code{String} class")
10001 (description
10002 "This package extends the @code{String} class and adds a
10003 @code{ColorizedString} with methods to set text color, background color,
10004 and text effects.")
10005 (home-page "https://github.com/fazibear/colorize")
10006 (license license:gpl2+)))
10007
10008 (define-public ruby-colorator
10009 (package
10010 (name "ruby-colorator")
10011 (version "1.1.0")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (rubygems-uri "colorator" version))
10015 (sha256
10016 (base32
10017 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
10018 (build-system ruby-build-system)
10019 (arguments
10020 ;; No test target
10021 `(#:tests? #f))
10022 (home-page "http://octopress.org/colorator/")
10023 (synopsis "Terminal color library")
10024 (description "Colorator is a Ruby gem that helps you colorize your text
10025 for the terminal.")
10026 (license license:expat)))
10027
10028 (define-public ruby-command-line-reporter
10029 (package
10030 (name "ruby-command-line-reporter")
10031 (version "4.0.1")
10032 (source (origin
10033 (method url-fetch)
10034 (uri (rubygems-uri "command_line_reporter" version))
10035 (sha256
10036 (base32
10037 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
10038 (build-system ruby-build-system)
10039 (arguments
10040 ;; No Rakefile
10041 `(#:tests? #f
10042 #:phases
10043 (modify-phases %standard-phases
10044 (add-before 'build 'fix-dependencies
10045 (lambda _
10046 (substitute* ".gemspec"
10047 ;; colored is unmaintained
10048 (("colored") "colorator")
10049 ;; colorator version
10050 (("= 1.2") "= 1.1"))
10051 #t)))))
10052 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
10053 (home-page "https://github.com/wbailey/command_line_reporter")
10054 (synopsis "Report production while executing Ruby scripts")
10055 (description "This gem provides a DSL that makes it easy to write reports
10056 of various types in ruby. It eliminates the need to litter your source with
10057 puts statements, instead providing a more readable, expressive interface to
10058 your application.")
10059 (license license:asl2.0)))
10060
10061 (define-public ruby-command-line-reporter-3
10062 (package
10063 (inherit ruby-command-line-reporter)
10064 (version "3.3.6")
10065 (source (origin
10066 (method url-fetch)
10067 (uri (rubygems-uri "command_line_reporter" version))
10068 (sha256
10069 (base32
10070 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
10071
10072 (define-public ruby-kpeg
10073 (package
10074 (name "ruby-kpeg")
10075 (version "1.1.0")
10076 (source
10077 (origin
10078 (method url-fetch)
10079 (uri (rubygems-uri "kpeg" version))
10080 (sha256
10081 (base32
10082 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
10083 (build-system ruby-build-system)
10084 (native-inputs
10085 `(("ruby-hoe" ,ruby-hoe)))
10086 (synopsis "PEG library for Ruby")
10087 (description "KPeg is a simple PEG library for Ruby. It provides an API as
10088 well as native grammar to build the grammar. KPeg supports direct left
10089 recursion of rules via the
10090 @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
10091 technique.")
10092 (home-page "https://github.com/evanphx/kpeg")
10093 (license license:expat)))
10094
10095 (define-public ruby-rdoc
10096 (package
10097 (name "ruby-rdoc")
10098 (version "6.2.0")
10099 (source
10100 (origin
10101 (method git-fetch)
10102 (uri (git-reference
10103 (url "https://github.com/ruby/rdoc")
10104 (commit (string-append "v" version))))
10105 (file-name (git-file-name name version))
10106 (sha256
10107 (base32
10108 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
10109 (build-system ruby-build-system)
10110 (arguments
10111 `(#:phases
10112 (modify-phases %standard-phases
10113 (add-after 'unpack 'patch-gemspec
10114 ;; TODO: Remove after next release is tagged.
10115 (lambda _
10116 (substitute* "rdoc.gemspec"
10117 (("\"lib/rdoc/generator/template/darkfish/js/\
10118 jquery\\.js\", ") ""))
10119 #t))
10120 (add-before 'build 'generate
10121 ;; 'gem build' doesn't honor Rakefile dependencies (see:
10122 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
10123 (lambda _
10124 (invoke "rake" "generate"))))))
10125 (native-inputs
10126 `(("bundler" ,bundler)
10127 ("ruby-kpeg" ,ruby-kpeg)
10128 ("ruby-racc" ,ruby-racc)
10129 ("ruby-rubocop" ,ruby-rubocop)))
10130 (home-page "https://ruby.github.io/rdoc/")
10131 (synopsis "HTML and command-line documentation utility")
10132 (description "RDoc produces HTML and command-line documentation for Ruby
10133 projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
10134 documentation from the command-line.")
10135 (license license:gpl2+)))
10136
10137 (define-public ruby-sass-listen
10138 (package
10139 (name "ruby-sass-listen")
10140 (version "4.0.0")
10141 (source (origin
10142 (method url-fetch)
10143 (uri (rubygems-uri "sass-listen" version))
10144 (sha256
10145 (base32
10146 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
10147 (build-system ruby-build-system)
10148 (arguments
10149 ;; No test target
10150 `(#:tests? #f))
10151 (propagated-inputs
10152 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
10153 ("ruby-rb-inotify" ,ruby-rb-inotify)))
10154 (home-page "https://github.com/sass/listen")
10155 (synopsis "File modification notification library")
10156 (description "The Listen gem listens to file modifications and notifies you
10157 about the changes.")
10158 (license license:expat)))
10159
10160 (define-public ruby-terminfo
10161 (package
10162 (name "ruby-terminfo")
10163 (version "0.1.1")
10164 (source
10165 (origin
10166 (method url-fetch)
10167 (uri (rubygems-uri "ruby-terminfo" version))
10168 (sha256
10169 (base32
10170 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
10171 (build-system ruby-build-system)
10172 (arguments
10173 `(#:test-target "test"
10174 ;; Rakefile requires old packages and would need modification to
10175 ;; work with current software.
10176 #:tests? #f))
10177 (inputs
10178 `(("ncurses" ,ncurses)))
10179 (native-inputs
10180 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
10181 ("ruby-rdoc" ,ruby-rdoc)))
10182 (home-page "http://www.a-k-r.org/ruby-terminfo/")
10183 (synopsis "Terminfo binding for Ruby")
10184 (description "Ruby-terminfo provides terminfo binding for Ruby.")
10185 (license license:bsd-3)))
10186
10187 (define-public ruby-diffy
10188 (package
10189 (name "ruby-diffy")
10190 (version "3.2.1")
10191 (source
10192 (origin
10193 (method url-fetch)
10194 (uri (rubygems-uri "diffy" version))
10195 (sha256
10196 (base32
10197 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
10198 (build-system ruby-build-system)
10199 (arguments
10200 ;; No tests
10201 `(#:tests? #f))
10202 (native-inputs
10203 `(("ruby-rspec" ,ruby-rspec)))
10204 (home-page "https://github.com/samg/diffy")
10205 (synopsis "Convenient diffing in ruby")
10206 (description "Diffy provides a convenient way to generate a diff from two
10207 strings or files.")
10208 (license license:expat)))
10209
10210 (define-public ruby-sass-spec
10211 (package
10212 (name "ruby-sass-spec")
10213 (version "3.5.4")
10214 (source
10215 (origin
10216 (method git-fetch)
10217 (uri (git-reference
10218 (url "https://github.com/sass/sass-spec")
10219 (commit (string-append "v" version))))
10220 (file-name (git-file-name name version))
10221 (sha256
10222 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
10223 (build-system ruby-build-system)
10224 (propagated-inputs
10225 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
10226 ("ruby-diffy" ,ruby-diffy)
10227 ("ruby-terminfo" ,ruby-terminfo)))
10228 (arguments
10229 `(;; This package contains tests for a sass implementation, and the to
10230 ;; avoid any circular dependencies, the tests are not run here
10231 #:tests? #f
10232 #:phases
10233 (modify-phases %standard-phases
10234 (add-after 'unpack 'patch-test
10235 (lambda _
10236 (delete-file "spec/values/colors/alpha_hex-3.5/error")
10237 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
10238 (("string") "color")))))))
10239 (home-page "https://github.com/sass/sass-spec")
10240 (synopsis "Test suite for Sass")
10241 (description "Sass Spec is a test suite for Sass. Test cases are all in
10242 the @file{spec} directory.")
10243 (license license:expat)))
10244
10245 (define-public ruby-sass
10246 (package
10247 (name "ruby-sass")
10248 (version "3.6.0")
10249 (source (origin
10250 (method url-fetch)
10251 (uri (rubygems-uri "sass" version))
10252 (sha256
10253 (base32
10254 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
10255 (build-system ruby-build-system)
10256 (propagated-inputs
10257 `(("ruby-sass-listen" ,ruby-sass-listen)))
10258 (native-inputs
10259 `(("ruby-sass-spec" ,ruby-sass-spec)
10260 ("ruby-mathn" ,ruby-mathn)))
10261 (home-page "https://sass-lang.com/")
10262 (synopsis "CSS extension language")
10263 (description "Sass is a CSS extension language. It extends CSS with
10264 features that don't exist yet like variables, nesting, mixins and inheritance.")
10265 (license license:expat)))
10266
10267 (define-public ruby-sassc
10268 (package
10269 (name "ruby-sassc")
10270 (version "2.2.1")
10271 (source
10272 (origin
10273 (method url-fetch)
10274 (uri (rubygems-uri "sassc" version))
10275 (sha256
10276 (base32
10277 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
10278 (build-system ruby-build-system)
10279 (arguments
10280 '(#:modules ((guix build ruby-build-system)
10281 (guix build utils)
10282 (ice-9 textual-ports))
10283 #:phases
10284 (modify-phases %standard-phases
10285 ;; TODO: This would be better as a snippet, but the ruby-build-system
10286 ;; doesn't seem to support that
10287 (add-after 'unpack 'remove-libsass
10288 (lambda _
10289 (delete-file-recursively "ext")
10290 (with-atomic-file-replacement "sassc.gemspec"
10291 (lambda (in out)
10292 (let* ((gemspec (get-string-all in))
10293 (index (string-contains gemspec "libsass_dir")))
10294 (display (string-append
10295 (string-take gemspec index)
10296 "\nend\n")
10297 out))))
10298 #t))
10299 (add-after 'unpack 'dont-check-the-libsass-version
10300 (lambda _
10301 (substitute* "test/native_test.rb"
10302 (("assert_equal.*Native\\.version") ""))
10303 #t))
10304 (add-after 'unpack 'remove-git-from-gemspec
10305 (lambda _
10306 (substitute* "sassc.gemspec"
10307 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
10308 #t))
10309 (add-after 'unpack 'remove-extensions-from-gemspec
10310 (lambda _
10311 (substitute* "sassc.gemspec"
10312 (("\\[\"ext/extconf.rb\"\\]") "[]"))
10313 #t))
10314 (add-after 'unpack 'fix-Rakefile
10315 (lambda _
10316 (substitute* "Rakefile"
10317 (("test: 'compile:libsass'") ":test"))
10318 #t))
10319 (add-after 'unpack 'remove-unnecessary-dependencies
10320 (lambda _
10321 (substitute* "test/test_helper.rb"
10322 (("require \"pry\"") ""))
10323 #t))
10324 (add-before 'build 'patch-native.rb
10325 (lambda* (#:key inputs #:allow-other-keys)
10326 (substitute* "lib/sassc/native.rb"
10327 ((".*gem_root = spec.gem_dir") "")
10328 (("ffi_lib .*\n")
10329 (string-append
10330 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
10331 #t))
10332 ;; The gemspec still references the libsass files, so just keep the
10333 ;; one in the gem.
10334 (delete 'extract-gemspec))))
10335 (propagated-inputs
10336 `(("ruby-ffi" ,ruby-ffi)
10337 ("ruby-rake" ,ruby-rake)))
10338 (inputs
10339 `(("libsass" ,libsass)))
10340 (native-inputs
10341 `(("bundler" ,bundler)
10342 ("ruby-rake-compiler" ,ruby-rake-compiler)
10343 ("ruby-minitest-around" ,ruby-minitest-around)
10344 ("ruby-test-construct" ,ruby-test-construct)))
10345 (synopsis "Use libsss from Ruby")
10346 (description
10347 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10348 bindings to the libsass library. This enables rendering
10349 @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10350 (home-page "https://github.com/sass/sassc-ruby")
10351 (license license:expat)))
10352
10353 (define-public ruby-jekyll-sass-converter
10354 (package
10355 (name "ruby-jekyll-sass-converter")
10356 (version "1.5.2")
10357 (source (origin
10358 (method url-fetch)
10359 (uri (rubygems-uri "jekyll-sass-converter" version))
10360 (sha256
10361 (base32
10362 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
10363 (build-system ruby-build-system)
10364 (propagated-inputs
10365 `(("ruby-sass" ,ruby-sass)))
10366 (arguments
10367 ;; No rakefile
10368 `(#:tests? #f))
10369 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10370 (synopsis "Sass converter for Jekyll")
10371 (description "This gem provide built-in support for the Sass converter
10372 in Jekyll.")
10373 (license license:expat)))
10374
10375 (define-public ruby-jekyll-watch
10376 (package
10377 (name "ruby-jekyll-watch")
10378 (version "2.1.2")
10379 (source (origin
10380 (method url-fetch)
10381 (uri (rubygems-uri "jekyll-watch" version))
10382 (sha256
10383 (base32
10384 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
10385 (build-system ruby-build-system)
10386 (propagated-inputs
10387 `(("ruby-listen" ,ruby-listen)))
10388 (arguments
10389 ;; No rakefile
10390 `(#:tests? #f))
10391 (home-page "https://github.com/jekyll/jekyll-watch")
10392 (synopsis "Jekyll auto-rebuild support")
10393 (description "This gems add the @code{--watch} switch to the jekyll CLI
10394 interface. It allows Jekyll to rebuild your site when a file changes.")
10395 (license license:expat)))
10396
10397 (define-public ruby-parallel
10398 (package
10399 (name "ruby-parallel")
10400 (version "1.13.0")
10401 (source
10402 (origin
10403 (method git-fetch)
10404 (uri (git-reference
10405 (url "https://github.com/grosser/parallel")
10406 (commit (string-append "v" version))))
10407 (file-name (git-file-name name version))
10408 (sha256
10409 (base32
10410 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
10411 (build-system ruby-build-system)
10412 (arguments
10413 `(;; TODO 3 test failures
10414 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10415 ;; open unnecessary pipes
10416 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10417 ;; SQLite in processes
10418 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10419 ;; SQLite in threads
10420 #:tests? #f
10421 #:test-target "rspec-rerun:spec"
10422 #:phases
10423 (modify-phases %standard-phases
10424 (add-after 'unpack 'patch-Gemfile
10425 (lambda _
10426 (substitute* "Gemfile"
10427 (("gem 'rspec-legacy_formatters'") "")
10428 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10429 (add-before 'check 'delete-Gemfile.lock
10430 (lambda _
10431 ;; Bundler isn't being used for fetching dependendencies, so
10432 ;; delete the Gemfile.lock
10433 (delete-file "Gemfile.lock")
10434 #t))
10435 (add-before 'build 'patch-gemspec
10436 (lambda _
10437 (substitute* "parallel.gemspec"
10438 (("git ls-files") "find"))
10439 #t)))))
10440 (native-inputs
10441 `(("ruby-rspec" ,ruby-rspec)
10442 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
10443 ("bundler" ,bundler)
10444 ("ruby-activerecord" ,ruby-activerecord)
10445 ("ruby-progressbar" ,ruby-progressbar)
10446 ("ruby-bump" ,ruby-bump)
10447 ("procps" ,procps)
10448 ("lsof" ,lsof)
10449 ("ruby-mysql2" ,ruby-mysql2)
10450 ("ruby-sqlite3" ,ruby-sqlite3)
10451 ("ruby-i18n" ,ruby-i18n)))
10452 (home-page "https://github.com/grosser/parallel")
10453 (synopsis "Parallel processing in Ruby")
10454 (description "Parallel allows you to run any code in parallel Processes
10455 (to use all CPUs) or Threads(to speedup blocking operations). It is best
10456 suited for map-reduce or e.g. parallel downloads/uploads.")
10457 (license license:expat)))
10458
10459 (define-public ruby-cane
10460 (package
10461 (name "ruby-cane")
10462 (version "3.0.0")
10463 (source (origin
10464 (method url-fetch)
10465 (uri (rubygems-uri "cane" version))
10466 (sha256
10467 (base32
10468 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10469 (build-system ruby-build-system)
10470 (arguments `(#:tests? #f)); No rakefile
10471 (home-page "https://github.com/square/cane")
10472 (propagated-inputs
10473 `(("ruby-parallel" ,ruby-parallel)))
10474 (synopsis "Code quality threshold checking")
10475 (description "Cane fails your build if code quality thresholds are not met.")
10476 (license license:asl2.0)))
10477
10478 (define-public ruby-morecane
10479 (package
10480 (name "ruby-morecane")
10481 (version "0.2.0")
10482 (source (origin
10483 (method url-fetch)
10484 (uri (rubygems-uri "morecane" version))
10485 (sha256
10486 (base32
10487 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10488 (build-system ruby-build-system)
10489 (home-page "https://github.com/yob/morecane")
10490 (arguments `(#:tests? #f)); No rakefile
10491 (propagated-inputs
10492 `(("ruby-parallel" ,ruby-parallel)))
10493 (synopsis "Extra checks for cane")
10494 (description "The cane gem provides a great framework for running quality
10495 checks over your ruby project as part of continuous integration build. It
10496 comes with a few checks out of the box, but also provides an API for loading
10497 custom checks. This gem provides a set of additional checks.")
10498 (license license:expat)))
10499
10500 (define-public ruby-pdf-reader
10501 (package
10502 (name "ruby-pdf-reader")
10503 (version "2.4.0")
10504 (source (origin
10505 (method git-fetch) ;no test in distributed gem archive
10506 (uri (git-reference
10507 (url "https://github.com/yob/pdf-reader.git")
10508 (commit (string-append "v" version))))
10509 (file-name (git-file-name name version))
10510 (sha256
10511 (base32
10512 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
10513 (build-system ruby-build-system)
10514 (arguments `(#:test-target "spec"
10515 #:phases (modify-phases %standard-phases
10516 (add-after 'unpack 'do-not-use-bundler
10517 (lambda _
10518 (substitute* "spec/spec_helper.rb"
10519 ((".*[Bb]undler.*") ""))
10520 #t)))))
10521 (native-inputs
10522 `(("ruby-rspec" ,ruby-rspec)
10523 ("ruby-cane" ,ruby-cane)
10524 ("ruby-morecane" ,ruby-morecane)))
10525 (propagated-inputs
10526 `(("ruby-afm" ,ruby-afm)
10527 ("ruby-ascii85" ,ruby-ascii85)
10528 ("ruby-hashery" ,ruby-hashery)
10529 ("ruby-rc4" ,ruby-rc4)
10530 ("ruby-ttfunk" ,ruby-ttfunk)))
10531 (home-page "https://github.com/yob/pdf-reader")
10532 (synopsis "PDF parser in Ruby")
10533 (description "The PDF::Reader library implements a PDF parser conforming as
10534 much as possible to the PDF specification from Adobe. It provides programmatic
10535 access to the contents of a PDF file with a high degree of flexibility.")
10536 (license license:gpl3+)))
10537
10538 (define-public ruby-pdf-inspector
10539 (let ((revision "1")
10540 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10541 (package
10542 (name "ruby-pdf-inspector")
10543 (version (git-version "1.3.0" revision commit))
10544 (source (origin
10545 (method git-fetch)
10546 (uri (git-reference
10547 (url "https://github.com/prawnpdf/pdf-inspector.git")
10548 (commit commit)))
10549 (file-name (git-file-name name version))
10550 (sha256
10551 (base32
10552 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10553 (build-system ruby-build-system)
10554 (arguments
10555 `(#:test-target "spec"
10556 #:phases (modify-phases %standard-phases
10557 (add-before 'build 'drop-signing-key-requirement
10558 (lambda _
10559 (substitute* "pdf-inspector.gemspec"
10560 (("spec.signing_key =.*")
10561 "spec.signing_key = nil"))
10562 #t))
10563 (replace 'check
10564 (lambda _
10565 (substitute* "pdf-inspector.gemspec"
10566 ((".*rubocop.*") "")
10567 ((".*yard.*") ""))
10568 (invoke "rspec"))))))
10569 (native-inputs
10570 `(("ruby-rspec" ,ruby-rspec)))
10571 (propagated-inputs
10572 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
10573 (home-page "https://github.com/prawnpdf/pdf-inspector")
10574 (synopsis "Analysis classes for inspecting PDF output")
10575 (description "This library provides a number of PDF::Reader based tools for
10576 use in testing PDF output. Presently, the primary purpose of this tool is to
10577 support the tests found in Prawn, a pure Ruby PDF generation library.")
10578 (license %prawn-project-licenses))))
10579
10580 (define-public ruby-pdf-core
10581 (package
10582 (name "ruby-pdf-core")
10583 (version "0.8.1")
10584 (source (origin
10585 (method url-fetch)
10586 (uri (rubygems-uri "pdf-core" version))
10587 (sha256
10588 (base32
10589 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10590 (build-system ruby-build-system)
10591 (arguments
10592 ; No test target
10593 `(#:tests? #f))
10594 (home-page "https://github.com/prawnpdf/pdf-core")
10595 (synopsis "Low level PDF features for Prawn")
10596 (description "This is an experimental gem that extracts low-level PDF
10597 functionality from Prawn.")
10598 (license license:gpl3+)))
10599
10600 (define-public ruby-prawn
10601 ;; There hasn't been a new release since 2017/03/17.
10602 (let ((revision "1")
10603 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10604 (package
10605 (name "ruby-prawn")
10606 (version (git-version "2.2.2" revision commit))
10607 (source (origin
10608 (method git-fetch)
10609 (uri (git-reference
10610 (url "https://github.com/prawnpdf/prawn.git")
10611 (commit commit)))
10612 (file-name (git-file-name name version))
10613 (sha256
10614 (base32
10615 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10616 (build-system ruby-build-system)
10617 (arguments
10618 `(#:phases
10619 (modify-phases %standard-phases
10620 (add-before 'build 'drop-signing-key-requirement
10621 (lambda _
10622 (substitute* "prawn.gemspec"
10623 (("spec.signing_key =.*")
10624 "spec.signing_key = nil"))
10625 #t))
10626 (replace 'check
10627 (lambda* (#:key tests? #:allow-other-keys)
10628 (when tests?
10629 ;; The Prawn manual test fails (see:
10630 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10631 ;; it.
10632 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10633 #t)))))
10634 (propagated-inputs
10635 `(("ruby-pdf-core" ,ruby-pdf-core)
10636 ("ruby-ttfunk" ,ruby-ttfunk)))
10637 (native-inputs
10638 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
10639 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10640 ("ruby-rspec" ,ruby-rspec)
10641 ("ruby-simplecov" ,ruby-simplecov)
10642 ("ruby-yard" ,ruby-yard)))
10643 (home-page "https://prawnpdf.org/api-docs/2.0/")
10644 (synopsis "PDF generation for Ruby")
10645 (description "Prawn is a pure Ruby PDF generation library.")
10646 (license %prawn-project-licenses))))
10647
10648 (define-public ruby-prawn-table
10649 (package
10650 (name "ruby-prawn-table")
10651 (version "0.2.2")
10652 (source (origin
10653 (method url-fetch)
10654 (uri (rubygems-uri "prawn-table" version))
10655 (sha256
10656 (base32
10657 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10658 (build-system ruby-build-system)
10659 (propagated-inputs
10660 `(("ruby-prawn" ,ruby-prawn)
10661 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
10662 (native-inputs
10663 `(("bundler" ,bundler)
10664 ("ruby-yard" ,ruby-yard)
10665 ("ruby-mocha" ,ruby-mocha)
10666 ("ruby-coderay" ,ruby-coderay)
10667 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10668 ("ruby-simplecov" ,ruby-simplecov)
10669 ("ruby-rspec-2" ,ruby-rspec-2)))
10670 (arguments
10671 '(;; TODO: 1 test fails
10672 ;; Failure/Error: pdf.page_count.should == 1
10673 ;; expected: 1
10674 ;; got: 2 (using ==)
10675 ;; # ./spec/table_spec.rb:1308
10676 ;;
10677 ;; 225 examples, 1 failure
10678 #:tests? #f
10679 #:phases
10680 (modify-phases %standard-phases
10681 (add-before 'check 'patch-gemspec
10682 (lambda _
10683 (substitute* "prawn-table.gemspec"
10684 ;; Loosen the requirement for pdf-inspector
10685 (("~> 1\\.1\\.0") ">= 0")
10686 ;; Loosen the requirement for pdf-reader
10687 (("~> 1\\.2") ">= 0"))))
10688 (replace 'check
10689 (lambda* (#:key tests? #:allow-other-keys)
10690 (when tests?
10691 (invoke "rspec"))
10692 #t)))))
10693 (home-page "https://github.com/prawnpdf/prawn-table")
10694 (synopsis "Tables support for Prawn")
10695 (description "This gem provides tables support for Prawn.")
10696 (license license:gpl3+)))
10697
10698 (define-public ruby-kramdown
10699 (package
10700 (name "ruby-kramdown")
10701 (version "2.3.0")
10702 (source (origin
10703 (method url-fetch)
10704 (uri (rubygems-uri "kramdown" version))
10705 (sha256
10706 (base32
10707 "1vmw752c26ny2jwl0npn0gbyqwgz4hdmlpxnsld9qi9xhk5b1qh7"))))
10708 (build-system ruby-build-system)
10709 (arguments `(#:tests? #f)); FIXME: some test failures
10710 (native-inputs
10711 `(("ruby-prawn" ,ruby-prawn)
10712 ("ruby-prawn-table" ,ruby-prawn-table)))
10713 (home-page "https://kramdown.gettalong.org/")
10714 (synopsis "Markdown parsing and converting library")
10715 (description "Kramdown is a library for parsing and converting a superset
10716 of Markdown. It is completely written in Ruby, supports standard Markdown
10717 (with some minor modifications) and various extensions that have been made
10718 popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10719 (license license:expat)))
10720
10721 (define-public ruby-kramdown-parser-gfm
10722 (package
10723 (name "ruby-kramdown-parser-gfm")
10724 (version "1.1.0")
10725 (source
10726 (origin
10727 (method url-fetch)
10728 (uri (rubygems-uri "kramdown-parser-gfm" version))
10729 (sha256
10730 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
10731 (build-system ruby-build-system)
10732 (arguments
10733 `(#:tests? #f)) ;no rakefile
10734 (propagated-inputs
10735 `(("ruby-kramdown" ,ruby-kramdown)))
10736 (synopsis "Kramdown parser for the GFM dialect of Markdown")
10737 (description
10738 "This is a parser for kramdown that converts Markdown documents in the
10739 GFM dialect to HTML.")
10740 (home-page "https://github.com/kramdown/parser-gfm")
10741 (license license:expat)))
10742
10743 (define-public ruby-http-parser.rb
10744 (package
10745 (name "ruby-http-parser.rb")
10746 (version "0.6.0")
10747 (source
10748 (origin
10749 (method url-fetch)
10750 (uri (rubygems-uri "http_parser.rb" version))
10751 (sha256
10752 (base32
10753 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10754 (build-system ruby-build-system)
10755 (arguments
10756 ;; No tests
10757 `(#:tests? #f))
10758 (native-inputs
10759 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10760 ("ruby-rspec" ,ruby-rspec)))
10761 (home-page "https://github.com/tmm1/http_parser.rb")
10762 (synopsis "HTTP parser un Ruby")
10763 (description "This gem is a simple callback-based HTTP request/response
10764 parser for writing http servers, clients and proxies.")
10765 (license license:expat)))
10766
10767 (define-public ruby-em-websocket
10768 (package
10769 (name "ruby-em-websocket")
10770 (version "0.5.1")
10771 (source
10772 (origin
10773 (method url-fetch)
10774 (uri (rubygems-uri "em-websocket" version))
10775 (sha256
10776 (base32
10777 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10778 (build-system ruby-build-system)
10779 (arguments
10780 ;; No tests
10781 `(#:tests? #f))
10782 (propagated-inputs
10783 `(("ruby-eventmachine" ,ruby-eventmachine)
10784 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10785 (native-inputs
10786 `(("bundler" ,bundler)
10787 ("ruby-rspec" ,ruby-rspec)))
10788 (home-page "https://github.com/igrigorik/em-websocket")
10789 (synopsis "EventMachine based WebSocket server")
10790 (description "Em-websocket is an EventMachine based WebSocket server
10791 implementation.")
10792 (license license:expat)))
10793
10794 (define-public ruby-rouge
10795 (package
10796 (name "ruby-rouge")
10797 (version "3.21.0")
10798 (source (origin
10799 (method url-fetch)
10800 (uri (rubygems-uri "rouge" version))
10801 (sha256
10802 (base32
10803 "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
10804 (build-system ruby-build-system)
10805 (arguments `(#:tests? #f)); No rakefile
10806 (home-page "http://rouge.jneen.net/")
10807 (synopsis "Code highlighter")
10808 (description "Rouge is a code highlighter written in Ruby. It supports more
10809 than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10810 is compatible with stylesheets designed for pygments.")
10811 (license (list
10812 ;; rouge is licensed under expat
10813 license:expat
10814 ;; pygments is licensed under bsd-2
10815 license:bsd-2))))
10816
10817 (define-public ruby-rouge-2
10818 (package
10819 (inherit ruby-rouge)
10820 (version "2.2.1")
10821 (source (origin
10822 (method url-fetch)
10823 (uri (rubygems-uri "rouge" version))
10824 (sha256
10825 (base32
10826 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
10827
10828 (define-public ruby-hashie
10829 (package
10830 (name "ruby-hashie")
10831 (version "3.6.0")
10832 (source (origin
10833 (method url-fetch)
10834 (uri (rubygems-uri "hashie" version))
10835 (sha256
10836 (base32
10837 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10838 (build-system ruby-build-system)
10839 (native-inputs
10840 `(("bundler" ,bundler)))
10841 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10842 (home-page "https://github.com/intridea/hashie")
10843 (synopsis "Extensions to Ruby Hashes")
10844 (description "Hashie is a collection of classes and mixins that make Ruby
10845 hashes more powerful.")
10846 (license license:expat)))
10847
10848 (define-public ruby-heredoc-unindent
10849 (package
10850 (name "ruby-heredoc-unindent")
10851 (version "1.2.0")
10852 (source (origin
10853 (method url-fetch)
10854 (uri (rubygems-uri "heredoc_unindent" version))
10855 (sha256
10856 (base32
10857 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
10858 (build-system ruby-build-system)
10859 (native-inputs
10860 `(("ruby-hoe" ,ruby-hoe)))
10861 (home-page "https://github.com/adrianomitre/heredoc_unindent")
10862 (synopsis "Heredoc indentation cleaner")
10863 (description "This gem removes common margin from indented strings, such
10864 as the ones produced by indented heredocs. In other words, it strips out
10865 leading whitespace chars at the beginning of each line, but only as much as
10866 the line with the smallest margin.
10867
10868 It is acknowledged that many strings defined by heredocs are just code and
10869 fact is that most parsers are insensitive to indentation. If, however, the
10870 strings are to be used otherwise, be it for printing or testing, the extra
10871 indentation will probably be an issue and hence this gem.")
10872 (license license:expat)))
10873
10874 (define-public ruby-safe-yaml
10875 (package
10876 (name "ruby-safe-yaml")
10877 (version "1.0.5")
10878 (source
10879 (origin
10880 (method git-fetch)
10881 (uri (git-reference
10882 (url "https://github.com/dtao/safe_yaml")
10883 (commit version)))
10884 (file-name (git-file-name name version))
10885 (sha256
10886 (base32
10887 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
10888 (build-system ruby-build-system)
10889 (native-inputs
10890 `(("ruby-rspec" ,ruby-rspec)
10891 ("ruby-hashie" ,ruby-hashie)
10892 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
10893 (arguments
10894 '(#:test-target "spec"
10895 #:phases
10896 (modify-phases %standard-phases
10897 (add-before 'check 'set-TZ
10898 (lambda _
10899 ;; This test is dependent on the timezone
10900 ;; spec/transform/to_date_spec.rb:35
10901 ;; # SafeYAML::Transform::ToDate converts times to the local
10902 ;; timezone
10903 (setenv "TZ" "UTC-11")
10904 #t)))))
10905 (home-page "https://github.com/dtao/safe_yaml")
10906 (synopsis "YAML parser")
10907 (description "The SafeYAML gem provides an alternative implementation of
10908 YAML.load suitable for accepting user input in Ruby applications.")
10909 (license license:expat)))
10910
10911 (define-public ruby-mercenary
10912 (package
10913 (name "ruby-mercenary")
10914 (version "0.3.6")
10915 (source (origin
10916 (method url-fetch)
10917 (uri (rubygems-uri "mercenary" version))
10918 (sha256
10919 (base32
10920 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
10921 (build-system ruby-build-system)
10922 (arguments `(#:test-target "spec"))
10923 (native-inputs
10924 `(("bundler" ,bundler)))
10925 (home-page "https://github.com/jekyll/mercenary")
10926 (synopsis "Command-line apps library in Ruby")
10927 (description "Mercenary is a lightweight and flexible library for writing
10928 command-line apps in Ruby.")
10929 (license license:expat)))
10930
10931 (define-public ruby-liquid
10932 (package
10933 (name "ruby-liquid")
10934 (version "4.0.0")
10935 (source (origin
10936 (method url-fetch)
10937 (uri (rubygems-uri "liquid" version))
10938 (sha256
10939 (base32
10940 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
10941 (build-system ruby-build-system)
10942 (arguments `(#:tests? #f)); No rakefile
10943 (home-page "https://shopify.github.io/liquid/")
10944 (synopsis "Template language")
10945 (description "Liquid is a template language written in Ruby. It is used
10946 to load dynamic content on storefronts.")
10947 (license license:expat)))
10948
10949 (define-public ruby-forwardable-extended
10950 (package
10951 (name "ruby-forwardable-extended")
10952 (version "2.6.0")
10953 (source (origin
10954 (method url-fetch)
10955 (uri (rubygems-uri "forwardable-extended" version))
10956 (sha256
10957 (base32
10958 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
10959 (build-system ruby-build-system)
10960 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
10961 (home-page "https://github.com/envygeeks/forwardable-extended")
10962 (synopsis "Delegation to hashes and instance variables in Forwardable")
10963 (description "Forwardable Extended provides more @code{Forwardable}
10964 methods for your source as @code{Forwardable::Extended}.")
10965 (license license:expat)))
10966
10967 (define-public ruby-pathutil
10968 (package
10969 (name "ruby-pathutil")
10970 (version "0.16.2")
10971 (source (origin
10972 (method url-fetch)
10973 (uri (rubygems-uri "pathutil" version))
10974 (sha256
10975 (base32
10976 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
10977 (build-system ruby-build-system)
10978 (propagated-inputs
10979 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
10980 (native-inputs
10981 `(("bundler" ,bundler)
10982 ("ruby-rspec" ,ruby-rspec)))
10983 ;; Fails with: cannot load such file --
10984 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
10985 (arguments `(#:tests? #f))
10986 (home-page "https://github.com/envygeeks/pathutil")
10987 (synopsis "Extended implementation of Pathname")
10988 (description "Pathutil tries to be a faster pure Ruby implementation of
10989 Pathname.")
10990 (license license:expat)))
10991
10992 (define-public jekyll
10993 (package
10994 (name "jekyll")
10995 (version "3.8.6")
10996 (source (origin
10997 (method url-fetch)
10998 (uri (rubygems-uri "jekyll" version))
10999 (sha256
11000 (base32
11001 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
11002 (build-system ruby-build-system)
11003 (arguments
11004 ;; No rakefile, but a test subdirectory.
11005 `(#:tests? #f
11006 #:phases
11007 (modify-phases %standard-phases
11008 (add-before 'build 'fix-i18n
11009 (lambda _
11010 (substitute* ".gemspec"
11011 (("~> 0.7") ">= 0.7")
11012 (("~> 1.14") ">= 1.14"))
11013 #t)))))
11014 (propagated-inputs
11015 `(("ruby-addressable" ,ruby-addressable)
11016 ("ruby-colorator" ,ruby-colorator)
11017 ("ruby-em-websocket" ,ruby-em-websocket)
11018 ("ruby-i18n" ,ruby-i18n)
11019 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
11020 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
11021 ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
11022 ("ruby-liquid" ,ruby-liquid)
11023 ("ruby-mercenary" ,ruby-mercenary)
11024 ("ruby-pathutil" ,ruby-pathutil)
11025 ("ruby-rouge" ,ruby-rouge-2)
11026 ("ruby-safe-yaml" ,ruby-safe-yaml)))
11027 (home-page "https://jekyllrb.com/")
11028 (synopsis "Static site generator")
11029 (description "Jekyll is a simple, blog aware, static site generator.")
11030 (license license:expat)))
11031
11032 (define-public ruby-jekyll-paginate-v2
11033 (package
11034 (name "ruby-jekyll-paginate-v2")
11035 (version "3.0.0")
11036 (source (origin
11037 (method url-fetch)
11038 (uri (rubygems-uri "jekyll-paginate-v2" version))
11039 (sha256
11040 (base32
11041 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
11042 (build-system ruby-build-system)
11043 (propagated-inputs
11044 `(("jekyll" ,jekyll)))
11045 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
11046 (synopsis "Pagination Generator for Jekyll 3")
11047 (description "The Pagination Generator forms the core of the pagination
11048 logic in Jekyll. It calculates and generates the pagination pages.")
11049 (license license:expat)))
11050
11051 (define-public ruby-faraday
11052 (package
11053 (name "ruby-faraday")
11054 (version "0.15.4")
11055 (source
11056 (origin
11057 (method url-fetch)
11058 (uri (rubygems-uri "faraday" version))
11059 (sha256
11060 (base32
11061 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
11062 (build-system ruby-build-system)
11063 (arguments
11064 '(#:tests? #f))
11065 (propagated-inputs
11066 `(("ruby-multipart-post" ,ruby-multipart-post)))
11067 (synopsis "Ruby HTTP/REST API client library")
11068 (description
11069 "Faraday is a HTTP/REST API client library which provides a common
11070 interface over different adapters.")
11071 (home-page "https://github.com/lostisland/faraday")
11072 (license license:expat)))
11073
11074 (define-public ruby-nio4r
11075 (package
11076 (name "ruby-nio4r")
11077 (version "2.5.2")
11078 (source
11079 (origin
11080 (method url-fetch)
11081 (uri (rubygems-uri "nio4r" version))
11082 (sha256
11083 (base32
11084 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
11085 (build-system ruby-build-system)
11086 (arguments
11087 '(#:phases
11088 (modify-phases %standard-phases
11089 (add-after 'unpack 'remove-unnecessary-dependencies
11090 (lambda _
11091 (substitute* "spec/spec_helper.rb"
11092 ;; Coveralls is for uploading test coverage information to an
11093 ;; online service, and thus unnecessary for building the Guix
11094 ;; package
11095 (("require \"coveralls\"") "")
11096 (("Coveralls\\.wear!") "")
11097 ;; Remove rspec/retry as we are not retrying the tests
11098 (("require \"rspec/retry\"") "")
11099 (("config\\.display_try_failure_messages = true") "")
11100 (("config\\.verbose_retry = true") ""))
11101 #t))
11102 (add-before 'check 'compile
11103 (lambda _
11104 (invoke "rake" "compile")
11105 #t))
11106 (replace 'check
11107 (lambda* (#:key tests? #:allow-other-keys)
11108 (when tests?
11109 (invoke "rspec"))
11110 #t)))))
11111 (native-inputs
11112 `(("bundler" ,bundler)
11113 ("ruby-rake-compiler" ,ruby-rake-compiler)
11114 ("ruby-rspec" ,ruby-rspec)
11115 ("ruby-rubocop" ,ruby-rubocop)))
11116 (synopsis "New I/O for Ruby")
11117 (description
11118 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
11119 for scalable network clients and servers.")
11120 (home-page "https://github.com/socketry/nio4r")
11121 (license license:expat)))
11122
11123 (define-public ruby-globalid
11124 (package
11125 (name "ruby-globalid")
11126 (version "0.4.2")
11127 (source
11128 (origin
11129 (method url-fetch)
11130 (uri (rubygems-uri "globalid" version))
11131 (sha256
11132 (base32
11133 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
11134 (build-system ruby-build-system)
11135 (arguments
11136 '(;; No included tests
11137 #:tests? #f))
11138 (propagated-inputs
11139 `(("ruby-activesupport" ,ruby-activesupport)))
11140 (synopsis "Generate URIs idenfitying model instances in Ruby")
11141 (description
11142 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
11143 uniquely identify it.")
11144 (home-page "https://rubyonrails.org/")
11145 (license license:expat)))
11146
11147 (define-public ruby-sprockets
11148 (package
11149 (name "ruby-sprockets")
11150 (version "3.7.2")
11151 (source
11152 (origin
11153 (method url-fetch)
11154 (uri (rubygems-uri "sprockets" version))
11155 (sha256
11156 (base32
11157 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
11158 (build-system ruby-build-system)
11159 (arguments
11160 '(;; No included tests
11161 #:tests? #f))
11162 (propagated-inputs
11163 `(("ruby-concurrent" ,ruby-concurrent)
11164 ("ruby-rack" ,ruby-rack)))
11165 (synopsis "Sprockets is a Rack-based asset packaging system")
11166 (description
11167 "Sprockets is a Rack-based asset packaging system that concatenates and
11168 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
11169 (home-page "https://github.com/rails/sprockets")
11170 (license license:expat)))
11171
11172 (define-public ruby-mustache
11173 (package
11174 (name "ruby-mustache")
11175 (version "1.1.1")
11176 (source
11177 (origin
11178 (method url-fetch)
11179 (uri (rubygems-uri "mustache" version))
11180 (sha256
11181 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
11182 (build-system ruby-build-system)
11183 (native-inputs
11184 `(("ruby-simplecov" ,ruby-simplecov)))
11185 (synopsis "framework-agnostic way to render logic-free views")
11186 (description
11187 "Mustache is a framework-agnostic way to render logic-free views.
11188 Think of Mustache as a replacement for your views. Instead of views
11189 consisting of ERB or HAML with random helpers and arbitrary logic,
11190 your views are broken into two parts: a Ruby class and an HTML
11191 template.")
11192 (home-page "https://github.com/mustache/mustache")
11193 (license license:expat)))
11194
11195 (define-public ruby-mustermann
11196 (package
11197 (name "ruby-mustermann")
11198 (version "1.0.3")
11199 (source
11200 (origin
11201 (method url-fetch)
11202 (uri (rubygems-uri "mustermann" version))
11203 (sha256
11204 (base32
11205 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
11206 (build-system ruby-build-system)
11207 (arguments
11208 ;; No tests.
11209 '(#:tests? #f))
11210 (synopsis "Library implementing patterns that behave like regular expressions")
11211 (description "Given a string pattern, Mustermann will turn it into an
11212 object that behaves like a regular expression and has comparable performance
11213 characteristics.")
11214 (home-page "https://github.com/sinatra/mustermann")
11215 (license license:expat)))
11216
11217 (define-public ruby-htmlentities
11218 (package
11219 (name "ruby-htmlentities")
11220 (version "4.3.4")
11221 (source
11222 (origin
11223 (method url-fetch)
11224 (uri (rubygems-uri "htmlentities" version))
11225 (sha256
11226 (base32
11227 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
11228 (build-system ruby-build-system)
11229 (arguments
11230 `(#:phases
11231 (modify-phases %standard-phases
11232 (replace 'check
11233 (lambda _
11234 (map (lambda (file)
11235 (invoke "ruby" "-Itest" file))
11236 (find-files "./test" ".*_test\\.rb")))))))
11237 (synopsis "Encode and decode (X)HTML entities")
11238 (description
11239 "This package provides a module for encoding and decoding (X)HTML
11240 entities.")
11241 (home-page "https://github.com/threedaymonk/htmlentities")
11242 (license license:expat)))
11243
11244 (define-public ruby-sinatra
11245 (package
11246 (name "ruby-sinatra")
11247 (version "2.0.8.1")
11248 (source
11249 (origin
11250 (method url-fetch)
11251 (uri (rubygems-uri "sinatra" version))
11252 (sha256
11253 (base32
11254 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
11255 (build-system ruby-build-system)
11256 (arguments
11257 `(#:phases
11258 (modify-phases %standard-phases
11259 ;; See: https://github.com/sinatra/sinatra/issues/1578.
11260 (add-after 'extract-gemspec 'fix-slow-doc-generation
11261 (lambda _
11262 (substitute* "sinatra.gemspec"
11263 (("\"README.rdoc\"\\.freeze," all)
11264 (string-append all " \"--exclude=.*\\.md\".freeze,")))
11265 #t)))))
11266 (propagated-inputs
11267 `(("ruby-mustermann" ,ruby-mustermann)
11268 ("ruby-rack" ,ruby-rack)
11269 ("ruby-rack-protection" ,ruby-rack-protection)
11270 ("ruby-tilt" ,ruby-tilt)))
11271 (synopsis "DSL for quick web applications creation in Ruby")
11272 (description
11273 "Sinatra is a DSL for quickly creating web applications in Ruby with
11274 minimal effort.")
11275 (home-page "http://sinatrarb.com/")
11276 (license license:expat)))
11277
11278 (define-public ruby-thin
11279 (package
11280 (name "ruby-thin")
11281 (version "1.7.2")
11282 (source
11283 (origin
11284 (method url-fetch)
11285 (uri (rubygems-uri "thin" version))
11286 (sha256
11287 (base32
11288 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
11289 (build-system ruby-build-system)
11290 (arguments
11291 ;; No tests.
11292 '(#:tests? #f))
11293 (propagated-inputs
11294 `(("ruby-daemons" ,ruby-daemons)
11295 ("ruby-eventmachine" ,ruby-eventmachine)
11296 ("ruby-rack" ,ruby-rack)))
11297 (synopsis "Thin and fast web server for Ruby")
11298 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
11299 @itemize
11300 @item the Mongrel parser,
11301 @item Event Machine, a network I/O library with high scalability, performance
11302 and stability,
11303 @item Rack, a minimal interface between webservers and Ruby frameworks.
11304 @end itemize\n")
11305 (home-page "https://github.com/macournoyer/thin")
11306 (license license:ruby)))
11307
11308 (define-public ruby-skinny
11309 (package
11310 (name "ruby-skinny")
11311 (version "0.2.4")
11312 (source
11313 (origin
11314 (method url-fetch)
11315 (uri (rubygems-uri "skinny" version))
11316 (sha256
11317 (base32
11318 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
11319 (build-system ruby-build-system)
11320 (arguments
11321 '(#:tests? #f ; No included tests
11322 #:phases
11323 (modify-phases %standard-phases
11324 (add-before 'build 'patch-gemspec
11325 (lambda _
11326 (substitute* ".gemspec"
11327 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
11328 "<eventmachine>, [\">= 1.0.0\"")
11329 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
11330 #t)))))
11331 (propagated-inputs
11332 `(("ruby-eventmachine" ,ruby-eventmachine)
11333 ("ruby-thin" ,ruby-thin)))
11334 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
11335 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
11336 the Thin library.")
11337 (home-page "https://github.com/sj26/skinny")
11338 (license license:expat)))
11339
11340 (define-public ruby-sys-filesystem
11341 (package
11342 (name "ruby-sys-filesystem")
11343 (version "1.3.4")
11344 (source (origin
11345 (method url-fetch)
11346 (uri (rubygems-uri "sys-filesystem" version))
11347 (sha256
11348 (base32
11349 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
11350 (build-system ruby-build-system)
11351 (arguments
11352 '(#:phases (modify-phases %standard-phases
11353 (add-before 'check 'set-HOME
11354 (lambda _
11355 ;; Some tests attempt to stat $HOME. Let them.
11356 (setenv "HOME" "/tmp")
11357 #t)))))
11358 (propagated-inputs
11359 `(("ruby-ffi" ,ruby-ffi)))
11360 (native-inputs
11361 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
11362 (synopsis "Gather file system information")
11363 (description
11364 "The @code{sys-filesystem} library provides a cross-platform interface
11365 for gathering file system information, such as disk space and mount points.")
11366 (home-page "https://github.com/djberg96/sys-filesystem")
11367 (license license:asl2.0)))
11368
11369 (define-public mailcatcher
11370 (package
11371 (name "mailcatcher")
11372 (version "0.7.1")
11373 (source
11374 (origin
11375 (method url-fetch)
11376 (uri (rubygems-uri "mailcatcher" version))
11377 (sha256
11378 (base32
11379 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
11380 (build-system ruby-build-system)
11381 (arguments
11382 ;; Tests require web/assets which is not included in the output. We
11383 ;; might be able to fix this by adding the Git repository to the GEM_PATH
11384 ;; of the tests. See ruby-mysql2.
11385 '(#:tests? #f
11386 #:phases
11387 (modify-phases %standard-phases
11388 (add-before 'build 'patch-gemspec
11389 (lambda _
11390 (substitute* ".gemspec"
11391 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11392 "<eventmachine>, [\">= 1.0.9.1")
11393 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11394 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11395 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11396 #t))
11397 (add-before 'build 'loosen-dependency-contraint
11398 (lambda _
11399 (substitute* "lib/mail_catcher.rb"
11400 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11401 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11402 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11403 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11404 #t)))))
11405 (inputs
11406 `(("ruby-eventmachine" ,ruby-eventmachine)
11407 ("ruby-mail" ,ruby-mail)
11408 ("ruby-rack" ,ruby-rack)
11409 ("ruby-sinatra" ,ruby-sinatra)
11410 ("ruby-skinny" ,ruby-skinny)
11411 ("ruby-sqlite3" ,ruby-sqlite3)
11412 ("ruby-thin" ,ruby-thin)))
11413 (synopsis "SMTP server which catches messages to display them a browser")
11414 (description
11415 "MailCatcher runs a super simple SMTP server which catches any message
11416 sent to it to display in a web interface. Run mailcatcher, set your favourite
11417 app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11418 then check out http://127.0.0.1:1080 to see the mail.")
11419 (home-page "https://mailcatcher.me")
11420 (license license:expat)))
11421
11422 (define-public ruby-backport
11423 (package
11424 (name "ruby-backport")
11425 (version "1.1.2")
11426 (source
11427 (origin
11428 ;; The gem does not include test code, so fetch from the Git repository.
11429 (method git-fetch)
11430 (uri (git-reference
11431 (url "https://github.com/castwide/backport")
11432 (commit (string-append "v" version))))
11433 (file-name (git-file-name name version))
11434 (sha256
11435 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
11436 (build-system ruby-build-system)
11437 (arguments
11438 `(#:test-target "spec"))
11439 (native-inputs
11440 `(("bundler" ,bundler)
11441 ("ruby-rspec" ,ruby-rspec)))
11442 (inputs
11443 `(("ruby-simplecov" ,ruby-simplecov)))
11444 (synopsis "Pure Ruby library for event-driven IO")
11445 (description
11446 "This package provides a pure Ruby library for event-driven IO.")
11447 (home-page "https://github.com/castwide/backport")
11448 (license license:expat)))
11449
11450 (define-public ruby-json-schema
11451 (package
11452 (name "ruby-json-schema")
11453 (version "2.8.1")
11454 (source
11455 (origin
11456 (method url-fetch)
11457 (uri (rubygems-uri "json-schema" version))
11458 (sha256
11459 (base32
11460 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11461 (build-system ruby-build-system)
11462 (arguments
11463 `(#:tests? #f ; no tests
11464 #:phases
11465 (modify-phases %standard-phases
11466 (replace 'build
11467 (lambda _
11468 (invoke "gem" "build" ".gemspec"))))))
11469 (propagated-inputs
11470 `(("ruby-addressable" ,ruby-addressable)))
11471 (synopsis "Ruby JSON Schema Validator")
11472 (description "This library provides Ruby with an interface for validating
11473 JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11474 support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11475 is also included.")
11476 (home-page "https://github.com/ruby-json-schema/json-schema")
11477 (license license:expat)))
11478
11479 (define-public swagger-diff
11480 (package
11481 (name "swagger-diff")
11482 (version "1.1.2")
11483 (source
11484 (origin
11485 (method url-fetch)
11486 (uri (rubygems-uri "swagger-diff" version))
11487 (sha256
11488 (base32
11489 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11490 (build-system ruby-build-system)
11491 (arguments
11492 `(#:test-target "spec"
11493 #:phases
11494 (modify-phases %standard-phases
11495 ;; Don't run or require rubocop, the code linting tool, as this is a
11496 ;; bit unnecessary.
11497 (add-after 'unpack 'dont-run-rubocop
11498 (lambda _
11499 (substitute* "Rakefile"
11500 ((".*rubocop.*") "")
11501 ((".*RuboCop.*") ""))
11502 #t)))))
11503 (propagated-inputs
11504 `(("ruby-json-schema" ,ruby-json-schema)))
11505 (native-inputs
11506 `(("bundler" ,bundler)
11507 ("ruby-rspec-core" ,ruby-rspec-core)
11508 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
11509 (synopsis
11510 "Compare Open API Initiative specification files")
11511 (description
11512 "Swagger::Diff is a utility for comparing two different Open API
11513 Initiative (OAI) specifications (formerly known as Swagger specifications).
11514 It is intended to determine whether a newer API specification is
11515 backwards-compatible with an older API specification.")
11516 (home-page "https://github.com/civisanalytics/swagger-diff")
11517 (license license:bsd-3)))
11518
11519 (define-public ruby-reverse-markdown
11520 (package
11521 (name "ruby-reverse-markdown")
11522 (version "1.1.0")
11523 (source
11524 (origin
11525 (method url-fetch)
11526 (uri (rubygems-uri "reverse_markdown" version))
11527 (sha256
11528 (base32
11529 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11530 (build-system ruby-build-system)
11531 (propagated-inputs
11532 `(("ruby-nokogiri" ,ruby-nokogiri)))
11533 (native-inputs
11534 `(("bundler" ,bundler)
11535 ("ruby-rspec" ,ruby-rspec)
11536 ("ruby-kramdown" ,ruby-kramdown)
11537 ("ruby-simplecov" ,ruby-simplecov)))
11538 (arguments
11539 `(#:phases
11540 (modify-phases %standard-phases
11541 (replace 'check
11542 (lambda* (#:key tests? #:allow-other-keys)
11543 (when tests?
11544 (invoke "rspec"))
11545 #t)))))
11546 (synopsis "Convert HTML into Markdown")
11547 (description
11548 "This Ruby module allows you to map simple HTML back into
11549 Markdown---e.g., if you want to import existing HTML data in your
11550 application.")
11551 (home-page "https://github.com/xijo/reverse_markdown")
11552 (license license:wtfpl2)))
11553
11554 (define-public ruby-solargraph
11555 (package
11556 (name "ruby-solargraph")
11557 (version "0.36.0")
11558 (source
11559 (origin
11560 (method url-fetch)
11561 (uri (rubygems-uri "solargraph" version))
11562 (sha256
11563 (base32
11564 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
11565 (build-system ruby-build-system)
11566 (propagated-inputs
11567 `(("ruby-backport" ,ruby-backport)
11568 ("bundler" ,bundler)
11569 ("ruby-htmlentities" ,ruby-htmlentities)
11570 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
11571 ("ruby-maruku" ,ruby-maruku)
11572 ("ruby-nokogiri" ,ruby-nokogiri)
11573 ("ruby-parser" ,ruby-parser)
11574 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
11575 ("ruby-rubocop" ,ruby-rubocop)
11576 ("ruby-thor" ,ruby-thor)
11577 ("ruby-tilt" ,ruby-tilt)
11578 ("ruby-yard" ,ruby-yard)))
11579 (native-inputs
11580 `(("ruby-rspec" ,ruby-rspec)
11581 ("ruby-pry" ,ruby-pry)
11582 ("ruby-simplecov" ,ruby-simplecov)
11583 ("ruby-webmock" ,ruby-webmock-2)))
11584 ;; FIXME: can't figure out how to run the tests properly:
11585
11586 ;; An error occurred while loading spec_helper.
11587 ;; Failure/Error: return gem_original_require(path)
11588 ;; LoadError:
11589 ;; cannot load such file -- spec_helper
11590 (arguments
11591 '(#:tests? #f
11592 #:phases
11593 (modify-phases %standard-phases
11594 (replace 'check
11595 (lambda* (#:key tests? #:allow-other-keys)
11596 (when tests?
11597 (invoke "rspec"))
11598 #t)))))
11599 (synopsis
11600 "IDE tools for code completion, inline documentation, and static analysis")
11601 (description
11602 "Solargraph provides a comprehensive suite of tools for Ruby
11603 programming: intellisense, diagnostics, inline documentation, and type
11604 checking.")
11605 (home-page "https://solargraph.org/")
11606 (license license:expat)))
11607
11608 (define-public ruby-wayback-machine-downloader
11609 (package
11610 (name "ruby-wayback-machine-downloader")
11611 (version "2.2.1")
11612 (source
11613 (origin
11614 (method url-fetch)
11615 (uri (rubygems-uri
11616 "wayback_machine_downloader"
11617 version))
11618 (sha256
11619 (base32
11620 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11621 (build-system ruby-build-system)
11622 (arguments
11623 '(#:tests? #f)) ; no tests
11624 (synopsis "Download archived websites from the Wayback Machine")
11625 (description
11626 "Wayback Machine Downloader is a command line tool for downloading
11627 websites from the Internet Archive's Wayback Machine (archive.org).
11628 It allows fine grained control over what to download by specifying
11629 which snapshots to consider and what files to include.")
11630 (home-page
11631 "https://github.com/hartator/wayback-machine-downloader")
11632 (license license:expat)))
11633
11634 (define-public ruby-wwtd
11635 (package
11636 (name "ruby-wwtd")
11637 (version "1.4.1")
11638 (home-page "https://github.com/grosser/wwtd")
11639 (source (origin
11640 (method git-fetch)
11641 (uri (git-reference
11642 (url home-page)
11643 (commit (string-append "v" version))))
11644 (file-name (git-file-name name version))
11645 (sha256
11646 (base32
11647 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11648 (modules '((guix build utils)))
11649 (snippet
11650 '(begin
11651 ;; Remove bundled library.
11652 (delete-file "spec/rake-12.3.0.gem")
11653 #t))))
11654 (build-system ruby-build-system)
11655 (arguments
11656 '(;; XXX: Tests need multiple versions of ruby, wants to run
11657 ;; `bundle install`, etc.
11658 #:tests? #f
11659 #:phases (modify-phases %standard-phases
11660 (replace 'replace-git-ls-files
11661 (lambda _
11662 (substitute* "wwtd.gemspec"
11663 (("git ls-files lib/ bin/`")
11664 "find lib/ bin/ -type f |sort`"))
11665 #t))
11666 (add-before 'check 'remove-version-constraints
11667 (lambda _
11668 (delete-file "Gemfile.lock")
11669 #t))
11670 (replace 'check
11671 (lambda* (#:key tests? #:allow-other-keys)
11672 (if tests?
11673 (invoke "rspec" "spec/")
11674 (format #t "test suite not run~%"))
11675 #t)))))
11676 (native-inputs
11677 `(("ruby-bump" ,ruby-bump)
11678 ("ruby-rspec" ,ruby-rspec)))
11679 (synopsis "Run @file{.travis.yml} files locally")
11680 (description
11681 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
11682 defined in @file{.travis.yml} on your local machine, using @code{rvm},
11683 @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
11684 (license license:expat)))