projects/guix·blob wip-postfix · refs

17349 lines · 636.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2015 Pjotr Prins <[email protected]>
3;;; Copyright © 2014-2017, 2021-2022 Ludovic Courtès <[email protected]>
4;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
5;;; Copyright © 2014, 2015 David Thompson <[email protected]>
6;;; Copyright © 2015, 2019 Ricardo Wurmus <[email protected]>
7;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <[email protected]>
8;;; Copyright © 2017 Nikita <[email protected]>
9;;; Copyright © 2017, 2019-2022 Marius Bakke <[email protected]>
10;;; Copyright © 2017-2023 Efraim Flashner <[email protected]>
11;;; Copyright © 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <[email protected]>
12;;; Copyright © 2017 Clément Lassieur <[email protected]>
13;;; Copyright © 2017, 2018, 2019 Christopher Baines <[email protected]>
14;;; Copyright © 2018 Vasile Dumitrascu <[email protected]>
15;;; Copyright © 2018 Alex Vong <[email protected]>
16;;; Copyright © 2019 Pierre Neidhardt <[email protected]>
17;;; Copyright © 2019 Mikhail Kirillov <[email protected]>
18;;; Copyright © 2019 Jelle Licht <[email protected]>
19;;; Copyright © 2019 Brian Leung <[email protected]>
20;;; Copyright © 2019 Collin J. Doering <[email protected]>
21;;; Copyright © 2019 Diego N. Barbato <[email protected]>
22;;; Copyright © 2019 Brett Gilio <[email protected]>
23;;; Copyright © 2020, 2023 Maxim Cournoyer <[email protected]>
24;;; Copyright © 2020, 2021 Nicolas Goaziou <[email protected]>
25;;; Copyright © 2020 Michael Rohleder <[email protected]>
26;;; Copyright © 2020 Holgr Peters <[email protected]>
27;;; Copyright © 2020 Giacomo Leidi <[email protected]>
28;;; Copyright © 2021 EuAndreh <[email protected]>
29;;; Copyright © 2020 Tomás Ortín Fernández <[email protected]>
30;;; Copyright © 2021 Giovanni Biscuolo <[email protected]>
31;;; Copyright © 2022 Philip McGrath <[email protected]>
32;;; Copyright © 2022, 2023 Remco van 't Veer <[email protected]>
33;;; Copyright © 2022 Taiju HIGASHI <[email protected]>
34;;; Copyright © 2023 Yovan Naumovski <[email protected]>
35;;; Copyright © 2023 gemmaro <[email protected]>
36;;; Copyright © 2023 Janneke Nieuwenhuizen <[email protected]>
37;;;
38;;; This file is part of GNU Guix.
39;;;
40;;; GNU Guix is free software; you can redistribute it and/or modify it
41;;; under the terms of the GNU General Public License as published by
42;;; the Free Software Foundation; either version 3 of the License, or (at
43;;; your option) any later version.
44;;;
45;;; GNU Guix is distributed in the hope that it will be useful, but
46;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48;;; GNU General Public License for more details.
49;;;
50;;; You should have received a copy of the GNU General Public License
51;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52
53(define-module (gnu packages ruby)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (gnu packages)
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bison)
58 #:use-module (gnu packages c)
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages crypto)
62 #:use-module (gnu packages curl)
63 #:use-module (gnu packages databases)
64 #:use-module (gnu packages dbm)
65 #:use-module (gnu packages rails)
66 #:use-module (gnu packages readline)
67 #:use-module (gnu packages autotools)
68 #:use-module (gnu packages haskell-xyz)
69 #:use-module (gnu packages java)
70 #:use-module (gnu packages libffi)
71 #:use-module (gnu packages libidn)
72 #:use-module (gnu packages linux)
73 #:use-module (gnu packages lsof)
74 #:use-module (gnu packages man)
75 #:use-module (gnu packages maths)
76 #:use-module (gnu packages ncurses)
77 #:use-module (gnu packages networking)
78 #:use-module (gnu packages node)
79 #:use-module (gnu packages perl)
80 #:use-module (gnu packages protobuf)
81 #:use-module (gnu packages python)
82 #:use-module (gnu packages python-xyz)
83 #:use-module (gnu packages ragel)
84 #:use-module (gnu packages rsync)
85 #:use-module (gnu packages sqlite)
86 #:use-module (gnu packages tls)
87 #:use-module (gnu packages valgrind)
88 #:use-module (gnu packages version-control)
89 #:use-module (gnu packages web-browsers)
90 #:use-module (gnu packages serialization)
91 #:use-module (guix packages)
92 #:use-module (guix deprecation)
93 #:use-module (guix download)
94 #:use-module (guix git-download)
95 #:use-module (guix gexp)
96 #:use-module (guix modules)
97 #:use-module (guix utils)
98 #:use-module (guix build-system gnu)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages web)
101 #:use-module (guix build-system ruby)
102 #:use-module ((srfi srfi-1) #:select (alist-delete)))
103
104(define %prawn-project-licenses
105 ;; This set of licenses applies to most (all?) components of the Prawn
106 ;; project (it is triple licensed).
107 (list license:ruby
108 license:gpl2+
109 license:gpl3+))
110
111(define-public ruby-2.6
112 (package
113 (name "ruby")
114 (version "2.6.10")
115 (source
116 (origin
117 (method url-fetch)
118 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
119 (version-major+minor version)
120 "/ruby-" version ".tar.xz"))
121 (sha256
122 (base32
123 "1wn12klc44hn2nh5v1lkqbdyvljip6qhwjqvkkf8zf112gaxxn2z"))
124 (modules '((guix build utils)))
125 (snippet `(begin
126 ;; Remove bundled libffi
127 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
128 #t))))
129 (build-system gnu-build-system)
130 (arguments
131 `(#:test-target "test"
132 #:configure-flags '("--enable-shared") ; dynamic linking
133 #:phases
134 (modify-phases %standard-phases
135 (add-before 'configure 'replace-bin-sh-and-remove-libffi
136 (lambda _
137 (substitute* '("Makefile.in"
138 "ext/pty/pty.c"
139 "io.c"
140 "lib/mkmf.rb"
141 "process.c"
142 "test/rubygems/test_gem_ext_configure_builder.rb"
143 "test/rdoc/test_rdoc_parser.rb"
144 "test/ruby/test_rubyoptions.rb"
145 "test/ruby/test_process.rb"
146 "test/ruby/test_system.rb"
147 "tool/rbinstall.rb")
148 (("/bin/sh") (which "sh")))
149 #t)))))
150 (inputs
151 (list readline openssl-1.1 libffi gdbm))
152 (propagated-inputs
153 (list zlib))
154 (native-search-paths
155 (list (search-path-specification
156 (variable "GEM_PATH")
157 (files (list (string-append "lib/ruby/vendor_ruby"))))))
158 (synopsis "Programming language interpreter")
159 (description "Ruby is a dynamic object-oriented programming language with
160a focus on simplicity and productivity.")
161 (home-page "https://www.ruby-lang.org")
162 (license license:ruby)))
163
164(define-public ruby-2.7
165 (package
166 (inherit ruby-2.6)
167 (version "2.7.6")
168 (replacement ruby-2.7-fixed) ; security fixes
169 (source
170 (origin
171 (inherit (package-source ruby-2.6))
172 (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
173 (version-major+minor version)
174 "/ruby-" version ".tar.gz"))
175 (sha256
176 (base32
177 "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877"))))
178 (arguments
179 `(#:test-target "test"
180 #:configure-flags '("--enable-shared") ; dynamic linking
181 #:phases
182 (modify-phases %standard-phases
183 (add-before 'configure 'replace-bin-sh-and-remove-libffi
184 (lambda _
185 (substitute* '("configure.ac"
186 "template/Makefile.in"
187 "lib/rubygems/installer.rb"
188 "ext/pty/pty.c"
189 "io.c"
190 "lib/mkmf.rb"
191 "process.c"
192 "test/rubygems/test_gem_ext_configure_builder.rb"
193 "test/rdoc/test_rdoc_parser.rb"
194 "test/ruby/test_rubyoptions.rb"
195 "test/ruby/test_process.rb"
196 "test/ruby/test_system.rb"
197 "tool/rbinstall.rb")
198 (("/bin/sh") (which "sh")))
199 #t))
200 ,@(if (system-hurd?)
201 '((add-after 'unpack 'skip-tests
202 (lambda _
203 (delete-file "bootstraptest/test_io.rb")
204 (delete-file "test/ruby/test_io.rb"))))
205 '()))))
206 (native-inputs
207 (list autoconf))))
208
209(define ruby-2.7-fixed
210 (package
211 (inherit ruby-2.7)
212 (version "2.7.8")
213 (source
214 (origin
215 (inherit (package-source ruby-2.7))
216 (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
217 (version-major+minor version)
218 "/ruby-" version ".tar.gz"))
219 (sha256
220 (base32
221 "182vni66djmiqagwzfsd0za7x9k3zag43b88c590aalgphybdnn2"))))))
222
223(define-public ruby-3.0
224 (package
225 (inherit ruby-2.7)
226 (version "3.0.6")
227 (source
228 (origin
229 (method url-fetch)
230 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
231 (version-major+minor version)
232 "/ruby-" version ".tar.xz"))
233 (sha256
234 (base32
235 "1lfvgm6jbspmwmc3haww83l1l8vl1airzi08ljrcz19dws9yxjxm"))))
236 (inputs
237 (modify-inputs (package-inputs ruby-2.7)
238 (replace "openssl" openssl)))))
239
240(define-public ruby-3.1
241 (package
242 (inherit ruby-3.0)
243 (version "3.1.4")
244 (source
245 (origin
246 (method url-fetch)
247 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
248 (version-major+minor version)
249 "/ruby-" version ".tar.xz"))
250 (sha256
251 (base32
252 "0kzr792rk9n9yrqlyrkc1a0cmbk5y194f7v7p4vwjdk0ww860v8v"))))))
253
254(define-public ruby-3.2
255 (package
256 (inherit ruby-3.1)
257 (version "3.2.2")
258 (source
259 (origin
260 (method url-fetch)
261 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
262 (version-major+minor version)
263 "/ruby-" version ".tar.xz"))
264 (sha256
265 (base32
266 "08wy2ishjwbccfsrd0iwmyadbwjzrpyxnk74wcrf7163gq7jsdab"))))
267 (inputs
268 (modify-inputs (package-inputs ruby-3.1)
269 (prepend libyaml)))))
270
271(define-public ruby ruby-3.1)
272
273(define-public mruby
274 (package
275 (name "mruby")
276 (version "3.2.0")
277 (source
278 (origin
279 (method git-fetch)
280 (uri (git-reference
281 (url "https://github.com/mruby/mruby")
282 (commit version)))
283 (file-name (git-file-name name version))
284 (sha256
285 (base32
286 "0c0scaqbnywrd9z1z4rnnj345rjc3vbklszm0rc6y6rzx1cxnsij"))))
287 (build-system gnu-build-system)
288 (arguments
289 `(#:test-target "test"
290 #:phases
291 (modify-phases %standard-phases
292 (delete 'configure)
293 (add-after 'unpack 'enable-verbose-tests
294 (lambda _
295 (substitute* "Makefile"
296 (("ruby ./minirake" m)
297 (string-append m " --verbose")))
298 #t))
299 (add-after 'unpack 'disable-broken-tests
300 (lambda _
301 (substitute* "mrbgems/mruby-io/test/io.rb"
302 (("assert\\('IO.popen.+$" m)
303 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
304 ;; This one is really weird. The *expected* output is all wrong.
305 (("assert\\('`cmd`.*" m)
306 (string-append m "skip \"Disable for Guix\"\n")))
307 #t))
308 ;; There is no install target
309 (replace 'install
310 (lambda* (#:key outputs #:allow-other-keys)
311 (let* ((out (assoc-ref outputs "out"))
312 (bin (string-append out "/bin"))
313 (lib (string-append out "/lib")))
314 (mkdir-p bin)
315 (copy-recursively "build/host/bin" bin)
316 (mkdir-p lib)
317 (copy-recursively "build/host/lib" lib))
318 #t)))))
319 (native-inputs
320 (list ruby bison))
321 (home-page "https://github.com/mruby/mruby")
322 (synopsis "Lightweight Ruby")
323 (description "mruby is the lightweight implementation of the Ruby
324language. Its syntax is Ruby 3.x compatible except for pattern
325matching. mruby can be linked and embedded within your application.")
326 (license license:expat)))
327
328(define-public ruby-commander
329 (package
330 (name "ruby-commander")
331 (version "4.6.0")
332 (source
333 (origin
334 (method url-fetch)
335 (uri (rubygems-uri "commander" version))
336 (sha256
337 (base32
338 "1n8k547hqq9hvbyqbx2qi08g0bky20bbjca1df8cqq5frhzxq7bx"))))
339 (build-system ruby-build-system)
340 (arguments
341 (list
342 #:test-target "spec"
343 #:phases
344 #~(modify-phases %standard-phases
345 ;; Don't run or require rubocop, the code linting tool, as this is a
346 ;; bit unnecessary.
347 (add-after 'unpack 'dont-run-rubocop
348 (lambda _
349 (substitute* "Rakefile"
350 ((".*rubocop.*") "")
351 ((".*RuboCop.*") "")))))))
352 (propagated-inputs
353 (list ruby-highline))
354 (native-inputs
355 (list bundler ruby-rspec-core ruby-rspec-expectations
356 ruby-rspec-mocks ruby-simplecov))
357 (home-page "https://github.com/commander-rb/commander")
358 (synopsis "Library for building Ruby command-line executables")
359 (description
360 "Commander aims to be a complete solution for Ruby command-line
361executables. Commander bridges the gap between other terminal related
362libraries (OptionParser, HighLine), while providing many new features, and an
363elegant API.")
364 (license license:expat)))
365
366(define-public ruby-highline
367 (package
368 (name "ruby-highline")
369 (version "2.0.1")
370 (source
371 (origin
372 (method url-fetch)
373 (uri (rubygems-uri "highline" version))
374 (sha256
375 (base32
376 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
377 (build-system ruby-build-system)
378 (arguments
379 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
380 (native-inputs
381 (list bundler ruby-code-statistics))
382 (synopsis
383 "HighLine helps you build command-line interfaces")
384 (description
385 "HighLine provides a high-level IO library that provides validation,
386type conversion, and more for command-line interfaces. HighLine also includes
387a menu system for providing multiple options to the user.")
388 (home-page "https://github.com/JEG2/highline")
389 (license (list license:gpl2 license:ruby))))
390
391(define-public ruby-hoe
392 (package
393 (name "ruby-hoe")
394 (version "4.0.4")
395 (source (origin
396 (method url-fetch)
397 (uri (rubygems-uri "hoe" version))
398 (sha256
399 (base32
400 "0r2hy7mq9jd9hsbvskd9sxfbagc92adnn7abzxbda05sscbf46hn"))))
401 (build-system ruby-build-system)
402 (arguments
403 (list
404 ;; Circular dependency with minitest
405 #:tests? #f))
406 (synopsis "Ruby project management helper")
407 (description
408 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
409maintain, and release projects and includes a dynamic plug-in system allowing
410for easy extensibility. Hoe ships with plug-ins for all the usual project
411tasks including rdoc generation, testing, packaging, deployment, and
412announcement.")
413 (home-page "https://www.zenspider.com/projects/hoe.html")
414 (license license:expat)))
415
416(define-public ruby-hoe-3
417 (package
418 (inherit ruby-hoe)
419 (version "3.26.0")
420 (source (origin
421 (method url-fetch)
422 (uri (rubygems-uri "hoe" version))
423 (sha256
424 (base32
425 "02vmphnfzna1dbb1l5nczcvlvvsg4flr26bdhmvdyf447bpswa63"))))))
426
427(define-public ruby-rake-compiler
428 (package
429 (name "ruby-rake-compiler")
430 (version "1.1.1")
431 (source (origin
432 (method url-fetch)
433 (uri (rubygems-uri "rake-compiler" version))
434 (sha256
435 (base32
436 "11sxgw10jrd6a4irb51jjwam9wikixn5kss11pw4b80cmh32yvpf"))))
437 (build-system ruby-build-system)
438 (arguments
439 '(#:tests? #f)) ; needs cucumber
440 (synopsis "Building and packaging helper for Ruby native extensions")
441 (description "Rake-compiler provides a framework for building and
442packaging native C and Java extensions in Ruby.")
443 (home-page "https://github.com/rake-compiler/rake-compiler")
444 (license license:expat)))
445
446(define-public ruby-rake-compiler-dock
447 (package
448 (name "ruby-rake-compiler-dock")
449 (version "1.3.0")
450 (source (origin
451 (method url-fetch)
452 (uri (rubygems-uri "rake-compiler-dock" version))
453 (sha256
454 (base32
455 "0yr5f72irvhmnk12q7bbr4qw0xwy7diqkbcvb4lygjbg7rvk3k8k"))))
456 (build-system ruby-build-system)
457 (arguments (list #:tests? #f)) ;test suite requires docker
458 (synopsis "Cross compiler environment for building Ruby gems")
459 (description "The code{rake-compiler-dock} gem provides a cross compiler
460environment for building gems on a variety of platforms (GNU/Linux, JRuby,
461Windows and Mac).")
462 (home-page "https://github.com/rake-compiler/rake-compiler-dock")
463 (license license:expat)))
464
465(define-public ruby-rsync
466 (package
467 (name "ruby-rsync")
468 (version "1.0.9")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (rubygems-uri "rsync" version))
473 (sha256
474 (base32
475 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
476 (build-system ruby-build-system)
477 (arguments
478 '(#:test-target "spec"
479 #:phases
480 (modify-phases %standard-phases
481 (add-after 'unpack 'remove-coveralls-requirement
482 (lambda _
483 (substitute* "spec/spec_helper.rb"
484 (("require 'coveralls'") "")
485 (("Coveralls.wear!") ""))
486 #t)))))
487 (native-inputs
488 (list bundler rsync ruby-rspec-core ruby-rspec-expectations
489 ruby-rspec-mocks))
490 (home-page "https://github.com/jbussdieker/ruby-rsync")
491 (synopsis "Ruby wrapper around rsync")
492 (description
493 "Ruby Rsync is a Ruby library that can synchronize files between remote
494hosts by wrapping the @file{rsync} binary.")
495 (license license:expat)))
496
497(define-public ruby-i18n
498 (package
499 (name "ruby-i18n")
500 (version "1.13.0")
501 (source (origin
502 (method url-fetch)
503 (uri (rubygems-uri "i18n" version))
504 (sha256
505 (base32
506 "1yk33slipi3i1kydzrrchbi7cgisaxym6pgwlzx7ir8vjk6wl90x"))))
507 (build-system ruby-build-system)
508 (arguments
509 '(#:tests? #f)) ; no tests
510 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
511 (synopsis "Internationalization library for Ruby")
512 (description "Ruby i18n is an internationalization and localization
513solution for Ruby programs. It features translation and localization,
514interpolation of values to translations, pluralization, customizable
515transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
516translation data, custom key/scope separator, custom exception handlers, and
517an extensible architecture with a swappable backend.")
518 (home-page "https://github.com/ruby-i18n/i18n")
519 (license license:expat)))
520
521(define-public ruby-io-console
522 (package
523 (name "ruby-io-console")
524 (version "0.6.0")
525 (source (origin
526 (method git-fetch) ;for tests
527 (uri (git-reference
528 (url "https://github.com/ruby/io-console/")
529 (commit (string-append "v" version))))
530 (file-name (git-file-name name version))
531 (sha256
532 (base32
533 "0gwxrp29b6awkid1sf85sbh529mnq6hb86m8c2443cm6nc4vr8qb"))))
534 (build-system ruby-build-system)
535 (arguments
536 (list #:phases #~(modify-phases %standard-phases
537 (add-after 'unpack 'delete-rakelib-files
538 (lambda _
539 ;; These depend on git and other extraneous
540 ;; dependencies, and are loaded by rake.
541 (delete-file-recursively "rakelib"))))))
542 (native-inputs (list ruby-rake-compiler))
543 (synopsis "Console capabilities library for IO instances")
544 (description "IO.console adds console capabilities to Ruby IO instances.")
545 (home-page "https://github.com/ruby/io-console")
546 (license license:bsd-2)))
547
548(define-public ruby-irb
549 (package
550 (name "ruby-irb")
551 (version "1.6.3")
552 (source (origin
553 (method url-fetch)
554 (uri (rubygems-uri "irb" version))
555 (sha256
556 (base32
557 "1h9s07n5v3z029v18924ws9vdkdc80n6llp9ccx77yg1krv2g0f3"))))
558 (build-system ruby-build-system)
559 ;; XXX: Disable the test suite, as it requires debug, which requires this
560 ;; package (dependency cycle).
561 (arguments (list #:tests? #f))
562 (propagated-inputs (list ruby-reline))
563 (synopsis "Ruby command-line tool for REPL (Read Eval Print Loop)")
564 (description "IRB is an interactive Ruby command-line tool for REPL (Read
565Eval Print Loop).")
566 (home-page "https://github.com/ruby/irb")
567 (license license:bsd-2)))
568
569(define-public ruby-irb-1.1.1
570 (package
571 (inherit ruby-irb)
572 (version "1.1.1")
573 (source (origin
574 (method url-fetch)
575 (uri (rubygems-uri "irb" version))
576 (sha256
577 (base32
578 "0h605w798s2bg9wg681ynvvzgdz1yy69gh387bl0khw9ll7wkn8v"))))))
579
580(define-public ruby-iruby
581 (package
582 (name "ruby-iruby")
583 (version "0.3")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (rubygems-uri "iruby" version))
588 (sha256
589 (base32
590 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
591 (build-system ruby-build-system)
592 (arguments
593 ;; TODO: Tests currently fail.
594 ;;
595 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
596 ;;
597 ;; 1) Failure:
598 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
599 ;; In [ expected
600 ;;
601 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
602 '(#:tests? #f
603 #:phases
604 (modify-phases %standard-phases
605 (add-after 'unpack 'patch-ipython
606 (lambda* (#:key inputs #:allow-other-keys)
607 (substitute* "lib/iruby/command.rb"
608 (("version = `")
609 (string-append
610 "version = `"
611 (assoc-ref inputs "python-ipython")
612 "/bin/"))
613 (("Kernel\\.exec\\('")
614 (string-append
615 "Kernel.exec('"
616 (assoc-ref inputs "python-ipython")
617 "/bin/")))
618 #t)))))
619 (inputs
620 (list python-ipython))
621 (propagated-inputs
622 (list ruby-bond
623 ruby-data_uri
624 ruby-mimemagic
625 ruby-multi-json
626 ruby-cztop
627 ;; Optional inputs
628 ruby-pry))
629 (synopsis "Ruby kernel for Jupyter/IPython")
630 (description
631 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
632notebook).")
633 (home-page "https://github.com/SciRuby/iruby")
634 (license license:expat)))
635
636;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
637;; dependencies use RSpec for their test suites! To avoid these circular
638;; dependencies, we disable tests for all of the RSpec-related packages.
639(define-public ruby-rspec-support
640 (package
641 (name "ruby-rspec-support")
642 (version "3.12.0")
643 (source (origin
644 (method url-fetch)
645 (uri (rubygems-uri "rspec-support" version))
646 (sha256
647 (base32
648 "12y52zwwb3xr7h91dy9k3ndmyyhr3mjcayk0nnarnrzz8yr48kfx"))))
649 (build-system ruby-build-system)
650 (arguments
651 '(#:tests? #f)) ; avoid dependency cycles
652 (synopsis "RSpec support library")
653 (description "Support utilities for RSpec gems.")
654 (home-page "https://github.com/rspec/rspec-support")
655 (license license:expat)))
656
657(define-public ruby-rspec-core
658 (package
659 (name "ruby-rspec-core")
660 (version "3.12.1")
661 (source (origin
662 (method url-fetch)
663 (uri (rubygems-uri "rspec-core" version))
664 (sha256
665 (base32
666 "0da45cvllbv39sdbsl65vp5djb2xf5m10mxc9jm7rsqyyxjw4h1f"))))
667 (build-system ruby-build-system)
668 (arguments
669 '(#:tests? #f)) ; avoid dependency cycles
670 (propagated-inputs
671 (list ruby-rspec-support))
672 (synopsis "RSpec core library")
673 (description "Rspec-core provides the RSpec test runner and example
674groups.")
675 (home-page "https://github.com/rspec/rspec-core")
676 (license license:expat)))
677
678(define-public ruby-rspec-core-2
679 (package (inherit ruby-rspec-core)
680 (version "2.14.8")
681 (source (origin
682 (method url-fetch)
683 (uri (rubygems-uri "rspec-core" version))
684 (sha256
685 (base32
686 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
687 (arguments
688 (cons*
689 #:phases
690 #~(modify-phases %standard-phases
691 (add-after 'unpack 'patch
692 (lambda _
693 (substitute* "lib/rspec/core/ruby_project.rb"
694 (("File\\.exists\\?") "File.exist?")))))
695 (package-arguments ruby-rspec-core)))
696 (propagated-inputs `())))
697
698(define-public ruby-date
699 (package
700 (name "ruby-date")
701 (version "3.3.3")
702 (source (origin
703 (method git-fetch)
704 (uri (git-reference
705 (url "https://github.com/ruby/date")
706 (commit (string-append "v" version))))
707 (file-name (git-file-name name version))
708 (sha256
709 (base32
710 "1jiqjnaap1jk1r8z37iicnzqha1rhc713qmcir17f4vnz8ac8v75"))))
711 (build-system ruby-build-system)
712 (arguments (list #:test-target "default"))
713 (native-inputs (list ruby-rake-compiler))
714 (synopsis "Ruby @code{Object} subclass with date comparison capability")
715 (description "This package provides a subclass of @code{Object} that
716includes the @code{Comparable} module for handling dates.")
717 (home-page "https://github.com/ruby/date")
718 (license license:bsd-2)))
719
720(define-public ruby-diff-lcs
721 (package
722 (name "ruby-diff-lcs")
723 (version "1.3")
724 (source (origin
725 (method url-fetch)
726 (uri (rubygems-uri "diff-lcs" version))
727 (sha256
728 (base32
729 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
730 (build-system ruby-build-system)
731 (arguments
732 '(#:tests? #f)) ; avoid dependency cycles
733 (synopsis "Compute the difference between two Enumerable sequences")
734 (description "Diff::LCS computes the difference between two Enumerable
735sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
736It includes utilities to create a simple HTML diff output format and a
737standard diff-like tool.")
738 (home-page "https://github.com/halostatue/diff-lcs")
739 (license license:expat)))
740
741(define-public ruby-rspec-expectations
742 (package
743 (name "ruby-rspec-expectations")
744 (version "3.12.2")
745 (source (origin
746 (method url-fetch)
747 (uri (rubygems-uri "rspec-expectations" version))
748 (sha256
749 (base32
750 "03ba3lfdsj9zl00v1yvwgcx87lbadf87livlfa5kgqssn9qdnll6"))))
751 (build-system ruby-build-system)
752 (arguments
753 '(#:tests? #f)) ; avoid dependency cycles
754 (propagated-inputs
755 (list ruby-rspec-support ruby-diff-lcs))
756 (synopsis "RSpec expectations library")
757 (description "Rspec-expectations provides a simple API to express expected
758outcomes of a code example.")
759 (home-page "https://github.com/rspec/rspec-expectations")
760 (license license:expat)))
761
762(define-public ruby-rspec-expectations-2
763 (package (inherit ruby-rspec-expectations)
764 (version "2.14.5")
765 (source (origin
766 (method url-fetch)
767 (uri (rubygems-uri "rspec-expectations" version))
768 (sha256
769 (base32
770 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
771 (propagated-inputs
772 (list ruby-diff-lcs))))
773
774(define-public ruby-sorcerer
775 (package
776 (name "ruby-sorcerer")
777 (version "2.0.1")
778 (source
779 (origin
780 (method url-fetch)
781 (uri (rubygems-uri "sorcerer" version))
782 (sha256
783 (base32
784 "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
785 (build-system ruby-build-system)
786 (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
787 (description "Sorcerer generates Ruby code from a Ripper-like abstract
788syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
789snippets of Ruby code, expressible in a single line. Longer examples may be
790re-sourced, but they will be rendered in a single-line format.")
791 (home-page "https://github.com/rspec-given/sorcerer")
792 (license license:expat)))
793
794(define-public ruby-sorted-set
795 (package
796 (name "ruby-sorted-set")
797 (version "1.0.3")
798 (source (origin
799 (method url-fetch)
800 (uri (rubygems-uri "sorted_set" version))
801 (sha256
802 (base32
803 "0brpwv68d7m9qbf5js4bg8bmg4v7h4ghz312jv9cnnccdvp8nasg"))))
804 (build-system ruby-build-system)
805 (propagated-inputs
806 (list ruby-rbtree ruby-set))
807 (synopsis
808 "Ruby Set variant whose elements are sorted in ascending order")
809 (description
810 "This package implements a variant of Set whose elements are sorted in
811ascending order")
812 (home-page "https://github.com/knu/sorted_set")
813 (license license:bsd-2)))
814
815(define-public ruby-given-core
816 (package
817 (name "ruby-given-core")
818 (version "3.8.2")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (rubygems-uri "given_core" version))
823 (sha256
824 (base32
825 "0w1pyhgb2am7c267s8v06dpd9qhmsk2x4hfr2aq8l8lh49ma227s"))))
826 (build-system ruby-build-system)
827 (arguments '(#:tests? #f)) ;no test suite for the core package
828 (propagated-inputs
829 (list ruby-sorcerer))
830 (synopsis "Core abstractions used by rspec-given and minitest-given")
831 (description "Given_core is the basic functionality behind rspec-given and
832minitest-given, extensions that allow the use of Given/When/Then terminology
833when defining specifications.")
834 (home-page "https://github.com/rspec-given/rspec-given")
835 (license license:expat)))
836
837(define-public ruby-rspec-given
838 (package
839 (name "ruby-rspec-given")
840 (version "3.8.2")
841 (source
842 (origin
843 (method url-fetch)
844 (uri (rubygems-uri "rspec-given" version))
845 (sha256
846 (base32
847 "0xzzxjjzwrsp84p12sd6ab3jbm9kh7sbnqpxgc9mlfq3s3ll0fdj"))))
848 (build-system ruby-build-system)
849 (arguments
850 `(#:test-target "rs"
851 #:phases
852 (modify-phases %standard-phases
853 (add-after 'unpack 'fix-rakefile
854 (lambda _
855 (substitute* '("Rakefile" "rakelib/gemspec.rake")
856 (("require '\\./lib/given/.*") "")
857 (("Given::VERSION") (format #f "~s" ,version))
858 ;; Fix the error: "cannot load such file -- example_helper"
859 (("sh \"rspec")
860 "sh \"rspec -Ilib:examples"))))
861 (add-after 'extract-gemspec 'delete-failing-tests
862 ;; See: https://github.com/jimweirich/rspec-given/issues/57.
863 (lambda _
864 (substitute* ".gemspec"
865 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
866 "")
867 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
868 ""))
869 (delete-file "spec/lib/given/natural_assertion_spec.rb")
870 (delete-file "examples/integration/failing_messages_spec.rb"))))))
871 (native-inputs
872 (list ruby-rspec ruby-minitest))
873 (propagated-inputs
874 (list ruby-given-core ruby-rspec))
875 (synopsis "Given/When/Then for RSpec and Minitest")
876 (description "Given is an RSpec extension that allows the use of
877Given/When/Then terminology when defining specifications, in a way similar to
878the Cucumber Gherkin language.")
879 (home-page "https://github.com/rspec-given/rspec-given")
880 (license license:expat)))
881
882(define-public ruby-rspec-its
883 (package
884 (name "ruby-rspec-its")
885 (version "1.3.0")
886 (source
887 (origin
888 (method git-fetch)
889 (uri (git-reference
890 (url "https://github.com/rspec/rspec-its")
891 (commit (string-append "v" version))))
892 (file-name (git-file-name name version))
893 (sha256
894 (base32
895 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
896 (build-system ruby-build-system)
897 (arguments
898 `(#:test-target "spec"
899 #:phases
900 (modify-phases %standard-phases
901 (add-after 'unpack 'dont-install-gems-from-gemfile
902 (lambda _
903 (substitute* "Gemfile"
904 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
905 ""))
906 #t))
907 (add-before 'build 'loosen-ffi-requirement
908 (lambda _
909 ;; Accept any version of ruby-ffi.
910 (substitute* "Gemfile"
911 ((" gem 'ffi', '~> 1\\.9\\.25'")
912 " gem 'ffi'"))
913 #t))
914 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
915 (lambda _
916 (substitute* "rspec-its.gemspec"
917 (("rake.*") "rake'\n")
918 (("spec.add_development_dependency 'cucumber'.*")
919 "spec.add_development_dependency 'cucumber'\n")
920 (("bundler.*") "bundler'\n")
921 (("\"aruba.*") "'aruba'\n"))
922 #t)))))
923 (propagated-inputs
924 (list ruby-rspec-core ruby-rspec-expectations))
925 (native-inputs
926 (list bundler ruby-cucumber ruby-ffi ruby-aruba))
927 (synopsis "RSpec extension that provides the @code{its} method")
928 (description
929 "RSpec::Its provides the its method as a short-hand to specify the expected
930value of an attribute. For example, one can use @code{its(:size)\\{should
931eq(1)\\}}.")
932 (home-page "https://github.com/rspec/rspec-its")
933 (license license:expat)))
934
935;;; This variant is used to break a cycle with ruby-protobuf.
936(define-public ruby-rspec-its-minimal
937 (hidden-package
938 (package
939 (inherit ruby-rspec-its)
940 (arguments
941 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
942 ((#:tests? _ #f) #f)))
943 (native-inputs '()))))
944
945(define-public ruby-rspec-mocks
946 (package
947 (name "ruby-rspec-mocks")
948 (version "3.12.4")
949 (source (origin
950 (method url-fetch)
951 (uri (rubygems-uri "rspec-mocks" version))
952 (sha256
953 (base32
954 "1dcfh85m3ksir6n8gydsal4d85chpww1b2nahb05nl8xhgh0r2ij"))))
955 (build-system ruby-build-system)
956 (arguments
957 '(#:tests? #f)) ; avoid dependency cycles
958 (propagated-inputs
959 (list ruby-rspec-support ruby-diff-lcs))
960 (synopsis "RSpec stubbing and mocking library")
961 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
962support for stubbing and mocking.")
963 (home-page "https://github.com/rspec/rspec-mocks")
964 (license license:expat)))
965
966(define-public ruby-rspec-mocks-2
967 (package (inherit ruby-rspec-mocks)
968 (version "2.14.6")
969 (source (origin
970 (method url-fetch)
971 (uri (rubygems-uri "rspec-mocks" version))
972 (sha256
973 (base32
974 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
975 (propagated-inputs
976 (list ruby-diff-lcs))))
977
978(define-public ruby-rspec-block-is-expected
979 (package
980 (name "ruby-rspec-block-is-expected")
981 (version "1.0.5")
982 (source (origin
983 (method git-fetch) ;for tests
984 (uri (git-reference
985 (url "https://github.com/pboling/rspec-block_is_expected")
986 (commit (string-append "v" version))))
987 (file-name (git-file-name name version))
988 (sha256
989 (base32
990 "1zi5z12lkw3fiwgr7g61845wj73asr2vzw4zsjv45klnnfspwass"))))
991 (build-system ruby-build-system)
992 (arguments
993 (list #:phases #~(modify-phases %standard-phases
994 (add-after 'unpack 'relax-requirements
995 (lambda _
996 (substitute* "Rakefile"
997 (("require 'rubocop/rake_task'") "")
998 (("RuboCop::RakeTask.new") ""))
999 ;; Contains extraneous requirements not actually
1000 ;; needed for the test suite.
1001 (delete-file "Gemfile")))
1002 (add-before 'build 'drop-signing-key-requirement
1003 (lambda _
1004 (substitute* "rspec-block_is_expected.gemspec"
1005 (("spec.signing_key =.*")
1006 "spec.signing_key = nil")))))))
1007 (native-inputs (list ruby-rspec-pending-for ruby-rspec-expectations))
1008 (propagated-inputs (list ruby-rspec-core))
1009 (synopsis "Simplify testing of blocks in RSpec")
1010 (description "This RSpec plugin allows you to use @code{block_is_expected}
1011similarly to how you would use @code{is_expected} if a block was wrapping the
1012subject.")
1013 (home-page "https://github.com/pboling/rspec-block_is_expected")
1014 (license license:expat)))
1015
1016(define-public ruby-rspec-pending-for
1017 (package
1018 (name "ruby-rspec-pending-for")
1019 (version "0.1.16")
1020 (source (origin
1021 (method git-fetch) ;for tests
1022 (uri (git-reference
1023 (url "https://github.com/pboling/rspec-pending_for")
1024 (commit (string-append "v" version))))
1025 (file-name (git-file-name name version))
1026 (sha256
1027 (base32
1028 "107l560vm0kx25w5iy5rsk9ly8dxzr81b31284j514f4hkd0qv3m"))))
1029 (build-system ruby-build-system)
1030 (native-inputs (list ruby-rspec ruby-simplecov))
1031 (propagated-inputs (list ruby-rspec-core ruby-ruby-engine
1032 ruby-ruby-version))
1033 (synopsis "Skip RSpec tests for specific Ruby engines or versions")
1034 (description "This RSpec plugin makes it easy to mark test cases as
1035pending or skipped for a specific Ruby engine (e.g. MRI or JRuby) or version
1036combinations.")
1037 (home-page "https://github.com/pboling/rspec-pending_for")
1038 (license license:expat)))
1039
1040(define-public ruby-rspec-rerun
1041 (package
1042 (name "ruby-rspec-rerun")
1043 (version "1.1.0")
1044 (source
1045 (origin
1046 (method url-fetch)
1047 (uri (rubygems-uri "rspec-rerun" version))
1048 (sha256
1049 (base32
1050 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
1051 (build-system ruby-build-system)
1052 (arguments
1053 '(;; No included tests
1054 #:tests? #f))
1055 (propagated-inputs (list ruby-rspec))
1056 (synopsis "Track failed RSpec tests to re-run them")
1057 (description
1058 "This package provides an automated way to track, and then re-run failed
1059RSpec tests.")
1060 (home-page "https://github.com/dblock/rspec-rerun")
1061 (license license:expat)))
1062
1063(define-public ruby-rspec-stubbed-env
1064 ;; There is no release nor tag (see:
1065 ;; https://github.com/pboling/rspec-stubbed_env/issues/7).
1066 (let ((revision "0")
1067 (commit "9d767dec77a6d130f6ad83c48a00a5c81b14b9fa"))
1068 (package
1069 (name "ruby-rspec-stubbed-env")
1070 (version (git-version "1.0.0" revision commit))
1071 (source (origin
1072 (method git-fetch)
1073 (uri (git-reference
1074 (url "https://github.com/pboling/rspec-stubbed_env")
1075 (commit commit)))
1076 (file-name (git-file-name name version))
1077 (sha256
1078 (base32
1079 "1dy4m04h613dp0s59rknjd6h4lqs1h17mffc5kd8kh046mk8nr1p"))))
1080 (build-system ruby-build-system)
1081 (arguments
1082 (list #:test-target "spec"
1083 #:phases #~(modify-phases %standard-phases
1084 (add-after 'unpack 'streamline-requirements
1085 (lambda _
1086 ;; Remove extraneous development dependencies.
1087 (substitute* "rspec-stubbed_env.gemspec"
1088 ((".*bundler.*") "")
1089 ((".*rubocop.*") "")))))))
1090 (native-inputs (list ruby-simplecov))
1091 (propagated-inputs (list ruby-rspec))
1092 (synopsis "RSpec plugin to stub environment variables")
1093 (description
1094 "This RSpec plugin can be used to stub environment variables in a scoped
1095context for testing.")
1096 (home-page "https://github.com/pboling/rspec-stubbed_env")
1097 (license license:expat))))
1098
1099(define-public ruby-rspec-wait
1100 (package
1101 (name "ruby-rspec-wait")
1102 (version "0.0.9")
1103 (source
1104 (origin
1105 (method url-fetch)
1106 (uri (rubygems-uri "rspec-wait" version))
1107 (sha256
1108 (base32
1109 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
1110 (build-system ruby-build-system)
1111 (arguments
1112 '(#:phases
1113 (modify-phases %standard-phases
1114 (replace 'check
1115 (lambda _
1116 (invoke "rake" "spec"))))))
1117 (native-inputs
1118 (list bundler))
1119 (propagated-inputs
1120 (list ruby-rspec))
1121 (home-page "https://github.com/laserlemon/rspec-wait")
1122 (synopsis "Wait for conditions in RSpec")
1123 (description
1124 "RSpec::Wait strives to make it easier to test asynchronous or slow
1125interactions.")
1126 (license license:expat)))
1127
1128(define-public ruby-rspec
1129 (package
1130 (name "ruby-rspec")
1131 (version "3.12.0")
1132 (source (origin
1133 (method url-fetch)
1134 (uri (rubygems-uri "rspec" version))
1135 (sha256
1136 (base32
1137 "171rc90vcgjl8p1bdrqa92ymrj8a87qf6w20x05xq29mljcigi6c"))))
1138 (build-system ruby-build-system)
1139 (arguments
1140 '(#:tests? #f)) ; avoid dependency cycles
1141 (propagated-inputs
1142 (list ruby-rspec-core ruby-rspec-mocks ruby-rspec-expectations))
1143 (synopsis "Behavior-driven development framework for Ruby")
1144 (description "RSpec is a behavior-driven development (BDD) framework for
1145Ruby. This meta-package includes the RSpec test runner, along with the
1146expectations and mocks frameworks.")
1147 (home-page "https://rspec.info/")
1148 (license license:expat)))
1149
1150(define-public ruby-rspec-2
1151 (package (inherit ruby-rspec)
1152 (version "2.14.1")
1153 (source (origin
1154 (method url-fetch)
1155 (uri (rubygems-uri "rspec" version))
1156 (sha256
1157 (base32
1158 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
1159 (propagated-inputs
1160 (list ruby-rspec-core-2 ruby-rspec-mocks-2 ruby-rspec-expectations-2))))
1161
1162(define-public ruby-rspec-debug
1163 (package
1164 (name "ruby-rspec-debug")
1165 (version "0.2.0")
1166 (source (origin
1167 (method git-fetch) ;for tests
1168 (uri (git-reference
1169 (url "https://github.com/ko1/rspec-debug")
1170 (commit (string-append "v" version))))
1171 (file-name (git-file-name name version))
1172 (sha256
1173 (base32
1174 "125p1zxjznkk765nyqvkksw8x1nbm7xk4sjc1wza2fyp5hvyiddn"))))
1175 (build-system ruby-build-system)
1176 (arguments
1177 (list #:test-target "spec"
1178 #:phases #~(modify-phases %standard-phases
1179 (add-after 'extract-gemspec 'relax-dependencies
1180 (lambda _
1181 (substitute* "Gemfile"
1182 (("~>") ">=")))))))
1183 (native-inputs (list ruby-rspec))
1184 (propagated-inputs (list ruby-debug))
1185 (synopsis "Invoke Ruby debugger when spec fails")
1186 (description "This package can be used to have the execution stopped for
1187inspection in the Ruby debugger upon encountering a failure. To use it, set
1188the @env{RSPEC_DEBUG} environment variable to @samp{true} then invoke the
1189@command{rspec} command as usual.")
1190 (home-page "https://github.com/ko1/rspec-debug")
1191 (license license:expat)))
1192
1193;; Bundler is yet another source of circular dependencies, so we must disable
1194;; its test suite as well.
1195(define-public bundler
1196 (package
1197 (name "bundler")
1198 (version "2.4.18")
1199 (source (origin
1200 (method url-fetch)
1201 (uri (rubygems-uri "bundler" version))
1202 (sha256
1203 (base32
1204 "03ppd60cbwzlrhsidi7frj826ssmxzwd954ikjk7966l45qx5xxn"))))
1205 (build-system ruby-build-system)
1206 (arguments
1207 '(#:tests? #f)) ; avoid dependency cycles
1208 (synopsis "Ruby gem bundler")
1209 (description "Bundler automatically downloads and installs a list of gems
1210specified in a \"Gemfile\", as well as their dependencies.")
1211 (home-page "https://bundler.io/")
1212 (license license:expat)))
1213
1214(define-public ruby-builder
1215 (package
1216 (name "ruby-builder")
1217 (version "3.2.4")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (rubygems-uri "builder" version))
1221 (sha256
1222 (base32
1223 "045wzckxpwcqzrjr353cxnyaxgf0qg22jh00dcx7z38cys5g1jlr"))))
1224 (build-system ruby-build-system)
1225 (arguments
1226 (list
1227 #:phases
1228 #~(modify-phases %standard-phases
1229 (add-after 'unpack 'patch
1230 (lambda _
1231 (substitute* "rakelib/tags.rake"
1232 (("File\\.exists\\?") "File.exist?"))
1233
1234 ;; TODO This test is broken
1235 ;; https://github.com/tenderlove/builder/issues/13
1236 (substitute* "test/test_blankslate.rb"
1237 (("test_late_included_module_in_kernel_is_ok")
1238 "test_late_included_module_in_kernel_is_ok
1239 skip(\"test expected to fail\")
1240"))
1241 (substitute* "rakelib/tags.rake"
1242 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n")))))))
1243 (synopsis "Ruby library to create structured data")
1244 (description "Builder provides a number of builder objects that make it
1245easy to create structured data. Currently the following builder objects are
1246supported: XML Markup and XML Events.")
1247 (home-page "https://github.com/tenderlove/builder")
1248 (license license:expat)))
1249
1250(define-public ruby-bump
1251 (package
1252 (name "ruby-bump")
1253 (version "0.7.0")
1254 (source
1255 (origin
1256 (method url-fetch)
1257 (uri (rubygems-uri "bump" version))
1258 (sha256
1259 (base32
1260 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
1261 (build-system ruby-build-system)
1262 (arguments
1263 '(;; No included tests
1264 #:tests? #f))
1265 (synopsis "Tool for working with Rubygems")
1266 (description
1267 "Bump provides commands to manage Rubygem versioning, updating to the
1268next patch version for example.")
1269 (home-page "https://github.com/gregorym/bump")
1270 (license license:expat)))
1271
1272(define-public ruby-rjb
1273 (package
1274 (name "ruby-rjb")
1275 (version "1.6.7")
1276 (source (origin
1277 (method url-fetch)
1278 (uri (rubygems-uri "rjb" version))
1279 (sha256
1280 (base32
1281 "0ck802bm8cklhmqsgzhsa0y8lg80qy52dp3m8rlld3zc5gv1rsb9"))))
1282 (build-system ruby-build-system)
1283 (arguments
1284 (list
1285 #:tests? #f ; no rakefile
1286 #:phases
1287 #~(modify-phases %standard-phases
1288 (add-before 'build 'set-java-home
1289 (lambda* (#:key inputs #:allow-other-keys)
1290 (setenv "JAVA_HOME" (assoc-ref inputs "jdk")))))))
1291 (native-inputs
1292 `(("jdk" ,icedtea "jdk")))
1293 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1294 (description "RJB is a bridge program that connects Ruby and Java via the
1295Java Native Interface.")
1296 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
1297 (license license:lgpl2.1+)))
1298
1299(define-public ruby-log4r
1300 (package
1301 (name "ruby-log4r")
1302 (version "1.1.10")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri (rubygems-uri "log4r" version))
1307 (sha256
1308 (base32
1309 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1310 (build-system ruby-build-system)
1311 (arguments
1312 '(#:tests? #f)) ; no Rakefile in gem
1313 (synopsis "Flexible logging library for Ruby")
1314 (description "Comprehensive and flexible logging library written
1315in Ruby for use in Ruby programs. It features a hierarchical logging
1316system of any number of levels, custom level names, logger
1317inheritance, multiple output destinations per log event, execution
1318tracing, custom formatting, thread safteyness, XML and YAML
1319configuration, and more.")
1320 (home-page "http://log4r.rubyforge.org/")
1321 (license license:bsd-3)))
1322
1323(define-public ruby-atoulme-antwrap
1324 (package
1325 (name "ruby-atoulme-antwrap")
1326 (version "0.7.5")
1327 (source (origin
1328 (method url-fetch)
1329 (uri (rubygems-uri "atoulme-Antwrap" version))
1330 (sha256
1331 (base32
1332 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1333 (build-system ruby-build-system)
1334 ;; Test data required for most of the tests are not included.
1335 (arguments `(#:tests? #f))
1336 (native-inputs
1337 (list ruby-hoe))
1338 (inputs
1339 (list ruby-rjb))
1340 (synopsis "Ruby wrapper for the Ant build tool")
1341 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1342tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1343script.")
1344 (home-page "http://rubyforge.org/projects/antwrap/")
1345 (license license:expat)))
1346
1347(define-public ruby-atoulme-saikuro
1348 (package
1349 (name "ruby-atoulme-saikuro")
1350 (version "1.2.1")
1351 (source (origin
1352 (method url-fetch)
1353 (uri (rubygems-uri "atoulme-Saikuro" version))
1354 (sha256
1355 (base32
1356 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1357 (build-system ruby-build-system)
1358 (arguments
1359 (list
1360 #:phases
1361 #~(modify-phases %standard-phases
1362 (add-after 'unpack 'fix-module-resolution
1363 (lambda _
1364 (substitute* "lib/saikuro.rb"
1365 ;; irb 1.2.0 or later doesn't have RubyToken
1366 (("require 'irb/ruby-lex'")
1367 "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'"))))
1368 (delete 'check)
1369 (add-after 'install 'check
1370 (lambda* (#:key outputs #:allow-other-keys)
1371 (let* ((out (assoc-ref outputs "out"))
1372 (saikuro (string-append out "/bin/saikuro")))
1373 (setenv "GEM_PATH" (string-append
1374 (getenv "GEM_PATH") ":"
1375 #$output "/lib/ruby/vendor_ruby"))
1376 (invoke saikuro "--cyclo" "--token" "--input_directory" "tests")))))))
1377 (propagated-inputs (list ruby-irb-1.1.1
1378 ruby-e2mmap)) ;required by rubygems
1379 (synopsis "Cyclomatic complexity analyzer")
1380 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1381given Ruby source code Saikuro will generate a report listing the cyclomatic
1382complexity of each method found. In addition, Saikuro counts the number of
1383lines per method and can generate a listing of the number of tokens on each
1384line of code.")
1385 (home-page "http://www.github.com/atoulme/Saikuro")
1386 ;; File headers contain the BSD-3 license and the README.rdoc says that
1387 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1388 ;; of the Expat license.
1389 (license license:bsd-3)))
1390
1391(define-public ruby-awesome-print
1392 (package
1393 (name "ruby-awesome-print")
1394 (version "1.9.2")
1395 (source
1396 (origin
1397 (method url-fetch)
1398 (uri (rubygems-uri "awesome_print" version))
1399 (sha256
1400 (base32
1401 "0vkq6c8y2jvaw03ynds5vjzl1v9wg608cimkd3bidzxc0jvk56z9"))))
1402 (build-system ruby-build-system)
1403 (arguments
1404 (list
1405 #:phases
1406 #~(modify-phases %standard-phases
1407 (replace 'check
1408 (lambda _
1409 ;; Remove failing test.
1410 (for-each delete-file
1411 '("spec/ext/nokogiri_spec.rb"
1412 "spec/colors_spec.rb"
1413 "spec/formats_spec.rb"
1414 "spec/methods_spec.rb"
1415 "spec/misc_spec.rb"
1416 "spec/objects_spec.rb"))
1417 (invoke "rspec" "-c" "spec"))))))
1418 (native-inputs
1419 (list ruby-nokogiri ruby-rspec ruby-simplecov))
1420 (synopsis "Pretty print Ruby objects to visualize their structure")
1421 (description
1422 "Ruby dubugging companion: pretty print Ruby objects to visualize their
1423structure. Supports custom object formatting via plugins.")
1424 (home-page "https://github.com/awesome-print/awesome_print")
1425 (license license:expat)))
1426
1427(define-public ruby-pandoc-ruby
1428 (package
1429 (name "ruby-pandoc-ruby")
1430 (version "2.1.4")
1431 (source
1432 (origin
1433 (method git-fetch) ;the gem lacks many test files
1434 (uri (git-reference
1435 (url "https://github.com/xwmx/pandoc-ruby")
1436 (commit version)))
1437 (file-name (git-file-name name version))
1438 (sha256
1439 (base32
1440 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1441 (build-system ruby-build-system)
1442 (arguments
1443 `(#:tests? #f ; Disable tests since they depend on pandoc behavior
1444 ; and there are no upstream releases.
1445 #:phases
1446 (modify-phases %standard-phases
1447 (add-after 'unpack 'patch-pandoc-path
1448 (lambda* (#:key inputs #:allow-other-keys)
1449 (let ((pandoc (search-input-file inputs "/bin/pandoc")))
1450 (substitute* "lib/pandoc-ruby.rb"
1451 (("@@pandoc_path = 'pandoc'")
1452 (format #f "@@pandoc_path = '~a'" pandoc)))
1453 (substitute* "test/test_pandoc_ruby.rb"
1454 (("('|\")pandoc" _ quote)
1455 (string-append quote pandoc))
1456 (("\\^pandoc")
1457 ".*pandoc")))))
1458 (add-after 'unpack 'adjust-tests
1459 ;; The tests expect filenames with spaces. Because they don't have
1460 ;; spaces the quotes around the output are dropped automatically.
1461 (lambda _
1462 (substitute* "test/test_pandoc_ruby.rb"
1463 (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
1464 (add-after 'extract-gemspec 'remove-Gemfile.lock
1465 (lambda _
1466 (delete-file "Gemfile.lock")
1467 (substitute* "pandoc-ruby.gemspec"
1468 (("Gemfile\\.lock") "")))))))
1469 (native-inputs
1470 (list ruby-mocha))
1471 (inputs
1472 (list pandoc))
1473 (synopsis "Ruby wrapper for Pandoc")
1474 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1475command line tools for converting one markup format to another. Pandoc can
1476convert documents from a variety of formats including markdown,
1477reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1478variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1479ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1480markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1481more.")
1482 (home-page "https://github.com/xwmx/pandoc-ruby")
1483 (license license:expat)))
1484
1485(define-public ruby-patron
1486 (package
1487 (name "ruby-patron")
1488 (version "0.13.3")
1489 (source
1490 (origin
1491 (method url-fetch)
1492 (uri (rubygems-uri "patron" version))
1493 (sha256
1494 (base32
1495 "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
1496 (build-system ruby-build-system)
1497 (inputs
1498 (list curl))
1499 (arguments
1500 `(#:tests? #f)) ; no included tests
1501 (synopsis "Ruby HTTP client library based on @code{libcurl}")
1502 (description
1503 "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
1504not try to expose the full power (read complexity) of @code{libcurl} but
1505instead tries to provide a sane API while taking advantage of @code{libcurl}
1506under the hood.")
1507 (home-page "https://github.com/toland/patron")
1508 (license license:expat)))
1509
1510(define-public ruby-slim
1511 (package
1512 (name "ruby-slim")
1513 (version "5.1.0")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (rubygems-uri "slim" version))
1518 (sha256
1519 (base32
1520 "1rp437r8hr9kdgabb7c96yw4z2wyrajl4cxiij038y10f8i6hbn4"))))
1521 (build-system ruby-build-system)
1522 (arguments
1523 `(#:phases
1524 (modify-phases %standard-phases
1525 ;; See: https://github.com/slim-template/slim/issues/857 and
1526 ;; https://github.com/slim-template/slim/issues/858.
1527 (add-after 'unpack 'skip-broken-tests
1528 (lambda _
1529 (substitute* "test/core/test_embedded_engines.rb"
1530 (("def test_render_with_markdown")
1531 "def skipped_test_render_with_markdown"))
1532 (substitute* "test/translator/test_translator.rb"
1533 (("raise (\"Missing test for.*)" _ tail)
1534 (string-append "print " tail)))))
1535 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1536 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1537 (add-after 'unpack 'prevent-bundler-interference
1538 (lambda _
1539 (substitute* "Rakefile"
1540 (("require 'bundler/setup'") "nil")
1541 (("Bundler::GemHelper\\.install_tasks") "nil")))))))
1542 (native-inputs
1543 (list ruby-rack-test ruby-rspec-core ruby-sinatra))
1544 (propagated-inputs
1545 (list ruby-temple ruby-tilt))
1546 (synopsis "Minimalist template language for Ruby")
1547 (description "Slim is a template language for Ruby that aims to reduce the
1548syntax to the minimum while remaining clear.")
1549 (home-page "http://slim-lang.com/")
1550 (license license:expat)))
1551
1552(define-public ruby-asciidoctor
1553 (package
1554 (name "ruby-asciidoctor")
1555 (version "2.0.18")
1556 (source
1557 (origin
1558 (method git-fetch) ;the gem release lacks a Rakefile
1559 (uri (git-reference
1560 (url "https://github.com/asciidoctor/asciidoctor")
1561 (commit (string-append "v" version))))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32
1565 "1mpk3y69lqz9ywfkjmr40dm3mkabrnf92bb011qq1axj73yyrajv"))))
1566 (build-system ruby-build-system)
1567 (arguments
1568 (list
1569 #:test-target "test:all"
1570 #:phases
1571 #~(modify-phases %standard-phases
1572 (add-after 'extract-gemspec 'strip-version-requirements
1573 (lambda _
1574 (delete-file "Gemfile")
1575 (substitute* "asciidoctor.gemspec"
1576 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1577 (string-append stripped "\n")))))
1578 (add-after 'install 'install-man-page
1579 (lambda* (#:key outputs #:allow-other-keys)
1580 (install-file (search-input-file
1581 outputs (string-append "lib/ruby/vendor_ruby/"
1582 "gems/asciidoctor-"
1583 #$version
1584 "/man/asciidoctor.1"))
1585 (string-append #$output "/share/man/man1")))))))
1586 (native-inputs
1587 (list ruby-asciimath
1588 ruby-coderay
1589 ruby-cucumber
1590 ruby-erubis
1591 ruby-haml
1592 ruby-minitest
1593 ruby-nokogiri
1594 ruby-open-uri-cached
1595 ruby-rouge
1596 ruby-rspec-expectations
1597 ruby-simplecov
1598 ruby-slim
1599 ruby-tilt
1600 ruby-erubi))
1601 (synopsis "Converter from AsciiDoc content to other formats")
1602 (description "Asciidoctor is a text processor and publishing toolchain for
1603converting AsciiDoc content to HTML5, DocBook 5, PDF, and other formats.")
1604 (home-page "https://asciidoctor.org")
1605 (license license:expat)))
1606
1607(define-public ruby-asciidoctor/minimal
1608 (hidden-package
1609 (package
1610 (inherit ruby-asciidoctor)
1611 (arguments
1612 (ensure-keyword-arguments
1613 (package-arguments ruby-asciidoctor)
1614 (list #:tests? #f)))
1615 (native-inputs '()))))
1616
1617(define-public ruby-asciidoctor-multipage
1618 (package
1619 (name "ruby-asciidoctor-multipage")
1620 (version "0.0.16")
1621 (source (origin
1622 (method git-fetch)
1623 (uri (git-reference
1624 (url "https://github.com/owenh000/asciidoctor-multipage")
1625 (commit (string-append "v" version))))
1626 (file-name (git-file-name name version))
1627 (sha256
1628 (base32
1629 "0rnz7qxdw5qbi3qjplihhk468kv690njdi06yllgylc75k62ar1p"))))
1630 (propagated-inputs (list ruby-asciidoctor ruby-slim))
1631 (build-system ruby-build-system)
1632 (arguments
1633 `(#:phases (modify-phases %standard-phases
1634 (add-after 'extract-gemspec 'strip-version-requirements
1635 (lambda _
1636 (delete-file "Gemfile")
1637 (substitute* "asciidoctor-multipage.gemspec"
1638 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1639 (string-append stripped "\n"))))))))
1640 (synopsis
1641 "Asciidoctor extension for generating HTML output using multiple pages")
1642 (description
1643 "Asciidoctor generates single-page documents. This extension
1644splits documents up into multiple HTML pages according to their headings, with
1645configurable levels.")
1646 (license license:expat)
1647 (home-page "https://github.com/owenh000/asciidoctor-multipage")))
1648
1649(define-public ruby-prawn-icon
1650 (package
1651 (name "ruby-prawn-icon")
1652 (version "3.1.0")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (rubygems-uri "prawn-icon" version))
1657 (sha256
1658 (base32
1659 "049k42bqy4iq9hddf7jah83b6qr8ka63w1d63illh1mf4f4dihdk"))))
1660 (build-system ruby-build-system)
1661 (arguments
1662 `(#:test-target "spec"
1663 #:phases (modify-phases %standard-phases
1664 (add-after 'unpack 'remove-unnecessary-dependencies
1665 (lambda _
1666 (substitute* '("Rakefile" "spec/spec_helper.rb")
1667 ((".*[Bb]undler.*") "")
1668 (("^require 'rubocop.*") "")
1669 (("^RuboCop.*") "")))))))
1670 (native-inputs
1671 (list ruby-pdf-inspector ruby-pdf-reader ruby-rspec ruby-simplecov))
1672 (propagated-inputs
1673 (list ruby-prawn))
1674 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1675 (description "@code{Prawn::Icon} provides various icon fonts including
1676FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1677toolkit.")
1678 (home-page "https://github.com/jessedoyle/prawn-icon/")
1679 (license %prawn-project-licenses)))
1680
1681(define-public ruby-css-parser
1682 (package
1683 (name "ruby-css-parser")
1684 (version "1.7.1")
1685 (source
1686 (origin
1687 (method url-fetch)
1688 (uri (rubygems-uri "css_parser" version))
1689 (sha256
1690 (base32
1691 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1692 (build-system ruby-build-system)
1693 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1694 (propagated-inputs
1695 (list ruby-addressable))
1696 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1697 (description "This package allows loading, parsing and cascading Cascading
1698Style Sheets (CSS) rule sets in Ruby.")
1699 (home-page "https://github.com/premailer/css_parser")
1700 (license license:expat)))
1701
1702(define-public ruby-prawn-svg
1703 (package
1704 (name "ruby-prawn-svg")
1705 (version "0.32.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (rubygems-uri "prawn-svg" version))
1710 (sha256
1711 (base32
1712 "0mbxzw7r7hv43db9422flc24ib9d8bdy1nasbni2h998jc5a5lb6"))))
1713 (build-system ruby-build-system)
1714 (arguments
1715 (list #:phases
1716 #~(modify-phases %standard-phases
1717 (add-after 'unpack 'do-not-use-bundler
1718 (lambda _
1719 (substitute* "spec/spec_helper.rb"
1720 ((".*[Bb]undler.*") ""))))
1721 (replace 'check
1722 (lambda* (#:key tests? #:allow-other-keys)
1723 (when tests?
1724 ;; This test fails due to the recent rspec 3.12 used
1725 ;; (see: https://github.com/mogest/prawn-svg/issues/151).
1726 (delete-file "spec/prawn/svg/interface_spec.rb")
1727 (invoke "rspec" "-Ilib" "-rprawn-svg")))))))
1728 (native-inputs (list ruby-rspec))
1729 (propagated-inputs (list ruby-css-parser ruby-prawn))
1730 (synopsis "SVG renderer for the Prawn PDF library")
1731 (description "This library allows rendering Scalable Vector Graphics (SVG)
1732graphics directly into a Portable Document Format (PDF) document using the
1733Prawn module.")
1734 (home-page "https://github.com/mogest/prawn-svg")
1735 (license license:expat)))
1736
1737(define-public ruby-prawn-templates
1738 (package
1739 (name "ruby-prawn-templates")
1740 (version "0.1.2")
1741 (source
1742 (origin
1743 (method git-fetch)
1744 (uri (git-reference
1745 (url "https://github.com/prawnpdf/prawn-templates")
1746 (commit version)))
1747 (file-name (git-file-name name version))
1748 (sha256
1749 (base32
1750 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1751 (build-system ruby-build-system)
1752 (arguments
1753 `(#:phases (modify-phases %standard-phases
1754 (add-after 'unpack 'do-not-use-bundler
1755 (lambda _
1756 (substitute* "spec/spec_helper.rb"
1757 ((".*[Bb]undler.*") ""))
1758 #t))
1759 (replace 'check
1760 (lambda* (#:key tests? #:allow-other-keys)
1761 (when tests?
1762 (invoke "rspec"))
1763 #t)))))
1764 (native-inputs
1765 (list ruby-pdf-inspector ruby-rspec))
1766 (propagated-inputs
1767 (list ruby-pdf-reader ruby-prawn))
1768 (synopsis "Prawn extension to include or combine PDF documents")
1769 (description "This @strong{unmaintained} package provides a Prawn
1770extension that allows including other Portable Document Format (PDF) documents
1771as background or combining several PDF documents into one. This functionality
1772used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1773of its many longstanding issues.")
1774 (home-page "https://github.com/prawnpdf/prawn-templates")
1775 (license %prawn-project-licenses)))
1776
1777(define-public ruby-polyglot
1778 (package
1779 (name "ruby-polyglot")
1780 (version "0.3.5")
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (rubygems-uri "polyglot" version))
1785 (sha256
1786 (base32
1787 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1788 (build-system ruby-build-system)
1789 (arguments `(#:tests? #f)) ;no test suite
1790 (synopsis "Augment @code{require} to load non-Ruby file types")
1791 (description "The Polyglot library allows a Ruby module to register a
1792loader for the file type associated with a filename extension, and it augments
1793@code{require} to find and load matching files.")
1794 (home-page "https://github.com/cjheath/polyglot")
1795 (license license:expat)))
1796
1797(define-public ruby-treetop
1798 (package
1799 (name "ruby-treetop")
1800 (version "1.6.10")
1801 (source
1802 (origin
1803 (method git-fetch) ;no test suite in distributed gem
1804 (uri (git-reference
1805 (url "https://github.com/cjheath/treetop")
1806 (commit (string-append "v" version))))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32
1810 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1811 (build-system ruby-build-system)
1812 (arguments
1813 `(#:test-target "spec"))
1814 (native-inputs
1815 (list ruby-activesupport ruby-rr ruby-rspec))
1816 (propagated-inputs
1817 (list ruby-polyglot))
1818 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1819 (description "This package provides a Ruby-based Parsing Expression
1820Grammar (PEG) parser generator Domain Specific Language (DSL).")
1821 (home-page "https://github.com/cjheath/treetop")
1822 (license license:expat)))
1823
1824(define-public ruby-typhoeus
1825 (package
1826 (name "ruby-typhoeus")
1827 (version "1.4.0")
1828 (source
1829 (origin
1830 (method url-fetch)
1831 (uri (rubygems-uri "typhoeus" version))
1832 (sha256
1833 (base32
1834 "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
1835 (build-system ruby-build-system)
1836 (arguments
1837 `(#:tests? #f)) ; no included tests
1838 (propagated-inputs
1839 (list ruby-ethon))
1840 (synopsis "@code{libcurl} wrapper in Ruby")
1841 (description
1842 "Like a modern code version of the mythical beast with 100 serpent heads,
1843Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
1844logic.")
1845 (home-page "https://github.com/typhoeus/typhoeus")
1846 (license license:expat)))
1847
1848;;; A minimal variant used to build ruby-rubocop itself.
1849(define ruby-rubocop-capybara-minimal
1850 (package
1851 (name "ruby-rubocop-capybara")
1852 (version "2.17.1")
1853 (source (origin
1854 (method git-fetch) ;for tests
1855 (uri (git-reference
1856 (url "https://github.com/rubocop/rubocop-capybara")
1857 (commit (string-append "v" version))))
1858 (file-name (git-file-name name version))
1859 (sha256
1860 (base32
1861 "137y21b6g0kj1001zp95gwchx2cvgz8pglw2ik1cw647lh77qdsp"))))
1862 (build-system ruby-build-system)
1863 (arguments (list #:tests? #f))
1864 (synopsis "Capybara plugin for RuboCop")
1865 (description "This package provides a RuboCop plugin that can be used for
1866code style checking of Capybara test files (RSpec, Cucumber, Minitest).")
1867 (home-page "https://github.com/rubocop/rubocop-capybara")
1868 (license license:expat)))
1869
1870(define-public ruby-rubocop-capybara
1871 (package
1872 (inherit ruby-rubocop-capybara-minimal)
1873 (arguments
1874 (list #:test-target "spec"
1875 #:phases #~(modify-phases %standard-phases
1876 (add-after 'unpack 'relax-requirements
1877 (lambda _
1878 (substitute* "Gemfile"
1879 (("gem 'rubocop-rspec', '~> 2.16.0'")
1880 "gem 'rubocop-rspec', '>= 2.16.0'")))))))
1881 (native-inputs
1882 (list ruby-bump
1883 ruby-rack
1884 ruby-rake
1885 ruby-rspec
1886 ruby-rubocop
1887 ruby-rubocop-performance-minimal
1888 ruby-rubocop-rake-minimal
1889 ruby-rubocop-rspec-minimal
1890 ruby-simplecov
1891 ruby-yard))))
1892
1893;;; A minimal variant used to build ruby-rubocop itself.
1894(define ruby-rubocop-rake-minimal
1895 (package
1896 (name "ruby-rubocop-rake")
1897 (version "0.6.0")
1898 (source (origin
1899 (method git-fetch) ;for tests
1900 (uri (git-reference
1901 (url "https://github.com/rubocop/rubocop-rake")
1902 (commit (string-append "v" version))))
1903 (file-name (git-file-name name version))
1904 (sha256
1905 (base32
1906 "1r53szwglikbir1fvpz4i51p915khrrkl6rp61zcx3dcrclkr3ld"))))
1907 (build-system ruby-build-system)
1908 (arguments (list #:tests? #f)) ;avoid extra dependencies
1909 (synopsis "RuboCop plugin for Rake")
1910 (description "This package provides a RuboCop plugin for Rake.")
1911 (home-page "https://github.com/rubocop/rubocop-rake")
1912 (license license:expat)))
1913
1914(define-public ruby-rubocop-rake
1915 (package
1916 (inherit ruby-rubocop-rake-minimal)
1917 (arguments
1918 (list #:test-target "spec"))
1919 (native-inputs
1920 (list ruby-rake
1921 ruby-rspec
1922 ruby-rubocop
1923 ruby-rubocop-rspec))
1924 (propagated-inputs
1925 (list ruby-rubocop))))
1926
1927;;; A minimal variant used to build ruby-rubocop itself.
1928(define ruby-rubocop-rspec-minimal
1929 (package
1930 (name "ruby-rubocop-rspec")
1931 (version "2.19.0")
1932 (source
1933 (origin
1934 (method git-fetch)
1935 (uri (git-reference
1936 (url "https://github.com/rubocop/rubocop-rspec")
1937 (commit (string-append "v" version))))
1938 (file-name (git-file-name name version))
1939 (sha256
1940 (base32
1941 "0mgjyrzi8r44v3gb8xscdwspirz9kqkaf7zlsjhhlxr0di0rlj2r"))))
1942 (build-system ruby-build-system)
1943 (arguments (list #:tests? #f)) ;avoid extra dependencies
1944 (synopsis "Code style checking for RSpec files")
1945 (description "This package provides a plugin for the RuboCop code style
1946enforcing & linting tool.")
1947 (home-page "https://github.com/rubocop/rubocop-rspec")
1948 (license license:expat)))
1949
1950(define-public ruby-rubocop-rspec
1951 (package
1952 (inherit ruby-rubocop-rspec-minimal)
1953 (arguments '(#:test-target "spec"))
1954 (native-inputs
1955 (list ruby-bump
1956 ruby-rack
1957 ruby-rspec
1958 ruby-rubocop-performance-minimal
1959 ruby-rubocop-rake-minimal
1960 ruby-simplecov
1961 ruby-yard))
1962 (propagated-inputs
1963 (list ruby-rubocop
1964 ruby-rubocop-ast
1965 ruby-rubocop-capybara))))
1966
1967(define-public ruby-rubocop-packaging
1968 (package
1969 (name "ruby-rubocop-packaging")
1970 (version "0.5.2")
1971 (source
1972 (origin
1973 (method git-fetch)
1974 (uri (git-reference
1975 (url "https://github.com/utkarsh2102/rubocop-packaging")
1976 (commit (string-append "v" version))))
1977 (file-name (git-file-name name version))
1978 (sha256
1979 (base32
1980 "08jsfp42z0aj32002z2hz8vkmza0jvnrqk9rk2v0xb8qdxkgbx3l"))))
1981 (build-system ruby-build-system)
1982 (arguments
1983 (list #:test-target "spec"))
1984 (propagated-inputs
1985 (list ruby-rubocop))
1986 (native-inputs
1987 (list ruby-rspec
1988 ruby-yard
1989 ruby-bump))
1990 (synopsis
1991 "Collection of RuboCop checks for downstream compatibility issues")
1992 (description
1993 "This package provides a collection of RuboCop cops to check for
1994downstream compatibility issues in the Ruby code.")
1995 (home-page "https://github.com/utkarsh2102/rubocop-packaging")
1996 (license license:expat)))
1997
1998(define-public ruby-rubocop-performance
1999 (package
2000 (name "ruby-rubocop-performance")
2001 (version "1.16.0")
2002 (source
2003 (origin
2004 (method git-fetch)
2005 (uri (git-reference
2006 (url "https://github.com/rubocop/rubocop-performance")
2007 (commit (string-append "v" version))))
2008 (file-name (git-file-name name version))
2009 (sha256
2010 (base32
2011 "1axafki2mpdz38y7i0afmnxcan5wj54l8crp8pbs7h1cip7y4s49"))))
2012 (build-system ruby-build-system)
2013 (arguments
2014 `(#:tests? #f ; tests require a git checkout of rubocop's source code.
2015 #:phases
2016 (modify-phases %standard-phases
2017 (replace 'replace-git-ls-files
2018 (lambda _
2019 (substitute* "rubocop-performance.gemspec"
2020 (("`git ls-files -z config lib LICENSE.txt README.md`")
2021 "`find config lib LICENSE.txt README.md \
2022-type f -print0 |sort -z`"))))
2023 (add-before 'check 'set-HOME
2024 (lambda _
2025 (setenv "HOME" "/tmp"))))))
2026 (propagated-inputs
2027 (list ruby-rubocop ruby-rubocop-ast))
2028 (native-inputs
2029 (list ruby-bump ruby-yard))
2030 (synopsis "Performance optimizations checkers for Ruby code")
2031 (description "This package provides a collection of RuboCop cops to check
2032for performance optimizations in Ruby code.")
2033 (home-page "https://docs.rubocop.org/rubocop-performance/")
2034 (license license:expat)))
2035
2036(define-public ruby-rubocop-performance-minimal
2037 (hidden-package
2038 (package
2039 (inherit ruby-rubocop-performance)
2040 (arguments
2041 (substitute-keyword-arguments (package-arguments ruby-rubocop-performance)
2042 ((#:tests? _ #f) #f)))
2043 (propagated-inputs '())
2044 (native-inputs '()))))
2045
2046(define-public ruby-gimme
2047 (let ((revision "1")
2048 (commit "4e71f0236f1271871916dd403261d26533db34c0"))
2049 (package
2050 (name "ruby-gimme")
2051 (version (git-version "0.5.0" revision commit))
2052 (source
2053 (origin
2054 (method git-fetch)
2055 (uri (git-reference
2056 (url "https://github.com/searls/gimme")
2057 (commit commit)))
2058 (file-name (git-file-name name version))
2059 (sha256
2060 (base32
2061 "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
2062 (build-system ruby-build-system)
2063 (native-inputs
2064 (list ruby-coveralls ruby-cucumber ruby-pry ruby-simplecov
2065 ruby-rspec-given))
2066 (arguments
2067 `(;; The cucumber task fails with error: "index 3 out of matches
2068 ;; (IndexError)", apparently due to our newer Cucumber version.
2069 ;; TODO: Try the "default" task with a future release.
2070 #:test-target "spec"
2071 #:phases
2072 (modify-phases %standard-phases
2073 (add-after 'extract-gemspec 'prepare-for-tests
2074 (lambda _
2075 ;; Delete failing tests (possibly due to our newer rspec
2076 ;; version).
2077 (delete-file "spec/gimme/gives_class_methods_spec.rb")
2078 (delete-file "spec/gimme/rspec_adapter_spec.rb")
2079 (delete-file "spec/gimme/verifies_class_methods_spec.rb")
2080 ;; Fix duplicate version requirements and de-register files.
2081 (delete-file "Gemfile")
2082 (delete-file "Gemfile.lock")
2083 (substitute* "gimme.gemspec"
2084 ((".*\"Gemfile\".*") "")
2085 ((".*\"Gemfile\\.lock\",.*") "")
2086 ((".*(rspec|cucumber).*\">= 0\".*") "")
2087 (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
2088 (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
2089 (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
2090 ;; All of these gems relate to development, and are
2091 ;; unnecessary when running the tests.
2092 ((".*(add|gem).*guard-.*") "")
2093 ((".*(add|gem).*jeweler.*") "")
2094 ((".*(add|gem).*pry.*") "")
2095 ((".*(add|gem).*growl.*") "")
2096 ((".*(add|gem).*rb-fsevent.*") ""))
2097 #t)))))
2098 (synopsis "Lightweight test double library for Ruby")
2099 (description "Gimme is a very lightweight test double library for Ruby,
2100based on Mockito (a mocking framework for Java). It is an opinionated (but
2101not noisy) means to facilitate test-driving by enabling the authors to specify
2102only what they care about.")
2103 (home-page "https://github.com/searls/gimme")
2104 (license license:expat))))
2105
2106(define-public ruby-stud
2107 (package
2108 (name "ruby-stud")
2109 (version "0.0.23")
2110 (source (origin
2111 (method url-fetch)
2112 (uri (rubygems-uri "stud" version))
2113 (sha256
2114 (base32
2115 "0qpb57cbpm9rwgsygqxifca0zma87drnlacv49cqs2n5iyi6z8kb"))))
2116 (build-system ruby-build-system)
2117 (native-inputs (list ruby-rspec))
2118 (arguments
2119 (list #:phases #~(modify-phases %standard-phases
2120 ;; No Rakefile is included, so run rspec directly.
2121 (replace 'check
2122 (lambda* (#:key tests? #:allow-other-keys)
2123 (when tests?
2124 (invoke "rspec")))))))
2125 (synopsis "Retries, worker supervision, resource pools and more for Ruby")
2126 (description "The Stud Ruby library adds a few things missing from the
2127standard Ruby library such as:
2128@table @code
2129@item {Stud::Try}
2130Retry on failure, with back-off, where failure is any exception.
2131@item {Stud::Pool}
2132Generic resource pools.
2133@item {Stud::Task}
2134Tasks (threads that can return values, exceptions, etc.)
2135@item {Stud.interval}
2136Interval execution (do X every N seconds).
2137@item {Stud::Buffer}
2138Batch and flush behavior.
2139@end itemize")
2140 (home-page "https://github.com/jordansissel/ruby-stud")
2141 (license license:asl2.0)))
2142
2143(define-public ruby-standard
2144 (package
2145 (name "ruby-standard")
2146 (version "1.25.3")
2147 (source
2148 (origin
2149 (method git-fetch) ;no test suite in distributed gem
2150 (uri (git-reference
2151 (url "https://github.com/testdouble/standard")
2152 (commit (string-append "v" version))))
2153 (file-name (git-file-name name version))
2154 (sha256
2155 (base32
2156 "0q42gv7wgrc818a5hm599sy07vjq69hbijzpkpgh6jws6x7wzyh3"))))
2157 (build-system ruby-build-system)
2158 (arguments
2159 `(#:phases
2160 (modify-phases %standard-phases
2161 (add-after 'unpack 'set-HOME
2162 (lambda _
2163 ;; Some tests fail otherwise.
2164 (setenv "HOME" "/tmp")))
2165 (add-after 'unpack 'relax-requirements
2166 (lambda _
2167 (substitute* "standard.gemspec"
2168 (("\"rubocop\", \"1.44.1\"")
2169 "\"rubocop\", \">= 1.44.1\"")
2170 (("\"rubocop-performance\", \"1.15.2\"")
2171 "\"rubocop-performance\", \">= 1.15.2\""))))
2172 (add-after 'unpack 'delete-problematic-tests
2173 ;; These tests fail for unknown reasons (see:
2174 ;; https://github.com/testdouble/standard/issues/532).
2175 (lambda _
2176 (for-each
2177 delete-file
2178 '("test/standard_test.rb"
2179 "test/standard/cop/block_single_line_braces_test.rb")))))))
2180 (native-inputs
2181 (list ruby-gimme
2182 ruby-pry
2183 ruby-simplecov))
2184 (propagated-inputs
2185 (list ruby-language-server-protocol
2186 ruby-rubocop
2187 ruby-rubocop-performance))
2188 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
2189 (description "Standard is a port of StandardJS. Like StandardJS, it aims
2190to save time in the following ways:
2191@itemize
2192@item No configuration.
2193@item Automatically format code.
2194@item Catch style issues and programmer errors early.
2195@end itemize")
2196 (home-page "https://github.com/testdouble/standard")
2197 (license license:expat)))
2198
2199(define-public ruby-chunky-png
2200 (package
2201 (name "ruby-chunky-png")
2202 (version "1.4.0")
2203 (source
2204 (origin
2205 (method git-fetch)
2206 (uri (git-reference
2207 (url "https://github.com/wvanbergen/chunky_png")
2208 (commit (string-append "v" version))))
2209 (file-name (git-file-name name version))
2210 (sha256
2211 (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))))
2212 (build-system ruby-build-system)
2213 (arguments
2214 (list
2215 #:test-target "spec"
2216 #:phases
2217 #~(modify-phases %standard-phases
2218 (add-after 'unpack 'disable-bundler
2219 (lambda _
2220 (substitute* (find-files "." "\\.rb$")
2221 (("require.*bundler/setup.*") "")))))))
2222 (native-inputs
2223 (list bundler ruby-rspec ruby-standard ruby-yard))
2224 (synopsis "Ruby library to handle PNG images")
2225 (description "ChunkyPNG is a pure Ruby library that can read and write
2226Portable Network Graphics (PNG) images without depending on an external image
2227library. It tries to be memory efficient and reasonably fast. It has
2228features such as:
2229@itemize
2230@item
2231Decoding support for any image that the PNG standard allows. This includes all
2232standard color modes, all bit depths, all transparency, and interlacing and
2233filtering options.
2234@item
2235Encoding support for images of all color modes (true color, grayscale, and
2236indexed) and transparency for all these color modes. The best color mode is
2237chosen automatically, based on the amount of used colors.
2238@item Read/write access to the image's pixels.
2239@item Read/write access to all image metadata that is stored in chunks.
2240@item
2241Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
2242pixel, depending on the hardware).
2243@item
2244Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
2245integer math and a highly optimized saving routine.
2246@item Interoperability with RMagick.
2247@end itemize
2248
2249ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
2250loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
2251Deal with untrusted images in a separate process, e.g., by using @code{fork}
2252or a background processing library.")
2253 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
2254 (license license:expat)))
2255
2256(define-public ruby-text-hyphen
2257 (package
2258 (name "ruby-text-hyphen")
2259 (version "1.5.0")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (rubygems-uri "text-hyphen" version))
2264 (sha256
2265 (base32
2266 "01js0wxz84cc5hzxgqbcqnsa0y6crhdi6plmgkzyfm55p0rlajn4"))))
2267 (build-system ruby-build-system)
2268 (native-inputs
2269 (list ruby-hoe))
2270 (synopsis "Ruby library to hyphenate words in various languages")
2271 (description "Text::Hyphen is a Ruby library to hyphenate words in various
2272languages using Ruby-fied versions of TeX hyphenation patterns. It will
2273properly hyphenate various words according to the rules of the language the
2274word is written in. The algorithm is based on that of the TeX typesetting
2275system by Donald E. Knuth.")
2276 (home-page "https://github.com/halostatue/text-hyphen")
2277 ;; The whole is licensed under the Expat license, but parts use various
2278 ;; versions of the LaTeX Project Public License.
2279 (license license:expat)))
2280
2281(define-public ruby-open-uri-cached
2282 (package
2283 (name "ruby-open-uri-cached")
2284 (version "1.0.0")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (rubygems-uri "open-uri-cached" version))
2289 (sha256
2290 (base32
2291 "03v0if3jlvbclnd6jgjk94fbhf0h2fq1wxr0mbx7018sxzm0biwr"))))
2292 (build-system ruby-build-system)
2293 (arguments
2294 `(#:tests? #f)) ;no test suite
2295 (synopsis "OpenURI with transparent disk caching")
2296 (description "OpenURI with transparent disk caching, which is
2297useful to avoid making excessive queries, for example when scraping
2298web pages.")
2299 (home-page "https://github.com/tigris/open-uri-cached")
2300 (license license:expat)))
2301
2302(define-public ruby-asciidoctor-pdf
2303 (package
2304 (name "ruby-asciidoctor-pdf")
2305 (version "2.3.4")
2306 (source
2307 (origin
2308 (method git-fetch) ;no test suite in the distributed gem
2309 (uri (git-reference
2310 (url "https://github.com/asciidoctor/asciidoctor-pdf")
2311 (commit (string-append "v" version))))
2312 (file-name (git-file-name name version))
2313 (sha256
2314 (base32
2315 "07krhpj2ylz7h7hy8vg0js8yv828qxh3mkhx0bsrfh0p24xwbjrm"))))
2316 (build-system ruby-build-system)
2317 (arguments
2318 (list
2319 #:test-target "spec"
2320 #:phases
2321 #~(modify-phases %standard-phases
2322 (add-after 'extract-gemspec 'strip-version-requirements
2323 (lambda _
2324 (substitute* "asciidoctor-pdf.gemspec"
2325 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
2326 (string-append stripped "\n")))))
2327 ;; The tests rely on the Gem being installed, so move the check
2328 ;; phase after the install phase.
2329 (delete 'check)
2330 (add-after 'install 'check
2331 (lambda* (#:key tests? #:allow-other-keys)
2332 (setenv "GEM_PATH" (string-append
2333 (getenv "GEM_PATH") ":"
2334 #$output "/lib/ruby/vendor_ruby"))
2335 (when tests?
2336 (invoke "rspec" "-t" "~visual" "-t" "~cli"
2337 "-t" "~network")))))))
2338 (native-inputs
2339 (list ruby-chunky-png
2340 ruby-coderay
2341 ruby-pdf-inspector
2342 ruby-rouge
2343 ruby-rspec))
2344 (propagated-inputs
2345 (list ruby-asciidoctor
2346 ruby-concurrent
2347 ruby-open-uri-cached
2348 ruby-prawn
2349 ruby-prawn-icon
2350 ruby-prawn-svg
2351 ruby-prawn-table
2352 ruby-prawn-templates
2353 ruby-safe-yaml
2354 ruby-text-hyphen
2355 ruby-thread-safe
2356 ruby-treetop
2357 ruby-ttfunk))
2358 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
2359 (description "Asciidoctor PDF is an extension for Asciidoctor that
2360converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
2361PDF library. It has features such as:
2362@itemize
2363@item Direct AsciiDoc to PDF conversion
2364@item Configuration-driven theme (style and layout)
2365@item Scalable Vector Graphics (SVG) support
2366@item PDF document outline (i.e., bookmarks)
2367@item Table of contents page(s)
2368@item Document metadata (title, authors, subject, keywords, etc.)
2369@item Internal cross reference links
2370@item Syntax highlighting with Rouge, Pygments, or CodeRay
2371@item Page numbering
2372@item Customizable running content (header and footer)
2373@item
2374“Keep together” blocks (i.e., page breaks avoided in certain block content)
2375@item Orphaned section titles avoided
2376@item Autofit verbatim blocks (as permitted by base_font_size_min setting)
2377@item Table border settings honored
2378@item Font-based icons
2379@item Custom TrueType (TTF) fonts
2380@item Double-sided printing mode (margins alternate on recto and verso pages)
2381@end itemize")
2382 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
2383 (license license:expat)))
2384
2385(define-public ruby-ast
2386 (package
2387 (name "ruby-ast")
2388 (version "2.4.2")
2389 (source
2390 (origin
2391 (method git-fetch) ;no test included in gem from v2.4.1
2392 (uri (git-reference
2393 (url "https://github.com/whitequark/ast")
2394 (commit (string-append "v" version))))
2395 (file-name (git-file-name name version))
2396 (sha256
2397 (base32
2398 "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
2399 (build-system ruby-build-system)
2400 (arguments
2401 '(#:phases
2402 (modify-phases %standard-phases
2403 (add-after 'unpack 'remove-coveralls-requirement
2404 (lambda _
2405 (substitute* "test/helper.rb"
2406 (("require 'coveralls'") "")
2407 (("Coveralls::SimpleCov::Formatter") ""))
2408 #t))
2409 (add-after 'extract-gemspec 'remove-unnecessary-requirements
2410 (lambda* (#:key inputs #:allow-other-keys)
2411 (substitute* "ast.gemspec"
2412 ((".*coveralls.*") "\n")
2413 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
2414 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
2415 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
2416 (("12\\.3") "13.0"))
2417 #t)))))
2418 (native-inputs
2419 (list bundler
2420 ruby-bacon
2421 ruby-bacon-colored-output
2422 ruby-json-pure
2423 ruby-kramdown
2424 ruby-mime-types
2425 ruby-racc
2426 ruby-rest-client
2427 ruby-simplecov
2428 ruby-yard))
2429 (synopsis "Library for working with Abstract Syntax Trees")
2430 (description
2431 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
2432It does this through immutable data structures.")
2433 (home-page "https://whitequark.github.io/ast/")
2434 (license license:expat)))
2435
2436(define-public ruby-sporkmonger-rack-mount
2437 ;; Testing the addressable gem requires a newer commit than that released, so
2438 ;; use an up to date version.
2439 (let ((revision "1")
2440 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
2441 (package
2442 (name "ruby-sporkmonger-rack-mount")
2443 (version (git-version "0.8.3" revision commit))
2444 (source (origin
2445 (method git-fetch)
2446 (uri (git-reference
2447 (url "https://github.com/sporkmonger/rack-mount")
2448 (commit commit)))
2449 (file-name (git-file-name name version))
2450 (sha256
2451 (base32
2452 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
2453 (build-system ruby-build-system)
2454 (arguments
2455 ;; Tests currently fail so disable them.
2456 ;; https://github.com/sporkmonger/rack-mount/pull/1
2457 `(#:tests? #f))
2458 (propagated-inputs (list ruby-rack))
2459 (synopsis "Stackable dynamic tree based Rack router")
2460 (description
2461 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
2462continue trying routes if the response returns pass. This allows multiple
2463routes to be nested or stacked on top of each other.")
2464 (home-page "https://github.com/sporkmonger/rack-mount")
2465 (license license:expat))))
2466
2467(define-public ruby-ci-reporter
2468 (package
2469 (name "ruby-ci-reporter")
2470 (version "2.0.0")
2471 (source (origin
2472 (method url-fetch)
2473 (uri (rubygems-uri "ci_reporter" version))
2474 (sha256
2475 (base32
2476 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
2477 (build-system ruby-build-system)
2478 (arguments
2479 `(#:test-target "rspec"))
2480 (propagated-inputs
2481 (list ruby-builder))
2482 (native-inputs
2483 (list bundler ruby-rspec))
2484 (synopsis "Generate XML reports of runs test")
2485 (description
2486 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2487you to generate XML reports of your test runs. The resulting files can be
2488read by a continuous integration system that understands Ant's JUnit report
2489format.")
2490 (home-page "https://github.com/nicksieger/ci_reporter")
2491 (license license:expat)))
2492
2493(define-public ruby-console
2494 (package
2495 (name "ruby-console")
2496 (version "1.16.2")
2497 (source (origin
2498 (method url-fetch)
2499 (uri (rubygems-uri "console" version))
2500 (sha256
2501 (base32
2502 "0y1bv3kd1l9p0k5n3anvvjxdrcq113pyngz2g29i9mvdgbbx7kq2"))))
2503 (build-system ruby-build-system)
2504 ;; XXX: Disable test suite to avoid dependency cycles with ruby-samovar.
2505 (arguments (list #:tests? #f))
2506 (propagated-inputs (list ruby-fiber-local))
2507 (synopsis "Console logging library for Ruby")
2508 (description "This gem provides beautiful console logging for Ruby
2509applications. It implements fast, buffered log output and has the following
2510features:
2511@itemize
2512@item Thread safe global logger with per-fiber context
2513@item Carry along context with nested loggers
2514@item Enable/disable log levels per class
2515@item Detailed logging of exceptions
2516@item Beautiful logging to the terminal or structured logging using JSON.
2517@end itemize")
2518 (home-page "https://github.com/socketry/console")
2519 (license license:expat)))
2520
2521(define-public ruby-contracts
2522 (package
2523 (name "ruby-contracts")
2524 (version "0.17")
2525 (source
2526 (origin
2527 (method url-fetch)
2528 (uri (rubygems-uri "contracts" version))
2529 (sha256
2530 (base32
2531 "0gfybfsb6kqxvvcrv1q7bfjaxmq73pf3vqy4bbzarkbajil05ii5"))))
2532 (build-system ruby-build-system)
2533 (arguments
2534 (list
2535 #:test-target "spec"
2536 #:phases
2537 #~(modify-phases %standard-phases
2538 ;; Don't run or require rubocop, the code linting tool, as this is a
2539 ;; bit unnecessary.
2540 (add-after 'unpack 'dont-run-rubocop
2541 (lambda _
2542 (substitute* "Rakefile"
2543 ((".*rubocop.*") "")
2544 ((".*RuboCop.*") "")))))))
2545 (native-inputs
2546 (list ruby-rspec))
2547 (synopsis "Method contracts for Ruby")
2548 (description
2549 "This library provides contracts for Ruby. A contract describes the
2550correct inputs and output for a method, and will raise an error if a incorrect
2551value is found.")
2552 (home-page "https://github.com/egonSchiele/contracts.ruby")
2553 (license license:bsd-2)))
2554
2555(define-public ruby-crack
2556 (package
2557 (name "ruby-crack")
2558 (version "0.4.5")
2559 (source
2560 (origin
2561 (method url-fetch)
2562 (uri (rubygems-uri "crack" version))
2563 (sha256
2564 (base32
2565 "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
2566 (build-system ruby-build-system)
2567 (arguments
2568 `(#:phases
2569 (modify-phases %standard-phases
2570 (replace 'check
2571 (lambda* (#:key tests? #:allow-other-keys)
2572 (when tests?
2573 (for-each (lambda (file)
2574 (display file)(display "\n")
2575 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2576 (find-files "test" ".*rb$")))
2577 #t)))))
2578 (synopsis "Simple JSON and XML parsing for Ruby")
2579 (description
2580 "@code{crack} provides really simple JSON and XML parsing, extracted from
2581code in Merb and Rails.")
2582 (home-page "https://github.com/jnunemaker/crack")
2583 (license license:expat)))
2584
2585(define-public ruby-clamp
2586 (package
2587 (name "ruby-clamp")
2588 (version "1.3.2")
2589 (source (origin
2590 (method url-fetch)
2591 (uri (rubygems-uri "clamp" version))
2592 (sha256
2593 (base32
2594 "08m0syh06bhx8dqn560ivjg96l5cs5s3l9jh2szsnlcdcyl9jsjg"))))
2595 (build-system ruby-build-system)
2596 (arguments
2597 (list #:test-target "spec"
2598 #:phases #~(modify-phases %standard-phases
2599 (add-after 'unpack 'do-not-require-rubocop
2600 (lambda _
2601 (substitute* "Rakefile"
2602 (("require \"rubocop/rake_task\"")
2603 "")
2604 (("RuboCop::RakeTask.new")
2605 "")))))))
2606 (native-inputs (list ruby-rspec))
2607 (synopsis "Command-line parsing library for Ruby")
2608 (description "Clamp provides an object-model for command-line utilities.
2609It handles parsing of command-line options, and generation of usage help.")
2610 (home-page "https://github.com/mdub/clamp")
2611 (license license:expat)))
2612
2613(define-public ruby-cliver
2614 (package
2615 (name "ruby-cliver")
2616 (version "0.3.2")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (rubygems-uri "cliver" version))
2621 (sha256
2622 (base32
2623 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2624 (build-system ruby-build-system)
2625 (arguments
2626 '(#:phases
2627 (modify-phases %standard-phases
2628 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2629 ;; would be nice, but the tests look to be incompatible:
2630 ;;
2631 ;; NoMethodError: undefined method `last_comment'
2632 (replace 'check
2633 (lambda* (#:key tests? #:allow-other-keys)
2634 (when tests?
2635 (invoke "rspec"))
2636 #t)))))
2637 (native-inputs
2638 (list bundler ruby-rspec-2))
2639 (synopsis "Assertions for command-line dependencies in Ruby")
2640 (description
2641 "@code{cliver} provides a way to detect missing command-line
2642dependencies, including versions.")
2643 (home-page "https://github.com/yaauie/cliver")
2644 (license license:expat)))
2645
2646(define-public ruby-czmq-ffi-gen
2647 (package
2648 (name "ruby-czmq-ffi-gen")
2649 (version "0.13.0")
2650 (source
2651 (origin
2652 (method url-fetch)
2653 (uri (rubygems-uri "czmq-ffi-gen" version))
2654 (sha256
2655 (base32
2656 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2657 (build-system ruby-build-system)
2658 (arguments
2659 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2660 #:phases
2661 (modify-phases %standard-phases
2662 (add-after 'unpack 'patch-lib_dirs
2663 (lambda* (#:key inputs #:allow-other-keys)
2664 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2665 (("lib\\_dirs = \\[.*\\]")
2666 (string-append "lib_dirs = ['"
2667 (assoc-ref inputs "czmq") "/lib"
2668 "']")))
2669 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2670 (("lib\\_dirs = \\[.*\\]")
2671 (string-append "lib_dirs = ['"
2672 (assoc-ref inputs "zeromq") "/lib"
2673 "']"))))))))
2674 (inputs
2675 (list zeromq czmq))
2676 (propagated-inputs (list ruby-ffi))
2677 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2678 (description
2679 "These Ruby bindings are not intended to be directly used, but rather
2680used by higher level bindings like those provided by CZTop.")
2681 (home-page
2682 "https://github.com/paddor/czmq-ffi-gen")
2683 (license license:isc)))
2684
2685(define-public ruby-cztop
2686 (package
2687 (name "ruby-cztop")
2688 (version "0.12.2")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (rubygems-uri "cztop" version))
2693 (sha256
2694 (base32
2695 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2696 (build-system ruby-build-system)
2697 (arguments
2698 '(#:test-target "spec"
2699 #:phases
2700 (modify-phases %standard-phases
2701 (add-after 'unpack 'patch-lib_paths
2702 (lambda* (#:key inputs #:allow-other-keys)
2703 (substitute* "lib/cztop/poller/zmq.rb"
2704 (("lib\\_paths = \\[.*\\]")
2705 (string-append "lib_paths = ['"
2706 (assoc-ref inputs "zeromq") "/lib"
2707 "']"))))))))
2708 (native-inputs
2709 (list bundler ruby-rspec))
2710 (inputs
2711 (list zeromq))
2712 (propagated-inputs
2713 (list ruby-czmq-ffi-gen))
2714 (synopsis "CZMQ Ruby bindings")
2715 (description
2716 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2717CZMQ. The focus of of CZTop is on being easy to use and providing first class
2718support for security mechanisms.")
2719 (home-page "https://github.com/paddor/cztop")
2720 (license license:isc)))
2721
2722(define-public ruby-saikuro-treemap
2723 (package
2724 (name "ruby-saikuro-treemap")
2725 (version "0.2.0")
2726 (source (origin
2727 (method url-fetch)
2728 (uri (rubygems-uri "saikuro_treemap" version))
2729 (sha256
2730 (base32
2731 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2732 (build-system ruby-build-system)
2733 ;; Some of the tests fail because the generated JSON has keys in a
2734 ;; different order. This is a problem with the test suite rather than any
2735 ;; of the involved libraries.
2736 (arguments `(#:tests? #f))
2737 (propagated-inputs
2738 (list ruby-json-pure ruby-atoulme-saikuro))
2739 (synopsis "Generate complexity treemap based on saikuro analysis")
2740 (description
2741 "This gem generates a treemap showing the complexity of Ruby code on
2742which it is run. It uses Saikuro under the covers to analyze Ruby code
2743complexity.")
2744 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2745 (license license:expat)))
2746
2747(define-public ruby-oauth2
2748 (package
2749 (name "ruby-oauth2")
2750 (version "2.0.9")
2751 (source (origin
2752 (method git-fetch) ;for tests
2753 (uri (git-reference
2754 (url "https://gitlab.com/oauth-xx/oauth2")
2755 (commit (string-append "v" version))))
2756 (file-name (git-file-name name version))
2757 (sha256
2758 (base32
2759 "191j1f4gjw8wij1jy2fvddgi8cv1mm0ki7v0b0795clix1avnj29"))))
2760 (build-system ruby-build-system)
2761 (arguments
2762 (list #:phases #~(modify-phases %standard-phases
2763 (add-after 'unpack 'relax-requirements
2764 (lambda _
2765 (substitute* "Gemfile"
2766 (("^linting = .*")
2767 "linting = false\n")
2768 (("^coverage = .*")
2769 "coverage = false\n")
2770 (("^debug = .*")
2771 "debug = false\n"))
2772 (substitute* "spec/spec_helper.rb"
2773 (("^RUN_COVERAGE = .*")
2774 "RUN_COVERAGE = false\n")
2775 (("^ALL_FORMATTERS = .*")
2776 "ALL_FORMATTERS = false\n")))))))
2777 (native-inputs
2778 (list ruby-addressable
2779 ruby-backports
2780 ruby-rexml
2781 ruby-rspec-block-is-expected
2782 ruby-rspec-pending-for
2783 ruby-rspec-stubbed-env
2784 ruby-silent-stream))
2785 (propagated-inputs
2786 (list ruby-faraday
2787 ruby-jwt
2788 ruby-multi-json
2789 ruby-multi-xml
2790 ruby-rack
2791 ruby-snaky-hash))
2792 (synopsis "Ruby wrapper for the OAuth 2.0")
2793 (description
2794 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2795with a similar style to the original OAuth spec.")
2796 (home-page "https://github.com/oauth-xx/oauth2")
2797 (license license:expat)))
2798
2799(define-public ruby-omniauth
2800 (package
2801 (name "ruby-omniauth")
2802 (version "2.1.1")
2803 (source (origin
2804 (method git-fetch) ;for tests
2805 (uri (git-reference
2806 (url "https://github.com/omniauth/omniauth")
2807 (commit (string-append "v" version))))
2808 (file-name (git-file-name name version))
2809 (sha256
2810 (base32
2811 "1mm7a4ll7ymamrbsl63yi6i34qpwmh2nh5a9kj961gja1iz2gyd1"))))
2812 (build-system ruby-build-system)
2813 (arguments
2814 (list #:phases
2815 #~(modify-phases %standard-phases
2816 (add-after 'unpack 'relax-requirements
2817 (lambda _
2818 (substitute* "spec/helper.rb"
2819 ;; This condition is used to require coveralls and
2820 ;; simplecov; override it to avoid these extraneous
2821 ;; requirements.
2822 (("RUBY_VERSION >= '1.9'")
2823 "false")
2824 (("require 'rack/freeze'") "")))))))
2825 (native-inputs (list ruby-rspec))
2826 (propagated-inputs (list ruby-hashie ruby-rack ruby-rack-test
2827 ruby-rack-protection))
2828 (synopsis "Generalized Rack framework for multiple-provider authentication")
2829 (description
2830 "This package provides a generalized Rack framework for multiple-provider
2831authentication.")
2832 (home-page "https://github.com/omniauth/omniauth")
2833 (license license:expat)))
2834
2835(define-public ruby-omniauth-oauth2
2836 (package
2837 (name "ruby-omniauth-oauth2")
2838 (version "1.8.0")
2839 (source
2840 (origin
2841 (method url-fetch)
2842 (uri (rubygems-uri "omniauth-oauth2" version))
2843 (sha256
2844 (base32
2845 "0y4y122xm8zgrxn5nnzwg6w39dnjss8pcq2ppbpx9qn7kiayky5j"))))
2846 (build-system ruby-build-system)
2847 (arguments
2848 (list #:phases
2849 #~(modify-phases %standard-phases
2850 (add-after 'unpack 'relax-requirements
2851 (lambda _
2852 (substitute* "spec/helper.rb"
2853 ;; This condition is used to require coveralls and
2854 ;; simplecov; override it to avoid these extraneous
2855 ;; requirements.
2856 (("RUBY_VERSION >= \"1.9\"")
2857 "false")))))))
2858 (propagated-inputs (list ruby-oauth2 ruby-omniauth))
2859 (native-inputs (list ruby-rspec ruby-rack-test ruby-webmock))
2860 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2861 (description
2862 "This library provides a generic OAuth2 strategy for OmniAuth. It
2863doesn't provide a way to gather user information, so should be used as a
2864building block for authentication strategies.")
2865 (home-page "https://github.com/omniauth/omniauth-oauth2")
2866 (license license:expat)))
2867
2868(define-public ruby-open4
2869 (package
2870 (name "ruby-open4")
2871 (version "1.3.4")
2872 (source
2873 (origin
2874 (method url-fetch)
2875 (uri (rubygems-uri "open4" version))
2876 (sha256
2877 (base32
2878 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2879 (build-system ruby-build-system)
2880 (arguments
2881 '(#:phases
2882 (modify-phases %standard-phases
2883 (add-after 'unpack 'patch
2884 (lambda _
2885 (substitute* "rakefile"
2886 ;; Update the Rakefile so it works
2887 (("-rubygems") "-rrubygems")
2888 (("Config") "RbConfig"))
2889 #t))
2890 (add-before 'check 'set-LIB
2891 (lambda _
2892 ;; This is used in the rakefile when running the tests
2893 (setenv "LIB" "open4")
2894 #t)))))
2895 (synopsis "Open child processes from Ruby and manage them easily")
2896 (description
2897 "@code{Open4} is a Ruby library to run child processes and manage their
2898input and output.")
2899 (home-page "https://github.com/ahoward/open4")
2900 (license license:ruby)))
2901
2902(define-public ruby-options
2903 (package
2904 (name "ruby-options")
2905 (version "2.3.2")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (rubygems-uri "options" version))
2910 (sha256
2911 (base32
2912 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2913 (build-system ruby-build-system)
2914 (arguments
2915 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2916 #:phases
2917 (modify-phases %standard-phases
2918 (add-before 'check 'set-LIB
2919 (lambda _
2920 ;; This is used in the Rakefile, and setting it avoids an issue
2921 ;; with running the tests.
2922 (setenv "LIB" "options")
2923 #t)))))
2924 (synopsis "Ruby library to parse options from *args cleanly")
2925 (description
2926 "The @code{options} library helps with parsing keyword options in Ruby
2927functions.")
2928 (home-page "https://github.com/ahoward/options")
2929 (license license:ruby)))
2930
2931(define-public ruby-erubi
2932 (package
2933 (name "ruby-erubi")
2934 (version "1.8.0")
2935 (source
2936 (origin
2937 (method url-fetch)
2938 (uri (rubygems-uri "erubi" version))
2939 (sha256
2940 (base32
2941 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2942 (build-system ruby-build-system)
2943 (synopsis "ERB template engine for Ruby")
2944 (description
2945 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2946Erubis")
2947 (home-page "https://github.com/jeremyevans/erubi")
2948 (license license:expat)))
2949
2950(define-public ruby-erubis
2951 (package
2952 (name "ruby-erubis")
2953 (version "2.7.0")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (rubygems-uri "erubis" version))
2958 (sha256
2959 (base32
2960 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2961 (build-system ruby-build-system)
2962 (arguments
2963 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2964 (synopsis "Implementation of embedded Ruby (eRuby)")
2965 (description
2966 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2967features such as multi-language support, auto escaping, auto trimming spaces
2968around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2969support.")
2970 (home-page "http://www.kuwata-lab.com/erubis/")
2971 (license license:expat)))
2972
2973(define-public ruby-ethon
2974 (package
2975 (name "ruby-ethon")
2976 (version "0.12.0")
2977 (source
2978 (origin
2979 (method url-fetch)
2980 (uri (rubygems-uri "ethon" version))
2981 (sha256
2982 (base32
2983 "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
2984 (build-system ruby-build-system)
2985 (arguments
2986 `(#:tests? #f)) ; no included tests
2987 (inputs
2988 (list curl))
2989 (propagated-inputs
2990 (list ruby-ffi))
2991 (synopsis "Very lightweight @code{libcurl} wrapper")
2992 (description
2993 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
2994 (home-page "https://github.com/typhoeus/ethon")
2995 (license license:expat)))
2996
2997(define-public ruby-execjs
2998 (package
2999 (name "ruby-execjs")
3000 (version "2.7.0")
3001 (source
3002 (origin
3003 ;; fetch from github as the gem does not contain testing code
3004 (method git-fetch)
3005 (uri (git-reference
3006 (url "https://github.com/rails/execjs")
3007 (commit (string-append "v" version))))
3008 (file-name (git-file-name name version))
3009 (sha256
3010 (base32
3011 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
3012 (build-system ruby-build-system)
3013 (native-inputs
3014 (list bundler
3015 ;; The test suite tests all the available backends. Currenly, this just
3016 ;; means the node backend.
3017 ;;
3018 ;; PASSED: test:node
3019 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
3020 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
3021 node))
3022 (synopsis "Run JavaScript code from Ruby")
3023 (description
3024 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
3025runtime to evaluate your JavaScript program, then returns the result to you as
3026a Ruby object.")
3027 (home-page "https://github.com/rails/execjs")
3028 (license license:expat)))
3029
3030(define-public ruby-fakefs
3031 (package
3032 (name "ruby-fakefs")
3033 (version "1.2.2")
3034 (home-page "https://github.com/fakefs/fakefs")
3035 (source (origin
3036 ;; The Rubygems release does not contain tests.
3037 (method git-fetch)
3038 (uri (git-reference
3039 (url home-page)
3040 (commit (string-append "v" version))))
3041 (file-name (git-file-name name version))
3042 (sha256
3043 (base32
3044 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
3045 (build-system ruby-build-system)
3046 (arguments
3047 '(#:phases (modify-phases %standard-phases
3048 (replace 'replace-git-ls-files
3049 (lambda _
3050 (substitute* "fakefs.gemspec"
3051 (("`git ls-files lib README.md LICENSE`")
3052 "`find lib README.md LICENSE -type f | sort`"))
3053 #t))
3054 (add-before 'check 'remove-version-constraints
3055 (lambda _
3056 ;; Drop hard version requirements for test dependencies.
3057 (substitute* "fakefs.gemspec"
3058 (("(.*add_development_dependency .*), .*" _ dep)
3059 (string-append dep "\n")))
3060 #t)))))
3061 (native-inputs
3062 (list ruby-bump ruby-maxitest ruby-rubocop ruby-rspec))
3063 (synopsis "Fake file system for Ruby")
3064 (description
3065 "This package provides a fake file system for use in test suites. It
3066avoids the need for manually creating temporary directories, or dealing
3067with platform intricacies in @code{File} and @code{FileUtils}.")
3068 (license license:expat)))
3069
3070(define-public ruby-orderedhash
3071 (package
3072 (name "ruby-orderedhash")
3073 (version "0.0.6")
3074 (source (origin
3075 (method url-fetch)
3076 (uri (rubygems-uri "orderedhash" version))
3077 (sha256
3078 (base32
3079 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
3080 (build-system ruby-build-system)
3081 (arguments
3082 '(#:tests? #f)) ; no test suite
3083 (synopsis "Ruby library providing an order-preserving hash")
3084 (description "Orderedhash is a Ruby library providing a hash
3085implementation that preserves the order of items and features some array-like
3086extensions.")
3087 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
3088 (license license:public-domain)))
3089
3090(define-public ruby-libxml
3091 (package
3092 (name "ruby-libxml")
3093 (version "3.0.0")
3094 (source
3095 (origin
3096 (method url-fetch)
3097 (uri (rubygems-uri "libxml-ruby" version))
3098 (sha256
3099 (base32
3100 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
3101 (build-system ruby-build-system)
3102 (inputs
3103 (list zlib libxml2))
3104 (arguments
3105 '(#:tests? #f ; test suite hangs for unknown reason
3106 #:gem-flags
3107 (list "--no-document" ; TODO: Re-enable when documentation
3108 ; generation works
3109 "--"
3110 (string-append "--with-xml2-include="
3111 (assoc-ref %build-inputs "libxml2")
3112 "/include/libxml2" ))))
3113 (synopsis "Ruby bindings for GNOME Libxml2")
3114 (description "The Libxml-Ruby project provides Ruby language bindings for
3115the GNOME Libxml2 XML toolkit.")
3116 (home-page "https://xml4r.github.com/libxml-ruby")
3117 (license license:expat)))
3118
3119(define-public ruby-lino
3120 (package
3121 (name "ruby-lino")
3122 (version "3.1.0")
3123 (source
3124 (origin
3125 (method url-fetch)
3126 (uri (rubygems-uri "lino" version))
3127 (sha256
3128 (base32
3129 "1zq9dza040fgjvr9imh7z2lgxrcyc5ac100rqimsnsf9bpfz3fsm"))))
3130 (build-system ruby-build-system)
3131 (arguments
3132 '(#:tests? #f)) ; No included tests
3133 (propagated-inputs
3134 (list ruby-hamster ruby-open4))
3135 (synopsis "Build and execute commands in Ruby")
3136 (description
3137 "@code{Lino} provides an interface to run external commands. It provides
3138an interface to add options as well as managing the standard input, output and
3139error streams.")
3140 (home-page "https://github.com/tobyclemson/lino")
3141 (license license:expat)))
3142
3143(define-public ruby-x25519
3144 (package
3145 (name "ruby-x25519")
3146 (version "1.0.10")
3147 (source (origin
3148 (method git-fetch)
3149 (uri (git-reference
3150 (url "https://github.com/RubyCrypto/x25519")
3151 (commit (string-append "v" version))))
3152 (file-name (git-file-name name version))
3153 (sha256
3154 (base32
3155 "1g0311ly32f6hfn4q5fvkbjbl2bhv1l9fx6s0kglxfsrwq51926y"))))
3156 (build-system ruby-build-system)
3157 (arguments
3158 (list #:test-target "spec"
3159 #:phases #~(modify-phases %standard-phases
3160 (add-after 'unpack 'remove-unnecessary-dependencies
3161 (lambda _
3162 (substitute* "Gemfile"
3163 ((".*rubocop.*")
3164 ""))
3165 (substitute* "Rakefile"
3166 (("require \"rubocop/rake_task\"")
3167 "")
3168 (("RuboCop::RakeTask.new")
3169 ""))))
3170 (add-before 'build 'compile
3171 (lambda _
3172 (invoke "rake" "compile"))))))
3173 (native-inputs (list ruby-rake-compiler ruby-rspec))
3174 (synopsis "Cryptography library for Ruby providing the X25519
3175Diffie-Hellman function")
3176 (description
3177 "The x25519 gem is an efficient public key cryptography library for
3178Ruby providing key exchange/agreement via the X25519 (as known as
3179Curve25519) Elliptic Curve Diffie-Hellman function as described in
3180@url{https://www.ietf.org/rfc/rfc7748.txt, RFC 7748}.")
3181 (home-page "https://github.com/RubyCrypto/x25519")
3182 (license license:bsd-3)))
3183
3184(define-public ruby-xml-simple
3185 (package
3186 (name "ruby-xml-simple")
3187 (version "1.1.5")
3188 (source (origin
3189 (method url-fetch)
3190 (uri (rubygems-uri "xml-simple" version))
3191 (sha256
3192 (base32
3193 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
3194 (build-system ruby-build-system)
3195 (arguments
3196 '(#:tests? #f)) ; no test suite
3197 (synopsis "Simple Ruby library for XML processing")
3198 (description "This library provides a simple API for XML processing in
3199Ruby.")
3200 (home-page "https://github.com/maik/xml-simple")
3201 (license license:ruby)))
3202
3203(define-public ruby-xpath
3204 (package
3205 (name "ruby-xpath")
3206 (version "3.2.0")
3207 (source (origin
3208 (method url-fetch)
3209 (uri (rubygems-uri "xpath" version))
3210 (sha256
3211 (base32
3212 "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"))))
3213 (build-system ruby-build-system)
3214 (arguments (list #:phases #~(modify-phases %standard-phases
3215 (replace 'check
3216 (lambda* (#:key tests? #:allow-other-keys)
3217 (when tests?
3218 (invoke "rspec" "spec" )))))))
3219 (native-inputs (list ruby-pry ruby-rspec))
3220 (propagated-inputs (list ruby-nokogiri))
3221 (synopsis "Ruby DSL for generating XPath expressions")
3222 (description "XPath is a Ruby domain-specific language (DSL) for
3223generating XPath expressions.")
3224 (home-page "https://github.com/teamcapybara/xpath")
3225 (license license:expat)))
3226
3227(define-public ruby-thor
3228 (package
3229 (name "ruby-thor")
3230 (version "1.2.2")
3231 (source (origin
3232 ;; Pull from git because the gem has no tests.
3233 (method git-fetch)
3234 (uri (git-reference
3235 (url "https://github.com/rails/thor")
3236 (commit (string-append "v" version))))
3237 (file-name (git-file-name name version))
3238 (sha256
3239 (base32
3240 "1k3z2mlhaig5ycapjxwybb19z7ca0q1876i6csfmv2j0hf1hnc0z"))))
3241 (build-system ruby-build-system)
3242 (arguments
3243 (list
3244 #:phases
3245 #~(modify-phases %standard-phases
3246 (add-after 'unpack 'remove-coveralls-dependency
3247 (lambda _
3248 ;; Do not hook the test suite into the online coveralls service.
3249 (substitute* "Gemfile"
3250 ((".*coveralls.*") ""))
3251 (substitute* "spec/helper.rb"
3252 (("require \"coveralls\"") "")
3253 (("Coveralls::SimpleCov::Formatter") ""))))
3254 (add-after 'unpack 'disable-problematic-tests
3255 (lambda _
3256 ;; These tests attempt to check the git repository for
3257 ;; tabs vs spaces, double vs single quotes, etc, and
3258 ;; depend on the git checkout.
3259 (delete-file "spec/quality_spec.rb")
3260 (substitute* "spec/parser/options_spec.rb"
3261 ;; This test fails for unknown reasons (see:
3262 ;; https://github.com/rails/thor/issues/814).
3263 (("it \"raises an error for unknown switches" all)
3264 (string-append "x" all)))))
3265 (replace 'check
3266 (lambda* (#:key tests? #:allow-other-keys)
3267 (when tests?
3268 (invoke "rspec" "spec" )))))))
3269 (native-inputs (list ruby-rspec ruby-simplecov ruby-webmock))
3270 (synopsis "Ruby toolkit for building command-line interfaces")
3271 (description "Thor is a toolkit for building powerful command-line
3272interfaces.")
3273 (home-page "http://whatisthor.com/")
3274 (license license:expat)))
3275
3276(define-public ruby-lumberjack
3277 (package
3278 (name "ruby-lumberjack")
3279 (version "1.0.13")
3280 (source (origin
3281 (method url-fetch)
3282 (uri (rubygems-uri "lumberjack" version))
3283 (sha256
3284 (base32
3285 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
3286 (build-system ruby-build-system)
3287 (native-inputs
3288 (list ruby-rspec ruby-timecop))
3289 (synopsis "Logging utility library for Ruby")
3290 (description "Lumberjack is a simple logging utility that can be a drop in
3291replacement for Logger or ActiveSupport::BufferedLogger. It provides support
3292for automatically rolling log files even with multiple processes writing the
3293same log file.")
3294 (home-page "https://github.com/bdurand/lumberjack")
3295 (license license:expat)))
3296
3297(define-public ruby-rbnacl
3298 (package
3299 (name "ruby-rbnacl")
3300 (version "7.1.1")
3301 (source (origin
3302 (method url-fetch)
3303 (uri (rubygems-uri "rbnacl" version))
3304 (sha256
3305 (base32
3306 "0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
3307 (build-system ruby-build-system)
3308 (arguments
3309 (list
3310 #:phases
3311 #~(modify-phases %standard-phases
3312 (add-after 'unpack 'remove-unnecessary-dependencies
3313 (lambda _
3314 ;; Coveralls relates to a network service, and Rubocop to code
3315 ;; linting and both are unnecessary to run the tests
3316 (substitute* "Gemfile"
3317 ((".*rubocop.*")
3318 "\n")
3319 ((".*guard-rspec.*")
3320 "\n")
3321 ((".*coveralls.*")
3322 "\n"))
3323 (substitute* "spec/spec_helper.rb"
3324 (("require \"coveralls\"")
3325 "")
3326 (("Coveralls.wear!")
3327 ""))))
3328 (add-after 'unpack 'use-libsodium-from-store
3329 (lambda* (#:key inputs #:allow-other-keys)
3330 (substitute* '("lib/rbnacl/init.rb"
3331 "lib/rbnacl/sodium.rb")
3332 (("ffi_lib \\[.+\\]")
3333 (string-append "ffi_lib [\""
3334 (assoc-ref inputs "libsodium")
3335 "/lib/libsodium.so" "\"]")))))
3336 ;; Run Rspec directly to avoid the Rubocop dependency in the
3337 ;; Rakefile
3338 (replace 'check
3339 (lambda* (#:key tests? #:allow-other-keys)
3340 (when tests?
3341 (invoke "rspec")))))))
3342 (propagated-inputs (list ruby-ffi))
3343 (inputs (list libsodium))
3344 (native-inputs (list bundler ruby-rspec))
3345 (synopsis "Ruby FFI binding to libsodium")
3346 (description
3347 "This package provides Ruby FFI bindings to the Networking and
3348Cryptography (NaCl) library, also known as libsodium. This provides a
3349high-level toolkit for building cryptographic systems and protocols.")
3350 (home-page "https://github.com/RubyCrypto/rbnacl")
3351 (license license:expat)))
3352
3353(define-public ruby-rbtree
3354 (package
3355 (name "ruby-rbtree")
3356 (version "0.4.6")
3357 (source (origin
3358 (method url-fetch)
3359 (uri (rubygems-uri "rbtree" version))
3360 (sha256
3361 (base32
3362 "1z0h1x7fpkzxamnvbw1nry64qd6n0nqkwprfair29z94kd3a9vhl"))))
3363 (build-system ruby-build-system)
3364 (arguments
3365 (list
3366 #:phases
3367 #~(modify-phases %standard-phases
3368 (add-before 'build 'extconf
3369 (lambda _
3370 (invoke "ruby" "extconf.rb")
3371 (invoke "make" "install" (string-append "prefix=" #$output))))
3372 (replace 'check
3373 (lambda* (#:key tests? #:allow-other-keys)
3374 (when tests?
3375 (invoke "ruby" "-I." "test.rb")))))))
3376 (synopsis "Ruby implementation of a sorted associative collection")
3377 (description
3378 "This package provides a RBTree is a sorted associative collection that
3379is implemented with a Red-Black Tree. It maps keys to values like a Hash, but
3380maintains its elements in ascending key order. The interface is the almost
3381identical to that of Hash.")
3382 (home-page "http://rbtree.rubyforge.org/")
3383 (license license:expat)))
3384
3385(define-public ruby-hkdf
3386 (package
3387 (name "ruby-hkdf")
3388 (version "1.0.0")
3389 (source
3390 (origin
3391 (method git-fetch)
3392 (uri (git-reference
3393 (url "https://github.com/jtdowney/hkdf")
3394 (commit (string-append "v" version))))
3395 (file-name (git-file-name name version))
3396 (sha256
3397 (base32
3398 "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
3399 (build-system ruby-build-system)
3400 (arguments
3401 `(#:test-target "default"))
3402 (native-inputs
3403 (list ruby-rspec))
3404 (synopsis "HMAC-based Key Derivation Function")
3405 (description
3406 "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
3407HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
3408take some source key material and generate suitable cryptographic keys from it.")
3409 (home-page "https://github.com/jtdowney/hkdf")
3410 (license license:expat)))
3411
3412(define-public ruby-nenv
3413 (package
3414 (name "ruby-nenv")
3415 (version "0.3.0")
3416 (source (origin
3417 (method url-fetch)
3418 (uri (rubygems-uri "nenv" version))
3419 (sha256
3420 (base32
3421 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
3422 (build-system ruby-build-system)
3423 (arguments
3424 `(#:tests? #f)) ; no tests included
3425 (native-inputs
3426 (list ruby-rspec bundler))
3427 (synopsis "Ruby interface for modifying the environment")
3428 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
3429and inspect the environment.")
3430 (home-page "https://github.com/e2/nenv")
3431 (license license:expat)))
3432
3433(define-public ruby-ptools
3434 (package
3435 (name "ruby-ptools")
3436 (version "1.5.0")
3437 (source (origin
3438 (method url-fetch)
3439 (uri (rubygems-uri "ptools" version))
3440 (sha256
3441 (base32
3442 "0damllbshkxycrwjv80sz78h76dw7r9z54d17mb5cbha1daq9q2d"))))
3443 (build-system ruby-build-system)
3444 (arguments
3445 (list
3446 #:test-target "spec:all"
3447 #:phases
3448 #~(modify-phases %standard-phases
3449 (add-after 'unpack 'patch
3450 (lambda _
3451 (substitute* "Rakefile"
3452 ;; Don't require rubocop
3453 (("require 'rubocop/rake_task'") "")
3454 (("RuboCop::RakeTask.new") "")
3455 ;; Do not attempt to sign the gem.
3456 (("spec\\.signing_key = .*") ""))
3457
3458 (substitute* "spec/binary_spec.rb"
3459 (("/bin/ls") (which "ls"))
3460 (("/bin/cat") (which "cat"))
3461 (("/bin/chmod") (which "chmod"))
3462 (("/bin/df") (which "df"))))))))
3463 (native-inputs
3464 (list ruby-rspec))
3465 (synopsis "Extra methods for Ruby's @code{File} class")
3466 (description
3467 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
3468class with many additional methods modelled after common POSIX tools, such as
3469@code{File.which} for finding executables, @code{File.tail} to print the last
3470lines of a file, @code{File.wc} to count words, and so on.")
3471 (home-page "https://github.com/djberg96/ptools")
3472 (license license:artistic2.0)))
3473
3474(define-public ruby-permutation
3475 (package
3476 (name "ruby-permutation")
3477 (version "0.1.8")
3478 (source (origin
3479 (method url-fetch)
3480 (uri (rubygems-uri "permutation" version))
3481 (sha256
3482 (base32
3483 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
3484 (build-system ruby-build-system)
3485 (arguments
3486 `(#:phases
3487 (modify-phases %standard-phases
3488 (add-after 'unpack 'fix-rakefile
3489 (lambda _
3490 (substitute* "Rakefile"
3491 (("require 'rake/gempackagetask'")
3492 "require 'rubygems/package_task'")
3493 (("include Config") ""))
3494 #t))
3495 (replace 'check
3496 (lambda _
3497 (invoke "ruby" "-Ilib" "test/test.rb"))))))
3498 (synopsis "Library to perform operations with sequence permutations")
3499 (description "This package provides a Ruby library to perform different
3500operations with permutations of sequences, such as strings and arrays.")
3501 (home-page "https://flori.github.io/permutation")
3502 (license license:gpl2))) ; GPL 2 only
3503
3504(define-public ruby-shellany
3505 (package
3506 (name "ruby-shellany")
3507 (version "0.0.1")
3508 (source (origin
3509 (method url-fetch)
3510 (uri (rubygems-uri "shellany" version))
3511 (sha256
3512 (base32
3513 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
3514 (build-system ruby-build-system)
3515 (arguments
3516 `(#:test-target "default"
3517 #:phases
3518 (modify-phases %standard-phases
3519 (add-after 'unpack 'fix-version-test
3520 (lambda _
3521 (substitute* "spec/shellany_spec.rb"
3522 (("^RSpec") "require \"shellany\"\nRSpec"))
3523 #t)))))
3524 (native-inputs
3525 (list ruby-rspec ruby-nenv bundler))
3526 (synopsis "Capture command output")
3527 (description "Shellany is a Ruby library providing functions to capture
3528the output produced by running shell commands.")
3529 (home-page "https://rubygems.org/gems/shellany")
3530 (license license:expat)))
3531
3532(define-public ruby-notiffany
3533 (package
3534 (name "ruby-notiffany")
3535 (version "0.1.3")
3536 (source (origin
3537 (method url-fetch)
3538 (uri (rubygems-uri "notiffany" version))
3539 (sha256
3540 (base32
3541 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
3542 (build-system ruby-build-system)
3543 ;; Tests are not included in the gem.
3544 (arguments `(#:tests? #f))
3545 (propagated-inputs
3546 (list ruby-shellany ruby-nenv))
3547 (native-inputs
3548 (list bundler))
3549 (synopsis "Wrapper library for notification libraries")
3550 (description "Notiffany is a Ruby wrapper library for notification
3551libraries such as Libnotify.")
3552 (home-page "https://github.com/guard/notiffany")
3553 (license license:expat)))
3554
3555(define-public ruby-forking-test-runner
3556 (package
3557 (name "ruby-forking-test-runner")
3558 (version "1.6.0")
3559 (home-page "https://github.com/grosser/forking_test_runner")
3560 (source (origin
3561 (method git-fetch)
3562 (uri (git-reference (url home-page)
3563 (commit (string-append "v" version))))
3564 (file-name (git-file-name name version))
3565 (sha256
3566 (base32
3567 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
3568 (build-system ruby-build-system)
3569 (arguments
3570 '(#:test-target "spec"
3571 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
3572 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
3573 #:tests? #f
3574 #:phases (modify-phases %standard-phases
3575 (replace 'replace-git-ls-files
3576 (lambda _
3577 (substitute* "forking_test_runner.gemspec"
3578 (("`git ls-files lib/ bin/ MIT-LICENSE`")
3579 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
3580 #t))
3581 (add-before 'check 'remove-version-constraints
3582 (lambda _
3583 ;; Ignore hard coded version constraints for the tests.
3584 (delete-file "Gemfile.lock")
3585 #t))
3586 (add-before 'check 'set-HOME
3587 (lambda _
3588 ;; Many tests invoke Bundler, and fails when Bundler
3589 ;; warns that /homeless-shelter does not exist.
3590 (setenv "HOME" "/tmp")
3591 #t)))))
3592 (native-inputs
3593 (list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
3594 (propagated-inputs
3595 (list ruby-parallel-tests))
3596 (synopsis "Run every test in a fork")
3597 (description
3598 "This package is a wrapper around @code{parallel_tests} that runs every
3599test in a fork to avoid pollution and get clean output per test.")
3600 (license license:expat)))
3601
3602(define-public ruby-formatador
3603 (package
3604 (name "ruby-formatador")
3605 (version "0.2.5")
3606 (source (origin
3607 (method url-fetch)
3608 (uri (rubygems-uri "formatador" version))
3609 (sha256
3610 (base32
3611 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
3612 (build-system ruby-build-system)
3613 ;; Circular dependency: Tests require ruby-shindo, which requires
3614 ;; ruby-formatador at runtime.
3615 (arguments `(#:tests? #f))
3616 (synopsis "Ruby library to format text on stdout")
3617 (description "Formatador is a Ruby library to format text printed to the
3618standard output stream.")
3619 (home-page "https://github.com/geemus/formatador")
3620 (license license:expat)))
3621
3622(define-public ruby-fuubar
3623 (package
3624 (name "ruby-fuubar")
3625 (version "2.3.2")
3626 (source
3627 (origin
3628 ;; Fetch from the git repository, as the gem package doesn't include
3629 ;; the tests.
3630 (method git-fetch)
3631 (uri (git-reference
3632 (url "https://github.com/thekompanee/fuubar")
3633 (commit (string-append "releases/v" version))))
3634 (file-name (git-file-name name version))
3635 (sha256
3636 (base32
3637 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
3638 (build-system ruby-build-system)
3639 (arguments
3640 '(;; TODO: Some tests fail, unsure why.
3641 ;; 21 examples, 7 failures
3642 #:tests? #f
3643 #:phases
3644 (modify-phases %standard-phases
3645 (add-before 'build 'delete-certificate
3646 (lambda _
3647 ;; Remove 's.cert_chain' as we do not build with a private key
3648 (substitute* "fuubar.gemspec"
3649 ((".*cert_chain.*") "")
3650 ((".*signing_key.*") ""))
3651 #t))
3652 (replace 'check
3653 (lambda* (#:key tests? #:allow-other-keys)
3654 (when tests?
3655 (invoke "rspec"))
3656 #t)))))
3657 (native-inputs
3658 (list bundler))
3659 (propagated-inputs
3660 (list ruby-rspec-core ruby-progressbar))
3661 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
3662 (description
3663 "Fuubar is an RSpec formatter that uses a progress bar instead of a
3664string of letters and dots as feedback. It also stops on the first test
3665failure.")
3666 (home-page "https://github.com/thekompanee/fuubar")
3667 (license license:expat)))
3668
3669(define-public ruby-haml
3670 (package
3671 (name "ruby-haml")
3672 (version "5.0.4")
3673 (source
3674 (origin
3675 (method url-fetch)
3676 (uri (rubygems-uri "haml" version))
3677 (sha256
3678 (base32
3679 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
3680 (build-system ruby-build-system)
3681 (arguments
3682 '(#:tests? #f)) ; No included tests
3683 (propagated-inputs
3684 (list ruby-tilt ruby-temple))
3685 (synopsis "Haml is a Ruby library to generate HTML documents")
3686 (description
3687 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
3688HTML or XML that is designed to express the structure of documents using
3689indentation rather than closing tags. It was originally envisioned as a
3690plugin for Ruby on Rails, but it can function as a stand-alone templating
3691engine.")
3692 (home-page "https://haml.info/")
3693 (license license:expat)))
3694
3695(define-public ruby-hamster
3696 (package
3697 (name "ruby-hamster")
3698 (version "3.0.0")
3699 (source
3700 (origin
3701 (method url-fetch)
3702 (uri (rubygems-uri "hamster" version))
3703 (sha256
3704 (base32
3705 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
3706 (build-system ruby-build-system)
3707 (arguments
3708 (list
3709 ;; Only supports Ruby 2 currently
3710 #:ruby ruby-2.7
3711 #:phases
3712 #~(modify-phases %standard-phases
3713 (add-after 'unpack 'remove-unnecessary-dependencies
3714 (lambda _
3715 ;; pry is a debugging tool, and is unnecessary when running the
3716 ;; tests
3717 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
3718 (("require 'pry'") ""))
3719 (substitute* "spec/spec_helper.rb"
3720 (("require \"pry\"") "")
3721 ;; CodeClimate is an online service, and is unnecessary for
3722 ;; running the tests
3723 (("require \"codeclimate-test-reporter\"") "")
3724 (("CodeClimate.*\n") ""))))
3725 ;; No Rakefile is included, so run rspec directly.
3726 (replace 'check
3727 (lambda* (#:key tests? #:allow-other-keys)
3728 (when tests?
3729 (invoke "ruby" (which "rspec"))))))))
3730 (propagated-inputs
3731 (list ruby-concurrent))
3732 (native-inputs
3733 (list ruby-rspec))
3734 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
3735 (description
3736 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
3737@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
3738immutable queue or stack).")
3739 (home-page "https://github.com/hamstergem/hamster")
3740 (license license:expat)))
3741
3742(define-public ruby-hashdiff
3743 (package
3744 (name "ruby-hashdiff")
3745 (version "1.0.1")
3746 (source
3747 (origin
3748 (method url-fetch)
3749 (uri (rubygems-uri "hashdiff" version))
3750 (sha256
3751 (base32
3752 "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
3753 (build-system ruby-build-system)
3754 (arguments
3755 '(#:phases
3756 (modify-phases %standard-phases
3757 ;; Run tests directly via rspec to avoid depending on rubocop.
3758 (replace 'check
3759 (lambda* (#:key tests? #:allow-other-keys)
3760 (when tests?
3761 (invoke "rspec"))
3762 #t)))))
3763 (native-inputs
3764 (list bundler ruby-rspec-2))
3765 (synopsis "HashDiff computes the smallest difference between two hashes")
3766 (description
3767 "HashDiff is a Ruby library to compute the smallest difference between
3768two hashes.")
3769 (home-page "https://github.com/liufengyun/hashdiff")
3770 (license license:expat)))
3771
3772(define-public ruby-hydra-minimal
3773 ;; No releases yet.
3774 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
3775 (revision "0"))
3776 (package
3777 (name "ruby-hydra-minimal")
3778 (version (git-version "0.0" revision commit))
3779 (home-page "https://github.com/hyphenation/hydra")
3780 (source (origin
3781 (method git-fetch)
3782 (uri (git-reference (url home-page) (commit commit)))
3783 (file-name (git-file-name name version))
3784 ;; byebug is a non-essential debugging utility that brings in
3785 ;; many dependencies.
3786 (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
3787 (sha256
3788 (base32
3789 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3790 (build-system ruby-build-system)
3791 (arguments
3792 ;; Avoid rspec dependency.
3793 '(#:tests? #f))
3794 (synopsis "Ruby hyphenation patterns")
3795 (description
3796 "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
3797It is a low-dependency variant of ruby-hydra.")
3798 (license license:expat))))
3799
3800;; Pinned variant for use by texlive
3801(define-public ruby-hydra-minimal/pinned
3802 (hidden-package
3803 (package
3804 (inherit ruby-hydra-minimal)
3805 (arguments
3806 (cons* #:ruby ruby-2.7
3807 (package-arguments ruby-hydra-minimal))))))
3808
3809(define-public ruby-hydra
3810 (package
3811 (inherit ruby-hydra-minimal)
3812 (name "ruby-hydra")
3813 (arguments
3814 (list
3815 #:phases
3816 #~(modify-phases %standard-phases
3817 (add-after 'unpack 'make-files-writable
3818 (lambda _
3819 (for-each make-file-writable (find-files "."))))
3820 (replace 'check
3821 (lambda* (#:key tests? #:allow-other-keys)
3822 (when tests?
3823 (invoke "rspec")))))))
3824 (native-inputs
3825 (list ruby-rspec))
3826 (description
3827 "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
3828
3829(define-public ruby-shindo
3830 (package
3831 (name "ruby-shindo")
3832 (version "0.3.10")
3833 (source (origin
3834 (method url-fetch)
3835 (uri (rubygems-uri "shindo" version))
3836 (sha256
3837 (base32
3838 "0qnqixhi0g8v44v13f3gynpbvvw6xqi1wajsxdjsx5rhzizfsj91"))))
3839 (build-system ruby-build-system)
3840 (arguments
3841 (list
3842 #:test-target "shindo_tests"
3843 #:phases
3844 #~(modify-phases %standard-phases
3845 (add-after 'unpack 'fix-tests
3846 (lambda _
3847 (substitute* "tests/tests_helper.rb"
3848 (("-rubygems") ""))
3849 (substitute* "Rakefile"
3850 (("system \"shindo") "system \"./bin/shindo")
3851 ;; This test doesn't work, so we disable it.
3852 (("fail \"The build_error test should fail") "#")
3853 ((" -rubygems") "")))))))
3854 (propagated-inputs
3855 (list ruby-formatador))
3856 (synopsis "Simple depth first Ruby testing")
3857 (description "Shindo is a simple depth first testing library for Ruby.")
3858 (home-page "https://github.com/geemus/shindo")
3859 (license license:expat)))
3860
3861(define-public ruby-rubygems-tasks
3862 (package
3863 (name "ruby-rubygems-tasks")
3864 (version "0.2.5")
3865 (source (origin
3866 (method url-fetch)
3867 (uri (rubygems-uri "rubygems-tasks" version))
3868 (sha256
3869 (base32
3870 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
3871 (build-system ruby-build-system)
3872 ;; Tests need Internet access.
3873 (arguments `(#:tests? #f))
3874 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3875 (description "Rubygems-task provides Rake tasks for managing and releasing
3876Ruby Gems.")
3877 (home-page "https://github.com/postmodern/rubygems-tasks")
3878 (license license:expat)))
3879
3880(define-public ruby-rubyzip
3881 (package
3882 (name "ruby-rubyzip")
3883 (version "2.3.2")
3884 (source (origin
3885 (method git-fetch)
3886 (uri (git-reference
3887 (url "https://github.com/rubyzip/rubyzip")
3888 (commit (string-append "v" version))))
3889 (file-name (git-file-name name version))
3890 (sha256
3891 (base32
3892 "03p8c990n6c1r4g64w0vv7z2iaswisl07l2f1lbh1s78cvmlmfxx"))))
3893 (build-system ruby-build-system)
3894 (arguments
3895 '(#:phases
3896 (modify-phases %standard-phases
3897 (add-after 'unpack 'disable-rubocop
3898 (lambda _
3899 (substitute* "Rakefile"
3900 (("require 'rubocop/rake_task'") "")
3901 (("RuboCop::RakeTask.new") ""))))
3902 (add-before 'check 'patch-tests
3903 (lambda* (#:key inputs #:allow-other-keys)
3904 (substitute* "test/gentestfiles.rb"
3905 (("/usr/bin/zip") (which "zip")))))
3906 (add-after 'patch-source-shebangs 'unpatch-some-source-shebangs
3907 (lambda _
3908 ;; The tests compare zipped files with data test files; since the
3909 ;; zip files do not have their shebangs patched, the data files
3910 ;; compared with their extracted version must also be left
3911 ;; un-patched.
3912 (substitute* (find-files "test/data" "\\.(txt|rb)$")
3913 (((which "ruby"))
3914 "/usr/bin/env ruby")))))))
3915 (native-inputs
3916 (list bundler ruby-simplecov zip unzip))
3917 (synopsis "Ruby module is for reading and writing zip files")
3918 (description
3919 "The rubyzip module provides ways to read from and create zip files.")
3920 (home-page "https://github.com/rubyzip/rubyzip")
3921 (license license:bsd-2)))
3922
3923(define-public ruby-silent-stream
3924 (package
3925 (name "ruby-silent-stream")
3926 (version "1.0.6")
3927 (source (origin
3928 (method url-fetch)
3929 (uri (rubygems-uri "silent_stream" version))
3930 (sha256
3931 (base32
3932 "10381fpvjzfjvhgfyv700607fpa29firgf52w5w5536m4fh6x63m"))))
3933 (build-system ruby-build-system)
3934 (synopsis "ActiveSupport stream silencing without ActiveSupport")
3935 (description "SilentStream is an extraction of some parts of
3936ActiveSupport's Kernel Reporting Core Extentions around silencing IO
3937streams.")
3938 (home-page "https://github.com/pboling/silent_stream")
3939 (license license:expat)))
3940
3941(define-public ruby-simplecov-html
3942 (package
3943 (name "ruby-simplecov-html")
3944 (version "0.12.3")
3945 (source (origin
3946 (method url-fetch)
3947 (uri (rubygems-uri "simplecov-html" version))
3948 (sha256
3949 (base32
3950 "0yx01bxa8pbf9ip4hagqkp5m0mqfnwnw2xk8kjraiywz4lrss6jb"))))
3951 (build-system ruby-build-system)
3952 (arguments `(#:tests? #f)) ; there are no tests
3953 (native-inputs
3954 (list bundler))
3955 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3956 (description "This package provides the default HTML formatter for
3957the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3958 (home-page "https://github.com/simplecov-ruby/simplecov-html")
3959 (license license:expat)))
3960
3961(define-public ruby-simplecov-json-formatter
3962 (package
3963 (name "ruby-simplecov-json-formatter")
3964 (version "0.1.4")
3965 (source (origin
3966 (method url-fetch)
3967 (uri (rubygems-uri "simplecov_json_formatter" version))
3968 (sha256
3969 (base32
3970 "0a5l0733hj7sk51j81ykfmlk2vd5vaijlq9d5fn165yyx3xii52j"))))
3971 (build-system ruby-build-system)
3972 ;; The test suite is disabled because it requires simplecov, which
3973 ;; requires this, introducing a dependency cycle.
3974 (arguments (list #:tests? #f))
3975 (synopsis "JSON formatter for SimpleCov")
3976 (description "This package provides a JSON formatter for SimpleCov, the
3977Ruby code coverage tool.")
3978 (home-page
3979 "https://github.com/codeclimate-community/simplecov_json_formatter")
3980 (license license:expat)))
3981
3982(define-public ruby-simplecov
3983 (package
3984 (name "ruby-simplecov")
3985 (version "0.22.0")
3986 (source (origin
3987 (method url-fetch)
3988 (uri (rubygems-uri "simplecov" version))
3989 (sha256
3990 (base32
3991 "198kcbrjxhhzca19yrdcd6jjj9sb51aaic3b0sc3pwjghg3j49py"))))
3992 (build-system ruby-build-system)
3993 ;; Simplecov depends on rubocop for code style checking at build time.
3994 ;; Rubocop needs simplecov at build time.
3995 (arguments `(#:tests? #f))
3996 (propagated-inputs
3997 (list ruby-json
3998 ruby-docile
3999 ruby-simplecov-html
4000 ruby-simplecov-json-formatter))
4001 (synopsis "Code coverage framework for Ruby")
4002 (description "SimpleCov is a code coverage framework for Ruby with a
4003powerful configuration library and automatic merging of coverage across test
4004suites.")
4005 (home-page "https://github.com/simplecov-ruby/simplecov")
4006 (license license:expat)))
4007
4008(define-public ruby-simplecov-lcov
4009 (package
4010 (name "ruby-simplecov-lcov")
4011 (version "0.8.0")
4012 (source (origin
4013 (method url-fetch)
4014 (uri (rubygems-uri "simplecov-lcov" version))
4015 (sha256
4016 (base32
4017 "1h8kswnshgb9zidvc88f4zjy4gflgz3854sx9wrw8ppgnwfg6581"))))
4018 (build-system ruby-build-system)
4019 ;; The test suite fails half of its tests; it seems to rely on older
4020 ;; versions of simplecov, rspec, possibly others (see:
4021 ;; https://github.com/fortissimo1997/simplecov-lcov/issues/29).
4022 (arguments (list #:tests? #f
4023 #:test-target "spec"))
4024 (native-inputs
4025 (list ruby-activesupport
4026 ruby-coveralls
4027 ruby-rspec
4028 ruby-simplecov))
4029 (synopsis "SimpleCov formatter to generate a lcov style coverage")
4030 (description "This package provides a SimpleCov formatter to generate a
4031lcov-style coverage report.")
4032 (home-page "https://github.com/fortissimo1997/simplecov-lcov")
4033 (license license:expat)))
4034
4035(define-public ruby-snaky-hash
4036 (package
4037 (name "ruby-snaky-hash")
4038 (version "2.0.1")
4039 (source (origin
4040 (method git-fetch)
4041 (uri (git-reference ;for tests
4042 (url "https://gitlab.com/oauth-xx/snaky_hash")
4043 (commit (string-append "v" version))))
4044 (file-name (git-file-name name version))
4045 (sha256
4046 (base32
4047 "0zmixxzi2g2d75zii65bq037j4g67p25l6aqddbmmwizspsp5az6"))))
4048 (build-system ruby-build-system)
4049 (arguments
4050 (list #:phases #~(modify-phases %standard-phases
4051 (add-after 'unpack 'relax-requirements
4052 (lambda _
4053 (substitute* "Gemfile"
4054 (("^linting = .*")
4055 "linting = false\n")
4056 (("^coverage = .*")
4057 "coverage = false\n")
4058 (("^debug = .*")
4059 "debug = false\n"))
4060 (substitute* "spec/spec_helper.rb"
4061 (("^RUN_COVERAGE = .*")
4062 "RUN_COVERAGE = false\n")
4063 (("^ALL_FORMATTERS = .*")
4064 "ALL_FORMATTERS = false\n"))))
4065 (add-before 'build 'drop-signing-key-requirement
4066 (lambda _
4067 (substitute* "snaky_hash.gemspec"
4068 (("spec.signing_key =.*")
4069 "spec.signing_key = nil")))))))
4070 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
4071 (propagated-inputs (list ruby-hashie ruby-version-gem))
4072 (synopsis "Hash keys and look-ups normalization Ruby library")
4073 (description "The SnakyHash Ruby library provides classes for normalizing
4074hash keys and look-ups, and a pseudo-object interface.")
4075 (home-page "https://gitlab.com/oauth-xx/snaky_hash")
4076 (license license:expat)))
4077
4078(define-public ruby-useragent
4079 (package
4080 (name "ruby-useragent")
4081 (version "0.16.10")
4082 (source (origin
4083 (method url-fetch)
4084 (uri (rubygems-uri "useragent" version))
4085 (sha256
4086 (base32
4087 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
4088 (build-system ruby-build-system)
4089 (arguments
4090 '(#:tests? #f)) ; no test suite
4091 (synopsis "HTTP user agent parser for Ruby")
4092 (description "UserAgent is a Ruby library that parses and compares HTTP
4093User Agents.")
4094 (home-page "https://github.com/gshutler/useragent")
4095 (license license:expat)))
4096
4097(define-public ruby-backports
4098 (package
4099 (name "ruby-backports")
4100 (version "3.11.4")
4101 (source
4102 (origin
4103 (method url-fetch)
4104 (uri (rubygems-uri "backports" version))
4105 (sha256
4106 (base32
4107 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
4108 (build-system ruby-build-system)
4109 (arguments
4110 '(;; TODO: This should be default, but there is one test failure
4111 #:test-target "all_spec"))
4112 (native-inputs
4113 (list ruby-mspec ruby-activesupport))
4114 (synopsis "Backports of the features in newer Ruby versions")
4115 (description
4116 "Backports enables more compatibility across Ruby versions by providing
4117backports of some features.")
4118 (home-page "https://github.com/marcandre/backports")
4119 (license license:expat)))
4120
4121(define-public ruby-bacon
4122 (package
4123 (name "ruby-bacon")
4124 (version "1.2.0")
4125 (source (origin
4126 (method url-fetch)
4127 (uri (rubygems-uri "bacon" version))
4128 (sha256
4129 (base32
4130 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
4131 (build-system ruby-build-system)
4132 (synopsis "Small RSpec clone")
4133 (description "Bacon is a small RSpec clone providing all essential
4134features.")
4135 (home-page "https://github.com/chneukirchen/bacon")
4136 (license license:expat)))
4137
4138(define-public ruby-bacon-bits
4139 (package
4140 (name "ruby-bacon-bits")
4141 (version "0.1.0")
4142 (source
4143 (origin
4144 (method url-fetch)
4145 (uri (rubygems-uri "bacon-bits" version))
4146 (sha256
4147 (base32
4148 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
4149 (build-system ruby-build-system)
4150 (arguments
4151 ;; No tests
4152 '(#:tests? #f))
4153 (propagated-inputs (list ruby-bacon))
4154 (synopsis "Extensions to Bacon, for disabling tests, before and after
4155blocks and more")
4156 (description
4157 "This extends the bacon testing framework with useful extensions to
4158disable tests, have before and after blocks that run once and more.")
4159 (home-page "https://github.com/cldwalker/bacon-bits")
4160 (license license:expat)))
4161
4162(define-public ruby-bacon-colored-output
4163 (package
4164 (name "ruby-bacon-colored-output")
4165 (version "1.1.1")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (rubygems-uri "bacon-colored_output" version))
4170 (sha256
4171 (base32
4172 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
4173 (build-system ruby-build-system)
4174 (arguments
4175 '(;; No included tests
4176 #:tests? #f))
4177 (propagated-inputs
4178 (list ruby-bacon))
4179 (synopsis "Colored output for Bacon test framework")
4180 (description
4181 "This package adds color through ANSI escape codes to Bacon test
4182output.")
4183 (home-page "https://github.com/whitequark/bacon-colored_output")
4184 (license license:expat)))
4185
4186(define-public ruby-bake
4187 (package
4188 (name "ruby-bake")
4189 (version "0.18.2")
4190 (source (origin
4191 (method git-fetch) ;for tests
4192 (uri (git-reference
4193 (url "https://github.com/ioquatix/bake")
4194 (commit (string-append "v" version))))
4195 (file-name (git-file-name name version))
4196 (sha256
4197 (base32
4198 "19yi1fxzz9n580gig3p3j6nxbgcfcassa6b0q07jkqrzxdqn7xhn"))))
4199 (build-system ruby-build-system)
4200 (arguments
4201 (list #:phases
4202 #~(modify-phases %standard-phases
4203 (add-after 'unpack 'sanitize-dependencies
4204 (lambda _
4205 ;; These dependencies are not needed to build and run tests
4206 ;; and contain circular dependencies.
4207 (substitute* "gems.rb"
4208 ((".*'bake-modernize'.*") "")
4209 ((".*'bake-gem'.*") "")
4210 ((".*'bake-github-pages'.*") "")
4211 ((".*'utopia-project'.*") ""))))
4212 (add-before 'build 'drop-signing-key-requirement
4213 (lambda _
4214 (substitute* "bake.gemspec"
4215 (("spec.signing_key =.*")
4216 "spec.signing_key = nil"))))
4217 (replace 'check
4218 (lambda* (#:key tests? #:allow-other-keys)
4219 (when tests?
4220 (invoke "rspec")))))))
4221 (native-inputs (list ruby-covered ruby-rspec))
4222 (propagated-inputs (list ruby-samovar))
4223 (synopsis "Replacement for rake with a simpler syntax")
4224 (description "Bake is a task execution tool, inspired by Rake, but
4225codifying many of the use cases which are typically implemented in an ad-hoc
4226manner.")
4227 (home-page "https://github.com/ioquatix/bake")
4228 (license license:expat)))
4229
4230(define-public ruby-bake-test
4231 (package
4232 (name "ruby-bake-test")
4233 (version "0.2.0")
4234 (source (origin
4235 (method url-fetch)
4236 (uri (rubygems-uri "bake-test" version))
4237 (sha256
4238 (base32
4239 "1p6kfpncj0s4zyynrrq6c735jvh0dnwyv7kfqym4rpyka4f85qdp"))))
4240 (build-system ruby-build-system)
4241 ;; XXX: Disable the test suite to avoid a circular dependency with
4242 ;; ruby-sus.
4243 (arguments (list #:tests? #f))
4244 (propagated-inputs (list ruby-bake))
4245 (synopsis "Test suite automatic runner for Ruby")
4246 (description "@command{bake-test} automatically discovers how to run local
4247test suites for Ruby projects. It supports @command{rspec}, @command{sus}, as
4248well as @samp{rake}.")
4249 (home-page "https://github.com/ioquatix/bake-test")
4250 (license license:expat)))
4251
4252(define-public ruby-bake-test-external
4253 (package
4254 (name "ruby-bake-test-external")
4255 (version "0.3.2")
4256 (source (origin
4257 (method url-fetch)
4258 (uri (rubygems-uri "bake-test-external" version))
4259 (sha256
4260 (base32
4261 "0749xc7jkz1c5gsq1giwhrqy6s6xqm48bdvs414372881wki2jmh"))))
4262 (build-system ruby-build-system)
4263 ;; The test suite relies on git and network access to clone external
4264 ;; repositories.
4265 (arguments (list #:tests? #f))
4266 (propagated-inputs (list ruby-bake))
4267 (synopsis "Continuous integration extension for Bake")
4268 (description "Bake Test External adds a @samp{test:external} action to the
4269@command{bake} command to run the test suites of dependent projects to check
4270for breakage.")
4271 (home-page "https://github.com/ioquatix/bake-test-external")
4272 (license license:expat)))
4273
4274(define-public ruby-connection-pool
4275 (package
4276 (name "ruby-connection-pool")
4277 (version "2.4.1")
4278 (source (origin
4279 (method git-fetch)
4280 (uri (git-reference
4281 (url "https://github.com/mperham/connection_pool")
4282 (commit (string-append "v" version))))
4283 (file-name (git-file-name name version))
4284 (sha256
4285 (base32
4286 "1iijshb1n9xl5knvpzzx0vqlw7v7mskiw1cpfj1cmdmssavyhsx5"))))
4287 (build-system ruby-build-system)
4288 (arguments
4289 (list
4290 #:phases
4291 #~(modify-phases %standard-phases
4292 (add-after 'unpack 'patch
4293 (lambda _
4294 (substitute* "Rakefile"
4295 (("require \"standard/rake\"") "")
4296 ((":\"standard:fix\",") "")))))))
4297 (native-inputs
4298 (list bundler))
4299 (synopsis "Generic connection pool for Ruby")
4300 (description "Connection_pool provides a generic connection pooling
4301interface for Ruby programs.")
4302 (home-page "https://github.com/mperham/connection_pool")
4303 (license license:expat)))
4304
4305(define-public ruby-fast-gettext
4306 (package
4307 (name "ruby-fast-gettext")
4308 (version "2.3.0")
4309 (home-page "https://github.com/grosser/fast_gettext")
4310 (source (origin
4311 (method git-fetch)
4312 (uri (git-reference (url home-page)
4313 (commit (string-append "v" version))))
4314 (file-name (git-file-name name version))
4315 (sha256
4316 (base32
4317 "0ba1wv96qarvvh19s8m1cgd26a9jgil4wl8nwgv4sl9fg5sqgksm"))))
4318 (build-system ruby-build-system)
4319 (arguments
4320 (list
4321 #:test-target "spec"
4322 #:phases
4323 #~(modify-phases %standard-phases
4324 (add-before 'check 'remove-version-constraints
4325 (lambda _
4326 (delete-file "Gemfile.lock"))))))
4327 (native-inputs
4328 (list ;; For tests.
4329 ruby-activerecord
4330 ruby-activesupport
4331 ruby-bump
4332 ruby-forking-test-runner
4333 ruby-i18n
4334 ruby-rubocop
4335 ruby-rubocop-packaging
4336 ruby-rspec
4337 ruby-single-cov
4338 ruby-sqlite3
4339 ruby-wwtd))
4340 (synopsis "Fast implementation of @code{GetText}")
4341 (description
4342 "This package provides an alternative implementation of the Ruby
4343@code{GetText} library that is approximately 12x faster yet thread safe.")
4344 ;; Some parts are covered by the Ruby license, see file headers.
4345 (license (list license:expat license:ruby))))
4346
4347(define-public ruby-fiber-local
4348 (package
4349 (name "ruby-fiber-local")
4350 (version "1.0.0")
4351 (source (origin
4352 (method git-fetch)
4353 (uri (git-reference
4354 (url "https://github.com/socketry/fiber-local")
4355 (commit (string-append "v" version))))
4356 (file-name (git-file-name name version))
4357 (sha256
4358 (base32
4359 "0pp5b81h0lysdnphgprkixh1az0fkrgir5sbcp0mm8arxf3f8m90"))))
4360 (build-system ruby-build-system)
4361 (arguments
4362 (list #:phases
4363 #~(modify-phases %standard-phases
4364 (add-after 'extract-gemspec 'sanitize-dependencies
4365 (lambda _
4366 ;; This pulls in extraneous maintenance dependencies.
4367 (delete-file "gems.rb")
4368 ;; Depending on ruby-covered would introduce a dependency
4369 ;; cycle with it.
4370 (substitute* '("fiber-local.gemspec" "spec/spec_helper.rb")
4371 ((".*covered.*") ""))))
4372 (replace 'check
4373 (lambda* (#:key tests? #:allow-other-keys)
4374 (when tests?
4375 (invoke "rspec")))))))
4376 (native-inputs (list ruby-rspec))
4377 (synopsis "Ruby module to simplify fiber-local state management")
4378 (description "This package provides a class-level mixin to make managing
4379fiber-local state easy. It provides easy access to a fiber-local state from a
4380fiber, and defaults to a shared thread-local state.")
4381 (home-page "https://github.com/socketry/fiber-local")
4382 (license license:expat)))
4383
4384(define-public ruby-flores
4385 (package
4386 (name "ruby-flores")
4387 (version "0.0.8")
4388 (source (origin
4389 (method url-fetch)
4390 (uri (rubygems-uri "flores" version))
4391 (sha256
4392 (base32
4393 "0pd8gqgy67rp1baq5r7himl0r9jzv5kqlhdmqh8wngynv548w2ai"))))
4394 (build-system ruby-build-system)
4395 (arguments
4396 (list #:ruby ruby-2.7
4397 #:phases
4398 #~(modify-phases %standard-phases
4399 (replace 'check
4400 (lambda* (#:key tests? #:allow-other-keys)
4401 (when tests?
4402 (invoke "ruby" (which "rspec"))))))))
4403 (native-inputs (list ruby-rspec ruby-simplecov))
4404 (synopsis "Fuzzing, randomization, and stress testing library")
4405 (description "Flores is a fuzzing, randomization, and stress library to
4406help tests uncover more bugs.")
4407 (home-page "https://github.com/jordansissel/ruby-flores")
4408 (license license:asl2.0)))
4409
4410(define-public ruby-net-http-persistent
4411 (package
4412 (name "ruby-net-http-persistent")
4413 (version "4.0.2")
4414 (source (origin
4415 (method url-fetch)
4416 (uri (rubygems-uri "net-http-persistent" version))
4417 (sha256
4418 (base32
4419 "0i1as2lgnw7b4jid0gw5glv5hnxz36nmfsbr9rmxbcap72ijgy03"))))
4420 (build-system ruby-build-system)
4421 (native-inputs
4422 (list ruby-connection-pool
4423 ruby-hoe
4424 ruby-rake-manifest))
4425 (synopsis "Persistent HTTP connection manager")
4426 (description "Net::HTTP::Persistent manages persistent HTTP connections
4427using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
4428 (home-page "https://github.com/drbrain/net-http-persistent")
4429 (license license:expat)))
4430
4431(define-public ruby-net-imap
4432 (package
4433 (name "ruby-net-imap")
4434 (version "0.3.4")
4435 (source (origin
4436 (method git-fetch) ;for tests
4437 (uri (git-reference
4438 (url "https://github.com/ruby/net-imap")
4439 (commit (string-append "v" version))))
4440 (file-name (git-file-name name version))
4441 (sha256
4442 (base32
4443 "0nx49i1n9q1wpancqaac2srrpb8mb43mc8wryyqyhpgki2grwyxw"))))
4444 (build-system ruby-build-system)
4445 (arguments
4446 ;; The test suite appears to rely on RFCs it tries fetching from the
4447 ;; network (see: https://github.com/ruby/net-imap/issues/136).
4448 (list #:tests? #f
4449 #:phases
4450 #~(modify-phases %standard-phases
4451 (add-before 'replace-git-ls-files 'adjust-for-git-ls-files
4452 (lambda _
4453 ;; Adjust the git ls-files invocation so that it matches
4454 ;; the expected pattern.
4455 (substitute* "net-imap.gemspec"
4456 (("`git ls-files -z 2>/dev/null`")
4457 "`git ls-files -z`")))))))
4458 (propagated-inputs (list ruby-date ruby-net-protocol))
4459 (synopsis "Ruby client api for Internet Message Access Protocol")
4460 (description "@code{Net::IMAP} implements Internet Message Access
4461Protocol (IMAP) client functionality. The protocol is described in
4462@url{https://tools.ietf.org/html/rfc3501, IMAP}.")
4463 (home-page "https://github.com/ruby/net-imap")
4464 (license license:bsd-2)))
4465
4466(define-public ruby-net-pop
4467 (package
4468 (name "ruby-net-pop")
4469 (version "0.1.2")
4470 (source (origin
4471 (method git-fetch)
4472 (uri (git-reference
4473 (url "https://github.com/ruby/net-pop")
4474 (commit (string-append "v" version))))
4475 (file-name (git-file-name name version))
4476 (sha256
4477 (base32
4478 "05vz6a56va2rbr7ld78gdzwy1j5mzs98cz82ax5aqa83pzzk6jld"))))
4479 (build-system ruby-build-system)
4480 (propagated-inputs (list ruby-net-protocol))
4481 (synopsis "Ruby client library for POP3")
4482 (description "This library provides functionality for retrieving email via
4483POP3, the Post Office Protocol version 3, as specified by
4484@url{http://www.ietf.org/rfc/rfc1939.txt, RFC1939}.")
4485 (home-page "https://github.com/ruby/net-pop")
4486 (license license:bsd-2)))
4487
4488(define-public ruby-net-smtp
4489 (package
4490 (name "ruby-net-smtp")
4491 (version "0.3.3")
4492 (source (origin
4493 (method git-fetch) ;for tests
4494 (uri (git-reference
4495 (url "https://github.com/ruby/net-smtp")
4496 (commit (string-append "v" version))))
4497 (file-name (git-file-name name version))
4498 (sha256
4499 (base32
4500 "0ca2wh45xvc09rv6v6sz3vbnkzrjzk5c4l6dk50zk4dwxvghma8r"))))
4501 (build-system ruby-build-system)
4502 (propagated-inputs (list ruby-net-protocol))
4503 (synopsis "Simple Mail Transfer Protocol client library for Ruby")
4504 (description "This library provides functionality to send Internet mail
4505via SMTP, the Simple Mail Transfer Protocol. The SMTP protocol specification
4506is known as @url{http://www.ietf.org/rfc/rfc2821.txt, RFC2821}.")
4507 (home-page "https://github.com/ruby/net-smtp")
4508 (license license:bsd-2)))
4509
4510(define-public ruby-pleaserun
4511 (package
4512 (name "ruby-pleaserun")
4513 (version "0.0.32")
4514 (source (origin
4515 (method url-fetch)
4516 (uri (rubygems-uri "pleaserun" version))
4517 (sha256
4518 (base32
4519 "1aykf0l8327bqkkf5xd9jcglsib973zpy37cfnlf4j0vp0cdpn2d"))))
4520 (build-system ruby-build-system)
4521 (arguments
4522 (list #:phases
4523 #~(modify-phases %standard-phases
4524 (add-after 'extract-gemspec 'relax-requirements
4525 (lambda _
4526 (substitute* "pleaserun.gemspec"
4527 ;; Mustache is pinned at 0.99.8, for portability with
4528 ;; older Rubies.
4529 (("dependency\\(%q<mustache>.freeze.*")
4530 "dependency(%q<mustache>.freeze)\n"))))
4531 (replace 'check
4532 (lambda* (#:key tests? #:allow-other-keys)
4533 (when tests?
4534 ;; The cli_spec.rb test fails non-deterministically with
4535 ;; a Errno::EISDIR error (see:
4536 ;; https://github.com/jordansissel/pleaserun/issues/155)
4537 (invoke "rspec" "--exclude-pattern" "cli_spec.rb")))))))
4538 (native-inputs (list ruby-flores ruby-rspec))
4539 (propagated-inputs (list ruby-cabin
4540 ruby-clamp
4541 ruby-dotenv
4542 ruby-insist
4543 ruby-mustache
4544 ruby-stud))
4545 (synopsis "Init scripts and service definitions generation tool")
4546 (description "Pleaserun is a tool to generate startup scripts and service
4547definitions. It targets service managers such as systemd, Upstart, launchd,
4548sysv init, and runit.")
4549 (home-page "https://github.com/jordansissel/pleaserun")
4550 (license license:asl2.0)))
4551
4552(define-public ruby-power-assert
4553 (package
4554 (name "ruby-power-assert")
4555 (version "1.1.5")
4556 (source (origin
4557 (method url-fetch)
4558 (uri (rubygems-uri "power_assert" version))
4559 (sha256
4560 (base32
4561 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
4562 (build-system ruby-build-system)
4563 (arguments
4564 '(#:tests? #f)) ; No included tests
4565 (native-inputs
4566 (list bundler))
4567 (synopsis "Assert library with descriptive assertion messages")
4568 (description "Power-assert is an assertion library providing descriptive
4569assertion messages for tests.")
4570 (home-page "https://github.com/k-tsj/power_assert")
4571 (license (list license:bsd-2 license:ruby))))
4572
4573(define-public ruby-powerpack
4574 (package
4575 (name "ruby-powerpack")
4576 (version "0.1.3")
4577 (source
4578 (origin
4579 (method url-fetch)
4580 (uri (rubygems-uri "powerpack" version))
4581 (sha256
4582 (base32
4583 "1f71axvlhnxja0k17qqxdi4qh5ck807hqg4i3j6cgy8fgzmyg7rg"))))
4584 (build-system ruby-build-system)
4585 (arguments
4586 (list #:test-target "spec"))
4587 (native-inputs
4588 (list bundler ruby-rspec ruby-yard))
4589 (synopsis "Useful extensions to core Ruby classes")
4590 (description
4591 "This package provides a few useful extensions to core Ruby classes,
4592including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
4593@code{String}.")
4594 (home-page "https://github.com/bbatsov/powerpack")
4595 (license license:expat)))
4596
4597(define-public ruby-locale
4598 (package
4599 (name "ruby-locale")
4600 (version "2.1.2")
4601 (source (origin
4602 (method url-fetch)
4603 (uri (rubygems-uri "locale" version))
4604 (sha256
4605 (base32
4606 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
4607 (build-system ruby-build-system)
4608 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
4609 ;; which needs ruby-gettext, which needs ruby-locale. To break the
4610 ;; dependency cycle we disable tests.
4611 (arguments `(#:tests? #f))
4612 (native-inputs
4613 (list bundler ruby-yard/minimal))
4614 (synopsis "Ruby library providing basic localization APIs")
4615 (description
4616 "Ruby-Locale is the pure ruby library which provides basic APIs for
4617localization.")
4618 (home-page "https://github.com/ruby-gettext/locale")
4619 (license (list license:lgpl3+ license:ruby))))
4620
4621(define-public ruby-temple
4622 (package
4623 (name "ruby-temple")
4624 (version "0.10.0")
4625 (source (origin
4626 (method git-fetch) ;for tests
4627 (uri (git-reference
4628 (url "https://github.com/judofyr/temple")
4629 (commit (string-append "v" version))))
4630 (file-name (git-file-name name version))
4631 (sha256
4632 (base32
4633 "0rr9fnlcgj9nm3b6hzzjsvcw8x3y7z48j7slk7xxff2mh8s7y3y0"))))
4634 (build-system ruby-build-system)
4635 (arguments
4636 (list #:phases
4637 #~(modify-phases %standard-phases
4638 (add-after 'replace-git-ls-files 'replace-more-git-ls-files
4639 (lambda _
4640 (substitute* "temple.gemspec"
4641 ;; There no longer are test, spec or features
4642 ;; directories.
4643 ((".*`git ls-files -- \\{test,spec,features}/\\*`.*")
4644 "")
4645 ;; There isn't any bin directory either.
4646 ((".*`git ls-files -- bin/\\*`.*")
4647 ""))))
4648 (replace 'check
4649 (lambda* (#:key tests? #:allow-other-keys)
4650 (when tests?
4651 (invoke "rspec")))))))
4652 (native-inputs (list ruby-bacon ruby-erubi ruby-rspec ruby-tilt))
4653 (synopsis "Template compilation framework in Ruby")
4654 (description "Temple is an abstraction and framework for compiling
4655templates to pure Ruby.")
4656 (home-page "https://github.com/judofyr/temple")
4657 (license license:expat)))
4658
4659(define-public ruby-text
4660 (package
4661 (name "ruby-text")
4662 (version "1.3.1")
4663 (source (origin
4664 (method url-fetch)
4665 (uri (rubygems-uri "text" version))
4666 (sha256
4667 (base32
4668 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
4669 (build-system ruby-build-system)
4670 (synopsis "Collection of text algorithms for Ruby")
4671 (description
4672 "This package provides a collection of text algorithms: Levenshtein,
4673Soundex, Metaphone, Double Metaphone, Porter Stemming.")
4674 (home-page "https://github.com/threedaymonk/text")
4675 (license license:expat)))
4676
4677(define-public ruby-gettext
4678 (package
4679 (name "ruby-gettext")
4680 (version "3.4.4")
4681 (source (origin
4682 (method url-fetch)
4683 (uri (rubygems-uri "gettext" version))
4684 (sha256
4685 (base32
4686 "11hlxkk2yr9wjwd3nf8kgmsjcd8wf35yqlxi9wpvrgmvrk9n9a2k"))))
4687 (build-system ruby-build-system)
4688 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
4689 ;; which needs ruby-gettext. To break the dependency cycle we disable
4690 ;; tests.
4691 (arguments `(#:tests? #f))
4692 (propagated-inputs
4693 (list ruby-locale ruby-text ruby-erubi))
4694 (native-inputs
4695 (list bundler ruby-yard/minimal))
4696 (synopsis "GNU gettext-like program for Ruby")
4697 (description
4698 "Gettext is a GNU gettext-like program for Ruby. The catalog
4699file (po-file) used is the same as that used by GNU gettext, allowing you to
4700use GNU gettext tools for maintenance.")
4701 (home-page "https://ruby-gettext.github.com/")
4702 (license (list license:lgpl3+ license:ruby))))
4703
4704(define-public ruby-packnga
4705 (package
4706 (name "ruby-packnga")
4707 (version "1.0.4")
4708 (source (origin
4709 (method url-fetch)
4710 (uri (rubygems-uri "packnga" version))
4711 (sha256
4712 (base32
4713 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
4714 (build-system ruby-build-system)
4715 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
4716 ;; To break the dependency cycle we disable tests.
4717 (arguments `(#:tests? #f))
4718 (propagated-inputs
4719 (list ruby-gettext ruby-yard))
4720 (native-inputs
4721 (list bundler))
4722 (synopsis "Utility library to package internationalized libraries")
4723 (description
4724 "Packnga is a library to translate to many languages using YARD.")
4725 (home-page "https://ranguba.org/packnga/")
4726 (license license:lgpl2.0+)))
4727
4728(define-public ruby-test-construct
4729 (package
4730 (name "ruby-test-construct")
4731 (version "2.0.2")
4732 (source
4733 (origin
4734 (method url-fetch)
4735 (uri (rubygems-uri "test_construct" version))
4736 (sha256
4737 (base32
4738 "17q7rw92l7r4zh6rkvzrn4dyl8p8p77217vaa1wf7nsv8k5541vy"))))
4739 (build-system ruby-build-system)
4740 (native-inputs
4741 (list bundler ruby-mocha-1 ruby-rspec))
4742 (synopsis "Creates temporary files and directories for testing")
4743 (description
4744 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
4745temporary files and directories during tests.")
4746 (home-page "https://github.com/bhb/test_construct")
4747 (license license:expat)))
4748
4749(define-public ruby-test-unit
4750 (package
4751 (name "ruby-test-unit")
4752 (version "3.6.0")
4753 (source (origin
4754 (method git-fetch) ;for tests
4755 (uri (git-reference
4756 (url "https://github.com/test-unit/test-unit")
4757 (commit version)))
4758 (file-name (git-file-name name version))
4759 (sha256
4760 (base32
4761 "0w1m432q3y5v9lkak8yyxadak3z17bsp6afni97i4zjdgfz7niz2"))))
4762 (build-system ruby-build-system)
4763 (propagated-inputs
4764 (list ruby-power-assert))
4765 (native-inputs
4766 (list bundler ruby-packnga ruby-yard))
4767 (synopsis "Unit testing framework for Ruby")
4768 (description "@code{Test::Unit} is unit testing framework for Ruby, based
4769on xUnit principles. These were originally designed by Kent Beck, creator of
4770extreme programming software development methodology, for Smalltalk's SUnit.
4771It allows writing tests, checking results and automated testing in Ruby.")
4772 (home-page "https://test-unit.github.io/")
4773 (license (list license:psfl license:ruby))))
4774
4775(define-public ruby-test-unit/minimal
4776 (hidden-package
4777 (package
4778 (inherit ruby-test-unit)
4779 (arguments
4780 (ensure-keyword-arguments
4781 (package-arguments ruby-test-unit)
4782 (list #:tests? #f)))
4783 (native-inputs '()))))
4784
4785(define-public ruby-mapping
4786 (package
4787 (name "ruby-mapping")
4788 (version "1.1.1")
4789 (source (origin
4790 (method git-fetch) ;for tests
4791 (uri (git-reference
4792 (url "https://github.com/ioquatix/mapping")
4793 (commit (string-append "v" version))))
4794 (file-name (git-file-name name version))
4795 (sha256
4796 (base32
4797 "0yhmqp8mprjqf9m7wzc4hhi50qbfax86r89w852csns0ijaffjjs"))))
4798 (build-system ruby-build-system)
4799 (arguments
4800 (list
4801 #:test-target "spec"
4802 #:phases
4803 #~(modify-phases %standard-phases
4804 (add-after 'unpack 'patch
4805 (lambda _
4806 (substitute* "spec/mapping/model_spec.rb"
4807 ;; From https://github.com/ioquatix/mapping/pull/2
4808 (("offset:") "offset =")))))))
4809 (native-inputs (list ruby-rspec))
4810 (synopsis "Map model objects based on their class to a given output model")
4811 (description "The @code{mapping} gem maps model objects based on their
4812class to a given output model. It is useful for versioning external
4813interfaces (e.g. JSON APIs) or processing structured data from one format to
4814another.")
4815 (home-page "https://github.com/ioquatix/mapping")
4816 (license license:expat)))
4817
4818(define-public ruby-markaby
4819 (package
4820 (name "ruby-markaby")
4821 (version "0.9.0")
4822 (source
4823 (origin
4824 (method url-fetch)
4825 (uri (rubygems-uri "markaby" version))
4826 (sha256
4827 (base32
4828 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
4829 (build-system ruby-build-system)
4830 (arguments
4831 (list
4832 #:phases
4833 #~(modify-phases %standard-phases
4834 ;; Run rspec manually without using the Rakefile, as the versions of
4835 ;; Rake and RSpec 2 are incompatible:
4836 ;;
4837 ;; NoMethodError: undefined method `last_comment'
4838 (replace 'check
4839 (lambda* (#:key tests? #:allow-other-keys)
4840 ;; Skip some broken tests, this should be redundant with the
4841 ;; next release
4842 (delete-file "spec/markaby/markaby_test_unit_spec.rb")
4843 (substitute* "spec/markaby/markaby_spec.rb"
4844 (("generated.should == str")
4845 "# Test broken: generated.should == str"))
4846
4847 (when tests?
4848 (invoke "rspec")))))))
4849 (propagated-inputs
4850 (list ruby-builder))
4851 (native-inputs
4852 (list bundler ruby-rspec-2))
4853 (synopsis "Write HTML pages in pure Ruby")
4854 (description
4855 "Markaby allows writing HTML packages in pure Ruby. This is similar to
4856the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
4857mixture of HTML and additional ERB syntax.")
4858 (home-page "https://markaby.github.io/")
4859 (license license:expat)))
4860
4861(define-public ruby-maruku
4862 (package
4863 (name "ruby-maruku")
4864 (version "0.7.3")
4865 (source
4866 (origin
4867 (method url-fetch)
4868 (uri (rubygems-uri "maruku" version))
4869 (sha256
4870 (base32
4871 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
4872 (build-system ruby-build-system)
4873 (arguments
4874 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
4875 #:tests? #f
4876 #:phases
4877 (modify-phases %standard-phases
4878 (replace 'check
4879 (lambda* (#:key tests? #:allow-other-keys)
4880 (when tests?
4881 (invoke "rspec"))
4882 #t)))))
4883 (native-inputs
4884 (list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
4885 (synopsis "Markdown interpreter in Ruby")
4886 (description
4887 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
4888HTML, and PDF through LaTeX.")
4889 (home-page "https://github.com/bhollis/maruku")
4890 (license license:expat)))
4891
4892(define-public ruby-metaclass
4893 (package
4894 (name "ruby-metaclass")
4895 (version "0.0.4")
4896 (source (origin
4897 (method url-fetch)
4898 (uri (rubygems-uri "metaclass" version))
4899 (sha256
4900 (base32
4901 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
4902 (build-system ruby-build-system)
4903 (arguments
4904 `(#:phases
4905 (modify-phases %standard-phases
4906 (add-after 'unpack 'add-test-unit-to-search-path
4907 (lambda* (#:key inputs #:allow-other-keys)
4908 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
4909 (substitute* "Rakefile"
4910 (("t\\.libs << \"test\"" line)
4911 (string-append line "; t.libs << \""
4912 test-unit "/lib/ruby/vendor_ruby"
4913 "/gems/test-unit-"
4914 ,(package-version ruby-test-unit)
4915 "/lib\""))))
4916 #t)))))
4917 (native-inputs
4918 (list bundler ruby-test-unit/minimal))
4919 (synopsis "Ruby library adding metaclass method to all objects")
4920 (description
4921 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
4922objects.")
4923 (home-page "https://github.com/floehopper/metaclass")
4924 (license license:expat)))
4925
4926(define-public ruby-mkmf-lite
4927 (package
4928 (name "ruby-mkmf-lite")
4929 (version "0.5.2")
4930 (source (origin
4931 (method url-fetch)
4932 (uri (rubygems-uri "mkmf-lite" version))
4933 (sha256
4934 (base32
4935 "0rqa5kzswhqkj7r9mqrqz4mjd2vdxsblgybb52gj3mwr1gwvl4c5"))))
4936 (build-system ruby-build-system)
4937 (arguments
4938 (list
4939 #:phases
4940 #~(modify-phases %standard-phases
4941 ;; Avoid rubocop dependency
4942 (replace 'check
4943 (lambda* (#:key tests? #:allow-other-keys)
4944 (when tests?
4945 (invoke "rspec")))))))
4946 (propagated-inputs
4947 (list ruby-ptools))
4948 (native-inputs
4949 (list ruby-rspec))
4950 (synopsis "Lightweight alternative to @code{mkmf}")
4951 (description
4952 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
4953for use as a library. It does not create packages, builds, or log files of
4954any kind. Instead, it provides mixin methods that you can use in FFI or tests
4955to check for the presence of header files, constants, and so on.")
4956 (home-page "https://github.com/djberg96/mkmf-lite")
4957 (license license:asl2.0)))
4958
4959(define-public ruby-msgpack
4960 (package
4961 (name "ruby-msgpack")
4962 (version "1.6.1")
4963 (source (origin
4964 (method git-fetch) ;for tests
4965 (uri (git-reference
4966 (url "https://github.com/msgpack/msgpack-ruby")
4967 (commit (string-append "v" version))))
4968 (file-name (git-file-name name version))
4969 (sha256
4970 (base32
4971 "08wi853nv02clrdwx8s6dg9lmcyzq5fk84l4rb94pglps76rlvz7"))))
4972 (build-system ruby-build-system)
4973 (arguments (list #:test-target "spec"))
4974 (native-inputs
4975 (list ruby-rake-compiler
4976 ruby-ruby-memcheck
4977 ruby-rspec
4978 ruby-yard))
4979 (synopsis "Efficient object serialization library for Ruby")
4980 (description "MessagePack is a binary-based efficient object serialization
4981library. It enables to exchange structured objects between many languages
4982like JSON. Unlike JSON, it is very fast and small.")
4983 (home-page "https://msgpack.org/")
4984 (license license:asl2.0)))
4985
4986(define-public ruby-mspec
4987 (package
4988 (name "ruby-mspec")
4989 (version "1.9.1")
4990 (source
4991 (origin
4992 (method url-fetch)
4993 (uri (rubygems-uri "mspec" version))
4994 (sha256
4995 (base32
4996 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
4997 (build-system ruby-build-system)
4998 (arguments
4999 '(;; TODO: 3 test failures
5000 ;; ./spec/mocks/mock_spec.rb:82
5001 ;; ./spec/utils/name_map_spec.rb:151
5002 ;; ./spec/utils/name_map_spec.rb:155
5003 #:tests? #f
5004 #:phases
5005 (modify-phases %standard-phases
5006 (add-after 'extract-gemspec 'change-dependency-constraints
5007 (lambda _
5008 (substitute* "mspec.gemspec"
5009 (("rake.*") "rake>)\n")
5010 (("rspec.*") "rspec>)\n"))
5011 #t))
5012 (replace 'check
5013 (lambda* (#:key tests? #:allow-other-keys)
5014 (when tests?
5015 (invoke "rspec" "spec"))
5016 #t)))))
5017 (native-inputs
5018 (list bundler ruby-rake ruby-rspec))
5019 (synopsis "MSpec is a specialized framework for RubySpec")
5020 (description
5021 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
5022for basic features. MSpec contains additional features that assist in writing
5023specs for Ruby implementations in ruby/spec.")
5024 (home-page "http://rubyspec.org")
5025 (license license:expat)))
5026
5027(define-public ruby-mysql2
5028 (package
5029 (name "ruby-mysql2")
5030 (version "0.5.2")
5031 (source
5032 (origin
5033 (method git-fetch)
5034 (uri (git-reference
5035 (url "https://github.com/brianmario/mysql2")
5036 (commit version)))
5037 (file-name (git-file-name name version))
5038 (sha256
5039 (base32
5040 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
5041 (build-system ruby-build-system)
5042 (arguments
5043 '(;; TODO: Tests require a running MySQL/MariaDB service
5044 #:tests? #f
5045 #:phases
5046 (modify-phases %standard-phases
5047 (replace 'replace-git-ls-files
5048 (lambda _
5049 (substitute* "mysql2.gemspec"
5050 (("git ls-files .*`") "find . -type f |sort`"))
5051 #t))
5052 (add-before 'install 'set-MAKEFLAGS
5053 (lambda* (#:key outputs #:allow-other-keys)
5054 (setenv "MAKEFLAGS"
5055 (string-append
5056 "V=1 "
5057 "prefix=" (assoc-ref outputs "out")))
5058 #t))
5059 ;; Move the 'check phase to after 'install, as then you can test
5060 ;; using the installed mysql2 gem in the store.
5061 (delete 'check)
5062 (add-after 'install 'check
5063 (lambda* (#:key outputs tests? #:allow-other-keys)
5064 (setenv "GEM_PATH"
5065 (string-append
5066 (getenv "GEM_PATH")
5067 ":"
5068 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
5069 (when tests?
5070 (invoke "rspec"))
5071 #t)))))
5072 (inputs
5073 `(("mariadb-dev" ,mariadb "dev")
5074 ("zlib" ,zlib)))
5075 (native-inputs
5076 (list ruby-rspec ruby-rake-compiler))
5077 (synopsis "MySQL library for Ruby, binding to libmysql")
5078 (description
5079 "This package provides a simple, fast MySQL library for Ruby, binding to
5080libmysql.")
5081 (home-page "https://github.com/brianmario/mysql2")
5082 (license license:expat)))
5083
5084(define-public ruby-blankslate
5085 (package
5086 (name "ruby-blankslate")
5087 (version "3.1.3")
5088 (source (origin
5089 (method url-fetch)
5090 (uri (rubygems-uri "blankslate" version))
5091 (sha256
5092 (base32
5093 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
5094 (build-system ruby-build-system)
5095 (arguments
5096 `(#:phases
5097 (modify-phases %standard-phases
5098 (replace 'check
5099 (lambda _ (invoke "rspec" "spec/"))))))
5100 (native-inputs
5101 (list bundler ruby-rspec))
5102 (synopsis "Abstract base class with no predefined methods")
5103 (description
5104 "BlankSlate provides an abstract base class with no predefined
5105methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
5106as a base class when writing classes that depend upon
5107@code{method_missing} (e.g. dynamic proxies).")
5108 (home-page "https://github.com/masover/blankslate")
5109 (license license:expat)))
5110
5111(define-public ruby-bond
5112 (package
5113 (name "ruby-bond")
5114 (version "0.5.1")
5115 (source
5116 (origin
5117 (method url-fetch)
5118 (uri (rubygems-uri "bond" version))
5119 (sha256
5120 (base32
5121 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
5122 (build-system ruby-build-system)
5123 (arguments
5124 ;; The test suite fails (see:
5125 ;; https://github.com/cldwalker/bond/issues/46).
5126 `(#:tests? #f))
5127 (native-inputs
5128 (list ruby-bacon ruby-bacon-bits ruby-mocha-on-bacon))
5129 (synopsis "Bond can provide custom autocompletion for arguments, methods
5130and more")
5131 (description
5132 "Bond can autocomplete argument(s) to methods, uniquely completing per
5133module, per method and per argument. Bond provides a configuration system and
5134a DSL for creating custom completions and completion rules. Bond can also
5135load completions that ship with gems. Bond is able to offer more than irb's
5136completion since it uses the full line of input when completing as opposed to
5137irb's last-word approach.")
5138 (home-page "http://tagaholic.me/bond/")
5139 (license license:expat)))
5140
5141(define-public ruby-idn-ruby
5142 (package
5143 (name "ruby-idn-ruby")
5144 (version "0.1.0")
5145 (source
5146 (origin
5147 (method url-fetch)
5148 (uri (rubygems-uri "idn-ruby" version))
5149 (sha256
5150 (base32
5151 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
5152 (build-system ruby-build-system)
5153 (arguments
5154 '(#:phases
5155 (modify-phases %standard-phases
5156 (delete 'check)
5157 (add-after 'install 'check
5158 (lambda* (#:key tests? outputs #:allow-other-keys)
5159 (when tests?
5160 (let* ((gem-file (cadr (find-files "." "\\.gem")))
5161 (name-and-version (basename gem-file ".gem")))
5162 (apply invoke
5163 "ruby" "--verbose"
5164 (string-append "-I"
5165 (assoc-ref outputs "out")
5166 "/lib/ruby/vendor_ruby/gems/"
5167 name-and-version
5168 "/lib")
5169 (find-files "./test" ".*\\.rb"))))
5170 #t)))))
5171 (inputs
5172 (list libidn))
5173 (synopsis "Ruby Bindings for the GNU LibIDN library")
5174 (description
5175 "Ruby Bindings for the GNU LibIDN library, an implementation of the
5176Stringprep, Punycode and IDNA specifications. These are used to encode and
5177decode internationalized domain + names according to the IDNA2003
5178specifications.
5179
5180Included are the most important parts of the Stringprep, Punycode and IDNA
5181APIs like performing Stringprep processings, encoding to and decoding from
5182Punycode strings and converting entire domain names to and from the ACE
5183encoded form.")
5184 (home-page "https://github.com/deepfryed/idn-ruby")
5185 (license license:asl2.0)))
5186
5187(define-public ruby-insist
5188 (package
5189 (name "ruby-insist")
5190 (version "1.0.0")
5191 (source (origin
5192 (method url-fetch)
5193 (uri (rubygems-uri "insist" version))
5194 (sha256
5195 (base32
5196 "0bw3bdwns14mapbgb8cbjmr0amvwz8y72gyclq04xp43wpp5jrvg"))))
5197 (build-system ruby-build-system)
5198 (arguments (list #:phases #~(modify-phases %standard-phases
5199 (replace 'check
5200 (lambda* (#:key tests? #:allow-other-keys)
5201 (when tests?
5202 (invoke "ruby" "test/testing.rb")))))))
5203 (synopsis "Testing tool for Ruby")
5204 (description "This package provides a simple block-driven assertion
5205library for both testing and for production code that attempts to make test
5206definitions more readable.")
5207 (home-page "https://github.com/jordansissel/ruby-insist/")
5208 (license license:asl2.0)))
5209
5210(define-public ruby-introspection
5211 (package
5212 (name "ruby-introspection")
5213 (version "0.0.4")
5214 (source (origin
5215 (method url-fetch)
5216 (uri (rubygems-uri "introspection" version))
5217 (sha256
5218 (base32
5219 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
5220 (build-system ruby-build-system)
5221 (propagated-inputs
5222 (list ruby-metaclass))
5223 (native-inputs
5224 (list bundler
5225 ruby-blankslate))
5226 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
5227 (description
5228 "Introspection provides tools to inspect the hierarchy of method
5229definitions on a Ruby object.")
5230 (home-page "https://github.com/floehopper/introspection")
5231 (license license:expat)))
5232
5233(define-public ruby-redcarpet
5234 (package
5235 (name "ruby-redcarpet")
5236 (version "3.5.0")
5237 (source (origin
5238 (method url-fetch)
5239 (uri (rubygems-uri "redcarpet" version))
5240 (sha256
5241 (base32
5242 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
5243 (build-system ruby-build-system)
5244 (arguments
5245 `(#:phases
5246 (modify-phases %standard-phases
5247 ;; The gem archive does not include the conformance tests.
5248 (add-after 'unpack 'disable-conformance-tests
5249 (lambda _
5250 (substitute* "Rakefile"
5251 (("task :test => %w\\[test:unit test:conformance\\]")
5252 "task :test => %w[test:unit]"))
5253 #t)))))
5254 (native-inputs
5255 (list bundler ruby-test-unit ruby-rake-compiler))
5256 (synopsis "Extensible Markdown to (X)HTML converter")
5257 (description
5258 "Redcarpet is an extensible Ruby library for Markdown processing and
5259conversion to (X)HTML.")
5260 (home-page "https://github.com/vmg/redcarpet")
5261 (license license:expat)))
5262
5263(define-public ruby-reline
5264 (package
5265 (name "ruby-reline")
5266 (version "0.3.3")
5267 (source (origin
5268 (method git-fetch) ;for tests
5269 (uri (git-reference
5270 (url "https://github.com/ruby/reline")
5271 (commit (string-append "v" version))))
5272 (file-name (git-file-name name version))
5273 (sha256
5274 (base32
5275 "1papa4f4prjml9qk6yydi4k5a4zgbzmxmbhd8fz9kfg1i34s35cw"))))
5276 (build-system ruby-build-system)
5277 (propagated-inputs (list ruby-io-console))
5278 (synopsis "GNU Readline or Editline implementation in Ruby")
5279 (description "Reline is a pure Ruby alternative GNU Readline or Editline
5280implementation.")
5281 (home-page "https://github.com/ruby/reline")
5282 (license (list license:bsd-2 license:ruby)))) ;dual license
5283
5284(define-public ruby-rerun
5285 (package
5286 (name "ruby-rerun")
5287 (version "0.13.0")
5288 (source
5289 (origin
5290 (method url-fetch)
5291 (uri (rubygems-uri "rerun" version))
5292 (sha256
5293 (base32
5294 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
5295 (build-system ruby-build-system)
5296 (arguments
5297 '(#:tests? #f)) ; No included tests
5298 (propagated-inputs
5299 (list ruby-listen))
5300 (synopsis "Run a process, and restart when some monitored files change")
5301 (description
5302 "Rerun is a tool to launch programs, then monitor the file system, and
5303restart the program when any of the monitored files change. It's written in
5304Ruby, but can be used for all programs.")
5305 (home-page "https://github.com/alexch/rerun/")
5306 (license license:expat)))
5307
5308(define-public ruby-maxitest
5309 (package
5310 (name "ruby-maxitest")
5311 (version "5.1.0")
5312 (home-page "https://github.com/grosser/maxitest")
5313 (source (origin
5314 ;; Pull from git because the gem does not contain tests.
5315 (method git-fetch)
5316 (uri (git-reference
5317 (url home-page)
5318 (commit (string-append "v" version))))
5319 (file-name (git-file-name name version))
5320 (sha256
5321 (base32
5322 "0qj410krfm497ggmf71xpnabbb6814y0585by4nlzyjvg9hpgg3m"))))
5323 (build-system ruby-build-system)
5324 (arguments
5325 (list
5326 #:test-target "default"
5327 #:phases
5328 #~(modify-phases %standard-phases
5329 (replace 'replace-git-ls-files
5330 (lambda _
5331 (substitute* "maxitest.gemspec"
5332 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
5333 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))))
5334 (add-before 'check 'remove-version-constraints
5335 (lambda _
5336 ;; Don't use specific versions of dependencies, instead
5337 ;; take whatever is available in Guix.
5338 (delete-file "Gemfile.lock")))
5339 (add-before 'check 'add-mtest-on-PATH
5340 (lambda _
5341 ;; Tests use 'mtest' which is not automatically added on
5342 ;; PATH.
5343 (setenv "PATH" (string-append (getcwd) "/bin:"
5344 (getenv "PATH"))))))))
5345 (native-inputs
5346 (list procps
5347 ruby-bump
5348 ruby-rspec
5349 ruby-wwtd))
5350 (propagated-inputs
5351 (list ruby-minitest))
5352 (synopsis "Minitest with extra features")
5353 (description
5354 "Maxitest is a wrapper around Minitest with extra functionality such
5355as timeouts, an @command{mtest} executable that can run tests by line
5356number, support for interrupted tests, better backtraces, and more.")
5357 (license license:expat)))
5358
5359(define-public ruby-mocha
5360 (package
5361 (name "ruby-mocha")
5362 (version "2.0.4")
5363 (source (origin
5364 (method url-fetch)
5365 (uri (rubygems-uri "mocha" version))
5366 (sha256
5367 (base32
5368 "18xn9gm9yypavy9yck71fplan19hy5697mwd1rwzz7vizh3ip7bd"))))
5369 (build-system ruby-build-system)
5370 (arguments
5371 (list
5372 #:phases
5373 #~(modify-phases %standard-phases
5374 (add-before 'check 'remove-rubocop-dependency
5375 (lambda _
5376 ;; Disable dependency on Rubocop, which is just a linter,
5377 ;; and would introduce a circular dependency.
5378 (substitute* "Gemfile"
5379 ((".*rubocop.*") "")))))))
5380 (propagated-inputs
5381 (list ruby-ruby2-keywords))
5382 (native-inputs
5383 (list ruby-psych-3
5384 ruby-introspection))
5385 (synopsis "Mocking and stubbing library for Ruby")
5386 (description
5387 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
5388allows mocking and stubbing of methods on real (non-mock) classes.")
5389 (home-page "https://mocha.jamesmead.org/")
5390 ;; Mocha can be used with either license at the users choice.
5391 (license (list license:expat license:ruby))))
5392
5393(define-public ruby-mocha-1
5394 (package
5395 (inherit ruby-mocha)
5396 (version "1.13.0")
5397 (source (origin
5398 (method url-fetch)
5399 (uri (rubygems-uri "mocha" version))
5400 (sha256
5401 (base32
5402 "15s53ggsykk69kxqvs4416s8yxdhz6caggva55n8sjgy4ixzwp10"))))
5403 (arguments
5404 '(#:tests? #f))))
5405
5406(define-public ruby-mocha-on-bacon
5407 (package
5408 (name "ruby-mocha-on-bacon")
5409 (version "0.2.3")
5410 (source
5411 (origin
5412 (method url-fetch)
5413 (uri (rubygems-uri "mocha-on-bacon" version))
5414 (sha256
5415 (base32
5416 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
5417 (build-system ruby-build-system)
5418 (arguments
5419 ;; rubygems.org release missing tests
5420 '(#:tests? #f))
5421 (propagated-inputs (list ruby-mocha))
5422 (synopsis "Mocha adapter for Bacon")
5423 (description
5424 "This package provides a Mocha adapter for Bacon, allowing you to use the
5425Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
5426 (home-page
5427 "https://github.com/alloy/mocha-on-bacon")
5428 (license license:expat)))
5429
5430(define-public ruby-net-ssh
5431 (package
5432 (name "ruby-net-ssh")
5433 (version "7.1.0")
5434 (source (origin
5435 (method git-fetch) ;for tests
5436 (uri (git-reference
5437 (url "https://github.com/net-ssh/net-ssh")
5438 (commit (string-append "v" version))))
5439 (file-name (git-file-name name version))
5440 (sha256
5441 (base32
5442 "1dkbyzpl31jygnnva5sa754vk42q1fih4qz5ipqw5gqiafrrlb91"))))
5443 (build-system ruby-build-system)
5444 (native-inputs
5445 (list bundler
5446 ruby-bcrypt-pbkdf
5447 ruby-ed25519
5448 ruby-mocha
5449 ruby-rbnacl
5450 ruby-test-unit
5451 ruby-x25519))
5452 (synopsis "Ruby implementation of the SSH2 client protocol")
5453 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
5454client protocol. It allows you to write programs that invoke and interact
5455with processes on remote servers, via SSH2.")
5456 (home-page "https://github.com/net-ssh/net-ssh")
5457 (license license:expat)))
5458
5459(define-public ruby-net-scp
5460 (package
5461 (name "ruby-net-scp")
5462 (version "4.0.0")
5463 (source
5464 (origin
5465 (method git-fetch)
5466 (uri (git-reference
5467 (url "https://github.com/net-ssh/net-scp")
5468 (commit (string-append "v" version))))
5469 (file-name (git-file-name name version))
5470 (sha256
5471 (base32 "1mdxh81z2hkcc359g6z96fywbr57azlv2yj4zq76adn5lyqq4hgw"))))
5472 (build-system ruby-build-system)
5473 (native-inputs
5474 (list bundler ruby-test-unit ruby-mocha-1))
5475 (propagated-inputs
5476 (list ruby-net-ssh))
5477 (synopsis "Pure-Ruby SCP client library")
5478 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
5479client protocol.")
5480 (home-page "https://github.com/net-ssh/net-scp")
5481 (license license:expat)))
5482
5483(define-public ruby-minima
5484 (package
5485 (name "ruby-minima")
5486 (version "2.5.1")
5487 (source (origin
5488 (method url-fetch)
5489 (uri (rubygems-uri "minima" version))
5490 (sha256
5491 (base32
5492 "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"))))
5493 (arguments
5494 (list #:phases #~(modify-phases %standard-phases
5495 (replace 'check
5496 (lambda* (#:key tests? #:allow-other-keys)
5497 (when tests?
5498 (invoke "jekyll" "build"))
5499 ;; Without the following, an attempt to remove
5500 ;; minima-<version>.gem is made during installation,
5501 ;; which will fail.
5502 (delete-file #$(string-append "_site/minima-"
5503 version ".gem")))))))
5504 (build-system ruby-build-system)
5505 (propagated-inputs (list jekyll ruby-jekyll-feed ruby-jekyll-seo-tag))
5506 (synopsis "Beautiful, minimal theme for Jekyll")
5507 (description
5508 "Minima is a one-size-fits-all Jekyll theme for writers. It's Jekyll's
5509default (and first) theme. It's what you get when you run @code{jekyll new}.")
5510 (home-page "https://github.com/jekyll/minima")
5511 (license license:expat)))
5512
5513(define-public ruby-minitest
5514 (package
5515 (name "ruby-minitest")
5516 (version "5.18.1")
5517 (source (origin
5518 (method url-fetch)
5519 (uri (rubygems-uri "minitest" version))
5520 (sha256
5521 (base32
5522 "1kg9wh7jlc9zsr3hkhpzkbn0ynf4np5ap9m2d8xdrb8shy0y6pmb"))))
5523 (build-system ruby-build-system)
5524 (native-inputs (list ruby-hoe))
5525 (home-page "https://github.com/minitest/minitest")
5526 (synopsis "Small test suite library for Ruby")
5527 (description "Minitest provides a complete suite of Ruby testing
5528facilities supporting TDD, BDD, mocking, and benchmarking.")
5529 (license license:expat)))
5530
5531;; This is the last release of Minitest 4, which is used by some packages.
5532(define-public ruby-minitest-4
5533 (package
5534 (inherit ruby-minitest)
5535 (version "4.7.5")
5536 (source (origin
5537 (method url-fetch)
5538 (uri (rubygems-uri "minitest" version))
5539 (sha256
5540 (base32
5541 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
5542 (arguments
5543 (list
5544 #:phases
5545 #~(modify-phases %standard-phases
5546 (add-after 'unpack 'remove-unsupported-method
5547 (lambda _
5548 (substitute* "Rakefile"
5549 (("self\\.rubyforge_name = .*") ""))))
5550 (add-after 'build 'patch-tests
5551 (lambda _
5552 ;; test_no_method_error_on_unexpected_methods
5553 ;; This test fails due to some extra information in the message
5554 (substitute* "test/minitest/test_minitest_mock.rb"
5555 (("assert_equal expected, e.message")
5556 "assert_equal expected, e.message.lines.first.strip"))
5557 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
5558 ;; Fixnum.
5559 (delete-file "test/minitest/test_minitest_spec.rb"))))))
5560 (native-inputs
5561 (list ruby-minitest
5562 ruby-hoe))))
5563
5564(define-public ruby-minitest-around
5565 (package
5566 (name "ruby-minitest-around")
5567 (version "0.5.0")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (rubygems-uri "minitest-around" version))
5572 (sha256
5573 (base32
5574 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
5575 (build-system ruby-build-system)
5576 (arguments
5577 '(#:phases
5578 (modify-phases %standard-phases
5579 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
5580 (lambda _
5581 (substitute* "minitest-around.gemspec"
5582 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
5583 #t)))))
5584 (propagated-inputs
5585 (list ruby-minitest))
5586 (native-inputs
5587 (list bundler ruby-cucumber ruby-bump ruby-test-construct))
5588 (synopsis "Run code around tests in Minitest")
5589 (description
5590 "This library provides a way to run code around tests in Minitest,
5591written using either the unit test or spec style.")
5592 (home-page "https://github.com/splattael/minitest-around")
5593 (license license:expat)))
5594
5595(define-public ruby-minitest-retry
5596 (package
5597 (name "ruby-minitest-retry")
5598 (version "0.2.2")
5599 (source (origin
5600 (method url-fetch)
5601 (uri (rubygems-uri "minitest-retry" version))
5602 (sha256
5603 (base32
5604 "1c1zq0b1a9y0hbqphq4ybijnjldlis1g6kyhx92q2ynnqfmzhfga"))))
5605 (build-system ruby-build-system)
5606 (propagated-inputs (list ruby-minitest))
5607 (synopsis "Minitest extension to re-run failing tests")
5608 (description "This package provides the @code{Minitest::Retry} class,
5609which extends Minitest to allow retrying tests when they fail.")
5610 (home-page "https://github.com/y-yagi/minitest-retry")
5611 (license license:expat)))
5612
5613(define-public ruby-minitest-sprint
5614 (package
5615 (name "ruby-minitest-sprint")
5616 (version "1.1.0")
5617 (source (origin
5618 (method url-fetch)
5619 (uri (rubygems-uri "minitest-sprint" version))
5620 (sha256
5621 (base32
5622 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
5623 (build-system ruby-build-system)
5624 (native-inputs
5625 (list ruby-hoe ruby-minitest))
5626 (synopsis "Fast test suite runner for minitest")
5627 (description "Minitest-sprint is a test runner for minitest that makes it
5628easier to re-run individual failing tests.")
5629 (home-page "https://github.com/seattlerb/minitest-sprint")
5630 (license license:expat)))
5631
5632(define-public ruby-minitest-stub-const
5633 (package
5634 (name "ruby-minitest-stub-const")
5635 (version "0.6") ;for Rakefile
5636 (source (origin
5637 (method git-fetch)
5638 (uri (git-reference
5639 (url "https://github.com/adammck/minitest-stub-const")
5640 (commit (string-append "v" version))))
5641 (file-name (git-file-name name version))
5642 (sha256
5643 (base32
5644 "0cz4r9fxplx94c7wakx0998n2gv7l21prn8pfpw6z2c33k3g2xar"))))
5645 (build-system ruby-build-system)
5646 (synopsis "Stub constants for the duration of a block in MiniTest")
5647 (description "This package provides a MiniTest extension to stub constants
5648for the duration of a block in MiniTest.")
5649 (home-page "https://github.com/adammck/minitest-stub-const")
5650 (license license:expat)))
5651
5652(define-public ruby-minitest-bacon
5653 (package
5654 (name "ruby-minitest-bacon")
5655 (version "1.0.3")
5656 (source (origin
5657 (method url-fetch)
5658 (uri (rubygems-uri "minitest-bacon" version))
5659 (sha256
5660 (base32
5661 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
5662 (build-system ruby-build-system)
5663 (native-inputs
5664 (list ruby-hoe))
5665 (inputs
5666 (list ruby-minitest))
5667 (synopsis "Bacon compatibility library for minitest")
5668 (description "Minitest-bacon extends minitest with bacon-like
5669functionality, making it easier to migrate test suites from bacon to minitest.")
5670 (home-page "https://github.com/seattlerb/minitest-bacon")
5671 (license license:expat)))
5672
5673(define-public ruby-minitest-focus
5674 (package
5675 (name "ruby-minitest-focus")
5676 (version "1.3.1")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (rubygems-uri "minitest-focus" version))
5681 (sha256
5682 (base32
5683 "13kd2dkd9akfb99ziqndz9mir5iynyfyj2l45mcibab6mq5k8g67"))))
5684 (build-system ruby-build-system)
5685 (propagated-inputs
5686 (list ruby-minitest))
5687 (native-inputs
5688 (list ruby-hoe))
5689 (synopsis "Allows a few specific tests to be focused on")
5690 (description
5691 "@code{minitest-focus} gives the ability focus on a few tests with ease
5692without having to use command-line arguments. It introduces a @code{focus}
5693class method for use in testing classes, specifying that the next defined test
5694is to be run.")
5695 (home-page "https://github.com/seattlerb/minitest-focus")
5696 (license license:expat)))
5697
5698(define-public ruby-minitest-power-assert
5699 (package
5700 (name "ruby-minitest-power-assert")
5701 (version "0.3.1")
5702 (source (origin
5703 (method url-fetch)
5704 (uri (rubygems-uri "minitest-power_assert" version))
5705 (sha256
5706 (base32
5707 "1dazl6nbxjvvmi5jamrsygkz396s29b7cd841ni6qy4izk8jd9b7"))))
5708 (build-system ruby-build-system)
5709 (propagated-inputs (list ruby-minitest ruby-power-assert))
5710 (synopsis "Power Assert implementation for Minitest")
5711 (description "This gem provides a Power Assert implementation for
5712Minitest. It is inspired by the @code{test-unit-power_assert} gem.")
5713 (home-page "https://github.com/hsbt/minitest-power_assert")
5714 (license license:bsd-2)))
5715
5716(define-public ruby-minitest-profile
5717 (package
5718 (name "ruby-minitest-profile")
5719 (version "0.0.2")
5720 (source (origin
5721 (method url-fetch)
5722 (uri (rubygems-uri "minitest-profile" version))
5723 (sha256
5724 (base32
5725 "13h4nwbq6yv7hsaa7dpj90lry4rc5qqnpzvm9n2s57mm2xi31xfa"))))
5726 (build-system ruby-build-system)
5727 (synopsis "Display the slowest tests in a MiniTest suite")
5728 (description "This package provides a MiniTest plugin for displaying the
5729slowest tests in a minitest suite.")
5730 (home-page "https://github.com/nmeans/minitest-profile")
5731 (license license:expat)))
5732
5733(define-public ruby-minitest-pretty-diff
5734 ;; Use git reference because gem is out of date and does not contain testing
5735 ;; script. There are no releases on GitHub.
5736 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
5737 (package
5738 (name "ruby-minitest-pretty-diff")
5739 (version (string-append "0.1-1." (string-take commit 8)))
5740 (source (origin
5741 (method git-fetch)
5742 (uri (git-reference
5743 (url "https://github.com/adammck/minitest-pretty_diff")
5744 (commit commit)))
5745 (file-name (string-append name "-" version "-checkout"))
5746 (sha256
5747 (base32
5748 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
5749 (build-system ruby-build-system)
5750 (arguments
5751 `(#:phases
5752 (modify-phases %standard-phases
5753 (replace 'check
5754 (lambda* (#:key tests? #:allow-other-keys)
5755 (when tests?
5756 (invoke "sh" "script/test")))))))
5757 (native-inputs
5758 (list bundler ruby-turn))
5759 (synopsis "Pretty-print hashes and arrays in MiniTest")
5760 (description
5761 "@code{minitest-pretty_diff} monkey-patches
5762@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
5763diffing them. This makes it easier to spot differences between nested
5764structures when tests fail.")
5765 (home-page "https://github.com/adammck/minitest-pretty_diff")
5766 (license license:expat))))
5767
5768(define-public ruby-minitest-proveit
5769 (package
5770 (name "ruby-minitest-proveit")
5771 (version "1.0.0")
5772 (source (origin
5773 (method url-fetch)
5774 (uri (rubygems-uri "minitest-proveit" version))
5775 (sha256
5776 (base32
5777 "0k1hpr8lgkgygfivgcsnnib7xjlf9ribgpn7yidvb4q0l0q2yfmr"))))
5778 (build-system ruby-build-system)
5779 (native-inputs (list ruby-hoe))
5780 (propagated-inputs (list ruby-minitest))
5781 (synopsis "Assertion-based tests extension for MiniTest")
5782 (description "The @code{minitest-proveit} MiniTest extension ensures all
5783tests to prove success (via at least one assertion) rather than rely on the
5784absence of failure.")
5785 (home-page "https://github.com/seattlerb/minitest-proveit")
5786 (license license:expat)))
5787
5788(define-public ruby-minitest-moar
5789 (package
5790 (name "ruby-minitest-moar")
5791 (version "0.0.4")
5792 (source
5793 (origin
5794 (method url-fetch)
5795 (uri (rubygems-uri "minitest-moar" version))
5796 (sha256
5797 (base32
5798 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
5799 (build-system ruby-build-system)
5800 (arguments
5801 `(#:phases
5802 (modify-phases %standard-phases
5803 (add-before 'check 'clean-dependencies
5804 (lambda _
5805 ;; Remove all gems defined in the Gemfile because these are not
5806 ;; truly needed.
5807 (substitute* "Gemfile"
5808 (("gem .*") ""))
5809 ;; Remove byebug as not needed to run tests.
5810 (substitute* "test/test_helper.rb"
5811 (("require 'byebug'") ""))
5812 #t)))))
5813 (native-inputs
5814 (list bundler ruby-minitest))
5815 (synopsis "Extra features and changes to MiniTest")
5816 (description "@code{MiniTest Moar} add some additional features and
5817changes some default behaviours in MiniTest. For instance, Moar replaces the
5818MiniTest @code{Object#stub} with a global @code{stub} method.")
5819 (home-page "https://github.com/dockyard/minitest-moar")
5820 (license license:expat)))
5821
5822(define-public ruby-minitest-bonus-assertions
5823 (package
5824 (name "ruby-minitest-bonus-assertions")
5825 (version "3.0")
5826 (source
5827 (origin
5828 (method url-fetch)
5829 (uri (rubygems-uri "minitest-bonus-assertions" version))
5830 (sha256
5831 (base32
5832 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
5833 (build-system ruby-build-system)
5834 (arguments
5835 (list
5836 #:tests? #f ; Test suite has bitrotted.
5837 #:phases
5838 #~(modify-phases %standard-phases
5839 (add-before 'check 'clean-dependencies
5840 (lambda _
5841 ;; Remove unneeded require statement that would entail another
5842 ;; dependency.
5843 (substitute* "test/minitest_config.rb"
5844 (("require 'minitest/bisect'") "")))))))
5845 (native-inputs
5846 (list ruby-hoe
5847 ruby-minitest-focus
5848 ruby-minitest-moar))
5849 (synopsis "Bonus assertions for @code{Minitest}")
5850 (description
5851 "Minitest bonus assertions provides extra MiniTest assertions. For
5852instance, it provides @code{assert_true}, @code{assert_false} and
5853@code{assert_set_equal}.")
5854 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
5855 (license license:expat)))
5856
5857(define-public ruby-minitest-reporters
5858 (package
5859 (name "ruby-minitest-reporters")
5860 (version "1.3.6")
5861 (source
5862 (origin
5863 (method url-fetch)
5864 (uri (rubygems-uri "minitest-reporters" version))
5865 (sha256
5866 (base32
5867 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
5868 (build-system ruby-build-system)
5869 (arguments
5870 '(#:phases
5871 (modify-phases %standard-phases
5872 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
5873 ;; including it as an input can lead to circular dependencies.
5874 (add-after 'unpack 'remove-rubocop-from-Rakefile
5875 (lambda _
5876 (substitute* "Rakefile"
5877 (("require 'rubocop/rake\\_task'") "")
5878 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
5879 #t))
5880 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
5881 (lambda _
5882 (substitute* "minitest-reporters.gemspec"
5883 ((".*%q<rubocop>.*") "\n"))
5884 #t)))))
5885 (propagated-inputs
5886 (list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
5887 (native-inputs
5888 (list bundler ruby-maruku))
5889 (synopsis "Enhanced reporting for Minitest tests")
5890 (description
5891 "@code{minitest/reporters} provides a custom Minitest runner to improve
5892how the test state is reported. A number of different reporters are
5893available, including a spec reporter, progress bar reporter, a HTML
5894reporter.")
5895 (home-page "https://github.com/kern/minitest-reporters")
5896 (license license:expat)))
5897
5898(define-public ruby-minitest-rg
5899 (package
5900 (name "ruby-minitest-rg")
5901 (version "5.2.0")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (rubygems-uri "minitest-rg" version))
5906 (sha256
5907 (base32
5908 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
5909 (build-system ruby-build-system)
5910 (arguments
5911 ;; Some tests fail even outside Guix, so disable tests.
5912 ;; https://github.com/blowmage/minitest-rg/issues/12
5913 ;; https://github.com/blowmage/minitest-rg/pull/13
5914 `(#:tests? #f))
5915 (propagated-inputs
5916 (list ruby-minitest))
5917 (synopsis "Coloured output for Minitest")
5918 (description
5919 "@code{minitest-rg} changes the colour of the output from Minitest.")
5920 (home-page "https://blowmage.com/minitest-rg/")
5921 (license license:expat)))
5922
5923(define-public ruby-minitest-global-expectations
5924 (package
5925 (name "ruby-minitest-global-expectations")
5926 (version "1.0.1")
5927 (source
5928 (origin
5929 (method url-fetch)
5930 (uri (rubygems-uri "minitest-global_expectations"
5931 version))
5932 (sha256
5933 (base32
5934 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
5935 (build-system ruby-build-system)
5936 (propagated-inputs
5937 (list ruby-minitest))
5938 (synopsis "Adjust minitest behaviour for calling expectation methods")
5939 (description
5940 "Minitest-global_expectations allows continued use of expectation methods
5941on all objects. Calling expectation methods on all objects was deprecated in
5942minitest 5.12, and is planned to be removed from minitest 6.")
5943 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
5944 (license license:expat)))
5945
5946(define-public ruby-minitest-hooks
5947 (package
5948 (name "ruby-minitest-hooks")
5949 (version "1.5.0")
5950 (source
5951 (origin
5952 (method url-fetch)
5953 (uri (rubygems-uri "minitest-hooks" version))
5954 (sha256
5955 (base32
5956 "05z8r6sw3fz4s44fs1150ndlcmcy82vlxmhps5nncg8vk59k3gmf"))))
5957 (build-system ruby-build-system)
5958 (arguments
5959 '(#:test-target "spec"
5960 ;; Test suite is incompatible with ruby-2.7.
5961 ;; https://github.com/jeremyevans/minitest-hooks/issues/19
5962 #:tests? #f))
5963 (native-inputs
5964 (list ruby-sequel ruby-sqlite3))
5965 (synopsis "Hooks for the minitest framework")
5966 (description
5967 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
5968@code{around_all} hooks for Minitest. This allows, for instance, running each
5969suite of specs inside a database transaction, running each spec inside its own
5970savepoint inside that transaction. This can significantly speed up testing
5971for specs that share expensive database setup code.")
5972 (home-page "https://github.com/jeremyevans/minitest-hooks")
5973 (license license:expat)))
5974
5975(define-public ruby-daemons
5976 (package
5977 (name "ruby-daemons")
5978 (version "1.2.5")
5979 (source (origin
5980 (method url-fetch)
5981 (uri (rubygems-uri "daemons" version))
5982 (sha256
5983 (base32
5984 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
5985 (build-system ruby-build-system)
5986 (arguments
5987 `(#:tests? #f)) ; no test suite
5988 (synopsis "Daemonize Ruby programs")
5989 (description "Daemons provides a way to wrap existing Ruby scripts to be
5990run as a daemon and to be controlled by simple start/stop/restart commands.")
5991 (home-page "https://github.com/thuehlinger/daemons")
5992 (license license:expat)))
5993
5994(define-public ruby-dalli
5995 (package
5996 (name "ruby-dalli")
5997 (version "3.2.4")
5998 (source (origin
5999 (method git-fetch) ;for tests
6000 (uri (git-reference
6001 (url "https://github.com/petergoldstein/dalli")
6002 (commit (string-append "v" version))))
6003 (file-name (git-file-name name version))
6004 (sha256
6005 (base32
6006 "1hhqqv1j3zd2y0vr6maaabsflrvkf1x0i6z8n725mhqydp3f9gwp"))))
6007 (build-system ruby-build-system)
6008 ;; Disable tests to avoid a dependency cycle with ruby-activesupport,
6009 ;; through ruby-ruby-prof.
6010 (arguments (list #:tests? #f))
6011 (synopsis "High performance memcached client for Ruby")
6012 (description "Dalli is a high performance pure Ruby client for accessing
6013memcached servers. Dalli supports:
6014
6015@itemize
6016@item Simple and complex memcached configurations
6017@item Fail-over between memcached instances
6018@item Fine-grained control of data serialization and compression
6019@item Thread-safe operation
6020@item SSL/TLS connections to memcached
6021@item SASL authentication.
6022@end itemize
6023
6024The name is a variant of Salvador Dali for his famous painting The Persistence
6025of Memory.")
6026 (home-page "https://github.com/petergoldstein/dalli")
6027 (license license:expat)))
6028
6029(define-public ruby-data_uri
6030 (package
6031 (name "ruby-data_uri")
6032 (version "0.1.0")
6033 (source
6034 (origin
6035 (method url-fetch)
6036 (uri (rubygems-uri "data_uri" version))
6037 (sha256
6038 (base32
6039 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
6040 (build-system ruby-build-system)
6041 (synopsis "URI class for parsing data URIs")
6042 (description
6043 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
6044embedded inside a URI. The URI::Data class provides support for parsing these
6045URIs using the normal URI.parse method.")
6046 (home-page "https://github.com/dball/data_uri")
6047 (license license:expat)))
6048
6049(define-public ruby-debug
6050 (package
6051 (name "ruby-debug")
6052 (version "1.7.2")
6053 (source (origin
6054 (method url-fetch)
6055 (uri (rubygems-uri "debug" version))
6056 (sha256
6057 (base32
6058 "0x59508j69w9p275gabysv521n210pd3n060gqfgsiqjms1h0ldf"))))
6059 (build-system ruby-build-system)
6060 (arguments (list #:test-target "test_all"))
6061 (propagated-inputs (list ruby-irb ruby-reline))
6062 (synopsis "Debugging functionality for Ruby")
6063 (description "Debugging functionality for Ruby. This is completely
6064rewritten debug.rb which was contained by the ancient Ruby versions. It is
6065included with Ruby itself, but this package is made available so that the
6066latest version can be made available independently from Ruby.")
6067 (home-page "https://github.com/ruby/debug")
6068 (license license:bsd-2)))
6069
6070(define-public ruby-deep-merge
6071 (package
6072 (name "ruby-deep-merge")
6073 (version "1.2.1")
6074 (home-page "https://github.com/danielsdeleo/deep_merge")
6075 ;; The Rubygem source does not contain the gemspec required for tests.
6076 (source (origin
6077 (method git-fetch)
6078 (uri (git-reference (url home-page) (commit version)))
6079 (file-name (git-file-name name version))
6080 (sha256
6081 (base32
6082 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
6083 (build-system ruby-build-system)
6084 (native-inputs
6085 (list ruby-minitest))
6086 (synopsis "Recursively merge hashes")
6087 (description
6088 "Deep Merge is a set of utility functions for @code{Hash}. It permits
6089you to merge elements inside a hash together recursively.")
6090 (license license:expat)))
6091
6092(define-public ruby-delayed-job
6093 (package
6094 (name "ruby-delayed-job")
6095 (version "4.1.11")
6096 (source (origin
6097 (method url-fetch)
6098 (uri (rubygems-uri "delayed_job" version))
6099 (sha256
6100 (base32
6101 "0s2xg72ljg4cwmr05zi67vcyz8zib46gvvf7rmrdhsyq387m2qcq"))))
6102 (build-system ruby-build-system)
6103 (arguments
6104 (list #:phases
6105 #~(modify-phases %standard-phases
6106 (add-after 'unpack 'disable-bundler
6107 (lambda _
6108 (substitute* "Rakefile"
6109 (("require 'bundler/setup'") "")
6110 (("Bundler::GemHelper\\.install_tasks") ""))))
6111 (add-after 'unpack 'disable-rubocop
6112 (lambda _
6113 (substitute* "Rakefile"
6114 (("require 'rubocop/rake_task'") "")
6115 (("RuboCop::RakeTask.new") ""))))
6116 (add-after 'extract-gemspec 'remove-dependency-on-actionmailer
6117 (lambda _
6118 (substitute* "spec/helper.rb"
6119 (("require 'action_mailer'") ""))
6120 (substitute* "delayed_job.gemspec"
6121 (("\"spec/performable_mailer_spec.rb\".freeze, ") ""))
6122 (delete-file "spec/performable_mailer_spec.rb"))))))
6123 (native-inputs
6124 (list ruby-activerecord
6125 ruby-rspec
6126 ruby-simplecov
6127 ruby-simplecov-lcov
6128 ruby-zeitwerk
6129 ruby-mini-portile-2))
6130 (propagated-inputs
6131 (list ruby-activesupport))
6132 (synopsis "Asynchronous background tasks execution library")
6133 (description "Delayed_job (or DJ) encapsulates the common pattern of
6134asynchronously executing longer tasks in the background. It is a direct
6135extraction from Shopify where the job table is responsible for a multitude of
6136core tasks.")
6137 (home-page "https://github.com/collectiveidea/delayed_job")
6138 (license license:expat)))
6139
6140(define-public ruby-git
6141 (package
6142 (name "ruby-git")
6143 (version "1.3.0")
6144 (source (origin
6145 (method url-fetch)
6146 (uri (rubygems-uri "git" version))
6147 (sha256
6148 (base32
6149 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
6150 (build-system ruby-build-system)
6151 (arguments
6152 `(#:tests? #f ; no tests
6153 #:phases (modify-phases %standard-phases
6154 (add-after 'install 'patch-git-binary
6155 (lambda* (#:key inputs outputs #:allow-other-keys)
6156 ;; Make the default git binary an absolute path to the
6157 ;; store.
6158 (let ((git (search-input-file inputs "/bin/git"))
6159 (config (string-append
6160 (assoc-ref outputs "out")
6161 "/lib/ruby/vendor_ruby/gems/git-"
6162 ,version "/lib/git/config.rb")))
6163 (substitute* (list config)
6164 (("'git'")
6165 (string-append "'" git "'")))
6166 #t))))))
6167 (inputs
6168 (list git))
6169 (synopsis "Ruby wrappers for Git")
6170 (description "Ruby/Git is a Ruby library that can be used to create, read
6171and manipulate Git repositories by wrapping system calls to the git binary.")
6172 (home-page "https://github.com/schacon/ruby-git")
6173 (license license:expat)))
6174
6175(define-public ruby-hocon
6176 (package
6177 (name "ruby-hocon")
6178 (version "1.4.0")
6179 (home-page "https://github.com/puppetlabs/ruby-hocon")
6180 (source (origin
6181 (method git-fetch)
6182 (uri (git-reference (url home-page) (commit version)))
6183 (file-name (git-file-name name version))
6184 (sha256
6185 (base32
6186 "04wgv0pwrghawnl6qp346z59fvp9v37jymq8p0lsrzxa6nvrykmk"))))
6187 (build-system ruby-build-system)
6188 (arguments
6189 (list
6190 #:phases
6191 #~(modify-phases %standard-phases
6192 (replace 'check
6193 (lambda* (#:key tests? #:allow-other-keys)
6194 (if tests?
6195 (invoke "rspec")
6196 (format #t "test suite not run~%")))))))
6197 (native-inputs
6198 (list bundler ruby-rspec))
6199 (synopsis "HOCON config library")
6200 (description
6201 "This package provides Ruby support for the @acronym{HOCON,
6202Human-Optimized Config Object Notation} configuration file format. It
6203supports parsing and modifying HOCON and JSON files, and rendering parsed
6204objects back to a @code{String}.")
6205 (license license:asl2.0)))
6206
6207(define-public ruby-slop
6208 (package
6209 (name "ruby-slop")
6210 (version "4.10.1")
6211 (source (origin
6212 (method url-fetch)
6213 (uri (rubygems-uri "slop" version))
6214 (sha256
6215 (base32
6216 "1iyrjskgxyn8i1679qwkzns85p909aq77cgx2m4fs5ygzysj4hw4"))))
6217 (build-system ruby-build-system)
6218 (synopsis "Ruby command line option parser")
6219 (description "Slop provides a Ruby domain specific language for gathering
6220options and parsing command line flags.")
6221 (home-page "https://github.com/leejarvis/slop")
6222 (license license:expat)))
6223
6224(define-public ruby-slop-3
6225 (package (inherit ruby-slop)
6226 (version "3.6.0")
6227 (source (origin
6228 (method url-fetch)
6229 (uri (rubygems-uri "slop" version))
6230 (sha256
6231 (base32
6232 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
6233
6234(define-public ruby-multi-xml
6235 (package
6236 (name "ruby-multi-xml")
6237 (version "0.6.0")
6238 (source
6239 (origin
6240 (method url-fetch)
6241 (uri (rubygems-uri "multi_xml" version))
6242 (sha256
6243 (base32
6244 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
6245 (build-system ruby-build-system)
6246 (arguments
6247 '(#:tests? #f)) ; No included tests
6248 (synopsis "Swappable XML backends for Ruby")
6249 (description
6250 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
6251Nokogiri, Ox, or REXML.")
6252 (home-page "https://github.com/sferik/multi_xml")
6253 (license license:expat)))
6254
6255(define-public ruby-multipart-parser
6256 (package
6257 (name "ruby-multipart-parser")
6258 (version "0.1.1")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (rubygems-uri "multipart-parser" version))
6262 (sha256
6263 (base32
6264 "0xb4p475yrfm883h9kn80a021myn17dvs50wpa1djzcmlq7p0882"))))
6265 (build-system ruby-build-system)
6266 (arguments
6267 (list
6268 #:phases #~(modify-phases %standard-phases
6269 (add-after 'unpack 'skip-failing-test
6270 ;; One test fails for unknown reasons (see:
6271 ;; https://github.com/danabr/multipart-parser/issues/7).
6272 (lambda _
6273 (substitute* "test/multipart_parser/reader_test.rb"
6274 (("def test_long" all)
6275 (string-append all "\n return true"))))))))
6276 (synopsis "Parser for multipart MIME messages")
6277 (description "@code{multipart-parser} is a simple parser for multipart
6278MIME messages, written in Ruby, based on felixge/node-formidable's parser. It
6279has the following characteristics:
6280@itemize
6281@item Pure Ruby
6282@item Event-driven API
6283@item Only supports one level of multipart parsing
6284@item Does not perform I/O
6285@item Does not depend on any other library.
6286@end itemize")
6287 (home-page "https://github.com/danabr/multipart-parser")
6288 (license license:expat)))
6289
6290(define-public ruby-multipart-post
6291 (package
6292 (name "ruby-multipart-post")
6293 (version "2.0.0")
6294 (source (origin
6295 (method url-fetch)
6296 (uri (rubygems-uri "multipart-post" version))
6297 (sha256
6298 (base32
6299 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
6300 (build-system ruby-build-system)
6301 (native-inputs
6302 (list bundler))
6303 (synopsis "Multipart POST library for Ruby")
6304 (description "Multipart-Post Adds multipart POST capability to Ruby's
6305net/http library.")
6306 (home-page "https://github.com/nicksieger/multipart-post")
6307 (license license:expat)))
6308
6309(define-public ruby-multi-json
6310 (package
6311 (name "ruby-multi-json")
6312 (version "1.15.0")
6313 (source
6314 (origin
6315 (method git-fetch)
6316 ;; Tests are not distributed at rubygems.org so download from GitHub
6317 ;; instead.
6318 (uri (git-reference
6319 (url "https://github.com/intridea/multi_json")
6320 (commit (string-append "v" version))))
6321 (file-name (git-file-name name version))
6322 (sha256
6323 (base32
6324 "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
6325 (build-system ruby-build-system)
6326 (arguments
6327 (list
6328 ;; TODO Tests don't currently work with Ruby 3
6329 #:tests? #f
6330 #:phases
6331 #~(modify-phases %standard-phases
6332 (add-before 'check 'pre-check
6333 (lambda _
6334 ;; As seen in the .travis.yml file.
6335 (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
6336 (native-inputs
6337 (list ruby-rspec ruby-json-pure ruby-oj ruby-yajl-ruby))
6338 (synopsis "Common interface to multiple JSON libraries for Ruby")
6339 (description
6340 "This package provides a common interface to multiple JSON libraries,
6341including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
6342NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
6343 (home-page "https://github.com/intridea/multi_json")
6344 (license license:expat)))
6345
6346(define-public ruby-multi-test
6347 (package
6348 (name "ruby-multi-test")
6349 (version "0.1.2")
6350 (source
6351 (origin
6352 (method url-fetch)
6353 (uri (rubygems-uri "multi_test" version))
6354 (sha256
6355 (base32
6356 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
6357 (build-system ruby-build-system)
6358 (arguments
6359 '(;; Tests require different sets of specific gem versions to be available,
6360 ;; and there is no gemfile that specifies the newest versions of
6361 ;; dependencies to be tested.
6362 #:tests? #f))
6363 (synopsis
6364 "Interface to testing libraries loaded into a running Ruby process")
6365 (description
6366 "@code{multi_test} provides a uniform interface onto whatever testing
6367libraries that have been loaded into a running Ruby process to help control
6368rogue test/unit/autorun requires.")
6369 (home-page "https://github.com/cucumber/multi_test")
6370 (license license:expat)))
6371
6372(define-public ruby-arr-pm
6373 (package
6374 (name "ruby-arr-pm")
6375 (version "0.0.12")
6376 (source (origin
6377 (method url-fetch)
6378 (uri (rubygems-uri "arr-pm" version))
6379 (sha256
6380 (base32
6381 "0fddw0vwdrr7v3a0lfqbmnd664j48a9psrjd3wh3k4i3flplizzx"))))
6382 (build-system ruby-build-system)
6383 (arguments
6384 (list #:phases
6385 #~(modify-phases %standard-phases
6386 (replace 'check
6387 (lambda* (#:key tests? #:allow-other-keys)
6388 (when tests?
6389 (invoke "rspec")))))))
6390 (native-inputs (list ruby-flores ruby-insist ruby-rspec ruby-stud))
6391 (synopsis "RPM reader/writer library written in Ruby")
6392 (description "This library allows reading and writing RPM packages. It is
6393used by the @command{fpm} tool. It is written in pure Ruby because
6394@code{librpm} is not available on all systems and requires many
6395dependencies.")
6396 (home-page "https://github.com/jordansissel/ruby-arr-pm")
6397 (license license:asl2.0)))
6398
6399(define-public ruby-arel
6400 (package
6401 (name "ruby-arel")
6402 (version "9.0.0")
6403 (source (origin
6404 (method url-fetch)
6405 (uri (rubygems-uri "arel" version))
6406 (sha256
6407 (base32
6408 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
6409 (build-system ruby-build-system)
6410 (arguments '(#:tests? #f)) ; no tests
6411 (home-page "https://github.com/rails/arel")
6412 (synopsis "SQL AST manager for Ruby")
6413 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
6414Ruby. It simplifies the generation of complex SQL queries and adapts to
6415various relational database implementations.")
6416 (license license:expat)))
6417
6418(define-public ruby-minitar
6419 ;; We package from the GitHub source to fix the security issue reported at
6420 ;; https://github.com/halostatue/minitar/issues/16.
6421 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
6422 (package
6423 (name "ruby-minitar")
6424 (version (string-append "0.5.4-1." (string-take commit 8)))
6425 (source
6426 (origin
6427 (method git-fetch)
6428 (uri (git-reference
6429 (url "https://github.com/halostatue/minitar")
6430 (commit commit)))
6431 (file-name (string-append name "-" version "-checkout"))
6432 (sha256
6433 (base32
6434 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
6435 (build-system ruby-build-system)
6436 (arguments
6437 '(#:tests? #f)) ; missing a gemspec
6438 (synopsis "Ruby library and utility for handling tar archives")
6439 (description
6440 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
6441that provides the ability to deal with POSIX tar archive files.")
6442 (home-page "http://www.github.com/atoulme/minitar")
6443 (license (list license:gpl2+ license:ruby)))))
6444
6445(define-public ruby-mini-portile
6446 (package
6447 (name "ruby-mini-portile")
6448 (version "0.6.2")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (rubygems-uri "mini_portile" version))
6453 (sha256
6454 (base32
6455 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
6456 (build-system ruby-build-system)
6457 (arguments
6458 '(#:tests? #f)) ; tests require network access
6459 (synopsis "Ports system for Ruby developers")
6460 (description "Mini-portile is a port/recipe system for Ruby developers.
6461It provides a standard way to compile against specific versions of libraries
6462to reproduce user environments.")
6463 (home-page "https://github.com/flavorjones/mini_portile")
6464 (license license:expat)))
6465
6466(define-public ruby-mini-portile-2
6467 (package
6468 (inherit ruby-mini-portile)
6469 (version "2.8.2")
6470 (source (origin
6471 (method url-fetch)
6472 (uri (rubygems-uri "mini_portile2" version))
6473 (sha256
6474 (base32
6475 "0z7f38iq37h376n9xbl4gajdrnwzq284c9v1py4imw3gri2d5cj6"))))))
6476
6477(define-public ruby-nokogiri
6478 (package
6479 (name "ruby-nokogiri")
6480 (version "1.15.2")
6481 (source (origin
6482 (method git-fetch)
6483 (uri (git-reference
6484 (url "https://github.com/sparklemotion/nokogiri")
6485 (commit "a6ad20b3edc8f020043ccfe5d9ec6ae9af103720")))
6486 (file-name (git-file-name name version))
6487 (sha256
6488 (base32
6489 "1n0vlg6v58jw3qzgyihz1dh5fvp4js1qgdh75j0kn47nvyiw3jxj"))
6490 (patches (search-patches "ruby-nokogiri.patch"))))
6491 (build-system ruby-build-system)
6492 (arguments
6493 (list #:gem-flags #~(list "--" "--use-system-libraries"
6494 (string-append "--with-xml2-include="
6495 #$(this-package-input "libxml2")
6496 "/include/libxml2"))
6497 #:phases #~(modify-phases %standard-phases
6498 (add-after 'install 'delete-mkmf.log
6499 (lambda _
6500 ;; Rubygems installs build log files that embed volatile file
6501 ;; names (see:
6502 ;; https://github.com/rubygems/rubygems/issues/6259).
6503 (for-each delete-file
6504 (find-files #$output "^mkmf\\.log$"))))
6505 (delete 'check)
6506 (add-after 'install 'check
6507 (lambda* (#:key tests? #:allow-other-keys)
6508 (setenv "GEM_PATH" (string-append
6509 (getenv "GEM_PATH") ":"
6510 #$output "/lib/ruby/vendor_ruby"))
6511 (when tests?
6512 (for-each (lambda (file)
6513 (invoke "ruby" "-Itest" file))
6514 (find-files "test" "^test_.*\\.rb"))))))))
6515 (native-inputs (list ruby-hoe ruby-rubyzip))
6516 (inputs (list zlib libxml2 libxslt))
6517 (propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
6518 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
6519 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
6520both CSS3 selector and XPath 1.0 support.")
6521 (home-page "https://nokogiri.org/")
6522 (license license:expat)))
6523
6524(define-public ruby-method-source
6525 (package
6526 (name "ruby-method-source")
6527 (version "1.0.0")
6528 (source
6529 (origin
6530 (method url-fetch)
6531 (uri (rubygems-uri "method_source" version))
6532 (sha256
6533 (base32
6534 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
6535 (build-system ruby-build-system)
6536 (arguments
6537 `(#:test-target "spec"
6538 #:phases
6539 (modify-phases %standard-phases
6540 (add-after 'unpack 'remove-git-ls-files
6541 (lambda* (#:key outputs #:allow-other-keys)
6542 (substitute* "Rakefile"
6543 (("git ls-files") "find . -type f"))
6544 #t)))))
6545 (native-inputs
6546 (list ruby-rspec))
6547 (synopsis "Retrieve the source code for Ruby methods")
6548 (description "Method_source retrieves the source code for Ruby methods.
6549Additionally, it can extract source code from Proc and Lambda objects or just
6550extract comments.")
6551 (home-page "https://github.com/banister/method_source")
6552 (license license:expat)))
6553
6554(define-public ruby-coderay
6555 (package
6556 (name "ruby-coderay")
6557 (version "1.1.2")
6558 (source
6559 (origin
6560 (method url-fetch)
6561 (uri (rubygems-uri "coderay" version))
6562 (sha256
6563 (base32
6564 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
6565 (build-system ruby-build-system)
6566 (arguments
6567 '(#:tests? #f)) ; missing test files
6568 (synopsis "Ruby syntax highlighting library")
6569 (description "Coderay is a Ruby library that provides syntax highlighting
6570for select languages.")
6571 (home-page "http://coderay.rubychan.de")
6572 (license license:expat)))
6573
6574(define-public ruby-cuke-modeler
6575 (package
6576 (name "ruby-cuke-modeler")
6577 (version "3.19.0")
6578 (source (origin
6579 (method git-fetch)
6580 (uri (git-reference
6581 (url "https://github.com/enkessler/cuke_modeler")
6582 (commit (string-append "v" version))))
6583 (file-name (git-file-name name version))
6584 (sha256
6585 (base32
6586 "0bizla3k124lj4r7f2k5cdfm2sawzd6rdmb6rgbkbng2fygxsjib"))))
6587 (build-system ruby-build-system)
6588 (arguments
6589 (list #:test-target "default"
6590 #:phases
6591 #~(modify-phases %standard-phases
6592 (add-after 'unpack 'relax-requirements
6593 (lambda _
6594 (substitute* "Gemfile"
6595 ;; Cucumber appears pinned to an older version for no
6596 ;; particular reason (see:
6597 ;; https://github.com/enkessler/cuke_modeler/issues/14).
6598 (("'cucumber', '2.2.0'")
6599 "'cucumber', '>= 2.2.0'"))
6600 ;; Disable Bundler.
6601 (substitute* "bin/console"
6602 (("require 'bundler/setup'") ""))
6603 (substitute* "rakefiles/testing_tasks.rb"
6604 (("'bundle', 'exec', ") ""))
6605 ;; Remove extraneous dependencies.
6606 (substitute* "cuke_modeler.gemspec"
6607 ((".*bundler.*") "")
6608 ((".*rubocop.*") "")
6609 ((".*yard.*") ""))
6610 (substitute* "Rakefile"
6611 (("Rainbow.enabled = true") "")
6612 (("require_relative 'rakefiles/documentation_tasks'") "")
6613 (("require_relative 'rakefiles/other_tasks'") "")
6614 (("require_relative 'rakefiles/release_tasks'") "")))))))
6615 (native-inputs
6616 (list ruby-childprocess
6617 ruby-cucumber
6618 ruby-rainbow
6619 ruby-rspec
6620 ruby-simplecov
6621 ruby-simplecov-lcov))
6622 (propagated-inputs (list ruby-cucumber-gherkin))
6623 (synopsis "Gherkin test suite analysis tool")
6624 (description "CukeModeler facilitates modeling a test suite that is
6625written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
6626providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
6627the @code{cucumber-gherkin} generates when parsing features, as well as
6628providing models for feature files and directories in order to be able to have
6629a fully traversable model tree of a test suite's structure. These models can
6630then be analyzed or manipulated more easily than the underlying AST layer.")
6631 (home-page "https://github.com/enkessler/cuke_modeler")
6632 (license license:expat)))
6633
6634(define-public ruby-parallel-tests
6635 (package
6636 (name "ruby-parallel-tests")
6637 (version "4.2.0")
6638 (home-page "https://github.com/grosser/parallel_tests")
6639 (source (origin
6640 (method git-fetch)
6641 (uri (git-reference
6642 (url home-page)
6643 (commit (string-append "v" version))))
6644 (file-name (string-append name version))
6645 (sha256
6646 (base32
6647 "00gbg5q36ayspkzd6r0kg4gk46lsw9s6misx14rczxaf9kqcdrmv"))))
6648 (build-system ruby-build-system)
6649 (arguments
6650 '(#:test-target "spec" ;avoid rubocop dependency
6651 #:phases (modify-phases %standard-phases
6652 (add-after 'patch-source-shebangs 'patch-shell-invokations
6653 (lambda _
6654 (substitute* '("lib/parallel_tests/tasks.rb"
6655 "spec/parallel_tests/tasks_spec.rb")
6656 (("/bin/sh") (which "sh"))
6657 (("/bin/bash") (which "bash")))))
6658 (add-before 'check 'relax-requirements
6659 (lambda _
6660 ;; Remove hard coded version constraints, instead just
6661 ;; use whatever versions are available in Guix.
6662 (delete-file "Gemfile.lock")
6663 (substitute* "Gemfile"
6664 (("'minitest',.*")
6665 "'minitest'\n")
6666 (("'cucumber',.*")
6667 "'cucumber'\n")
6668 ;; Do not depend on a git-fetched spinach version.
6669 (("gem 'spinach',.*")
6670 "gem 'spinach'\n")
6671 ((".*rubocop.*") ""))))
6672 (add-before 'check 'disable-rails-test
6673 (lambda _
6674 ;; XXX: This test attempts to download and run the test
6675 ;; suites of multiple Rails versions(!) directly.
6676 (delete-file "spec/rails_spec.rb")))
6677 (add-before 'check 'disable-problematic-tests
6678 (lambda _
6679 ;; This test fails, probably because of the newer
6680 ;; Cucumber version used here.
6681 (delete-file "spec/parallel_tests/cucumber/\
6682failure_logger_spec.rb") ))
6683 (add-before 'check 'set-HOME
6684 (lambda _
6685 ;; Some tests check the output of Bundler, and fail when
6686 ;; Bundler warns that /homeless-shelter does not exist.
6687 (setenv "HOME" "/tmp"))))))
6688 (native-inputs
6689 (list ruby-bump
6690 ruby-cucumber
6691 ruby-cuke-modeler
6692 ruby-minitest
6693 ruby-rake
6694 ruby-rspec
6695 ruby-spinach))
6696 (propagated-inputs
6697 (list ruby-parallel))
6698 (synopsis "Run tests in parallel")
6699 (description
6700 "This package can speed up @code{Test::Unit}, @code{RSpec},
6701@code{Cucumber}, and @code{Spinach} tests by running them concurrently
6702across multiple CPU cores.")
6703 (license license:expat)))
6704
6705(define-public ruby-parser
6706 (package
6707 (name "ruby-parser")
6708 (version "3.2.2.0")
6709 (source
6710 (origin
6711 (method url-fetch)
6712 (uri (rubygems-uri "parser" version))
6713 (sha256
6714 (base32
6715 "0s5afi89p76k8vpwiqvh343pm5l23ijqlpszhz65afym3zpkxhzx"))))
6716 (build-system ruby-build-system)
6717 (arguments '(#:tests? #f)) ; tests not included in gem
6718 (native-inputs (list bundler ruby-cliver ruby-simplecov ruby-racc))
6719 (inputs (list ragel))
6720 (propagated-inputs (list ruby-ast))
6721 (synopsis "Ruby parser written in pure Ruby")
6722 (description
6723 "This package provides a Ruby parser written in pure Ruby.")
6724 (home-page "https://github.com/whitequark/parser")
6725 (license license:expat)))
6726
6727(define-public ruby-set
6728 (package
6729 (name "ruby-set")
6730 (version "1.0.3")
6731 (source (origin
6732 (method url-fetch)
6733 (uri (rubygems-uri "set" version))
6734 (sha256
6735 (base32
6736 "07kc057nrkddrybqmlbmgf9x7nsmbc3ni6gy1z6xjx5b838vlj33"))))
6737 (build-system ruby-build-system)
6738 (synopsis
6739 "Ruby class to deal with collections of unordered, unique values")
6740 (description
6741 "This package provides a class to deal with collections of unordered,
6742unique values")
6743 (home-page "https://github.com/ruby/set")
6744 (license license:bsd-2)))
6745
6746(define-public ruby-sexp-processor
6747 (package
6748 (name "ruby-sexp-processor")
6749 (version "4.17.0")
6750 (source
6751 (origin
6752 (method url-fetch)
6753 (uri (rubygems-uri "sexp_processor" version))
6754 (sha256
6755 (base32
6756 "0vzz9mhg4kkdqf179pm30i204h7iskanxrk53j0csf0qrrs4iajd"))))
6757 (build-system ruby-build-system)
6758 (native-inputs
6759 (list ruby-hoe
6760 ruby-minitest
6761 ruby-minitest-proveit))
6762 (synopsis "ParseTree fork which includes generic S-exp processing tools")
6763 (description "The sexp_processor package is derived from ParseTree, but
6764contrary to ParseTree, it includes all the generic S-exp processing tools.
6765Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
6766@code{Environment}")
6767 (home-page "https://github.com/seattlerb/sexp_processor")
6768 (license license:expat)))
6769
6770(define-public ruby-ruby-parser
6771 (package
6772 (name "ruby-ruby-parser")
6773 (version "3.20.2")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (rubygems-uri "ruby_parser" version))
6778 (sha256
6779 (base32
6780 "0q851n8654wkjrq8jawq8vi5yhr1y9vpyr2vj7cnn3sa4ikg6d3z"))))
6781 (build-system ruby-build-system)
6782 (arguments
6783 (list
6784 #:phases
6785 #~(modify-phases %standard-phases
6786 (add-after 'unpack 'patch
6787 (lambda _
6788 (substitute* "Rakefile"
6789 (("`which bison`")
6790 (string-append "\"" (which "bison") "\""))
6791 (("which unifdef")
6792 (which "unifdef"))))))))
6793 (native-inputs
6794 (list ruby-hoe
6795 ruby-racc
6796 unifdef
6797 bison
6798 ruby-minitest))
6799 (propagated-inputs
6800 (list ruby-sexp-processor))
6801 (home-page "https://github.com/seattlerb/ruby_parser/")
6802 (synopsis "Ruby parser written in pure Ruby")
6803 (description "The ruby_parser (RP) package provides a Ruby parser written
6804in pure Ruby. It outputs S-expressions which can be manipulated and converted
6805back to Ruby via the @code{ruby2ruby} library.")
6806 (license license:expat)))
6807
6808(define-public ruby-ruby-version
6809 (package
6810 (name "ruby-ruby-version")
6811 (version "1.0.2")
6812 (source (origin
6813 (method url-fetch)
6814 (uri (rubygems-uri "ruby_version" version))
6815 (sha256
6816 (base32
6817 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
6818 (build-system ruby-build-system)
6819 (arguments
6820 (list #:phases
6821 #~(modify-phases %standard-phases
6822 (add-after 'extract-gemspec 'delete-gem-files
6823 ;; There are some pre-built files in the source, and
6824 ;; registered in the .gemspec (see:
6825 ;; https://github.com/janlelis/ruby_version/issues/1).
6826 (lambda _
6827 (delete-file-recursively "pkg")
6828 (substitute* "ruby_version.gemspec"
6829 (("\"pkg/ruby_version-1.0.0.gem\".freeze, ")
6830 "")
6831 (("\"pkg/ruby_version-1.0.1.gem\".freeze, ")
6832 ""))))
6833 (add-after 'extract-gemspec 'relax-requirements
6834 (lambda _
6835 (delete-file "Gemfile.lock")
6836 (substitute* "ruby_version.gemspec"
6837 (("\"Gemfile.lock\".freeze, ") "")
6838 ;; Allow a newers versions of development dependencies.
6839 (("~>") ">=")))))))
6840 (native-inputs (list ruby-rdoc ruby-rubygems-tasks ruby-rspec))
6841 (synopsis "Ruby class for checking the Ruby version")
6842 (description "This package provides a @code{RubyVersion} class which
6843offers a convenient Domain Specific Language (DSL) for checking for the right
6844Ruby version.")
6845 (home-page "https://github.com/janlelis/ruby_version")
6846 (license license:expat)))
6847
6848(define-public ruby-prawn-manual-builder
6849 (package
6850 (name "ruby-prawn-manual-builder")
6851 (version "0.3.1")
6852 (source
6853 (origin
6854 (method url-fetch)
6855 (uri (rubygems-uri "prawn-manual_builder" version))
6856 (sha256
6857 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
6858 (build-system ruby-build-system)
6859 (arguments
6860 '(#:tests? #f ; no included tests
6861 #:phases
6862 (modify-phases %standard-phases
6863 (add-after 'extract-gemspec 'patch-gemspec
6864 (lambda _
6865 (substitute* ".gemspec"
6866 ;; Loosen the requirement for pdf-inspector
6867 (("~> 1\\.0\\.7") ">= 0")))))))
6868 (propagated-inputs
6869 (list ruby-coderay))
6870 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
6871 (description
6872 "This package provides a tool for writing manuals for Prawn and Prawn
6873accessories")
6874 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
6875 (license %prawn-project-licenses)))
6876
6877(define-public ruby-progress_bar
6878 (package
6879 (name "ruby-progress_bar")
6880 (version "1.1.0")
6881 (source
6882 (origin
6883 (method url-fetch)
6884 (uri (rubygems-uri "progress_bar" version))
6885 (sha256
6886 (base32
6887 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
6888 (build-system ruby-build-system)
6889 (arguments
6890 '(#:test-target "spec"))
6891 (propagated-inputs
6892 (list ruby-highline ruby-options))
6893 (native-inputs
6894 (list bundler ruby-rspec ruby-timecop))
6895 (synopsis
6896 "Ruby library for displaying progress bars")
6897 (description
6898 "ProgressBar is a simple library for displaying progress bars. The
6899maximum value is configurable, and additional information can be displayed
6900like the percentage completion, estimated time remaining, elapsed time and
6901rate.")
6902 (home-page "https://github.com/paul/progress_bar")
6903 (license license:wtfpl2)))
6904
6905(define-public ruby-dep
6906 (package
6907 (name "ruby-dep")
6908 (version "1.5.0")
6909 (source
6910 (origin
6911 (method url-fetch)
6912 (uri (rubygems-uri "ruby_dep" version))
6913 (sha256
6914 (base32
6915 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
6916 (build-system ruby-build-system)
6917 (arguments
6918 (list
6919 #:ruby ruby-2.7
6920 #:tests? #f)) ; No included tests
6921 (synopsis "Creates a version constraint of supported Rubies")
6922 (description
6923 "This package helps create a version constraint of supported Rubies,
6924suitable for a gemspec file.")
6925 (home-page "https://github.com/e2/ruby_dep")
6926 (license license:expat)))
6927
6928(define-public ruby-progressbar
6929 (package
6930 (name "ruby-progressbar")
6931 (version "1.10.1")
6932 (source
6933 (origin
6934 (method url-fetch)
6935 (uri (rubygems-uri "ruby-progressbar" version))
6936 (sha256
6937 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
6938 (build-system ruby-build-system)
6939 (arguments
6940 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
6941 #:tests? #f))
6942 (synopsis "Text progress bar library for Ruby")
6943 (description
6944 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
6945The output can be customized with a formatting system.")
6946 (home-page "https://github.com/jfelchner/ruby-progressbar")
6947 (license license:expat)))
6948
6949(define-public ruby-latest-ruby
6950 (package
6951 (name "ruby-latest-ruby")
6952 (version "3.1.0")
6953 (source (origin
6954 (method url-fetch)
6955 (uri (rubygems-uri "latest_ruby" version))
6956 (sha256
6957 (base32
6958 "15rqwgxzpnkzdiz8m02jra0zq5sx0fiz61vkfrj1ls6slqfhnzqg"))))
6959 (build-system ruby-build-system)
6960 (arguments
6961 '(#:tests? #f)) ; No Rakefile
6962 (synopsis "Answers the question of what the latest Ruby version is")
6963 (description "Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.")
6964 (home-page "https://github.com/kyrylo/latest_ruby")
6965 (license license:zlib)))
6966
6967(define-public ruby-pry
6968 (package
6969 (name "ruby-pry")
6970 (version "0.14.2")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (rubygems-uri "pry" version))
6975 (sha256
6976 (base32
6977 "0k9kqkd9nps1w1r1rb7wjr31hqzkka2bhi8b518x78dcxppm9zn4"))))
6978 (build-system ruby-build-system)
6979 (arguments
6980 '(#:tests? #f)) ; no tests
6981 (propagated-inputs
6982 (list ruby-coderay ruby-method-source))
6983 (synopsis "Ruby REPL")
6984 (description "Pry is an IRB alternative and runtime developer console for
6985Ruby. It features syntax highlighting, a plugin architecture, runtime
6986invocation, and source and documentation browsing.")
6987 (home-page "https://cobaltbluemedia.com/pryrepl/")
6988 (license license:expat)))
6989
6990(define-public ruby-pry-doc
6991 (package
6992 (name "ruby-pry-doc")
6993 (version "1.4.0")
6994 (source (origin
6995 (method url-fetch)
6996 (uri (rubygems-uri "pry-doc" version))
6997 (sha256
6998 (base32
6999 "1pp43n69p6bjvc640wgcz295w1q2v9awcqgbwcqn082dbvq5xvnx"))))
7000 (build-system ruby-build-system)
7001 (propagated-inputs (list ruby-pry ruby-yard))
7002 (native-inputs (list ruby-latest-ruby ruby-rspec ruby-rake)) ;for tests
7003 (synopsis "Provides YARD and extended documentation support for Pry")
7004 (description
7005 "Pry Doc is a Pry REPL plugin. It provides extended documentation
7006support for the REPL by means of improving the @code{show-doc} and
7007@code{show-source} commands. With help of the plugin the commands are
7008be able to display the source code and the docs of Ruby methods and
7009classes implemented in C.")
7010 (home-page "https://github.com/pry/pry-doc")
7011 (license license:expat)))
7012
7013(define-public ruby-single-cov
7014 (package
7015 (name "ruby-single-cov")
7016 (version "1.9.1")
7017 (home-page "https://github.com/grosser/single_cov")
7018 (source (origin
7019 (method git-fetch)
7020 (uri (git-reference (url home-page)
7021 (commit (string-append "v" version))))
7022 (file-name (git-file-name name version))
7023 (sha256
7024 (base32
7025 "1w4k81f2mdg620m6pwkrqayddnz9mr8qx0myqn33mw8k6imfip05"))))
7026 (build-system ruby-build-system)
7027 (arguments
7028 '(#:test-target "spec" ;to avoid rubocop requirement
7029 #:phases (modify-phases %standard-phases
7030 (replace 'replace-git-ls-files
7031 (lambda _
7032 (substitute* "single_cov.gemspec"
7033 (("`git ls-files lib/ bin/ MIT-LICENSE`")
7034 ;; There no longer appear to be a 'bin'
7035 ;; sub-directory.
7036 "`find lib/ MIT-LICENSE -type f | sort`"))))
7037 (add-before 'check 'remove-version-constraints
7038 (lambda _
7039 (delete-file "Gemfile.lock")))
7040 (add-before 'check 'relax-requirements
7041 (lambda _
7042 ;; Remove extraneous requirements.
7043 (substitute* "Rakefile"
7044 ((".*require.*bump.*") ""))
7045 (substitute* "Gemfile"
7046 ((".*gem \"bump\".*") "")
7047 ((".*gem \"rubocop\".*") ""))))
7048 (add-before 'check 'disable-failing-test
7049 (lambda _
7050 ;; XXX: This test copies assets from minitest, but can
7051 ;; not cope with the files being read-only. Just skip
7052 ;; it for now.
7053 (substitute* "specs/single_cov_spec.rb"
7054 (("it \"complains when coverage is bad\"")
7055 "xit \"complains when coverage is bad\"")))))))
7056 (native-inputs (list ruby-minitest ruby-rspec ruby-simplecov))
7057 (synopsis "Code coverage reporting tool")
7058 (description
7059 "This package provides actionable code coverage reports for Ruby
7060projects. It has very little overhead and can be easily integrated with
7061development tools to catch coverage problems early.")
7062 (license license:expat)))
7063
7064(define-public ruby-oedipus-lex
7065 (package
7066 (name "ruby-oedipus-lex")
7067 (version "2.6.1")
7068 (source
7069 (origin
7070 (method url-fetch)
7071 (uri (rubygems-uri "oedipus_lex" version))
7072 (sha256
7073 (base32
7074 "06l4d3l75vhdcmnavnkzr7bd39rb0njxhkbmwrw6ni64z2hlj7w7"))))
7075 (build-system ruby-build-system)
7076 (native-inputs
7077 (list ruby-hoe
7078 ruby-minitest))
7079 (synopsis "Ruby lexer")
7080 (description
7081 "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
7082It is based primarily on generating code much like you would a hand-written
7083lexer. It uses StrScanner within a multi-level case statement. As such,
7084Oedipus matches on the first match, not the longest.")
7085 (home-page "https://github.com/seattlerb/oedipus_lex")
7086 (license license:expat)))
7087
7088(define-public ruby-guard
7089 (package
7090 (name "ruby-guard")
7091 (version "2.13.0")
7092 (source (origin
7093 (method git-fetch)
7094 ;; The gem does not include a Rakefile, nor does it contain a
7095 ;; gemspec file, nor does it come with the tests. This is why
7096 ;; we fetch the tarball from Github.
7097 (uri (git-reference
7098 (url "https://github.com/guard/guard")
7099 (commit (string-append "v" version))))
7100 (file-name (git-file-name name version))
7101 (sha256
7102 (base32
7103 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
7104 (build-system ruby-build-system)
7105 (arguments
7106 `(#:tests? #f ; tests require cucumber
7107 #:phases
7108 (modify-phases %standard-phases
7109 (add-after 'unpack 'remove-git-ls-files
7110 (lambda* (#:key outputs #:allow-other-keys)
7111 (substitute* "guard.gemspec"
7112 (("git ls-files -z") "find . -type f -print0"))
7113 #t))
7114 (replace 'build
7115 (lambda _
7116 (invoke "gem" "build" "guard.gemspec"))))))
7117 (propagated-inputs
7118 (list ruby-formatador
7119 ruby-listen
7120 ruby-lumberjack
7121 ruby-nenv
7122 ruby-notiffany
7123 ruby-pry
7124 ruby-shellany
7125 ruby-thor))
7126 (native-inputs
7127 (list bundler ruby-rspec))
7128 (synopsis "Tool to handle events on file system modifications")
7129 (description
7130 "Guard is a command line tool to easily handle events on file system
7131modifications. Guard automates various tasks by running custom rules whenever
7132file or directories are modified.")
7133 (home-page "https://guardgem.org/")
7134 (license license:expat)))
7135
7136(define-public ruby-spinach
7137 (package
7138 (name "ruby-spinach")
7139 (version "0.11.0")
7140 (home-page "https://github.com/codegram/spinach")
7141 (source (origin
7142 (method url-fetch)
7143 (uri (rubygems-uri "spinach" version))
7144 (sha256
7145 (base32
7146 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
7147 (build-system ruby-build-system)
7148 (arguments
7149 ;; FIXME: Disable tests altogether because they depend on 'capybara'
7150 ;; which in turn depends on many other unpackaged gems. Enable once
7151 ;; capybara is available.
7152 '(#:tests? #f))
7153 (propagated-inputs
7154 (list ruby-colorize ruby-gherkin-ruby ruby-json))
7155 (synopsis "Gherkin-based BDD framework")
7156 (description
7157 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
7158framework that leverages the expressive @code{Gherkin} language to help you
7159define executable specifications of your code.")
7160 (license license:expat)))
7161
7162(define-public ruby-timers
7163 (package
7164 (name "ruby-timers")
7165 (version "4.3.5")
7166 (source (origin
7167 (method git-fetch)
7168 (uri (git-reference
7169 (url "https://github.com/socketry/timers")
7170 (commit (string-append "v" version))))
7171 (file-name (git-file-name name version))
7172 (sha256
7173 (base32
7174 "1vvahlhk6i1xks1bsha6s64pjjxhagmzvvf1q9h6z3lpcba43rpx"))))
7175 (build-system ruby-build-system)
7176 (arguments
7177 (list #:phases
7178 #~(modify-phases %standard-phases
7179 (add-before 'build 'prune-gems.rb
7180 (lambda _
7181 (substitute* "gems.rb"
7182 ;; These are only required for maintenance.
7183 ((".*gem \"bake-modernize\".*") "")
7184 ((".*gem \"bake-gem\".*") "")
7185 ;; Not actually required by the tests.
7186 ((".*gem 'benchmark-ips'.*") "")
7187 ((".*gem \"ruby-prof\".*") ""))))
7188 (add-before 'build 'remove-missing-signing-key
7189 (lambda _
7190 ;; Otherwise, the build fails with ENOENT.
7191 (substitute* "timers.gemspec"
7192 ((".*spec.signing_key.*") ""))))
7193 (replace 'check
7194 (lambda* (#:key tests? #:allow-other-keys)
7195 (when tests?
7196 (invoke "bake" "test")))))))
7197 (native-inputs
7198 (list ruby-covered
7199 ruby-bake-test
7200 ruby-bake-test-external
7201 ruby-sus))
7202 (synopsis "Collection of Ruby timer classes")
7203 (description "Timers offers a collections of one-shot and periodic timers,
7204intended for use with event loops such as async.")
7205 (home-page "https://github.com/socketry/timers")
7206 (license license:expat)))
7207
7208(define-public ruby-tilt
7209 (package
7210 (name "ruby-tilt")
7211 (version "2.0.11")
7212 (source
7213 (origin
7214 (method git-fetch) ;the distributed gem lacks tests
7215 (uri (git-reference
7216 (url "https://github.com/rtomayko/tilt")
7217 (commit (string-append "v" version))))
7218 (file-name (git-file-name name version))
7219 (sha256
7220 (base32
7221 "0a75s6ci2rwai5q1bnlqbz8kxqnfp2497jhkcry1n4g29lcxq9ja"))))
7222 (build-system ruby-build-system)
7223 (arguments
7224 (list
7225 #:phases
7226 #~(modify-phases %standard-phases
7227 (add-after 'unpack 'patch-tests
7228 (lambda _
7229 ;; Patch some tests
7230 (substitute* "test/tilt_sasstemplate_test.rb"
7231 (("}\",") "}
7232\","))))
7233 (add-after 'unpack 'remove-some-dependencies
7234 (lambda _
7235 (substitute* "Gemfile"
7236 (("gem 'less'") "\n")
7237 (("gem 'coffee-script'") "\n")
7238 (("gem 'livescript'") "\n")
7239 (("gem 'babel-transpiler'") "\n")
7240 (("gem 'typescript-node'") "\n")
7241 (("gem 'typescript-node'") "\n")
7242 (("gem 'duktape'.*") "\n")
7243 ;; TODO ronn is used for generating the manual
7244 (("gem 'ronn'.*") "\n")
7245 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
7246 ;; pass it in as a native-input
7247 (("gem 'haml'.*") "\n")
7248 ;; TODO Not all of these gems are packaged for Guix yet:
7249 ;; less, coffee-script, livescript, babel-transpiler,
7250 ;; typescript-node
7251 (("if can_execjs") "if false")
7252 ;; Disable the secondary group to reduce the number of
7253 ;; dependencies. None of the normal approaches work, so patch
7254 ;; the Gemfile instead.
7255 (("group :secondary") "[].each"))))
7256 (add-before 'check 'set-SASS_IMPLEMENTATION
7257 (lambda _
7258 (setenv "SASS_IMPLEMENTATION" "sassc"))))))
7259 (propagated-inputs
7260 (list ruby-pandoc-ruby ruby-sassc))
7261 (native-inputs
7262 (list bundler ruby-yard ruby-builder ruby-erubis ruby-markaby))
7263 (synopsis "Generic interface to multiple Ruby template engines")
7264 (description
7265 "Tilt is a thin interface over a number of different Ruby template
7266engines in an attempt to make their usage as generic as possible.")
7267 (home-page "https://github.com/rtomayko/tilt/")
7268 (license license:expat)))
7269
7270(define-public ruby-thread-safe
7271 (package
7272 (name "ruby-thread-safe")
7273 (version "0.3.6")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (rubygems-uri "thread_safe" version))
7278 (sha256
7279 (base32
7280 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
7281 (build-system ruby-build-system)
7282 (arguments
7283 '(#:tests? #f)) ; needs simplecov, among others
7284 (synopsis "Thread-safe utilities for Ruby")
7285 (description "The thread_safe library provides thread-safe collections and
7286utilities for Ruby.")
7287 (home-page "https://github.com/ruby-concurrency/thread_safe")
7288 (license license:asl2.0)))
7289
7290(define-public ruby-tzinfo
7291 (package
7292 (name "ruby-tzinfo")
7293 (version "2.0.6")
7294 (source
7295 (origin
7296 (method git-fetch)
7297 (uri (git-reference
7298 ;; Pull from git because the gem has no tests.
7299 (url "https://github.com/tzinfo/tzinfo")
7300 (commit (string-append "v" version))))
7301 (file-name (git-file-name name version))
7302 (sha256
7303 (base32
7304 "1n1gzjqwwnx209h8d054miva0y7x17db2ahy7jav5r25ibhh7rgm"))))
7305 (build-system ruby-build-system)
7306 (arguments
7307 (list
7308 #:phases
7309 #~(modify-phases %standard-phases
7310 (add-after 'unpack 'skip-safe-tests
7311 (lambda _
7312 (substitute* "test/test_utils.rb"
7313 (("def safe_test\\(options = \\{\\}\\)")
7314 "def safe_test(options = {})
7315 skip('The Guix build environment has an unsafe load path')"))))
7316 (add-before 'check 'pre-check
7317 (lambda _
7318 (setenv "HOME" (getcwd))
7319 (substitute* "Gemfile"
7320 (("simplecov.*") "simplecov'\n"))))
7321 (replace 'check
7322 (lambda* (#:key tests? test-target #:allow-other-keys)
7323 (when tests?
7324 (invoke "bundler" "exec" "rake" test-target)))))))
7325 (propagated-inputs
7326 (list ruby-concurrent))
7327 (native-inputs
7328 (list ruby-simplecov))
7329 (synopsis "Time zone library for Ruby")
7330 (description "TZInfo is a Ruby library that provides daylight savings
7331aware transformations between times in different time zones.")
7332 (home-page "https://tzinfo.github.io")
7333 (license license:expat)))
7334
7335(define-public ruby-tzinfo-data
7336 (package
7337 (name "ruby-tzinfo-data")
7338 (version "1.2023.3")
7339 (source
7340 (origin
7341 (method git-fetch)
7342 ;; Download from GitHub because the rubygems version does not contain
7343 ;; Rakefile or tests.
7344 (uri (git-reference
7345 (url "https://github.com/tzinfo/tzinfo-data")
7346 (commit (string-append "v" version))))
7347 (file-name (git-file-name name version))
7348 (sha256
7349 (base32
7350 "1v3fpfmw485lsc9bfqfcasb9j25g9ywfpmmk648l2vdsh7nipilf"))))
7351 (build-system ruby-build-system)
7352 (arguments
7353 (list
7354 #:phases
7355 #~(modify-phases %standard-phases
7356 (add-after 'unpack 'patch-source
7357 (lambda* (#:key inputs #:allow-other-keys)
7358 (substitute* "Rakefile"
7359 (("URI\\.parse\\(url\\)\\.open")
7360 "URI.open(url)")
7361 (("https://data.iana.org/time-zones/releases")
7362 (assoc-ref inputs "tzdata")))))
7363 (add-before 'check 'pre-check
7364 (lambda _
7365 (setenv "HOME" (getcwd))
7366 (substitute* "Rakefile"
7367 ;; Don't need gpg, and it may break after a time.
7368 (("gpg ") "echo ")
7369 ((" sh\\(\\\"make -C" text)
7370 (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
7371 " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
7372 (setenv "cc" #$(cc-for-target)))))))
7373 (propagated-inputs
7374 (list ruby-tzinfo))
7375 (native-inputs
7376 `(("tzdata"
7377 ,(file-union "tzdata-for-ruby-tzdata-info"
7378 `(("tzdata2023c.tar.gz"
7379 ,(origin
7380 (method url-fetch)
7381 (uri "https://data.iana.org/time-zones/releases/tzdata2023c.tar.gz")
7382 (sha256
7383 (base32
7384 "0p4nvp5bdxxdqh269nvvcfrpycbbfwm31al5whwbpsaa3dfhnl9z"))))
7385 ("tzdata2023c.tar.gz.asc"
7386 ,(origin
7387 (method url-fetch)
7388 (uri "https://data.iana.org/time-zones/releases/tzdata2023c.tar.gz.asc")
7389 (sha256
7390 (base32
7391 "0mrmhczs5qnj1zp6gh4pg6fm0iblr2jmzy0fgh9slinwxmn7pv6m"))))
7392 ("tzcode2023c.tar.gz"
7393 ,(origin
7394 (method url-fetch)
7395 (uri "https://data.iana.org/time-zones/releases/tzcode2023c.tar.gz")
7396 (sha256
7397 (base32
7398 "1rqln88ki0jagi372nqyn7bs03rf2l33081sy2835mwsn4mpzla6"))))
7399 ("tzcode2023c.tar.gz.asc"
7400 ,(origin
7401 (method url-fetch)
7402 (uri "https://data.iana.org/time-zones/releases/tzcode2023c.tar.gz.asc")
7403 (sha256
7404 (base32
7405 "0jbx8xjv75qfh7bxa2xmrf97r37057y89rhmrq1gz8s6b8qlzb2i")))))))))
7406 (synopsis "Data from the IANA Time Zone database")
7407 (description
7408 "This library provides @code{TZInfo::Data}, which contains data from the
7409IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
7410 (home-page "https://tzinfo.github.io")
7411 (license license:expat)))
7412
7413(define-public ruby-rb-inotify
7414 (package
7415 (name "ruby-rb-inotify")
7416 (version "0.10.1")
7417 (source
7418 (origin
7419 (method url-fetch)
7420 (uri (rubygems-uri "rb-inotify" version))
7421 (sha256
7422 (base32
7423 "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"))))
7424 (build-system ruby-build-system)
7425 (arguments
7426 (list
7427 #:tests? #f ; there are no tests
7428 #:phases
7429 #~(modify-phases %standard-phases
7430 ;; Building the gemspec with rake is not working here since it is
7431 ;; generated with Jeweler. It is also unnecessary because the
7432 ;; existing gemspec does not use any development tools to generate a
7433 ;; list of files.
7434 (replace 'build
7435 (lambda _
7436 (invoke "gem" "build" "rb-inotify.gemspec"))))))
7437 (propagated-inputs
7438 (list ruby-ffi))
7439 (native-inputs
7440 (list ruby-yard))
7441 (synopsis "Ruby wrapper for Linux's inotify")
7442 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
7443kernel subsystem for monitoring changes to files and directories.")
7444 (home-page "https://github.com/nex3/rb-inotify")
7445 (license license:expat)))
7446
7447(define-public ruby-pry-editline
7448 (package
7449 (name "ruby-pry-editline")
7450 (version "1.1.2")
7451 (source (origin
7452 (method url-fetch)
7453 (uri (rubygems-uri "pry-editline" version))
7454 (sha256
7455 (base32
7456 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
7457 (build-system ruby-build-system)
7458 (arguments `(#:tests? #f)) ; no tests included
7459 (native-inputs
7460 (list bundler))
7461 (synopsis "Open the current REPL line in an editor")
7462 (description
7463 "This gem provides a plugin for the Ruby REPL to enable opening the
7464current line in an external editor.")
7465 (home-page "https://github.com/tpope/pry-editline")
7466 (license license:expat)))
7467
7468(define-public ruby-sdoc
7469 (package
7470 (name "ruby-sdoc")
7471 (version "1.1.0")
7472 (source (origin
7473 (method url-fetch)
7474 (uri (rubygems-uri "sdoc" version))
7475 (sha256
7476 (base32
7477 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
7478 (build-system ruby-build-system)
7479 (arguments
7480 `(#:phases
7481 (modify-phases %standard-phases
7482 (add-before 'check 'set-rubylib-and-patch-gemfile
7483 (lambda _
7484 (setenv "RUBYLIB" "lib")
7485 (substitute* "sdoc.gemspec"
7486 (("s.add_runtime_dependency.*") "\n")
7487 (("s.add_dependency.*") "\n"))
7488 (substitute* "Gemfile"
7489 (("gem \"rake\".*")
7490 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
7491 #t)))))
7492 (propagated-inputs
7493 (list ruby-json))
7494 (native-inputs
7495 (list bundler ruby-minitest ruby-hoe))
7496 (synopsis "Generate searchable RDoc documentation")
7497 (description
7498 "SDoc is an RDoc documentation generator to build searchable HTML
7499documentation for Ruby code.")
7500 (home-page "https://github.com/voloko/sdoc")
7501 (license license:expat)))
7502
7503(define-public ruby-tins
7504 (package
7505 (name "ruby-tins")
7506 (version "1.29.1")
7507 (source (origin
7508 (method url-fetch)
7509 (uri (rubygems-uri "tins" version))
7510 (sha256
7511 (base32
7512 "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
7513 (build-system ruby-build-system)
7514 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
7515 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
7516 ;; the gemspec.
7517 (arguments
7518 `(#:tests? #f ; there are no tests
7519 #:phases
7520 (modify-phases %standard-phases
7521 (replace 'build
7522 (lambda _
7523 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
7524 ;; causes an error.
7525 (substitute* "tins.gemspec"
7526 (("\"lib/spruz\", ") ""))
7527 (invoke "gem" "build" "tins.gemspec"))))))
7528 (propagated-inputs
7529 (list ruby-sync))
7530 (synopsis "Assorted tools for Ruby")
7531 (description "Tins is a Ruby library providing assorted tools.")
7532 (home-page "https://github.com/flori/tins")
7533 (license license:expat)))
7534
7535(define-public ruby-gem-hadar
7536 (package
7537 (name "ruby-gem-hadar")
7538 (version "1.11.0")
7539 (source (origin
7540 (method url-fetch)
7541 (uri (rubygems-uri "gem_hadar" version))
7542 (sha256
7543 (base32
7544 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
7545 (build-system ruby-build-system)
7546 ;; This gem needs itself at development time. We disable rebuilding of the
7547 ;; gemspec to avoid this loop.
7548 (arguments
7549 `(#:tests? #f ; there are no tests
7550 #:phases
7551 (modify-phases %standard-phases
7552 (replace 'build
7553 (lambda _
7554 (invoke "gem" "build" "gem_hadar.gemspec"))))))
7555 (propagated-inputs
7556 (list git ruby-tins ruby-yard))
7557 (synopsis "Library for the development of Ruby gems")
7558 (description
7559 "This library contains some useful functionality to support the
7560development of Ruby gems.")
7561 (home-page "https://github.com/flori/gem_hadar")
7562 (license license:expat)))
7563
7564(define-public ruby-minitest-tu-shim
7565 (package
7566 (name "ruby-minitest-tu-shim")
7567 (version "1.3.3")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (rubygems-uri "minitest_tu_shim" version))
7571 (sha256
7572 (base32
7573 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
7574 (build-system ruby-build-system)
7575 (arguments
7576 (list
7577 #:phases
7578 #~(modify-phases %standard-phases
7579 (add-after 'unpack 'fix-test-include-path
7580 (lambda* (#:key inputs #:allow-other-keys)
7581 (let* ((minitest (assoc-ref inputs "ruby-minitest")))
7582 (substitute* "Rakefile"
7583 (("Hoe\\.add_include_dirs .*")
7584 (string-append "Hoe.add_include_dirs \""
7585 minitest "/lib/ruby/vendor_ruby"
7586 "/gems/minitest-"
7587 #$(package-version ruby-minitest-4)
7588 "/lib" "\""))))))
7589 (add-before 'check 'fix-test-assumptions
7590 (lambda _
7591 ;; The test output includes the file name, so a couple of tests
7592 ;; fail. Changing the regular expressions slightly fixes this
7593 ;; problem.
7594 (substitute* "test/test_mini_test.rb"
7595 (("output.sub!\\(.*, 'FILE:LINE'\\)")
7596 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
7597 (("gsub\\(/.*, 'FILE:LINE'\\)")
7598 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")))))))
7599 (propagated-inputs
7600 (list ruby-minitest-4))
7601 (native-inputs
7602 (list ruby-hoe-3))
7603 (synopsis "Adapter library between minitest and test/unit")
7604 (description
7605 "This library bridges the gap between the small and fast minitest and
7606Ruby's large and slower test/unit.")
7607 (home-page "https://rubygems.org/gems/minitest_tu_shim")
7608 (license license:expat)))
7609
7610(define-public ruby-term-ansicolor
7611 (package
7612 (name "ruby-term-ansicolor")
7613 (version "1.7.1")
7614 (source (origin
7615 (method url-fetch)
7616 (uri (rubygems-uri "term-ansicolor" version))
7617 (sha256
7618 (base32
7619 "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
7620 (build-system ruby-build-system)
7621 ;; Rebuilding the gemspec seems to require git, even though this is not a
7622 ;; git repository, so we just build the gem from the existing gemspec.
7623 (arguments
7624 (list
7625 #:phases
7626 #~(modify-phases %standard-phases
7627 (add-after 'unpack 'fix-test
7628 (lambda -
7629 (substitute* "tests/hsl_triple_test.rb"
7630 (("0\\\\\\.0%")
7631 "0\\.?0?%"))))
7632 (replace 'build
7633 (lambda _
7634 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
7635 (propagated-inputs
7636 (list ruby-tins))
7637 (native-inputs
7638 (list ruby-gem-hadar))
7639 (synopsis "Ruby library to control the attributes of terminal output")
7640 (description
7641 "This Ruby library uses ANSI escape sequences to control the attributes
7642of terminal output.")
7643 (home-page "https://flori.github.io/term-ansicolor/")
7644 ;; There is no mention of the "or later" clause.
7645 (license license:gpl2)))
7646
7647(define-public ruby-immutable-struct
7648 (package
7649 (name "ruby-immutable-struct")
7650 (version "2.4.1")
7651 (source
7652 (origin
7653 (method git-fetch)
7654 (uri (git-reference
7655 (url "https://github.com/stitchfix/immutable-struct")
7656 (commit (string-append "v" version))))
7657 (file-name (git-file-name name version))
7658 (sha256
7659 (base32
7660 "17hlmy9jfwn3i5h2rwv832ycwcdqwxq7dkkd2yly28klwj0l52rq"))))
7661 (build-system ruby-build-system)
7662 (arguments
7663 (list
7664 ;; Issues with the lack of Set in Ruby 3
7665 #:ruby ruby-2.7
7666 #:phases
7667 #~(modify-phases %standard-phases
7668 (replace 'check
7669 (lambda* (#:key tests? #:allow-other-keys)
7670 (when tests?
7671 (invoke "ruby" (which "rspec"))))))))
7672 (native-inputs
7673 (list ruby-rspec))
7674 (synopsis "Ruby library for creating immutable struct classes")
7675 (description
7676 "Easily create value objects without the pain of Ruby's Struct (or its setters)")
7677 (home-page "https://stitchfix.github.io/immutable-struct/")
7678 (license license:expat)))
7679
7680(define-public ruby-faker
7681 (package
7682 (name "ruby-faker")
7683 (version "3.2.0")
7684 (source
7685 (origin
7686 (method git-fetch)
7687 (uri (git-reference
7688 (url "https://github.com/faker-ruby/faker")
7689 (commit (string-append "v" version))))
7690 (file-name (git-file-name name version))
7691 (sha256
7692 (base32
7693 "1wwdwh5qwaxnd9dl6732mj6b953l5r32r4936pj5680963iagq59"))))
7694 (build-system ruby-build-system)
7695 (arguments
7696 (list
7697 #:phases
7698 #~(modify-phases %standard-phases
7699 (add-after 'unpack 'remove-rubocop-from-rakefile
7700 (lambda _
7701 (substitute* "Rakefile"
7702 (("require 'rubocop/rake_task'") "")
7703 (("RuboCop::RakeTask\\.new") "")))))))
7704 (native-inputs (list ruby-yard ruby-simplecov ruby-timecop))
7705 (propagated-inputs (list ruby-i18n))
7706 (synopsis "Library for generating fake data")
7707 (description "Faker is a port of Data::Faker from Perl. It is used to
7708easily generate fake data: names, addresses, phone numbers, etc.")
7709 (home-page "https://github.com/faker-ruby/faker")
7710 (license license:expat)))
7711
7712(define-public ruby-terraform
7713 (package
7714 (name "ruby-terraform")
7715 (version "1.7.0")
7716 (source
7717 (origin
7718 (method git-fetch)
7719 (uri (git-reference
7720 (url "https://github.com/infrablocks/ruby_terraform")
7721 (commit (string-append "v" version))))
7722 (file-name (git-file-name name version))
7723 (sha256
7724 (base32
7725 "18d1qkf2rbbvc2f0dxni85i2l2g8zn5kzh0v8zr1b86r1wjy6rvd"))))
7726 (build-system ruby-build-system)
7727 (arguments
7728 (list
7729 #:test-target "spec"
7730 #:phases
7731 #~(modify-phases %standard-phases
7732 (add-after 'unpack 'disable-bundler
7733 (lambda _
7734 (substitute* "spec/spec_helper.rb"
7735 (("require 'bundler/setup'") ""))))
7736 (add-before 'check 'disable-falinig-tests
7737 (lambda _
7738 (substitute* "spec/ruby_terraform/commands/plan_spec.rb"
7739 (("it 'logs an error raised when running the command'")
7740 "xit 'logs an error raised when running the command'")
7741 (("it 'raises execution error when an error occurs running the command'")
7742 "xit 'raises execution error when an error occurs running the command'"))))
7743 (replace 'check
7744 (lambda* (#:key tests? #:allow-other-keys)
7745 (when tests?
7746 (invoke "rspec")))))))
7747 (native-inputs
7748 (list ruby-rspec
7749 ruby-faker
7750 ruby-simplecov))
7751 (propagated-inputs
7752 (list ruby-lino ruby-immutable-struct))
7753 (synopsis "Ruby wrapper around the Terraform command line interface")
7754 (description
7755 "This package provides a Ruby wrapper around the Terraform command line
7756interface so that Terraform can be more easily invoked from Ruby code.")
7757 (home-page "https://github.com/infrablocks/ruby_terraform")
7758 (license license:expat)))
7759
7760(define-public ruby-pstree
7761 (package
7762 (name "ruby-pstree")
7763 (version "0.3.0")
7764 (source (origin
7765 (method url-fetch)
7766 (uri (rubygems-uri "pstree" version))
7767 (sha256
7768 (base32
7769 "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
7770 (build-system ruby-build-system)
7771 (native-inputs
7772 (list ruby-gem-hadar bundler))
7773 (synopsis "Create a process tree data structure")
7774 (description
7775 "This library uses the output of the @code{ps} command to create a
7776process tree data structure for the current host.")
7777 (home-page "https://github.com/flori/pstree")
7778 ;; There is no mention of the "or later" clause.
7779 (license license:gpl2)))
7780
7781(define-public ruby-psych
7782 (package
7783 (name "ruby-psych")
7784 (version "5.1.0")
7785 (source (origin
7786 (method git-fetch) ;for tests
7787 (uri (git-reference
7788 (url "https://github.com/ruby/psych")
7789 (commit (string-append "v" version))))
7790 (file-name (git-file-name name version))
7791 (sha256
7792 (base32
7793 "0m3668y79jcv2h9p7w74awwdyz13rpfr24w4nzh3iz96kxwssz83"))))
7794 (build-system ruby-build-system)
7795 (inputs
7796 (list libyaml))
7797 (native-inputs
7798 (list ruby-rake-compiler))
7799 (synopsis "Ruby YAML parser and emitter")
7800 (description
7801 "Psych is a YAML parser and emitter. Psych leverages libyaml for its
7802YAML parsing and emitting capabilities. In addition to wrapping libyaml,
7803Psych also knows how to serialize and de-serialize most Ruby objects to and
7804from the YAML format.")
7805 (home-page "https://github.com/ruby/psych")
7806 (license license:expat)))
7807
7808(define-public ruby-psych-3
7809 (package
7810 (inherit ruby-psych)
7811 (version "3.3.4")
7812 (source (origin
7813 (method git-fetch) ;for tests
7814 (uri (git-reference
7815 (url "https://github.com/ruby/psych")
7816 (commit (string-append "v" version))))
7817 (file-name (git-file-name "ruby-psych" version))
7818 (sha256
7819 (base32
7820 "11f7bxbhaj5697izap7hfbiln6lfk5cks78a498mkyhs2ylhl0fc"))))
7821 (arguments
7822 (list
7823 #:phases
7824 #~(modify-phases %standard-phases
7825 (replace 'check
7826 (lambda* (#:key tests? #:allow-other-keys)
7827 (when tests?
7828 (invoke "bundle" "exec" "rake" "default")))))))))
7829
7830(define-public ruby-utils
7831 (package
7832 (name "ruby-utils")
7833 (version "0.9.0")
7834 (source (origin
7835 (method url-fetch)
7836 (uri (rubygems-uri "utils" version))
7837 (sha256
7838 (base32
7839 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
7840 (build-system ruby-build-system)
7841 (propagated-inputs
7842 (list ruby-tins ruby-term-ansicolor ruby-pstree ruby-pry-editline))
7843 (native-inputs
7844 (list ruby-gem-hadar bundler))
7845 (synopsis "Command line tools for working with Ruby")
7846 (description
7847 "This package provides assorted command line tools that may be useful
7848when working with Ruby code.")
7849 (home-page "https://github.com/flori/utils")
7850 ;; There is no mention of the "or later" clause.
7851 (license license:gpl2)))
7852
7853(define-public ruby-jaro-winkler
7854 (package
7855 (name "ruby-jaro-winkler")
7856 (version "1.5.4")
7857 (source
7858 (origin
7859 (method url-fetch)
7860 (uri (rubygems-uri "jaro_winkler" version))
7861 (sha256
7862 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
7863 (build-system ruby-build-system)
7864 (arguments
7865 '(#:tests? #f)) ; no included tests
7866 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
7867 (description
7868 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
7869algorithm. It is written as a C extension and will fallback to a pure Ruby
7870implementation on platforms where this is unsupported.")
7871 (home-page "https://github.com/tonytonyjan/jaro_winkler")
7872 (license license:expat)))
7873
7874(define-public ruby-json
7875 (package
7876 (name "ruby-json")
7877 (version "2.1.0")
7878 (source
7879 (origin
7880 (method url-fetch)
7881 (uri (rubygems-uri "json" version))
7882 (sha256
7883 (base32
7884 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
7885 (build-system ruby-build-system)
7886 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
7887 (synopsis "JSON library for Ruby")
7888 (description "This Ruby library provides a JSON implementation written as
7889a native C extension.")
7890 (home-page "http://json-jruby.rubyforge.org/")
7891 (license (list license:ruby license:gpl2)))) ; GPL2 only
7892
7893(define-public ruby-json-pure
7894 (package
7895 (name "ruby-json-pure")
7896 (version "2.6.3")
7897 (source
7898 (origin
7899 ;; For tests
7900 (method git-fetch)
7901 (uri (git-reference
7902 (url "https://github.com/flori/json.git")
7903 (commit (string-append "v" version))))
7904 (file-name (git-file-name name version))
7905 (sha256
7906 (base32
7907 "0551269c98a07m6bl594syh5vknrm3c636a4dxis9jpsb7vf7lfx"))))
7908 (build-system ruby-build-system)
7909 (arguments
7910 (list
7911 #:phases
7912 #~(modify-phases %standard-phases
7913 (add-after 'unpack 'fix-rakefile
7914 (lambda _
7915 (substitute* "Rakefile"
7916 ;; Since this is not a git repository, do not call 'git'.
7917 (("`git ls-files`") "`find . -type f |sort`")))))))
7918 (native-inputs
7919 (list bundler ragel ruby-simplecov ruby-test-unit which))
7920 (synopsis "JSON implementation in pure Ruby")
7921 (description
7922 "This package provides a JSON implementation written in pure Ruby.")
7923 (home-page "https://flori.github.io/json/")
7924 (license license:ruby)))
7925
7926(define-public ruby-jwt
7927 (package
7928 (name "ruby-jwt")
7929 (version "2.7.1")
7930 (source
7931 (origin
7932 ;; For tests
7933 (method git-fetch)
7934 (uri (git-reference
7935 (url "https://github.com/jwt/ruby-jwt")
7936 (commit (string-append "v" version))))
7937 (file-name (git-file-name name version))
7938 (sha256
7939 (base32
7940 "12ss6knfis6a6a41qndalnlvq3yykhpg6igzll8qyssnnwi9zdw7"))))
7941 (build-system ruby-build-system)
7942 (arguments
7943 (list
7944 #:test-target "test"
7945 #:phases
7946 #~(modify-phases %standard-phases
7947 (add-after 'unpack 'remove-unnecessary-dependencies
7948 (lambda _
7949 (substitute* "ruby-jwt.gemspec"
7950 (("spec\\.add_development_dependency 'appraisal'") "")
7951 (("spec\\.add_development_dependency 'simplecov'") ""))
7952 (substitute* "Gemfile"
7953 (("gem 'rubocop'.*") ""))
7954 (substitute* "Rakefile"
7955 (("require 'rubocop/rake_task'") "")
7956 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") ""))
7957 (substitute* "spec/spec_helper.rb"
7958 (("require 'simplecov.*") "\n")
7959 ;; Use [].each to disable running the SimpleCov configuration
7960 ;; block
7961 (("SimpleCov\\.configure") "[].each")
7962 (("require 'codeclimate-test-reporter'") "")
7963 (("require 'codacy-coverage'") "")
7964 (("Codacy::Reporter\\.start") "")))))))
7965 (native-inputs
7966 (list bundler ruby-rspec ruby-rbnacl))
7967 (synopsis "Ruby implementation of the JSON Web Token standard")
7968 (description
7969 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
7970@acronym{JWT, JSON Web Token} standard.")
7971 (home-page "https://github.com/jwt/ruby-jwt")
7972 (license license:expat)))
7973
7974;; Even though this package only provides bindings for a Mac OSX API it is
7975;; required by "ruby-listen" at runtime.
7976(define-public ruby-rb-fsevent
7977 (package
7978 (name "ruby-rb-fsevent")
7979 (version "0.10.3")
7980 (source (origin
7981 (method url-fetch)
7982 (uri (rubygems-uri "rb-fsevent" version))
7983 (sha256
7984 (base32
7985 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
7986 (build-system ruby-build-system)
7987 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
7988 ;; "listen", which needs "rb-fsevent" at runtime.
7989 (arguments `(#:tests? #f))
7990 (synopsis "FSEvents API with signals catching")
7991 (description
7992 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
7993 (home-page "https://rubygems.org/gems/rb-fsevent")
7994 (license license:expat)))
7995
7996(define-public ruby-listen
7997 (package
7998 (name "ruby-listen")
7999 (version "3.8.0")
8000 (source
8001 (origin
8002 ;; The gem does not include a Rakefile, so fetch from the Git
8003 ;; repository.
8004 (method git-fetch)
8005 (uri (git-reference
8006 (url "https://github.com/guard/listen")
8007 (commit (string-append "v" version))))
8008 (file-name (git-file-name name version))
8009 (sha256
8010 (base32
8011 "1skkglml094dw1xr4742in1rwwa84ld0mz4nkw6qa8pwhx48x2n5"))))
8012 (build-system ruby-build-system)
8013 (arguments
8014 (list
8015 #:test-target "spec"
8016 #:phases
8017 #~(modify-phases %standard-phases
8018 (add-after 'unpack 'fix-files-in-gemspec
8019 (lambda _
8020 (substitute* "listen.gemspec"
8021 (("`git ls-files -z`")
8022 "`find . -type f -printf '%P\\\\0' |sort -z`"))))
8023 (add-before 'check 'remove-unnecessary-dependencies'
8024 (lambda _
8025 (substitute* "Rakefile"
8026 ;; Rubocop is for code linting, and is unnecessary for running
8027 ;; the tests.
8028 ((".*rubocop.*") "")))))))
8029 (native-inputs
8030 (list bundler ruby-rspec))
8031 (inputs
8032 (list ;; ruby-thor is used for the command line interface, and is referenced
8033 ;; in the wrapper, and therefore just needs to be an input.
8034 ruby-thor))
8035 (propagated-inputs
8036 (list ruby-rb-fsevent ruby-rb-inotify ruby-dep))
8037 (synopsis "Listen to file modifications")
8038 (description "The Listen gem listens to file modifications and notifies
8039you about the changes.")
8040 (home-page "https://github.com/guard/listen")
8041 (license license:expat)))
8042
8043(define-public ruby-loofah
8044 (package
8045 (name "ruby-loofah")
8046 (version "2.21.3")
8047 (home-page "https://github.com/flavorjones/loofah")
8048 (source
8049 (origin
8050 ;; Build from git because the gem lacks tests.
8051 (method git-fetch)
8052 (uri (git-reference (url home-page)
8053 (commit (string-append "v" version))))
8054 (file-name (git-file-name name version))
8055 (sha256
8056 (base32
8057 "1lh7cf56y1b0h090ahphvz7grq581phsamdl0rq59y0q9bqwrhg0"))))
8058 (build-system ruby-build-system)
8059 (native-inputs
8060 (list ruby-hoe ruby-hoe-markdown ruby-rr))
8061 (propagated-inputs
8062 (list ruby-nokogiri ruby-crass))
8063 (synopsis "Ruby library for manipulating and transforming HTML/XML")
8064 (description
8065 "Loofah is a general library for manipulating and transforming HTML/XML
8066documents and fragments. It's built on top of Nokogiri and libxml2.")
8067 (license license:expat)))
8068
8069(define-public ruby-crass
8070 (package
8071 (name "ruby-crass")
8072 (version "1.0.6")
8073 (home-page "https://github.com/rgrove/crass")
8074 (source (origin
8075 ;; The gem does not contain tests, so pull from git.
8076 (method git-fetch)
8077 (uri (git-reference
8078 (url home-page)
8079 (commit (string-append "v" version))))
8080 (file-name (git-file-name name version))
8081 (sha256
8082 (base32
8083 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
8084 (build-system ruby-build-system)
8085 (synopsis "Pure Ruby CSS parser")
8086 (description
8087 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
8088 (license license:expat)))
8089
8090;;; The ruby-nokogumbo package has been absorbed into ruby-nokogiri.
8091(define-public ruby-nokogumbo
8092 (deprecated-package "ruby-nokogumbo" ruby-nokogiri))
8093
8094(define-public ruby-samovar
8095 (package
8096 (name "ruby-samovar")
8097 (version "2.1.4")
8098 (source (origin
8099 (method git-fetch) ;for tests
8100 (uri (git-reference
8101 (url "https://github.com/ioquatix/samovar")
8102 (commit (string-append "v" version))))
8103 (file-name (git-file-name name version))
8104 (sha256
8105 (base32
8106 "05pc5xlbv44anx0sfqssh0xhxg297bvl5slsl7k1vnka4k5fhax6"))))
8107 (build-system ruby-build-system)
8108 (native-inputs (list ruby-covered ruby-rspec))
8109 (propagated-inputs (list ruby-console ruby-mapping))
8110 (synopsis "Flexible option parser for Ruby")
8111 (description "Samovar is a modern framework for building command-line
8112tools and applications. It provides a declarative class-based DSL for
8113building command-line parsers that include automatic documentation generation.
8114It helps you keep your functionality clean and isolated where possible.")
8115 (home-page "https://github.com/ioquatix/samovar")
8116 (license license:expat)))
8117
8118(define-public ruby-sanitize
8119 (package
8120 (name "ruby-sanitize")
8121 (version "6.0.0")
8122 (home-page "https://github.com/rgrove/sanitize")
8123 (source (origin
8124 (method git-fetch)
8125 ;; The gem does not include the Rakefile, so we download the
8126 ;; source from Github.
8127 (uri (git-reference
8128 (url home-page)
8129 (commit (string-append "v" version))))
8130 (file-name (git-file-name name version))
8131 (sha256
8132 (base32
8133 "0p1a28vx95vscy9xzzyyddzgb9496x42a5i2ka39cpxbl5f3gkl0"))))
8134 (build-system ruby-build-system)
8135 (propagated-inputs (list ruby-crass ruby-nokogiri))
8136 (native-inputs (list ruby-minitest))
8137 (synopsis "Whitelist-based HTML and CSS sanitizer")
8138 (description
8139 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
8140acceptable elements, attributes, and CSS properties, Sanitize will remove all
8141unacceptable HTML and/or CSS from a string.")
8142 (license license:expat)))
8143
8144(define-public ruby-sync
8145 (package
8146 (name "ruby-sync")
8147 (version "0.5.0")
8148 (source
8149 (origin
8150 (method url-fetch)
8151 (uri (rubygems-uri "sync" version))
8152 (sha256
8153 (base32
8154 "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
8155 (build-system ruby-build-system)
8156 (synopsis "Ruby module with a two-phase lock and counter")
8157 (description "This package provides a Ruby module that provides a two-phase
8158lock with a counter.")
8159 (home-page "https://github.com/ruby/sync")
8160 (license license:bsd-2)))
8161
8162(define-public ruby-oj
8163 (package
8164 (name "ruby-oj")
8165 (version "3.13.9")
8166 (source
8167 (origin
8168 (method git-fetch)
8169 ;; Version on rubygems.org does not contain Rakefile, so download from
8170 ;; GitHub instead.
8171 (uri (git-reference
8172 (url "https://github.com/ohler55/oj")
8173 (commit (string-append "v" version))))
8174 (file-name (git-file-name name version))
8175 (sha256
8176 (base32
8177 "0a24zd28y58nyhjxgrpn2k9p72vzj3zbmdrcsbhwbdycj7nn9fpd"))))
8178 (build-system ruby-build-system)
8179 (arguments
8180 '(#:test-target "test_all"
8181 #:phases
8182 (modify-phases %standard-phases
8183 (add-before 'check 'disable-bundler
8184 (lambda _
8185 (substitute* "Rakefile"
8186 (("Bundler\\.with_clean_env") "1.times")
8187 (("bundle exec ") "")))))))
8188 (native-inputs
8189 (list bundler ruby-rspec ruby-rake-compiler))
8190 (synopsis "JSON parser for Ruby optimized for speed")
8191 (description
8192 "Oj is a JSON parser and generator for Ruby, where the encoding and
8193decoding of JSON is implemented as a C extension to Ruby.")
8194 (home-page "https://www.ohler.com/oj/")
8195 (license (list license:expat ; Ruby code
8196 license:bsd-3)))) ; extension code
8197
8198(define-public ruby-ox
8199 (package
8200 (name "ruby-ox")
8201 (version "2.6.0")
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (rubygems-uri "ox" version))
8206 (sha256
8207 (base32
8208 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
8209 (build-system ruby-build-system)
8210 (arguments
8211 '(#:tests? #f)) ; no tests
8212 (synopsis "Optimized XML library for Ruby")
8213 (description
8214 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
8215written as a native C extension. It was designed to be an alternative to
8216Nokogiri and other Ruby XML parsers for generic XML parsing and as an
8217alternative to Marshal for Object serialization.")
8218 (home-page "https://www.ohler.com/ox")
8219 (license license:expat)))
8220
8221(define-public ruby-redcloth
8222 (package
8223 (name "ruby-redcloth")
8224 (version "4.3.2")
8225 (source (origin
8226 (method url-fetch)
8227 (uri (rubygems-uri "RedCloth" version))
8228 (sha256
8229 (base32
8230 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
8231 (build-system ruby-build-system)
8232 (arguments
8233 `(#:tests? #f ; no tests
8234 #:phases
8235 (modify-phases %standard-phases
8236 ;; Redcloth has complicated rake tasks to build various versions for
8237 ;; multiple targets using RVM. We don't want this so we just use the
8238 ;; existing gemspec.
8239 (replace 'build
8240 (lambda _
8241 (invoke "gem" "build" "redcloth.gemspec"))))))
8242 (native-inputs
8243 `(("bundler" ,bundler)
8244 ("ruby-diff-lcs" ,ruby-diff-lcs)
8245 ("ruby-rspec-2" ,ruby-rspec-2)))
8246 (synopsis "Textile markup language parser for Ruby")
8247 (description
8248 "RedCloth is a Ruby parser for the Textile markup language.")
8249 (home-page "http://redcloth.org")
8250 (license license:expat)))
8251
8252(define-public ruby-pg
8253 (package
8254 (name "ruby-pg")
8255 (version "1.4.6")
8256 (home-page "https://github.com/ged/ruby-pg")
8257 (source
8258 (origin
8259 (method git-fetch)
8260 (uri (git-reference
8261 (url home-page)
8262 (commit (string-append "v" version))))
8263 (file-name (git-file-name name version))
8264 (sha256
8265 (base32
8266 "0k7jgx7x7p6gbsbrv2l5rq27nff2nphnls1sdq525d82b068qnfm"))))
8267 (build-system ruby-build-system)
8268 (arguments
8269 (list
8270 #:test-target "spec"
8271 #:phases
8272 #~(modify-phases %standard-phases
8273 (add-before 'build 'compile
8274 (lambda _
8275 (invoke "rake" "compile")))
8276 ;; Some tests rely on postgresql_lib_path.rb, but it is not
8277 ;; available until the gem is installed. Run tests after
8278 ;; installing to work around it.
8279 (delete 'check)
8280 (add-after 'install 'check
8281 (lambda* (#:key tests? #:allow-other-keys)
8282 (let ((new-gem (string-append #$output
8283 "/lib/ruby/vendor_ruby")))
8284 (setenv "GEM_PATH"
8285 (string-append (getenv "GEM_PATH") ":" new-gem))
8286 (when tests?
8287 (invoke "rspec"))))))))
8288 (native-inputs (list ruby-rake-compiler ruby-hoe ruby-rspec))
8289 (inputs (list postgresql))
8290 (synopsis "Ruby interface to PostgreSQL")
8291 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
8292with PostgreSQL 9.3 and later.")
8293 (license license:ruby)))
8294
8295(define-public ruby-byebug
8296 (package
8297 (name "ruby-byebug")
8298 (version "11.1.3")
8299 (source
8300 (origin
8301 (method git-fetch)
8302 (uri (git-reference
8303 (url "https://github.com/deivid-rodriguez/byebug")
8304 (commit (string-append "v" version))))
8305 (file-name (git-file-name name version))
8306 (sha256
8307 (base32
8308 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
8309 (modules '((guix build utils)))
8310 (snippet
8311 '(begin
8312 ;; Remove wrappers that try to setup a bundle environment.
8313 (with-directory-excursion "bin"
8314 (for-each delete-file '("bundle" "rake" "rubocop"))
8315 ;; ruby-minitest doesn't come with a launcher, so fix the one
8316 ;; provided.
8317 (substitute* "minitest"
8318 (("load File\\.expand_path\\(\"bundle\".*") "")
8319 (("require \"bundler/setup\".*") "")))))))
8320 (build-system ruby-build-system)
8321 (arguments
8322 (list
8323 #:phases
8324 #~(modify-phases %standard-phases
8325 (add-after 'unpack 'sanitize-dependencies
8326 (lambda _
8327 (substitute* "Rakefile"
8328 ((".*chandler/tasks.*") ""))))
8329 (add-after 'unpack 'skip-tmp-path-sensitive-test
8330 (lambda _
8331 (substitute* "test/commands/where_test.rb"
8332 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
8333 "unless true\n"))))
8334 (add-before 'build 'compile
8335 (lambda _
8336 (invoke "rake" "compile")))
8337 (add-before 'check 'patch-tests
8338 (lambda _
8339 ;; srand': no implicit conversion of nil into Integer (TypeError)
8340 (delete-file "test/minitest_runner_test.rb")
8341 ;; Expects 5, gets 162. From a file containing ~10 lines.
8342 (substitute* "test/commands/finish_test.rb"
8343 (("test_finish_inside_autoloaded_files")
8344 "finish_inside_autoloaded_files"))))
8345 (add-before 'check 'set-home
8346 (lambda _
8347 (setenv "HOME" (getcwd)))))))
8348 (native-inputs
8349 (list bundler
8350 ruby-minitest
8351 ruby-pry
8352 ruby-rake-compiler
8353 ruby-rubocop
8354 ruby-yard))
8355 (synopsis "Debugger for Ruby 2")
8356 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
8357TracePoint C API for execution control and the Debug Inspector C API for call
8358stack navigation. The core component provides support that front-ends can
8359build on. It provides breakpoint handling and bindings for stack frames among
8360other things and it comes with a command line interface.")
8361 (home-page "https://github.com/deivid-rodriguez/byebug")
8362 (license license:bsd-2)))
8363
8364(define-public ruby-netrc
8365 (package
8366 (name "ruby-netrc")
8367 (version "0.11.0")
8368 (source (origin
8369 (method url-fetch)
8370 (uri (rubygems-uri "netrc" version))
8371 (sha256
8372 (base32
8373 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
8374 (build-system ruby-build-system)
8375 (arguments
8376 `(#:phases
8377 (modify-phases %standard-phases
8378 (replace 'check
8379 ;; There is no Rakefile and minitest can only run one file at once,
8380 ;; so we have to iterate over all test files.
8381 (lambda _
8382 (for-each (lambda (file)
8383 (invoke "ruby" "-Itest" file))
8384 (find-files "./test" "test_.*\\.rb"))))
8385 (add-before 'check 'patch-tests-for-newer-ruby
8386 (lambda _
8387 (substitute* "test/test_netrc.rb"
8388 (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
8389 (native-inputs
8390 (list ruby-minitest))
8391 (synopsis "Library to read and update netrc files")
8392 (description
8393 "This library can read and update netrc files, preserving formatting
8394including comments and whitespace.")
8395 (home-page "https://github.com/geemus/netrc")
8396 (license license:expat)))
8397
8398(define-public ruby-unf-ext
8399 (package
8400 (name "ruby-unf-ext")
8401 (version "0.0.8.2")
8402 (source (origin
8403 (method url-fetch)
8404 (uri (rubygems-uri "unf_ext" version))
8405 (sha256
8406 (base32
8407 "1yj2nz2l101vr1x9w2k83a0fag1xgnmjwp8w8rw4ik2rwcz65fch"))))
8408 (build-system ruby-build-system)
8409 (arguments
8410 `(#:phases
8411 (modify-phases %standard-phases
8412 (add-after 'build 'build-ext
8413 (lambda _ (invoke "rake" "compile:unf_ext")))
8414 (add-before 'check 'lose-rake-compiler-dock-dependency
8415 (lambda _
8416 ;; rake-compiler-dock is listed in the gemspec, but only
8417 ;; required when cross-compiling.
8418 (substitute* "unf_ext.gemspec"
8419 ((".*rake-compiler-dock.*") "")))))))
8420 (native-inputs
8421 (list bundler ruby-rake-compiler ruby-test-unit))
8422 (synopsis "Unicode normalization form support library")
8423 (description
8424 "This package provides unicode normalization form support for Ruby.")
8425 (home-page "https://github.com/knu/ruby-unf_ext")
8426 (license license:expat)))
8427
8428(define-public ruby-tdiff
8429 ;; Use a newer than released snapshot so that rspec-2 is not required.
8430 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
8431 (package
8432 (name "ruby-tdiff")
8433 (version (string-append "0.3.3-1." (string-take commit 8)))
8434 (source (origin
8435 (method git-fetch)
8436 (uri (git-reference
8437 (url "https://github.com/postmodern/tdiff")
8438 (commit commit)))
8439 (file-name (string-append name "-" version "-checkout"))
8440 (sha256
8441 (base32
8442 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
8443 (build-system ruby-build-system)
8444 (native-inputs
8445 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8446 (synopsis "Calculate the differences between two tree-like structures")
8447 (description
8448 "This library provides functions to calculate the differences between two
8449tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
8450 (home-page "https://github.com/postmodern/tdiff")
8451 (license license:expat))))
8452
8453(define-public ruby-nokogiri-diff
8454 ;; Use a newer than released snapshot so that rspec-2 is not required.
8455 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
8456 (package
8457 (name "ruby-nokogiri-diff")
8458 (version (string-append "0.2.0-1." (string-take commit 8)))
8459 (source (origin
8460 (method git-fetch)
8461 (uri (git-reference
8462 (url "https://github.com/postmodern/nokogiri-diff")
8463 (commit commit)))
8464 (file-name (string-append name "-" version "-checkout"))
8465 (sha256
8466 (base32
8467 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
8468 (build-system ruby-build-system)
8469 (propagated-inputs
8470 (list ruby-tdiff
8471 ruby-nokogiri))
8472 (native-inputs
8473 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8474 (synopsis "Calculate the differences between two XML/HTML documents")
8475 (description
8476 "@code{Nokogiri::Diff} adds the ability to calculate the
8477differences (added or removed nodes) between two XML/HTML documents.")
8478 (home-page "https://github.com/postmodern/nokogiri-diff")
8479 (license license:expat))))
8480
8481(define-public ruby-racc
8482 (package
8483 (name "ruby-racc")
8484 (version "1.5.2")
8485 (source
8486 (origin
8487 (method url-fetch)
8488 (uri (rubygems-uri "racc" version))
8489 (sha256
8490 (base32
8491 "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"))))
8492 (build-system ruby-build-system)
8493 (arguments
8494 `(#:tests? #f)) ; Fails while parsing test instructions.
8495 (native-inputs
8496 (list ruby-hoe ruby-rake-compiler))
8497 (synopsis "LALR(1) parser generator for Ruby")
8498 (description
8499 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
8500generates Ruby program.")
8501 (home-page "https://i.loveruby.net/en/projects/racc/")
8502 (license (list
8503 ;; Generally licensed under the LGPL2.1, and some files also
8504 ;; available under the same license as Ruby.
8505 license:lgpl2.1
8506 license:ruby))))
8507
8508(define-public ruby-rack
8509 (package
8510 (name "ruby-rack")
8511 ;; Do not upgrade to version 3, as Rails doesn't support it yet.
8512 (version "2.2.7")
8513 (source
8514 (origin
8515 (method git-fetch) ;for tests
8516 (uri (git-reference
8517 (url "https://github.com/rack/rack")
8518 (commit (string-append "v" version))))
8519 (file-name (git-file-name name version))
8520 (sha256
8521 (base32
8522 "02r41fr61x0jfhraizc6bsgs40p8mlpvnzix71zwmcvibg384ify"))))
8523 (build-system ruby-build-system)
8524 (arguments
8525 (list
8526 #:phases
8527 #~(modify-phases %standard-phases
8528 (add-before 'check 'fix-tests
8529 (lambda _
8530 ;; This test fails in the build environment (and passes outside
8531 ;; of it).
8532 (substitute* "test/spec_files.rb"
8533 (("res.body.must_equal expected_body") ""))
8534 ;; A few of the tests use the length of a file on disk for
8535 ;; Content-Length and Content-Range headers. However, this file
8536 ;; has a shebang in it which an earlier phase patches, growing
8537 ;; the file size from 193 to 239 bytes when the store prefix is
8538 ;; "/gnu/store".
8539 (let ((size-diff (- (string-length (which "ruby"))
8540 (string-length "/usr/bin/env ruby"))))
8541 (substitute* '("test/spec_files.rb")
8542 (("208" bytes)
8543 (number->string (+ (string->number bytes) size-diff)))
8544 (("bytes(.)22-33" all delimiter)
8545 (string-append "bytes"
8546 delimiter
8547 (number->string (+ 22 size-diff))
8548 "-"
8549 (number->string (+ 33 size-diff)))))))))))
8550 (native-inputs
8551 (list ruby-minitest
8552 ruby-minitest-global-expectations
8553 ruby-webrick))
8554 (synopsis "Unified web application interface for Ruby")
8555 (description "Rack provides a minimal, modular and adaptable interface for
8556developing web applications in Ruby. By wrapping HTTP requests and responses,
8557it unifies the API for web servers, web frameworks, and software in between
8558into a single method call.")
8559 (home-page "https://github.com/rack/rack")
8560 (license license:expat)))
8561
8562(define-public ruby-rack-next
8563 (package
8564 (inherit ruby-rack)
8565 (name "ruby-rack")
8566 (version "3.0.7")
8567 (source (origin
8568 (method git-fetch) ;for tests
8569 (uri (git-reference
8570 (url "https://github.com/rack/rack")
8571 (commit (string-append "v" version))))
8572 (file-name (git-file-name name version))
8573 (sha256
8574 (base32
8575 "0msf14655nfcq1kgmib6932lgzm9nw3nb0m3c7nh6nj4sx30yxfr"))))
8576 (arguments '())))
8577
8578(define-public ruby-rackup
8579 (package
8580 (name "ruby-rackup")
8581 (version "2.1.0")
8582 (source (origin
8583 (method git-fetch)
8584 (uri (git-reference
8585 (url "https://github.com/rack/rackup")
8586 (commit (string-append "v" version))))
8587 (file-name (git-file-name name version))
8588 (sha256
8589 (base32
8590 "19b7sy700zjwaw7x47qpxvhnnz5hrp5bhrxfyljgagrli824dajy"))))
8591 (build-system ruby-build-system)
8592 (native-inputs (list ruby-minitest-global-expectations))
8593 (inputs (list ruby-rack-next ruby-webrick))
8594 (synopsis "Command line interface (CLI) for running for Rack applications")
8595 (description "This package provides a command line interface for running
8596for Rack applications.")
8597 (home-page "https://github.com/rack/rackup")
8598 (license license:expat)))
8599
8600(define-public ruby-rack-cache
8601 (package
8602 (name "ruby-rack-cache")
8603 (version "1.13.0")
8604 (source (origin
8605 (method url-fetch)
8606 (uri (rubygems-uri "rack-cache" version))
8607 (sha256
8608 (base32
8609 "1cqpax628h2mhnsjfg91c3klxwx2pkvaj061cisb0saqa99b0jgm"))))
8610 (build-system ruby-build-system)
8611 (arguments
8612 (list
8613 ;; The test suite depends on ruby-memcached, which is not available in
8614 ;; Guix and bundles a very dated copy of memcached (undesirable).
8615 #:tests? #f))
8616 (propagated-inputs (list ruby-rack))
8617 (synopsis "Component to enable HTTP caching for Rack-based applications")
8618 (description "Rack::Cache is suitable as a drop-in component to enable
8619HTTP caching for Rack-based applications that produce freshness (Expires,
8620Cache-Control) and/or validation (Last-Modified, ETag) information.")
8621 (home-page "https://github.com/rtomayko/rack-cache")
8622 (license license:expat)))
8623
8624(define-public ruby-rack-test
8625 (package
8626 (name "ruby-rack-test")
8627 (version "2.1.0")
8628 (source
8629 (origin
8630 (method url-fetch)
8631 (uri (rubygems-uri "rack-test" version))
8632 (sha256
8633 (base32
8634 "1ysx29gk9k14a14zsp5a8czys140wacvp91fja8xcja0j1hzqq8c"))))
8635 (build-system ruby-build-system)
8636 (arguments
8637 ;; Disable tests because of circular dependencies: requires sinatra,
8638 ;; which requires rack-protection, which requires rack-test. Instead
8639 ;; simply require the library.
8640 `(#:phases
8641 (modify-phases %standard-phases
8642 (replace 'check
8643 (lambda* (#:key tests? #:allow-other-keys)
8644 (when tests?
8645 (invoke "ruby" "-Ilib" "-r" "rack/test")))))))
8646 (propagated-inputs
8647 (list ruby-rack))
8648 (synopsis "Testing API for Rack applications")
8649 (description
8650 "Rack::Test is a small, simple testing API for Rack applications. It can
8651be used on its own or as a reusable starting point for Web frameworks and
8652testing libraries to build on.")
8653 (home-page "https://github.com/rack/rack-test")
8654 (license license:expat)))
8655
8656(define-public ruby-rack-session
8657 (package
8658 (name "ruby-rack-session")
8659 ;; Stay on version 1 until all the rack users such as Rails can use rack 3
8660 ;; (rack-session 2 requires rack 3).
8661 (version "1.0.1")
8662 (source (origin
8663 (method git-fetch) ;for tests
8664 (uri (git-reference
8665 (url "https://github.com/rack/rack-session")
8666 (commit (string-append "v" version))))
8667 (file-name (git-file-name name version))
8668 (sha256
8669 (base32
8670 "0rv955wd7ckp5jgy5c229wmajh48jpcy8s0iv5i8ma61wf7qw0i1"))))
8671 (build-system ruby-build-system)
8672 (native-inputs
8673 (list ruby-minitest-global-expectations
8674 ruby-minitest-sprint))
8675 (propagated-inputs
8676 (list ruby-rack))
8677 (synopsis "Session management for Rack")
8678 (description "This package provides a session management implementation
8679for Rack.")
8680 (home-page "https://github.com/rack/rack-session")
8681 (license license:expat)))
8682
8683(define-public ruby-rack-protection
8684 (package
8685 (name "ruby-rack-protection")
8686 (version "3.0.5")
8687 (source
8688 (origin
8689 (method url-fetch)
8690 (uri (rubygems-uri "rack-protection" version))
8691 (sha256
8692 (base32
8693 "1a12m1mv8dc0g90fs1myvis8vsgr427k1arg1q4a9qlfw6fqyhis"))))
8694 (build-system ruby-build-system)
8695 (arguments
8696 '(;; Tests missing from the gem.
8697 #:tests? #f))
8698 (propagated-inputs
8699 (list ruby-rack))
8700 (native-inputs
8701 (list bundler ruby-rspec-2 ruby-rack-test))
8702 (synopsis "Rack middleware that protects against typical web attacks")
8703 (description "Rack middleware that can be used to protect against typical
8704web attacks. It can protect all Rack apps, including Rails. For instance, it
8705protects against cross site request forgery, cross site scripting,
8706clickjacking, directory traversal, session hijacking and IP spoofing.")
8707 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
8708 (license license:expat)))
8709
8710(define-public ruby-rainbow
8711 (package
8712 (name "ruby-rainbow")
8713 (version "3.0.0")
8714 (source
8715 (origin
8716 (method url-fetch)
8717 (uri (rubygems-uri "rainbow" version))
8718 (sha256
8719 (base32
8720 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
8721 (build-system ruby-build-system)
8722 (arguments
8723 '(#:phases
8724 (modify-phases %standard-phases
8725 ;; Run rspec directly, to avoid requiring Rubocop which is used from
8726 ;; the Rakefile.
8727 (replace 'check
8728 (lambda* (#:key tests? #:allow-other-keys)
8729 (when tests?
8730 (invoke "rspec"))
8731 #t)))))
8732 (native-inputs
8733 (list bundler ruby-rspec))
8734 (synopsis "Colorize printed text on ANSI terminals")
8735 (description
8736 "@code{rainbow} provides a string presenter object to colorize strings by
8737wrapping them in ANSI escape codes.")
8738 (home-page "https://github.com/sickill/rainbow")
8739 (license license:expat)))
8740
8741(define-public ruby-rr
8742 (package
8743 (name "ruby-rr")
8744 (version "1.2.1")
8745 (source
8746 (origin
8747 (method url-fetch)
8748 (uri (rubygems-uri "rr" version))
8749 (sha256
8750 (base32
8751 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
8752 (build-system ruby-build-system)
8753 (arguments
8754 '(#:tests? #f)) ; test files not included
8755 (native-inputs
8756 (list bundler ruby-rspec))
8757 (synopsis "Ruby test double framework")
8758 (description
8759 "RR is a test double framework that features a rich selection of double
8760techniques and a terse syntax.")
8761 (home-page "https://rr.github.io/rr/")
8762 (license license:expat)))
8763
8764(define-public ruby-rest-client
8765 (package
8766 (name "ruby-rest-client")
8767 (version "2.1.0")
8768 (source
8769 (origin
8770 (method url-fetch)
8771 (uri (rubygems-uri "rest-client" version))
8772 (sha256
8773 (base32
8774 "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im"))))
8775 (build-system ruby-build-system)
8776 (arguments
8777 (list
8778 ;; TODO Some tests are currently broken
8779 #:tests? #f
8780 #:phases
8781 #~(modify-phases %standard-phases
8782 (add-before 'check 'remove-unnecessary-development-dependencies
8783 (lambda _
8784 (substitute* "rest-client.gemspec"
8785 ;; Remove rubocop as it's unused. Rubocop also indirectly
8786 ;; depends on this package through ruby-parser and ruby-ast so
8787 ;; this avoids a dependency loop.
8788 ((".*rubocop.*") "\n")
8789 ;; Remove pry as it's unused, it's a debugging tool
8790 ((".*pry.*") "\n")
8791 ;; Remove an unnecessarily strict rdoc dependency
8792 ((".*rdoc.*") "\n"))))
8793 (add-before 'check 'delete-network-dependent-tests
8794 (lambda _
8795 (delete-file "spec/integration/request_spec.rb")
8796 (delete-file "spec/integration/httpbin_spec.rb")))
8797 (replace 'check
8798 (lambda* (#:key tests? #:allow-other-keys)
8799 (when tests?
8800 (invoke "rspec")))))))
8801 (propagated-inputs
8802 (list ruby-http-accept-1
8803 ruby-http-cookie
8804 ruby-mime-types
8805 ruby-netrc))
8806 (native-inputs
8807 (list bundler
8808 ruby-webmock-2
8809 ruby-rspec))
8810 (synopsis "Simple HTTP and REST client for Ruby")
8811 (description
8812 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
8813inspired by the Sinatra microframework style of specifying actions:
8814@code{get}, @code{put}, @code{post}, @code{delete}.")
8815 (home-page "https://github.com/rest-client/rest-client")
8816 (license license:expat)))
8817
8818(define-public ruby-rubocop-ast
8819 (package
8820 (name "ruby-rubocop-ast")
8821 (version "1.28.0")
8822 (source
8823 (origin
8824 (method git-fetch) ;no test suite in distributed gem
8825 (uri (git-reference
8826 (url "https://github.com/rubocop/rubocop-ast")
8827 (commit (string-append "v" version))))
8828 (file-name (git-file-name name version))
8829 (sha256
8830 (base32
8831 "1dp09gcmahmdfi3s6xsksr3ka9dddjpy9ymhr9wjwv67y1falffr"))))
8832 (build-system ruby-build-system)
8833 (arguments
8834 `(#:test-target "spec"
8835 #:phases (modify-phases %standard-phases
8836 (add-after 'unpack 'relax-dependencies
8837 (lambda _
8838 (substitute* "Gemfile"
8839 (("gem 'simplecov', '~> 0.10', '< 0.18'")
8840 "gem 'simplecov', '~> 0.10'"))))
8841 (add-before 'build 'generate-lexer
8842 (lambda _
8843 (setenv "RUBOCOP_VERSION" "none")
8844 (invoke "rake" "generate")))
8845 (replace 'replace-git-ls-files
8846 (lambda _
8847 (substitute* "rubocop-ast.gemspec"
8848 (("`git ls-files(.*)`" _ files)
8849 (format #f "`find ~a -type f| sort`" files))))))))
8850 (native-inputs
8851 (list ruby-bump
8852 ruby-oedipus-lex
8853 ruby-pry
8854 ruby-racc
8855 ruby-rake
8856 ruby-rspec
8857 ruby-simplecov))
8858 (propagated-inputs
8859 (list ruby-parser))
8860 (synopsis "RuboCop's AST extensions and NodePattern functionality")
8861 (description "Rubocop::AST extends @code{ruby-parser} with classes used
8862by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
8863@itemize
8864@item @code{RuboCop::AST::Node}
8865@item @code{RuboCop::AST::NodePattern}
8866@end itemize")
8867 (home-page "https://rubocop.org/")
8868 (license license:expat)))
8869
8870(define-public ruby-rexml
8871 (package
8872 (name "ruby-rexml")
8873 (version "3.2.5")
8874 (source
8875 (origin
8876 (method git-fetch) ;no tests in distributed gem
8877 (uri (git-reference
8878 (url "https://github.com/ruby/rexml")
8879 (commit (string-append "v" version))))
8880 (file-name (git-file-name name version))
8881 (sha256
8882 (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
8883 (build-system ruby-build-system)
8884 (synopsis "XML toolkit for Ruby")
8885 (description "Inspired by Electric XML library for Java, REXML aims to be
8886easy-to-use API, small and fast. It supports both tree and stream document
8887parsing.")
8888 (home-page "https://github.com/ruby/rexml")
8889 (license license:bsd-2)))
8890
8891(define-public ruby-character-set
8892 (package
8893 (name "ruby-character-set")
8894 (version "1.4.0")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (rubygems-uri "character_set" version))
8899 (sha256
8900 (base32
8901 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
8902 (build-system ruby-build-system)
8903 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
8904 (synopsis "Ruby library to manipulate Unicode")
8905 (description "CharacterSet is a C-extended Ruby library to work with sets
8906of Unicode code points. It can read and write these sets in various formats
8907and implements the @code{stdlib} @code{Set} interface for them. It also
8908offers an alternate paradigm of @code{String} processing which grants much
8909better performance than @code{Regexp} and @code{String} methods from the
8910@code{stdlib} where applicable. Many parts can be used independently, e.g.:
8911@itemize
8912@item @code{CharacterSet::Character}
8913@item @code{CharacterSet::Parser}
8914@item @code{CharacterSet::Writer}
8915@item @code{RangeCompressor}
8916@end itemize")
8917 (home-page "https://github.com/jaynetics/character_set")
8918 (license license:expat)))
8919
8920(define-public ruby-range-compressor
8921 (package
8922 (name "ruby-range-compressor")
8923 (version "1.2.0")
8924 (source
8925 (origin
8926 (method git-fetch)
8927 (uri (git-reference
8928 (url "https://github.com/janosch-x/range_compressor")
8929 (commit (string-append "v" version))))
8930 (file-name (git-file-name name version))
8931 (sha256
8932 (base32
8933 "1zmc44si5ac2h7r1x4f1j8z5yr6wz528c7dssh0g70fmczs3pfga"))))
8934 (build-system ruby-build-system)
8935 (arguments
8936 (list
8937 #:test-target "spec"
8938 #:phases
8939 #~(modify-phases %standard-phases
8940 (add-after 'extract-gemspec 'strip-version-requirements
8941 (lambda _
8942 (substitute* "range_compressor.gemspec"
8943 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
8944 (string-append stripped "\n"))))))))
8945 (native-inputs
8946 (list ruby-rspec
8947 ruby-sorted-set))
8948 (synopsis "Simple arrays of objects to arrays of ranges compressor")
8949 (description "RangeCompresses is a tiny library that allows compressing
8950arrays of objects into arrays of ranges. For example, it can turn the
8951following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
8952 (home-page "https://github.com/janosch-x/range_compressor")
8953 (license license:expat)))
8954
8955(define-public ruby-regexp-property-values
8956 (let ((commit "03007a66c912949a7130b973cc0eca109c20811f")
8957 (revision "1"))
8958 (package
8959 (name "ruby-regexp-property-values")
8960 (version (git-version "1.0.0" revision commit))
8961 (source
8962 (origin
8963 (method git-fetch)
8964 (uri (git-reference ;no test suite in distributed gem
8965 (url "https://github.com/jaynetics/regexp_property_values")
8966 (commit commit)))
8967 (file-name (git-file-name name version))
8968 (sha256
8969 (base32
8970 "1zsax784p16zdkf60lyq9z924zvsafhx9ckxx9srsgkyiqrifi1s"))))
8971 (build-system ruby-build-system)
8972 (arguments
8973 '(#:test-target "default"))
8974 (native-inputs
8975 (list ruby-character-set ruby-rake ruby-rake-compiler
8976 ruby-range-compressor ruby-rspec))
8977 (synopsis "Inspect Ruby's regex engine property values")
8978 (description "This small library lets you see which property values are
8979supported by the regular expression engine of the Ruby version you are running
8980and can directly read out their code point ranges. In other words, it
8981determines all supported values for @code{\\p{value}} expressions and what
8982they match.")
8983 (home-page "https://github.com/jaynetics/regexp_property_values")
8984 (license license:expat))))
8985
8986(define-public ruby-regexp-parser
8987 (package
8988 (name "ruby-regexp-parser")
8989 (version "2.0.0")
8990 (source
8991 (origin
8992 (method git-fetch) ;bin/test missing from gem
8993 (uri (git-reference
8994 (url "https://github.com/ammar/regexp_parser")
8995 (commit (string-append "v" version))))
8996 (file-name (git-file-name name version))
8997 (sha256
8998 (base32
8999 "09ddxdwlml30q6j4rqf06bbjj1mwx00rs0bksnyblhv85anrqz3k"))))
9000 (build-system ruby-build-system)
9001 (arguments
9002 '(#:test-target "default"
9003 #:phases (modify-phases %standard-phases
9004 (add-before 'build 'compile-scanner.rb
9005 (lambda _
9006 (invoke "rake" "build")
9007 ;; XXX: This is needed otherwise the install
9008 ;; phase fails to delete the installed cached
9009 ;; gem file.
9010 (delete-file-recursively "pkg")
9011 #t)))))
9012 (native-inputs
9013 (list ragel ruby-regexp-property-values ruby-rspec))
9014 (synopsis "Regular expression parser library for Ruby")
9015 (description "A Ruby gem for tokenizing, parsing, and transforming regular
9016expressions. It comprises the following components:
9017@itemize
9018@item A scanner/tokenizer based on Ragel,
9019@item A lexer that produces a stream of token objects,
9020@item A parser that produces a tree of Expression objects.
9021@end itemize")
9022 (home-page "https://github.com/ammar/regexp_parser")
9023 (license license:expat)))
9024
9025(define-public ruby-test-queue
9026 (package
9027 (name "ruby-test-queue")
9028 (version "0.4.2")
9029 (source
9030 (origin
9031 (method url-fetch)
9032 (uri (rubygems-uri "test-queue" version))
9033 (sha256
9034 (base32
9035 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
9036 (build-system ruby-build-system)
9037 (arguments
9038 '(#:phases
9039 (modify-phases %standard-phases
9040 (replace 'check
9041 (lambda* (#:key tests? #:allow-other-keys)
9042 (when tests?
9043 (invoke "rspec"))
9044 #t)))))
9045 (native-inputs
9046 (list ruby-rspec))
9047 (synopsis "Minitest/RSpec parallel test runner for CI environments")
9048 (description "The test-queue module is a parallel test runner,
9049built using a centralized queue to ensure optimal distribution of
9050tests between workers. It is specifically optimized for Continuous
9051Integration (CI) environments: build statistics from each run are
9052stored locally and used to sort the queue at the beginning of the next
9053run.")
9054 (home-page "https://github.com/tmm1/test-queue")
9055 (license license:expat)))
9056
9057(define-public ruby-rubocop
9058 (package
9059 (name "ruby-rubocop")
9060 (version "1.48.1")
9061 (source
9062 (origin
9063 (method git-fetch) ;no tests in distributed gem
9064 (uri (git-reference
9065 (url "https://github.com/rubocop/rubocop")
9066 (commit (string-append "v" version))))
9067 (file-name (git-file-name name version))
9068 (sha256
9069 (base32
9070 "1l4j99mbrdjy2bzcnky30pjgjv8sxjr187jzliyqmldvpf7dizbp"))))
9071 (build-system ruby-build-system)
9072 (arguments
9073 `(#:test-target "default"
9074 ;; TODO: Figure out why test hangs.
9075 #:tests? ,(not (or (%current-target-system)
9076 (target-riscv64?)))
9077 #:phases
9078 (modify-phases %standard-phases
9079 (add-before 'check 'set-home
9080 (lambda _
9081 (setenv "HOME" (getcwd))))
9082 ;; Rubocop depends on itself for tests, directly and indirectly. By
9083 ;; regenerating the TODO list we test rubocop against itself and
9084 ;; forgo adjusting the test suite to our environment each release.
9085 (replace 'check
9086 (lambda* (#:key tests? #:allow-other-keys)
9087 (when tests?
9088 (make-file-writable ".rubocop_todo.yml")
9089 (invoke "./exe/rubocop" "--auto-gen-config")))))))
9090 (native-inputs
9091 (list ruby-pry
9092 ruby-rake
9093 ruby-rspec
9094 ruby-rubocop-ast
9095 ruby-rubocop-capybara-minimal
9096 ruby-rubocop-minimal
9097 ruby-rubocop-performance-minimal
9098 ruby-rubocop-rake-minimal
9099 ruby-rubocop-rspec-minimal
9100 ruby-simplecov
9101 ruby-stackprof
9102 ruby-test-queue
9103 ruby-webmock
9104 ruby-yard))
9105 (propagated-inputs
9106 (list ruby-json
9107 ruby-parallel
9108 ruby-parser
9109 ruby-progressbar
9110 ruby-rainbow
9111 ruby-regexp-parser
9112 ruby-rexml
9113 ruby-rubocop-ast
9114 ruby-unicode-display-width))
9115 (synopsis "Ruby code style checking tool")
9116 (description
9117 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
9118the community-driven Ruby Style Guide.")
9119 (home-page "https://github.com/rubocop/rubocop")
9120 (license license:expat)))
9121
9122(define-public ruby-rubocop-minimal
9123 (hidden-package
9124 (package
9125 (inherit ruby-rubocop)
9126 (arguments
9127 (substitute-keyword-arguments (package-arguments ruby-rubocop)
9128 ((#:tests? _ #f) #f)))
9129 (propagated-inputs '())
9130 (native-inputs '()))))
9131
9132(define-public ruby-contest
9133 (package
9134 (name "ruby-contest")
9135 (version "0.1.3")
9136 (source
9137 (origin
9138 (method url-fetch)
9139 (uri (rubygems-uri "contest" version))
9140 (sha256
9141 (base32
9142 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
9143 (build-system ruby-build-system)
9144 (synopsis "Write declarative tests using nested contexts")
9145 (description
9146 "Contest allows writing declarative @code{Test::Unit} tests using nested
9147contexts without performance penalties.")
9148 (home-page "https://github.com/citrusbyte/contest")
9149 (license license:expat)))
9150
9151(define-public ruby-creole
9152 (package
9153 (name "ruby-creole")
9154 (version "0.5.0")
9155 (source
9156 (origin
9157 (method url-fetch)
9158 (uri (rubygems-uri "creole" version))
9159 (sha256
9160 (base32
9161 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
9162 (build-system ruby-build-system)
9163 (native-inputs
9164 (list ruby-bacon))
9165 (synopsis "Creole markup language converter")
9166 (description
9167 "Creole is a lightweight markup language and this library for converting
9168creole to @code{HTML}.")
9169 (home-page "https://github.com/minad/creole")
9170 (license license:ruby)))
9171
9172(define-public ruby-docile
9173 (package
9174 (name "ruby-docile")
9175 (version "1.1.5")
9176 (source
9177 (origin
9178 (method url-fetch)
9179 (uri (rubygems-uri "docile" version))
9180 (sha256
9181 (base32
9182 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
9183 (build-system ruby-build-system)
9184 (arguments
9185 '(#:tests? #f)) ; needs github-markup, among others
9186 (synopsis "Ruby EDSL helper library")
9187 (description "Docile is a Ruby library that provides an interface for
9188creating embedded domain specific languages (EDSLs) that manipulate existing
9189Ruby classes.")
9190 (home-page "https://ms-ati.github.io/docile/")
9191 (license license:expat)))
9192
9193(define-public ruby-middleware
9194 (package
9195 (name "ruby-middleware")
9196 (version "0.1.0")
9197 (source
9198 (origin
9199 (method url-fetch)
9200 (uri (rubygems-uri "middleware" version))
9201 (sha256
9202 (base32
9203 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
9204 (build-system ruby-build-system)
9205 (arguments '(#:tests? #f)) ;no test suite
9206 (synopsis "Implementation of a middleware abstraction for Ruby")
9207 (description "Middleware is a generalized implementation of a middleware
9208abstraction for Ruby.")
9209 (home-page "https://github.com/mitchellh/middleware")
9210 (license license:expat)))
9211
9212(define-public ruby-benchmark-ips
9213 (package
9214 (name "ruby-benchmark-ips")
9215 (version "2.12.0")
9216 (source
9217 (origin
9218 (method git-fetch) ;no tests in distributed gem
9219 (uri (git-reference
9220 (url "https://github.com/evanphx/benchmark-ips")
9221 (commit (string-append "v" version))))
9222 (file-name (git-file-name name version))
9223 (sha256
9224 (base32
9225 "19pa2a1lgjzrxcz6vxwfiq5qq337vr15bbbpc2mfwzljdlx5059s"))))
9226 (build-system ruby-build-system)
9227 (arguments
9228 (list
9229 #:phases
9230 #~(modify-phases %standard-phases
9231 (add-after 'unpack 'patch
9232 (lambda _
9233 (substitute* "Gemfile"
9234 (("gem 'rake'.*")
9235 "gem 'rake'"))
9236 (substitute* "benchmark-ips.gemspec"
9237 (("git ls-files -- examples lib")
9238 "find examples lib -type f | sort")))))))
9239 (native-inputs
9240 (list ruby-hoe))
9241 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
9242 (description "Benchmark-ips enhances the Ruby Benchmark module with the
9243iterations per second count. For short snippets of code, it can automatically
9244figure out how many times to run the code to get interesting data.")
9245 (home-page "https://github.com/evanphx/benchmark-ips")
9246 (license license:expat)))
9247
9248(define-public ruby-ffi-rzmq-core
9249 (package
9250 (name "ruby-ffi-rzmq-core")
9251 (version "1.0.7")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (rubygems-uri "ffi-rzmq-core" version))
9256 (sha256
9257 (base32
9258 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
9259 (build-system ruby-build-system)
9260 (arguments
9261 `(#:phases
9262 (modify-phases %standard-phases
9263 (add-after 'unpack 'patch-libzmq-search-path
9264 (lambda* (#:key inputs #:allow-other-keys)
9265 (let ((zeromq (assoc-ref inputs "zeromq")))
9266 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
9267 (("/usr/local/lib")
9268 (string-append zeromq "/lib")))
9269 #t)))
9270 (replace 'check
9271 (lambda _
9272 (invoke "rspec"))))))
9273 (native-inputs
9274 (list ruby-rspec))
9275 (inputs
9276 (list zeromq))
9277 (propagated-inputs (list ruby-ffi))
9278 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
9279 (description "This library only provides the FFI wrapper for the ZeroMQ
9280networking library. It can be used to implement a Ruby API for the ZeroMQ
9281library.")
9282 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
9283 (license license:expat)))
9284
9285(define-public ruby-ffi-rzmq
9286 (package
9287 (name "ruby-ffi-rzmq")
9288 (version "2.0.7")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (rubygems-uri "ffi-rzmq" version))
9293 (sha256
9294 (base32
9295 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
9296 (build-system ruby-build-system)
9297 (arguments '(#:phases (modify-phases %standard-phases
9298 (replace 'check
9299 (lambda* (#:key tests? #:allow-other-keys)
9300 (when tests?
9301 (invoke "rspec")))))))
9302 (native-inputs
9303 (list ruby-rspec))
9304 (propagated-inputs
9305 (list ruby-ffi-rzmq-core))
9306 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
9307 (description "This library provides a high-level API that wraps the ZeroMQ
9308networking library using the Ruby foreign function interface (FFI). It is a
9309pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
9310for FFI.")
9311 (home-page "https://github.com/chuckremes/ffi-rzmq")
9312 (license license:expat)))
9313
9314(define-public ruby-sawyer
9315 (package
9316 (name "ruby-sawyer")
9317 (version "0.9.2")
9318 (source
9319 (origin
9320 (method url-fetch)
9321 (uri (rubygems-uri "sawyer" version))
9322 (sha256
9323 (base32
9324 "1jks1qjbmqm8f9kvwa81vqj39avaj9wdnzc531xm29a55bb74fps"))))
9325 (build-system ruby-build-system)
9326 (propagated-inputs
9327 (list ruby-addressable ruby-faraday))
9328 (synopsis "Experimental hypermedia agent for Ruby")
9329 (description "Sawyer is an experimental hypermedia agent for Ruby built on
9330top of Faraday.")
9331 (home-page "https://github.com/lostisland/sawyer")
9332 (license license:expat)))
9333
9334(define-public ruby-octokit
9335 (package
9336 (name "ruby-octokit")
9337 (version "6.1.1")
9338 (source (origin
9339 (method git-fetch)
9340 (uri (git-reference
9341 (url "https://github.com/octokit/octokit.rb")
9342 (commit (string-append "v" version))))
9343 (file-name (git-file-name name version))
9344 (sha256
9345 (base32
9346 "02bcmh0b0v80cis1l80lhzxw8adb69xkz6qgg4m7qcmj3y5arwmk"))))
9347 (build-system ruby-build-system)
9348 (arguments
9349 (list
9350 #:phases
9351 #~(modify-phases %standard-phases
9352 (add-after 'unpack 'remove-unnecessary-dependencies
9353 (lambda _
9354 (substitute* "spec/spec_helper.rb"
9355 (("require 'pry-byebug'") "")))))))
9356 (native-inputs
9357 (list ruby-faraday-multipart
9358 ruby-jwt
9359 ruby-mime-types
9360 ruby-multi-json
9361 ruby-netrc
9362 ruby-rbnacl
9363 ruby-rspec
9364 ruby-simplecov
9365 ruby-webmock
9366 ruby-vcr-expat))
9367 (propagated-inputs (list ruby-faraday ruby-sawyer))
9368 (synopsis "Ruby toolkit for the GitHub API")
9369 (description "Octokit wraps the GitHub API in a flat API client that
9370follows Ruby conventions and requires little knowledge of REST.")
9371 (home-page "https://github.com/octokit/octokit.rb")
9372 (license license:expat)))
9373
9374(define-public ruby-pry-byebug
9375 (package
9376 (name "ruby-pry-byebug")
9377 (version "3.10.1")
9378 (source
9379 (origin
9380 (method git-fetch)
9381 (uri (git-reference
9382 (url "https://github.com/deivid-rodriguez/pry-byebug")
9383 (commit (string-append "v" version))))
9384 (file-name (git-file-name name version))
9385 (sha256
9386 (base32
9387 "0z8rhvmr9qmlbk8c8h6jbig5qd5xbdg9qihvx3g0cv1whqzbfikq"))))
9388 (build-system ruby-build-system)
9389 (arguments
9390 `(#:phases (modify-phases %standard-phases
9391 (add-after 'unpack 'sanitize-dependencies
9392 (lambda _
9393 (substitute* "Rakefile"
9394 ((".*chandler/tasks.*") ""))))
9395 (add-before 'check 'set-home
9396 (lambda _
9397 (setenv "HOME" (getcwd)))))))
9398 (native-inputs (list ruby-rubocop ruby-simplecov))
9399 (propagated-inputs (list ruby-byebug ruby-pry))
9400 (synopsis "Step-by-step debugging and stack navigation in Pry")
9401 (description "This package adds step-by-step debugging and stack
9402navigation capabilities to @code{pry}, using @code{byebug}.")
9403 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
9404 (license license:expat)))
9405
9406(define-public ruby-stackprof
9407 (package
9408 (name "ruby-stackprof")
9409 (version "0.2.25")
9410 (source
9411 (origin
9412 (method url-fetch)
9413 (uri (rubygems-uri "stackprof" version))
9414 (sha256
9415 (base32 "0bhdgfb0pmw9mav1kw9fn0ka012sa0i3h5ppvqssw5xq48nhxnr8"))))
9416 (build-system ruby-build-system)
9417 (arguments
9418 (list
9419 #:phases
9420 #~(modify-phases %standard-phases
9421 (add-before 'check 'patch-gemspec
9422 (lambda _
9423 (substitute* "stackprof.gemspec"
9424 (("rake-compiler.*")
9425 "rake-compiler>.freeze, [\"> 0.9\"])\n")
9426 (("mocha.*")
9427 "mocha>.freeze, [\"> 0.14\"])\n"))))
9428 (add-before 'check 'skip-dubious-test
9429 (lambda _
9430 (substitute* "test/test_stackprof.rb"
9431 ;; This unreliable test can fail with "Expected 0 to be >= 1."
9432 (("def test_(cputime)" _ name)
9433 (string-append "def skip_" name))
9434 ;; This test often fails
9435 (("def test_gc") "def skip_test_gc"))))
9436 (add-before 'check 'build-tests
9437 (lambda _
9438 (invoke "rake" "compile")))
9439 (replace 'check
9440 (lambda* (#:key tests? #:allow-other-keys)
9441 (when tests?
9442 (invoke "bundle" "exec" "rake" "default")))))))
9443 (native-inputs
9444 (list bundler ruby-mocha-1 ruby-rake-compiler))
9445 (synopsis "Sampling profiler for Ruby code")
9446 (description
9447 "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
9448wallclock and object allocation samplers.")
9449 (home-page "https://github.com/tmm1/stackprof")
9450 (license license:expat)))
9451
9452(define-public ruby-binding-of-caller
9453 (package
9454 (name "ruby-binding-of-caller")
9455 (version "0.8.0")
9456 (source
9457 (origin
9458 (method url-fetch)
9459 (uri (rubygems-uri "binding_of_caller" version))
9460 (sha256
9461 (base32
9462 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
9463 (build-system ruby-build-system)
9464 ;; Attempting to run the test suite fails with a rake deprecation error
9465 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
9466 (arguments '(#:tests? #f))
9467 (propagated-inputs
9468 (list ruby-debug-inspector))
9469 (synopsis "Retrieve the binding of a method's caller")
9470 (description "The @code{binding_of_caller} module provides the
9471@code{Binding#of_caller} method. It allows accessing bindings from upper
9472frames in the call stack and can evaluate code in that context.")
9473 (home-page "https://github.com/banister/binding_of_caller")
9474 (license license:expat)))
9475
9476(define-public ruby-pry-stack-explorer
9477 (package
9478 (name "ruby-pry-stack-explorer")
9479 (version "0.5.1")
9480 (source
9481 (origin
9482 (method url-fetch)
9483 (uri (rubygems-uri "pry-stack_explorer" version))
9484 (sha256
9485 (base32
9486 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
9487 (build-system ruby-build-system)
9488 (arguments '(#:tests? #f)) ;no test suite in gem release
9489 (propagated-inputs
9490 (list ruby-binding-of-caller ruby-pry))
9491 (synopsis "Call-stack navigation plugin for the Pry REPL")
9492 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
9493add support to navigate the call-stack.")
9494 (home-page "https://github.com/pry/pry-stack_explorer")
9495 (license license:expat)))
9496
9497(define-public ruby-varint
9498 (package
9499 (name "ruby-varint")
9500 (version "0.1.1")
9501 (source
9502 (origin
9503 (method url-fetch)
9504 (uri (rubygems-uri "varint" version))
9505 (sha256
9506 (base32
9507 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
9508 (build-system ruby-build-system)
9509 (arguments '(#:tests? #f)) ;no test suite
9510 (synopsis "Variable length integers (varint) C extension for Ruby")
9511 (description "This package provides a small C extension to speed up
9512variable length integers (varint) in Ruby Protocol Buffers.")
9513 (home-page "https://github.com/liquidm/varint")
9514 (license license:bsd-3)))
9515
9516(define-public ruby-version-gem
9517 (package
9518 (name "ruby-version-gem")
9519 (version "1.1.3")
9520 (source (origin
9521 (method git-fetch) ;for tests
9522 (uri (git-reference
9523 (url "https://gitlab.com/oauth-xx/version_gem")
9524 (commit (string-append "v" version))))
9525 (file-name (git-file-name name version))
9526 (sha256
9527 (base32
9528 "1wazx2jr9vx5wm48fy8bccvfwhg7y2s8shfw9q81dhb4yvwk6gbf"))))
9529 (build-system ruby-build-system)
9530 (arguments
9531 (list
9532 #:phases
9533 #~(modify-phases %standard-phases
9534 (add-after 'unpack 'relax-requirements
9535 (lambda _
9536 (substitute* "Gemfile"
9537 (("^linting = .*")
9538 "linting = false\n")
9539 (("^coverage = .*")
9540 "coverage = false\n")
9541 (("^debug = .*")
9542 "debug = false\n"))
9543 (substitute* "spec/spec_helper.rb"
9544 (("^RUN_COVERAGE = .*")
9545 "RUN_COVERAGE = false\n")
9546 (("^ALL_FORMATTERS = .*")
9547 "ALL_FORMATTERS = false\n"))))
9548 (add-before 'build 'drop-signing-key-requirement
9549 (lambda _
9550 (substitute* "version_gem.gemspec"
9551 (("spec.signing_key =.*")
9552 "spec.signing_key = nil")))))))
9553 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
9554 (synopsis "Improved @code{Version} module for Ruby")
9555 (description "VersionGem aims to provide introspection of a @code{Version}
9556module based on a @code{Version::VERSION} constant string wile not interfering
9557with gemspec parsing where the @code{VERSION} string is traditionally used.")
9558 (home-page "https://gitlab.com/oauth-xx/version_gem")
9559 (license license:expat)))
9560
9561;;; Note: Do NOT update to a newer version; this is the last commit that is
9562;;; still licensed as free software, the project having switched to the
9563;;; Hippocratic license afterward (see:
9564;;; https://github.com/vcr/vcr/issues/959).
9565(define-public ruby-vcr-expat
9566 (let ((revision "0")
9567 (commit-dont-touch "842b2bf89099dc91f2c643d0d85d1abd54eb7e85")) ;
9568 (package
9569 (name "ruby-vcr-expat")
9570 (version (git-version "5.0.0" revision commit-dont-touch))
9571 (source (origin
9572 (method git-fetch)
9573 (uri (git-reference
9574 (url "https://github.com/vcr/vcr")
9575 (commit commit-dont-touch)))
9576 (file-name (git-file-name name version))
9577 (sha256
9578 (base32
9579 "02mzifd2655kjh35bbry01n66jjcjrsw6ncqlybfkjcaqrw2zalv"))))
9580 (build-system ruby-build-system)
9581 (arguments (list #:tests? #f)) ;avoid all dependencies
9582 (home-page "https://github.com/vcr/vcr")
9583 (synopsis "HTTP interaction recorder [old version]")
9584 (description "Record your test suite's HTTP interactions and replay them
9585during future test runs for fast, deterministic, accurate tests. This is an
9586older version of VCR that is free software under the Expat license. The
9587project later switched to the Hippocratic license, which is non-free.
9588@emph{Do not use it in new free software projects}.")
9589 (license license:expat))))
9590
9591(define-public ruby-ruby-prof
9592 (package
9593 (name "ruby-ruby-prof")
9594 (version "1.4.5")
9595 (source
9596 (origin
9597 (method url-fetch)
9598 (uri (rubygems-uri "ruby-prof" version))
9599 (sha256
9600 (base32
9601 "09n13bzm1p956z318xx1v7ikqdp2i971v7p3kwf3170axz368ccy"))))
9602 (build-system ruby-build-system)
9603 (arguments
9604 ;; FIXME: Investigate why the tests fail on i686-linux.
9605 `(#:tests? ,(not (or (%current-target-system)
9606 (target-x86-32?)))
9607 #:phases
9608 (modify-phases %standard-phases
9609 ;; The LineNumbersTest test fails non-deterministically (see:
9610 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
9611 (add-after 'extract-gemspec 'delete-flaky-test
9612 (lambda _
9613 (delete-file "test/line_number_test.rb")
9614 (substitute* "ruby-prof.gemspec"
9615 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))))
9616 (add-before 'check 'compile
9617 (lambda _
9618 (invoke "rake" "compile"))))))
9619 (native-inputs (list bundler ruby-minitest ruby-rake-compiler ruby-rdoc))
9620 (synopsis "Fast code profiler for Ruby")
9621 (description "RubyProf is a fast code profiler for Ruby. Its features
9622include:
9623@table @asis
9624@item Speed
9625Being a C extension, it is many times faster than the standard Ruby profiler.
9626@item Measurement Modes
9627It can measure program wall time, process time, object allocations and memory
9628usage.
9629@item Reports
9630A variety of text and cross-referenced HTML reports can be generated.
9631@item Threads
9632Profiling multiple threads simultaneously is supported.
9633@end table")
9634 (home-page "https://github.com/ruby-prof/ruby-prof")
9635 (license license:bsd-2)))
9636
9637(define-public ruby-ruby-memcheck
9638 (package
9639 (name "ruby-ruby-memcheck")
9640 (version "1.3.2")
9641 (source (origin
9642 (method git-fetch)
9643 (uri (git-reference
9644 (url "https://github.com/Shopify/ruby_memcheck")
9645 (commit version)))
9646 (file-name (git-file-name name version))
9647 (sha256
9648 (base32
9649 "0fj4j4d062sw2kx2qlj877gjbj1xbb691njr8x9nbah6615idlni"))))
9650 (build-system ruby-build-system)
9651 (arguments
9652 (list
9653 ;; The tests seem to fail on 32bit x86
9654 #:tests? (not (or (target-x86-32?)
9655 (%current-target-system)))
9656 #:phases
9657 #~(modify-phases %standard-phases
9658 (add-after 'unpack 'patch-valgrind-path
9659 (lambda* (#:key inputs #:allow-other-keys)
9660 (substitute* "lib/ruby_memcheck/configuration.rb"
9661 (("DEFAULT_VALGRIND = \"valgrind\"")
9662 (format #f "DEFAULT_VALGRIND = ~s"
9663 (search-input-file inputs "bin/valgrind"))))))
9664 (add-before 'replace-git-ls-files 'standardize-git-ls-files
9665 (lambda _
9666 (substitute* "ruby_memcheck.gemspec"
9667 (("%x\\(git ls-files -z)")
9668 "`git ls-files -z`")))))))
9669 (native-inputs (list ruby-rake-compiler ruby-rspec))
9670 (inputs (list valgrind/interactive))
9671 (propagated-inputs (list ruby-nokogiri))
9672 (synopsis "Valgrind memcheck tool for Ruby")
9673 (description "The @code{ruby_memcheck} gem provides a sane way to use
9674Valgrind's memcheck on your native extension gem, that filters out all the
9675false positives caused by Ruby not freeing all of the memory it allocates
9676during shutdown.")
9677 (home-page "https://github.com/Shopify/ruby_memcheck")
9678 (license license:expat)))
9679
9680(define-public ruby-memory-profiler
9681 (package
9682 (name "ruby-memory-profiler")
9683 (version "1.0.1")
9684 (source
9685 (origin
9686 (method git-fetch)
9687 (uri (git-reference
9688 (url "https://github.com/SamSaffron/memory_profiler")
9689 (commit (string-append "v" version))))
9690 (file-name (git-file-name name version))
9691 (sha256
9692 (base32
9693 "1z1x0rymfv45gh1y3s46w5pga5y8cvgn228jiwlnhc8hin3zig84"))))
9694 (build-system ruby-build-system)
9695 (synopsis "Memory profiling routines for Ruby")
9696 (description
9697 "This package provides memory profiling routines for Ruby.")
9698 (home-page "https://github.com/SamSaffron/memory_profiler")
9699 (license license:expat)))
9700
9701(define-public ruby-cucumber-compatibility-kit
9702 (package
9703 (name "ruby-cucumber-compatibility-kit")
9704 (version "11.2.0")
9705 (source (origin
9706 (method url-fetch)
9707 (uri (rubygems-uri "cucumber-compatibility-kit" version))
9708 (sha256
9709 (base32
9710 "17c8zx0yn68rcpfbw4nb1gzvh9fzpwsi1y0qivb99ahdlgzcdp8q"))))
9711 (build-system ruby-build-system)
9712 (arguments (list #:phases #~(modify-phases %standard-phases
9713 (replace 'check
9714 (lambda* (#:key tests? #:allow-other-keys)
9715 (when tests?
9716 (invoke "rspec")))))))
9717 (propagated-inputs (list ruby-cucumber-messages ruby-rake ruby-rspec))
9718 (synopsis "Cucumber compatibility verification utility")
9719 (description "The Cucumber Compatibility Kit (CCK) aims to validate a
9720Cucumber implementation's support for the Cucumber Messages protocol.")
9721 (home-page "https://github.com/cucumber/compatibility-kit")
9722 (license license:expat)))
9723
9724;;; Variant package to break a cycle with ruby-cucumber-messages.
9725(define ruby-cucumber-compatibility-kit-bootstrap
9726 (package/inherit ruby-cucumber-compatibility-kit
9727 (arguments (list #:tests? #f))
9728 (propagated-inputs (modify-inputs (package-propagated-inputs
9729 ruby-cucumber-compatibility-kit)
9730 (delete "ruby-cucumber-messages")))))
9731
9732(define-public ruby-cucumber-messages
9733 (package
9734 (name "ruby-cucumber-messages")
9735 (version "21.0.1")
9736 (source (origin
9737 (method url-fetch)
9738 (uri (rubygems-uri "cucumber-messages" version))
9739 (sha256
9740 (base32
9741 "0482a63y7my0arn2bv208g401dq8525f0gwhnwaa11mhv6ph0q5i"))))
9742 (build-system ruby-build-system)
9743 (arguments
9744 (list #:phases
9745 #~(modify-phases %standard-phases
9746 ;; The test suite requires the gem to be installed, so move it
9747 ;; after the install phase.
9748 (delete 'check)
9749 (add-after 'install 'check
9750 (lambda* (#:key tests? #:allow-other-keys)
9751 (setenv "GEM_PATH" (string-append
9752 (getenv "GEM_PATH") ":"
9753 #$output "/lib/ruby/vendor_ruby"))
9754 (when tests?
9755 (invoke "rspec")))))))
9756 (native-inputs
9757 (list ruby-cucumber-compatibility-kit-bootstrap ruby-rspec))
9758 (home-page "https://github.com/cucumber/messages/")
9759 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
9760 (description "Cucumber Messages for Ruby is a library which allows
9761serialization and deserialization of the protocol buffer messages used in
9762Cucumber.")
9763 (license license:expat)))
9764
9765(define-public ruby-cucumber-gherkin
9766 (package
9767 (name "ruby-cucumber-gherkin")
9768 (version "26.1.0")
9769 (source (origin
9770 (method git-fetch)
9771 (uri (git-reference
9772 (url "https://github.com/cucumber/gherkin")
9773 (commit (string-append "v" version))))
9774 (file-name (git-file-name name version))
9775 (sha256
9776 (base32
9777 "1rsannfcg5rqh5a3d3paw10kf6mmqjrgbq3k235px4swbyqysmgn"))))
9778 (build-system ruby-build-system)
9779 (arguments (list #:test-target "spec"
9780 #:phases #~(modify-phases %standard-phases
9781 (add-after 'unpack 'chdir
9782 (lambda _
9783 (chdir "ruby"))))))
9784 (native-inputs (list ruby-rspec))
9785 (propagated-inputs (list ruby-cucumber-messages))
9786 (synopsis "Gherkin parser for Ruby")
9787 (description "Gherkin is a parser and compiler for the Gherkin language.
9788It is intended be used by all Cucumber implementations to parse
9789@file{.feature} files.")
9790 (home-page "https://github.com/cucumber/gherkin")
9791 (license license:expat)))
9792
9793(define-deprecated ruby-gherkin ruby-cucumber-gherkin)
9794
9795(define-public ruby-gherkin-ruby
9796 (package
9797 (name "ruby-gherkin-ruby")
9798 (version "0.3.2")
9799 (home-page "https://github.com/codegram/gherkin-ruby")
9800 (source (origin
9801 (method url-fetch)
9802 (uri (rubygems-uri "gherkin-ruby" version))
9803 (sha256
9804 (base32
9805 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
9806 (build-system ruby-build-system)
9807 (synopsis "Pure Ruby Gherkin parser")
9808 (description
9809 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
9810200 lines of code.")
9811 ;; XXX: No license information anywhere but Readme.md.
9812 (license license:expat)))
9813
9814(define-public ruby-aruba
9815 (package
9816 (name "ruby-aruba")
9817 (version "2.1.0")
9818 (source (origin
9819 (method git-fetch)
9820 (uri (git-reference
9821 (url "https://github.com/cucumber/aruba")
9822 (commit (string-append "v" version))))
9823 (file-name (git-file-name name version))
9824 (sha256
9825 (base32
9826 "1mmlgqhi6yww3z34hmrrnha2rygkv6kx0q962z31dqxjkcv23yfd"))))
9827 (build-system ruby-build-system)
9828 (arguments
9829 (list
9830 ;; XXX: Only run the "spec" target and not the "cucumber" one, as it is
9831 ;; slow and has multiple unexplained test failures.
9832 #:test-target "spec"
9833 #:phases
9834 #~(modify-phases %standard-phases
9835 (add-after 'unpack 'patch-paths
9836 (lambda _
9837 ;; This test file relies on a dynamically generated script;
9838 ;; patch its #!/bin/bash shebang.
9839 (substitute* "spec/aruba/api/commands_spec.rb"
9840 (("/bin/bash")
9841 (which "bash")))))
9842 (add-before 'check 'relax-requirements
9843 ;; Many development requirements are not actually needed.
9844 (lambda _
9845 (substitute* "aruba.gemspec"
9846 (("\\[\">= 0.18.0\", \"< 0.22.0\"]") ;simplecov
9847 "\">= 0.18.0\"")
9848 ((".*appraisal.*") "")
9849 ((".*pry.*") "")
9850 ((".*kramdown.*") "")
9851 ((".*rubocop.*") "")
9852 ((".*yard-junk.*") ""))
9853 (substitute* "Rakefile"
9854 ((".*require \"rubocop/rake_task\".*") "")
9855 ((".*require \"yard-junk/rake\".*") "")
9856 ((".*RuboCop::RakeTask.new.*") "")
9857 ((".*YardJunk::Rake.define_task.*") ""))))
9858 ;; The tests rely on the Gem being installed, so move the check
9859 ;; phase after the install phase.
9860 (delete 'check)
9861 (add-after 'install 'check
9862 (assoc-ref %standard-phases 'check))
9863 (add-before 'check 'set-GEM_PATH
9864 (lambda _
9865 (setenv "GEM_PATH" (string-append
9866 (getenv "GEM_PATH") ":"
9867 #$output "/lib/ruby/vendor_ruby"))))
9868 (add-before 'check 'set-home
9869 (lambda _
9870 (setenv "HOME" "/tmp"))))))
9871 (native-inputs
9872 (list ruby-rake-manifest
9873 ruby-rspec
9874 ruby-simplecov))
9875 (propagated-inputs
9876 (list bundler
9877 ruby-childprocess
9878 ruby-contracts
9879 ruby-cucumber
9880 ruby-rspec-expectations
9881 ruby-thor))
9882 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
9883 (description
9884 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
9885command-line applications. It supports applications written in any
9886language.")
9887 (home-page "https://github.com/cucumber/aruba")
9888 (license license:expat)))
9889
9890(define-public ruby-sys-uname
9891 (package
9892 (name "ruby-sys-uname")
9893 (version "1.2.1")
9894 (source
9895 (origin
9896 (method url-fetch)
9897 (uri (rubygems-uri "sys-uname" version))
9898 (sha256
9899 (base32
9900 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
9901 (build-system ruby-build-system)
9902 (arguments
9903 `(#:test-target "spec"))
9904 (propagated-inputs (list ruby-ffi))
9905 (native-inputs (list ruby-rspec))
9906 (synopsis "Ruby interface for gathering system information")
9907 (description "The sys-uname library provides an interface for gathering
9908information about your current platform. It allows retrieving information
9909such as the OS name, OS version, system name, etc.")
9910 (home-page "https://github.com/djberg96/sys-uname")
9911 (license license:asl2.0)))
9912
9913(define-public ruby-cucumber-html-formatter
9914 (package
9915 (name "ruby-cucumber-html-formatter")
9916 (version "20.2.1")
9917 (source
9918 (origin
9919 (method url-fetch)
9920 (uri (rubygems-uri "cucumber-html-formatter" version))
9921 (sha256
9922 (base32
9923 "0c7r9mfmph4c6yzc7y3dkr92rhwvpyksr0mdhpqp67xmmr8z1br4"))))
9924 (build-system ruby-build-system)
9925 (arguments
9926 (list #:phases #~(modify-phases %standard-phases
9927 (add-after 'extract-gemspec 'relax-requirements
9928 (lambda _
9929 (substitute* ".gemspec"
9930 (("~> 18.0") "~> 21.0")))) ;cucumber-messages
9931 (replace 'check
9932 (lambda* (#:key tests? #:allow-other-keys)
9933 (when tests?
9934 (invoke "rspec")))))))
9935 (native-inputs (list ruby-cucumber-compatibility-kit ruby-rspec))
9936 (propagated-inputs (list ruby-cucumber-messages))
9937 (synopsis "HTML formatter for Cucumber")
9938 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
9939runs. It is built on top of cucumber-react and works with any Cucumber
9940implementation with a protocol buffer formatter that outputs Cucumber
9941messages.")
9942 (home-page "https://github.com/cucumber/html-formatter")
9943 (license license:expat)))
9944
9945(define-public ruby-cucumber-ci-environment
9946 (package
9947 (name "ruby-cucumber-ci-environment")
9948 (version "9.1.0")
9949 (source (origin
9950 (method url-fetch)
9951 (uri (rubygems-uri "cucumber-ci-environment" version))
9952 (sha256
9953 (base32
9954 "1nmn2hfrjlbazgcryr3hwvsa5v4csfbjqxb4q7wbjhaxl9xxn0k7"))))
9955 (build-system ruby-build-system)
9956 (arguments (list #:phases #~(modify-phases %standard-phases
9957 (replace 'check
9958 (lambda* (#:key tests? #:allow-other-keys)
9959 (when tests?
9960 (invoke "rspec")))))))
9961 (native-inputs (list ruby-rspec))
9962 (synopsis "Detect CI Environment from environment variables")
9963 (description "This is a Ruby utility library for Cucumber that detects a
9964CI environment from environment variables.")
9965 (home-page "https://github.com/cucumber/ci-environment")
9966 (license license:expat)))
9967
9968(define-public ruby-cucumber
9969 (package
9970 (name "ruby-cucumber")
9971 (version "8.0.0")
9972 (source
9973 (origin
9974 (method git-fetch)
9975 (uri (git-reference
9976 (url "https://github.com/cucumber/cucumber-ruby")
9977 (commit (string-append "v" version))))
9978 (file-name (git-file-name name version))
9979 (sha256
9980 (base32
9981 "1dz880fdz6rfbh1nwwcq21v65byik46jnf9gppnrqf3p5k61i55r"))))
9982 (build-system ruby-build-system)
9983 (arguments
9984 (list #:test-target "spec"
9985 #:phases
9986 #~(modify-phases %standard-phases
9987 (add-after 'unpack 'disable-rubocop
9988 ;; Remove extraneous Lint checks.
9989 (lambda _
9990 (substitute* "Rakefile"
9991 (("require 'rubocop/rake_task'")
9992 "")
9993 (("RuboCop::RakeTask.new")
9994 ""))))
9995 (add-after 'extract-gemspec 'strip-version-requirements
9996 (lambda _
9997 (delete-file "Gemfile") ;do not use Bundler
9998 (substitute* "cucumber.gemspec"
9999 ;; The dependency specifications are often trailing
10000 ;; behind and appear stricter than necessary, since the
10001 ;; test suite passes with the newer component versions.
10002 (("(.*add_.*dependency '[_A-Za-z0-9-]+')(.*)"
10003 _ stripped rest)
10004 (string-append stripped " # " rest "\n")))))
10005 (add-before 'check 'set-home
10006 (lambda _
10007 (setenv "HOME" (getcwd)))))))
10008 (propagated-inputs
10009 (list ruby-builder
10010 ruby-cucumber-ci-environment
10011 ruby-cucumber-core
10012 ruby-cucumber-gherkin
10013 ruby-cucumber-html-formatter
10014 ruby-cucumber-messages
10015 ruby-cucumber-wire
10016 ruby-diff-lcs
10017 ruby-mime-types
10018 ruby-multi-test
10019 ruby-sys-uname))
10020 (native-inputs
10021 (list ruby-cucumber-compatibility-kit
10022 ruby-nokogiri
10023 ruby-pry
10024 ruby-webrick
10025 ruby-rspec))
10026 (synopsis "Describe automated tests in plain language")
10027 (description "Cucumber is a tool for running automated tests written in
10028plain language. It's designed to support a Behaviour Driven Development (BDD)
10029software development workflow.")
10030 (home-page "https://cucumber.io/")
10031 (license license:expat)))
10032
10033(define ruby-cucumber-without-tests
10034 (package (inherit ruby-cucumber)
10035 (arguments
10036 '(#:tests? #f))
10037 (native-inputs
10038 '())))
10039
10040(define-public ruby-covered
10041 (package
10042 (name "ruby-covered")
10043 (version "0.20.2")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (rubygems-uri "covered" version))
10047 (sha256
10048 (base32
10049 "04fpj493jn23ah5fq93956a5h2xj3z0hrckvc26fxcfsg5pbwypa"))))
10050 (build-system ruby-build-system)
10051 (arguments
10052 ;; XXX: The test suite is disabled to avoid dependency cycles with
10053 ;; ruby-samovar, through ruby-bake.
10054 (list #:tests? #f
10055 #:phases
10056 #~(modify-phases %standard-phases
10057 (add-after 'extract-gemspec 'relax-requirements
10058 (lambda _
10059 (substitute* ".gemspec"
10060 (("\">= 3.2\"")
10061 "\">= 2.7\"")))))))
10062 (propagated-inputs (list ruby-console ruby-msgpack))
10063 (synopsis "Modern approach to code coverage in Ruby")
10064 (description "Covered uses modern Ruby features to generate comprehensive
10065coverage, including support for templates which are compiled into Ruby. It
10066has the following features:
10067@itemize
10068@item
10069Incremental coverage -- if you run your full test suite, and the run a subset,
10070it will still report the correct coverage - so you can incrementally work on
10071improving coverage.
10072@item
10073Integration with RSpec, Minitest, Travis & Coveralls - no need to configure
10074anything - out of the box support for these platforms.
10075@item
10076It supports coverage of views -- templates compiled to Ruby code can be
10077tracked for coverage reporting.
10078@end itemize")
10079 (home-page "https://github.com/ioquatix/covered")
10080 (license license:expat)))
10081
10082(define-public ruby-coveralls
10083 (package
10084 (name "ruby-coveralls")
10085 (version "0.8.23")
10086 (source
10087 (origin
10088 (method url-fetch)
10089 (uri (rubygems-uri "coveralls" version))
10090 (sha256
10091 (base32
10092 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
10093 (build-system ruby-build-system)
10094 (arguments
10095 (list #:test-target "default"
10096 #:phases #~(modify-phases %standard-phases
10097 (add-after 'extract-gemspec 'disable-problematic-tests
10098 (lambda _
10099 (substitute* "spec/coveralls/coveralls_spec.rb"
10100 ;; This test fails for unknown reasons (perhaps
10101 ;; networking); skip it.
10102 (("it \"sends existing test results\"" all)
10103 (string-append "x" all)))
10104 ;; 3 simplecov tests fail, perhaps due to using a
10105 ;; newer simplecov version.
10106 (delete-file "spec/coveralls/simplecov_spec.rb")
10107 (substitute* "coveralls-ruby.gemspec"
10108 (("\"spec/coveralls/simplecov_spec.rb\".freeze, ")
10109 ""))))
10110 (add-after 'extract-gemspec 'relax-requirements
10111 (lambda _
10112 (substitute* "coveralls-ruby.gemspec"
10113 (("%q<simplecov>.freeze, \\[\"~> 0.16.1\"]")
10114 "%q<simplecov>.freeze")))))))
10115 (native-inputs
10116 (list git-minimal/pinned
10117 ruby-pry
10118 ruby-rspec
10119 ruby-truthy
10120 ruby-vcr-expat
10121 ruby-webmock))
10122 (propagated-inputs
10123 (list ruby-json
10124 ruby-term-ansicolor
10125 ruby-thor
10126 ruby-tins
10127 ruby-simplecov))
10128 (synopsis "Ruby implementation of the Coveralls API")
10129 (description "This package provides a Ruby implementation of the Coveralls
10130API.")
10131 (home-page "https://coveralls.io")
10132 (license license:expat)))
10133
10134(define-public ruby-unindent
10135 (package
10136 (name "ruby-unindent")
10137 (version "1.0")
10138 (source
10139 (origin
10140 (method url-fetch)
10141 (uri (rubygems-uri "unindent" version))
10142 (sha256
10143 (base32
10144 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
10145 (build-system ruby-build-system)
10146 (synopsis "Ruby method to unindent strings")
10147 (description "This module provides a @code{String#unindent} Ruby method to
10148unindent strings, which can be useful to unindent multiline strings embedded
10149in already-indented code.")
10150 (home-page "https://github.com/mynyml/unindent")
10151 (license license:expat)))
10152
10153(define-public ruby-cucumber-core
10154 (package
10155 (name "ruby-cucumber-core")
10156 (version "11.1.0")
10157 (source
10158 (origin
10159 (method git-fetch)
10160 (uri (git-reference
10161 (url "https://github.com/cucumber/cucumber-ruby-core")
10162 (commit (string-append "v" version))))
10163 (file-name (git-file-name name version))
10164 (sha256
10165 (base32
10166 "0lf2inlam0951djc2qz81x0nkffmw2dpj44iadw1fw31m7r8wqvh"))))
10167 (build-system ruby-build-system)
10168 (arguments (list #:test-target "spec"
10169 #:phases
10170 #~(modify-phases %standard-phases
10171 (add-after 'extract-gemspec 'relax-version-requirements
10172 (lambda _
10173 (substitute* "cucumber-core.gemspec"
10174 (("'cucumber-tag-expressions',.*")
10175 "'cucumber-tag-expressions', '>=4.1.0'\n")))))))
10176 (native-inputs
10177 (list ruby-rspec
10178 ruby-coveralls
10179 ruby-rubocop
10180 ruby-simplecov
10181 ruby-unindent))
10182 (propagated-inputs
10183 (list ruby-cucumber-gherkin
10184 ruby-cucumber-messages
10185 ruby-cucumber-tag-expressions))
10186 (synopsis "Core library for the Cucumber BDD app")
10187 (description "Cucumber is a tool for running automated tests
10188written in plain language. Because they're written in plain language,
10189they can be read by anyone on your team. Because they can be read by
10190anyone, you can use them to help improve communication, collaboration
10191and trust on your team.")
10192 (home-page "https://cucumber.io/")
10193 (license license:expat)))
10194
10195(define-public ruby-cucumber-expressions
10196 (package
10197 (name "ruby-cucumber-expressions")
10198 (version "16.1.2")
10199 (source
10200 (origin
10201 (method git-fetch)
10202 (uri (git-reference
10203 (url "https://github.com/cucumber/cucumber-expressions")
10204 (commit (string-append "v" version))))
10205 (file-name (git-file-name name version))
10206 (sha256
10207 (base32
10208 "1dhq88k9x2x8svam5bc7rrcd166fqymda8wxryqkbkffhnzla0id"))))
10209 (build-system ruby-build-system)
10210 (arguments
10211 (list #:test-target "spec"
10212 #:phases #~(modify-phases %standard-phases
10213 (add-after 'unpack 'chdir
10214 (lambda _
10215 (chdir "ruby"))))))
10216 (native-inputs (list ruby-rspec ruby-simplecov))
10217 (synopsis "Simpler alternative to Regular Expressions")
10218 (description "Cucumber Expressions offer similar functionality to Regular
10219Expressions, with a syntax that is easier to read and write. Cucumber
10220Expressions are extensible with parameter types.")
10221 (home-page "https://github.com/cucumber/cucumber-expressions/")
10222 (license license:expat)))
10223
10224(define-public ruby-cucumber-wire
10225 (package
10226 (name "ruby-cucumber-wire")
10227 (version "6.2.1")
10228 (source
10229 (origin
10230 (method url-fetch)
10231 (uri (rubygems-uri "cucumber-wire" version))
10232 (sha256
10233 (base32
10234 "1pmydrh9lcckj7p0cn67jw7msxdkgr9zir86cs19h3mf2zlcv7b9"))))
10235 (build-system ruby-build-system)
10236 (arguments
10237 (list #:tests? #f)) ;tests use cucumber, causing a cycle
10238 (propagated-inputs
10239 (list ruby-cucumber-core ruby-cucumber-expressions
10240 ruby-cucumber-messages))
10241 (synopsis "Cucumber wire protocol plugin")
10242 (description "Cucumber's wire protocol allows step definitions to be
10243implemented and invoked on any platform.")
10244 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
10245 (license license:expat)))
10246
10247(define-public ruby-cucumber-tag-expressions
10248 (package
10249 (name "ruby-cucumber-tag-expressions")
10250 (version "5.0.1")
10251 (source
10252 (origin
10253 (method git-fetch)
10254 (uri (git-reference
10255 (url "https://github.com/cucumber/tag-expressions")
10256 (commit (string-append "v" version))))
10257 (file-name (git-file-name name version))
10258 (sha256
10259 (base32
10260 "1ziq30szn8m5y29hsdpx4dn1a8sy29h01nvcldm8nr1mx4b7dj1w"))))
10261 (build-system ruby-build-system)
10262 (arguments
10263 (list #:test-target "spec"
10264 #:phases #~(modify-phases %standard-phases
10265 (add-after 'unpack 'chdir
10266 (lambda _
10267 (chdir "ruby"))))))
10268 (native-inputs (list ruby-rspec))
10269 (synopsis "Cucumber tag expressions for Ruby")
10270 (description "Cucumber tag expression parser for Ruby. A tag expression
10271is an infix boolean expression used by Cucumber.")
10272 (home-page "https://github.com/cucumber/tag-expressions")
10273 (license license:expat)))
10274
10275(define-public ruby-skiptrace
10276 (package
10277 (name "ruby-skiptrace")
10278 (version "0.8.1")
10279 (source
10280 (origin
10281 (method url-fetch)
10282 (uri (rubygems-uri "skiptrace" version))
10283 (sha256
10284 (base32
10285 "1qpjy6pqd8hx4w7bai64jsr10mwbpnnb65wcbssyqcnalimi1s12"))))
10286 (build-system ruby-build-system)
10287 (arguments
10288 (list
10289 #:phases
10290 #~(modify-phases %standard-phases
10291 (add-after 'unpack 'remove-git-from-gemspec
10292 (lambda _
10293 (substitute* "skiptrace.gemspec"
10294 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
10295 (replace 'check
10296 (lambda* (#:key tests? #:allow-other-keys)
10297 (when tests?
10298 (invoke "bundle" "exec" "rake" "default")))))))
10299 (native-inputs
10300 (list bundler ruby-rake-compiler))
10301 (synopsis "Provides access for bindings relating to Ruby exceptions")
10302 (description
10303 "@code{skiptrace} provides a way to access the bindings that relate to
10304exceptions in Ruby, providing more information about the context in which the
10305exception occurred.")
10306 (home-page "https://github.com/gsamokovarov/skiptrace")
10307 (license license:expat)))
10308
10309(define-public ruby-bio-logger
10310 (package
10311 (name "ruby-bio-logger")
10312 (version "1.0.1")
10313 (source
10314 (origin
10315 (method url-fetch)
10316 (uri (rubygems-uri "bio-logger" version))
10317 (sha256
10318 (base32
10319 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
10320 (build-system ruby-build-system)
10321 (arguments
10322 `(#:tests? #f)) ; rake errors, missing shoulda
10323 (propagated-inputs
10324 (list ruby-log4r))
10325 (synopsis "Log4r wrapper for Ruby")
10326 (description "Bio-logger is a wrapper around Log4r adding extra logging
10327features such as filtering and fine grained logging.")
10328 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
10329 (license license:expat)))
10330
10331(define-public ruby-yajl-ruby
10332 (package
10333 (name "ruby-yajl-ruby")
10334 (version "1.4.3")
10335 (source
10336 (origin
10337 (method url-fetch)
10338 (uri (rubygems-uri "yajl-ruby" version))
10339 (sha256
10340 (base32
10341 "1lni4jbyrlph7sz8y49q84pb0sbj82lgwvnjnsiv01xf26f4v5wc"))))
10342 (build-system ruby-build-system)
10343 (arguments
10344 (list
10345 #:test-target "spec"
10346 #:phases
10347 #~(modify-phases %standard-phases
10348 (add-before 'check 'patch-test-to-update-load-path
10349 (lambda _
10350 (substitute* "spec/parsing/large_number_spec.rb"
10351 (("require \"yajl\"")
10352 "$LOAD_PATH << 'lib'; require 'yajl'")))))))
10353 (native-inputs
10354 (list ruby-rake-compiler ruby-rspec))
10355 (synopsis "Streaming JSON parsing and encoding library for Ruby")
10356 (description
10357 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
10358is compatible with the JSON gem, so yajl-ruby can act as a drop in
10359replacement.
10360
10361A modified copy of yajl is used, and included in the package.")
10362 (home-page "https://github.com/brianmario/yajl-ruby")
10363 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
10364 license:bsd-3)))) ; Included, modified copy of yajl
10365
10366(define-public ruby-yard
10367 (package
10368 (name "ruby-yard")
10369 (version "0.9.34")
10370 (source
10371 (origin
10372 (method git-fetch)
10373 ;; Tests do not pass if we build from the distributed gem.
10374 (uri (git-reference
10375 (url "https://github.com/lsegal/yard")
10376 (commit (string-append "v" version))))
10377 (file-name (git-file-name name version))
10378 (sha256
10379 (base32
10380 "10jq0hyzyy0d6l63jxld32g36fhrclkb3rwnyp47igcik73kbagb"))))
10381 (build-system ruby-build-system)
10382 (arguments
10383 (list
10384 #:test-target "default"
10385 #:phases
10386 #~(modify-phases %standard-phases
10387 (add-after 'unpack 'do-not-set-date-in-gemspec
10388 ;; Fix a reproducibility issue (see:
10389 ;; https://github.com/lsegal/yard/issues/1343).
10390 (lambda _
10391 (substitute* "yard.gemspec"
10392 ((".*s\\.date.*") ""))))
10393 (add-before 'check 'prepare-for-tests
10394 (lambda* (#:key tests? #:allow-other-keys)
10395 (when tests?
10396 (substitute* "Rakefile"
10397 ((".*[Ss]amus.*") ""))
10398 ;; Delete the Gemfile to avoid errors relating to it.
10399 (delete-file "Gemfile")
10400 ;; $HOME needs to be set to somewhere writeable for tests to
10401 ;; run.
10402 (setenv "HOME" "/tmp")
10403 ;; This test fails
10404 ;; #<File (class)> received :open with unexpected arguments
10405 ;; expected: ("gem1.gem", "rb")
10406 ;; got: ("/gnu/store/.../lib/ruby/vendor_ruby/specifications/asciidoctor-2.0.18.gemspec", "r:UTF-8:-")
10407 (substitute* "spec/cli/diff_spec.rb"
10408 (("it \"searches for .gem file")
10409 "xit \"searches for .gem file"))))))))
10410 (native-inputs
10411 (list ruby-rspec
10412 ruby-rack
10413 ruby-redcloth
10414 ruby-webrick
10415 ruby-asciidoctor/minimal))
10416 (synopsis "Documentation generation tool for Ruby")
10417 (description "YARD is a documentation generation tool for the Ruby
10418programming language. It enables the user to generate consistent, usable
10419documentation that can be exported to a number of formats very easily, and
10420also supports extending for custom Ruby constructs such as custom class level
10421definitions.")
10422 (home-page "https://yardoc.org")
10423 (license license:expat)))
10424
10425(define-public ruby-yard/minimal
10426 (hidden-package
10427 (package
10428 (inherit ruby-yard)
10429 (arguments
10430 (ensure-keyword-arguments
10431 (package-arguments ruby-yard)
10432 (list #:tests? #f)))
10433 (native-inputs '()))))
10434
10435(define-public ruby-spectroscope
10436 (package
10437 (name "ruby-spectroscope")
10438 (version "0.1.0")
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (rubygems-uri "spectroscope" version))
10443 (sha256
10444 (base32
10445 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
10446 (build-system ruby-build-system)
10447 (arguments
10448 `(#:phases
10449 (modify-phases %standard-phases
10450 (replace 'check
10451 (lambda _
10452 (with-output-to-file ".test"
10453 (lambda _
10454 (display
10455 "\
10456require 'ae/should'
10457require 'rspec'
10458
10459include RSpec
10460
10461Test.run :default do |run|
10462 run.files << 'spec/*_spec.rb'
10463end")))
10464 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
10465 (native-inputs
10466 (list ruby-ae ruby-rspec))
10467 (propagated-inputs
10468 (list ruby-rubytest))
10469 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
10470 (description "Spectroscope is a Behavior-Driven Development (BDD)
10471framework built on RubyTest, designed to emulate RSpec in most respects. It
10472is assertion framework independent so any number of assertion systems can be
10473used, such as Assay or AE.")
10474 (home-page "http://rubyworks.github.com/spectroscope/")
10475 (license license:bsd-2)))
10476
10477(define-public ruby-tomparse
10478 (package
10479 (name "ruby-tomparse")
10480 (version "0.4.2")
10481 (source
10482 (origin
10483 (method url-fetch)
10484 (uri (rubygems-uri "tomparse" version))
10485 (sha256
10486 (base32
10487 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
10488 (build-system ruby-build-system)
10489 ;; TODO: Tests require citron and rulebow, not yet packaged.
10490 (arguments '(#:tests? #f))
10491 (synopsis "TomDoc parser for Ruby")
10492 (description "TomParse is a TomDoc parser for Ruby. It takes a code
10493comment as input and parses it into a convenient object-oriented structure in
10494accordance with the TomDoc standard. See
10495@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
10496TomDoc format.")
10497 (home-page "http://rubyworks.github.com/tomparse/")
10498 (license license:bsd-2)))
10499
10500(define-public ruby-yard-tomdoc
10501 (package
10502 (name "ruby-yard-tomdoc")
10503 (version "0.7.1")
10504 (source
10505 (origin
10506 (method url-fetch)
10507 (uri (rubygems-uri "yard-tomdoc" version))
10508 (sha256
10509 (base32
10510 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
10511 (build-system ruby-build-system)
10512 (arguments
10513 `(#:phases (modify-phases %standard-phases
10514 (replace 'check
10515 (lambda _
10516 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
10517 (native-inputs
10518 (list ruby-rubytest-cli ruby-spectroscope ruby-ae))
10519 (propagated-inputs
10520 (list ruby-tomparse ruby-yard))
10521 (synopsis "TomDoc syntax for YARD")
10522 (description "This module adds support for the TomDoc documentation format
10523to YARD, a documentation generation tool for Ruby.")
10524 (home-page "http://rubyworks.github.com/yard-tomdoc/")
10525 (license license:expat)))
10526
10527(define-public ruby-clap
10528 (package
10529 (name "ruby-clap")
10530 (version "1.0.0")
10531 (source (origin
10532 (method url-fetch)
10533 (uri (rubygems-uri "clap" version))
10534 (sha256
10535 (base32
10536 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
10537 (build-system ruby-build-system)
10538 ;; Clap needs cutest for running tests, but cutest needs clap.
10539 (arguments `(#:tests? #f))
10540 (synopsis "Command line argument parsing for simple applications")
10541 (description
10542 "Clap provides command line argument parsing features. It covers the
10543simple case of executing code based on the flags or parameters passed.")
10544 (home-page "https://github.com/djanowski/cutest")
10545 (license license:expat)))
10546
10547(define-public ruby-cutest
10548 (package
10549 (name "ruby-cutest")
10550 (version "1.2.2")
10551 (source (origin
10552 (method url-fetch)
10553 (uri (rubygems-uri "cutest" version))
10554 (sha256
10555 (base32
10556 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
10557 (build-system ruby-build-system)
10558 (propagated-inputs
10559 (list ruby-clap))
10560 (synopsis "Run tests in separate processes")
10561 (description
10562 "Cutest runs tests in separate processes to avoid shared state.")
10563 (home-page "https://github.com/djanowski/cutest")
10564 (license license:expat)))
10565
10566(define-public ruby-pygmentize
10567 (package
10568 (name "ruby-pygmentize")
10569 (version "0.0.3")
10570 (source (origin
10571 (method url-fetch)
10572 (uri (rubygems-uri "pygmentize" version))
10573 (sha256
10574 (base32
10575 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
10576 (build-system ruby-build-system)
10577 (arguments
10578 `(#:phases
10579 (modify-phases %standard-phases
10580 (add-after 'unpack 'fix-pygmentize-path
10581 (lambda _
10582 (substitute* "lib/pygmentize.rb"
10583 (("\"/usr/bin/env python.*")
10584 (string-append "\"" (which "pygmentize") "\"\n")))
10585 #t))
10586 (add-after 'build 'do-not-use-vendor-directory
10587 (lambda _
10588 ;; Remove bundled pygments sources
10589 ;; FIXME: ruby-build-system does not support snippets.
10590 (delete-file-recursively "vendor")
10591 (substitute* "pygmentize.gemspec"
10592 (("\"vendor/\\*\\*/\\*\",") ""))
10593 #t)))))
10594 (inputs
10595 `(("pygments" ,python-pygments)))
10596 (native-inputs
10597 (list ruby-cutest ruby-nokogiri))
10598 (synopsis "Thin Ruby wrapper around pygmentize")
10599 (description
10600 "Pygmentize provides a simple way to call pygmentize from within a Ruby
10601application.")
10602 (home-page "https://github.com/djanowski/pygmentize")
10603 (license license:expat)))
10604
10605(define-public ruby-event-emitter
10606 (package
10607 (name "ruby-event-emitter")
10608 (version "0.2.6")
10609 (source (origin
10610 (method url-fetch)
10611 (uri (rubygems-uri "event_emitter" version))
10612 (sha256
10613 (base32
10614 "148k9qv8102l3m6klc24dwip79f9y4bjr5z19dckd7ffbjyrf9n7"))))
10615 (build-system ruby-build-system)
10616 (arguments
10617 (list #:phases #~(modify-phases %standard-phases
10618 (add-after 'extract-gemspec 'relax-requirements
10619 (lambda _
10620 (substitute* "event_emitter.gemspec"
10621 (("~> 1.15") ">= 1.15")))))))
10622 (synopsis "Ruby port of EventEmitter from Node.js")
10623 (description
10624 "This package provides a Ruby port of EventEmitter from Node.js.")
10625 (home-page "https://shokai.github.io/event_emitter/")
10626 (license license:expat)))
10627
10628(define-public ruby-eventmachine
10629 (package
10630 (name "ruby-eventmachine")
10631 (version "1.2.7")
10632 (source
10633 (origin
10634 (method url-fetch)
10635 (uri (rubygems-uri "eventmachine" version))
10636 (sha256
10637 (base32
10638 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
10639 (build-system ruby-build-system)
10640 (arguments
10641 '(#:tests? #f)) ; test suite tries to connect to google.com
10642 (inputs
10643 (list openssl))
10644 (native-inputs
10645 (list ruby-rake-compiler))
10646 (synopsis "Single-threaded network event framework for Ruby")
10647 (description
10648 "EventMachine implements a single-threaded engine for arbitrary network
10649communications. EventMachine wraps all interactions with sockets, allowing
10650programs to concentrate on the implementation of network protocols. It can be
10651used to create both network servers and clients.")
10652 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
10653 (home-page "https://github.com/eventmachine/eventmachine")
10654 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
10655
10656(define-public ruby-ruby-engine
10657 (package
10658 (name "ruby-ruby-engine")
10659 (version "2.0.0")
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (rubygems-uri "ruby_engine" version))
10664 (sha256
10665 (base32
10666 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
10667 (build-system ruby-build-system)
10668 (arguments
10669 `(#:phases
10670 (modify-phases %standard-phases
10671 (add-after 'extract-gemspec 'clean-up
10672 (lambda _
10673 (delete-file "Gemfile.lock")
10674 (substitute* "ruby_engine.gemspec"
10675 ;; Remove unnecessary imports that would entail further
10676 ;; dependencies.
10677 ((".*<rdoc.*") "")
10678 ((".*<rubygems-tasks.*") "")
10679 ;; Remove extraneous .gem file
10680 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
10681 (("\"Gemfile.lock\".freeze, ") "")
10682 ;; Soften rake dependency
10683 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
10684 "%q<rake>.freeze, [\">= 10.0\"]")
10685 ;; Soften the rspec dependency
10686 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
10687 "%q<rspec>.freeze, [\">= 2.4\"]"))
10688 (substitute* "Rakefile"
10689 (("require 'rubygems/tasks'") "")
10690 (("Gem::Tasks.new") ""))
10691 ;; Remove extraneous .gem file that otherwise gets installed.
10692 (delete-file-recursively "pkg")
10693 #t)))))
10694 (native-inputs
10695 (list bundler ruby-rake ruby-rspec))
10696 (synopsis "Simplifies checking for Ruby implementation")
10697 (description
10698 "@code{ruby_engine} provides an RubyEngine class that can be used to
10699check which implementation of Ruby is in use. It can provide the interpreter
10700name and provides query methods such as @{RubyEngine.mri?}.")
10701 (home-page "https://github.com/janlelis/ruby_engine")
10702 (license license:expat)))
10703
10704(define-public ruby-turn
10705 (package
10706 (name "ruby-turn")
10707 (version "0.9.7")
10708 (source
10709 (origin
10710 (method url-fetch)
10711 (uri (rubygems-uri "turn" version))
10712 (sha256
10713 (base32
10714 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
10715 (build-system ruby-build-system)
10716 (arguments
10717 `(#:phases
10718 (modify-phases %standard-phases
10719 ;; Tests fail because turn changes its environment so can no longer
10720 ;; find test/unit. Instead simply test if the executable runs
10721 ;; without issue.
10722 (replace 'check
10723 (lambda _
10724 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
10725 (propagated-inputs
10726 (list ruby-ansi ruby-minitest-4))
10727 (synopsis "Alternate set of alternative runners for MiniTest")
10728 (description
10729 "TURN provides a set of alternative runners for MiniTest which are both
10730colorful and informative. TURN displays each test on a separate line with
10731failures being displayed immediately instead of at the end of the tests. Note
10732that TURN is no longer being maintained.")
10733 (home-page "https://rubygems.org/gems/turn")
10734 (license license:expat)))
10735
10736(define-public ruby-mimemagic
10737 (package
10738 (name "ruby-mimemagic")
10739 (version "0.3.3")
10740 (source
10741 (origin
10742 (method url-fetch)
10743 (uri (rubygems-uri "mimemagic" version))
10744 (sha256
10745 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
10746 (build-system ruby-build-system)
10747 (arguments
10748 '(#:phases
10749 (modify-phases %standard-phases
10750 ;; This phase breaks the tests, as it patches some of the test data.
10751 (delete 'patch-source-shebangs))))
10752 (native-inputs
10753 (list ruby-bacon))
10754 (synopsis "Ruby library for MIME detection by extension or content")
10755 (description
10756 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
10757extension or content, using the freedesktop.org.xml shared-mime-info
10758database.")
10759 (home-page "https://github.com/minad/mimemagic")
10760 (license license:expat)))
10761
10762(define-public ruby-mime-types-data
10763 (package
10764 (name "ruby-mime-types-data")
10765 (version "3.2016.0521")
10766 (source
10767 (origin
10768 (method url-fetch)
10769 (uri (rubygems-uri "mime-types-data" version))
10770 (sha256
10771 (base32
10772 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
10773 (build-system ruby-build-system)
10774 (native-inputs
10775 (list ruby-hoe))
10776 (synopsis "Registry for information about MIME media type definitions")
10777 (description
10778 "@code{mime-types-data} provides a registry for information about
10779Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
10780be used with the Ruby mime-types library or other software to determine
10781defined filename extensions for MIME types, or to use filename extensions to
10782look up the likely MIME type definitions.")
10783 (home-page "https://github.com/mime-types/mime-types-data/")
10784 (license license:expat)))
10785
10786(define-public ruby-mime-types
10787 (package
10788 (name "ruby-mime-types")
10789 (version "3.4.1")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (rubygems-uri "mime-types" version))
10794 (sha256
10795 (base32
10796 "0ipw892jbksbxxcrlx9g5ljq60qx47pm24ywgfbyjskbcl78pkvb"))))
10797 (build-system ruby-build-system)
10798 (propagated-inputs
10799 (list ruby-mime-types-data))
10800 (native-inputs
10801 (list ruby-hoe
10802 ruby-fivemat
10803 ruby-minitest-focus
10804 ruby-minitest-bonus-assertions
10805 ruby-minitest-hooks))
10806 (synopsis "Library and registry for MIME content type definitions")
10807 (description "The mime-types library provides a library and registry for
10808information about Multipurpose Internet Mail Extensions (MIME) content type
10809definitions. It can be used to determine defined filename extensions for MIME
10810types, or to use filename extensions to look up the likely MIME type
10811definitions.")
10812 (home-page "https://github.com/mime-types/ruby-mime-types")
10813 (license license:expat)))
10814
10815(define-public ruby-mini-mime
10816 (package
10817 (name "ruby-mini-mime")
10818 (version "1.1.2")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (rubygems-uri "mini_mime" version))
10823 (sha256
10824 (base32
10825 "0lbim375gw2dk6383qirz13hgdmxlan0vc5da2l072j3qw6fqjm5"))))
10826 (build-system ruby-build-system)
10827 (synopsis "Lightweight mime type lookup toy")
10828 (description "This package provides a lightweight mime type lookup toy.")
10829 (home-page "https://github.com/discourse/mini_mime")
10830 (license license:expat)))
10831
10832(define-public ruby-fileutils
10833 (package
10834 (name "ruby-fileutils")
10835 (version "1.7.0")
10836 (source (origin
10837 (method git-fetch) ;for tests
10838 (uri (git-reference
10839 (url "https://github.com/ruby/fileutils")
10840 (commit (string-append "v" version))))
10841 (file-name (git-file-name name version))
10842 (sha256
10843 (base32
10844 "0m68gaqclnc2wflilmrnr19kky2gr6fjf6k3yq02sf9scs281kid"))))
10845 (build-system ruby-build-system)
10846 (arguments
10847 (list
10848 #:phases
10849 #~(modify-phases %standard-phases
10850 (add-before 'check 'disable-problematic-tests
10851 (lambda _
10852 (substitute* "test/fileutils/test_fileutils.rb"
10853 ;; The 'test_chown' tests depends on /etc/groups, which
10854 ;; doesn't exist in the build environment.
10855 (("def test_chown.*" all)
10856 (string-append all " return true\n"))
10857 ;; The 'test_cp_r_dev' expects a RuntimeError to be raised
10858 ;; when copying a char device to a directory, but this is not
10859 ;; triggered in the build environment, for reasons unknown.
10860 (("def test_cp_r_dev.*" all)
10861 (string-append all " return true\n"))))))))
10862 (synopsis "Ruby utility libray to manipulate files")
10863 (description "The FileUtils Ruby library includes Several file utility
10864methods for copying, moving, removing, etc.")
10865 (home-page "https://github.com/ruby/fileutils")
10866 (license license:bsd-2)))
10867
10868(define-public ruby-fivemat
10869 (package
10870 (name "ruby-fivemat")
10871 (version "1.3.7")
10872 (source
10873 (origin
10874 (method url-fetch)
10875 (uri (rubygems-uri "fivemat" version))
10876 (sha256
10877 (base32
10878 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
10879 (build-system ruby-build-system)
10880 (arguments
10881 `(#:tests? #f)) ; no tests
10882 (synopsis "Each test file given its own line of dots")
10883 (description
10884 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
10885its own line of dots during testing. It aims to provide test output that is
10886neither too verbose nor too minimal.")
10887 (home-page "https://github.com/tpope/fivemat")
10888 (license license:expat)))
10889
10890(define-public ruby-sqlite3
10891 (package
10892 (name "ruby-sqlite3")
10893 (version "1.6.3")
10894 (source
10895 (origin
10896 (method git-fetch) ;for tests
10897 (uri (git-reference
10898 (url "https://github.com/sparklemotion/sqlite3-ruby")
10899 (commit (string-append "v" version))))
10900 (file-name (git-file-name name version))
10901 (sha256
10902 (base32
10903 "0ijj8z8fpk2lczydkxv71k250g5gd8ip8klsscxc9f16b01gh9qs"))))
10904 (build-system ruby-build-system)
10905 (arguments
10906 (list
10907 #:gem-flags #~(list "--" "--enable-system-libraries")
10908 #:phases
10909 #~(modify-phases %standard-phases
10910 (delete 'check)
10911 (add-after 'install 'check
10912 (lambda* (#:key tests? #:allow-other-keys)
10913 (when tests?
10914 (setenv "GEM_PATH"
10915 (string-append (getenv "GEM_PATH") ":"
10916 #$output "/lib/ruby/vendor_ruby"))
10917 (invoke "rake" "test")))))))
10918 (propagated-inputs
10919 (list ruby-mini-portile-2))
10920 (inputs
10921 (list sqlite))
10922 (native-inputs
10923 (list ruby-hoe
10924 ruby-ruby-memcheck
10925 ruby-rake-compiler
10926 ruby-rake-compiler-dock))
10927 (synopsis "Interface with SQLite3 databases")
10928 (description
10929 "This module allows Ruby programs to interface with the SQLite3 database
10930engine.")
10931 (home-page
10932 "https://github.com/sparklemotion/sqlite3-ruby")
10933 (license license:bsd-3)))
10934
10935(define-public ruby-shoulda-context
10936 (package
10937 (name "ruby-shoulda-context")
10938 (version "2.0.0")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (rubygems-uri "shoulda-context" version))
10943 (sha256
10944 (base32
10945 "0d1clcp92jv8756h09kbc55qiqncn666alx0s83za06q5hs4bpvs"))))
10946 (build-system ruby-build-system)
10947 (arguments
10948 `(#:phases
10949 (modify-phases %standard-phases
10950 (replace 'check
10951 (lambda* (#:key tests? #:allow-other-keys)
10952 (when tests?
10953 ;; Do not run tests to avoid circular dependence with rails.
10954 ;; Instead just import the library to test.
10955 (invoke "ruby" "-Ilib" "-r" "shoulda-context")))))))
10956 (synopsis "Test::Unit context framework extracted from Shoulda")
10957 (description
10958 "@code{shoulda-context} is the context framework extracted from Shoulda.
10959Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
10960context, setup, and should blocks combine to produce natural test method
10961names.")
10962 (home-page "https://github.com/thoughtbot/shoulda-context")
10963 (license license:expat)))
10964
10965(define-public ruby-shoulda-matchers
10966 (package
10967 (name "ruby-shoulda-matchers")
10968 (version "5.3.0")
10969 (source
10970 (origin
10971 (method url-fetch)
10972 (uri (rubygems-uri "shoulda-matchers" version))
10973 (sha256
10974 (base32
10975 "11igjgh16dl5pwqizdmclzlzpv7mbmnh8fx7m9b5kfsjhwxqdfpn"))))
10976 (build-system ruby-build-system)
10977 (arguments
10978 `(#:phases
10979 (modify-phases %standard-phases
10980 (replace 'check
10981 (lambda* (#:key tests? #:allow-other-keys)
10982 (when tests?
10983 ;; Do not run tests to avoid circular dependence with rails. Instead
10984 ;; just import the library to test.
10985 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
10986 (propagated-inputs
10987 (list ruby-activesupport))
10988 (synopsis "Collection of testing matchers extracted from Shoulda")
10989 (description
10990 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
10991test common Rails functionality. These tests would otherwise be much longer,
10992more complex, and error-prone.")
10993 (home-page "https://github.com/thoughtbot/shoulda-matchers")
10994 (license license:expat)))
10995
10996(define-public ruby-shoulda
10997 (package
10998 (name "ruby-shoulda")
10999 (version "4.0.0")
11000 (source
11001 (origin
11002 (method url-fetch)
11003 (uri (rubygems-uri "shoulda" version))
11004 (sha256
11005 (base32
11006 "02lww34kn1g6lidp4rx4rs6bqvirrzxlfw1y2wm11aif8f622xz6"))))
11007 (build-system ruby-build-system)
11008 (arguments
11009 `(#:phases
11010 (modify-phases %standard-phases
11011 (replace 'check
11012 (lambda* (#:key tests? #:allow-other-keys)
11013 (when tests?
11014 ;; Don't run tests to avoid circular dependence with rails.
11015 ;; Instead just import the library to test.
11016 (invoke "ruby" "-Ilib" "-r" "shoulda"))))
11017 (add-after 'extract-gemspec 'relax-requirements
11018 (lambda _
11019 (substitute* "shoulda.gemspec"
11020 ;; An older version of shoulda-matchers (4.0) is used, out of
11021 ;; little maintenance rather than because of an real
11022 ;; incompatibility (see:
11023 ;; https://github.com/thoughtbot/shoulda/issues/275).
11024 ((", \\[\"~> 4.0\"]") "")))))))
11025 (propagated-inputs
11026 (list ruby-shoulda-context ruby-shoulda-matchers))
11027 (synopsis "Context framework and matchers for testing")
11028 (description
11029 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
11030@code{shoulda-matchers} providing tools for writing tests.")
11031 (home-page "https://github.com/thoughtbot/shoulda")
11032 (license license:expat)))
11033
11034(define-public ruby-unf
11035 (package
11036 (name "ruby-unf")
11037 (version "0.1.4")
11038 (source
11039 (origin
11040 (method url-fetch)
11041 (uri (rubygems-uri "unf" version))
11042 (sha256
11043 (base32
11044 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
11045 (build-system ruby-build-system)
11046 (arguments
11047 `(#:phases
11048 (modify-phases %standard-phases
11049 (add-before 'check 'add-dependency-to-bundler
11050 (lambda _
11051 ;; test-unit is required but not provided by the bundler
11052 ;; environment. This is fixed in the upstream repository but fix
11053 ;; has not been released.
11054 (substitute* "Gemfile"
11055 (("^gemspec") "gem 'test-unit'\ngemspec"))
11056 #t)))))
11057 (propagated-inputs
11058 (list ruby-unf-ext))
11059 (native-inputs
11060 (list ruby-shoulda bundler ruby-test-unit))
11061 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
11062 (description
11063 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
11064support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
11065@code{java.text.Normalizer} on JRuby.")
11066 (home-page "https://github.com/knu/ruby-unf")
11067 (license license:bsd-2)))
11068
11069(define-public ruby-warden
11070 (package
11071 (name "ruby-warden")
11072 (version "1.2.8")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (rubygems-uri "warden" version))
11077 (sha256
11078 (base32
11079 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
11080 (build-system ruby-build-system)
11081 (arguments
11082 '(#:tests? #f)) ; No included tests
11083 (propagated-inputs
11084 (list ruby-rack))
11085 (synopsis "Rack middleware providing authentication")
11086 (description
11087 "Warden is a Rack-based middleware that provides a mechanism for
11088authentication in Ruby web applications.")
11089 (home-page "https://github.com/wardencommunity/warden")
11090 (license license:expat)))
11091
11092(define-public ruby-warden-oauth2
11093 (package
11094 (name "ruby-warden-oauth2")
11095 (version "0.0.1")
11096 (source
11097 (origin
11098 (method url-fetch)
11099 (uri (rubygems-uri "warden-oauth2" version))
11100 (sha256
11101 (base32
11102 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
11103 (build-system ruby-build-system)
11104 (arguments
11105 '(#:test-target "spec"
11106 #:phases
11107 (modify-phases %standard-phases
11108 (add-after 'unpack 'remove-unnecessary-dependencies
11109 (lambda _
11110 (substitute* "Gemfile"
11111 ;; All of these gems relate to development, and are unnecessary
11112 ;; when running the tests
11113 (("gem 'guard-bundler'") "")
11114 (("gem 'guard'") "")
11115 (("gem 'guard-rspec'") "")
11116 (("gem 'rb-fsevent'") "")
11117 (("gem 'pry'") "")
11118 (("gem 'growl'") ""))
11119 #t))
11120 ;; The test suite doesn't work with rspec@2, and this is incompatible
11121 ;; with the current version of Rake, so invoke Rspec directly
11122 (replace 'check
11123 (lambda* (#:key tests? #:allow-other-keys)
11124 (when tests?
11125 (invoke "bundle" "exec" "rspec"))
11126 #t)))))
11127 (propagated-inputs
11128 (list ruby-warden))
11129 (native-inputs
11130 (list bundler ruby-rspec-2 ruby-rack-test))
11131 (synopsis "OAuth 2.0 strategies for Warden")
11132 (description
11133 "This library extends Warden to support OAuth 2.0 authorized API
11134requests.")
11135 (home-page "https://github.com/opperator/warden-oauth2")
11136 (license license:expat)))
11137
11138(define-public ruby-webmock
11139 (package
11140 (name "ruby-webmock")
11141 (version "3.11.2")
11142 (source
11143 (origin
11144 (method url-fetch)
11145 (uri (rubygems-uri "webmock" version))
11146 (sha256
11147 (base32
11148 "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
11149 (build-system ruby-build-system)
11150 (native-inputs
11151 (list bundler ruby-rspec))
11152 (propagated-inputs
11153 (list ruby-addressable ruby-crack ruby-hashdiff))
11154 (synopsis "Allows stubbing and setting expectations on HTTP requests")
11155 (description
11156 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
11157requests. This is useful when testing software.")
11158 (home-page "https://github.com/bblimke/webmock")
11159 (license license:expat)))
11160
11161(define-public ruby-webmock-2
11162 (package
11163 (inherit ruby-webmock)
11164 (name "ruby-webmock")
11165 (version "2.3.2")
11166 (source
11167 (origin
11168 (method url-fetch)
11169 (uri (rubygems-uri "webmock" version))
11170 (sha256
11171 (base32
11172 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
11173
11174(define-public ruby-unicode-display-width
11175 (package
11176 (name "ruby-unicode-display-width")
11177 (version "2.4.2")
11178 (source
11179 (origin
11180 (method url-fetch)
11181 (uri (rubygems-uri "unicode-display_width" version))
11182 (sha256
11183 (base32
11184 "1gi82k102q7bkmfi7ggn9ciypn897ylln1jk9q67kjhr39fj043a"))))
11185 (build-system ruby-build-system)
11186 (arguments
11187 '(;; Test data not included.
11188 #:tests? #f))
11189 (synopsis "Determine the monospace display width of Ruby strings")
11190 (description
11191 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
11192display width of strings in Ruby.")
11193 (home-page "https://github.com/janlelis/unicode-display_width")
11194 (license license:expat)))
11195
11196;; There is another gem called 'ruby-version' so we use an underscore in this
11197;; name
11198(define-public ruby_version
11199 (package
11200 (name "ruby_version")
11201 (version "1.0.2")
11202 (source
11203 (origin
11204 (method url-fetch)
11205 (uri (rubygems-uri "ruby_version" version))
11206 (sha256
11207 (base32
11208 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
11209 (build-system ruby-build-system)
11210 (arguments
11211 `(#:phases
11212 (modify-phases %standard-phases
11213 (add-before 'check 'fix-dependencies
11214 (lambda _
11215 ;; Remove the Gemfile.lock, as we want to use Guix packages at
11216 ;; whatever versions.
11217 (delete-file "Gemfile.lock")
11218 ;; Remove the included gem files as they unnecessary.
11219 (delete-file-recursively "pkg/")
11220 ;; Accept any version of rake, rdoc and rspec
11221 (substitute* "ruby_version.gemspec"
11222 (("%q<rake.*") "%q<rake>)\n")
11223 (("%q<rdoc.*") "%q<rdoc>)\n")
11224 (("%q<rspec.*") "%q<rspec>)\n"))
11225 ;; Do not use bundler.
11226 (substitute* "Rakefile"
11227 (("Bundler\\.setup.*") "nil\n"))
11228 #t)))))
11229 (native-inputs
11230 (list ruby-rdoc ruby-rspec ruby-rubygems-tasks))
11231 (synopsis "Ruby library to help check the Ruby version")
11232 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
11233checking for the right Ruby version in software.")
11234 (home-page "https://github.com/janlelis/ruby_version")
11235 (license license:expat)))
11236
11237(define-public ruby-websocket-client-simple
11238 (package
11239 (name "ruby-websocket-client-simple")
11240 (version "0.6.1")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (rubygems-uri "websocket-client-simple" version))
11244 (sha256
11245 (base32
11246 "1ypl4xvlh5c99zbn20sifv7gv04zi20ly464vsgikfrpn5f37bid"))))
11247 (build-system ruby-build-system)
11248 (arguments (list #:test-target "default"))
11249 (native-inputs (list ruby-eventmachine ruby-websocket-eventmachine-server))
11250 (propagated-inputs (list ruby-event-emitter ruby-websocket))
11251 (synopsis "Simple WebSocket client for Ruby")
11252 (description "This package provides a simple WebSocket client for Ruby.")
11253 (home-page "https://github.com/ruby-jp/websocket-client-simple")
11254 (license license:expat)))
11255
11256(define-public ruby-websocket-eventmachine-base
11257 (package
11258 (name "ruby-websocket-eventmachine-base")
11259 (version "1.2.0")
11260 (source (origin
11261 (method url-fetch)
11262 (uri (rubygems-uri "websocket-eventmachine-base" version))
11263 (sha256
11264 (base32
11265 "0wiz61mcwgs3k21cdr5l9b4jpg29gl6mflfampww2v525yc3hr1r"))))
11266 (build-system ruby-build-system)
11267 (arguments
11268 (list #:tests? #f)) ;no test suite
11269 (propagated-inputs (list ruby-eventmachine ruby-websocket
11270 ruby-websocket-native))
11271 (synopsis "WebSocket base for Ruby client and server")
11272 (description "This package provides a WebSocket base for a Ruby client and
11273server.")
11274 (home-page "https://github.com/imanel/websocket-eventmachine-base")
11275 (license license:expat)))
11276
11277(define-public ruby-websocket-eventmachine-server
11278 (package
11279 (name "ruby-websocket-eventmachine-server")
11280 (version "1.0.1")
11281 (source (origin
11282 (method url-fetch)
11283 (uri (rubygems-uri "websocket-eventmachine-server" version))
11284 (sha256
11285 (base32
11286 "0iqpzc8s028nck1flqaj784gvyn64wy1h3svpa4y2847wklg8sms"))))
11287 (build-system ruby-build-system)
11288 ;; TODO: The test suite requires Autobahn, not yet packaged in Guix.
11289 (arguments (list #:tests? #f))
11290 (propagated-inputs (list ruby-websocket-eventmachine-base))
11291 (synopsis "WebSocket server for Ruby")
11292 (description "This package provides a WebSocket server for Ruby.")
11293 (home-page "https://github.com/imanel/websocket-eventmachine-server")
11294 (license license:expat)))
11295
11296(define-public ruby-websocket-native
11297 (package
11298 (name "ruby-websocket-native")
11299 (version "1.0.0")
11300 (source (origin
11301 (method url-fetch)
11302 (uri (rubygems-uri "websocket-native" version))
11303 (sha256
11304 (base32
11305 "1kgvd3gyzh7hk0ddzn85jrs4csxm54qnvla95ldyn6rzgfbjchdn"))))
11306 (build-system ruby-build-system)
11307 (arguments
11308 (list #:test-target "spec"
11309 #:phases #~(modify-phases %standard-phases
11310 (add-before 'check 'disable-problematic-tests
11311 (lambda _
11312 (substitute* "spec/websocket_spec.rb"
11313 (("it \"should have mask_native defined\"" all)
11314 (string-append "x" all)))))
11315 (add-after 'build 'compile
11316 (lambda _
11317 (invoke "rake" "compile"))))))
11318 (native-inputs (list ruby-rake-compiler ruby-rspec))
11319 (synopsis "Native Ruby extension for the WebSocket gem")
11320 (description "This package provides a native extension that can increase
11321performance by about 25% compared to the pure Ruby WebSocket implementation.")
11322 (home-page "https://github.com/imanel/websocket-ruby-native")
11323 (license license:expat)))
11324
11325(define-public ruby-websocket-driver
11326 (package
11327 (name "ruby-websocket-driver")
11328 (version "0.7.1")
11329 (source
11330 (origin
11331 (method url-fetch)
11332 (uri (rubygems-uri "websocket-driver" version))
11333 (sha256
11334 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
11335 (build-system ruby-build-system)
11336 (arguments
11337 '(#:tests? #f)) ; no included tests
11338 (propagated-inputs
11339 (list ruby-websocket-extensions))
11340 (synopsis "WebSocket protocol handler with pluggable I/O")
11341 (description
11342 "@code{websocket-driver} provides a complete implementation of the
11343WebSocket protocols that can be hooked up to any TCP library")
11344 (home-page "https://github.com/faye/websocket-driver-ruby")
11345 (license license:expat)))
11346
11347(define-public ruby-websocket-extensions
11348 (package
11349 (name "ruby-websocket-extensions")
11350 (version "0.1.3")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (rubygems-uri "websocket-extensions" version))
11355 (sha256
11356 (base32
11357 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
11358 (build-system ruby-build-system)
11359 (arguments
11360 '(;; No included tests
11361 #:tests? #f))
11362 (synopsis "Generic extension manager for WebSocket connections")
11363 (description
11364 "@code{websocket-extensions} provides a container for registering
11365extension plugins.")
11366 (home-page "https://github.com/faye/websocket-extensions-ruby")
11367 (license license:expat)))
11368
11369(define-public ruby-domain-name
11370 (package
11371 (name "ruby-domain-name")
11372 (version "0.5.20190701")
11373 (source
11374 (origin
11375 (method url-fetch)
11376 (uri (rubygems-uri "domain_name" version))
11377 (sha256
11378 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
11379 (build-system ruby-build-system)
11380 (arguments
11381 `(#:phases
11382 (modify-phases %standard-phases
11383 (add-before 'check 'fix-versions
11384 (lambda _
11385 ;; Fix NameError that appears to already be fixed upstream.
11386 (substitute* "Rakefile"
11387 (("DomainName::VERSION")
11388 "Bundler::GemHelper.gemspec.version"))
11389 ;; Loosen unnecessarily strict test-unit version specification.
11390 (substitute* "domain_name.gemspec"
11391 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
11392 #t)))))
11393 (propagated-inputs
11394 (list ruby-unf))
11395 (native-inputs
11396 (list ruby-shoulda bundler ruby-test-unit))
11397 (synopsis "Domain name manipulation library")
11398 (description
11399 "@code{domain_name} is a Domain name manipulation library. It parses a
11400domain name ready for extracting the registered domain and TLD (Top Level
11401Domain). It can also be used for cookie domain validation based on the Public
11402Suffix List.")
11403 (home-page "https://github.com/knu/ruby-domain_name")
11404 (license license:bsd-2)))
11405
11406(define-public ruby-dotenv
11407 (package
11408 (name "ruby-dotenv")
11409 (version "2.8.1")
11410 (source (origin
11411 (method git-fetch) ;for the tests
11412 (uri (git-reference
11413 (url "https://github.com/bkeepers/dotenv")
11414 (commit (string-append "v" version))))
11415 (file-name (git-file-name name version))
11416 (sha256
11417 (base32
11418 "0s1a71jxppa20fsm2rd1vym099ib48m039rmhggmz99hc3z1fvvr"))))
11419 (build-system ruby-build-system)
11420 (arguments
11421 (list
11422 #:test-target "spec"
11423 #:phases
11424 #~(modify-phases %standard-phases
11425 (add-after 'unpack 'do-not-build-dotenv-rails
11426 (lambda _
11427 ;; The repository includes the definitions of two packages,
11428 ;; 'dotenv' and 'dotenv-rails'. Since we want to package them
11429 ;; separately, remove the dotenv-rails and associated Rake
11430 ;; tasks.
11431 (delete-file "dotenv-rails.gemspec")
11432 (delete-file "spec/dotenv/rails_spec.rb")
11433 (substitute* "Rakefile"
11434 (("DotenvRailsGemHelper.install_tasks name: \"dotenv-rails\"")
11435 "")
11436 ((", \"dotenv-rails:.*\"")
11437 ""))))
11438 (replace 'replace-git-ls-files
11439 (lambda _
11440 (substitute* "dotenv.gemspec"
11441 (("`git ls-files README.md LICENSE lib bin \\| grep -v rails`")
11442 "`find README.md LICENSE lib bin -type f | sort | \
11443grep -v rails`")))))))
11444 (native-inputs (list ruby-standard ruby-rspec))
11445 (synopsis "Ruby library for setting environment variables")
11446 (description "Dotenv is a Ruby library for setting environment variables
11447defined in a @file{.env} file.")
11448 (home-page "https://github.com/bkeepers/dotenv")
11449 (license license:expat)))
11450
11451(define-public ruby-dotenv-rails
11452 (package
11453 (inherit ruby-dotenv)
11454 (name "ruby-dotenv-rails")
11455 (arguments
11456 (substitute-keyword-arguments (package-arguments ruby-dotenv)
11457 ((#:phases phases '%standard-phases)
11458 #~(modify-phases #$phases
11459 (delete 'do-not-build-dotenv-rails)
11460 (add-after 'unpack 'delete-Gemfile
11461 (lambda _
11462 ;; It defines extraneous dependencies; remove it.
11463 (delete-file "Gemfile")))
11464 (add-after 'unpack 'remove-extraneous-gemspec
11465 (lambda _
11466 (delete-file "dotenv.gemspec")
11467 (substitute* "Gemfile"
11468 ((".*\"dotenv\".*") ""))
11469 (substitute* "Rakefile"
11470 ;; Remove the dotenv-related Rake tasks.
11471 (("Bundler::GemHelper.install_tasks name: \"dotenv\"")
11472 "")
11473 (("\"dotenv:[^\"]*\", ")
11474 ""))))
11475 (replace 'replace-git-ls-files
11476 (lambda _
11477 (substitute* "dotenv-rails.gemspec"
11478 (("`git ls-files lib \\| grep rails`")
11479 "`find lib -type f | sort | grep rails`"))))))))
11480 (native-inputs (list ruby-rspec ruby-spring ruby-standard))
11481 (propagated-inputs (list ruby-dotenv ruby-railties))
11482 (synopsis "Ruby library for setting environment variables in Rails project")
11483 (description "Dotenv is a Ruby library for setting environment variables
11484defined in a @file{.env} file. This is the Rails variant, adapted for use
11485with Ruby on Rails projects.")))
11486
11487(define-public ruby-http-accept
11488 (package
11489 (name "ruby-http-accept")
11490 (version "2.2.0")
11491 (source (origin
11492 (method git-fetch) ;for the tests
11493 (uri (git-reference
11494 (url "https://github.com/socketry/http-accept")
11495 (commit (string-append "v" version))))
11496 (file-name (git-file-name name version))
11497 (sha256
11498 (base32
11499 "1d69cy12hqbcqrhw4dibvdq5pqklxsa59kih6pzl479nxq79rgs7"))))
11500 (build-system ruby-build-system)
11501 (arguments
11502 (list
11503 #:phases
11504 #~(modify-phases %standard-phases
11505 (add-after 'unpack 'remove-missing-key-directive
11506 ;; This seem to be a common problem in Ruby projects (see:
11507 ;; https://github.com/prawnpdf/ttfunk/issues/99).
11508 (lambda _
11509 (substitute* "http-accept.gemspec"
11510 ((".*spec.signing_key.*") ""))))
11511 (replace 'check
11512 (lambda* (#:key tests? #:allow-other-keys)
11513 (when tests?
11514 (invoke "rspec")))))))
11515 (native-inputs
11516 (list ruby-rspec
11517 ruby-covered))
11518 (synopsis "Parse Accept and Accept-Language HTTP headers")
11519 (description
11520 "This package provides a set of parsers for Accept and Accept-Language
11521HTTP headers.")
11522 (home-page "https://github.com/socketry/http-accept")
11523 (license license:expat)))
11524
11525(define-public ruby-http-accept-1
11526 (package
11527 (inherit ruby-http-accept)
11528 (version "1.7.0")
11529 (source (origin
11530 (method git-fetch) ;for the tests
11531 (uri (git-reference
11532 (url "https://github.com/ioquatix/http-accept")
11533 (commit (string-append "v" version))))
11534 (file-name (git-file-name "ruby-http-accept" version))
11535 (sha256
11536 (base32
11537 "1hnqmqpa135s3xgcvv30qzqm8zp88my1aj05m72d2q9cvc31g92z"))))))
11538
11539(define-public ruby-http-cookie
11540 (package
11541 (name "ruby-http-cookie")
11542 (version "1.0.5")
11543 (source
11544 (origin
11545 (method url-fetch)
11546 (uri (rubygems-uri "http-cookie" version))
11547 (sha256
11548 (base32
11549 "13rilvlv8kwbzqfb644qp6hrbsj82cbqmnzcvqip1p6vqx36sxbk"))))
11550 (build-system ruby-build-system)
11551 (arguments
11552 (list
11553 #:phases
11554 #~(modify-phases %standard-phases
11555 (add-before 'check 'add-dependency-to-bundler
11556 (lambda _
11557 ;; Fix NameError
11558 (substitute* "Rakefile"
11559 (("HTTP::Cookie::VERSION")
11560 "Bundler::GemHelper.gemspec.version")))))))
11561 (propagated-inputs
11562 (list ruby-domain-name))
11563 (native-inputs
11564 (list ruby-simplecov
11565 bundler
11566 ruby-sqlite3
11567 ruby-test-unit))
11568 (synopsis "Handle HTTP Cookies based on RFC 6265")
11569 (description
11570 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
11571RFC 6265. It has been designed with security, standards compliance and
11572compatibility in mind, to behave just the same as today's major web browsers.
11573It has built-in support for the legacy @code{cookies.txt} and
11574@code{cookies.sqlite} formats of Mozilla Firefox.")
11575 (home-page "https://github.com/sparklemotion/http-cookie")
11576 (license license:expat)))
11577
11578(define-public ruby-httpclient
11579 (package
11580 (name "ruby-httpclient")
11581 (version "2.8.3")
11582 (source
11583 (origin
11584 (method url-fetch)
11585 (uri (rubygems-uri "httpclient" version))
11586 (sha256
11587 (base32
11588 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
11589 (build-system ruby-build-system)
11590 (arguments
11591 '(;; TODO: Some tests currently fail
11592 ;; ------
11593 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
11594 ;; 2 omissions, 0 notifications
11595 ;; 91.866% passed
11596 ;; ------
11597 ;; 6.49 tests/s, 22.41 assertions/s
11598 #:tests? #f
11599 #:phases
11600 (modify-phases %standard-phases
11601 (replace 'check
11602 (lambda* (#:key tests? #:allow-other-keys)
11603 (if tests?
11604 (invoke "ruby"
11605 "-Ilib"
11606 "test/runner.rb")
11607 #t))))))
11608 (native-inputs
11609 (list ruby-rack))
11610 (synopsis
11611 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
11612 (description
11613 "The @code{httpclient} ruby library provides functionality related to
11614HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
11615Cookie, multithreading and authentication (digest, NTLM) support.
11616
11617Also provided is a @command{httpclient} command, which can perform HTTP
11618requests either using arguments or with an interactive prompt.")
11619 (home-page "https://github.com/nahi/httpclient")
11620 (license license:ruby)))
11621
11622(define-public ruby-ansi
11623 (package
11624 (name "ruby-ansi")
11625 (version "1.5.0")
11626 (source
11627 (origin
11628 (method git-fetch)
11629 ;; Fetch from GitHub as the gem does not contain testing code.
11630 (uri (git-reference
11631 (url "https://github.com/rubyworks/ansi")
11632 (commit version)))
11633 (file-name (git-file-name name version))
11634 (sha256
11635 (base32
11636 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
11637 (build-system ruby-build-system)
11638 (arguments
11639 `(#:phases
11640 (modify-phases %standard-phases
11641 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
11642 ;; cycle ansi, qed, ansi. Instead simply test that the library can
11643 ;; be require'd.
11644 (replace 'check
11645 (lambda _
11646 (invoke "ruby" "-Ilib" "-r" "ansi")))
11647 (add-before 'validate-runpath 'replace-broken-symlink
11648 (lambda* (#:key outputs #:allow-other-keys)
11649 (let* ((out (assoc-ref outputs "out"))
11650 (file (string-append
11651 out "/lib/ruby/vendor_ruby/gems/ansi-"
11652 ,version "/lib/ansi.yml")))
11653 ;; XXX: This symlink is broken since ruby 2.4.
11654 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
11655 (delete-file file)
11656 (symlink "../.index" file)
11657 #t))))))
11658 (synopsis "ANSI escape code related libraries")
11659 (description
11660 "This package is a collection of ANSI escape code related libraries
11661enabling ANSI colorization and stylization of console output. Included in the
11662library are the @code{Code} module, which defines ANSI codes as constants and
11663methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
11664@code{ProgressBar}, and a @code{String} subclass. The library also includes a
11665@code{Terminal} module which provides information about the current output
11666device.")
11667 (home-page "https://rubyworks.github.io/ansi/")
11668 (license license:bsd-2)))
11669
11670(define-public ruby-systemu
11671 (package
11672 (name "ruby-systemu")
11673 (version "2.6.5")
11674 (source
11675 (origin
11676 (method url-fetch)
11677 (uri (rubygems-uri "systemu" version))
11678 (sha256
11679 (base32
11680 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
11681 (build-system ruby-build-system)
11682 (arguments
11683 `(#:phases
11684 (modify-phases %standard-phases
11685 (add-before 'check 'set-version
11686 (lambda _
11687 (setenv "VERSION" ,version)
11688 #t)))))
11689 (synopsis "Capture of stdout/stderr and handling of child processes")
11690 (description
11691 "Systemu can be used on any platform to return status, stdout, and stderr
11692of any command. Unlike other methods like @code{open3} and @code{popen4}
11693there is no danger of full pipes or threading issues hanging your process or
11694subprocess.")
11695 (home-page "https://github.com/ahoward/systemu")
11696 (license license:ruby)))
11697
11698(define-public ruby-bcrypt
11699 (package
11700 (name "ruby-bcrypt")
11701 (version "3.1.18")
11702 ;; FIXME: Unbundle the bcrypt library used.
11703 (source (origin
11704 (method url-fetch)
11705 (uri (rubygems-uri "bcrypt" version))
11706 (sha256
11707 (base32
11708 "048z3fvcknqx7ikkhrcrykxlqmf9bzc7l0y5h1cnvrc9n2qf0k8m"))))
11709 (build-system ruby-build-system)
11710 (arguments (list #:test-target "default")) ;compile + spec
11711 (native-inputs (list ruby-rake-compiler ruby-rspec))
11712 (synopsis "Ruby bcrypt wrapper")
11713 (description "This Ruby library provides a simple wrapper to bcrypt, a
11714secure hash algorithm for hashing passwords.")
11715 (home-page "https://github.com/bcrypt-ruby/bcrypt-ruby")
11716 (license license:expat)))
11717
11718(define-public ruby-bcrypt-pbkdf
11719 (package
11720 (name "ruby-bcrypt-pbkdf")
11721 (version "1.1.0")
11722 (source (origin
11723 (method url-fetch)
11724 (uri (rubygems-uri "bcrypt_pbkdf" version))
11725 (sha256
11726 (base32
11727 "0ndamfaivnkhc6hy0yqyk2gkwr6f3bz6216lh74hsiiyk3axz445"))))
11728 (build-system ruby-build-system)
11729 (arguments
11730 (list #:phases #~(modify-phases %standard-phases
11731 (add-before 'build 'compile
11732 (lambda _
11733 (invoke "rake" "compile"))))))
11734 (native-inputs (list ruby-minitest ruby-rake-compiler
11735 ruby-rake-compiler-dock ruby-rdoc))
11736 (synopsis "Reading password encrypted Ed25519 keys in Ruby")
11737 (description
11738 "This gem implements @samp{bcrypt_pbkdf}, which is a variant of
11739PBKDF2 (Password-Based Key Derivation Function 2) with bcrypt-based
11740pseudorandom function. This is currently used by @samp{net-ssh} to
11741read password encrypted Ed25519 keys.")
11742 (home-page "https://github.com/net-ssh/bcrypt_pbkdf-ruby")
11743 (license license:expat)))
11744
11745(define-public ruby-bio-commandeer
11746 (package
11747 (name "ruby-bio-commandeer")
11748 (version "0.4.0")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (rubygems-uri "bio-commandeer" version))
11753 (sha256
11754 (base32
11755 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
11756 (build-system ruby-build-system)
11757 (arguments
11758 `(#:phases
11759 (modify-phases %standard-phases
11760 (replace 'check
11761 ;; Run test without calling 'rake' so that jeweler is
11762 ;; not required as an input.
11763 (lambda _
11764 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
11765 (propagated-inputs
11766 (list ruby-bio-logger ruby-systemu))
11767 (native-inputs
11768 (list bundler ruby-rspec))
11769 (synopsis "Simplified running of shell commands from within Ruby")
11770 (description
11771 "Bio-commandeer provides an opinionated method of running shell commands
11772from within Ruby. The advantage of bio-commandeer over other methods of
11773running external commands is that when something goes wrong, messages printed
11774to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
11775detail to ease debugging.")
11776 (home-page "https://github.com/wwood/bioruby-commandeer")
11777 (license license:expat)))
11778
11779(define-public ruby-rubytest
11780 (package
11781 (name "ruby-rubytest")
11782 (version "0.8.1")
11783 (source
11784 (origin
11785 (method url-fetch)
11786 (uri (rubygems-uri "rubytest" version))
11787 (sha256
11788 (base32
11789 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
11790 (build-system ruby-build-system)
11791 (arguments
11792 ;; Disable regular testing to break the cycle rubytest, qed, brass,
11793 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
11794 ;; simply test that the library can be require'd.
11795 `(#:phases
11796 (modify-phases %standard-phases
11797 (replace 'check
11798 (lambda _
11799 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
11800 (propagated-inputs
11801 (list ruby-ansi))
11802 (synopsis "Universal test harness for Ruby")
11803 (description
11804 "Rubytest is a testing meta-framework for Ruby. It can handle any
11805compliant test framework and can run tests from multiple frameworks in a
11806single pass.")
11807 (home-page "https://rubyworks.github.io/rubytest")
11808 (license license:bsd-2)))
11809
11810(define-public ruby-brass
11811 (package
11812 (name "ruby-brass")
11813 (version "1.2.1")
11814 (source
11815 (origin
11816 (method url-fetch)
11817 (uri (rubygems-uri "brass" version))
11818 (sha256
11819 (base32
11820 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
11821 (build-system ruby-build-system)
11822 (arguments
11823 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
11824 ;; Instead simply test that the library can be require'd.
11825 `(#:phases
11826 (modify-phases %standard-phases
11827 (replace 'check
11828 (lambda _
11829 (invoke "ruby" "-Ilib" "-r" "brass"))))))
11830 (synopsis "Basic foundational assertions framework")
11831 (description
11832 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
11833foundational assertions framework for other assertion and test frameworks to
11834make use of.")
11835 (home-page "https://rubyworks.github.io/brass")
11836 (license license:bsd-2)))
11837
11838(define-public ruby-qed
11839 (package
11840 (name "ruby-qed")
11841 (version "2.9.2")
11842 (source
11843 (origin
11844 (method url-fetch)
11845 (uri (rubygems-uri "qed" version))
11846 (sha256
11847 (base32
11848 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
11849 (build-system ruby-build-system)
11850 (arguments
11851 ;; Disable testing to break the cycle qed, ansi, qed, among others.
11852 ;; Instead simply test that the executable runs using --copyright.
11853 `(#:phases
11854 (modify-phases %standard-phases
11855 (replace 'check
11856 (lambda _
11857 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
11858 (propagated-inputs
11859 (list ruby-ansi ruby-brass))
11860 (synopsis "Test framework utilizing literate programming techniques")
11861 (description
11862 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
11863@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
11864Development} (BDD) utilizing Literate Programming techniques. QED sits
11865somewhere between lower-level testing tools like @code{Test::Unit} and
11866requirement specifications systems like Cucumber.")
11867 (home-page "https://rubyworks.github.io/qed")
11868 (license license:bsd-2)))
11869
11870(define-public ruby-que
11871 (package
11872 (name "ruby-que")
11873 (version "1.0.0.beta3")
11874 (source
11875 (origin
11876 (method url-fetch)
11877 (uri (rubygems-uri "que" version))
11878 (sha256
11879 (base32
11880 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
11881 (build-system ruby-build-system)
11882 (arguments
11883 '(#:tests? #f)) ; No included tests
11884 (synopsis "Job queue using PostgreSQL written in Ruby")
11885 (description
11886 "This package provides a job queue that uses PostgreSQL for storing jobs
11887and locking between worker processes.")
11888 (home-page "https://github.com/chanks/que")
11889 (license license:expat)))
11890
11891(define-public ruby-queue-classic
11892 (package
11893 (name "ruby-queue-classic")
11894 (version "4.0.0")
11895 (source (origin
11896 (method url-fetch)
11897 (uri (rubygems-uri "queue_classic" version))
11898 (sha256
11899 (base32
11900 "0npyhajf2fc80apkw9s2kj0n254w5lcl4xpjidg5d5w1fb19abh6"))))
11901 (build-system ruby-build-system)
11902 (arguments (list #:tests? #f)) ;tests require a postgresql server
11903 (native-inputs (list ruby-activerecord ruby-minitest-reporters))
11904 (propagated-inputs (list ruby-pg))
11905 (synopsis "Queuing library for Ruby")
11906 (description "@code{queue_classic} is a queuing library for Ruby
11907applications (Rails, Sinatra, etc.) @code{queue_classic} features
11908asynchronous job polling, database maintained locks and has a single
11909dependency, @code{pg}.")
11910 (home-page "https://github.com/QueueClassic/queue_classic")
11911 (license license:expat)))
11912
11913(define-public ruby-ae
11914 (package
11915 (name "ruby-ae")
11916 (version "1.8.2")
11917 (source
11918 (origin
11919 (method git-fetch)
11920 ;; Fetch from github so tests are included.
11921 (uri (git-reference
11922 (url "https://github.com/rubyworks/ae")
11923 (commit version)))
11924 (file-name (git-file-name name version))
11925 (sha256
11926 (base32
11927 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
11928 (build-system ruby-build-system)
11929 (arguments
11930 `(#:phases
11931 (modify-phases %standard-phases
11932 (replace 'check
11933 (lambda _ (invoke "qed")))
11934 (add-before 'validate-runpath 'replace-broken-symlink
11935 (lambda* (#:key outputs #:allow-other-keys)
11936 (let* ((out (assoc-ref outputs "out"))
11937 (file (string-append
11938 out "/lib/ruby/vendor_ruby/gems/ae-"
11939 ,version "/lib/ae.yml")))
11940 ;; XXX: This symlink is broken since ruby 2.4.
11941 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
11942 (delete-file file)
11943 (symlink "../.index" file)
11944 #t))))))
11945 (propagated-inputs
11946 (list ruby-ansi))
11947 (native-inputs
11948 (list ruby-qed))
11949 (synopsis "Assertions library")
11950 (description
11951 "Assertive Expressive (AE) is an assertions library specifically designed
11952for reuse by other test frameworks.")
11953 (home-page "https://rubyworks.github.io/ae/")
11954 (license license:bsd-2)))
11955
11956(define-public ruby-lemon
11957 (package
11958 (name "ruby-lemon")
11959 (version "0.9.1")
11960 (source
11961 (origin
11962 (method url-fetch)
11963 (uri (rubygems-uri "lemon" version))
11964 (sha256
11965 (base32
11966 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
11967 (build-system ruby-build-system)
11968 (arguments
11969 `(#:phases
11970 (modify-phases %standard-phases
11971 (replace 'check (lambda _ (invoke "qed"))))))
11972 (propagated-inputs
11973 (list ruby-ae ruby-ansi ruby-rubytest))
11974 (native-inputs
11975 (list ruby-qed))
11976 (synopsis "Test framework correlating code structure and test unit")
11977 (description
11978 "Lemon is a unit testing framework that enforces highly formal
11979case-to-class and unit-to-method test construction. This enforcement can help
11980focus concern on individual units of behavior.")
11981 (home-page "https://rubyworks.github.io/lemon")
11982 (license license:bsd-2)))
11983
11984(define-public ruby-rubytest-cli
11985 (package
11986 (name "ruby-rubytest-cli")
11987 (version "0.2.0")
11988 (source
11989 (origin
11990 (method url-fetch)
11991 (uri (rubygems-uri "rubytest-cli" version))
11992 (sha256
11993 (base32
11994 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
11995 (build-system ruby-build-system)
11996 (arguments
11997 `(#:tests? #f)) ; no tests
11998 (propagated-inputs
11999 (list ruby-ansi ruby-rubytest))
12000 (synopsis "Command-line interface for rubytest")
12001 (description
12002 "Rubytest CLI is a command-line interface for running tests for
12003Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
12004 (home-page "https://rubyworks.github.io/rubytest-cli")
12005 (license license:bsd-2)))
12006
12007(define-public ruby-hashery
12008 (package
12009 (name "ruby-hashery")
12010 (version "2.1.2")
12011 (source
12012 (origin
12013 (method url-fetch)
12014 (uri (rubygems-uri "hashery" version))
12015 (sha256
12016 (base32
12017 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
12018 (build-system ruby-build-system)
12019 (arguments
12020 `(#:phases
12021 (modify-phases %standard-phases
12022 (replace 'check
12023 (lambda _
12024 (invoke "qed")
12025 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
12026 (native-inputs
12027 (list ruby-rubytest-cli ruby-qed ruby-lemon))
12028 (synopsis "Hash-like classes with extra features")
12029 (description
12030 "The Hashery is a tight collection of @code{Hash}-like classes.
12031Included are the auto-sorting @code{Dictionary} class, the efficient
12032@code{LRUHash}, the flexible @code{OpenHash} and the convenient
12033@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
12034defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
12035standard @code{Hash} making it possible to subclass and augment to fit any
12036specific use case.")
12037 (home-page "https://rubyworks.github.io/hashery")
12038 (license license:bsd-2)))
12039
12040(define-public ruby-rc4
12041 (package
12042 (name "ruby-rc4")
12043 (version "0.1.5")
12044 (source
12045 (origin
12046 (method url-fetch)
12047 (uri (rubygems-uri "ruby-rc4" version))
12048 (sha256
12049 (base32
12050 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
12051 (build-system ruby-build-system)
12052 (arguments
12053 `(#:phases
12054 (modify-phases %standard-phases
12055 (replace 'check
12056 (lambda _
12057 (invoke "rspec" "spec/rc4_spec.rb"))))))
12058 (native-inputs
12059 (list ruby-rspec-2))
12060 (synopsis "Implementation of the RC4 algorithm")
12061 (description
12062 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
12063 (home-page "https://github.com/caiges/Ruby-RC4")
12064 (license license:expat)))
12065
12066(define-public ruby-afm
12067 (package
12068 (name "ruby-afm")
12069 (version "0.2.2")
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (rubygems-uri "afm" version))
12074 (sha256
12075 (base32
12076 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
12077 (build-system ruby-build-system)
12078 (native-inputs
12079 (list bundler))
12080 (synopsis "Read Adobe Font Metrics (afm) files")
12081 (description
12082 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
12083files and use the data therein.")
12084 (home-page "https://github.com/halfbyte/afm")
12085 (license license:expat)))
12086
12087(define-public ruby-ascii85
12088 (package
12089 (name "ruby-ascii85")
12090 (version "1.0.3")
12091 (source
12092 (origin
12093 (method url-fetch)
12094 (uri (rubygems-uri "Ascii85" version))
12095 (sha256
12096 (base32
12097 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
12098 (build-system ruby-build-system)
12099 (native-inputs
12100 (list bundler))
12101 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
12102 (description
12103 "This library provides methods to encode and decode Ascii85
12104binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
12105@dfn{Portable Document Format} (PDF) file formats.")
12106 (home-page "https://github.com/datawraith/ascii85gem")
12107 (license license:expat)))
12108
12109(define-public ruby-ttfunk
12110 (package
12111 (name "ruby-ttfunk")
12112 (version "1.7.0")
12113 (source
12114 (origin
12115 (method git-fetch)
12116 ;; Fetch from github as the gem does not contain testing code.
12117 (uri (git-reference
12118 (url "https://github.com/prawnpdf/ttfunk")
12119 (commit version)))
12120 (file-name (git-file-name name version))
12121 (sha256
12122 (base32
12123 "1jyxn928mpyb1sikjd93s3v8fmh33232pq41ziaph513j7am6fi5"))))
12124 (build-system ruby-build-system)
12125 (arguments
12126 (list #:test-target "spec" ;avoid the rubocop target
12127 #:phases
12128 #~(modify-phases %standard-phases
12129 (add-after 'unpack 'remove-missing-key-directive
12130 ;; This seem to be a common problem in Ruby projects (see:
12131 ;; https://github.com/prawnpdf/ttfunk/issues/99).
12132 (lambda _
12133 (substitute* "ttfunk.gemspec"
12134 ((".*spec.signing_key.*") "")))))))
12135 (native-inputs (list ruby-prawn-dev))
12136 (synopsis "Font metrics parser for the Prawn PDF generator")
12137 (description
12138 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
12139part of the Prawn PDF generator.")
12140 (home-page "https://github.com/prawnpdf/ttfunk")
12141 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
12142 ;; for details."
12143 (license %prawn-project-licenses)))
12144
12145(define-public ruby-puma
12146 (package
12147 (name "ruby-puma")
12148 (version "6.3.0")
12149 (source
12150 (origin
12151 (method git-fetch) ;for tests
12152 (uri (git-reference
12153 (url "https://github.com/puma/puma")
12154 (commit (string-append "v" version))))
12155 (file-name (git-file-name name version))
12156 (sha256
12157 (base32
12158 "0qnayzgyr23w87jc849r00394hv1gw2rk9080nws43ilnycagzxq"))))
12159 (build-system ruby-build-system)
12160 (arguments
12161 (list
12162 #:phases
12163 #~(modify-phases %standard-phases
12164 (add-after 'unpack 'patch-Gemfile
12165 (lambda _
12166 (substitute* "Gemfile"
12167 (("gem \"rake-compiler\".*")
12168 "gem 'rake-compiler'\n"))))
12169 (add-after 'unpack 'disable-rubocop
12170 (lambda _
12171 (setenv "PUMA_NO_RUBOCOP" "1")))
12172 (add-after 'unpack 'use-rack-2
12173 (lambda _
12174 (setenv "PUMA_CI_RACK" "rack2")
12175 (setenv "PUMA_CI_RACK_2" "1")))
12176 (add-before 'build 'increase-resource-limits
12177 (lambda _
12178 ;; The test suite requires a higher number of open files. Try
12179 ;; increasing the soft resource limit of max open files to 2048,
12180 ;; or equal to the hard limit, whichever is lower.
12181 (call-with-values (lambda () (getrlimit 'nofile))
12182 (lambda (soft hard)
12183 (when (and soft (< soft 2048))
12184 (if hard
12185 (setrlimit 'nofile (min hard 2048) hard)
12186 (setrlimit 'nofile 2048 #f))
12187 (format
12188 #t "increased maximum number of open files from ~d to ~d~%"
12189 soft (if hard (min hard 2048) 2048)))))))
12190 (add-before 'build 'fix-gemspec
12191 (lambda _
12192 (substitute* "puma.gemspec"
12193 (("`git ls-files -- bin docs ext lib tools`")
12194 "`find bin docs ext lib tools -type f |sort`"))))
12195 (delete 'check) ;moved after install
12196 (add-after 'install 'check
12197 (lambda* (#:key tests? #:allow-other-keys)
12198 (when tests?
12199 (invoke "bundle" "exec" "rake" "test"))))
12200 (add-after 'install 'delete-mkmf.log
12201 (lambda _
12202 ;; Rubygems installs build log files that embed volatile file
12203 ;; names (see:
12204 ;; https://github.com/rubygems/rubygems/issues/6259).
12205 (for-each delete-file (find-files #$output "^mkmf\\.log$"))))
12206 (add-before 'check 'disable-problematic-tests
12207 (lambda _
12208 (let-syntax ((skip-tests
12209 (syntax-rules ()
12210 ((_ file test ...)
12211 (substitute* file
12212 (((string-append "def " test ".*") all)
12213 (string-append
12214 all " skip('fails on guix')\n")) ...)))))
12215 ;; The test failures were reported at:
12216 ;; https://github.com/puma/puma/issues/3093, but appear to be
12217 ;; caused by the Guix build container, perhaps the lack of
12218 ;; zombie process reaping (see:
12219 ;; https://issues.guix.gnu.org/30948).
12220 ;; All the tests in the 'test_worker_gem_independence.rb'
12221 ;; module fail with "Expected false to be truthy.".
12222 (delete-file "test/test_worker_gem_independence.rb")
12223 (skip-tests "test/test_integration_ssl_session.rb"
12224 ;; The TLS 1.2 test fails for unknown reasons.
12225 "test_off_tls1_2")
12226 (skip-tests "test/test_integration_cluster.rb"
12227 "test_fork_worker_on_refork"
12228 "test_hot_restart_does_not_drop_connections"
12229 "test_culling_strategy_oldest_fork_worker"
12230 "test_usr1_fork_worker")
12231 (skip-tests "test/test_integration_pumactl.rb"
12232 "test_refork_cluster"))))
12233 (add-before 'check 'relax-test-case-timeout
12234 (lambda _
12235 ;; The default value is 45 s and easily causes timeouts.
12236 (setenv "TEST_CASE_TIMEOUT" "600")))
12237 (add-before 'check 'set-home
12238 (lambda _
12239 ;; Some tests fail if the cannot write to HOME.
12240 (setenv "HOME" "/tmp")))
12241 (add-before 'check 'set-paths
12242 (lambda _
12243 ;; The test suite requires the 'puma' command to be on PATH.
12244 (setenv "PATH" (string-append (getenv "PATH") ":"
12245 #$output "/bin"))
12246 (setenv "GEM_PATH" (string-append
12247 (getenv "GEM_PATH") ":"
12248 #$output "/lib/ruby/vendor_ruby")))))))
12249 (native-inputs
12250 (list bundler
12251 curl
12252 ruby-json
12253 ruby-localhost
12254 ruby-m
12255 ruby-minitest-proveit
12256 ruby-minitest-retry
12257 ruby-minitest-stub-const
12258 ruby-rack
12259 ruby-rake-compiler
12260 ruby-webrick))
12261 (inputs
12262 (list openssl
12263 ruby-nio4r))
12264 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
12265 (description
12266 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
12267for Ruby/Rack applications. Puma is intended for use in both development and
12268production environments. In order to get the best throughput, it is highly
12269recommended that you use a Ruby implementation with real threads like Rubinius
12270or JRuby.")
12271 (home-page "https://puma.io/")
12272 (license license:expat)))
12273
12274(define-public ruby-hoe-git
12275 (package
12276 (name "ruby-hoe-git")
12277 (version "1.6.0")
12278 (source
12279 (origin
12280 (method url-fetch)
12281 (uri (rubygems-uri "hoe-git" version))
12282 (sha256
12283 (base32
12284 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
12285 (build-system ruby-build-system)
12286 (propagated-inputs
12287 (list ruby-hoe-3))
12288 (synopsis "Hoe plugins for tighter Git integration")
12289 (description
12290 "This package provides a set of Hoe plugins for tighter Git integration.
12291It provides tasks to automate release tagging and pushing and changelog
12292generation.")
12293 (home-page "https://github.com/jbarnette/hoe-git")
12294 (license license:expat)))
12295
12296(define-public ruby-hoe-markdown
12297 (package
12298 (name "ruby-hoe-markdown")
12299 (version "1.4.0")
12300 (home-page "https://github.com/flavorjones/hoe-markdown")
12301 (source
12302 (origin
12303 (method git-fetch)
12304 (uri (git-reference
12305 (url home-page)
12306 (commit (string-append "v" version))))
12307 (file-name (git-file-name name version))
12308 (sha256
12309 (base32 "0wb0yjdx9gx9r0cahpx42pblvglgh1i9pdfxjavq7f40nan2g076"))))
12310 (build-system ruby-build-system)
12311 (arguments
12312 '(#:test-target "spec"
12313 #:phases (modify-phases %standard-phases
12314 (add-before 'check 'disable-bundler-dependency
12315 (lambda _
12316 (substitute* "spec/spec_helper.rb"
12317 (("require.*bundler/setup.*")
12318 "")))))))
12319 (native-inputs
12320 (list ruby-rspec))
12321 (propagated-inputs
12322 (list ruby-rake))
12323 (synopsis "Hoe plugin with Markdown helpers")
12324 (description
12325 "This package provides a Hoe plugin with various Markdown helpers, which
12326can be used to e.g. hyperlink Markdown documentation between project files.")
12327 (license license:expat)))
12328
12329(define-public ruby-sequel
12330 (package
12331 (name "ruby-sequel")
12332 (version "5.47.0")
12333 (source
12334 (origin
12335 (method url-fetch)
12336 (uri (rubygems-uri "sequel" version))
12337 (sha256
12338 (base32
12339 "03pmhj4kc3ga75wy397l57bvd18jxxmrk3qsznjw93b993qgvj3z"))))
12340 (build-system ruby-build-system)
12341 (arguments
12342 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
12343 (synopsis "Database toolkit for Ruby")
12344 (description "Sequel provides thread safety, connection pooling and a
12345concise DSL for constructing SQL queries and table schemas. It includes a
12346comprehensive ORM layer for mapping records to Ruby objects and handling
12347associated records.")
12348 (home-page "https://sequel.jeremyevans.net")
12349 (license license:expat)))
12350
12351(define-public ruby-timecop
12352 (package
12353 (name "ruby-timecop")
12354 (version "0.9.6")
12355 (source
12356 (origin
12357 (method url-fetch)
12358 (uri (rubygems-uri "timecop" version))
12359 (sha256
12360 (base32
12361 "0dlx4gx0zh836i7nzna03xdl7fc233s5z6plnr6k3kw46ah8d1fc"))))
12362 (build-system ruby-build-system)
12363 (arguments
12364 (list
12365 #:phases
12366 #~(modify-phases %standard-phases
12367 (add-before 'check 'set-check-rubylib
12368 (lambda _
12369 ;; Set RUBYLIB so timecop tests finds its own lib.
12370 (setenv "RUBYLIB" "lib"))))))
12371 (native-inputs
12372 (list bundler
12373 ruby-minitest-rg
12374 ruby-mocha
12375 ruby-activesupport
12376 ruby-pry))
12377 (synopsis "Test mocks for time-dependent functions")
12378 (description
12379 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
12380making it easier to test time-dependent code. It provides a unified method to
12381mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
12382call.")
12383 (home-page "https://github.com/travisjeffery/timecop")
12384 (license license:expat)))
12385
12386(define-public ruby-concurrent-ruby
12387 (package
12388 (name "ruby-concurrent-ruby")
12389 (version "1.2.2")
12390 (source (origin
12391 (method git-fetch)
12392 (uri (git-reference ;for tests
12393 (url "https://github.com/ruby-concurrency/concurrent-ruby")
12394 (commit (string-append "v" version))))
12395 (file-name (git-file-name name version))
12396 (sha256
12397 (base32
12398 "1vz4rl0nplq14dk9nx45g59i1sk2h53w1mjlrdiyjf780q4a1i38"))))
12399 (build-system ruby-build-system)
12400 (arguments
12401 (list
12402 #:tests? #f ;the test suite is run in ruby-concurrent-ruby-edge
12403 #:phases #~(modify-phases %standard-phases
12404 (add-after 'unpack 'delete-unwanted-gemspecs
12405 (lambda _
12406 (for-each delete-file
12407 '("concurrent-ruby-ext.gemspec"
12408 "concurrent-ruby-edge.gemspec"))))
12409 (add-after 'unpack 'do-not-install-concurrent_ruby.jar
12410 (lambda _
12411 ;; This file is only built when building the Java
12412 ;; extension.
12413 (substitute* "concurrent-ruby.gemspec"
12414 (("'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'")
12415 "")))))))
12416 (synopsis "Concurrency library for Ruby")
12417 (description "Concurrent Ruby includes concurrency tools such as agents,
12418futures, promises, thread pools, actors, supervisors, and more. It is
12419inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency
12420patterns.")
12421 (home-page "https://github.com/ruby-concurrency/concurrent-ruby")
12422 (license license:expat)))
12423
12424;;; The 'gem' is called 'concurrent-ruby'; reversing its name was confusing
12425;;; and failed to be picked by the gem importer (which led to this newer
12426;;; package).
12427(define-public ruby-concurrent
12428 (deprecated-package "ruby-concurrent" ruby-concurrent-ruby))
12429
12430(define-public ruby-concurrent-ruby-ext
12431 (package
12432 (inherit ruby-concurrent-ruby)
12433 (name "ruby-concurrent-ruby-ext")
12434 (arguments
12435 (list
12436 #:tests? #f ;tested as part of concurrent-ruby-edge
12437 #:phases
12438 #~(modify-phases %standard-phases
12439 (add-after 'unpack 'delete-unwanted-gemspecs
12440 (lambda _
12441 (for-each delete-file
12442 '("concurrent-ruby.gemspec"
12443 "concurrent-ruby-edge.gemspec")))))))
12444 (native-inputs (list ruby-rake-compiler))
12445 (propagated-inputs (list ruby-concurrent-ruby))
12446 (synopsis "C extensions for concurrent-ruby")
12447 (description "This package provides C extensions to optimize the
12448concurrent-ruby gem when running under the Matz's Ruby Interpreter (MRI, also
12449known as CRuby).")))
12450
12451(define-public ruby-concurrent-ruby-edge
12452 (package
12453 (inherit ruby-concurrent-ruby)
12454 (name "ruby-concurrent-ruby-edge")
12455 (arguments
12456 (list
12457 #:phases
12458 #~(modify-phases %standard-phases
12459 (add-after 'unpack 'delete-unwanted-gemspecs
12460 (lambda _
12461 (for-each delete-file
12462 '("concurrent-ruby.gemspec"
12463 "concurrent-ruby-ext.gemspec"))))
12464 ;; The tests rely on the Gem being installed, so move the check
12465 ;; phase after the install phase.
12466 (delete 'check)
12467 (add-after 'install 'check
12468 (lambda* (#:key tests? #:allow-other-keys)
12469 (setenv "GEM_PATH" (string-append
12470 (getenv "GEM_PATH") ":"
12471 #$output "/lib/ruby/vendor_ruby"))
12472 (when tests?
12473 (invoke "rake" "ci")))))))
12474 (native-inputs
12475 (list ruby-rake-compiler
12476 ruby-rake-compiler-dock
12477 ruby-rspec
12478 ruby-timecop
12479 ruby-yard))
12480 (propagated-inputs
12481 (list ruby-concurrent-ruby ruby-concurrent-ruby-ext))
12482 (synopsis "Edge features and additions to the @code{concurrent-ruby} gem")
12483 (description "The @code{concurrent-ruby-edge} gem includes
12484@code{concurrent-ruby} features that are under active development and may
12485change frequently. They are expected not to keep backward
12486compatibility (there may also lack tests and documentation), although semantic
12487versions are obeyed though. Features developed in @code{concurrent-ruby-edge}
12488are expected to move to @code{concurrent-ruby} when final.")))
12489
12490(define-public ruby-pkg-config
12491 (package
12492 (name "ruby-pkg-config")
12493 (version "1.2.5")
12494 (source
12495 (origin
12496 (method url-fetch)
12497 (uri (rubygems-uri "pkg-config" version))
12498 (sha256
12499 (base32
12500 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
12501 (build-system ruby-build-system)
12502 (arguments
12503 ;; Tests require extra files not included in the gem.
12504 `(#:tests? #f))
12505 (synopsis "Detect libraries for compiling Ruby native extensions")
12506 (description
12507 "@code{pkg-config} can be used in your extconf.rb to properly detect need
12508libraries for compiling Ruby native extensions.")
12509 (home-page "https://github.com/ruby-gnome2/pkg-config")
12510 (license license:lgpl2.0+)))
12511
12512(define-public ruby-net-http-digest-auth
12513 (package
12514 (name "ruby-net-http-digest-auth")
12515 (version "1.4.1")
12516 (source
12517 (origin
12518 (method url-fetch)
12519 (uri (rubygems-uri "net-http-digest_auth" version))
12520 (sha256
12521 (base32
12522 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
12523 (build-system ruby-build-system)
12524 (native-inputs
12525 (list ruby-hoe
12526 ruby-minitest))
12527 (synopsis "RFC 2617 HTTP digest authentication library")
12528 (description
12529 "This library implements HTTP's digest authentication scheme based on
12530RFC 2617. This enables the use of the digest authentication scheme instead
12531of the more insecure basic authentication scheme.")
12532 (home-page "https://github.com/drbrain/net-http-digest_auth")
12533 (license license:expat)))
12534
12535(define-public ruby-mail
12536 (package
12537 (name "ruby-mail")
12538 (version "2.7.1")
12539 (source
12540 (origin
12541 (method url-fetch)
12542 (uri (rubygems-uri "mail" version))
12543 (sha256
12544 (base32
12545 "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"))))
12546 (build-system ruby-build-system)
12547 (propagated-inputs
12548 (list ruby-mini-mime))
12549 (arguments
12550 '(#:tests? #f)) ; no rakefile
12551 (synopsis "Mail library for Ruby")
12552 (description
12553 "Mail is an internet library for Ruby that is designed to handle email
12554generation, parsing and sending. The purpose of this library is to provide
12555a single point of access to handle all email functions, including sending
12556and receiving emails. All network type actions are done through proxy
12557methods to @code{Net::SMTP}, @code{Net::POP3} etc.
12558
12559Mail has been designed with a very simple object oriented system that
12560really opens up the email messages you are parsing, if you know what you
12561are doing, you can fiddle with every last bit of your email directly.")
12562 (home-page "https://github.com/mikel/mail")
12563 (license license:expat)))
12564
12565(define-public ruby-net-protocol
12566 (package
12567 (name "ruby-net-protocol")
12568 (version "0.2.1")
12569 (source (origin
12570 (method git-fetch)
12571 (uri (git-reference
12572 (url "https://github.com/ruby/net-protocol")
12573 (commit (string-append "v" version))))
12574 (file-name (git-file-name name version))
12575 (sha256
12576 (base32
12577 "0niivmjx7bc6vsylc1ag17mw6mnvjxw02s7cin1f0422xyr8msq9"))))
12578 (build-system ruby-build-system)
12579 (propagated-inputs (list ruby-timeout))
12580 (synopsis "Abstract interface for Ruby network clients")
12581 (description "This Ruby library provides an abstract interface for network
12582clients.")
12583 (home-page "https://github.com/ruby/net-protocol")
12584 (license (list license:bsd-2))))
12585
12586(define-public ruby-email-reply-trimmer
12587 (package
12588 (name "ruby-email-reply-trimmer")
12589 (version "0.1.13")
12590 (source
12591 (origin
12592 (method url-fetch)
12593 (uri (rubygems-uri "email_reply_trimmer" version))
12594 (sha256
12595 (base32
12596 "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
12597 (build-system ruby-build-system)
12598 (synopsis "Trim replies from plain text email")
12599 (description "EmailReplyTrimmer is a Ruby small library to trim replies
12600from plain text email.")
12601 (home-page "https://github.com/discourse/email_reply_trimmer")
12602 (license license:expat)))
12603
12604(define-public ruby-mathn
12605 (package
12606 (name "ruby-mathn")
12607 (version "0.1.0")
12608 (source
12609 (origin
12610 (method url-fetch)
12611 (uri (rubygems-uri "mathn" version))
12612 (sha256
12613 (base32
12614 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
12615 (build-system ruby-build-system)
12616 (native-inputs
12617 (list bundler ruby-rake-compiler))
12618 (synopsis "Extends math operations for increased precision")
12619 (description
12620 "This gem makes mathematical operations more precise in Ruby and
12621integrates other mathematical standard libraries. Prior to Ruby 2.5,
12622@code{mathn} was part of the Ruby standard library.")
12623 (home-page "https://github.com/ruby/mathn")
12624 (license license:bsd-2)))
12625
12626(define-public ruby-code-statistics
12627 (package
12628 (name "ruby-code-statistics")
12629 (version "0.2.13")
12630 (source
12631 (origin
12632 (method url-fetch)
12633 (uri (rubygems-uri "code_statistics" version))
12634 (sha256
12635 (base32
12636 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
12637 (build-system ruby-build-system)
12638 (arguments
12639 `(#:tests? #f)) ; Not all test code is included in gem.
12640 (synopsis "Port of the rails 'rake stats' method")
12641 (description
12642 "This gem is a port of the rails 'rake stats' method so it can be made
12643more robust and work for non rails projects.")
12644 (home-page "https://github.com/danmayer/code_statistics")
12645 (license license:expat)))
12646
12647(define-public ruby-ruby2-keywords
12648 (package
12649 (name "ruby-ruby2-keywords")
12650 (version "0.0.5")
12651 (source (origin
12652 (method git-fetch)
12653 (uri (git-reference
12654 (url "https://github.com/ruby/ruby2_keywords")
12655 (commit (string-append "v" version))))
12656 (file-name (git-file-name name version))
12657 (sha256
12658 (base32
12659 "1jhqb152zfr2yrxj6j8rzakkwdkg5viggwnnqrrfxwwy63msdi97"))))
12660 (build-system ruby-build-system)
12661 (arguments
12662 (list
12663 #:phases
12664 #~(modify-phases %standard-phases
12665 (add-after 'unpack 'delete-extraneous-rake-files
12666 (lambda _
12667 (for-each delete-file '("rakelib/changelogs.rake"
12668 "rakelib/epoch.rake"
12669 "rakelib/version.rake"))))
12670 (add-after 'extract-gemspec 'adjust-files
12671 (lambda _
12672 (substitute* "ruby2_keywords.gemspec"
12673 ;; This file is not present in the git checkout.
12674 ((".*\"ChangeLog\",.*") "")))))))
12675 (synopsis "Shim library for Module#ruby2_keywords")
12676 (description "Provides empty @code{Module#ruby2_keywords} method, for the
12677forward source-level compatibility against @command{ruby2.7} and
12678@command{ruby3}.")
12679 (home-page "https://github.com/ruby/ruby2_keywords")
12680 (license license:bsd-2)))
12681
12682(define-public ruby-rubypants
12683 (package
12684 (name "ruby-rubypants")
12685 (version "0.6.0")
12686 (source (origin
12687 (method url-fetch)
12688 (uri (rubygems-uri "rubypants" version))
12689 (sha256
12690 (base32
12691 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
12692 (build-system ruby-build-system)
12693 (arguments
12694 '(#:tests? #f)) ; need Codecov
12695 (synopsis "Port of the smart-quotes library SmartyPants")
12696 (description
12697 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
12698original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
12699and BBEdit that easily translates plain ASCII punctuation characters into
12700smart typographic punctuation HTML entities.")
12701 (home-page "https://github.com/jmcnevin/rubypants")
12702 (license license:bsd-2)))
12703
12704(define-public ruby-org-ruby
12705 (package
12706 (name "ruby-org-ruby")
12707 (version "0.9.12")
12708 (source (origin
12709 (method url-fetch)
12710 (uri (rubygems-uri "org-ruby" version))
12711 (sha256
12712 (base32
12713 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
12714 (build-system ruby-build-system)
12715 (arguments
12716 '(#:tests? #f)) ; no rakefile
12717 (propagated-inputs
12718 (list ruby-rubypants))
12719 (synopsis "Org-mode parser written in Ruby")
12720 (description
12721 "Org-ruby is an org-mode parser written in Ruby. The most significant
12722thing this library does today is convert org-mode files to HTML or Textile or
12723Markdown.")
12724 (home-page "https://github.com/wallyqs/org-ruby")
12725 (license license:expat)))
12726
12727(define-public ruby-rake
12728 (package
12729 (name "ruby-rake")
12730 (version "13.0.6")
12731 (source
12732 (origin
12733 (method git-fetch) ;for tests
12734 (uri (git-reference
12735 (url "https://github.com/ruby/rake")
12736 (commit (string-append "v" version))))
12737 (file-name (git-file-name name version))
12738 (sha256
12739 (base32
12740 "0c77xyl677s966f8yvk8yv7l31c1ffa1yl4kcwiram219h0s76in"))))
12741 (build-system ruby-build-system)
12742 (native-inputs
12743 (list bundler))
12744 (synopsis "Rake is a Make-like program implemented in Ruby")
12745 (description
12746 "Rake is a Make-like program where tasks and dependencies are specified
12747in standard Ruby syntax.")
12748 (home-page "https://github.com/ruby/rake")
12749 (license license:expat)))
12750
12751(define-public ruby-rake-manifest
12752 (package
12753 (name "ruby-rake-manifest")
12754 (version "0.2.3")
12755 (source (origin
12756 (method git-fetch)
12757 (uri (git-reference
12758 (url "https://github.com/mvz/rake-manifest")
12759 (commit (string-append "v" version))))
12760 (file-name (git-file-name name version))
12761 (sha256
12762 (base32
12763 "16k2yvg773c25kp2vhzhp01rhf53k0nhrcmpv34k1fridw90r2k8"))))
12764 (build-system ruby-build-system)
12765 (arguments
12766 (list
12767 #:test-target "default"
12768 #:phases
12769 #~(modify-phases %standard-phases
12770 (delete 'check) ;moved after the install phase
12771 (add-after 'install 'check
12772 (assoc-ref %standard-phases 'check))
12773 (add-before 'check 'set-GEM_PATH
12774 (lambda _
12775 (setenv "GEM_PATH" (string-append
12776 (getenv "GEM_PATH") ":"
12777 #$output "/lib/ruby/vendor_ruby")))))))
12778 (native-inputs (list ruby-rspec ruby-simplecov))
12779 (synopsis "Rake tasks to generate and check a manifest file")
12780 (description "This package provides Rake tasks to generate and check a
12781manifest file.")
12782 (home-page "https://github.com/mvz/rake-manifest")
12783 (license license:expat)))
12784
12785(define-public ruby-childprocess
12786 (package
12787 (name "ruby-childprocess")
12788 (version "3.0.0")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (rubygems-uri "childprocess" version))
12793 (sha256
12794 (base32
12795 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
12796 (build-system ruby-build-system)
12797 (arguments
12798 `(#:tests? #f))
12799 (native-inputs
12800 (list bundler ruby-rspec))
12801 (propagated-inputs
12802 (list ruby-ffi))
12803 (synopsis "Control external programs running in the background, in Ruby")
12804 (description "@code{childprocess} provides a gem to control external
12805programs running in the background, in Ruby.")
12806 (home-page "https://github.com/enkessler/childprocess")
12807 (license license:expat)))
12808
12809(define-public ruby-public-suffix
12810 (package
12811 (name "ruby-public-suffix")
12812 (version "4.0.5")
12813 (source (origin
12814 (method url-fetch)
12815 (uri (rubygems-uri "public_suffix" version))
12816 (sha256
12817 (base32
12818 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
12819 (build-system ruby-build-system)
12820 (arguments
12821 '(#:phases
12822 (modify-phases %standard-phases
12823 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
12824 ;; including it as an input can lead to circular dependencies.
12825 (add-after 'unpack 'remove-rubocop-from-Rakefile
12826 (lambda _
12827 (substitute* "Rakefile"
12828 (("require \"rubocop/rake\\_task\"") "")
12829 (("RuboCop::RakeTask\\.new") ""))
12830 #t)))))
12831 (native-inputs
12832 (list bundler ruby-yard/minimal ruby-mocha ruby-minitest-reporters))
12833 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
12834 (synopsis "Domain name parser")
12835 (description "The gem @code{public_suffix} is a domain name parser,
12836written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
12837is one under which Internet users can (or historically could) directly
12838register names. Some examples of public suffixes are @code{.com},
12839@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
12840all known public suffixes.")
12841 (license license:expat)))
12842
12843(define-public ruby-addressable
12844 (package
12845 (name "ruby-addressable")
12846 (version "2.8.1")
12847 (source (origin
12848 (method url-fetch)
12849 (uri (rubygems-uri "addressable" version))
12850 (sha256
12851 (base32
12852 "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"))))
12853 (build-system ruby-build-system)
12854 (arguments
12855 '(#:test-target "spec"
12856 #:phases
12857 (modify-phases %standard-phases
12858 (add-after 'unpack 'disable-bundler
12859 (lambda _
12860 (substitute* "spec/spec_helper.rb"
12861 (("require 'bundler/setup'") ""))))
12862 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
12863 (lambda _
12864 (substitute* "Gemfile"
12865 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
12866 ((".*launchy.*") "")
12867 ((".*rake.*") "gem 'rake'\n")
12868 ((".*redcarpet.*") ""))))
12869 (add-before 'check 'delete-network-dependent-test
12870 (lambda _
12871 (delete-file "spec/addressable/net_http_compat_spec.rb"))))))
12872 (native-inputs
12873 (list bundler
12874 ruby-idn-ruby
12875 ruby-rspec
12876 ruby-rspec-its-minimal
12877 ruby-simplecov
12878 ruby-sporkmonger-rack-mount
12879 ruby-yard/minimal))
12880 (propagated-inputs
12881 (list ruby-public-suffix))
12882 (home-page "https://github.com/sporkmonger/addressable")
12883 (synopsis "Alternative URI implementation")
12884 (description "Addressable is a replacement for the URI implementation that
12885is part of Ruby's standard library. It more closely conforms to RFC 3986,
12886RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
12887 (license license:asl2.0)))
12888
12889(define-public ruby-colorize
12890 (package
12891 (name "ruby-colorize")
12892 (version "0.8.1")
12893 (source (origin
12894 (method url-fetch)
12895 (uri (rubygems-uri "colorize" version))
12896 (sha256
12897 (base32
12898 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
12899 (build-system ruby-build-system)
12900 (arguments
12901 '(#:phases (modify-phases %standard-phases
12902 (add-before 'check 'remove-codeclimate-dependency
12903 (lambda _
12904 (substitute* "test/test_colorize.rb"
12905 ;; Do not hook the tests into the online CodeClimate
12906 ;; service which is unnecessary for these tests.
12907 (("require 'codeclimate-test-reporter'")
12908 "")
12909 (("CodeClimate.*") ""))
12910 #t)))))
12911 (synopsis "Add color effects to the @code{String} class")
12912 (description
12913 "This package extends the @code{String} class and adds a
12914@code{ColorizedString} with methods to set text color, background color,
12915and text effects.")
12916 (home-page "https://github.com/fazibear/colorize")
12917 (license license:gpl2+)))
12918
12919(define-public ruby-colorator
12920 (package
12921 (name "ruby-colorator")
12922 (version "1.1.0")
12923 (source (origin
12924 (method url-fetch)
12925 (uri (rubygems-uri "colorator" version))
12926 (sha256
12927 (base32
12928 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
12929 (build-system ruby-build-system)
12930 (arguments
12931 ;; No test target
12932 `(#:tests? #f))
12933 (home-page "http://octopress.org/colorator/")
12934 (synopsis "Terminal color library")
12935 (description "Colorator is a Ruby gem that helps you colorize your text
12936for the terminal.")
12937 (license license:expat)))
12938
12939(define-public ruby-command-line-reporter
12940 (package
12941 (name "ruby-command-line-reporter")
12942 (version "4.0.1")
12943 (source (origin
12944 (method url-fetch)
12945 (uri (rubygems-uri "command_line_reporter" version))
12946 (sha256
12947 (base32
12948 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
12949 (build-system ruby-build-system)
12950 (arguments
12951 ;; No Rakefile
12952 `(#:tests? #f
12953 #:phases
12954 (modify-phases %standard-phases
12955 (add-before 'build 'fix-dependencies
12956 (lambda _
12957 (substitute* ".gemspec"
12958 ;; colored is unmaintained
12959 (("colored") "colorator")
12960 ;; colorator version
12961 (("= 1.2") "= 1.1"))
12962 #t)))))
12963 (propagated-inputs (list ruby-colorator))
12964 (home-page "https://github.com/wbailey/command_line_reporter")
12965 (synopsis "Report production while executing Ruby scripts")
12966 (description "This gem provides a DSL that makes it easy to write reports
12967of various types in ruby. It eliminates the need to litter your source with
12968puts statements, instead providing a more readable, expressive interface to
12969your application.")
12970 (license license:asl2.0)))
12971
12972(define-public ruby-command-line-reporter-3
12973 (package
12974 (inherit ruby-command-line-reporter)
12975 (version "3.3.6")
12976 (source (origin
12977 (method url-fetch)
12978 (uri (rubygems-uri "command_line_reporter" version))
12979 (sha256
12980 (base32
12981 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
12982
12983(define-public ruby-kpeg
12984 (package
12985 (name "ruby-kpeg")
12986 (version "1.3.3")
12987 (source
12988 (origin
12989 (method url-fetch)
12990 (uri (rubygems-uri "kpeg" version))
12991 (sha256
12992 (base32
12993 "0jxddpyb23digcd8b1b02gn94057a7mw17680c3c8s3bcb5xqfnp"))))
12994 (build-system ruby-build-system)
12995 (native-inputs
12996 (list ruby-hoe))
12997 (synopsis "PEG library for Ruby")
12998 (description "KPeg is a simple PEG library for Ruby. It provides an API as
12999well as native grammar to build the grammar. KPeg supports direct left
13000recursion of rules via the
13001@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
13002technique.")
13003 (home-page "https://github.com/evanphx/kpeg")
13004 (license license:expat)))
13005
13006(define-public ruby-rdoc
13007 (package
13008 (name "ruby-rdoc")
13009 (version "6.5.0")
13010 (source
13011 (origin
13012 (method git-fetch)
13013 (uri (git-reference
13014 (url "https://github.com/ruby/rdoc")
13015 (commit (string-append "v" version))))
13016 (file-name (git-file-name name version))
13017 (sha256
13018 (base32
13019 "06dcjs4s2phvg9bq42mlfqv4c4zpdr8w7aq107lm2q0qqqw7xjlr"))))
13020 (build-system ruby-build-system)
13021 (arguments
13022 `(#:phases
13023 (modify-phases %standard-phases
13024 (add-after 'unpack 'patch-gemspec
13025 ;; TODO: Remove after next release is tagged.
13026 (lambda _
13027 (substitute* "rdoc.gemspec"
13028 (("\"lib/rdoc/generator/template/darkfish/js/\
13029jquery\\.js\", ") ""))
13030 #t))
13031 (add-before 'build 'generate
13032 ;; 'gem build' doesn't honor Rakefile dependencies (see:
13033 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
13034 (lambda _
13035 (invoke "rake" "generate"))))))
13036 (native-inputs
13037 (list bundler ruby-kpeg ruby-racc ruby-rubocop))
13038 (home-page "https://ruby.github.io/rdoc/")
13039 (synopsis "HTML and command-line documentation utility")
13040 (description "RDoc produces HTML and command-line documentation for Ruby
13041projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
13042documentation from the command-line.")
13043 (license license:gpl2+)))
13044
13045(define-public ruby-sass-listen
13046 (package
13047 (name "ruby-sass-listen")
13048 (version "4.0.0")
13049 (source (origin
13050 (method url-fetch)
13051 (uri (rubygems-uri "sass-listen" version))
13052 (sha256
13053 (base32
13054 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
13055 (build-system ruby-build-system)
13056 (arguments
13057 ;; No test target
13058 `(#:tests? #f))
13059 (propagated-inputs
13060 (list ruby-rb-fsevent ruby-rb-inotify))
13061 (home-page "https://github.com/sass/listen")
13062 (synopsis "File modification notification library")
13063 (description "The Listen gem listens to file modifications and notifies you
13064about the changes.")
13065 (license license:expat)))
13066
13067(define-public ruby-terminfo
13068 (package
13069 (name "ruby-terminfo")
13070 (version "0.2")
13071 (source
13072 (origin
13073 (method url-fetch)
13074 (uri (string-append
13075 "http://www.a-k-r.org/" name "/" name "-" version ".tar.gz"))
13076 (sha256
13077 (base32
13078 "1n59dw351z6nzylgj0gpx4rpz6qhf8lrhzcbp1xqfpqvryhaxrjh"))))
13079 (build-system ruby-build-system)
13080 (arguments
13081 (list
13082 #:test-target "test"
13083 #:phases
13084 #~(modify-phases %standard-phases
13085 (delete 'replace-git-ls-files)
13086 (replace 'build
13087 (lambda _
13088 (invoke "ruby" "extconf.rb")
13089 (invoke "make")))
13090 (replace 'check
13091 (lambda* (#:key tests? #:allow-other-keys)
13092 (when tests?
13093 (for-each (lambda (f)
13094 (invoke "ruby" "-I" "test" f))
13095 (find-files "test" "^test_.*\\.rb$")))))
13096 (replace 'install
13097 (lambda _
13098 (invoke "make" "install" (string-append "prefix=" #$output)))))))
13099 (inputs
13100 (list ncurses))
13101 (native-inputs
13102 (list ruby-rubygems-tasks ruby-rdoc))
13103 (home-page "http://www.a-k-r.org/ruby-terminfo/")
13104 (synopsis "Terminfo binding for Ruby")
13105 (description "Ruby-terminfo provides terminfo binding for Ruby.")
13106 (license license:bsd-3)))
13107
13108(define-public ruby-diffy
13109 (package
13110 (name "ruby-diffy")
13111 (version "3.2.1")
13112 (source
13113 (origin
13114 (method url-fetch)
13115 (uri (rubygems-uri "diffy" version))
13116 (sha256
13117 (base32
13118 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
13119 (build-system ruby-build-system)
13120 (arguments
13121 ;; No tests
13122 `(#:tests? #f))
13123 (native-inputs
13124 (list ruby-rspec))
13125 (home-page "https://github.com/samg/diffy")
13126 (synopsis "Convenient diffing in ruby")
13127 (description "Diffy provides a convenient way to generate a diff from two
13128strings or files.")
13129 (license license:expat)))
13130
13131(define-public ruby-sass-spec
13132 (package
13133 (name "ruby-sass-spec")
13134 (version "3.5.4")
13135 (source
13136 (origin
13137 (method git-fetch)
13138 (uri (git-reference
13139 (url "https://github.com/sass/sass-spec")
13140 (commit (string-append "v" version))))
13141 (file-name (git-file-name name version))
13142 (sha256
13143 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
13144 (build-system ruby-build-system)
13145 (propagated-inputs
13146 (list ruby-command-line-reporter-3
13147 ruby-diffy))
13148 (arguments
13149 (list
13150 ;; This package contains tests for a sass implementation, and the to
13151 ;; avoid any circular dependencies, the tests are not run here
13152 #:tests? #f
13153 #:phases
13154 #~(modify-phases %standard-phases
13155 (add-after 'unpack 'patch-test
13156 (lambda _
13157 (delete-file "spec/values/colors/alpha_hex-3.5/error")
13158 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
13159 (("string") "color")))))))
13160 (home-page "https://github.com/sass/sass-spec")
13161 (synopsis "Test suite for Sass")
13162 (description "Sass Spec is a test suite for Sass. Test cases are all in
13163the @file{spec} directory.")
13164 (license license:expat)))
13165
13166(define-public ruby-sass
13167 (package
13168 (name "ruby-sass")
13169 (version "3.7.4")
13170 (source
13171 (origin
13172 (method git-fetch)
13173 (uri (git-reference
13174 (url "https://github.com/sass/ruby-sass")
13175 (commit version)))
13176 (file-name (git-file-name name version))
13177 (sha256
13178 (base32 "03215h9jkni3l9w6lq28p8adaj3qzb47qgxd20l6kldjnm1a1yky"))))
13179 (build-system ruby-build-system)
13180 (arguments
13181 (list #:test-target "test:ruby"))
13182 (propagated-inputs
13183 (list ruby-sass-listen))
13184 (native-inputs
13185 (list ruby-sass-spec ruby-mathn ruby-cmath))
13186 (home-page "https://sass-lang.com/")
13187 (synopsis "CSS extension language")
13188 (description "Sass is a CSS extension language. It extends CSS with
13189features that don't exist yet like variables, nesting, mixins and inheritance.")
13190 (license license:expat)))
13191
13192(define-public ruby-sassc
13193 (package
13194 (name "ruby-sassc")
13195 (version "2.4.0")
13196 (source
13197 (origin
13198 (method url-fetch)
13199 (uri (rubygems-uri "sassc" version))
13200 (sha256
13201 (base32
13202 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
13203 (build-system ruby-build-system)
13204 (arguments
13205 '(#:modules ((guix build ruby-build-system)
13206 (guix build utils)
13207 (ice-9 textual-ports))
13208 #:phases
13209 (modify-phases %standard-phases
13210 ;; TODO: This would be better as a snippet, but the ruby-build-system
13211 ;; doesn't seem to support that
13212 (add-after 'unpack 'remove-libsass
13213 (lambda _
13214 (delete-file-recursively "ext")
13215 (with-atomic-file-replacement "sassc.gemspec"
13216 (lambda (in out)
13217 (let* ((gemspec (get-string-all in))
13218 (index (string-contains gemspec "libsass_dir")))
13219 (display (string-append
13220 (string-take gemspec index)
13221 "\nend\n")
13222 out))))
13223 #t))
13224 (add-after 'unpack 'dont-check-the-libsass-version
13225 (lambda _
13226 (substitute* "test/native_test.rb"
13227 (("assert_equal.*Native\\.version") ""))
13228 #t))
13229 (add-after 'unpack 'remove-git-from-gemspec
13230 (lambda _
13231 (substitute* "sassc.gemspec"
13232 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
13233 #t))
13234 (add-after 'unpack 'remove-extensions-from-gemspec
13235 (lambda _
13236 (substitute* "sassc.gemspec"
13237 (("\\[\"ext/extconf.rb\"\\]") "[]"))
13238 #t))
13239 (add-after 'unpack 'fix-Rakefile
13240 (lambda _
13241 (substitute* "Rakefile"
13242 (("test: 'compile:libsass'") ":test"))
13243 #t))
13244 (add-after 'unpack 'remove-unnecessary-dependencies
13245 (lambda _
13246 (substitute* "test/test_helper.rb"
13247 (("require \"pry\"") ""))
13248 #t))
13249 (add-before 'build 'patch-native.rb
13250 (lambda* (#:key inputs #:allow-other-keys)
13251 (substitute* "lib/sassc/native.rb"
13252 ((".*gem_root = spec.gem_dir") "")
13253 (("ffi_lib .*\n")
13254 (string-append
13255 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
13256 #t))
13257 ;; The gemspec still references the libsass files, so just keep the
13258 ;; one in the gem.
13259 (delete 'extract-gemspec))))
13260 (propagated-inputs
13261 (list ruby-ffi ruby-rake))
13262 (inputs
13263 (list libsass))
13264 (native-inputs
13265 (list bundler ruby-rake-compiler ruby-minitest-around
13266 ruby-test-construct))
13267 (synopsis "Use libsss from Ruby")
13268 (description
13269 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
13270bindings to the libsass library. This enables rendering
13271@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
13272 (home-page "https://github.com/sass/sassc-ruby")
13273 (license license:expat)))
13274
13275(define-public ruby-jekyll-sass-converter
13276 (package
13277 (name "ruby-jekyll-sass-converter")
13278 (version "2.1.0")
13279 (source (origin
13280 (method url-fetch)
13281 (uri (rubygems-uri "jekyll-sass-converter" version))
13282 (sha256
13283 (base32
13284 "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"))))
13285 (build-system ruby-build-system)
13286 (propagated-inputs
13287 (list ruby-sass))
13288 (arguments
13289 ;; No rakefile
13290 `(#:tests? #f))
13291 (home-page "https://github.com/jekyll/jekyll-sass-converter")
13292 (synopsis "Sass converter for Jekyll")
13293 (description "This gem provide built-in support for the Sass converter
13294in Jekyll.")
13295 (license license:expat)))
13296
13297(define-public ruby-jekyll-watch
13298 (package
13299 (name "ruby-jekyll-watch")
13300 (version "2.1.2")
13301 (source (origin
13302 (method url-fetch)
13303 (uri (rubygems-uri "jekyll-watch" version))
13304 (sha256
13305 (base32
13306 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
13307 (build-system ruby-build-system)
13308 (propagated-inputs
13309 (list ruby-listen))
13310 (arguments
13311 ;; No rakefile
13312 `(#:tests? #f))
13313 (home-page "https://github.com/jekyll/jekyll-watch")
13314 (synopsis "Jekyll auto-rebuild support")
13315 (description "This gems add the @code{--watch} switch to the jekyll CLI
13316interface. It allows Jekyll to rebuild your site when a file changes.")
13317 (license license:expat)))
13318
13319(define-public ruby-parallel
13320 (package
13321 (name "ruby-parallel")
13322 (version "1.21.0")
13323 (source
13324 (origin
13325 (method git-fetch)
13326 (uri (git-reference
13327 (url "https://github.com/grosser/parallel")
13328 (commit (string-append "v" version))))
13329 (file-name (git-file-name name version))
13330 (sha256
13331 (base32
13332 "1xqjcvl3gq3shvrqp8wc3fbqibzh4mf1yczq6np9gd79558dwj3w"))))
13333 (build-system ruby-build-system)
13334 (arguments
13335 `(;; TODO 3 test failures
13336 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
13337 ;; open unnecessary pipes
13338 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
13339 ;; SQLite in processes
13340 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
13341 ;; SQLite in threads
13342 #:tests? #f
13343 #:test-target "rspec-rerun:spec"
13344 #:phases
13345 (modify-phases %standard-phases
13346 (add-after 'unpack 'patch-Gemfile
13347 (lambda _
13348 (substitute* "Gemfile"
13349 (("gem 'rspec-legacy_formatters'") "")
13350 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
13351 (add-before 'check 'delete-Gemfile.lock
13352 (lambda _
13353 ;; Bundler isn't being used for fetching dependendencies, so
13354 ;; delete the Gemfile.lock
13355 (delete-file "Gemfile.lock")
13356 #t))
13357 (add-before 'build 'patch-gemspec
13358 (lambda _
13359 (substitute* "parallel.gemspec"
13360 (("git ls-files") "find"))
13361 #t)))))
13362 (native-inputs
13363 (list ruby-rspec
13364 ruby-rspec-rerun
13365 bundler
13366 ruby-activerecord
13367 ruby-progressbar
13368 ruby-bump
13369 procps
13370 lsof
13371 ruby-mysql2
13372 ruby-sqlite3
13373 ruby-i18n))
13374 (home-page "https://github.com/grosser/parallel")
13375 (synopsis "Parallel processing in Ruby")
13376 (description "Parallel allows you to run any code in parallel Processes
13377(to use all CPUs) or Threads(to speedup blocking operations). It is best
13378suited for map-reduce or e.g. parallel downloads/uploads.")
13379 (license license:expat)))
13380
13381(define-public ruby-cabin
13382 (package
13383 (name "ruby-cabin")
13384 (version "0.9.0")
13385 (source (origin
13386 (method url-fetch)
13387 (uri (rubygems-uri "cabin" version))
13388 (sha256
13389 (base32
13390 "0b3b8j3iqnagjfn1261b9ncaac9g44zrx1kcg81yg4z9i513kici"))))
13391 (build-system ruby-build-system)
13392 (arguments (list #:tests? #f)) ;no Rakefile in released gem
13393 (synopsis "Structured and contextual logging experiments in Ruby")
13394 (description "This Ruby library provides an experimental logging system
13395that tries to make logging more flexible and more consumable than plain-text
13396logging.")
13397 (home-page "https://github.com/jordansissel/ruby-cabin")
13398 (license license:asl2.0)))
13399
13400(define-public ruby-capybara
13401 (package
13402 (name "ruby-capybara")
13403 (version "3.38.0")
13404 (source (origin
13405 (method url-fetch)
13406 (uri (rubygems-uri "capybara" version))
13407 (sha256
13408 (base32
13409 "123198zk2ak8mziwa5jc3ckgpmsg08zn064n3aywnqm9s1bwjv3v"))))
13410 (build-system ruby-build-system)
13411 (arguments
13412 (list #:tests? #f ;sinatra is currently broken with rack 3
13413 #:phases
13414 #~(modify-phases %standard-phases
13415 (add-after 'extract-gemspec 'remove-extraneous-requirements
13416 (lambda _
13417 (substitute* "spec/spec_helper.rb"
13418 ((".*require 'selenium_statistics'.*") "")
13419 ((".*SeleniumStatistics.print_results.*") ""))))
13420 (replace 'check
13421 (lambda* (#:key tests? #:allow-other-keys)
13422 (when tests?
13423 (invoke "rspec" "spec")))))))
13424 (native-inputs
13425 (list ruby-puma
13426 ruby-rspec
13427 ruby-selenium-webdriver
13428 ruby-sinatra))
13429 (propagated-inputs
13430 (list ruby-addressable
13431 ruby-launchy
13432 ruby-matrix
13433 ruby-mini-mime
13434 ruby-nokogiri
13435 ruby-rack
13436 ruby-rack-test
13437 ruby-regexp-parser
13438 ruby-xpath))
13439 (synopsis "Integration testing tool for rack-based web applications")
13440 (description "Capybara is an integration testing tool for rack based web
13441applications. It simulates how a user would interact with a website.")
13442 (home-page "https://github.com/teamcapybara/capybara")
13443 (license license:expat)))
13444
13445(define-public ruby-cane
13446 (package
13447 (name "ruby-cane")
13448 (version "3.0.0")
13449 (source (origin
13450 (method url-fetch)
13451 (uri (rubygems-uri "cane" version))
13452 (sha256
13453 (base32
13454 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
13455 (build-system ruby-build-system)
13456 (arguments `(#:tests? #f)); No rakefile
13457 (home-page "https://github.com/square/cane")
13458 (propagated-inputs
13459 (list ruby-parallel))
13460 (synopsis "Code quality threshold checking")
13461 (description "Cane fails your build if code quality thresholds are not met.")
13462 (license license:asl2.0)))
13463
13464(define-public ruby-morecane
13465 (package
13466 (name "ruby-morecane")
13467 (version "0.2.0")
13468 (source (origin
13469 (method url-fetch)
13470 (uri (rubygems-uri "morecane" version))
13471 (sha256
13472 (base32
13473 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
13474 (build-system ruby-build-system)
13475 (home-page "https://github.com/yob/morecane")
13476 (arguments `(#:tests? #f)); No rakefile
13477 (propagated-inputs
13478 (list ruby-parallel))
13479 (synopsis "Extra checks for cane")
13480 (description "The cane gem provides a great framework for running quality
13481checks over your ruby project as part of continuous integration build. It
13482comes with a few checks out of the box, but also provides an API for loading
13483custom checks. This gem provides a set of additional checks.")
13484 (license license:expat)))
13485
13486(define-public ruby-pdf-reader
13487 (package
13488 (name "ruby-pdf-reader")
13489 (version "2.4.0")
13490 (source (origin
13491 (method git-fetch) ;no test in distributed gem archive
13492 (uri (git-reference
13493 (url "https://github.com/yob/pdf-reader")
13494 (commit (string-append "v" version))))
13495 (file-name (git-file-name name version))
13496 (sha256
13497 (base32
13498 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
13499 (build-system ruby-build-system)
13500 (arguments `(#:test-target "spec"
13501 #:phases (modify-phases %standard-phases
13502 (add-after 'unpack 'do-not-use-bundler
13503 (lambda _
13504 (substitute* "spec/spec_helper.rb"
13505 ((".*[Bb]undler.*") ""))
13506 #t)))))
13507 (native-inputs
13508 (list ruby-rspec ruby-cane ruby-morecane))
13509 (propagated-inputs
13510 (list ruby-afm ruby-ascii85 ruby-hashery ruby-rc4 ruby-ttfunk))
13511 (home-page "https://github.com/yob/pdf-reader")
13512 (synopsis "PDF parser in Ruby")
13513 (description "The PDF::Reader library implements a PDF parser conforming as
13514much as possible to the PDF specification from Adobe. It provides programmatic
13515access to the contents of a PDF file with a high degree of flexibility.")
13516 (license license:gpl3+)))
13517
13518(define-public ruby-pdf-inspector
13519 (let ((revision "1")
13520 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
13521 (package
13522 (name "ruby-pdf-inspector")
13523 (version (git-version "1.3.0" revision commit))
13524 (source (origin
13525 (method git-fetch)
13526 (uri (git-reference
13527 (url "https://github.com/prawnpdf/pdf-inspector")
13528 (commit commit)))
13529 (file-name (git-file-name name version))
13530 (sha256
13531 (base32
13532 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
13533 (build-system ruby-build-system)
13534 (arguments
13535 `(#:test-target "spec"
13536 #:phases (modify-phases %standard-phases
13537 (add-before 'build 'drop-signing-key-requirement
13538 (lambda _
13539 (substitute* "pdf-inspector.gemspec"
13540 (("spec.signing_key =.*")
13541 "spec.signing_key = nil"))
13542 #t))
13543 (replace 'check
13544 (lambda _
13545 (substitute* "pdf-inspector.gemspec"
13546 ((".*rubocop.*") "")
13547 ((".*yard.*") ""))
13548 (invoke "rspec"))))))
13549 (native-inputs
13550 (list ruby-rspec))
13551 (propagated-inputs
13552 (list ruby-pdf-reader))
13553 (home-page "https://github.com/prawnpdf/pdf-inspector")
13554 (synopsis "Analysis classes for inspecting PDF output")
13555 (description "This library provides a number of PDF::Reader based tools for
13556use in testing PDF output. Presently, the primary purpose of this tool is to
13557support the tests found in Prawn, a pure Ruby PDF generation library.")
13558 (license %prawn-project-licenses))))
13559
13560(define-public ruby-pdf-core
13561 (package
13562 (name "ruby-pdf-core")
13563 (version "0.9.0")
13564 (source (origin
13565 (method url-fetch)
13566 (uri (rubygems-uri "pdf-core" version))
13567 (sha256
13568 (base32
13569 "1fz0yj4zrlii2j08kaw11j769s373ayz8jrdhxwwjzmm28pqndjg"))))
13570 (build-system ruby-build-system)
13571 (arguments
13572 ; No test target
13573 `(#:tests? #f))
13574 (home-page "https://github.com/prawnpdf/pdf-core")
13575 (synopsis "Low level PDF features for Prawn")
13576 (description "This is an experimental gem that extracts low-level PDF
13577functionality from Prawn.")
13578 (license license:gpl3+)))
13579
13580(define-public ruby-prawn-dev
13581 (package
13582 (name "ruby-prawn-dev")
13583 (version "0.3.0")
13584 (source (origin
13585 (method url-fetch)
13586 (uri (rubygems-uri "prawn-dev" version))
13587 (sha256
13588 (base32
13589 "1hbzzgm0nwc6h8pyv8h9xx068bf676rispxcz4a0sm8nykz54z4x"))))
13590 (build-system ruby-build-system)
13591 (arguments
13592 (list
13593 #:tests? #f ;no test suite
13594 #:phases
13595 #~(modify-phases %standard-phases
13596 (add-after 'extract-gemspec 'drop-rubocop-dependency
13597 ;; Rubocop depends on Prawn. Remove it to avoid the
13598 ;; dependency cycle when using this tool to build
13599 ;; Prawn components.
13600 (lambda _
13601 (substitute* "lib/prawn/dev/tasks.rb"
13602 (("require 'rubocop/rake_task'")
13603 "")
13604 (("RuboCop::RakeTask.new")
13605 ""))
13606 (substitute* ".gemspec"
13607 ((".*add.*dependency.*(rubocop|simplecov).*")
13608 "")))))))
13609 (propagated-inputs (list ruby-rake ruby-rspec ruby-yard))
13610 (synopsis "Shared tools for Prawn projects development")
13611 (description "Prawn-dev contains tools to aid the development of the
13612various Prawn projects.")
13613 (home-page "https://prawnpdf.org/")
13614 (license license:expat)))
13615
13616(define-public ruby-prawn
13617 ;; There hasn't been a new release since 2017/03/17.
13618 (package
13619 (name "ruby-prawn")
13620 (version "2.4.0")
13621 (source (origin
13622 (method git-fetch)
13623 (uri (git-reference
13624 (url "https://github.com/prawnpdf/prawn")
13625 (commit version)))
13626 (file-name (git-file-name name version))
13627 (sha256
13628 (base32
13629 "1h1gww12wcdscij0lnd21p9zcbwrwc3miini5ppannc2birmj9ja"))))
13630 (build-system ruby-build-system)
13631 (arguments
13632 (list
13633 #:phases
13634 #~(modify-phases %standard-phases
13635 (add-before 'build 'drop-signing-key-requirement
13636 (lambda _
13637 (substitute* "prawn.gemspec"
13638 (("spec.signing_key =.*")
13639 "spec.signing_key = nil"))))
13640 (replace 'check
13641 (lambda* (#:key tests? #:allow-other-keys)
13642 (when tests?
13643 ;; The Prawn manual test fails (see:
13644 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
13645 ;; it.
13646 (invoke "rspec"
13647 "--exclude-pattern" "prawn_manual_spec.rb")))))))
13648 (propagated-inputs
13649 (list ruby-matrix
13650 ruby-pdf-core
13651 ruby-ttfunk))
13652 (native-inputs
13653 (list ruby-pdf-inspector
13654 ruby-prawn-manual-builder
13655 ruby-prawn-dev))
13656 (home-page "https://prawnpdf.org/api-docs/2.0/")
13657 (synopsis "PDF generation for Ruby")
13658 (description "Prawn is a pure Ruby PDF generation library.")
13659 (license %prawn-project-licenses)))
13660
13661(define-public ruby-prawn-table
13662 (package
13663 (name "ruby-prawn-table")
13664 (version "0.2.2")
13665 (source (origin
13666 (method url-fetch)
13667 (uri (rubygems-uri "prawn-table" version))
13668 (sha256
13669 (base32
13670 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
13671 (build-system ruby-build-system)
13672 (propagated-inputs
13673 (list ruby-prawn ruby-pdf-inspector))
13674 (native-inputs
13675 `(("bundler" ,bundler)
13676 ("ruby-yard" ,ruby-yard)
13677 ("ruby-mocha" ,ruby-mocha)
13678 ("ruby-coderay" ,ruby-coderay)
13679 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
13680 ("ruby-simplecov" ,ruby-simplecov)
13681 ("ruby-rspec-2" ,ruby-rspec-2)))
13682 (arguments
13683 '(;; TODO: 1 test fails
13684 ;; Failure/Error: pdf.page_count.should == 1
13685 ;; expected: 1
13686 ;; got: 2 (using ==)
13687 ;; # ./spec/table_spec.rb:1308
13688 ;;
13689 ;; 225 examples, 1 failure
13690 #:tests? #f
13691 #:phases
13692 (modify-phases %standard-phases
13693 (add-before 'check 'patch-gemspec
13694 (lambda _
13695 (substitute* "prawn-table.gemspec"
13696 ;; Loosen the requirement for pdf-inspector
13697 (("~> 1\\.1\\.0") ">= 0")
13698 ;; Loosen the requirement for pdf-reader
13699 (("~> 1\\.2") ">= 0"))))
13700 (replace 'check
13701 (lambda* (#:key tests? #:allow-other-keys)
13702 (when tests?
13703 (invoke "rspec"))
13704 #t)))))
13705 (home-page "https://github.com/prawnpdf/prawn-table")
13706 (synopsis "Tables support for Prawn")
13707 (description "This gem provides tables support for Prawn.")
13708 (license license:gpl3+)))
13709
13710(define-public ruby-kramdown
13711 (package
13712 (name "ruby-kramdown")
13713 (version "2.3.1")
13714 (source (origin
13715 (method url-fetch)
13716 (uri (rubygems-uri "kramdown" version))
13717 (sha256
13718 (base32
13719 "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
13720 (build-system ruby-build-system)
13721 (arguments `(#:tests? #f)); FIXME: some test failures
13722 (native-inputs
13723 (list ruby-prawn ruby-prawn-table))
13724 (home-page "https://kramdown.gettalong.org/")
13725 (synopsis "Markdown parsing and converting library")
13726 (description "Kramdown is a library for parsing and converting a superset
13727of Markdown. It is completely written in Ruby, supports standard Markdown
13728(with some minor modifications) and various extensions that have been made
13729popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
13730 (license license:expat)))
13731
13732(define-public ruby-kramdown-parser-gfm
13733 (package
13734 (name "ruby-kramdown-parser-gfm")
13735 (version "1.1.0")
13736 (source
13737 (origin
13738 (method url-fetch)
13739 (uri (rubygems-uri "kramdown-parser-gfm" version))
13740 (sha256
13741 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
13742 (build-system ruby-build-system)
13743 (arguments
13744 `(#:tests? #f)) ;no rakefile
13745 (propagated-inputs
13746 (list ruby-kramdown))
13747 (synopsis "Kramdown parser for the GFM dialect of Markdown")
13748 (description
13749 "This is a parser for kramdown that converts Markdown documents in the
13750GFM dialect to HTML.")
13751 (home-page "https://github.com/kramdown/parser-gfm")
13752 (license license:expat)))
13753
13754(define-public ruby-http-parser.rb
13755 (package
13756 (name "ruby-http-parser.rb")
13757 (version "0.6.0")
13758 (source
13759 (origin
13760 (method url-fetch)
13761 (uri (rubygems-uri "http_parser.rb" version))
13762 (sha256
13763 (base32
13764 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
13765 (build-system ruby-build-system)
13766 (arguments
13767 ;; No tests
13768 `(#:tests? #f))
13769 (native-inputs
13770 (list ruby-rake-compiler ruby-rspec))
13771 (home-page "https://github.com/tmm1/http_parser.rb")
13772 (synopsis "HTTP parser un Ruby")
13773 (description "This gem is a simple callback-based HTTP request/response
13774parser for writing http servers, clients and proxies.")
13775 (license license:expat)))
13776
13777(define-public ruby-em-websocket
13778 (package
13779 (name "ruby-em-websocket")
13780 (version "0.5.1")
13781 (source
13782 (origin
13783 (method url-fetch)
13784 (uri (rubygems-uri "em-websocket" version))
13785 (sha256
13786 (base32
13787 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
13788 (build-system ruby-build-system)
13789 (arguments
13790 ;; No tests
13791 `(#:tests? #f))
13792 (propagated-inputs
13793 (list ruby-eventmachine ruby-http-parser.rb))
13794 (native-inputs
13795 (list bundler ruby-rspec))
13796 (home-page "https://github.com/igrigorik/em-websocket")
13797 (synopsis "EventMachine based WebSocket server")
13798 (description "Em-websocket is an EventMachine based WebSocket server
13799implementation.")
13800 (license license:expat)))
13801
13802(define-public ruby-rouge
13803 (package
13804 (name "ruby-rouge")
13805 (version "3.26.1")
13806 (source (origin
13807 (method url-fetch)
13808 (uri (rubygems-uri "rouge" version))
13809 (sha256
13810 (base32
13811 "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
13812 (build-system ruby-build-system)
13813 (arguments `(#:tests? #f)); No rakefile
13814 (home-page "http://rouge.jneen.net/")
13815 (synopsis "Code highlighter")
13816 (description "Rouge is a code highlighter written in Ruby. It supports more
13817than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
13818is compatible with stylesheets designed for pygments.")
13819 (license (list
13820 ;; rouge is licensed under expat
13821 license:expat
13822 ;; pygments is licensed under bsd-2
13823 license:bsd-2))))
13824
13825(define-public ruby-hashie
13826 (package
13827 (name "ruby-hashie")
13828 (version "5.0.0")
13829 (source (origin
13830 (method git-fetch) ;for tests
13831 (uri (git-reference
13832 (url "https://github.com/hashie/hashie")
13833 (commit (string-append "v" version))))
13834 (file-name (git-file-name name version))
13835 (sha256
13836 (base32
13837 "0ihami0cdn71cvwzwgr3vxqvqi0ifqsna0vlyqiqlhsnf93w0cm8"))))
13838 (build-system ruby-build-system)
13839 (arguments
13840 (list #:test-target "spec"
13841 #:phases #~(modify-phases %standard-phases
13842 (add-after 'unpack 'disable-bundler
13843 (lambda _
13844 (substitute* "Rakefile"
13845 ((".*require 'bundler'.*") "")
13846 ((".*Bundler.setup.*") "")
13847 (("Bundler::GemHelper\\.install_tasks") ""))))
13848 (add-after 'unpack 'disable-rubocop
13849 (lambda _
13850 (substitute* "Rakefile"
13851 (("require 'rubocop/rake_task'") "")
13852 (("RuboCop::RakeTask.new") ""))))
13853 (add-after 'unpack 'relax-requirements
13854 (lambda _
13855 ;; Contains multiple extraneous dependencies.
13856 (delete-file "Gemfile"))))))
13857 (native-inputs (list ruby-json ruby-pry ruby-rspec ruby-rspec-pending-for))
13858 (home-page "https://github.com/hashie/hashie")
13859 (synopsis "Extensions to Ruby Hashes")
13860 (description "Hashie is a collection of classes and mixins that make Ruby
13861hashes more powerful.")
13862 (license license:expat)))
13863
13864(define-public ruby-heredoc-unindent
13865 (package
13866 (name "ruby-heredoc-unindent")
13867 (version "1.2.0")
13868 (source (origin
13869 (method url-fetch)
13870 (uri (rubygems-uri "heredoc_unindent" version))
13871 (sha256
13872 (base32
13873 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
13874 (build-system ruby-build-system)
13875 (native-inputs
13876 (list ruby-hoe-3))
13877 (home-page "https://github.com/adrianomitre/heredoc_unindent")
13878 (synopsis "Heredoc indentation cleaner")
13879 (description "This gem removes common margin from indented strings, such
13880as the ones produced by indented heredocs. In other words, it strips out
13881leading whitespace chars at the beginning of each line, but only as much as
13882the line with the smallest margin.
13883
13884It is acknowledged that many strings defined by heredocs are just code and
13885fact is that most parsers are insensitive to indentation. If, however, the
13886strings are to be used otherwise, be it for printing or testing, the extra
13887indentation will probably be an issue and hence this gem.")
13888 (license license:expat)))
13889
13890(define-public ruby-safe-yaml
13891 (package
13892 (name "ruby-safe-yaml")
13893 (version "1.0.5")
13894 (source
13895 (origin
13896 (method git-fetch)
13897 (uri (git-reference
13898 (url "https://github.com/dtao/safe_yaml")
13899 (commit version)))
13900 (file-name (git-file-name name version))
13901 (sha256
13902 (base32
13903 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
13904 (build-system ruby-build-system)
13905 (native-inputs
13906 (list ruby-rspec ruby-hashie ruby-heredoc-unindent))
13907 (arguments
13908 (list
13909 #:ruby ruby-2.7
13910 #:test-target "spec"
13911 #:phases
13912 #~(modify-phases %standard-phases
13913 (add-before 'check 'set-TZ
13914 (lambda _
13915 ;; This test is dependent on the timezone
13916 ;; spec/transform/to_date_spec.rb:35
13917 ;; # SafeYAML::Transform::ToDate converts times to the local
13918 ;; timezone
13919 (setenv "TZ" "UTC-11"))))))
13920 (home-page "https://github.com/dtao/safe_yaml")
13921 (synopsis "YAML parser")
13922 (description "The SafeYAML gem provides an alternative implementation of
13923YAML.load suitable for accepting user input in Ruby applications.")
13924 (license license:expat)))
13925
13926(define-public ruby-yaml-lint
13927 (package
13928 (name "ruby-yaml-lint")
13929 (version "0.0.10")
13930 (source
13931 (origin
13932 (method git-fetch)
13933 (uri (git-reference
13934 (url "https://github.com/Pryz/yaml-lint")
13935 (commit version)))
13936 (file-name (git-file-name name version))
13937 (sha256
13938 (base32
13939 "1jz26mxjkdyjbgqp7f9isnzd1i6vkizsswyj1v639nmq31hwfh0d"))))
13940 (build-system ruby-build-system)
13941 (arguments
13942 `(#:phases
13943 (modify-phases %standard-phases
13944 (replace 'check
13945 (lambda* (#:key tests? #:allow-other-keys)
13946 (when tests?
13947 (invoke "rspec"))
13948 #t)))))
13949 (native-inputs
13950 (list ruby-coveralls ruby-rspec ruby-simplecov))
13951 (synopsis "Simple YAML check tool")
13952 (description
13953 "@code{yaml-lint} will simply try to load the YAML file with the built-in
13954Ruby yaml library.")
13955 (home-page "https://github.com/Pryz/yaml-lint")
13956 (license license:expat)))
13957
13958(define-public ruby-matrix
13959 (package
13960 (name "ruby-matrix")
13961 (version "0.4.2")
13962 (source (origin
13963 (method git-fetch) ;for tests
13964 (uri (git-reference
13965 (url "https://github.com/ruby/matrix")
13966 (commit (string-append "v" version))))
13967 (file-name (git-file-name name version))
13968 (sha256
13969 (base32
13970 "1asxr0jzh39lk5f8a9wm5avykrcy0v2wgd1bl3cszjczh99xy5k2"))))
13971 (build-system ruby-build-system)
13972 (synopsis "@code{Matrix} and @code{Vector} classes implementation for Ruby")
13973 (description "This Ruby library provides an implementation of the
13974@code{Matrix} and @code{Vector} classes. The @code{Matrix} class represents a
13975mathematical matrix. It provides methods for creating matrices, operating on
13976them arithmetically and algebraically, and determining their mathematical
13977properties (trace, rank, inverse, determinant, eigensystem, etc.). The
13978@code{Vector} class represents a mathematical vector, which is useful in its
13979own right, and also constitutes a row or column of a @code{Matrix}.")
13980 (home-page "https://github.com/ruby/matrix")
13981 (license license:bsd-2)))
13982
13983(define-public ruby-m
13984 (package
13985 (name "ruby-m")
13986 (version "1.6.1")
13987 (source (origin
13988 (method git-fetch) ;for tests
13989 (uri (git-reference
13990 (url "https://github.com/qrush/m")
13991 (commit (string-append "v" version))))
13992 (file-name (git-file-name name version))
13993 (sha256
13994 (base32
13995 "1aycfc8l1bsln1y300fv75fknn4amjcvc4rm2kd8hb6cqivjq5rg"))))
13996 (build-system ruby-build-system)
13997 (arguments
13998 (list
13999 #:phases
14000 #~(modify-phases %standard-phases
14001 (add-after 'unpack 'sanitize-dependencies
14002 (lambda _
14003 (delete-file "Gemfile")
14004 (delete-file "Gemfile.lock")
14005 ;; Rocco is unmaintained as of 2023/01/08; avoid depending on
14006 ;; it.
14007 (substitute* "m.gemspec"
14008 ;; The rdiscount and rocco dependencies are used for
14009 ;; generating the documentation.
14010 ((".*rdiscount.*") "")
14011 ((".*rocco.*") "")
14012 ((".*appraisal.*") "")
14013 ((".*coveralls.*") ""))
14014 (substitute* "Rakefile"
14015 ;; ruby-appraisal is not packaged, and is used to test against
14016 ;; various dependencies; circumvent its use.
14017 ((".*require 'appraisal'.*") "")
14018 ((".*require 'coveralls'.*") "")
14019 (("appraisal [:graphic:]+ rake")
14020 "rake")
14021 (("Coveralls.push!") ""))))
14022 (add-before 'replace-git-ls-files 'pre-replace-git-ls-files
14023 (lambda _
14024 (substitute* "m.gemspec"
14025 (("git ls-files -- bin/\\*")
14026 "find bin -type f -not -regex '.*\\.gem$' | sort")
14027 (("git ls-files -- \\{test,spec,features}/\\*")
14028 "find test -type f -not -regex '.*\\.gem$' | sort"))))
14029 (delete 'check)
14030 (add-after 'install 'check
14031 (lambda* (#:key tests? #:allow-other-keys)
14032 (setenv "GEM_PATH" (string-append
14033 (getenv "GEM_PATH") ":"
14034 #$output "/lib/ruby/vendor_ruby"))
14035 (when tests?
14036 (invoke "rake" "test")))))))
14037 (native-inputs (list ruby-activesupport))
14038 (propagated-inputs (list ruby-method-source ruby-rake))
14039 (synopsis "Ruby test runner that can run tests by line number")
14040 (description "@code{m} stands for metal, a better test/unit and
14041@code{minitest} test runner that can run tests by line number.")
14042 (home-page "https://github.com/qrush/m")
14043 (license license:expat)))
14044
14045(define-public ruby-mercenary
14046 (package
14047 (name "ruby-mercenary")
14048 (version "0.4.0")
14049 (source (origin
14050 (method url-fetch)
14051 (uri (rubygems-uri "mercenary" version))
14052 (sha256
14053 (base32
14054 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
14055 (build-system ruby-build-system)
14056 (arguments `(#:test-target "spec"))
14057 (native-inputs
14058 (list bundler))
14059 (home-page "https://github.com/jekyll/mercenary")
14060 (synopsis "Command-line apps library in Ruby")
14061 (description "Mercenary is a lightweight and flexible library for writing
14062command-line apps in Ruby.")
14063 (license license:expat)))
14064
14065(define-public ruby-launchy
14066 (package
14067 (name "ruby-launchy")
14068 (version "2.5.2")
14069 (source (origin
14070 (method url-fetch)
14071 (uri (rubygems-uri "launchy" version))
14072 (sha256
14073 (base32
14074 "06r43899384das2bkbrpsdxsafyyqa94il7111053idfalb4984a"))))
14075 (build-system ruby-build-system)
14076 (native-inputs (list curl links ruby-simplecov))
14077 (propagated-inputs (list ruby-addressable))
14078 (synopsis "Ruby helper class for launching applications")
14079 (description
14080 "Launchy is helper class for launching applications in a fire and forget
14081manner. The aim of Launchy is to provide a common approach to launching
14082external applications from within Ruby programs.")
14083 (home-page "https://github.com/copiousfreetime/launchy")
14084 (license license:isc)))
14085
14086(define-public ruby-liquid
14087 (package
14088 (name "ruby-liquid")
14089 (version "5.4.0")
14090 (source (origin
14091 (method git-fetch) ;for tests
14092 (uri (git-reference
14093 (url "https://github.com/Shopify/liquid")
14094 (commit (string-append "v" version))))
14095 (file-name (git-file-name name version))
14096 (sha256
14097 (base32
14098 "1qdnvd1f9zs6wyilcgxyh93wis7ikbpimjxfpbkpk2ngr1m2c8la"))))
14099 (build-system ruby-build-system)
14100 (arguments
14101 (list
14102 #:phases
14103 #~(modify-phases %standard-phases
14104 (delete 'check) ;moved after the install phase
14105 (add-after 'install 'check
14106 (assoc-ref %standard-phases 'check))
14107 (add-before 'check 'set-GEM_PATH
14108 (lambda _
14109 (setenv "GEM_PATH" (string-append
14110 (getenv "GEM_PATH") ":"
14111 #$output "/lib/ruby/vendor_ruby"))))
14112 (add-before 'check 'delete-problematic-tests
14113 (lambda _
14114 ;; The following test fails with 'Unknown tag' errors (see:
14115 ;; https://github.com/Shopify/liquid/issues/1699).
14116 (delete-file "test/integration/tags/inline_comment_test.rb"))))))
14117 (native-inputs (list ruby-liquid-c-bootstrap ruby-rspec ruby-stackprof))
14118 (home-page "https://shopify.github.io/liquid/")
14119 (synopsis "Template language")
14120 (description "Liquid is a template language written in Ruby. It is used
14121to load dynamic content on storefronts.")
14122 (license license:expat)))
14123
14124(define-public ruby-liquid-4
14125 (package
14126 (inherit ruby-liquid)
14127 (name "ruby-liquid")
14128 (version "4.0.4")
14129 (source (origin
14130 (method git-fetch) ;for tests
14131 (uri (git-reference
14132 (url "https://github.com/Shopify/liquid")
14133 (commit (string-append "v" version))))
14134 (file-name (git-file-name name version))
14135 (sha256
14136 (base32
14137 "0cr321nd0zkbxirgdfmz37xx7j26zfnicjh585fi20vx60frry83"))))
14138 (arguments (list #:tests? #f)))) ;avoid required an older ruby-liquid-c
14139
14140;;; This variant is purposefully incomplete, lacking ruby-liquid so that it
14141;;; can be used for ruby-liquid's test suite.
14142(define ruby-liquid-c-bootstrap
14143 (package
14144 (name "ruby-liquid-c-bootstrap")
14145 (version "4.1.0")
14146 (source (origin
14147 (method url-fetch)
14148 (uri (rubygems-uri "liquid-c" version))
14149 (sha256
14150 (base32
14151 "0jl37jz9hbfbhknryx4myxqx4n1f5dzyzmf1sapkcbw93xyrmkch"))))
14152 (build-system ruby-build-system)
14153 (arguments (list #:tests? #f))
14154 (native-inputs (list ruby-rake-compiler))
14155 (synopsis "Liquid performance extension in C")
14156 (description "This package provides a Partial native implementation of the
14157liquid ruby gem in C that makes it operate about three times faster.")
14158 (home-page "https://github.com/shopify/liquid-c")
14159 (license license:expat)))
14160
14161(define-public ruby-liquid-c
14162 (package/inherit ruby-liquid-c-bootstrap
14163 (name "ruby-liquid-c")
14164 (arguments
14165 (list
14166 ;; Only run the unit tests, because the test:integration target fails
14167 ;; with "File does not exist: test_helper" (see:
14168 ;; https://github.com/Shopify/liquid-c/issues/188).
14169 #:test-target "test:unit"
14170 #:phases
14171 #~(modify-phases %standard-phases
14172 (add-after 'extract-gemspec 'relax-requirements
14173 (lambda _
14174 (substitute* "Gemfile"
14175 ;; Do not attempt to fetch a gem from git.
14176 (("git_source\\(:github) do \\|repo_name\\|")
14177 "if false")
14178 ((", github: \"Shopify/liquid\", ref: \"master\"")
14179 "")
14180 ;; Remove extraneous dependencies.
14181 ((".*byebug.*") "")
14182 ((".*rubocop.*") "")
14183 ;; Relax spy version specification.
14184 (("gem \"spy\", \"0.4.1\"")
14185 "gem \"spy\", \">= 0.4.1\"")))))))
14186 (native-inputs
14187 (list ruby-benchmark-ips
14188 ruby-rake-compiler
14189 ruby-ruby-memcheck
14190 ruby-spy
14191 ruby-stackprof))
14192 (propagated-inputs
14193 (list ruby-liquid))))
14194
14195(define-public ruby-localhost
14196 (package
14197 (name "ruby-localhost")
14198 (version "1.1.10")
14199 (source (origin
14200 (method git-fetch) ;for tests
14201 (uri (git-reference
14202 (url "https://github.com/socketry/localhost")
14203 (commit (string-append "v" version))))
14204 (file-name (git-file-name name version))
14205 (sha256
14206 (base32
14207 "1yp70w15wpfk613ap5f4y15yx4n2qqwa67vqc2f4lv7npf3llcz0"))))
14208 (build-system ruby-build-system)
14209 (arguments
14210 ;; XXX: The test suite requires sus-fixtures-async, which requires async,
14211 ;; only available for Ruby 3.0.
14212 (list #:tests? #f
14213 #:phases
14214 #~(modify-phases %standard-phases
14215 (add-before 'build 'remove-missing-signing-key
14216 (lambda _
14217 ;; Otherwise, the build fails with ENOENT.
14218 (substitute* "localhost.gemspec"
14219 ((".*spec.signing_key.*") "")))))))
14220 (synopsis "API for generating per-user self-signed root certificates")
14221 (description "This package provides @code{localhost}, a Ruby library for
14222Managing a local certificate authority for self-signed, localhost development
14223servers.")
14224 (home-page "https://github.com/socketry/localhost")
14225 (license license:expat)))
14226
14227(define-public ruby-forwardable-extended
14228 (package
14229 (name "ruby-forwardable-extended")
14230 (version "2.6.0")
14231 (source (origin
14232 (method url-fetch)
14233 (uri (rubygems-uri "forwardable-extended" version))
14234 (sha256
14235 (base32
14236 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
14237 (build-system ruby-build-system)
14238 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
14239 (home-page "https://github.com/envygeeks/forwardable-extended")
14240 (synopsis "Delegation to hashes and instance variables in Forwardable")
14241 (description "Forwardable Extended provides more @code{Forwardable}
14242methods for your source as @code{Forwardable::Extended}.")
14243 (license license:expat)))
14244
14245(define-public ruby-pathutil
14246 (package
14247 (name "ruby-pathutil")
14248 (version "0.16.2")
14249 (source (origin
14250 (method url-fetch)
14251 (uri (rubygems-uri "pathutil" version))
14252 (sha256
14253 (base32
14254 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
14255 (build-system ruby-build-system)
14256 (propagated-inputs
14257 (list ruby-forwardable-extended))
14258 (native-inputs
14259 (list bundler ruby-rspec))
14260 ;; Fails with: cannot load such file --
14261 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
14262 (arguments `(#:tests? #f))
14263 (home-page "https://github.com/envygeeks/pathutil")
14264 (synopsis "Extended implementation of Pathname")
14265 (description "Pathutil tries to be a faster pure Ruby implementation of
14266Pathname.")
14267 (license license:expat)))
14268
14269(define-public ruby-terminal-table
14270 (package
14271 (name "ruby-terminal-table")
14272 (version "3.0.2")
14273 (source (origin
14274 (method git-fetch)
14275 (uri (git-reference
14276 (url "https://github.com/tj/terminal-table")
14277 (commit (string-append "v" version))))
14278 (file-name (git-file-name name version))
14279 (sha256
14280 (base32
14281 "1c3f7ng3lxq962n8sbmlsvjx6srh5i801wzsyhxmfz2g880f5jps"))))
14282 (arguments
14283 '(#:phases
14284 (modify-phases %standard-phases
14285 (add-before 'check 'remove-unnecessary-dependencies
14286 (lambda _
14287 (substitute* "terminal-table.gemspec"
14288 (("s.add_runtime_dependency.*") "\n")
14289 (("s.add_development_dependency.*") "\n"))
14290 (substitute* "Gemfile"
14291 ((".*tins.*") "\n"))))
14292 (replace 'check
14293 (lambda* (#:key tests? #:allow-other-keys)
14294 (when tests?
14295 (invoke "rspec")))))))
14296 (build-system ruby-build-system)
14297 (propagated-inputs
14298 (list ruby-unicode-display-width))
14299 (native-inputs
14300 (list ruby-rspec ruby-term-ansicolor))
14301 (home-page "https://github.com/tj/terminal-table")
14302 (synopsis "Simple, feature rich ASCII table generation library")
14303 (description
14304 "Terminal Table is a fast and simple, yet feature rich
14305table generator written in Ruby. It supports ASCII and
14306Unicode formatted tables.")
14307 (license license:expat)))
14308
14309(define-public jekyll
14310 (package
14311 (name "jekyll")
14312 (version "4.3.2")
14313 (source (origin
14314 (method git-fetch) ;for tests
14315 (uri (git-reference
14316 (url "https://github.com/jekyll/jekyll")
14317 (commit (string-append "v" version))))
14318 (file-name (git-file-name name version))
14319 (sha256
14320 (base32
14321 "1d588d7zhp526r21f9mnm204m8qy0c8h3lq3ghyg6qp8mj6hnwj4"))))
14322 (build-system ruby-build-system)
14323 (arguments
14324 (list #:modules '((guix build ruby-build-system)
14325 (guix build utils)
14326 (ice-9 ftw)
14327 (srfi srfi-26))
14328 ;; The cucumber acceptance suite is not run as it depends on an old
14329 ;; version (5).
14330 #:test-target "spec"
14331 #:phases
14332 #~(modify-phases %standard-phases
14333 (add-before 'check 'disable-problematic-tests
14334 ;; TODO: Package the missing test inputs.
14335 (lambda _
14336 (with-directory-excursion "test"
14337 ;; Requires 'jekyll-coffeescript'.
14338 (delete-file "test_coffeescript.rb")
14339 ;; Requires 'tomlrb'.
14340 (delete-file "test_configuration.rb")
14341 (substitute* "test_filters.rb"
14342 ;; The sassify tests fail due to white space
14343 ;; differences (see:
14344 ;; https://github.com/jekyll/jekyll/issues/9322).
14345 ((".*s?ssify with simple string.*" all)
14346 (string-append all
14347 " skip('fails on guix')\n")))
14348 ;; Requires kramdown-syntax-coderay.
14349 (delete-file "test_kramdown.rb")
14350 ;; Requires 'test-theme', usually made available from the
14351 ;; local checkout via Bundler (not used here).
14352 (delete-file "test_layout_reader.rb")
14353 ;; Requires a large amount of un-packaged dependencies.
14354 (delete-file "test_plugin_manager.rb")
14355 ;; Requires 'classifier-reborn'.
14356 (delete-file "test_related_posts.rb")
14357 ;; This one causes a test failure similar to the ones for
14358 ;; sassify above.
14359 (delete-file "test_sass.rb")
14360 ;; This would require running the tests via 'bundle
14361 ;; exec', but the Gemfile contains too many (extraneous)
14362 ;; dependencies.
14363 (delete-file "test_site.rb")
14364 ;; Delete the theme tests, as they require 'test-theme',
14365 ;; usually made available from the local checkout via the
14366 ;; Gemfile/bundler (not used here).
14367 (for-each delete-file
14368 (scandir
14369 "." (cut string-prefix? "test_theme" <>)))
14370 ;; This one also relies on 'test-theme'.
14371 (delete-file "test_liquid_renderer.rb")
14372 ;; This test assumes internet connectivity, negate it, as
14373 ;; there's no Internet in the build container.
14374 (substitute* "test_utils.rb"
14375 (("assert Utils::Internet\\.connected\\?")
14376 "refute Utils::Internet.connected?"))
14377 ;; These tests fail non-deterministically (see:
14378 ;; https://github.com/jekyll/jekyll/issues/9323).
14379 (delete-file "test_new_command.rb")
14380 (delete-file "test_collections.rb"))))
14381 (replace 'check
14382 (lambda* (#:key tests? #:allow-other-keys)
14383 (when tests?
14384 ;; Invoke the test scripts manually, as 'rake test'
14385 ;; doesn't show any failure details, making debugging
14386 ;; needlessly difficult.
14387 (for-each (lambda (f)
14388 (invoke "ruby" "-I" "test" f))
14389 (find-files "test" "^test_.*\\.rb$"))))))))
14390 (native-inputs
14391 (list bundler
14392 ruby-httpclient
14393 ruby-minitest-profile
14394 ruby-minitest-reporters
14395 ruby-nokogiri
14396 ruby-rspec
14397 ruby-rspec-mocks
14398 ruby-shoulda
14399 ruby-simplecov))
14400 (propagated-inputs
14401 (list ruby-addressable
14402 ruby-colorator
14403 ruby-em-websocket
14404 ruby-i18n
14405 ruby-jekyll-sass-converter
14406 ruby-jekyll-watch
14407 ruby-kramdown-parser-gfm
14408 ruby-liquid-4
14409 ruby-mercenary
14410 ruby-pathutil
14411 ruby-rouge
14412 ruby-safe-yaml
14413 ruby-sassc
14414 ruby-terminal-table
14415 ruby-webrick))
14416 (home-page "https://jekyllrb.com/")
14417 (synopsis "Static site generator")
14418 (description "Jekyll is a simple, blog aware, static site generator.")
14419 (license license:expat)))
14420
14421(define-public ruby-jekyll-paginate-v2
14422 (package
14423 (name "ruby-jekyll-paginate-v2")
14424 (version "3.0.0")
14425 (source (origin
14426 (method url-fetch)
14427 (uri (rubygems-uri "jekyll-paginate-v2" version))
14428 (sha256
14429 (base32
14430 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
14431 (build-system ruby-build-system)
14432 (propagated-inputs
14433 (list jekyll))
14434 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
14435 (synopsis "Pagination Generator for Jekyll 3")
14436 (description "The Pagination Generator forms the core of the pagination
14437logic in Jekyll. It calculates and generates the pagination pages.")
14438 (license license:expat)))
14439
14440(define-public ruby-faraday-net-http
14441 (package
14442 (name "ruby-faraday-net-http")
14443 (version "3.0.2")
14444 (source (origin
14445 (method url-fetch)
14446 (uri (rubygems-uri "faraday-net_http" version))
14447 (sha256
14448 (base32
14449 "13byv3mp1gsjyv8k0ih4612y6vw5kqva6i03wcg4w2fqpsd950k8"))))
14450 (build-system ruby-build-system)
14451 ;; Do not run the test suite here as it would introduce a dependency cycle
14452 ;; with ruby-faraday, which uses it as part of its test suite.
14453 (arguments (list #:tests? #f))
14454 (synopsis "Faraday adapter for Net::HTTP")
14455 (description "This gem is a Faraday adapter for the @code{Net::HTTP}
14456library. Faraday is an HTTP client library that provides a common interface
14457over many adapters.")
14458 (home-page "https://github.com/lostisland/faraday-net_http")
14459 (license license:expat)))
14460
14461(define-public ruby-faraday
14462 (package
14463 (name "ruby-faraday")
14464 (version "2.7.4")
14465 (source (origin
14466 (method git-fetch)
14467 (uri (git-reference
14468 (url "https://github.com/lostisland/faraday")
14469 (commit (string-append "v" version))))
14470 (file-name (git-file-name name version))
14471 (sha256
14472 (base32
14473 "0ya6jqa7ryr4i62mmzjjxzd8i8y0pyw0cbhifd758rs6lvkzmxa3"))))
14474 (build-system ruby-build-system)
14475 (arguments (list #:test-target "spec"))
14476 (native-inputs
14477 (list ruby-coveralls
14478 ruby-pry
14479 ruby-rack
14480 ruby-rspec
14481 ruby-simplecov
14482 ruby-webmock))
14483 ;; Propagate faraday-net-http as this is the default adapter used, and
14484 ;; many Ruby projects assumes it is available.
14485 (propagated-inputs (list ruby-ruby2-keywords ruby-faraday-net-http))
14486 (synopsis "Ruby HTTP/REST API client library")
14487 (description "Faraday is a HTTP/REST API client library which provides a
14488common interface over different adapters.")
14489 (home-page "https://github.com/lostisland/faraday")
14490 (license license:expat)))
14491
14492(define-public ruby-nio4r
14493 (package
14494 (name "ruby-nio4r")
14495 (version "2.5.2")
14496 (source
14497 (origin
14498 (method url-fetch)
14499 (uri (rubygems-uri "nio4r" version))
14500 (sha256
14501 (base32
14502 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
14503 (build-system ruby-build-system)
14504 (arguments
14505 '(#:phases
14506 (modify-phases %standard-phases
14507 (add-after 'unpack 'remove-unnecessary-dependencies
14508 (lambda _
14509 (substitute* "spec/spec_helper.rb"
14510 ;; Coveralls is for uploading test coverage information to an
14511 ;; online service, and thus unnecessary for building the Guix
14512 ;; package
14513 (("require \"coveralls\"") "")
14514 (("Coveralls\\.wear!") "")
14515 ;; Remove rspec/retry as we are not retrying the tests
14516 (("require \"rspec/retry\"") "")
14517 (("config\\.display_try_failure_messages = true") "")
14518 (("config\\.verbose_retry = true") ""))
14519 #t))
14520 (add-before 'check 'compile
14521 (lambda _
14522 (invoke "rake" "compile")
14523 #t))
14524 (replace 'check
14525 (lambda* (#:key tests? #:allow-other-keys)
14526 (when tests?
14527 (invoke "rspec"))
14528 #t)))))
14529 (native-inputs
14530 (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop))
14531 (synopsis "New I/O for Ruby")
14532 (description
14533 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
14534for scalable network clients and servers.")
14535 (home-page "https://github.com/socketry/nio4r")
14536 (license license:expat)))
14537
14538(define-public ruby-language-server-protocol
14539 (package
14540 (name "ruby-language-server-protocol")
14541 (version "3.17.0.3")
14542 (source (origin
14543 (method git-fetch) ;for tests
14544 (uri (git-reference
14545 (url "https://github.com/mtsmfm/language_server-protocol-ruby")
14546 (commit (string-append "v" version))))
14547 (file-name (git-file-name name version))
14548 (sha256
14549 (base32
14550 "0f2g301fz99c6nkca39s9227brlycznv8a9r4b4i99rg25m91lc6"))))
14551 (build-system ruby-build-system)
14552 (arguments
14553 (list
14554 #:phases
14555 #~(modify-phases %standard-phases
14556 (add-after 'unpack 'remove-unnecessary-dependencies
14557 (lambda _
14558 (substitute* "Gemfile"
14559 (("gem \"pry-byebug\"") ""))))
14560 (replace 'replace-git-ls-files
14561 (lambda _
14562 (substitute* "language_server-protocol.gemspec"
14563 (("git ls-files -z([^`]*)" _ files)
14564 (string-append "find " files
14565 " -type f -not -regex '.*\\.gem$'"
14566 " -print0 | sort -z"))))))))
14567 (native-inputs
14568 (list ruby-activesupport
14569 ruby-benchmark-ips
14570 ruby-m
14571 ruby-minitest
14572 ruby-minitest-power-assert))
14573 (synopsis "Language Server Protocol (LSP) development kit for Ruby")
14574 (description "This package provides a Language Server Protocol (LSP)
14575development kit for Ruby.")
14576 (home-page "https://github.com/mtsmfm/language_server-protocol-ruby")
14577 (license license:expat)))
14578
14579(define-public ruby-spy
14580 (package
14581 (name "ruby-spy")
14582 (version "1.0.5")
14583 (source (origin
14584 (method url-fetch)
14585 (uri (rubygems-uri "spy" version))
14586 (sha256
14587 (base32
14588 "0g2mma8q17m26k5s864ndlvvqllhcivwg2wdigjvb7z06iw17gds"))))
14589 (build-system ruby-build-system)
14590 (arguments
14591 (list #:phases #~(modify-phases %standard-phases
14592 (add-after 'extract-gemspec 'relax-requirements
14593 (lambda _
14594 (substitute* "spy.gemspec"
14595 ((".*pry-byebug.*") ""))
14596 (substitute* "test/test_helper.rb"
14597 ((".*pry-byebug.*") ""))
14598 (substitute* "Gemfile"
14599 ((".*redcarpet.*") "")
14600 ((".*yard.*") "")))))))
14601 (native-inputs
14602 (list ruby-coveralls
14603 ruby-minitest-reporters
14604 ruby-pry
14605 ruby-rspec-core
14606 ruby-rspec-expectations))
14607 (synopsis "Mocking library for Ruby")
14608 (description "Spy is a mocking library. By default, it will raise an
14609error if you attempt to stub a method that doesn't exist or call the stubbed
14610method with the wrong arity.")
14611 (home-page "https://github.com/ryanong/spy")
14612 (license license:expat)))
14613
14614(define-public ruby-subprocess
14615 (package
14616 (name "ruby-subprocess")
14617 (version "1.5.6")
14618 (source (origin
14619 (method url-fetch)
14620 (uri (rubygems-uri "subprocess" version))
14621 (sha256
14622 (base32
14623 "0v49ahfx9b75qg42sl8a3l367g2vihc16g8z5f2raxpxjl1wh2s2"))))
14624 (build-system ruby-build-system)
14625 ;; Do not run the test suite, as there its test dependency ruby-sord would
14626 ;; introduce a cycle with ruby-sorbet-runtime.
14627 (arguments (list #:tests? #f))
14628 (native-inputs (list ruby-minitest ruby-pry))
14629 (synopsis "Ruby library to control and communicate with spawned processes")
14630 (description "This Ruby library is controlling and communicating with
14631spawned processes. It is designed after Python's @code{subprocess} module.")
14632 (home-page "https://github.com/stripe/subprocess")
14633 (license license:expat)))
14634
14635(define-public ruby-sus
14636 (package
14637 (name "ruby-sus")
14638 (version "0.20.3")
14639 (source (origin
14640 (method git-fetch) ;for gems.rb
14641 (uri (git-reference
14642 (url "https://github.com/ioquatix/sus")
14643 (commit (string-append "v" version))))
14644 (file-name (git-file-name name version))
14645 (sha256
14646 (base32
14647 "0j4rkh9li79674h3lfkxlcdygscmb22l77i7hwhxl3gw103gkpdr"))))
14648 (build-system ruby-build-system)
14649 (arguments
14650 (list #:phases
14651 #~(modify-phases %standard-phases
14652 (add-before 'build 'prune-gems.rb
14653 (lambda _
14654 (substitute* "gems.rb"
14655 (("gem \"bake-modernize\"") "")
14656 (("gem \"bake-gem\"") "")
14657 (("gem \"utopia-project\"") ""))))
14658 (add-before 'build 'remove-missing-signing-key
14659 (lambda _
14660 ;; Otherwise, the build fails with ENOENT.
14661 (substitute* "sus.gemspec"
14662 ((".*spec.signing_key.*") ""))))
14663 (delete 'check) ;moved after install
14664 (add-after 'install 'check
14665 (lambda* (#:key tests? #:allow-other-keys)
14666 (when tests?
14667 (setenv "CONSOLE_LEVEL" "debug")
14668 (setenv "HOME" "/tmp")
14669 ;; 'bundle exec' must be used to workaround a problem
14670 ;; when using bake test and GEM_PATH (see:
14671 ;; https://github.com/ioquatix/bake/issues/11).
14672 (invoke "bundle" "exec" "bake" "test"))))
14673 (add-before 'check 'set-paths
14674 (lambda _
14675 (setenv "PATH" (string-append (getenv "PATH") ":"
14676 #$output "/bin"))
14677 (setenv "GEM_PATH" (string-append
14678 (getenv "GEM_PATH") ":"
14679 #$output "/lib/ruby/vendor_ruby")))))))
14680 (native-inputs (list ruby-bake-test ruby-bake-test-external ruby-covered))
14681 (synopsis "Fast and scalable test runner for Ruby")
14682 (description "This package provides a fast and scalable test runner for Ruby.")
14683 (home-page "https://github.com/ioquatix/sus")
14684 (license license:expat)))
14685
14686(define-public ruby-syntax-tree
14687 (package
14688 (name "ruby-syntax-tree")
14689 (version "6.1.1")
14690 (source (origin
14691 (method git-fetch) ;for tests
14692 (uri (git-reference
14693 (url "https://github.com/ruby-syntax-tree/syntax_tree")
14694 (commit (string-append "v" version))))
14695 (file-name (git-file-name name version))
14696 (sha256
14697 (base32
14698 "0356lgvqp22nkqlrgszf7myfdg4arclg278awh34zyby1cx6hb2k"))))
14699 (build-system ruby-build-system)
14700 (arguments
14701 (list
14702 #:phases
14703 #~(modify-phases %standard-phases
14704 ;; The tests rely on the Gem being installed, so move the check
14705 ;; phase after the install phase.
14706 (delete 'check)
14707 (add-after 'install 'check
14708 (lambda* (#:key tests? #:allow-other-keys)
14709 (setenv "GEM_PATH" (string-append
14710 #$output "/lib/ruby/vendor_ruby:"
14711 (getenv "GEM_PATH")))
14712 (when tests?
14713 (invoke "rake" "test")))))))
14714 (native-inputs (list ruby-rubocop-ast ruby-simplecov))
14715 (propagated-inputs (list ruby-prettier-print))
14716 (synopsis "Fast Ruby parser and formatter")
14717 (description "Syntax Tree is a suite of tools built on top of the internal
14718CRuby parser. It provides the ability to generate a syntax tree from source,
14719as well as the tools necessary to inspect and manipulate that syntax tree. It
14720can be used to build formatters, linters, language servers, and more.")
14721 (home-page "https://github.com/ruby-syntax-tree/syntax_tree")
14722 (license license:expat)))
14723
14724(define sorbet-version "0.5.10610.20230106174520-1fa668010")
14725
14726(define sorbet-monorepo
14727 (origin
14728 (method git-fetch)
14729 (uri (git-reference
14730 (url "https://github.com/sorbet/sorbet")
14731 (commit sorbet-version)))
14732 (file-name (string-append "sorbet-" sorbet-version "-checkout"))
14733 (sha256
14734 (base32
14735 "0f21dl06alxwn6xgdxyrkd58plmmsv04z2bcls9ld4cfzsrs5537"))))
14736
14737(define (make-sorbet-gem-source gem)
14738 "Return the source of GEM, a sub-directory."
14739 (computed-file
14740 (string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout")
14741 (with-imported-modules (source-module-closure '((guix build utils)))
14742 #~(begin
14743 (use-modules (guix build utils))
14744 (copy-recursively (string-append #$sorbet-monorepo
14745 "/gems/sorbet-" #$gem)
14746 #$output)))))
14747
14748(define-public ruby-sorbet-runtime
14749 (package
14750 (name "ruby-sorbet-runtime")
14751 (version sorbet-version)
14752 (source (make-sorbet-gem-source "runtime"))
14753 (build-system ruby-build-system)
14754 ;; 25 out of 841 tests currently fail, seemingly due to invalid
14755 ;; assumptions about file names in the build environment (see:
14756 ;; https://github.com/sorbet/sorbet/issues/6650).
14757 (arguments (list #:tests? #f))
14758 (native-inputs
14759 (list ruby-minitest
14760 ruby-mocha
14761 ruby-rubocop
14762 ruby-rubocop-performance
14763 ruby-concurrent-ruby
14764 ruby-pry
14765 ruby-parser
14766 ruby-subprocess))
14767 (synopsis "Runtime type checking component for Sorbet")
14768 (description "Sorbet's runtime type checking component. Sorbet is a
14769powerful type checker for Ruby.")
14770 (home-page "https://sorbet.org")
14771 (license license:asl2.0)))
14772
14773(define-public ruby-mustache
14774 (package
14775 (name "ruby-mustache")
14776 (version "1.1.1")
14777 (source
14778 (origin
14779 (method url-fetch)
14780 (uri (rubygems-uri "mustache" version))
14781 (sha256
14782 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
14783 (build-system ruby-build-system)
14784 (native-inputs
14785 `(("ruby-simplecov" ,ruby-simplecov)
14786 ("test-patch"
14787 ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch"))))
14788 (arguments
14789 `(#:phases
14790 (modify-phases %standard-phases
14791 (add-after 'unpack 'patch-tests
14792 (lambda* (#:key inputs #:allow-other-keys)
14793 (invoke "patch" "-p1" "--batch" "-i"
14794 (assoc-ref inputs "test-patch")))))))
14795 (synopsis "Framework-agnostic way to render logic-free views")
14796 (description
14797 "Mustache is a framework-agnostic way to render logic-free views.
14798Think of Mustache as a replacement for your views. Instead of views
14799consisting of ERB or HAML with random helpers and arbitrary logic,
14800your views are broken into two parts: a Ruby class and an HTML
14801template.")
14802 (home-page "https://github.com/mustache/mustache")
14803 (license license:expat)))
14804
14805(define-public ruby-mustermann
14806 (package
14807 (name "ruby-mustermann")
14808 (version "3.0.0")
14809 (source
14810 (origin
14811 (method url-fetch)
14812 (uri (rubygems-uri "mustermann" version))
14813 (sha256
14814 (base32
14815 "0rwbq20s2gdh8dljjsgj5s6wqqfmnbclhvv2c2608brv7jm6jdbd"))))
14816 (build-system ruby-build-system)
14817 (arguments
14818 ;; No tests.
14819 '(#:tests? #f))
14820 (synopsis "Library implementing patterns that behave like regular expressions")
14821 (description "Given a string pattern, Mustermann will turn it into an
14822object that behaves like a regular expression and has comparable performance
14823characteristics.")
14824 (home-page "https://github.com/sinatra/mustermann")
14825 (license license:expat)))
14826
14827(define-public ruby-prettier-print
14828 (package
14829 (name "ruby-prettier-print")
14830 (version "1.2.1")
14831 (source (origin
14832 (method git-fetch) ;for tests
14833 (uri (git-reference
14834 (url "https://github.com/ruby-syntax-tree/prettier_print")
14835 (commit (string-append "v" version))))
14836 (file-name (git-file-name name version))
14837 (sha256
14838 (base32
14839 "00cg40jc0il1hpsrpsrqwhsxmx7day9lxp1ksrm08zxzsrz9ykqz"))))
14840 (build-system ruby-build-system)
14841 (native-inputs (list ruby-simplecov))
14842 (synopsis "Compatible and featureful implementation of @code{prettyprint}")
14843 (description "This package provides a drop-in replacement for the
14844@code{prettyprint} gem, with more functionality.")
14845 (home-page "https://github.com/ruby-syntax-tree/prettier_print")
14846 (license license:expat)))
14847
14848(define-public ruby-html-proofer
14849 (package
14850 (name "ruby-html-proofer")
14851 (version "5.0.3")
14852 (source
14853 (origin
14854 (method git-fetch)
14855 (uri (git-reference
14856 (url "https://github.com/gjtorikian/html-proofer")
14857 (commit (string-append "v" version))))
14858 (file-name (git-file-name name version))
14859 (sha256
14860 (base32
14861 "01ksss3ikppc45z2q33bx8bb9785bqlp1rdqascaqg9mhs392adk"))))
14862 (build-system ruby-build-system)
14863 (arguments
14864 (list
14865 ;; Tests require vcr, which is under the Hippocratic license, which is
14866 ;; not a free software license (see:
14867 ;; https://www.gnu.org/licenses/license-list.html#hippocratic).
14868 #:tests? #f
14869 #:phases
14870 #~(modify-phases %standard-phases
14871 (add-after 'extract-gemspec 'relax-requirements
14872 (lambda _
14873 (substitute* "html-proofer.gemspec"
14874 (("required_ruby_version = \\[\">= 3.1\"")
14875 "required_ruby_version = [\">= 2.6\""))))
14876 (replace 'replace-git-ls-files
14877 (lambda _
14878 ;; The html-proofer.gemspec file contains 'all_files = %x(git
14879 ;; ls-files -z).split("\x0")', but the original phase matches on
14880 ;; `git ls-files -z`.
14881 ;; TODO: Improve ruby-build-system patterns on core-updates.
14882 (substitute* "html-proofer.gemspec"
14883 (("git ls-files -z")
14884 "find . -type f -not -regex '.*\\.gem$' -print0 \
14885| sort -z | cut -zc3-")))))))
14886 (propagated-inputs
14887 (list ruby-addressable
14888 ruby-mercenary
14889 ruby-nokogiri
14890 ruby-parallel
14891 ruby-rainbow
14892 ruby-typhoeus
14893 ruby-yell))
14894 (synopsis "Test your rendered HTML files to make sure they're accurate")
14895 (description
14896 "HTMLProofer is a set of tests to validate your HTML output. These
14897tests check if your image references are legitimate, if they have alt tags,
14898if your internal links are working, and so on. It's intended to be an
14899all-in-one checker for your output.")
14900 (home-page "https://github.com/gjtorikian/html-proofer")
14901 (license license:expat)))
14902
14903(define-public ruby-htmlentities
14904 (package
14905 (name "ruby-htmlentities")
14906 (version "4.3.4")
14907 (source
14908 (origin
14909 (method url-fetch)
14910 (uri (rubygems-uri "htmlentities" version))
14911 (sha256
14912 (base32
14913 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
14914 (build-system ruby-build-system)
14915 (arguments
14916 `(#:phases
14917 (modify-phases %standard-phases
14918 (replace 'check
14919 (lambda _
14920 (map (lambda (file)
14921 (invoke "ruby" "-Itest" file))
14922 (find-files "./test" ".*_test\\.rb")))))))
14923 (synopsis "Encode and decode (X)HTML entities")
14924 (description
14925 "This package provides a module for encoding and decoding (X)HTML
14926entities.")
14927 (home-page "https://github.com/threedaymonk/htmlentities")
14928 (license license:expat)))
14929
14930;;; FIXME: Currently broken with rack 3, awaiting the merge for
14931;;; https://github.com/sinatra/sinatra/pull/1857 and a new release.
14932(define-public ruby-sinatra
14933 (package
14934 (name "ruby-sinatra")
14935 (version "3.0.5")
14936 (source
14937 (origin
14938 (method url-fetch)
14939 (uri (rubygems-uri "sinatra" version))
14940 (sha256
14941 (base32
14942 "1ryfja9yd3fq8n1p5yi3qnd0pjk7bkycmxxmbb1bj0axlr1pdv20"))))
14943 (build-system ruby-build-system)
14944 (propagated-inputs
14945 (list ruby-mustermann ruby-rack ruby-rack-protection ruby-tilt))
14946 (synopsis "DSL for quick web applications creation in Ruby")
14947 (description
14948 "Sinatra is a DSL for quickly creating web applications in Ruby with
14949minimal effort.")
14950 (home-page "https://sinatrarb.com/")
14951 (license license:expat)))
14952
14953(define-public ruby-timeout
14954 (package
14955 (name "ruby-timeout")
14956 (version "0.3.2")
14957 (source (origin
14958 (method git-fetch) ;for tests
14959 (uri (git-reference
14960 (url "https://github.com/ruby/timeout")
14961 (commit (string-append "v" version))))
14962 (file-name (git-file-name name version))
14963 (sha256
14964 (base32
14965 "0lzhs2c4znzg781w146dhvczhbx7h3wkb90i4v6h68zvm2zfylgj"))))
14966 (build-system ruby-build-system)
14967 (synopsis "Timeout library for Ruby")
14968 (description "Timeout provides a way to auto-terminate a potentially
14969long-running operation if it hasn't finished in a fixed amount of time.")
14970 (home-page "https://github.com/ruby/timeout")
14971 (license (list license:bsd-2))))
14972
14973(define-public ruby-thin
14974 (package
14975 (name "ruby-thin")
14976 (version "1.7.2")
14977 (source
14978 (origin
14979 (method url-fetch)
14980 (uri (rubygems-uri "thin" version))
14981 (sha256
14982 (base32
14983 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
14984 (build-system ruby-build-system)
14985 (arguments
14986 ;; No tests.
14987 '(#:tests? #f))
14988 (propagated-inputs
14989 (list ruby-daemons ruby-eventmachine ruby-rack))
14990 (synopsis "Thin and fast web server for Ruby")
14991 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
14992@itemize
14993@item the Mongrel parser,
14994@item Event Machine, a network I/O library with high scalability, performance
14995and stability,
14996@item Rack, a minimal interface between webservers and Ruby frameworks.
14997@end itemize\n")
14998 (home-page "https://github.com/macournoyer/thin")
14999 (license license:ruby)))
15000
15001(define-public ruby-truthy
15002 (package
15003 (name "ruby-truthy")
15004 (version "1.0.0")
15005 (source (origin
15006 (method url-fetch)
15007 (uri (rubygems-uri "truthy" version))
15008 (sha256
15009 (base32
15010 "19silgd65j3qwfk5w891p9wcmzdmi9ddm2kg5zbvvqn2h9lkfzmd"))))
15011 (build-system ruby-build-system)
15012 (arguments (list #:phases #~(modify-phases %standard-phases
15013 (replace 'check
15014 (lambda* (#:key tests? #:allow-other-keys)
15015 (when tests?
15016 (substitute* "spec/spec_helper.rb"
15017 (("require 'spec'")
15018 "require 'rspec'"))
15019 (invoke "rspec")))))))
15020 (native-inputs (list ruby-rspec))
15021 (synopsis "Object truthiness-related Ruby library")
15022 (description "This library makes it easier to discover the truth values of
15023various Ruby objects.")
15024 (home-page "https://github.com/ymendel/truthy")
15025 (license license:expat)))
15026
15027(define-public ruby-skinny
15028 (package
15029 (name "ruby-skinny")
15030 (version "0.2.4")
15031 (source
15032 (origin
15033 (method url-fetch)
15034 (uri (rubygems-uri "skinny" version))
15035 (sha256
15036 (base32
15037 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
15038 (build-system ruby-build-system)
15039 (arguments
15040 '(#:tests? #f ; No included tests
15041 #:phases
15042 (modify-phases %standard-phases
15043 (add-before 'build 'patch-gemspec
15044 (lambda _
15045 (substitute* ".gemspec"
15046 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
15047 "<eventmachine>, [\">= 1.0.0\"")
15048 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
15049 #t)))))
15050 (propagated-inputs
15051 (list ruby-eventmachine ruby-thin))
15052 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
15053 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
15054the Thin library.")
15055 (home-page "https://github.com/sj26/skinny")
15056 (license license:expat)))
15057
15058(define-public ruby-sys-filesystem
15059 (package
15060 (name "ruby-sys-filesystem")
15061 (version "1.3.4")
15062 (source (origin
15063 (method url-fetch)
15064 (uri (rubygems-uri "sys-filesystem" version))
15065 (sha256
15066 (base32
15067 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
15068 (build-system ruby-build-system)
15069 (arguments
15070 '(#:phases (modify-phases %standard-phases
15071 (add-before 'check 'set-HOME
15072 (lambda _
15073 ;; Some tests attempt to stat $HOME. Let them.
15074 (setenv "HOME" "/tmp")
15075 #t)))))
15076 (propagated-inputs
15077 (list ruby-ffi))
15078 (native-inputs
15079 (list ruby-mkmf-lite))
15080 (synopsis "Gather file system information")
15081 (description
15082 "The @code{sys-filesystem} library provides a cross-platform interface
15083for gathering file system information, such as disk space and mount points.")
15084 (home-page "https://github.com/djberg96/sys-filesystem")
15085 (license license:asl2.0)))
15086
15087(define-public mailcatcher
15088 (package
15089 (name "mailcatcher")
15090 (version "0.7.1")
15091 (source
15092 (origin
15093 (method url-fetch)
15094 (uri (rubygems-uri "mailcatcher" version))
15095 (sha256
15096 (base32
15097 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
15098 (build-system ruby-build-system)
15099 (arguments
15100 ;; Tests require web/assets which is not included in the output. We
15101 ;; might be able to fix this by adding the Git repository to the GEM_PATH
15102 ;; of the tests. See ruby-mysql2.
15103 '(#:tests? #f
15104 #:phases
15105 (modify-phases %standard-phases
15106 (add-before 'build 'patch-gemspec
15107 (lambda _
15108 (substitute* ".gemspec"
15109 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
15110 "<eventmachine>, [\">= 1.0.9.1")
15111 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
15112 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
15113 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
15114 #t))
15115 (add-before 'build 'loosen-dependency-contraint
15116 (lambda _
15117 (substitute* "lib/mail_catcher.rb"
15118 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
15119 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
15120 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
15121 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
15122 #t)))))
15123 (inputs
15124 (list ruby-eventmachine
15125 ruby-mail
15126 ruby-rack
15127 ruby-sinatra
15128 ruby-skinny
15129 ruby-sqlite3
15130 ruby-thin))
15131 (synopsis "SMTP server which catches messages to display them a browser")
15132 (description
15133 "MailCatcher runs a super simple SMTP server which catches any message
15134sent to it to display in a web interface. Run mailcatcher, set your favourite
15135app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
15136then check out http://127.0.0.1:1080 to see the mail.")
15137 (home-page "https://mailcatcher.me")
15138 (license license:expat)))
15139
15140(define-public ruby-backport
15141 (package
15142 (name "ruby-backport")
15143 (version "1.1.2")
15144 (source
15145 (origin
15146 ;; The gem does not include test code, so fetch from the Git repository.
15147 (method git-fetch)
15148 (uri (git-reference
15149 (url "https://github.com/castwide/backport")
15150 (commit (string-append "v" version))))
15151 (file-name (git-file-name name version))
15152 (sha256
15153 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
15154 (build-system ruby-build-system)
15155 (arguments
15156 `(#:test-target "spec"))
15157 (native-inputs
15158 (list bundler ruby-rspec))
15159 (inputs
15160 (list ruby-simplecov))
15161 (synopsis "Pure Ruby library for event-driven IO")
15162 (description
15163 "This package provides a pure Ruby library for event-driven IO.")
15164 (home-page "https://github.com/castwide/backport")
15165 (license license:expat)))
15166
15167(define-public ruby-json-schema
15168 (package
15169 (name "ruby-json-schema")
15170 (version "2.8.1")
15171 (source
15172 (origin
15173 (method url-fetch)
15174 (uri (rubygems-uri "json-schema" version))
15175 (sha256
15176 (base32
15177 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
15178 (build-system ruby-build-system)
15179 (arguments
15180 `(#:tests? #f ; no tests
15181 #:phases
15182 (modify-phases %standard-phases
15183 (replace 'build
15184 (lambda _
15185 (invoke "gem" "build" ".gemspec"))))))
15186 (propagated-inputs
15187 (list ruby-addressable))
15188 (synopsis "Ruby JSON Schema Validator")
15189 (description "This library provides Ruby with an interface for validating
15190JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
15191support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
15192is also included.")
15193 (home-page "https://github.com/ruby-json-schema/json-schema")
15194 (license license:expat)))
15195
15196(define-public swagger-diff
15197 (package
15198 (name "swagger-diff")
15199 (version "2.0.0")
15200 (source
15201 (origin
15202 (method url-fetch)
15203 (uri (rubygems-uri "swagger-diff" version))
15204 (sha256
15205 (base32
15206 "18kbrijkafs3vfsbaqz0cqfj7jrz3aj8xr4fgn5if63wlximybv2"))))
15207 (build-system ruby-build-system)
15208 (arguments
15209 (list
15210 #:test-target "spec"
15211 #:phases
15212 #~(modify-phases %standard-phases
15213 ;; Don't run or require rubocop, the code linting tool, as this is a
15214 ;; bit unnecessary.
15215 (add-after 'unpack 'dont-run-rubocop
15216 (lambda _
15217 (substitute* "Rakefile"
15218 ((".*rubocop.*") "")
15219 ((".*RuboCop.*") "")))))))
15220 (propagated-inputs
15221 (list ruby-json-schema))
15222 (native-inputs
15223 (list bundler ruby-rspec-core ruby-rspec-expectations))
15224 (synopsis
15225 "Compare Open API Initiative specification files")
15226 (description
15227 "Swagger::Diff is a utility for comparing two different Open API
15228Initiative (OAI) specifications (formerly known as Swagger specifications).
15229It is intended to determine whether a newer API specification is
15230backwards-compatible with an older API specification.")
15231 (home-page "https://github.com/civisanalytics/swagger-diff")
15232 (license license:bsd-3)))
15233
15234(define-public ruby-reverse-markdown
15235 (package
15236 (name "ruby-reverse-markdown")
15237 (version "1.1.0")
15238 (source
15239 (origin
15240 (method url-fetch)
15241 (uri (rubygems-uri "reverse_markdown" version))
15242 (sha256
15243 (base32
15244 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
15245 (build-system ruby-build-system)
15246 (propagated-inputs
15247 (list ruby-nokogiri))
15248 (native-inputs
15249 (list bundler ruby-rspec ruby-kramdown ruby-simplecov))
15250 (arguments
15251 `(#:phases
15252 (modify-phases %standard-phases
15253 (replace 'check
15254 (lambda* (#:key tests? #:allow-other-keys)
15255 (when tests?
15256 (invoke "rspec"))
15257 #t)))))
15258 (synopsis "Convert HTML into Markdown")
15259 (description
15260 "This Ruby module allows you to map simple HTML back into
15261Markdown---e.g., if you want to import existing HTML data in your
15262application.")
15263 (home-page "https://github.com/xijo/reverse_markdown")
15264 (license license:wtfpl2)))
15265
15266(define-public ruby-solargraph
15267 (package
15268 (name "ruby-solargraph")
15269 (version "0.40.3")
15270 (source
15271 (origin
15272 (method url-fetch)
15273 (uri (rubygems-uri "solargraph" version))
15274 (sha256
15275 (base32
15276 "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
15277 (build-system ruby-build-system)
15278 (propagated-inputs
15279 (list ruby-backport
15280 bundler
15281 ruby-benchmark
15282 ruby-e2mmap
15283 ruby-jaro-winkler
15284 ruby-kramdown
15285 ruby-kramdown-parser-gfm
15286 ruby-maruku
15287 ruby-nokogiri
15288 ruby-parser
15289 ruby-reverse-markdown
15290 ruby-rubocop
15291 ruby-thor
15292 ruby-tilt
15293 ruby-yard))
15294 (native-inputs
15295 (list ruby-rspec ruby-pry ruby-simplecov ruby-webmock))
15296 ;; FIXME: can't figure out how to run the tests properly:
15297
15298 ;; An error occurred while loading spec_helper.
15299 ;; Failure/Error: return gem_original_require(path)
15300 ;; LoadError:
15301 ;; cannot load such file -- spec_helper
15302 (arguments
15303 '(#:tests? #f
15304 #:phases
15305 (modify-phases %standard-phases
15306 (replace 'check
15307 (lambda* (#:key tests? #:allow-other-keys)
15308 (when tests?
15309 (invoke "rspec"))
15310 #t)))))
15311 (synopsis
15312 "IDE tools for code completion, inline documentation, and static analysis")
15313 (description
15314 "Solargraph provides a comprehensive suite of tools for Ruby
15315programming: intellisense, diagnostics, inline documentation, and type
15316checking.")
15317 (home-page "https://solargraph.org/")
15318 (license license:expat)))
15319
15320(define-public ruby-wayback-machine-downloader
15321 (package
15322 (name "ruby-wayback-machine-downloader")
15323 (version "2.2.1")
15324 (source
15325 (origin
15326 (method url-fetch)
15327 (uri (rubygems-uri
15328 "wayback_machine_downloader"
15329 version))
15330 (sha256
15331 (base32
15332 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
15333 (build-system ruby-build-system)
15334 (arguments
15335 '(#:tests? #f)) ; no tests
15336 (synopsis "Download archived websites from the Wayback Machine")
15337 (description
15338 "Wayback Machine Downloader is a command line tool for downloading
15339websites from the Internet Archive's Wayback Machine (archive.org).
15340It allows fine grained control over what to download by specifying
15341which snapshots to consider and what files to include.")
15342 (home-page
15343 "https://github.com/hartator/wayback-machine-downloader")
15344 (license license:expat)))
15345
15346(define-public ruby-zeitwerk
15347 (package
15348 (name "ruby-zeitwerk")
15349 (version "2.6.7")
15350 (source
15351 (origin
15352 (method git-fetch) ;for tests
15353 (uri (git-reference
15354 (url "https://github.com/fxn/zeitwerk")
15355 (commit (string-append "v" version))))
15356 (file-name (git-file-name name version))
15357 (sha256
15358 (base32
15359 "10p1ycv72yas1fdqrmdyz1aiqf8axj6q1kyllni2wknhk059jvi0"))))
15360 (build-system ruby-build-system)
15361 (native-inputs
15362 (list ruby-minitest
15363 ruby-minitest-focus
15364 ruby-minitest-proveit
15365 ruby-minitest-reporters))
15366 (synopsis "Efficient and thread-safe code loader for Ruby")
15367 (description
15368 "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
15369and application may have their own independent autoloader, with its own
15370configuration, inflector, and logger. Supports autoloading, reloading, and
15371eager loading.")
15372 (home-page "https://github.com/fxn/zeitwerk")
15373 (license license:expat)))
15374
15375(define-public ruby-wwtd
15376 (package
15377 (name "ruby-wwtd")
15378 (version "1.4.1")
15379 (home-page "https://github.com/grosser/wwtd")
15380 (source (origin
15381 (method git-fetch)
15382 (uri (git-reference
15383 (url home-page)
15384 (commit (string-append "v" version))))
15385 (file-name (git-file-name name version))
15386 (sha256
15387 (base32
15388 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
15389 (modules '((guix build utils)))
15390 (snippet
15391 '(begin
15392 ;; Remove bundled library.
15393 (delete-file "spec/rake-12.3.0.gem")
15394 #t))))
15395 (build-system ruby-build-system)
15396 (arguments
15397 '(;; XXX: Tests need multiple versions of ruby, wants to run
15398 ;; `bundle install`, etc.
15399 #:tests? #f
15400 #:phases (modify-phases %standard-phases
15401 (replace 'replace-git-ls-files
15402 (lambda _
15403 (substitute* "wwtd.gemspec"
15404 (("git ls-files lib/ bin/`")
15405 "find lib/ bin/ -type f |sort`"))
15406 #t))
15407 (add-before 'check 'remove-version-constraints
15408 (lambda _
15409 (delete-file "Gemfile.lock")
15410 #t))
15411 (replace 'check
15412 (lambda* (#:key tests? #:allow-other-keys)
15413 (if tests?
15414 (invoke "rspec" "spec/")
15415 (format #t "test suite not run~%"))
15416 #t)))))
15417 (native-inputs
15418 (list ruby-bump ruby-rspec))
15419 (synopsis "Run @file{.travis.yml} files locally")
15420 (description
15421 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
15422defined in @file{.travis.yml} on your local machine, using @code{rvm},
15423@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
15424 (license license:expat)))
15425
15426(define-public ruby-rugged
15427 ;; The last release is old and doesn't build anymore (see:
15428 ;; https://github.com/libgit2/rugged/issues/951).
15429 (let ((commit "6379f23cedd5f527cf6a5c229627e366b590a22d")
15430 (revision "0"))
15431 (package
15432 (name "ruby-rugged")
15433 (version (git-version "1.6.2" revision commit))
15434 (source (origin
15435 (method git-fetch)
15436 (uri (git-reference
15437 (url "https://github.com/libgit2/rugged")
15438 (commit commit)))
15439 (file-name (git-file-name name version))
15440 (sha256
15441 (base32
15442 "0yac7vm0l2jsdsxf2k7xbny4iyzsy8fhiy2g5sphhffp7xgynny8"))))
15443 (build-system ruby-build-system)
15444 (arguments
15445 (list #:gem-flags
15446 #~(list "--" "--use-system-libraries")
15447 #:phases
15448 #~(modify-phases %standard-phases
15449 (add-after 'unpack 'adjust-extconf.rb
15450 (lambda _
15451 ;; Neither using --with-git2-dir=$prefix nor providing
15452 ;; pkg-config allows locating the libgit2 prefix (see:
15453 ;; https://github.com/libgit2/rugged/issues/955).
15454 (substitute* "ext/rugged/extconf.rb"
15455 (("LIBGIT2_DIR = File.join.*'vendor', 'libgit2'.*")
15456 (format #f "LIBGIT2_DIR = ~s~%"
15457 #$(this-package-input "libgit2"))))))
15458 (delete 'check) ;moved after the install phase
15459 (add-after 'install 'check
15460 (assoc-ref %standard-phases 'check))
15461 (add-before 'check 'set-GEM_PATH
15462 (lambda _
15463 (setenv "GEM_PATH" (string-append
15464 (getenv "GEM_PATH") ":"
15465 #$output "/lib/ruby/vendor_ruby"))))
15466 (add-before 'check 'disable-problematic-tests
15467 (lambda _
15468 (with-directory-excursion "test"
15469 (for-each delete-file
15470 ;; These tests require an actual libgit2 git
15471 ;; repository checkout.
15472 '("blame_test.rb"
15473 "blob_test.rb"
15474 "cherrypick_test.rb"
15475 "config_test.rb"
15476 "commit_test.rb"
15477 "diff_test.rb"
15478 "index_test.rb"
15479 "merge_test.rb"
15480 "note_test.rb"
15481 "object_test.rb"
15482 "patch_test.rb"
15483 "rebase_test.rb"
15484 "reference_test.rb"
15485 "remote_test.rb"
15486 "repo_apply_test.rb"
15487 "repo_ignore_test.rb"
15488 "repo_pack_test.rb"
15489 "repo_reset_test.rb"
15490 "repo_test.rb"
15491 "revert_test.rb"
15492 "settings_test.rb"
15493 "status_test.rb"
15494 "submodule_test.rb"
15495 "tag_test.rb"
15496 "tree_test.rb"
15497 "walker_test.rb"))
15498 (delete-file-recursively "online")))))))
15499 (native-inputs (list git-minimal/pinned ruby-rake-compiler))
15500 (inputs (list libgit2))
15501 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
15502 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
15503you the speed and portability of libgit2 with the beauty of the Ruby
15504language.")
15505 (home-page "https://www.rubydoc.info/gems/rugged")
15506 (license license:expat))))
15507
15508(define-public ruby-yell
15509 (package
15510 (name "ruby-yell")
15511 (version "2.2.2")
15512 (source
15513 (origin
15514 (method url-fetch)
15515 (uri (rubygems-uri "yell" version))
15516 (sha256
15517 (base32
15518 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
15519 (build-system ruby-build-system)
15520 (arguments
15521 `(#:phases
15522 (modify-phases %standard-phases
15523 (replace 'check
15524 (lambda _
15525 (invoke "rake" "examples")))))) ; there is no test target.
15526 (synopsis
15527 "Extensible logging library for Ruby")
15528 (description
15529 "Yell is a comprehensive logging replacement for Ruby. It defines
15530multiple adapters, various log level combinations and message formatting
15531options.")
15532 (home-page "https://github.com/rudionrails/yell")
15533 (license license:expat)))
15534
15535(define-public ruby-e2mmap
15536 (package
15537 (name "ruby-e2mmap")
15538 (version "0.1.0")
15539 (source
15540 (origin
15541 (method url-fetch)
15542 (uri (rubygems-uri "e2mmap" version))
15543 (sha256
15544 (base32
15545 "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
15546 (build-system ruby-build-system)
15547 (arguments
15548 `(#:tests? #f)) ;; There is a rakefile but no tests
15549 (synopsis
15550 "Module for defining custom exceptions with specific messages")
15551 (description
15552 "Exception2MessageMapper (e2mmap) is a helper module for easily defining
15553exceptions with predefined messages.")
15554 (home-page "https://github.com/ruby/e2mmap")
15555 (license license:bsd-2)))
15556
15557(define-public ruby-benchmark
15558 (package
15559 (name "ruby-benchmark")
15560 (version "0.1.1")
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (rubygems-uri "benchmark" version))
15565 (sha256
15566 (base32
15567 "1jvrl7400fv7v2jjri1r7ilj3sri36hzipwwgpn5psib4c9c59c6"))))
15568 (build-system ruby-build-system)
15569 (synopsis "Performance benchmarking library")
15570 (description "This package provides methods for benchmarking Ruby code,
15571giving detailed reports on the time taken for each task.")
15572 (home-page "https://github.com/ruby/benchmark")
15573 (license license:bsd-2)))
15574
15575(define-public ruby-jekyll-feed
15576 (package
15577 (name "ruby-jekyll-feed")
15578 (version "0.15.1")
15579 (source
15580 (origin
15581 (method url-fetch)
15582 (uri (rubygems-uri "jekyll-feed" version))
15583 (sha256
15584 (base32
15585 "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
15586 (build-system ruby-build-system)
15587 (arguments
15588 `(#:tests? #false)) ;there are none
15589 (propagated-inputs
15590 (list jekyll))
15591 (synopsis
15592 "Jekyll plugin to generate an Atom feed of your Jekyll posts")
15593 (description
15594 "This package provides a Jekyll plugin to generate an Atom feed
15595of your Jekyll posts.")
15596 (home-page
15597 "https://github.com/jekyll/jekyll-feed")
15598 (license license:expat)))
15599
15600(define-public ruby-jekyll-sitemap
15601 (package
15602 (name "ruby-jekyll-sitemap")
15603 (version "1.4.0")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (rubygems-uri "jekyll-sitemap" version))
15608 (sha256
15609 (base32
15610 "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
15611 (build-system ruby-build-system)
15612 (arguments
15613 `(#:tests? #false)) ;there are none
15614 (propagated-inputs
15615 (list jekyll))
15616 (synopsis
15617 "Automatically generate a sitemap.xml for your Jekyll site")
15618 (description
15619 "This package provides a Jekyll plugin to silently generate
15620a sitemaps.org compliant sitemap for your Jekyll site.")
15621 (home-page
15622 "https://github.com/jekyll/jekyll-sitemap")
15623 (license license:expat)))
15624
15625(define-public ruby-jekyll-seo-tag
15626 (package
15627 (name "ruby-jekyll-seo-tag")
15628 (version "2.7.1")
15629 (source
15630 (origin
15631 (method url-fetch)
15632 (uri (rubygems-uri "jekyll-seo-tag" version))
15633 (sha256
15634 (base32
15635 "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
15636 (build-system ruby-build-system)
15637 (arguments
15638 `(#:tests? #false))
15639 (propagated-inputs
15640 (list jekyll))
15641 (synopsis
15642 "Jekyll plugin to add metadata tags for search engines and social networks")
15643 (description
15644 "This package provides a Jekyll plugin to add metadata tags for search engines
15645and social networks to better index and display your site's content.")
15646 (home-page
15647 "https://github.com/jekyll/jekyll-seo-tag")
15648 (license license:expat)))
15649
15650(define-public ruby-taskjuggler
15651 (package
15652 (name "ruby-taskjuggler")
15653 (version "3.7.1")
15654 (source
15655 (origin
15656 (method url-fetch)
15657 (uri (rubygems-uri "taskjuggler" version))
15658 (sha256
15659 (base32
15660 "1jrsajzhzpnfa8hj6lbf7adn8hls56dz3yw1gvzgz9y4zkka3k9v"))))
15661 (build-system ruby-build-system)
15662 (native-inputs (list tzdata-for-tests))
15663 (propagated-inputs
15664 (list ruby-mail ruby-term-ansicolor))
15665 (arguments
15666 '(#:phases (modify-phases %standard-phases
15667 (replace 'replace-git-ls-files
15668 (lambda _
15669 (substitute* "tasks/rdoc.rake"
15670 (("`git ls-files -- lib`")
15671 "`find lib/ -type f |sort`"))
15672 #t))
15673 (add-before 'check 'tzdir-setup
15674 (lambda* (#:key inputs #:allow-other-keys)
15675 (setenv "TZDIR"
15676 (string-append (assoc-ref inputs "tzdata")
15677 "/share/zoneinfo"))
15678 #t))
15679 (add-before 'check 'delete-test-BatchProcessor
15680 ;; test_BatchProcessor fails with exeption:
15681 ;; run> terminated with exception (report_on_exception is true)
15682 (lambda _
15683 (delete-file "test/test_BatchProcessor.rb")
15684 #t)))))
15685 (synopsis
15686 "Project management command line tool with a domain specific language")
15687 (description
15688 "TaskJuggler (tj3) is a project management tool for project planning and
15689tracking using a domain specific language; projects are plain text files
15690written using your favourite text editor. It includes reporting in HTML, CSV
15691or iCalendar format and an email based status tracking system to send and
15692receive time sheets from collaborators.
15693
15694It covers the complete spectrum of project management tasks from the first
15695idea to the completion of the project. It assists you during project scoping,
15696resource assignment, cost and revenue planning, risk and communication
15697management, status tracking and reporting.")
15698 (home-page "https://taskjuggler.org")
15699 (license license:gpl2)))
15700
15701(define-public ruby-cmath
15702 (package
15703 (name "ruby-cmath")
15704 (version "1.0.0")
15705 (source
15706 (origin
15707 (method url-fetch)
15708 (uri (rubygems-uri "cmath" version))
15709 (sha256
15710 (base32
15711 "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
15712 (build-system ruby-build-system)
15713 (arguments
15714 `(#:tests? #false))
15715 (native-inputs
15716 (list bundler ruby-rake-compiler))
15717 (synopsis "Trigonometric functions for complex numbers")
15718 (description
15719 "This gem is a library that provides trigonometric and transcendental
15720functions for complex numbers. The functions in this module accept integers,
15721floating-point numbers or complex numbers as arguments.")
15722 (home-page "https://github.com/ruby/cmath")
15723 (license license:bsd-2)))
15724
15725(define-public ruby-sucker-punch
15726 (package
15727 (name "ruby-sucker-punch")
15728 (version "3.1.0")
15729 (source
15730 (origin
15731 (method url-fetch)
15732 (uri (rubygems-uri "sucker_punch" version))
15733 (sha256
15734 (base32 "12by9vx8q6l4i56q62k1s1ymaxbpg4rny5zngj5i5h09kyh2yp4p"))))
15735 (build-system ruby-build-system)
15736 (arguments
15737 `(#:phases
15738 (modify-phases %standard-phases
15739 (add-after 'extract-gemspec 'less-strict-dependencies
15740 (lambda _
15741 (substitute* "sucker_punch.gemspec"
15742 (("1.0.0") "1.0")))))))
15743 (native-inputs
15744 (list
15745 ruby-pry))
15746 (propagated-inputs
15747 (list
15748 ruby-concurrent))
15749 (home-page "https://github.com/brandonhilkert/sucker_punch")
15750 (synopsis "Asynchronous processing library for Ruby")
15751 (description "Sucker Punch is a single-process Ruby asynchronous processing
15752library. It is perfect for asynchronous processes like emailing, data crunching
15753or social platform manipulation; and generally recommended for jobs that are
15754fast and non-mission critical like logs, emails, etc.")
15755 (license license:expat)))
15756
15757(define-public ruby-countdownlatch
15758 (package
15759 (name "ruby-countdownlatch")
15760 (version "1.0.0")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (rubygems-uri "countdownlatch" version))
15765 (sha256
15766 (base32 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
15767 (build-system ruby-build-system)
15768 (home-page "https://github.com/benlangfeld/countdownlatch")
15769 (synopsis "Thread synchronization aid Ruby")
15770 (description "CountDownLatch is a synchronization aid that allows one or
15771more threads to wait until a set of operations being performed in other threads
15772completes.")
15773 (license license:expat)))
15774
15775(define-public ruby-value-semantics
15776 (package
15777 (name "ruby-value-semantics")
15778 (version "3.6.1")
15779 (source
15780 (origin
15781 (method url-fetch)
15782 (uri (rubygems-uri "value_semantics" version))
15783 (sha256
15784 (base32 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
15785 (build-system ruby-build-system)
15786 (arguments
15787 `(#:phases
15788 (modify-phases %standard-phases
15789 (replace 'check
15790 (lambda* (#:key tests? #:allow-other-keys)
15791 (when tests?
15792 (invoke "rspec")))))))
15793 (native-inputs
15794 (list
15795 ruby-rspec))
15796 (home-page "https://github.com/tomdalling/value_semantics")
15797 (synopsis "Ruby gem for making value classes")
15798 (description "ValueSemantics generates modules that provide conventional
15799value semantics for a given set of attributes. The behaviour is similar to an
15800immutable Struct class, plus extensible, lightweight validation and coercion.")
15801 (license license:expat)))
15802
15803(define-public ruby-promise
15804 (package
15805 (name "ruby-promise")
15806 (version "0.7.4")
15807 (source
15808 (origin
15809 (method url-fetch)
15810 (uri (rubygems-uri "promise.rb" version))
15811 (sha256
15812 (base32 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
15813 (build-system ruby-build-system)
15814 (arguments
15815 `(#:test-target "spec"
15816 #:phases
15817 (modify-phases %standard-phases
15818 (add-after 'extract-gemspec 'less-strict-dependencies
15819 (lambda _
15820 (substitute* "Rakefile"
15821 (("if Gem.ruby_version.*") "if false\n"))
15822 (substitute* "spec/spec_helper.rb"
15823 ((".*devtools/spec_helper.*") "\n")))))))
15824 (native-inputs
15825 (list
15826 ruby-rspec
15827 ruby-rspec-its
15828 ruby-awesome-print
15829 ruby-fuubar))
15830 (home-page "https://github.com/lgierth/promise.rb")
15831 (synopsis "Asynchronous operation library for Ruby")
15832 (description "Promise is a Ruby implementation of the Promises/A+
15833specification. It provides 100% mutation coverage, tested on MRI 1.9, 2.0, 2.1,
158342.2, Rubinius, and JRuby.")
15835 (license license:unlicense)))
15836
15837(define-public ruby-multicodecs
15838 (package
15839 (name "ruby-multicodecs")
15840 (version "0.2.1")
15841 (source
15842 (origin
15843 (method url-fetch)
15844 (uri (rubygems-uri "multicodecs" version))
15845 (sha256
15846 (base32 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
15847 (build-system ruby-build-system)
15848 (home-page "https://github.com/SleeplessByte/ruby-multicodec")
15849 (synopsis "Ruby implementation of multiformats/multicodec")
15850 (description "Multicodecs is the ruby implementation of
15851multiformats/multicodec, a canonical table of of codecs used by various
15852multiformats.")
15853 (license license:expat)))
15854
15855(define-public ruby-multihashes
15856 (package
15857 (name "ruby-multihashes")
15858 (version "0.2.0")
15859 (source
15860 (origin
15861 (method url-fetch)
15862 (uri (rubygems-uri "multihashes" version))
15863 (sha256
15864 (base32 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
15865 (build-system ruby-build-system)
15866 (propagated-inputs
15867 (list
15868 ruby-multicodecs))
15869 (home-page "https://github.com/multiformats/ruby-multihash")
15870 (synopsis "Multihash implementation for Ruby")
15871 (description "Multihashes provides a simple, low-level multihash
15872implementation for Ruby. A multihash is a digest with an embedded hash function
15873code")
15874 (license license:expat)))
15875
15876(define-public ruby-lazy-object
15877 (package
15878 (name "ruby-lazy-object")
15879 (version "0.0.3")
15880 (source
15881 (origin
15882 (method url-fetch)
15883 (uri (rubygems-uri "lazy_object" version))
15884 (sha256
15885 (base32 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
15886 (build-system ruby-build-system)
15887 (arguments
15888 `(#:test-target "spec"))
15889 (home-page "https://github.com/HornsAndHooves/lazy_object")
15890 (synopsis "Object wrapper that forwards all calls to the reference object")
15891 (description "LazyObject is an object wrapper that forwards all calls to the
15892reference object. This object is not created until the first method dispatch.")
15893 (license license:expat)))
15894
15895(define-public ruby-citrus
15896 (package
15897 (name "ruby-citrus")
15898 (version "3.0.2")
15899 (source
15900 (origin
15901 (method git-fetch)
15902 ;; Download from GitHub because the rubygems version does not contain
15903 ;; files needed for tests.
15904 (uri (git-reference
15905 (url "https://github.com/mjackson/citrus")
15906 (commit (string-append "v" version))))
15907 (file-name (git-file-name name version))
15908 (sha256
15909 (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
15910 (build-system ruby-build-system)
15911 (home-page "https://mjackson.github.io/citrus/")
15912 (synopsis "Parsing Expressions for Ruby")
15913 (description "Citrus is a parsing library for Ruby that combines the
15914expressiveness of the language with the parsing expressions.")
15915 (license license:expat)))
15916
15917(define-public ruby-cbor
15918 (package
15919 (name "ruby-cbor")
15920 (version "0.5.9.6")
15921 (source
15922 (origin
15923 (method url-fetch)
15924 (uri (rubygems-uri "cbor" version))
15925 (sha256
15926 (base32 "0511idr8xps9625nh3kxr68sdy6l3xy2kcz7r57g47fxb1v18jj3"))))
15927 (build-system ruby-build-system)
15928 (arguments
15929 `(#:test-target "spec"))
15930 (native-inputs
15931 (list
15932 ruby-rspec
15933 ruby-rake-compiler
15934 ruby-yard))
15935 (home-page "https://cbor.io/")
15936 (synopsis "Concise Binary Object Representation")
15937 (description "CBOR is a library for the
15938@acronym{CBOR, Concise Binary Object Representation} format, based on
15939Sadayuki Furuhashi's MessagePack library.")
15940 (license license:asl2.0)))
15941
15942(define-public ruby-gem-release
15943 (package
15944 (name "ruby-gem-release")
15945 (version "2.2.2")
15946 (source
15947 (origin
15948 (method url-fetch)
15949 (uri (rubygems-uri "gem-release" version))
15950 (sha256
15951 (base32 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
15952 (build-system ruby-build-system)
15953 (arguments
15954 ;; No rakefile
15955 `(#:tests? #f))
15956 (home-page "https://github.com/svenfuchs/gem-release")
15957 (synopsis "Ruby gem plugin for release management")
15958 (description "GemRelease is a gem plugin that aims at making gem development
15959easier by automating repetitive work based on conventions, configuration, and
15960templates.")
15961 (license license:expat)))
15962
15963(define-public ruby-base32
15964 (package
15965 (name "ruby-base32")
15966 (version "0.3.4")
15967 (source
15968 (origin
15969 (method url-fetch)
15970 (uri (rubygems-uri "base32" version))
15971 (sha256
15972 (base32 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
15973 (build-system ruby-build-system)
15974 (native-inputs
15975 (list
15976 ruby-gem-release))
15977 (home-page "https://github.com/stesla/base32")
15978 (synopsis "Ruby extension for base32 encoding and decoding")
15979 (description "Base32 is a library which provides base32 decoding and
15980encoding.")
15981 (license license:expat)))
15982
15983(define-public ruby-dhall
15984 (package
15985 (name "ruby-dhall")
15986 (version "0.5.2")
15987 (source
15988 (origin
15989 (method url-fetch)
15990 (uri (rubygems-uri "dhall" version))
15991 (sha256
15992 (base32 "09wcq8xc1ynld04r2f332bx8cn7rjc4afaq8hm1dr2fc35jlpn6m"))))
15993 (build-system ruby-build-system)
15994 (arguments
15995 ;; No test in gem archive
15996 `(#:tests? #f))
15997 (propagated-inputs
15998 (list
15999 ruby-base32
16000 ruby-cbor
16001 ruby-citrus
16002 ruby-lazy-object
16003 ruby-multihashes
16004 ruby-promise
16005 ruby-value-semantics))
16006 (home-page "https://git.sr.ht/~singpolyma/dhall-ruby")
16007 (synopsis "Ruby implementation of the Dhall configuration language")
16008 (description "Dhall.rb is a Ruby implementation of the Dhall configuration
16009language. Dhall is a memory safe and non-Turing-complete configuration
16010language.")
16011 (license license:gpl3+)))
16012
16013(define-public ruby-money
16014 (package
16015 (name "ruby-money")
16016 (version "6.16.0")
16017 (source
16018 (origin
16019 (method url-fetch)
16020 (uri (rubygems-uri "money" version))
16021 (sha256
16022 (base32 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
16023 (build-system ruby-build-system)
16024 (arguments
16025 ;; No rakefile.
16026 `(#:tests? #f))
16027 (propagated-inputs
16028 (list
16029 ruby-i18n))
16030 (home-page "https://rubymoney.github.io/money/")
16031 (synopsis "Currency conversion library for Ruby")
16032 (description "RubyMoney provides a library for dealing with money and
16033currency conversion. Its features are:
16034@itemize
16035@item
16036Provides a Money class which encapsulates all information about a certain
16037amount of money, such as its value and its currency.
16038@item
16039Provides a Money::Currency class which encapsulates all information about a
16040monetary unit.
16041@item
16042Represents monetary values as integers, in cents; so avoids floating point
16043rounding errors.
16044@item
16045Represents currency as Money::Currency instances providing a high level of
16046flexibility.
16047@item Provides APIs for exchanging money from one currency to another.
16048@end itemize")
16049 (license license:expat)))
16050
16051(define-public ruby-monetize
16052 (package
16053 (name "ruby-monetize")
16054 (version "1.11.0")
16055 (source
16056 (origin
16057 (method url-fetch)
16058 (uri (rubygems-uri "monetize" version))
16059 (sha256
16060 (base32 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
16061 (build-system ruby-build-system)
16062 (arguments
16063 `(#:test-target "spec"))
16064 (native-inputs
16065 (list
16066 ruby-rspec))
16067 (propagated-inputs
16068 (list
16069 ruby-money))
16070 (home-page "https://github.com/RubyMoney/monetize")
16071 (synopsis "Convert various objects into Money objects")
16072 (description "Monetize provides a library for converting various objects
16073into Money objects.")
16074 (license license:expat)))
16075
16076(define-public ruby-money-open-exchange-rates
16077 (package
16078 (name "ruby-money-open-exchange-rates")
16079 (version "1.4.0")
16080 (source
16081 (origin
16082 (method git-fetch)
16083 ;; Download from GitHub because the rubygems version does not contain
16084 ;; Rakefile.
16085 (uri (git-reference
16086 (url "https://github.com/spk/money-open-exchange-rates")
16087 (commit (string-append "v" version))))
16088 (file-name (git-file-name name version))
16089 (sha256
16090 (base32 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
16091 (build-system ruby-build-system)
16092 (native-inputs
16093 (list
16094 ruby-minitest
16095 ruby-mocha
16096 ruby-monetize
16097 ruby-rake
16098 ruby-rubocop
16099 ruby-timecop
16100 ruby-webmock))
16101 (propagated-inputs
16102 (list
16103 ruby-money))
16104 (home-page "https://spk.github.io/money-open-exchange-rates/")
16105 (synopsis "Money open exchange rates for Ruby")
16106 (description "This package provides a gem that calculates the exchange rate
16107using published rates from open-exchange-rates. Compatible with the money gem.")
16108 (license license:expat)))
16109
16110(define-public ruby-roda
16111 (package
16112 (name "ruby-roda")
16113 (version "3.57.0")
16114 (source
16115 (origin
16116 (method url-fetch)
16117 (uri (rubygems-uri "roda" version))
16118 (sha256
16119 (base32 "0nkfxnbcfnriywvx9kpamp850cwjmqv8ssajc95d0aiyjr4kdrfy"))))
16120 (build-system ruby-build-system)
16121 (arguments
16122 ;; No rakefile
16123 `(#:tests? #f))
16124 (propagated-inputs (list ruby-rack))
16125 (home-page "https://roda.jeremyevans.net")
16126 (synopsis "Routing Tree Web Toolkit")
16127 (description "Roda is a routing tree web toolkit, designed for building fast
16128and maintainable web applications in ruby.")
16129 (license license:expat)))
16130
16131(define-public ruby-nori
16132 (package
16133 (name "ruby-nori")
16134 (version "2.6.0")
16135 (source
16136 (origin
16137 (method url-fetch)
16138 (uri (rubygems-uri "nori" version))
16139 (sha256
16140 (base32 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
16141 (build-system ruby-build-system)
16142 (arguments
16143 ;; Tests require too old version of rspec
16144 `(#:tests? #f))
16145 (native-inputs
16146 (list ruby-nokogiri
16147 ruby-rake
16148 ruby-rspec))
16149 (home-page "https://github.com/savonrb/nori")
16150 (synopsis "XML to Hash translator")
16151 (description "Nori is a simple XML parsing ripped from Crack which in-turn
16152ripped from Merb. It supports pluggable parsers and ships with both REXML and
16153Nokogiri implementations.")
16154 (license license:expat)))
16155
16156;; This package is deprecated per upstream and should be phased out.
16157(define-public ruby-faraday-middleware
16158 (package
16159 (name "ruby-faraday-middleware")
16160 (version "1.2.0")
16161 (source
16162 (origin
16163 (method url-fetch)
16164 (uri (rubygems-uri "faraday_middleware" version))
16165 (sha256
16166 (base32 "1bw8mfh4yin2xk7138rg3fhb2p5g2dlmdma88k82psah9mbmvlfy"))))
16167 (build-system ruby-build-system)
16168 (arguments `(#:tests? #f))
16169 (propagated-inputs (list ruby-faraday))
16170 (home-page "https://github.com/lostisland/faraday_middleware")
16171 (synopsis "Various middleware for Faraday")
16172 (description "Faraday_Middleware is a collection of middleware for the
16173Faraday-based API wrappers.")
16174 (license license:expat)))
16175
16176(define-public ruby-faraday-multipart
16177 (package
16178 (name "ruby-faraday-multipart")
16179 (version "1.0.4")
16180 (source (origin
16181 (method git-fetch)
16182 (uri (git-reference
16183 (url "https://github.com/lostisland/faraday-multipart")
16184 (commit (string-append "v" version))))
16185 (file-name (git-file-name name version))
16186 (sha256
16187 (base32
16188 "0ywxhff40a688n50lxrn4d8y096l8sbrwp1jfz4zd3kdiiygclka"))))
16189 (build-system ruby-build-system)
16190 (arguments (list #:test-target "spec"))
16191 (native-inputs (list ruby-faraday ruby-multipart-parser ruby-rspec))
16192 (propagated-inputs (list ruby-multipart-post))
16193 (synopsis "Multipart-post requests extension for Faraday")
16194 (description "This Ruby gem extends Faraday to perform multipart-post
16195requests.")
16196 (home-page "https://github.com/lostisland/faraday-multipart")
16197 (license license:expat)))
16198
16199(define-public ruby-bandwidth-iris
16200 (package
16201 (name "ruby-bandwidth-iris")
16202 (version "7.0.0")
16203 (source
16204 (origin
16205 (method url-fetch)
16206 (uri (rubygems-uri "ruby-bandwidth-iris" version))
16207 (sha256
16208 (base32 "131c4jhyvnrwbhizkks17fi9g85cwsq5f1p8zi408zyf63n7230d"))))
16209 (build-system ruby-build-system)
16210 (arguments
16211 ;; XXX: Tests don't require helper for some reason, so all fail.
16212 `(#:tests? #f))
16213 (native-inputs
16214 (list ruby-rspec
16215 ruby-yard))
16216 (propagated-inputs
16217 (list ruby-activesupport
16218 ruby-builder
16219 ruby-faraday
16220 ruby-faraday-middleware
16221 ruby-nori))
16222 (home-page "https://github.com/Bandwidth/ruby-bandwidth-iris")
16223 (synopsis "Gem for integrating to Bandwidth's Iris API")
16224 (description "Bandwidth IRIS is a Ruby SDK for Bandwidth Phone Number
16225Dashboard. It is a Ruby Client library for IRIS / BBS API.")
16226 (license license:expat)))
16227
16228(define-public ruby-selenium-webdriver
16229 (package
16230 (name "ruby-selenium-webdriver")
16231 (version "4.8.5")
16232 (source (origin
16233 (method url-fetch)
16234 (uri (rubygems-uri "selenium-webdriver" version))
16235 (sha256
16236 (base32
16237 "0wh44vpsyz4mgyq4h482prgiv7hqa5jsj4i7i5hnvv39jb0rfiwm"))))
16238 (build-system ruby-build-system)
16239 ;; FIXME: The gem release lacks test files, and the git checkout lacks
16240 ;; JavaScript source that is generated using Bazel, which isn't available
16241 ;; in Guix yet, so disable the test suite for now.
16242 (arguments (list #:tests? #f))
16243 (propagated-inputs (list ruby-rexml ruby-rubyzip ruby-websocket))
16244 (synopsis "Selenium browser automation bindings for Ruby")
16245 (description "Selenium implements the W3C WebDriver protocol to automate
16246popular browsers. It aims to mimic the behaviour of a real user as it
16247interacts with the application's HTML. It's primarily intended for web
16248application testing, but any web-based task can be automated. This package
16249provides the Ruby bindings of Selenium.")
16250 (home-page "https://www.selenium.dev/")
16251 (license license:asl2.0)))
16252
16253(define-public ruby-sentry-core
16254 (package
16255 (name "ruby-sentry-core")
16256 (version "5.3.1")
16257 (source
16258 (origin
16259 (method url-fetch)
16260 (uri (rubygems-uri "sentry-ruby-core" version))
16261 (sha256
16262 (base32 "141mrw8wghhsjvln9m6ld3hap3xc5v901jjiz007xywy25725hyd"))))
16263 (build-system ruby-build-system)
16264 (arguments
16265 ;; No rakefile in gem.
16266 `(#:tests? #f))
16267 (propagated-inputs
16268 (list ruby-concurrent
16269 ruby-faraday))
16270 (home-page "https://sentry.io/for/ruby/")
16271 (synopsis "Client interface for the Sentry error logger")
16272 (description "Sentry-Core provides a gem that provides a client
16273interface for the Sentry error logger.")
16274 (license license:expat)))
16275
16276(define-public ruby-sentry
16277 (package
16278 (name "ruby-sentry")
16279 (version "5.3.1")
16280 (source
16281 (origin
16282 (method url-fetch)
16283 (uri (rubygems-uri "sentry-ruby" version))
16284 (sha256
16285 (base32 "0by9mvw8rklzpyx59vfija8h3ssfvxvf5nbqxfmygfy6lm1vdngz"))))
16286 (build-system ruby-build-system)
16287 (arguments
16288 ;; No rakefile in gem
16289 `(#:tests? #f))
16290 (propagated-inputs
16291 (list ruby-concurrent
16292 ruby-faraday
16293 ruby-sentry-core))
16294 (home-page "https://sentry.io/for/ruby/")
16295 (synopsis "Client interface for the Sentry error logger")
16296 (description "Sentry provides a gem that provides a client
16297interface for the Sentry error logger.")
16298 (license license:expat)))
16299
16300(define-public ruby-webrick
16301 (package
16302 (name "ruby-webrick")
16303 (version "1.8.1")
16304 (source (origin
16305 (method git-fetch) ;for tests
16306 (uri (git-reference
16307 (url "https://github.com/ruby/webrick")
16308 (commit (string-append "v" version))))
16309 (file-name (git-file-name name version))
16310 (sha256
16311 (base32
16312 "1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
16313 (build-system ruby-build-system)
16314 (arguments
16315 (list #:phases
16316 #~(modify-phases %standard-phases
16317 (add-after 'extract-gemspec 'delete-problematic-tests
16318 (lambda _
16319 ;; The httresponse tests fail for
16320 ;; unknown reasons (see:
16321 ;; https://github.com/ruby/webrick/issues/112).
16322 (delete-file "test/webrick/test_httpresponse.rb"))))))
16323 (home-page "https://github.com/ruby/webrick")
16324 (synopsis "HTTP server toolkit")
16325 (description "WEBrick is an HTTP server toolkit that can be configured as an
16326HTTPS server, a proxy server, and a virtual-host server.")
16327 (license license:bsd-2)))
16328
16329(define-public ruby-websocket
16330 (let ((commit "950e416a19a76c7e6a673a7e5baa6283476dbec1")
16331 (revision "1"))
16332 (package
16333 (name "ruby-websocket")
16334 (version (git-version "1.2.9" revision commit))
16335 (source (origin
16336 (method git-fetch)
16337 (uri (git-reference
16338 (url "https://github.com/imanel/websocket-ruby")
16339 (commit commit)))
16340 (sha256
16341 (base32
16342 "1i6r0glpxy47zdf76aqgcpjgcgydla0733hfdhp628pmrinnkgwv"))
16343 (file-name (git-file-name name version))))
16344 (build-system ruby-build-system)
16345 (arguments (list #:test-target "spec"
16346 #:phases #~(modify-phases %standard-phases
16347 (add-after 'unpack 'disable-rubocop
16348 (lambda _
16349 (substitute* "Rakefile"
16350 (("require 'rubocop/rake_task'") "")
16351 (("RuboCop::RakeTask.new") "")))))))
16352 (native-inputs
16353 (list ruby-rspec
16354 ruby-webrick))
16355 (synopsis "WebSocket protocol Ruby library")
16356 (description "This package provides a Ruby library to handle the WebSocket
16357protocol.")
16358 (home-page "https://github.com/imanel/websocket-ruby")
16359 (license license:expat))))
16360
16361(define-public ruby-interception
16362 (package
16363 (name "ruby-interception")
16364 (version "0.5")
16365 (source
16366 (origin
16367 (method url-fetch)
16368 (uri (rubygems-uri "interception" version))
16369 (sha256
16370 (base32 "01vrkn28psdx1ysh5js3hn17nfp1nvvv46wc1pwqsakm6vb1hf55"))))
16371 (build-system ruby-build-system)
16372 (native-inputs (list ruby-rspec))
16373 (home-page "https://github.com/ConradIrwin/interception")
16374 (synopsis "Listen to raise in Ruby")
16375 (description "Interception provides a cross-platform ability to intercept all
16376exceptions as they are raised.")
16377 (license license:expat)))
16378
16379(define-public ruby-pry-rescue
16380 (package
16381 (name "ruby-pry-rescue")
16382 (version "1.5.2")
16383 (source
16384 (origin
16385 (method url-fetch)
16386 (uri (rubygems-uri "pry-rescue" version))
16387 (sha256
16388 (base32 "1wn72y8y3d3g0ng350ld92nyjln012432q2z2iy9lhwzjc4dwi65"))))
16389 (build-system ruby-build-system)
16390 (arguments
16391 `(#:phases
16392 (modify-phases %standard-phases
16393 (add-after 'unpack 'nuke-bad-test
16394 (lambda _
16395 (substitute* "spec/source_location_spec.rb"
16396 (("time = Time.now") "skip")))))))
16397 (native-inputs
16398 (list ruby-rspec
16399 ruby-pry-stack-explorer))
16400 (propagated-inputs
16401 (list ruby-interception
16402 ruby-pry))
16403 (home-page
16404 "https://github.com/ConradIrwin/pry-rescue")
16405 (synopsis "Start Pry session for rescue")
16406 (description "Pry-Rescue allows you to wrap code, to open a pry session at
16407any unhandled exceptions.")
16408 (license license:expat)))
16409
16410(define-public ruby-braintree
16411 (package
16412 (name "ruby-braintree")
16413 (version "4.12.0")
16414 (source
16415 (origin
16416 (method git-fetch) ;for tests
16417 (uri (git-reference
16418 (url "https://github.com/braintree/braintree_ruby")
16419 (commit version)))
16420 (file-name (git-file-name name version))
16421 (sha256
16422 (base32 "0gfgkymy3655drwgs42bj9ap9qib1l30sajxmypmp6s75m9w3gsh"))))
16423 (build-system ruby-build-system)
16424 (arguments
16425 (list
16426 #:test-target "test:unit"
16427 #:phases
16428 #~(modify-phases %standard-phases
16429 (add-after 'unpack 'disable-rubocop
16430 (lambda _
16431 (substitute* "Rakefile"
16432 (("sh \"rubocop\"") ""))))
16433 (add-after 'unpack 'relax-requirements
16434 (lambda _
16435 (substitute* "Gemfile"
16436 (("gem \"pry\".*") "gem 'pry'\n")
16437 (("gem \"rake\".*") "gem 'rake'\n")
16438 (("gem \"libxml-ruby\", \"3.2.0\"")
16439 "gem \"libxml-ruby\", \"~> 3.0.0\"")
16440 (("gem \"rspec\", \"3.9.0\"")
16441 "gem \"rspec\", \">= 3.9.0\"")
16442 (("gem \"webrick\", \"~>1.7.0\"")
16443 "gem \"webrick\", \">=1.7.0\"")
16444 ((".*gem \"rubocop\".*") "")
16445 ((".*gem \"rspec_junit_formatter\".*") "")))))))
16446 (native-inputs
16447 (list ruby-libxml
16448 ruby-pry
16449 ruby-rake
16450 ruby-rspec
16451 ruby-webrick))
16452 (propagated-inputs
16453 (list ruby-builder
16454 ruby-rexml))
16455 (home-page "https://www.braintreepayments.com/")
16456 (synopsis "Integration access to the Braintree Gateway")
16457 (description "Braintree provides resources and tools for developers to
16458integrate Braintree's global payments platform.")
16459 (license license:expat)))
16460
16461(define-public ruby-niceogiri
16462 (package
16463 (name "ruby-niceogiri")
16464 (version "1.1.2")
16465 (source
16466 (origin
16467 (method url-fetch)
16468 (uri (rubygems-uri "niceogiri" version))
16469 (sha256
16470 (base32 "1ha93211bc9cvh23s9w89zz7rq8irpf64ccd9arvg8v1sxg2798a"))))
16471 (build-system ruby-build-system)
16472 (arguments
16473 `(#:test-target "spec"
16474 #:phases
16475 (modify-phases %standard-phases
16476 (add-after 'extract-gemspec 'less-strict-dependencies
16477 (lambda _
16478 (substitute* "niceogiri.gemspec"
16479 (("2\\.7") "3.8") ;rspec
16480 ((".*dependency.*bundler.*") "\n")
16481 ((".*dependency.*guard-rspec.*") "\n")))))))
16482 (native-inputs
16483 (list ruby-rspec
16484 ruby-yard))
16485 (propagated-inputs (list ruby-nokogiri))
16486 (home-page "https://github.com/benlangfeld/Niceogiri")
16487 (synopsis "Supplement for Nokogiri")
16488 (description "Niceogiri provides wrappers and helpers for XML manipulation
16489using Nokogiri.")
16490 (license license:expat)))
16491
16492(define-public ruby-blather
16493 (package
16494 (name "ruby-blather")
16495 (version "2.0.0")
16496 (source
16497 (origin
16498 (method url-fetch)
16499 (uri (rubygems-uri "blather" version))
16500 (sha256
16501 (base32 "05ry2x835fj4pzk61282pcz86n018cr39zbgwbi213md74i90s7c"))))
16502 (build-system ruby-build-system)
16503 (arguments
16504 ;; XXX: Tests require too old version of rspec.
16505 `(#:tests? #f))
16506 (native-inputs
16507 (list ruby-countdownlatch
16508 ruby-mocha
16509 ruby-rb-fsevent
16510 ruby-rspec
16511 ruby-yard))
16512 (propagated-inputs
16513 (list ruby-activesupport
16514 ruby-eventmachine
16515 ruby-niceogiri
16516 ruby-nokogiri
16517 ruby-sucker-punch))
16518 (home-page "https://github.com/adhearsion/blather")
16519 (synopsis "XMPP Domain Specific Language for Ruby")
16520 (description "Blather is a XMPP DSL for Ruby written on top of EventMachine
16521and Nokogiri.")
16522 (license license:expat)))
16523
16524(define-public ruby-wapiti
16525 (package
16526 (name "ruby-wapiti")
16527 (version "2.1.0")
16528 ;; the gem archive lacks tests
16529 (source (origin
16530 (method git-fetch)
16531 (uri (git-reference
16532 (url "https://github.com/inukshuk/wapiti-ruby")
16533 (commit (string-append "v" version))))
16534 (file-name (git-file-name name version))
16535 (sha256
16536 (base32
16537 "1273dqvn6flq2qv9qbp104rgc7zp1gqx4096s0v0z5f0qnhzc7d6"))))
16538 (build-system ruby-build-system)
16539 (propagated-inputs
16540 (list ruby-builder
16541 ruby-rexml))
16542 (native-inputs
16543 (list ruby-pry
16544 ruby-rake-compiler
16545 ruby-rspec
16546 ruby-simplecov))
16547 (arguments
16548 (list
16549 #:test-target "spec"
16550 #:phases
16551 #~(modify-phases %standard-phases
16552 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16553 (lambda args
16554 (substitute* "wapiti.gemspec"
16555 (("`git ls-files spec`")
16556 "`find spec -type f | sort`"))))
16557 (add-before 'build 'compile
16558 (lambda args
16559 (invoke "rake" "compile"))))))
16560 (home-page "https://github.com/inukshuk/wapiti-ruby")
16561 (synopsis "Wicked fast Conditional Random Fields for Ruby")
16562 (description
16563 "The Wapiti-Ruby gem provides a wicked fast linear-chain @acronym{CRF,
16564Conditional Random Fields} API for sequence segmentation and labelling. It is
16565based on the codebase of @url{https://wapiti.limsi.fr, Wapiti}.")
16566 (license license:bsd-2)))
16567
16568(define-public ruby-namae
16569 (package
16570 (name "ruby-namae")
16571 (version "1.1.1")
16572 (source (origin
16573 (method url-fetch)
16574 (uri (rubygems-uri "namae" version))
16575 (sha256
16576 (base32
16577 "1j3nl1klkx3gymrdxfc1hlq4a8qlvhhl9aj5v1v08b9fz27sky0l"))))
16578 (build-system ruby-build-system)
16579 (native-inputs
16580 (list ruby-cucumber
16581 ruby-rspec
16582 ruby-simplecov))
16583 (arguments
16584 (list
16585 #:phases
16586 #~(modify-phases %standard-phases
16587 (add-after 'extract-gemspec 'allow-newer-cucumber
16588 (lambda args
16589 (substitute* "Gemfile"
16590 (("'cucumber', '[^']*'")
16591 "'cucumber'"))))
16592 (replace 'check
16593 ;; Avoid 'rake' so we don't need jeweler.
16594 (lambda* (#:key tests? #:allow-other-keys)
16595 (when tests?
16596 (apply invoke
16597 "rspec"
16598 (find-files "spec" "_spec\\.rb$"))))))))
16599 (home-page "https://github.com/berkmancenter/namae")
16600 (synopsis "Parser for human names")
16601 (description
16602 "Namae (名前) is a parser for human names. It recognizes personal names
16603of various cultural backgrounds and tries to split them into their component
16604parts (e.g., given and family names, honorifics etc.).")
16605 (license (list license:bsd-2 license:agpl3+))))
16606
16607(define-public ruby-ritex
16608 (package
16609 (name "ruby-ritex")
16610 (version "1.0.1")
16611 (source (origin
16612 (method url-fetch)
16613 (uri (rubygems-uri "ritex" version))
16614 (sha256
16615 (base32
16616 "07rlm3nyz9sxzy1srxs6a31hw81r6w7swrb85fiwi393z8npwc3a"))))
16617 (build-system ruby-build-system)
16618 (native-inputs
16619 (list itex2mml))
16620 (arguments
16621 ;; thanks to the Gentoo packagers for figuring this out
16622 (list
16623 #:ruby ruby-2.7
16624 #:phases
16625 #~(modify-phases %standard-phases
16626 (add-after 'extract-gemspec 'fix-tests
16627 (lambda* (#:key native-inputs inputs #:allow-other-keys)
16628 (substitute* "test/mathml.rb"
16629 (("\\./itex2MML")
16630 ;; don't use the absolute path to avoid keeping a reference
16631 "itex2MML")
16632 (("cmp ',\\\\,\\\\,,,\\\\,'" orig)
16633 (string-append "# " orig " # patched for Guix")))
16634 (substitute* "test/answer-key.yaml"
16635 (("- ,\\\\,\\\\,,,\\\\," orig)
16636 (string-append "# " orig " # patched for Guix")))))
16637 (replace 'check
16638 (lambda* (#:key tests? #:allow-other-keys)
16639 (when tests?
16640 (invoke "ruby" "-Ilib:." "test/all.rb")))))))
16641 (home-page "https://rubygems.org/gems/ritex")
16642 (synopsis "Convert expressions from WebTeX into MathML")
16643 (description
16644 "Ritex converts expressions from WebTeX into MathML. WebTeX is an
16645adaptation of TeX math syntax for web display. Ritex makes inserting math
16646into HTML pages easy. It supports most TeX math syntax as well as macros.")
16647 ;; doesn't clearly state -only vs -or-later
16648 (license license:gpl2)))
16649
16650(define-public ruby-latex-decode
16651 (package
16652 (name "ruby-latex-decode")
16653 (version "0.4.0")
16654 (source (origin
16655 (method git-fetch)
16656 (uri (git-reference
16657 (url "https://github.com/inukshuk/latex-decode")
16658 (commit (string-append "v" version))))
16659 (sha256
16660 (base32
16661 "1f5j67ayd04pjkmzvn0hk7cr8yqvn0gyg9ns6a0vhzj2gwna9ihy"))
16662 (file-name (git-file-name name version))))
16663 (build-system ruby-build-system)
16664 (native-inputs
16665 (list ruby-cucumber
16666 ruby-ritex
16667 ruby-rspec))
16668 (arguments
16669 (list
16670 #:test-target "cucumber"
16671 #:phases
16672 #~(modify-phases %standard-phases
16673 (add-after 'extract-gemspec 'avoid-bundler
16674 (lambda args
16675 (substitute* "Rakefile"
16676 (("require 'bundler" orig)
16677 (string-append "# " orig " # patched for Guix"))
16678 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
16679 (string-append orig " do |c|\n"
16680 " c.bundler = false # patched for Guix\n"
16681 "end"))
16682 (("Bundler\\.setup" orig)
16683 (string-append "true # " orig " # patched for Guix")))
16684 (substitute* "cucumber.yml"
16685 ;; thanks to avoiding bundler, we can't use this option
16686 ((" --publish-quiet")
16687 ""))))
16688 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16689 (lambda args
16690 (substitute* "latex-decode.gemspec"
16691 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
16692 "`find {test,spec,features} -type f | sort`")))))))
16693 (home-page "https://github.com/inukshuk/latex-decode")
16694 (synopsis "Convert LaTeX to Unicode")
16695 (description
16696 "This package provides a gem to convert LaTeX input to Unicode. Its
16697original use was as an input filter for BibTeX-Ruby, but it can be used
16698independently to decode LaTeX. Many of the patterns used by this Ruby gem are
16699based on François Charette's equivalent Perl module @code{LaTeX::Decode}.")
16700 (license license:gpl3+)))
16701
16702(define-public ruby-link-header
16703 (package
16704 (name "ruby-link-header")
16705 (version "0.0.8")
16706 (source (origin
16707 (method url-fetch)
16708 (uri (rubygems-uri "link_header" version))
16709 (sha256
16710 (base32
16711 "1yamrdq4rywmnpdhbygnkkl9fdy249fg5r851nrkkxr97gj5rihm"))))
16712 (build-system ruby-build-system)
16713 (home-page "https://github.com/asplake/link_header")
16714 (synopsis "Parse and format HTTP @code{Link} headers")
16715 (description
16716 "This gem provides the classes @code{LinkHeader} and
16717@code{LinkHeader::Link}, which represent HTTP @code{Link} headers conforming
16718to RFC 5988. Objects can be constructed from and converted to text or a
16719JSON-friendly @code{Array} representation. They can also be used to generate
16720corresponding HTML @code{link} elements.")
16721 (license license:expat)))
16722
16723(define-public ruby-rdf
16724 (package
16725 (name "ruby-rdf")
16726 (version "3.2.8")
16727 (source (origin
16728 (method url-fetch)
16729 (uri (rubygems-uri "rdf" version))
16730 (sha256
16731 (base32
16732 "1cj0k8ryd8hgbkgqb5swvy6fiygxny3y5bln0my5gv6dbfv3gm20"))))
16733 (build-system ruby-build-system)
16734 (propagated-inputs (list ruby-link-header))
16735 (arguments
16736 (list #:tests? #f)) ;; tests have many cyclic dependencies
16737 (home-page "https://ruby-rdf.github.io/")
16738 (synopsis "Linked Data for Ruby")
16739 (description
16740 "This gem contains the core algorithms and classes used for doing basic
16741programming with @acronym{RDF, Resource Description Framework} data,
16742implemented in pure Ruby.")
16743 (license license:unlicense)))
16744
16745(define-public ruby-rdf-vocab
16746 (package
16747 (name "ruby-rdf-vocab")
16748 (version "3.2.1")
16749 (source (origin
16750 (method url-fetch)
16751 (uri (rubygems-uri "rdf-vocab" version))
16752 (sha256
16753 (base32
16754 "1bqmp9rfjvd56ajjz68ij6jla1wjf1fqg7bi4dpnjrsmn4pwaq7l"))))
16755 (build-system ruby-build-system)
16756 (propagated-inputs
16757 (list ruby-rdf))
16758 (arguments
16759 (list #:tests? #f)) ;; tests have many cyclic dependencies
16760 (home-page "https://github.com/ruby-rdf/rdf-vocab")
16761 (synopsis "Common RDF vocabularies")
16762 (description
16763 "This gem extends @code{ruby-rdf} with several common @acronym{RDF,
16764Resource Description Framework} vocabularies.")
16765 (license license:unlicense)))
16766
16767(define-public ruby-rdiscount
16768 (package
16769 (name "ruby-rdiscount")
16770 (version "2.2.7")
16771 (source (origin
16772 (method git-fetch) ;for the full test suite
16773 (uri (git-reference
16774 (url "https://github.com/davidfstr/rdiscount")
16775 (commit version)))
16776 (file-name (git-file-name name version))
16777 (sha256
16778 (base32
16779 "1lpfxq3gv0dgmnki9jgfnc8n9k4x9vyq9miqdxv6g4kp90qyfifc"))))
16780 (build-system ruby-build-system)
16781 (native-inputs (list perl))
16782 (synopsis "Discount Markdown Processor for Ruby")
16783 (description "Discount is an implementation of John Gruber's Markdown
16784markup language in C. It implements all of the language described in the
16785markdown syntax document and passes the Markdown 1.0 test suite.")
16786 (home-page "https://dafoster.net/projects/rdiscount/")
16787 (license license:bsd-3)))
16788
16789(define-public ruby-bibtex-ruby
16790 (package
16791 (name "ruby-bibtex-ruby")
16792 (version "6.0.0")
16793 (source (origin
16794 (method url-fetch)
16795 (uri (rubygems-uri "bibtex-ruby" version))
16796 (sha256
16797 (base32
16798 "0vynqa8q9hwghw6sdljr304b5gh11nqzy5nwqqwxmgy7pqyf7qw5"))))
16799 (build-system ruby-build-system)
16800 (propagated-inputs
16801 (list ruby-latex-decode
16802 ruby-rdf
16803 ruby-rdf-vocab))
16804 (native-inputs
16805 (list ruby-cucumber
16806 ruby-minitest
16807 ruby-yard))
16808 (arguments
16809 (list
16810 #:phases
16811 #~(modify-phases %standard-phases
16812 (add-after 'extract-gemspec 'avoid-bundler
16813 (lambda args
16814 (substitute* "Rakefile"
16815 (("require 'bundler" orig)
16816 (string-append "# " orig " # patched for Guix"))
16817 (("Bundler\\.setup" orig)
16818 (string-append "true # " orig " # patched for Guix"))))))))
16819 (home-page "https://github.com/inukshuk/bibtex-ruby")
16820 (synopsis "Rubyist's Swiss Army knife for all things BibTeX")
16821 (description
16822 "BibTeX-Ruby is the Rubyist's Swiss Army knife for all things BibTeX.
16823It includes a parser for all common BibTeX objects and a sophisticated name
16824parser that tokenizes correctly formatted names. BibTeX-Ruby recognizes
16825BibTeX string replacements, joins values containing multiple strings or
16826variables, supports cross-references, and decodes common LaTeX formatting
16827instructions to unicode. If you are in a hurry, it also allows for easy
16828export/conversion to formats such as YAML, JSON, CSL, and XML (BibTeXML).")
16829 (license license:gpl3+)))
16830
16831(define-public ruby-unicode-scripts
16832 (package
16833 (name "ruby-unicode-scripts")
16834 (version "1.8.0")
16835 (source (origin
16836 (method url-fetch)
16837 (uri (rubygems-uri "unicode-scripts" version))
16838 (sha256
16839 (base32
16840 "0rl6mn908yryhrg8j3mmna54gnrid2nph2kym00lbz6jwdih2a1b"))))
16841 (build-system ruby-build-system)
16842 (native-inputs (list ruby-minitest))
16843 (arguments (list #:test-target "spec"))
16844 (home-page "https://github.com/janlelis/unicode-scripts")
16845 (synopsis "Unicode script classification library")
16846 (description "This gem provides a simple interface for classifying Ruby
16847strings using the Unicode @code{Script} and @code{Script_Extensions}
16848properties.")
16849 (license license:expat)))
16850
16851(define-public ruby-citeproc
16852 (package
16853 (name "ruby-citeproc")
16854 (version "1.0.10")
16855 (source (origin
16856 (method url-fetch)
16857 (uri (rubygems-uri "citeproc" version))
16858 (sha256
16859 (base32
16860 "13vl5sjmksk5a8kjcqnjxh7kn9gn1n4f9p1rvqfgsfhs54p0m6l2"))))
16861 (build-system ruby-build-system)
16862 (propagated-inputs
16863 (list ruby-namae))
16864 (arguments
16865 (list #:tests? #f)) ;; tests have a cyclic dependency
16866 (home-page "https://github.com/inukshuk/citeproc")
16867 (synopsis "Interface for Ruby citation processors")
16868 (description
16869 "CiteProc is a citation processor interface and citation data API based
16870on the @acronym{CSL, Citation Style Language} specifications. To actually
16871process citations, a dedicated processor engine is required: a pure Ruby
16872engine is available in the @code{citeproc-ruby} gem.")
16873 (license (list license:agpl3+ license:bsd-2))))
16874
16875(define-public ruby-ed25519
16876 (package
16877 (name "ruby-ed25519")
16878 (version "1.3.0")
16879 (source (origin
16880 (method git-fetch)
16881 (uri (git-reference
16882 (url "https://github.com/RubyCrypto/ed25519")
16883 (commit (string-append "v" version))))
16884 (file-name (git-file-name name version))
16885 (sha256
16886 (base32
16887 "1jm5w2dyhyrndcx0d02v0gjbzl1abhbx2wkp3gxzwcndghmkz98r"))))
16888 (build-system ruby-build-system)
16889 (arguments
16890 (list
16891 #:test-target "spec"
16892 #:phases
16893 #~(modify-phases %standard-phases
16894 (add-before 'build 'compile
16895 (lambda _
16896 (invoke "rake" "compile")))
16897 (add-after 'unpack 'remove-unnecessary-dependencies
16898 (lambda _
16899 ;; Coveralls relates to a network service, and RuboCop to code
16900 ;; linting and both are unnecessary to run the tests
16901 (substitute* "Gemfile"
16902 ((".*coveralls.*")
16903 "\n")
16904 ((".*rubocop.*")
16905 "\n"))
16906 (substitute* "spec/spec_helper.rb"
16907 (("require \"coveralls\"")
16908 "")
16909 (("Coveralls.wear!")
16910 ""))
16911 (substitute* "Rakefile"
16912 (("require \"rubocop/rake_task\"")
16913 "")
16914 (("RuboCop::RakeTask.new")
16915 "")))))))
16916 (native-inputs (list ruby-rake-compiler ruby-rspec))
16917 (synopsis
16918 "Ruby binding to the Ed25519 elliptic curve public-key signature system")
16919 (description
16920 "This package provides a Ruby binding to the Ed25519 elliptic curve
16921public-key signature system described in
16922@url{https://www.ietf.org/rfc/rfc8032.txt, RFC 8032}.")
16923 (home-page "https://github.com/RubyCrypto/ed25519")
16924 (license license:expat)))
16925
16926(define-public ruby-edtf
16927 (package
16928 (name "ruby-edtf")
16929 (version "3.1.0")
16930 (source (origin
16931 (method git-fetch)
16932 (uri (git-reference
16933 (url "https://github.com/inukshuk/edtf-ruby")
16934 (commit (string-append "v" version))))
16935 (sha256
16936 (base32
16937 "18j8xq8zmrn41cs2gpd1i87agi9905asvnjqndky2cqb5zg3q14g"))
16938 (snippet
16939 ;; remove generated file
16940 #~(delete-file "lib/edtf/parser.rb"))
16941 (file-name (git-file-name name version))))
16942 (build-system ruby-build-system)
16943 (propagated-inputs
16944 (list ruby-activesupport))
16945 (native-inputs
16946 (list ruby-cucumber
16947 ruby-rspec))
16948 (arguments
16949 (list
16950 #:phases
16951 #~(modify-phases %standard-phases
16952 (add-after 'extract-gemspec 'avoid-bundler
16953 (lambda args
16954 (substitute* "Rakefile"
16955 (("require 'bundler" orig)
16956 (string-append "# " orig " # patched for Guix"))
16957 (("bundle exec racc")
16958 "racc")
16959 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
16960 (string-append orig " do |c|\n"
16961 " c.bundler = false # patched for Guix\n"
16962 "end"))
16963 (("Bundler\\.setup" orig)
16964 (string-append "true # " orig " # patched for Guix")))))
16965 (add-after 'avoid-bundler 'patch-cucumber-options
16966 (lambda args
16967 (substitute* "cucumber.yml"
16968 ;; this option is not supported, at least in our configuration
16969 ((" --publish-quiet")
16970 ""))))
16971 (add-before 'build 'compile
16972 (lambda args
16973 (invoke "rake" "racc")))
16974 (replace 'check
16975 (lambda* (#:key tests? #:allow-other-keys)
16976 (when tests?
16977 (invoke "rake")))))))
16978 (home-page "https://github.com/inukshuk/edtf-ruby")
16979 (synopsis "Ruby implementation of Extended Date/Time Format")
16980 (description
16981 "EDTF-Ruby provides a parser and an API for the @acronym{EDTF, Extended
16982Date/Time Format} standard, implemented as an extension to Ruby's @code{Date}
16983class.")
16984 (license license:bsd-2)))
16985
16986(define-public ruby-gli
16987 (package
16988 (name "ruby-gli")
16989 (version "2.21.0")
16990 (source (origin
16991 (method git-fetch)
16992 (uri (git-reference
16993 (url "https://github.com/davetron5000/gli")
16994 (commit (string-append "v" version))))
16995 (sha256
16996 (base32
16997 "09b1r9hlx4dy2yq036nk7hc2nbswhia6q3na9v11z94yibc8mgja"))
16998 (file-name (git-file-name name version))))
16999 (build-system ruby-build-system)
17000 (native-inputs
17001 (list ruby-minitest
17002 ruby-rainbow
17003 ruby-rdoc
17004 ruby-sdoc))
17005 (arguments
17006 (list
17007 #:phases
17008 #~(modify-phases %standard-phases
17009 (add-after 'extract-gemspec 'patch-gemspec-version
17010 (lambda args
17011 (substitute* "gli.gemspec"
17012 ;; this trick fails in our build environment
17013 (("require File\\.join[(]\\[" orig)
17014 (string-append "# patched for Guix # " orig))
17015 (("s\\.version = GLI::VERSION")
17016 #$(string-append "s.version = '"
17017 (package-version this-package)
17018 "' # patched for Guix")))))
17019 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17020 (lambda args
17021 (substitute* "gli.gemspec"
17022 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
17023 "`find {test,spec,features} -type f | sort`"))))
17024 (add-after 'replace-another-git-ls-files 'fix-rubyopt
17025 (lambda args
17026 (substitute* "Rakefile"
17027 (("ENV\\[\"RUBYOPT\"]")
17028 "(ENV['RUBYOPT'] || '')")))))))
17029 (home-page "https://davetron5000.github.io/gli/")
17030 (synopsis "Git-Like Interface command-line parser")
17031 (description
17032 "GLI allows you to create command-line applications in Ruby with Git-Like
17033Interfaces: that is, they take subcommands in the style of @command{git} and
17034@command{gem}. GLI uses a simple domain-specific language, but retains all
17035the power of the built-in @code{OptionParser}.")
17036 (license license:asl2.0)))
17037
17038(define-public ruby-anystyle-data
17039 (package
17040 (name "ruby-anystyle-data")
17041 (version "1.2.0")
17042 (source (origin
17043 (method git-fetch)
17044 (uri (git-reference
17045 (url "https://github.com/inukshuk/anystyle-data")
17046 (commit version)))
17047 (sha256
17048 (base32
17049 "025mxa7r9d7izqn6bc1wr40ijp64da0jh211prlpjl6svilgd6rm"))
17050 (snippet
17051 ;; remove pre-built file
17052 #~(delete-file "lib/anystyle/data/dict.txt.gz"))
17053 (patches
17054 (search-patches "ruby-anystyle-data-immutable-install.patch"))
17055 (file-name (git-file-name name version))))
17056 (build-system ruby-build-system)
17057 (arguments
17058 (list
17059 #:tests? #f ;; there are none
17060 #:modules
17061 `((guix build ruby-build-system)
17062 (guix build utils)
17063 (srfi srfi-26))
17064 #:phases
17065 #~(modify-phases %standard-phases
17066 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17067 (lambda args
17068 (substitute* "anystyle-data.gemspec"
17069 (("`git ls-files lib README\\.md LICENSE`\\.split[(][^)]*[)]")
17070 (string-append
17071 "["
17072 (string-join
17073 (map (cut string-append "\"" <> "\"")
17074 `("README.md"
17075 "LICENSE"
17076 "lib/anystyle/data.rb"
17077 "lib/anystyle/data/dict.txt.gz"
17078 "lib/anystyle/data/setup.rb"
17079 "lib/anystyle/data/version.rb"))
17080 ", ")
17081 "]")))))
17082 (add-before 'build 'compile-dict
17083 (lambda args
17084 (invoke "rake" "compile"))))))
17085 (home-page "https://anystyle.io")
17086 (synopsis "AnyStyle parser dictionary data")
17087 (description
17088 "This gem provides parser dictionary data for AnyStyle.")
17089 (license license:bsd-2)))
17090
17091(define-public ruby-anystyle
17092 (let ((commit "50f1dd547d28ab4b830e45d70e840cb1898a37b0")
17093 (revision "1"))
17094 ;; Releases point to specific commits, but recent releases haven't been
17095 ;; tagged in Git. Meanwhile, the rubygems archive lacks tests.
17096 (package
17097 (name "ruby-anystyle")
17098 (version (git-version "1.3.14" revision commit))
17099 (source (origin
17100 (method git-fetch)
17101 (uri (git-reference
17102 (url "https://github.com/inukshuk/anystyle")
17103 (commit commit)))
17104 (sha256
17105 (base32
17106 "0f4qcrywl1kl6qysn24lj3yp85ln4i7za7b7ld2fglyzwcggxwb0"))
17107 (snippet
17108 ;; There is an optional dependency on
17109 ;; <https://github.com/feedbackmine/language_detector>, which
17110 ;; seems like it was intended to be free software, but
17111 ;; doesn't have a clear license statement. Maybe someone can
17112 ;; do more sleuthing, or else find a replacement? See also
17113 ;; <https://github.com/inukshuk/anystyle/issues/186>. For
17114 ;; now, patch it out, but leave a pointer to follow up.
17115 #~(begin
17116 (use-modules (guix build utils))
17117 (substitute* "Gemfile"
17118 (("gem 'language_detector', github: '[^']*'" orig)
17119 (string-append "# " orig " # unclear license")))
17120 (substitute* "spec/anystyle/parser_spec.rb"
17121 (("language: 'en'," orig)
17122 (string-append "# " orig " # no lanugage_detector")))))
17123 (patches
17124 (search-patches
17125 "ruby-anystyle-fix-dictionary-populate.patch"))
17126 (file-name (git-file-name name version))))
17127 (build-system ruby-build-system)
17128 (propagated-inputs
17129 (list ruby-anystyle-data
17130 ruby-bibtex-ruby
17131 ruby-namae
17132 ruby-wapiti))
17133 (native-inputs
17134 (list ruby-byebug
17135 ruby-citeproc
17136 ruby-edtf
17137 ruby-rspec
17138 ruby-unicode-scripts))
17139 (arguments
17140 (list
17141 #:test-target "spec"
17142 #:phases
17143 #~(modify-phases %standard-phases
17144 (add-after 'extract-gemspec 'avoid-bundler
17145 (lambda args
17146 (substitute* "Rakefile"
17147 (("require 'bundler" orig)
17148 (string-append "# " orig " # patched for Guix"))
17149 (("Bundler\\.setup" orig)
17150 (string-append "true # " orig " # patched for Guix")))))
17151 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17152 (lambda args
17153 (substitute* "anystyle.gemspec"
17154 (("`git ls-files spec`")
17155 "`find spec -type f | sort`"))))
17156 (add-after 'wrap 'populate-dictionaries
17157 (lambda args
17158 ;; We must initiallize these files here, or they will never be
17159 ;; usable with the default settings. A more flexible approach
17160 ;; might use something like `Gem.find_files()` or
17161 ;; XDG_DATA_DIRS.
17162 (with-output-to-file "initialize-dictionaries.rb"
17163 (lambda ()
17164 (display "
17165require 'anystyle/dictionary' # must come before 'anystyle/data'
17166require 'anystyle/data'
17167[:marshal, :gdbm].each do |adapter|
17168 AnyStyle::Dictionary.create({adapter: adapter}).open().close()
17169end
17170")))
17171 (let* ((old-gems (getenv "GEM_PATH"))
17172 (new-gems (string-append #$output
17173 "/lib/ruby/vendor_ruby:"
17174 old-gems)))
17175 (dynamic-wind
17176 (lambda ()
17177 (setenv "GEM_PATH" new-gems))
17178 (lambda ()
17179 (invoke "ruby" "initialize-dictionaries.rb"))
17180 (lambda ()
17181 (setenv "GEM_PATH" old-gems)))))))))
17182 (home-page "https://anystyle.io")
17183 (synopsis "Fast and smart citation reference parsing (Ruby library)")
17184 (description
17185 "AnyStyle is a very fast and smart parser for academic reference lists
17186and bibliographies. AnyStyle uses powerful machine learning heuristics based
17187on Conditional Random Fields and aims to make it easy to train the model with
17188data that is relevant to your parsing needs.
17189
17190This package provides the Ruby module @code{AnyStyle}. AnyStyle can also be
17191used via the @command{anystyle} command-line utility or a web application,
17192though the later has not yet been packaged for Guix.")
17193 (license license:bsd-2))))
17194
17195(define-public anystyle
17196 (package
17197 (name "anystyle")
17198 (version "1.3.2")
17199 (source (origin
17200 (method git-fetch)
17201 (uri (git-reference
17202 (url "https://github.com/inukshuk/anystyle-cli")
17203 (commit (string-append "v" version))))
17204 (sha256
17205 (base32
17206 "0yigfyn0n255nc53nx40yqak11dm4fva46hx5db177jh7mnksjd6"))
17207 (file-name (git-file-name name version))))
17208 (build-system ruby-build-system)
17209 (propagated-inputs
17210 (list ruby-anystyle
17211 ruby-bibtex-ruby
17212 ruby-gli))
17213 (native-inputs
17214 (list txt2man))
17215 (arguments
17216 (list
17217 #:modules
17218 `((guix build ruby-build-system)
17219 (ice-9 popen)
17220 (srfi srfi-1)
17221 (guix build utils))
17222 #:phases
17223 #~(modify-phases %standard-phases
17224 (add-after 'extract-gemspec 'less-strict-dependencies
17225 (lambda args
17226 (substitute* "anystyle-cli.gemspec"
17227 (("'bibtex-ruby', '[^']*'")
17228 "'bibtex-ruby'"))))
17229 (add-before 'build 'change-default-dictionary-adapter
17230 (lambda args
17231 ;; Since we always have gdbm available, using it will give a
17232 ;; faster startup time, which is particularly worth-while for
17233 ;; a command-line tool.
17234 (substitute* "bin/anystyle"
17235 (("default_value: 'ruby',")
17236 "default_value: 'gdbm', # patched for Guix"))))
17237 (replace 'check
17238 (lambda* (#:key tests? #:allow-other-keys)
17239 ;; There are no tests, but let's use this opportunity to do a
17240 ;; basic test of our own that things run ok. It works especially
17241 ;; well to test this here since we know the 'ruby-anystile'
17242 ;; package is in its final, immutable installed form.
17243 (when tests?
17244 (let ((common
17245 `("require 'anystyle'"
17246 ,(string-append
17247 "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture"
17248 " et la différence (1 éd.). Paris: Éditions du"
17249 " Seuil.'"))))
17250 (for-each
17251 (lambda (lines)
17252 (apply invoke "ruby"
17253 (fold-right (lambda (line lst)
17254 (cons* "-e" line lst))
17255 '()
17256 lines)))
17257 `(,common
17258 ("require 'anystyle/dictionary'"
17259 "AnyStyle::Dictionary.defaults[:adapter] = :gdbm"
17260 ,@common)))))))
17261 (add-after 'wrap 'check-cli
17262 (lambda* (#:key tests? outputs #:allow-other-keys)
17263 (when tests?
17264 (with-output-to-file "check-cli.in"
17265 (lambda ()
17266 (for-each
17267 display
17268 '("Derrida, J. (1967). L’écriture et la différence "
17269 "(1 éd.). Paris: Éditions du Seuil.\n"))))
17270 (invoke (search-input-file outputs "/bin/anystyle")
17271 "parse"
17272 "check-cli.in"))))
17273 (add-after 'wrap 'generate-man-page
17274 ;; generating a man page also tests that the command actually runs
17275 (lambda args
17276 (define (run-with-output-file file command . args)
17277 (format (current-output-port)
17278 "running: ~s\nwith output to: ~s\n"
17279 (cons command args)
17280 file)
17281 (unless (zero?
17282 (with-output-to-file file
17283 (lambda ()
17284 (status:exit-val
17285 (close-pipe
17286 (apply open-pipe* OPEN_WRITE command args))))))
17287 (error "command failed")))
17288 (let ((anystyle (string-append #$output "/bin/anystyle")))
17289 (run-with-output-file "intro.txt"
17290 anystyle "--help")
17291 (for-each (lambda (cmd)
17292 (let ((file (string-append cmd ".txt")))
17293 (run-with-output-file file
17294 anystyle cmd "--help")
17295 ;; indent headings to create subsections
17296 (substitute* file
17297 (("^[A-Z]" orig)
17298 (string-append " " orig)))
17299 ;; generate a section heading
17300 (call-with-output-file
17301 (string-append "section-" file)
17302 (lambda (out)
17303 (format out "\n\n~a COMMAND\n\n"
17304 (string-upcase cmd))))))
17305 '("check" "find" "parse" "train"))
17306 (substitute* `("intro.txt"
17307 "check.txt" "find.txt" "parse.txt" "train.txt")
17308 ;; format "tag list" for txt2man"
17309 ((" - ")
17310 " ")
17311 ;; restore formatting of the "name" sections
17312 (("(anystyle|check|find|parse|train) ([A-Z])" _ cmd post)
17313 (string-append cmd " - " post)))
17314 (run-with-output-file "anystyle.txt"
17315 "cat"
17316 "intro.txt"
17317 "section-check.txt" "check.txt"
17318 "section-find.txt" "find.txt"
17319 "section-parse.txt" "parse.txt"
17320 "section-train.txt" "train.txt")
17321 (run-with-output-file
17322 "anystyle.1"
17323 "txt2man"
17324 "-v" "General Commands Manual" "-t" "anystyle" "-s" "1"
17325 "-r" #$(string-append "anystyle-cli "
17326 (package-version this-package))
17327 "-B" "check" "-B" "find" "-B" "parse" "-B" "train"
17328 "anystyle.txt")
17329 (install-file "anystyle.1"
17330 (string-append #$output "/share/man/man1"))))))))
17331 (home-page "https://anystyle.io")
17332 (synopsis "Fast and smart citation reference parsing")
17333 (description
17334 "AnyStyle is a very fast and smart parser for academic reference lists
17335and bibliographies. AnyStyle uses powerful machine learning heuristics based
17336on Conditional Random Fields and aims to make it easy to train the model with
17337data that is relevant to your parsing needs.
17338
17339This package provides the @command{anystyle} command-line utility. AnyStyle
17340can also be used as a Ruby library or as a web application, though the later
17341has not yet been packaged for Guix.")
17342 (license license:bsd-2)
17343 (properties `((upstream-name . "anystyle-cli")))))
17344
17345;;;
17346;;; Avoid adding new packages to the end of this file. To reduce the chances
17347;;; of a merge conflict, place them above by existing packages with similar
17348;;; functionality or similar names.
17349;;;