Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
3 ;;; Copyright © 2014-2017, 2021-2022 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-2022 Marius Bakke <marius@gnu.org>
10 ;;; Copyright © 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
11 ;;; Copyright © 2017, 2018, 2020, 2021 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, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
25 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
26 ;;; Copyright © 2020 Holgr Peters <holger.peters@posteo.de>
27 ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
28 ;;; Copyright © 2021 EuAndreh <eu@euandre.org>
29 ;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
30 ;;; Copyright © 2021 Giovanni Biscuolo <g@xelera.eu>
31 ;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
32 ;;;
33 ;;; This file is part of GNU Guix.
34 ;;;
35 ;;; GNU Guix is free software; you can redistribute it and/or modify it
36 ;;; under the terms of the GNU General Public License as published by
37 ;;; the Free Software Foundation; either version 3 of the License, or (at
38 ;;; your option) any later version.
39 ;;;
40 ;;; GNU Guix is distributed in the hope that it will be useful, but
41 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
42 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 ;;; GNU General Public License for more details.
44 ;;;
45 ;;; You should have received a copy of the GNU General Public License
46 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
47
48 (define-module (gnu packages ruby)
49 #:use-module ((guix licenses) #:prefix license:)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages c)
54 #:use-module (gnu packages check)
55 #:use-module (gnu packages compression)
56 #:use-module (gnu packages crypto)
57 #:use-module (gnu packages curl)
58 #:use-module (gnu packages databases)
59 #:use-module (gnu packages dbm)
60 #:use-module (gnu packages rails)
61 #:use-module (gnu packages readline)
62 #:use-module (gnu packages autotools)
63 #:use-module (gnu packages haskell-xyz)
64 #:use-module (gnu packages java)
65 #:use-module (gnu packages libffi)
66 #:use-module (gnu packages libidn)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages lsof)
69 #:use-module (gnu packages man)
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages networking)
73 #:use-module (gnu packages node)
74 #:use-module (gnu packages protobuf)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages ragel)
78 #:use-module (gnu packages rsync)
79 #:use-module (gnu packages sqlite)
80 #:use-module (gnu packages tls)
81 #:use-module (gnu packages version-control)
82 #:use-module (guix packages)
83 #:use-module (guix download)
84 #:use-module (guix git-download)
85 #:use-module (guix gexp)
86 #:use-module (guix utils)
87 #:use-module (guix build-system gnu)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages web)
90 #:use-module (guix build-system ruby)
91 #:use-module ((srfi srfi-1) #:select (alist-delete)))
92
93 (define %prawn-project-licenses
94 ;; This set of licenses applies to most (all?) components of the Prawn
95 ;; project (it is triple licensed).
96 (list license:ruby
97 license:gpl2+
98 license:gpl3+))
99
100 (define-public ruby-2.6
101 (package
102 (name "ruby")
103 (version "2.6.5")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
108 (version-major+minor version)
109 "/ruby-" version ".tar.xz"))
110 (sha256
111 (base32
112 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
113 (modules '((guix build utils)))
114 (snippet `(begin
115 ;; Remove bundled libffi
116 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
117 #t))))
118 (build-system gnu-build-system)
119 (arguments
120 `(#:test-target "test"
121 #:configure-flags '("--enable-shared") ; dynamic linking
122 #:phases
123 (modify-phases %standard-phases
124 (add-before 'configure 'replace-bin-sh-and-remove-libffi
125 (lambda _
126 (substitute* '("Makefile.in"
127 "ext/pty/pty.c"
128 "io.c"
129 "lib/mkmf.rb"
130 "process.c"
131 "test/rubygems/test_gem_ext_configure_builder.rb"
132 "test/rdoc/test_rdoc_parser.rb"
133 "test/ruby/test_rubyoptions.rb"
134 "test/ruby/test_process.rb"
135 "test/ruby/test_system.rb"
136 "tool/rbinstall.rb")
137 (("/bin/sh") (which "sh")))
138 #t)))))
139 (inputs
140 (list readline openssl libffi gdbm))
141 (propagated-inputs
142 (list zlib))
143 (native-search-paths
144 (list (search-path-specification
145 (variable "GEM_PATH")
146 (files (list (string-append "lib/ruby/vendor_ruby"))))))
147 (synopsis "Programming language interpreter")
148 (description "Ruby is a dynamic object-oriented programming language with
149 a focus on simplicity and productivity.")
150 (home-page "https://www.ruby-lang.org")
151 (license license:ruby)))
152
153 (define-public ruby-2.7
154 (package
155 (inherit ruby-2.6)
156 (version "2.7.4")
157 (source
158 (origin
159 (inherit (package-source ruby-2.6))
160 (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
161 (version-major+minor version)
162 "/ruby-" version ".tar.gz"))
163 (sha256
164 (base32
165 "0nxwkxh7snmjqf787qsp4i33mxd1rbf9yzyfiky5k230i680jhrh"))))
166 (arguments
167 `(#:test-target "test"
168 #:configure-flags '("--enable-shared") ; dynamic linking
169 #:phases
170 (modify-phases %standard-phases
171 (add-before 'configure 'replace-bin-sh-and-remove-libffi
172 (lambda _
173 (substitute* '("configure.ac"
174 "template/Makefile.in"
175 "lib/rubygems/installer.rb"
176 "ext/pty/pty.c"
177 "io.c"
178 "lib/mkmf.rb"
179 "process.c"
180 "test/rubygems/test_gem_ext_configure_builder.rb"
181 "test/rdoc/test_rdoc_parser.rb"
182 "test/ruby/test_rubyoptions.rb"
183 "test/ruby/test_process.rb"
184 "test/ruby/test_system.rb"
185 "tool/rbinstall.rb")
186 (("/bin/sh") (which "sh")))
187 #t)))))
188 (native-inputs
189 (list autoconf))))
190
191 (define-public ruby-3.0
192 (package
193 (inherit ruby-2.7)
194 (version "3.0.2")
195 (source
196 (origin
197 (method url-fetch)
198 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
199 (version-major+minor version)
200 "/ruby-" version ".tar.xz"))
201 (sha256
202 (base32
203 "0h2w2ms4gx2s96v3lzdr3add94bd2qqkhdjzaycmaqhg21rpf3jp"))))))
204
205 (define-public ruby-3.1
206 (package
207 (inherit ruby-2.7)
208 (version "3.1.1")
209 (source
210 (origin
211 (method url-fetch)
212 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
213 (version-major+minor version)
214 "/ruby-" version ".tar.xz"))
215 (sha256
216 (base32
217 "1akcl7vhmwfm6ybj7493kzy58ykh2r39ri9f4xfm2xmhg1msmvvs"))))))
218
219 (define-public ruby-2.5
220 (package
221 (inherit ruby-2.6)
222 (version "2.5.9")
223 (source
224 (origin
225 (method url-fetch)
226 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
227 (version-major+minor version)
228 "/ruby-" version ".tar.xz"))
229 (sha256
230 (base32
231 "1w2qncacm7h3f3il1whghdabwnv9fvwmz9f1a9vcg32006ljyzx8"))))))
232
233 (define-public ruby-2.4
234 (package
235 (inherit ruby-2.6)
236 (version "2.4.10")
237 (source
238 (origin
239 (method url-fetch)
240 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
241 (version-major+minor version)
242 "/ruby-" version ".tar.xz"))
243 (sha256
244 (base32
245 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
246 (modules '((guix build utils)))
247 (snippet `(begin
248 ;; Remove bundled libffi
249 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
250 #t))))))
251
252 (define-public ruby ruby-2.7)
253
254 (define-public mruby
255 (package
256 (name "mruby")
257 (version "2.1.2")
258 (source
259 (origin
260 (method git-fetch)
261 (uri (git-reference
262 (url "https://github.com/mruby/mruby")
263 (commit version)))
264 (file-name (git-file-name name version))
265 (sha256
266 (base32
267 "0fhfv8pi7i8jn2vgk2n2rjnbnfa12nhj514v8i4k353n7q4pmkh3"))))
268 (build-system gnu-build-system)
269 (arguments
270 `(#:test-target "test"
271 #:phases
272 (modify-phases %standard-phases
273 (delete 'configure)
274 (add-after 'unpack 'enable-verbose-tests
275 (lambda _
276 (substitute* "Makefile"
277 (("ruby ./minirake" m)
278 (string-append m " --verbose")))
279 #t))
280 (add-after 'unpack 'disable-broken-tests
281 (lambda _
282 (substitute* "mrbgems/mruby-io/test/io.rb"
283 (("assert\\('IO.popen.+$" m)
284 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
285 (("assert\\('IO#isatty.+$" m)
286 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
287 ;; This one is really weird. The *expected* output is all wrong.
288 (("assert\\('`cmd`.*" m)
289 (string-append m "skip \"Disable for Guix\"\n"))
290 (("echo foo")
291 (string-append (which "echo") " foo")))
292 #t))
293 ;; There is no install target
294 (replace 'install
295 (lambda* (#:key outputs #:allow-other-keys)
296 (let* ((out (assoc-ref outputs "out"))
297 (bin (string-append out "/bin"))
298 (lib (string-append out "/lib")))
299 (mkdir-p bin)
300 (copy-recursively "build/host/bin" bin)
301 (mkdir-p lib)
302 (copy-recursively "build/host/lib" lib))
303 #t)))))
304 (native-inputs
305 (list ruby bison))
306 (home-page "https://github.com/mruby/mruby")
307 (synopsis "Lightweight Ruby")
308 (description "mruby is the lightweight implementation of the Ruby
309 language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
310 embedded within your application.")
311 (license license:expat)))
312
313 (define-public ruby-commander
314 (package
315 (name "ruby-commander")
316 (version "4.4.7")
317 (source
318 (origin
319 (method url-fetch)
320 (uri (rubygems-uri "commander" version))
321 (sha256
322 (base32
323 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
324 (build-system ruby-build-system)
325 (arguments
326 `(#:test-target "spec"
327 #:phases
328 (modify-phases %standard-phases
329 ;; Don't run or require rubocop, the code linting tool, as this is a
330 ;; bit unnecessary.
331 (add-after 'unpack 'dont-run-rubocop
332 (lambda _
333 (substitute* "Rakefile"
334 ((".*rubocop.*") "")
335 ((".*RuboCop.*") ""))
336 #t)))))
337 (propagated-inputs
338 (list ruby-highline))
339 (native-inputs
340 (list bundler ruby-rspec-core ruby-rspec-expectations
341 ruby-rspec-mocks ruby-simplecov))
342 (home-page "https://github.com/commander-rb/commander")
343 (synopsis "Library for building Ruby command-line executables")
344 (description
345 "Commander aims to be a complete solution for Ruby command-line
346 executables. Commander bridges the gap between other terminal related
347 libraries (OptionParser, HighLine), while providing many new features, and an
348 elegant API.")
349 (license license:expat)))
350
351 (define-public ruby-highline
352 (package
353 (name "ruby-highline")
354 (version "2.0.1")
355 (source
356 (origin
357 (method url-fetch)
358 (uri (rubygems-uri "highline" version))
359 (sha256
360 (base32
361 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
362 (build-system ruby-build-system)
363 (arguments
364 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
365 (native-inputs
366 (list bundler ruby-code-statistics))
367 (synopsis
368 "HighLine helps you build command-line interfaces")
369 (description
370 "HighLine provides a high-level IO library that provides validation,
371 type conversion, and more for command-line interfaces. HighLine also includes
372 a menu system for providing multiple options to the user.")
373 (home-page "https://github.com/JEG2/highline")
374 (license (list license:gpl2 license:ruby))))
375
376 (define-public ruby-hoe
377 (package
378 (name "ruby-hoe")
379 (version "3.21.0")
380 (source (origin
381 (method url-fetch)
382 (uri (rubygems-uri "hoe" version))
383 (sha256
384 (base32
385 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
386 (build-system ruby-build-system)
387 (arguments
388 '(#:phases
389 (modify-phases %standard-phases
390 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
391 ;; variable is set, so unset it for the duration of the tests.
392 ;;
393 ;; TestHoe#test_possibly_better
394 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
395 ;; Expected: 2019-11-12 00:00:00 UTC
396 ;; Actual: 1970-01-01 00:00:00 UTC
397 (add-before 'check 'unset-SOURCE-DATE-EPOCH
398 (lambda _
399 (unsetenv "SOURCE_DATE_EPOCH")
400 #t))
401 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
402 (lambda _
403 (setenv "SOURCE_DATE_EPOCH" "1")
404 #t)))))
405 (synopsis "Ruby project management helper")
406 (description
407 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
408 maintain, and release projects and includes a dynamic plug-in system allowing
409 for easy extensibility. Hoe ships with plug-ins for all the usual project
410 tasks including rdoc generation, testing, packaging, deployment, and
411 announcement.")
412 (home-page "https://www.zenspider.com/projects/hoe.html")
413 (license license:expat)))
414
415 (define-public ruby-rake-compiler
416 (package
417 (name "ruby-rake-compiler")
418 (version "1.1.1")
419 (source (origin
420 (method url-fetch)
421 (uri (rubygems-uri "rake-compiler" version))
422 (sha256
423 (base32
424 "11sxgw10jrd6a4irb51jjwam9wikixn5kss11pw4b80cmh32yvpf"))))
425 (build-system ruby-build-system)
426 (arguments
427 '(#:tests? #f)) ; needs cucumber
428 (synopsis "Building and packaging helper for Ruby native extensions")
429 (description "Rake-compiler provides a framework for building and
430 packaging native C and Java extensions in Ruby.")
431 (home-page "https://github.com/rake-compiler/rake-compiler")
432 (license license:expat)))
433
434 (define-public ruby-rsync
435 (package
436 (name "ruby-rsync")
437 (version "1.0.9")
438 (source
439 (origin
440 (method url-fetch)
441 (uri (rubygems-uri "rsync" version))
442 (sha256
443 (base32
444 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
445 (build-system ruby-build-system)
446 (arguments
447 '(#:test-target "spec"
448 #:phases
449 (modify-phases %standard-phases
450 (add-after 'unpack 'remove-coveralls-requirement
451 (lambda _
452 (substitute* "spec/spec_helper.rb"
453 (("require 'coveralls'") "")
454 (("Coveralls.wear!") ""))
455 #t)))))
456 (native-inputs
457 (list bundler rsync ruby-rspec-core ruby-rspec-expectations
458 ruby-rspec-mocks))
459 (home-page "https://github.com/jbussdieker/ruby-rsync")
460 (synopsis "Ruby wrapper around rsync")
461 (description
462 "Ruby Rsync is a Ruby library that can synchronize files between remote
463 hosts by wrapping the @file{rsync} binary.")
464 (license license:expat)))
465
466 (define-public ruby-i18n
467 (package
468 (name "ruby-i18n")
469 (version "1.7.0")
470 (source (origin
471 (method url-fetch)
472 (uri (rubygems-uri "i18n" version))
473 (sha256
474 (base32
475 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
476 (build-system ruby-build-system)
477 (arguments
478 '(#:tests? #f)) ; no tests
479 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
480 (synopsis "Internationalization library for Ruby")
481 (description "Ruby i18n is an internationalization and localization
482 solution for Ruby programs. It features translation and localization,
483 interpolation of values to translations, pluralization, customizable
484 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
485 translation data, custom key/scope separator, custom exception handlers, and
486 an extensible architecture with a swappable backend.")
487 (home-page "https://github.com/ruby-i18n/i18n")
488 (license license:expat)))
489
490 (define-public ruby-iruby
491 (package
492 (name "ruby-iruby")
493 (version "0.3")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (rubygems-uri "iruby" version))
498 (sha256
499 (base32
500 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
501 (build-system ruby-build-system)
502 (arguments
503 ;; TODO: Tests currently fail.
504 ;;
505 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
506 ;;
507 ;; 1) Failure:
508 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
509 ;; In [ expected
510 ;;
511 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
512 '(#:tests? #f
513 #:phases
514 (modify-phases %standard-phases
515 (add-after 'unpack 'patch-ipython
516 (lambda* (#:key inputs #:allow-other-keys)
517 (substitute* "lib/iruby/command.rb"
518 (("version = `")
519 (string-append
520 "version = `"
521 (assoc-ref inputs "python-ipython")
522 "/bin/"))
523 (("Kernel\\.exec\\('")
524 (string-append
525 "Kernel.exec('"
526 (assoc-ref inputs "python-ipython")
527 "/bin/")))
528 #t)))))
529 (inputs
530 (list python-ipython))
531 (propagated-inputs
532 (list ruby-bond
533 ruby-data_uri
534 ruby-mimemagic
535 ruby-multi-json
536 ruby-cztop
537 ;; Optional inputs
538 ruby-pry))
539 (synopsis "Ruby kernel for Jupyter/IPython")
540 (description
541 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
542 notebook).")
543 (home-page "https://github.com/SciRuby/iruby")
544 (license license:expat)))
545
546 ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
547 ;; dependencies use RSpec for their test suites! To avoid these circular
548 ;; dependencies, we disable tests for all of the RSpec-related packages.
549 (define-public ruby-rspec-support
550 (package
551 (name "ruby-rspec-support")
552 (version "3.8.0")
553 (source (origin
554 (method url-fetch)
555 (uri (rubygems-uri "rspec-support" version))
556 (sha256
557 (base32
558 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
559 (build-system ruby-build-system)
560 (arguments
561 '(#:tests? #f)) ; avoid dependency cycles
562 (synopsis "RSpec support library")
563 (description "Support utilities for RSpec gems.")
564 (home-page "https://github.com/rspec/rspec-support")
565 (license license:expat)))
566
567 (define-public ruby-rspec-core
568 (package
569 (name "ruby-rspec-core")
570 (version "3.8.0")
571 (source (origin
572 (method url-fetch)
573 (uri (rubygems-uri "rspec-core" version))
574 (sha256
575 (base32
576 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
577 (build-system ruby-build-system)
578 (arguments
579 '(#:tests? #f)) ; avoid dependency cycles
580 (propagated-inputs
581 (list ruby-rspec-support))
582 (synopsis "RSpec core library")
583 (description "Rspec-core provides the RSpec test runner and example
584 groups.")
585 (home-page "https://github.com/rspec/rspec-core")
586 (license license:expat)))
587
588 (define-public ruby-rspec-core-2
589 (package (inherit ruby-rspec-core)
590 (version "2.14.8")
591 (source (origin
592 (method url-fetch)
593 (uri (rubygems-uri "rspec-core" version))
594 (sha256
595 (base32
596 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
597 (propagated-inputs `())))
598
599 (define-public ruby-diff-lcs
600 (package
601 (name "ruby-diff-lcs")
602 (version "1.3")
603 (source (origin
604 (method url-fetch)
605 (uri (rubygems-uri "diff-lcs" version))
606 (sha256
607 (base32
608 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
609 (build-system ruby-build-system)
610 (arguments
611 '(#:tests? #f)) ; avoid dependency cycles
612 (synopsis "Compute the difference between two Enumerable sequences")
613 (description "Diff::LCS computes the difference between two Enumerable
614 sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
615 It includes utilities to create a simple HTML diff output format and a
616 standard diff-like tool.")
617 (home-page "https://github.com/halostatue/diff-lcs")
618 (license license:expat)))
619
620 (define-public ruby-rspec-expectations
621 (package
622 (name "ruby-rspec-expectations")
623 (version "3.8.2")
624 (source (origin
625 (method url-fetch)
626 (uri (rubygems-uri "rspec-expectations" version))
627 (sha256
628 (base32
629 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
630 (build-system ruby-build-system)
631 (arguments
632 '(#:tests? #f)) ; avoid dependency cycles
633 (propagated-inputs
634 (list ruby-rspec-support ruby-diff-lcs))
635 (synopsis "RSpec expectations library")
636 (description "Rspec-expectations provides a simple API to express expected
637 outcomes of a code example.")
638 (home-page "https://github.com/rspec/rspec-expectations")
639 (license license:expat)))
640
641 (define-public ruby-rspec-expectations-2
642 (package (inherit ruby-rspec-expectations)
643 (version "2.14.5")
644 (source (origin
645 (method url-fetch)
646 (uri (rubygems-uri "rspec-expectations" version))
647 (sha256
648 (base32
649 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
650 (propagated-inputs
651 (list ruby-diff-lcs))))
652
653 (define-public ruby-sorcerer
654 (package
655 (name "ruby-sorcerer")
656 (version "2.0.1")
657 (source
658 (origin
659 (method url-fetch)
660 (uri (rubygems-uri "sorcerer" version))
661 (sha256
662 (base32
663 "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
664 (build-system ruby-build-system)
665 (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
666 (description "Sorcerer generates Ruby code from a Ripper-like abstract
667 syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
668 snippets of Ruby code, expressible in a single line. Longer examples may be
669 re-sourced, but they will be rendered in a single-line format.")
670 (home-page "https://github.com/rspec-given/sorcerer")
671 (license license:expat)))
672
673 (define-public ruby-given-core
674 (package
675 (name "ruby-given-core")
676 (version "3.8.0")
677 (source
678 (origin
679 (method url-fetch)
680 (uri (rubygems-uri "given_core" version))
681 (sha256
682 (base32
683 "1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
684 (build-system ruby-build-system)
685 (arguments '(#:tests? #f)) ;no test suite for the core package
686 (propagated-inputs
687 (list ruby-sorcerer))
688 (synopsis "Core abstractions used by rspec-given and minitest-given")
689 (description "Given_core is the basic functionality behind rspec-given and
690 minitest-given, extensions that allow the use of Given/When/Then terminology
691 when defining specifications.")
692 (home-page "https://github.com/rspec-given/rspec-given")
693 (license license:expat)))
694
695 (define-public ruby-rspec-given
696 (package
697 (name "ruby-rspec-given")
698 (version "3.8.0")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (rubygems-uri "rspec-given" version))
703 (sha256
704 (base32
705 "1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
706 (build-system ruby-build-system)
707 (arguments
708 `(#:test-target "rs"
709 #:phases
710 (modify-phases %standard-phases
711 (add-after 'unpack 'fix-rakefile
712 (lambda _
713 (substitute* '("Rakefile" "rakelib/gemspec.rake")
714 (("require '\\./lib/given/.*") "")
715 (("Given::VERSION") (format #f "~s" ,version))
716 ;; Fix the error: "cannot load such file -- example_helper"
717 (("sh \"rspec")
718 "sh \"rspec -Ilib:examples"))
719 #t))
720 (add-after 'extract-gemspec 'delete-failing-tests
721 ;; See: https://github.com/jimweirich/rspec-given/issues/57.
722 (lambda _
723 (substitute* ".gemspec"
724 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
725 "")
726 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
727 ""))
728 (delete-file "spec/lib/given/natural_assertion_spec.rb")
729 (delete-file "examples/integration/failing_messages_spec.rb")
730 #t)))))
731 (native-inputs
732 (list ruby-rspec ruby-minitest))
733 (propagated-inputs
734 (list ruby-given-core ruby-rspec))
735 (synopsis "Given/When/Then for RSpec and Minitest")
736 (description "Given is an RSpec extension that allows the use of
737 Given/When/Then terminology when defining specifications, in a way similar to
738 the Cucumber Gherkin language.")
739 (home-page "https://github.com/rspec-given/rspec-given")
740 (license license:expat)))
741
742 (define-public ruby-rspec-its
743 (package
744 (name "ruby-rspec-its")
745 (version "1.3.0")
746 (source
747 (origin
748 (method git-fetch)
749 (uri (git-reference
750 (url "https://github.com/rspec/rspec-its")
751 (commit (string-append "v" version))))
752 (file-name (git-file-name name version))
753 (sha256
754 (base32
755 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
756 (build-system ruby-build-system)
757 (arguments
758 `(#:test-target "spec"
759 #:phases
760 (modify-phases %standard-phases
761 (add-after 'unpack 'dont-install-gems-from-gemfile
762 (lambda _
763 (substitute* "Gemfile"
764 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
765 ""))
766 #t))
767 (add-before 'build 'loosen-ffi-requirement
768 (lambda _
769 ;; Accept any version of ruby-ffi.
770 (substitute* "Gemfile"
771 ((" gem 'ffi', '~> 1\\.9\\.25'")
772 " gem 'ffi'"))
773 #t))
774 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
775 (lambda _
776 (substitute* "rspec-its.gemspec"
777 (("rake.*") "rake'\n")
778 (("spec.add_development_dependency 'cucumber'.*")
779 "spec.add_development_dependency 'cucumber'\n")
780 (("bundler.*") "bundler'\n")
781 (("\"aruba.*") "'aruba'\n"))
782 #t)))))
783 (propagated-inputs
784 (list ruby-rspec-core ruby-rspec-expectations))
785 (native-inputs
786 (list bundler ruby-cucumber ruby-ffi ruby-aruba))
787 (synopsis "RSpec extension that provides the @code{its} method")
788 (description
789 "RSpec::Its provides the its method as a short-hand to specify the expected
790 value of an attribute. For example, one can use @code{its(:size)\\{should
791 eq(1)\\}}.")
792 (home-page "https://github.com/rspec/rspec-its")
793 (license license:expat)))
794
795 ;;; This variant is used to break a cycle with ruby-protobuf.
796 (define-public ruby-rspec-its-minimal
797 (hidden-package
798 (package
799 (inherit ruby-rspec-its)
800 (arguments
801 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
802 ((#:tests? _ #f) #f)))
803 (native-inputs '()))))
804
805 (define-public ruby-rspec-mocks
806 (package
807 (name "ruby-rspec-mocks")
808 (version "3.8.0")
809 (source (origin
810 (method url-fetch)
811 (uri (rubygems-uri "rspec-mocks" version))
812 (sha256
813 (base32
814 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
815 (build-system ruby-build-system)
816 (arguments
817 '(#:tests? #f)) ; avoid dependency cycles
818 (propagated-inputs
819 (list ruby-rspec-support ruby-diff-lcs))
820 (synopsis "RSpec stubbing and mocking library")
821 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
822 support for stubbing and mocking.")
823 (home-page "https://github.com/rspec/rspec-mocks")
824 (license license:expat)))
825
826 (define-public ruby-rspec-mocks-2
827 (package (inherit ruby-rspec-mocks)
828 (version "2.14.6")
829 (source (origin
830 (method url-fetch)
831 (uri (rubygems-uri "rspec-mocks" version))
832 (sha256
833 (base32
834 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
835 (propagated-inputs
836 (list ruby-diff-lcs))))
837
838 (define-public ruby-rspec-rerun
839 (package
840 (name "ruby-rspec-rerun")
841 (version "1.1.0")
842 (source
843 (origin
844 (method url-fetch)
845 (uri (rubygems-uri "rspec-rerun" version))
846 (sha256
847 (base32
848 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
849 (build-system ruby-build-system)
850 (arguments
851 '(;; No included tests
852 #:tests? #f))
853 (propagated-inputs (list ruby-rspec))
854 (synopsis "Track failed RSpec tests to re-run them")
855 (description
856 "This package provides an automated way to track, and then re-run failed
857 RSpec tests.")
858 (home-page "https://github.com/dblock/rspec-rerun")
859 (license license:expat)))
860
861 (define-public ruby-rspec-wait
862 (package
863 (name "ruby-rspec-wait")
864 (version "0.0.9")
865 (source
866 (origin
867 (method url-fetch)
868 (uri (rubygems-uri "rspec-wait" version))
869 (sha256
870 (base32
871 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
872 (build-system ruby-build-system)
873 (arguments
874 '(#:phases
875 (modify-phases %standard-phases
876 (replace 'check
877 (lambda _
878 (invoke "rake" "spec"))))))
879 (native-inputs
880 (list bundler))
881 (propagated-inputs
882 (list ruby-rspec))
883 (home-page "https://github.com/laserlemon/rspec-wait")
884 (synopsis "Wait for conditions in RSpec")
885 (description
886 "RSpec::Wait strives to make it easier to test asynchronous or slow
887 interactions.")
888 (license license:expat)))
889
890 (define-public ruby-rspec
891 (package
892 (name "ruby-rspec")
893 (version "3.8.0")
894 (source (origin
895 (method url-fetch)
896 (uri (rubygems-uri "rspec" version))
897 (sha256
898 (base32
899 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
900 (build-system ruby-build-system)
901 (arguments
902 '(#:tests? #f)) ; avoid dependency cycles
903 (propagated-inputs
904 (list ruby-rspec-core ruby-rspec-mocks ruby-rspec-expectations))
905 (synopsis "Behavior-driven development framework for Ruby")
906 (description "RSpec is a behavior-driven development (BDD) framework for
907 Ruby. This meta-package includes the RSpec test runner, along with the
908 expectations and mocks frameworks.")
909 (home-page "https://rspec.info/")
910 (license license:expat)))
911
912 (define-public ruby-rspec-2
913 (package (inherit ruby-rspec)
914 (version "2.14.1")
915 (source (origin
916 (method url-fetch)
917 (uri (rubygems-uri "rspec" version))
918 (sha256
919 (base32
920 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
921 (propagated-inputs
922 (list ruby-rspec-core-2 ruby-rspec-mocks-2 ruby-rspec-expectations-2))))
923
924 ;; Bundler is yet another source of circular dependencies, so we must disable
925 ;; its test suite as well.
926 (define-public bundler
927 (package
928 (name "bundler")
929 (version "2.1.4")
930 (source (origin
931 (method url-fetch)
932 (uri (rubygems-uri "bundler" version))
933 (sha256
934 (base32
935 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
936 (build-system ruby-build-system)
937 (arguments
938 '(#:tests? #f)) ; avoid dependency cycles
939 (synopsis "Ruby gem bundler")
940 (description "Bundler automatically downloads and installs a list of gems
941 specified in a \"Gemfile\", as well as their dependencies.")
942 (home-page "https://bundler.io/")
943 (license license:expat)))
944
945 (define-public ruby-builder
946 (package
947 (name "ruby-builder")
948 (version "3.2.4")
949 (source (origin
950 (method url-fetch)
951 (uri (rubygems-uri "builder" version))
952 (sha256
953 (base32
954 "045wzckxpwcqzrjr353cxnyaxgf0qg22jh00dcx7z38cys5g1jlr"))))
955 (build-system ruby-build-system)
956 (arguments
957 `(#:phases
958 (modify-phases %standard-phases
959 (add-after 'unpack 'do-not-use-rvm
960 (lambda _
961 (substitute* "rakelib/tags.rake"
962 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
963 #t)))))
964 (synopsis "Ruby library to create structured data")
965 (description "Builder provides a number of builder objects that make it
966 easy to create structured data. Currently the following builder objects are
967 supported: XML Markup and XML Events.")
968 (home-page "https://github.com/jimweirich/builder")
969 (license license:expat)))
970
971 (define-public ruby-bump
972 (package
973 (name "ruby-bump")
974 (version "0.7.0")
975 (source
976 (origin
977 (method url-fetch)
978 (uri (rubygems-uri "bump" version))
979 (sha256
980 (base32
981 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
982 (build-system ruby-build-system)
983 (arguments
984 '(;; No included tests
985 #:tests? #f))
986 (synopsis "Tool for working with Rubygems")
987 (description
988 "Bump provides commands to manage Rubygem versioning, updating to the
989 next patch version for example.")
990 (home-page "https://github.com/gregorym/bump")
991 (license license:expat)))
992
993 (define-public ruby-rjb
994 (package
995 (name "ruby-rjb")
996 (version "1.5.5")
997 (source (origin
998 (method url-fetch)
999 (uri (rubygems-uri "rjb" version))
1000 (sha256
1001 (base32
1002 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
1003 (build-system ruby-build-system)
1004 (arguments
1005 `(#:tests? #f ; no rakefile
1006 #:phases
1007 (modify-phases %standard-phases
1008 (add-before 'build 'set-java-home
1009 (lambda* (#:key inputs #:allow-other-keys)
1010 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1011 #t)))))
1012 (native-inputs
1013 `(("jdk" ,icedtea "jdk")))
1014 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1015 (description "RJB is a bridge program that connects Ruby and Java via the
1016 Java Native Interface.")
1017 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
1018 (license license:lgpl2.1+)))
1019
1020 (define-public ruby-log4r
1021 (package
1022 (name "ruby-log4r")
1023 (version "1.1.10")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (rubygems-uri "log4r" version))
1028 (sha256
1029 (base32
1030 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1031 (build-system ruby-build-system)
1032 (arguments
1033 '(#:tests? #f)) ; no Rakefile in gem
1034 (synopsis "Flexible logging library for Ruby")
1035 (description "Comprehensive and flexible logging library written
1036 in Ruby for use in Ruby programs. It features a hierarchical logging
1037 system of any number of levels, custom level names, logger
1038 inheritance, multiple output destinations per log event, execution
1039 tracing, custom formatting, thread safteyness, XML and YAML
1040 configuration, and more.")
1041 (home-page "http://log4r.rubyforge.org/")
1042 (license license:bsd-3)))
1043
1044 (define-public ruby-atoulme-antwrap
1045 (package
1046 (name "ruby-atoulme-antwrap")
1047 (version "0.7.5")
1048 (source (origin
1049 (method url-fetch)
1050 (uri (rubygems-uri "atoulme-Antwrap" version))
1051 (sha256
1052 (base32
1053 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1054 (build-system ruby-build-system)
1055 ;; Test data required for most of the tests are not included.
1056 (arguments `(#:tests? #f))
1057 (native-inputs
1058 (list ruby-hoe))
1059 (inputs
1060 (list ruby-rjb))
1061 (synopsis "Ruby wrapper for the Ant build tool")
1062 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1063 tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1064 script.")
1065 (home-page "http://rubyforge.org/projects/antwrap/")
1066 (license license:expat)))
1067
1068 (define-public ruby-atoulme-saikuro
1069 (package
1070 (name "ruby-atoulme-saikuro")
1071 (version "1.2.1")
1072 (source (origin
1073 (method url-fetch)
1074 (uri (rubygems-uri "atoulme-Saikuro" version))
1075 (sha256
1076 (base32
1077 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1078 (build-system ruby-build-system)
1079 ;; FIXME: There are no unit tests. The tests are demonstrations of the
1080 ;; "saikuro" tool.
1081 (arguments `(#:tests? #f))
1082 (synopsis "Cyclomatic complexity analyzer")
1083 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1084 given Ruby source code Saikuro will generate a report listing the cyclomatic
1085 complexity of each method found. In addition, Saikuro counts the number of
1086 lines per method and can generate a listing of the number of tokens on each
1087 line of code.")
1088 (home-page "http://www.github.com/atoulme/Saikuro")
1089 ;; File headers contain the BSD-3 license and the README.rdoc says that
1090 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1091 ;; of the Expat license.
1092 (license license:bsd-3)))
1093
1094 (define-public ruby-awesome-print
1095 (package
1096 (name "ruby-awesome-print")
1097 (version "1.8.0")
1098 (source
1099 (origin
1100 (method url-fetch)
1101 (uri (rubygems-uri "awesome_print" version))
1102 (sha256
1103 (base32
1104 "14arh1ixfsd6j5md0agyzvksm5svfkvchb90fp32nn7y3avcmc2h"))))
1105 (build-system ruby-build-system)
1106 (arguments
1107 `(#:phases
1108 (modify-phases %standard-phases
1109 (replace 'check
1110 (lambda _
1111 ;; Remove failing test.
1112 (for-each delete-file
1113 '("spec/ext/nokogiri_spec.rb"
1114 "spec/colors_spec.rb"
1115 "spec/formats_spec.rb"
1116 "spec/methods_spec.rb"
1117 "spec/misc_spec.rb"
1118 "spec/objects_spec.rb"))
1119 (invoke "rspec" "-c" "spec"))))))
1120 (native-inputs
1121 (list ruby-nokogiri ruby-rspec ruby-simplecov))
1122 (synopsis "Pretty print Ruby objects to visualize their structure")
1123 (description
1124 "Ruby dubugging companion: pretty print Ruby objects to visualize their
1125 structure. Supports custom object formatting via plugins.")
1126 (home-page "https://github.com/awesome-print/awesome_print")
1127 (license license:expat)))
1128
1129 (define-public ruby-pandoc-ruby
1130 (package
1131 (name "ruby-pandoc-ruby")
1132 (version "2.1.4")
1133 (source
1134 (origin
1135 (method git-fetch) ;the gem lacks many test files
1136 (uri (git-reference
1137 (url "https://github.com/xwmx/pandoc-ruby")
1138 (commit version)))
1139 (file-name (git-file-name name version))
1140 (sha256
1141 (base32
1142 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1143 (build-system ruby-build-system)
1144 (arguments
1145 `(#:tests? #f ; Disable tests since they depend on pandoc behavior
1146 ; and there are no upstream releases.
1147 #:phases
1148 (modify-phases %standard-phases
1149 (add-after 'unpack 'patch-pandoc-path
1150 (lambda* (#:key inputs #:allow-other-keys)
1151 (let ((pandoc (search-input-file inputs "/bin/pandoc")))
1152 (substitute* "lib/pandoc-ruby.rb"
1153 (("@@pandoc_path = 'pandoc'")
1154 (format #f "@@pandoc_path = '~a'" pandoc)))
1155 (substitute* "test/test_pandoc_ruby.rb"
1156 (("('|\")pandoc" _ quote)
1157 (string-append quote pandoc))
1158 (("\\^pandoc")
1159 ".*pandoc")))))
1160 (add-after 'unpack 'adjust-tests
1161 ;; The tests expect filenames with spaces. Because they don't have
1162 ;; spaces the quotes around the output are dropped automatically.
1163 (lambda _
1164 (substitute* "test/test_pandoc_ruby.rb"
1165 (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
1166 (add-after 'extract-gemspec 'remove-Gemfile.lock
1167 (lambda _
1168 (delete-file "Gemfile.lock")
1169 (substitute* "pandoc-ruby.gemspec"
1170 (("Gemfile\\.lock") "")))))))
1171 (native-inputs
1172 (list ruby-mocha))
1173 (inputs
1174 (list pandoc))
1175 (synopsis "Ruby wrapper for Pandoc")
1176 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1177 command line tools for converting one markup format to another. Pandoc can
1178 convert documents from a variety of formats including markdown,
1179 reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1180 variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1181 ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1182 markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1183 more.")
1184 (home-page "https://github.com/xwmx/pandoc-ruby")
1185 (license license:expat)))
1186
1187 (define-public ruby-patron
1188 (package
1189 (name "ruby-patron")
1190 (version "0.13.3")
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (rubygems-uri "patron" version))
1195 (sha256
1196 (base32
1197 "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
1198 (build-system ruby-build-system)
1199 (inputs
1200 (list curl))
1201 (arguments
1202 `(#:tests? #f)) ; no included tests
1203 (synopsis "Ruby HTTP client library based on @code{libcurl}")
1204 (description
1205 "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
1206 not try to expose the full power (read complexity) of @code{libcurl} but
1207 instead tries to provide a sane API while taking advantage of @code{libcurl}
1208 under the hood.")
1209 (home-page "https://github.com/toland/patron")
1210 (license license:expat)))
1211
1212 (define-public ruby-slim
1213 (package
1214 (name "ruby-slim")
1215 (version "4.1.0")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri (rubygems-uri "slim" version))
1220 (sha256
1221 (base32
1222 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1223 (build-system ruby-build-system)
1224 (arguments
1225 `(#:phases
1226 (modify-phases %standard-phases
1227 ;; See: https://github.com/slim-template/slim/issues/857 and
1228 ;; https://github.com/slim-template/slim/issues/858.
1229 (add-after 'unpack 'skip-broken-tests
1230 (lambda _
1231 (substitute* "test/core/test_embedded_engines.rb"
1232 (("def test_render_with_markdown")
1233 "def skipped_test_render_with_markdown"))
1234 (substitute* "test/translator/test_translator.rb"
1235 (("raise (\"Missing test for.*)" _ tail)
1236 (string-append "print " tail)))
1237 #t))
1238 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1239 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1240 (add-after 'unpack 'prevent-bundler-interference
1241 (lambda _
1242 (substitute* "Rakefile"
1243 (("require 'bundler/setup'") "nil")
1244 (("Bundler::GemHelper\\.install_tasks") "nil"))
1245 #t)))))
1246 (native-inputs
1247 (list ruby-rack-test ruby-sinatra))
1248 (propagated-inputs
1249 (list ruby-temple ruby-tilt))
1250 (synopsis "Minimalist template language for Ruby")
1251 (description "Slim is a template language for Ruby that aims to reduce the
1252 syntax to the minimum while remaining clear.")
1253 (home-page "http://slim-lang.com/")
1254 (license license:expat)))
1255
1256 (define-public ruby-asciidoctor
1257 (package
1258 (name "ruby-asciidoctor")
1259 (version "2.0.16")
1260 (source
1261 (origin
1262 (method git-fetch) ;the gem release lacks a Rakefile
1263 (uri (git-reference
1264 (url "https://github.com/asciidoctor/asciidoctor")
1265 (commit (string-append "v" version))))
1266 (file-name (git-file-name name version))
1267 (sha256
1268 (base32
1269 "086i17v9rxx0sxac26xp8c5v75jqba6rqjlk57x94qjvrh8vzyw2"))))
1270 (build-system ruby-build-system)
1271 (arguments
1272 `(#:test-target "test:all"
1273 #:phases
1274 (modify-phases %standard-phases
1275 (add-after 'extract-gemspec 'strip-version-requirements
1276 (lambda _
1277 (delete-file "Gemfile")
1278 (substitute* "asciidoctor.gemspec"
1279 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1280 (string-append stripped "\n")))
1281 #t)))))
1282 (native-inputs
1283 (list ruby-erubi
1284 ruby-erubis
1285 ruby-minitest
1286 ruby-nokogiri
1287 ruby-asciimath
1288 ruby-coderay
1289 ruby-cucumber
1290 ruby-haml
1291 ruby-rouge
1292 ruby-rspec-expectations
1293 ruby-simplecov
1294 ruby-slim
1295 ruby-tilt))
1296 (synopsis "Converter from AsciiDoc content to other formats")
1297 (description "Asciidoctor is a text processor and publishing toolchain for
1298 converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1299 formats.")
1300 (home-page "https://asciidoctor.org")
1301 (license license:expat)))
1302
1303 (define-public ruby-asciidoctor-multipage
1304 (package
1305 (name "ruby-asciidoctor-multipage")
1306 (version "0.0.15")
1307 (source (origin
1308 (method git-fetch)
1309 (uri (git-reference
1310 (url "https://github.com/owenh000/asciidoctor-multipage")
1311 (commit (string-append "v" version))))
1312 (file-name (git-file-name name version))
1313 (sha256
1314 (base32
1315 "01qqkf00cp4sj82brz8kl02pjirydafwgld3z166slysiq78d1c5"))))
1316 (propagated-inputs (list ruby-asciidoctor ruby-slim))
1317 (build-system ruby-build-system)
1318 (arguments
1319 `(#:phases (modify-phases %standard-phases
1320 (add-after 'extract-gemspec 'strip-version-requirements
1321 (lambda _
1322 (delete-file "Gemfile")
1323 (substitute* "asciidoctor-multipage.gemspec"
1324 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1325 (string-append stripped "
1326 "))) #t)))))
1327 (synopsis
1328 "Asciidoctor extension for generating HTML output using multiple pages")
1329 (description
1330 "Asciidoctor generates single-page documents. This extension
1331 splits documents up into multiple HTML pages according to their headings, with
1332 configurable levels.")
1333 (license license:expat)
1334 (home-page "https://github.com/owenh000/asciidoctor-multipage")))
1335
1336 (define-public ruby-prawn-icon
1337 (package
1338 (name "ruby-prawn-icon")
1339 (version "2.5.0")
1340 (source
1341 (origin
1342 (method url-fetch)
1343 (uri (rubygems-uri "prawn-icon" version))
1344 (sha256
1345 (base32
1346 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1347 (build-system ruby-build-system)
1348 (arguments
1349 `(#:test-target "spec"
1350 #:phases (modify-phases %standard-phases
1351 (add-after 'unpack 'remove-unnecessary-dependencies
1352 (lambda _
1353 (substitute* '("Rakefile" "spec/spec_helper.rb")
1354 ((".*[Bb]undler.*") "")
1355 (("^require 'rubocop.*") "")
1356 (("^RuboCop.*") ""))
1357 #t)))))
1358 (native-inputs
1359 (list ruby-pdf-inspector ruby-pdf-reader ruby-rspec ruby-simplecov))
1360 (propagated-inputs
1361 (list ruby-prawn))
1362 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1363 (description "@code{Prawn::Icon} provides various icon fonts including
1364 FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1365 toolkit.")
1366 (home-page "https://github.com/jessedoyle/prawn-icon/")
1367 (license %prawn-project-licenses)))
1368
1369 (define-public ruby-css-parser
1370 (package
1371 (name "ruby-css-parser")
1372 (version "1.7.1")
1373 (source
1374 (origin
1375 (method url-fetch)
1376 (uri (rubygems-uri "css_parser" version))
1377 (sha256
1378 (base32
1379 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1380 (build-system ruby-build-system)
1381 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1382 (propagated-inputs
1383 (list ruby-addressable))
1384 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1385 (description "This package allows loading, parsing and cascading Cascading
1386 Style Sheets (CSS) rule sets in Ruby.")
1387 (home-page "https://github.com/premailer/css_parser")
1388 (license license:expat)))
1389
1390 (define-public ruby-prawn-svg
1391 (package
1392 (name "ruby-prawn-svg")
1393 (version "0.30.0")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (rubygems-uri "prawn-svg" version))
1398 (sha256
1399 (base32
1400 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1401 (build-system ruby-build-system)
1402 (arguments
1403 `(#:phases (modify-phases %standard-phases
1404 (add-after 'unpack 'do-not-use-bundler
1405 (lambda _
1406 (substitute* "spec/spec_helper.rb"
1407 ((".*[Bb]undler.*") ""))
1408 #t))
1409 (replace 'check
1410 (lambda* (#:key tests? #:allow-other-keys)
1411 (when tests?
1412 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1413 #t)))))
1414 (native-inputs
1415 (list ruby-rspec))
1416 (propagated-inputs
1417 (list ruby-css-parser ruby-prawn))
1418 (synopsis "SVG renderer for the Prawn PDF library")
1419 (description "This library allows rendering Scalable Vector Graphics (SVG)
1420 graphics directly into a Portable Document Format (PDF) document using the
1421 Prawn module.")
1422 (home-page "https://github.com/mogest/prawn-svg")
1423 (license license:expat)))
1424
1425 (define-public ruby-prawn-templates
1426 (package
1427 (name "ruby-prawn-templates")
1428 (version "0.1.2")
1429 (source
1430 (origin
1431 (method git-fetch)
1432 (uri (git-reference
1433 (url "https://github.com/prawnpdf/prawn-templates")
1434 (commit version)))
1435 (file-name (git-file-name name version))
1436 (sha256
1437 (base32
1438 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1439 (build-system ruby-build-system)
1440 (arguments
1441 `(#:phases (modify-phases %standard-phases
1442 (add-after 'unpack 'do-not-use-bundler
1443 (lambda _
1444 (substitute* "spec/spec_helper.rb"
1445 ((".*[Bb]undler.*") ""))
1446 #t))
1447 (replace 'check
1448 (lambda* (#:key tests? #:allow-other-keys)
1449 (when tests?
1450 (invoke "rspec"))
1451 #t)))))
1452 (native-inputs
1453 (list ruby-pdf-inspector ruby-rspec))
1454 (propagated-inputs
1455 (list ruby-pdf-reader ruby-prawn))
1456 (synopsis "Prawn extension to include or combine PDF documents")
1457 (description "This @strong{unmaintained} package provides a Prawn
1458 extension that allows including other Portable Document Format (PDF) documents
1459 as background or combining several PDF documents into one. This functionality
1460 used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1461 of its many longstanding issues.")
1462 (home-page "https://github.com/prawnpdf/prawn-templates")
1463 (license %prawn-project-licenses)))
1464
1465 (define-public ruby-polyglot
1466 (package
1467 (name "ruby-polyglot")
1468 (version "0.3.5")
1469 (source
1470 (origin
1471 (method url-fetch)
1472 (uri (rubygems-uri "polyglot" version))
1473 (sha256
1474 (base32
1475 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1476 (build-system ruby-build-system)
1477 (arguments `(#:tests? #f)) ;no test suite
1478 (synopsis "Augment @code{require} to load non-Ruby file types")
1479 (description "The Polyglot library allows a Ruby module to register a
1480 loader for the file type associated with a filename extension, and it augments
1481 @code{require} to find and load matching files.")
1482 (home-page "https://github.com/cjheath/polyglot")
1483 (license license:expat)))
1484
1485 (define-public ruby-treetop
1486 (package
1487 (name "ruby-treetop")
1488 (version "1.6.10")
1489 (source
1490 (origin
1491 (method git-fetch) ;no test suite in distributed gem
1492 (uri (git-reference
1493 (url "https://github.com/cjheath/treetop")
1494 (commit (string-append "v" version))))
1495 (file-name (git-file-name name version))
1496 (sha256
1497 (base32
1498 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1499 (build-system ruby-build-system)
1500 (arguments
1501 `(#:test-target "spec"))
1502 (native-inputs
1503 (list ruby-activesupport ruby-rr ruby-rspec))
1504 (propagated-inputs
1505 (list ruby-polyglot))
1506 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1507 (description "This package provides a Ruby-based Parsing Expression
1508 Grammar (PEG) parser generator Domain Specific Language (DSL).")
1509 (home-page "https://github.com/cjheath/treetop")
1510 (license license:expat)))
1511
1512 (define-public ruby-typhoeus
1513 (package
1514 (name "ruby-typhoeus")
1515 (version "1.4.0")
1516 (source
1517 (origin
1518 (method url-fetch)
1519 (uri (rubygems-uri "typhoeus" version))
1520 (sha256
1521 (base32
1522 "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
1523 (build-system ruby-build-system)
1524 (arguments
1525 `(#:tests? #f)) ; no included tests
1526 (propagated-inputs
1527 (list ruby-ethon))
1528 (synopsis "@code{libcurl} wrapper in Ruby")
1529 (description
1530 "Like a modern code version of the mythical beast with 100 serpent heads,
1531 Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
1532 logic.")
1533 (home-page "https://github.com/typhoeus/typhoeus")
1534 (license license:expat)))
1535
1536 (define-public ruby-rubocop-rspec
1537 (package
1538 (name "ruby-rubocop-rspec")
1539 (version "2.2.0")
1540 (source
1541 (origin
1542 (method git-fetch)
1543 (uri (git-reference
1544 (url "https://github.com/rubocop-hq/rubocop-rspec")
1545 (commit (string-append "v" version))))
1546 (file-name (git-file-name name version))
1547 (sha256
1548 (base32
1549 "0gdpjpympb6qc77bang759z7z6lckf14ghkx8v6614agxg8l3g5y"))))
1550 (build-system ruby-build-system)
1551 (arguments
1552 '(#:test-target "internal_investigation"
1553 #:phases
1554 (modify-phases %standard-phases
1555 (add-before 'check 'set-HOME
1556 (lambda _
1557 (setenv "HOME" "/tmp")
1558 #t)))))
1559 (propagated-inputs
1560 (list ruby-rubocop ruby-rubocop-ast))
1561 (native-inputs
1562 (list ruby-rack ruby-rspec ruby-rubocop-performance ruby-simplecov
1563 ruby-yard))
1564 (synopsis "Code style checking for RSpec files")
1565 (description "This package provides a plugin for the RuboCop code style
1566 enforcing & linting tool.")
1567 (home-page "https://github.com/rubocop-hq/rubocop-rspec")
1568 (license license:expat)))
1569
1570 (define-public ruby-rubocop-rspec-minimal
1571 (hidden-package
1572 (package
1573 (inherit ruby-rubocop-rspec)
1574 (arguments
1575 (substitute-keyword-arguments (package-arguments ruby-rubocop-rspec)
1576 ((#:tests? _ #f) #f)))
1577 (propagated-inputs '())
1578 (native-inputs '()))))
1579
1580 (define-public ruby-rubocop-performance
1581 (package
1582 (name "ruby-rubocop-performance")
1583 (version "1.9.2")
1584 (source
1585 (origin
1586 (method git-fetch)
1587 (uri (git-reference
1588 (url "https://github.com/rubocop-hq/rubocop-performance")
1589 (commit (string-append "v" version))))
1590 (file-name (git-file-name name version))
1591 (sha256
1592 (base32
1593 "04lmkmz6c0ccs5miikrww7lakp7y6xz00g7b47ay7rn7sx5j6qyf"))))
1594 (build-system ruby-build-system)
1595 (arguments
1596 `(#:tests? #f ; tests require a git checkout of rubocop's source code.
1597 #:phases
1598 (modify-phases %standard-phases
1599 (replace 'replace-git-ls-files
1600 (lambda _
1601 (substitute* "rubocop-performance.gemspec"
1602 (("`git ls-files -z config lib LICENSE.txt README.md`")
1603 "`find config lib LICENSE.txt README.md -type f -print0 |sort -z`"))
1604 #t))
1605 (add-before 'check 'set-HOME
1606 (lambda _
1607 (setenv "HOME" "/tmp")
1608 #t)))))
1609 (propagated-inputs
1610 (list ruby-rubocop ruby-rubocop-ast))
1611 (native-inputs
1612 (list ruby-bump ruby-yard))
1613 (synopsis "Performance optimizations checkers for Ruby code")
1614 (description "This package provides a collection of RuboCop cops to check
1615 for performance optimizations in Ruby code.")
1616 (home-page "https://docs.rubocop.org/rubocop-performance/")
1617 (license license:expat)))
1618
1619 (define-public ruby-rubocop-performance-minimal
1620 (hidden-package
1621 (package
1622 (inherit ruby-rubocop-performance)
1623 (arguments
1624 (substitute-keyword-arguments (package-arguments ruby-rubocop-performance)
1625 ((#:tests? _ #f) #f)))
1626 (propagated-inputs '())
1627 (native-inputs '()))))
1628
1629 (define-public ruby-gimme
1630 (let ((revision "1")
1631 (commit "4e71f0236f1271871916dd403261d26533db34c0"))
1632 (package
1633 (name "ruby-gimme")
1634 (version (git-version "0.5.0" revision commit))
1635 (source
1636 (origin
1637 (method git-fetch)
1638 (uri (git-reference
1639 (url "https://github.com/searls/gimme")
1640 (commit commit)))
1641 (file-name (git-file-name name version))
1642 (sha256
1643 (base32
1644 "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
1645 (build-system ruby-build-system)
1646 (native-inputs
1647 (list ruby-coveralls ruby-cucumber ruby-pry ruby-simplecov
1648 ruby-rspec-given))
1649 (arguments
1650 `(;; The cucumber task fails with error: "index 3 out of matches
1651 ;; (IndexError)", apparently due to our newer Cucumber version.
1652 ;; TODO: Try the "default" task with a future release.
1653 #:test-target "spec"
1654 #:phases
1655 (modify-phases %standard-phases
1656 (add-after 'extract-gemspec 'prepare-for-tests
1657 (lambda _
1658 ;; Delete failing tests (possibly due to our newer rspec
1659 ;; version).
1660 (delete-file "spec/gimme/gives_class_methods_spec.rb")
1661 (delete-file "spec/gimme/rspec_adapter_spec.rb")
1662 (delete-file "spec/gimme/verifies_class_methods_spec.rb")
1663 ;; Fix duplicate version requirements and de-register files.
1664 (delete-file "Gemfile")
1665 (delete-file "Gemfile.lock")
1666 (substitute* "gimme.gemspec"
1667 ((".*\"Gemfile\".*") "")
1668 ((".*\"Gemfile\\.lock\",.*") "")
1669 ((".*(rspec|cucumber).*\">= 0\".*") "")
1670 (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
1671 (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
1672 (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
1673 ;; All of these gems relate to development, and are
1674 ;; unnecessary when running the tests.
1675 ((".*(add|gem).*guard-.*") "")
1676 ((".*(add|gem).*jeweler.*") "")
1677 ((".*(add|gem).*pry.*") "")
1678 ((".*(add|gem).*growl.*") "")
1679 ((".*(add|gem).*rb-fsevent.*") ""))
1680 #t)))))
1681 (synopsis "Lightweight test double library for Ruby")
1682 (description "Gimme is a very lightweight test double library for Ruby,
1683 based on Mockito (a mocking framework for Java). It is an opinionated (but
1684 not noisy) means to facilitate test-driving by enabling the authors to specify
1685 only what they care about.")
1686 (home-page "https://github.com/searls/gimme")
1687 (license license:expat))))
1688
1689 (define-public ruby-standard
1690 (package
1691 (name "ruby-standard")
1692 (version "0.4.7")
1693 (source
1694 (origin
1695 (method git-fetch) ;no test suite in distributed gem
1696 (uri (git-reference
1697 (url "https://github.com/testdouble/standard")
1698 (commit (string-append "v" version))))
1699 (file-name (git-file-name name version))
1700 (sha256
1701 (base32
1702 "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
1703 (build-system ruby-build-system)
1704 (arguments
1705 ;; TODO: the tests are currently broken due to using a newer Rubocop.
1706 `(#:tests? #f
1707 #:phases
1708 (modify-phases %standard-phases
1709 (add-after 'unpack 'relax-version-requiremens
1710 (lambda _
1711 (delete-file "Gemfile")
1712 (delete-file "Gemfile.lock")
1713 #t)))))
1714 (native-inputs
1715 (list ruby-gimme ruby-pry ruby-simplecov))
1716 (propagated-inputs
1717 (list ruby-rubocop ruby-rubocop-performance))
1718 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
1719 (description "Standard is a port of StandardJS. Like StandardJS, it aims
1720 to save time in the following ways:
1721 @itemize
1722 @item No configuration.
1723 @item Automatically format code.
1724 @item Catch style issues and programmer errors early.
1725 @end itemize")
1726 (home-page "https://github.com/testdouble/standard")
1727 (license license:expat)))
1728
1729 (define-public ruby-chunky-png
1730 (package
1731 (name "ruby-chunky-png")
1732 (version "1.3.14")
1733 (source
1734 (origin
1735 (method git-fetch)
1736 (uri (git-reference
1737 (url "https://github.com/wvanbergen/chunky_png")
1738 (commit (string-append "v" version))))
1739 (file-name (git-file-name name version))
1740 (sha256
1741 (base32 "1m7y11ix38h5a2pj5v81qdmvqh980ql9hp62hk2dxwkwsa4nh22h"))))
1742 (build-system ruby-build-system)
1743 (arguments
1744 `(#:test-target "spec"
1745 #:phases
1746 (modify-phases %standard-phases
1747 (add-after 'unpack 'disable-bundler
1748 (lambda _
1749 (substitute* (find-files "." "\\.rb$")
1750 (("require.*bundler/setup.*") ""))
1751 #t)))))
1752 (native-inputs
1753 (list bundler ruby-rspec ruby-standard ruby-yard))
1754 (synopsis "Ruby library to handle PNG images")
1755 (description "ChunkyPNG is a pure Ruby library that can read and write
1756 Portable Network Graphics (PNG) images without depending on an external image
1757 library. It tries to be memory efficient and reasonably fast. It has
1758 features such as:
1759 @itemize
1760 @item
1761 Decoding support for any image that the PNG standard allows. This includes all
1762 standard color modes, all bit depths, all transparency, and interlacing and
1763 filtering options.
1764 @item
1765 Encoding support for images of all color modes (true color, grayscale, and
1766 indexed) and transparency for all these color modes. The best color mode is
1767 chosen automatically, based on the amount of used colors.
1768 @item Read/write access to the image's pixels.
1769 @item Read/write access to all image metadata that is stored in chunks.
1770 @item
1771 Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
1772 pixel, depending on the hardware).
1773 @item
1774 Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
1775 integer math and a highly optimized saving routine.
1776 @item Interoperability with RMagick.
1777 @end itemize
1778
1779 ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
1780 loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
1781 Deal with untrusted images in a separate process, e.g., by using @code{fork}
1782 or a background processing library.")
1783 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
1784 (license license:expat)))
1785
1786 (define-public ruby-text-hyphen
1787 (package
1788 (name "ruby-text-hyphen")
1789 (version "1.4.1")
1790 (source
1791 (origin
1792 (method url-fetch)
1793 (uri (rubygems-uri "text-hyphen" version))
1794 (sha256
1795 (base32
1796 "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
1797 (build-system ruby-build-system)
1798 (native-inputs
1799 (list ruby-hoe))
1800 (synopsis "Ruby library to hyphenate words in various languages")
1801 (description "Text::Hyphen is a Ruby library to hyphenate words in various
1802 languages using Ruby-fied versions of TeX hyphenation patterns. It will
1803 properly hyphenate various words according to the rules of the language the
1804 word is written in. The algorithm is based on that of the TeX typesetting
1805 system by Donald E. Knuth.")
1806 (home-page "https://github.com/halostatue/text-hyphen")
1807 ;; The whole is licensed under the Expat license, but parts use various
1808 ;; versions of the LaTeX Project Public License.
1809 (license license:expat)))
1810
1811 (define-public ruby-open-uri-cached
1812 (package
1813 (name "ruby-open-uri-cached")
1814 (version "0.0.5")
1815 (source
1816 (origin
1817 (method url-fetch)
1818 (uri (rubygems-uri "open-uri-cached" version))
1819 (sha256
1820 (base32
1821 "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
1822 (build-system ruby-build-system)
1823 (arguments
1824 `(#:tests? #f)) ;no test suite
1825 (synopsis "OpenURI with transparent disk caching")
1826 (description "OpenURI with transparent disk caching, which is
1827 useful to avoid making excessive queries, for example when scraping
1828 web pages.")
1829 (home-page "https://github.com/tigris/open-uri-cached")
1830 (license license:expat)))
1831
1832 (define-public ruby-asciidoctor-pdf
1833 (package
1834 (name "ruby-asciidoctor-pdf")
1835 (version "1.6.1")
1836 (source
1837 (origin
1838 (method git-fetch) ;no test suite in the distributed gem
1839 (uri (git-reference
1840 (url "https://github.com/asciidoctor/asciidoctor-pdf")
1841 (commit (string-append "v" version))))
1842 (file-name (git-file-name name version))
1843 (sha256
1844 (base32
1845 "1iyfy6n9d3rkyrfjmnnfb44c76mq1larmkv1x8n6p5nbm33wb9sf"))))
1846 (build-system ruby-build-system)
1847 (arguments
1848 `(#:test-target "spec"
1849 #:phases
1850 (modify-phases %standard-phases
1851 (add-after 'unpack 'remove-failing-tests
1852 ;; Two tests module fail for unknown reasons, *only* when
1853 ;; ran in the build container (see:
1854 ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
1855 (lambda _
1856 (delete-file "spec/audio_spec.rb")
1857 (delete-file "spec/video_spec.rb")))
1858 (add-after 'extract-gemspec 'strip-version-requirements
1859 (lambda _
1860 (substitute* "asciidoctor-pdf.gemspec"
1861 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1862 (string-append stripped "\n")))))
1863 ;; The tests rely on the Gem being installed, so move the check phase
1864 ;; after the install phase.
1865 (delete 'check)
1866 (add-after 'install 'check
1867 (lambda* (#:key outputs tests? #:allow-other-keys)
1868 (let ((new-gem (string-append (assoc-ref outputs "out")
1869 "/lib/ruby/vendor_ruby")))
1870 (setenv "GEM_PATH"
1871 (string-append (getenv "GEM_PATH") ":" new-gem))
1872 (when tests?
1873 (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))))))))
1874 (native-inputs
1875 (list ruby-chunky-png ruby-coderay ruby-pdf-inspector ruby-rouge
1876 ruby-rspec))
1877 (propagated-inputs
1878 `(("ruby-asciidoctor" ,ruby-asciidoctor)
1879 ("ruby-concurrent-ruby" ,ruby-concurrent)
1880 ("ruby-open-uri-cached" ,ruby-open-uri-cached)
1881 ("ruby-prawn" ,ruby-prawn)
1882 ("ruby-prawn-icon" ,ruby-prawn-icon)
1883 ("ruby-prawn-svg" ,ruby-prawn-svg)
1884 ("ruby-prawn-table" ,ruby-prawn-table)
1885 ("ruby-prawn-templates" ,ruby-prawn-templates)
1886 ("ruby-safe-yaml" ,ruby-safe-yaml)
1887 ("ruby-text-hyphen" ,ruby-text-hyphen)
1888 ("ruby-thread-safe" ,ruby-thread-safe)
1889 ("ruby-treetop" ,ruby-treetop)
1890 ("ruby-ttfunk" ,ruby-ttfunk)))
1891 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1892 (description "Asciidoctor PDF is an extension for Asciidoctor that
1893 converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1894 PDF library. It has features such as:
1895 @itemize
1896 @item Direct AsciiDoc to PDF conversion
1897 @item Configuration-driven theme (style and layout)
1898 @item Scalable Vector Graphics (SVG) support
1899 @item PDF document outline (i.e., bookmarks)
1900 @item Table of contents page(s)
1901 @item Document metadata (title, authors, subject, keywords, etc.)
1902 @item Internal cross reference links
1903 @item Syntax highlighting with Rouge, Pygments, or CodeRay
1904 @item Page numbering
1905 @item Customizable running content (header and footer)
1906 @item
1907 “Keep together” blocks (i.e., page breaks avoided in certain block content)
1908 @item Orphaned section titles avoided
1909 @item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1910 @item Table border settings honored
1911 @item Font-based icons
1912 @item Custom TrueType (TTF) fonts
1913 @item Double-sided printing mode (margins alternate on recto and verso pages)
1914 @end itemize")
1915 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1916 (license license:expat)))
1917
1918 (define-public ruby-ast
1919 (package
1920 (name "ruby-ast")
1921 (version "2.4.2")
1922 (source
1923 (origin
1924 (method git-fetch) ;no test included in gem from v2.4.1
1925 (uri (git-reference
1926 (url "https://github.com/whitequark/ast")
1927 (commit (string-append "v" version))))
1928 (file-name (git-file-name name version))
1929 (sha256
1930 (base32
1931 "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
1932 (build-system ruby-build-system)
1933 (arguments
1934 '(#:phases
1935 (modify-phases %standard-phases
1936 (add-after 'unpack 'remove-coveralls-requirement
1937 (lambda _
1938 (substitute* "test/helper.rb"
1939 (("require 'coveralls'") "")
1940 (("Coveralls::SimpleCov::Formatter") ""))
1941 #t))
1942 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1943 (lambda* (#:key inputs #:allow-other-keys)
1944 (substitute* "ast.gemspec"
1945 ((".*coveralls.*") "\n")
1946 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1947 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1948 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
1949 (("12\\.3") "13.0"))
1950 #t)))))
1951 (native-inputs
1952 (list bundler
1953 ruby-bacon
1954 ruby-bacon-colored-output
1955 ruby-json-pure
1956 ruby-kramdown
1957 ruby-mime-types
1958 ruby-racc
1959 ruby-rest-client
1960 ruby-simplecov
1961 ruby-yard))
1962 (synopsis "Library for working with Abstract Syntax Trees")
1963 (description
1964 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1965 It does this through immutable data structures.")
1966 (home-page "https://whitequark.github.io/ast/")
1967 (license license:expat)))
1968
1969 (define-public ruby-sporkmonger-rack-mount
1970 ;; Testing the addressable gem requires a newer commit than that released, so
1971 ;; use an up to date version.
1972 (let ((revision "1")
1973 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1974 (package
1975 (name "ruby-sporkmonger-rack-mount")
1976 (version (git-version "0.8.3" revision commit))
1977 (source (origin
1978 (method git-fetch)
1979 (uri (git-reference
1980 (url "https://github.com/sporkmonger/rack-mount")
1981 (commit commit)))
1982 (file-name (git-file-name name version))
1983 (sha256
1984 (base32
1985 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1986 (build-system ruby-build-system)
1987 (arguments
1988 ;; Tests currently fail so disable them.
1989 ;; https://github.com/sporkmonger/rack-mount/pull/1
1990 `(#:tests? #f))
1991 (propagated-inputs (list ruby-rack))
1992 (synopsis "Stackable dynamic tree based Rack router")
1993 (description
1994 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1995 continue trying routes if the response returns pass. This allows multiple
1996 routes to be nested or stacked on top of each other.")
1997 (home-page "https://github.com/sporkmonger/rack-mount")
1998 (license license:expat))))
1999
2000 (define-public ruby-ci-reporter
2001 (package
2002 (name "ruby-ci-reporter")
2003 (version "2.0.0")
2004 (source (origin
2005 (method url-fetch)
2006 (uri (rubygems-uri "ci_reporter" version))
2007 (sha256
2008 (base32
2009 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
2010 (build-system ruby-build-system)
2011 (arguments
2012 `(#:test-target "rspec"))
2013 (propagated-inputs
2014 (list ruby-builder))
2015 (native-inputs
2016 (list bundler ruby-rspec))
2017 (synopsis "Generate XML reports of runs test")
2018 (description
2019 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2020 you to generate XML reports of your test runs. The resulting files can be
2021 read by a continuous integration system that understands Ant's JUnit report
2022 format.")
2023 (home-page "https://github.com/nicksieger/ci_reporter")
2024 (license license:expat)))
2025
2026 (define-public ruby-contracts
2027 (package
2028 (name "ruby-contracts")
2029 (version "0.16.0")
2030 (source
2031 (origin
2032 (method url-fetch)
2033 (uri (rubygems-uri "contracts" version))
2034 (sha256
2035 (base32
2036 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
2037 (build-system ruby-build-system)
2038 (arguments
2039 '(#:test-target "spec"
2040 #:phases
2041 (modify-phases %standard-phases
2042 ;; Don't run or require rubocop, the code linting tool, as this is a
2043 ;; bit unnecessary.
2044 (add-after 'unpack 'dont-run-rubocop
2045 (lambda _
2046 (substitute* "Rakefile"
2047 ((".*rubocop.*") "")
2048 ((".*RuboCop.*") ""))
2049 #t)))))
2050 (native-inputs
2051 (list ruby-rspec))
2052 (synopsis "Method contracts for Ruby")
2053 (description
2054 "This library provides contracts for Ruby. A contract describes the
2055 correct inputs and output for a method, and will raise an error if a incorrect
2056 value is found.")
2057 (home-page "https://github.com/egonSchiele/contracts.ruby")
2058 (license license:bsd-2)))
2059
2060 (define-public ruby-crack
2061 (package
2062 (name "ruby-crack")
2063 (version "0.4.5")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (rubygems-uri "crack" version))
2068 (sha256
2069 (base32
2070 "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
2071 (build-system ruby-build-system)
2072 (arguments
2073 `(#:phases
2074 (modify-phases %standard-phases
2075 (replace 'check
2076 (lambda* (#:key tests? #:allow-other-keys)
2077 (when tests?
2078 (for-each (lambda (file)
2079 (display file)(display "\n")
2080 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2081 (find-files "test" ".*rb$")))
2082 #t)))))
2083 (synopsis "Simple JSON and XML parsing for Ruby")
2084 (description
2085 "@code{crack} provides really simple JSON and XML parsing, extracted from
2086 code in Merb and Rails.")
2087 (home-page "https://github.com/jnunemaker/crack")
2088 (license license:expat)))
2089
2090 (define-public ruby-cliver
2091 (package
2092 (name "ruby-cliver")
2093 (version "0.3.2")
2094 (source
2095 (origin
2096 (method url-fetch)
2097 (uri (rubygems-uri "cliver" version))
2098 (sha256
2099 (base32
2100 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2101 (build-system ruby-build-system)
2102 (arguments
2103 '(#:phases
2104 (modify-phases %standard-phases
2105 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2106 ;; would be nice, but the tests look to be incompatible:
2107 ;;
2108 ;; NoMethodError: undefined method `last_comment'
2109 (replace 'check
2110 (lambda* (#:key tests? #:allow-other-keys)
2111 (when tests?
2112 (invoke "rspec"))
2113 #t)))))
2114 (native-inputs
2115 (list bundler ruby-rspec-2))
2116 (synopsis "Assertions for command-line dependencies in Ruby")
2117 (description
2118 "@code{cliver} provides a way to detect missing command-line
2119 dependencies, including versions.")
2120 (home-page "https://github.com/yaauie/cliver")
2121 (license license:expat)))
2122
2123 (define-public ruby-czmq-ffi-gen
2124 (package
2125 (name "ruby-czmq-ffi-gen")
2126 (version "0.13.0")
2127 (source
2128 (origin
2129 (method url-fetch)
2130 (uri (rubygems-uri "czmq-ffi-gen" version))
2131 (sha256
2132 (base32
2133 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2134 (build-system ruby-build-system)
2135 (arguments
2136 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2137 #:phases
2138 (modify-phases %standard-phases
2139 (add-after 'unpack 'patch-lib_dirs
2140 (lambda* (#:key inputs #:allow-other-keys)
2141 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2142 (("lib\\_dirs = \\[.*\\]")
2143 (string-append "lib_dirs = ['"
2144 (assoc-ref inputs "czmq") "/lib"
2145 "']")))
2146 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2147 (("lib\\_dirs = \\[.*\\]")
2148 (string-append "lib_dirs = ['"
2149 (assoc-ref inputs "zeromq") "/lib"
2150 "']"))))))))
2151 (inputs
2152 (list zeromq czmq))
2153 (propagated-inputs (list ruby-ffi))
2154 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2155 (description
2156 "These Ruby bindings are not intended to be directly used, but rather
2157 used by higher level bindings like those provided by CZTop.")
2158 (home-page
2159 "https://github.com/paddor/czmq-ffi-gen")
2160 (license license:isc)))
2161
2162 (define-public ruby-cztop
2163 (package
2164 (name "ruby-cztop")
2165 (version "0.12.2")
2166 (source
2167 (origin
2168 (method url-fetch)
2169 (uri (rubygems-uri "cztop" version))
2170 (sha256
2171 (base32
2172 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2173 (build-system ruby-build-system)
2174 (arguments
2175 '(#:test-target "spec"
2176 #:phases
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'patch-lib_paths
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (substitute* "lib/cztop/poller/zmq.rb"
2181 (("lib\\_paths = \\[.*\\]")
2182 (string-append "lib_paths = ['"
2183 (assoc-ref inputs "zeromq") "/lib"
2184 "']"))))))))
2185 (native-inputs
2186 (list bundler ruby-rspec))
2187 (inputs
2188 (list zeromq))
2189 (propagated-inputs
2190 (list ruby-czmq-ffi-gen))
2191 (synopsis "CZMQ Ruby bindings")
2192 (description
2193 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2194 CZMQ. The focus of of CZTop is on being easy to use and providing first class
2195 support for security mechanisms.")
2196 (home-page "https://github.com/paddor/cztop")
2197 (license license:isc)))
2198
2199 (define-public ruby-saikuro-treemap
2200 (package
2201 (name "ruby-saikuro-treemap")
2202 (version "0.2.0")
2203 (source (origin
2204 (method url-fetch)
2205 (uri (rubygems-uri "saikuro_treemap" version))
2206 (sha256
2207 (base32
2208 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2209 (build-system ruby-build-system)
2210 ;; Some of the tests fail because the generated JSON has keys in a
2211 ;; different order. This is a problem with the test suite rather than any
2212 ;; of the involved libraries.
2213 (arguments `(#:tests? #f))
2214 (propagated-inputs
2215 (list ruby-json-pure ruby-atoulme-saikuro))
2216 (synopsis "Generate complexity treemap based on saikuro analysis")
2217 (description
2218 "This gem generates a treemap showing the complexity of Ruby code on
2219 which it is run. It uses Saikuro under the covers to analyze Ruby code
2220 complexity.")
2221 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2222 (license license:expat)))
2223
2224 (define-public ruby-oauth2
2225 (package
2226 (name "ruby-oauth2")
2227 (version "1.4.2")
2228 (source
2229 (origin
2230 (method url-fetch)
2231 (uri (rubygems-uri "oauth2" version))
2232 (sha256
2233 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
2234 (build-system ruby-build-system)
2235 (arguments
2236 '(#:tests? #f)) ; no included tests
2237 (propagated-inputs
2238 (list ruby-faraday ruby-jwt ruby-multi-json ruby-multi-xml
2239 ruby-rack))
2240 (synopsis "Ruby wrapper for the OAuth 2.0")
2241 (description
2242 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2243 with a similar style to the original OAuth spec.")
2244 (home-page "https://github.com/oauth-xx/oauth2")
2245 (license license:expat)))
2246
2247 (define-public ruby-omniauth
2248 (package
2249 (name "ruby-omniauth")
2250 (version "2.0.3")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (rubygems-uri "omniauth" version))
2255 (sha256
2256 (base32 "105mzgvmn2kjaacxw01h4wqv33r7hfn5z8fxlkk3jcjar14j71bh"))))
2257 (build-system ruby-build-system)
2258 (propagated-inputs
2259 (list ruby-hashie ruby-rack ruby-rack-protection))
2260 (native-inputs
2261 (list ruby-rspec))
2262 (synopsis "Generalized Rack framework for multiple-provider authentication")
2263 (description
2264 "This package provides a generalized Rack framework for multiple-provider
2265 authentication.")
2266 (home-page "https://github.com/omniauth/omniauth")
2267 (license license:expat)))
2268
2269 (define-public ruby-omniauth-oauth2
2270 (package
2271 (name "ruby-omniauth-oauth2")
2272 (version "1.7.1")
2273 (source
2274 (origin
2275 (method url-fetch)
2276 (uri (rubygems-uri "omniauth-oauth2" version))
2277 (sha256
2278 (base32
2279 "10fr2b58sp7l6nfdvxpbi67374hkrvsf507cvda89jjs0jacy319"))))
2280 (build-system ruby-build-system)
2281 (arguments
2282 '(#:phases
2283 (modify-phases %standard-phases
2284 (add-after 'unpack 'remove-unnecessary-dependencies
2285 (lambda _
2286 ;; The coveralls gem submits coverage information to an online
2287 ;; service, and is unnecessary when running the tests
2288 (substitute* "Gemfile"
2289 ((".*coveralls\"") ""))
2290 (substitute* "spec/helper.rb"
2291 (("require \"coveralls\"") "")
2292 (("Coveralls::SimpleCov::Formatter") ""))
2293 #t)))))
2294 (propagated-inputs
2295 (list ruby-oauth2 ruby-omniauth))
2296 (native-inputs
2297 (list bundler ruby-rspec ruby-simplecov ruby-rack-test ruby-webmock))
2298 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2299 (description
2300 "This library provides a generic OAuth2 strategy for OmniAuth. It
2301 doesn't provide a way to gather user information, so should be used as a
2302 building block for authentication strategies.")
2303 (home-page "https://github.com/omniauth/omniauth-oauth2")
2304 (license license:expat)))
2305
2306 (define-public ruby-open4
2307 (package
2308 (name "ruby-open4")
2309 (version "1.3.4")
2310 (source
2311 (origin
2312 (method url-fetch)
2313 (uri (rubygems-uri "open4" version))
2314 (sha256
2315 (base32
2316 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2317 (build-system ruby-build-system)
2318 (arguments
2319 '(#:phases
2320 (modify-phases %standard-phases
2321 (add-after 'unpack 'patch
2322 (lambda _
2323 (substitute* "rakefile"
2324 ;; Update the Rakefile so it works
2325 (("-rubygems") "-rrubygems")
2326 (("Config") "RbConfig"))
2327 #t))
2328 (add-before 'check 'set-LIB
2329 (lambda _
2330 ;; This is used in the rakefile when running the tests
2331 (setenv "LIB" "open4")
2332 #t)))))
2333 (synopsis "Open child processes from Ruby and manage them easily")
2334 (description
2335 "@code{Open4} is a Ruby library to run child processes and manage their
2336 input and output.")
2337 (home-page "https://github.com/ahoward/open4")
2338 (license license:ruby)))
2339
2340 (define-public ruby-options
2341 (package
2342 (name "ruby-options")
2343 (version "2.3.2")
2344 (source
2345 (origin
2346 (method url-fetch)
2347 (uri (rubygems-uri "options" version))
2348 (sha256
2349 (base32
2350 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2351 (build-system ruby-build-system)
2352 (arguments
2353 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2354 #:phases
2355 (modify-phases %standard-phases
2356 (add-before 'check 'set-LIB
2357 (lambda _
2358 ;; This is used in the Rakefile, and setting it avoids an issue
2359 ;; with running the tests.
2360 (setenv "LIB" "options")
2361 #t)))))
2362 (synopsis "Ruby library to parse options from *args cleanly")
2363 (description
2364 "The @code{options} library helps with parsing keyword options in Ruby
2365 functions.")
2366 (home-page "https://github.com/ahoward/options")
2367 (license license:ruby)))
2368
2369 (define-public ruby-erubi
2370 (package
2371 (name "ruby-erubi")
2372 (version "1.8.0")
2373 (source
2374 (origin
2375 (method url-fetch)
2376 (uri (rubygems-uri "erubi" version))
2377 (sha256
2378 (base32
2379 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2380 (build-system ruby-build-system)
2381 (synopsis "ERB template engine for Ruby")
2382 (description
2383 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2384 Erubis")
2385 (home-page "https://github.com/jeremyevans/erubi")
2386 (license license:expat)))
2387
2388 (define-public ruby-erubis
2389 (package
2390 (name "ruby-erubis")
2391 (version "2.7.0")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (rubygems-uri "erubis" version))
2396 (sha256
2397 (base32
2398 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2399 (build-system ruby-build-system)
2400 (arguments
2401 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2402 (synopsis "Implementation of embedded Ruby (eRuby)")
2403 (description
2404 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2405 features such as multi-language support, auto escaping, auto trimming spaces
2406 around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2407 support.")
2408 (home-page "http://www.kuwata-lab.com/erubis/")
2409 (license license:expat)))
2410
2411 (define-public ruby-ethon
2412 (package
2413 (name "ruby-ethon")
2414 (version "0.12.0")
2415 (source
2416 (origin
2417 (method url-fetch)
2418 (uri (rubygems-uri "ethon" version))
2419 (sha256
2420 (base32
2421 "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
2422 (build-system ruby-build-system)
2423 (arguments
2424 `(#:tests? #f)) ; no included tests
2425 (inputs
2426 (list curl))
2427 (propagated-inputs
2428 (list ruby-ffi))
2429 (synopsis "Very lightweight @code{libcurl} wrapper")
2430 (description
2431 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
2432 (home-page "https://github.com/typhoeus/ethon")
2433 (license license:expat)))
2434
2435 (define-public ruby-execjs
2436 (package
2437 (name "ruby-execjs")
2438 (version "2.7.0")
2439 (source
2440 (origin
2441 ;; fetch from github as the gem does not contain testing code
2442 (method git-fetch)
2443 (uri (git-reference
2444 (url "https://github.com/rails/execjs")
2445 (commit (string-append "v" version))))
2446 (file-name (git-file-name name version))
2447 (sha256
2448 (base32
2449 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
2450 (build-system ruby-build-system)
2451 (native-inputs
2452 (list bundler
2453 ;; The test suite tests all the available backends. Currenly, this just
2454 ;; means the node backend.
2455 ;;
2456 ;; PASSED: test:node
2457 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
2458 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
2459 node))
2460 (synopsis "Run JavaScript code from Ruby")
2461 (description
2462 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2463 runtime to evaluate your JavaScript program, then returns the result to you as
2464 a Ruby object.")
2465 (home-page "https://github.com/rails/execjs")
2466 (license license:expat)))
2467
2468 (define-public ruby-fakefs
2469 (package
2470 (name "ruby-fakefs")
2471 (version "1.2.2")
2472 (home-page "https://github.com/fakefs/fakefs")
2473 (source (origin
2474 ;; The Rubygems release does not contain tests.
2475 (method git-fetch)
2476 (uri (git-reference
2477 (url home-page)
2478 (commit (string-append "v" version))))
2479 (file-name (git-file-name name version))
2480 (sha256
2481 (base32
2482 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2483 (build-system ruby-build-system)
2484 (arguments
2485 '(#:phases (modify-phases %standard-phases
2486 (replace 'replace-git-ls-files
2487 (lambda _
2488 (substitute* "fakefs.gemspec"
2489 (("`git ls-files lib README.md LICENSE`")
2490 "`find lib README.md LICENSE -type f | sort`"))
2491 #t))
2492 (add-before 'check 'remove-version-constraints
2493 (lambda _
2494 ;; Drop hard version requirements for test dependencies.
2495 (substitute* "fakefs.gemspec"
2496 (("(.*add_development_dependency .*), .*" _ dep)
2497 (string-append dep "\n")))
2498 #t)))))
2499 (native-inputs
2500 (list ruby-bump ruby-maxitest ruby-rubocop ruby-rspec))
2501 (synopsis "Fake file system for Ruby")
2502 (description
2503 "This package provides a fake file system for use in test suites. It
2504 avoids the need for manually creating temporary directories, or dealing
2505 with platform intricacies in @code{File} and @code{FileUtils}.")
2506 (license license:expat)))
2507
2508 (define-public ruby-orderedhash
2509 (package
2510 (name "ruby-orderedhash")
2511 (version "0.0.6")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (rubygems-uri "orderedhash" version))
2515 (sha256
2516 (base32
2517 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2518 (build-system ruby-build-system)
2519 (arguments
2520 '(#:tests? #f)) ; no test suite
2521 (synopsis "Ruby library providing an order-preserving hash")
2522 (description "Orderedhash is a Ruby library providing a hash
2523 implementation that preserves the order of items and features some array-like
2524 extensions.")
2525 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2526 (license license:public-domain)))
2527
2528 (define-public ruby-libxml
2529 (package
2530 (name "ruby-libxml")
2531 (version "3.0.0")
2532 (source
2533 (origin
2534 (method url-fetch)
2535 (uri (rubygems-uri "libxml-ruby" version))
2536 (sha256
2537 (base32
2538 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
2539 (build-system ruby-build-system)
2540 (inputs
2541 (list zlib libxml2))
2542 (arguments
2543 '(#:tests? #f ; test suite hangs for unknown reason
2544 #:gem-flags
2545 (list "--no-document" ; TODO: Re-enable when documentation
2546 ; generation works
2547 "--"
2548 (string-append "--with-xml2-include="
2549 (assoc-ref %build-inputs "libxml2")
2550 "/include/libxml2" ))))
2551 (synopsis "Ruby bindings for GNOME Libxml2")
2552 (description "The Libxml-Ruby project provides Ruby language bindings for
2553 the GNOME Libxml2 XML toolkit.")
2554 (home-page "https://xml4r.github.com/libxml-ruby")
2555 (license license:expat)))
2556
2557 (define-public ruby-lino
2558 (package
2559 (name "ruby-lino")
2560 (version "1.1.0")
2561 (source
2562 (origin
2563 (method url-fetch)
2564 (uri (rubygems-uri "lino" version))
2565 (sha256
2566 (base32
2567 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2568 (build-system ruby-build-system)
2569 (arguments
2570 '(#:tests? #f)) ; No included tests
2571 (propagated-inputs
2572 (list ruby-hamster ruby-open4))
2573 (synopsis "Build and execute commands in Ruby")
2574 (description
2575 "@code{Lino} provides an interface to run external commands. It provides
2576 an interface to add options as well as managing the standard input, output and
2577 error streams.")
2578 (home-page "https://github.com/tobyclemson/lino")
2579 (license license:expat)))
2580
2581 (define-public ruby-xml-simple
2582 (package
2583 (name "ruby-xml-simple")
2584 (version "1.1.5")
2585 (source (origin
2586 (method url-fetch)
2587 (uri (rubygems-uri "xml-simple" version))
2588 (sha256
2589 (base32
2590 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2591 (build-system ruby-build-system)
2592 (arguments
2593 '(#:tests? #f)) ; no test suite
2594 (synopsis "Simple Ruby library for XML processing")
2595 (description "This library provides a simple API for XML processing in
2596 Ruby.")
2597 (home-page "https://github.com/maik/xml-simple")
2598 (license license:ruby)))
2599
2600 (define-public ruby-thor
2601 (package
2602 (name "ruby-thor")
2603 (version "1.0.1")
2604 (source (origin
2605 ;; Pull from git because the gem has no tests.
2606 (method git-fetch)
2607 (uri (git-reference
2608 (url "https://github.com/erikhuda/thor")
2609 (commit (string-append "v" version))))
2610 (file-name (git-file-name name version))
2611 (sha256
2612 (base32
2613 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2614 (build-system ruby-build-system)
2615 (arguments
2616 '(#:phases (modify-phases %standard-phases
2617 (add-after 'unpack 'fix-readline-tests
2618 (lambda _
2619 ;; Ensure Readline is initialized before running the
2620 ;; test to avoid a type clash with the mock ::Readline.
2621 ;; See <https://github.com/erikhuda/thor/pull/717>.
2622 (substitute* "spec/line_editor/readline_spec.rb"
2623 (("unless defined\\? ::Readline" all)
2624 (string-append "Thor::LineEditor::Readline.available?\n"
2625 all)))
2626 #t))
2627 (add-after 'unpack 'remove-coveralls-dependency
2628 (lambda _
2629 ;; Do not hook the test suite into the online
2630 ;; coveralls service.
2631 (substitute* "Gemfile"
2632 ((".*coveralls.*") ""))
2633 (substitute* "spec/helper.rb"
2634 (("require \"coveralls\"") "")
2635 (("Coveralls::SimpleCov::Formatter") "")
2636 ;; Also drop the WebMock dependency which is only
2637 ;; present to allow a coveralls.io connection, and
2638 ;; would otherwise introduce a circular dependency.
2639 (("require \"webmock/rspec\"") "")
2640 (("WebMock\\.disable_net_connect.*") ""))
2641 #t))
2642 (add-after 'unpack 'disable-network-tests
2643 (lambda _
2644 ;; These tests attempt to look up example.com.
2645 (substitute* "spec/actions/file_manipulation_spec.rb"
2646 (("it \"accepts (https?) remote sources" _ proto)
2647 (string-append "xit \"accepts " proto " remote sources")))
2648 #t))
2649 (add-after 'unpack 'disable-quality-tests
2650 (lambda _
2651 ;; These tests attempt to check the git repository for
2652 ;; tabs vs spaces, double vs single quotes, etc, and
2653 ;; depend on the git checkout.
2654 (delete-file "spec/quality_spec.rb")
2655 #t))
2656 (add-before 'check 'make-files-writable
2657 (lambda _
2658 ;; The tests needs rw access to the test suite.
2659 (for-each make-file-writable (find-files "spec"))
2660 #t))
2661 (replace 'check
2662 (lambda _
2663 (invoke "rspec" "spec"))))))
2664 (native-inputs
2665 (list ruby-rspec ruby-simplecov))
2666 (synopsis "Ruby toolkit for building command-line interfaces")
2667 (description "Thor is a toolkit for building powerful command-line
2668 interfaces.")
2669 (home-page "http://whatisthor.com/")
2670 (license license:expat)))
2671
2672 (define-public ruby-lumberjack
2673 (package
2674 (name "ruby-lumberjack")
2675 (version "1.0.13")
2676 (source (origin
2677 (method url-fetch)
2678 (uri (rubygems-uri "lumberjack" version))
2679 (sha256
2680 (base32
2681 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
2682 (build-system ruby-build-system)
2683 (native-inputs
2684 (list ruby-rspec ruby-timecop))
2685 (synopsis "Logging utility library for Ruby")
2686 (description "Lumberjack is a simple logging utility that can be a drop in
2687 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2688 for automatically rolling log files even with multiple processes writing the
2689 same log file.")
2690 (home-page "https://github.com/bdurand/lumberjack")
2691 (license license:expat)))
2692
2693 (define-public ruby-rbnacl
2694 (package
2695 (name "ruby-rbnacl")
2696 (version "6.0.1")
2697 (source
2698 (origin
2699 (method url-fetch)
2700 (uri (rubygems-uri "rbnacl" version))
2701 (sha256
2702 (base32
2703 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2704 (build-system ruby-build-system)
2705 (arguments
2706 `(#:phases
2707 (modify-phases %standard-phases
2708 (add-after 'unpack 'remove-unnecessary-dependencies
2709 (lambda _
2710 ;; Coveralls relates to a network service, and Rubocop to code
2711 ;; linting and both are unnecessary to run the tests
2712 (substitute* "Gemfile"
2713 ((".*rubocop.*") "\n")
2714 ((".*guard-rspec.*") "\n")
2715 ((".*coveralls.*") "\n"))
2716 (substitute* "spec/spec_helper.rb"
2717 (("require \"coveralls\"") "")
2718 (("Coveralls.wear!") ""))
2719 #t))
2720 (add-after 'unpack 'use-libsodium-from-store
2721 (lambda* (#:key inputs #:allow-other-keys)
2722 (substitute* '("lib/rbnacl/init.rb"
2723 "lib/rbnacl/sodium.rb")
2724 (("ffi_lib \\[.+\\]")
2725 (string-append "ffi_lib [\""
2726 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2727 "\"]")))
2728 #t))
2729 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2730 (replace 'check
2731 (lambda* (#:key tests? #:allow-other-keys)
2732 (when tests?
2733 (invoke "rspec"))
2734 #t)))))
2735 (propagated-inputs
2736 (list ruby-ffi))
2737 (inputs
2738 (list libsodium))
2739 (native-inputs
2740 (list bundler ruby-rspec))
2741 (synopsis "Ruby FFI binding to libsodium")
2742 (description
2743 "This package provides Ruby FFI bindings to the Networking and
2744 Cryptography (NaCl) library, also known as libsodium. This provides a
2745 high-level toolkit for building cryptographic systems and protocols.")
2746 (home-page "https://github.com/crypto-rb/rbnacl")
2747 (license license:expat)))
2748
2749 (define-public ruby-hkdf
2750 (package
2751 (name "ruby-hkdf")
2752 (version "1.0.0")
2753 (source
2754 (origin
2755 (method git-fetch)
2756 (uri (git-reference
2757 (url "https://github.com/jtdowney/hkdf")
2758 (commit (string-append "v" version))))
2759 (file-name (git-file-name name version))
2760 (sha256
2761 (base32
2762 "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
2763 (build-system ruby-build-system)
2764 (arguments
2765 `(#:test-target "default"))
2766 (native-inputs
2767 (list ruby-rspec))
2768 (synopsis "HMAC-based Key Derivation Function")
2769 (description
2770 "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
2771 HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
2772 take some source key material and generate suitable cryptographic keys from it.")
2773 (home-page "https://github.com/jtdowney/hkdf")
2774 (license license:expat)))
2775
2776 (define-public ruby-nenv
2777 (package
2778 (name "ruby-nenv")
2779 (version "0.3.0")
2780 (source (origin
2781 (method url-fetch)
2782 (uri (rubygems-uri "nenv" version))
2783 (sha256
2784 (base32
2785 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
2786 (build-system ruby-build-system)
2787 (arguments
2788 `(#:tests? #f)) ; no tests included
2789 (native-inputs
2790 (list ruby-rspec bundler))
2791 (synopsis "Ruby interface for modifying the environment")
2792 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2793 and inspect the environment.")
2794 (home-page "https://github.com/e2/nenv")
2795 (license license:expat)))
2796
2797 (define-public ruby-ptools
2798 (package
2799 (name "ruby-ptools")
2800 (version "1.3.5")
2801 (source (origin
2802 (method url-fetch)
2803 (uri (rubygems-uri "ptools" version))
2804 (sha256
2805 (base32
2806 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2807 (build-system ruby-build-system)
2808 (arguments
2809 '(#:phases (modify-phases %standard-phases
2810 (add-after 'unpack 'patch-/bin/ls
2811 (lambda _
2812 (substitute* "test/test_binary.rb"
2813 (("/bin/ls")
2814 (which "ls")))
2815 #t))
2816 (add-before 'install 'create-gem
2817 (lambda _
2818 ;; Do not attempt to sign the gem.
2819 (substitute* "Rakefile"
2820 (("spec\\.signing_key = .*")
2821 ""))
2822 (invoke "rake" "gem:create"))))))
2823 (synopsis "Extra methods for Ruby's @code{File} class")
2824 (description
2825 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2826 class with many additional methods modelled after common POSIX tools, such as
2827 @code{File.which} for finding executables, @code{File.tail} to print the last
2828 lines of a file, @code{File.wc} to count words, and so on.")
2829 (home-page "https://github.com/djberg96/ptools")
2830 (license license:artistic2.0)))
2831
2832 (define-public ruby-permutation
2833 (package
2834 (name "ruby-permutation")
2835 (version "0.1.8")
2836 (source (origin
2837 (method url-fetch)
2838 (uri (rubygems-uri "permutation" version))
2839 (sha256
2840 (base32
2841 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2842 (build-system ruby-build-system)
2843 (arguments
2844 `(#:phases
2845 (modify-phases %standard-phases
2846 (add-after 'unpack 'fix-rakefile
2847 (lambda _
2848 (substitute* "Rakefile"
2849 (("require 'rake/gempackagetask'")
2850 "require 'rubygems/package_task'")
2851 (("include Config") ""))
2852 #t))
2853 (replace 'check
2854 (lambda _
2855 (invoke "ruby" "-Ilib" "test/test.rb"))))))
2856 (synopsis "Library to perform operations with sequence permutations")
2857 (description "This package provides a Ruby library to perform different
2858 operations with permutations of sequences, such as strings and arrays.")
2859 (home-page "https://flori.github.io/permutation")
2860 (license license:gpl2))) ; GPL 2 only
2861
2862 (define-public ruby-shellany
2863 (package
2864 (name "ruby-shellany")
2865 (version "0.0.1")
2866 (source (origin
2867 (method url-fetch)
2868 (uri (rubygems-uri "shellany" version))
2869 (sha256
2870 (base32
2871 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2872 (build-system ruby-build-system)
2873 (arguments
2874 `(#:test-target "default"
2875 #:phases
2876 (modify-phases %standard-phases
2877 (add-after 'unpack 'fix-version-test
2878 (lambda _
2879 (substitute* "spec/shellany_spec.rb"
2880 (("^RSpec") "require \"shellany\"\nRSpec"))
2881 #t)))))
2882 (native-inputs
2883 (list ruby-rspec ruby-nenv bundler))
2884 (synopsis "Capture command output")
2885 (description "Shellany is a Ruby library providing functions to capture
2886 the output produced by running shell commands.")
2887 (home-page "https://rubygems.org/gems/shellany")
2888 (license license:expat)))
2889
2890 (define-public ruby-notiffany
2891 (package
2892 (name "ruby-notiffany")
2893 (version "0.1.3")
2894 (source (origin
2895 (method url-fetch)
2896 (uri (rubygems-uri "notiffany" version))
2897 (sha256
2898 (base32
2899 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
2900 (build-system ruby-build-system)
2901 ;; Tests are not included in the gem.
2902 (arguments `(#:tests? #f))
2903 (propagated-inputs
2904 (list ruby-shellany ruby-nenv))
2905 (native-inputs
2906 (list bundler))
2907 (synopsis "Wrapper library for notification libraries")
2908 (description "Notiffany is a Ruby wrapper library for notification
2909 libraries such as Libnotify.")
2910 (home-page "https://github.com/guard/notiffany")
2911 (license license:expat)))
2912
2913 (define-public ruby-forking-test-runner
2914 (package
2915 (name "ruby-forking-test-runner")
2916 (version "1.6.0")
2917 (home-page "https://github.com/grosser/forking_test_runner")
2918 (source (origin
2919 (method git-fetch)
2920 (uri (git-reference (url home-page)
2921 (commit (string-append "v" version))))
2922 (file-name (git-file-name name version))
2923 (sha256
2924 (base32
2925 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2926 (build-system ruby-build-system)
2927 (arguments
2928 '(#:test-target "spec"
2929 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2930 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2931 #:tests? #f
2932 #:phases (modify-phases %standard-phases
2933 (replace 'replace-git-ls-files
2934 (lambda _
2935 (substitute* "forking_test_runner.gemspec"
2936 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2937 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2938 #t))
2939 (add-before 'check 'remove-version-constraints
2940 (lambda _
2941 ;; Ignore hard coded version constraints for the tests.
2942 (delete-file "Gemfile.lock")
2943 #t))
2944 (add-before 'check 'set-HOME
2945 (lambda _
2946 ;; Many tests invoke Bundler, and fails when Bundler
2947 ;; warns that /homeless-shelter does not exist.
2948 (setenv "HOME" "/tmp")
2949 #t)))))
2950 (native-inputs
2951 (list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
2952 (propagated-inputs
2953 (list ruby-parallel-tests))
2954 (synopsis "Run every test in a fork")
2955 (description
2956 "This package is a wrapper around @code{parallel_tests} that runs every
2957 test in a fork to avoid pollution and get clean output per test.")
2958 (license license:expat)))
2959
2960 (define-public ruby-formatador
2961 (package
2962 (name "ruby-formatador")
2963 (version "0.2.5")
2964 (source (origin
2965 (method url-fetch)
2966 (uri (rubygems-uri "formatador" version))
2967 (sha256
2968 (base32
2969 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2970 (build-system ruby-build-system)
2971 ;; Circular dependency: Tests require ruby-shindo, which requires
2972 ;; ruby-formatador at runtime.
2973 (arguments `(#:tests? #f))
2974 (synopsis "Ruby library to format text on stdout")
2975 (description "Formatador is a Ruby library to format text printed to the
2976 standard output stream.")
2977 (home-page "https://github.com/geemus/formatador")
2978 (license license:expat)))
2979
2980 (define-public ruby-fuubar
2981 (package
2982 (name "ruby-fuubar")
2983 (version "2.3.2")
2984 (source
2985 (origin
2986 ;; Fetch from the git repository, as the gem package doesn't include
2987 ;; the tests.
2988 (method git-fetch)
2989 (uri (git-reference
2990 (url "https://github.com/thekompanee/fuubar")
2991 (commit (string-append "releases/v" version))))
2992 (file-name (git-file-name name version))
2993 (sha256
2994 (base32
2995 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2996 (build-system ruby-build-system)
2997 (arguments
2998 '(;; TODO: Some tests fail, unsure why.
2999 ;; 21 examples, 7 failures
3000 #:tests? #f
3001 #:phases
3002 (modify-phases %standard-phases
3003 (add-before 'build 'delete-certificate
3004 (lambda _
3005 ;; Remove 's.cert_chain' as we do not build with a private key
3006 (substitute* "fuubar.gemspec"
3007 ((".*cert_chain.*") "")
3008 ((".*signing_key.*") ""))
3009 #t))
3010 (replace 'check
3011 (lambda* (#:key tests? #:allow-other-keys)
3012 (when tests?
3013 (invoke "rspec"))
3014 #t)))))
3015 (native-inputs
3016 (list bundler))
3017 (propagated-inputs
3018 (list ruby-rspec-core ruby-progressbar))
3019 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
3020 (description
3021 "Fuubar is an RSpec formatter that uses a progress bar instead of a
3022 string of letters and dots as feedback. It also stops on the first test
3023 failure.")
3024 (home-page "https://github.com/thekompanee/fuubar")
3025 (license license:expat)))
3026
3027 (define-public ruby-haml
3028 (package
3029 (name "ruby-haml")
3030 (version "5.0.4")
3031 (source
3032 (origin
3033 (method url-fetch)
3034 (uri (rubygems-uri "haml" version))
3035 (sha256
3036 (base32
3037 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
3038 (build-system ruby-build-system)
3039 (arguments
3040 '(#:tests? #f)) ; No included tests
3041 (propagated-inputs
3042 (list ruby-tilt ruby-temple))
3043 (synopsis "Haml is a Ruby library to generate HTML documents")
3044 (description
3045 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
3046 HTML or XML that is designed to express the structure of documents using
3047 indentation rather than closing tags. It was originally envisioned as a
3048 plugin for Ruby on Rails, but it can function as a stand-alone templating
3049 engine.")
3050 (home-page "https://haml.info/")
3051 (license license:expat)))
3052
3053 (define-public ruby-hamster
3054 (package
3055 (name "ruby-hamster")
3056 (version "3.0.0")
3057 (source
3058 (origin
3059 (method url-fetch)
3060 (uri (rubygems-uri "hamster" version))
3061 (sha256
3062 (base32
3063 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
3064 (build-system ruby-build-system)
3065 (arguments
3066 '(#:phases
3067 (modify-phases %standard-phases
3068 (add-after 'unpack 'remove-unnecessary-dependencies
3069 (lambda _
3070 ;; pry is a debugging tool, and is unnecessary when running the
3071 ;; tests
3072 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
3073 (("require 'pry'") ""))
3074 (substitute* "spec/spec_helper.rb"
3075 (("require \"pry\"") "")
3076 ;; CodeClimate is an online service, and is unnecessary for
3077 ;; running the tests
3078 (("require \"codeclimate-test-reporter\"") "")
3079 (("CodeClimate.*\n") ""))
3080 #t))
3081 ;; No Rakefile is included, so run rspec directly.
3082 (replace 'check
3083 (lambda* (#:key tests? #:allow-other-keys)
3084 (when tests?
3085 (invoke "rspec"))
3086 #t)))))
3087 (propagated-inputs
3088 (list ruby-concurrent))
3089 (native-inputs
3090 (list ruby-rspec))
3091 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
3092 (description
3093 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
3094 @code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
3095 immutable queue or stack).")
3096 (home-page "https://github.com/hamstergem/hamster")
3097 (license license:expat)))
3098
3099 (define-public ruby-hashdiff
3100 (package
3101 (name "ruby-hashdiff")
3102 (version "1.0.1")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (rubygems-uri "hashdiff" version))
3107 (sha256
3108 (base32
3109 "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
3110 (build-system ruby-build-system)
3111 (arguments
3112 '(#:phases
3113 (modify-phases %standard-phases
3114 ;; Run tests directly via rspec to avoid depending on rubocop.
3115 (replace 'check
3116 (lambda* (#:key tests? #:allow-other-keys)
3117 (when tests?
3118 (invoke "rspec"))
3119 #t)))))
3120 (native-inputs
3121 (list bundler ruby-rspec-2))
3122 (synopsis "HashDiff computes the smallest difference between two hashes")
3123 (description
3124 "HashDiff is a Ruby library to compute the smallest difference between
3125 two hashes.")
3126 (home-page "https://github.com/liufengyun/hashdiff")
3127 (license license:expat)))
3128
3129 (define-public ruby-hydra-minimal
3130 ;; No releases yet.
3131 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
3132 (revision "0"))
3133 (package
3134 (name "ruby-hydra-minimal")
3135 (version (git-version "0.0" revision commit))
3136 (home-page "https://github.com/hyphenation/hydra")
3137 (source (origin
3138 (method git-fetch)
3139 (uri (git-reference (url home-page) (commit commit)))
3140 (file-name (git-file-name name version))
3141 ;; byebug is a non-essential debugging utility that brings in
3142 ;; many dependencies.
3143 (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
3144 (sha256
3145 (base32
3146 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3147 (build-system ruby-build-system)
3148 (arguments
3149 ;; Avoid rspec dependency.
3150 '(#:tests? #f))
3151 (synopsis "Ruby hyphenation patterns")
3152 (description
3153 "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
3154 It is a low-dependency variant of ruby-hydra.")
3155 (license license:expat))))
3156
3157 (define-public ruby-hydra
3158 (package
3159 (inherit ruby-hydra-minimal)
3160 (name "ruby-hydra")
3161 (arguments
3162 '(#:phases (modify-phases %standard-phases
3163 (add-after 'unpack 'make-files-writable
3164 (lambda _
3165 (for-each make-file-writable (find-files "."))
3166 #t))
3167 (replace 'check
3168 (lambda _
3169 (invoke "rspec"))))))
3170 (native-inputs
3171 (list ruby-rspec))
3172 (propagated-inputs
3173 (list ruby-byebug))
3174 (description
3175 "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
3176
3177 (define-public ruby-shindo
3178 (package
3179 (name "ruby-shindo")
3180 (version "0.3.8")
3181 (source (origin
3182 (method url-fetch)
3183 (uri (rubygems-uri "shindo" version))
3184 (sha256
3185 (base32
3186 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
3187 (build-system ruby-build-system)
3188 (arguments
3189 `(#:test-target "shindo_tests"
3190 #:phases
3191 (modify-phases %standard-phases
3192 (add-after 'unpack 'fix-tests
3193 (lambda _
3194 (substitute* "tests/tests_helper.rb"
3195 (("-rubygems") ""))
3196 (substitute* "Rakefile"
3197 (("system \"shindo") "system \"./bin/shindo")
3198 ;; This test doesn't work, so we disable it.
3199 (("fail \"The build_error test should fail") "#")
3200 ((" -rubygems") ""))
3201 #t)))))
3202 (propagated-inputs
3203 (list ruby-formatador))
3204 (synopsis "Simple depth first Ruby testing")
3205 (description "Shindo is a simple depth first testing library for Ruby.")
3206 (home-page "https://github.com/geemus/shindo")
3207 (license license:expat)))
3208
3209 (define-public ruby-rubygems-tasks
3210 (package
3211 (name "ruby-rubygems-tasks")
3212 (version "0.2.5")
3213 (source (origin
3214 (method url-fetch)
3215 (uri (rubygems-uri "rubygems-tasks" version))
3216 (sha256
3217 (base32
3218 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
3219 (build-system ruby-build-system)
3220 ;; Tests need Internet access.
3221 (arguments `(#:tests? #f))
3222 (native-inputs
3223 (list ruby-rspec ruby-yard))
3224 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3225 (description "Rubygems-task provides Rake tasks for managing and releasing
3226 Ruby Gems.")
3227 (home-page "https://github.com/postmodern/rubygems-tasks")
3228 (license license:expat)))
3229
3230 (define-public ruby-rubyzip
3231 (package
3232 (name "ruby-rubyzip")
3233 (version "1.2.1")
3234 (source
3235 (origin
3236 (method url-fetch)
3237 (uri (rubygems-uri "rubyzip" version))
3238 (sha256
3239 (base32
3240 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
3241 (build-system ruby-build-system)
3242 (arguments
3243 '(#:phases
3244 (modify-phases %standard-phases
3245 (add-before 'check 'patch-tests
3246 (lambda* (#:key inputs #:allow-other-keys)
3247 (substitute* "test/gentestfiles.rb"
3248 (("/usr/bin/zip")
3249 (string-append
3250 (assoc-ref inputs "zip") "/bin/zip")))
3251 (substitute* "test/input_stream_test.rb"
3252 (("/usr/bin/env ruby") (which "ruby")))
3253 #t)))))
3254 (native-inputs
3255 (list bundler ruby-simplecov zip unzip))
3256 (synopsis "Ruby module is for reading and writing zip files")
3257 (description
3258 "The rubyzip module provides ways to read from and create zip files.")
3259 (home-page "https://github.com/rubyzip/rubyzip")
3260 (license license:bsd-2)))
3261
3262 (define-public ruby-simplecov-html
3263 (package
3264 (name "ruby-simplecov-html")
3265 (version "0.10.2")
3266 (source (origin
3267 (method url-fetch)
3268 (uri (rubygems-uri "simplecov-html" version))
3269 (sha256
3270 (base32
3271 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
3272 (build-system ruby-build-system)
3273 (arguments `(#:tests? #f)) ; there are no tests
3274 (native-inputs
3275 (list bundler))
3276 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3277 (description "This package provides the default HTML formatter for
3278 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3279 (home-page "https://github.com/colszowka/simplecov-html")
3280 (license license:expat)))
3281
3282 (define-public ruby-simplecov
3283 (package
3284 (name "ruby-simplecov")
3285 (version "0.17.1")
3286 (source (origin
3287 (method url-fetch)
3288 (uri (rubygems-uri "simplecov" version))
3289 (sha256
3290 (base32
3291 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
3292 (build-system ruby-build-system)
3293 ;; Simplecov depends on rubocop for code style checking at build time.
3294 ;; Rubocop needs simplecov at build time.
3295 (arguments `(#:tests? #f))
3296 (propagated-inputs
3297 (list ruby-json ruby-docile ruby-simplecov-html))
3298 (native-inputs
3299 (list bundler))
3300 (synopsis "Code coverage framework for Ruby")
3301 (description "SimpleCov is a code coverage framework for Ruby with a
3302 powerful configuration library and automatic merging of coverage across test
3303 suites.")
3304 (home-page "https://github.com/colszowka/simplecov")
3305 (license license:expat)))
3306
3307 (define-public ruby-useragent
3308 (package
3309 (name "ruby-useragent")
3310 (version "0.16.10")
3311 (source (origin
3312 (method url-fetch)
3313 (uri (rubygems-uri "useragent" version))
3314 (sha256
3315 (base32
3316 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
3317 (build-system ruby-build-system)
3318 (arguments
3319 '(#:tests? #f)) ; no test suite
3320 (synopsis "HTTP user agent parser for Ruby")
3321 (description "UserAgent is a Ruby library that parses and compares HTTP
3322 User Agents.")
3323 (home-page "https://github.com/gshutler/useragent")
3324 (license license:expat)))
3325
3326 (define-public ruby-backports
3327 (package
3328 (name "ruby-backports")
3329 (version "3.11.4")
3330 (source
3331 (origin
3332 (method url-fetch)
3333 (uri (rubygems-uri "backports" version))
3334 (sha256
3335 (base32
3336 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
3337 (build-system ruby-build-system)
3338 (arguments
3339 '(;; TODO: This should be default, but there is one test failure
3340 #:test-target "all_spec"))
3341 (native-inputs
3342 (list ruby-mspec ruby-activesupport))
3343 (synopsis "Backports of the features in newer Ruby versions")
3344 (description
3345 "Backports enables more compatibility across Ruby versions by providing
3346 backports of some features.")
3347 (home-page "https://github.com/marcandre/backports")
3348 (license license:expat)))
3349
3350 (define-public ruby-bacon
3351 (package
3352 (name "ruby-bacon")
3353 (version "1.2.0")
3354 (source (origin
3355 (method url-fetch)
3356 (uri (rubygems-uri "bacon" version))
3357 (sha256
3358 (base32
3359 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
3360 (build-system ruby-build-system)
3361 (synopsis "Small RSpec clone")
3362 (description "Bacon is a small RSpec clone providing all essential
3363 features.")
3364 (home-page "https://github.com/chneukirchen/bacon")
3365 (license license:expat)))
3366
3367 (define-public ruby-bacon-bits
3368 (package
3369 (name "ruby-bacon-bits")
3370 (version "0.1.0")
3371 (source
3372 (origin
3373 (method url-fetch)
3374 (uri (rubygems-uri "bacon-bits" version))
3375 (sha256
3376 (base32
3377 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
3378 (build-system ruby-build-system)
3379 (arguments
3380 ;; No tests
3381 '(#:tests? #f))
3382 (propagated-inputs (list ruby-bacon))
3383 (synopsis "Extensions to Bacon, for disabling tests, before and after
3384 blocks and more")
3385 (description
3386 "This extends the bacon testing framework with useful extensions to
3387 disable tests, have before and after blocks that run once and more.")
3388 (home-page "https://github.com/cldwalker/bacon-bits")
3389 (license license:expat)))
3390
3391 (define-public ruby-bacon-colored-output
3392 (package
3393 (name "ruby-bacon-colored-output")
3394 (version "1.1.1")
3395 (source
3396 (origin
3397 (method url-fetch)
3398 (uri (rubygems-uri "bacon-colored_output" version))
3399 (sha256
3400 (base32
3401 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
3402 (build-system ruby-build-system)
3403 (arguments
3404 '(;; No included tests
3405 #:tests? #f))
3406 (propagated-inputs
3407 (list ruby-bacon))
3408 (synopsis "Colored output for Bacon test framework")
3409 (description
3410 "This package adds color through ANSI escape codes to Bacon test
3411 output.")
3412 (home-page "https://github.com/whitequark/bacon-colored_output")
3413 (license license:expat)))
3414
3415 (define-public ruby-connection-pool
3416 (package
3417 (name "ruby-connection-pool")
3418 (version "2.2.2")
3419 (source (origin
3420 (method url-fetch)
3421 (uri (rubygems-uri "connection_pool" version))
3422 (sha256
3423 (base32
3424 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
3425 (build-system ruby-build-system)
3426 (native-inputs
3427 (list bundler))
3428 (synopsis "Generic connection pool for Ruby")
3429 (description "Connection_pool provides a generic connection pooling
3430 interface for Ruby programs.")
3431 (home-page "https://github.com/mperham/connection_pool")
3432 (license license:expat)))
3433
3434 (define-public ruby-fast-gettext
3435 (package
3436 (name "ruby-fast-gettext")
3437 (version "2.0.3")
3438 (home-page "https://github.com/grosser/fast_gettext")
3439 (source (origin
3440 (method git-fetch)
3441 (uri (git-reference (url home-page)
3442 (commit (string-append "v" version))))
3443 (file-name (git-file-name name version))
3444 (sha256
3445 (base32
3446 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
3447 (build-system ruby-build-system)
3448 (arguments
3449 '(#:test-target "spec"
3450 #:phases (modify-phases %standard-phases
3451 (add-before 'check 'remove-version-constraints
3452 (lambda _
3453 (delete-file "Gemfile.lock")
3454 #t))
3455 (add-before 'check 'remove-activerecord-test
3456 (lambda _
3457 ;; FIXME: This test fails because ActiveRecord depends on
3458 ;; a different version of ruby-sqlite than the currently
3459 ;; available one.
3460 (delete-file
3461 "spec/fast_gettext/translation_repository/db_spec.rb")
3462 #t))
3463 (add-before 'check 'disable-i18n-test
3464 (lambda _
3465 ;; XXX: This test checks i18n intricasies with Rails 3 and
3466 ;; automatically disables itself for Rails 4.0, but does
3467 ;; not know about newer versions as it has not been updated
3468 ;; since 2014. Disable for later versions of Rails too.
3469 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
3470 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
3471 "ActiveRecord::VERSION::MINOR == 0"))
3472 "ActiveRecord::VERSION::MAJOR >= 4"))
3473 #t)))))
3474 (native-inputs
3475 (list ;; For tests.
3476 ruby-activerecord
3477 ruby-activesupport
3478 ruby-bump
3479 ruby-forking-test-runner
3480 ruby-i18n
3481 ruby-rubocop
3482 ruby-rspec
3483 ruby-single-cov
3484 ruby-sqlite3
3485 ruby-wwtd))
3486 (synopsis "Fast implementation of @code{GetText}")
3487 (description
3488 "This package provides an alternative implementation of the Ruby
3489 @code{GetText} library that is approximately 12x faster yet thread safe.")
3490 ;; Some parts are covered by the Ruby license, see file headers.
3491 (license (list license:expat license:ruby))))
3492
3493 (define-public ruby-net-http-persistent
3494 (package
3495 (name "ruby-net-http-persistent")
3496 (version "3.0.0")
3497 (source (origin
3498 (method url-fetch)
3499 (uri (rubygems-uri "net-http-persistent" version))
3500 (sha256
3501 (base32
3502 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
3503 (build-system ruby-build-system)
3504 (native-inputs
3505 (list ruby-connection-pool ruby-hoe))
3506 (synopsis "Persistent HTTP connection manager")
3507 (description "Net::HTTP::Persistent manages persistent HTTP connections
3508 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3509 (home-page "https://github.com/drbrain/net-http-persistent")
3510 (license license:expat)))
3511
3512 (define-public ruby-power-assert
3513 (package
3514 (name "ruby-power-assert")
3515 (version "1.1.5")
3516 (source (origin
3517 (method url-fetch)
3518 (uri (rubygems-uri "power_assert" version))
3519 (sha256
3520 (base32
3521 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
3522 (build-system ruby-build-system)
3523 (arguments
3524 '(#:tests? #f)) ; No included tests
3525 (native-inputs
3526 (list bundler))
3527 (synopsis "Assert library with descriptive assertion messages")
3528 (description "Power-assert is an assertion library providing descriptive
3529 assertion messages for tests.")
3530 (home-page "https://github.com/k-tsj/power_assert")
3531 (license (list license:bsd-2 license:ruby))))
3532
3533 (define-public ruby-powerpack
3534 (package
3535 (name "ruby-powerpack")
3536 (version "0.1.2")
3537 (source
3538 (origin
3539 (method url-fetch)
3540 (uri (rubygems-uri "powerpack" version))
3541 (sha256
3542 (base32
3543 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3544 (build-system ruby-build-system)
3545 (arguments
3546 '(#:test-target "spec"))
3547 (native-inputs
3548 (list bundler ruby-rspec ruby-yard))
3549 (synopsis "Useful extensions to core Ruby classes")
3550 (description
3551 "This package provides a few useful extensions to core Ruby classes,
3552 including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3553 @code{String}.")
3554 (home-page "https://github.com/bbatsov/powerpack")
3555 (license license:expat)))
3556
3557 (define-public ruby-locale
3558 (package
3559 (name "ruby-locale")
3560 (version "2.1.2")
3561 (source (origin
3562 (method url-fetch)
3563 (uri (rubygems-uri "locale" version))
3564 (sha256
3565 (base32
3566 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3567 (build-system ruby-build-system)
3568 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3569 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3570 ;; dependency cycle we disable tests.
3571 (arguments `(#:tests? #f))
3572 (native-inputs
3573 (list bundler ruby-yard))
3574 (synopsis "Ruby library providing basic localization APIs")
3575 (description
3576 "Ruby-Locale is the pure ruby library which provides basic APIs for
3577 localization.")
3578 (home-page "https://github.com/ruby-gettext/locale")
3579 (license (list license:lgpl3+ license:ruby))))
3580
3581 (define-public ruby-temple
3582 (package
3583 (name "ruby-temple")
3584 (version "0.8.2")
3585 (source
3586 (origin
3587 (method url-fetch)
3588 (uri (rubygems-uri "temple" version))
3589 (sha256
3590 (base32
3591 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
3592 (build-system ruby-build-system)
3593 (native-inputs
3594 (list ruby-tilt ruby-bacon ruby-erubis))
3595 (synopsis "Template compilation framework in Ruby")
3596 (description
3597 "Temple is an abstraction and framework for compiling templates to pure
3598 Ruby.")
3599 (home-page "https://github.com/judofyr/temple")
3600 (license license:expat)))
3601
3602 (define-public ruby-text
3603 (package
3604 (name "ruby-text")
3605 (version "1.3.1")
3606 (source (origin
3607 (method url-fetch)
3608 (uri (rubygems-uri "text" version))
3609 (sha256
3610 (base32
3611 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3612 (build-system ruby-build-system)
3613 (synopsis "Collection of text algorithms for Ruby")
3614 (description
3615 "This package provides a collection of text algorithms: Levenshtein,
3616 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
3617 (home-page "https://github.com/threedaymonk/text")
3618 (license license:expat)))
3619
3620 (define-public ruby-gettext
3621 (package
3622 (name "ruby-gettext")
3623 (version "3.1.7")
3624 (source (origin
3625 (method url-fetch)
3626 (uri (rubygems-uri "gettext" version))
3627 (sha256
3628 (base32
3629 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3630 (build-system ruby-build-system)
3631 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3632 ;; which needs ruby-gettext. To break the dependency cycle we disable
3633 ;; tests.
3634 (arguments `(#:tests? #f))
3635 (propagated-inputs
3636 (list ruby-locale ruby-text))
3637 (native-inputs
3638 (list bundler ruby-yard))
3639 (synopsis "GNU gettext-like program for Ruby")
3640 (description
3641 "Gettext is a GNU gettext-like program for Ruby. The catalog
3642 file (po-file) used is the same as that used by GNU gettext, allowing you to
3643 use GNU gettext tools for maintenance.")
3644 (home-page "https://ruby-gettext.github.com/")
3645 (license (list license:lgpl3+ license:ruby))))
3646
3647 (define-public ruby-packnga
3648 (package
3649 (name "ruby-packnga")
3650 (version "1.0.4")
3651 (source (origin
3652 (method url-fetch)
3653 (uri (rubygems-uri "packnga" version))
3654 (sha256
3655 (base32
3656 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
3657 (build-system ruby-build-system)
3658 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3659 ;; To break the dependency cycle we disable tests.
3660 (arguments `(#:tests? #f))
3661 (propagated-inputs
3662 (list ruby-gettext ruby-yard))
3663 (native-inputs
3664 (list bundler))
3665 (synopsis "Utility library to package internationalized libraries")
3666 (description
3667 "Packnga is a library to translate to many languages using YARD.")
3668 (home-page "http://ranguba.org/packnga/")
3669 (license license:lgpl2.0+)))
3670
3671 (define-public ruby-test-construct
3672 (package
3673 (name "ruby-test-construct")
3674 (version "2.0.1")
3675 (source
3676 (origin
3677 (method url-fetch)
3678 (uri (rubygems-uri "test_construct" version))
3679 (sha256
3680 (base32
3681 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3682 (build-system ruby-build-system)
3683 (native-inputs
3684 (list bundler ruby-mocha ruby-rspec))
3685 (synopsis "Creates temporary files and directories for testing")
3686 (description
3687 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3688 temporary files and directories during tests.")
3689 (home-page "https://github.com/bhb/test_construct")
3690 (license license:expat)))
3691
3692 (define-public ruby-test-unit
3693 (package
3694 (name "ruby-test-unit")
3695 (version "3.4.4")
3696 (source (origin
3697 (method url-fetch)
3698 (uri (rubygems-uri "test-unit" version))
3699 (sha256
3700 (base32
3701 "15isy7vhppbfd0032klirj9gxp65ygkzjdwrmm28xpirlcsk6qpd"))))
3702 (build-system ruby-build-system)
3703 (propagated-inputs
3704 (list ruby-power-assert))
3705 (native-inputs
3706 (list bundler ruby-packnga ruby-yard))
3707 (synopsis "Unit testing framework for Ruby")
3708 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3709 on xUnit principles. These were originally designed by Kent Beck, creator of
3710 extreme programming software development methodology, for Smalltalk's SUnit.
3711 It allows writing tests, checking results and automated testing in Ruby.")
3712 (home-page "https://test-unit.github.io/")
3713 (license (list license:psfl license:ruby))))
3714
3715 (define-public ruby-markaby
3716 (package
3717 (name "ruby-markaby")
3718 (version "0.9.0")
3719 (source
3720 (origin
3721 (method url-fetch)
3722 (uri (rubygems-uri "markaby" version))
3723 (sha256
3724 (base32
3725 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3726 (build-system ruby-build-system)
3727 (arguments
3728 '(#:phases
3729 (modify-phases %standard-phases
3730 ;; Run rspec manually without using the Rakefile, as the versions of
3731 ;; Rake and RSpec 2 are incompatible:
3732 ;;
3733 ;; NoMethodError: undefined method `last_comment'
3734 (replace 'check
3735 (lambda* (#:key tests? #:allow-other-keys)
3736 (when tests?
3737 (invoke "rspec"))
3738 #t)))))
3739 (propagated-inputs
3740 (list ruby-builder))
3741 (native-inputs
3742 (list bundler ruby-rspec-2))
3743 (synopsis "Write HTML pages in pure Ruby")
3744 (description
3745 "Markaby allows writing HTML packages in pure Ruby. This is similar to
3746 the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
3747 mixture of HTML and additional ERB syntax.")
3748 (home-page "https://markaby.github.io/")
3749 (license license:expat)))
3750
3751 (define-public ruby-maruku
3752 (package
3753 (name "ruby-maruku")
3754 (version "0.7.3")
3755 (source
3756 (origin
3757 (method url-fetch)
3758 (uri (rubygems-uri "maruku" version))
3759 (sha256
3760 (base32
3761 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3762 (build-system ruby-build-system)
3763 (arguments
3764 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3765 #:tests? #f
3766 #:phases
3767 (modify-phases %standard-phases
3768 (replace 'check
3769 (lambda* (#:key tests? #:allow-other-keys)
3770 (when tests?
3771 (invoke "rspec"))
3772 #t)))))
3773 (native-inputs
3774 (list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
3775 (synopsis "Markdown interpreter in Ruby")
3776 (description
3777 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3778 HTML, and PDF through LaTeX.")
3779 (home-page "https://github.com/bhollis/maruku")
3780 (license license:expat)))
3781
3782 (define-public ruby-metaclass
3783 (package
3784 (name "ruby-metaclass")
3785 (version "0.0.4")
3786 (source (origin
3787 (method url-fetch)
3788 (uri (rubygems-uri "metaclass" version))
3789 (sha256
3790 (base32
3791 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3792 (build-system ruby-build-system)
3793 (arguments
3794 `(#:phases
3795 (modify-phases %standard-phases
3796 (add-after 'unpack 'add-test-unit-to-search-path
3797 (lambda* (#:key inputs #:allow-other-keys)
3798 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
3799 (substitute* "Rakefile"
3800 (("t\\.libs << \"test\"" line)
3801 (string-append line "; t.libs << \""
3802 test-unit "/lib/ruby/vendor_ruby"
3803 "/gems/test-unit-"
3804 ,(package-version ruby-test-unit)
3805 "/lib\""))))
3806 #t)))))
3807 (native-inputs
3808 (list bundler ruby-test-unit))
3809 (synopsis "Ruby library adding metaclass method to all objects")
3810 (description
3811 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3812 objects.")
3813 (home-page "https://github.com/floehopper/metaclass")
3814 (license license:expat)))
3815
3816 (define-public ruby-mkmf-lite
3817 (package
3818 (name "ruby-mkmf-lite")
3819 (version "0.3.2")
3820 (source (origin
3821 (method url-fetch)
3822 (uri (rubygems-uri "mkmf-lite" version))
3823 (sha256
3824 (base32
3825 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3826 (build-system ruby-build-system)
3827 (propagated-inputs
3828 (list ruby-ptools))
3829 (synopsis "Lightweight alternative to @code{mkmf}")
3830 (description
3831 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3832 for use as a library. It does not create packages, builds, or log files of
3833 any kind. Instead, it provides mixin methods that you can use in FFI or tests
3834 to check for the presence of header files, constants, and so on.")
3835 (home-page "https://github.com/djberg96/mkmf-lite")
3836 (license license:asl2.0)))
3837
3838 (define-public ruby-mspec
3839 (package
3840 (name "ruby-mspec")
3841 (version "1.9.1")
3842 (source
3843 (origin
3844 (method url-fetch)
3845 (uri (rubygems-uri "mspec" version))
3846 (sha256
3847 (base32
3848 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3849 (build-system ruby-build-system)
3850 (arguments
3851 '(;; TODO: 3 test failures
3852 ;; ./spec/mocks/mock_spec.rb:82
3853 ;; ./spec/utils/name_map_spec.rb:151
3854 ;; ./spec/utils/name_map_spec.rb:155
3855 #:tests? #f
3856 #:phases
3857 (modify-phases %standard-phases
3858 (add-after 'extract-gemspec 'change-dependency-constraints
3859 (lambda _
3860 (substitute* "mspec.gemspec"
3861 (("rake.*") "rake>)\n")
3862 (("rspec.*") "rspec>)\n"))
3863 #t))
3864 (replace 'check
3865 (lambda* (#:key tests? #:allow-other-keys)
3866 (when tests?
3867 (invoke "rspec" "spec"))
3868 #t)))))
3869 (native-inputs
3870 (list bundler ruby-rake ruby-rspec))
3871 (synopsis "MSpec is a specialized framework for RubySpec")
3872 (description
3873 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3874 for basic features. MSpec contains additional features that assist in writing
3875 specs for Ruby implementations in ruby/spec.")
3876 (home-page "http://rubyspec.org")
3877 (license license:expat)))
3878
3879 (define-public ruby-mysql2
3880 (package
3881 (name "ruby-mysql2")
3882 (version "0.5.2")
3883 (source
3884 (origin
3885 (method git-fetch)
3886 (uri (git-reference
3887 (url "https://github.com/brianmario/mysql2")
3888 (commit version)))
3889 (file-name (git-file-name name version))
3890 (sha256
3891 (base32
3892 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3893 (build-system ruby-build-system)
3894 (arguments
3895 '(;; TODO: Tests require a running MySQL/MariaDB service
3896 #:tests? #f
3897 #:phases
3898 (modify-phases %standard-phases
3899 (replace 'replace-git-ls-files
3900 (lambda _
3901 (substitute* "mysql2.gemspec"
3902 (("git ls-files .*`") "find . -type f |sort`"))
3903 #t))
3904 (add-before 'install 'set-MAKEFLAGS
3905 (lambda* (#:key outputs #:allow-other-keys)
3906 (setenv "MAKEFLAGS"
3907 (string-append
3908 "V=1 "
3909 "prefix=" (assoc-ref outputs "out")))
3910 #t))
3911 ;; Move the 'check phase to after 'install, as then you can test
3912 ;; using the installed mysql2 gem in the store.
3913 (delete 'check)
3914 (add-after 'install 'check
3915 (lambda* (#:key outputs tests? #:allow-other-keys)
3916 (setenv "GEM_PATH"
3917 (string-append
3918 (getenv "GEM_PATH")
3919 ":"
3920 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3921 (when tests?
3922 (invoke "rspec"))
3923 #t)))))
3924 (inputs
3925 `(("mariadb-dev" ,mariadb "dev")
3926 ("zlib" ,zlib)))
3927 (native-inputs
3928 (list ruby-rspec ruby-rake-compiler))
3929 (synopsis "MySQL library for Ruby, binding to libmysql")
3930 (description
3931 "This package provides a simple, fast MySQL library for Ruby, binding to
3932 libmysql.")
3933 (home-page "https://github.com/brianmario/mysql2")
3934 (license license:expat)))
3935
3936 (define-public ruby-blankslate
3937 (package
3938 (name "ruby-blankslate")
3939 (version "3.1.3")
3940 (source (origin
3941 (method url-fetch)
3942 (uri (rubygems-uri "blankslate" version))
3943 (sha256
3944 (base32
3945 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3946 (build-system ruby-build-system)
3947 (arguments
3948 `(#:phases
3949 (modify-phases %standard-phases
3950 (replace 'check
3951 (lambda _ (invoke "rspec" "spec/"))))))
3952 (native-inputs
3953 (list bundler ruby-rspec))
3954 (synopsis "Abstract base class with no predefined methods")
3955 (description
3956 "BlankSlate provides an abstract base class with no predefined
3957 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3958 as a base class when writing classes that depend upon
3959 @code{method_missing} (e.g. dynamic proxies).")
3960 (home-page "https://github.com/masover/blankslate")
3961 (license license:expat)))
3962
3963 (define-public ruby-bond
3964 (package
3965 (name "ruby-bond")
3966 (version "0.5.1")
3967 (source
3968 (origin
3969 (method url-fetch)
3970 (uri (rubygems-uri "bond" version))
3971 (sha256
3972 (base32
3973 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3974 (build-system ruby-build-system)
3975 (arguments
3976 ;; The test suite fails (see:
3977 ;; https://github.com/cldwalker/bond/issues/46).
3978 `(#:tests? #f))
3979 (native-inputs
3980 (list ruby-bacon ruby-bacon-bits ruby-mocha-on-bacon))
3981 (synopsis "Bond can provide custom autocompletion for arguments, methods
3982 and more")
3983 (description
3984 "Bond can autocomplete argument(s) to methods, uniquely completing per
3985 module, per method and per argument. Bond provides a configuration system and
3986 a DSL for creating custom completions and completion rules. Bond can also
3987 load completions that ship with gems. Bond is able to offer more than irb's
3988 completion since it uses the full line of input when completing as opposed to
3989 irb's last-word approach.")
3990 (home-page "http://tagaholic.me/bond/")
3991 (license license:expat)))
3992
3993 (define-public ruby-idn-ruby
3994 (package
3995 (name "ruby-idn-ruby")
3996 (version "0.1.0")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (rubygems-uri "idn-ruby" version))
4001 (sha256
4002 (base32
4003 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
4004 (build-system ruby-build-system)
4005 (arguments
4006 '(#:phases
4007 (modify-phases %standard-phases
4008 (delete 'check)
4009 (add-after 'install 'check
4010 (lambda* (#:key tests? outputs #:allow-other-keys)
4011 (when tests?
4012 (let* ((gem-file (cadr (find-files "." "\\.gem")))
4013 (name-and-version (basename gem-file ".gem")))
4014 (apply invoke
4015 "ruby" "--verbose"
4016 (string-append "-I"
4017 (assoc-ref outputs "out")
4018 "/lib/ruby/vendor_ruby/gems/"
4019 name-and-version
4020 "/lib")
4021 (find-files "./test" ".*\\.rb"))))
4022 #t)))))
4023 (inputs
4024 (list libidn))
4025 (synopsis "Ruby Bindings for the GNU LibIDN library")
4026 (description
4027 "Ruby Bindings for the GNU LibIDN library, an implementation of the
4028 Stringprep, Punycode and IDNA specifications. These are used to encode and
4029 decode internationalized domain + names according to the IDNA2003
4030 specifications.
4031
4032 Included are the most important parts of the Stringprep, Punycode and IDNA
4033 APIs like performing Stringprep processings, encoding to and decoding from
4034 Punycode strings and converting entire domain names to and from the ACE
4035 encoded form.")
4036 (home-page "https://github.com/deepfryed/idn-ruby")
4037 (license license:asl2.0)))
4038
4039 (define-public ruby-instantiator
4040 (package
4041 (name "ruby-instantiator")
4042 (version "0.0.7")
4043 (source (origin
4044 (method url-fetch)
4045 (uri (rubygems-uri "instantiator" version))
4046 (sha256
4047 (base32
4048 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
4049 (build-system ruby-build-system)
4050 (arguments
4051 `(#:phases
4052 (modify-phases %standard-phases
4053 (add-after 'unpack 'add-test-unit-to-search-path
4054 (lambda* (#:key inputs #:allow-other-keys)
4055 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
4056 (substitute* "Rakefile"
4057 (("t\\.libs << \"test\"" line)
4058 (string-append line "; t.libs << \""
4059 test-unit "/lib/ruby/vendor_ruby"
4060 "/gems/test-unit-"
4061 ,(package-version ruby-test-unit)
4062 "/lib\""))))
4063 #t)))))
4064 (propagated-inputs
4065 (list ruby-blankslate))
4066 (native-inputs
4067 (list bundler ruby-test-unit))
4068 (synopsis "Instantiate an arbitrary Ruby class")
4069 (description
4070 "Instantiator lets you instantiate an arbitrary Ruby class without
4071 knowing anything about the constructor.")
4072 (home-page "https://github.com/floehopper/instantiator")
4073 (license license:expat)))
4074
4075 (define-public ruby-introspection
4076 (package
4077 (name "ruby-introspection")
4078 (version "0.0.4")
4079 (source (origin
4080 (method url-fetch)
4081 (uri (rubygems-uri "introspection" version))
4082 (sha256
4083 (base32
4084 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
4085 (build-system ruby-build-system)
4086 (arguments
4087 `(#:phases
4088 (modify-phases %standard-phases
4089 (add-after 'unpack 'add-test-unit-to-search-path
4090 (lambda* (#:key inputs #:allow-other-keys)
4091 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
4092 (substitute* "Rakefile"
4093 (("t\\.libs << \"test\"" line)
4094 (string-append line "; t.libs << \""
4095 test-unit "/lib/ruby/vendor_ruby"
4096 "/gems/test-unit-"
4097 ,(package-version ruby-test-unit)
4098 "/lib\""))))
4099 #t)))))
4100 (propagated-inputs
4101 (list ruby-instantiator ruby-metaclass))
4102 (native-inputs
4103 (list bundler ruby-blankslate ruby-test-unit))
4104 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
4105 (description
4106 "Introspection provides tools to inspect the hierarchy of method
4107 definitions on a Ruby object.")
4108 (home-page "https://github.com/floehopper/introspection")
4109 (license license:expat)))
4110
4111 (define-public ruby-redcarpet
4112 (package
4113 (name "ruby-redcarpet")
4114 (version "3.5.0")
4115 (source (origin
4116 (method url-fetch)
4117 (uri (rubygems-uri "redcarpet" version))
4118 (sha256
4119 (base32
4120 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
4121 (build-system ruby-build-system)
4122 (arguments
4123 `(#:phases
4124 (modify-phases %standard-phases
4125 ;; The gem archive does not include the conformance tests.
4126 (add-after 'unpack 'disable-conformance-tests
4127 (lambda _
4128 (substitute* "Rakefile"
4129 (("task :test => %w\\[test:unit test:conformance\\]")
4130 "task :test => %w[test:unit]"))
4131 #t)))))
4132 (native-inputs
4133 (list bundler ruby-test-unit ruby-rake-compiler))
4134 (synopsis "Extensible Markdown to (X)HTML converter")
4135 (description
4136 "Redcarpet is an extensible Ruby library for Markdown processing and
4137 conversion to (X)HTML.")
4138 (home-page "https://github.com/vmg/redcarpet")
4139 (license license:expat)))
4140
4141 (define-public ruby-rerun
4142 (package
4143 (name "ruby-rerun")
4144 (version "0.13.0")
4145 (source
4146 (origin
4147 (method url-fetch)
4148 (uri (rubygems-uri "rerun" version))
4149 (sha256
4150 (base32
4151 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
4152 (build-system ruby-build-system)
4153 (arguments
4154 '(#:tests? #f)) ; No included tests
4155 (propagated-inputs
4156 (list ruby-listen))
4157 (synopsis "Run a process, and restart when some monitored files change")
4158 (description
4159 "Rerun is a tool to launch programs, then monitor the file system, and
4160 restart the program when any of the monitored files change. It's written in
4161 Ruby, but can be used for all programs.")
4162 (home-page "https://github.com/alexch/rerun/")
4163 (license license:expat)))
4164
4165 (define-public ruby-maxitest
4166 (package
4167 (name "ruby-maxitest")
4168 (version "3.6.0")
4169 (home-page "https://github.com/grosser/maxitest")
4170 (source (origin
4171 ;; Pull from git because the gem does not contain tests.
4172 (method git-fetch)
4173 (uri (git-reference
4174 (url home-page)
4175 (commit (string-append "v" version))))
4176 (file-name (git-file-name name version))
4177 (sha256
4178 (base32
4179 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
4180 (build-system ruby-build-system)
4181 (arguments
4182 '(#:test-target "default"
4183 #:phases (modify-phases %standard-phases
4184 (replace 'replace-git-ls-files
4185 (lambda _
4186 (substitute* "maxitest.gemspec"
4187 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
4188 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
4189 #t))
4190 (add-before 'check 'remove-version-constraints
4191 (lambda _
4192 ;; Don't use specific versions of dependencies, instead
4193 ;; take whatever is available in Guix.
4194 (delete-file "Gemfile.lock")
4195 #t))
4196 (add-before 'check 'add-mtest-on-PATH
4197 (lambda _
4198 ;; Tests use 'mtest' which is not automatically added on
4199 ;; PATH.
4200 (setenv "PATH" (string-append (getcwd) "/bin:"
4201 (getenv "PATH")))
4202 #t)))))
4203 (native-inputs
4204 `(("ps" ,procps)
4205 ("ruby-bump" ,ruby-bump)
4206 ("ruby-byebug" ,ruby-byebug)
4207 ("ruby-rspec" ,ruby-rspec)
4208 ("ruby-wwtd" ,ruby-wwtd)))
4209 (propagated-inputs
4210 (list ruby-minitest))
4211 (synopsis "Minitest with extra features")
4212 (description
4213 "Maxitest is a wrapper around Minitest with extra functionality such
4214 as timeouts, an @command{mtest} executable that can run tests by line
4215 number, support for interrupted tests, better backtraces, and more.")
4216 (license license:expat)))
4217
4218 (define-public ruby-mocha
4219 (package
4220 (name "ruby-mocha")
4221 (version "1.13.0")
4222 (source (origin
4223 (method url-fetch)
4224 (uri (rubygems-uri "mocha" version))
4225 (sha256
4226 (base32
4227 "15s53ggsykk69kxqvs4416s8yxdhz6caggva55n8sjgy4ixzwp10"))))
4228 (build-system ruby-build-system)
4229 (arguments
4230 `(#:phases
4231 (modify-phases %standard-phases
4232 (add-before 'check 'remove-rubocop-dependency
4233 (lambda _
4234 ;; Disable dependency on Rubocop, which is just a linter,
4235 ;; and would introduce a circular dependency.
4236 (substitute* "mocha.gemspec"
4237 ((".*rubocop.*")
4238 "true\n"))
4239 #t)))))
4240 (native-inputs
4241 (list ruby-introspection))
4242 (synopsis "Mocking and stubbing library for Ruby")
4243 (description
4244 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
4245 allows mocking and stubbing of methods on real (non-mock) classes.")
4246 (home-page "https://mocha.jamesmead.org/")
4247 ;; Mocha can be used with either license at the users choice.
4248 (license (list license:expat license:ruby))))
4249
4250 (define-public ruby-mocha-on-bacon
4251 (package
4252 (name "ruby-mocha-on-bacon")
4253 (version "0.2.3")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (rubygems-uri "mocha-on-bacon" version))
4258 (sha256
4259 (base32
4260 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
4261 (build-system ruby-build-system)
4262 (arguments
4263 ;; rubygems.org release missing tests
4264 '(#:tests? #f))
4265 (propagated-inputs (list ruby-mocha))
4266 (synopsis "Mocha adapter for Bacon")
4267 (description
4268 "This package provides a Mocha adapter for Bacon, allowing you to use the
4269 Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
4270 (home-page
4271 "https://github.com/alloy/mocha-on-bacon")
4272 (license license:expat)))
4273
4274 (define-public ruby-net-ssh
4275 (package
4276 (name "ruby-net-ssh")
4277 (version "4.2.0")
4278 (source (origin
4279 (method url-fetch)
4280 (uri (rubygems-uri "net-ssh" version))
4281 (sha256
4282 (base32
4283 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
4284 (build-system ruby-build-system)
4285 (native-inputs
4286 (list bundler ruby-mocha ruby-test-unit))
4287 (synopsis "Ruby implementation of the SSH2 client protocol")
4288 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
4289 client protocol. It allows you to write programs that invoke and interact
4290 with processes on remote servers, via SSH2.")
4291 (home-page "https://github.com/net-ssh/net-ssh")
4292 (license license:expat)))
4293
4294 (define-public ruby-net-scp
4295 (package
4296 (name "ruby-net-scp")
4297 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
4298 (version "1.2.2.rc2")
4299 (source
4300 (origin
4301 (method git-fetch)
4302 (uri (git-reference
4303 (url "https://github.com/net-ssh/net-scp")
4304 (commit (string-append "v" version))))
4305 (file-name (git-file-name name version))
4306 (sha256
4307 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
4308 (build-system ruby-build-system)
4309 (native-inputs
4310 (list bundler ruby-test-unit ruby-mocha))
4311 (propagated-inputs
4312 (list ruby-net-ssh))
4313 (synopsis "Pure-Ruby SCP client library")
4314 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
4315 client protocol.")
4316 (home-page "https://github.com/net-ssh/net-scp")
4317 (license license:expat)))
4318
4319 (define-public ruby-minitest
4320 (package
4321 (name "ruby-minitest")
4322 (version "5.14.4")
4323 (source (origin
4324 (method url-fetch)
4325 (uri (rubygems-uri "minitest" version))
4326 (sha256
4327 (base32
4328 "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"))))
4329 (build-system ruby-build-system)
4330 (native-inputs
4331 (list ruby-hoe))
4332 (synopsis "Small test suite library for Ruby")
4333 (description "Minitest provides a complete suite of Ruby testing
4334 facilities supporting TDD, BDD, mocking, and benchmarking.")
4335 (home-page "https://github.com/seattlerb/minitest")
4336 (license license:expat)))
4337
4338 ;; This is the last release of Minitest 4, which is used by some packages.
4339 (define-public ruby-minitest-4
4340 (package (inherit ruby-minitest)
4341 (version "4.7.5")
4342 (source (origin
4343 (method url-fetch)
4344 (uri (rubygems-uri "minitest" version))
4345 (sha256
4346 (base32
4347 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
4348 (arguments
4349 `(#:phases
4350 (modify-phases %standard-phases
4351 (add-after 'unpack 'remove-unsupported-method
4352 (lambda _
4353 (substitute* "Rakefile"
4354 (("self\\.rubyforge_name = .*") ""))
4355 #t))
4356 (add-after 'build 'exclude-failing-tests
4357 (lambda _
4358 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
4359 ;; Fixnum.
4360 (delete-file "test/minitest/test_minitest_spec.rb")
4361 #t)))))))
4362
4363 (define-public ruby-minitest-around
4364 (package
4365 (name "ruby-minitest-around")
4366 (version "0.5.0")
4367 (source
4368 (origin
4369 (method url-fetch)
4370 (uri (rubygems-uri "minitest-around" version))
4371 (sha256
4372 (base32
4373 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
4374 (build-system ruby-build-system)
4375 (arguments
4376 '(#:phases
4377 (modify-phases %standard-phases
4378 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
4379 (lambda _
4380 (substitute* "minitest-around.gemspec"
4381 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
4382 #t)))))
4383 (propagated-inputs
4384 (list ruby-minitest))
4385 (native-inputs
4386 (list bundler ruby-cucumber ruby-bump ruby-test-construct))
4387 (synopsis "Run code around tests in Minitest")
4388 (description
4389 "This library provides a way to run code around tests in Minitest,
4390 written using either the unit test or spec style.")
4391 (home-page "https://github.com/splattael/minitest-around")
4392 (license license:expat)))
4393
4394 (define-public ruby-minitest-sprint
4395 (package
4396 (name "ruby-minitest-sprint")
4397 (version "1.1.0")
4398 (source (origin
4399 (method url-fetch)
4400 (uri (rubygems-uri "minitest-sprint" version))
4401 (sha256
4402 (base32
4403 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
4404 (build-system ruby-build-system)
4405 (native-inputs
4406 (list ruby-hoe ruby-minitest))
4407 (synopsis "Fast test suite runner for minitest")
4408 (description "Minitest-sprint is a test runner for minitest that makes it
4409 easier to re-run individual failing tests.")
4410 (home-page "https://github.com/seattlerb/minitest-sprint")
4411 (license license:expat)))
4412
4413 (define-public ruby-minitest-bacon
4414 (package
4415 (name "ruby-minitest-bacon")
4416 (version "1.0.3")
4417 (source (origin
4418 (method url-fetch)
4419 (uri (rubygems-uri "minitest-bacon" version))
4420 (sha256
4421 (base32
4422 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
4423 (build-system ruby-build-system)
4424 (native-inputs
4425 (list ruby-hoe))
4426 (inputs
4427 (list ruby-minitest))
4428 (synopsis "Bacon compatibility library for minitest")
4429 (description "Minitest-bacon extends minitest with bacon-like
4430 functionality, making it easier to migrate test suites from bacon to minitest.")
4431 (home-page "https://github.com/seattlerb/minitest-bacon")
4432 (license license:expat)))
4433
4434 (define-public ruby-minitest-focus
4435 (package
4436 (name "ruby-minitest-focus")
4437 (version "1.1.2")
4438 (source
4439 (origin
4440 (method url-fetch)
4441 (uri (rubygems-uri "minitest-focus" version))
4442 (sha256
4443 (base32
4444 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4445 (build-system ruby-build-system)
4446 (propagated-inputs
4447 (list ruby-minitest))
4448 (native-inputs
4449 (list ruby-hoe))
4450 (synopsis "Allows a few specific tests to be focused on")
4451 (description
4452 "@code{minitest-focus} gives the ability focus on a few tests with ease
4453 without having to use command-line arguments. It introduces a @code{focus}
4454 class method for use in testing classes, specifying that the next defined test
4455 is to be run.")
4456 (home-page "https://github.com/seattlerb/minitest-focus")
4457 (license license:expat)))
4458
4459 (define-public ruby-minitest-pretty-diff
4460 ;; Use git reference because gem is out of date and does not contain testing
4461 ;; script. There are no releases on GitHub.
4462 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4463 (package
4464 (name "ruby-minitest-pretty-diff")
4465 (version (string-append "0.1-1." (string-take commit 8)))
4466 (source (origin
4467 (method git-fetch)
4468 (uri (git-reference
4469 (url "https://github.com/adammck/minitest-pretty_diff")
4470 (commit commit)))
4471 (file-name (string-append name "-" version "-checkout"))
4472 (sha256
4473 (base32
4474 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4475 (build-system ruby-build-system)
4476 (arguments
4477 `(#:phases
4478 (modify-phases %standard-phases
4479 (replace 'check
4480 (lambda _
4481 (invoke "script/test"))))))
4482 (native-inputs
4483 (list bundler ruby-turn))
4484 (synopsis "Pretty-print hashes and arrays in MiniTest")
4485 (description
4486 "@code{minitest-pretty_diff} monkey-patches
4487 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4488 diffing them. This makes it easier to spot differences between nested
4489 structures when tests fail.")
4490 (home-page "https://github.com/adammck/minitest-pretty_diff")
4491 (license license:expat))))
4492
4493 (define-public ruby-minitest-moar
4494 (package
4495 (name "ruby-minitest-moar")
4496 (version "0.0.4")
4497 (source
4498 (origin
4499 (method url-fetch)
4500 (uri (rubygems-uri "minitest-moar" version))
4501 (sha256
4502 (base32
4503 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4504 (build-system ruby-build-system)
4505 (arguments
4506 `(#:phases
4507 (modify-phases %standard-phases
4508 (add-before 'check 'clean-dependencies
4509 (lambda _
4510 ;; Remove all gems defined in the Gemfile because these are not
4511 ;; truly needed.
4512 (substitute* "Gemfile"
4513 (("gem .*") ""))
4514 ;; Remove byebug as not needed to run tests.
4515 (substitute* "test/test_helper.rb"
4516 (("require 'byebug'") ""))
4517 #t)))))
4518 (native-inputs
4519 (list bundler ruby-minitest))
4520 (synopsis "Extra features and changes to MiniTest")
4521 (description "@code{MiniTest Moar} add some additional features and
4522 changes some default behaviours in MiniTest. For instance, Moar replaces the
4523 MiniTest @code{Object#stub} with a global @code{stub} method.")
4524 (home-page "https://github.com/dockyard/minitest-moar")
4525 (license license:expat)))
4526
4527 (define-public ruby-minitest-bonus-assertions
4528 (package
4529 (name "ruby-minitest-bonus-assertions")
4530 (version "3.0")
4531 (source
4532 (origin
4533 (method url-fetch)
4534 (uri (rubygems-uri "minitest-bonus-assertions" version))
4535 (sha256
4536 (base32
4537 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
4538 (build-system ruby-build-system)
4539 (arguments
4540 `(#:tests? #f ; Test suite has bitrotted.
4541 #:phases
4542 (modify-phases %standard-phases
4543 (add-before 'check 'clean-dependencies
4544 (lambda _
4545 ;; Remove unneeded require statement that would entail another
4546 ;; dependency.
4547 (substitute* "test/minitest_config.rb"
4548 (("require 'minitest/bisect'") ""))
4549 #t)))))
4550 (native-inputs
4551 (list ruby-hoe ruby-minitest-pretty-diff ruby-minitest-focus
4552 ruby-minitest-moar))
4553 (synopsis "Bonus assertions for @code{Minitest}")
4554 (description
4555 "Minitest bonus assertions provides extra MiniTest assertions. For
4556 instance, it provides @code{assert_true}, @code{assert_false} and
4557 @code{assert_set_equal}.")
4558 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4559 (license license:expat)))
4560
4561 (define-public ruby-minitest-reporters
4562 (package
4563 (name "ruby-minitest-reporters")
4564 (version "1.3.6")
4565 (source
4566 (origin
4567 (method url-fetch)
4568 (uri (rubygems-uri "minitest-reporters" version))
4569 (sha256
4570 (base32
4571 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4572 (build-system ruby-build-system)
4573 (arguments
4574 '(#:phases
4575 (modify-phases %standard-phases
4576 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4577 ;; including it as an input can lead to circular dependencies.
4578 (add-after 'unpack 'remove-rubocop-from-Rakefile
4579 (lambda _
4580 (substitute* "Rakefile"
4581 (("require 'rubocop/rake\\_task'") "")
4582 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4583 #t))
4584 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4585 (lambda _
4586 (substitute* "minitest-reporters.gemspec"
4587 ((".*%q<rubocop>.*") "\n"))
4588 #t)))))
4589 (propagated-inputs
4590 (list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
4591 (native-inputs
4592 (list bundler ruby-maruku))
4593 (synopsis "Enhanced reporting for Minitest tests")
4594 (description
4595 "@code{minitest/reporters} provides a custom Minitest runner to improve
4596 how the test state is reported. A number of different reporters are
4597 available, including a spec reporter, progress bar reporter, a HTML
4598 reporter.")
4599 (home-page "https://github.com/kern/minitest-reporters")
4600 (license license:expat)))
4601
4602 (define-public ruby-minitest-rg
4603 (package
4604 (name "ruby-minitest-rg")
4605 (version "5.2.0")
4606 (source
4607 (origin
4608 (method url-fetch)
4609 (uri (rubygems-uri "minitest-rg" version))
4610 (sha256
4611 (base32
4612 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4613 (build-system ruby-build-system)
4614 (arguments
4615 ;; Some tests fail even outside Guix, so disable tests.
4616 ;; https://github.com/blowmage/minitest-rg/issues/12
4617 ;; https://github.com/blowmage/minitest-rg/pull/13
4618 `(#:tests? #f))
4619 (propagated-inputs
4620 (list ruby-minitest))
4621 (synopsis "Coloured output for Minitest")
4622 (description
4623 "@code{minitest-rg} changes the colour of the output from Minitest.")
4624 (home-page "https://blowmage.com/minitest-rg/")
4625 (license license:expat)))
4626
4627 (define-public ruby-minitest-global-expectations
4628 (package
4629 (name "ruby-minitest-global-expectations")
4630 (version "1.0.1")
4631 (source
4632 (origin
4633 (method url-fetch)
4634 (uri (rubygems-uri "minitest-global_expectations"
4635 version))
4636 (sha256
4637 (base32
4638 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
4639 (build-system ruby-build-system)
4640 (propagated-inputs
4641 (list ruby-minitest))
4642 (synopsis "Adjust minitest behaviour for calling expectation methods")
4643 (description
4644 "Minitest-global_expectations allows continued use of expectation methods
4645 on all objects. Calling expectation methods on all objects was deprecated in
4646 minitest 5.12, and is planned to be removed from minitest 6.")
4647 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
4648 (license license:expat)))
4649
4650 (define-public ruby-minitest-hooks
4651 (package
4652 (name "ruby-minitest-hooks")
4653 (version "1.5.0")
4654 (source
4655 (origin
4656 (method url-fetch)
4657 (uri (rubygems-uri "minitest-hooks" version))
4658 (sha256
4659 (base32
4660 "05z8r6sw3fz4s44fs1150ndlcmcy82vlxmhps5nncg8vk59k3gmf"))))
4661 (build-system ruby-build-system)
4662 (arguments
4663 '(#:test-target "spec"
4664 ;; Test suite is incompatible with ruby-2.7.
4665 ;; https://github.com/jeremyevans/minitest-hooks/issues/19
4666 #:tests? #f))
4667 (native-inputs
4668 (list ruby-sequel ruby-sqlite3))
4669 (synopsis "Hooks for the minitest framework")
4670 (description
4671 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4672 @code{around_all} hooks for Minitest. This allows, for instance, running each
4673 suite of specs inside a database transaction, running each spec inside its own
4674 savepoint inside that transaction. This can significantly speed up testing
4675 for specs that share expensive database setup code.")
4676 (home-page "https://github.com/jeremyevans/minitest-hooks")
4677 (license license:expat)))
4678
4679 (define-public ruby-daemons
4680 (package
4681 (name "ruby-daemons")
4682 (version "1.2.5")
4683 (source (origin
4684 (method url-fetch)
4685 (uri (rubygems-uri "daemons" version))
4686 (sha256
4687 (base32
4688 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
4689 (build-system ruby-build-system)
4690 (arguments
4691 `(#:tests? #f)) ; no test suite
4692 (synopsis "Daemonize Ruby programs")
4693 (description "Daemons provides a way to wrap existing Ruby scripts to be
4694 run as a daemon and to be controlled by simple start/stop/restart commands.")
4695 (home-page "https://github.com/thuehlinger/daemons")
4696 (license license:expat)))
4697
4698 (define-public ruby-data_uri
4699 (package
4700 (name "ruby-data_uri")
4701 (version "0.1.0")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 (uri (rubygems-uri "data_uri" version))
4706 (sha256
4707 (base32
4708 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4709 (build-system ruby-build-system)
4710 (synopsis "URI class for parsing data URIs")
4711 (description
4712 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4713 embedded inside a URI. The URI::Data class provides support for parsing these
4714 URIs using the normal URI.parse method.")
4715 (home-page "https://github.com/dball/data_uri")
4716 (license license:expat)))
4717
4718 (define-public ruby-deep-merge
4719 (package
4720 (name "ruby-deep-merge")
4721 (version "1.2.1")
4722 (home-page "https://github.com/danielsdeleo/deep_merge")
4723 ;; The Rubygem source does not contain the gemspec required for tests.
4724 (source (origin
4725 (method git-fetch)
4726 (uri (git-reference (url home-page) (commit version)))
4727 (file-name (git-file-name name version))
4728 (sha256
4729 (base32
4730 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4731 (build-system ruby-build-system)
4732 (native-inputs
4733 (list ruby-minitest))
4734 (synopsis "Recursively merge hashes")
4735 (description
4736 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4737 you to merge elements inside a hash together recursively.")
4738 (license license:expat)))
4739
4740 (define-public ruby-git
4741 (package
4742 (name "ruby-git")
4743 (version "1.3.0")
4744 (source (origin
4745 (method url-fetch)
4746 (uri (rubygems-uri "git" version))
4747 (sha256
4748 (base32
4749 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
4750 (build-system ruby-build-system)
4751 (arguments
4752 `(#:tests? #f ; no tests
4753 #:phases (modify-phases %standard-phases
4754 (add-after 'install 'patch-git-binary
4755 (lambda* (#:key inputs outputs #:allow-other-keys)
4756 ;; Make the default git binary an absolute path to the
4757 ;; store.
4758 (let ((git (search-input-file inputs "/bin/git"))
4759 (config (string-append
4760 (assoc-ref outputs "out")
4761 "/lib/ruby/vendor_ruby/gems/git-"
4762 ,version "/lib/git/config.rb")))
4763 (substitute* (list config)
4764 (("'git'")
4765 (string-append "'" git "'")))
4766 #t))))))
4767 (inputs
4768 (list git))
4769 (synopsis "Ruby wrappers for Git")
4770 (description "Ruby/Git is a Ruby library that can be used to create, read
4771 and manipulate Git repositories by wrapping system calls to the git binary.")
4772 (home-page "https://github.com/schacon/ruby-git")
4773 (license license:expat)))
4774
4775 (define-public ruby-hocon
4776 (package
4777 (name "ruby-hocon")
4778 (version "1.3.1")
4779 (home-page "https://github.com/puppetlabs/ruby-hocon")
4780 (source (origin
4781 (method git-fetch)
4782 (uri (git-reference (url home-page) (commit version)))
4783 (file-name (git-file-name name version))
4784 (sha256
4785 (base32
4786 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
4787 (build-system ruby-build-system)
4788 (arguments
4789 '(#:phases (modify-phases %standard-phases
4790 (replace 'check
4791 (lambda* (#:key tests? #:allow-other-keys)
4792 (if tests?
4793 (invoke "rspec")
4794 (format #t "test suite not run~%"))
4795 #t)))))
4796 (native-inputs
4797 (list bundler ruby-rspec))
4798 (synopsis "HOCON config library")
4799 (description
4800 "This package provides Ruby support for the @acronym{HOCON,
4801 Human-Optimized Config Object Notation} configuration file format. It
4802 supports parsing and modifying HOCON and JSON files, and rendering parsed
4803 objects back to a @code{String}.")
4804 (license license:asl2.0)))
4805
4806 (define-public ruby-slop
4807 (package
4808 (name "ruby-slop")
4809 (version "4.5.0")
4810 (source (origin
4811 (method url-fetch)
4812 (uri (rubygems-uri "slop" version))
4813 (sha256
4814 (base32
4815 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
4816 (build-system ruby-build-system)
4817 (native-inputs
4818 (list ruby-minitest))
4819 (synopsis "Ruby command line option parser")
4820 (description "Slop provides a Ruby domain specific language for gathering
4821 options and parsing command line flags.")
4822 (home-page "https://github.com/leejarvis/slop")
4823 (license license:expat)))
4824
4825 (define-public ruby-slop-3
4826 (package (inherit ruby-slop)
4827 (version "3.6.0")
4828 (source (origin
4829 (method url-fetch)
4830 (uri (rubygems-uri "slop" version))
4831 (sha256
4832 (base32
4833 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4834
4835 (define-public ruby-multi-xml
4836 (package
4837 (name "ruby-multi-xml")
4838 (version "0.6.0")
4839 (source
4840 (origin
4841 (method url-fetch)
4842 (uri (rubygems-uri "multi_xml" version))
4843 (sha256
4844 (base32
4845 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4846 (build-system ruby-build-system)
4847 (arguments
4848 '(#:tests? #f)) ; No included tests
4849 (synopsis "Swappable XML backends for Ruby")
4850 (description
4851 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4852 Nokogiri, Ox, or REXML.")
4853 (home-page "https://github.com/sferik/multi_xml")
4854 (license license:expat)))
4855
4856 (define-public ruby-multipart-post
4857 (package
4858 (name "ruby-multipart-post")
4859 (version "2.0.0")
4860 (source (origin
4861 (method url-fetch)
4862 (uri (rubygems-uri "multipart-post" version))
4863 (sha256
4864 (base32
4865 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
4866 (build-system ruby-build-system)
4867 (native-inputs
4868 (list bundler))
4869 (synopsis "Multipart POST library for Ruby")
4870 (description "Multipart-Post Adds multipart POST capability to Ruby's
4871 net/http library.")
4872 (home-page "https://github.com/nicksieger/multipart-post")
4873 (license license:expat)))
4874
4875 (define-public ruby-multi-json
4876 (package
4877 (name "ruby-multi-json")
4878 (version "1.15.0")
4879 (source
4880 (origin
4881 (method git-fetch)
4882 ;; Tests are not distributed at rubygems.org so download from GitHub
4883 ;; instead.
4884 (uri (git-reference
4885 (url "https://github.com/intridea/multi_json")
4886 (commit (string-append "v" version))))
4887 (file-name (git-file-name name version))
4888 (sha256
4889 (base32
4890 "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
4891 (build-system ruby-build-system)
4892 (arguments
4893 `(#:phases
4894 (modify-phases %standard-phases
4895 (add-before 'check 'pre-check
4896 (lambda _
4897 ;; As seen in the .travis.yml file.
4898 (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
4899 (native-inputs
4900 (list ruby-rspec ruby-json-pure ruby-oj ruby-yajl-ruby))
4901 (synopsis "Common interface to multiple JSON libraries for Ruby")
4902 (description
4903 "This package provides a common interface to multiple JSON libraries,
4904 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4905 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
4906 (home-page "https://github.com/intridea/multi_json")
4907 (license license:expat)))
4908
4909 (define-public ruby-multi-test
4910 (package
4911 (name "ruby-multi-test")
4912 (version "0.1.2")
4913 (source
4914 (origin
4915 (method url-fetch)
4916 (uri (rubygems-uri "multi_test" version))
4917 (sha256
4918 (base32
4919 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4920 (build-system ruby-build-system)
4921 (arguments
4922 '(;; Tests require different sets of specific gem versions to be available,
4923 ;; and there is no gemfile that specifies the newest versions of
4924 ;; dependencies to be tested.
4925 #:tests? #f))
4926 (synopsis
4927 "Interface to testing libraries loaded into a running Ruby process")
4928 (description
4929 "@code{multi_test} provides a uniform interface onto whatever testing
4930 libraries that have been loaded into a running Ruby process to help control
4931 rogue test/unit/autorun requires.")
4932 (home-page "https://github.com/cucumber/multi_test")
4933 (license license:expat)))
4934
4935 (define-public ruby-arel
4936 (package
4937 (name "ruby-arel")
4938 (version "9.0.0")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (rubygems-uri "arel" version))
4942 (sha256
4943 (base32
4944 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
4945 (build-system ruby-build-system)
4946 (arguments '(#:tests? #f)) ; no tests
4947 (home-page "https://github.com/rails/arel")
4948 (synopsis "SQL AST manager for Ruby")
4949 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4950 Ruby. It simplifies the generation of complex SQL queries and adapts to
4951 various relational database implementations.")
4952 (license license:expat)))
4953
4954 (define-public ruby-marcel
4955 (package
4956 (name "ruby-marcel")
4957 (version "0.3.3")
4958 (source
4959 (origin
4960 (method url-fetch)
4961 (uri (rubygems-uri "marcel" version))
4962 (sha256
4963 (base32
4964 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4965 (build-system ruby-build-system)
4966 (arguments
4967 '(;; No included tests
4968 #:tests? #f))
4969 (propagated-inputs
4970 (list ruby-mimemagic))
4971 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4972 (description
4973 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4974 Extensions} type detection using magic numbers, filenames, and extensions")
4975 (home-page "https://github.com/basecamp/marcel")
4976 (license license:expat)))
4977
4978 (define-public ruby-minitar
4979 ;; We package from the GitHub source to fix the security issue reported at
4980 ;; https://github.com/halostatue/minitar/issues/16.
4981 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4982 (package
4983 (name "ruby-minitar")
4984 (version (string-append "0.5.4-1." (string-take commit 8)))
4985 (source
4986 (origin
4987 (method git-fetch)
4988 (uri (git-reference
4989 (url "https://github.com/halostatue/minitar")
4990 (commit commit)))
4991 (file-name (string-append name "-" version "-checkout"))
4992 (sha256
4993 (base32
4994 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4995 (build-system ruby-build-system)
4996 (arguments
4997 '(#:tests? #f)) ; missing a gemspec
4998 (synopsis "Ruby library and utility for handling tar archives")
4999 (description
5000 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
5001 that provides the ability to deal with POSIX tar archive files.")
5002 (home-page "http://www.github.com/atoulme/minitar")
5003 (license (list license:gpl2+ license:ruby)))))
5004
5005 (define-public ruby-mini-portile
5006 (package
5007 (name "ruby-mini-portile")
5008 (version "0.6.2")
5009 (source
5010 (origin
5011 (method url-fetch)
5012 (uri (rubygems-uri "mini_portile" version))
5013 (sha256
5014 (base32
5015 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
5016 (build-system ruby-build-system)
5017 (arguments
5018 '(#:tests? #f)) ; tests require network access
5019 (synopsis "Ports system for Ruby developers")
5020 (description "Mini-portile is a port/recipe system for Ruby developers.
5021 It provides a standard way to compile against specific versions of libraries
5022 to reproduce user environments.")
5023 (home-page "https://github.com/flavorjones/mini_portile")
5024 (license license:expat)))
5025
5026 (define-public ruby-mini-portile-2
5027 (package (inherit ruby-mini-portile)
5028 (version "2.4.0")
5029 (source (origin
5030 (method url-fetch)
5031 (uri (rubygems-uri "mini_portile2" version))
5032 (sha256
5033 (base32
5034 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
5035
5036 (define-public ruby-nokogiri
5037 (package
5038 (name "ruby-nokogiri")
5039 (version "1.12.5")
5040 (source (origin
5041 (method url-fetch)
5042 (uri (rubygems-uri "nokogiri" version))
5043 (sha256
5044 (base32
5045 "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"))))
5046 (build-system ruby-build-system)
5047 (arguments
5048 ;; Tests fail because Nokogiri can only test with an installed extension,
5049 ;; and also because many test framework dependencies are missing.
5050 `(#:tests? #f
5051 #:gem-flags (list "--" "--use-system-libraries"
5052 (string-append "--with-xml2-include="
5053 (assoc-ref %build-inputs "libxml2")
5054 "/include/libxml2" ))))
5055 (native-inputs
5056 (list ruby-hoe))
5057 (inputs
5058 (list zlib libxml2 libxslt))
5059 (propagated-inputs
5060 (list ruby-mini-portile-2.6.1 ruby-pkg-config))
5061 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
5062 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
5063 both CSS3 selector and XPath 1.0 support.")
5064 (home-page "http://www.nokogiri.org/")
5065 (license license:expat)))
5066
5067 ;; nokogiri requires this version exactly.
5068 (define-public ruby-mini-portile-2.6.1
5069 (package
5070 (inherit ruby-mini-portile)
5071 (version "2.6.1")
5072 (source (origin
5073 (method url-fetch)
5074 (uri (rubygems-uri "mini_portile2" version))
5075 (sha256
5076 (base32
5077 "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"))))))
5078
5079 (define-public ruby-method-source
5080 (package
5081 (name "ruby-method-source")
5082 (version "1.0.0")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (rubygems-uri "method_source" version))
5087 (sha256
5088 (base32
5089 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
5090 (build-system ruby-build-system)
5091 (arguments
5092 `(#:test-target "spec"
5093 #:phases
5094 (modify-phases %standard-phases
5095 (add-after 'unpack 'remove-git-ls-files
5096 (lambda* (#:key outputs #:allow-other-keys)
5097 (substitute* "Rakefile"
5098 (("git ls-files") "find . -type f"))
5099 #t)))))
5100 (native-inputs
5101 (list ruby-rspec))
5102 (synopsis "Retrieve the source code for Ruby methods")
5103 (description "Method_source retrieves the source code for Ruby methods.
5104 Additionally, it can extract source code from Proc and Lambda objects or just
5105 extract comments.")
5106 (home-page "https://github.com/banister/method_source")
5107 (license license:expat)))
5108
5109 (define-public ruby-coderay
5110 (package
5111 (name "ruby-coderay")
5112 (version "1.1.2")
5113 (source
5114 (origin
5115 (method url-fetch)
5116 (uri (rubygems-uri "coderay" version))
5117 (sha256
5118 (base32
5119 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
5120 (build-system ruby-build-system)
5121 (arguments
5122 '(#:tests? #f)) ; missing test files
5123 (synopsis "Ruby syntax highlighting library")
5124 (description "Coderay is a Ruby library that provides syntax highlighting
5125 for select languages.")
5126 (home-page "http://coderay.rubychan.de")
5127 (license license:expat)))
5128
5129 (define-public ruby-cuke-modeler
5130 (package
5131 (name "ruby-cuke-modeler")
5132 (version "3.1.0")
5133 (source
5134 (origin
5135 (method url-fetch)
5136 (uri (rubygems-uri "cuke_modeler" version))
5137 (sha256
5138 (base32
5139 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
5140 (build-system ruby-build-system)
5141 (arguments `(#:tests? #f)) ;no test suite in gem
5142 (propagated-inputs
5143 (list ruby-gherkin))
5144 (synopsis "Gherkin test suite analysis tool")
5145 (description "CukeModeler facilitates modeling a test suite that is
5146 written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
5147 providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
5148 the @code{cucumber-gherkin} generates when parsing features, as well as
5149 providing models for feature files and directories in order to be able to have
5150 a fully traversable model tree of a test suite's structure. These models can
5151 then be analyzed or manipulated more easily than the underlying AST layer.")
5152 (home-page "https://github.com/enkessler/cuke_modeler")
5153 (license license:expat)))
5154
5155 (define-public ruby-parallel-tests
5156 (package
5157 (name "ruby-parallel-tests")
5158 (version "3.0.0")
5159 (home-page "https://github.com/grosser/parallel_tests")
5160 (source (origin
5161 (method git-fetch)
5162 (uri (git-reference
5163 (url home-page)
5164 (commit (string-append "v" version))))
5165 (file-name (string-append name version))
5166 (sha256
5167 (base32
5168 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
5169 (build-system ruby-build-system)
5170 (arguments
5171 '(#:test-target "default"
5172 #:phases (modify-phases %standard-phases
5173 (add-after 'patch-source-shebangs 'patch-shell-invokations
5174 (lambda _
5175 (substitute* '("lib/parallel_tests/tasks.rb"
5176 "spec/parallel_tests/tasks_spec.rb")
5177 (("/bin/sh") (which "sh"))
5178 (("/bin/bash") (which "bash")))
5179 #t))
5180 (add-before 'check 'remove-version-constraints
5181 (lambda _
5182 ;; Remove hard coded version constraints, instead just
5183 ;; use whatever versions are available in Guix.
5184 (delete-file "Gemfile.lock")
5185 (substitute* "Gemfile"
5186 (("'minitest',.*")
5187 "'minitest'\n")
5188 (("'cucumber',.*")
5189 "'cucumber'\n"))
5190 #t))
5191 (add-before 'check 'disable-rails-test
5192 (lambda _
5193 ;; XXX: This test attempts to download and run the test
5194 ;; suites of multiple Rails versions(!) directly.
5195 (delete-file "spec/rails_spec.rb")
5196 #t))
5197 (add-before 'check 'set-HOME
5198 (lambda _
5199 ;; Some tests check the output of Bundler, and fail when
5200 ;; Bundler warns that /homeless-shelter does not exist.
5201 (setenv "HOME" "/tmp")
5202 #t)))))
5203 (native-inputs
5204 (list ruby-bump
5205 ruby-cucumber
5206 ruby-cuke-modeler
5207 ruby-minitest
5208 ruby-rake
5209 ruby-rspec
5210 ruby-spinach))
5211 (propagated-inputs
5212 (list ruby-parallel))
5213 (synopsis "Run tests in parallel")
5214 (description
5215 "This package can speed up @code{Test::Unit}, @code{RSpec},
5216 @code{Cucumber}, and @code{Spinach} tests by running them concurrently
5217 across multiple CPU cores.")
5218 (license license:expat)))
5219
5220 (define-public ruby-parser
5221 (package
5222 (name "ruby-parser")
5223 (version "3.0.0.0")
5224 (source
5225 (origin
5226 (method url-fetch)
5227 (uri (rubygems-uri "parser" version))
5228 (sha256
5229 (base32
5230 "1jixakyzmy0j5c1rb0fjrrdhgnyryvrr6vgcybs14jfw09akv5ml"))))
5231 (build-system ruby-build-system)
5232 (arguments
5233 '(#:tests? #f)) ; tests not included in gem
5234 (native-inputs
5235 (list bundler ruby-cliver ruby-simplecov ruby-racc))
5236 (inputs
5237 (list ragel))
5238 (propagated-inputs
5239 (list ruby-ast))
5240 (synopsis "Ruby parser written in pure Ruby")
5241 (description
5242 "This package provides a Ruby parser written in pure Ruby.")
5243 (home-page "https://github.com/whitequark/parser")
5244 (license license:expat)))
5245
5246 (define-public ruby-sexp-processor
5247 (package
5248 (name "ruby-sexp-processor")
5249 (version "4.15.0")
5250 (source
5251 (origin
5252 (method url-fetch)
5253 (uri (rubygems-uri "sexp_processor" version))
5254 (sha256
5255 (base32
5256 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
5257 (build-system ruby-build-system)
5258 (native-inputs
5259 ;; TODO: Add ruby-minitest-proveit once available.
5260 (list ruby-hoe))
5261 (synopsis "ParseTree fork which includes generic S-exp processing tools")
5262 (description "The sexp_processor package is derived from ParseTree, but
5263 contrary to ParseTree, it includes all the generic S-exp processing tools.
5264 Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
5265 @code{Environment}")
5266 (home-page "https://github.com/seattlerb/sexp_processor")
5267 (license license:expat)))
5268
5269 (define-public ruby-ruby-parser
5270 (package
5271 (name "ruby-ruby-parser")
5272 (version "3.14.2")
5273 (source
5274 (origin
5275 (method url-fetch)
5276 (uri (rubygems-uri "ruby_parser" version))
5277 (sha256
5278 (base32
5279 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
5280 (build-system ruby-build-system)
5281 (native-inputs
5282 (list ruby-hoe ruby-racc unifdef))
5283 (propagated-inputs
5284 (list ruby-sexp-processor))
5285 (home-page "https://github.com/seattlerb/ruby_parser/")
5286 (synopsis "Ruby parser written in pure Ruby")
5287 (description "The ruby_parser (RP) package provides a Ruby parser written
5288 in pure Ruby. It outputs S-expressions which can be manipulated and converted
5289 back to Ruby via the @code{ruby2ruby} library.")
5290 (license license:expat)))
5291
5292 (define-public ruby-prawn-manual-builder
5293 (package
5294 (name "ruby-prawn-manual-builder")
5295 (version "0.3.1")
5296 (source
5297 (origin
5298 (method url-fetch)
5299 (uri (rubygems-uri "prawn-manual_builder" version))
5300 (sha256
5301 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
5302 (build-system ruby-build-system)
5303 (arguments
5304 '(#:tests? #f ; no included tests
5305 #:phases
5306 (modify-phases %standard-phases
5307 (add-after 'extract-gemspec 'patch-gemspec
5308 (lambda _
5309 (substitute* ".gemspec"
5310 ;; Loosen the requirement for pdf-inspector
5311 (("~> 1\\.0\\.7") ">= 0")))))))
5312 (propagated-inputs
5313 (list ruby-coderay))
5314 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
5315 (description
5316 "This package provides a tool for writing manuals for Prawn and Prawn
5317 accessories")
5318 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
5319 (license %prawn-project-licenses)))
5320
5321 (define-public ruby-progress_bar
5322 (package
5323 (name "ruby-progress_bar")
5324 (version "1.1.0")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (rubygems-uri "progress_bar" version))
5329 (sha256
5330 (base32
5331 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
5332 (build-system ruby-build-system)
5333 (arguments
5334 '(#:test-target "spec"))
5335 (propagated-inputs
5336 (list ruby-highline ruby-options))
5337 (native-inputs
5338 (list bundler ruby-rspec ruby-timecop))
5339 (synopsis
5340 "Ruby library for displaying progress bars")
5341 (description
5342 "ProgressBar is a simple library for displaying progress bars. The
5343 maximum value is configurable, and additional information can be displayed
5344 like the percentage completion, estimated time remaining, elapsed time and
5345 rate.")
5346 (home-page "https://github.com/paul/progress_bar")
5347 (license license:wtfpl2)))
5348
5349 (define-public ruby-dep
5350 (package
5351 (name "ruby-dep")
5352 (version "1.5.0")
5353 (source
5354 (origin
5355 (method url-fetch)
5356 (uri (rubygems-uri "ruby_dep" version))
5357 (sha256
5358 (base32
5359 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
5360 (build-system ruby-build-system)
5361 (arguments
5362 '(#:tests? #f)) ; No included tests
5363 (synopsis "Creates a version constraint of supported Rubies")
5364 (description
5365 "This package helps create a version constraint of supported Rubies,
5366 suitable for a gemspec file.")
5367 (home-page "https://github.com/e2/ruby_dep")
5368 (license license:expat)))
5369
5370 (define-public ruby-progressbar
5371 (package
5372 (name "ruby-progressbar")
5373 (version "1.10.1")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (rubygems-uri "ruby-progressbar" version))
5378 (sha256
5379 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
5380 (build-system ruby-build-system)
5381 (arguments
5382 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
5383 #:tests? #f))
5384 (synopsis "Text progress bar library for Ruby")
5385 (description
5386 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
5387 The output can be customized with a formatting system.")
5388 (home-page "https://github.com/jfelchner/ruby-progressbar")
5389 (license license:expat)))
5390
5391 (define-public ruby-pry
5392 (package
5393 (name "ruby-pry")
5394 (version "0.13.1")
5395 (source
5396 (origin
5397 (method url-fetch)
5398 (uri (rubygems-uri "pry" version))
5399 (sha256
5400 (base32
5401 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
5402 (build-system ruby-build-system)
5403 (arguments
5404 '(#:tests? #f)) ; no tests
5405 (propagated-inputs
5406 (list ruby-coderay ruby-method-source))
5407 (synopsis "Ruby REPL")
5408 (description "Pry is an IRB alternative and runtime developer console for
5409 Ruby. It features syntax highlighting, a plugin architecture, runtime
5410 invocation, and source and documentation browsing.")
5411 (home-page "https://cobaltbluemedia.com/pryrepl/")
5412 (license license:expat)))
5413
5414 (define-public ruby-single-cov
5415 (package
5416 (name "ruby-single-cov")
5417 (version "1.3.2")
5418 (home-page "https://github.com/grosser/single_cov")
5419 (source (origin
5420 (method git-fetch)
5421 (uri (git-reference (url home-page)
5422 (commit (string-append "v" version))))
5423 (file-name (git-file-name name version))
5424 (sha256
5425 (base32
5426 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
5427 (build-system ruby-build-system)
5428 (arguments
5429 '(#:test-target "default"
5430 #:phases (modify-phases %standard-phases
5431 (replace 'replace-git-ls-files
5432 (lambda _
5433 (substitute* "single_cov.gemspec"
5434 (("`git ls-files lib/ bin/ MIT-LICENSE`")
5435 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
5436 #t))
5437 (add-before 'check 'remove-version-constraints
5438 (lambda _
5439 (delete-file "Gemfile.lock")
5440 #t))
5441 (add-before 'check 'make-files-writable
5442 (lambda _
5443 ;; Tests need to create local directories and open files
5444 ;; with write permissions.
5445 (for-each make-file-writable
5446 (find-files "specs" #:directories? #t))
5447 #t))
5448 (add-before 'check 'disable-failing-test
5449 (lambda _
5450 ;; XXX: This test copies assets from minitest, but can
5451 ;; not cope with the files being read-only. Just skip
5452 ;; it for now.
5453 (substitute* "specs/single_cov_spec.rb"
5454 (("it \"complains when coverage is bad\"")
5455 "xit \"complains when coverage is bad\""))
5456 #t)))))
5457 (native-inputs
5458 (list ruby-bump ruby-minitest ruby-rspec ruby-simplecov))
5459 (synopsis "Code coverage reporting tool")
5460 (description
5461 "This package provides actionable code coverage reports for Ruby
5462 projects. It has very little overhead and can be easily integrated with
5463 development tools to catch coverage problems early.")
5464 (license license:expat)))
5465
5466 (define-public ruby-oedipus-lex
5467 (package
5468 (name "ruby-oedipus-lex")
5469 (version "2.5.2")
5470 (source
5471 (origin
5472 (method url-fetch)
5473 (uri (rubygems-uri "oedipus_lex" version))
5474 (sha256
5475 (base32
5476 "1v1rk78khwq87ar300lwll570zxpkq9rjnpgc9mgsyd6mm9qjz4w"))))
5477 (build-system ruby-build-system)
5478 (native-inputs
5479 (list ruby-hoe))
5480 (synopsis "Ruby lexer")
5481 (description
5482 "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
5483 It is based primarily on generating code much like you would a hand-written
5484 lexer. It uses StrScanner within a multi-level case statement. As such,
5485 Oedipus matches on the first match, not the longest.")
5486 (home-page "https://github.com/seattlerb/oedipus_lex")
5487 (license license:expat)))
5488
5489 (define-public ruby-guard
5490 (package
5491 (name "ruby-guard")
5492 (version "2.13.0")
5493 (source (origin
5494 (method git-fetch)
5495 ;; The gem does not include a Rakefile, nor does it contain a
5496 ;; gemspec file, nor does it come with the tests. This is why
5497 ;; we fetch the tarball from Github.
5498 (uri (git-reference
5499 (url "https://github.com/guard/guard")
5500 (commit (string-append "v" version))))
5501 (file-name (git-file-name name version))
5502 (sha256
5503 (base32
5504 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
5505 (build-system ruby-build-system)
5506 (arguments
5507 `(#:tests? #f ; tests require cucumber
5508 #:phases
5509 (modify-phases %standard-phases
5510 (add-after 'unpack 'remove-git-ls-files
5511 (lambda* (#:key outputs #:allow-other-keys)
5512 (substitute* "guard.gemspec"
5513 (("git ls-files -z") "find . -type f -print0"))
5514 #t))
5515 (replace 'build
5516 (lambda _
5517 (invoke "gem" "build" "guard.gemspec"))))))
5518 (propagated-inputs
5519 (list ruby-formatador
5520 ruby-listen
5521 ruby-lumberjack
5522 ruby-nenv
5523 ruby-notiffany
5524 ruby-pry
5525 ruby-shellany
5526 ruby-thor))
5527 (native-inputs
5528 (list bundler ruby-rspec))
5529 (synopsis "Tool to handle events on file system modifications")
5530 (description
5531 "Guard is a command line tool to easily handle events on file system
5532 modifications. Guard automates various tasks by running custom rules whenever
5533 file or directories are modified.")
5534 (home-page "https://guardgem.org/")
5535 (license license:expat)))
5536
5537 (define-public ruby-spinach
5538 (package
5539 (name "ruby-spinach")
5540 (version "0.11.0")
5541 (home-page "https://github.com/codegram/spinach")
5542 (source (origin
5543 (method url-fetch)
5544 (uri (rubygems-uri "spinach" version))
5545 (sha256
5546 (base32
5547 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5548 (build-system ruby-build-system)
5549 (arguments
5550 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5551 ;; which in turn depends on many other unpackaged gems. Enable once
5552 ;; capybara is available.
5553 '(#:tests? #f))
5554 (propagated-inputs
5555 (list ruby-colorize ruby-gherkin-ruby ruby-json))
5556 (synopsis "Gherkin-based BDD framework")
5557 (description
5558 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5559 framework that leverages the expressive @code{Gherkin} language to help you
5560 define executable specifications of your code.")
5561 (license license:expat)))
5562
5563 (define-public ruby-tilt
5564 (package
5565 (name "ruby-tilt")
5566 (version "2.0.10")
5567 (source
5568 (origin
5569 (method git-fetch) ;the distributed gem lacks tests
5570 (uri (git-reference
5571 (url "https://github.com/rtomayko/tilt")
5572 (commit (string-append "v" version))))
5573 (file-name (git-file-name name version))
5574 (sha256
5575 (base32
5576 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
5577 (build-system ruby-build-system)
5578 (arguments
5579 '(#:phases
5580 (modify-phases %standard-phases
5581 (add-after 'unpack 'remove-some-dependencies
5582 (lambda _
5583 (substitute* "Gemfile"
5584 ;; TODO ronn is used for generating the manual
5585 (("gem 'ronn'.*") "\n")
5586 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5587 ;; pass it in as a native-input
5588 (("gem 'haml'.*") "\n")
5589 ;; TODO Not all of these gems are packaged for Guix yet:
5590 ;; less, coffee-script, livescript, babel-transpiler,
5591 ;; typescript-node
5592 (("if can_execjs") "if false")
5593 ;; Disable the secondary group to reduce the number of
5594 ;; dependencies. None of the normal approaches work, so patch
5595 ;; the Gemfile instead.
5596 (("group :secondary") "[].each"))
5597 #t)))))
5598 (propagated-inputs
5599 (list ruby-pandoc-ruby ruby-sassc))
5600 (native-inputs
5601 (list bundler ruby-yard ruby-builder ruby-erubis ruby-markaby))
5602 (synopsis "Generic interface to multiple Ruby template engines")
5603 (description
5604 "Tilt is a thin interface over a number of different Ruby template
5605 engines in an attempt to make their usage as generic as possible.")
5606 (home-page "https://github.com/rtomayko/tilt/")
5607 (license license:expat)))
5608
5609 (define-public ruby-thread-safe
5610 (package
5611 (name "ruby-thread-safe")
5612 (version "0.3.6")
5613 (source
5614 (origin
5615 (method url-fetch)
5616 (uri (rubygems-uri "thread_safe" version))
5617 (sha256
5618 (base32
5619 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
5620 (build-system ruby-build-system)
5621 (arguments
5622 '(#:tests? #f)) ; needs simplecov, among others
5623 (synopsis "Thread-safe utilities for Ruby")
5624 (description "The thread_safe library provides thread-safe collections and
5625 utilities for Ruby.")
5626 (home-page "https://github.com/ruby-concurrency/thread_safe")
5627 (license license:asl2.0)))
5628
5629 (define-public ruby-tzinfo
5630 (package
5631 (name "ruby-tzinfo")
5632 (version "2.0.4")
5633 (source
5634 (origin
5635 (method git-fetch)
5636 (uri (git-reference
5637 ;; Pull from git because the gem has no tests.
5638 (url "https://github.com/tzinfo/tzinfo")
5639 (commit (string-append "v" version))))
5640 (file-name (git-file-name name version))
5641 (sha256
5642 (base32
5643 "0jaq1givdaz5jxz47xngyj3j315n872rk97mnpm5njwm48wy45yh"))))
5644 (build-system ruby-build-system)
5645 (arguments
5646 '(#:phases
5647 (modify-phases %standard-phases
5648 (add-after 'unpack 'skip-safe-tests
5649 (lambda _
5650 (substitute* "test/test_utils.rb"
5651 (("def safe_test\\(options = \\{\\}\\)")
5652 "def safe_test(options = {})
5653 skip('The Guix build environment has an unsafe load path')"))
5654 #t))
5655 (add-before 'check 'pre-check
5656 (lambda _
5657 (setenv "HOME" (getcwd))
5658 (substitute* "Gemfile"
5659 (("simplecov.*") "simplecov'\n"))
5660 #t))
5661 (replace 'check
5662 (lambda* (#:key tests? test-target #:allow-other-keys)
5663 (when tests?
5664 (invoke "bundler" "exec" "rake" test-target))
5665 #t)))))
5666 (propagated-inputs
5667 `(("ruby-concurrent-ruby" ,ruby-concurrent)))
5668 (native-inputs
5669 (list ruby-simplecov))
5670 (synopsis "Time zone library for Ruby")
5671 (description "TZInfo is a Ruby library that provides daylight savings
5672 aware transformations between times in different time zones.")
5673 (home-page "https://tzinfo.github.io")
5674 (license license:expat)))
5675
5676 (define-public ruby-tzinfo-data
5677 (package
5678 (name "ruby-tzinfo-data")
5679 (version "1.2021.1")
5680 (source
5681 (origin
5682 (method git-fetch)
5683 ;; Download from GitHub because the rubygems version does not contain
5684 ;; Rakefile or tests.
5685 (uri (git-reference
5686 (url "https://github.com/tzinfo/tzinfo-data")
5687 (commit (string-append "v" version))))
5688 (file-name (git-file-name name version))
5689 (sha256
5690 (base32
5691 "0yzyr3rf8qaw6kxfc0gwpxsb7gl3rhfpx9g1c2z15vapyminhi60"))))
5692 (build-system ruby-build-system)
5693 (arguments
5694 `(#:phases
5695 (modify-phases %standard-phases
5696 (add-after 'unpack 'patch-source
5697 (lambda* (#:key inputs #:allow-other-keys)
5698 (substitute* "Rakefile"
5699 (("https://data.iana.org/time-zones/releases")
5700 (assoc-ref inputs "tzdata")))
5701 #t))
5702 (add-before 'check 'pre-check
5703 (lambda _
5704 (setenv "HOME" (getcwd))
5705 (substitute* "Rakefile"
5706 ;; Don't need gpg, and it may break after a time.
5707 (("gpg ") "echo ")
5708 ((" sh\\(\\\"make -C" text)
5709 (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
5710 " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
5711 (setenv "cc" ,(cc-for-target))
5712 #t)))))
5713 (propagated-inputs
5714 (list ruby-tzinfo))
5715 (native-inputs
5716 `(("tzdata"
5717 ,(file-union "tzdata-for-ruby-tzdata-info"
5718 `(("tzdata2021a.tar.gz"
5719 ,(origin
5720 (method url-fetch)
5721 (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz")
5722 (sha256
5723 (base32
5724 "022fn6gkmp7pamlgab04x0dm5hnyn2m2fcnyr3pvm36612xd5rrr"))))
5725 ("tzdata2021a.tar.gz.asc"
5726 ,(origin
5727 (method url-fetch)
5728 (uri "https://data.iana.org/time-zones/releases/tzdata2021a.tar.gz.asc")
5729 (sha256
5730 (base32
5731 "0n7h2w8ji1lrxpk0d44wyfshlhr7c9jmwj6lqbxlyvqnfi3gbicx"))))
5732 ("tzcode2021a.tar.gz"
5733 ,(origin
5734 (method url-fetch)
5735 (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz")
5736 (sha256
5737 (base32
5738 "1l02b0jiwp3fl0xd6227i69d26rmx3yrnq0ssq9vvdmm4jhvyipb"))))
5739 ("tzcode2021a.tar.gz.asc"
5740 ,(origin
5741 (method url-fetch)
5742 (uri "https://data.iana.org/time-zones/releases/tzcode2021a.tar.gz.asc")
5743 (sha256
5744 (base32
5745 "1qhlj4lr810s47s1lwcvv1sgvg2sflf98w4sbg1lc8wzv5qxxv7g")))))
5746
5747 ;; XXX: Explicitly depend on 'guile-final', which was previously
5748 ;; implied via the '%guile-for-build' fluid but not explicit.
5749 ;; TODO: Remove this argument on the next rebuild cycle.
5750 #:guile (module-ref (resolve-interface
5751 '(gnu packages commencement))
5752 'guile-final)))))
5753 (synopsis "Data from the IANA Time Zone database")
5754 (description
5755 "This library provides @code{TZInfo::Data}, which contains data from the
5756 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
5757 (home-page "https://tzinfo.github.io")
5758 (license license:expat)))
5759
5760 (define-public ruby-rb-inotify
5761 (package
5762 (name "ruby-rb-inotify")
5763 (version "0.9.10")
5764 (source
5765 (origin
5766 (method url-fetch)
5767 (uri (rubygems-uri "rb-inotify" version))
5768 (sha256
5769 (base32
5770 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
5771 (build-system ruby-build-system)
5772 (arguments
5773 '(#:tests? #f ; there are no tests
5774 #:phases
5775 (modify-phases %standard-phases
5776 ;; Building the gemspec with rake is not working here since it is
5777 ;; generated with Jeweler. It is also unnecessary because the
5778 ;; existing gemspec does not use any development tools to generate a
5779 ;; list of files.
5780 (replace 'build
5781 (lambda _
5782 (invoke "gem" "build" "rb-inotify.gemspec"))))))
5783 (propagated-inputs
5784 (list ruby-ffi))
5785 (native-inputs
5786 (list ruby-yard))
5787 (synopsis "Ruby wrapper for Linux's inotify")
5788 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5789 kernel subsystem for monitoring changes to files and directories.")
5790 (home-page "https://github.com/nex3/rb-inotify")
5791 (license license:expat)))
5792
5793 (define-public ruby-pry-editline
5794 (package
5795 (name "ruby-pry-editline")
5796 (version "1.1.2")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (rubygems-uri "pry-editline" version))
5800 (sha256
5801 (base32
5802 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5803 (build-system ruby-build-system)
5804 (arguments `(#:tests? #f)) ; no tests included
5805 (native-inputs
5806 (list bundler))
5807 (synopsis "Open the current REPL line in an editor")
5808 (description
5809 "This gem provides a plugin for the Ruby REPL to enable opening the
5810 current line in an external editor.")
5811 (home-page "https://github.com/tpope/pry-editline")
5812 (license license:expat)))
5813
5814 (define-public ruby-sdoc
5815 (package
5816 (name "ruby-sdoc")
5817 (version "1.1.0")
5818 (source (origin
5819 (method url-fetch)
5820 (uri (rubygems-uri "sdoc" version))
5821 (sha256
5822 (base32
5823 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
5824 (build-system ruby-build-system)
5825 (arguments
5826 `(#:phases
5827 (modify-phases %standard-phases
5828 (add-before 'check 'set-rubylib-and-patch-gemfile
5829 (lambda _
5830 (setenv "RUBYLIB" "lib")
5831 (substitute* "sdoc.gemspec"
5832 (("s.add_runtime_dependency.*") "\n")
5833 (("s.add_dependency.*") "\n"))
5834 (substitute* "Gemfile"
5835 (("gem \"rake\".*")
5836 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
5837 #t)))))
5838 (propagated-inputs
5839 (list ruby-json))
5840 (native-inputs
5841 (list bundler ruby-minitest ruby-hoe))
5842 (synopsis "Generate searchable RDoc documentation")
5843 (description
5844 "SDoc is an RDoc documentation generator to build searchable HTML
5845 documentation for Ruby code.")
5846 (home-page "https://github.com/voloko/sdoc")
5847 (license license:expat)))
5848
5849 (define-public ruby-tins
5850 (package
5851 (name "ruby-tins")
5852 (version "1.29.1")
5853 (source (origin
5854 (method url-fetch)
5855 (uri (rubygems-uri "tins" version))
5856 (sha256
5857 (base32
5858 "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
5859 (build-system ruby-build-system)
5860 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5861 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5862 ;; the gemspec.
5863 (arguments
5864 `(#:tests? #f ; there are no tests
5865 #:phases
5866 (modify-phases %standard-phases
5867 (replace 'build
5868 (lambda _
5869 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5870 ;; causes an error.
5871 (substitute* "tins.gemspec"
5872 (("\"lib/spruz\", ") ""))
5873 (invoke "gem" "build" "tins.gemspec"))))))
5874 (propagated-inputs
5875 (list ruby-sync))
5876 (synopsis "Assorted tools for Ruby")
5877 (description "Tins is a Ruby library providing assorted tools.")
5878 (home-page "https://github.com/flori/tins")
5879 (license license:expat)))
5880
5881 (define-public ruby-gem-hadar
5882 (package
5883 (name "ruby-gem-hadar")
5884 (version "1.11.0")
5885 (source (origin
5886 (method url-fetch)
5887 (uri (rubygems-uri "gem_hadar" version))
5888 (sha256
5889 (base32
5890 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
5891 (build-system ruby-build-system)
5892 ;; This gem needs itself at development time. We disable rebuilding of the
5893 ;; gemspec to avoid this loop.
5894 (arguments
5895 `(#:tests? #f ; there are no tests
5896 #:phases
5897 (modify-phases %standard-phases
5898 (replace 'build
5899 (lambda _
5900 (invoke "gem" "build" "gem_hadar.gemspec"))))))
5901 (propagated-inputs
5902 (list git ruby-tins ruby-yard))
5903 (synopsis "Library for the development of Ruby gems")
5904 (description
5905 "This library contains some useful functionality to support the
5906 development of Ruby gems.")
5907 (home-page "https://github.com/flori/gem_hadar")
5908 (license license:expat)))
5909
5910 (define-public ruby-minitest-tu-shim
5911 (package
5912 (name "ruby-minitest-tu-shim")
5913 (version "1.3.3")
5914 (source (origin
5915 (method url-fetch)
5916 (uri (rubygems-uri "minitest_tu_shim" version))
5917 (sha256
5918 (base32
5919 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5920 (build-system ruby-build-system)
5921 (arguments
5922 `(#:phases
5923 (modify-phases %standard-phases
5924 (add-after 'unpack 'fix-test-include-path
5925 (lambda* (#:key inputs #:allow-other-keys)
5926 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
5927 (substitute* "Rakefile"
5928 (("Hoe\\.add_include_dirs .*")
5929 (string-append "Hoe.add_include_dirs \""
5930 minitest "/lib/ruby/vendor_ruby"
5931 "/gems/minitest-"
5932 ,(package-version ruby-minitest-4)
5933 "/lib" "\""))))
5934 #t))
5935 (add-before 'check 'fix-test-assumptions
5936 (lambda _
5937 ;; The test output includes the file name, so a couple of tests
5938 ;; fail. Changing the regular expressions slightly fixes this
5939 ;; problem.
5940 (substitute* "test/test_mini_test.rb"
5941 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5942 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5943 (("gsub\\(/.*, 'FILE:LINE'\\)")
5944 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5945 #t)))))
5946 (propagated-inputs
5947 `(("ruby-minitest-4" ,ruby-minitest-4)))
5948 (native-inputs
5949 (list ruby-hoe))
5950 (synopsis "Adapter library between minitest and test/unit")
5951 (description
5952 "This library bridges the gap between the small and fast minitest and
5953 Ruby's large and slower test/unit.")
5954 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5955 (license license:expat)))
5956
5957 (define-public ruby-term-ansicolor
5958 (package
5959 (name "ruby-term-ansicolor")
5960 (version "1.7.1")
5961 (source (origin
5962 (method url-fetch)
5963 (uri (rubygems-uri "term-ansicolor" version))
5964 (sha256
5965 (base32
5966 "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
5967 (build-system ruby-build-system)
5968 ;; Rebuilding the gemspec seems to require git, even though this is not a
5969 ;; git repository, so we just build the gem from the existing gemspec.
5970 (arguments
5971 `(#:phases
5972 (modify-phases %standard-phases
5973 (add-after 'unpack 'fix-test
5974 (lambda -
5975 (substitute* "tests/hsl_triple_test.rb"
5976 (("0\\\\\\.0%")
5977 "0\\.?0?%"))))
5978 (replace 'build
5979 (lambda _
5980 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
5981 (propagated-inputs
5982 (list ruby-tins))
5983 (native-inputs
5984 (list ruby-gem-hadar ruby-minitest-tu-shim))
5985 (synopsis "Ruby library to control the attributes of terminal output")
5986 (description
5987 "This Ruby library uses ANSI escape sequences to control the attributes
5988 of terminal output.")
5989 (home-page "https://flori.github.io/term-ansicolor/")
5990 ;; There is no mention of the "or later" clause.
5991 (license license:gpl2)))
5992
5993 (define-public ruby-terraform
5994 (package
5995 (name "ruby-terraform")
5996 (version "0.22.0")
5997 (source
5998 (origin
5999 (method url-fetch)
6000 (uri (rubygems-uri "ruby-terraform" version))
6001 (sha256
6002 (base32
6003 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
6004 (build-system ruby-build-system)
6005 (arguments
6006 '(#:tests? #f)) ; No included tests
6007 (propagated-inputs
6008 (list ruby-lino))
6009 (synopsis "Ruby wrapper around the Terraform command line interface")
6010 (description
6011 "This package provides a Ruby wrapper around the Terraform command line
6012 interface so that Terraform can be more easily invoked from Ruby code.")
6013 (home-page "https://github.com/infrablocks/ruby_terraform")
6014 (license license:expat)))
6015
6016 (define-public ruby-pstree
6017 (package
6018 (name "ruby-pstree")
6019 (version "0.3.0")
6020 (source (origin
6021 (method url-fetch)
6022 (uri (rubygems-uri "pstree" version))
6023 (sha256
6024 (base32
6025 "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
6026 (build-system ruby-build-system)
6027 (native-inputs
6028 (list ruby-gem-hadar bundler))
6029 (synopsis "Create a process tree data structure")
6030 (description
6031 "This library uses the output of the @code{ps} command to create a
6032 process tree data structure for the current host.")
6033 (home-page "https://github.com/flori/pstree")
6034 ;; There is no mention of the "or later" clause.
6035 (license license:gpl2)))
6036
6037 (define-public ruby-utils
6038 (package
6039 (name "ruby-utils")
6040 (version "0.9.0")
6041 (source (origin
6042 (method url-fetch)
6043 (uri (rubygems-uri "utils" version))
6044 (sha256
6045 (base32
6046 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
6047 (build-system ruby-build-system)
6048 (propagated-inputs
6049 (list ruby-tins ruby-term-ansicolor ruby-pstree ruby-pry-editline))
6050 (native-inputs
6051 (list ruby-gem-hadar bundler))
6052 (synopsis "Command line tools for working with Ruby")
6053 (description
6054 "This package provides assorted command line tools that may be useful
6055 when working with Ruby code.")
6056 (home-page "https://github.com/flori/utils")
6057 ;; There is no mention of the "or later" clause.
6058 (license license:gpl2)))
6059
6060 (define-public ruby-jaro-winkler
6061 (package
6062 (name "ruby-jaro-winkler")
6063 (version "1.5.4")
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (rubygems-uri "jaro_winkler" version))
6068 (sha256
6069 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
6070 (build-system ruby-build-system)
6071 (arguments
6072 '(#:tests? #f)) ; no included tests
6073 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
6074 (description
6075 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
6076 algorithm. It is written as a C extension and will fallback to a pure Ruby
6077 implementation on platforms where this is unsupported.")
6078 (home-page "https://github.com/tonytonyjan/jaro_winkler")
6079 (license license:expat)))
6080
6081 (define-public ruby-json
6082 (package
6083 (name "ruby-json")
6084 (version "2.1.0")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (rubygems-uri "json" version))
6089 (sha256
6090 (base32
6091 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
6092 (build-system ruby-build-system)
6093 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
6094 (synopsis "JSON library for Ruby")
6095 (description "This Ruby library provides a JSON implementation written as
6096 a native C extension.")
6097 (home-page "http://json-jruby.rubyforge.org/")
6098 (license (list license:ruby license:gpl2)))) ; GPL2 only
6099
6100 (define-public ruby-json-pure
6101 (package
6102 (name "ruby-json-pure")
6103 (version "2.3.1")
6104 (source (origin
6105 (method url-fetch)
6106 (uri (rubygems-uri "json_pure" version))
6107 (sha256
6108 (base32
6109 "00pziwkfqwk8vj19s65sdki31q1wvmf5v9b3sfglxm94qfvas1lx"))))
6110 (build-system ruby-build-system)
6111 (arguments
6112 `(#:phases
6113 (modify-phases %standard-phases
6114 (add-after 'unpack 'fix-rakefile
6115 (lambda _
6116 (substitute* "Rakefile"
6117 ;; Since this is not a git repository, do not call 'git'.
6118 (("`git ls-files`") "`find . -type f |sort`")))))))
6119 (native-inputs
6120 (list bundler ragel ruby-simplecov ruby-test-unit which))
6121 (synopsis "JSON implementation in pure Ruby")
6122 (description
6123 "This package provides a JSON implementation written in pure Ruby.")
6124 (home-page "https://flori.github.com/json/")
6125 (license license:ruby)))
6126
6127 (define-public ruby-jwt
6128 (package
6129 (name "ruby-jwt")
6130 (version "2.1.0")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (rubygems-uri "jwt" version))
6135 (sha256
6136 (base32
6137 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
6138 (build-system ruby-build-system)
6139 (arguments
6140 '(#:test-target "test"
6141 #:phases
6142 (modify-phases %standard-phases
6143 (add-after 'unpack 'remove-unnecessary-dependencies
6144 (lambda _
6145 (substitute* "spec/spec_helper.rb"
6146 (("require 'simplecov.*") "\n")
6147 ;; Use [].each to disable running the SimpleCov configuration
6148 ;; block
6149 (("SimpleCov\\.configure") "[].each")
6150 (("require 'codeclimate-test-reporter'") "")
6151 (("require 'codacy-coverage'") "")
6152 (("Codacy::Reporter\\.start") ""))
6153 #t)))))
6154 (native-inputs
6155 (list bundler ruby-rspec ruby-rbnacl))
6156 (synopsis "Ruby implementation of the JSON Web Token standard")
6157 (description
6158 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
6159 @acronym{JWT, JSON Web Token} standard.")
6160 (home-page "https://github.com/jwt/ruby-jwt")
6161 (license license:expat)))
6162
6163 ;; Even though this package only provides bindings for a Mac OSX API it is
6164 ;; required by "ruby-listen" at runtime.
6165 (define-public ruby-rb-fsevent
6166 (package
6167 (name "ruby-rb-fsevent")
6168 (version "0.10.3")
6169 (source (origin
6170 (method url-fetch)
6171 (uri (rubygems-uri "rb-fsevent" version))
6172 (sha256
6173 (base32
6174 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
6175 (build-system ruby-build-system)
6176 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
6177 ;; "listen", which needs "rb-fsevent" at runtime.
6178 (arguments `(#:tests? #f))
6179 (synopsis "FSEvents API with signals catching")
6180 (description
6181 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
6182 (home-page "https://rubygems.org/gems/rb-fsevent")
6183 (license license:expat)))
6184
6185 (define-public ruby-listen
6186 (package
6187 (name "ruby-listen")
6188 (version "3.2.0")
6189 (source
6190 (origin
6191 ;; The gem does not include a Rakefile, so fetch from the Git
6192 ;; repository.
6193 (method git-fetch)
6194 (uri (git-reference
6195 (url "https://github.com/guard/listen")
6196 (commit (string-append "v" version))))
6197 (file-name (git-file-name name version))
6198 (sha256
6199 (base32
6200 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
6201 (build-system ruby-build-system)
6202 (arguments
6203 `(#:test-target "spec"
6204 #:phases
6205 (modify-phases %standard-phases
6206 (add-after 'unpack 'fix-files-in-gemspec
6207 (lambda _
6208 (substitute* "listen.gemspec"
6209 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
6210 #t))
6211 (add-before 'check 'remove-unnecessary-dependencies'
6212 (lambda _
6213 (substitute* "Rakefile"
6214 ;; Rubocop is for code linting, and is unnecessary for running
6215 ;; the tests.
6216 ((".*rubocop.*") ""))
6217 #t)))))
6218 (native-inputs
6219 (list bundler ruby-rspec))
6220 (inputs
6221 (list ;; ruby-thor is used for the command line interface, and is referenced
6222 ;; in the wrapper, and therefore just needs to be an input.
6223 ruby-thor))
6224 (propagated-inputs
6225 (list ruby-rb-fsevent ruby-rb-inotify ruby-dep))
6226 (synopsis "Listen to file modifications")
6227 (description "The Listen gem listens to file modifications and notifies
6228 you about the changes.")
6229 (home-page "https://github.com/guard/listen")
6230 (license license:expat)))
6231
6232 (define-public ruby-loofah
6233 (package
6234 (name "ruby-loofah")
6235 (version "2.13.0")
6236 (home-page "https://github.com/flavorjones/loofah")
6237 (source
6238 (origin
6239 ;; Build from git because the gem lacks tests.
6240 (method git-fetch)
6241 (uri (git-reference (url home-page)
6242 (commit (string-append "v" version))))
6243 (file-name (git-file-name name version))
6244 (sha256
6245 (base32
6246 "0rmsm7mckiq0gslfqdl02yvn500n42v84gq28qjqn4yq9jwfs9ga"))))
6247 (build-system ruby-build-system)
6248 (native-inputs
6249 (list ruby-hoe ruby-hoe-markdown ruby-rr))
6250 (propagated-inputs
6251 (list ruby-nokogiri ruby-crass))
6252 (synopsis "Ruby library for manipulating and transforming HTML/XML")
6253 (description
6254 "Loofah is a general library for manipulating and transforming HTML/XML
6255 documents and fragments. It's built on top of Nokogiri and libxml2.")
6256 (license license:expat)))
6257
6258 (define-public ruby-activesupport
6259 (package
6260 (name "ruby-activesupport")
6261 (version "6.1.3")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (rubygems-uri "activesupport" version))
6266 (sha256
6267 (base32
6268 "00a4db64g8w5yyk6hzak2nqrmdfvyh5zc9cvnm9gglwbi87ss28h"))))
6269 (build-system ruby-build-system)
6270 (arguments
6271 `(#:phases
6272 (modify-phases %standard-phases
6273 (replace 'check
6274 (lambda _
6275 ;; There are no tests, instead attempt to load the library.
6276 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
6277 (propagated-inputs
6278 (list ruby-concurrent
6279 ruby-i18n
6280 ruby-minitest
6281 ruby-tzinfo
6282 ruby-tzinfo-data
6283 ruby-zeitwerk))
6284 (synopsis "Ruby on Rails utility library")
6285 (description "ActiveSupport is a toolkit of support libraries and Ruby
6286 core extensions extracted from the Rails framework. It includes support for
6287 multibyte strings, internationalization, time zones, and testing.")
6288 (home-page "https://www.rubyonrails.org")
6289 (license license:expat)))
6290
6291 (define-public ruby-crass
6292 (package
6293 (name "ruby-crass")
6294 (version "1.0.6")
6295 (home-page "https://github.com/rgrove/crass")
6296 (source (origin
6297 ;; The gem does not contain tests, so pull from git.
6298 (method git-fetch)
6299 (uri (git-reference
6300 (url home-page)
6301 (commit (string-append "v" version))))
6302 (file-name (git-file-name name version))
6303 (sha256
6304 (base32
6305 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
6306 (build-system ruby-build-system)
6307 (synopsis "Pure Ruby CSS parser")
6308 (description
6309 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
6310 (license license:expat)))
6311
6312 (define-public ruby-nokogumbo
6313 (package
6314 (name "ruby-nokogumbo")
6315 (version "2.0.2")
6316 (source (origin
6317 ;; We use the git reference, because there's no Rakefile in the
6318 ;; published gem and the tarball on Github is outdated.
6319 (method git-fetch)
6320 (uri (git-reference
6321 (url "https://github.com/rubys/nokogumbo")
6322 (commit (string-append "v" version))))
6323 (file-name (string-append name "-" version "-checkout"))
6324 (sha256
6325 (base32
6326 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
6327 (build-system ruby-build-system)
6328 (native-inputs
6329 (list ruby-rake-compiler))
6330 (inputs
6331 (list gumbo-parser))
6332 (propagated-inputs
6333 (list ruby-nokogiri))
6334 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
6335 (description
6336 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
6337 access the result as a Nokogiri parsed document.")
6338 (home-page "https://github.com/rubys/nokogumbo/")
6339 (license license:asl2.0)))
6340
6341 (define-public ruby-sanitize
6342 (package
6343 (name "ruby-sanitize")
6344 (version "5.1.0")
6345 (home-page "https://github.com/rgrove/sanitize")
6346 (source (origin
6347 (method git-fetch)
6348 ;; The gem does not include the Rakefile, so we download the
6349 ;; source from Github.
6350 (uri (git-reference
6351 (url home-page)
6352 (commit (string-append "v" version))))
6353 (file-name (git-file-name name version))
6354 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
6355 (sha256
6356 (base32
6357 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
6358 (build-system ruby-build-system)
6359 (propagated-inputs
6360 (list ruby-crass ruby-nokogiri ruby-nokogumbo))
6361 (native-inputs
6362 (list ruby-minitest))
6363 (synopsis "Whitelist-based HTML and CSS sanitizer")
6364 (description
6365 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
6366 acceptable elements, attributes, and CSS properties, Sanitize will remove all
6367 unacceptable HTML and/or CSS from a string.")
6368 (license license:expat)))
6369
6370 (define-public ruby-sync
6371 (package
6372 (name "ruby-sync")
6373 (version "0.5.0")
6374 (source
6375 (origin
6376 (method url-fetch)
6377 (uri (rubygems-uri "sync" version))
6378 (sha256
6379 (base32
6380 "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
6381 (build-system ruby-build-system)
6382 (synopsis "Ruby module with a two-phase lock and counter")
6383 (description "This package provides a Ruby module that provides a two-phase
6384 lock with a counter.")
6385 (home-page "https://github.com/ruby/sync")
6386 (license license:bsd-2)))
6387
6388 (define-public ruby-oj
6389 (package
6390 (name "ruby-oj")
6391 (version "3.13.9")
6392 (source
6393 (origin
6394 (method git-fetch)
6395 ;; Version on rubygems.org does not contain Rakefile, so download from
6396 ;; GitHub instead.
6397 (uri (git-reference
6398 (url "https://github.com/ohler55/oj")
6399 (commit (string-append "v" version))))
6400 (file-name (git-file-name name version))
6401 (sha256
6402 (base32
6403 "0a24zd28y58nyhjxgrpn2k9p72vzj3zbmdrcsbhwbdycj7nn9fpd"))))
6404 (build-system ruby-build-system)
6405 (arguments
6406 '(#:test-target "test_all"
6407 #:phases
6408 (modify-phases %standard-phases
6409 (add-before 'check 'disable-bundler
6410 (lambda _
6411 (substitute* "Rakefile"
6412 (("Bundler\\.with_clean_env") "1.times")
6413 (("bundle exec ") "")))))))
6414 (native-inputs
6415 (list bundler ruby-rspec ruby-rake-compiler))
6416 (synopsis "JSON parser for Ruby optimized for speed")
6417 (description
6418 "Oj is a JSON parser and generator for Ruby, where the encoding and
6419 decoding of JSON is implemented as a C extension to Ruby.")
6420 (home-page "http://www.ohler.com/oj/")
6421 (license (list license:expat ; Ruby code
6422 license:bsd-3)))) ; extension code
6423
6424 (define-public ruby-ox
6425 (package
6426 (name "ruby-ox")
6427 (version "2.6.0")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (rubygems-uri "ox" version))
6432 (sha256
6433 (base32
6434 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
6435 (build-system ruby-build-system)
6436 (arguments
6437 '(#:tests? #f)) ; no tests
6438 (synopsis "Optimized XML library for Ruby")
6439 (description
6440 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
6441 written as a native C extension. It was designed to be an alternative to
6442 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
6443 alternative to Marshal for Object serialization.")
6444 (home-page "http://www.ohler.com/ox")
6445 (license license:expat)))
6446
6447 (define-public ruby-redcloth
6448 (package
6449 (name "ruby-redcloth")
6450 (version "4.3.2")
6451 (source (origin
6452 (method url-fetch)
6453 (uri (rubygems-uri "RedCloth" version))
6454 (sha256
6455 (base32
6456 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
6457 (build-system ruby-build-system)
6458 (arguments
6459 `(#:tests? #f ; no tests
6460 #:phases
6461 (modify-phases %standard-phases
6462 ;; Redcloth has complicated rake tasks to build various versions for
6463 ;; multiple targets using RVM. We don't want this so we just use the
6464 ;; existing gemspec.
6465 (replace 'build
6466 (lambda _
6467 (invoke "gem" "build" "redcloth.gemspec"))))))
6468 (native-inputs
6469 `(("bundler" ,bundler)
6470 ("ruby-diff-lcs" ,ruby-diff-lcs)
6471 ("ruby-rspec-2" ,ruby-rspec-2)))
6472 (synopsis "Textile markup language parser for Ruby")
6473 (description
6474 "RedCloth is a Ruby parser for the Textile markup language.")
6475 (home-page "http://redcloth.org")
6476 (license license:expat)))
6477
6478 (define-public ruby-pg
6479 (package
6480 (name "ruby-pg")
6481 (version "1.3.5")
6482 (home-page "https://github.com/ged/ruby-pg")
6483 (source
6484 (origin
6485 (method git-fetch)
6486 (uri (git-reference
6487 (url home-page)
6488 (commit (string-append "v" version))))
6489 (file-name (git-file-name name version))
6490 (sha256
6491 (base32
6492 "0c2k2cibd5wwdhva68j5hhfpybm3wmvn2ym4ppn5mqmddwkjkvnk"))))
6493 (build-system ruby-build-system)
6494 (arguments
6495 (list
6496 #:test-target "spec"
6497 #:phases
6498 #~(modify-phases %standard-phases
6499 (add-after 'unpack 'disable-failing-tests
6500 (lambda _
6501 ;; These tests fail because DNS is unavailable, giving an
6502 ;; unexpected fallback executable in the connection string.
6503 (substitute* "spec/pg/connection_spec.rb"
6504 (("it (\"accepts an URI and adds( proper)? hostaddr\")" test)
6505 (string-append "xit " test))
6506 (("it \"can create a connection option string from an option\
6507 string and a hash\"" test)
6508 (string-append "xit " test)))))
6509 (add-before 'build 'compile
6510 (lambda _
6511 (invoke "rake" "compile")))
6512 ;; Some tests rely on postgresql_lib_path.rb, but it is not
6513 ;; available until the gem is installed. Run tests after
6514 ;; installing to work around it.
6515 (delete 'check)
6516 (add-after 'install 'check
6517 (lambda* (#:key tests? #:allow-other-keys)
6518 (let ((new-gem (string-append #$output
6519 "/lib/ruby/vendor_ruby")))
6520 (setenv "GEM_PATH"
6521 (string-append (getenv "GEM_PATH") ":" new-gem))
6522 (when tests?
6523 (invoke "rspec"))))))))
6524 (native-inputs
6525 (list ruby-rake-compiler ruby-hoe ruby-rspec))
6526 (inputs
6527 (list postgresql))
6528 (synopsis "Ruby interface to PostgreSQL")
6529 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
6530 with PostgreSQL 9.0 and later.")
6531 (license license:ruby)))
6532
6533 (define-public ruby-byebug
6534 (package
6535 (name "ruby-byebug")
6536 (version "11.1.3")
6537 (source
6538 (origin
6539 (method git-fetch)
6540 (uri (git-reference
6541 (url "https://github.com/deivid-rodriguez/byebug")
6542 (commit (string-append "v" version))))
6543 (file-name (git-file-name name version))
6544 (sha256
6545 (base32
6546 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6547 (modules '((guix build utils)))
6548 (snippet
6549 '(begin
6550 ;; Remove wrappers that try to setup a bundle environment.
6551 (with-directory-excursion "bin"
6552 (for-each delete-file '("bundle" "rake" "rubocop"))
6553 ;; ruby-minitest doesn't come with a launcher, so fix the one
6554 ;; provided.
6555 (substitute* "minitest"
6556 (("load File\\.expand_path\\(\"bundle\".*") "")
6557 (("require \"bundler/setup\".*") "")))
6558 #t))))
6559 (build-system ruby-build-system)
6560 (arguments
6561 `(#:phases
6562 (modify-phases %standard-phases
6563 (add-after 'unpack 'skip-tmp-path-sensitive-test
6564 (lambda _
6565 (substitute* "test/commands/where_test.rb"
6566 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6567 "unless true\n"))
6568 #t))
6569 (add-before 'build 'compile
6570 (lambda _
6571 (invoke "rake" "compile")))
6572 (add-before 'check 'disable-misbehaving-test
6573 ;; Expects 5, gets 162. From a file containing ~10 lines.
6574 (lambda _
6575 (substitute* "test/commands/finish_test.rb"
6576 (("test_finish_inside_autoloaded_files")
6577 "finish_inside_autoloaded_files"))))
6578 (add-before 'check 'set-home
6579 (lambda _
6580 (setenv "HOME" (getcwd))
6581 #t)))))
6582 (native-inputs
6583 (list bundler
6584 ruby-chandler
6585 ruby-minitest
6586 ruby-pry
6587 ruby-rake-compiler
6588 ruby-rubocop
6589 ruby-yard))
6590 (synopsis "Debugger for Ruby 2")
6591 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6592 TracePoint C API for execution control and the Debug Inspector C API for call
6593 stack navigation. The core component provides support that front-ends can
6594 build on. It provides breakpoint handling and bindings for stack frames among
6595 other things and it comes with a command line interface.")
6596 (home-page "https://github.com/deivid-rodriguez/byebug")
6597 (license license:bsd-2)))
6598
6599 (define-public ruby-netrc
6600 (package
6601 (name "ruby-netrc")
6602 (version "0.11.0")
6603 (source (origin
6604 (method url-fetch)
6605 (uri (rubygems-uri "netrc" version))
6606 (sha256
6607 (base32
6608 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6609 (build-system ruby-build-system)
6610 (arguments
6611 `(#:phases
6612 (modify-phases %standard-phases
6613 (replace 'check
6614 ;; There is no Rakefile and minitest can only run one file at once,
6615 ;; so we have to iterate over all test files.
6616 (lambda _
6617 (for-each (lambda (file)
6618 (invoke "ruby" "-Itest" file))
6619 (find-files "./test" "test_.*\\.rb"))))
6620 (add-before 'check 'patch-tests-for-newer-ruby
6621 (lambda _
6622 (substitute* "test/test_netrc.rb"
6623 (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
6624 (native-inputs
6625 (list ruby-minitest))
6626 (synopsis "Library to read and update netrc files")
6627 (description
6628 "This library can read and update netrc files, preserving formatting
6629 including comments and whitespace.")
6630 (home-page "https://github.com/geemus/netrc")
6631 (license license:expat)))
6632
6633 (define-public ruby-unf-ext
6634 (package
6635 (name "ruby-unf-ext")
6636 (version "0.0.7.6")
6637 (source (origin
6638 (method url-fetch)
6639 (uri (rubygems-uri "unf_ext" version))
6640 (sha256
6641 (base32
6642 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
6643 (build-system ruby-build-system)
6644 (arguments
6645 `(#:phases
6646 (modify-phases %standard-phases
6647 (add-after 'build 'build-ext
6648 (lambda _ (invoke "rake" "compile:unf_ext")))
6649 (add-before 'check 'lose-rake-compiler-dock-dependency
6650 (lambda _
6651 ;; rake-compiler-dock is listed in the gemspec, but only
6652 ;; required when cross-compiling.
6653 (substitute* "unf_ext.gemspec"
6654 ((".*rake-compiler-dock.*") ""))
6655 #t)))))
6656 (native-inputs
6657 (list bundler ruby-rake-compiler ruby-test-unit))
6658 (synopsis "Unicode normalization form support library")
6659 (description
6660 "This package provides unicode normalization form support for Ruby.")
6661 (home-page "https://github.com/knu/ruby-unf_ext")
6662 (license license:expat)))
6663
6664 (define-public ruby-tdiff
6665 ;; Use a newer than released snapshot so that rspec-2 is not required.
6666 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6667 (package
6668 (name "ruby-tdiff")
6669 (version (string-append "0.3.3-1." (string-take commit 8)))
6670 (source (origin
6671 (method git-fetch)
6672 (uri (git-reference
6673 (url "https://github.com/postmodern/tdiff")
6674 (commit commit)))
6675 (file-name (string-append name "-" version "-checkout"))
6676 (sha256
6677 (base32
6678 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6679 (build-system ruby-build-system)
6680 (native-inputs
6681 (list ruby-rspec ruby-yard ruby-rubygems-tasks))
6682 (synopsis "Calculate the differences between two tree-like structures")
6683 (description
6684 "This library provides functions to calculate the differences between two
6685 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
6686 (home-page "https://github.com/postmodern/tdiff")
6687 (license license:expat))))
6688
6689 (define-public ruby-nokogiri-diff
6690 ;; Use a newer than released snapshot so that rspec-2 is not required.
6691 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6692 (package
6693 (name "ruby-nokogiri-diff")
6694 (version (string-append "0.2.0-1." (string-take commit 8)))
6695 (source (origin
6696 (method git-fetch)
6697 (uri (git-reference
6698 (url "https://github.com/postmodern/nokogiri-diff")
6699 (commit commit)))
6700 (file-name (string-append name "-" version "-checkout"))
6701 (sha256
6702 (base32
6703 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6704 (build-system ruby-build-system)
6705 (propagated-inputs
6706 (list ruby-tdiff
6707 ruby-nokogiri))
6708 (native-inputs
6709 (list ruby-rspec ruby-yard ruby-rubygems-tasks))
6710 (synopsis "Calculate the differences between two XML/HTML documents")
6711 (description
6712 "@code{Nokogiri::Diff} adds the ability to calculate the
6713 differences (added or removed nodes) between two XML/HTML documents.")
6714 (home-page "https://github.com/postmodern/nokogiri-diff")
6715 (license license:expat))))
6716
6717 (define-public ruby-racc
6718 (package
6719 (name "ruby-racc")
6720 (version "1.5.2")
6721 (source
6722 (origin
6723 (method url-fetch)
6724 (uri (rubygems-uri "racc" version))
6725 (sha256
6726 (base32
6727 "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
6728 (build-system ruby-build-system)
6729 (arguments
6730 `(#:tests? #f)) ; Fails while parsing test instructions.
6731 (native-inputs
6732 (list ruby-hoe ruby-rake-compiler))
6733 (synopsis "LALR(1) parser generator for Ruby")
6734 (description
6735 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6736 generates Ruby program.")
6737 (home-page "https://i.loveruby.net/en/projects/racc/")
6738 (license (list
6739 ;; Generally licensed under the LGPL2.1, and some files also
6740 ;; available under the same license as Ruby.
6741 license:lgpl2.1
6742 license:ruby))))
6743
6744 (define-public ruby-rack
6745 (package
6746 (name "ruby-rack")
6747 (version "2.2.3")
6748 (source
6749 (origin
6750 (method git-fetch)
6751 ;; Download from GitHub so that the snippet can be applied and tests run.
6752 (uri (git-reference
6753 (url "https://github.com/rack/rack")
6754 (commit version)))
6755 (file-name (git-file-name name version))
6756 (sha256
6757 (base32
6758 "1qrm5z5v586738bnkr9188dvz0s25nryw6sgvx18jjlkizayw1g4"))
6759 ;; Ignore test which fails inside the build environment but works
6760 ;; outside.
6761 (modules '((guix build utils)))
6762 (snippet
6763 '(begin (substitute* "test/spec_files.rb"
6764 (("res.body.must_equal expected_body") ""))
6765 #t))))
6766 (build-system ruby-build-system)
6767 (arguments
6768 '(#:phases
6769 (modify-phases %standard-phases
6770 (add-before 'check 'fix-tests
6771 (lambda _
6772 ;; A few of the tests use the length of a file on disk for
6773 ;; Content-Length and Content-Range headers. However, this file
6774 ;; has a shebang in it which an earlier phase patches, growing
6775 ;; the file size from 193 to 239 bytes when the store prefix is
6776 ;; "/gnu/store".
6777 (let ((size-diff (- (string-length (which "ruby"))
6778 (string-length "/usr/bin/env ruby"))))
6779 (substitute* '("test/spec_files.rb")
6780 (("208" bytes)
6781 (number->string (+ (string->number bytes) size-diff)))
6782 (("bytes(.)22-33" all delimiter)
6783 (string-append "bytes"
6784 delimiter
6785 (number->string (+ 22 size-diff))
6786 "-"
6787 (number->string (+ 33 size-diff))))))
6788 #t)))))
6789 (native-inputs
6790 (list ruby-minitest ruby-minitest-global-expectations))
6791 (synopsis "Unified web application interface for Ruby")
6792 (description "Rack provides a minimal, modular and adaptable interface for
6793 developing web applications in Ruby. By wrapping HTTP requests and responses,
6794 it unifies the API for web servers, web frameworks, and software in between
6795 into a single method call.")
6796 (home-page "https://rack.github.io/")
6797 (license license:expat)))
6798
6799 (define-public ruby-rack-test
6800 (package
6801 (name "ruby-rack-test")
6802 (version "0.8.3")
6803 (source
6804 (origin
6805 (method url-fetch)
6806 (uri (rubygems-uri "rack-test" version))
6807 (sha256
6808 (base32
6809 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6810 (build-system ruby-build-system)
6811 (arguments
6812 ;; Disable tests because of circular dependencies: requires sinatra,
6813 ;; which requires rack-protection, which requires rack-test. Instead
6814 ;; simply require the library.
6815 `(#:phases
6816 (modify-phases %standard-phases
6817 (replace 'check
6818 (lambda _
6819 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6820 (propagated-inputs
6821 (list ruby-rack))
6822 (synopsis "Testing API for Rack applications")
6823 (description
6824 "Rack::Test is a small, simple testing API for Rack applications. It can
6825 be used on its own or as a reusable starting point for Web frameworks and
6826 testing libraries to build on.")
6827 (home-page "https://github.com/rack-test/rack-test")
6828 (license license:expat)))
6829
6830 (define-public ruby-rack-protection
6831 (package
6832 (name "ruby-rack-protection")
6833 (version "2.0.8.1")
6834 (source
6835 (origin
6836 (method url-fetch)
6837 (uri (rubygems-uri "rack-protection" version))
6838 (sha256
6839 (base32
6840 "1zyj97bfr1shfgwk4ddmdbw0mdkm4qdyh9s1hl0k7accf3kxx1yi"))))
6841 (build-system ruby-build-system)
6842 (arguments
6843 '(;; Tests missing from the gem.
6844 #:tests? #f))
6845 (propagated-inputs
6846 (list ruby-rack))
6847 (native-inputs
6848 (list bundler ruby-rspec-2 ruby-rack-test))
6849 (synopsis "Rack middleware that protects against typical web attacks")
6850 (description "Rack middleware that can be used to protect against typical
6851 web attacks. It can protect all Rack apps, including Rails. For instance, it
6852 protects against cross site request forgery, cross site scripting,
6853 clickjacking, directory traversal, session hijacking and IP spoofing.")
6854 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6855 (license license:expat)))
6856
6857 (define-public ruby-rainbow
6858 (package
6859 (name "ruby-rainbow")
6860 (version "3.0.0")
6861 (source
6862 (origin
6863 (method url-fetch)
6864 (uri (rubygems-uri "rainbow" version))
6865 (sha256
6866 (base32
6867 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6868 (build-system ruby-build-system)
6869 (arguments
6870 '(#:phases
6871 (modify-phases %standard-phases
6872 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6873 ;; the Rakefile.
6874 (replace 'check
6875 (lambda* (#:key tests? #:allow-other-keys)
6876 (when tests?
6877 (invoke "rspec"))
6878 #t)))))
6879 (native-inputs
6880 (list bundler ruby-rspec))
6881 (synopsis "Colorize printed text on ANSI terminals")
6882 (description
6883 "@code{rainbow} provides a string presenter object to colorize strings by
6884 wrapping them in ANSI escape codes.")
6885 (home-page "https://github.com/sickill/rainbow")
6886 (license license:expat)))
6887
6888 (define-public ruby-rr
6889 (package
6890 (name "ruby-rr")
6891 (version "1.2.1")
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (rubygems-uri "rr" version))
6896 (sha256
6897 (base32
6898 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6899 (build-system ruby-build-system)
6900 (arguments
6901 '(#:tests? #f)) ; test files not included
6902 (native-inputs
6903 (list bundler ruby-rspec))
6904 (synopsis "Ruby test double framework")
6905 (description
6906 "RR is a test double framework that features a rich selection of double
6907 techniques and a terse syntax.")
6908 (home-page "https://rr.github.io/rr/")
6909 (license license:expat)))
6910
6911 (define-public ruby-rest-client
6912 (package
6913 (name "ruby-rest-client")
6914 (version "2.0.2")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (rubygems-uri "rest-client" version))
6919 (sha256
6920 (base32
6921 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6922 (build-system ruby-build-system)
6923 (arguments
6924 '(#:phases
6925 (modify-phases %standard-phases
6926 (add-before 'check 'remove-unnecessary-development-dependencies
6927 (lambda _
6928 (substitute* "rest-client.gemspec"
6929 ;; Remove rubocop as it's unused. Rubocop also indirectly
6930 ;; depends on this package through ruby-parser and ruby-ast so
6931 ;; this avoids a dependency loop.
6932 ((".*rubocop.*") "\n")
6933 ;; Remove pry as it's unused, it's a debugging tool
6934 ((".*pry.*") "\n")
6935 ;; Remove an unnecessarily strict rdoc dependency
6936 ((".*rdoc.*") "\n"))
6937 #t))
6938 (add-before 'check 'delete-network-dependent-tests
6939 (lambda _
6940 (delete-file "spec/integration/request_spec.rb")
6941 (delete-file "spec/integration/httpbin_spec.rb")
6942 #t)))))
6943 (propagated-inputs
6944 (list ruby-http-cookie ruby-mime-types ruby-netrc))
6945 (native-inputs
6946 (list bundler ruby-webmock-2 ruby-rspec))
6947 (synopsis "Simple HTTP and REST client for Ruby")
6948 (description
6949 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6950 inspired by the Sinatra microframework style of specifying actions:
6951 @code{get}, @code{put}, @code{post}, @code{delete}.")
6952 (home-page "https://github.com/rest-client/rest-client")
6953 (license license:expat)))
6954
6955 (define-public ruby-rubocop-ast
6956 (package
6957 (name "ruby-rubocop-ast")
6958 (version "1.4.1")
6959 (source
6960 (origin
6961 (method git-fetch) ;no test suite in distributed gem
6962 (uri (git-reference
6963 (url "https://github.com/rubocop-hq/rubocop-ast")
6964 (commit (string-append "v" version))))
6965 (file-name (git-file-name name version))
6966 (sha256
6967 (base32
6968 "1x2m7k4bn4zvvwmj7imzmv0dav6xnrbcvssad1m5lkprx7h5lzkq"))))
6969 (build-system ruby-build-system)
6970 (arguments
6971 `(#:test-target "spec"
6972 #:phases (modify-phases %standard-phases
6973 (add-before 'build 'generate-lexer
6974 (lambda _
6975 (setenv "RUBOCOP_VERSION" "none")
6976 (invoke "rake" "generate")))
6977 (replace 'replace-git-ls-files
6978 (lambda _
6979 (substitute* "rubocop-ast.gemspec"
6980 (("`git ls-files(.*)`" _ files)
6981 (format #f "`find ~a -type f| sort`" files)))
6982 #t)))))
6983 (native-inputs
6984 (list ruby-bump
6985 ruby-oedipus-lex
6986 ruby-pry
6987 ruby-racc
6988 ruby-rake
6989 ruby-rspec
6990 ruby-simplecov))
6991 (propagated-inputs
6992 (list ruby-parser))
6993 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6994 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6995 by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6996 @itemize
6997 @item @code{RuboCop::AST::Node}
6998 @item @code{RuboCop::AST::NodePattern}
6999 @end itemize")
7000 (home-page "https://rubocop.org/")
7001 (license license:expat)))
7002
7003 (define-public ruby-rexml
7004 (package
7005 (name "ruby-rexml")
7006 (version "3.2.5")
7007 (source
7008 (origin
7009 (method git-fetch) ;no tests in distributed gem
7010 (uri (git-reference
7011 (url "https://github.com/ruby/rexml")
7012 (commit (string-append "v" version))))
7013 (file-name (git-file-name name version))
7014 (sha256
7015 (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
7016 (build-system ruby-build-system)
7017 (synopsis "XML toolkit for Ruby")
7018 (description "Inspired by Electric XML library for Java, REXML aims to be
7019 easy-to-use API, small and fast. It supports both tree and stream document
7020 parsing.")
7021 (home-page "https://github.com/ruby/rexml")
7022 (license license:bsd-2)))
7023
7024 (define-public ruby-character-set
7025 (package
7026 (name "ruby-character-set")
7027 (version "1.4.0")
7028 (source
7029 (origin
7030 (method url-fetch)
7031 (uri (rubygems-uri "character_set" version))
7032 (sha256
7033 (base32
7034 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
7035 (build-system ruby-build-system)
7036 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
7037 (synopsis "Ruby library to manipulate Unicode")
7038 (description "CharacterSet is a C-extended Ruby library to work with sets
7039 of Unicode code points. It can read and write these sets in various formats
7040 and implements the @code{stdlib} @code{Set} interface for them. It also
7041 offers an alternate paradigm of @code{String} processing which grants much
7042 better performance than @code{Regexp} and @code{String} methods from the
7043 @code{stdlib} where applicable. Many parts can be used independently, e.g.:
7044 @itemize
7045 @item @code{CharacterSet::Character}
7046 @item @code{CharacterSet::Parser}
7047 @item @code{CharacterSet::Writer}
7048 @item @code{RangeCompressor}
7049 @end itemize")
7050 (home-page "https://github.com/jaynetics/character_set")
7051 (license license:expat)))
7052
7053 (define-public ruby-range-compressor
7054 (package
7055 (name "ruby-range-compressor")
7056 (version "1.0.0")
7057 (source
7058 (origin
7059 (method git-fetch)
7060 (uri (git-reference
7061 (url "https://github.com/janosch-x/range_compressor")
7062 (commit (string-append "v" version))))
7063 (file-name (git-file-name name version))
7064 (sha256
7065 (base32
7066 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
7067 (build-system ruby-build-system)
7068 (arguments
7069 `(#:test-target "spec"
7070 #:phases (modify-phases %standard-phases
7071 (add-after 'extract-gemspec 'strip-version-requirements
7072 (lambda _
7073 (substitute* "range_compressor.gemspec"
7074 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7075 (string-append stripped "\n")))
7076 #t)))))
7077 (native-inputs
7078 (list ruby-rspec))
7079 (synopsis "Simple arrays of objects to arrays of ranges compressor")
7080 (description "RangeCompresses is a tiny library that allows compressing
7081 arrays of objects into arrays of ranges. For example, it can turn the
7082 following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
7083 (home-page "https://github.com/janosch-x/range_compressor")
7084 (license license:expat)))
7085
7086 (define-public ruby-regexp-property-values
7087 (let ((commit "03007a66c912949a7130b973cc0eca109c20811f")
7088 (revision "1"))
7089 (package
7090 (name "ruby-regexp-property-values")
7091 (version (git-version "1.0.0" revision commit))
7092 (source
7093 (origin
7094 (method git-fetch)
7095 (uri (git-reference ;no test suite in distributed gem
7096 (url "https://github.com/jaynetics/regexp_property_values")
7097 (commit commit)))
7098 (file-name (git-file-name name version))
7099 (sha256
7100 (base32
7101 "1zsax784p16zdkf60lyq9z924zvsafhx9ckxx9srsgkyiqrifi1s"))))
7102 (build-system ruby-build-system)
7103 (arguments
7104 '(#:test-target "default"))
7105 (native-inputs
7106 (list ruby-character-set ruby-rake ruby-rake-compiler
7107 ruby-range-compressor ruby-rspec))
7108 (synopsis "Inspect Ruby's regex engine property values")
7109 (description "This small library lets you see which property values are
7110 supported by the regular expression engine of the Ruby version you are running
7111 and can directly read out their code point ranges. In other words, it
7112 determines all supported values for @code{\\p{value}} expressions and what
7113 they match.")
7114 (home-page "https://github.com/jaynetics/regexp_property_values")
7115 (license license:expat))))
7116
7117 (define-public ruby-regexp-parser
7118 (package
7119 (name "ruby-regexp-parser")
7120 (version "2.0.0")
7121 (source
7122 (origin
7123 (method git-fetch) ;bin/test missing from gem
7124 (uri (git-reference
7125 (url "https://github.com/ammar/regexp_parser")
7126 (commit (string-append "v" version))))
7127 (file-name (git-file-name name version))
7128 (sha256
7129 (base32
7130 "09ddxdwlml30q6j4rqf06bbjj1mwx00rs0bksnyblhv85anrqz3k"))))
7131 (build-system ruby-build-system)
7132 (arguments
7133 '(#:test-target "default"
7134 #:phases (modify-phases %standard-phases
7135 (add-before 'build 'compile-scanner.rb
7136 (lambda _
7137 (invoke "rake" "build")
7138 ;; XXX: This is needed otherwise the install
7139 ;; phase fails to delete the installed cached
7140 ;; gem file.
7141 (delete-file-recursively "pkg")
7142 #t)))))
7143 (native-inputs
7144 (list ragel ruby-regexp-property-values ruby-rspec))
7145 (synopsis "Regular expression parser library for Ruby")
7146 (description "A Ruby gem for tokenizing, parsing, and transforming regular
7147 expressions. It comprises the following components:
7148 @itemize
7149 @item A scanner/tokenizer based on Ragel,
7150 @item A lexer that produces a stream of token objects,
7151 @item A parser that produces a tree of Expression objects.
7152 @end itemize")
7153 (home-page "https://github.com/ammar/regexp_parser")
7154 (license license:expat)))
7155
7156 (define-public ruby-test-queue
7157 (package
7158 (name "ruby-test-queue")
7159 (version "0.4.2")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (rubygems-uri "test-queue" version))
7164 (sha256
7165 (base32
7166 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
7167 (build-system ruby-build-system)
7168 (arguments
7169 '(#:phases
7170 (modify-phases %standard-phases
7171 (replace 'check
7172 (lambda* (#:key tests? #:allow-other-keys)
7173 (when tests?
7174 (invoke "rspec"))
7175 #t)))))
7176 (native-inputs
7177 (list ruby-rspec))
7178 (synopsis "Minitest/RSpec parallel test runner for CI environments")
7179 (description "The test-queue module is a parallel test runner,
7180 built using a centralized queue to ensure optimal distribution of
7181 tests between workers. It is specifically optimized for Continuous
7182 Integration (CI) environments: build statistics from each run are
7183 stored locally and used to sort the queue at the beginning of the next
7184 run.")
7185 (home-page "https://github.com/tmm1/test-queue")
7186 (license license:expat)))
7187
7188 (define-public ruby-rubocop
7189 (package
7190 (name "ruby-rubocop")
7191 (version "1.10.0")
7192 (source
7193 (origin
7194 (method git-fetch) ;no tests in distributed gem
7195 (uri (git-reference
7196 (url "https://github.com/rubocop-hq/rubocop")
7197 (commit (string-append "v" version))))
7198 (file-name (git-file-name name version))
7199 (sha256
7200 (base32
7201 "0wjw9vpzr4f3nf1zf010bag71w4hdi0haybdn7r5rlmw45pmim29"))))
7202 (build-system ruby-build-system)
7203 (arguments
7204 `(#:test-target "default"
7205 ;; TODO: Figure out why test hangs.
7206 #:tests? ,(not (target-riscv64?))
7207 #:phases
7208 (modify-phases %standard-phases
7209 (add-before 'check 'set-home
7210 (lambda _
7211 (setenv "HOME" (getcwd))
7212 #t))
7213 ;; Rubocop depends on itself for tests, directly and indirectly. By
7214 ;; regenerating the TODO list we test rubocop against itself and
7215 ;; forgo adjusting the test suite to our environment each release.
7216 (replace 'check
7217 (lambda* (#:key tests? #:allow-other-keys)
7218 (when tests?
7219 (make-file-writable ".rubocop_todo.yml")
7220 (invoke "./exe/rubocop" "--auto-gen-config"))
7221 #t))
7222 (add-before 'check 'make-adoc-files-writable
7223 (lambda _
7224 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
7225 "\\.adoc$")))
7226 (for-each make-file-writable adoc-files))
7227 #t)))))
7228 (native-inputs
7229 `(("ruby-bump" ,ruby-bump)
7230 ("ruby-pry" ,ruby-pry)
7231 ("ruby-rake" ,ruby-rake)
7232 ("ruby-rspec" ,ruby-rspec)
7233 ("ruby-rubocop-minimal" ,ruby-rubocop-minimal)
7234 ("ruby-rubocop-performance-minimal" ,ruby-rubocop-performance-minimal)
7235 ("ruby-rubocop-rspec-minimal" ,ruby-rubocop-rspec-minimal)
7236 ("ruby-simplecov" ,ruby-simplecov)
7237 ("ruby-stackprof" ,ruby-stackprof)
7238 ("ruby-test-queue" ,ruby-test-queue)
7239 ("ruby-webmock" ,ruby-webmock)
7240 ("ruby-yard" ,ruby-yard)))
7241 (propagated-inputs
7242 (list ruby-parallel
7243 ruby-parser
7244 ruby-rainbow
7245 ruby-regexp-parser
7246 ruby-rubocop-ast
7247 ruby-progressbar
7248 ruby-unicode-display-width))
7249 (synopsis "Ruby code style checking tool")
7250 (description
7251 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
7252 the community-driven Ruby Style Guide.")
7253 (home-page "https://github.com/rubocop-hq/rubocop")
7254 (license license:expat)))
7255
7256 (define-public ruby-rubocop-minimal
7257 (hidden-package
7258 (package
7259 (inherit ruby-rubocop)
7260 (arguments
7261 (substitute-keyword-arguments (package-arguments ruby-rubocop)
7262 ((#:tests? _ #f) #f)))
7263 (propagated-inputs '())
7264 (native-inputs '()))))
7265
7266 (define-public ruby-contest
7267 (package
7268 (name "ruby-contest")
7269 (version "0.1.3")
7270 (source
7271 (origin
7272 (method url-fetch)
7273 (uri (rubygems-uri "contest" version))
7274 (sha256
7275 (base32
7276 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
7277 (build-system ruby-build-system)
7278 (synopsis "Write declarative tests using nested contexts")
7279 (description
7280 "Contest allows writing declarative @code{Test::Unit} tests using nested
7281 contexts without performance penalties.")
7282 (home-page "https://github.com/citrusbyte/contest")
7283 (license license:expat)))
7284
7285 (define-public ruby-creole
7286 (package
7287 (name "ruby-creole")
7288 (version "0.5.0")
7289 (source
7290 (origin
7291 (method url-fetch)
7292 (uri (rubygems-uri "creole" version))
7293 (sha256
7294 (base32
7295 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
7296 (build-system ruby-build-system)
7297 (native-inputs
7298 (list ruby-bacon))
7299 (synopsis "Creole markup language converter")
7300 (description
7301 "Creole is a lightweight markup language and this library for converting
7302 creole to @code{HTML}.")
7303 (home-page "https://github.com/minad/creole")
7304 (license license:ruby)))
7305
7306 (define-public ruby-docile
7307 (package
7308 (name "ruby-docile")
7309 (version "1.1.5")
7310 (source
7311 (origin
7312 (method url-fetch)
7313 (uri (rubygems-uri "docile" version))
7314 (sha256
7315 (base32
7316 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
7317 (build-system ruby-build-system)
7318 (arguments
7319 '(#:tests? #f)) ; needs github-markup, among others
7320 (synopsis "Ruby EDSL helper library")
7321 (description "Docile is a Ruby library that provides an interface for
7322 creating embedded domain specific languages (EDSLs) that manipulate existing
7323 Ruby classes.")
7324 (home-page "https://ms-ati.github.io/docile/")
7325 (license license:expat)))
7326
7327 (define-public ruby-middleware
7328 (package
7329 (name "ruby-middleware")
7330 (version "0.1.0")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri (rubygems-uri "middleware" version))
7335 (sha256
7336 (base32
7337 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
7338 (build-system ruby-build-system)
7339 (arguments '(#:tests? #f)) ;no test suite
7340 (synopsis "Implementation of a middleware abstraction for Ruby")
7341 (description "Middleware is a generalized implementation of a middleware
7342 abstraction for Ruby.")
7343 (home-page "https://github.com/mitchellh/middleware")
7344 (license license:expat)))
7345
7346 (define-public ruby-benchmark-ips
7347 (package
7348 (name "ruby-benchmark-ips")
7349 (version "2.8.2")
7350 (source
7351 (origin
7352 (method url-fetch)
7353 (uri (rubygems-uri "benchmark-ips" version))
7354 (sha256
7355 (base32
7356 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
7357 (build-system ruby-build-system)
7358 (native-inputs
7359 (list ruby-hoe))
7360 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
7361 (description "Benchmark-ips enhances the Ruby Benchmark module with the
7362 iterations per second count. For short snippets of code, it can automatically
7363 figure out how many times to run the code to get interesting data.")
7364 (home-page "https://github.com/evanphx/benchmark-ips")
7365 (license license:expat)))
7366
7367 (define-public ruby-ffi-rzmq-core
7368 (package
7369 (name "ruby-ffi-rzmq-core")
7370 (version "1.0.7")
7371 (source
7372 (origin
7373 (method url-fetch)
7374 (uri (rubygems-uri "ffi-rzmq-core" version))
7375 (sha256
7376 (base32
7377 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
7378 (build-system ruby-build-system)
7379 (arguments
7380 `(#:phases
7381 (modify-phases %standard-phases
7382 (add-after 'unpack 'patch-libzmq-search-path
7383 (lambda* (#:key inputs #:allow-other-keys)
7384 (let ((zeromq (assoc-ref inputs "zeromq")))
7385 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
7386 (("/usr/local/lib")
7387 (string-append zeromq "/lib")))
7388 #t)))
7389 (replace 'check
7390 (lambda _
7391 (invoke "rspec"))))))
7392 (native-inputs
7393 (list ruby-rspec))
7394 (inputs
7395 (list zeromq))
7396 (propagated-inputs (list ruby-ffi))
7397 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
7398 (description "This library only provides the FFI wrapper for the ZeroMQ
7399 networking library. It can be used to implement a Ruby API for the ZeroMQ
7400 library.")
7401 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
7402 (license license:expat)))
7403
7404 (define-public ruby-ffi-rzmq
7405 (package
7406 (name "ruby-ffi-rzmq")
7407 (version "2.0.7")
7408 (source
7409 (origin
7410 (method url-fetch)
7411 (uri (rubygems-uri "ffi-rzmq" version))
7412 (sha256
7413 (base32
7414 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
7415 (build-system ruby-build-system)
7416 (arguments '(#:phases (modify-phases %standard-phases
7417 (replace 'check
7418 (lambda* (#:key tests? #:allow-other-keys)
7419 (when tests?
7420 (invoke "rspec")))))))
7421 (native-inputs
7422 (list ruby-rspec))
7423 (propagated-inputs
7424 (list ruby-ffi-rzmq-core))
7425 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
7426 (description "This library provides a high-level API that wraps the ZeroMQ
7427 networking library using the Ruby foreign function interface (FFI). It is a
7428 pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
7429 for FFI.")
7430 (home-page "https://github.com/chuckremes/ffi-rzmq")
7431 (license license:expat)))
7432
7433 (define-public ruby-sawyer
7434 (package
7435 (name "ruby-sawyer")
7436 (version "0.8.2")
7437 (source
7438 (origin
7439 (method url-fetch)
7440 (uri (rubygems-uri "sawyer" version))
7441 (sha256
7442 (base32
7443 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
7444 (build-system ruby-build-system)
7445 (propagated-inputs
7446 (list ruby-addressable ruby-faraday))
7447 (synopsis "Experimental hypermedia agent for Ruby")
7448 (description "Sawyer is an experimental hypermedia agent for Ruby built on
7449 top of Faraday.")
7450 (home-page "https://github.com/lostisland/sawyer")
7451 (license license:expat)))
7452
7453 (define-public ruby-octokit
7454 (package
7455 (name "ruby-octokit")
7456 (version "4.18.0")
7457 (source
7458 (origin
7459 (method url-fetch)
7460 (uri (rubygems-uri "octokit" version))
7461 (sha256
7462 (base32
7463 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
7464 (build-system ruby-build-system)
7465 (arguments '(#:tests? #f)) ;no test suite in the gem release
7466 (propagated-inputs
7467 (list ruby-faraday ruby-sawyer))
7468 (synopsis "Ruby toolkit for the GitHub API")
7469 (description "Octokit wraps the GitHub API in a flat API client that
7470 follows Ruby conventions and requires little knowledge of REST.")
7471 (home-page "https://github.com/octokit/octokit.rb")
7472 (license license:expat)))
7473
7474 (define-public ruby-chandler
7475 (package
7476 (name "ruby-chandler")
7477 (version "0.9.0")
7478 (source
7479 (origin
7480 (method url-fetch)
7481 (uri (rubygems-uri "chandler" version))
7482 (sha256
7483 (base32
7484 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
7485 (build-system ruby-build-system)
7486 (native-inputs
7487 (list ruby-rubocop))
7488 (propagated-inputs
7489 (list ruby-netrc ruby-octokit))
7490 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
7491 (description "Chandler syncs a project's CHANGELOG file entries to
7492 GitHub's release notes to remove the need of manually entering release
7493 notes.")
7494 (home-page "https://github.com/mattbrictson/chandler")
7495 (license license:expat)))
7496
7497 (define-public ruby-pry-byebug
7498 (package
7499 (name "ruby-pry-byebug")
7500 (version "3.9.0")
7501 (source
7502 (origin
7503 (method git-fetch)
7504 (uri (git-reference
7505 (url "https://github.com/deivid-rodriguez/pry-byebug")
7506 (commit (string-append "v" version))))
7507 (file-name (git-file-name name version))
7508 (sha256
7509 (base32
7510 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7511 (build-system ruby-build-system)
7512 (arguments
7513 `(#:phases (modify-phases %standard-phases
7514 (add-before 'check 'set-home
7515 (lambda _
7516 (setenv "HOME" (getcwd))
7517 #t)))))
7518 (native-inputs
7519 (list ruby-chandler ruby-rubocop ruby-simplecov))
7520 (propagated-inputs
7521 (list ruby-byebug ruby-pry))
7522 (synopsis "Step-by-step debugging and stack navigation in Pry")
7523 (description "This package adds step-by-step debugging and stack
7524 navigation capabilities to @code{pry}, using @code{byebug}.")
7525 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7526 (license license:expat)))
7527
7528 (define-public ruby-stackprof
7529 (package
7530 (name "ruby-stackprof")
7531 (version "0.2.17")
7532 (source
7533 (origin
7534 (method url-fetch)
7535 (uri (rubygems-uri "stackprof" version))
7536 (sha256
7537 (base32 "06lz70k8c0r7fyxk1nc3idh14x7nvsr21ydm1bsmbj00jyhmfzsn"))))
7538 (build-system ruby-build-system)
7539 (arguments
7540 `(#:phases
7541 (modify-phases %standard-phases
7542 (add-before 'check 'skip-dubious-test
7543 (lambda _
7544 ,@(if (or (target-riscv64?)
7545 (target-ppc32?))
7546 ;; This unreliable test can fail with "Expected 32 to be <= 25."
7547 '((substitute* "test/test_stackprof.rb"
7548 ((".*assert_operator profile\\[:missed_samples.*") "")))
7549 ;; This unreliable test can fail with "Expected 0 to be >= 1."
7550 '((substitute* "test/test_stackprof.rb"
7551 (("def test_(cputime)" _ name)
7552 (string-append "def skip_" name)))))))
7553 (add-before 'check 'build-tests
7554 (lambda _
7555 (invoke "rake" "compile"))))))
7556 (native-inputs
7557 (list ruby-mocha ruby-rake-compiler))
7558 (synopsis "Sampling profiler for Ruby code")
7559 (description
7560 "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
7561 wallclock and object allocation samplers.")
7562 (home-page "https://github.com/tmm1/stackprof")
7563 (license license:expat)))
7564
7565 (define-public ruby-binding-of-caller
7566 (package
7567 (name "ruby-binding-of-caller")
7568 (version "0.8.0")
7569 (source
7570 (origin
7571 (method url-fetch)
7572 (uri (rubygems-uri "binding_of_caller" version))
7573 (sha256
7574 (base32
7575 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7576 (build-system ruby-build-system)
7577 ;; Attempting to run the test suite fails with a rake deprecation error
7578 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7579 (arguments '(#:tests? #f))
7580 (propagated-inputs
7581 (list ruby-debug-inspector))
7582 (synopsis "Retrieve the binding of a method's caller")
7583 (description "The @code{binding_of_caller} module provides the
7584 @code{Binding#of_caller} method. It allows accessing bindings from upper
7585 frames in the call stack and can evaluate code in that context.")
7586 (home-page "https://github.com/banister/binding_of_caller")
7587 (license license:expat)))
7588
7589 (define-public ruby-pry-stack-explorer
7590 (package
7591 (name "ruby-pry-stack-explorer")
7592 (version "0.5.1")
7593 (source
7594 (origin
7595 (method url-fetch)
7596 (uri (rubygems-uri "pry-stack_explorer" version))
7597 (sha256
7598 (base32
7599 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7600 (build-system ruby-build-system)
7601 (arguments '(#:tests? #f)) ;no test suite in gem release
7602 (propagated-inputs
7603 (list ruby-binding-of-caller ruby-pry))
7604 (synopsis "Call-stack navigation plugin for the Pry REPL")
7605 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7606 add support to navigate the call-stack.")
7607 (home-page "https://github.com/pry/pry-stack_explorer")
7608 (license license:expat)))
7609
7610 (define-public ruby-varint
7611 (package
7612 (name "ruby-varint")
7613 (version "0.1.1")
7614 (source
7615 (origin
7616 (method url-fetch)
7617 (uri (rubygems-uri "varint" version))
7618 (sha256
7619 (base32
7620 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7621 (build-system ruby-build-system)
7622 (arguments '(#:tests? #f)) ;no test suite
7623 (synopsis "Variable length integers (varint) C extension for Ruby")
7624 (description "This package provides a small C extension to speed up
7625 variable length integers (varint) in Ruby Protocol Buffers.")
7626 (home-page "https://github.com/liquidm/varint")
7627 (license license:bsd-3)))
7628
7629 (define-public ruby-ruby-prof
7630 (package
7631 (name "ruby-ruby-prof")
7632 (version "1.4.3")
7633 (source
7634 (origin
7635 (method url-fetch)
7636 (uri (rubygems-uri "ruby-prof" version))
7637 (sha256
7638 (base32
7639 "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m"))))
7640 (build-system ruby-build-system)
7641 (arguments
7642 `(#:phases
7643 (modify-phases %standard-phases
7644 (add-after 'unpack 'patch-rakefile
7645 ;; This fixes the following error: "NameError: uninitialized
7646 ;; constant Bundler::GemHelper" (see:
7647 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7648 (lambda _
7649 (substitute* "Rakefile"
7650 ((".*require \"bundler/setup\".*" all)
7651 (string-append all " require 'bundler/gem_tasks'\n")))
7652 #t))
7653 ;; The LineNumbersTest test fails non-deterministically (see:
7654 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7655 (add-after 'extract-gemspec 'delete-flaky-test
7656 (lambda _
7657 (delete-file "test/line_number_test.rb")
7658 (substitute* "ruby-prof.gemspec"
7659 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7660 #t))
7661 (add-before 'check 'compile
7662 (lambda _
7663 (invoke "rake" "compile"))))))
7664 (native-inputs
7665 (list bundler ruby-minitest ruby-rake-compiler ruby-rdoc))
7666 (synopsis "Fast code profiler for Ruby")
7667 (description "RubyProf is a fast code profiler for Ruby. Its features
7668 include:
7669 @table @asis
7670 @item Speed
7671 Being a C extension, it is many times faster than the standard Ruby profiler.
7672 @item Measurement Modes
7673 It can measure program wall time, process time, object allocations and memory
7674 usage.
7675 @item Reports
7676 A variety of text and cross-referenced HTML reports can be generated.
7677 @item Threads
7678 Profiling multiple threads simultaneously is supported.
7679 @end table")
7680 (home-page "https://github.com/ruby-prof/ruby-prof")
7681 (license license:bsd-2)))
7682
7683 (define-public ruby-memory-profiler
7684 (package
7685 (name "ruby-memory-profiler")
7686 (version "1.0.0")
7687 (source
7688 (origin
7689 (method git-fetch)
7690 (uri (git-reference
7691 (url "https://github.com/SamSaffron/memory_profiler")
7692 (commit (string-append "v" version))))
7693 (file-name (git-file-name name version))
7694 (sha256
7695 (base32
7696 "07yqv11q68xg2fqkrhs6ysngryk8b9zq6qzh24rgx9xqv6qfnj0w"))))
7697 (build-system ruby-build-system)
7698 (synopsis "Memory profiling routines for Ruby")
7699 (description
7700 "This package provides memory profiling routines for Ruby.")
7701 (home-page "https://github.com/SamSaffron/memory_profiler")
7702 (license license:expat)))
7703
7704 (define-public ruby-cucumber-messages
7705 (package
7706 (name "ruby-cucumber-messages")
7707 (version "12.2.0")
7708 (source (origin
7709 (method git-fetch)
7710 (uri (git-reference
7711 (url "https://github.com/cucumber/messages-ruby")
7712 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7713 (file-name (git-file-name name version))
7714 (sha256
7715 (base32
7716 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7717 (build-system ruby-build-system)
7718 (arguments
7719 `(#:phases (modify-phases %standard-phases
7720 (add-after 'unpack 'patch-protobuf.rb
7721 (lambda _
7722 (substitute* "rake/protobuf.rb"
7723 (("load 'protobuf/tasks/compile.rake'")
7724 "require 'protobuf/tasks'"))
7725 #t))
7726 (add-before 'build 'compile
7727 (lambda _
7728 (substitute* "Makefile"
7729 (("bundle exec ") "")
7730 (("include default.mk.*" all)
7731 (string-append "#" all)))
7732 (invoke "make")))
7733 (replace 'check
7734 (lambda _
7735 (invoke "rspec"))))))
7736 (propagated-inputs
7737 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7738 (native-inputs
7739 (list ruby-rspec))
7740 (home-page "https://github.com/cucumber/messages-ruby")
7741 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7742 (description "Cucumber Messages for Ruby is a library which allows
7743 serialization and deserialization of the protocol buffer messages used in
7744 Cucumber.")
7745 (license license:expat)))
7746
7747 (define-public ruby-gherkin
7748 (package
7749 (name "ruby-gherkin")
7750 (version "14.0.1")
7751 (source (origin
7752 (method git-fetch)
7753 (uri (git-reference
7754 (url "https://github.com/cucumber/gherkin-ruby")
7755 (commit (string-append "v" version))))
7756 (file-name (git-file-name name version))
7757 (sha256
7758 (base32
7759 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
7760 (build-system ruby-build-system)
7761 (native-inputs
7762 (list ruby-cucumber-messages ruby-rspec))
7763 (arguments
7764 `(#:test-target "spec"))
7765 (synopsis "Gherkin parser for Ruby")
7766 (description "Gherkin is a parser and compiler for the Gherkin language.
7767 It is intended be used by all Cucumber implementations to parse
7768 @file{.feature} files.")
7769 (home-page "https://github.com/cucumber/gherkin-ruby")
7770 (license license:expat)))
7771
7772 (define-public ruby-gherkin-ruby
7773 (package
7774 (name "ruby-gherkin-ruby")
7775 (version "0.3.2")
7776 (home-page "https://github.com/codegram/gherkin-ruby")
7777 (source (origin
7778 (method url-fetch)
7779 (uri (rubygems-uri "gherkin-ruby" version))
7780 (sha256
7781 (base32
7782 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7783 (build-system ruby-build-system)
7784 (synopsis "Pure Ruby Gherkin parser")
7785 (description
7786 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7787 200 lines of code.")
7788 ;; XXX: No license information anywhere but Readme.md.
7789 (license license:expat)))
7790
7791 (define-public ruby-aruba
7792 (package
7793 (name "ruby-aruba")
7794 (version "0.14.14")
7795 (source
7796 (origin
7797 (method url-fetch)
7798 (uri (rubygems-uri "aruba" version))
7799 (sha256
7800 (base32
7801 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
7802 (build-system ruby-build-system)
7803 (arguments
7804 '(#:test-target "spec"
7805 #:phases
7806 (modify-phases %standard-phases
7807 (add-after 'unpack 'patch
7808 (lambda _
7809 (substitute* "spec/aruba/api_spec.rb"
7810 ;; This resolves some errors in the specs
7811 ;;
7812 ;; undefined method `parse' for Time:Class
7813 (("require 'spec_helper'")
7814 "require 'spec_helper'\nrequire 'time'"))
7815 ;; Avoid shebang issues in this spec file
7816 (substitute* "spec/aruba/matchers/command_spec.rb"
7817 (("/usr/bin/env bash")
7818 (which "bash")))
7819 #t))
7820 (add-before 'check 'remove-unnecessary-dependencies
7821 (lambda _
7822 (substitute* "Gemfile"
7823 ((".*byebug.*") "\n")
7824 ((".*pry.*") "\n")
7825 ((".*yaml.*") "\n")
7826 ((".*bcat.*") "\n")
7827 ((".*kramdown.*") "\n")
7828 ((".*rubocop.*") "\n")
7829 ((".*cucumber-pro.*") "\n")
7830 ((".*cucumber.*") "\n")
7831 ((".*license_finder.*") "\n")
7832 ((".*rake.*") "gem 'rake'\n")
7833 ((".*relish.*") "\n"))
7834 (substitute* "aruba.gemspec"
7835 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7836 "spec.add_runtime_dependency 'cucumber'"))
7837 #t))
7838 (add-before 'check 'set-home
7839 (lambda _ (setenv "HOME" "/tmp") #t)))))
7840 (native-inputs
7841 (list bundler ruby-rspec ruby-fuubar ruby-simplecov))
7842 (propagated-inputs
7843 (list ruby-childprocess
7844 ruby-contracts
7845 ruby-cucumber
7846 ruby-ffi
7847 ruby-rspec-expectations
7848 ruby-thor
7849 ruby-yard))
7850 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7851 (description
7852 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7853 command-line applications. It supports applications written in any
7854 language.")
7855 (home-page "https://github.com/cucumber/aruba")
7856 (license license:expat)))
7857
7858 ;; A version of ruby-aruba without tests run so that circular dependencies can
7859 ;; be avoided.
7860 (define ruby-aruba-without-tests
7861 (package
7862 (inherit ruby-aruba)
7863 (arguments '(#:tests? #f))
7864 (propagated-inputs
7865 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7866 ,@(alist-delete "ruby-cucumber"
7867 (package-propagated-inputs ruby-aruba))))
7868 (native-inputs '())))
7869
7870 (define-public ruby-sys-uname
7871 (package
7872 (name "ruby-sys-uname")
7873 (version "1.2.1")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (rubygems-uri "sys-uname" version))
7878 (sha256
7879 (base32
7880 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7881 (build-system ruby-build-system)
7882 (arguments
7883 `(#:test-target "spec"))
7884 (propagated-inputs (list ruby-ffi))
7885 (native-inputs (list ruby-rspec))
7886 (synopsis "Ruby interface for gathering system information")
7887 (description "The sys-uname library provides an interface for gathering
7888 information about your current platform. It allows retrieving information
7889 such as the OS name, OS version, system name, etc.")
7890 (home-page "https://github.com/djberg96/sys-uname")
7891 (license license:asl2.0)))
7892
7893 (define-public ruby-cucumber-create-meta
7894 (package
7895 (name "ruby-cucumber-create-meta")
7896 (version "1.0.0")
7897 (source
7898 (origin
7899 (method url-fetch)
7900 (uri (rubygems-uri "cucumber-create-meta" version))
7901 (sha256
7902 (base32
7903 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7904 (build-system ruby-build-system)
7905 (arguments
7906 `(#:phases (modify-phases %standard-phases
7907 (add-after 'extract-gemspec 'relax-version-requirements
7908 (lambda _
7909 (substitute* ".gemspec"
7910 ((" 12\\.2")
7911 " 12.1"))
7912 #t))
7913 (replace 'check
7914 (lambda _
7915 (invoke "rspec"))))))
7916 (native-inputs
7917 (list ruby-rspec))
7918 (propagated-inputs
7919 (list ruby-cucumber-messages ruby-sys-uname))
7920 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7921 (description "The @code{createMeta} utility function allows generating
7922 system-specific @code{Meta} messages for Cucumber Ruby.")
7923 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7924 (license license:expat)))
7925
7926 (define-public ruby-cucumber-html-formatter
7927 (package
7928 (name "ruby-cucumber-html-formatter")
7929 (version "7.0.0")
7930 (source
7931 (origin
7932 (method url-fetch)
7933 (uri (rubygems-uri "cucumber-html-formatter" version))
7934 (sha256
7935 (base32
7936 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7937 (build-system ruby-build-system)
7938 (arguments
7939 `(#:phases (modify-phases %standard-phases
7940 (replace 'check
7941 (lambda _
7942 (invoke "rspec"))))))
7943 (native-inputs
7944 (list ruby-rspec))
7945 (propagated-inputs
7946 (list ruby-cucumber-messages))
7947 (synopsis "HTML formatter for Cucumber")
7948 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7949 runs. It is built on top of cucumber-react and works with any Cucumber
7950 implementation with a protocol buffer formatter that outputs Cucumber
7951 messages.")
7952 (home-page "https://github.com/cucumber/cucumber/tree/\
7953 master/html-formatter/ruby")
7954 (license license:expat)))
7955
7956 (define-public ruby-cucumber
7957 (package
7958 (name "ruby-cucumber")
7959 (version "4.1.0")
7960 (source
7961 (origin
7962 (method git-fetch)
7963 (uri (git-reference
7964 (url "https://github.com/cucumber/cucumber-ruby")
7965 (commit (string-append "v" version))))
7966 (file-name (git-file-name name version))
7967 (sha256
7968 (base32
7969 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
7970 (build-system ruby-build-system)
7971 (arguments
7972 '(#:test-target "default"
7973 #:phases
7974 (modify-phases %standard-phases
7975 (add-after 'unpack 'disable-rubocop
7976 ;; Rubocop lint check fails with our more recent version.
7977 (lambda _
7978 (substitute* "Rakefile"
7979 (("spec cucumber rubocop")
7980 "spec cucumber"))
7981 #t))
7982 (add-after 'extract-gemspec 'strip-version-requirements
7983 (lambda _
7984 (delete-file "Gemfile") ;do not use Bundler
7985 (substitute* "cucumber.gemspec"
7986 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7987 (string-append stripped "\n")))
7988 #t))
7989 (add-before 'check 'set-home
7990 (lambda _
7991 (setenv "HOME" (getcwd))
7992 #t)))))
7993 (propagated-inputs
7994 (list ruby-builder
7995 ruby-cucumber-core
7996 ruby-cucumber-create-meta
7997 ruby-cucumber-html-formatter
7998 ruby-cucumber-messages
7999 ruby-cucumber-wire
8000 ruby-diff-lcs
8001 ruby-gherkin
8002 ruby-multi-json
8003 ruby-multi-test))
8004 (native-inputs
8005 (list ;; Use a untested version of aruba, to avoid a circular dependency, as
8006 ;; ruby-aruba depends on ruby-cucumber.
8007 ruby-aruba-without-tests
8008 ruby-rspec
8009 ruby-pry
8010 ruby-nokogiri
8011 ruby-rubocop))
8012 (synopsis "Describe automated tests in plain language")
8013 (description "Cucumber is a tool for running automated tests written in
8014 plain language. It's designed to support a Behaviour Driven Development (BDD)
8015 software development workflow.")
8016 (home-page "https://cucumber.io/")
8017 (license license:expat)))
8018
8019 (define ruby-cucumber-without-tests
8020 (package (inherit ruby-cucumber)
8021 (arguments
8022 '(#:tests? #f))
8023 (native-inputs
8024 '())))
8025
8026 (define-public ruby-coveralls
8027 (package
8028 (name "ruby-coveralls")
8029 (version "0.8.23")
8030 (source
8031 (origin
8032 (method url-fetch)
8033 (uri (rubygems-uri "coveralls" version))
8034 (sha256
8035 (base32
8036 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
8037 (build-system ruby-build-system)
8038 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
8039 ;; because of its nonfree, Hippocratic-derived license.
8040 (arguments
8041 `(#:tests? #f
8042 #:phases (modify-phases %standard-phases
8043 (add-after 'extract-gemspec 'strip-version-requirements
8044 ;; Keeping strict version requirements can cause problems
8045 ;; to users of the library, such as: Gem::ConflictError:
8046 ;; Unable to activate coveralls-0.8.23, because
8047 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
8048 (lambda _
8049 (substitute* "coveralls-ruby.gemspec"
8050 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
8051 (string-append stripped ")\n")))
8052 #t)))))
8053 (propagated-inputs
8054 (list ruby-json ruby-term-ansicolor ruby-thor ruby-tins))
8055 (synopsis "Ruby implementation of the Coveralls API")
8056 (description "This package provides a Ruby implementation of the Coveralls
8057 API.")
8058 (home-page "https://coveralls.io")
8059 (license license:expat)))
8060
8061 (define-public ruby-unindent
8062 (package
8063 (name "ruby-unindent")
8064 (version "1.0")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (rubygems-uri "unindent" version))
8069 (sha256
8070 (base32
8071 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
8072 (build-system ruby-build-system)
8073 (synopsis "Ruby method to unindent strings")
8074 (description "This module provides a @code{String#unindent} Ruby method to
8075 unindent strings, which can be useful to unindent multiline strings embedded
8076 in already-indented code.")
8077 (home-page "https://github.com/mynyml/unindent")
8078 (license license:expat)))
8079
8080 (define-public ruby-cucumber-core
8081 (package
8082 (name "ruby-cucumber-core")
8083 (version "7.1.0")
8084 (source
8085 (origin
8086 (method git-fetch)
8087 (uri (git-reference
8088 (url "https://github.com/cucumber/cucumber-ruby-core")
8089 (commit (string-append "v" version))))
8090 (file-name (git-file-name name version))
8091 (sha256
8092 (base32
8093 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
8094 (build-system ruby-build-system)
8095 (arguments
8096 `(#:test-target "spec"
8097 #:phases
8098 (modify-phases %standard-phases
8099 (add-after 'extract-gemspec 'relax-version-requirements
8100 (lambda _
8101 (substitute* "cucumber-core.gemspec"
8102 (("'cucumber-tag-expressions',.*")
8103 "'cucumber-tag-expressions', '>=2.0.0'\n"))
8104 #t)))))
8105 (native-inputs
8106 (list ruby-rspec ruby-coveralls ruby-rubocop ruby-simplecov
8107 ruby-unindent))
8108 (propagated-inputs
8109 (list ruby-cucumber-messages ruby-gherkin
8110 ruby-cucumber-tag-expressions))
8111 (synopsis "Core library for the Cucumber BDD app")
8112 (description "Cucumber is a tool for running automated tests
8113 written in plain language. Because they're written in plain language,
8114 they can be read by anyone on your team. Because they can be read by
8115 anyone, you can use them to help improve communication, collaboration
8116 and trust on your team.")
8117 (home-page "https://cucumber.io/")
8118 (license license:expat)))
8119
8120 (define-public ruby-cucumber-expressions
8121 (package
8122 (name "ruby-cucumber-expressions")
8123 (version "10.2.0")
8124 (source
8125 (origin
8126 (method git-fetch)
8127 (uri (git-reference
8128 (url "https://github.com/cucumber/cucumber-expressions-ruby")
8129 (commit (string-append "v" version))))
8130 (file-name (git-file-name name version))
8131 (sha256
8132 (base32
8133 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
8134 (build-system ruby-build-system)
8135 (arguments
8136 '(#:test-target "spec"))
8137 (native-inputs
8138 (list ruby-rspec ruby-simplecov))
8139 (synopsis "Simpler alternative to Regular Expressions")
8140 (description "Cucumber Expressions offer similar functionality to Regular
8141 Expressions, with a syntax that is easier to read and write. Cucumber
8142 Expressions are extensible with parameter types.")
8143 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
8144 (license license:expat)))
8145
8146 (define-public ruby-cucumber-wire
8147 (package
8148 (name "ruby-cucumber-wire")
8149 (version "3.1.0")
8150 (source
8151 (origin
8152 (method url-fetch)
8153 (uri (rubygems-uri "cucumber-wire" version))
8154 (sha256
8155 (base32
8156 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
8157 (build-system ruby-build-system)
8158 (arguments
8159 '(#:tests? #f ;tests use cucumber, causing a cycle
8160 #:phases
8161 (modify-phases %standard-phases
8162 (add-after 'extract-gemspec 'relax-version-requirements
8163 (lambda _
8164 (substitute* ".gemspec"
8165 ((" 10\\.1") " 10.2"))
8166 #t)))))
8167 (propagated-inputs
8168 (list ruby-cucumber-core ruby-cucumber-expressions
8169 ruby-cucumber-messages))
8170 (synopsis "Cucumber wire protocol plugin")
8171 (description "Cucumber's wire protocol allows step definitions to be
8172 implemented and invoked on any platform.")
8173 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
8174 (license license:expat)))
8175
8176 (define-public ruby-cucumber-tag-expressions
8177 (package
8178 (name "ruby-cucumber-tag-expressions")
8179 (version "3.0.0")
8180 (source
8181 (origin
8182 (method git-fetch)
8183 (uri (git-reference
8184 (url "https://github.com/cucumber/tag-expressions-ruby")
8185 (commit (string-append "v" version))))
8186 (file-name (git-file-name name version))
8187 (sha256
8188 (base32
8189 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
8190 (build-system ruby-build-system)
8191 (arguments
8192 `(#:test-target "spec"))
8193 (native-inputs
8194 (list ruby-rspec))
8195 (synopsis "Cucumber tag expressions for Ruby")
8196 (description "Cucumber tag expression parser for Ruby. A tag expression
8197 is an infix boolean expression used by Cucumber.")
8198 (home-page "https://github.com/cucumber/tag-expressions-ruby")
8199 (license license:expat)))
8200
8201 (define-public ruby-bindex
8202 (package
8203 (name "ruby-bindex")
8204 (version "0.5.0")
8205 (source
8206 (origin
8207 (method url-fetch)
8208 (uri (rubygems-uri "bindex" version))
8209 (sha256
8210 (base32
8211 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
8212 (build-system ruby-build-system)
8213 (arguments
8214 '(#:test-target "default"))
8215 (native-inputs
8216 (list bundler ruby-rake-compiler))
8217 (synopsis "Provides access for bindings relating to Ruby exceptions")
8218 (description
8219 "@code{bindex} provides a way to access the bindings that relate to
8220 exceptions in Ruby, providing more information about the context in which the
8221 exception occurred.")
8222 (home-page "https://github.com/gsamokovarov/bindex")
8223 (license license:expat)))
8224
8225 (define-public ruby-bio-logger
8226 (package
8227 (name "ruby-bio-logger")
8228 (version "1.0.1")
8229 (source
8230 (origin
8231 (method url-fetch)
8232 (uri (rubygems-uri "bio-logger" version))
8233 (sha256
8234 (base32
8235 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
8236 (build-system ruby-build-system)
8237 (arguments
8238 `(#:tests? #f)) ; rake errors, missing shoulda
8239 (propagated-inputs
8240 (list ruby-log4r))
8241 (synopsis "Log4r wrapper for Ruby")
8242 (description "Bio-logger is a wrapper around Log4r adding extra logging
8243 features such as filtering and fine grained logging.")
8244 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
8245 (license license:expat)))
8246
8247 (define-public ruby-yajl-ruby
8248 (package
8249 (name "ruby-yajl-ruby")
8250 (version "1.4.1")
8251 (source
8252 (origin
8253 (method url-fetch)
8254 (uri (rubygems-uri "yajl-ruby" version))
8255 (sha256
8256 (base32
8257 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
8258 (build-system ruby-build-system)
8259 (arguments
8260 '(#:test-target "spec"
8261 #:phases
8262 (modify-phases %standard-phases
8263 (add-before 'check 'patch-test-to-update-load-path
8264 (lambda _
8265 (substitute* "spec/parsing/large_number_spec.rb"
8266 (("require \"yajl\"")
8267 "$LOAD_PATH << 'lib'; require 'yajl'"))
8268 #t)))))
8269 (native-inputs
8270 (list ruby-rake-compiler ruby-rspec))
8271 (synopsis "Streaming JSON parsing and encoding library for Ruby")
8272 (description
8273 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
8274 is compatible with the JSON gem, so yajl-ruby can act as a drop in
8275 replacement.
8276
8277 A modified copy of yajl is used, and included in the package.")
8278 (home-page "https://github.com/brianmario/yajl-ruby")
8279 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
8280 license:bsd-3)))) ; Included, modified copy of yajl
8281
8282 (define-public ruby-yard
8283 (package
8284 (name "ruby-yard")
8285 (version "0.9.25")
8286 (source
8287 (origin
8288 (method git-fetch)
8289 ;; Tests do not pass if we build from the distributed gem.
8290 (uri (git-reference
8291 (url "https://github.com/lsegal/yard")
8292 (commit (string-append "v" version))))
8293 (file-name (git-file-name name version))
8294 (sha256
8295 (base32
8296 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
8297 (build-system ruby-build-system)
8298 (arguments
8299 ;; Note: Tests are willfully disabled to alleviate dependency cycle
8300 ;; problems.
8301 `(#:tests? #f
8302 #:phases (modify-phases %standard-phases
8303 (add-after 'unpack 'do-not-set-date-in-gemspec
8304 ;; Fix a reproducibility issue (see:
8305 ;; https://github.com/lsegal/yard/issues/1343).
8306 (lambda _
8307 (substitute* "yard.gemspec"
8308 ((".*s\\.date.*") ""))
8309 #t)))))
8310 (synopsis "Documentation generation tool for Ruby")
8311 (description "YARD is a documentation generation tool for the Ruby
8312 programming language. It enables the user to generate consistent, usable
8313 documentation that can be exported to a number of formats very easily, and
8314 also supports extending for custom Ruby constructs such as custom class level
8315 definitions.")
8316 (home-page "https://yardoc.org")
8317 (license license:expat)))
8318
8319 (define-public ruby-yard-with-tests
8320 (package
8321 (inherit ruby-yard)
8322 (name "ruby-yard-with-tests")
8323 (arguments
8324 (substitute-keyword-arguments
8325 (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
8326 ((#:test-target _ "default") "default")
8327 ((#:phases phases '%standard-phases)
8328 `(modify-phases ,phases
8329 (add-before 'check 'prepare-for-tests
8330 (lambda* (#:key tests? #:allow-other-keys)
8331 (when tests?
8332 (substitute* "Rakefile"
8333 ((".*[Ss]amus.*") ""))
8334 ;; Delete the Gemfile to avoid errors relating to it.
8335 (delete-file "Gemfile")
8336 ;; $HOME needs to be set to somewhere writeable for tests to
8337 ;; run.
8338 (setenv "HOME" "/tmp"))))))))
8339 (native-inputs (list ruby-rspec ruby-rack ruby-redcloth ruby-asciidoctor))))
8340
8341 (define-public ruby-spectroscope
8342 (package
8343 (name "ruby-spectroscope")
8344 (version "0.1.0")
8345 (source
8346 (origin
8347 (method url-fetch)
8348 (uri (rubygems-uri "spectroscope" version))
8349 (sha256
8350 (base32
8351 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
8352 (build-system ruby-build-system)
8353 (arguments
8354 `(#:phases
8355 (modify-phases %standard-phases
8356 (replace 'check
8357 (lambda _
8358 (with-output-to-file ".test"
8359 (lambda _
8360 (display
8361 "\
8362 require 'ae/should'
8363 require 'rspec'
8364
8365 include RSpec
8366
8367 Test.run :default do |run|
8368 run.files << 'spec/*_spec.rb'
8369 end")))
8370 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
8371 (native-inputs
8372 (list ruby-ae ruby-rspec))
8373 (propagated-inputs
8374 (list ruby-rubytest))
8375 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
8376 (description "Spectroscope is a Behavior-Driven Development (BDD)
8377 framework built on RubyTest, designed to emulate RSpec in most respects. It
8378 is assertion framework independent so any number of assertion systems can be
8379 used, such as Assay or AE.")
8380 (home-page "http://rubyworks.github.com/spectroscope/")
8381 (license license:bsd-2)))
8382
8383 (define-public ruby-tomparse
8384 (package
8385 (name "ruby-tomparse")
8386 (version "0.4.2")
8387 (source
8388 (origin
8389 (method url-fetch)
8390 (uri (rubygems-uri "tomparse" version))
8391 (sha256
8392 (base32
8393 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
8394 (build-system ruby-build-system)
8395 ;; TODO: Tests require citron and rulebow, not yet packaged.
8396 (arguments '(#:tests? #f))
8397 (synopsis "TomDoc parser for Ruby")
8398 (description "TomParse is a TomDoc parser for Ruby. It takes a code
8399 comment as input and parses it into a convenient object-oriented structure in
8400 accordance with the TomDoc standard. See
8401 @url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
8402 TomDoc format.")
8403 (home-page "http://rubyworks.github.com/tomparse/")
8404 (license license:bsd-2)))
8405
8406 (define-public ruby-yard-tomdoc
8407 (package
8408 (name "ruby-yard-tomdoc")
8409 (version "0.7.1")
8410 (source
8411 (origin
8412 (method url-fetch)
8413 (uri (rubygems-uri "yard-tomdoc" version))
8414 (sha256
8415 (base32
8416 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
8417 (build-system ruby-build-system)
8418 (arguments
8419 `(#:phases (modify-phases %standard-phases
8420 (replace 'check
8421 (lambda _
8422 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8423 (native-inputs
8424 (list ruby-rubytest-cli ruby-spectroscope ruby-ae))
8425 (propagated-inputs
8426 (list ruby-tomparse ruby-yard))
8427 (synopsis "TomDoc syntax for YARD")
8428 (description "This module adds support for the TomDoc documentation format
8429 to YARD, a documentation generation tool for Ruby.")
8430 (home-page "http://rubyworks.github.com/yard-tomdoc/")
8431 (license license:expat)))
8432
8433 (define-public ruby-clap
8434 (package
8435 (name "ruby-clap")
8436 (version "1.0.0")
8437 (source (origin
8438 (method url-fetch)
8439 (uri (rubygems-uri "clap" version))
8440 (sha256
8441 (base32
8442 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
8443 (build-system ruby-build-system)
8444 ;; Clap needs cutest for running tests, but cutest needs clap.
8445 (arguments `(#:tests? #f))
8446 (synopsis "Command line argument parsing for simple applications")
8447 (description
8448 "Clap provides command line argument parsing features. It covers the
8449 simple case of executing code based on the flags or parameters passed.")
8450 (home-page "https://github.com/djanowski/cutest")
8451 (license license:expat)))
8452
8453 (define-public ruby-cutest
8454 (package
8455 (name "ruby-cutest")
8456 (version "1.2.2")
8457 (source (origin
8458 (method url-fetch)
8459 (uri (rubygems-uri "cutest" version))
8460 (sha256
8461 (base32
8462 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
8463 (build-system ruby-build-system)
8464 (propagated-inputs
8465 (list ruby-clap))
8466 (synopsis "Run tests in separate processes")
8467 (description
8468 "Cutest runs tests in separate processes to avoid shared state.")
8469 (home-page "https://github.com/djanowski/cutest")
8470 (license license:expat)))
8471
8472 (define-public ruby-pygmentize
8473 (package
8474 (name "ruby-pygmentize")
8475 (version "0.0.3")
8476 (source (origin
8477 (method url-fetch)
8478 (uri (rubygems-uri "pygmentize" version))
8479 (sha256
8480 (base32
8481 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
8482 (build-system ruby-build-system)
8483 (arguments
8484 `(#:phases
8485 (modify-phases %standard-phases
8486 (add-after 'unpack 'fix-pygmentize-path
8487 (lambda _
8488 (substitute* "lib/pygmentize.rb"
8489 (("\"/usr/bin/env python.*")
8490 (string-append "\"" (which "pygmentize") "\"\n")))
8491 #t))
8492 (add-after 'build 'do-not-use-vendor-directory
8493 (lambda _
8494 ;; Remove bundled pygments sources
8495 ;; FIXME: ruby-build-system does not support snippets.
8496 (delete-file-recursively "vendor")
8497 (substitute* "pygmentize.gemspec"
8498 (("\"vendor/\\*\\*/\\*\",") ""))
8499 #t)))))
8500 (inputs
8501 `(("pygments" ,python-pygments)))
8502 (native-inputs
8503 (list ruby-cutest ruby-nokogiri))
8504 (synopsis "Thin Ruby wrapper around pygmentize")
8505 (description
8506 "Pygmentize provides a simple way to call pygmentize from within a Ruby
8507 application.")
8508 (home-page "https://github.com/djanowski/pygmentize")
8509 (license license:expat)))
8510
8511 (define-public ruby-eventmachine
8512 (package
8513 (name "ruby-eventmachine")
8514 (version "1.2.7")
8515 (source
8516 (origin
8517 (method url-fetch)
8518 (uri (rubygems-uri "eventmachine" version))
8519 (sha256
8520 (base32
8521 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
8522 (build-system ruby-build-system)
8523 (arguments
8524 '(#:tests? #f)) ; test suite tries to connect to google.com
8525 (inputs
8526 (list openssl))
8527 (native-inputs
8528 (list ruby-rake-compiler))
8529 (synopsis "Single-threaded network event framework for Ruby")
8530 (description
8531 "EventMachine implements a single-threaded engine for arbitrary network
8532 communications. EventMachine wraps all interactions with sockets, allowing
8533 programs to concentrate on the implementation of network protocols. It can be
8534 used to create both network servers and clients.")
8535 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8536 (home-page "https://github.com/eventmachine/eventmachine")
8537 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
8538
8539 (define-public ruby-ruby-engine
8540 (package
8541 (name "ruby-ruby-engine")
8542 (version "2.0.0")
8543 (source
8544 (origin
8545 (method url-fetch)
8546 (uri (rubygems-uri "ruby_engine" version))
8547 (sha256
8548 (base32
8549 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
8550 (build-system ruby-build-system)
8551 (arguments
8552 `(#:phases
8553 (modify-phases %standard-phases
8554 (add-after 'extract-gemspec 'clean-up
8555 (lambda _
8556 (delete-file "Gemfile.lock")
8557 (substitute* "ruby_engine.gemspec"
8558 ;; Remove unnecessary imports that would entail further
8559 ;; dependencies.
8560 ((".*<rdoc.*") "")
8561 ((".*<rubygems-tasks.*") "")
8562 ;; Remove extraneous .gem file
8563 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8564 (("\"Gemfile.lock\".freeze, ") "")
8565 ;; Soften rake dependency
8566 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
8567 "%q<rake>.freeze, [\">= 10.0\"]")
8568 ;; Soften the rspec dependency
8569 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
8570 "%q<rspec>.freeze, [\">= 2.4\"]"))
8571 (substitute* "Rakefile"
8572 (("require 'rubygems/tasks'") "")
8573 (("Gem::Tasks.new") ""))
8574 ;; Remove extraneous .gem file that otherwise gets installed.
8575 (delete-file-recursively "pkg")
8576 #t)))))
8577 (native-inputs
8578 (list bundler ruby-rake ruby-rspec))
8579 (synopsis "Simplifies checking for Ruby implementation")
8580 (description
8581 "@code{ruby_engine} provides an RubyEngine class that can be used to
8582 check which implementation of Ruby is in use. It can provide the interpreter
8583 name and provides query methods such as @{RubyEngine.mri?}.")
8584 (home-page "https://github.com/janlelis/ruby_engine")
8585 (license license:expat)))
8586
8587 (define-public ruby-turn
8588 (package
8589 (name "ruby-turn")
8590 (version "0.9.7")
8591 (source
8592 (origin
8593 (method url-fetch)
8594 (uri (rubygems-uri "turn" version))
8595 (sha256
8596 (base32
8597 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8598 (build-system ruby-build-system)
8599 (arguments
8600 `(#:phases
8601 (modify-phases %standard-phases
8602 ;; Tests fail because turn changes its environment so can no longer
8603 ;; find test/unit. Instead simply test if the executable runs
8604 ;; without issue.
8605 (replace 'check
8606 (lambda _
8607 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8608 (propagated-inputs
8609 (list ruby-ansi ruby-minitest-4))
8610 (synopsis "Alternate set of alternative runners for MiniTest")
8611 (description
8612 "TURN provides a set of alternative runners for MiniTest which are both
8613 colorful and informative. TURN displays each test on a separate line with
8614 failures being displayed immediately instead of at the end of the tests. Note
8615 that TURN is no longer being maintained.")
8616 (home-page "https://rubygems.org/gems/turn")
8617 (license license:expat)))
8618
8619 (define-public ruby-mimemagic
8620 (package
8621 (name "ruby-mimemagic")
8622 (version "0.3.3")
8623 (source
8624 (origin
8625 (method url-fetch)
8626 (uri (rubygems-uri "mimemagic" version))
8627 (sha256
8628 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8629 (build-system ruby-build-system)
8630 (arguments
8631 '(#:phases
8632 (modify-phases %standard-phases
8633 ;; This phase breaks the tests, as it patches some of the test data.
8634 (delete 'patch-source-shebangs))))
8635 (native-inputs
8636 (list ruby-bacon))
8637 (synopsis "Ruby library for MIME detection by extension or content")
8638 (description
8639 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8640 extension or content, using the freedesktop.org.xml shared-mime-info
8641 database.")
8642 (home-page "https://github.com/minad/mimemagic")
8643 (license license:expat)))
8644
8645 (define-public ruby-mime-types-data
8646 (package
8647 (name "ruby-mime-types-data")
8648 (version "3.2016.0521")
8649 (source
8650 (origin
8651 (method url-fetch)
8652 (uri (rubygems-uri "mime-types-data" version))
8653 (sha256
8654 (base32
8655 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
8656 (build-system ruby-build-system)
8657 (native-inputs
8658 (list ruby-hoe))
8659 (synopsis "Registry for information about MIME media type definitions")
8660 (description
8661 "@code{mime-types-data} provides a registry for information about
8662 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8663 be used with the Ruby mime-types library or other software to determine
8664 defined filename extensions for MIME types, or to use filename extensions to
8665 look up the likely MIME type definitions.")
8666 (home-page "https://github.com/mime-types/mime-types-data/")
8667 (license license:expat)))
8668
8669 (define-public ruby-mime-types
8670 (package
8671 (name "ruby-mime-types")
8672 (version "3.1")
8673 (source
8674 (origin
8675 (method url-fetch)
8676 (uri (rubygems-uri "mime-types" version))
8677 (sha256
8678 (base32
8679 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
8680 (build-system ruby-build-system)
8681 (propagated-inputs
8682 (list ruby-mime-types-data))
8683 (native-inputs
8684 (list ruby-hoe
8685 ruby-fivemat
8686 ruby-minitest-focus
8687 ruby-minitest-rg
8688 ruby-minitest-bonus-assertions
8689 ruby-minitest-hooks))
8690 (synopsis "Library and registry for MIME content type definitions")
8691 (description "The mime-types library provides a library and registry for
8692 information about Multipurpose Internet Mail Extensions (MIME) content type
8693 definitions. It can be used to determine defined filename extensions for MIME
8694 types, or to use filename extensions to look up the likely MIME type
8695 definitions.")
8696 (home-page "https://github.com/mime-types/ruby-mime-types")
8697 (license license:expat)))
8698
8699 (define-public ruby-mini-mime
8700 (package
8701 (name "ruby-mini-mime")
8702 (version "1.0.2")
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (rubygems-uri "mini_mime" version))
8707 (sha256
8708 (base32
8709 "1axm0rxyx3ss93wbmfkm78a6x03l8y4qy60rhkkiq0aza0vwq3ha"))))
8710 (build-system ruby-build-system)
8711 (synopsis "Lightweight mime type lookup toy")
8712 (description "This package provides a lightweight mime type lookup toy.")
8713 (home-page "https://github.com/discourse/mini_mime")
8714 (license license:expat)))
8715
8716 (define-public ruby-fivemat
8717 (package
8718 (name "ruby-fivemat")
8719 (version "1.3.7")
8720 (source
8721 (origin
8722 (method url-fetch)
8723 (uri (rubygems-uri "fivemat" version))
8724 (sha256
8725 (base32
8726 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
8727 (build-system ruby-build-system)
8728 (arguments
8729 `(#:tests? #f)) ; no tests
8730 (synopsis "Each test file given its own line of dots")
8731 (description
8732 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8733 its own line of dots during testing. It aims to provide test output that is
8734 neither too verbose nor too minimal.")
8735 (home-page "https://github.com/tpope/fivemat")
8736 (license license:expat)))
8737
8738 (define-public ruby-sqlite3
8739 (package
8740 (name "ruby-sqlite3")
8741 (version "1.4.2")
8742 (source
8743 (origin
8744 (method url-fetch)
8745 (uri (rubygems-uri "sqlite3" version))
8746 (sha256
8747 (base32
8748 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
8749 (build-system ruby-build-system)
8750 (arguments
8751 `(#:phases
8752 (modify-phases %standard-phases
8753 (add-before 'check 'add-gemtest-file
8754 ;; This file exists in the repository but is not distributed.
8755 (lambda _ (invoke "touch" ".gemtest"))))))
8756 (inputs
8757 (list sqlite))
8758 (native-inputs
8759 (list ruby-hoe ruby-rake-compiler ruby-mini-portile))
8760 (synopsis "Interface with SQLite3 databases")
8761 (description
8762 "This module allows Ruby programs to interface with the SQLite3 database
8763 engine.")
8764 (home-page
8765 "https://github.com/sparklemotion/sqlite3-ruby")
8766 (license license:bsd-3)))
8767
8768 (define-public ruby-shoulda-context
8769 (package
8770 (name "ruby-shoulda-context")
8771 (version "1.2.2")
8772 (source
8773 (origin
8774 (method url-fetch)
8775 (uri (rubygems-uri "shoulda-context" version))
8776 (sha256
8777 (base32
8778 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
8779 (build-system ruby-build-system)
8780 (arguments
8781 `(#:phases
8782 (modify-phases %standard-phases
8783 (replace 'check
8784 (lambda _
8785 ;; Do not run tests to avoid circular dependence with rails.
8786 ;; Instead just import the library to test.
8787 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
8788 (synopsis "Test::Unit context framework extracted from Shoulda")
8789 (description
8790 "@code{shoulda-context} is the context framework extracted from Shoulda.
8791 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8792 context, setup, and should blocks combine to produce natural test method
8793 names.")
8794 (home-page "https://github.com/thoughtbot/shoulda-context")
8795 (license license:expat)))
8796
8797 (define-public ruby-shoulda-matchers
8798 (package
8799 (name "ruby-shoulda-matchers")
8800 (version "3.1.2")
8801 (source
8802 (origin
8803 (method url-fetch)
8804 (uri (rubygems-uri "shoulda-matchers" version))
8805 (sha256
8806 (base32
8807 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
8808 (build-system ruby-build-system)
8809 (arguments
8810 `(#:phases
8811 (modify-phases %standard-phases
8812 (replace 'check
8813 (lambda _
8814 ;; Do not run tests to avoid circular dependence with rails. Instead
8815 ;; just import the library to test.
8816 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
8817 (propagated-inputs
8818 (list ruby-activesupport))
8819 (synopsis "Collection of testing matchers extracted from Shoulda")
8820 (description
8821 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8822 test common Rails functionality. These tests would otherwise be much longer,
8823 more complex, and error-prone.")
8824 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8825 (license license:expat)))
8826
8827 (define-public ruby-shoulda-matchers-2
8828 (package
8829 (inherit ruby-shoulda-matchers)
8830 (version "2.8.0")
8831 (source (origin
8832 (method url-fetch)
8833 (uri (rubygems-uri "shoulda-matchers" version))
8834 (sha256
8835 (base32
8836 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8837
8838 (define-public ruby-shoulda
8839 (package
8840 (name "ruby-shoulda")
8841 (version "3.5.0")
8842 (source
8843 (origin
8844 (method url-fetch)
8845 (uri (rubygems-uri "shoulda" version))
8846 (sha256
8847 (base32
8848 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8849 (build-system ruby-build-system)
8850 (arguments
8851 `(#:phases
8852 (modify-phases %standard-phases
8853 (replace 'check
8854 ;; Don't run tests to avoid circular dependence with rails. Instead
8855 ;; just import the library to test.
8856 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
8857 (propagated-inputs
8858 (list ruby-shoulda-context ruby-shoulda-matchers-2))
8859 (synopsis "Context framework and matchers for testing")
8860 (description
8861 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8862 @code{shoulda-matchers} providing tools for writing tests.")
8863 (home-page "https://github.com/thoughtbot/shoulda")
8864 (license license:expat)))
8865
8866 (define-public ruby-unf
8867 (package
8868 (name "ruby-unf")
8869 (version "0.1.4")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (rubygems-uri "unf" version))
8874 (sha256
8875 (base32
8876 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8877 (build-system ruby-build-system)
8878 (arguments
8879 `(#:phases
8880 (modify-phases %standard-phases
8881 (add-before 'check 'add-dependency-to-bundler
8882 (lambda _
8883 ;; test-unit is required but not provided by the bundler
8884 ;; environment. This is fixed in the upstream repository but fix
8885 ;; has not been released.
8886 (substitute* "Gemfile"
8887 (("^gemspec") "gem 'test-unit'\ngemspec"))
8888 #t)))))
8889 (propagated-inputs
8890 (list ruby-unf-ext))
8891 (native-inputs
8892 (list ruby-shoulda bundler ruby-test-unit))
8893 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8894 (description
8895 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8896 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8897 @code{java.text.Normalizer} on JRuby.")
8898 (home-page "https://github.com/knu/ruby-unf")
8899 (license license:bsd-2)))
8900
8901 (define-public ruby-warden
8902 (package
8903 (name "ruby-warden")
8904 (version "1.2.8")
8905 (source
8906 (origin
8907 (method url-fetch)
8908 (uri (rubygems-uri "warden" version))
8909 (sha256
8910 (base32
8911 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8912 (build-system ruby-build-system)
8913 (arguments
8914 '(#:tests? #f)) ; No included tests
8915 (propagated-inputs
8916 (list ruby-rack))
8917 (synopsis "Rack middleware providing authentication")
8918 (description
8919 "Warden is a Rack-based middleware that provides a mechanism for
8920 authentication in Ruby web applications.")
8921 (home-page "https://github.com/wardencommunity/warden")
8922 (license license:expat)))
8923
8924 (define-public ruby-warden-oauth2
8925 (package
8926 (name "ruby-warden-oauth2")
8927 (version "0.0.1")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (rubygems-uri "warden-oauth2" version))
8932 (sha256
8933 (base32
8934 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8935 (build-system ruby-build-system)
8936 (arguments
8937 '(#:test-target "spec"
8938 #:phases
8939 (modify-phases %standard-phases
8940 (add-after 'unpack 'remove-unnecessary-dependencies
8941 (lambda _
8942 (substitute* "Gemfile"
8943 ;; All of these gems relate to development, and are unnecessary
8944 ;; when running the tests
8945 (("gem 'guard-bundler'") "")
8946 (("gem 'guard'") "")
8947 (("gem 'guard-rspec'") "")
8948 (("gem 'rb-fsevent'") "")
8949 (("gem 'pry'") "")
8950 (("gem 'growl'") ""))
8951 #t))
8952 ;; The test suite doesn't work with rspec@2, and this is incompatible
8953 ;; with the current version of Rake, so invoke Rspec directly
8954 (replace 'check
8955 (lambda* (#:key tests? #:allow-other-keys)
8956 (when tests?
8957 (invoke "bundle" "exec" "rspec"))
8958 #t)))))
8959 (propagated-inputs
8960 (list ruby-warden))
8961 (native-inputs
8962 (list bundler ruby-rspec-2 ruby-rack-test))
8963 (synopsis "OAuth 2.0 strategies for Warden")
8964 (description
8965 "This library extends Warden to support OAuth 2.0 authorized API
8966 requests.")
8967 (home-page "https://github.com/opperator/warden-oauth2")
8968 (license license:expat)))
8969
8970 (define-public ruby-webmock
8971 (package
8972 (name "ruby-webmock")
8973 (version "3.11.2")
8974 (source
8975 (origin
8976 (method url-fetch)
8977 (uri (rubygems-uri "webmock" version))
8978 (sha256
8979 (base32
8980 "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
8981 (build-system ruby-build-system)
8982 (native-inputs
8983 (list bundler ruby-rspec))
8984 (propagated-inputs
8985 (list ruby-addressable ruby-crack ruby-hashdiff))
8986 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8987 (description
8988 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8989 requests. This is useful when testing software.")
8990 (home-page "https://github.com/bblimke/webmock")
8991 (license license:expat)))
8992
8993 (define-public ruby-webmock-2
8994 (package
8995 (inherit ruby-webmock)
8996 (name "ruby-webmock")
8997 (version "2.3.2")
8998 (source
8999 (origin
9000 (method url-fetch)
9001 (uri (rubygems-uri "webmock" version))
9002 (sha256
9003 (base32
9004 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
9005
9006 (define-public ruby-unicode-display-width
9007 (package
9008 (name "ruby-unicode-display-width")
9009 (version "1.6.0")
9010 (source
9011 (origin
9012 (method url-fetch)
9013 (uri (rubygems-uri "unicode-display_width" version))
9014 (sha256
9015 (base32
9016 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
9017 (build-system ruby-build-system)
9018 (arguments
9019 '(;; Test data not included.
9020 #:tests? #f))
9021 (synopsis "Determine the monospace display width of Ruby strings")
9022 (description
9023 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
9024 display width of strings in Ruby.")
9025 (home-page "https://github.com/janlelis/unicode-display_width")
9026 (license license:expat)))
9027
9028 ;; There is another gem called 'ruby-version' so we use an underscore in this
9029 ;; name
9030 (define-public ruby_version
9031 (package
9032 (name "ruby_version")
9033 (version "1.0.2")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (rubygems-uri "ruby_version" version))
9038 (sha256
9039 (base32
9040 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
9041 (build-system ruby-build-system)
9042 (arguments
9043 `(#:phases
9044 (modify-phases %standard-phases
9045 (add-before 'check 'fix-dependencies
9046 (lambda _
9047 ;; Remove the Gemfile.lock, as we want to use Guix packages at
9048 ;; whatever versions.
9049 (delete-file "Gemfile.lock")
9050 ;; Remove the included gem files as they unnecessary.
9051 (delete-file-recursively "pkg/")
9052 ;; Accept any version of rake, rdoc and rspec
9053 (substitute* "ruby_version.gemspec"
9054 (("%q<rake.*") "%q<rake>)\n")
9055 (("%q<rdoc.*") "%q<rdoc>)\n")
9056 (("%q<rspec.*") "%q<rspec>)\n"))
9057 ;; Do not use bundler.
9058 (substitute* "Rakefile"
9059 (("Bundler\\.setup.*") "nil\n"))
9060 #t)))))
9061 (native-inputs
9062 (list ruby-rdoc ruby-rspec ruby-rubygems-tasks))
9063 (synopsis "Ruby library to help check the Ruby version")
9064 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
9065 checking for the right Ruby version in software.")
9066 (home-page "https://github.com/janlelis/ruby_version")
9067 (license license:expat)))
9068
9069 (define-public ruby-websocket-driver
9070 (package
9071 (name "ruby-websocket-driver")
9072 (version "0.7.1")
9073 (source
9074 (origin
9075 (method url-fetch)
9076 (uri (rubygems-uri "websocket-driver" version))
9077 (sha256
9078 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
9079 (build-system ruby-build-system)
9080 (arguments
9081 '(#:tests? #f)) ; no included tests
9082 (propagated-inputs
9083 (list ruby-websocket-extensions))
9084 (synopsis "WebSocket protocol handler with pluggable I/O")
9085 (description
9086 "@code{websocket-driver} provides a complete implementation of the
9087 WebSocket protocols that can be hooked up to any TCP library")
9088 (home-page "https://github.com/faye/websocket-driver-ruby")
9089 (license license:expat)))
9090
9091 (define-public ruby-websocket-extensions
9092 (package
9093 (name "ruby-websocket-extensions")
9094 (version "0.1.3")
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (rubygems-uri "websocket-extensions" version))
9099 (sha256
9100 (base32
9101 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
9102 (build-system ruby-build-system)
9103 (arguments
9104 '(;; No included tests
9105 #:tests? #f))
9106 (synopsis "Generic extension manager for WebSocket connections")
9107 (description
9108 "@code{websocket-extensions} provides a container for registering
9109 extension plugins.")
9110 (home-page "https://github.com/faye/websocket-extensions-ruby")
9111 (license license:expat)))
9112
9113 (define-public ruby-domain-name
9114 (package
9115 (name "ruby-domain-name")
9116 (version "0.5.20190701")
9117 (source
9118 (origin
9119 (method url-fetch)
9120 (uri (rubygems-uri "domain_name" version))
9121 (sha256
9122 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
9123 (build-system ruby-build-system)
9124 (arguments
9125 `(#:phases
9126 (modify-phases %standard-phases
9127 (add-before 'check 'fix-versions
9128 (lambda _
9129 ;; Fix NameError that appears to already be fixed upstream.
9130 (substitute* "Rakefile"
9131 (("DomainName::VERSION")
9132 "Bundler::GemHelper.gemspec.version"))
9133 ;; Loosen unnecessarily strict test-unit version specification.
9134 (substitute* "domain_name.gemspec"
9135 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
9136 #t)))))
9137 (propagated-inputs
9138 (list ruby-unf))
9139 (native-inputs
9140 (list ruby-shoulda bundler ruby-test-unit))
9141 (synopsis "Domain name manipulation library")
9142 (description
9143 "@code{domain_name} is a Domain name manipulation library. It parses a
9144 domain name ready for extracting the registered domain and TLD (Top Level
9145 Domain). It can also be used for cookie domain validation based on the Public
9146 Suffix List.")
9147 (home-page "https://github.com/knu/ruby-domain_name")
9148 (license license:bsd-2)))
9149
9150 (define-public ruby-http-cookie
9151 (package
9152 (name "ruby-http-cookie")
9153 (version "1.0.3")
9154 (source
9155 (origin
9156 (method url-fetch)
9157 (uri (rubygems-uri "http-cookie" version))
9158 (sha256
9159 (base32
9160 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
9161 (build-system ruby-build-system)
9162 (arguments
9163 `(#:phases
9164 (modify-phases %standard-phases
9165 (add-before 'check 'add-dependency-to-bundler
9166 (lambda _
9167 ;; Fix NameError
9168 (substitute* "Rakefile"
9169 (("HTTP::Cookie::VERSION")
9170 "Bundler::GemHelper.gemspec.version"))
9171 #t)))))
9172 (propagated-inputs
9173 (list ruby-domain-name))
9174 (native-inputs
9175 `(("rubysimplecov" ,ruby-simplecov)
9176 ("bundler" ,bundler)
9177 ("ruby-sqlite3" ,ruby-sqlite3)
9178 ("ruby-test-unit" ,ruby-test-unit)))
9179 (synopsis "Handle HTTP Cookies based on RFC 6265")
9180 (description
9181 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
9182 RFC 6265. It has been designed with security, standards compliance and
9183 compatibility in mind, to behave just the same as today's major web browsers.
9184 It has built-in support for the legacy @code{cookies.txt} and
9185 @code{cookies.sqlite} formats of Mozilla Firefox.")
9186 (home-page "https://github.com/sparklemotion/http-cookie")
9187 (license license:expat)))
9188
9189 (define-public ruby-httpclient
9190 (package
9191 (name "ruby-httpclient")
9192 (version "2.8.3")
9193 (source
9194 (origin
9195 (method url-fetch)
9196 (uri (rubygems-uri "httpclient" version))
9197 (sha256
9198 (base32
9199 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
9200 (build-system ruby-build-system)
9201 (arguments
9202 '(;; TODO: Some tests currently fail
9203 ;; ------
9204 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
9205 ;; 2 omissions, 0 notifications
9206 ;; 91.866% passed
9207 ;; ------
9208 ;; 6.49 tests/s, 22.41 assertions/s
9209 #:tests? #f
9210 #:phases
9211 (modify-phases %standard-phases
9212 (replace 'check
9213 (lambda* (#:key tests? #:allow-other-keys)
9214 (if tests?
9215 (invoke "ruby"
9216 "-Ilib"
9217 "test/runner.rb")
9218 #t))))))
9219 (native-inputs
9220 (list ruby-rack))
9221 (synopsis
9222 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
9223 (description
9224 "The @code{httpclient} ruby library provides functionality related to
9225 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
9226 Cookie, multithreading and authentication (digest, NTLM) support.
9227
9228 Also provided is a @command{httpclient} command, which can perform HTTP
9229 requests either using arguments or with an interactive prompt.")
9230 (home-page "https://github.com/nahi/httpclient")
9231 (license license:ruby)))
9232
9233 (define-public ruby-ansi
9234 (package
9235 (name "ruby-ansi")
9236 (version "1.5.0")
9237 (source
9238 (origin
9239 (method git-fetch)
9240 ;; Fetch from GitHub as the gem does not contain testing code.
9241 (uri (git-reference
9242 (url "https://github.com/rubyworks/ansi")
9243 (commit version)))
9244 (file-name (git-file-name name version))
9245 (sha256
9246 (base32
9247 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
9248 (build-system ruby-build-system)
9249 (arguments
9250 `(#:phases
9251 (modify-phases %standard-phases
9252 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
9253 ;; cycle ansi, qed, ansi. Instead simply test that the library can
9254 ;; be require'd.
9255 (replace 'check
9256 (lambda _
9257 (invoke "ruby" "-Ilib" "-r" "ansi")))
9258 (add-before 'validate-runpath 'replace-broken-symlink
9259 (lambda* (#:key outputs #:allow-other-keys)
9260 (let* ((out (assoc-ref outputs "out"))
9261 (file (string-append
9262 out "/lib/ruby/vendor_ruby/gems/ansi-"
9263 ,version "/lib/ansi.yml")))
9264 ;; XXX: This symlink is broken since ruby 2.4.
9265 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9266 (delete-file file)
9267 (symlink "../.index" file)
9268 #t))))))
9269 (synopsis "ANSI escape code related libraries")
9270 (description
9271 "This package is a collection of ANSI escape code related libraries
9272 enabling ANSI colorization and stylization of console output. Included in the
9273 library are the @code{Code} module, which defines ANSI codes as constants and
9274 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
9275 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
9276 @code{Terminal} module which provides information about the current output
9277 device.")
9278 (home-page "https://rubyworks.github.io/ansi/")
9279 (license license:bsd-2)))
9280
9281 (define-public ruby-systemu
9282 (package
9283 (name "ruby-systemu")
9284 (version "2.6.5")
9285 (source
9286 (origin
9287 (method url-fetch)
9288 (uri (rubygems-uri "systemu" version))
9289 (sha256
9290 (base32
9291 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
9292 (build-system ruby-build-system)
9293 (arguments
9294 `(#:phases
9295 (modify-phases %standard-phases
9296 (add-before 'check 'set-version
9297 (lambda _
9298 (setenv "VERSION" ,version)
9299 #t)))))
9300 (synopsis "Capture of stdout/stderr and handling of child processes")
9301 (description
9302 "Systemu can be used on any platform to return status, stdout, and stderr
9303 of any command. Unlike other methods like @code{open3} and @code{popen4}
9304 there is no danger of full pipes or threading issues hanging your process or
9305 subprocess.")
9306 (home-page "https://github.com/ahoward/systemu")
9307 (license license:ruby)))
9308
9309 (define-public ruby-bio-commandeer
9310 (package
9311 (name "ruby-bio-commandeer")
9312 (version "0.4.0")
9313 (source
9314 (origin
9315 (method url-fetch)
9316 (uri (rubygems-uri "bio-commandeer" version))
9317 (sha256
9318 (base32
9319 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
9320 (build-system ruby-build-system)
9321 (arguments
9322 `(#:phases
9323 (modify-phases %standard-phases
9324 (replace 'check
9325 ;; Run test without calling 'rake' so that jeweler is
9326 ;; not required as an input.
9327 (lambda _
9328 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
9329 (propagated-inputs
9330 (list ruby-bio-logger ruby-systemu))
9331 (native-inputs
9332 (list bundler ruby-rspec))
9333 (synopsis "Simplified running of shell commands from within Ruby")
9334 (description
9335 "Bio-commandeer provides an opinionated method of running shell commands
9336 from within Ruby. The advantage of bio-commandeer over other methods of
9337 running external commands is that when something goes wrong, messages printed
9338 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
9339 detail to ease debugging.")
9340 (home-page "https://github.com/wwood/bioruby-commandeer")
9341 (license license:expat)))
9342
9343 (define-public ruby-rubytest
9344 (package
9345 (name "ruby-rubytest")
9346 (version "0.8.1")
9347 (source
9348 (origin
9349 (method url-fetch)
9350 (uri (rubygems-uri "rubytest" version))
9351 (sha256
9352 (base32
9353 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
9354 (build-system ruby-build-system)
9355 (arguments
9356 ;; Disable regular testing to break the cycle rubytest, qed, brass,
9357 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
9358 ;; simply test that the library can be require'd.
9359 `(#:phases
9360 (modify-phases %standard-phases
9361 (replace 'check
9362 (lambda _
9363 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
9364 (propagated-inputs
9365 (list ruby-ansi))
9366 (synopsis "Universal test harness for Ruby")
9367 (description
9368 "Rubytest is a testing meta-framework for Ruby. It can handle any
9369 compliant test framework and can run tests from multiple frameworks in a
9370 single pass.")
9371 (home-page "https://rubyworks.github.io/rubytest")
9372 (license license:bsd-2)))
9373
9374 (define-public ruby-brass
9375 (package
9376 (name "ruby-brass")
9377 (version "1.2.1")
9378 (source
9379 (origin
9380 (method url-fetch)
9381 (uri (rubygems-uri "brass" version))
9382 (sha256
9383 (base32
9384 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
9385 (build-system ruby-build-system)
9386 (arguments
9387 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
9388 ;; Instead simply test that the library can be require'd.
9389 `(#:phases
9390 (modify-phases %standard-phases
9391 (replace 'check
9392 (lambda _
9393 (invoke "ruby" "-Ilib" "-r" "brass"))))))
9394 (synopsis "Basic foundational assertions framework")
9395 (description
9396 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
9397 foundational assertions framework for other assertion and test frameworks to
9398 make use of.")
9399 (home-page "https://rubyworks.github.io/brass")
9400 (license license:bsd-2)))
9401
9402 (define-public ruby-qed
9403 (package
9404 (name "ruby-qed")
9405 (version "2.9.2")
9406 (source
9407 (origin
9408 (method url-fetch)
9409 (uri (rubygems-uri "qed" version))
9410 (sha256
9411 (base32
9412 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
9413 (build-system ruby-build-system)
9414 (arguments
9415 ;; Disable testing to break the cycle qed, ansi, qed, among others.
9416 ;; Instead simply test that the executable runs using --copyright.
9417 `(#:phases
9418 (modify-phases %standard-phases
9419 (replace 'check
9420 (lambda _
9421 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
9422 (propagated-inputs
9423 (list ruby-ansi ruby-brass))
9424 (synopsis "Test framework utilizing literate programming techniques")
9425 (description
9426 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
9427 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
9428 Development} (BDD) utilizing Literate Programming techniques. QED sits
9429 somewhere between lower-level testing tools like @code{Test::Unit} and
9430 requirement specifications systems like Cucumber.")
9431 (home-page "https://rubyworks.github.io/qed")
9432 (license license:bsd-2)))
9433
9434 (define-public ruby-que
9435 (package
9436 (name "ruby-que")
9437 (version "1.0.0.beta3")
9438 (source
9439 (origin
9440 (method url-fetch)
9441 (uri (rubygems-uri "que" version))
9442 (sha256
9443 (base32
9444 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
9445 (build-system ruby-build-system)
9446 (arguments
9447 '(#:tests? #f)) ; No included tests
9448 (synopsis "Job queue using PostgreSQL written in Ruby")
9449 (description
9450 "This package provides a job queue that uses PostgreSQL for storing jobs
9451 and locking between worker processes.")
9452 (home-page "https://github.com/chanks/que")
9453 (license license:expat)))
9454
9455 (define-public ruby-ae
9456 (package
9457 (name "ruby-ae")
9458 (version "1.8.2")
9459 (source
9460 (origin
9461 (method git-fetch)
9462 ;; Fetch from github so tests are included.
9463 (uri (git-reference
9464 (url "https://github.com/rubyworks/ae")
9465 (commit version)))
9466 (file-name (git-file-name name version))
9467 (sha256
9468 (base32
9469 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9470 (build-system ruby-build-system)
9471 (arguments
9472 `(#:phases
9473 (modify-phases %standard-phases
9474 (replace 'check
9475 (lambda _ (invoke "qed")))
9476 (add-before 'validate-runpath 'replace-broken-symlink
9477 (lambda* (#:key outputs #:allow-other-keys)
9478 (let* ((out (assoc-ref outputs "out"))
9479 (file (string-append
9480 out "/lib/ruby/vendor_ruby/gems/ae-"
9481 ,version "/lib/ae.yml")))
9482 ;; XXX: This symlink is broken since ruby 2.4.
9483 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9484 (delete-file file)
9485 (symlink "../.index" file)
9486 #t))))))
9487 (propagated-inputs
9488 (list ruby-ansi))
9489 (native-inputs
9490 (list ruby-qed))
9491 (synopsis "Assertions library")
9492 (description
9493 "Assertive Expressive (AE) is an assertions library specifically designed
9494 for reuse by other test frameworks.")
9495 (home-page "https://rubyworks.github.io/ae/")
9496 (license license:bsd-2)))
9497
9498 (define-public ruby-lemon
9499 (package
9500 (name "ruby-lemon")
9501 (version "0.9.1")
9502 (source
9503 (origin
9504 (method url-fetch)
9505 (uri (rubygems-uri "lemon" version))
9506 (sha256
9507 (base32
9508 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
9509 (build-system ruby-build-system)
9510 (arguments
9511 `(#:phases
9512 (modify-phases %standard-phases
9513 (replace 'check (lambda _ (invoke "qed"))))))
9514 (propagated-inputs
9515 (list ruby-ae ruby-ansi ruby-rubytest))
9516 (native-inputs
9517 (list ruby-qed))
9518 (synopsis "Test framework correlating code structure and test unit")
9519 (description
9520 "Lemon is a unit testing framework that enforces highly formal
9521 case-to-class and unit-to-method test construction. This enforcement can help
9522 focus concern on individual units of behavior.")
9523 (home-page "https://rubyworks.github.io/lemon")
9524 (license license:bsd-2)))
9525
9526 (define-public ruby-rubytest-cli
9527 (package
9528 (name "ruby-rubytest-cli")
9529 (version "0.2.0")
9530 (source
9531 (origin
9532 (method url-fetch)
9533 (uri (rubygems-uri "rubytest-cli" version))
9534 (sha256
9535 (base32
9536 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
9537 (build-system ruby-build-system)
9538 (arguments
9539 `(#:tests? #f)) ; no tests
9540 (propagated-inputs
9541 (list ruby-ansi ruby-rubytest))
9542 (synopsis "Command-line interface for rubytest")
9543 (description
9544 "Rubytest CLI is a command-line interface for running tests for
9545 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
9546 (home-page "https://rubyworks.github.io/rubytest-cli")
9547 (license license:bsd-2)))
9548
9549 (define-public ruby-hashery
9550 (package
9551 (name "ruby-hashery")
9552 (version "2.1.2")
9553 (source
9554 (origin
9555 (method url-fetch)
9556 (uri (rubygems-uri "hashery" version))
9557 (sha256
9558 (base32
9559 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
9560 (build-system ruby-build-system)
9561 (arguments
9562 `(#:phases
9563 (modify-phases %standard-phases
9564 (replace 'check
9565 (lambda _
9566 (invoke "qed")
9567 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
9568 (native-inputs
9569 (list ruby-rubytest-cli ruby-qed ruby-lemon))
9570 (synopsis "Hash-like classes with extra features")
9571 (description
9572 "The Hashery is a tight collection of @code{Hash}-like classes.
9573 Included are the auto-sorting @code{Dictionary} class, the efficient
9574 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
9575 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9576 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9577 standard @code{Hash} making it possible to subclass and augment to fit any
9578 specific use case.")
9579 (home-page "https://rubyworks.github.io/hashery")
9580 (license license:bsd-2)))
9581
9582 (define-public ruby-rc4
9583 (package
9584 (name "ruby-rc4")
9585 (version "0.1.5")
9586 (source
9587 (origin
9588 (method url-fetch)
9589 (uri (rubygems-uri "ruby-rc4" version))
9590 (sha256
9591 (base32
9592 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9593 (build-system ruby-build-system)
9594 (arguments
9595 `(#:phases
9596 (modify-phases %standard-phases
9597 (replace 'check
9598 (lambda _
9599 (invoke "rspec" "spec/rc4_spec.rb"))))))
9600 (native-inputs
9601 (list ruby-rspec-2))
9602 (synopsis "Implementation of the RC4 algorithm")
9603 (description
9604 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9605 (home-page "https://github.com/caiges/Ruby-RC4")
9606 (license license:expat)))
9607
9608 (define-public ruby-afm
9609 (package
9610 (name "ruby-afm")
9611 (version "0.2.2")
9612 (source
9613 (origin
9614 (method url-fetch)
9615 (uri (rubygems-uri "afm" version))
9616 (sha256
9617 (base32
9618 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9619 (build-system ruby-build-system)
9620 (native-inputs
9621 (list bundler))
9622 (synopsis "Read Adobe Font Metrics (afm) files")
9623 (description
9624 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9625 files and use the data therein.")
9626 (home-page "https://github.com/halfbyte/afm")
9627 (license license:expat)))
9628
9629 (define-public ruby-ascii85
9630 (package
9631 (name "ruby-ascii85")
9632 (version "1.0.3")
9633 (source
9634 (origin
9635 (method url-fetch)
9636 (uri (rubygems-uri "Ascii85" version))
9637 (sha256
9638 (base32
9639 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
9640 (build-system ruby-build-system)
9641 (native-inputs
9642 (list bundler))
9643 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9644 (description
9645 "This library provides methods to encode and decode Ascii85
9646 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9647 @dfn{Portable Document Format} (PDF) file formats.")
9648 (home-page "https://github.com/datawraith/ascii85gem")
9649 (license license:expat)))
9650
9651 (define-public ruby-ttfunk
9652 (package
9653 (name "ruby-ttfunk")
9654 (version "1.6.2.1")
9655 (source
9656 (origin
9657 (method git-fetch)
9658 ;; fetch from github as the gem does not contain testing code
9659 (uri (git-reference
9660 (url "https://github.com/prawnpdf/ttfunk")
9661 (commit version)))
9662 (file-name (git-file-name name version))
9663 (sha256
9664 (base32
9665 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
9666 (build-system ruby-build-system)
9667 (arguments
9668 `(#:test-target "spec"
9669 #:phases
9670 (modify-phases %standard-phases
9671 (add-before 'build 'remove-ssh
9672 (lambda _
9673 ;; remove dependency on an ssh key pair that doesn't exist
9674 (substitute* "ttfunk.gemspec"
9675 (("spec.signing_key.*") ""))
9676 #t))
9677 (add-before 'check 'remove-rubocop
9678 (lambda _
9679 ;; remove rubocop as a dependency as not needed for testing
9680 (substitute* "ttfunk.gemspec"
9681 (("spec.add_development_dependency\\('rubocop'.*") ""))
9682 (substitute* "Rakefile"
9683 (("require 'rubocop/rake_task'") "")
9684 (("RuboCop::RakeTask.new") ""))
9685 #t)))))
9686 (native-inputs
9687 (list ruby-rspec ruby-yard bundler))
9688 (synopsis "Font metrics parser for the Prawn PDF generator")
9689 (description
9690 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9691 part of the Prawn PDF generator.")
9692 (home-page "https://github.com/prawnpdf/ttfunk")
9693 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9694 ;; for details."
9695 (license %prawn-project-licenses)))
9696
9697 (define-public ruby-puma
9698 (package
9699 (name "ruby-puma")
9700 (version "3.9.1")
9701 (source
9702 (origin
9703 (method git-fetch)
9704 ;; Fetch from GitHub because distributed gem does not contain tests.
9705 (uri (git-reference
9706 (url "https://github.com/puma/puma")
9707 (commit (string-append "v" version))))
9708 (file-name (git-file-name name version))
9709 (sha256
9710 (base32
9711 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9712 (build-system ruby-build-system)
9713 (arguments
9714 `(#:tests? #f ; Tests require an out-dated version of minitest.
9715 #:phases
9716 (modify-phases %standard-phases
9717 (add-before 'build 'fix-gemspec
9718 (lambda _
9719 (substitute* "puma.gemspec"
9720 (("git ls-files") "find * |sort"))
9721 #t)))))
9722 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9723 (description
9724 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9725 for Ruby/Rack applications. Puma is intended for use in both development and
9726 production environments. In order to get the best throughput, it is highly
9727 recommended that you use a Ruby implementation with real threads like Rubinius
9728 or JRuby.")
9729 (home-page "https://puma.io/")
9730 (license license:expat)))
9731
9732 (define-public ruby-hoe-git
9733 (package
9734 (name "ruby-hoe-git")
9735 (version "1.6.0")
9736 (source
9737 (origin
9738 (method url-fetch)
9739 (uri (rubygems-uri "hoe-git" version))
9740 (sha256
9741 (base32
9742 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9743 (build-system ruby-build-system)
9744 (propagated-inputs
9745 (list ruby-hoe))
9746 (synopsis "Hoe plugins for tighter Git integration")
9747 (description
9748 "This package provides a set of Hoe plugins for tighter Git integration.
9749 It provides tasks to automate release tagging and pushing and changelog
9750 generation.")
9751 (home-page "https://github.com/jbarnette/hoe-git")
9752 (license license:expat)))
9753
9754 (define-public ruby-hoe-markdown
9755 (package
9756 (name "ruby-hoe-markdown")
9757 (version "1.4.0")
9758 (home-page "https://github.com/flavorjones/hoe-markdown")
9759 (source
9760 (origin
9761 (method git-fetch)
9762 (uri (git-reference
9763 (url home-page)
9764 (commit (string-append "v" version))))
9765 (file-name (git-file-name name version))
9766 (sha256
9767 (base32 "0wb0yjdx9gx9r0cahpx42pblvglgh1i9pdfxjavq7f40nan2g076"))))
9768 (build-system ruby-build-system)
9769 (arguments
9770 '(#:test-target "spec"
9771 #:phases (modify-phases %standard-phases
9772 (add-before 'check 'disable-bundler-dependency
9773 (lambda _
9774 (substitute* "spec/spec_helper.rb"
9775 (("require.*bundler/setup.*")
9776 "")))))))
9777 (native-inputs
9778 (list ruby-rspec))
9779 (propagated-inputs
9780 (list ruby-rake))
9781 (synopsis "Hoe plugin with Markdown helpers")
9782 (description
9783 "This package provides a Hoe plugin with various Markdown helpers, which
9784 can be used to e.g. hyperlink Markdown documentation between project files.")
9785 (license license:expat)))
9786
9787 (define-public ruby-sequel
9788 (package
9789 (name "ruby-sequel")
9790 (version "5.47.0")
9791 (source
9792 (origin
9793 (method url-fetch)
9794 (uri (rubygems-uri "sequel" version))
9795 (sha256
9796 (base32
9797 "03pmhj4kc3ga75wy397l57bvd18jxxmrk3qsznjw93b993qgvj3z"))))
9798 (build-system ruby-build-system)
9799 (arguments
9800 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9801 (synopsis "Database toolkit for Ruby")
9802 (description "Sequel provides thread safety, connection pooling and a
9803 concise DSL for constructing SQL queries and table schemas. It includes a
9804 comprehensive ORM layer for mapping records to Ruby objects and handling
9805 associated records.")
9806 (home-page "https://sequel.jeremyevans.net")
9807 (license license:expat)))
9808
9809 (define-public ruby-timecop
9810 (package
9811 (name "ruby-timecop")
9812 (version "0.9.1")
9813 (source
9814 (origin
9815 (method url-fetch)
9816 (uri (rubygems-uri "timecop" version))
9817 (sha256
9818 (base32
9819 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
9820 (build-system ruby-build-system)
9821 (arguments
9822 `(#:phases
9823 (modify-phases %standard-phases
9824 (add-before 'check 'set-check-rubylib
9825 (lambda _
9826 ;; Set RUBYLIB so timecop tests finds its own lib.
9827 (setenv "RUBYLIB" "lib")
9828 #t)))))
9829 (native-inputs
9830 (list bundler ruby-minitest-rg ruby-mocha ruby-activesupport))
9831 (synopsis "Test mocks for time-dependent functions")
9832 (description
9833 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9834 making it easier to test time-dependent code. It provides a unified method to
9835 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9836 call.")
9837 (home-page "https://github.com/travisjeffery/timecop")
9838 (license license:expat)))
9839
9840 (define-public ruby-concurrent
9841 (package
9842 (name "ruby-concurrent")
9843 (version "1.1.5")
9844 (source
9845 (origin
9846 (method git-fetch)
9847 ;; Download from GitHub because the rubygems version does not contain
9848 ;; Rakefile.
9849 (uri (git-reference
9850 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9851 (commit (string-append "v" version))))
9852 (file-name (git-file-name name version))
9853 (sha256
9854 (base32
9855 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
9856 (build-system ruby-build-system)
9857 (arguments
9858 `(#:test-target "ci"
9859 #:phases
9860 (modify-phases %standard-phases
9861 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
9862 (lambda _
9863 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9864 ;; correct one.
9865 (delete-file "concurrent-ruby-edge.gemspec")
9866 (delete-file "concurrent-ruby-ext.gemspec")
9867 #t))
9868 (replace 'replace-git-ls-files
9869 (lambda _
9870 ;; XXX: The default substitution made by this phase is not fully
9871 ;; compatible with "git ls-files". The latter produces file names
9872 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9873 ;; which gives "./lib/foo". That difference in turn breaks the
9874 ;; comparison against a glob pattern in this script.
9875 (substitute* "concurrent-ruby.gemspec"
9876 (("git ls-files") "find * -type f | sort"))
9877 #t))
9878 (add-before 'build 'remove-jar-from-gemspec
9879 (lambda _
9880 ;; The gemspec wants to include a JAR file that we do not build
9881 ;; nor need.
9882 (substitute* "concurrent-ruby.gemspec"
9883 (("'lib/concurrent/concurrent_ruby.jar'")
9884 ""))
9885 #t))
9886 (add-before 'build 'remove-rake_compiler_dock-dependency
9887 (lambda _
9888 ;; This library is only used when building for non-MRI targets.
9889 (substitute* "Rakefile"
9890 (("require 'rake_compiler_dock'")
9891 ""))
9892 #t))
9893 (add-before 'check 'remove-timecop-dependency
9894 ;; Remove timecop-dependent tests as having timecop as a depedency
9895 ;; causes circular depedencies.
9896 (lambda _
9897 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9898 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9899 #t)))))
9900 (native-inputs
9901 (list ruby-rake-compiler ruby-rspec))
9902 (synopsis "Concurrency tools for Ruby")
9903 (description
9904 "This library provides modern concurrency tools including agents,
9905 futures, promises, thread pools, actors, supervisors, and more. It is
9906 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9907 patterns.")
9908 (home-page "http://www.concurrent-ruby.com")
9909 (license license:expat)))
9910
9911 (define-public ruby-pkg-config
9912 (package
9913 (name "ruby-pkg-config")
9914 (version "1.2.5")
9915 (source
9916 (origin
9917 (method url-fetch)
9918 (uri (rubygems-uri "pkg-config" version))
9919 (sha256
9920 (base32
9921 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
9922 (build-system ruby-build-system)
9923 (arguments
9924 ;; Tests require extra files not included in the gem.
9925 `(#:tests? #f))
9926 (synopsis "Detect libraries for compiling Ruby native extensions")
9927 (description
9928 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9929 libraries for compiling Ruby native extensions.")
9930 (home-page "https://github.com/ruby-gnome2/pkg-config")
9931 (license license:lgpl2.0+)))
9932
9933 (define-public ruby-net-http-digest-auth
9934 (package
9935 (name "ruby-net-http-digest-auth")
9936 (version "1.4.1")
9937 (source
9938 (origin
9939 (method url-fetch)
9940 (uri (rubygems-uri "net-http-digest_auth" version))
9941 (sha256
9942 (base32
9943 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
9944 (build-system ruby-build-system)
9945 (native-inputs
9946 (list ruby-hoe))
9947 (synopsis "RFC 2617 HTTP digest authentication library")
9948 (description
9949 "This library implements HTTP's digest authentication scheme based on
9950 RFC 2617. This enables the use of the digest authentication scheme instead
9951 of the more insecure basic authentication scheme.")
9952 (home-page "https://github.com/drbrain/net-http-digest_auth")
9953 (license license:expat)))
9954
9955 (define-public ruby-mail
9956 (package
9957 (name "ruby-mail")
9958 (version "2.7.1")
9959 (source
9960 (origin
9961 (method url-fetch)
9962 (uri (rubygems-uri "mail" version))
9963 (sha256
9964 (base32
9965 "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"))))
9966 (build-system ruby-build-system)
9967 (propagated-inputs
9968 (list ruby-mini-mime))
9969 (arguments
9970 '(#:tests? #f)) ; no rakefile
9971 (synopsis "Mail library for Ruby")
9972 (description
9973 "Mail is an internet library for Ruby that is designed to handle email
9974 generation, parsing and sending. The purpose of this library is to provide
9975 a single point of access to handle all email functions, including sending
9976 and receiving emails. All network type actions are done through proxy
9977 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9978
9979 Mail has been designed with a very simple object oriented system that
9980 really opens up the email messages you are parsing, if you know what you
9981 are doing, you can fiddle with every last bit of your email directly.")
9982 (home-page "https://github.com/mikel/mail")
9983 (license license:expat)))
9984
9985 (define-public ruby-email-reply-trimmer
9986 (package
9987 (name "ruby-email-reply-trimmer")
9988 (version "0.1.13")
9989 (source
9990 (origin
9991 (method url-fetch)
9992 (uri (rubygems-uri "email_reply_trimmer" version))
9993 (sha256
9994 (base32
9995 "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
9996 (build-system ruby-build-system)
9997 (synopsis "Trim replies from plain text email")
9998 (description "EmailReplyTrimmer is a Ruby small library to trim replies
9999 from plain text email.")
10000 (home-page "https://github.com/discourse/email_reply_trimmer")
10001 (license license:expat)))
10002
10003 (define-public ruby-mathn
10004 (package
10005 (name "ruby-mathn")
10006 (version "0.1.0")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (rubygems-uri "mathn" version))
10011 (sha256
10012 (base32
10013 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
10014 (build-system ruby-build-system)
10015 (native-inputs
10016 (list bundler ruby-rake-compiler))
10017 (synopsis "Extends math operations for increased precision")
10018 (description
10019 "This gem makes mathematical operations more precise in Ruby and
10020 integrates other mathematical standard libraries. Prior to Ruby 2.5,
10021 @code{mathn} was part of the Ruby standard library.")
10022 (home-page "https://github.com/ruby/mathn")
10023 (license license:bsd-2)))
10024
10025 (define-public ruby-code-statistics
10026 (package
10027 (name "ruby-code-statistics")
10028 (version "0.2.13")
10029 (source
10030 (origin
10031 (method url-fetch)
10032 (uri (rubygems-uri "code_statistics" version))
10033 (sha256
10034 (base32
10035 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
10036 (build-system ruby-build-system)
10037 (arguments
10038 `(#:tests? #f)) ; Not all test code is included in gem.
10039 (synopsis "Port of the rails 'rake stats' method")
10040 (description
10041 "This gem is a port of the rails 'rake stats' method so it can be made
10042 more robust and work for non rails projects.")
10043 (home-page "https://github.com/danmayer/code_statistics")
10044 (license license:expat)))
10045
10046 (define-public ruby-rubypants
10047 (package
10048 (name "ruby-rubypants")
10049 (version "0.6.0")
10050 (source (origin
10051 (method url-fetch)
10052 (uri (rubygems-uri "rubypants" version))
10053 (sha256
10054 (base32
10055 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
10056 (build-system ruby-build-system)
10057 (arguments
10058 '(#:tests? #f)) ; need Codecov
10059 (synopsis "Port of the smart-quotes library SmartyPants")
10060 (description
10061 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
10062 original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
10063 and BBEdit that easily translates plain ASCII punctuation characters into
10064 smart typographic punctuation HTML entities.")
10065 (home-page "https://github.com/jmcnevin/rubypants")
10066 (license license:bsd-2)))
10067
10068 (define-public ruby-org-ruby
10069 (package
10070 (name "ruby-org-ruby")
10071 (version "0.9.12")
10072 (source (origin
10073 (method url-fetch)
10074 (uri (rubygems-uri "org-ruby" version))
10075 (sha256
10076 (base32
10077 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
10078 (build-system ruby-build-system)
10079 (arguments
10080 '(#:tests? #f)) ; no rakefile
10081 (propagated-inputs
10082 (list ruby-rubypants))
10083 (synopsis "Org-mode parser written in Ruby")
10084 (description
10085 "Org-ruby is an org-mode parser written in Ruby. The most significant
10086 thing this library does today is convert org-mode files to HTML or Textile or
10087 Markdown.")
10088 (home-page "https://github.com/wallyqs/org-ruby")
10089 (license license:expat)))
10090
10091 (define-public ruby-rake
10092 (package
10093 (name "ruby-rake")
10094 (version "13.0.1")
10095 (source
10096 (origin
10097 (method url-fetch)
10098 (uri (rubygems-uri "rake" version))
10099 (sha256
10100 (base32
10101 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
10102 (build-system ruby-build-system)
10103 (native-inputs
10104 (list bundler))
10105 (synopsis "Rake is a Make-like program implemented in Ruby")
10106 (description
10107 "Rake is a Make-like program where tasks and dependencies are specified
10108 in standard Ruby syntax.")
10109 (home-page "https://github.com/ruby/rake")
10110 (license license:expat)))
10111
10112 (define-public ruby-childprocess
10113 (package
10114 (name "ruby-childprocess")
10115 (version "3.0.0")
10116 (source
10117 (origin
10118 (method url-fetch)
10119 (uri (rubygems-uri "childprocess" version))
10120 (sha256
10121 (base32
10122 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
10123 (build-system ruby-build-system)
10124 (arguments
10125 `(#:tests? #f))
10126 (native-inputs
10127 (list bundler ruby-rspec))
10128 (propagated-inputs
10129 (list ruby-ffi))
10130 (synopsis "Control external programs running in the background, in Ruby")
10131 (description "@code{childprocess} provides a gem to control external
10132 programs running in the background, in Ruby.")
10133 (home-page "https://github.com/enkessler/childprocess")
10134 (license license:expat)))
10135
10136 (define-public ruby-public-suffix
10137 (package
10138 (name "ruby-public-suffix")
10139 (version "4.0.5")
10140 (source (origin
10141 (method url-fetch)
10142 (uri (rubygems-uri "public_suffix" version))
10143 (sha256
10144 (base32
10145 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
10146 (build-system ruby-build-system)
10147 (arguments
10148 '(#:phases
10149 (modify-phases %standard-phases
10150 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
10151 ;; including it as an input can lead to circular dependencies.
10152 (add-after 'unpack 'remove-rubocop-from-Rakefile
10153 (lambda _
10154 (substitute* "Rakefile"
10155 (("require \"rubocop/rake\\_task\"") "")
10156 (("RuboCop::RakeTask\\.new") ""))
10157 #t)))))
10158 (native-inputs
10159 (list bundler ruby-yard ruby-mocha ruby-minitest-reporters))
10160 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
10161 (synopsis "Domain name parser")
10162 (description "The gem @code{public_suffix} is a domain name parser,
10163 written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
10164 is one under which Internet users can (or historically could) directly
10165 register names. Some examples of public suffixes are @code{.com},
10166 @code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
10167 all known public suffixes.")
10168 (license license:expat)))
10169
10170 (define-public ruby-addressable
10171 (package
10172 (name "ruby-addressable")
10173 (version "2.7.0")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (rubygems-uri "addressable" version))
10177 (sha256
10178 (base32
10179 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
10180 (build-system ruby-build-system)
10181 (arguments
10182 '(#:test-target "spec"
10183 #:phases
10184 (modify-phases %standard-phases
10185 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
10186 (lambda _
10187 (substitute* "Gemfile"
10188 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
10189 ((".*launchy.*") "")
10190 ((".*rake.*") "gem 'rake'\n")
10191 ((".*redcarpet.*") ""))
10192 #t))
10193 (add-before 'check 'delete-network-dependent-test
10194 (lambda _
10195 (delete-file "spec/addressable/net_http_compat_spec.rb")
10196 #t)))))
10197 (native-inputs
10198 (list ruby-rspec
10199 bundler
10200 ruby-idn-ruby
10201 ruby-sporkmonger-rack-mount
10202 ruby-rspec-its-minimal
10203 ruby-yard
10204 ruby-simplecov))
10205 (propagated-inputs
10206 (list ruby-public-suffix))
10207 (home-page "https://github.com/sporkmonger/addressable")
10208 (synopsis "Alternative URI implementation")
10209 (description "Addressable is a replacement for the URI implementation that
10210 is part of Ruby's standard library. It more closely conforms to RFC 3986,
10211 RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
10212 (license license:asl2.0)))
10213
10214 (define-public ruby-colorize
10215 (package
10216 (name "ruby-colorize")
10217 (version "0.8.1")
10218 (source (origin
10219 (method url-fetch)
10220 (uri (rubygems-uri "colorize" version))
10221 (sha256
10222 (base32
10223 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
10224 (build-system ruby-build-system)
10225 (arguments
10226 '(#:phases (modify-phases %standard-phases
10227 (add-before 'check 'remove-codeclimate-dependency
10228 (lambda _
10229 (substitute* "test/test_colorize.rb"
10230 ;; Do not hook the tests into the online CodeClimate
10231 ;; service which is unnecessary for these tests.
10232 (("require 'codeclimate-test-reporter'")
10233 "")
10234 (("CodeClimate.*") ""))
10235 #t)))))
10236 (synopsis "Add color effects to the @code{String} class")
10237 (description
10238 "This package extends the @code{String} class and adds a
10239 @code{ColorizedString} with methods to set text color, background color,
10240 and text effects.")
10241 (home-page "https://github.com/fazibear/colorize")
10242 (license license:gpl2+)))
10243
10244 (define-public ruby-colorator
10245 (package
10246 (name "ruby-colorator")
10247 (version "1.1.0")
10248 (source (origin
10249 (method url-fetch)
10250 (uri (rubygems-uri "colorator" version))
10251 (sha256
10252 (base32
10253 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
10254 (build-system ruby-build-system)
10255 (arguments
10256 ;; No test target
10257 `(#:tests? #f))
10258 (home-page "http://octopress.org/colorator/")
10259 (synopsis "Terminal color library")
10260 (description "Colorator is a Ruby gem that helps you colorize your text
10261 for the terminal.")
10262 (license license:expat)))
10263
10264 (define-public ruby-command-line-reporter
10265 (package
10266 (name "ruby-command-line-reporter")
10267 (version "4.0.1")
10268 (source (origin
10269 (method url-fetch)
10270 (uri (rubygems-uri "command_line_reporter" version))
10271 (sha256
10272 (base32
10273 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
10274 (build-system ruby-build-system)
10275 (arguments
10276 ;; No Rakefile
10277 `(#:tests? #f
10278 #:phases
10279 (modify-phases %standard-phases
10280 (add-before 'build 'fix-dependencies
10281 (lambda _
10282 (substitute* ".gemspec"
10283 ;; colored is unmaintained
10284 (("colored") "colorator")
10285 ;; colorator version
10286 (("= 1.2") "= 1.1"))
10287 #t)))))
10288 (propagated-inputs (list ruby-colorator))
10289 (home-page "https://github.com/wbailey/command_line_reporter")
10290 (synopsis "Report production while executing Ruby scripts")
10291 (description "This gem provides a DSL that makes it easy to write reports
10292 of various types in ruby. It eliminates the need to litter your source with
10293 puts statements, instead providing a more readable, expressive interface to
10294 your application.")
10295 (license license:asl2.0)))
10296
10297 (define-public ruby-command-line-reporter-3
10298 (package
10299 (inherit ruby-command-line-reporter)
10300 (version "3.3.6")
10301 (source (origin
10302 (method url-fetch)
10303 (uri (rubygems-uri "command_line_reporter" version))
10304 (sha256
10305 (base32
10306 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
10307
10308 (define-public ruby-kpeg
10309 (package
10310 (name "ruby-kpeg")
10311 (version "1.1.0")
10312 (source
10313 (origin
10314 (method url-fetch)
10315 (uri (rubygems-uri "kpeg" version))
10316 (sha256
10317 (base32
10318 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
10319 (build-system ruby-build-system)
10320 (native-inputs
10321 (list ruby-hoe))
10322 (synopsis "PEG library for Ruby")
10323 (description "KPeg is a simple PEG library for Ruby. It provides an API as
10324 well as native grammar to build the grammar. KPeg supports direct left
10325 recursion of rules via the
10326 @uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
10327 technique.")
10328 (home-page "https://github.com/evanphx/kpeg")
10329 (license license:expat)))
10330
10331 (define-public ruby-rdoc
10332 (package
10333 (name "ruby-rdoc")
10334 (version "6.2.0")
10335 (source
10336 (origin
10337 (method git-fetch)
10338 (uri (git-reference
10339 (url "https://github.com/ruby/rdoc")
10340 (commit (string-append "v" version))))
10341 (file-name (git-file-name name version))
10342 (sha256
10343 (base32
10344 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
10345 (build-system ruby-build-system)
10346 (arguments
10347 `(#:phases
10348 (modify-phases %standard-phases
10349 (add-after 'unpack 'patch-gemspec
10350 ;; TODO: Remove after next release is tagged.
10351 (lambda _
10352 (substitute* "rdoc.gemspec"
10353 (("\"lib/rdoc/generator/template/darkfish/js/\
10354 jquery\\.js\", ") ""))
10355 #t))
10356 (add-before 'build 'generate
10357 ;; 'gem build' doesn't honor Rakefile dependencies (see:
10358 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
10359 (lambda _
10360 (invoke "rake" "generate"))))))
10361 (native-inputs
10362 (list bundler ruby-kpeg ruby-racc ruby-rubocop))
10363 (home-page "https://ruby.github.io/rdoc/")
10364 (synopsis "HTML and command-line documentation utility")
10365 (description "RDoc produces HTML and command-line documentation for Ruby
10366 projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
10367 documentation from the command-line.")
10368 (license license:gpl2+)))
10369
10370 (define-public ruby-sass-listen
10371 (package
10372 (name "ruby-sass-listen")
10373 (version "4.0.0")
10374 (source (origin
10375 (method url-fetch)
10376 (uri (rubygems-uri "sass-listen" version))
10377 (sha256
10378 (base32
10379 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
10380 (build-system ruby-build-system)
10381 (arguments
10382 ;; No test target
10383 `(#:tests? #f))
10384 (propagated-inputs
10385 (list ruby-rb-fsevent ruby-rb-inotify))
10386 (home-page "https://github.com/sass/listen")
10387 (synopsis "File modification notification library")
10388 (description "The Listen gem listens to file modifications and notifies you
10389 about the changes.")
10390 (license license:expat)))
10391
10392 (define-public ruby-terminfo
10393 (package
10394 (name "ruby-terminfo")
10395 (version "0.1.1")
10396 (source
10397 (origin
10398 (method url-fetch)
10399 (uri (rubygems-uri "ruby-terminfo" version))
10400 (sha256
10401 (base32
10402 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
10403 (build-system ruby-build-system)
10404 (arguments
10405 `(#:test-target "test"
10406 ;; Rakefile requires old packages and would need modification to
10407 ;; work with current software.
10408 #:tests? #f))
10409 (inputs
10410 (list ncurses))
10411 (native-inputs
10412 (list ruby-rubygems-tasks ruby-rdoc))
10413 (home-page "http://www.a-k-r.org/ruby-terminfo/")
10414 (synopsis "Terminfo binding for Ruby")
10415 (description "Ruby-terminfo provides terminfo binding for Ruby.")
10416 (license license:bsd-3)))
10417
10418 (define-public ruby-diffy
10419 (package
10420 (name "ruby-diffy")
10421 (version "3.2.1")
10422 (source
10423 (origin
10424 (method url-fetch)
10425 (uri (rubygems-uri "diffy" version))
10426 (sha256
10427 (base32
10428 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
10429 (build-system ruby-build-system)
10430 (arguments
10431 ;; No tests
10432 `(#:tests? #f))
10433 (native-inputs
10434 (list ruby-rspec))
10435 (home-page "https://github.com/samg/diffy")
10436 (synopsis "Convenient diffing in ruby")
10437 (description "Diffy provides a convenient way to generate a diff from two
10438 strings or files.")
10439 (license license:expat)))
10440
10441 (define-public ruby-sass-spec
10442 (package
10443 (name "ruby-sass-spec")
10444 (version "3.5.4")
10445 (source
10446 (origin
10447 (method git-fetch)
10448 (uri (git-reference
10449 (url "https://github.com/sass/sass-spec")
10450 (commit (string-append "v" version))))
10451 (file-name (git-file-name name version))
10452 (sha256
10453 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
10454 (build-system ruby-build-system)
10455 (propagated-inputs
10456 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
10457 ("ruby-diffy" ,ruby-diffy)
10458 ("ruby-terminfo" ,ruby-terminfo)))
10459 (arguments
10460 `(;; This package contains tests for a sass implementation, and the to
10461 ;; avoid any circular dependencies, the tests are not run here
10462 #:tests? #f
10463 #:phases
10464 (modify-phases %standard-phases
10465 (add-after 'unpack 'patch-test
10466 (lambda _
10467 (delete-file "spec/values/colors/alpha_hex-3.5/error")
10468 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
10469 (("string") "color")))))))
10470 (home-page "https://github.com/sass/sass-spec")
10471 (synopsis "Test suite for Sass")
10472 (description "Sass Spec is a test suite for Sass. Test cases are all in
10473 the @file{spec} directory.")
10474 (license license:expat)))
10475
10476 (define-public ruby-sass
10477 (package
10478 (name "ruby-sass")
10479 (version "3.6.0")
10480 (source (origin
10481 (method url-fetch)
10482 (uri (rubygems-uri "sass" version))
10483 (sha256
10484 (base32
10485 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
10486 (build-system ruby-build-system)
10487 (propagated-inputs
10488 (list ruby-sass-listen))
10489 (native-inputs
10490 (list ruby-sass-spec ruby-mathn ruby-cmath))
10491 (home-page "https://sass-lang.com/")
10492 (synopsis "CSS extension language")
10493 (description "Sass is a CSS extension language. It extends CSS with
10494 features that don't exist yet like variables, nesting, mixins and inheritance.")
10495 (license license:expat)))
10496
10497 (define-public ruby-sassc
10498 (package
10499 (name "ruby-sassc")
10500 (version "2.4.0")
10501 (source
10502 (origin
10503 (method url-fetch)
10504 (uri (rubygems-uri "sassc" version))
10505 (sha256
10506 (base32
10507 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
10508 (build-system ruby-build-system)
10509 (arguments
10510 '(#:modules ((guix build ruby-build-system)
10511 (guix build utils)
10512 (ice-9 textual-ports))
10513 #:phases
10514 (modify-phases %standard-phases
10515 ;; TODO: This would be better as a snippet, but the ruby-build-system
10516 ;; doesn't seem to support that
10517 (add-after 'unpack 'remove-libsass
10518 (lambda _
10519 (delete-file-recursively "ext")
10520 (with-atomic-file-replacement "sassc.gemspec"
10521 (lambda (in out)
10522 (let* ((gemspec (get-string-all in))
10523 (index (string-contains gemspec "libsass_dir")))
10524 (display (string-append
10525 (string-take gemspec index)
10526 "\nend\n")
10527 out))))
10528 #t))
10529 (add-after 'unpack 'dont-check-the-libsass-version
10530 (lambda _
10531 (substitute* "test/native_test.rb"
10532 (("assert_equal.*Native\\.version") ""))
10533 #t))
10534 (add-after 'unpack 'remove-git-from-gemspec
10535 (lambda _
10536 (substitute* "sassc.gemspec"
10537 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
10538 #t))
10539 (add-after 'unpack 'remove-extensions-from-gemspec
10540 (lambda _
10541 (substitute* "sassc.gemspec"
10542 (("\\[\"ext/extconf.rb\"\\]") "[]"))
10543 #t))
10544 (add-after 'unpack 'fix-Rakefile
10545 (lambda _
10546 (substitute* "Rakefile"
10547 (("test: 'compile:libsass'") ":test"))
10548 #t))
10549 (add-after 'unpack 'remove-unnecessary-dependencies
10550 (lambda _
10551 (substitute* "test/test_helper.rb"
10552 (("require \"pry\"") ""))
10553 #t))
10554 (add-before 'build 'patch-native.rb
10555 (lambda* (#:key inputs #:allow-other-keys)
10556 (substitute* "lib/sassc/native.rb"
10557 ((".*gem_root = spec.gem_dir") "")
10558 (("ffi_lib .*\n")
10559 (string-append
10560 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
10561 #t))
10562 ;; The gemspec still references the libsass files, so just keep the
10563 ;; one in the gem.
10564 (delete 'extract-gemspec))))
10565 (propagated-inputs
10566 (list ruby-ffi ruby-rake))
10567 (inputs
10568 (list libsass))
10569 (native-inputs
10570 (list bundler ruby-rake-compiler ruby-minitest-around
10571 ruby-test-construct))
10572 (synopsis "Use libsss from Ruby")
10573 (description
10574 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10575 bindings to the libsass library. This enables rendering
10576 @acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10577 (home-page "https://github.com/sass/sassc-ruby")
10578 (license license:expat)))
10579
10580 (define-public ruby-jekyll-sass-converter
10581 (package
10582 (name "ruby-jekyll-sass-converter")
10583 (version "2.1.0")
10584 (source (origin
10585 (method url-fetch)
10586 (uri (rubygems-uri "jekyll-sass-converter" version))
10587 (sha256
10588 (base32
10589 "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"))))
10590 (build-system ruby-build-system)
10591 (propagated-inputs
10592 (list ruby-sass))
10593 (arguments
10594 ;; No rakefile
10595 `(#:tests? #f))
10596 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10597 (synopsis "Sass converter for Jekyll")
10598 (description "This gem provide built-in support for the Sass converter
10599 in Jekyll.")
10600 (license license:expat)))
10601
10602 (define-public ruby-jekyll-watch
10603 (package
10604 (name "ruby-jekyll-watch")
10605 (version "2.1.2")
10606 (source (origin
10607 (method url-fetch)
10608 (uri (rubygems-uri "jekyll-watch" version))
10609 (sha256
10610 (base32
10611 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
10612 (build-system ruby-build-system)
10613 (propagated-inputs
10614 (list ruby-listen))
10615 (arguments
10616 ;; No rakefile
10617 `(#:tests? #f))
10618 (home-page "https://github.com/jekyll/jekyll-watch")
10619 (synopsis "Jekyll auto-rebuild support")
10620 (description "This gems add the @code{--watch} switch to the jekyll CLI
10621 interface. It allows Jekyll to rebuild your site when a file changes.")
10622 (license license:expat)))
10623
10624 (define-public ruby-parallel
10625 (package
10626 (name "ruby-parallel")
10627 (version "1.21.0")
10628 (source
10629 (origin
10630 (method git-fetch)
10631 (uri (git-reference
10632 (url "https://github.com/grosser/parallel")
10633 (commit (string-append "v" version))))
10634 (file-name (git-file-name name version))
10635 (sha256
10636 (base32
10637 "1xqjcvl3gq3shvrqp8wc3fbqibzh4mf1yczq6np9gd79558dwj3w"))))
10638 (build-system ruby-build-system)
10639 (arguments
10640 `(;; TODO 3 test failures
10641 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10642 ;; open unnecessary pipes
10643 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10644 ;; SQLite in processes
10645 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10646 ;; SQLite in threads
10647 #:tests? #f
10648 #:test-target "rspec-rerun:spec"
10649 #:phases
10650 (modify-phases %standard-phases
10651 (add-after 'unpack 'patch-Gemfile
10652 (lambda _
10653 (substitute* "Gemfile"
10654 (("gem 'rspec-legacy_formatters'") "")
10655 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10656 (add-before 'check 'delete-Gemfile.lock
10657 (lambda _
10658 ;; Bundler isn't being used for fetching dependendencies, so
10659 ;; delete the Gemfile.lock
10660 (delete-file "Gemfile.lock")
10661 #t))
10662 (add-before 'build 'patch-gemspec
10663 (lambda _
10664 (substitute* "parallel.gemspec"
10665 (("git ls-files") "find"))
10666 #t)))))
10667 (native-inputs
10668 (list ruby-rspec
10669 ruby-rspec-rerun
10670 bundler
10671 ruby-activerecord
10672 ruby-progressbar
10673 ruby-bump
10674 procps
10675 lsof
10676 ruby-mysql2
10677 ruby-sqlite3
10678 ruby-i18n))
10679 (home-page "https://github.com/grosser/parallel")
10680 (synopsis "Parallel processing in Ruby")
10681 (description "Parallel allows you to run any code in parallel Processes
10682 (to use all CPUs) or Threads(to speedup blocking operations). It is best
10683 suited for map-reduce or e.g. parallel downloads/uploads.")
10684 (license license:expat)))
10685
10686 (define-public ruby-cane
10687 (package
10688 (name "ruby-cane")
10689 (version "3.0.0")
10690 (source (origin
10691 (method url-fetch)
10692 (uri (rubygems-uri "cane" version))
10693 (sha256
10694 (base32
10695 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10696 (build-system ruby-build-system)
10697 (arguments `(#:tests? #f)); No rakefile
10698 (home-page "https://github.com/square/cane")
10699 (propagated-inputs
10700 (list ruby-parallel))
10701 (synopsis "Code quality threshold checking")
10702 (description "Cane fails your build if code quality thresholds are not met.")
10703 (license license:asl2.0)))
10704
10705 (define-public ruby-morecane
10706 (package
10707 (name "ruby-morecane")
10708 (version "0.2.0")
10709 (source (origin
10710 (method url-fetch)
10711 (uri (rubygems-uri "morecane" version))
10712 (sha256
10713 (base32
10714 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10715 (build-system ruby-build-system)
10716 (home-page "https://github.com/yob/morecane")
10717 (arguments `(#:tests? #f)); No rakefile
10718 (propagated-inputs
10719 (list ruby-parallel))
10720 (synopsis "Extra checks for cane")
10721 (description "The cane gem provides a great framework for running quality
10722 checks over your ruby project as part of continuous integration build. It
10723 comes with a few checks out of the box, but also provides an API for loading
10724 custom checks. This gem provides a set of additional checks.")
10725 (license license:expat)))
10726
10727 (define-public ruby-pdf-reader
10728 (package
10729 (name "ruby-pdf-reader")
10730 (version "2.4.0")
10731 (source (origin
10732 (method git-fetch) ;no test in distributed gem archive
10733 (uri (git-reference
10734 (url "https://github.com/yob/pdf-reader")
10735 (commit (string-append "v" version))))
10736 (file-name (git-file-name name version))
10737 (sha256
10738 (base32
10739 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
10740 (build-system ruby-build-system)
10741 (arguments `(#:test-target "spec"
10742 #:phases (modify-phases %standard-phases
10743 (add-after 'unpack 'do-not-use-bundler
10744 (lambda _
10745 (substitute* "spec/spec_helper.rb"
10746 ((".*[Bb]undler.*") ""))
10747 #t)))))
10748 (native-inputs
10749 (list ruby-rspec ruby-cane ruby-morecane))
10750 (propagated-inputs
10751 (list ruby-afm ruby-ascii85 ruby-hashery ruby-rc4 ruby-ttfunk))
10752 (home-page "https://github.com/yob/pdf-reader")
10753 (synopsis "PDF parser in Ruby")
10754 (description "The PDF::Reader library implements a PDF parser conforming as
10755 much as possible to the PDF specification from Adobe. It provides programmatic
10756 access to the contents of a PDF file with a high degree of flexibility.")
10757 (license license:gpl3+)))
10758
10759 (define-public ruby-pdf-inspector
10760 (let ((revision "1")
10761 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10762 (package
10763 (name "ruby-pdf-inspector")
10764 (version (git-version "1.3.0" revision commit))
10765 (source (origin
10766 (method git-fetch)
10767 (uri (git-reference
10768 (url "https://github.com/prawnpdf/pdf-inspector")
10769 (commit commit)))
10770 (file-name (git-file-name name version))
10771 (sha256
10772 (base32
10773 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10774 (build-system ruby-build-system)
10775 (arguments
10776 `(#:test-target "spec"
10777 #:phases (modify-phases %standard-phases
10778 (add-before 'build 'drop-signing-key-requirement
10779 (lambda _
10780 (substitute* "pdf-inspector.gemspec"
10781 (("spec.signing_key =.*")
10782 "spec.signing_key = nil"))
10783 #t))
10784 (replace 'check
10785 (lambda _
10786 (substitute* "pdf-inspector.gemspec"
10787 ((".*rubocop.*") "")
10788 ((".*yard.*") ""))
10789 (invoke "rspec"))))))
10790 (native-inputs
10791 (list ruby-rspec))
10792 (propagated-inputs
10793 (list ruby-pdf-reader))
10794 (home-page "https://github.com/prawnpdf/pdf-inspector")
10795 (synopsis "Analysis classes for inspecting PDF output")
10796 (description "This library provides a number of PDF::Reader based tools for
10797 use in testing PDF output. Presently, the primary purpose of this tool is to
10798 support the tests found in Prawn, a pure Ruby PDF generation library.")
10799 (license %prawn-project-licenses))))
10800
10801 (define-public ruby-pdf-core
10802 (package
10803 (name "ruby-pdf-core")
10804 (version "0.8.1")
10805 (source (origin
10806 (method url-fetch)
10807 (uri (rubygems-uri "pdf-core" version))
10808 (sha256
10809 (base32
10810 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10811 (build-system ruby-build-system)
10812 (arguments
10813 ; No test target
10814 `(#:tests? #f))
10815 (home-page "https://github.com/prawnpdf/pdf-core")
10816 (synopsis "Low level PDF features for Prawn")
10817 (description "This is an experimental gem that extracts low-level PDF
10818 functionality from Prawn.")
10819 (license license:gpl3+)))
10820
10821 (define-public ruby-prawn
10822 ;; There hasn't been a new release since 2017/03/17.
10823 (let ((revision "1")
10824 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10825 (package
10826 (name "ruby-prawn")
10827 (version (git-version "2.2.2" revision commit))
10828 (source (origin
10829 (method git-fetch)
10830 (uri (git-reference
10831 (url "https://github.com/prawnpdf/prawn")
10832 (commit commit)))
10833 (file-name (git-file-name name version))
10834 (sha256
10835 (base32
10836 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10837 (build-system ruby-build-system)
10838 (arguments
10839 `(#:phases
10840 (modify-phases %standard-phases
10841 (add-before 'build 'drop-signing-key-requirement
10842 (lambda _
10843 (substitute* "prawn.gemspec"
10844 (("spec.signing_key =.*")
10845 "spec.signing_key = nil"))
10846 #t))
10847 (replace 'check
10848 (lambda* (#:key tests? #:allow-other-keys)
10849 (when tests?
10850 ;; The Prawn manual test fails (see:
10851 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10852 ;; it.
10853 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10854 #t)))))
10855 (propagated-inputs
10856 (list ruby-pdf-core ruby-ttfunk))
10857 (native-inputs
10858 (list ruby-pdf-inspector ruby-prawn-manual-builder ruby-rspec
10859 ruby-simplecov ruby-yard))
10860 (home-page "https://prawnpdf.org/api-docs/2.0/")
10861 (synopsis "PDF generation for Ruby")
10862 (description "Prawn is a pure Ruby PDF generation library.")
10863 (license %prawn-project-licenses))))
10864
10865 (define-public ruby-prawn-table
10866 (package
10867 (name "ruby-prawn-table")
10868 (version "0.2.2")
10869 (source (origin
10870 (method url-fetch)
10871 (uri (rubygems-uri "prawn-table" version))
10872 (sha256
10873 (base32
10874 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10875 (build-system ruby-build-system)
10876 (propagated-inputs
10877 (list ruby-prawn ruby-pdf-inspector))
10878 (native-inputs
10879 `(("bundler" ,bundler)
10880 ("ruby-yard" ,ruby-yard)
10881 ("ruby-mocha" ,ruby-mocha)
10882 ("ruby-coderay" ,ruby-coderay)
10883 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10884 ("ruby-simplecov" ,ruby-simplecov)
10885 ("ruby-rspec-2" ,ruby-rspec-2)))
10886 (arguments
10887 '(;; TODO: 1 test fails
10888 ;; Failure/Error: pdf.page_count.should == 1
10889 ;; expected: 1
10890 ;; got: 2 (using ==)
10891 ;; # ./spec/table_spec.rb:1308
10892 ;;
10893 ;; 225 examples, 1 failure
10894 #:tests? #f
10895 #:phases
10896 (modify-phases %standard-phases
10897 (add-before 'check 'patch-gemspec
10898 (lambda _
10899 (substitute* "prawn-table.gemspec"
10900 ;; Loosen the requirement for pdf-inspector
10901 (("~> 1\\.1\\.0") ">= 0")
10902 ;; Loosen the requirement for pdf-reader
10903 (("~> 1\\.2") ">= 0"))))
10904 (replace 'check
10905 (lambda* (#:key tests? #:allow-other-keys)
10906 (when tests?
10907 (invoke "rspec"))
10908 #t)))))
10909 (home-page "https://github.com/prawnpdf/prawn-table")
10910 (synopsis "Tables support for Prawn")
10911 (description "This gem provides tables support for Prawn.")
10912 (license license:gpl3+)))
10913
10914 (define-public ruby-kramdown
10915 (package
10916 (name "ruby-kramdown")
10917 (version "2.3.1")
10918 (source (origin
10919 (method url-fetch)
10920 (uri (rubygems-uri "kramdown" version))
10921 (sha256
10922 (base32
10923 "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
10924 (build-system ruby-build-system)
10925 (arguments `(#:tests? #f)); FIXME: some test failures
10926 (native-inputs
10927 (list ruby-prawn ruby-prawn-table))
10928 (home-page "https://kramdown.gettalong.org/")
10929 (synopsis "Markdown parsing and converting library")
10930 (description "Kramdown is a library for parsing and converting a superset
10931 of Markdown. It is completely written in Ruby, supports standard Markdown
10932 (with some minor modifications) and various extensions that have been made
10933 popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10934 (license license:expat)))
10935
10936 (define-public ruby-kramdown-parser-gfm
10937 (package
10938 (name "ruby-kramdown-parser-gfm")
10939 (version "1.1.0")
10940 (source
10941 (origin
10942 (method url-fetch)
10943 (uri (rubygems-uri "kramdown-parser-gfm" version))
10944 (sha256
10945 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
10946 (build-system ruby-build-system)
10947 (arguments
10948 `(#:tests? #f)) ;no rakefile
10949 (propagated-inputs
10950 (list ruby-kramdown))
10951 (synopsis "Kramdown parser for the GFM dialect of Markdown")
10952 (description
10953 "This is a parser for kramdown that converts Markdown documents in the
10954 GFM dialect to HTML.")
10955 (home-page "https://github.com/kramdown/parser-gfm")
10956 (license license:expat)))
10957
10958 (define-public ruby-http-parser.rb
10959 (package
10960 (name "ruby-http-parser.rb")
10961 (version "0.6.0")
10962 (source
10963 (origin
10964 (method url-fetch)
10965 (uri (rubygems-uri "http_parser.rb" version))
10966 (sha256
10967 (base32
10968 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10969 (build-system ruby-build-system)
10970 (arguments
10971 ;; No tests
10972 `(#:tests? #f))
10973 (native-inputs
10974 (list ruby-rake-compiler ruby-rspec))
10975 (home-page "https://github.com/tmm1/http_parser.rb")
10976 (synopsis "HTTP parser un Ruby")
10977 (description "This gem is a simple callback-based HTTP request/response
10978 parser for writing http servers, clients and proxies.")
10979 (license license:expat)))
10980
10981 (define-public ruby-em-websocket
10982 (package
10983 (name "ruby-em-websocket")
10984 (version "0.5.1")
10985 (source
10986 (origin
10987 (method url-fetch)
10988 (uri (rubygems-uri "em-websocket" version))
10989 (sha256
10990 (base32
10991 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10992 (build-system ruby-build-system)
10993 (arguments
10994 ;; No tests
10995 `(#:tests? #f))
10996 (propagated-inputs
10997 (list ruby-eventmachine ruby-http-parser.rb))
10998 (native-inputs
10999 (list bundler ruby-rspec))
11000 (home-page "https://github.com/igrigorik/em-websocket")
11001 (synopsis "EventMachine based WebSocket server")
11002 (description "Em-websocket is an EventMachine based WebSocket server
11003 implementation.")
11004 (license license:expat)))
11005
11006 (define-public ruby-rouge
11007 (package
11008 (name "ruby-rouge")
11009 (version "3.26.1")
11010 (source (origin
11011 (method url-fetch)
11012 (uri (rubygems-uri "rouge" version))
11013 (sha256
11014 (base32
11015 "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
11016 (build-system ruby-build-system)
11017 (arguments `(#:tests? #f)); No rakefile
11018 (home-page "http://rouge.jneen.net/")
11019 (synopsis "Code highlighter")
11020 (description "Rouge is a code highlighter written in Ruby. It supports more
11021 than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
11022 is compatible with stylesheets designed for pygments.")
11023 (license (list
11024 ;; rouge is licensed under expat
11025 license:expat
11026 ;; pygments is licensed under bsd-2
11027 license:bsd-2))))
11028
11029 (define-public ruby-hashie
11030 (package
11031 (name "ruby-hashie")
11032 (version "3.6.0")
11033 (source (origin
11034 (method url-fetch)
11035 (uri (rubygems-uri "hashie" version))
11036 (sha256
11037 (base32
11038 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
11039 (build-system ruby-build-system)
11040 (native-inputs
11041 (list bundler))
11042 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
11043 (home-page "https://github.com/intridea/hashie")
11044 (synopsis "Extensions to Ruby Hashes")
11045 (description "Hashie is a collection of classes and mixins that make Ruby
11046 hashes more powerful.")
11047 (license license:expat)))
11048
11049 (define-public ruby-heredoc-unindent
11050 (package
11051 (name "ruby-heredoc-unindent")
11052 (version "1.2.0")
11053 (source (origin
11054 (method url-fetch)
11055 (uri (rubygems-uri "heredoc_unindent" version))
11056 (sha256
11057 (base32
11058 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
11059 (build-system ruby-build-system)
11060 (native-inputs
11061 (list ruby-hoe))
11062 (home-page "https://github.com/adrianomitre/heredoc_unindent")
11063 (synopsis "Heredoc indentation cleaner")
11064 (description "This gem removes common margin from indented strings, such
11065 as the ones produced by indented heredocs. In other words, it strips out
11066 leading whitespace chars at the beginning of each line, but only as much as
11067 the line with the smallest margin.
11068
11069 It is acknowledged that many strings defined by heredocs are just code and
11070 fact is that most parsers are insensitive to indentation. If, however, the
11071 strings are to be used otherwise, be it for printing or testing, the extra
11072 indentation will probably be an issue and hence this gem.")
11073 (license license:expat)))
11074
11075 (define-public ruby-safe-yaml
11076 (package
11077 (name "ruby-safe-yaml")
11078 (version "1.0.5")
11079 (source
11080 (origin
11081 (method git-fetch)
11082 (uri (git-reference
11083 (url "https://github.com/dtao/safe_yaml")
11084 (commit version)))
11085 (file-name (git-file-name name version))
11086 (sha256
11087 (base32
11088 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
11089 (build-system ruby-build-system)
11090 (native-inputs
11091 (list ruby-rspec ruby-hashie ruby-heredoc-unindent))
11092 (arguments
11093 '(#:test-target "spec"
11094 #:phases
11095 (modify-phases %standard-phases
11096 (add-before 'check 'set-TZ
11097 (lambda _
11098 ;; This test is dependent on the timezone
11099 ;; spec/transform/to_date_spec.rb:35
11100 ;; # SafeYAML::Transform::ToDate converts times to the local
11101 ;; timezone
11102 (setenv "TZ" "UTC-11")
11103 #t)))))
11104 (home-page "https://github.com/dtao/safe_yaml")
11105 (synopsis "YAML parser")
11106 (description "The SafeYAML gem provides an alternative implementation of
11107 YAML.load suitable for accepting user input in Ruby applications.")
11108 (license license:expat)))
11109
11110 (define-public ruby-yaml-lint
11111 (package
11112 (name "ruby-yaml-lint")
11113 (version "0.0.10")
11114 (source
11115 (origin
11116 (method git-fetch)
11117 (uri (git-reference
11118 (url "https://github.com/Pryz/yaml-lint")
11119 (commit version)))
11120 (file-name (git-file-name name version))
11121 (sha256
11122 (base32
11123 "1jz26mxjkdyjbgqp7f9isnzd1i6vkizsswyj1v639nmq31hwfh0d"))))
11124 (build-system ruby-build-system)
11125 (arguments
11126 `(#:phases
11127 (modify-phases %standard-phases
11128 (replace 'check
11129 (lambda* (#:key tests? #:allow-other-keys)
11130 (when tests?
11131 (invoke "rspec"))
11132 #t)))))
11133 (native-inputs
11134 (list ruby-coveralls ruby-rspec ruby-simplecov))
11135 (synopsis "Simple YAML check tool")
11136 (description
11137 "@code{yaml-lint} will simply try to load the YAML file with the built-in
11138 Ruby yaml library.")
11139 (home-page "https://github.com/Pryz/yaml-lint")
11140 (license license:expat)))
11141
11142 (define-public ruby-mercenary
11143 (package
11144 (name "ruby-mercenary")
11145 (version "0.4.0")
11146 (source (origin
11147 (method url-fetch)
11148 (uri (rubygems-uri "mercenary" version))
11149 (sha256
11150 (base32
11151 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
11152 (build-system ruby-build-system)
11153 (arguments `(#:test-target "spec"))
11154 (native-inputs
11155 (list bundler))
11156 (home-page "https://github.com/jekyll/mercenary")
11157 (synopsis "Command-line apps library in Ruby")
11158 (description "Mercenary is a lightweight and flexible library for writing
11159 command-line apps in Ruby.")
11160 (license license:expat)))
11161
11162 (define-public ruby-liquid
11163 (package
11164 (name "ruby-liquid")
11165 (version "4.0.0")
11166 (source (origin
11167 (method url-fetch)
11168 (uri (rubygems-uri "liquid" version))
11169 (sha256
11170 (base32
11171 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
11172 (build-system ruby-build-system)
11173 (arguments `(#:tests? #f)); No rakefile
11174 (home-page "https://shopify.github.io/liquid/")
11175 (synopsis "Template language")
11176 (description "Liquid is a template language written in Ruby. It is used
11177 to load dynamic content on storefronts.")
11178 (license license:expat)))
11179
11180 (define-public ruby-forwardable-extended
11181 (package
11182 (name "ruby-forwardable-extended")
11183 (version "2.6.0")
11184 (source (origin
11185 (method url-fetch)
11186 (uri (rubygems-uri "forwardable-extended" version))
11187 (sha256
11188 (base32
11189 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
11190 (build-system ruby-build-system)
11191 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
11192 (home-page "https://github.com/envygeeks/forwardable-extended")
11193 (synopsis "Delegation to hashes and instance variables in Forwardable")
11194 (description "Forwardable Extended provides more @code{Forwardable}
11195 methods for your source as @code{Forwardable::Extended}.")
11196 (license license:expat)))
11197
11198 (define-public ruby-pathutil
11199 (package
11200 (name "ruby-pathutil")
11201 (version "0.16.2")
11202 (source (origin
11203 (method url-fetch)
11204 (uri (rubygems-uri "pathutil" version))
11205 (sha256
11206 (base32
11207 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
11208 (build-system ruby-build-system)
11209 (propagated-inputs
11210 (list ruby-forwardable-extended))
11211 (native-inputs
11212 (list bundler ruby-rspec))
11213 ;; Fails with: cannot load such file --
11214 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
11215 (arguments `(#:tests? #f))
11216 (home-page "https://github.com/envygeeks/pathutil")
11217 (synopsis "Extended implementation of Pathname")
11218 (description "Pathutil tries to be a faster pure Ruby implementation of
11219 Pathname.")
11220 (license license:expat)))
11221
11222 (define-public ruby-terminal-table
11223 (package
11224 (name "ruby-terminal-table")
11225 (version "2.0.0")
11226 (source
11227 (origin
11228 (method url-fetch)
11229 (uri (rubygems-uri "terminal-table" version))
11230 (sha256
11231 (base32
11232 "18rbrh464ysqbdv53iwj0r8frshn65566kyj044cp3x9c2754jwh"))))
11233 (arguments
11234 '(#:phases
11235 (modify-phases %standard-phases
11236 (add-before 'check 'remove-gemfile-lock
11237 (lambda _
11238 (delete-file "Gemfile.lock")))
11239 (add-before 'check 'remove-unnecessary-dependencies
11240 (lambda _
11241 (substitute* "terminal-table.gemspec"
11242 (("s.add_runtime_dependency.*") "\n")
11243 (("s.add_development_dependency.*") "\n"))
11244 (substitute* "Gemfile"
11245 ((".*tins.*") "\n"))))
11246 (replace 'check
11247 (lambda* (#:key tests? #:allow-other-keys)
11248 (when tests?
11249 (invoke "rspec")))))))
11250 (build-system ruby-build-system)
11251 (propagated-inputs
11252 (list ruby-unicode-display-width))
11253 (native-inputs
11254 (list ruby-rspec))
11255 (home-page "https://github.com/tj/terminal-table")
11256 (synopsis "Simple, feature rich ASCII table generation library")
11257 (description
11258 "Terminal Table is a fast and simple, yet feature rich
11259 table generator written in Ruby. It supports ASCII and
11260 Unicode formatted tables.")
11261 (license license:expat)))
11262
11263 (define-public jekyll
11264 (package
11265 (name "jekyll")
11266 (version "4.2.0")
11267 (source (origin
11268 (method url-fetch)
11269 (uri (rubygems-uri "jekyll" version))
11270 (sha256
11271 (base32
11272 "0cqkh78jw8scrajyx5nla0vwm9fvp2qql3kdcvvplcq9mazy8snq"))))
11273 (build-system ruby-build-system)
11274 (arguments
11275 ;; No rakefile, but a test subdirectory.
11276 `(#:tests? #f
11277 #:phases
11278 (modify-phases %standard-phases
11279 (add-before 'build 'fix-i18n
11280 (lambda _
11281 (substitute* ".gemspec"
11282 (("~> 0.7") ">= 0.7")
11283 (("~> 1.14") ">= 1.14"))
11284 #t)))))
11285 (propagated-inputs
11286 `(("ruby-addressable" ,ruby-addressable)
11287 ("ruby-colorator" ,ruby-colorator)
11288 ("ruby-em-websocket" ,ruby-em-websocket)
11289 ("ruby-i18n" ,ruby-i18n)
11290 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
11291 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
11292 ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
11293 ("ruby-liquid" ,ruby-liquid)
11294 ("ruby-mercenary" ,ruby-mercenary)
11295 ("ruby-pathutil" ,ruby-pathutil)
11296 ("ruby-rouge" ,ruby-rouge)
11297 ("ruby-safe-yaml" ,ruby-safe-yaml)
11298 ("ruby-sassc" ,ruby-sassc)
11299 ("ruby-terminal-table" ,ruby-terminal-table)))
11300 (home-page "https://jekyllrb.com/")
11301 (synopsis "Static site generator")
11302 (description "Jekyll is a simple, blog aware, static site generator.")
11303 (license license:expat)))
11304
11305 (define-public ruby-jekyll-paginate-v2
11306 (package
11307 (name "ruby-jekyll-paginate-v2")
11308 (version "3.0.0")
11309 (source (origin
11310 (method url-fetch)
11311 (uri (rubygems-uri "jekyll-paginate-v2" version))
11312 (sha256
11313 (base32
11314 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
11315 (build-system ruby-build-system)
11316 (propagated-inputs
11317 (list jekyll))
11318 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
11319 (synopsis "Pagination Generator for Jekyll 3")
11320 (description "The Pagination Generator forms the core of the pagination
11321 logic in Jekyll. It calculates and generates the pagination pages.")
11322 (license license:expat)))
11323
11324 (define-public ruby-faraday
11325 (package
11326 (name "ruby-faraday")
11327 (version "0.15.4")
11328 (source
11329 (origin
11330 (method url-fetch)
11331 (uri (rubygems-uri "faraday" version))
11332 (sha256
11333 (base32
11334 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
11335 (build-system ruby-build-system)
11336 (arguments
11337 '(#:tests? #f))
11338 (propagated-inputs
11339 (list ruby-multipart-post))
11340 (synopsis "Ruby HTTP/REST API client library")
11341 (description
11342 "Faraday is a HTTP/REST API client library which provides a common
11343 interface over different adapters.")
11344 (home-page "https://github.com/lostisland/faraday")
11345 (license license:expat)))
11346
11347 (define-public ruby-nio4r
11348 (package
11349 (name "ruby-nio4r")
11350 (version "2.5.2")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (rubygems-uri "nio4r" version))
11355 (sha256
11356 (base32
11357 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
11358 (build-system ruby-build-system)
11359 (arguments
11360 '(#:phases
11361 (modify-phases %standard-phases
11362 (add-after 'unpack 'remove-unnecessary-dependencies
11363 (lambda _
11364 (substitute* "spec/spec_helper.rb"
11365 ;; Coveralls is for uploading test coverage information to an
11366 ;; online service, and thus unnecessary for building the Guix
11367 ;; package
11368 (("require \"coveralls\"") "")
11369 (("Coveralls\\.wear!") "")
11370 ;; Remove rspec/retry as we are not retrying the tests
11371 (("require \"rspec/retry\"") "")
11372 (("config\\.display_try_failure_messages = true") "")
11373 (("config\\.verbose_retry = true") ""))
11374 #t))
11375 (add-before 'check 'compile
11376 (lambda _
11377 (invoke "rake" "compile")
11378 #t))
11379 (replace 'check
11380 (lambda* (#:key tests? #:allow-other-keys)
11381 (when tests?
11382 (invoke "rspec"))
11383 #t)))))
11384 (native-inputs
11385 (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop))
11386 (synopsis "New I/O for Ruby")
11387 (description
11388 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
11389 for scalable network clients and servers.")
11390 (home-page "https://github.com/socketry/nio4r")
11391 (license license:expat)))
11392
11393 (define-public ruby-globalid
11394 (package
11395 (name "ruby-globalid")
11396 (version "0.4.2")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (rubygems-uri "globalid" version))
11401 (sha256
11402 (base32
11403 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
11404 (build-system ruby-build-system)
11405 (arguments
11406 '(;; No included tests
11407 #:tests? #f))
11408 (propagated-inputs
11409 (list ruby-activesupport))
11410 (synopsis "Generate URIs idenfitying model instances in Ruby")
11411 (description
11412 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
11413 uniquely identify it.")
11414 (home-page "https://rubyonrails.org/")
11415 (license license:expat)))
11416
11417 (define-public ruby-sprockets
11418 (package
11419 (name "ruby-sprockets")
11420 (version "3.7.2")
11421 (source
11422 (origin
11423 (method url-fetch)
11424 (uri (rubygems-uri "sprockets" version))
11425 (sha256
11426 (base32
11427 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
11428 (build-system ruby-build-system)
11429 (arguments
11430 '(;; No included tests
11431 #:tests? #f))
11432 (propagated-inputs
11433 (list ruby-concurrent ruby-rack))
11434 (synopsis "Sprockets is a Rack-based asset packaging system")
11435 (description
11436 "Sprockets is a Rack-based asset packaging system that concatenates and
11437 serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
11438 (home-page "https://github.com/rails/sprockets")
11439 (license license:expat)))
11440
11441 (define-public ruby-mustache
11442 (package
11443 (name "ruby-mustache")
11444 (version "1.1.1")
11445 (source
11446 (origin
11447 (method url-fetch)
11448 (uri (rubygems-uri "mustache" version))
11449 (sha256
11450 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
11451 (build-system ruby-build-system)
11452 (native-inputs
11453 `(("ruby-simplecov" ,ruby-simplecov)
11454 ("test-patch"
11455 ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch"))))
11456 (arguments
11457 `(#:phases
11458 (modify-phases %standard-phases
11459 (add-after 'unpack 'patch-tests
11460 (lambda* (#:key inputs #:allow-other-keys)
11461 (invoke "patch" "-p1" "--batch" "-i"
11462 (assoc-ref inputs "test-patch")))))))
11463 (synopsis "framework-agnostic way to render logic-free views")
11464 (description
11465 "Mustache is a framework-agnostic way to render logic-free views.
11466 Think of Mustache as a replacement for your views. Instead of views
11467 consisting of ERB or HAML with random helpers and arbitrary logic,
11468 your views are broken into two parts: a Ruby class and an HTML
11469 template.")
11470 (home-page "https://github.com/mustache/mustache")
11471 (license license:expat)))
11472
11473 (define-public ruby-mustermann
11474 (package
11475 (name "ruby-mustermann")
11476 (version "1.0.3")
11477 (source
11478 (origin
11479 (method url-fetch)
11480 (uri (rubygems-uri "mustermann" version))
11481 (sha256
11482 (base32
11483 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
11484 (build-system ruby-build-system)
11485 (arguments
11486 ;; No tests.
11487 '(#:tests? #f))
11488 (synopsis "Library implementing patterns that behave like regular expressions")
11489 (description "Given a string pattern, Mustermann will turn it into an
11490 object that behaves like a regular expression and has comparable performance
11491 characteristics.")
11492 (home-page "https://github.com/sinatra/mustermann")
11493 (license license:expat)))
11494
11495 (define-public ruby-html-proofer
11496 (package
11497 (name "ruby-html-proofer")
11498 (version "3.18.5")
11499 (source
11500 (origin
11501 (method git-fetch)
11502 (uri (git-reference
11503 (url "https://github.com/gjtorikian/html-proofer")
11504 (commit (string-append "v" version))))
11505 (file-name (git-file-name name version))
11506 (sha256
11507 (base32
11508 "1pxb0fajb3l3lm7sqj548qwl7vx6sx3jy7n4cns9d4lqx7s9r9xb"))))
11509 (build-system ruby-build-system)
11510 (arguments
11511 `(;; FIXME: Tests depend on rubocop-standard.
11512 #:tests? #f))
11513 (native-inputs
11514 (list ruby-awesome-print
11515 ruby-redcarpet
11516 ruby-rspec
11517 ruby-rubocop
11518 ruby-rubocop-performance
11519 ruby-pry-byebug))
11520 (propagated-inputs
11521 (list ruby-addressable
11522 ruby-mercenary
11523 ruby-nokogumbo
11524 ruby-parallel
11525 ruby-rainbow
11526 ruby-typhoeus
11527 ruby-yell))
11528 (synopsis "Test your rendered HTML files to make sure they're accurate")
11529 (description
11530 "HTMLProofer is a set of tests to validate your HTML output. These
11531 tests check if your image references are legitimate, if they have alt tags,
11532 if your internal links are working, and so on. It's intended to be an
11533 all-in-one checker for your output.")
11534 (home-page "https://github.com/gjtorikian/html-proofer")
11535 (license license:expat)))
11536
11537 (define-public ruby-htmlentities
11538 (package
11539 (name "ruby-htmlentities")
11540 (version "4.3.4")
11541 (source
11542 (origin
11543 (method url-fetch)
11544 (uri (rubygems-uri "htmlentities" version))
11545 (sha256
11546 (base32
11547 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
11548 (build-system ruby-build-system)
11549 (arguments
11550 `(#:phases
11551 (modify-phases %standard-phases
11552 (replace 'check
11553 (lambda _
11554 (map (lambda (file)
11555 (invoke "ruby" "-Itest" file))
11556 (find-files "./test" ".*_test\\.rb")))))))
11557 (synopsis "Encode and decode (X)HTML entities")
11558 (description
11559 "This package provides a module for encoding and decoding (X)HTML
11560 entities.")
11561 (home-page "https://github.com/threedaymonk/htmlentities")
11562 (license license:expat)))
11563
11564 (define-public ruby-sinatra
11565 (package
11566 (name "ruby-sinatra")
11567 (version "2.0.8.1")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (rubygems-uri "sinatra" version))
11572 (sha256
11573 (base32
11574 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
11575 (build-system ruby-build-system)
11576 (arguments
11577 `(#:phases
11578 (modify-phases %standard-phases
11579 ;; See: https://github.com/sinatra/sinatra/issues/1578.
11580 (add-after 'extract-gemspec 'fix-slow-doc-generation
11581 (lambda _
11582 (substitute* "sinatra.gemspec"
11583 (("\"README.rdoc\"\\.freeze," all)
11584 (string-append all " \"--exclude=.*\\.md\".freeze,")))
11585 #t)))))
11586 (propagated-inputs
11587 (list ruby-mustermann ruby-rack ruby-rack-protection ruby-tilt))
11588 (synopsis "DSL for quick web applications creation in Ruby")
11589 (description
11590 "Sinatra is a DSL for quickly creating web applications in Ruby with
11591 minimal effort.")
11592 (home-page "http://sinatrarb.com/")
11593 (license license:expat)))
11594
11595 (define-public ruby-thin
11596 (package
11597 (name "ruby-thin")
11598 (version "1.7.2")
11599 (source
11600 (origin
11601 (method url-fetch)
11602 (uri (rubygems-uri "thin" version))
11603 (sha256
11604 (base32
11605 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
11606 (build-system ruby-build-system)
11607 (arguments
11608 ;; No tests.
11609 '(#:tests? #f))
11610 (propagated-inputs
11611 (list ruby-daemons ruby-eventmachine ruby-rack))
11612 (synopsis "Thin and fast web server for Ruby")
11613 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
11614 @itemize
11615 @item the Mongrel parser,
11616 @item Event Machine, a network I/O library with high scalability, performance
11617 and stability,
11618 @item Rack, a minimal interface between webservers and Ruby frameworks.
11619 @end itemize\n")
11620 (home-page "https://github.com/macournoyer/thin")
11621 (license license:ruby)))
11622
11623 (define-public ruby-skinny
11624 (package
11625 (name "ruby-skinny")
11626 (version "0.2.4")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (rubygems-uri "skinny" version))
11631 (sha256
11632 (base32
11633 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
11634 (build-system ruby-build-system)
11635 (arguments
11636 '(#:tests? #f ; No included tests
11637 #:phases
11638 (modify-phases %standard-phases
11639 (add-before 'build 'patch-gemspec
11640 (lambda _
11641 (substitute* ".gemspec"
11642 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
11643 "<eventmachine>, [\">= 1.0.0\"")
11644 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
11645 #t)))))
11646 (propagated-inputs
11647 (list ruby-eventmachine ruby-thin))
11648 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
11649 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
11650 the Thin library.")
11651 (home-page "https://github.com/sj26/skinny")
11652 (license license:expat)))
11653
11654 (define-public ruby-sys-filesystem
11655 (package
11656 (name "ruby-sys-filesystem")
11657 (version "1.3.4")
11658 (source (origin
11659 (method url-fetch)
11660 (uri (rubygems-uri "sys-filesystem" version))
11661 (sha256
11662 (base32
11663 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
11664 (build-system ruby-build-system)
11665 (arguments
11666 '(#:phases (modify-phases %standard-phases
11667 (add-before 'check 'set-HOME
11668 (lambda _
11669 ;; Some tests attempt to stat $HOME. Let them.
11670 (setenv "HOME" "/tmp")
11671 #t)))))
11672 (propagated-inputs
11673 (list ruby-ffi))
11674 (native-inputs
11675 (list ruby-mkmf-lite))
11676 (synopsis "Gather file system information")
11677 (description
11678 "The @code{sys-filesystem} library provides a cross-platform interface
11679 for gathering file system information, such as disk space and mount points.")
11680 (home-page "https://github.com/djberg96/sys-filesystem")
11681 (license license:asl2.0)))
11682
11683 (define-public mailcatcher
11684 (package
11685 (name "mailcatcher")
11686 (version "0.7.1")
11687 (source
11688 (origin
11689 (method url-fetch)
11690 (uri (rubygems-uri "mailcatcher" version))
11691 (sha256
11692 (base32
11693 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
11694 (build-system ruby-build-system)
11695 (arguments
11696 ;; Tests require web/assets which is not included in the output. We
11697 ;; might be able to fix this by adding the Git repository to the GEM_PATH
11698 ;; of the tests. See ruby-mysql2.
11699 '(#:tests? #f
11700 #:phases
11701 (modify-phases %standard-phases
11702 (add-before 'build 'patch-gemspec
11703 (lambda _
11704 (substitute* ".gemspec"
11705 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11706 "<eventmachine>, [\">= 1.0.9.1")
11707 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11708 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11709 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11710 #t))
11711 (add-before 'build 'loosen-dependency-contraint
11712 (lambda _
11713 (substitute* "lib/mail_catcher.rb"
11714 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11715 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11716 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11717 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11718 #t)))))
11719 (inputs
11720 (list ruby-eventmachine
11721 ruby-mail
11722 ruby-rack
11723 ruby-sinatra
11724 ruby-skinny
11725 ruby-sqlite3
11726 ruby-thin))
11727 (synopsis "SMTP server which catches messages to display them a browser")
11728 (description
11729 "MailCatcher runs a super simple SMTP server which catches any message
11730 sent to it to display in a web interface. Run mailcatcher, set your favourite
11731 app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11732 then check out http://127.0.0.1:1080 to see the mail.")
11733 (home-page "https://mailcatcher.me")
11734 (license license:expat)))
11735
11736 (define-public ruby-backport
11737 (package
11738 (name "ruby-backport")
11739 (version "1.1.2")
11740 (source
11741 (origin
11742 ;; The gem does not include test code, so fetch from the Git repository.
11743 (method git-fetch)
11744 (uri (git-reference
11745 (url "https://github.com/castwide/backport")
11746 (commit (string-append "v" version))))
11747 (file-name (git-file-name name version))
11748 (sha256
11749 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
11750 (build-system ruby-build-system)
11751 (arguments
11752 `(#:test-target "spec"))
11753 (native-inputs
11754 (list bundler ruby-rspec))
11755 (inputs
11756 (list ruby-simplecov))
11757 (synopsis "Pure Ruby library for event-driven IO")
11758 (description
11759 "This package provides a pure Ruby library for event-driven IO.")
11760 (home-page "https://github.com/castwide/backport")
11761 (license license:expat)))
11762
11763 (define-public ruby-json-schema
11764 (package
11765 (name "ruby-json-schema")
11766 (version "2.8.1")
11767 (source
11768 (origin
11769 (method url-fetch)
11770 (uri (rubygems-uri "json-schema" version))
11771 (sha256
11772 (base32
11773 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11774 (build-system ruby-build-system)
11775 (arguments
11776 `(#:tests? #f ; no tests
11777 #:phases
11778 (modify-phases %standard-phases
11779 (replace 'build
11780 (lambda _
11781 (invoke "gem" "build" ".gemspec"))))))
11782 (propagated-inputs
11783 (list ruby-addressable))
11784 (synopsis "Ruby JSON Schema Validator")
11785 (description "This library provides Ruby with an interface for validating
11786 JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11787 support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11788 is also included.")
11789 (home-page "https://github.com/ruby-json-schema/json-schema")
11790 (license license:expat)))
11791
11792 (define-public swagger-diff
11793 (package
11794 (name "swagger-diff")
11795 (version "1.1.2")
11796 (source
11797 (origin
11798 (method url-fetch)
11799 (uri (rubygems-uri "swagger-diff" version))
11800 (sha256
11801 (base32
11802 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11803 (build-system ruby-build-system)
11804 (arguments
11805 `(#:test-target "spec"
11806 #:phases
11807 (modify-phases %standard-phases
11808 ;; Don't run or require rubocop, the code linting tool, as this is a
11809 ;; bit unnecessary.
11810 (add-after 'unpack 'dont-run-rubocop
11811 (lambda _
11812 (substitute* "Rakefile"
11813 ((".*rubocop.*") "")
11814 ((".*RuboCop.*") ""))
11815 #t)))))
11816 (propagated-inputs
11817 (list ruby-json-schema))
11818 (native-inputs
11819 (list bundler ruby-rspec-core ruby-rspec-expectations))
11820 (synopsis
11821 "Compare Open API Initiative specification files")
11822 (description
11823 "Swagger::Diff is a utility for comparing two different Open API
11824 Initiative (OAI) specifications (formerly known as Swagger specifications).
11825 It is intended to determine whether a newer API specification is
11826 backwards-compatible with an older API specification.")
11827 (home-page "https://github.com/civisanalytics/swagger-diff")
11828 (license license:bsd-3)))
11829
11830 (define-public ruby-reverse-markdown
11831 (package
11832 (name "ruby-reverse-markdown")
11833 (version "1.1.0")
11834 (source
11835 (origin
11836 (method url-fetch)
11837 (uri (rubygems-uri "reverse_markdown" version))
11838 (sha256
11839 (base32
11840 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11841 (build-system ruby-build-system)
11842 (propagated-inputs
11843 (list ruby-nokogiri))
11844 (native-inputs
11845 (list bundler ruby-rspec ruby-kramdown ruby-simplecov))
11846 (arguments
11847 `(#:phases
11848 (modify-phases %standard-phases
11849 (replace 'check
11850 (lambda* (#:key tests? #:allow-other-keys)
11851 (when tests?
11852 (invoke "rspec"))
11853 #t)))))
11854 (synopsis "Convert HTML into Markdown")
11855 (description
11856 "This Ruby module allows you to map simple HTML back into
11857 Markdown---e.g., if you want to import existing HTML data in your
11858 application.")
11859 (home-page "https://github.com/xijo/reverse_markdown")
11860 (license license:wtfpl2)))
11861
11862 (define-public ruby-solargraph
11863 (package
11864 (name "ruby-solargraph")
11865 (version "0.40.3")
11866 (source
11867 (origin
11868 (method url-fetch)
11869 (uri (rubygems-uri "solargraph" version))
11870 (sha256
11871 (base32
11872 "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
11873 (build-system ruby-build-system)
11874 (propagated-inputs
11875 (list ruby-backport
11876 bundler
11877 ruby-benchmark
11878 ruby-e2mmap
11879 ruby-jaro-winkler
11880 ruby-kramdown
11881 ruby-kramdown-parser-gfm
11882 ruby-maruku
11883 ruby-nokogiri
11884 ruby-parser
11885 ruby-reverse-markdown
11886 ruby-rubocop
11887 ruby-thor
11888 ruby-tilt
11889 ruby-yard))
11890 (native-inputs
11891 (list ruby-rspec ruby-pry ruby-simplecov ruby-webmock))
11892 ;; FIXME: can't figure out how to run the tests properly:
11893
11894 ;; An error occurred while loading spec_helper.
11895 ;; Failure/Error: return gem_original_require(path)
11896 ;; LoadError:
11897 ;; cannot load such file -- spec_helper
11898 (arguments
11899 '(#:tests? #f
11900 #:phases
11901 (modify-phases %standard-phases
11902 (replace 'check
11903 (lambda* (#:key tests? #:allow-other-keys)
11904 (when tests?
11905 (invoke "rspec"))
11906 #t)))))
11907 (synopsis
11908 "IDE tools for code completion, inline documentation, and static analysis")
11909 (description
11910 "Solargraph provides a comprehensive suite of tools for Ruby
11911 programming: intellisense, diagnostics, inline documentation, and type
11912 checking.")
11913 (home-page "https://solargraph.org/")
11914 (license license:expat)))
11915
11916 (define-public ruby-wayback-machine-downloader
11917 (package
11918 (name "ruby-wayback-machine-downloader")
11919 (version "2.2.1")
11920 (source
11921 (origin
11922 (method url-fetch)
11923 (uri (rubygems-uri
11924 "wayback_machine_downloader"
11925 version))
11926 (sha256
11927 (base32
11928 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11929 (build-system ruby-build-system)
11930 (arguments
11931 '(#:tests? #f)) ; no tests
11932 (synopsis "Download archived websites from the Wayback Machine")
11933 (description
11934 "Wayback Machine Downloader is a command line tool for downloading
11935 websites from the Internet Archive's Wayback Machine (archive.org).
11936 It allows fine grained control over what to download by specifying
11937 which snapshots to consider and what files to include.")
11938 (home-page
11939 "https://github.com/hartator/wayback-machine-downloader")
11940 (license license:expat)))
11941
11942 (define-public ruby-zeitwerk
11943 (package
11944 (name "ruby-zeitwerk")
11945 (version "2.4.2")
11946 (source
11947 (origin
11948 (method git-fetch)
11949 (uri (git-reference
11950 ;; No tests in the released gem.
11951 (url "https://github.com/fxn/zeitwerk")
11952 (commit (string-append "v" version))))
11953 (file-name (git-file-name name version))
11954 (sha256
11955 (base32
11956 "119fgdyb57gmss2yvfwfr47wcy8nny38sai72446krpihyavpizw"))))
11957 (build-system ruby-build-system)
11958 (native-inputs
11959 (list ruby-minitest ruby-minitest-focus ruby-minitest-reporters))
11960 (synopsis "Efficient and thread-safe code loader for Ruby")
11961 (description
11962 "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
11963 and application may have their own independent autoloader, with its own
11964 configuration, inflector, and logger. Supports autoloading, reloading, and
11965 eager loading.")
11966 (home-page "https://github.com/fxn/zeitwerk")
11967 (license license:expat)))
11968
11969 (define-public ruby-wwtd
11970 (package
11971 (name "ruby-wwtd")
11972 (version "1.4.1")
11973 (home-page "https://github.com/grosser/wwtd")
11974 (source (origin
11975 (method git-fetch)
11976 (uri (git-reference
11977 (url home-page)
11978 (commit (string-append "v" version))))
11979 (file-name (git-file-name name version))
11980 (sha256
11981 (base32
11982 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11983 (modules '((guix build utils)))
11984 (snippet
11985 '(begin
11986 ;; Remove bundled library.
11987 (delete-file "spec/rake-12.3.0.gem")
11988 #t))))
11989 (build-system ruby-build-system)
11990 (arguments
11991 '(;; XXX: Tests need multiple versions of ruby, wants to run
11992 ;; `bundle install`, etc.
11993 #:tests? #f
11994 #:phases (modify-phases %standard-phases
11995 (replace 'replace-git-ls-files
11996 (lambda _
11997 (substitute* "wwtd.gemspec"
11998 (("git ls-files lib/ bin/`")
11999 "find lib/ bin/ -type f |sort`"))
12000 #t))
12001 (add-before 'check 'remove-version-constraints
12002 (lambda _
12003 (delete-file "Gemfile.lock")
12004 #t))
12005 (replace 'check
12006 (lambda* (#:key tests? #:allow-other-keys)
12007 (if tests?
12008 (invoke "rspec" "spec/")
12009 (format #t "test suite not run~%"))
12010 #t)))))
12011 (native-inputs
12012 (list ruby-bump ruby-rspec))
12013 (synopsis "Run @file{.travis.yml} files locally")
12014 (description
12015 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
12016 defined in @file{.travis.yml} on your local machine, using @code{rvm},
12017 @code{rbenv}, or @code{chruby} to test different versions of Ruby.")
12018 (license license:expat)))
12019
12020 (define-public ruby-rugged
12021 (package
12022 (name "ruby-rugged")
12023 (version "1.1.0")
12024 (home-page "https://www.rubydoc.info/gems/rugged")
12025 (source
12026 (origin
12027 (method url-fetch)
12028 (uri (rubygems-uri "rugged" version))
12029 (sha256
12030 (base32 "04aq913plcxjw71l5r62qgz3bx3466p0wvgyfqahg5n3nybmcwqy"))))
12031 (build-system ruby-build-system)
12032 (arguments
12033 `(#:tests? #f
12034 #:gem-flags (list "--" "--use-system-libraries")))
12035 (inputs
12036 (list libgit2))
12037 (native-inputs
12038 (list ruby-minitest ruby-pry ruby-rake-compiler))
12039 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
12040 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
12041 you the speed and portability of libgit2 with the beauty of the Ruby
12042 language.")
12043 (license license:expat)))
12044
12045 (define-public ruby-yell
12046 (package
12047 (name "ruby-yell")
12048 (version "2.2.2")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (rubygems-uri "yell" version))
12053 (sha256
12054 (base32
12055 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
12056 (build-system ruby-build-system)
12057 (arguments
12058 `(#:phases
12059 (modify-phases %standard-phases
12060 (replace 'check
12061 (lambda _
12062 (invoke "rake" "examples")))))) ; there is no test target.
12063 (synopsis
12064 "Extensible logging library for Ruby")
12065 (description
12066 "Yell is a comprehensive logging replacement for Ruby. It defines
12067 multiple adapters, various log level combinations and message formatting
12068 options.")
12069 (home-page "https://github.com/rudionrails/yell")
12070 (license license:expat)))
12071
12072 (define-public ruby-e2mmap
12073 (package
12074 (name "ruby-e2mmap")
12075 (version "0.1.0")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (rubygems-uri "e2mmap" version))
12080 (sha256
12081 (base32
12082 "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
12083 (build-system ruby-build-system)
12084 (arguments
12085 `(#:tests? #f)) ;; There is a rakefile but no tests
12086 (synopsis
12087 "Module for defining custom exceptions with specific messages")
12088 (description
12089 "Exception2MessageMapper (e2mmap) is a helper module for easily defining
12090 exceptions with predefined messages.")
12091 (home-page "https://github.com/ruby/e2mmap")
12092 (license license:bsd-2)))
12093
12094 (define-public ruby-benchmark
12095 (package
12096 (name "ruby-benchmark")
12097 (version "0.1.1")
12098 (source
12099 (origin
12100 (method url-fetch)
12101 (uri (rubygems-uri "benchmark" version))
12102 (sha256
12103 (base32
12104 "1jvrl7400fv7v2jjri1r7ilj3sri36hzipwwgpn5psib4c9c59c6"))))
12105 (build-system ruby-build-system)
12106 (synopsis "Performance benchmarking library")
12107 (description "This package provides methods for benchmarking Ruby code,
12108 giving detailed reports on the time taken for each task.")
12109 (home-page "https://github.com/ruby/benchmark")
12110 (license license:bsd-2)))
12111
12112 (define-public ruby-jekyll-feed
12113 (package
12114 (name "ruby-jekyll-feed")
12115 (version "0.15.1")
12116 (source
12117 (origin
12118 (method url-fetch)
12119 (uri (rubygems-uri "jekyll-feed" version))
12120 (sha256
12121 (base32
12122 "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
12123 (build-system ruby-build-system)
12124 (arguments
12125 `(#:tests? #false)) ;there are none
12126 (propagated-inputs
12127 (list jekyll))
12128 (synopsis
12129 "Jekyll plugin to generate an Atom feed of your Jekyll posts")
12130 (description
12131 "This package provides a Jekyll plugin to generate an Atom feed
12132 of your Jekyll posts.")
12133 (home-page
12134 "https://github.com/jekyll/jekyll-feed")
12135 (license license:expat)))
12136
12137 (define-public ruby-jekyll-sitemap
12138 (package
12139 (name "ruby-jekyll-sitemap")
12140 (version "1.4.0")
12141 (source
12142 (origin
12143 (method url-fetch)
12144 (uri (rubygems-uri "jekyll-sitemap" version))
12145 (sha256
12146 (base32
12147 "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
12148 (build-system ruby-build-system)
12149 (arguments
12150 `(#:tests? #false)) ;there are none
12151 (propagated-inputs
12152 (list jekyll))
12153 (synopsis
12154 "Automatically generate a sitemap.xml for your Jekyll site")
12155 (description
12156 "This package provides a Jekyll plugin to silently generate
12157 a sitemaps.org compliant sitemap for your Jekyll site.")
12158 (home-page
12159 "https://github.com/jekyll/jekyll-sitemap")
12160 (license license:expat)))
12161
12162 (define-public ruby-jekyll-seo-tag
12163 (package
12164 (name "ruby-jekyll-seo-tag")
12165 (version "2.7.1")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (rubygems-uri "jekyll-seo-tag" version))
12170 (sha256
12171 (base32
12172 "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
12173 (build-system ruby-build-system)
12174 (arguments
12175 `(#:tests? #false))
12176 (propagated-inputs
12177 (list jekyll))
12178 (synopsis
12179 "Jekyll plugin to add metadata tags for search engines and social networks")
12180 (description
12181 "This package provides a Jekyll plugin to add metadata tags for search engines
12182 and social networks to better index and display your site's content.")
12183 (home-page
12184 "https://github.com/jekyll/jekyll-seo-tag")
12185 (license license:expat)))
12186
12187 (define-public ruby-taskjuggler
12188 (package
12189 (name "ruby-taskjuggler")
12190 (version "3.7.1")
12191 (source
12192 (origin
12193 (method url-fetch)
12194 (uri (rubygems-uri "taskjuggler" version))
12195 (sha256
12196 (base32
12197 "1jrsajzhzpnfa8hj6lbf7adn8hls56dz3yw1gvzgz9y4zkka3k9v"))))
12198 (build-system ruby-build-system)
12199 (native-inputs (list tzdata-for-tests))
12200 (propagated-inputs
12201 (list ruby-mail ruby-term-ansicolor))
12202 (arguments
12203 '(#:phases (modify-phases %standard-phases
12204 (replace 'replace-git-ls-files
12205 (lambda _
12206 (substitute* "tasks/rdoc.rake"
12207 (("`git ls-files -- lib`")
12208 "`find lib/ -type f |sort`"))
12209 #t))
12210 (add-before 'check 'tzdir-setup
12211 (lambda* (#:key inputs #:allow-other-keys)
12212 (setenv "TZDIR"
12213 (string-append (assoc-ref inputs "tzdata")
12214 "/share/zoneinfo"))
12215 #t))
12216 (add-before 'check 'delete-test-BatchProcessor
12217 ;; test_BatchProcessor fails with exeption:
12218 ;; run> terminated with exception (report_on_exception is true)
12219 (lambda _
12220 (delete-file "test/test_BatchProcessor.rb")
12221 #t)))))
12222 (synopsis
12223 "Project management command line tool with a domain specific language")
12224 (description
12225 "TaskJuggler (tj3) is a project management tool for project planning and
12226 tracking using a domain specific language; projects are plain text files
12227 written using your favourite text editor. It includes reporting in HTML, CSV
12228 or iCalendar format and an email based status tracking system to send and
12229 receive time sheets from collaborators.
12230
12231 It covers the complete spectrum of project management tasks from the first
12232 idea to the completion of the project. It assists you during project scoping,
12233 resource assignment, cost and revenue planning, risk and communication
12234 management, status tracking and reporting.")
12235 (home-page "https://taskjuggler.org")
12236 (license license:gpl2)))
12237
12238 (define-public ruby-cmath
12239 (package
12240 (name "ruby-cmath")
12241 (version "1.0.0")
12242 (source
12243 (origin
12244 (method url-fetch)
12245 (uri (rubygems-uri "cmath" version))
12246 (sha256
12247 (base32
12248 "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
12249 (build-system ruby-build-system)
12250 (arguments
12251 `(#:tests? #false))
12252 (native-inputs
12253 (list bundler ruby-rake-compiler))
12254 (synopsis "Trigonometric functions for complex numbers")
12255 (description
12256 "This gem is a library that provides trigonometric and transcendental
12257 functions for complex numbers. The functions in this module accept integers,
12258 floating-point numbers or complex numbers as arguments.")
12259 (home-page "https://github.com/ruby/cmath")
12260 (license license:bsd-2)))
12261
12262 (define-public ruby-sucker-punch
12263 (package
12264 (name "ruby-sucker-punch")
12265 (version "3.0.1")
12266 (source
12267 (origin
12268 (method url-fetch)
12269 (uri (rubygems-uri "sucker_punch" version))
12270 (sha256
12271 (base32 "0yams24wndpj7dzdysvm4z1w6ggg4xvj4snxba66prahhxvik4xl"))))
12272 (build-system ruby-build-system)
12273 (arguments
12274 `(#:phases
12275 (modify-phases %standard-phases
12276 (add-after 'extract-gemspec 'less-strict-dependencies
12277 (lambda _
12278 (substitute* "sucker_punch.gemspec"
12279 (("1.0.0") "1.0")))))))
12280 (native-inputs
12281 (list
12282 ruby-pry))
12283 (propagated-inputs
12284 (list
12285 ruby-concurrent))
12286 (home-page "https://github.com/brandonhilkert/sucker_punch")
12287 (synopsis "Asynchronous processing library for Ruby")
12288 (description "Sucker Punch is a single-process Ruby asynchronous processing
12289 library. It is perfect for asynchronous processes like emailing, data crunching
12290 or social platform manipulation; and generally recommended for jobs that are
12291 fast and non-mission critical like logs, emails, etc.")
12292 (license license:expat)))
12293
12294 (define-public ruby-countdownlatch
12295 (package
12296 (name "ruby-countdownlatch")
12297 (version "1.0.0")
12298 (source
12299 (origin
12300 (method url-fetch)
12301 (uri (rubygems-uri "countdownlatch" version))
12302 (sha256
12303 (base32 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
12304 (build-system ruby-build-system)
12305 (home-page "https://github.com/benlangfeld/countdownlatch")
12306 (synopsis "Thread synchronization aid Ruby")
12307 (description "CountDownLatch is a synchronization aid that allows one or
12308 more threads to wait until a set of operations being performed in other threads
12309 completes.")
12310 (license license:expat)))
12311
12312 (define-public ruby-value-semantics
12313 (package
12314 (name "ruby-value-semantics")
12315 (version "3.6.1")
12316 (source
12317 (origin
12318 (method url-fetch)
12319 (uri (rubygems-uri "value_semantics" version))
12320 (sha256
12321 (base32 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
12322 (build-system ruby-build-system)
12323 (arguments
12324 `(#:phases
12325 (modify-phases %standard-phases
12326 (replace 'check
12327 (lambda* (#:key tests? #:allow-other-keys)
12328 (when tests?
12329 (invoke "rspec")))))))
12330 (native-inputs
12331 (list
12332 ruby-rspec))
12333 (home-page "https://github.com/tomdalling/value_semantics")
12334 (synopsis "Ruby gem for making value classes")
12335 (description "ValueSemantics generates modules that provide conventional
12336 value semantics for a given set of attributes. The behaviour is similar to an
12337 immutable Struct class, plus extensible, lightweight validation and coercion.")
12338 (license license:expat)))
12339
12340 (define-public ruby-promise
12341 (package
12342 (name "ruby-promise")
12343 (version "0.7.4")
12344 (source
12345 (origin
12346 (method url-fetch)
12347 (uri (rubygems-uri "promise.rb" version))
12348 (sha256
12349 (base32 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
12350 (build-system ruby-build-system)
12351 (arguments
12352 `(#:test-target "spec"
12353 #:phases
12354 (modify-phases %standard-phases
12355 (add-after 'extract-gemspec 'less-strict-dependencies
12356 (lambda _
12357 (substitute* "Rakefile"
12358 (("if Gem.ruby_version.*") "if false\n"))
12359 (substitute* "spec/spec_helper.rb"
12360 ((".*devtools/spec_helper.*") "\n")))))))
12361 (native-inputs
12362 (list
12363 ruby-rspec
12364 ruby-rspec-its
12365 ruby-awesome-print
12366 ruby-fuubar))
12367 (home-page "https://github.com/lgierth/promise.rb")
12368 (synopsis "Asynchronous operation library for Ruby")
12369 (description "Promise is a Ruby implementation of the Promises/A+
12370 specification. It provides 100% mutation coverage, tested on MRI 1.9, 2.0, 2.1,
12371 2.2, Rubinius, and JRuby.")
12372 (license license:unlicense)))
12373
12374 (define-public ruby-multicodecs
12375 (package
12376 (name "ruby-multicodecs")
12377 (version "0.2.1")
12378 (source
12379 (origin
12380 (method url-fetch)
12381 (uri (rubygems-uri "multicodecs" version))
12382 (sha256
12383 (base32 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
12384 (build-system ruby-build-system)
12385 (home-page "https://github.com/SleeplessByte/ruby-multicodec")
12386 (synopsis "Ruby implementation of multiformats/multicodec")
12387 (description "Multicodecs is the ruby implementation of
12388 multiformats/multicodec, a canonical table of of codecs used by various
12389 multiformats.")
12390 (license license:expat)))
12391
12392 (define-public ruby-multihashes
12393 (package
12394 (name "ruby-multihashes")
12395 (version "0.2.0")
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (rubygems-uri "multihashes" version))
12400 (sha256
12401 (base32 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
12402 (build-system ruby-build-system)
12403 (propagated-inputs
12404 (list
12405 ruby-multicodecs))
12406 (home-page "https://github.com/multiformats/ruby-multihash")
12407 (synopsis "Multihash implementation for Ruby")
12408 (description "Multihashes provides a simple, low-level multihash
12409 implementation for Ruby. A multihash is a digest with an embedded hash function
12410 code")
12411 (license license:expat)))
12412
12413 (define-public ruby-lazy-object
12414 (package
12415 (name "ruby-lazy-object")
12416 (version "0.0.3")
12417 (source
12418 (origin
12419 (method url-fetch)
12420 (uri (rubygems-uri "lazy_object" version))
12421 (sha256
12422 (base32 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
12423 (build-system ruby-build-system)
12424 (arguments
12425 `(#:test-target "spec"))
12426 (home-page "https://github.com/HornsAndHooves/lazy_object")
12427 (synopsis "Object wrapper that forwards all calls to the reference object")
12428 (description "LazyObject is an object wrapper that forwards all calls to the
12429 reference object. This object is not created until the first method dispatch.")
12430 (license license:expat)))
12431
12432 (define-public ruby-citrus
12433 (package
12434 (name "ruby-citrus")
12435 (version "3.0.2")
12436 (source
12437 (origin
12438 (method git-fetch)
12439 ;; Download from GitHub because the rubygems version does not contain
12440 ;; files needed for tests.
12441 (uri (git-reference
12442 (url "https://github.com/mjackson/citrus")
12443 (commit (string-append "v" version))))
12444 (file-name (git-file-name name version))
12445 (sha256
12446 (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
12447 (build-system ruby-build-system)
12448 (home-page "http://mjackson.github.io/citrus/")
12449 (synopsis "Parsing Expressions for Ruby")
12450 (description "Citrus is a parsing library for Ruby that combines the
12451 expressiveness of the language with the parsing expressions.")
12452 (license license:expat)))
12453
12454 (define-public ruby-cbor
12455 (package
12456 (name "ruby-cbor")
12457 (version "0.5.9.6")
12458 (source
12459 (origin
12460 (method url-fetch)
12461 (uri (rubygems-uri "cbor" version))
12462 (sha256
12463 (base32 "0511idr8xps9625nh3kxr68sdy6l3xy2kcz7r57g47fxb1v18jj3"))))
12464 (build-system ruby-build-system)
12465 (arguments
12466 `(#:test-target "spec"))
12467 (native-inputs
12468 (list
12469 ruby-rspec
12470 ruby-rake-compiler
12471 ruby-yard))
12472 (home-page "http://cbor.io/")
12473 (synopsis "Concise Binary Object Representation")
12474 (description "CBOR is a library for the
12475 @acronym{CBOR, Concise Binary Object Representation} format, based on
12476 Sadayuki Furuhashi's MessagePack library.")
12477 (license license:asl2.0)))
12478
12479 (define-public ruby-gem-release
12480 (package
12481 (name "ruby-gem-release")
12482 (version "2.2.2")
12483 (source
12484 (origin
12485 (method url-fetch)
12486 (uri (rubygems-uri "gem-release" version))
12487 (sha256
12488 (base32 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
12489 (build-system ruby-build-system)
12490 (arguments
12491 ;; No rakefile
12492 `(#:tests? #f))
12493 (home-page "https://github.com/svenfuchs/gem-release")
12494 (synopsis "Ruby gem plugin for release management")
12495 (description "GemRelease is a gem plugin that aims at making gem development
12496 easier by automating repetitive work based on conventions, configuration, and
12497 templates.")
12498 (license license:expat)))
12499
12500 (define-public ruby-base32
12501 (package
12502 (name "ruby-base32")
12503 (version "0.3.4")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (rubygems-uri "base32" version))
12508 (sha256
12509 (base32 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
12510 (build-system ruby-build-system)
12511 (native-inputs
12512 (list
12513 ruby-gem-release))
12514 (home-page "https://github.com/stesla/base32")
12515 (synopsis "Ruby extension for base32 encoding and decoding")
12516 (description "Base32 is a library which provides base32 decoding and
12517 encoding.")
12518 (license license:expat)))
12519
12520 (define-public ruby-dhall
12521 (package
12522 (name "ruby-dhall")
12523 (version "0.5.2")
12524 (source
12525 (origin
12526 (method url-fetch)
12527 (uri (rubygems-uri "dhall" version))
12528 (sha256
12529 (base32 "09wcq8xc1ynld04r2f332bx8cn7rjc4afaq8hm1dr2fc35jlpn6m"))))
12530 (build-system ruby-build-system)
12531 (arguments
12532 ;; No test in gem archive
12533 `(#:tests? #f))
12534 (propagated-inputs
12535 (list
12536 ruby-base32
12537 ruby-cbor
12538 ruby-citrus
12539 ruby-lazy-object
12540 ruby-multihashes
12541 ruby-promise
12542 ruby-value-semantics))
12543 (home-page "https://git.sr.ht/~singpolyma/dhall-ruby")
12544 (synopsis "Ruby implementation of the Dhall configuration language")
12545 (description "Dhall.rb is a Ruby implementation of the Dhall configuration
12546 language. Dhall is a memory safe and non-Turing-complete configuration
12547 language.")
12548 (license license:gpl3+)))
12549
12550 (define-public ruby-money
12551 (package
12552 (name "ruby-money")
12553 (version "6.16.0")
12554 (source
12555 (origin
12556 (method url-fetch)
12557 (uri (rubygems-uri "money" version))
12558 (sha256
12559 (base32 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
12560 (build-system ruby-build-system)
12561 (arguments
12562 ;; No rakefile.
12563 `(#:tests? #f))
12564 (propagated-inputs
12565 (list
12566 ruby-i18n))
12567 (home-page "https://rubymoney.github.io/money/")
12568 (synopsis "Currency conversion library for Ruby")
12569 (description "RubyMoney provides a library for dealing with money and
12570 currency conversion. Its features are:
12571 @itemize
12572 @item
12573 Provides a Money class which encapsulates all information about a certain
12574 amount of money, such as its value and its currency.
12575 @item
12576 Provides a Money::Currency class which encapsulates all information about a
12577 monetary unit.
12578 @item
12579 Represents monetary values as integers, in cents; so avoids floating point
12580 rounding errors.
12581 @item
12582 Represents currency as Money::Currency instances providing a high level of
12583 flexibility.
12584 @item Provides APIs for exchanging money from one currency to another.
12585 @end itemize")
12586 (license license:expat)))
12587
12588 (define-public ruby-monetize
12589 (package
12590 (name "ruby-monetize")
12591 (version "1.11.0")
12592 (source
12593 (origin
12594 (method url-fetch)
12595 (uri (rubygems-uri "monetize" version))
12596 (sha256
12597 (base32 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
12598 (build-system ruby-build-system)
12599 (arguments
12600 `(#:test-target "spec"))
12601 (native-inputs
12602 (list
12603 ruby-rspec))
12604 (propagated-inputs
12605 (list
12606 ruby-money))
12607 (home-page "https://github.com/RubyMoney/monetize")
12608 (synopsis "Convert various objects into Money objects")
12609 (description "Monetize provides a library for converting various objects
12610 into Money objects.")
12611 (license license:expat)))
12612
12613 (define-public ruby-money-open-exchange-rates
12614 (package
12615 (name "ruby-money-open-exchange-rates")
12616 (version "1.4.0")
12617 (source
12618 (origin
12619 (method git-fetch)
12620 ;; Download from GitHub because the rubygems version does not contain
12621 ;; Rakefile.
12622 (uri (git-reference
12623 (url "https://github.com/spk/money-open-exchange-rates")
12624 (commit (string-append "v" version))))
12625 (file-name (git-file-name name version))
12626 (sha256
12627 (base32 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
12628 (build-system ruby-build-system)
12629 (native-inputs
12630 (list
12631 ruby-minitest
12632 ruby-mocha
12633 ruby-monetize
12634 ruby-rake
12635 ruby-rubocop
12636 ruby-timecop
12637 ruby-webmock))
12638 (propagated-inputs
12639 (list
12640 ruby-money))
12641 (home-page "https://spk.github.io/money-open-exchange-rates/")
12642 (synopsis "Money open exchange rates for Ruby")
12643 (description "This package provides a gem that calculates the exchange rate
12644 using published rates from open-exchange-rates. Compatible with the money gem.")
12645 (license license:expat)))
12646
12647 (define-public ruby-roda
12648 (package
12649 (name "ruby-roda")
12650 (version "3.57.0")
12651 (source
12652 (origin
12653 (method url-fetch)
12654 (uri (rubygems-uri "roda" version))
12655 (sha256
12656 (base32 "0nkfxnbcfnriywvx9kpamp850cwjmqv8ssajc95d0aiyjr4kdrfy"))))
12657 (build-system ruby-build-system)
12658 (arguments
12659 ;; No rakefile
12660 `(#:tests? #f))
12661 (propagated-inputs (list ruby-rack))
12662 (home-page "http://roda.jeremyevans.net")
12663 (synopsis "Routing Tree Web Toolkit")
12664 (description "Roda is a routing tree web toolkit, designed for building fast
12665 and maintainable web applications in ruby.")
12666 (license license:expat)))
12667
12668 (define-public ruby-nori
12669 (package
12670 (name "ruby-nori")
12671 (version "2.6.0")
12672 (source
12673 (origin
12674 (method url-fetch)
12675 (uri (rubygems-uri "nori" version))
12676 (sha256
12677 (base32 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
12678 (build-system ruby-build-system)
12679 (arguments
12680 ;; Tests require too old version of rspec
12681 `(#:tests? #f))
12682 (native-inputs
12683 (list ruby-nokogiri
12684 ruby-rake
12685 ruby-rspec))
12686 (home-page "https://github.com/savonrb/nori")
12687 (synopsis "XML to Hash translator")
12688 (description "Nori is a simple XML parsing ripped from Crack which in-turn
12689 ripped from Merb. It supports pluggable parsers and ships with both REXML and
12690 Nokogiri implementations.")
12691 (license license:expat)))
12692
12693 (define-public ruby-faraday-middleware
12694 (package
12695 (name "ruby-faraday-middleware")
12696 (version "1.2.0")
12697 (source
12698 (origin
12699 (method url-fetch)
12700 (uri (rubygems-uri "faraday_middleware" version))
12701 (sha256
12702 (base32 "1bw8mfh4yin2xk7138rg3fhb2p5g2dlmdma88k82psah9mbmvlfy"))))
12703 (build-system ruby-build-system)
12704 (arguments
12705 ;; No rakefile
12706 `(#:tests? #f))
12707 (propagated-inputs
12708 (list ruby-faraday))
12709 (home-page "https://github.com/lostisland/faraday_middleware")
12710 (synopsis "Various middleware for Faraday")
12711 (description "Faraday_Middleware is a collection of middleware for the
12712 Faraday-based API wrappers.")
12713 (license license:expat)))
12714
12715 (define-public ruby-bandwidth-iris
12716 (package
12717 (name "ruby-bandwidth-iris")
12718 (version "5.1.0")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (rubygems-uri "ruby-bandwidth-iris" version))
12723 (sha256
12724 (base32 "1hmrxs0dif6fw5npyzcshk4nq9qr2kbmnx7mdjr5v1nhzlfr0678"))))
12725 (build-system ruby-build-system)
12726 (arguments
12727 ;; XXX: Tests don't require helper for some reason, so all fail.
12728 `(#:tests? #f))
12729 (native-inputs
12730 (list ruby-rspec
12731 ruby-yard))
12732 (propagated-inputs
12733 (list ruby-activesupport
12734 ruby-builder
12735 ruby-faraday
12736 ruby-faraday-middleware
12737 ruby-nori))
12738 (home-page "https://github.com/Bandwidth/ruby-bandwidth-iris")
12739 (synopsis "Gem for integrating to Bandwidth's Iris API")
12740 (description "Bandwidth IRIS is a Ruby SDK for Bandwidth Phone Number
12741 Dashboard. It is a Ruby Client library for IRIS / BBS API.")
12742 (license license:expat)))
12743
12744 (define-public ruby-sentry-core
12745 (package
12746 (name "ruby-sentry-core")
12747 (version "5.3.1")
12748 (source
12749 (origin
12750 (method url-fetch)
12751 (uri (rubygems-uri "sentry-ruby-core" version))
12752 (sha256
12753 (base32 "141mrw8wghhsjvln9m6ld3hap3xc5v901jjiz007xywy25725hyd"))))
12754 (build-system ruby-build-system)
12755 (arguments
12756 ;; No rakefile in gem.
12757 `(#:tests? #f))
12758 (propagated-inputs
12759 (list ruby-concurrent
12760 ruby-faraday))
12761 (home-page "https://sentry.io/for/ruby/")
12762 (synopsis "Client interface for the Sentry error logger")
12763 (description "Sentry-Core provides a gem that provides a client
12764 interface for the Sentry error logger.")
12765 (license license:expat)))
12766
12767 (define-public ruby-sentry
12768 (package
12769 (name "ruby-sentry")
12770 (version "5.3.1")
12771 (source
12772 (origin
12773 (method url-fetch)
12774 (uri (rubygems-uri "sentry-ruby" version))
12775 (sha256
12776 (base32 "0by9mvw8rklzpyx59vfija8h3ssfvxvf5nbqxfmygfy6lm1vdngz"))))
12777 (build-system ruby-build-system)
12778 (arguments
12779 ;; No rakefile in gem
12780 `(#:tests? #f))
12781 (propagated-inputs
12782 (list ruby-concurrent
12783 ruby-faraday
12784 ruby-sentry-core))
12785 (home-page "https://sentry.io/for/ruby/")
12786 (synopsis "Client interface for the Sentry error logger")
12787 (description "Sentry provides a gem that provides a client
12788 interface for the Sentry error logger.")
12789 (license license:expat)))
12790
12791 (define-public ruby-webrick
12792 (package
12793 (name "ruby-webrick")
12794 (version "1.7.0")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (rubygems-uri "webrick" version))
12799 (sha256
12800 (base32 "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"))))
12801 (build-system ruby-build-system)
12802 (home-page "https://github.com/ruby/webrick")
12803 (synopsis "HTTP server toolkit")
12804 (description "WEBrick is an HTTP server toolkit that can be configured as an
12805 HTTPS server, a proxy server, and a virtual-host server.")
12806 (license license:bsd-2)))
12807
12808 (define-public ruby-interception
12809 (package
12810 (name "ruby-interception")
12811 (version "0.5")
12812 (source
12813 (origin
12814 (method url-fetch)
12815 (uri (rubygems-uri "interception" version))
12816 (sha256
12817 (base32 "01vrkn28psdx1ysh5js3hn17nfp1nvvv46wc1pwqsakm6vb1hf55"))))
12818 (build-system ruby-build-system)
12819 (native-inputs (list ruby-rspec))
12820 (home-page "https://github.com/ConradIrwin/interception")
12821 (synopsis "Listen to raise in Ruby")
12822 (description "Interception provides a cross-platform ability to intercept all
12823 exceptions as they are raised.")
12824 (license license:expat)))
12825
12826 (define-public ruby-pry-rescue
12827 (package
12828 (name "ruby-pry-rescue")
12829 (version "1.5.2")
12830 (source
12831 (origin
12832 (method url-fetch)
12833 (uri (rubygems-uri "pry-rescue" version))
12834 (sha256
12835 (base32 "1wn72y8y3d3g0ng350ld92nyjln012432q2z2iy9lhwzjc4dwi65"))))
12836 (build-system ruby-build-system)
12837 (arguments
12838 `(#:phases
12839 (modify-phases %standard-phases
12840 (add-after 'unpack 'nuke-bad-test
12841 (lambda _
12842 (substitute* "spec/source_location_spec.rb"
12843 (("time = Time.now") "skip")))))))
12844 (native-inputs
12845 (list ruby-rspec
12846 ruby-pry-stack-explorer))
12847 (propagated-inputs
12848 (list ruby-interception
12849 ruby-pry))
12850 (home-page
12851 "https://github.com/ConradIrwin/pry-rescue")
12852 (synopsis "Start Pry session for rescue")
12853 (description "Pry-Rescue allows you to wrap code, to open a pry session at
12854 any unhandled exceptions.")
12855 (license license:expat)))
12856
12857 (define-public ruby-braintree
12858 (package
12859 (name "ruby-braintree")
12860 (version "4.7.0")
12861 (source
12862 (origin
12863 (method git-fetch)
12864 ;; Download from GitHub because the rubygems version does not contain
12865 ;; Rakefile.
12866 (uri (git-reference
12867 (url "https://github.com/braintree/braintree_ruby")
12868 (commit version)))
12869 (file-name (git-file-name name version))
12870 (sha256
12871 (base32 "1gixqf9vsjsyrk45lf9xcz0ggdydpgsk8ahknd27bbigz1j4pdf6"))))
12872 (build-system ruby-build-system)
12873 (arguments
12874 `(#:test-target "test:unit"
12875 #:phases
12876 (modify-phases %standard-phases
12877 (add-after 'unpack 'less-strict-dependencies
12878 (lambda _
12879 (substitute* "Gemfile"
12880 (("gem \"libxml-ruby\", \"3.2.0\"")
12881 "gem \"libxml-ruby\", \"~> 3.0.0\"")
12882 (("gem \"rspec\", \"3.9.0\"")
12883 "gem \"rspec\", \"~> 3.8.0\"")
12884 (("gem \"rubocop\", \"~>1.12.0\"")
12885 "gem \"rubocop\", \"~> 1.10.0\"")))))))
12886 (native-inputs
12887 (list ruby-libxml
12888 ruby-pry
12889 ruby-rake
12890 ruby-rspec
12891 ruby-rubocop
12892 ruby-webrick))
12893 (propagated-inputs
12894 (list ruby-builder
12895 ruby-rexml))
12896 (home-page "https://www.braintreepayments.com/")
12897 (synopsis "Integration access to the Braintree Gateway")
12898 (description "Braintree provides resources and tools for developers to
12899 integrate Braintree's global payments platform.")
12900 (license license:expat)))
12901
12902 (define-public ruby-niceogiri
12903 (package
12904 (name "ruby-niceogiri")
12905 (version "1.1.2")
12906 (source
12907 (origin
12908 (method url-fetch)
12909 (uri (rubygems-uri "niceogiri" version))
12910 (sha256
12911 (base32 "1ha93211bc9cvh23s9w89zz7rq8irpf64ccd9arvg8v1sxg2798a"))))
12912 (build-system ruby-build-system)
12913 (arguments
12914 `(#:test-target "spec"
12915 #:phases
12916 (modify-phases %standard-phases
12917 (add-after 'extract-gemspec 'less-strict-dependencies
12918 (lambda _
12919 (substitute* "niceogiri.gemspec"
12920 (("2\\.7") "3.8") ;rspec
12921 ((".*dependency.*bundler.*") "\n")
12922 ((".*dependency.*guard-rspec.*") "\n")))))))
12923 (native-inputs
12924 (list ruby-rspec
12925 ruby-yard))
12926 (propagated-inputs (list ruby-nokogiri))
12927 (home-page "https://github.com/benlangfeld/Niceogiri")
12928 (synopsis "Supplement for Nokogiri")
12929 (description "Niceogiri provides wrappers and helpers for XML manipulation
12930 using Nokogiri.")
12931 (license license:expat)))
12932
12933 (define-public ruby-blather
12934 (package
12935 (name "ruby-blather")
12936 (version "2.0.0")
12937 (source
12938 (origin
12939 (method url-fetch)
12940 (uri (rubygems-uri "blather" version))
12941 (sha256
12942 (base32 "05ry2x835fj4pzk61282pcz86n018cr39zbgwbi213md74i90s7c"))))
12943 (build-system ruby-build-system)
12944 (arguments
12945 ;; XXX: Tests require too old version of rspec.
12946 `(#:tests? #f))
12947 (native-inputs
12948 (list ruby-countdownlatch
12949 ruby-mocha
12950 ruby-rb-fsevent
12951 ruby-rspec
12952 ruby-yard))
12953 (propagated-inputs
12954 (list ruby-activesupport
12955 ruby-eventmachine
12956 ruby-niceogiri
12957 ruby-nokogiri
12958 ruby-sucker-punch))
12959 (home-page "https://github.com/adhearsion/blather")
12960 (synopsis "XMPP Domain Specific Language for Ruby")
12961 (description "Blather is a XMPP DSL for Ruby written on top of EventMachine
12962 and Nokogiri.")
12963 (license license:expat)))
12964
12965 (define-public ruby-wapiti
12966 (package
12967 (name "ruby-wapiti")
12968 (version "2.0.0")
12969 ;; the gem archive lacks tests
12970 (source (origin
12971 (method git-fetch)
12972 (uri (git-reference
12973 (url "https://github.com/inukshuk/wapiti-ruby")
12974 (commit version)))
12975 (file-name (git-file-name name version))
12976 (sha256
12977 (base32
12978 "1kawqw45j7mqk5zmwbn67x1vxiapdgm2ypqqz2bs9l5s7nglzr5b"))))
12979 (build-system ruby-build-system)
12980 (propagated-inputs
12981 (list ruby-builder
12982 ruby-rexml))
12983 (native-inputs
12984 (list ruby-byebug
12985 ruby-pry
12986 ruby-rake-compiler
12987 ruby-rspec
12988 ruby-simplecov))
12989 (arguments
12990 (list
12991 #:test-target "spec"
12992 #:phases
12993 #~(modify-phases %standard-phases
12994 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
12995 (lambda args
12996 (substitute* "wapiti.gemspec"
12997 (("`git ls-files spec`")
12998 "`find spec -type f | sort`"))))
12999 (add-before 'build 'compile
13000 (lambda args
13001 (invoke "rake" "compile"))))))
13002 (home-page "https://github.com/inukshuk/wapiti-ruby")
13003 (synopsis "Wicked fast Conditional Random Fields for Ruby")
13004 (description
13005 "The Wapiti-Ruby gem provides a wicked fast linear-chain @acronym{CRF,
13006 Conditional Random Fields} API for sequence segmentation and labelling. It is
13007 based on the codebase of @url{https://wapiti.limsi.fr, Wapiti}.")
13008 (license license:bsd-2)))
13009
13010 (define-public ruby-namae
13011 (package
13012 (name "ruby-namae")
13013 (version "1.1.1")
13014 (source (origin
13015 (method url-fetch)
13016 (uri (rubygems-uri "namae" version))
13017 (sha256
13018 (base32
13019 "1j3nl1klkx3gymrdxfc1hlq4a8qlvhhl9aj5v1v08b9fz27sky0l"))))
13020 (build-system ruby-build-system)
13021 (native-inputs
13022 (list ruby-cucumber
13023 ruby-rspec
13024 ruby-simplecov))
13025 (arguments
13026 (list
13027 #:phases
13028 #~(modify-phases %standard-phases
13029 (add-after 'extract-gemspec 'allow-newer-cucumber
13030 (lambda args
13031 (substitute* "Gemfile"
13032 (("'cucumber', '[^']*'")
13033 "'cucumber'"))))
13034 (replace 'check
13035 ;; Avoid 'rake' so we don't need jeweler.
13036 (lambda* (#:key tests? #:allow-other-keys)
13037 (when tests?
13038 (apply invoke
13039 "rspec"
13040 (find-files "spec" "_spec\\.rb$"))))))))
13041 (home-page "https://github.com/berkmancenter/namae")
13042 (synopsis "Parser for human names")
13043 (description
13044 "Namae (名前) is a parser for human names. It recognizes personal names
13045 of various cultural backgrounds and tries to split them into their component
13046 parts (e.g., given and family names, honorifics etc.).")
13047 (license (list license:bsd-2 license:agpl3+))))
13048
13049 (define-public ruby-ritex
13050 (package
13051 (name "ruby-ritex")
13052 (version "1.0.1")
13053 (source (origin
13054 (method url-fetch)
13055 (uri (rubygems-uri "ritex" version))
13056 (sha256
13057 (base32
13058 "07rlm3nyz9sxzy1srxs6a31hw81r6w7swrb85fiwi393z8npwc3a"))))
13059 (build-system ruby-build-system)
13060 (native-inputs
13061 (list itex2mml))
13062 (arguments
13063 ;; thanks to the Gentoo packagers for figuring this out
13064 (list
13065 #:phases
13066 #~(modify-phases %standard-phases
13067 (add-after 'extract-gemspec 'fix-tests
13068 (lambda* (#:key native-inputs inputs #:allow-other-keys)
13069 (substitute* "test/mathml.rb"
13070 (("\\./itex2MML")
13071 ;; don't use the absolute path to avoid keeping a reference
13072 "itex2MML")
13073 (("cmp ',\\\\,\\\\,,,\\\\,'" orig)
13074 (string-append "# " orig " # patched for Guix")))
13075 (substitute* "test/answer-key.yaml"
13076 (("- ,\\\\,\\\\,,,\\\\," orig)
13077 (string-append "# " orig " # patched for Guix")))))
13078 (replace 'check
13079 (lambda* (#:key tests? #:allow-other-keys)
13080 (when tests?
13081 (invoke "ruby" "-Ilib:." "test/all.rb")))))))
13082 (home-page "https://rubygems.org/gems/ritex")
13083 (synopsis "Convert expressions from WebTeX into MathML")
13084 (description
13085 "Ritex converts expressions from WebTeX into MathML. WebTeX is an
13086 adaptation of TeX math syntax for web display. Ritex makes inserting math
13087 into HTML pages easy. It supports most TeX math syntax as well as macros.")
13088 ;; doesn't clearly state -only vs -or-later
13089 (license license:gpl2)))
13090
13091 (define-public ruby-latex-decode
13092 (package
13093 (name "ruby-latex-decode")
13094 (version "0.4.0")
13095 (source (origin
13096 (method git-fetch)
13097 (uri (git-reference
13098 (url "https://github.com/inukshuk/latex-decode")
13099 (commit (string-append "v" version))))
13100 (sha256
13101 (base32
13102 "1f5j67ayd04pjkmzvn0hk7cr8yqvn0gyg9ns6a0vhzj2gwna9ihy"))
13103 (file-name (git-file-name name version))))
13104 (build-system ruby-build-system)
13105 (native-inputs
13106 (list ruby-cucumber
13107 ruby-ritex
13108 ruby-rspec))
13109 (arguments
13110 (list
13111 #:test-target "cucumber"
13112 #:phases
13113 #~(modify-phases %standard-phases
13114 (add-after 'extract-gemspec 'avoid-bundler
13115 (lambda args
13116 (substitute* "Rakefile"
13117 (("require 'bundler" orig)
13118 (string-append "# " orig " # patched for Guix"))
13119 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
13120 (string-append orig " do |c|\n"
13121 " c.bundler = false # patched for Guix\n"
13122 "end"))
13123 (("Bundler\\.setup" orig)
13124 (string-append "true # " orig " # patched for Guix")))
13125 (substitute* "cucumber.yml"
13126 ;; thanks to avoiding bundler, we can't use this option
13127 ((" --publish-quiet")
13128 ""))))
13129 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
13130 (lambda args
13131 (substitute* "latex-decode.gemspec"
13132 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
13133 "`find {test,spec,features} -type f | sort`")))))))
13134 (home-page "https://github.com/inukshuk/latex-decode")
13135 (synopsis "Convert LaTeX to Unicode")
13136 (description
13137 "This package provides a gem to convert LaTeX input to Unicode. Its
13138 original use was as an input filter for BibTeX-Ruby, but it can be used
13139 independently to decode LaTeX. Many of the patterns used by this Ruby gem are
13140 based on François Charette's equivalent Perl module @code{LaTeX::Decode}.")
13141 (license license:gpl3+)))
13142
13143 (define-public ruby-link-header
13144 (package
13145 (name "ruby-link-header")
13146 (version "0.0.8")
13147 (source (origin
13148 (method url-fetch)
13149 (uri (rubygems-uri "link_header" version))
13150 (sha256
13151 (base32
13152 "1yamrdq4rywmnpdhbygnkkl9fdy249fg5r851nrkkxr97gj5rihm"))))
13153 (build-system ruby-build-system)
13154 (home-page "https://github.com/asplake/link_header")
13155 (synopsis "Parse and format HTTP @code{Link} headers")
13156 (description
13157 "This gem provides the classes @code{LinkHeader} and
13158 @code{LinkHeader::Link}, which represent HTTP @code{Link} headers conforming
13159 to RFC 5988. Objects can be constructed from and converted to text or a
13160 JSON-friendly @code{Array} representation. They can also be used to generate
13161 corresponding HTML @code{link} elements.")
13162 (license license:expat)))
13163
13164 (define-public ruby-rdf
13165 (package
13166 (name "ruby-rdf")
13167 (version "3.2.8")
13168 (source (origin
13169 (method url-fetch)
13170 (uri (rubygems-uri "rdf" version))
13171 (sha256
13172 (base32
13173 "1cj0k8ryd8hgbkgqb5swvy6fiygxny3y5bln0my5gv6dbfv3gm20"))))
13174 (build-system ruby-build-system)
13175 (propagated-inputs (list ruby-link-header))
13176 (arguments
13177 (list #:tests? #f)) ;; tests have many cyclic dependencies
13178 (home-page "https://ruby-rdf.github.io/")
13179 (synopsis "Linked Data for Ruby")
13180 (description
13181 "This gem contains the core algorithms and classes used for doing basic
13182 programming with @acronym{RDF, Resource Description Framework} data,
13183 implemented in pure Ruby.")
13184 (license license:unlicense)))
13185
13186 (define-public ruby-rdf-vocab
13187 (package
13188 (name "ruby-rdf-vocab")
13189 (version "3.2.1")
13190 (source (origin
13191 (method url-fetch)
13192 (uri (rubygems-uri "rdf-vocab" version))
13193 (sha256
13194 (base32
13195 "1bqmp9rfjvd56ajjz68ij6jla1wjf1fqg7bi4dpnjrsmn4pwaq7l"))))
13196 (build-system ruby-build-system)
13197 (propagated-inputs
13198 (list ruby-rdf))
13199 (arguments
13200 (list #:tests? #f)) ;; tests have many cyclic dependencies
13201 (home-page "https://github.com/ruby-rdf/rdf-vocab")
13202 (synopsis "Common RDF vocabularies")
13203 (description
13204 "This gem extends @code{ruby-rdf} with several common @acronym{RDF,
13205 Resource Description Framework} vocabularies.")
13206 (license license:unlicense)))
13207
13208 (define-public ruby-bibtex-ruby
13209 (package
13210 (name "ruby-bibtex-ruby")
13211 (version "6.0.0")
13212 (source (origin
13213 (method url-fetch)
13214 (uri (rubygems-uri "bibtex-ruby" version))
13215 (sha256
13216 (base32
13217 "0vynqa8q9hwghw6sdljr304b5gh11nqzy5nwqqwxmgy7pqyf7qw5"))))
13218 (build-system ruby-build-system)
13219 (propagated-inputs
13220 (list ruby-latex-decode
13221 ruby-rdf
13222 ruby-rdf-vocab))
13223 (native-inputs
13224 (list ruby-byebug
13225 ruby-cucumber
13226 ruby-minitest
13227 ruby-yard))
13228 (arguments
13229 (list
13230 #:phases
13231 #~(modify-phases %standard-phases
13232 (add-after 'extract-gemspec 'avoid-bundler
13233 (lambda args
13234 (substitute* "Rakefile"
13235 (("require 'bundler" orig)
13236 (string-append "# " orig " # patched for Guix"))
13237 (("Bundler\\.setup" orig)
13238 (string-append "true # " orig " # patched for Guix"))))))))
13239 (home-page "https://github.com/inukshuk/bibtex-ruby")
13240 (synopsis "Rubyist's Swiss Army knife for all things BibTeX")
13241 (description
13242 "BibTeX-Ruby is the Rubyist's Swiss Army knife for all things BibTeX.
13243 It includes a parser for all common BibTeX objects and a sophisticated name
13244 parser that tokenizes correctly formatted names. BibTeX-Ruby recognizes
13245 BibTeX string replacements, joins values containing multiple strings or
13246 variables, supports cross-references, and decodes common LaTeX formatting
13247 instructions to unicode. If you are in a hurry, it also allows for easy
13248 export/conversion to formats such as YAML, JSON, CSL, and XML (BibTeXML).")
13249 (license license:gpl3+)))
13250
13251 (define-public ruby-unicode-scripts
13252 (package
13253 (name "ruby-unicode-scripts")
13254 (version "1.7.0")
13255 (source (origin
13256 (method url-fetch)
13257 (uri (rubygems-uri "unicode-scripts" version))
13258 (sha256
13259 (base32
13260 "1k7kbfk806zam129bp7pdiqkfb5hn51x149irzvjhs4xf22m4yvi"))))
13261 (build-system ruby-build-system)
13262 (native-inputs
13263 (list ruby-minitest))
13264 (arguments
13265 (list #:test-target "spec"))
13266 (home-page "https://github.com/janlelis/unicode-scripts")
13267 (synopsis "Unicode script classification library")
13268 (description
13269 "This gem provides a simple interface for classifying Ruby strings using
13270 the Unicode @code{Script} and @code{Script_Extensions} properties.")
13271 (license license:expat)))
13272
13273 (define-public ruby-citeproc
13274 (package
13275 (name "ruby-citeproc")
13276 (version "1.0.10")
13277 (source (origin
13278 (method url-fetch)
13279 (uri (rubygems-uri "citeproc" version))
13280 (sha256
13281 (base32
13282 "13vl5sjmksk5a8kjcqnjxh7kn9gn1n4f9p1rvqfgsfhs54p0m6l2"))))
13283 (build-system ruby-build-system)
13284 (propagated-inputs
13285 (list ruby-namae))
13286 (arguments
13287 (list #:tests? #f)) ;; tests have a cyclic dependency
13288 (home-page "https://github.com/inukshuk/citeproc")
13289 (synopsis "Interface for Ruby citation processors")
13290 (description
13291 "CiteProc is a citation processor interface and citation data API based
13292 on the @acronym{CSL, Citation Style Language} specifications. To actually
13293 process citations, a dedicated processor engine is required: a pure Ruby
13294 engine is available in the @code{citeproc-ruby} gem.")
13295 (license (list license:agpl3+ license:bsd-2))))
13296
13297 (define-public ruby-edtf
13298 (package
13299 (name "ruby-edtf")
13300 (version "3.1.0")
13301 (source (origin
13302 (method git-fetch)
13303 (uri (git-reference
13304 (url "https://github.com/inukshuk/edtf-ruby")
13305 (commit (string-append "v" version))))
13306 (sha256
13307 (base32
13308 "18j8xq8zmrn41cs2gpd1i87agi9905asvnjqndky2cqb5zg3q14g"))
13309 (snippet
13310 ;; remove generated file
13311 #~(delete-file "lib/edtf/parser.rb"))
13312 (file-name (git-file-name name version))))
13313 (build-system ruby-build-system)
13314 (propagated-inputs
13315 (list ruby-activesupport))
13316 (native-inputs
13317 (list ruby-cucumber
13318 ruby-rspec))
13319 (arguments
13320 (list
13321 #:phases
13322 #~(modify-phases %standard-phases
13323 (add-after 'extract-gemspec 'avoid-bundler
13324 (lambda args
13325 (substitute* "Rakefile"
13326 (("require 'bundler" orig)
13327 (string-append "# " orig " # patched for Guix"))
13328 (("bundle exec racc")
13329 "racc")
13330 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
13331 (string-append orig " do |c|\n"
13332 " c.bundler = false # patched for Guix\n"
13333 "end"))
13334 (("Bundler\\.setup" orig)
13335 (string-append "true # " orig " # patched for Guix")))))
13336 (add-after 'avoid-bundler 'patch-cucumber-options
13337 (lambda args
13338 (substitute* "cucumber.yml"
13339 ;; this option is not supported, at least in our configuration
13340 ((" --publish-quiet")
13341 ""))))
13342 (add-before 'build 'compile
13343 (lambda args
13344 (invoke "rake" "racc")))
13345 (replace 'check
13346 (lambda* (#:key tests? #:allow-other-keys)
13347 (when tests?
13348 (invoke "rake")))))))
13349 (home-page "https://github.com/inukshuk/edtf-ruby")
13350 (synopsis "Ruby implementation of Extended Date/Time Format")
13351 (description
13352 "EDTF-Ruby provides a parser and an API for the @acronym{EDTF, Extended
13353 Date/Time Format} standard, implemented as an extension to Ruby's @code{Date}
13354 class.")
13355 (license license:bsd-2)))
13356
13357 (define-public ruby-gli
13358 (package
13359 (name "ruby-gli")
13360 (version "2.21.0")
13361 (source (origin
13362 (method git-fetch)
13363 (uri (git-reference
13364 (url "https://github.com/davetron5000/gli")
13365 (commit (string-append "v" version))))
13366 (sha256
13367 (base32
13368 "09b1r9hlx4dy2yq036nk7hc2nbswhia6q3na9v11z94yibc8mgja"))
13369 (file-name (git-file-name name version))))
13370 (build-system ruby-build-system)
13371 (native-inputs
13372 (list ruby-minitest
13373 ruby-rainbow
13374 ruby-rdoc
13375 ruby-sdoc))
13376 (arguments
13377 (list
13378 #:phases
13379 #~(modify-phases %standard-phases
13380 (add-after 'extract-gemspec 'patch-gemspec-version
13381 (lambda args
13382 (substitute* "gli.gemspec"
13383 ;; this trick fails in our build environment
13384 (("require File\\.join[(]\\[" orig)
13385 (string-append "# patched for Guix # " orig))
13386 (("s\\.version = GLI::VERSION")
13387 #$(string-append "s.version = '"
13388 (package-version this-package)
13389 "' # patched for Guix")))))
13390 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
13391 (lambda args
13392 (substitute* "gli.gemspec"
13393 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
13394 "`find {test,spec,features} -type f | sort`"))))
13395 (add-after 'replace-another-git-ls-files 'fix-rubyopt
13396 (lambda args
13397 (substitute* "Rakefile"
13398 (("ENV\\[\"RUBYOPT\"]")
13399 "(ENV['RUBYOPT'] || '')")))))))
13400 (home-page "https://davetron5000.github.io/gli/")
13401 (synopsis "Git-Like Interface command-line parser")
13402 (description
13403 "GLI allows you to create command-line applications in Ruby with Git-Like
13404 Interfaces: that is, they take subcommands in the style of @command{git} and
13405 @command{gem}. GLI uses a simple domain-specific language, but retains all
13406 the power of the built-in @code{OptionParser}.")
13407 (license license:asl2.0)))
13408
13409 (define-public ruby-anystyle-data
13410 (package
13411 (name "ruby-anystyle-data")
13412 (version "1.2.0")
13413 (source (origin
13414 (method git-fetch)
13415 (uri (git-reference
13416 (url "https://github.com/inukshuk/anystyle-data")
13417 (commit version)))
13418 (sha256
13419 (base32
13420 "025mxa7r9d7izqn6bc1wr40ijp64da0jh211prlpjl6svilgd6rm"))
13421 (snippet
13422 ;; remove pre-built file
13423 #~(delete-file "lib/anystyle/data/dict.txt.gz"))
13424 (patches
13425 (search-patches "ruby-anystyle-data-immutable-install.patch"))
13426 (file-name (git-file-name name version))))
13427 (build-system ruby-build-system)
13428 (arguments
13429 (list
13430 #:tests? #f ;; there are none
13431 #:modules
13432 `((guix build ruby-build-system)
13433 (guix build utils)
13434 (srfi srfi-26))
13435 #:phases
13436 #~(modify-phases %standard-phases
13437 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
13438 (lambda args
13439 (substitute* "anystyle-data.gemspec"
13440 (("`git ls-files lib README\\.md LICENSE`\\.split[(][^)]*[)]")
13441 (string-append
13442 "["
13443 (string-join
13444 (map (cut string-append "\"" <> "\"")
13445 `("README.md"
13446 "LICENSE"
13447 "lib/anystyle/data.rb"
13448 "lib/anystyle/data/dict.txt.gz"
13449 "lib/anystyle/data/setup.rb"
13450 "lib/anystyle/data/version.rb"))
13451 ", ")
13452 "]")))))
13453 (add-before 'build 'compile-dict
13454 (lambda args
13455 (invoke "rake" "compile"))))))
13456 (home-page "https://anystyle.io")
13457 (synopsis "AnyStyle parser dictionary data")
13458 (description
13459 "This gem provides parser dictionary data for AnyStyle.")
13460 (license license:bsd-2)))
13461
13462 (define-public ruby-anystyle
13463 (let ((commit "50f1dd547d28ab4b830e45d70e840cb1898a37b0")
13464 (revision "1"))
13465 ;; Releases point to specific commits, but recent releases haven't been
13466 ;; tagged in Git. Meanwhile, the rubygems archive lacks tests.
13467 (package
13468 (name "ruby-anystyle")
13469 (version (git-version "1.3.14" revision commit))
13470 (source (origin
13471 (method git-fetch)
13472 (uri (git-reference
13473 (url "https://github.com/inukshuk/anystyle")
13474 (commit commit)))
13475 (sha256
13476 (base32
13477 "0f4qcrywl1kl6qysn24lj3yp85ln4i7za7b7ld2fglyzwcggxwb0"))
13478 (snippet
13479 ;; There is an optional dependency on
13480 ;; <https://github.com/feedbackmine/language_detector>, which
13481 ;; seems like it was intended to be free software, but
13482 ;; doesn't have a clear license statement. Maybe someone can
13483 ;; do more sleuthing, or else find a replacement? See also
13484 ;; <https://github.com/inukshuk/anystyle/issues/186>. For
13485 ;; now, patch it out, but leave a pointer to follow up.
13486 #~(begin
13487 (use-modules (guix build utils))
13488 (substitute* "Gemfile"
13489 (("gem 'language_detector', github: '[^']*'" orig)
13490 (string-append "# " orig " # unclear license")))
13491 (substitute* "spec/anystyle/parser_spec.rb"
13492 (("language: 'en'," orig)
13493 (string-append "# " orig " # no lanugage_detector")))))
13494 (patches
13495 (search-patches
13496 "ruby-anystyle-fix-dictionary-populate.patch"))
13497 (file-name (git-file-name name version))))
13498 (build-system ruby-build-system)
13499 (propagated-inputs
13500 (list ruby-anystyle-data
13501 ruby-bibtex-ruby
13502 ruby-namae
13503 ruby-wapiti))
13504 (native-inputs
13505 (list ruby-byebug
13506 ruby-citeproc
13507 ruby-edtf
13508 ruby-rspec
13509 ruby-unicode-scripts))
13510 (arguments
13511 (list
13512 #:test-target "spec"
13513 #:phases
13514 #~(modify-phases %standard-phases
13515 (add-after 'extract-gemspec 'avoid-bundler
13516 (lambda args
13517 (substitute* "Rakefile"
13518 (("require 'bundler" orig)
13519 (string-append "# " orig " # patched for Guix"))
13520 (("Bundler\\.setup" orig)
13521 (string-append "true # " orig " # patched for Guix")))))
13522 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
13523 (lambda args
13524 (substitute* "anystyle.gemspec"
13525 (("`git ls-files spec`")
13526 "`find spec -type f | sort`"))))
13527 (add-after 'wrap 'populate-dictionaries
13528 (lambda args
13529 ;; We must initiallize these files here, or they will never be
13530 ;; usable with the default settings. A more flexible approach
13531 ;; might use something like `Gem.find_files()` or
13532 ;; XDG_DATA_DIRS.
13533 (with-output-to-file "initialize-dictionaries.rb"
13534 (lambda ()
13535 (display "
13536 require 'anystyle/dictionary' # must come before 'anystyle/data'
13537 require 'anystyle/data'
13538 [:marshal, :gdbm].each do |adapter|
13539 AnyStyle::Dictionary.create({adapter: adapter}).open().close()
13540 end
13541 ")))
13542 (let* ((old-gems (getenv "GEM_PATH"))
13543 (new-gems (string-append #$output
13544 "/lib/ruby/vendor_ruby:"
13545 old-gems)))
13546 (dynamic-wind
13547 (lambda ()
13548 (setenv "GEM_PATH" new-gems))
13549 (lambda ()
13550 (invoke "ruby" "initialize-dictionaries.rb"))
13551 (lambda ()
13552 (setenv "GEM_PATH" old-gems)))))))))
13553 (home-page "https://anystyle.io")
13554 (synopsis "Fast and smart citation reference parsing (Ruby library)")
13555 (description
13556 "AnyStyle is a very fast and smart parser for academic reference lists
13557 and bibliographies. AnyStyle uses powerful machine learning heuristics based
13558 on Conditional Random Fields and aims to make it easy to train the model with
13559 data that is relevant to your parsing needs.
13560
13561 This package provides the Ruby module @code{AnyStyle}. AnyStyle can also be
13562 used via the @command{anystyle} command-line utility or a web application,
13563 though the later has not yet been packaged for Guix.")
13564 (license license:bsd-2))))
13565
13566 (define-public anystyle
13567 (package
13568 (name "anystyle")
13569 (version "1.3.1")
13570 (source (origin
13571 (method git-fetch)
13572 (uri (git-reference
13573 (url "https://github.com/inukshuk/anystyle-cli")
13574 (commit version)))
13575 (sha256
13576 (base32
13577 "1bazzms04cra8516q7vydmcm31yd0a7si1pxk4waffqy7lh0pksg"))
13578 (file-name (git-file-name name version))))
13579 (build-system ruby-build-system)
13580 (propagated-inputs
13581 (list ruby-anystyle
13582 ruby-bibtex-ruby
13583 ruby-gli))
13584 (native-inputs
13585 (list txt2man))
13586 (arguments
13587 (list
13588 #:modules
13589 `((guix build ruby-build-system)
13590 (ice-9 popen)
13591 (srfi srfi-1)
13592 (guix build utils))
13593 #:phases
13594 #~(modify-phases %standard-phases
13595 (add-after 'extract-gemspec 'less-strict-dependencies
13596 (lambda args
13597 (substitute* "anystyle-cli.gemspec"
13598 (("'bibtex-ruby', '[^']*'")
13599 "'bibtex-ruby'"))))
13600 (add-before 'build 'change-default-dictionary-adapter
13601 (lambda args
13602 ;; Since we always have gdbm available, using it will give a
13603 ;; faster startup time, which is particularly worth-while for
13604 ;; a command-line tool.
13605 (substitute* "bin/anystyle"
13606 (("default_value: 'ruby',")
13607 "default_value: 'gdbm', # patched for Guix"))))
13608 (replace 'check
13609 (lambda* (#:key tests? #:allow-other-keys)
13610 ;; There are no tests, but let's use this opportunity to do a
13611 ;; basic test of our own that things run ok. It works especially
13612 ;; well to test this here since we know the 'ruby-anystile'
13613 ;; package is in its final, immutable installed form.
13614 (when tests?
13615 (let ((common
13616 `("require 'anystyle'"
13617 ,(string-append
13618 "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture"
13619 " et la différence (1 éd.). Paris: Éditions du"
13620 " Seuil.'"))))
13621 (for-each
13622 (lambda (lines)
13623 (apply invoke "ruby"
13624 (fold-right (lambda (line lst)
13625 (cons* "-e" line lst))
13626 '()
13627 lines)))
13628 `(,common
13629 ("require 'anystyle/dictionary'"
13630 "AnyStyle::Dictionary.defaults[:adapter] = :gdbm"
13631 ,@common)))))))
13632 (add-after 'wrap 'check-cli
13633 (lambda* (#:key tests? outputs #:allow-other-keys)
13634 (when tests?
13635 (with-output-to-file "check-cli.in"
13636 (lambda ()
13637 (for-each
13638 display
13639 '("Derrida, J. (1967). L’écriture et la différence "
13640 "(1 éd.). Paris: Éditions du Seuil.\n"))))
13641 (invoke (search-input-file outputs "/bin/anystyle")
13642 "parse"
13643 "check-cli.in"))))
13644 (add-after 'wrap 'generate-man-page
13645 ;; generating a man page also tests that the command actually runs
13646 (lambda args
13647 (define (run-with-output-file file command . args)
13648 (format (current-output-port)
13649 "running: ~s\nwith output to: ~s\n"
13650 (cons command args)
13651 file)
13652 (unless (zero?
13653 (with-output-to-file file
13654 (lambda ()
13655 (status:exit-val
13656 (close-pipe
13657 (apply open-pipe* OPEN_WRITE command args))))))
13658 (error "command failed")))
13659 (let ((anystyle (string-append #$output "/bin/anystyle")))
13660 (run-with-output-file "intro.txt"
13661 anystyle "--help")
13662 (for-each (lambda (cmd)
13663 (let ((file (string-append cmd ".txt")))
13664 (run-with-output-file file
13665 anystyle cmd "--help")
13666 ;; indent headings to create subsections
13667 (substitute* file
13668 (("^[A-Z]" orig)
13669 (string-append " " orig)))
13670 ;; generate a section heading
13671 (call-with-output-file
13672 (string-append "section-" file)
13673 (lambda (out)
13674 (format out "\n\n~a COMMAND\n\n"
13675 (string-upcase cmd))))))
13676 '("check" "find" "parse" "train"))
13677 (substitute* `("intro.txt"
13678 "check.txt" "find.txt" "parse.txt" "train.txt")
13679 ;; format "tag list" for txt2man"
13680 ((" - ")
13681 " ")
13682 ;; restore formatting of the "name" sections
13683 (("(anystyle|check|find|parse|train) ([A-Z])" _ cmd post)
13684 (string-append cmd " - " post)))
13685 (run-with-output-file "anystyle.txt"
13686 "cat"
13687 "intro.txt"
13688 "section-check.txt" "check.txt"
13689 "section-find.txt" "find.txt"
13690 "section-parse.txt" "parse.txt"
13691 "section-train.txt" "train.txt")
13692 (run-with-output-file
13693 "anystyle.1"
13694 "txt2man"
13695 "-v" "General Commands Manual" "-t" "anystyle" "-s" "1"
13696 "-r" #$(string-append "anystyle-cli "
13697 (package-version this-package))
13698 "-B" "check" "-B" "find" "-B" "parse" "-B" "train"
13699 "anystyle.txt")
13700 (install-file "anystyle.1"
13701 (string-append #$output "/share/man/man1"))))))))
13702 (home-page "https://anystyle.io")
13703 (synopsis "Fast and smart citation reference parsing")
13704 (description
13705 "AnyStyle is a very fast and smart parser for academic reference lists
13706 and bibliographies. AnyStyle uses powerful machine learning heuristics based
13707 on Conditional Random Fields and aims to make it easy to train the model with
13708 data that is relevant to your parsing needs.
13709
13710 This package provides the @command{anystyle} command-line utility. AnyStyle
13711 can also be used as a Ruby library or as a web application, though the later
13712 has not yet been packaged for Guix.")
13713 (license license:bsd-2)
13714 (properties `((upstream-name . "anystyle-cli")))))