projects/guix·blob ruby-team · refs

17935 lines · 663.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014, 2015 Pjotr Prins <[email protected]>
3;;; Copyright © 2014-2017, 2021-2022, 2024, 2026 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-2025 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, 2021 Nicolas Goaziou <[email protected]>
24;;; Copyright © 2020 Michael Rohleder <[email protected]>
25;;; Copyright © 2020 Holgr Peters <[email protected]>
26;;; Copyright © 2020 Giacomo Leidi <[email protected]>
27;;; Copyright © 2021 EuAndreh <[email protected]>
28;;; Copyright © 2020 Tomás Ortín Fernández <[email protected]>
29;;; Copyright © 2021 Giovanni Biscuolo <[email protected]>
30;;; Copyright © 2022 Philip McGrath <[email protected]>
31;;; Copyright © 2022-2025 Remco van 't Veer <[email protected]>
32;;; Copyright © 2022 Taiju HIGASHI <[email protected]>
33;;; Copyright © 2023 Yovan Naumovski <[email protected]>
34;;; Copyright © 2023, 2024, 2025, 2026 gemmaro <[email protected]>
35;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <[email protected]>
36;;; Copyright © 2023, 2024 Zheng Junjie <[email protected]>
37;;; Copyright © 2023-2025 Hartmut Goebel <[email protected]>
38;;; Copyright © 2025 Nicolas Graves <[email protected]>
39;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
40;;;
41;;; This file is part of GNU Guix.
42;;;
43;;; GNU Guix is free software; you can redistribute it and/or modify it
44;;; under the terms of the GNU General Public License as published by
45;;; the Free Software Foundation; either version 3 of the License, or (at
46;;; your option) any later version.
47;;;
48;;; GNU Guix is distributed in the hope that it will be useful, but
49;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51;;; GNU General Public License for more details.
52;;;
53;;; You should have received a copy of the GNU General Public License
54;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55
56(define-module (gnu packages ruby-xyz)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix build-system ruby)
59 #:use-module (guix deprecation)
60 #:use-module (guix download)
61 #:use-module (guix gexp)
62 #:use-module (guix git-download)
63 #:use-module (guix packages)
64 #:use-module (guix modules)
65 #:use-module (guix utils)
66 #:use-module (gnu packages)
67 #:use-module (gnu packages)
68 #:use-module (gnu packages base)
69 #:use-module (gnu packages bash)
70 #:use-module (gnu packages bison)
71 #:use-module (gnu packages c)
72 #:use-module (gnu packages check)
73 #:use-module (gnu packages compression)
74 #:use-module (gnu packages compiler-tools)
75 #:use-module (gnu packages crypto)
76 #:use-module (gnu packages curl)
77 #:use-module (gnu packages databases)
78 #:use-module (gnu packages dbm)
79 #:use-module (gnu packages freedesktop)
80 #:use-module (gnu packages rails)
81 #:use-module (gnu packages readline)
82 #:use-module (gnu packages autotools)
83 #:use-module (gnu packages graphviz)
84 #:use-module (gnu packages haskell-xyz)
85 #:use-module (gnu packages java)
86 #:use-module (gnu packages libffi)
87 #:use-module (gnu packages libidn)
88 #:use-module (gnu packages linux)
89 #:use-module (gnu packages lsof)
90 #:use-module (gnu packages man)
91 #:use-module (gnu packages maths)
92 #:use-module (gnu packages ncurses)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages node)
95 #:use-module (gnu packages pdf)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages protobuf)
99 #:use-module (gnu packages python)
100 #:use-module (gnu packages python-build)
101 #:use-module (gnu packages python-xyz)
102 #:use-module (gnu packages ragel)
103 #:use-module (gnu packages rsync)
104 #:use-module (gnu packages sqlite)
105 #:use-module (gnu packages tls)
106 #:use-module (gnu packages valgrind)
107 #:use-module (gnu packages version-control)
108 #:use-module (gnu packages virtualization)
109 #:use-module (gnu packages web-browsers)
110 #:use-module (gnu packages serialization)
111 #:use-module (gnu packages unicode)
112 #:use-module (gnu packages xml)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages ruby)
115 #:use-module (gnu packages ruby-check)
116 #:use-module ((srfi srfi-1) #:select (alist-delete)))
117
118(define %prawn-project-licenses
119 ;; This set of licenses applies to most (all?) components of the Prawn
120 ;; project (it is triple licensed).
121 (list license:ruby
122 license:gpl2+
123 license:gpl3+))
124
125(define-public ruby-colsole
126 (package
127 (name "ruby-colsole")
128 (version "1.0.0")
129 (source
130 (origin
131 (method url-fetch)
132 (uri (rubygems-uri "colsole" version))
133 (sha256
134 (base32 "1fvf6dz2wsvjk7q24z0dm8lajq3p2l6i5ywf3mxj683rmhwq49bg"))))
135 (build-system ruby-build-system)
136 (arguments
137 (list
138 #:phases
139 #~(modify-phases %standard-phases
140 (replace 'check
141 (lambda* (#:key tests? #:allow-other-keys)
142 (when tests?
143 (invoke "rspec" "-c" "spec")))))))
144 (native-inputs (list ruby-rspec))
145 (synopsis "Utility functions for colorful console applications")
146 (description
147 "Utility functions for writing colorful console applications.")
148 (home-page "https://github.com/DannyBen/colsole")
149 (license license:expat)))
150
151(define-public ruby-commander
152 (package
153 (name "ruby-commander")
154 (version "4.6.0")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (rubygems-uri "commander" version))
159 (sha256
160 (base32
161 "1n8k547hqq9hvbyqbx2qi08g0bky20bbjca1df8cqq5frhzxq7bx"))))
162 (build-system ruby-build-system)
163 (arguments
164 (list
165 #:test-target "spec"
166 #:phases
167 #~(modify-phases %standard-phases
168 ;; Don't run or require rubocop, the code linting tool, as this is a
169 ;; bit unnecessary.
170 (add-after 'unpack 'dont-run-rubocop
171 (lambda _
172 (substitute* "Rakefile"
173 ((".*rubocop.*") "")
174 ((".*RuboCop.*") "")))))))
175 (propagated-inputs
176 (list ruby-highline))
177 (native-inputs
178 (list bundler ruby-rspec-core ruby-rspec-expectations
179 ruby-rspec-mocks ruby-simplecov))
180 (home-page "https://github.com/commander-rb/commander")
181 (synopsis "Library for building Ruby command-line executables")
182 (description
183 "Commander aims to be a complete solution for Ruby command-line
184executables. Commander bridges the gap between other terminal related
185libraries (OptionParser, HighLine), while providing many new features, and an
186elegant API.")
187 (license license:expat)))
188
189(define-public ruby-completely
190 (package
191 (name "ruby-completely")
192 (version "0.7.5")
193 (source
194 (origin
195 (method url-fetch)
196 (uri (rubygems-uri "completely" version))
197 (sha256
198 (base32 "00nakfa4yg4qj8m4ircg5mkr99xjzynrkisr5ihpbdpylsqgbf2f"))))
199 (build-system ruby-build-system)
200 (propagated-inputs (list ruby-colsole ruby-mister-bin))
201 (arguments
202 (list
203 #:tests? #f)) ; no tests
204 (native-inputs (list ruby-rspec))
205 (synopsis
206 "Generate Bash completion scripts using simple YAML configuration")
207 (description
208 "Command line utility and a Ruby library to generate Bash completion
209scripts from simple YAML configuration.")
210 (home-page "https://github.com/bashly-framework/completely")
211 (license license:expat)))
212
213(define-public ruby-docopt-ng
214 (package
215 (name "ruby-docopt-ng")
216 (version "0.7.1")
217 (source
218 (origin
219 (method url-fetch)
220 (uri (rubygems-uri "docopt_ng" version))
221 (sha256
222 (base32 "0rsnl5s7k2s1gl4n4dg68ssg577kf11sl4a4l2lb2fpswj718950"))))
223 (build-system ruby-build-system)
224 (arguments
225 (list
226 #:phases
227 #~(modify-phases %standard-phases
228 (replace 'check
229 (lambda _
230 (invoke "rspec" "-c" "spec"))))))
231 (native-inputs (list ruby-rspec))
232 (synopsis
233 "The Ruby port of Docopt, the option parser written originally in Python")
234 (description
235 "Parse command line arguments from nothing more than a usage message.")
236 (home-page "https://docopt.org/")
237 (license license:expat)))
238
239(define-public ruby-erb
240 (package
241 (name "ruby-erb")
242 (version "6.0.7")
243 (source
244 (origin
245 (method git-fetch) ;for tests
246 (uri (git-reference
247 (url "https://github.com/ruby/erb")
248 (commit (string-append "v" version))))
249 (file-name (git-file-name name version))
250 (sha256
251 (base32 "0di25f0nsl99isnc1lr9r954sjs2c64cf31idzyfi9wr2s3gs6qw"))))
252 (build-system ruby-build-system)
253 (arguments
254 (list
255 #:phases
256 #~(modify-phases %standard-phases
257 (add-before 'check 'omit-failing-tests
258 (lambda _
259 ;; TODO: Remove when newer Ractor is used by default.
260 (substitute* "test/erb/test_erb.rb"
261 (("def test_.*ractor.*" def)
262 (string-append def "; omit \"incompatible Ractor usage\"\n"))))))))
263 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
264 (synopsis "Easy to use but powerful templating system")
265 (description "ERB is an easy to use, but also very powerful, template
266processor.")
267 (home-page "https://github.com/ruby/erb")
268 (license (list license:ruby license:bsd-2))))
269
270(define-public ruby-filewatcher
271 (package
272 (name "ruby-filewatcher")
273 (version "2.1.0")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (rubygems-uri "filewatcher" version))
278 (sha256
279 (base32 "03f9v57c5zag09mi10yjhdx7y0vv2w5wrnwzbij9hhkwh43rk077"))))
280 (build-system ruby-build-system)
281 (arguments
282 (list
283 ;;TODO: Investigate why tests fail
284 #:tests? #f))
285 (propagated-inputs (list ruby-module-methods))
286 (synopsis "Ruby gem to perform actions when files are changed")
287 (description "Detect changes in file system. Works anywhere. No config
288files. Pure Ruby implementation and minimalistic Ruby API.")
289 (home-page "http://github.com/filewatcher/filewatcher")
290 (license license:expat)))
291
292(define-public ruby-gtx
293 (package
294 (name "ruby-gtx")
295 (version "0.1.1")
296 (source
297 (origin
298 (method url-fetch)
299 (uri (rubygems-uri "gtx" version))
300 (sha256
301 (base32 "1w0hbr9i6jpn9spbb13ipg2fajkwa51y56jw21ziwsddmv997274"))))
302 (build-system ruby-build-system)
303 (arguments
304 (list
305 ;; no tests in Gem
306 #:tests? #f))
307 (native-inputs (list ruby-rspec))
308 (propagated-inputs (list ruby-erb))
309 (synopsis "Minimal template engine that transpiles to ERB")
310 (description "@code{GTX} creates templates are code-first, while also
311that transpiling to ERB.")
312 (home-page "https://github.com/dannyben/gtx")
313 (license license:expat)))
314
315(define-public ruby-highline
316 (package
317 (name "ruby-highline")
318 (version "3.1.2")
319 (source
320 (origin
321 (method git-fetch) ;for tests
322 (uri (git-reference
323 (url "https://github.com/JEG2/highline")
324 (commit (string-append "v" version))))
325 (file-name (git-file-name name version))
326 (sha256
327 (base32
328 "09ysksjmlzhpr5d21qhhl7bq7b3f03qk7jc1k08iwrvx3fjid8gv"))))
329 (build-system ruby-build-system)
330 (arguments
331 (list
332 #:phases
333 #~(modify-phases %standard-phases
334 (add-before 'check 'remove-coverage-and-failing-test
335 (lambda _
336 (substitute* "test/test_helper.rb"
337 (("require \"simplecov\" if RUBY_ENGINE == \"ruby\"")
338 ""))
339 ;; TODO: Package dry-types gem.
340 (delete-file "test/test_highline.rb"))))))
341 (native-inputs
342 (list bundler ruby-code-statistics))
343 (synopsis
344 "HighLine helps you build command-line interfaces")
345 (description
346 "HighLine provides a high-level IO library that provides validation,
347type conversion, and more for command-line interfaces. HighLine also includes
348a menu system for providing multiple options to the user.")
349 (home-page "https://github.com/JEG2/highline")
350 (license (list license:gpl2 license:ruby))))
351
352(define-public ruby-logger
353 (package
354 (name "ruby-logger")
355 (version "1.7.0")
356 (source
357 (origin
358 (method url-fetch)
359 (uri (rubygems-uri "logger" version))
360 (sha256
361 (base32 "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr"))))
362 (build-system ruby-build-system)
363 (arguments
364 (list
365 ;; no tests in Gem
366 #:tests? #f))
367 (native-inputs (list ruby-rspec))
368 (synopsis "Simple logging utility for Ruby")
369 (description
370 "This package provides a simple logging utility for outputting messages.")
371 (home-page "https://github.com/ruby/logger")
372 (license (list license:bsd-2))))
373
374(define-public ruby-lp
375 (package
376 (name "ruby-lp")
377 (version "0.2.1")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (rubygems-uri "lp" version))
382 (sha256
383 (base32 "0ns1aza32n929w7smg1dsn4g6qlfi7k1jrvssyn35cicmwn0gyyr"))))
384 (build-system ruby-build-system)
385 (arguments
386 (list
387 ;; no tests in Gem
388 #:tests? #f))
389 (native-inputs (list ruby-rspec))
390 (synopsis "Lovely print")
391 (description "Colorful YAML dump for debug purposes.")
392 (home-page "https://github.com/dannyben/lp")
393 (license license:expat)))
394
395(define-public ruby-mister-bin
396 (package
397 (name "ruby-mister-bin")
398 (version "0.8.1")
399 (source
400 (origin
401 (method url-fetch)
402 (uri (rubygems-uri "mister_bin" version))
403 (sha256
404 (base32 "1zz3vpy6xrgzln2dpxgcnrq1bpzz0syl60whqc9zf8j29mayw1fy"))))
405 (build-system ruby-build-system)
406 (arguments
407 (list
408 ;; no tests in Gem
409 #:tests? #f))
410 (native-inputs (list ruby-rspec))
411 (propagated-inputs (list ruby-colsole ruby-docopt-ng))
412 (synopsis "Easily add a command line interface to Ruby Gems")
413 (description "Develop rich, scalable and testable command line interfaces
414for Ruby Gems or other Ruby applications.")
415 (home-page "https://github.com/dannyben/mister_bin")
416 (license license:expat)))
417
418(define-public ruby-module-methods
419 (package
420 (name "ruby-module-methods")
421 (version "0.1.0")
422 (source
423 (origin
424 (method url-fetch)
425 (uri (rubygems-uri "module_methods" version))
426 (sha256
427 (base32 "1886wjscfripgzlmyvcd0jmlzwr6hxvklm2a5rm32dw5bf7bvjki"))))
428 (build-system ruby-build-system)
429 (arguments
430 (list
431 #:tests? #f)) ;no tests
432 (native-inputs (list ruby-rspec))
433 (synopsis "Extendable module for modules with instance and class methods")
434 (description
435 "Extendable module for modules with instance and class methods. These
436modules can be included into each other modules and saving all chain, including
437@code{inherited} or @code{included} (class) methods.")
438 (home-page "https://github.com/AlexWayfer/module_methods")
439 (license license:expat)))
440
441(define-public ruby-ostruct
442 (package
443 (name "ruby-ostruct")
444 (version "0.6.3")
445 (source
446 (origin
447 (method url-fetch)
448 (uri (rubygems-uri "ostruct" version))
449 (sha256
450 (base32 "04nrir9wdpc4izqwqbysxyly8y7hsfr4fsv69rw91lfi9d5fv8lm"))))
451 (arguments
452 (list
453 ;; no tests
454 #:tests? #f))
455 (build-system ruby-build-system)
456 (synopsis "Class to build custom data structures, similar to a Hash")
457 (description
458 "An OpenStruct is a data structure, similar to a Hash, that
459allows the definition of arbitrary attributes with their accompanying values.
460This is accomplished by using Ruby's metaprogramming to define methods on the
461class itself.")
462 (home-page "https://github.com/ruby/ostruct")
463 (license (list license:bsd-2))))
464
465(define-public ruby-pastel
466 (package
467 (name "ruby-pastel")
468 (version "0.8.0")
469 (source
470 (origin
471 (method url-fetch)
472 (uri (rubygems-uri "pastel" version))
473 (sha256
474 (base32 "0xash2gj08dfjvq4hy6l1z22s5v30fhizwgs10d6nviggpxsj7a8"))))
475 (build-system ruby-build-system)
476 (arguments
477 (list
478 ;; no tests
479 #:tests? #f))
480 (propagated-inputs (list ruby-tty-color))
481 (synopsis "Ruby terminal output styling with an intuitive and clean API")
482 (description
483 "Ruby @code{::Pastel} is a simple, minimal and intuitive API
484for styling strings that doesn't monkey patch the String class. Part of the
485TTY Toolkit project which provides a range of terminal application capabilities.")
486 (home-page "https://ttytoolkit.org")
487 (license license:expat)))
488
489(define-public ruby-requires
490 (package
491 (name "ruby-requires")
492 (version "1.1.0")
493 (source
494 (origin
495 (method url-fetch)
496 (uri (rubygems-uri "requires" version))
497 (sha256
498 (base32 "0dlibxp6jfdl4favj2pgsm2pw84hhr2cdiizfs51ldkpddm50njp"))))
499 (build-system ruby-build-system)
500 (arguments
501 (list
502 ;; no tests
503 #:tests? #f))
504 (native-inputs (list ruby-rspec))
505 (synopsis "Adds Ruby functions that allow requiring a directory")
506 (description "A tiny convenience function (@code{requires}) to require
507or autoload all Ruby files in a directory.")
508 (home-page "https://github.com/DannyBen/requires/")
509 (license license:expat)))
510
511(define-public ruby-rsync
512 (package
513 (name "ruby-rsync")
514 (version "1.0.9")
515 (source
516 (origin
517 (method url-fetch)
518 (uri (rubygems-uri "rsync" version))
519 (sha256
520 (base32
521 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
522 (build-system ruby-build-system)
523 (arguments
524 '(#:test-target "spec"
525 #:phases
526 (modify-phases %standard-phases
527 (add-after 'unpack 'remove-coveralls-requirement
528 (lambda _
529 (substitute* "spec/spec_helper.rb"
530 (("require 'coveralls'") "")
531 (("Coveralls.wear!") "")))))))
532 (native-inputs
533 (list bundler rsync ruby-rspec-core ruby-rspec-expectations
534 ruby-rspec-mocks))
535 (home-page "https://github.com/jbussdieker/ruby-rsync")
536 (synopsis "Ruby wrapper around rsync")
537 (description
538 "Ruby Rsync is a Ruby library that can synchronize files between remote
539hosts by wrapping the @file{rsync} binary.")
540 (license license:expat)))
541
542(define-public ruby-strings
543 (package
544 (name "ruby-strings")
545 (version "0.2.1")
546 (source
547 (origin
548 (method url-fetch)
549 (uri (rubygems-uri "strings" version))
550 (sha256
551 (base32 "1yynb0qhhhplmpzavfrrlwdnd1rh7rkwzcs4xf0mpy2wr6rr6clk"))))
552 (build-system ruby-build-system)
553 (arguments
554 (list
555 #:phases
556 #~(modify-phases %standard-phases
557 (replace 'check
558 (lambda* (#:key tests? #:allow-other-keys)
559 (when tests?
560 (invoke "rspec" "-c" "spec")))))))
561 (native-inputs (list ruby-rspec))
562 (propagated-inputs (list ruby-strings-ansi ruby-unicode-display-width
563 ruby-unicode-utils))
564 (synopsis "Ruby functions for transforming strings")
565 (description "This package provides a set of methods for working with
566strings such as align, truncate, wrap and many more.")
567 (home-page "https://github.com/piotrmurach/strings")
568 (license license:expat)))
569
570(define-public ruby-strings-ansi
571 (package
572 (name "ruby-strings-ansi")
573 (version "0.2.0")
574 (source
575 (origin
576 (method url-fetch)
577 (uri (rubygems-uri "strings-ansi" version))
578 (sha256
579 (base32 "120wa6yjc63b84lprglc52f40hx3fx920n4dmv14rad41rv2s9lh"))))
580 (build-system ruby-build-system)
581 (arguments
582 (list
583 ;; FIXME: tests seems to depend on ruby-strings
584 #:tests? #f))
585 (native-inputs (list bundler ruby-rspec))
586 (synopsis "Handle ANSI escape codes in strings")
587 (description
588 "@code{strings::ANSI} provides Ruby methods for processing ANSI escape
589codes in strings.")
590 (home-page "https://github.com/piotrmurach/strings-ansi")
591 (license license:expat)))
592
593(define-public ruby-tty-color
594 (package
595 (name "ruby-tty-color")
596 (version "0.6.0")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (rubygems-uri "tty-color" version))
601 (sha256
602 (base32 "0aik4kmhwwrmkysha7qibi2nyzb4c8kp42bd5vxnf8sf7b53g73g"))))
603 (build-system ruby-build-system)
604 (arguments
605 (list
606 ;; no tests in Gem
607 #:tests? #f))
608 (native-inputs (list ruby-rspec))
609 (synopsis "Terminal color capabilities detection for Ruby")
610 (description
611 "@code{TTY:Color} provides an independent color support
612detection component. It is part of the TTY Toolkit project which provides
613a range of terminal application capabilities.")
614 (home-page "https://ttytoolkit.org")
615 (license license:expat)))
616
617(define-public ruby-tty-markdown
618 (package
619 (name "ruby-tty-markdown")
620 (version "0.7.2")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (rubygems-uri "tty-markdown" version))
625 (sha256
626 (base32 "04f599zn5rfndq4d9l0acllfpc041bzdkkz2h6x0dl18f2wivn0y"))))
627 (build-system ruby-build-system)
628 (arguments
629 (list
630 #:phases
631 #~(modify-phases %standard-phases
632 (replace 'check
633 (lambda* (#:key tests? #:allow-other-keys)
634 (when tests?
635 (invoke "rspec" "-c" "spec")))))))
636 (native-inputs (list ruby-rspec))
637 (propagated-inputs (list ruby-kramdown
638 ruby-pastel
639 ruby-rouge
640 ruby-strings
641 ruby-tty-color
642 ruby-tty-screen))
643 (synopsis "Convert a markdown document into terminal friendly output")
644 (description
645 "@code{TTY:Markdown} is a markdown processing component for Ruby. It's
646used to convert markdown text or documents into a terminal friendly output.
647Part of the TTY Toolkit project.")
648 (home-page "https://ttytoolkit.org")
649 (license license:expat)))
650
651(define-public ruby-tty-screen
652 (package
653 (name "ruby-tty-screen")
654 (version "0.8.2")
655 (source
656 (origin
657 (method url-fetch)
658 (uri (rubygems-uri "tty-screen" version))
659 (sha256
660 (base32 "0l4vh6g333jxm9lakilkva2gn17j6gb052626r1pdbmy2lhnb460"))))
661 (build-system ruby-build-system)
662 (arguments
663 (list
664 ;; no tests
665 #:tests? #f))
666 (native-inputs (list ruby-rspec))
667 (synopsis "Terminal screen properties detection for Ruby")
668 (description
669 "Cross-platform terminal screen size detection that supports Ruby MRI,
670JRuby, TruffleRuby and Rubinius interpreters. @code{TTY:Screen} is part of
671the @code{TTY} Toolkit projects.")
672 (home-page "https://ttytoolkit.org")
673 (license license:expat)))
674
675(define-public ruby-unicode-utils
676 (package
677 (name "ruby-unicode-utils")
678 (version "1.4.0")
679 (source
680 (origin
681 (method url-fetch)
682 (uri (rubygems-uri "unicode_utils" version))
683 (sha256
684 (base32 "0h1a5yvrxzlf0lxxa1ya31jcizslf774arnsd89vgdhk4g7x08mr"))))
685 (build-system ruby-build-system)
686 (arguments
687 (list
688 ;; no tests in Gem
689 #:tests? #f))
690 (synopsis "Additional Unicode aware functions for Ruby 1.9")
691 (description
692 "@code{UnicodeUtils} implements Unicode algorithms for case
693conversion, normalization, text segmentation and more in pure Ruby code.")
694 (home-page "https://github.com/lang/unicode_utils")
695 (license license:bsd-2)))
696
697(define-public ruby-i18n
698 (package
699 (name "ruby-i18n")
700 (version "1.13.0")
701 (source (origin
702 (method url-fetch)
703 (uri (rubygems-uri "i18n" version))
704 (sha256
705 (base32
706 "1yk33slipi3i1kydzrrchbi7cgisaxym6pgwlzx7ir8vjk6wl90x"))))
707 (build-system ruby-build-system)
708 (arguments
709 '(#:tests? #f)) ; no tests
710 (propagated-inputs (list ruby-concurrent-ruby))
711 (synopsis "Internationalization library for Ruby")
712 (description "Ruby i18n is an internationalization and localization
713solution for Ruby programs. It features translation and localization,
714interpolation of values to translations, pluralization, customizable
715transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
716translation data, custom key/scope separator, custom exception handlers, and
717an extensible architecture with a swappable backend.")
718 (home-page "https://github.com/ruby-i18n/i18n")
719 (license license:expat)))
720
721(define-public ruby-ice-nine
722 (package
723 (name "ruby-ice-nine")
724 (version "0.11.2")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (rubygems-uri "ice_nine" version))
729 (sha256
730 (base32 "1nv35qg1rps9fsis28hz2cq2fx1i96795f91q4nmkm934xynll2x"))))
731 (build-system ruby-build-system)
732 (arguments
733 (list #:tests? #f)) ;Dependency on convoluted unpackaged ruby-devtools.
734 (synopsis "Deep Freeze Ruby Objects")
735 (description
736 "This package provides a function to deep freeze Ruby objects.")
737 (home-page "https://github.com/dkubb/ice_nine")
738 (license license:expat)))
739
740(define-public ruby-io-console
741 (package
742 (name "ruby-io-console")
743 (version "0.6.0")
744 (source (origin
745 (method git-fetch) ;for tests
746 (uri (git-reference
747 (url "https://github.com/ruby/io-console/")
748 (commit (string-append "v" version))))
749 (file-name (git-file-name name version))
750 (sha256
751 (base32
752 "0gwxrp29b6awkid1sf85sbh529mnq6hb86m8c2443cm6nc4vr8qb"))))
753 (build-system ruby-build-system)
754 (arguments
755 (list #:phases #~(modify-phases %standard-phases
756 (add-after 'unpack 'delete-rakelib-files
757 (lambda _
758 ;; These depend on git and other extraneous
759 ;; dependencies, and are loaded by rake.
760 (delete-file-recursively "rakelib"))))))
761 (native-inputs (list ruby-rake-compiler))
762 (synopsis "Console capabilities library for IO instances")
763 (description "IO.console adds console capabilities to Ruby IO instances.")
764 (home-page "https://github.com/ruby/io-console")
765 (license license:bsd-2)))
766
767(define-public ruby-irb
768 (package
769 (name "ruby-irb")
770 (version "1.6.3")
771 (source (origin
772 (method url-fetch)
773 (uri (rubygems-uri "irb" version))
774 (sha256
775 (base32
776 "1h9s07n5v3z029v18924ws9vdkdc80n6llp9ccx77yg1krv2g0f3"))))
777 (build-system ruby-build-system)
778 ;; XXX: Disable the test suite, as it requires debug, which requires this
779 ;; package (dependency cycle).
780 (arguments (list #:tests? #f))
781 (propagated-inputs (list ruby-reline))
782 (synopsis "Ruby command-line tool for REPL (Read Eval Print Loop)")
783 (description "IRB is an interactive Ruby command-line tool for REPL (Read
784Eval Print Loop).")
785 (home-page "https://github.com/ruby/irb")
786 (license license:bsd-2)))
787
788(define-public ruby-irb-1.1.1
789 (package
790 (inherit ruby-irb)
791 (version "1.1.1")
792 (source (origin
793 (method url-fetch)
794 (uri (rubygems-uri "irb" version))
795 (sha256
796 (base32
797 "0h605w798s2bg9wg681ynvvzgdz1yy69gh387bl0khw9ll7wkn8v"))))))
798
799(define-public ruby-iruby
800 (package
801 (name "ruby-iruby")
802 (version "0.3")
803 (source
804 (origin
805 (method url-fetch)
806 (uri (rubygems-uri "iruby" version))
807 (sha256
808 (base32
809 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
810 (build-system ruby-build-system)
811 (arguments
812 ;; TODO: Tests currently fail.
813 ;;
814 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
815 ;;
816 ;; 1) Failure:
817 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
818 ;; In [ expected
819 ;;
820 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
821 '(#:tests? #f
822 #:phases
823 (modify-phases %standard-phases
824 (add-after 'unpack 'patch-ipython
825 (lambda* (#:key inputs #:allow-other-keys)
826 (substitute* "lib/iruby/command.rb"
827 (("version = `")
828 (string-append
829 "version = `"
830 (assoc-ref inputs "python-ipython")
831 "/bin/"))
832 (("Kernel\\.exec\\('")
833 (string-append
834 "Kernel.exec('"
835 (assoc-ref inputs "python-ipython")
836 "/bin/"))))))))
837 (inputs
838 (list python-ipython))
839 (propagated-inputs
840 (list ruby-bond
841 ruby-data_uri
842 ruby-mimemagic
843 ruby-multi-json
844 ruby-cztop
845 ;; Optional inputs
846 ruby-pry))
847 (synopsis "Ruby kernel for Jupyter/IPython")
848 (description
849 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
850notebook).")
851 (home-page "https://github.com/SciRuby/iruby")
852 (license license:expat)))
853
854(define-public ruby-date
855 (package
856 (name "ruby-date")
857 (version "3.3.3")
858 (source (origin
859 (method git-fetch)
860 (uri (git-reference
861 (url "https://github.com/ruby/date")
862 (commit (string-append "v" version))))
863 (file-name (git-file-name name version))
864 (sha256
865 (base32
866 "1jiqjnaap1jk1r8z37iicnzqha1rhc713qmcir17f4vnz8ac8v75"))))
867 (build-system ruby-build-system)
868 (arguments (list #:test-target "default"))
869 (native-inputs (list ruby-rake-compiler))
870 (synopsis "Ruby @code{Object} subclass with date comparison capability")
871 (description "This package provides a subclass of @code{Object} that
872includes the @code{Comparable} module for handling dates.")
873 (home-page "https://github.com/ruby/date")
874 (license license:bsd-2)))
875
876(define-public ruby-time
877 (package
878 (name "ruby-time")
879 (version "0.3.0")
880 (source (origin
881 (method git-fetch) ; for tests
882 (uri (git-reference
883 (url "https://github.com/ruby/time")
884 (commit (string-append "v" version))))
885 (file-name (git-file-name name version))
886 (sha256
887 (base32
888 "0jd6df2lxd60wcxyaf37j8v3nnfn952d5xhg6aap9zlcdmkk4g2n"))))
889 (build-system ruby-build-system)
890 (propagated-inputs (list ruby-date))
891 (native-inputs (list ruby-test-unit-ruby-core))
892 (synopsis
893 "Extends the Time class with methods for parsing and conversion")
894 (description
895 "When this gem is @code{require}d, it extends the Time class with with
896additional methods for parsing and converting Times.")
897 (home-page "https://github.com/ruby/time")
898 (license license:bsd-2)))
899
900(define-public ruby-sorted-set
901 (package
902 (name "ruby-sorted-set")
903 (version "1.0.3")
904 (source (origin
905 (method url-fetch)
906 (uri (rubygems-uri "sorted_set" version))
907 (sha256
908 (base32
909 "0brpwv68d7m9qbf5js4bg8bmg4v7h4ghz312jv9cnnccdvp8nasg"))))
910 (build-system ruby-build-system)
911 (propagated-inputs
912 (list ruby-rbtree ruby-set))
913 (synopsis
914 "Ruby Set variant whose elements are sorted in ascending order")
915 (description
916 "This package implements a variant of Set whose elements are sorted in
917ascending order")
918 (home-page "https://github.com/knu/sorted_set")
919 (license license:bsd-2)))
920
921(define-public ruby-rspec-given
922 (package
923 (name "ruby-rspec-given")
924 (version "3.8.2")
925 (source
926 (origin
927 (method url-fetch)
928 (uri (rubygems-uri "rspec-given" version))
929 (sha256
930 (base32
931 "0xzzxjjzwrsp84p12sd6ab3jbm9kh7sbnqpxgc9mlfq3s3ll0fdj"))))
932 (build-system ruby-build-system)
933 (arguments
934 `(#:test-target "rs"
935 #:phases
936 (modify-phases %standard-phases
937 (add-after 'unpack 'fix-rakefile
938 (lambda _
939 (substitute* '("Rakefile" "rakelib/gemspec.rake")
940 (("require '\\./lib/given/.*") "")
941 (("Given::VERSION") (format #f "~s" ,version))
942 ;; Fix the error: "cannot load such file -- example_helper"
943 (("sh \"rspec")
944 "sh \"rspec -Ilib:examples"))))
945 (add-after 'extract-gemspec 'delete-failing-tests
946 ;; See: https://github.com/jimweirich/rspec-given/issues/57
947 ;; and https://github.com/rspec-given/rspec-given/issues/32
948 (lambda _
949 (substitute* ".gemspec"
950 (("\"spec/lib/given/line_extractor_spec.rb\".freeze, ")
951 "")
952 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
953 "")
954 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
955 ""))
956 (delete-file "spec/lib/given/line_extractor_spec.rb")
957 (delete-file "spec/lib/given/natural_assertion_spec.rb")
958 (delete-file "examples/integration/failing_messages_spec.rb"))))))
959 (native-inputs
960 (list ruby-rspec ruby-minitest))
961 (propagated-inputs
962 (list ruby-given-core ruby-rspec))
963 (synopsis "Given/When/Then for RSpec and Minitest")
964 (description "Given is an RSpec extension that allows the use of
965Given/When/Then terminology when defining specifications, in a way similar to
966the Cucumber Gherkin language.")
967 (home-page "https://github.com/rspec-given/rspec-given")
968 (license license:expat)))
969
970(define-public ruby-rspec-its
971 (package
972 (name "ruby-rspec-its")
973 (version "1.3.0")
974 (source
975 (origin
976 (method git-fetch)
977 (uri (git-reference
978 (url "https://github.com/rspec/rspec-its")
979 (commit (string-append "v" version))))
980 (file-name (git-file-name name version))
981 (sha256
982 (base32
983 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
984 (build-system ruby-build-system)
985 (arguments
986 `(#:test-target "spec"
987 #:phases
988 (modify-phases %standard-phases
989 (add-after 'unpack 'dont-install-gems-from-gemfile
990 (lambda _
991 (substitute* "Gemfile"
992 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
993 ""))))
994 (add-before 'build 'loosen-ffi-requirement
995 (lambda _
996 ;; Accept any version of ruby-ffi.
997 (substitute* "Gemfile"
998 ((" gem 'ffi', '~> 1\\.9\\.25'")
999 " gem 'ffi'"))))
1000 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
1001 (lambda _
1002 (substitute* "rspec-its.gemspec"
1003 (("rake.*") "rake'\n")
1004 (("spec.add_development_dependency 'cucumber'.*")
1005 "spec.add_development_dependency 'cucumber'\n")
1006 (("bundler.*") "bundler'\n")
1007 (("\"aruba.*") "'aruba'\n")))))))
1008 (propagated-inputs
1009 (list ruby-rspec-core ruby-rspec-expectations))
1010 (native-inputs
1011 (list bundler ruby-cucumber ruby-ffi ruby-aruba))
1012 (synopsis "RSpec extension that provides the @code{its} method")
1013 (description
1014 "RSpec::Its provides the its method as a short-hand to specify the expected
1015value of an attribute. For example, one can use @code{its(:size)\\{should
1016eq(1)\\}}.")
1017 (home-page "https://github.com/rspec/rspec-its")
1018 (license license:expat)))
1019
1020;;; This variant is used to break a cycle with ruby-protobuf.
1021(define-public ruby-rspec-its-minimal
1022 (hidden-package
1023 (package
1024 (inherit ruby-rspec-its)
1025 (arguments
1026 (substitute-keyword-arguments arguments
1027 ((#:tests? _ #f) #f)))
1028 (native-inputs '()))))
1029
1030(define-public ruby-rspec-block-is-expected
1031 (package
1032 (name "ruby-rspec-block-is-expected")
1033 (version "1.0.5")
1034 (source (origin
1035 (method git-fetch) ;for tests
1036 (uri (git-reference
1037 (url "https://github.com/pboling/rspec-block_is_expected")
1038 (commit (string-append "v" version))))
1039 (file-name (git-file-name name version))
1040 (sha256
1041 (base32
1042 "1zi5z12lkw3fiwgr7g61845wj73asr2vzw4zsjv45klnnfspwass"))))
1043 (build-system ruby-build-system)
1044 (arguments
1045 (list #:phases #~(modify-phases %standard-phases
1046 (add-after 'unpack 'relax-requirements
1047 (lambda _
1048 (substitute* "Rakefile"
1049 (("require 'rubocop/rake_task'") "")
1050 (("RuboCop::RakeTask.new") ""))
1051 ;; Contains extraneous requirements not actually
1052 ;; needed for the test suite.
1053 (delete-file "Gemfile")))
1054 (add-before 'build 'drop-signing-key-requirement
1055 (lambda _
1056 (substitute* "rspec-block_is_expected.gemspec"
1057 (("spec.signing_key =.*")
1058 "spec.signing_key = nil")))))))
1059 (native-inputs (list ruby-rspec-pending-for ruby-rspec-expectations))
1060 (propagated-inputs (list ruby-rspec-core))
1061 (synopsis "Simplify testing of blocks in RSpec")
1062 (description "This RSpec plugin allows you to use @code{block_is_expected}
1063similarly to how you would use @code{is_expected} if a block was wrapping the
1064subject.")
1065 (home-page "https://github.com/pboling/rspec-block_is_expected")
1066 (license license:expat)))
1067
1068(define-public ruby-rspec-block-is-expected-bootstrap
1069 (package/inherit ruby-rspec-block-is-expected
1070 (arguments
1071 (substitute-keyword-arguments
1072 (package-arguments ruby-rspec-block-is-expected)
1073 ((#:tests? tests? #t)
1074 #f)))
1075 (native-inputs '())
1076 (properties '((hidden? . #t)))))
1077
1078(define-public ruby-rspec-pending-for
1079 (package
1080 (name "ruby-rspec-pending-for")
1081 (version "0.1.17")
1082 (source
1083 (origin
1084 (method git-fetch) ;for tests
1085 (uri (git-reference
1086 (url "https://github.com/pboling/rspec-pending_for")
1087 (commit (string-append "v" version))))
1088 (file-name (git-file-name name version))
1089 (sha256
1090 (base32 "0mczm7lwcji2q7xhsrrpffhgdn0n6kdykvx64y2r6726fs467wnl"))))
1091 (build-system ruby-build-system)
1092 (arguments
1093 (list
1094 #:phases
1095 #~(modify-phases %standard-phases
1096 (add-before 'build 'configure
1097 (lambda _
1098 (substitute* "rspec-pending_for.gemspec"
1099 (("spec\\.signing_key = .*")
1100 "spec.signing_key = nil\n")))))))
1101 (native-inputs (list ruby-rspec-block-is-expected-bootstrap ruby-rspec
1102 ruby-simplecov))
1103 (propagated-inputs (list ruby-rspec-core ruby-ruby-engine
1104 ruby-ruby-version))
1105 (synopsis "Skip RSpec tests for specific Ruby engines or versions")
1106 (description
1107 "This RSpec plugin makes it easy to mark test cases as pending or skipped
1108for a specific Ruby engine (e.g. MRI or JRuby) or version combinations.")
1109 (home-page "https://github.com/pboling/rspec-pending_for")
1110 (license license:expat)))
1111
1112(define-public ruby-rspec-rerun
1113 (package
1114 (name "ruby-rspec-rerun")
1115 (version "1.1.0")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (rubygems-uri "rspec-rerun" version))
1120 (sha256
1121 (base32
1122 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
1123 (build-system ruby-build-system)
1124 (arguments
1125 '(;; No included tests
1126 #:tests? #f))
1127 (propagated-inputs (list ruby-rspec))
1128 (synopsis "Track failed RSpec tests to re-run them")
1129 (description
1130 "This package provides an automated way to track, and then re-run failed
1131RSpec tests.")
1132 (home-page "https://github.com/dblock/rspec-rerun")
1133 (license license:expat)))
1134
1135(define-public ruby-rspec-stubbed-env
1136 ;; There is no release nor tag (see:
1137 ;; https://github.com/pboling/rspec-stubbed_env/issues/7).
1138 (let ((revision "0")
1139 (commit "9d767dec77a6d130f6ad83c48a00a5c81b14b9fa"))
1140 (package
1141 (name "ruby-rspec-stubbed-env")
1142 (version (git-version "1.0.0" revision commit))
1143 (source (origin
1144 (method git-fetch)
1145 (uri (git-reference
1146 (url "https://github.com/pboling/rspec-stubbed_env")
1147 (commit commit)))
1148 (file-name (git-file-name name version))
1149 (sha256
1150 (base32
1151 "1dy4m04h613dp0s59rknjd6h4lqs1h17mffc5kd8kh046mk8nr1p"))))
1152 (build-system ruby-build-system)
1153 (arguments
1154 (list #:test-target "spec"
1155 #:phases #~(modify-phases %standard-phases
1156 (add-after 'unpack 'streamline-requirements
1157 (lambda _
1158 ;; Remove extraneous development dependencies.
1159 (substitute* "rspec-stubbed_env.gemspec"
1160 ((".*bundler.*") "")
1161 ((".*rubocop.*") "")))))))
1162 (native-inputs (list ruby-simplecov))
1163 (propagated-inputs (list ruby-rspec))
1164 (synopsis "RSpec plugin to stub environment variables")
1165 (description
1166 "This RSpec plugin can be used to stub environment variables in a scoped
1167context for testing.")
1168 (home-page "https://github.com/pboling/rspec-stubbed_env")
1169 (license license:expat))))
1170
1171(define-public ruby-rspec-wait
1172 (package
1173 (name "ruby-rspec-wait")
1174 (version "0.0.9")
1175 (source
1176 (origin
1177 (method url-fetch)
1178 (uri (rubygems-uri "rspec-wait" version))
1179 (sha256
1180 (base32
1181 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
1182 (build-system ruby-build-system)
1183 (arguments
1184 '(#:phases
1185 (modify-phases %standard-phases
1186 (replace 'check
1187 (lambda _
1188 (invoke "rake" "spec"))))))
1189 (native-inputs
1190 (list bundler))
1191 (propagated-inputs
1192 (list ruby-rspec))
1193 (home-page "https://github.com/laserlemon/rspec-wait")
1194 (synopsis "Wait for conditions in RSpec")
1195 (description
1196 "RSpec::Wait strives to make it easier to test asynchronous or slow
1197interactions.")
1198 (license license:expat)))
1199
1200(define-public ruby-rspec-debug
1201 (package
1202 (name "ruby-rspec-debug")
1203 (version "0.2.0")
1204 (source (origin
1205 (method git-fetch) ;for tests
1206 (uri (git-reference
1207 (url "https://github.com/ko1/rspec-debug")
1208 (commit (string-append "v" version))))
1209 (file-name (git-file-name name version))
1210 (sha256
1211 (base32
1212 "125p1zxjznkk765nyqvkksw8x1nbm7xk4sjc1wza2fyp5hvyiddn"))))
1213 (build-system ruby-build-system)
1214 (arguments
1215 (list #:test-target "spec"
1216 #:phases #~(modify-phases %standard-phases
1217 (add-after 'extract-gemspec 'relax-dependencies
1218 (lambda _
1219 (substitute* "Gemfile"
1220 (("~>") ">=")))))))
1221 (native-inputs (list ruby-rspec))
1222 (propagated-inputs (list ruby-debug))
1223 (synopsis "Invoke Ruby debugger when spec fails")
1224 (description "This package can be used to have the execution stopped for
1225inspection in the Ruby debugger upon encountering a failure. To use it, set
1226the @env{RSPEC_DEBUG} environment variable to @samp{true} then invoke the
1227@command{rspec} command as usual.")
1228 (home-page "https://github.com/ko1/rspec-debug")
1229 (license license:expat)))
1230
1231(define-public ruby-specinfra
1232 (package
1233 (name "ruby-specinfra")
1234 (version "2.88.1")
1235 (source (origin
1236 (method url-fetch)
1237 (uri (rubygems-uri "specinfra" version))
1238 (sha256
1239 (base32
1240 "07lap3sknncffpq9jw1x1mn9c5xxd058wxs5vnyz1y0lawdjfnsf"))))
1241 (build-system ruby-build-system)
1242 (propagated-inputs (list ruby-net-scp ruby-net-ssh ruby-net-telnet
1243 ruby-sfl))
1244 (arguments
1245 (list
1246 #:test-target "spec"
1247 #:phases
1248 #~(modify-phases %standard-phases
1249 (add-after 'extract-gemspec 'relax-dependencies
1250 (lambda _
1251 (substitute* "specinfra.gemspec"
1252 (("%q<net-telnet>.freeze, \\[.*\\]")
1253 "%q<net-telnet>.freeze, [\">= 0\"]")))))))
1254 (synopsis "Common layer for serverspec and itamae")
1255 (description "This Gem provides a common layer for serverspec and
1256itamae.")
1257 (home-page "https://github.com/mizzy/specinfra")
1258 (license license:expat)))
1259
1260(define-public ruby-serverspec
1261 (package
1262 (name "ruby-serverspec")
1263 (version "2.42.3")
1264 (source (origin
1265 (method url-fetch)
1266 (uri (rubygems-uri "serverspec" version))
1267 (sha256
1268 (base32
1269 "0kfaqrqynly8n3dy5qrbjvx4lx6mk9a5vynwb7xwqj8bixm0mab4"))))
1270 (build-system ruby-build-system)
1271 (propagated-inputs (list ruby-multi-json ruby-rspec ruby-rspec-its
1272 ruby-specinfra))
1273 (arguments
1274 (list #:test-target "spec"))
1275 (synopsis
1276 "RSpec tests for servers configured by Puppet, Chef, Itamae, etc")
1277 (description
1278 "With Serverspec, you can write RSpec tests for checking your servers are
1279configured correctly.
1280
1281Serverspec tests your servers’ actual state by executing command locally, via
1282SSH, via WinRM, via Docker API and so on. So you don’t need to install any
1283agent software on your servers and can use any configuration management
1284tools, Puppet, Ansible, CFEngine, Itamae and so on.
1285
1286But the true aim of Serverspec is to help refactoring infrastructure code.")
1287 (home-page "https://serverspec.org/")
1288 (license license:expat)))
1289
1290(define-public ruby-base64
1291 (package
1292 (name "ruby-base64")
1293 (version "0.3.0")
1294 (source
1295 (origin
1296 (method git-fetch) ; The gem lacks the test files.
1297 (uri (git-reference
1298 (url "https://github.com/ruby/base64")
1299 (commit (string-append "v" version))))
1300 (file-name (git-file-name name version))
1301 (sha256
1302 (base32
1303 "08n9hnbqf8hsci22zgq7ha3jxnxmw0plydc3l9zahvfawm6jplnx"))))
1304 (build-system ruby-build-system)
1305 (native-inputs (list ruby-rake ruby-test-unit))
1306 (synopsis "Base64 encoding/decoding in Ruby")
1307 (description
1308 "This package provides support for encoding and decoding binary data
1309using a Base64 representation.")
1310 (home-page "https://github.com/ruby/base64")
1311 (license (list license:bsd-2))))
1312
1313(define-public ruby-bump
1314 (package
1315 (name "ruby-bump")
1316 (version "0.7.0")
1317 (source
1318 (origin
1319 (method url-fetch)
1320 (uri (rubygems-uri "bump" version))
1321 (sha256
1322 (base32
1323 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
1324 (build-system ruby-build-system)
1325 (arguments
1326 '(;; No included tests
1327 #:tests? #f))
1328 (synopsis "Tool for working with Rubygems")
1329 (description
1330 "Bump provides commands to manage Rubygem versioning, updating to the
1331next patch version for example.")
1332 (home-page "https://github.com/gregorym/bump")
1333 (license license:expat)))
1334
1335(define-public ruby-rjb
1336 (package
1337 (name "ruby-rjb")
1338 (version "1.6.7")
1339 (source (origin
1340 (method url-fetch)
1341 (uri (rubygems-uri "rjb" version))
1342 (sha256
1343 (base32
1344 "0ck802bm8cklhmqsgzhsa0y8lg80qy52dp3m8rlld3zc5gv1rsb9"))))
1345 (build-system ruby-build-system)
1346 (arguments
1347 (list
1348 #:tests? #f ; no rakefile
1349 #:phases
1350 #~(modify-phases %standard-phases
1351 (add-before 'build 'set-java-home
1352 (lambda* (#:key inputs #:allow-other-keys)
1353 (setenv "JAVA_HOME" (assoc-ref inputs "jdk")))))))
1354 (native-inputs
1355 `(("jdk" ,icedtea "jdk")))
1356 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1357 (description "RJB is a bridge program that connects Ruby and Java via the
1358Java Native Interface.")
1359 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
1360 (license license:lgpl2.1+)))
1361
1362(define-public ruby-log4r
1363 (package
1364 (name "ruby-log4r")
1365 (version "1.1.10")
1366 (source
1367 (origin
1368 (method url-fetch)
1369 (uri (rubygems-uri "log4r" version))
1370 (sha256
1371 (base32
1372 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1373 (build-system ruby-build-system)
1374 (arguments
1375 '(#:tests? #f)) ; no Rakefile in gem
1376 (synopsis "Flexible logging library for Ruby")
1377 (description "Comprehensive and flexible logging library written
1378in Ruby for use in Ruby programs. It features a hierarchical logging
1379system of any number of levels, custom level names, logger
1380inheritance, multiple output destinations per log event, execution
1381tracing, custom formatting, thread safteyness, XML and YAML
1382configuration, and more.")
1383 (home-page "http://log4r.rubyforge.org/")
1384 (license license:bsd-3)))
1385
1386(define-public ruby-logger
1387 (package
1388 (name "ruby-logger")
1389 (version "1.7.0")
1390 (source
1391 (origin
1392 (method url-fetch)
1393 (uri (rubygems-uri "logger" version))
1394 (sha256
1395 (base32 "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr"))))
1396 (build-system ruby-build-system)
1397 (native-inputs (list bundler ruby-rake ruby-test-unit
1398 ruby-test-unit-ruby-core))
1399 (synopsis "Simple logging utility")
1400 (arguments (list #:tests? #f)) ; no tests
1401 (description
1402 "Logger is a simple but powerful logging utility to output
1403messages in a Ruby program.
1404
1405Logger has the following features:
1406
1407@itemize @bullet
1408@item Printing messages to different levels such as @code{info} and @code{error}
1409@item Auto-rolling of log files
1410@item Setting the format of log messages
1411@item Specifying a program name in conjunction with the message
1412@end itemize")
1413 (home-page "https://github.com/ruby/logger")
1414 (license (list license:ruby license:bsd-2))))
1415
1416(define-public ruby-atoulme-antwrap
1417 (package
1418 (name "ruby-atoulme-antwrap")
1419 (version "0.7.5")
1420 (source (origin
1421 (method url-fetch)
1422 (uri (rubygems-uri "atoulme-Antwrap" version))
1423 (sha256
1424 (base32
1425 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1426 (build-system ruby-build-system)
1427 ;; Test data required for most of the tests are not included.
1428 (arguments `(#:tests? #f))
1429 (native-inputs
1430 (list ruby-hoe))
1431 (inputs
1432 (list ruby-rjb))
1433 (synopsis "Ruby wrapper for the Ant build tool")
1434 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1435tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1436script.")
1437 (home-page "http://rubyforge.org/projects/antwrap/")
1438 (license license:expat)))
1439
1440(define-public ruby-atoulme-saikuro
1441 (package
1442 (name "ruby-atoulme-saikuro")
1443 (version "1.2.1")
1444 (source (origin
1445 (method url-fetch)
1446 (uri (rubygems-uri "atoulme-Saikuro" version))
1447 (sha256
1448 (base32
1449 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1450 (build-system ruby-build-system)
1451 (arguments
1452 (list
1453 #:phases
1454 #~(modify-phases %standard-phases
1455 (add-after 'unpack 'fix-module-resolution
1456 (lambda _
1457 (substitute* "lib/saikuro.rb"
1458 ;; irb 1.2.0 or later doesn't have RubyToken
1459 (("require 'irb/ruby-lex'")
1460 "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'"))))
1461 (delete 'check)
1462 (add-after 'install 'check
1463 (lambda* (#:key outputs #:allow-other-keys)
1464 (let* ((out (assoc-ref outputs "out"))
1465 (saikuro (string-append out "/bin/saikuro")))
1466 (setenv "GEM_PATH" (string-append
1467 (getenv "GEM_PATH") ":"
1468 #$output "/lib/ruby/vendor_ruby"))
1469 (invoke saikuro "--cyclo" "--token" "--input_directory" "tests")))))))
1470 (propagated-inputs (list ruby-irb-1.1.1
1471 ruby-e2mmap)) ;required by rubygems
1472 (synopsis "Cyclomatic complexity analyzer")
1473 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1474given Ruby source code Saikuro will generate a report listing the cyclomatic
1475complexity of each method found. In addition, Saikuro counts the number of
1476lines per method and can generate a listing of the number of tokens on each
1477line of code.")
1478 (home-page "http://www.github.com/atoulme/Saikuro")
1479 ;; File headers contain the BSD-3 license and the README.rdoc says that
1480 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1481 ;; of the Expat license.
1482 (license license:bsd-3)))
1483
1484(define-public ruby-awesome-print
1485 (package
1486 (name "ruby-awesome-print")
1487 (version "1.9.2")
1488 (source
1489 (origin
1490 (method url-fetch)
1491 (uri (rubygems-uri "awesome_print" version))
1492 (sha256
1493 (base32
1494 "0vkq6c8y2jvaw03ynds5vjzl1v9wg608cimkd3bidzxc0jvk56z9"))))
1495 (build-system ruby-build-system)
1496 (arguments
1497 (list
1498 #:phases
1499 #~(modify-phases %standard-phases
1500 (replace 'check
1501 (lambda _
1502 ;; Remove failing test.
1503 (for-each delete-file
1504 '("spec/ext/nokogiri_spec.rb"
1505 "spec/colors_spec.rb"
1506 "spec/formats_spec.rb"
1507 "spec/methods_spec.rb"
1508 "spec/misc_spec.rb"
1509 "spec/objects_spec.rb"))
1510 (invoke "rspec" "-c" "spec"))))))
1511 (native-inputs
1512 (list ruby-nokogiri ruby-rspec ruby-simplecov))
1513 (synopsis "Pretty print Ruby objects to visualize their structure")
1514 (description
1515 "Ruby dubugging companion: pretty print Ruby objects to visualize their
1516structure. Supports custom object formatting via plugins.")
1517 (home-page "https://github.com/awesome-print/awesome_print")
1518 (license license:expat)))
1519
1520(define-public ruby-pandoc-ruby
1521 (package
1522 (name "ruby-pandoc-ruby")
1523 (version "2.1.10")
1524 (source
1525 (origin
1526 (method git-fetch) ;the gem lacks many test files
1527 (uri (git-reference
1528 (url "https://github.com/xwmx/pandoc-ruby")
1529 (commit version)))
1530 (file-name (git-file-name name version))
1531 (sha256
1532 (base32
1533 "0zi66884rkd06vifar6zv9927bjcfl7c357cvra2w539vniyydly"))))
1534 (build-system ruby-build-system)
1535 (arguments
1536 `(#:tests? #f ; Disable tests since they depend on pandoc behavior
1537 ; and there are no upstream releases.
1538 #:phases
1539 (modify-phases %standard-phases
1540 (add-after 'unpack 'patch-pandoc-path
1541 (lambda* (#:key inputs #:allow-other-keys)
1542 (let ((pandoc (search-input-file inputs "/bin/pandoc")))
1543 (substitute* "lib/pandoc-ruby.rb"
1544 (("@pandoc_path = 'pandoc'")
1545 (format #f "@pandoc_path = '~a'" pandoc)))
1546 (substitute* "test/test_pandoc_ruby.rb"
1547 (("('|\")pandoc" _ quote)
1548 (string-append quote pandoc))
1549 (("\\^pandoc")
1550 ".*pandoc")))))
1551 (add-after 'unpack 'adjust-tests
1552 ;; The tests expect filenames with spaces. Because they don't have
1553 ;; spaces the quotes around the output are dropped automatically.
1554 (lambda _
1555 (substitute* "test/test_pandoc_ruby.rb"
1556 (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
1557 (add-after 'extract-gemspec 'remove-Gemfile.lock
1558 (lambda _
1559 (delete-file "Gemfile.lock")
1560 (substitute* "pandoc-ruby.gemspec"
1561 (("Gemfile\\.lock") "")))))))
1562 (native-inputs
1563 (list ruby-mocha))
1564 (inputs
1565 (list pandoc))
1566 (synopsis "Ruby wrapper for Pandoc")
1567 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1568command line tools for converting one markup format to another. Pandoc can
1569convert documents from a variety of formats including markdown,
1570reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1571variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1572ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1573markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1574more.")
1575 (home-page "https://github.com/xwmx/pandoc-ruby")
1576 (license license:expat)))
1577
1578(define-public ruby-patron
1579 (package
1580 (name "ruby-patron")
1581 (version "0.13.3")
1582 (source
1583 (origin
1584 (method url-fetch)
1585 (uri (rubygems-uri "patron" version))
1586 (sha256
1587 (base32
1588 "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
1589 (build-system ruby-build-system)
1590 (inputs
1591 (list curl))
1592 (arguments
1593 `(#:tests? #f)) ; no included tests
1594 (synopsis "Ruby HTTP client library based on @code{libcurl}")
1595 (description
1596 "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
1597not try to expose the full power (read complexity) of @code{libcurl} but
1598instead tries to provide a sane API while taking advantage of @code{libcurl}
1599under the hood.")
1600 (home-page "https://github.com/toland/patron")
1601 (license license:expat)))
1602
1603(define-public ruby-slim
1604 (package
1605 (name "ruby-slim")
1606 (version "5.2.1")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (rubygems-uri "slim" version))
1611 (sha256
1612 (base32
1613 "1rqk7jn66wgx50b18ndhbppjq55rbcwgqg1rbhnhxwiggvzisdbj"))))
1614 (build-system ruby-build-system)
1615 (arguments
1616 `(#:phases
1617 (modify-phases %standard-phases
1618 ;; See: https://github.com/slim-template/slim/issues/857 and
1619 ;; https://github.com/slim-template/slim/issues/858.
1620 (add-after 'unpack 'skip-broken-tests
1621 (lambda _
1622 (substitute* "test/core/test_embedded_engines.rb"
1623 (("def test_render_with_markdown")
1624 "def skipped_test_render_with_markdown"))
1625 (substitute* "test/translator/test_translator.rb"
1626 (("raise (\"Missing test for.*)" _ tail)
1627 (string-append "print " tail)))))
1628 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1629 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1630 (add-after 'unpack 'prevent-bundler-interference
1631 (lambda _
1632 (substitute* "Rakefile"
1633 (("require 'bundler/setup'") "nil")
1634 (("Bundler::GemHelper\\.install_tasks") "nil")))))))
1635 (native-inputs
1636 (list ruby-rack-test ruby-minitest ruby-sinatra ruby-kramdown))
1637 (propagated-inputs
1638 (list ruby-temple ruby-tilt/minimal))
1639 (synopsis "Minimalist template language for Ruby")
1640 (description "Slim is a template language for Ruby that aims to reduce the
1641syntax to the minimum while remaining clear.")
1642 (home-page "http://slim-lang.com/")
1643 (license license:expat)))
1644
1645(define-public ruby-asciidoctor
1646 (package
1647 (name "ruby-asciidoctor")
1648 (version "2.0.26")
1649 (source
1650 (origin
1651 (method git-fetch) ;the gem release lacks a Rakefile
1652 (uri (git-reference
1653 (url "https://github.com/asciidoctor/asciidoctor")
1654 (commit (string-append "v" version))))
1655 (file-name (git-file-name name version))
1656 (sha256
1657 (base32
1658 "06kj20z8zlvbhv663gddk5ffv8rv2ba5spaf6j8fix4607wwjx5p"))))
1659 (build-system ruby-build-system)
1660 (arguments
1661 (list
1662 #:test-target "test:all"
1663 #:phases
1664 #~(modify-phases %standard-phases
1665 (add-after 'extract-gemspec 'strip-version-requirements
1666 (lambda _
1667 (delete-file "Gemfile")
1668 (substitute* "asciidoctor.gemspec"
1669 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1670 (string-append stripped "\n")))))
1671 (add-after 'install 'install-man-page
1672 (lambda* (#:key outputs #:allow-other-keys)
1673 (install-file (search-input-file
1674 outputs (string-append "lib/ruby/vendor_ruby/"
1675 "gems/asciidoctor-"
1676 #$version
1677 "/man/asciidoctor.1"))
1678 (string-append #$output "/share/man/man1")))))))
1679 (native-inputs
1680 (list ruby-asciimath
1681 ruby-coderay
1682 ruby-concurrent-ruby
1683 ruby-erubi
1684 ruby-haml
1685 ruby-minitest
1686 ruby-nokogiri
1687 ruby-open-uri-cached
1688 ruby-rouge
1689 ruby-slim
1690 ruby-tilt))
1691 (synopsis "Converter from AsciiDoc content to other formats")
1692 (description "Asciidoctor is a text processor and publishing toolchain for
1693converting AsciiDoc content to HTML5, DocBook 5, PDF, and other formats.")
1694 (home-page "https://asciidoctor.org")
1695 (license license:expat)))
1696
1697 (define-public ruby-asciidoctor/minimal
1698 (hidden-package
1699 (package
1700 (inherit ruby-asciidoctor)
1701 (arguments (list #:tests? #f))
1702 (native-inputs (list ))))); clear out for minimal build
1703
1704(define-public ruby-asciidoctor-diagram
1705 (package
1706 (name "ruby-asciidoctor-diagram")
1707 (version "3.1.0")
1708 (source
1709 (origin
1710 (method url-fetch)
1711 (uri (rubygems-uri "asciidoctor-diagram" version))
1712 (sha256
1713 (base32 "15sc6yb4qyxy4v3bki26xn0j4k8rgjjiz3nwrxsprn6f0y6ysbp3"))))
1714 (arguments (list #:tests? #f)) ;tests not bundled in gem
1715 (native-inputs (list ruby-rspec))
1716 (propagated-inputs (list ruby-asciidoctor ruby-rexml))
1717 (build-system ruby-build-system)
1718 (synopsis "Asciidoctor diagram extension")
1719 (description "Asciidoctor Diagram is a set of Asciidoctor extensions that
1720enable you to add diagrams, which you describe using plain text, to your
1721AsciiDoc document. The extension will run the appropriate diagram processor to
1722generate an image from the input text. The generated image is then inserted
1723into your converted document.
1724
1725Detailed usage instructions can be found on the
1726@url{https://docs.asciidoctor.org/diagram-extension/latest/,
1727Asciidoctor documentation site}.
1728
1729Asciidoctor Diagram was inspired by the
1730@url{https://code.google.com/p/asciidoc-plantuml/, AsciiDoc PlantUML filter}.")
1731 (home-page "https://github.com/asciidoctor/asciidoctor-diagram")
1732 (license license:expat)))
1733
1734(define-public ruby-asciidoctor-multipage
1735 (package
1736 (name "ruby-asciidoctor-multipage")
1737 (version "0.0.16")
1738 (source (origin
1739 (method git-fetch)
1740 (uri (git-reference
1741 (url "https://github.com/owenh000/asciidoctor-multipage")
1742 (commit (string-append "v" version))))
1743 (file-name (git-file-name name version))
1744 (sha256
1745 (base32
1746 "0rnz7qxdw5qbi3qjplihhk468kv690njdi06yllgylc75k62ar1p"))))
1747 (propagated-inputs (list ruby-asciidoctor ruby-slim))
1748 (build-system ruby-build-system)
1749 (arguments
1750 `(#:phases (modify-phases %standard-phases
1751 (add-after 'extract-gemspec 'strip-version-requirements
1752 (lambda _
1753 (delete-file "Gemfile")
1754 (substitute* "asciidoctor-multipage.gemspec"
1755 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1756 (string-append stripped "\n"))))))))
1757 (synopsis
1758 "Asciidoctor extension for generating HTML output using multiple pages")
1759 (description
1760 "Asciidoctor generates single-page documents. This extension
1761splits documents up into multiple HTML pages according to their headings, with
1762configurable levels.")
1763 (license license:expat)
1764 (home-page "https://github.com/owenh000/asciidoctor-multipage")))
1765
1766(define-public ruby-asciidoctor-pdf
1767 (package
1768 (name "ruby-asciidoctor-pdf")
1769 (version "2.3.24")
1770 (source
1771 (origin
1772 (method git-fetch) ;no test suite in the distributed gem
1773 (uri (git-reference
1774 (url "https://github.com/asciidoctor/asciidoctor-pdf")
1775 (commit (string-append "v" version))))
1776 (file-name (git-file-name name version))
1777 (sha256
1778 (base32
1779 "0njpbgfdwzw7rbjj5vg5xjmykm55x588fk437nvaqg6bq7pv66mw"))
1780 (patches
1781 (search-patches
1782 "ruby-asciidoctor-pdf-support-prawn-svg-0_36.patch"))))
1783 (build-system ruby-build-system)
1784 (arguments
1785 (list
1786 #:phases
1787 #~(modify-phases %standard-phases
1788 (add-after 'extract-gemspec 'relax-dependencies
1789 (lambda _
1790 (substitute* "asciidoctor-pdf.gemspec"
1791 (("~>") ">="))))
1792 ;; The tests rely on the Gem being installed, so move the check
1793 ;; phase after the install phase.
1794 (delete 'check)
1795 (add-after 'install 'check
1796 (lambda* (#:key tests? #:allow-other-keys)
1797 (setenv "GEM_PATH" (string-append
1798 (getenv "GEM_PATH") ":"
1799 #$output "/lib/ruby/vendor_ruby"))
1800 (when tests?
1801 (let ((skippedtests
1802 (list ;; Disable tests requiring write access
1803 "should render linear gradient in SVG"
1804 ;; Disable visual+cli tests requiring network access
1805 "should allow remote image in SVG to be read if allow"
1806 "should warn if remote image is missing and allow"
1807 "should replace video with poster image if allow"
1808 "should read remote image over"
1809 "should embed remote image")))
1810 (setenv "SPEC_OPTS"
1811 (string-append
1812 "--warnings" " "
1813 ;; Disable tests failing in the guix environment:
1814 "--example-matches "
1815 "'(^(?!.*(" (string-join skippedtests "|") ")).*)'")))
1816 ;; The Fontconfig error: No writable cache directories errors
1817 ;; are caused by our read-only test environment and are
1818 ;; non-failing
1819 (invoke "rspec" "-t" "~network")))))))
1820 (native-inputs
1821 (list poppler
1822 ruby-chunky-png
1823 ruby-coderay
1824 ruby-pdf-inspector
1825 ruby-rouge
1826 ruby-rspec))
1827 (propagated-inputs
1828 (list ruby-asciidoctor
1829 ruby-concurrent-ruby
1830 ruby-prawn
1831 ruby-prawn-icon
1832 ruby-prawn-svg
1833 ruby-prawn-table
1834 ruby-prawn-templates
1835 ruby-text-hyphen
1836 ruby-treetop
1837 ruby-ttfunk))
1838 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1839 (description "Asciidoctor PDF is an extension for Asciidoctor that
1840converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1841PDF library. It has features such as:
1842@itemize
1843@item Direct AsciiDoc to PDF conversion
1844@item Configuration-driven theme (style and layout)
1845@item Scalable Vector Graphics (SVG) support
1846@item PDF document outline (i.e., bookmarks)
1847@item Table of contents page(s)
1848@item Document metadata (title, authors, subject, keywords, etc.)
1849@item Internal cross reference links
1850@item Syntax highlighting with Rouge, Pygments, or CodeRay
1851@item Page numbering
1852@item Customizable running content (header and footer)
1853@item
1854“Keep together” blocks (i.e., page breaks avoided in certain block content)
1855@item Orphaned section titles avoided
1856@item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1857@item Table border settings honored
1858@item Font-based icons
1859@item Custom TrueType (TTF) fonts
1860@item Double-sided printing mode (margins alternate on recto and verso pages)
1861@end itemize")
1862 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1863 (license license:expat)))
1864
1865(define-public ruby-prawn-icon
1866 (package
1867 (name "ruby-prawn-icon")
1868 (version "3.1.0")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (rubygems-uri "prawn-icon" version))
1873 (sha256
1874 (base32
1875 "049k42bqy4iq9hddf7jah83b6qr8ka63w1d63illh1mf4f4dihdk"))))
1876 (build-system ruby-build-system)
1877 (arguments
1878 `(#:test-target "spec"
1879 #:phases (modify-phases %standard-phases
1880 (add-after 'unpack 'remove-unnecessary-dependencies
1881 (lambda _
1882 (substitute* '("Rakefile" "spec/spec_helper.rb")
1883 ((".*[Bb]undler.*") "")
1884 (("^require 'rubocop.*") "")
1885 (("^RuboCop.*") "")))))))
1886 (native-inputs
1887 (list ruby-pdf-inspector ruby-pdf-reader ruby-rspec ruby-simplecov))
1888 (propagated-inputs
1889 (list ruby-prawn))
1890 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1891 (description "@code{Prawn::Icon} provides various icon fonts including
1892FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1893toolkit.")
1894 (home-page "https://github.com/jessedoyle/prawn-icon/")
1895 (license %prawn-project-licenses)))
1896
1897(define-public ruby-css-parser
1898 (package
1899 (name "ruby-css-parser")
1900 (version "1.21.1")
1901 (source
1902 (origin
1903 (method url-fetch)
1904 (uri (rubygems-uri "css_parser" version))
1905 (sha256
1906 (base32 "1izp5vna86s7xivqzml4nviy01bv76arrd5is8wkncwp1by3zzbc"))))
1907 (build-system ruby-build-system)
1908 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1909 (propagated-inputs
1910 (list ruby-addressable))
1911 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1912 (description "This package allows loading, parsing and cascading Cascading
1913Style Sheets (CSS) rule sets in Ruby.")
1914 (home-page "https://github.com/premailer/css_parser")
1915 (license license:expat)))
1916
1917(define-public ruby-prism
1918 (package
1919 (name "ruby-prism")
1920 (version "1.6.0")
1921 (source (origin
1922 (method git-fetch)
1923 (uri (git-reference
1924 (url "https://github.com/ruby/prism.git")
1925 (commit (string-append "v" version))))
1926 (file-name (git-file-name name version))
1927 (sha256
1928 (base32
1929 "1104w3bcsg1zwi2ipbkn62a11ik5f357xrscgxrc3iyy46lq8bgn"))))
1930 (build-system ruby-build-system)
1931 (arguments
1932 `(#:phases
1933 (modify-phases %standard-phases
1934 (replace 'build
1935 (lambda _
1936 (setenv "CC" ,(cc-for-target))
1937 (invoke "rake" "compile")))
1938 (replace 'install
1939 (lambda* (#:key outputs #:allow-other-keys)
1940 (setenv "GEM_HOME" (string-append (assoc-ref outputs "out")
1941 "/lib/ruby/vendor_ruby"))
1942 (invoke "rake" "install")
1943 ;; Make build reproducible.
1944 (for-each delete-file
1945 (find-files (string-append (assoc-ref outputs "out")
1946 "/lib/ruby/vendor_ruby")
1947 "gem_make.out$")))))))
1948 (native-inputs
1949 (list ruby-rake ruby-rake-compiler))
1950 (synopsis "Parser for Ruby source code")
1951 (description "This package provides a parser for Ruby source code,
1952written in C.")
1953 (home-page "https://ruby.github.io/prism/")
1954 (license license:expat)))
1955
1956(define-public ruby-prawn-svg
1957 (package
1958 (name "ruby-prawn-svg")
1959 (version "0.37.0")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (rubygems-uri "prawn-svg" version))
1964 (sha256
1965 (base32 "0c18drdsms06h5c5hmhdi7sbck72f2sp3sbgwyr7frq65h1xs6r7"))))
1966 (build-system ruby-build-system)
1967 (arguments
1968 (list #:test-target "spec"
1969 #:phases
1970 #~(modify-phases %standard-phases
1971 (add-after 'unpack 'do-not-use-bundler
1972 (lambda _
1973 (substitute* "spec/spec_helper.rb"
1974 ((".*[Bb]undler.*") ""))))
1975 (replace 'check
1976 (lambda* (#:key tests? #:allow-other-keys)
1977 (when tests?
1978 ;; This test fails due to the recent rspec 3.12 used
1979 ;; (see: https://github.com/mogest/prawn-svg/issues/151).
1980 (delete-file "spec/prawn/svg/interface_spec.rb")
1981 (invoke "rspec" "-Ilib" "-rprawn-svg")))))))
1982 (native-inputs (list ruby-rspec))
1983 (propagated-inputs (list ruby-css-parser ruby-matrix ruby-prawn ruby-rexml))
1984 (synopsis "SVG renderer for the Prawn PDF library")
1985 (description "This library allows rendering Scalable Vector Graphics (SVG)
1986graphics directly into a Portable Document Format (PDF) document using the
1987Prawn module.")
1988 (home-page "https://github.com/mogest/prawn-svg")
1989 (license license:expat)))
1990
1991(define-public ruby-prawn-templates
1992 (package
1993 (name "ruby-prawn-templates")
1994 (version "0.1.2")
1995 (source
1996 (origin
1997 (method git-fetch)
1998 (uri (git-reference
1999 (url "https://github.com/prawnpdf/prawn-templates")
2000 (commit version)))
2001 (file-name (git-file-name name version))
2002 (sha256
2003 (base32
2004 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
2005 (build-system ruby-build-system)
2006 (arguments
2007 `(#:phases (modify-phases %standard-phases
2008 (add-after 'unpack 'do-not-use-bundler
2009 (lambda _
2010 (substitute* "spec/spec_helper.rb"
2011 ((".*[Bb]undler.*") ""))))
2012 (replace 'check
2013 (lambda* (#:key tests? #:allow-other-keys)
2014 (when tests?
2015 (invoke "rspec")))))))
2016 (native-inputs
2017 (list ruby-pdf-inspector ruby-rspec))
2018 (propagated-inputs
2019 (list ruby-pdf-reader ruby-prawn))
2020 (synopsis "Prawn extension to include or combine PDF documents")
2021 (description "This @strong{unmaintained} package provides a Prawn
2022extension that allows including other Portable Document Format (PDF) documents
2023as background or combining several PDF documents into one. This functionality
2024used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
2025of its many longstanding issues.")
2026 (home-page "https://github.com/prawnpdf/prawn-templates")
2027 (license %prawn-project-licenses)))
2028
2029(define-public ruby-polyglot
2030 (package
2031 (name "ruby-polyglot")
2032 (version "0.3.5")
2033 (source
2034 (origin
2035 (method url-fetch)
2036 (uri (rubygems-uri "polyglot" version))
2037 (sha256
2038 (base32
2039 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
2040 (build-system ruby-build-system)
2041 (arguments `(#:tests? #f)) ;no test suite
2042 (synopsis "Augment @code{require} to load non-Ruby file types")
2043 (description "The Polyglot library allows a Ruby module to register a
2044loader for the file type associated with a filename extension, and it augments
2045@code{require} to find and load matching files.")
2046 (home-page "https://github.com/cjheath/polyglot")
2047 (license license:expat)))
2048
2049(define-public ruby-treetop
2050 (package
2051 (name "ruby-treetop")
2052 (version "1.6.12")
2053 (source
2054 (origin
2055 (method git-fetch) ;no test suite in distributed gem
2056 (uri (git-reference
2057 (url "https://github.com/cjheath/treetop")
2058 (commit (string-append "v" version))))
2059 (file-name (git-file-name name version))
2060 (sha256
2061 (base32
2062 "0cgs6f9z0a9dq5fc03710zsch4gmh1771wq36mq81qsql4x9vksf"))))
2063 (build-system ruby-build-system)
2064 (arguments
2065 `(#:test-target "spec"))
2066 (native-inputs
2067 (list ruby-activesupport ruby-rr ruby-rspec))
2068 (propagated-inputs
2069 (list ruby-polyglot))
2070 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
2071 (description "This package provides a Ruby-based Parsing Expression
2072Grammar (PEG) parser generator Domain Specific Language (DSL).")
2073 (home-page "https://github.com/cjheath/treetop")
2074 (license license:expat)))
2075
2076(define-public ruby-typhoeus
2077 (package
2078 (name "ruby-typhoeus")
2079 (version "1.4.0")
2080 (source
2081 (origin
2082 (method url-fetch)
2083 (uri (rubygems-uri "typhoeus" version))
2084 (sha256
2085 (base32
2086 "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
2087 (build-system ruby-build-system)
2088 (arguments
2089 `(#:tests? #f)) ; no included tests
2090 (propagated-inputs
2091 (list ruby-ethon))
2092 (synopsis "@code{libcurl} wrapper in Ruby")
2093 (description
2094 "Like a modern code version of the mythical beast with 100 serpent heads,
2095Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
2096logic.")
2097 (home-page "https://github.com/typhoeus/typhoeus")
2098 (license license:expat)))
2099
2100;;; A minimal variant used to build ruby-rubocop itself.
2101(define-public ruby-rubocop-capybara-minimal
2102 (package
2103 (name "ruby-rubocop-capybara")
2104 (version "2.21.0")
2105 (source (origin
2106 (method git-fetch) ;for tests
2107 (uri (git-reference
2108 (url "https://github.com/rubocop/rubocop-capybara")
2109 (commit (string-append "v" version))))
2110 (file-name (git-file-name name version))
2111 (sha256
2112 (base32
2113 "19r2s782r9ch2g1lxgrvk22d9qqkxi69brza16bfwp2rl2064qnc"))))
2114 (build-system ruby-build-system)
2115 (arguments (list #:tests? #f))
2116 (synopsis "Capybara plugin for RuboCop")
2117 (description "This package provides a RuboCop plugin that can be used for
2118code style checking of Capybara test files (RSpec, Cucumber, Minitest).")
2119 (home-page "https://github.com/rubocop/rubocop-capybara")
2120 (properties '((hidden? . #t)))
2121 (license license:expat)))
2122
2123(define-public ruby-rubocop-capybara
2124 (package
2125 (inherit ruby-rubocop-capybara-minimal)
2126 (arguments
2127 (list #:test-target "spec"
2128 #:phases #~(modify-phases %standard-phases
2129 (add-after 'unpack 'relax-requirements
2130 (lambda _
2131 (substitute* "Gemfile"
2132 (("gem 'rubocop-rspec', '~> 2.16.0'")
2133 "gem 'rubocop-rspec', '>= 2.16.0'")
2134 (("gem 'danger'.*") "")))))))
2135 (native-inputs
2136 (list ruby-bump
2137 ruby-rack
2138 ruby-rake
2139 ruby-rspec
2140 ruby-rubocop
2141 ruby-rubocop-performance-minimal
2142 ruby-rubocop-rake-minimal
2143 ruby-rubocop-rspec-minimal
2144 ruby-simplecov
2145 ruby-yard))
2146 (properties
2147 (alist-delete 'hidden?
2148 (package-properties ruby-rubocop-capybara-minimal)))))
2149
2150(define-public ruby-rubocop-factory-bot
2151 (package
2152 (name "ruby-rubocop-factory-bot")
2153 (version "2.26.1")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (rubygems-uri "rubocop-factory_bot" version))
2158 (sha256
2159 (base32 "1aljadsjx7affcarzbhz7pydpy6fgqb8hl951y0cmrffxpa3rqcd"))))
2160 (build-system ruby-build-system)
2161 (arguments '(#:tests? #f)) ; No tests bundled.
2162 (synopsis "Code style checking for factory_bot files")
2163 (description
2164 "This package provides a plugin for the @code{RuboCop} code style
2165enforcing & linting tool for @code{factory_bot} files.")
2166 (home-page "https://github.com/rubocop/rubocop-factory_bot")
2167 (license license:expat)))
2168
2169;;; A minimal variant used to build ruby-rubocop itself.
2170(define-public ruby-rubocop-rake-minimal
2171 (package
2172 (name "ruby-rubocop-rake")
2173 (version "0.6.0")
2174 (source (origin
2175 (method git-fetch) ;for tests
2176 (uri (git-reference
2177 (url "https://github.com/rubocop/rubocop-rake")
2178 (commit (string-append "v" version))))
2179 (file-name (git-file-name name version))
2180 (sha256
2181 (base32
2182 "1r53szwglikbir1fvpz4i51p915khrrkl6rp61zcx3dcrclkr3ld"))))
2183 (build-system ruby-build-system)
2184 (arguments (list #:tests? #f)) ;avoid extra dependencies
2185 (synopsis "RuboCop plugin for Rake")
2186 (description "This package provides a RuboCop plugin for Rake.")
2187 (home-page "https://github.com/rubocop/rubocop-rake")
2188 (properties '((hidden? . #t)))
2189 (license license:expat)))
2190
2191(define-public ruby-rubocop-rake
2192 (package
2193 (inherit ruby-rubocop-rake-minimal)
2194 (arguments
2195 (list #:test-target "spec"))
2196 (native-inputs
2197 (list ruby-rake
2198 ruby-rspec
2199 ruby-rubocop
2200 ruby-rubocop-rspec))
2201 (propagated-inputs
2202 (list ruby-rubocop))
2203 (properties
2204 (alist-delete 'hidden? (package-properties ruby-rubocop-rake-minimal)))))
2205
2206;;; A minimal variant used to build ruby-rubocop itself.
2207(define-public ruby-rubocop-rspec-minimal
2208 (package
2209 (name "ruby-rubocop-rspec")
2210 (version "2.26.0")
2211 (source
2212 (origin
2213 (method git-fetch)
2214 (uri (git-reference
2215 (url "https://github.com/rubocop/rubocop-rspec")
2216 (commit (string-append "v" version))))
2217 (file-name (git-file-name name version))
2218 (sha256
2219 (base32
2220 "1w9whadx60kv4vlbnk77b5yyhhfcg717r9cr334zqznqr1bqr8mh"))))
2221 (build-system ruby-build-system)
2222 (arguments
2223 (list #:tests? #f ;avoid extra dependencies
2224 #:phases
2225 #~(modify-phases %standard-phases
2226 (add-after 'unpack 'relax-requirements
2227 (lambda _
2228 (substitute* "Gemfile"
2229 (("gem 'danger'.*") "")))))))
2230 (propagated-inputs (list ruby-rubocop-factory-bot))
2231 (synopsis "Code style checking for RSpec files")
2232 (description "This package provides a plugin for the RuboCop code style
2233enforcing & linting tool.")
2234 (home-page "https://github.com/rubocop/rubocop-rspec")
2235 (properties '((hidden? . #t)))
2236 (license license:expat)))
2237
2238(define-public ruby-rubocop-rspec
2239 (package
2240 (inherit ruby-rubocop-rspec-minimal)
2241 (arguments
2242 (substitute-keyword-arguments
2243 (package-arguments ruby-rubocop-rspec-minimal)
2244 ((#:tests? _ #f) #t)
2245 ((#:test-target _ "test") "spec")))
2246 (native-inputs
2247 (list ruby-bump
2248 ruby-rack
2249 ruby-rspec
2250 ruby-rubocop-performance-minimal
2251 ruby-rubocop-rake-minimal
2252 ruby-simplecov
2253 ruby-yard))
2254 (propagated-inputs
2255 (list ruby-rubocop
2256 ruby-rubocop-ast
2257 ruby-rubocop-capybara
2258 ruby-rubocop-factory-bot))
2259 (properties
2260 (alist-delete 'hidden? (package-properties ruby-rubocop-rspec-minimal)))))
2261
2262(define-public ruby-rubocop-packaging
2263 (package
2264 (name "ruby-rubocop-packaging")
2265 (version "0.5.2")
2266 (source
2267 (origin
2268 (method git-fetch)
2269 (uri (git-reference
2270 (url "https://github.com/utkarsh2102/rubocop-packaging")
2271 (commit (string-append "v" version))))
2272 (file-name (git-file-name name version))
2273 (sha256
2274 (base32
2275 "08jsfp42z0aj32002z2hz8vkmza0jvnrqk9rk2v0xb8qdxkgbx3l"))))
2276 (build-system ruby-build-system)
2277 (arguments
2278 (list #:test-target "spec"
2279 #:phases
2280 #~(modify-phases %standard-phases
2281 (add-after 'unpack 'skip-problematic-tests
2282 (lambda _
2283 ;; Tests are actually running fine, except for a prefix.
2284 ;; This doesn't impair functionality, ignored for now.
2285 (delete-file
2286 "spec/rubocop/cop/packaging/gemspec_git_spec.rb"))))))
2287 (propagated-inputs
2288 (list ruby-rubocop))
2289 (native-inputs
2290 (list ruby-rspec
2291 ruby-yard
2292 ruby-bump))
2293 (synopsis
2294 "Collection of RuboCop checks for downstream compatibility issues")
2295 (description
2296 "This package provides a collection of RuboCop cops to check for
2297downstream compatibility issues in the Ruby code.")
2298 (home-page "https://github.com/utkarsh2102/rubocop-packaging")
2299 (license license:expat)))
2300
2301(define-public ruby-rubocop-performance
2302 (package
2303 (name "ruby-rubocop-performance")
2304 (version "1.23.1")
2305 (source
2306 (origin
2307 (method git-fetch)
2308 (uri (git-reference
2309 (url "https://github.com/rubocop/rubocop-performance")
2310 (commit (string-append "v" version))))
2311 (file-name (git-file-name name version))
2312 (sha256
2313 (base32
2314 "0d1p6pgrcnj58q1g0np5j4vbk7wavj31b4bapi5p4gckqlnc7xjd"))))
2315 (build-system ruby-build-system)
2316 (arguments
2317 `(#:tests? #f ; tests require a git checkout of rubocop's source code.
2318 #:phases
2319 (modify-phases %standard-phases
2320 (replace 'replace-git-ls-files
2321 (lambda _
2322 (substitute* "rubocop-performance.gemspec"
2323 (("`git ls-files -z config lib LICENSE.txt README.md`")
2324 "`find config lib LICENSE.txt README.md \
2325-type f -print0 |sort -z`"))))
2326 (add-before 'check 'set-HOME
2327 (lambda _
2328 (setenv "HOME" "/tmp"))))))
2329 (propagated-inputs
2330 (list ruby-rubocop ruby-rubocop-ast))
2331 (native-inputs
2332 (list ruby-bump ruby-yard))
2333 (synopsis "Performance optimizations checkers for Ruby code")
2334 (description "This package provides a collection of RuboCop cops to check
2335for performance optimizations in Ruby code.")
2336 (home-page "https://docs.rubocop.org/rubocop-performance/")
2337 (license license:expat)))
2338
2339(define-public ruby-rubocop-performance-minimal
2340 (hidden-package
2341 (package
2342 (inherit ruby-rubocop-performance)
2343 (arguments
2344 (substitute-keyword-arguments arguments
2345 ((#:tests? _ #f) #f)))
2346 (propagated-inputs '())
2347 (native-inputs '()))))
2348
2349(define-public ruby-stud
2350 (package
2351 (name "ruby-stud")
2352 (version "0.0.23")
2353 (source (origin
2354 (method url-fetch)
2355 (uri (rubygems-uri "stud" version))
2356 (sha256
2357 (base32
2358 "0qpb57cbpm9rwgsygqxifca0zma87drnlacv49cqs2n5iyi6z8kb"))))
2359 (build-system ruby-build-system)
2360 (native-inputs (list ruby-rspec))
2361 (arguments
2362 (list #:phases #~(modify-phases %standard-phases
2363 ;; No Rakefile is included, so run rspec directly.
2364 (replace 'check
2365 (lambda* (#:key tests? #:allow-other-keys)
2366 (when tests?
2367 (invoke "rspec")))))))
2368 (synopsis "Retries, worker supervision, resource pools and more for Ruby")
2369 (description "The Stud Ruby library adds a few things missing from the
2370standard Ruby library such as:
2371@table @code
2372@item {Stud::Try}
2373Retry on failure, with back-off, where failure is any exception.
2374@item {Stud::Pool}
2375Generic resource pools.
2376@item {Stud::Task}
2377Tasks (threads that can return values, exceptions, etc.)
2378@item {Stud.interval}
2379Interval execution (do X every N seconds).
2380@item {Stud::Buffer}
2381Batch and flush behavior.
2382@end itemize")
2383 (home-page "https://github.com/jordansissel/ruby-stud")
2384 (license license:asl2.0)))
2385
2386(define-public ruby-standard-custom
2387 (package
2388 (name "ruby-standard-custom")
2389 (version "1.0.2")
2390 (source
2391 (origin
2392 (method url-fetch)
2393 (uri (rubygems-uri "standard-custom" version))
2394 (sha256
2395 (base32 "0av55ai0nv23z5mhrwj1clmxpgyngk7vk6rh58d4y1ws2y2dqjj2"))))
2396 (build-system ruby-build-system)
2397 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
2398 (propagated-inputs (list ruby-lint-roller ruby-rubocop))
2399 (synopsis "Plugin of custom cops for Standard Ruby")
2400 (description
2401 "This package provides a implementations of custom cops that are bundled
2402as defaults in Standard Ruby.")
2403 (home-page "https://github.com/standardrb/standard-custom")
2404 (license license:expat)))
2405
2406(define-public ruby-standard-performance
2407 (package
2408 (name "ruby-standard-performance")
2409 (version "1.6.0")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (rubygems-uri "standard-performance" version))
2414 (sha256
2415 (base32 "1x298w3wmq8cavbsg903wc3arxp3xh2x8263brvy128436m732rd"))))
2416 (build-system ruby-build-system)
2417 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
2418 (propagated-inputs (list ruby-lint-roller ruby-rubocop-performance))
2419 (synopsis "Standard Ruby Plugin for rubocop-performance")
2420 (description
2421 "This package is a Standard Ruby Plugin providing configuration for
2422@code{rubocop-performance}.")
2423 (home-page "https://github.com/standardrb/standard-performance")
2424 (license license:expat)))
2425
2426(define-public ruby-standard
2427 (package
2428 (name "ruby-standard")
2429 (version "1.37.0")
2430 (source
2431 (origin
2432 (method git-fetch) ;no test suite in distributed gem
2433 (uri (git-reference
2434 (url "https://github.com/testdouble/standard")
2435 (commit (string-append "v" version))))
2436 (file-name (git-file-name name version))
2437 (sha256
2438 (base32 "0gm9fn6fz41aya34xz7kzda8xxs7h98n7cjx66qbcy2w0qhs40wc"))))
2439 (build-system ruby-build-system)
2440 (arguments
2441 (list
2442 #:phases
2443 #~(modify-phases %standard-phases
2444 (add-after 'unpack 'set-HOME
2445 (lambda _
2446 ;; Some tests fail otherwise.
2447 (setenv "HOME" "/tmp")))
2448 (add-after 'unpack 'relax-requirements
2449 (lambda _
2450 (substitute* "standard.gemspec"
2451 (("\"rubocop\", \".*\"")
2452 (string-append
2453 "\"rubocop\", \"~> "
2454 #$(package-version
2455 (this-package-input "ruby-rubocop"))
2456 "\""))
2457 (("\"rubocop-performance\", \".*\"")
2458 (string-append
2459 "\"rubocop-performance\", \"~> "
2460 #$(package-version
2461 (this-package-input "ruby-rubocop-performance"))
2462 "\"")))))
2463 (add-after 'unpack 'delete-problematic-tests
2464 ;; These tests fail for unknown reasons (see:
2465 ;; https://github.com/testdouble/standard/issues/532).
2466 (lambda _
2467 (delete-file "test/standard_test.rb")
2468 (substitute* "test/standard/base_test.rb"
2469 ((".*test_configures_all_rubocop_cops.*" all)
2470 (string-append all
2471 " skip('fails on guix')\n"))))))))
2472 (native-inputs
2473 (list ruby-simplecov))
2474 (propagated-inputs
2475 (list ruby-language-server-protocol
2476 ruby-lint-roller
2477 ruby-rubocop
2478 ruby-rubocop-performance
2479 ruby-standard-custom
2480 ruby-standard-performance))
2481 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
2482 (description "Standard is a port of StandardJS. Like StandardJS, it aims
2483to save time in the following ways:
2484@itemize
2485@item No configuration.
2486@item Automatically format code.
2487@item Catch style issues and programmer errors early.
2488@end itemize")
2489 (home-page "https://github.com/testdouble/standard")
2490 (license license:expat)))
2491
2492(define-public ruby-chunky-png
2493 (package
2494 (name "ruby-chunky-png")
2495 (version "1.4.0")
2496 (source
2497 (origin
2498 (method git-fetch)
2499 (uri (git-reference
2500 (url "https://github.com/wvanbergen/chunky_png")
2501 (commit (string-append "v" version))))
2502 (file-name (git-file-name name version))
2503 (sha256
2504 (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))
2505 (patches
2506 (search-patches "ruby-chunky-png-ruby-3-2-support.patch"))))
2507 (build-system ruby-build-system)
2508 (arguments
2509 (list
2510 #:test-target "spec"
2511 #:phases
2512 #~(modify-phases %standard-phases
2513 (add-after 'unpack 'disable-bundler
2514 (lambda _
2515 (substitute* (find-files "." "\\.rb$")
2516 (("require.*bundler/setup.*") "")))))))
2517 (native-inputs
2518 (list bundler ruby-rspec ruby-standard ruby-yard))
2519 (synopsis "Ruby library to handle PNG images")
2520 (description "ChunkyPNG is a pure Ruby library that can read and write
2521Portable Network Graphics (PNG) images without depending on an external image
2522library. It tries to be memory efficient and reasonably fast. It has
2523features such as:
2524@itemize
2525@item
2526Decoding support for any image that the PNG standard allows. This includes all
2527standard color modes, all bit depths, all transparency, and interlacing and
2528filtering options.
2529@item
2530Encoding support for images of all color modes (true color, grayscale, and
2531indexed) and transparency for all these color modes. The best color mode is
2532chosen automatically, based on the amount of used colors.
2533@item Read/write access to the image's pixels.
2534@item Read/write access to all image metadata that is stored in chunks.
2535@item
2536Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
2537pixel, depending on the hardware).
2538@item
2539Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
2540integer math and a highly optimized saving routine.
2541@item Interoperability with RMagick.
2542@end itemize
2543
2544ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
2545loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
2546Deal with untrusted images in a separate process, e.g., by using @code{fork}
2547or a background processing library.")
2548 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
2549 (license license:expat)))
2550
2551(define-public ruby-text-hyphen
2552 (package
2553 (name "ruby-text-hyphen")
2554 (version "1.5.0")
2555 (source
2556 (origin
2557 (method url-fetch)
2558 (uri (rubygems-uri "text-hyphen" version))
2559 (sha256
2560 (base32
2561 "01js0wxz84cc5hzxgqbcqnsa0y6crhdi6plmgkzyfm55p0rlajn4"))))
2562 (build-system ruby-build-system)
2563 (native-inputs
2564 (list ruby-hoe))
2565 (synopsis "Ruby library to hyphenate words in various languages")
2566 (description "Text::Hyphen is a Ruby library to hyphenate words in various
2567languages using Ruby-fied versions of TeX hyphenation patterns. It will
2568properly hyphenate various words according to the rules of the language the
2569word is written in. The algorithm is based on that of the TeX typesetting
2570system by Donald E. Knuth.")
2571 (home-page "https://github.com/halostatue/text-hyphen")
2572 ;; The whole is licensed under the Expat license, but parts use various
2573 ;; versions of the LaTeX Project Public License.
2574 (license license:expat)))
2575
2576(define-public ruby-open-uri-cached
2577 (package
2578 (name "ruby-open-uri-cached")
2579 (version "1.0.0")
2580 (source
2581 (origin
2582 (method url-fetch)
2583 (uri (rubygems-uri "open-uri-cached" version))
2584 (sha256
2585 (base32
2586 "03v0if3jlvbclnd6jgjk94fbhf0h2fq1wxr0mbx7018sxzm0biwr"))))
2587 (build-system ruby-build-system)
2588 (arguments
2589 `(#:tests? #f)) ;no test suite
2590 (synopsis "OpenURI with transparent disk caching")
2591 (description "OpenURI with transparent disk caching, which is
2592useful to avoid making excessive queries, for example when scraping
2593web pages.")
2594 (home-page "https://github.com/tigris/open-uri-cached")
2595 (license license:expat)))
2596
2597(define-public ruby-ast
2598 (package
2599 (name "ruby-ast")
2600 (version "2.4.2")
2601 (source
2602 (origin
2603 (method git-fetch) ;no test included in gem from v2.4.1
2604 (uri (git-reference
2605 (url "https://github.com/whitequark/ast")
2606 (commit (string-append "v" version))))
2607 (file-name (git-file-name name version))
2608 (sha256
2609 (base32
2610 "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
2611 (build-system ruby-build-system)
2612 (arguments
2613 '(#:phases
2614 (modify-phases %standard-phases
2615 (add-after 'unpack 'remove-coveralls-requirement
2616 (lambda _
2617 (substitute* "test/helper.rb"
2618 (("require 'coveralls'") "")
2619 (("Coveralls::SimpleCov::Formatter") ""))))
2620 (add-after 'extract-gemspec 'remove-unnecessary-requirements
2621 (lambda* (#:key inputs #:allow-other-keys)
2622 (substitute* "ast.gemspec"
2623 ((".*coveralls.*") "\n")
2624 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
2625 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
2626 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
2627 (("12\\.3") "13.0")))))))
2628 (native-inputs
2629 (list bundler
2630 ruby-bacon
2631 ruby-bacon-colored-output
2632 ruby-json-pure
2633 ruby-kramdown
2634 ruby-mime-types
2635 ruby-racc
2636 ruby-rest-client
2637 ruby-simplecov
2638 ruby-yard))
2639 (synopsis "Library for working with Abstract Syntax Trees")
2640 (description
2641 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
2642It does this through immutable data structures.")
2643 (home-page "https://whitequark.github.io/ast/")
2644 (license license:expat)))
2645
2646(define-public ruby-sporkmonger-rack-mount
2647 ;; Testing the addressable gem requires a newer commit than that released, so
2648 ;; use an up to date version.
2649 (let ((revision "1")
2650 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
2651 (package
2652 (name "ruby-sporkmonger-rack-mount")
2653 (version (git-version "0.8.3" revision commit))
2654 (source (origin
2655 (method git-fetch)
2656 (uri (git-reference
2657 (url "https://github.com/sporkmonger/rack-mount")
2658 (commit commit)))
2659 (file-name (git-file-name name version))
2660 (sha256
2661 (base32
2662 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
2663 (build-system ruby-build-system)
2664 (arguments
2665 ;; Tests currently fail so disable them.
2666 ;; https://github.com/sporkmonger/rack-mount/pull/1
2667 `(#:tests? #f))
2668 (propagated-inputs (list ruby-rack))
2669 (synopsis "Stackable dynamic tree based Rack router")
2670 (description
2671 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
2672continue trying routes if the response returns pass. This allows multiple
2673routes to be nested or stacked on top of each other.")
2674 (home-page "https://github.com/sporkmonger/rack-mount")
2675 (license license:expat))))
2676
2677(define-public ruby-ci-reporter
2678 (package
2679 (name "ruby-ci-reporter")
2680 (version "2.1.0")
2681 (source (origin
2682 (method url-fetch)
2683 (uri (rubygems-uri "ci_reporter" version))
2684 (sha256
2685 (base32
2686 "0qcafasmjjr8a5gzr4k92ncm6h2943skwllhjzwz8spawdwc7dla"))))
2687 (build-system ruby-build-system)
2688 (arguments
2689 `(#:test-target "rspec"))
2690 (propagated-inputs
2691 (list ruby-builder ruby-rexml))
2692 (native-inputs
2693 (list bundler ruby-rspec))
2694 (synopsis "Generate XML reports of runs test")
2695 (description
2696 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2697you to generate XML reports of your test runs. The resulting files can be
2698read by a continuous integration system that understands Ant's JUnit report
2699format.")
2700 (home-page "https://github.com/nicksieger/ci_reporter")
2701 (license license:expat)))
2702
2703(define-public ruby-console
2704 (package
2705 (name "ruby-console")
2706 (version "1.16.2")
2707 (source (origin
2708 (method url-fetch)
2709 (uri (rubygems-uri "console" version))
2710 (sha256
2711 (base32
2712 "0y1bv3kd1l9p0k5n3anvvjxdrcq113pyngz2g29i9mvdgbbx7kq2"))))
2713 (build-system ruby-build-system)
2714 ;; XXX: Disable test suite to avoid dependency cycles with ruby-samovar.
2715 (arguments (list #:tests? #f))
2716 (propagated-inputs (list ruby-fiber-local))
2717 (synopsis "Console logging library for Ruby")
2718 (description "This gem provides beautiful console logging for Ruby
2719applications. It implements fast, buffered log output and has the following
2720features:
2721@itemize
2722@item Thread safe global logger with per-fiber context
2723@item Carry along context with nested loggers
2724@item Enable/disable log levels per class
2725@item Detailed logging of exceptions
2726@item Beautiful logging to the terminal or structured logging using JSON.
2727@end itemize")
2728 (home-page "https://github.com/socketry/console")
2729 (license license:expat)))
2730
2731(define-public ruby-contracts
2732 (package
2733 (name "ruby-contracts")
2734 (version "0.17.2")
2735 (source
2736 (origin
2737 (method url-fetch)
2738 (uri (rubygems-uri "contracts" version))
2739 (sha256
2740 (base32
2741 "1sclvlwnlxfaj1595xd0rn3x3w0ljic3vqgnx6476lr7x8xbpbiv"))))
2742 (build-system ruby-build-system)
2743 (arguments
2744 (list
2745 #:test-target "spec"
2746 #:phases
2747 #~(modify-phases %standard-phases
2748 ;; Don't run or require rubocop, the code linting tool, as this is a
2749 ;; bit unnecessary.
2750 (add-after 'unpack 'dont-run-rubocop
2751 (lambda _
2752 (substitute* "Rakefile"
2753 ((".*rubocop.*") "")
2754 ((".*RuboCop.*") "")))))))
2755 (native-inputs
2756 (list ruby-rspec))
2757 (synopsis "Method contracts for Ruby")
2758 (description
2759 "This library provides contracts for Ruby. A contract describes the
2760correct inputs and output for a method, and will raise an error if a incorrect
2761value is found.")
2762 (home-page "https://github.com/egonSchiele/contracts.ruby")
2763 (license license:bsd-2)))
2764
2765(define-public ruby-crack
2766 (package
2767 (name "ruby-crack")
2768 (version "0.4.5")
2769 (source
2770 (origin
2771 (method url-fetch)
2772 (uri (rubygems-uri "crack" version))
2773 (sha256
2774 (base32
2775 "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
2776 (build-system ruby-build-system)
2777 (arguments
2778 `(#:phases
2779 (modify-phases %standard-phases
2780 (replace 'check
2781 (lambda* (#:key tests? #:allow-other-keys)
2782 (when tests?
2783 (for-each (lambda (file)
2784 (display file)(display "\n")
2785 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2786 (find-files "test" ".*rb$"))))))))
2787 (synopsis "Simple JSON and XML parsing for Ruby")
2788 (description
2789 "@code{crack} provides really simple JSON and XML parsing, extracted from
2790code in Merb and Rails.")
2791 (home-page "https://github.com/jnunemaker/crack")
2792 (license license:expat)))
2793
2794(define-public ruby-clamp
2795 (package
2796 (name "ruby-clamp")
2797 (version "1.3.2")
2798 (source (origin
2799 (method url-fetch)
2800 (uri (rubygems-uri "clamp" version))
2801 (sha256
2802 (base32
2803 "08m0syh06bhx8dqn560ivjg96l5cs5s3l9jh2szsnlcdcyl9jsjg"))))
2804 (build-system ruby-build-system)
2805 (arguments
2806 (list #:test-target "spec"
2807 #:phases #~(modify-phases %standard-phases
2808 (add-after 'unpack 'do-not-require-rubocop
2809 (lambda _
2810 (substitute* "Rakefile"
2811 (("require \"rubocop/rake_task\"")
2812 "")
2813 (("RuboCop::RakeTask.new")
2814 "")))))))
2815 (native-inputs (list ruby-rspec))
2816 (synopsis "Command-line parsing library for Ruby")
2817 (description "Clamp provides an object-model for command-line utilities.
2818It handles parsing of command-line options, and generation of usage help.")
2819 (home-page "https://github.com/mdub/clamp")
2820 (license license:expat)))
2821
2822(define-public ruby-cliver
2823 (package
2824 (name "ruby-cliver")
2825 (version "0.3.2")
2826 (source
2827 (origin
2828 (method url-fetch)
2829 (uri (rubygems-uri "cliver" version))
2830 (sha256
2831 (base32
2832 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2833 (build-system ruby-build-system)
2834 (arguments
2835 '(#:phases
2836 (modify-phases %standard-phases
2837 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2838 ;; would be nice, but the tests look to be incompatible:
2839 ;;
2840 ;; NoMethodError: undefined method `last_comment'
2841 (replace 'check
2842 (lambda* (#:key tests? #:allow-other-keys)
2843 (when tests?
2844 (invoke "rspec")))))))
2845 (native-inputs
2846 (list bundler ruby-rspec-2))
2847 (synopsis "Assertions for command-line dependencies in Ruby")
2848 (description
2849 "@code{cliver} provides a way to detect missing command-line
2850dependencies, including versions.")
2851 (home-page "https://github.com/yaauie/cliver")
2852 (license license:expat)))
2853
2854(define-public ruby-czmq-ffi-gen
2855 (package
2856 (name "ruby-czmq-ffi-gen")
2857 (version "0.13.0")
2858 (source
2859 (origin
2860 (method url-fetch)
2861 (uri (rubygems-uri "czmq-ffi-gen" version))
2862 (sha256
2863 (base32
2864 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2865 (build-system ruby-build-system)
2866 (arguments
2867 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2868 #:phases
2869 (modify-phases %standard-phases
2870 (add-after 'unpack 'patch-lib_dirs
2871 (lambda* (#:key inputs #:allow-other-keys)
2872 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2873 (("lib\\_dirs = \\[.*\\]")
2874 (string-append "lib_dirs = ['"
2875 (assoc-ref inputs "czmq") "/lib"
2876 "']")))
2877 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2878 (("lib\\_dirs = \\[.*\\]")
2879 (string-append "lib_dirs = ['"
2880 (assoc-ref inputs "zeromq") "/lib"
2881 "']"))))))))
2882 (inputs
2883 (list zeromq czmq))
2884 (propagated-inputs (list ruby-ffi))
2885 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2886 (description
2887 "These Ruby bindings are not intended to be directly used, but rather
2888used by higher level bindings like those provided by CZTop.")
2889 (home-page
2890 "https://github.com/paddor/czmq-ffi-gen")
2891 (license license:isc)))
2892
2893(define-public ruby-cztop
2894 (package
2895 (name "ruby-cztop")
2896 (version "0.12.2")
2897 (source
2898 (origin
2899 (method url-fetch)
2900 (uri (rubygems-uri "cztop" version))
2901 (sha256
2902 (base32
2903 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2904 (build-system ruby-build-system)
2905 (arguments
2906 '(#:test-target "spec"
2907 #:phases
2908 (modify-phases %standard-phases
2909 (add-after 'unpack 'patch-lib_paths
2910 (lambda* (#:key inputs #:allow-other-keys)
2911 (substitute* "lib/cztop/poller/zmq.rb"
2912 (("lib\\_paths = \\[.*\\]")
2913 (string-append "lib_paths = ['"
2914 (assoc-ref inputs "zeromq") "/lib"
2915 "']"))))))))
2916 (native-inputs
2917 (list bundler ruby-rspec))
2918 (inputs
2919 (list zeromq))
2920 (propagated-inputs
2921 (list ruby-czmq-ffi-gen))
2922 (synopsis "CZMQ Ruby bindings")
2923 (description
2924 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2925CZMQ. The focus of of CZTop is on being easy to use and providing first class
2926support for security mechanisms.")
2927 (home-page "https://github.com/paddor/cztop")
2928 (license license:isc)))
2929
2930(define-public ruby-saikuro-treemap
2931 (package
2932 (name "ruby-saikuro-treemap")
2933 (version "0.2.0")
2934 (source (origin
2935 (method url-fetch)
2936 (uri (rubygems-uri "saikuro_treemap" version))
2937 (sha256
2938 (base32
2939 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2940 (build-system ruby-build-system)
2941 ;; Some of the tests fail because the generated JSON has keys in a
2942 ;; different order. This is a problem with the test suite rather than any
2943 ;; of the involved libraries.
2944 (arguments `(#:tests? #f))
2945 (propagated-inputs
2946 (list ruby-json-pure ruby-atoulme-saikuro))
2947 (synopsis "Generate complexity treemap based on saikuro analysis")
2948 (description
2949 "This gem generates a treemap showing the complexity of Ruby code on
2950which it is run. It uses Saikuro under the covers to analyze Ruby code
2951complexity.")
2952 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2953 (license license:expat)))
2954
2955(define-public ruby-oauth2
2956 (package
2957 (name "ruby-oauth2")
2958 (version "2.0.9")
2959 (source (origin
2960 (method git-fetch) ;for tests
2961 (uri (git-reference
2962 (url "https://gitlab.com/oauth-xx/oauth2")
2963 (commit (string-append "v" version))))
2964 (file-name (git-file-name name version))
2965 (sha256
2966 (base32
2967 "191j1f4gjw8wij1jy2fvddgi8cv1mm0ki7v0b0795clix1avnj29"))))
2968 (build-system ruby-build-system)
2969 (arguments
2970 (list #:modules '((guix build ruby-build-system)
2971 (guix build utils)
2972 (ice-9 regex)
2973 (ice-9 textual-ports))
2974 #:phases
2975 #~(modify-phases %standard-phases
2976 (add-after 'unpack 'relax-requirements
2977 (lambda _
2978 (substitute* "Gemfile"
2979 (("^linting = .*")
2980 "linting = false\n")
2981 (("^coverage = .*")
2982 "coverage = false\n")
2983 (("^debug = .*")
2984 "debug = false\n"))
2985 (substitute* "spec/spec_helper.rb"
2986 (("^RUN_COVERAGE = .*")
2987 "RUN_COVERAGE = false\n")
2988 (("^ALL_FORMATTERS = .*")
2989 "ALL_FORMATTERS = false\n"))))
2990 (add-after 'unpack 'skip-problematic-test
2991 (lambda _
2992 ;; XXX: substitute* can't match 2 lines.
2993 (with-atomic-file-replacement
2994 "spec/oauth2/client_spec.rb"
2995 (lambda (in out)
2996 (let* ((pattern "\
2997 context 'when parse: :xml but response is JSON' do\n\
2998 it 'returns a configured AccessToken' do\n")
2999 (content (get-string-all in))
3000 (matched (string-match pattern content)))
3001 (if matched
3002 (format out "~a skip('fails on guix')~%~a"
3003 (string-take content (match:end matched))
3004 (string-drop content (match:end matched)))
3005 (display content out))))))))))
3006 (native-inputs
3007 (list bundler
3008 ruby-addressable
3009 ruby-backports
3010 ruby-rexml
3011 ruby-rspec-block-is-expected
3012 ruby-rspec-pending-for
3013 ruby-rspec-stubbed-env
3014 ruby-silent-stream))
3015 (propagated-inputs
3016 (list ruby-faraday
3017 ruby-jwt
3018 ruby-multi-xml
3019 ruby-rack
3020 ruby-snaky-hash
3021 ruby-version-gem))
3022 (synopsis "Ruby wrapper for the OAuth 2.0")
3023 (description
3024 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
3025with a similar style to the original OAuth spec.")
3026 (home-page "https://github.com/oauth-xx/oauth2")
3027 (license license:expat)))
3028
3029(define-public ruby-omniauth
3030 (package
3031 (name "ruby-omniauth")
3032 (version "2.1.1")
3033 (source (origin
3034 (method git-fetch) ;for tests
3035 (uri (git-reference
3036 (url "https://github.com/omniauth/omniauth")
3037 (commit (string-append "v" version))))
3038 (file-name (git-file-name name version))
3039 (sha256
3040 (base32
3041 "1mm7a4ll7ymamrbsl63yi6i34qpwmh2nh5a9kj961gja1iz2gyd1"))))
3042 (build-system ruby-build-system)
3043 (arguments
3044 (list #:phases
3045 #~(modify-phases %standard-phases
3046 (add-after 'unpack 'relax-requirements
3047 (lambda _
3048 (substitute* "spec/helper.rb"
3049 ;; This condition is used to require coveralls and
3050 ;; simplecov; override it to avoid these extraneous
3051 ;; requirements.
3052 (("RUBY_VERSION >= '1.9'")
3053 "false")
3054 (("require 'rack/freeze'") "")))))))
3055 (native-inputs (list ruby-rspec))
3056 (propagated-inputs (list ruby-hashie ruby-rack ruby-rack-test
3057 ruby-rack-protection))
3058 (synopsis "Generalized Rack framework for multiple-provider authentication")
3059 (description
3060 "This package provides a generalized Rack framework for multiple-provider
3061authentication.")
3062 (home-page "https://github.com/omniauth/omniauth")
3063 (license license:expat)))
3064
3065(define-public ruby-omniauth-oauth2
3066 (package
3067 (name "ruby-omniauth-oauth2")
3068 (version "1.8.0")
3069 (source
3070 (origin
3071 (method url-fetch)
3072 (uri (rubygems-uri "omniauth-oauth2" version))
3073 (sha256
3074 (base32
3075 "0y4y122xm8zgrxn5nnzwg6w39dnjss8pcq2ppbpx9qn7kiayky5j"))))
3076 (build-system ruby-build-system)
3077 (arguments
3078 (list #:phases
3079 #~(modify-phases %standard-phases
3080 (add-after 'unpack 'relax-requirements
3081 (lambda _
3082 (substitute* "spec/helper.rb"
3083 ;; This condition is used to require coveralls and
3084 ;; simplecov; override it to avoid these extraneous
3085 ;; requirements.
3086 (("RUBY_VERSION >= \"1.9\"")
3087 "false")))))))
3088 (propagated-inputs (list ruby-oauth2 ruby-omniauth))
3089 (native-inputs (list ruby-rspec ruby-rack-test ruby-webmock))
3090 (synopsis "Abstract OAuth2 strategy for OmniAuth")
3091 (description
3092 "This library provides a generic OAuth2 strategy for OmniAuth. It
3093doesn't provide a way to gather user information, so should be used as a
3094building block for authentication strategies.")
3095 (home-page "https://github.com/omniauth/omniauth-oauth2")
3096 (license license:expat)))
3097
3098(define-public ruby-open4
3099 (package
3100 (name "ruby-open4")
3101 (version "1.3.4")
3102 (source
3103 (origin
3104 (method url-fetch)
3105 (uri (rubygems-uri "open4" version))
3106 (sha256
3107 (base32
3108 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
3109 (build-system ruby-build-system)
3110 (arguments
3111 '(#:phases
3112 (modify-phases %standard-phases
3113 (add-after 'unpack 'patch-minitest
3114 (lambda _
3115 (substitute* "test/lib/test_case.rb"
3116 (("MiniTest::Unit::TestCase")
3117 "Minitest::Test"))))
3118 (add-after 'unpack 'patch
3119 (lambda _
3120 (substitute* "rakefile"
3121 ;; Update the Rakefile so it works
3122 (("-rubygems") "-rrubygems")
3123 (("Config") "RbConfig"))))
3124 (add-before 'check 'set-LIB
3125 (lambda _
3126 ;; This is used in the rakefile when running the tests
3127 (setenv "LIB" "open4"))))))
3128 (native-inputs (list ruby-minitest))
3129 (synopsis "Open child processes from Ruby and manage them easily")
3130 (description
3131 "@code{Open4} is a Ruby library to run child processes and manage their
3132input and output.")
3133 (home-page "https://github.com/ahoward/open4")
3134 (license license:ruby)))
3135
3136(define-public ruby-options
3137 (package
3138 (name "ruby-options")
3139 (version "2.3.2")
3140 (source
3141 (origin
3142 (method url-fetch)
3143 (uri (rubygems-uri "options" version))
3144 (sha256
3145 (base32
3146 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
3147 (build-system ruby-build-system)
3148 (arguments
3149 (list
3150 #:phases
3151 #~(modify-phases %standard-phases
3152 (replace 'check
3153 (lambda* (#:key tests? #:allow-other-keys)
3154 (when tests?
3155 (substitute* "spec/options_spec.rb"
3156 (("require .* \"/spec_helper\"")
3157 "require \"spec_helper\"\n"))
3158 (substitute* "spec/spec_helper.rb"
3159 (("require 'spec'")
3160 "require 'rspec'\n"))
3161 (invoke "rspec" "spec")))))))
3162 (native-inputs (list ruby-rspec))
3163 (synopsis "Ruby library to parse options from *args cleanly")
3164 (description
3165 "The @code{options} library helps with parsing keyword options in Ruby
3166functions.")
3167 (home-page "https://github.com/ahoward/options")
3168 (license license:ruby)))
3169
3170(define-public ruby-erubi
3171 (package
3172 (name "ruby-erubi")
3173 (version "1.11.0")
3174 (source
3175 (origin
3176 (method git-fetch)
3177 (uri (git-reference
3178 (url "https://github.com/jeremyevans/erubi")
3179 (commit version)))
3180 (file-name (git-file-name name version))
3181 (sha256
3182 (base32 "0y4qskz260fjwbnjps5z5yygjwgh6ds0f97lfa9gsmh6zqa1lvvx"))))
3183 (build-system ruby-build-system)
3184 (arguments
3185 (list #:test-target "spec"))
3186 (native-inputs (list ruby-minitest
3187 ruby-minitest-global-expectations))
3188 (synopsis "ERB template engine for Ruby")
3189 (description
3190 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
3191Erubis")
3192 (home-page "https://github.com/jeremyevans/erubi")
3193 (license license:expat)))
3194
3195(define-public ruby-erubis
3196 (package
3197 (name "ruby-erubis")
3198 (version "2.7.0")
3199 (source
3200 (origin
3201 (method url-fetch)
3202 (uri (rubygems-uri "erubis" version))
3203 (sha256
3204 (base32
3205 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
3206 (build-system ruby-build-system)
3207 (arguments
3208 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
3209 (synopsis "Implementation of embedded Ruby (eRuby)")
3210 (description
3211 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
3212features such as multi-language support, auto escaping, auto trimming spaces
3213around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
3214support.")
3215 (home-page "http://www.kuwata-lab.com/erubis/")
3216 (license license:expat)))
3217
3218(define-public ruby-ethon
3219 (package
3220 (name "ruby-ethon")
3221 (version "0.17.0")
3222 (source
3223 (origin
3224 (method git-fetch)
3225 (uri (git-reference
3226 (url "https://github.com/typhoeus/ethon")
3227 (commit (string-append "v" version))))
3228 (file-name (git-file-name name version))
3229 (sha256
3230 (base32
3231 "06rjq0r3bbybycqp6n2xqpcqmz5x8lymnk6fj5wsq59s8gf843r9"))))
3232 (build-system ruby-build-system)
3233 (arguments
3234 (list
3235 #:phases
3236 #~(modify-phases %standard-phases
3237 (add-after 'unpack 'libcurl-use-absolute-reference
3238 (lambda* (#:key inputs #:allow-other-keys)
3239 (substitute* "lib/ethon/curls/settings.rb"
3240 (("libcurl', 'libcurl\\.so\\.4")
3241 (search-input-file inputs "/lib/libcurl.so")))))
3242 (add-after 'extract-gemspec 'remove-MIME-types-version-constraint
3243 (lambda _
3244 (substitute* "Gemfile"
3245 (("(gem \"mime-types\").*" _ gem)
3246 gem))))
3247 ;; Tell Bundler not to request perf dependencies
3248 (add-after 'extract-gemspec 'remove-Bundler-setup
3249 (lambda _
3250 (substitute* "spec/spec_helper.rb"
3251 (("Bundler.setup")
3252 ""))))
3253 (replace 'check
3254 (lambda* (#:key tests? #:allow-other-keys)
3255 (when tests?
3256 (for-each (lambda (file)
3257 (invoke "ruby" "-Ispec" file))
3258 (find-files "spec" "_spec\\.rb$"))))))))
3259 (native-inputs (list ruby-rspec ruby-sinatra ruby-mustermann
3260 ruby-mime-types ruby-webrick))
3261 (inputs
3262 (list curl))
3263 (propagated-inputs
3264 (list ruby-ffi))
3265 (synopsis "Very lightweight @code{libcurl} wrapper")
3266 (description
3267 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
3268 (home-page "https://github.com/typhoeus/ethon")
3269 (license license:expat)))
3270
3271(define-public ruby-execjs
3272 (package
3273 (name "ruby-execjs")
3274 (version "2.7.0")
3275 (source
3276 (origin
3277 ;; fetch from github as the gem does not contain testing code
3278 (method git-fetch)
3279 (uri (git-reference
3280 (url "https://github.com/rails/execjs")
3281 (commit (string-append "v" version))))
3282 (file-name (git-file-name name version))
3283 (sha256
3284 (base32
3285 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
3286 (build-system ruby-build-system)
3287 (native-inputs
3288 (list bundler
3289 ;; The test suite tests all the available backends. Currently, this just
3290 ;; means the node backend.
3291 ;;
3292 ;; PASSED: test:node
3293 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
3294 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
3295 node-lts))
3296 (synopsis "Run JavaScript code from Ruby")
3297 (description
3298 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
3299runtime to evaluate your JavaScript program, then returns the result to you as
3300a Ruby object.")
3301 (home-page "https://github.com/rails/execjs")
3302 (license license:expat)))
3303
3304(define-public ruby-fakefs
3305 (package
3306 (name "ruby-fakefs")
3307 (version "2.8.0")
3308 (home-page "https://github.com/fakefs/fakefs")
3309 (source (origin
3310 ;; The Rubygems release does not contain tests.
3311 (method git-fetch)
3312 (uri (git-reference
3313 (url home-page)
3314 (commit (string-append "v" version))))
3315 (file-name (git-file-name name version))
3316 (sha256
3317 (base32
3318 "0a3vq6cllml279j77hxipmbln31pjw6di3zdgpzqvhqgazv55v10"))))
3319 (build-system ruby-build-system)
3320 (arguments
3321 '(#:phases (modify-phases %standard-phases
3322 (replace 'replace-git-ls-files
3323 (lambda _
3324 (substitute* "fakefs.gemspec"
3325 (("`git ls-files lib README.md LICENSE`")
3326 "`find lib README.md LICENSE -type f | sort`"))))
3327 (add-before 'check 'remove-version-constraints
3328 (lambda _
3329 ;; Drop hard version requirements for test dependencies.
3330 (substitute* "fakefs.gemspec"
3331 (("(.*add_development_dependency .*), .*" _ dep)
3332 (string-append dep "\n"))))))))
3333 (native-inputs
3334 (list ruby-bump ruby-maxitest ruby-pry ruby-rubocop ruby-rspec))
3335 (synopsis "Fake file system for Ruby")
3336 (description
3337 "This package provides a fake file system for use in test suites. It
3338avoids the need for manually creating temporary directories, or dealing
3339with platform intricacies in @code{File} and @code{FileUtils}.")
3340 (license license:expat)))
3341
3342(define-public ruby-orderedhash
3343 (package
3344 (name "ruby-orderedhash")
3345 (version "0.0.6")
3346 (source (origin
3347 (method url-fetch)
3348 (uri (rubygems-uri "orderedhash" version))
3349 (sha256
3350 (base32
3351 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
3352 (build-system ruby-build-system)
3353 (arguments
3354 '(#:tests? #f)) ; no test suite
3355 (synopsis "Ruby library providing an order-preserving hash")
3356 (description "Orderedhash is a Ruby library providing a hash
3357implementation that preserves the order of items and features some array-like
3358extensions.")
3359 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
3360 (license license:public-domain)))
3361
3362(define-public ruby-libxml
3363 (package
3364 (name "ruby-libxml")
3365 (version "5.0.5")
3366 (source
3367 (origin
3368 (method url-fetch)
3369 (uri (rubygems-uri "libxml-ruby" version))
3370 (sha256
3371 (base32 "16jfgrgb3ys7lk4b7m6s5kg3jdd5w976k6hmf1fmbpw254ahgg7i"))))
3372 (build-system ruby-build-system)
3373 (native-inputs (list ruby-minitest ruby-rake-compiler))
3374 (arguments
3375 (list
3376 #:gem-flags
3377 ;; TODO: Re-enable when documentation generation works
3378 #~(list "--no-document"
3379 "--"
3380 (string-append "--with-xml2-include="
3381 #$(this-package-input "libxml2")
3382 "/include/libxml2" ))
3383 #:phases
3384 #~(modify-phases %standard-phases
3385 ;; tests: 393 runs, 42523 assertions, 0 failures, 0 errors, 20 skips
3386 ;;
3387 ;; TODO: Implement #:test-flags in ruby-build-system and figure out
3388 ;; how to skip tests more elegant.
3389 (add-after 'unpack 'skip-failing-tests
3390 (lambda _
3391 (for-each
3392 (lambda (method)
3393 (substitute* "test/test_canonicalize.rb"
3394 (((string-append "def " method) def)
3395 (string-append def "; skip \"CR/LF mismatch\";"))))
3396 '("test_canonicalize_with_w3c_c14n_3_1"
3397 "test_canonicalize_with_w3c_c14n_3_2"
3398 "test_canonicalize_with_w3c_c14n_3_3"
3399 "test_canonicalize_with_w3c_c14n_3_4"))
3400 (substitute* "test/test_schema.rb"
3401 (("def test_schema_load_from_uri" def)
3402 (string-append def "; skip \"missing XLink schema\";")))
3403 (substitute* "test/test_reader.rb"
3404 (("def test_string_encoding" def)
3405 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3406 (substitute* "test/test_sax_parser.rb"
3407 (("def test_noexistent_file" def)
3408 (string-append def "; skip \"assertion is not equal\";")))
3409 (substitute* "test/test_html_parser.rb"
3410 (("def test_no_implied" def)
3411 (string-append def "; skip \"no such file or directory\";"))
3412 (("def test_noexistent_file" def)
3413 (string-append def "; skip \"no such file or directory\";")))
3414 (substitute* "test/test_html_parser_context.rb"
3415 (("def test_default_options" def)
3416 (string-append def "; skip \"assertion is not equal\";")))
3417 (substitute* "test/test_dtd.rb"
3418 (("def test_external_dtd" def)
3419 (string-append def "; skip \"assertion is not equal\";")))
3420 (for-each
3421 (lambda (method)
3422 (substitute* "test/test_xml.rb"
3423 (((string-append "def " method) def)
3424 (string-append def "; skip \"expected false to be truthy\";"))))
3425 '("test_enabled_ftp"
3426 "test_enabled_docbook"
3427 "test_enabled_unicode"
3428 "test_enabled_http"))
3429 (substitute* "test/test_reader.rb"
3430 (("def test_invalid_encoding" def)
3431 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3432 (for-each
3433 (lambda (method)
3434 (substitute* "test/test_parser.rb"
3435 (((string-append "def " method) def)
3436 (string-append def "; skip \"assertion is not equal\";"))))
3437 '("test_bad_xml"
3438 "test_noexistent_file"
3439 "test_file_encoding"
3440 "test_string_encoding"))))
3441 (add-after 'install 'set-gem-path
3442 (lambda _
3443 (setenv "GEM_PATH" (string-append
3444 (getenv "GEM_PATH") ":"
3445 #$output "/lib/ruby/vendor_ruby"))))
3446 (delete 'check)
3447 (add-after 'set-gem-path 'check
3448 (assoc-ref %standard-phases 'check)))))
3449 (inputs
3450 (list libxml2
3451 zlib))
3452 (home-page "https://xml4r.github.io/libxml-ruby/")
3453 (synopsis "Ruby bindings for GNOME Libxml2")
3454 (description
3455 "The Libxml-Ruby project provides Ruby language bindings for the GNOME
3456Libxml2 XML toolkit.")
3457 (license license:expat)))
3458
3459(define-public ruby-lino
3460 (package
3461 (name "ruby-lino")
3462 (version "4.1.0")
3463 (source
3464 (origin
3465 (method git-fetch)
3466 (uri (git-reference
3467 (url "https://github.com/infrablocks/lino")
3468 (commit (string-append "v" version))))
3469 (file-name (git-file-name name version))
3470 (sha256
3471 (base32 "0hz7ivjl6ig63gng8b3y6cmmjymf809044c04460f8kq9q9xr9d7"))))
3472 (build-system ruby-build-system)
3473 (arguments
3474 (list
3475 #:phases
3476 #~(modify-phases %standard-phases
3477 (add-after 'unpack 'loosen-dependency-constraints
3478 (lambda _
3479 (substitute* "lino.gemspec"
3480 (("~>") ">="))))
3481 (add-after 'unpack 'remove-unnecessary-dependencies
3482 (lambda _
3483 (delete-file "Gemfile.lock")
3484 (substitute* "lino.gemspec"
3485 (("'hamster'.*") "'immutable-ruby', '~> 0.2'\n")
3486 ((".*rake_circle_ci.*") "\n")
3487 ((".*rake_git.*") "\n")
3488 ((".*rake_gpg.*") "\n")
3489 ((".*rake_ssh.*") "\n")
3490 ((".*rake_simplecov.*") "\n")
3491 (("spec\\.add_development_dependency 'simplecov'") ""))
3492 (substitute* "spec/spec_helper.rb"
3493 ((".*simplecov.*") "\n")
3494 ((".*bundler.*") "\n")
3495 ;; Use [].each to disable running the SimpleCov configuration
3496 ;; block
3497 (("SimpleCov\\.start") "[].each"))))
3498 (add-after 'unpack 'replace-hamster-with-immutable
3499 (lambda _
3500 (substitute* "lib/lino/builders/command_line.rb"
3501 (("hamster") "immutable/vector"))
3502 (substitute* "lib/lino/builders/subcommand.rb"
3503 (("hamster") "immutable/vector")
3504 (("Hamster") "Immutable"))
3505 (substitute* (find-files "lib/lino/builders/mixins/" "\\.rb")
3506 (("Hamster") "Immutable"))
3507 (substitute* (find-files "lib/lino/model/" "\\.rb")
3508 (("Hamster") "Immutable"))))
3509 ;; Reduce required development dependencies by running rspec directly.
3510 (replace 'check
3511 (lambda* (#:key tests? #:allow-other-keys)
3512 (when tests?
3513 (invoke "ruby" (which "rspec"))))))))
3514 (propagated-inputs (list ruby-childprocess ruby-immutable-ruby ruby-open4))
3515 (native-inputs (list ruby-rspec))
3516 (synopsis "Build and execute commands in Ruby")
3517 (description
3518 "@code{Lino} provides an interface to run external commands. It provides
3519an interface to add options as well as managing the standard input, output and
3520error streams.")
3521 (home-page "https://github.com/infrablocks/lino")
3522 (license license:expat)))
3523
3524(define-public ruby-x25519
3525 (package
3526 (name "ruby-x25519")
3527 (version "1.0.10")
3528 (source (origin
3529 (method git-fetch)
3530 (uri (git-reference
3531 (url "https://github.com/RubyCrypto/x25519")
3532 (commit (string-append "v" version))))
3533 (file-name (git-file-name name version))
3534 (sha256
3535 (base32
3536 "1g0311ly32f6hfn4q5fvkbjbl2bhv1l9fx6s0kglxfsrwq51926y"))
3537 (patches
3538 (search-patches
3539 "ruby-x25519-automatic-fallback-non-x86_64.patch"))))
3540 (build-system ruby-build-system)
3541 (arguments
3542 (list #:test-target "spec"
3543 #:phases #~(modify-phases %standard-phases
3544 (add-after 'unpack 'remove-unnecessary-dependencies
3545 (lambda _
3546 (substitute* "Gemfile"
3547 ((".*rubocop.*")
3548 ""))
3549 (substitute* "Rakefile"
3550 (("require \"rubocop/rake_task\"")
3551 "")
3552 (("RuboCop::RakeTask.new")
3553 ""))))
3554 (add-before 'build 'compile
3555 (lambda _
3556 (invoke "rake" "compile"))))))
3557 (native-inputs (list ruby-rake-compiler ruby-rspec))
3558 (synopsis "Cryptography library for Ruby providing the X25519
3559Diffie-Hellman function")
3560 (description
3561 "The x25519 gem is an efficient public key cryptography library for
3562Ruby providing key exchange/agreement via the X25519 (as known as
3563Curve25519) Elliptic Curve Diffie-Hellman function as described in
3564@url{https://www.ietf.org/rfc/rfc7748.txt, RFC 7748}.")
3565 (home-page "https://github.com/RubyCrypto/x25519")
3566 (license license:bsd-3)))
3567
3568(define-public ruby-xml-simple
3569 (package
3570 (name "ruby-xml-simple")
3571 (version "1.1.5")
3572 (source (origin
3573 (method url-fetch)
3574 (uri (rubygems-uri "xml-simple" version))
3575 (sha256
3576 (base32
3577 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
3578 (build-system ruby-build-system)
3579 (arguments
3580 '(#:tests? #f)) ; no test suite
3581 (synopsis "Simple Ruby library for XML processing")
3582 (description "This library provides a simple API for XML processing in
3583Ruby.")
3584 (home-page "https://github.com/maik/xml-simple")
3585 (license license:ruby)))
3586
3587(define-public ruby-xpath
3588 (package
3589 (name "ruby-xpath")
3590 (version "3.2.0")
3591 (source (origin
3592 (method url-fetch)
3593 (uri (rubygems-uri "xpath" version))
3594 (sha256
3595 (base32
3596 "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"))))
3597 (build-system ruby-build-system)
3598 (arguments (list #:phases #~(modify-phases %standard-phases
3599 (replace 'check
3600 (lambda* (#:key tests? #:allow-other-keys)
3601 (when tests?
3602 (invoke "rspec" "spec" )))))))
3603 (native-inputs (list ruby-pry ruby-rspec))
3604 (propagated-inputs (list ruby-nokogiri))
3605 (synopsis "Ruby DSL for generating XPath expressions")
3606 (description "XPath is a Ruby domain-specific language (DSL) for
3607generating XPath expressions.")
3608 (home-page "https://github.com/teamcapybara/xpath")
3609 (license license:expat)))
3610
3611(define-public ruby-thor
3612 (package
3613 (name "ruby-thor")
3614 (version "1.5.0")
3615 (source (origin
3616 ;; Pull from git because the gem has no tests.
3617 (method git-fetch)
3618 (uri (git-reference
3619 (url "https://github.com/rails/thor")
3620 (commit (string-append "v" version))))
3621 (file-name (git-file-name name version))
3622 (sha256
3623 (base32
3624 "1mfc7x81zvi56as2r5zlbp9qrn71pdxlsnry06zi8rfykb4qnwfm"))))
3625 (build-system ruby-build-system)
3626 (arguments
3627 (list
3628 #:phases
3629 #~(modify-phases %standard-phases
3630 (add-after 'unpack 'remove-coveralls-dependency
3631 (lambda _
3632 ;; Do not hook the test suite into the online coveralls service.
3633 (substitute* "Gemfile"
3634 ((".*coveralls.*") ""))
3635 (substitute* "spec/helper.rb"
3636 (("require \"coveralls\"") "")
3637 (("Coveralls::SimpleCov::Formatter") ""))))
3638 (add-after 'unpack 'disable-problematic-tests
3639 (lambda _
3640 ;; These tests attempt to check the git repository for
3641 ;; tabs vs spaces, double vs single quotes, etc, and
3642 ;; depend on the git checkout.
3643 (delete-file "spec/quality_spec.rb")
3644 (substitute* "spec/parser/options_spec.rb"
3645 ;; This test fails for unknown reasons (see:
3646 ;; https://github.com/rails/thor/issues/814).
3647 (("it \"raises an error for unknown switches" all)
3648 (string-append "x" all)))))
3649 (replace 'check
3650 (lambda* (#:key tests? #:allow-other-keys)
3651 (when tests?
3652 (invoke "rspec" "spec" )))))))
3653 (native-inputs (list ruby-rspec ruby-simplecov ruby-webmock))
3654 (synopsis "Ruby toolkit for building command-line interfaces")
3655 (description "Thor is a toolkit for building powerful command-line
3656interfaces.")
3657 (home-page "http://whatisthor.com/")
3658 (license license:expat)))
3659
3660(define-public ruby-lumberjack
3661 (package
3662 (name "ruby-lumberjack")
3663 (version "1.0.13")
3664 (source (origin
3665 (method url-fetch)
3666 (uri (rubygems-uri "lumberjack" version))
3667 (sha256
3668 (base32
3669 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
3670 (build-system ruby-build-system)
3671 (native-inputs
3672 (list ruby-rspec ruby-timecop))
3673 (synopsis "Logging utility library for Ruby")
3674 (description "Lumberjack is a simple logging utility that can be a drop in
3675replacement for Logger or ActiveSupport::BufferedLogger. It provides support
3676for automatically rolling log files even with multiple processes writing the
3677same log file.")
3678 (home-page "https://github.com/bdurand/lumberjack")
3679 (license license:expat)))
3680
3681(define-public ruby-rbnacl
3682 (package
3683 (name "ruby-rbnacl")
3684 (version "7.1.1")
3685 (source (origin
3686 (method url-fetch)
3687 (uri (rubygems-uri "rbnacl" version))
3688 (sha256
3689 (base32
3690 "0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
3691 (build-system ruby-build-system)
3692 (arguments
3693 (list
3694 #:phases
3695 #~(modify-phases %standard-phases
3696 (add-after 'unpack 'remove-unnecessary-dependencies
3697 (lambda _
3698 ;; Coveralls relates to a network service, and Rubocop to code
3699 ;; linting and both are unnecessary to run the tests
3700 (substitute* "Gemfile"
3701 ((".*rubocop.*")
3702 "\n")
3703 ((".*guard-rspec.*")
3704 "\n")
3705 ((".*coveralls.*")
3706 "\n"))
3707 (substitute* "spec/spec_helper.rb"
3708 (("require \"coveralls\"")
3709 "")
3710 (("Coveralls.wear!")
3711 ""))))
3712 (add-after 'unpack 'use-libsodium-from-store
3713 (lambda* (#:key inputs #:allow-other-keys)
3714 (substitute* '("lib/rbnacl/init.rb"
3715 "lib/rbnacl/sodium.rb")
3716 (("ffi_lib \\[.+\\]")
3717 (string-append "ffi_lib [\""
3718 (assoc-ref inputs "libsodium")
3719 "/lib/libsodium.so" "\"]")))))
3720 ;; Run Rspec directly to avoid the Rubocop dependency in the
3721 ;; Rakefile
3722 (replace 'check
3723 (lambda* (#:key tests? #:allow-other-keys)
3724 (when tests?
3725 (invoke "rspec")))))))
3726 (propagated-inputs (list ruby-ffi))
3727 (inputs (list libsodium))
3728 (native-inputs (list bundler ruby-rspec))
3729 (synopsis "Ruby FFI binding to libsodium")
3730 (description
3731 "This package provides Ruby FFI bindings to the Networking and
3732Cryptography (NaCl) library, also known as libsodium. This provides a
3733high-level toolkit for building cryptographic systems and protocols.")
3734 (home-page "https://github.com/RubyCrypto/rbnacl")
3735 (license license:expat)))
3736
3737(define-public ruby-rbs
3738 (package
3739 (name "ruby-rbs")
3740 (version "4.1.3")
3741 (source
3742 (origin
3743 (method git-fetch) ;for tests and templates
3744 (uri (git-reference
3745 (url "https://github.com/ruby/rbs")
3746 (commit (string-append "v" version))))
3747 (file-name (git-file-name name version))
3748 (sha256
3749 (base32 "06v0yxbqiib9fwii6j5qyzyfpyla1rm6vrh1mn33fyx91b84zrpk"))
3750 (modules '((guix build utils)
3751 (ice-9 regex)))
3752 (snippet
3753 '(begin
3754 ;; These are generated files or unrunnable tests.
3755 (for-each delete-file
3756 (cons* "src/lexer.c"
3757 ;; RDoc requires RBS as a runtime library.
3758 "test/rbs/annotate/rdoc_annotator_test.rb"
3759 "test/rbs/annotate/rdoc_source_test.rb"
3760 ;; These requires network connections.
3761 "test/rbs/cli_test.rb"
3762 "test/rbs/collection/config_test.rb"
3763 "test/rbs/collection/installer_test.rb"
3764 "test/rbs/collection/sources/git_test.rb"
3765 "test/rbs/environment_loader_test.rb"
3766 "test/rbs/test/runtime_test_test.rb"
3767 (map (lambda (file)
3768 (let ((matched (string-match
3769 "templates/(.+)\\.erb" file)))
3770 (match:substring matched 1)))
3771 (find-files "templates" "\\.erb"))))
3772 ;; Remove unnecessary usages of LLVM tools.
3773 (substitute* "Rakefile"
3774 (("sh \"clang-format .* src/lexer.c\"")
3775 "")
3776 (("Rake::Task\\[\"format:c\"\\]\\.invoke")
3777 "")
3778 (("compile_task\\.prerequisites\\.unshift\\(:setup_extconf_compile_commands_json\\)")
3779 ""))))))
3780 (build-system ruby-build-system)
3781 (arguments
3782 (list
3783 #:phases
3784 #~(modify-phases %standard-phases
3785 (add-before 'build 'compile
3786 (lambda _
3787 (invoke "rake" "lexer" "templates")
3788 (invoke "rake" "compile")))
3789 (add-before 'check 'set-home
3790 (lambda _
3791 (setenv "HOME" "/tmp"))))))
3792 (native-inputs (list ruby-rake-compiler re2c ruby-json-schema ruby-rspec))
3793 (propagated-inputs (list ruby-logger ruby-prism ruby-tsort))
3794 (synopsis "Type signatures for Ruby")
3795 (description
3796 "RBS is the language for type signatures for Ruby and standard library
3797definitions.")
3798 (home-page "https://github.com/ruby/rbs")
3799 (license (list license:ruby license:bsd-2))))
3800
3801(define-public ruby-rbtree
3802 (package
3803 (name "ruby-rbtree")
3804 (version "0.4.6")
3805 (source (origin
3806 (method url-fetch)
3807 (uri (rubygems-uri "rbtree" version))
3808 (sha256
3809 (base32
3810 "1z0h1x7fpkzxamnvbw1nry64qd6n0nqkwprfair29z94kd3a9vhl"))))
3811 (build-system ruby-build-system)
3812 (arguments
3813 (list
3814 #:phases
3815 #~(modify-phases %standard-phases
3816 (add-before 'build 'extconf
3817 (lambda _
3818 (invoke "ruby" "extconf.rb")
3819 (invoke "make" "install" (string-append "prefix=" #$output))))
3820 (replace 'check
3821 (lambda* (#:key tests? #:allow-other-keys)
3822 (when tests?
3823 (invoke "ruby" "-I." "test.rb")))))))
3824 (synopsis "Ruby implementation of a sorted associative collection")
3825 (description
3826 "This package provides a RBTree is a sorted associative collection that
3827is implemented with a Red-Black Tree. It maps keys to values like a Hash, but
3828maintains its elements in ascending key order. The interface is the almost
3829identical to that of Hash.")
3830 (home-page "http://rbtree.rubyforge.org/")
3831 (license license:expat)))
3832
3833(define-public ruby-rgl
3834 (package
3835 (name "ruby-rgl")
3836 (version "0.6.6")
3837 (source (origin
3838 (method url-fetch)
3839 (uri (rubygems-uri "rgl" version))
3840 (sha256
3841 (base32
3842 "0dji1k9knrf8cxm5psd3pgd9i8f7cfq182jwjpi1pwxw15axf496"))))
3843 (build-system ruby-build-system)
3844 (arguments
3845 (list
3846 #:phases
3847 #~(modify-phases %standard-phases
3848 (add-after 'unpack 'remove-unnecessary-dependencies
3849 (lambda _
3850 (substitute* "Gemfile"
3851 ;; Caring about coverage is a not a packager's task but a
3852 ;; developer's
3853 ;;(("gem \"simplecov\"") "")
3854 ;; CodeClimate is an online service, and is unnecessary for
3855 ;; running the tests
3856 (("gem \"codeclimate-test-reporter\", .*") "\n")))))))
3857 (native-inputs (list ruby-test-unit ruby-simplecov ruby-yard graphviz-minimal))
3858 (propagated-inputs (list ruby-pairing-heap ruby-rexml ruby-stream))
3859 (synopsis "Framework for graph data structures and algorithms")
3860 (description "RGL is a framework for graph data structures and algorithms.
3861The design of the library is much influenced by the Boost Graph Library (BGL)
3862which is written in C++.")
3863 (home-page "https://github.com/monora/rgl")
3864 (license license:bsd-2)))
3865
3866(define-public ruby-hkdf
3867 (package
3868 (name "ruby-hkdf")
3869 (version "1.0.0")
3870 (source
3871 (origin
3872 (method git-fetch)
3873 (uri (git-reference
3874 (url "https://github.com/jtdowney/hkdf")
3875 (commit (string-append "v" version))))
3876 (file-name (git-file-name name version))
3877 (sha256
3878 (base32
3879 "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
3880 (build-system ruby-build-system)
3881 (arguments
3882 `(#:test-target "default"))
3883 (native-inputs
3884 (list ruby-rspec))
3885 (synopsis "HMAC-based Key Derivation Function")
3886 (description
3887 "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
3888HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
3889take some source key material and generate suitable cryptographic keys from it.")
3890 (home-page "https://github.com/jtdowney/hkdf")
3891 (license license:expat)))
3892
3893(define-public ruby-neatjson
3894 (package
3895 (name "ruby-neatjson")
3896 (version "0.10.5")
3897 (source
3898 (origin
3899 (method url-fetch)
3900 (uri (rubygems-uri "neatjson" version))
3901 (sha256
3902 (base32 "0wm1lq8yl6rzysh3wg6fa55w5534k6ppiz0qb7jyvdy582mk5i0s"))))
3903 (build-system ruby-build-system)
3904 (arguments
3905 (list
3906 #:phases
3907 #~(modify-phases %standard-phases
3908 (replace 'check
3909 (lambda* (#:key tests? #:allow-other-keys)
3910 (if tests?
3911 (invoke "ruby" "test/test_neatjson.rb")
3912 (format #t "test suite not run~%")))))))
3913 (synopsis "JSON strings from Ruby objects generator")
3914 (description
3915 "This package implements a functionality of pretty-print JSON with more
3916formatting options than the built-in @code{JSON.pretty_generate}, such as
3917keeping arrays and objects on a single line when possible, aligning or sorting
3918object keys, customizing numeric representation, and more.")
3919 (home-page "https://github.com/Phrogz/NeatJSON")
3920 (license license:expat)))
3921
3922(define-public ruby-nenv
3923 (package
3924 (name "ruby-nenv")
3925 (version "0.3.0")
3926 (source (origin
3927 (method url-fetch)
3928 (uri (rubygems-uri "nenv" version))
3929 (sha256
3930 (base32
3931 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
3932 (build-system ruby-build-system)
3933 (arguments
3934 `(#:tests? #f)) ; no tests included
3935 (native-inputs
3936 (list ruby-rspec bundler))
3937 (synopsis "Ruby interface for modifying the environment")
3938 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
3939and inspect the environment.")
3940 (home-page "https://github.com/e2/nenv")
3941 (license license:expat)))
3942
3943(define-public ruby-ptools
3944 (package
3945 (name "ruby-ptools")
3946 (version "1.5.0")
3947 (source (origin
3948 (method url-fetch)
3949 (uri (rubygems-uri "ptools" version))
3950 (sha256
3951 (base32
3952 "0damllbshkxycrwjv80sz78h76dw7r9z54d17mb5cbha1daq9q2d"))))
3953 (build-system ruby-build-system)
3954 (arguments
3955 (list
3956 #:test-target "spec:all"
3957 #:phases
3958 #~(modify-phases %standard-phases
3959 (add-after 'unpack 'patch
3960 (lambda _
3961 (substitute* "Rakefile"
3962 ;; Don't require rubocop
3963 (("require 'rubocop/rake_task'") "")
3964 (("RuboCop::RakeTask.new") "")
3965 ;; Do not attempt to sign the gem.
3966 (("spec\\.signing_key = .*") ""))
3967
3968 (substitute* "spec/binary_spec.rb"
3969 (("/bin/ls") (which "ls"))
3970 (("/bin/cat") (which "cat"))
3971 (("/bin/chmod") (which "chmod"))
3972 (("/bin/df") (which "df"))))))))
3973 (native-inputs
3974 (list ruby-rspec))
3975 (synopsis "Extra methods for Ruby's @code{File} class")
3976 (description
3977 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
3978class with many additional methods modelled after common POSIX tools, such as
3979@code{File.which} for finding executables, @code{File.tail} to print the last
3980lines of a file, @code{File.wc} to count words, and so on.")
3981 (home-page "https://github.com/djberg96/ptools")
3982 (license license:artistic2.0)))
3983
3984(define-public ruby-permutation
3985 (package
3986 (name "ruby-permutation")
3987 (version "0.1.8")
3988 (source (origin
3989 (method url-fetch)
3990 (uri (rubygems-uri "permutation" version))
3991 (sha256
3992 (base32
3993 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
3994 (build-system ruby-build-system)
3995 (arguments
3996 `(#:phases
3997 (modify-phases %standard-phases
3998 (add-after 'unpack 'fix-rakefile
3999 (lambda _
4000 (substitute* "Rakefile"
4001 (("require 'rake/gempackagetask'")
4002 "require 'rubygems/package_task'")
4003 (("include Config") ""))))
4004 (replace 'check
4005 (lambda _
4006 (invoke "ruby" "-Ilib" "test/test.rb"))))))
4007 (synopsis "Library to perform operations with sequence permutations")
4008 (description "This package provides a Ruby library to perform different
4009operations with permutations of sequences, such as strings and arrays.")
4010 (home-page "https://flori.github.io/permutation")
4011 (license license:gpl2))) ; GPL 2 only
4012
4013(define-public ruby-shellany
4014 (package
4015 (name "ruby-shellany")
4016 (version "0.0.1")
4017 (source (origin
4018 (method url-fetch)
4019 (uri (rubygems-uri "shellany" version))
4020 (sha256
4021 (base32
4022 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
4023 (build-system ruby-build-system)
4024 (arguments
4025 `(#:test-target "default"
4026 #:phases
4027 (modify-phases %standard-phases
4028 (add-after 'unpack 'fix-version-test
4029 (lambda _
4030 (substitute* "spec/shellany_spec.rb"
4031 (("^RSpec") "require \"shellany\"\nRSpec")))))))
4032 (native-inputs
4033 (list ruby-rspec ruby-nenv bundler))
4034 (synopsis "Capture command output")
4035 (description "Shellany is a Ruby library providing functions to capture
4036the output produced by running shell commands.")
4037 (home-page "https://rubygems.org/gems/shellany")
4038 (license license:expat)))
4039
4040(define-public ruby-notiffany
4041 (package
4042 (name "ruby-notiffany")
4043 (version "0.1.3")
4044 (source (origin
4045 (method url-fetch)
4046 (uri (rubygems-uri "notiffany" version))
4047 (sha256
4048 (base32
4049 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
4050 (build-system ruby-build-system)
4051 ;; Tests are not included in the gem.
4052 (arguments `(#:tests? #f))
4053 (propagated-inputs
4054 (list ruby-shellany ruby-nenv))
4055 (native-inputs
4056 (list bundler))
4057 (synopsis "Wrapper library for notification libraries")
4058 (description "Notiffany is a Ruby wrapper library for notification
4059libraries such as Libnotify.")
4060 (home-page "https://github.com/guard/notiffany")
4061 (license license:expat)))
4062
4063(define-public ruby-forking-test-runner
4064 (package
4065 (name "ruby-forking-test-runner")
4066 (version "1.6.0")
4067 (home-page "https://github.com/grosser/forking_test_runner")
4068 (source (origin
4069 (method git-fetch)
4070 (uri (git-reference (url home-page)
4071 (commit (string-append "v" version))))
4072 (file-name (git-file-name name version))
4073 (sha256
4074 (base32
4075 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
4076 (build-system ruby-build-system)
4077 (arguments
4078 '(#:test-target "spec"
4079 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
4080 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
4081 #:tests? #f
4082 #:phases (modify-phases %standard-phases
4083 (replace 'replace-git-ls-files
4084 (lambda _
4085 (substitute* "forking_test_runner.gemspec"
4086 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4087 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))))
4088 (add-before 'check 'remove-version-constraints
4089 (lambda _
4090 ;; Ignore hard coded version constraints for the tests.
4091 (delete-file "Gemfile.lock")))
4092 (add-before 'check 'set-HOME
4093 (lambda _
4094 ;; Many tests invoke Bundler, and fails when Bundler
4095 ;; warns that /homeless-shelter does not exist.
4096 (setenv "HOME" "/tmp"))))))
4097 (native-inputs
4098 (list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
4099 (propagated-inputs
4100 (list ruby-parallel-tests))
4101 (synopsis "Run every test in a fork")
4102 (description
4103 "This package is a wrapper around @code{parallel_tests} that runs every
4104test in a fork to avoid pollution and get clean output per test.")
4105 (license license:expat)))
4106
4107(define-public ruby-formatador
4108 (package
4109 (name "ruby-formatador")
4110 (version "0.2.5")
4111 (source (origin
4112 (method url-fetch)
4113 (uri (rubygems-uri "formatador" version))
4114 (sha256
4115 (base32
4116 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
4117 (build-system ruby-build-system)
4118 ;; Circular dependency: Tests require ruby-shindo, which requires
4119 ;; ruby-formatador at runtime.
4120 (arguments `(#:tests? #f))
4121 (synopsis "Ruby library to format text on stdout")
4122 (description "Formatador is a Ruby library to format text printed to the
4123standard output stream.")
4124 (home-page "https://github.com/geemus/formatador")
4125 (license license:expat)))
4126
4127(define-public ruby-fuubar
4128 (package
4129 (name "ruby-fuubar")
4130 (version "2.3.2")
4131 (source
4132 (origin
4133 ;; Fetch from the git repository, as the gem package doesn't include
4134 ;; the tests.
4135 (method git-fetch)
4136 (uri (git-reference
4137 (url "https://github.com/thekompanee/fuubar")
4138 (commit (string-append "releases/v" version))))
4139 (file-name (git-file-name name version))
4140 (sha256
4141 (base32
4142 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
4143 (build-system ruby-build-system)
4144 (arguments
4145 '(;; TODO: Some tests fail, unsure why.
4146 ;; 21 examples, 7 failures
4147 #:tests? #f
4148 #:phases
4149 (modify-phases %standard-phases
4150 (add-before 'build 'delete-certificate
4151 (lambda _
4152 ;; Remove 's.cert_chain' as we do not build with a private key
4153 (substitute* "fuubar.gemspec"
4154 ((".*cert_chain.*") "")
4155 ((".*signing_key.*") ""))))
4156 (replace 'check
4157 (lambda* (#:key tests? #:allow-other-keys)
4158 (when tests?
4159 (invoke "rspec")))))))
4160 (native-inputs
4161 (list bundler))
4162 (propagated-inputs
4163 (list ruby-rspec-core ruby-progressbar))
4164 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
4165 (description
4166 "Fuubar is an RSpec formatter that uses a progress bar instead of a
4167string of letters and dots as feedback. It also stops on the first test
4168failure.")
4169 (home-page "https://github.com/thekompanee/fuubar")
4170 (license license:expat)))
4171
4172(define-public ruby-haml
4173 (package
4174 (name "ruby-haml")
4175 (version "7.2.0")
4176 (source
4177 (origin
4178 (method url-fetch)
4179 (uri (rubygems-uri "haml" version))
4180 (sha256
4181 (base32
4182 "0nnmzj6g2wynxbrp9j885zab4nkzfryhl2bv6cj1gazyyxqjpzc7"))))
4183 (build-system ruby-build-system)
4184 (arguments
4185 (list #:tests? #f)) ; No included tests
4186 (propagated-inputs
4187 (list ruby-thor ruby-tilt/minimal ruby-temple))
4188 (synopsis "Haml is a Ruby library to generate HTML documents")
4189 (description
4190 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
4191HTML or XML that is designed to express the structure of documents using
4192indentation rather than closing tags. It was originally envisioned as a
4193plugin for Ruby on Rails, but it can function as a stand-alone templating
4194engine.")
4195 (home-page "https://haml.info/")
4196 (license license:expat)))
4197
4198(define-public ruby-hashdiff
4199 (package
4200 (name "ruby-hashdiff")
4201 (version "1.0.1")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 (uri (rubygems-uri "hashdiff" version))
4206 (sha256
4207 (base32
4208 "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
4209 (build-system ruby-build-system)
4210 (arguments
4211 '(#:phases
4212 (modify-phases %standard-phases
4213 ;; Run tests directly via rspec to avoid depending on rubocop.
4214 (replace 'check
4215 (lambda* (#:key tests? #:allow-other-keys)
4216 (when tests?
4217 (invoke "rspec")))))))
4218 (native-inputs
4219 (list bundler ruby-rspec-2))
4220 (synopsis "HashDiff computes the smallest difference between two hashes")
4221 (description
4222 "HashDiff is a Ruby library to compute the smallest difference between
4223two hashes.")
4224 (home-page "https://github.com/liufengyun/hashdiff")
4225 (license license:expat)))
4226
4227(define-public ruby-hydra-minimal
4228 ;; No releases yet.
4229 (let ((commit "d985443af5ea81f4ca13559380d20e96140de56e")
4230 (revision "2"))
4231 (package
4232 (name "ruby-hydra-minimal")
4233 (version (git-version "0.0.0" revision commit))
4234 (home-page "https://github.com/hyphenation/hydra")
4235 (source (origin
4236 (method git-fetch)
4237 (uri (git-reference (url home-page) (commit commit)))
4238 (file-name (git-file-name name version))
4239 ;; byebug is a non-essential debugging utility that brings in
4240 ;; many dependencies.
4241 (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
4242 (sha256
4243 (base32
4244 "0mlc6zw9vwxx4zgxjdpk8qn6ibplm80k6w4axc6k7m1l5dg65jqd"))))
4245 (build-system ruby-build-system)
4246 (arguments
4247 (list
4248 #:tests? #f)) ;avoid rspec dependency.
4249 (synopsis "Ruby hyphenation patterns")
4250 (description
4251 "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
4252It is a low-dependency variant of ruby-hydra.")
4253 (license license:expat))))
4254
4255(define-public ruby-hydra
4256 (package
4257 (inherit ruby-hydra-minimal)
4258 (name "ruby-hydra")
4259 (arguments
4260 (substitute-keyword-arguments arguments
4261 ((#:tests? tests? #t)
4262 #t)
4263 ((#:phases phases #~%standard-phases)
4264 #~(modify-phases #$phases
4265 (add-after 'unpack 'make-files-writable
4266 (lambda _
4267 (for-each make-file-writable (find-files "."))))
4268 (replace 'check
4269 (lambda* (#:key tests? #:allow-other-keys)
4270 (when tests?
4271 (invoke "rspec"))))))))
4272 (native-inputs
4273 (list ruby-rspec))
4274 (description
4275 "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
4276
4277(define-public ruby-shindo
4278 (package
4279 (name "ruby-shindo")
4280 (version "0.3.11")
4281 (source (origin
4282 (method url-fetch)
4283 (uri (rubygems-uri "shindo" version))
4284 (sha256
4285 (base32
4286 "1wccg3a4g3agfyszipkdnbcgsazcfwdbz1gv51q8m17m9plvpzdp"))))
4287 (build-system ruby-build-system)
4288 (arguments
4289 (list
4290 #:test-target "tests"
4291 #:phases
4292 #~(modify-phases %standard-phases
4293 (add-after 'unpack 'fix-tests
4294 (lambda _
4295 (substitute* "tests/tests_helper.rb"
4296 (("-rrubygems") ""))))
4297 ;; Move the 'check phase to after 'install, to use installed shindo.
4298 (delete 'check)
4299 (add-after 'install 'configure-tests
4300 (lambda* (#:key tests? #:allow-other-keys)
4301 (when tests?
4302 (setenv "GEM_PATH"
4303 (string-append
4304 (getenv "GEM_PATH") ":"
4305 #$output "/lib/ruby/vendor_ruby"))
4306 (setenv "PATH"
4307 (string-append
4308 (getenv "PATH") ":" #$output "/bin")))))
4309 (add-after 'configure-tests 'check
4310 (assoc-ref %standard-phases 'check)))))
4311 (propagated-inputs
4312 (list ruby-formatador))
4313 (synopsis "Simple depth first Ruby testing")
4314 (description "Shindo is a simple depth first testing library for Ruby.")
4315 (home-page "https://github.com/geemus/shindo")
4316 (license license:expat)))
4317
4318(define-public ruby-rubygems-tasks
4319 (package
4320 (name "ruby-rubygems-tasks")
4321 (version "0.3.0")
4322 (source
4323 (origin
4324 (method url-fetch)
4325 (uri (rubygems-uri "rubygems-tasks" version))
4326 (sha256
4327 (base32 "06g10wg5nbca1lj9m9i5qyslp7cwdm00fhy3n1q0qxcbxpkwmpzx"))))
4328 (build-system ruby-build-system)
4329 ;; Tests need Internet access.
4330 (arguments
4331 `(#:tests? #f))
4332 (synopsis "Rake tasks for managing and releasing Ruby Gems")
4333 (description "Rubygems-task provides Rake tasks for managing and releasing
4334Ruby Gems.")
4335 (home-page "https://github.com/postmodern/rubygems-tasks")
4336 (license license:expat)))
4337
4338(define-public ruby-rubyzip
4339 (package
4340 (name "ruby-rubyzip")
4341 (version "2.3.2")
4342 (source (origin
4343 (method git-fetch)
4344 (uri (git-reference
4345 (url "https://github.com/rubyzip/rubyzip")
4346 (commit (string-append "v" version))))
4347 (file-name (git-file-name name version))
4348 (sha256
4349 (base32
4350 "03p8c990n6c1r4g64w0vv7z2iaswisl07l2f1lbh1s78cvmlmfxx"))))
4351 (build-system ruby-build-system)
4352 (arguments
4353 '(#:phases
4354 (modify-phases %standard-phases
4355 (add-after 'unpack 'disable-rubocop
4356 (lambda _
4357 (substitute* "Rakefile"
4358 (("require 'rubocop/rake_task'") "")
4359 (("RuboCop::RakeTask.new") ""))))
4360 (add-before 'check 'patch-tests
4361 (lambda* (#:key inputs #:allow-other-keys)
4362 (substitute* "test/gentestfiles.rb"
4363 (("/usr/bin/zip") (which "zip")))))
4364 (add-after 'patch-source-shebangs 'unpatch-some-source-shebangs
4365 (lambda _
4366 ;; The tests compare zipped files with data test files; since the
4367 ;; zip files do not have their shebangs patched, the data files
4368 ;; compared with their extracted version must also be left
4369 ;; un-patched.
4370 (substitute* (find-files "test/data" "\\.(txt|rb)$")
4371 (((which "ruby"))
4372 "/usr/bin/env ruby")))))))
4373 (native-inputs
4374 (list bundler ruby-simplecov zip unzip))
4375 (synopsis "Ruby module is for reading and writing zip files")
4376 (description
4377 "The rubyzip module provides ways to read from and create zip files.")
4378 (home-page "https://github.com/rubyzip/rubyzip")
4379 (license license:bsd-2)))
4380
4381(define-public ruby-silent-stream
4382 (package
4383 (name "ruby-silent-stream")
4384 (version "1.0.6")
4385 (source (origin
4386 (method url-fetch)
4387 (uri (rubygems-uri "silent_stream" version))
4388 (sha256
4389 (base32
4390 "10381fpvjzfjvhgfyv700607fpa29firgf52w5w5536m4fh6x63m"))))
4391 (build-system ruby-build-system)
4392 (synopsis "ActiveSupport stream silencing without ActiveSupport")
4393 (description "SilentStream is an extraction of some parts of
4394ActiveSupport's Kernel Reporting Core Extensions around silencing IO
4395streams.")
4396 (home-page "https://github.com/pboling/silent_stream")
4397 (license license:expat)))
4398
4399(define-public ruby-simplecov-lcov
4400 (package
4401 (name "ruby-simplecov-lcov")
4402 (version "0.8.0")
4403 (source (origin
4404 (method url-fetch)
4405 (uri (rubygems-uri "simplecov-lcov" version))
4406 (sha256
4407 (base32
4408 "1h8kswnshgb9zidvc88f4zjy4gflgz3854sx9wrw8ppgnwfg6581"))))
4409 (build-system ruby-build-system)
4410 ;; The test suite fails half of its tests; it seems to rely on older
4411 ;; versions of simplecov, rspec, possibly others (see:
4412 ;; https://github.com/fortissimo1997/simplecov-lcov/issues/29).
4413 (arguments (list #:tests? #f
4414 #:test-target "spec"))
4415 (native-inputs
4416 (list ruby-activesupport
4417 ruby-coveralls
4418 ruby-rspec
4419 ruby-simplecov))
4420 (synopsis "SimpleCov formatter to generate a lcov style coverage")
4421 (description "This package provides a SimpleCov formatter to generate a
4422lcov-style coverage report.")
4423 (home-page "https://github.com/fortissimo1997/simplecov-lcov")
4424 (license license:expat)))
4425
4426(define-public ruby-snaky-hash
4427 (package
4428 (name "ruby-snaky-hash")
4429 (version "2.0.1")
4430 (source (origin
4431 (method git-fetch)
4432 (uri (git-reference ;for tests
4433 (url "https://gitlab.com/oauth-xx/snaky_hash")
4434 (commit (string-append "v" version))))
4435 (file-name (git-file-name name version))
4436 (sha256
4437 (base32
4438 "0zmixxzi2g2d75zii65bq037j4g67p25l6aqddbmmwizspsp5az6"))))
4439 (build-system ruby-build-system)
4440 (arguments
4441 (list #:phases #~(modify-phases %standard-phases
4442 (add-after 'unpack 'relax-requirements
4443 (lambda _
4444 (substitute* "Gemfile"
4445 (("^linting = .*")
4446 "linting = false\n")
4447 (("^coverage = .*")
4448 "coverage = false\n")
4449 (("^debug = .*")
4450 "debug = false\n"))
4451 (substitute* "spec/spec_helper.rb"
4452 (("^RUN_COVERAGE = .*")
4453 "RUN_COVERAGE = false\n")
4454 (("^ALL_FORMATTERS = .*")
4455 "ALL_FORMATTERS = false\n"))))
4456 (add-before 'build 'drop-signing-key-requirement
4457 (lambda _
4458 (substitute* "snaky_hash.gemspec"
4459 (("spec.signing_key =.*")
4460 "spec.signing_key = nil")))))))
4461 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
4462 (propagated-inputs (list ruby-hashie ruby-version-gem))
4463 (synopsis "Hash keys and look-ups normalization Ruby library")
4464 (description "The SnakyHash Ruby library provides classes for normalizing
4465hash keys and look-ups, and a pseudo-object interface.")
4466 (home-page "https://gitlab.com/oauth-xx/snaky_hash")
4467 (license license:expat)))
4468
4469(define-public ruby-useragent
4470 (package
4471 (name "ruby-useragent")
4472 (version "0.16.10")
4473 (source (origin
4474 (method url-fetch)
4475 (uri (rubygems-uri "useragent" version))
4476 (sha256
4477 (base32
4478 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
4479 (build-system ruby-build-system)
4480 (arguments
4481 '(#:tests? #f)) ; no test suite
4482 (synopsis "HTTP user agent parser for Ruby")
4483 (description "UserAgent is a Ruby library that parses and compares HTTP
4484User Agents.")
4485 (home-page "https://github.com/gshutler/useragent")
4486 (license license:expat)))
4487
4488(define-public ruby-backports
4489 (package
4490 (name "ruby-backports")
4491 (version "3.11.4")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (rubygems-uri "backports" version))
4496 (sha256
4497 (base32
4498 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
4499 (build-system ruby-build-system)
4500 (arguments
4501 '(;; TODO: This should be default, but there is one test failure
4502 #:test-target "all_spec"))
4503 (native-inputs
4504 (list ruby-mspec ruby-activesupport))
4505 (synopsis "Backports of the features in newer Ruby versions")
4506 (description
4507 "Backports enables more compatibility across Ruby versions by providing
4508backports of some features.")
4509 (home-page "https://github.com/marcandre/backports")
4510 (license license:expat)))
4511
4512(define-public ruby-bacon
4513 (package
4514 (name "ruby-bacon")
4515 (version "1.2.0")
4516 (source (origin
4517 (method url-fetch)
4518 (uri (rubygems-uri "bacon" version))
4519 (sha256
4520 (base32
4521 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
4522 (build-system ruby-build-system)
4523 (synopsis "Small RSpec clone")
4524 (description "Bacon is a small RSpec clone providing all essential
4525features.")
4526 (home-page "https://github.com/chneukirchen/bacon")
4527 (license license:expat)))
4528
4529(define-public ruby-bacon-bits
4530 (package
4531 (name "ruby-bacon-bits")
4532 (version "0.1.0")
4533 (source
4534 (origin
4535 (method url-fetch)
4536 (uri (rubygems-uri "bacon-bits" version))
4537 (sha256
4538 (base32
4539 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
4540 (build-system ruby-build-system)
4541 (arguments
4542 ;; No tests
4543 '(#:tests? #f))
4544 (propagated-inputs (list ruby-bacon))
4545 (synopsis "Extensions to Bacon, for disabling tests, before and after
4546blocks and more")
4547 (description
4548 "This extends the bacon testing framework with useful extensions to
4549disable tests, have before and after blocks that run once and more.")
4550 (home-page "https://github.com/cldwalker/bacon-bits")
4551 (license license:expat)))
4552
4553(define-public ruby-bacon-colored-output
4554 (package
4555 (name "ruby-bacon-colored-output")
4556 (version "1.1.1")
4557 (source
4558 (origin
4559 (method url-fetch)
4560 (uri (rubygems-uri "bacon-colored_output" version))
4561 (sha256
4562 (base32
4563 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
4564 (build-system ruby-build-system)
4565 (arguments
4566 '(;; No included tests
4567 #:tests? #f))
4568 (propagated-inputs
4569 (list ruby-bacon))
4570 (synopsis "Colored output for Bacon test framework")
4571 (description
4572 "This package adds color through ANSI escape codes to Bacon test
4573output.")
4574 (home-page "https://github.com/whitequark/bacon-colored_output")
4575 (license license:expat)))
4576
4577(define-public ruby-bake
4578 (package
4579 (name "ruby-bake")
4580 (version "0.18.2")
4581 (source (origin
4582 (method git-fetch) ;for tests
4583 (uri (git-reference
4584 (url "https://github.com/ioquatix/bake")
4585 (commit (string-append "v" version))))
4586 (file-name (git-file-name name version))
4587 (sha256
4588 (base32
4589 "19yi1fxzz9n580gig3p3j6nxbgcfcassa6b0q07jkqrzxdqn7xhn"))))
4590 (build-system ruby-build-system)
4591 (arguments
4592 (list #:phases
4593 #~(modify-phases %standard-phases
4594 (add-after 'unpack 'sanitize-dependencies
4595 (lambda _
4596 ;; These dependencies are not needed to build and run tests
4597 ;; and contain circular dependencies.
4598 (substitute* "gems.rb"
4599 ((".*'bake-modernize'.*") "")
4600 ((".*'bake-gem'.*") "")
4601 ((".*'bake-github-pages'.*") "")
4602 ((".*'utopia-project'.*") ""))))
4603 (add-before 'build 'drop-signing-key-requirement
4604 (lambda _
4605 (substitute* "bake.gemspec"
4606 (("spec.signing_key =.*")
4607 "spec.signing_key = nil"))))
4608 (replace 'check
4609 (lambda* (#:key tests? #:allow-other-keys)
4610 (when tests?
4611 (invoke "rspec")))))))
4612 (native-inputs (list ruby-covered ruby-rspec))
4613 (propagated-inputs (list ruby-samovar))
4614 (synopsis "Replacement for rake with a simpler syntax")
4615 (description "Bake is a task execution tool, inspired by Rake, but
4616codifying many of the use cases which are typically implemented in an ad-hoc
4617manner.")
4618 (home-page "https://github.com/ioquatix/bake")
4619 (license license:expat)))
4620
4621(define-public ruby-bake-test
4622 (package
4623 (name "ruby-bake-test")
4624 (version "0.2.0")
4625 (source (origin
4626 (method url-fetch)
4627 (uri (rubygems-uri "bake-test" version))
4628 (sha256
4629 (base32
4630 "1p6kfpncj0s4zyynrrq6c735jvh0dnwyv7kfqym4rpyka4f85qdp"))))
4631 (build-system ruby-build-system)
4632 ;; XXX: Disable the test suite to avoid a circular dependency with
4633 ;; ruby-sus.
4634 (arguments (list #:tests? #f))
4635 (propagated-inputs (list ruby-bake))
4636 (synopsis "Test suite automatic runner for Ruby")
4637 (description "@command{bake-test} automatically discovers how to run local
4638test suites for Ruby projects. It supports @command{rspec}, @command{sus}, as
4639well as @samp{rake}.")
4640 (home-page "https://github.com/ioquatix/bake-test")
4641 (license license:expat)))
4642
4643(define-public ruby-bake-test-external
4644 (package
4645 (name "ruby-bake-test-external")
4646 (version "0.3.2")
4647 (source (origin
4648 (method url-fetch)
4649 (uri (rubygems-uri "bake-test-external" version))
4650 (sha256
4651 (base32
4652 "0749xc7jkz1c5gsq1giwhrqy6s6xqm48bdvs414372881wki2jmh"))))
4653 (build-system ruby-build-system)
4654 ;; The test suite relies on git and network access to clone external
4655 ;; repositories.
4656 (arguments (list #:tests? #f))
4657 (propagated-inputs (list ruby-bake))
4658 (synopsis "Continuous integration extension for Bake")
4659 (description "Bake Test External adds a @samp{test:external} action to the
4660@command{bake} command to run the test suites of dependent projects to check
4661for breakage.")
4662 (home-page "https://github.com/ioquatix/bake-test-external")
4663 (license license:expat)))
4664
4665(define-public ruby-connection-pool
4666 (package
4667 (name "ruby-connection-pool")
4668 (version "2.4.1")
4669 (source (origin
4670 (method git-fetch)
4671 (uri (git-reference
4672 (url "https://github.com/mperham/connection_pool")
4673 (commit (string-append "v" version))))
4674 (file-name (git-file-name name version))
4675 (sha256
4676 (base32
4677 "1iijshb1n9xl5knvpzzx0vqlw7v7mskiw1cpfj1cmdmssavyhsx5"))))
4678 (build-system ruby-build-system)
4679 (arguments
4680 (list
4681 #:phases
4682 #~(modify-phases %standard-phases
4683 (add-after 'unpack 'patch
4684 (lambda _
4685 (substitute* "Rakefile"
4686 (("require \"standard/rake\"") "")
4687 ((":\"standard:fix\",") "")))))))
4688 (native-inputs
4689 (list bundler))
4690 (synopsis "Generic connection pool for Ruby")
4691 (description "Connection_pool provides a generic connection pooling
4692interface for Ruby programs.")
4693 (home-page "https://github.com/mperham/connection_pool")
4694 (license license:expat)))
4695
4696(define-public ruby-fast-gettext
4697 (package
4698 (name "ruby-fast-gettext")
4699 (version "4.1.0")
4700 (home-page "https://github.com/grosser/fast_gettext")
4701 (source (origin
4702 (method git-fetch)
4703 (uri (git-reference (url home-page)
4704 (commit (string-append "v" version))))
4705 (file-name (git-file-name name version))
4706 (sha256
4707 (base32
4708 "04p9s0r67xgvckab9ydb3fbnrc7g20p5c05z2zsacynlkp9x5jp9"))))
4709 (build-system ruby-build-system)
4710 (arguments
4711 (list
4712 #:test-target "spec"
4713 #:phases
4714 #~(modify-phases %standard-phases
4715 (add-before 'check 'remove-version-constraints
4716 (lambda _
4717 (delete-file "Gemfile.lock"))))))
4718 (native-inputs
4719 (list ;; For tests.
4720 ruby-activerecord
4721 ruby-activesupport
4722 ruby-bump
4723 ruby-forking-test-runner
4724 ruby-i18n
4725 ruby-rubocop
4726 ruby-rubocop-packaging
4727 ruby-rspec
4728 ruby-single-cov
4729 ruby-sqlite3
4730 ruby-wwtd))
4731 (synopsis "Fast implementation of @code{GetText}")
4732 (description
4733 "This package provides an alternative implementation of the Ruby
4734@code{GetText} library that is approximately 12x faster yet thread safe.")
4735 ;; Some parts are covered by the Ruby license, see file headers.
4736 (license (list license:expat license:ruby))))
4737
4738(define-public ruby-fiber-local
4739 (package
4740 (name "ruby-fiber-local")
4741 (version "1.0.0")
4742 (source (origin
4743 (method git-fetch)
4744 (uri (git-reference
4745 (url "https://github.com/socketry/fiber-local")
4746 (commit (string-append "v" version))))
4747 (file-name (git-file-name name version))
4748 (sha256
4749 (base32
4750 "0pp5b81h0lysdnphgprkixh1az0fkrgir5sbcp0mm8arxf3f8m90"))))
4751 (build-system ruby-build-system)
4752 (arguments
4753 (list #:phases
4754 #~(modify-phases %standard-phases
4755 (add-after 'extract-gemspec 'sanitize-dependencies
4756 (lambda _
4757 ;; This pulls in extraneous maintenance dependencies.
4758 (delete-file "gems.rb")
4759 ;; Depending on ruby-covered would introduce a dependency
4760 ;; cycle with it.
4761 (substitute* '("fiber-local.gemspec" "spec/spec_helper.rb")
4762 ((".*covered.*") ""))))
4763 (replace 'check
4764 (lambda* (#:key tests? #:allow-other-keys)
4765 (when tests?
4766 (invoke "rspec")))))))
4767 (native-inputs (list ruby-rspec))
4768 (synopsis "Ruby module to simplify fiber-local state management")
4769 (description "This package provides a class-level mixin to make managing
4770fiber-local state easy. It provides easy access to a fiber-local state from a
4771fiber, and defaults to a shared thread-local state.")
4772 (home-page "https://github.com/socketry/fiber-local")
4773 (license license:expat)))
4774
4775(define-public ruby-flores
4776 (let ((commit "92fded00b04b1e3d308edb7440d7b7ab2c89ab5e")
4777 (revision "0"))
4778 (package
4779 (name "ruby-flores")
4780 (version (git-version "0.0.8" revision commit))
4781 (source
4782 (origin
4783 (method git-fetch)
4784 (uri (git-reference
4785 (url "https://github.com/jordansissel/ruby-flores")
4786 (commit commit)))
4787 (sha256
4788 (base32 "0jvnw0jli2zzxklfk751vfbi4acf9lijppk67346j3b2qxqi8xms"))
4789 (patches
4790 (search-patches "ruby-flores-fix-deprecations.patch"))))
4791 (build-system ruby-build-system)
4792 (arguments
4793 (list #:phases
4794 #~(modify-phases %standard-phases
4795 (add-after 'unpack 'fix-gemspec
4796 (lambda _
4797 (substitute* "flores.gemspec"
4798 ;; Since this is not a git repository, do not call 'git'.
4799 (("git ls-files") "find . -type f |sort"))))
4800 (replace 'check
4801 (lambda* (#:key tests? #:allow-other-keys)
4802 (when tests?
4803 (invoke "ruby" (which "rspec"))))))))
4804 (native-inputs (list ruby-rspec ruby-simplecov))
4805 (synopsis "Fuzzing, randomization, and stress testing library")
4806 (description "Flores is a fuzzing, randomization, and stress library to
4807help tests uncover more bugs.")
4808 (home-page "https://github.com/jordansissel/ruby-flores")
4809 (license license:asl2.0))))
4810
4811(define-public ruby-ipaddr
4812 (package
4813 (name "ruby-ipaddr")
4814 (version "1.2.6")
4815 (source (origin
4816 (method git-fetch) ;for tests
4817 (uri (git-reference
4818 (url "https://github.com/ruby/ipaddr")
4819 (commit (string-append "v" version))))
4820 (file-name (git-file-name name version))
4821 (sha256
4822 (base32
4823 "0h3z8i1fa8s4gx48322fflhpkzghd4bmd9109hglsgdkic7b0dyp"))))
4824 (build-system ruby-build-system)
4825 (native-inputs (list ruby-test-unit-ruby-core))
4826 (synopsis "Manipulate IP addresses")
4827 (description "This package provides a set of methods to manipulate an IP
4828address. Both IPv4 and IPv6 are supported.")
4829 (home-page "https://github.com/ruby/ipaddr")
4830 (license license:bsd-2)))
4831
4832(define-public ruby-fake-ftp
4833 (package
4834 (name "ruby-fake-ftp")
4835 (version "0.3.0")
4836 (source (origin
4837 (method url-fetch)
4838 (uri (rubygems-uri "fake_ftp" version))
4839 (sha256
4840 (base32
4841 "1zl9q9m4x7lz9890g0h1qqj7hcxnwzpjfnfbxadjblps7b5054q4"))))
4842 (build-system ruby-build-system)
4843 (native-inputs (list ruby-rspec ruby-rubocop ruby-simplecov))
4844 (arguments
4845 '(#:test-target "spec"))
4846 (synopsis "Fake FTP server for use with ruby tests")
4847 (description "This package allows you to test FTP implementations in ruby.
4848It is a minimal single-client FTP server that can be bound to any arbitrary
4849port on localhost.")
4850 (home-page "https://rubygems.org/gems/fake_ftp")
4851 (license license:expat)))
4852
4853(define-public ruby-net-telnet
4854 (package
4855 (name "ruby-net-telnet")
4856 (version "0.2.0")
4857 (source (origin
4858 (method url-fetch)
4859 (uri (rubygems-uri "net-telnet" version))
4860 (sha256
4861 (base32
4862 "16nkxc79nqm7fd6w1fba4kb98vpgwnyfnlwxarpdcgywz300fc15"))))
4863 (build-system ruby-build-system)
4864 (synopsis "Telnet client functionality")
4865 (description "This package provides telnet client functionality.")
4866 (home-page "https://github.com/ruby/net-telnet")
4867 (license license:bsd-2)))
4868
4869(define-public ruby-net-ftp
4870 (package
4871 (name "ruby-net-ftp")
4872 (version "0.3.4")
4873 (source (origin
4874 (method git-fetch) ;for tests
4875 (uri (git-reference
4876 (url "https://github.com/ruby/net-ftp")
4877 (commit (string-append "v" version))))
4878 (file-name (git-file-name name version))
4879 (sha256
4880 (base32
4881 "11b1sw7c4c7xrhn5li5m0wylw42hp52jp6pqacyb43hkw1m5zr36"))))
4882 (build-system ruby-build-system)
4883 (propagated-inputs (list ruby-net-protocol ruby-time))
4884 (synopsis "File Transfer Protocol client library")
4885 (description "This class implements the File Transfer Protocol. If you
4886have used a command-line FTP program, and are familiar with the commands, you
4887will be able to use this class easily. Some extra features are included to
4888take advantage of Ruby's style and strengths.")
4889 (home-page "https://github.com/ruby/net-ftp")
4890 (license license:bsd-2)))
4891
4892(define-public ruby-net-http-persistent
4893 (package
4894 (name "ruby-net-http-persistent")
4895 (version "4.0.2")
4896 (source (origin
4897 (method url-fetch)
4898 (uri (rubygems-uri "net-http-persistent" version))
4899 (sha256
4900 (base32
4901 "0i1as2lgnw7b4jid0gw5glv5hnxz36nmfsbr9rmxbcap72ijgy03"))))
4902 (build-system ruby-build-system)
4903 (native-inputs
4904 (list ruby-connection-pool
4905 ruby-hoe
4906 ruby-rake-manifest))
4907 (synopsis "Persistent HTTP connection manager")
4908 (description "Net::HTTP::Persistent manages persistent HTTP connections
4909using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
4910 (home-page "https://github.com/drbrain/net-http-persistent")
4911 (license license:expat)))
4912
4913(define-public ruby-net-imap
4914 (package
4915 (name "ruby-net-imap")
4916 (version "0.6.6")
4917 (source (origin
4918 (method git-fetch) ;for tests
4919 (uri (git-reference
4920 (url "https://github.com/ruby/net-imap")
4921 (commit (string-append "v" version))))
4922 (file-name (git-file-name name version))
4923 (sha256
4924 (base32
4925 "052myg3kgr1fjb3zaki8cfn3s55pd5nn5v4jhbvak8kkpc4hf5gy"))))
4926 (build-system ruby-build-system)
4927 (arguments
4928 (list #:phases
4929 #~(modify-phases %standard-phases
4930 (add-before 'replace-git-ls-files 'adjust-for-git-ls-files
4931 (lambda _
4932 ;; Adjust the git ls-files invocation so that it matches
4933 ;; the expected pattern.
4934 (substitute* "net-imap.gemspec"
4935 (("`git ls-files -z 2>/dev/null`")
4936 "`git ls-files -z`"))))
4937 (add-before 'check 'disable-simplecov
4938 (lambda _
4939 (setenv "SIMPLECOV_DISABLE" "yes"))))))
4940 (native-inputs (list ruby-psych ruby-test-unit-ruby-core))
4941 (propagated-inputs (list ruby-date ruby-net-protocol))
4942 (synopsis "Ruby client api for Internet Message Access Protocol")
4943 (description "@code{Net::IMAP} implements Internet Message Access
4944Protocol (IMAP) client functionality. The protocol is described in
4945@url{https://tools.ietf.org/html/rfc3501, IMAP}.")
4946 (home-page "https://github.com/ruby/net-imap")
4947 (license license:bsd-2)))
4948
4949(define-public ruby-net-pop
4950 (package
4951 (name "ruby-net-pop")
4952 (version "0.1.2")
4953 (source (origin
4954 (method git-fetch)
4955 (uri (git-reference
4956 (url "https://github.com/ruby/net-pop")
4957 (commit (string-append "v" version))))
4958 (file-name (git-file-name name version))
4959 (sha256
4960 (base32
4961 "05vz6a56va2rbr7ld78gdzwy1j5mzs98cz82ax5aqa83pzzk6jld"))))
4962 (build-system ruby-build-system)
4963 (propagated-inputs (list ruby-net-protocol))
4964 (synopsis "Ruby client library for POP3")
4965 (description "This library provides functionality for retrieving email via
4966POP3, the Post Office Protocol version 3, as specified by
4967@url{http://www.ietf.org/rfc/rfc1939.txt, RFC1939}.")
4968 (home-page "https://github.com/ruby/net-pop")
4969 (license license:bsd-2)))
4970
4971(define-public ruby-net-smtp
4972 (package
4973 (name "ruby-net-smtp")
4974 (version "0.3.3")
4975 (source (origin
4976 (method git-fetch) ;for tests
4977 (uri (git-reference
4978 (url "https://github.com/ruby/net-smtp")
4979 (commit (string-append "v" version))))
4980 (file-name (git-file-name name version))
4981 (sha256
4982 (base32
4983 "0ca2wh45xvc09rv6v6sz3vbnkzrjzk5c4l6dk50zk4dwxvghma8r"))))
4984 (build-system ruby-build-system)
4985 (arguments
4986 (list
4987 #:phases
4988 #~(modify-phases %standard-phases
4989 (add-before 'check 'regenerate-certificate
4990 ;; On version 0.5.0 a Makefile was introduced to regenerated
4991 ;; the certificates, and instead of calling openssl directory
4992 ;; we could do (with-directory-excursion "test/net/fixtures"
4993 ;; (invoke "make" "regen_certs"). However the certificate is
4994 ;; expired versions before 0.5.0 as well.
4995 (lambda _
4996 (with-directory-excursion "test/net/fixtures"
4997 (invoke
4998 "openssl" "req" "-new" "-key" "server.key" "-out"
4999 "server.csr" "-subj"
5000 "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost")
5001 (invoke "openssl" "req" "-new" "-x509" "-days" "3650"
5002 "-key" "server.key" "-out" "cacert.pem" "-subj"
5003 (string-append
5004 "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby "
5005 "Core Team/CN=Ruby Test "
5006 "CA/[email protected]"))
5007 (invoke "openssl" "x509" "-days" "3650" "-CA" "cacert.pem"
5008 "-CAkey" "server.key" "-set_serial" "00" "-in"
5009 "server.csr" "-req" "-out" "server.crt")))))))
5010 (native-inputs (list openssl))
5011 (propagated-inputs (list ruby-net-protocol))
5012 (synopsis "Simple Mail Transfer Protocol client library for Ruby")
5013 (description "This library provides functionality to send Internet mail
5014via SMTP, the Simple Mail Transfer Protocol. The SMTP protocol specification
5015is known as @url{http://www.ietf.org/rfc/rfc2821.txt, RFC2821}.")
5016 (home-page "https://github.com/ruby/net-smtp")
5017 (license license:bsd-2)))
5018
5019(define-public ruby-pleaserun
5020 (package
5021 (name "ruby-pleaserun")
5022 (version "0.0.32")
5023 (source (origin
5024 (method url-fetch)
5025 (uri (rubygems-uri "pleaserun" version))
5026 (sha256
5027 (base32
5028 "1aykf0l8327bqkkf5xd9jcglsib973zpy37cfnlf4j0vp0cdpn2d"))))
5029 (build-system ruby-build-system)
5030 (arguments
5031 (list #:phases
5032 #~(modify-phases %standard-phases
5033 (add-after 'extract-gemspec 'relax-requirements
5034 (lambda _
5035 (substitute* "pleaserun.gemspec"
5036 ;; Mustache is pinned at 0.99.8, for portability with
5037 ;; older Rubies.
5038 (("dependency\\(%q<mustache>.freeze.*")
5039 "dependency(%q<mustache>.freeze)\n"))))
5040 (replace 'check
5041 (lambda* (#:key tests? #:allow-other-keys)
5042 (when tests?
5043 ;; The cli_spec.rb test fails non-deterministically with
5044 ;; a Errno::EISDIR error (see:
5045 ;; https://github.com/jordansissel/pleaserun/issues/155)
5046 (invoke "rspec" "--exclude-pattern"
5047 "spec/pleaserun/cli_spec.rb")))))))
5048 (native-inputs (list ruby-flores ruby-rspec))
5049 (propagated-inputs (list ruby-cabin
5050 ruby-clamp
5051 ruby-dotenv
5052 ruby-insist
5053 ruby-mustache
5054 ruby-stud))
5055 (synopsis "Init scripts and service definitions generation tool")
5056 (description "Pleaserun is a tool to generate startup scripts and service
5057definitions. It targets service managers such as systemd, Upstart, launchd,
5058sysv init, and runit.")
5059 (home-page "https://github.com/jordansissel/pleaserun")
5060 (license license:asl2.0)))
5061
5062(define-public ruby-power-assert
5063 (package
5064 (name "ruby-power-assert")
5065 (version "1.1.5")
5066 (source (origin
5067 (method url-fetch)
5068 (uri (rubygems-uri "power_assert" version))
5069 (sha256
5070 (base32
5071 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
5072 (build-system ruby-build-system)
5073 (arguments
5074 '(#:tests? #f)) ; No included tests
5075 (native-inputs
5076 (list bundler))
5077 (synopsis "Assert library with descriptive assertion messages")
5078 (description "Power-assert is an assertion library providing descriptive
5079assertion messages for tests.")
5080 (home-page "https://github.com/k-tsj/power_assert")
5081 (license (list license:bsd-2 license:ruby))))
5082
5083(define-public ruby-powerpack
5084 (package
5085 (name "ruby-powerpack")
5086 (version "0.1.3")
5087 (source
5088 (origin
5089 (method url-fetch)
5090 (uri (rubygems-uri "powerpack" version))
5091 (sha256
5092 (base32
5093 "1f71axvlhnxja0k17qqxdi4qh5ck807hqg4i3j6cgy8fgzmyg7rg"))))
5094 (build-system ruby-build-system)
5095 (arguments
5096 (list #:test-target "spec"))
5097 (native-inputs
5098 (list bundler ruby-rspec ruby-yard))
5099 (synopsis "Useful extensions to core Ruby classes")
5100 (description
5101 "This package provides a few useful extensions to core Ruby classes,
5102including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
5103@code{String}.")
5104 (home-page "https://github.com/bbatsov/powerpack")
5105 (license license:expat)))
5106
5107(define-public ruby-locale
5108 (package
5109 (name "ruby-locale")
5110 (version "2.1.2")
5111 (source (origin
5112 (method url-fetch)
5113 (uri (rubygems-uri "locale" version))
5114 (sha256
5115 (base32
5116 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
5117 (build-system ruby-build-system)
5118 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5119 ;; which needs ruby-gettext, which needs ruby-locale. To break the
5120 ;; dependency cycle we disable tests.
5121 (arguments `(#:tests? #f))
5122 (native-inputs
5123 (list bundler ruby-yard/minimal))
5124 (synopsis "Ruby library providing basic localization APIs")
5125 (description
5126 "Ruby-Locale is the pure ruby library which provides basic APIs for
5127localization.")
5128 (home-page "https://github.com/ruby-gettext/locale")
5129 (license (list license:lgpl3+ license:ruby))))
5130
5131(define-public ruby-temple
5132 (package
5133 (name "ruby-temple")
5134 (version "0.10.0")
5135 (source (origin
5136 (method git-fetch) ;for tests
5137 (uri (git-reference
5138 (url "https://github.com/judofyr/temple")
5139 (commit (string-append "v" version))))
5140 (file-name (git-file-name name version))
5141 (sha256
5142 (base32
5143 "0rr9fnlcgj9nm3b6hzzjsvcw8x3y7z48j7slk7xxff2mh8s7y3y0"))))
5144 (build-system ruby-build-system)
5145 (arguments
5146 (list #:phases
5147 #~(modify-phases %standard-phases
5148 (add-after 'replace-git-ls-files 'replace-more-git-ls-files
5149 (lambda _
5150 (substitute* "temple.gemspec"
5151 ;; There no longer are test, spec or features
5152 ;; directories.
5153 ((".*`git ls-files -- \\{test,spec,features}/\\*`.*")
5154 "")
5155 ;; There isn't any bin directory either.
5156 ((".*`git ls-files -- bin/\\*`.*")
5157 ""))))
5158 (replace 'check
5159 (lambda* (#:key tests? #:allow-other-keys)
5160 (when tests?
5161 (invoke "rspec")))))))
5162 (native-inputs (list ruby-bacon ruby-erubi ruby-rspec ruby-tilt/minimal))
5163 (synopsis "Template compilation framework in Ruby")
5164 (description "Temple is an abstraction and framework for compiling
5165templates to pure Ruby.")
5166 (home-page "https://github.com/judofyr/temple")
5167 (license license:expat)))
5168
5169(define-public ruby-text
5170 (package
5171 (name "ruby-text")
5172 (version "1.3.1")
5173 (source (origin
5174 (method url-fetch)
5175 (uri (rubygems-uri "text" version))
5176 (sha256
5177 (base32
5178 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
5179 (build-system ruby-build-system)
5180 (synopsis "Collection of text algorithms for Ruby")
5181 (description
5182 "This package provides a collection of text algorithms: Levenshtein,
5183Soundex, Metaphone, Double Metaphone, Porter Stemming.")
5184 (home-page "https://github.com/threedaymonk/text")
5185 (license license:expat)))
5186
5187(define-public ruby-gdbm
5188 (package
5189 (name "ruby-gdbm")
5190 (version "2.1.0")
5191 (source
5192 (origin
5193 (method url-fetch)
5194 (uri (rubygems-uri "gdbm" version))
5195 (sha256
5196 (base32 "0xxygf50b2fvy8lcn2vip27vq32p607d3lwd1diplvkajijq8q8b"))))
5197 (build-system ruby-build-system)
5198 (arguments '(#:tests? #f)) ; No bundled tests.
5199 (inputs (list gdbm))
5200 (synopsis "Ruby extension for GNU dbm")
5201 (description "This package provides a Ruby extension for GNU dbm.")
5202 (home-page "https://github.com/ruby/gdbm")
5203 (license license:bsd-2)))
5204
5205(define-public ruby-gettext
5206 (package
5207 (name "ruby-gettext")
5208 (version "3.4.4")
5209 (source (origin
5210 (method url-fetch)
5211 (uri (rubygems-uri "gettext" version))
5212 (sha256
5213 (base32
5214 "11hlxkk2yr9wjwd3nf8kgmsjcd8wf35yqlxi9wpvrgmvrk9n9a2k"))))
5215 (build-system ruby-build-system)
5216 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5217 ;; which needs ruby-gettext. To break the dependency cycle we disable
5218 ;; tests.
5219 (arguments `(#:tests? #f))
5220 (propagated-inputs
5221 (list ruby-locale ruby-text ruby-erubi))
5222 (native-inputs
5223 (list bundler ruby-yard/minimal))
5224 (synopsis "GNU gettext-like program for Ruby")
5225 (description
5226 "Gettext is a GNU gettext-like program for Ruby. The catalog
5227file (po-file) used is the same as that used by GNU gettext, allowing you to
5228use GNU gettext tools for maintenance.")
5229 (home-page "https://ruby-gettext.github.com/")
5230 (license (list license:lgpl3+ license:ruby))))
5231
5232(define-public ruby-packnga
5233 (package
5234 (name "ruby-packnga")
5235 (version "1.0.4")
5236 (source (origin
5237 (method url-fetch)
5238 (uri (rubygems-uri "packnga" version))
5239 (sha256
5240 (base32
5241 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
5242 (build-system ruby-build-system)
5243 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
5244 ;; To break the dependency cycle we disable tests.
5245 (arguments `(#:tests? #f))
5246 (propagated-inputs
5247 (list ruby-gettext ruby-yard))
5248 (native-inputs
5249 (list bundler))
5250 (synopsis "Utility library to package internationalized libraries")
5251 (description
5252 "Packnga is a library to translate to many languages using YARD.")
5253 (home-page "https://ranguba.org/packnga/")
5254 (license license:lgpl2.0+)))
5255
5256(define-public ruby-test-construct
5257 (let ((commit "43933e84e63bba2b44bc020d8c8fb78ce8597ac3")
5258 (revision "0"))
5259 (package
5260 (name "ruby-test-construct")
5261 (version (git-version "2.0.2" revision commit))
5262 (source
5263 (origin
5264 (method git-fetch)
5265 (uri (git-reference
5266 (url "https://github.com/bhb/test_construct")
5267 (commit commit)))
5268 (file-name (git-file-name name version))
5269 (sha256
5270 (base32 "0gif8sap3npvsn4jrppr16jqig8icafk60p74ankhjwrjycccfza"))))
5271 (build-system ruby-build-system)
5272 (native-inputs
5273 (list bundler ruby-mocha ruby-rspec))
5274 (synopsis "Creates temporary files and directories for testing")
5275 (description
5276 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
5277temporary files and directories during tests.")
5278 (home-page "https://github.com/bhb/test_construct")
5279 (license license:expat))))
5280
5281(define-public ruby-test-unit
5282 (package
5283 (name "ruby-test-unit")
5284 (version "3.7.8")
5285 (source (origin
5286 (method git-fetch) ;for tests
5287 (uri (git-reference
5288 (url "https://github.com/test-unit/test-unit")
5289 (commit version)))
5290 (file-name (git-file-name name version))
5291 (sha256
5292 (base32
5293 "0a5p6l8y6gbrsm4wfjnl6h3a944n8w875znf6n3k37d997fllxia"))))
5294 (build-system ruby-build-system)
5295 (arguments
5296 (list
5297 #:phases
5298 #~(modify-phases %standard-phases
5299 ;; This avoids requiring extra dependencies in Rakefile.
5300 (replace 'check
5301 (lambda* (#:key tests? #:allow-other-keys)
5302 (when tests?
5303 (invoke "ruby" "test/run.rb")))))))
5304 (propagated-inputs
5305 (list ruby-power-assert))
5306 (synopsis "Unit testing framework for Ruby")
5307 (description "@code{Test::Unit} is unit testing framework for Ruby, based
5308on xUnit principles. These were originally designed by Kent Beck, creator of
5309extreme programming software development methodology, for Smalltalk's SUnit.
5310It allows writing tests, checking results and automated testing in Ruby.")
5311 (home-page "https://test-unit.github.io/")
5312 (license (list license:psfl license:ruby))))
5313
5314(define-public ruby-test-unit-ruby-core
5315 (package
5316 (name "ruby-test-unit-ruby-core")
5317 (version "1.0.5")
5318 (source
5319 (origin
5320 (method url-fetch)
5321 (uri (rubygems-uri "test-unit-ruby-core" version))
5322 (sha256
5323 (base32 "1i7fa4hlj6xiqvjaikagwrmiyc21jzyswvd4grjbfqysziwsxygc"))))
5324 (build-system ruby-build-system)
5325 (arguments
5326 (list #:tests? #f)) ; contains no tests
5327 (synopsis "Additional test assertions for Ruby standard libraries")
5328 (description "This package provides additional test assertions for Ruby
5329standard libraries.")
5330 (home-page "https://github.com/ruby/test-unit-ruby-core")
5331 (license license:ruby)))
5332
5333(define-public ruby-mapping
5334 (package
5335 (name "ruby-mapping")
5336 (version "1.1.1")
5337 (source (origin
5338 (method git-fetch) ;for tests
5339 (uri (git-reference
5340 (url "https://github.com/ioquatix/mapping")
5341 (commit (string-append "v" version))))
5342 (file-name (git-file-name name version))
5343 (sha256
5344 (base32
5345 "0yhmqp8mprjqf9m7wzc4hhi50qbfax86r89w852csns0ijaffjjs"))))
5346 (build-system ruby-build-system)
5347 (arguments
5348 (list
5349 #:test-target "spec"
5350 #:phases
5351 #~(modify-phases %standard-phases
5352 (add-after 'unpack 'patch
5353 (lambda _
5354 (substitute* "spec/mapping/model_spec.rb"
5355 ;; From https://github.com/ioquatix/mapping/pull/2
5356 (("offset:") "offset =")))))))
5357 (native-inputs (list ruby-rspec))
5358 (synopsis "Map model objects based on their class to a given output model")
5359 (description "The @code{mapping} gem maps model objects based on their
5360class to a given output model. It is useful for versioning external
5361interfaces (e.g. JSON APIs) or processing structured data from one format to
5362another.")
5363 (home-page "https://github.com/ioquatix/mapping")
5364 (license license:expat)))
5365
5366(define-public ruby-markaby
5367 (package
5368 (name "ruby-markaby")
5369 (version "0.9.4")
5370 (source
5371 (origin
5372 (method url-fetch)
5373 (uri (rubygems-uri "markaby" version))
5374 (sha256
5375 (base32
5376 "1vizqpa9pks5nlqj0jjx2d1q6f9vfmjjbb774v1kp591pq5nhmcm"))))
5377 (build-system ruby-build-system)
5378 (arguments
5379 (list
5380 #:phases
5381 #~(modify-phases %standard-phases
5382 ;; Run rspec manually without using the Rakefile, as the versions of
5383 ;; Rake and RSpec 2 are incompatible:
5384 ;;
5385 ;; NoMethodError: undefined method `last_comment'
5386 (replace 'check
5387 (lambda* (#:key tests? #:allow-other-keys)
5388 ;; Skip some broken tests, this should be redundant with the
5389 ;; next release
5390 (delete-file "spec/markaby/markaby_test_unit_spec.rb")
5391 (substitute* "spec/markaby/markaby_spec.rb"
5392 (("generated.should == str")
5393 "# Test broken: generated.should == str"))
5394
5395 (when tests?
5396 (invoke "rspec")))))))
5397 (propagated-inputs
5398 (list ruby-builder))
5399 (native-inputs
5400 (list bundler ruby-rspec-2))
5401 (synopsis "Write HTML pages in pure Ruby")
5402 (description
5403 "Markaby allows writing HTML packages in pure Ruby. This is similar to
5404the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
5405mixture of HTML and additional ERB syntax.")
5406 (home-page "https://markaby.github.io/")
5407 (license license:expat)))
5408
5409(define-public ruby-maruku
5410 (package
5411 (name "ruby-maruku")
5412 (version "0.7.3")
5413 (source
5414 (origin
5415 (method url-fetch)
5416 (uri (rubygems-uri "maruku" version))
5417 (sha256
5418 (base32
5419 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
5420 (build-system ruby-build-system)
5421 (arguments
5422 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
5423 #:tests? #f
5424 #:phases
5425 (modify-phases %standard-phases
5426 (replace 'check
5427 (lambda* (#:key tests? #:allow-other-keys)
5428 (when tests?
5429 (invoke "rspec")))))))
5430 (native-inputs
5431 (list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
5432 (synopsis "Markdown interpreter in Ruby")
5433 (description
5434 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
5435HTML, and PDF through LaTeX.")
5436 (home-page "https://github.com/bhollis/maruku")
5437 (license license:expat)))
5438
5439(define-public ruby-metaclass
5440 (package
5441 (name "ruby-metaclass")
5442 (version "0.0.4")
5443 (source (origin
5444 (method url-fetch)
5445 (uri (rubygems-uri "metaclass" version))
5446 (sha256
5447 (base32
5448 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
5449 (build-system ruby-build-system)
5450 (arguments
5451 `(#:phases
5452 (modify-phases %standard-phases
5453 (add-after 'unpack 'add-test-unit-to-search-path
5454 (lambda* (#:key inputs #:allow-other-keys)
5455 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
5456 (substitute* "Rakefile"
5457 (("t\\.libs << \"test\"" line)
5458 (string-append line "; t.libs << \""
5459 test-unit "/lib/ruby/vendor_ruby"
5460 "/gems/test-unit-"
5461 ,(package-version ruby-test-unit)
5462 "/lib\"")))))))))
5463 (native-inputs
5464 (list bundler ruby-test-unit))
5465 (synopsis "Ruby library adding metaclass method to all objects")
5466 (description
5467 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
5468objects.")
5469 (home-page "https://github.com/floehopper/metaclass")
5470 (license license:expat)))
5471
5472(define-public ruby-mkmf-lite
5473 (package
5474 (name "ruby-mkmf-lite")
5475 (version "0.5.2")
5476 (source (origin
5477 (method url-fetch)
5478 (uri (rubygems-uri "mkmf-lite" version))
5479 (sha256
5480 (base32
5481 "0rqa5kzswhqkj7r9mqrqz4mjd2vdxsblgybb52gj3mwr1gwvl4c5"))))
5482 (build-system ruby-build-system)
5483 (arguments
5484 (list
5485 #:phases
5486 #~(modify-phases %standard-phases
5487 ;; Avoid rubocop dependency
5488 (replace 'check
5489 (lambda* (#:key tests? #:allow-other-keys)
5490 (when tests?
5491 (invoke "rspec")))))))
5492 (propagated-inputs
5493 (list ruby-ptools))
5494 (native-inputs
5495 (list ruby-rspec))
5496 (synopsis "Lightweight alternative to @code{mkmf}")
5497 (description
5498 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
5499for use as a library. It does not create packages, builds, or log files of
5500any kind. Instead, it provides mixin methods that you can use in FFI or tests
5501to check for the presence of header files, constants, and so on.")
5502 (home-page "https://github.com/djberg96/mkmf-lite")
5503 (license license:asl2.0)))
5504
5505(define-public ruby-msgpack
5506 (package
5507 (name "ruby-msgpack")
5508 (version "1.8.4")
5509 (source (origin
5510 (method git-fetch) ;for tests
5511 (uri (git-reference
5512 (url "https://github.com/msgpack/msgpack-ruby")
5513 (commit (string-append "v" version))))
5514 (file-name (git-file-name name version))
5515 (sha256
5516 (base32
5517 "1cbv9xkfgsvzygmhfihfbb939wgvzkqdl7vsb6y1alhqwbk6n4jq"))))
5518 (build-system ruby-build-system)
5519 (arguments (list #:test-target "spec"))
5520 (native-inputs
5521 (list ruby-rake-compiler
5522 ruby-ruby-memcheck
5523 ruby-rspec
5524 ruby-yard))
5525 (synopsis "Efficient object serialization library for Ruby")
5526 (description "MessagePack is a binary-based efficient object serialization
5527library. It enables to exchange structured objects between many languages
5528like JSON. Unlike JSON, it is very fast and small.")
5529 (home-page "https://msgpack.org/")
5530 (license license:asl2.0)))
5531
5532(define-public ruby-mspec
5533 (package
5534 (name "ruby-mspec")
5535 (version "1.9.1")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (rubygems-uri "mspec" version))
5540 (sha256
5541 (base32
5542 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
5543 (build-system ruby-build-system)
5544 (arguments
5545 '(;; TODO: 3 test failures
5546 ;; ./spec/mocks/mock_spec.rb:82
5547 ;; ./spec/utils/name_map_spec.rb:151
5548 ;; ./spec/utils/name_map_spec.rb:155
5549 #:tests? #f
5550 #:phases
5551 (modify-phases %standard-phases
5552 (add-after 'extract-gemspec 'change-dependency-constraints
5553 (lambda _
5554 (substitute* "mspec.gemspec"
5555 (("rake.*") "rake>)\n")
5556 (("rspec.*") "rspec>)\n"))))
5557 (replace 'check
5558 (lambda* (#:key tests? #:allow-other-keys)
5559 (when tests?
5560 (invoke "rspec" "spec")))))))
5561 (native-inputs
5562 (list bundler ruby-rake ruby-rspec))
5563 (synopsis "MSpec is a specialized framework for RubySpec")
5564 (description
5565 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
5566for basic features. MSpec contains additional features that assist in writing
5567specs for Ruby implementations in ruby/spec.")
5568 (home-page "http://rubyspec.org")
5569 (license license:expat)))
5570
5571(define-public ruby-mysql2
5572 (package
5573 (name "ruby-mysql2")
5574 (version "0.5.6")
5575 (source
5576 (origin
5577 (method git-fetch)
5578 (uri (git-reference
5579 (url "https://github.com/brianmario/mysql2")
5580 (commit version)))
5581 (file-name (git-file-name name version))
5582 (sha256
5583 (base32
5584 "0m68qykz94l2frqc05nfhkls7rmmq8nss2xajz8j8p8n7xahhscb"))))
5585 (build-system ruby-build-system)
5586 (arguments
5587 '(;; TODO: Tests require a running MySQL/MariaDB service
5588 #:tests? #f
5589 #:phases
5590 (modify-phases %standard-phases
5591 (replace 'replace-git-ls-files
5592 (lambda _
5593 (substitute* "mysql2.gemspec"
5594 (("git ls-files .*`") "find . -type f |sort`"))))
5595 (add-before 'install 'set-MAKEFLAGS
5596 (lambda* (#:key outputs #:allow-other-keys)
5597 (setenv "MAKEFLAGS"
5598 (string-append
5599 "V=1 "
5600 "prefix=" (assoc-ref outputs "out")))))
5601 ;; Move the 'check phase to after 'install, as then you can test
5602 ;; using the installed mysql2 gem in the store.
5603 (delete 'check)
5604 (add-after 'install 'check
5605 (lambda* (#:key outputs tests? #:allow-other-keys)
5606 (setenv "GEM_PATH"
5607 (string-append
5608 (getenv "GEM_PATH")
5609 ":"
5610 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
5611 (when tests?
5612 (invoke "rspec")))))))
5613 (inputs
5614 `(("mariadb-dev" ,mariadb "dev")
5615 ("zlib" ,zlib)))
5616 (native-inputs
5617 (list ruby-rspec ruby-rake-compiler))
5618 (synopsis "MySQL library for Ruby, binding to libmysql")
5619 (description
5620 "This package provides a simple, fast MySQL library for Ruby, binding to
5621libmysql.")
5622 (home-page "https://github.com/brianmario/mysql2")
5623 (license license:expat)))
5624
5625(define-public ruby-blankslate
5626 (package
5627 (name "ruby-blankslate")
5628 (version "3.1.3")
5629 (source (origin
5630 (method url-fetch)
5631 (uri (rubygems-uri "blankslate" version))
5632 (sha256
5633 (base32
5634 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
5635 (build-system ruby-build-system)
5636 (arguments
5637 `(#:phases
5638 (modify-phases %standard-phases
5639 (replace 'check
5640 (lambda _ (invoke "rspec" "spec/"))))))
5641 (native-inputs
5642 (list bundler ruby-rspec))
5643 (synopsis "Abstract base class with no predefined methods")
5644 (description
5645 "BlankSlate provides an abstract base class with no predefined
5646methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
5647as a base class when writing classes that depend upon
5648@code{method_missing} (e.g. dynamic proxies).")
5649 (home-page "https://github.com/masover/blankslate")
5650 (license license:expat)))
5651
5652(define-public ruby-bond
5653 (package
5654 (name "ruby-bond")
5655 (version "0.5.1")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (rubygems-uri "bond" version))
5660 (sha256
5661 (base32
5662 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
5663 (build-system ruby-build-system)
5664 (arguments
5665 ;; The test suite fails (see:
5666 ;; https://github.com/cldwalker/bond/issues/46).
5667 `(#:tests? #f))
5668 (native-inputs
5669 (list ruby-bacon ruby-bacon-bits ruby-mocha-on-bacon))
5670 (synopsis "Bond can provide custom autocompletion for arguments, methods
5671and more")
5672 (description
5673 "Bond can autocomplete argument(s) to methods, uniquely completing per
5674module, per method and per argument. Bond provides a configuration system and
5675a DSL for creating custom completions and completion rules. Bond can also
5676load completions that ship with gems. Bond is able to offer more than irb's
5677completion since it uses the full line of input when completing as opposed to
5678irb's last-word approach.")
5679 (home-page "http://tagaholic.me/bond/")
5680 (license license:expat)))
5681
5682(define-public ruby-idn-ruby
5683 (package
5684 (name "ruby-idn-ruby")
5685 (version "0.1.0")
5686 (source
5687 (origin
5688 (method url-fetch)
5689 (uri (rubygems-uri "idn-ruby" version))
5690 (sha256
5691 (base32
5692 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
5693 (build-system ruby-build-system)
5694 (arguments
5695 '(#:phases
5696 (modify-phases %standard-phases
5697 (delete 'check)
5698 (add-after 'install 'check
5699 (lambda* (#:key tests? outputs #:allow-other-keys)
5700 (when tests?
5701 (let* ((gem-file (cadr (find-files "." "\\.gem")))
5702 (name-and-version (basename gem-file ".gem")))
5703 (apply invoke
5704 "ruby" "--verbose"
5705 (string-append "-I"
5706 (assoc-ref outputs "out")
5707 "/lib/ruby/vendor_ruby/gems/"
5708 name-and-version
5709 "/lib")
5710 (find-files "./test" ".*\\.rb")))))))))
5711 (inputs
5712 (list libidn))
5713 (synopsis "Ruby Bindings for the GNU LibIDN library")
5714 (description
5715 "Ruby Bindings for the GNU LibIDN library, an implementation of the
5716Stringprep, Punycode and IDNA specifications. These are used to encode and
5717decode internationalized domain + names according to the IDNA2003
5718specifications.
5719
5720Included are the most important parts of the Stringprep, Punycode and IDNA
5721APIs like performing Stringprep processings, encoding to and decoding from
5722Punycode strings and converting entire domain names to and from the ACE
5723encoded form.")
5724 (home-page "https://github.com/deepfryed/idn-ruby")
5725 (license license:asl2.0)))
5726
5727(define-public ruby-insist
5728 (package
5729 (name "ruby-insist")
5730 (version "1.0.0")
5731 (source
5732 (origin
5733 (method url-fetch)
5734 (uri (rubygems-uri "insist" version))
5735 (sha256
5736 (base32 "0bw3bdwns14mapbgb8cbjmr0amvwz8y72gyclq04xp43wpp5jrvg"))))
5737 (build-system ruby-build-system)
5738 (arguments
5739 (list
5740 #:phases
5741 #~(modify-phases %standard-phases
5742 (add-after 'unpack 'patch-minitest
5743 (lambda _
5744 (substitute* "test/testing.rb"
5745 (("MiniTest")
5746 "Minitest"))))
5747 (replace 'check
5748 (lambda* (#:key tests? #:allow-other-keys)
5749 (when tests?
5750 (invoke "ruby" "test/testing.rb")))))))
5751 (synopsis "Testing tool for Ruby")
5752 (description
5753 "This package provides a simple block-driven assertion
5754library for both testing and for production code that attempts to make test
5755definitions more readable.")
5756 (home-page "https://github.com/jordansissel/ruby-insist/")
5757 (license license:asl2.0)))
5758
5759(define-public ruby-introspection
5760 (package
5761 (name "ruby-introspection")
5762 (version "0.0.4")
5763 (source (origin
5764 (method url-fetch)
5765 (uri (rubygems-uri "introspection" version))
5766 (sha256
5767 (base32
5768 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
5769 (build-system ruby-build-system)
5770 (propagated-inputs
5771 (list ruby-metaclass))
5772 (native-inputs
5773 (list bundler
5774 ruby-blankslate))
5775 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
5776 (description
5777 "Introspection provides tools to inspect the hierarchy of method
5778definitions on a Ruby object.")
5779 (home-page "https://github.com/floehopper/introspection")
5780 (license license:expat)))
5781
5782(define-public ruby-redcarpet
5783 (package
5784 (name "ruby-redcarpet")
5785 (version "3.6.1")
5786 (source (origin
5787 (method git-fetch) ;for tests
5788 (uri (git-reference
5789 (url "https://github.com/vmg/redcarpet")
5790 (commit (string-append "v" version))))
5791 (file-name (git-file-name name version))
5792 (sha256
5793 (base32
5794 "0xb0lqpyrkhb078cwqng67szfa31vlhxsazz3nym0na6dgdj5s3r"))))
5795 (build-system ruby-build-system)
5796 (native-inputs
5797 (list ruby-test-unit ruby-rake-compiler perl tidy-html))
5798 (synopsis "Extensible Markdown to (X)HTML converter")
5799 (description
5800 "Redcarpet is an extensible Ruby library for Markdown processing and
5801conversion to (X)HTML.")
5802 (home-page "https://github.com/vmg/redcarpet")
5803 (license license:expat)))
5804
5805(define-public ruby-reline
5806 (package
5807 (name "ruby-reline")
5808 (version "0.3.3")
5809 (source (origin
5810 (method git-fetch) ;for tests
5811 (uri (git-reference
5812 (url "https://github.com/ruby/reline")
5813 (commit (string-append "v" version))))
5814 (file-name (git-file-name name version))
5815 (sha256
5816 (base32
5817 "1papa4f4prjml9qk6yydi4k5a4zgbzmxmbhd8fz9kfg1i34s35cw"))))
5818 (build-system ruby-build-system)
5819 (propagated-inputs (list ruby-io-console))
5820 (synopsis "GNU Readline or Editline implementation in Ruby")
5821 (description "Reline is a pure Ruby alternative GNU Readline or Editline
5822implementation.")
5823 (home-page "https://github.com/ruby/reline")
5824 (license (list license:bsd-2 license:ruby)))) ;dual license
5825
5826(define-public ruby-rerun
5827 (package
5828 (name "ruby-rerun")
5829 (version "0.13.0")
5830 (source
5831 (origin
5832 (method url-fetch)
5833 (uri (rubygems-uri "rerun" version))
5834 (sha256
5835 (base32
5836 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
5837 (build-system ruby-build-system)
5838 (arguments
5839 '(#:tests? #f)) ; No included tests
5840 (propagated-inputs
5841 (list ruby-listen))
5842 (synopsis "Run a process, and restart when some monitored files change")
5843 (description
5844 "Rerun is a tool to launch programs, then monitor the file system, and
5845restart the program when any of the monitored files change. It's written in
5846Ruby, but can be used for all programs.")
5847 (home-page "https://github.com/alexch/rerun/")
5848 (license license:expat)))
5849
5850(define-public ruby-maxitest
5851 (package
5852 (name "ruby-maxitest")
5853 (version "6.0.0")
5854 (home-page "https://github.com/grosser/maxitest")
5855 (source (origin
5856 ;; Pull from git because the gem does not contain tests.
5857 (method git-fetch)
5858 (uri (git-reference
5859 (url home-page)
5860 (commit (string-append "v" version))))
5861 (file-name (git-file-name name version))
5862 (sha256
5863 (base32
5864 "08wwcjlq0gnzfpmf9jxs28x31d62xvx0gbvwrfr923mcn30myxrd"))))
5865 (build-system ruby-build-system)
5866 (arguments
5867 (list
5868 #:test-target "default"
5869 #:phases
5870 #~(modify-phases %standard-phases
5871 ;; Warnings make 2 tests fail. Add mutex-m in Gemfile to avoid them.
5872 (add-after 'unpack 'add-mutex-m
5873 (lambda _
5874 (substitute* "Gemfile"
5875 (("^gem \"bump\".*" all)
5876 (string-append all "gem \"mutex_m\"\n")))))
5877 (replace 'replace-git-ls-files
5878 (lambda _
5879 (substitute* "maxitest.gemspec"
5880 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
5881 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))))
5882 (add-before 'check 'remove-version-constraints
5883 (lambda _
5884 ;; Don't use specific versions of dependencies, instead
5885 ;; take whatever is available in Guix.
5886 (delete-file "Gemfile.lock")))
5887 (add-before 'check 'add-mtest-on-PATH
5888 (lambda _
5889 ;; Tests use 'mtest' which is not automatically added on
5890 ;; PATH.
5891 (setenv "PATH" (string-append (getcwd) "/bin:"
5892 (getenv "PATH"))))))))
5893 (native-inputs
5894 (list procps
5895 ruby-bump
5896 ruby-mutex-m
5897 ruby-rspec
5898 ruby-wwtd))
5899 (propagated-inputs
5900 (list ruby-minitest))
5901 (synopsis "Minitest with extra features")
5902 (description
5903 "Maxitest is a wrapper around Minitest with extra functionality such
5904as timeouts, an @command{mtest} executable that can run tests by line
5905number, support for interrupted tests, better backtraces, and more.")
5906 (license license:expat)))
5907
5908(define-public ruby-mocha
5909 (package
5910 (name "ruby-mocha")
5911 (version "2.1.0")
5912 (source (origin
5913 (method url-fetch)
5914 (uri (rubygems-uri "mocha" version))
5915 (sha256
5916 (base32
5917 "0lsll8iba8612dypk718l9kx73m9syiscb2rhciljys1krc5g1zr"))))
5918 (build-system ruby-build-system)
5919 (arguments
5920 (list
5921 #:phases
5922 #~(modify-phases %standard-phases
5923 (add-before 'check 'remove-rubocop-dependency
5924 (lambda _
5925 ;; Disable dependency on Rubocop, which is just a linter,
5926 ;; and would introduce a circular dependency.
5927 (substitute* "Gemfile"
5928 ((".*rubocop.*") "")))))))
5929 (propagated-inputs
5930 (list ruby-ruby2-keywords))
5931 (native-inputs
5932 (list ruby-psych-3
5933 ruby-introspection))
5934 (synopsis "Mocking and stubbing library for Ruby")
5935 (description
5936 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
5937allows mocking and stubbing of methods on real (non-mock) classes.")
5938 (home-page "https://mocha.jamesmead.org/")
5939 ;; Mocha can be used with either license at the users choice.
5940 (license (list license:expat license:ruby))))
5941
5942(define-public ruby-mocha-on-bacon
5943 (package
5944 (name "ruby-mocha-on-bacon")
5945 (version "0.2.3")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (rubygems-uri "mocha-on-bacon" version))
5950 (sha256
5951 (base32
5952 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
5953 (build-system ruby-build-system)
5954 (arguments
5955 ;; rubygems.org release missing tests
5956 '(#:tests? #f))
5957 (propagated-inputs (list ruby-mocha))
5958 (synopsis "Mocha adapter for Bacon")
5959 (description
5960 "This package provides a Mocha adapter for Bacon, allowing you to use the
5961Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
5962 (home-page
5963 "https://github.com/alloy/mocha-on-bacon")
5964 (license license:expat)))
5965
5966(define-public ruby-net-ssh
5967 (package
5968 (name "ruby-net-ssh")
5969 (version "7.1.0")
5970 (source (origin
5971 (method git-fetch) ;for tests
5972 (uri (git-reference
5973 (url "https://github.com/net-ssh/net-ssh")
5974 (commit (string-append "v" version))))
5975 (file-name (git-file-name name version))
5976 (sha256
5977 (base32
5978 "1dkbyzpl31jygnnva5sa754vk42q1fih4qz5ipqw5gqiafrrlb91"))))
5979 (build-system ruby-build-system)
5980 (native-inputs
5981 (list bundler
5982 ruby-bcrypt-pbkdf
5983 ruby-ed25519
5984 ruby-mocha
5985 ruby-rbnacl
5986 ruby-test-unit
5987 ruby-x25519))
5988 (synopsis "Ruby implementation of the SSH2 client protocol")
5989 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
5990client protocol. It allows you to write programs that invoke and interact
5991with processes on remote servers, via SSH2.")
5992 (home-page "https://github.com/net-ssh/net-ssh")
5993 (license license:expat)))
5994
5995(define-public ruby-net-scp
5996 (package
5997 (name "ruby-net-scp")
5998 (version "4.1.0")
5999 (source
6000 (origin
6001 (method git-fetch)
6002 (uri (git-reference
6003 (url "https://github.com/net-ssh/net-scp")
6004 (commit (string-append "v" version))))
6005 (file-name (git-file-name name version))
6006 (sha256
6007 (base32 "0v512gbsapdwbdsm8vxn1mz521gbab71r2bx5khccvjgb3rbw8fp"))))
6008 (build-system ruby-build-system)
6009 (native-inputs
6010 (list bundler ruby-test-unit ruby-mocha))
6011 (propagated-inputs
6012 (list ruby-net-ssh))
6013 (synopsis "Pure-Ruby SCP client library")
6014 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
6015client protocol.")
6016 (home-page "https://github.com/net-ssh/net-scp")
6017 (license license:expat)))
6018
6019(define-public ruby-net-sftp
6020 (package
6021 (name "ruby-net-sftp")
6022 (version "4.0.0")
6023 (source (origin
6024 (method url-fetch)
6025 (uri (rubygems-uri "net-sftp" version))
6026 (sha256
6027 (base32
6028 "0r33aa2d61hv1psm0l0mm6ik3ycsnq8symv7h84kpyf2b7493fv5"))))
6029 (build-system ruby-build-system)
6030 (propagated-inputs (list ruby-net-ssh))
6031 (synopsis "Pure Ruby implementation of the SFTP client protocol")
6032 (description
6033 "@code{Net::SFTP} is a pure Ruby implementation of the SFTP
6034protocol (specifically, versions 1 through 6 of the SFTP protocol). Note that
6035this is the “Secure File Transfer Protocol”, typically run over an SSH
6036connection, and has nothing to do with the FTP protocol.")
6037 (home-page "https://github.com/net-ssh/net-sftp")
6038 (license license:expat)))
6039
6040(define-public ruby-minima
6041 (package
6042 (name "ruby-minima")
6043 (version "2.5.1")
6044 (source (origin
6045 (method url-fetch)
6046 (uri (rubygems-uri "minima" version))
6047 (sha256
6048 (base32
6049 "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"))))
6050 (arguments
6051 (list #:phases #~(modify-phases %standard-phases
6052 (replace 'check
6053 (lambda* (#:key tests? #:allow-other-keys)
6054 (when tests?
6055 (invoke "jekyll" "build"))
6056 ;; Without the following, an attempt to remove
6057 ;; minima-<version>.gem is made during installation,
6058 ;; which will fail.
6059 (delete-file #$(string-append "_site/minima-"
6060 version ".gem")))))))
6061 (build-system ruby-build-system)
6062 (propagated-inputs (list jekyll ruby-jekyll-feed ruby-jekyll-seo-tag))
6063 (synopsis "Beautiful, minimal theme for Jekyll")
6064 (description
6065 "Minima is a one-size-fits-all Jekyll theme for writers. It's Jekyll's
6066default (and first) theme. It's what you get when you run @code{jekyll new}.")
6067 (home-page "https://github.com/jekyll/minima")
6068 (license license:expat)))
6069
6070(define-public ruby-minitest-around
6071 (package
6072 (name "ruby-minitest-around")
6073 (version "0.5.0")
6074 (source
6075 (origin
6076 (method url-fetch)
6077 (uri (rubygems-uri "minitest-around" version))
6078 (sha256
6079 (base32
6080 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
6081 (build-system ruby-build-system)
6082 (arguments
6083 '(#:phases
6084 (modify-phases %standard-phases
6085 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
6086 (lambda _
6087 (substitute* "minitest-around.gemspec"
6088 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n")))))))
6089 (propagated-inputs
6090 (list ruby-minitest))
6091 (native-inputs
6092 (list bundler ruby-cucumber ruby-bump ruby-test-construct))
6093 (synopsis "Run code around tests in Minitest")
6094 (description
6095 "This library provides a way to run code around tests in Minitest,
6096written using either the unit test or spec style.")
6097 (home-page "https://github.com/splattael/minitest-around")
6098 (license license:expat)))
6099
6100(define-public ruby-minitest-retry
6101 (package
6102 (name "ruby-minitest-retry")
6103 (version "0.2.2")
6104 (source (origin
6105 (method url-fetch)
6106 (uri (rubygems-uri "minitest-retry" version))
6107 (sha256
6108 (base32
6109 "1c1zq0b1a9y0hbqphq4ybijnjldlis1g6kyhx92q2ynnqfmzhfga"))))
6110 (build-system ruby-build-system)
6111 (propagated-inputs (list ruby-minitest))
6112 (synopsis "Minitest extension to re-run failing tests")
6113 (description "This package provides the @code{Minitest::Retry} class,
6114which extends Minitest to allow retrying tests when they fail.")
6115 (home-page "https://github.com/y-yagi/minitest-retry")
6116 (license license:expat)))
6117
6118(define-public ruby-minitest-sprint
6119 (package
6120 (name "ruby-minitest-sprint")
6121 (version "1.1.0")
6122 (source (origin
6123 (method url-fetch)
6124 (uri (rubygems-uri "minitest-sprint" version))
6125 (sha256
6126 (base32
6127 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
6128 (build-system ruby-build-system)
6129 (native-inputs
6130 (list ruby-hoe ruby-minitest))
6131 (synopsis "Fast test suite runner for minitest")
6132 (description "Minitest-sprint is a test runner for minitest that makes it
6133easier to re-run individual failing tests.")
6134 (home-page "https://github.com/seattlerb/minitest-sprint")
6135 (license license:expat)))
6136
6137(define-public ruby-minitest-stub-const
6138 ;; XXX: Minitest update unreleased.
6139 (let ((commit "dbcaa18249e48a4b0efa8b09f01a2b111db800e0")
6140 (revision "0"))
6141 (package
6142 (name "ruby-minitest-stub-const")
6143 (version (git-version "0.6" revision commit)) ;for Rakefile
6144 (source
6145 (origin
6146 (method git-fetch)
6147 (uri (git-reference
6148 (url "https://github.com/adammck/minitest-stub-const")
6149 (commit commit)))
6150 (file-name (git-file-name name version))
6151 (sha256
6152 (base32 "08avrpvk8yj1f6x1m8bcq7gdf08x1zcx9iamjysxnalrpwnw5lh6"))))
6153 (build-system ruby-build-system)
6154 (synopsis "Stub constants for the duration of a block in MiniTest")
6155 (description
6156 "This package provides a MiniTest extension to stub constants for the
6157duration of a block in MiniTest.")
6158 (home-page "https://github.com/adammck/minitest-stub-const")
6159 (license license:expat))))
6160
6161(define-public ruby-minitest-bacon
6162 (package
6163 (name "ruby-minitest-bacon")
6164 (version "1.0.3")
6165 (source (origin
6166 (method url-fetch)
6167 (uri (rubygems-uri "minitest-bacon" version))
6168 (sha256
6169 (base32
6170 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
6171 (build-system ruby-build-system)
6172 (native-inputs
6173 (list ruby-hoe))
6174 (inputs
6175 (list ruby-minitest))
6176 (synopsis "Bacon compatibility library for minitest")
6177 (description "Minitest-bacon extends minitest with bacon-like
6178functionality, making it easier to migrate test suites from bacon to minitest.")
6179 (home-page "https://github.com/seattlerb/minitest-bacon")
6180 (license license:expat)))
6181
6182(define-public ruby-minitest-power-assert
6183 (package
6184 (name "ruby-minitest-power-assert")
6185 (version "0.3.1")
6186 (source (origin
6187 (method url-fetch)
6188 (uri (rubygems-uri "minitest-power_assert" version))
6189 (sha256
6190 (base32
6191 "1dazl6nbxjvvmi5jamrsygkz396s29b7cd841ni6qy4izk8jd9b7"))))
6192 (build-system ruby-build-system)
6193 (propagated-inputs (list ruby-minitest ruby-power-assert))
6194 (synopsis "Power Assert implementation for Minitest")
6195 (description "This gem provides a Power Assert implementation for
6196Minitest. It is inspired by the @code{test-unit-power_assert} gem.")
6197 (home-page "https://github.com/hsbt/minitest-power_assert")
6198 (license license:bsd-2)))
6199
6200(define-public ruby-minitest-profile
6201 (package
6202 (name "ruby-minitest-profile")
6203 (version "0.0.2")
6204 (source (origin
6205 (method url-fetch)
6206 (uri (rubygems-uri "minitest-profile" version))
6207 (sha256
6208 (base32
6209 "13h4nwbq6yv7hsaa7dpj90lry4rc5qqnpzvm9n2s57mm2xi31xfa"))))
6210 (build-system ruby-build-system)
6211 (synopsis "Display the slowest tests in a MiniTest suite")
6212 (description "This package provides a MiniTest plugin for displaying the
6213slowest tests in a minitest suite.")
6214 (home-page "https://github.com/nmeans/minitest-profile")
6215 (license license:expat)))
6216
6217(define-public ruby-minitest-proveit
6218 (package
6219 (name "ruby-minitest-proveit")
6220 (version "1.0.0")
6221 (source (origin
6222 (method url-fetch)
6223 (uri (rubygems-uri "minitest-proveit" version))
6224 (sha256
6225 (base32
6226 "0k1hpr8lgkgygfivgcsnnib7xjlf9ribgpn7yidvb4q0l0q2yfmr"))))
6227 (build-system ruby-build-system)
6228 (native-inputs (list ruby-hoe))
6229 (propagated-inputs (list ruby-minitest))
6230 (synopsis "Assertion-based tests extension for MiniTest")
6231 (description "The @code{minitest-proveit} MiniTest extension ensures all
6232tests to prove success (via at least one assertion) rather than rely on the
6233absence of failure.")
6234 (home-page "https://github.com/seattlerb/minitest-proveit")
6235 (license license:expat)))
6236
6237(define-public ruby-minitest-reporters
6238 (package
6239 (name "ruby-minitest-reporters")
6240 (version "1.7.1")
6241 (source
6242 (origin
6243 (method url-fetch)
6244 (uri (rubygems-uri "minitest-reporters" version))
6245 (sha256
6246 (base32
6247 "0b2na3mr8l712c0fa03r9n43l5qwcgrhc1iywwpw7f4m1hx42q2h"))))
6248 (build-system ruby-build-system)
6249 (arguments
6250 '(#:phases
6251 (modify-phases %standard-phases
6252 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
6253 ;; including it as an input can lead to circular dependencies.
6254 (add-after 'unpack 'remove-rubocop-from-Rakefile
6255 (lambda _
6256 (substitute* "Rakefile"
6257 (("require 'rubocop/rake\\_task'") "")
6258 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))))
6259 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
6260 (lambda _
6261 (substitute* "minitest-reporters.gemspec"
6262 ((".*%q<rubocop>.*") "\n")))))))
6263 (propagated-inputs
6264 (list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
6265 (native-inputs
6266 (list bundler ruby-maruku))
6267 (synopsis "Enhanced reporting for Minitest tests")
6268 (description
6269 "@code{minitest/reporters} provides a custom Minitest runner to improve
6270how the test state is reported. A number of different reporters are
6271available, including a spec reporter, progress bar reporter, a HTML
6272reporter.")
6273 (home-page "https://github.com/kern/minitest-reporters")
6274 (license license:expat)))
6275
6276(define-public ruby-minitest-rg
6277 (package
6278 (name "ruby-minitest-rg")
6279 (version "5.3.0")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (rubygems-uri "minitest-rg" version))
6284 (sha256
6285 (base32
6286 "0vwgmk9dnvhlcwxi7j5z150sdqyy3fjs8r8wzx64ig3ivpnb188j"))))
6287 (build-system ruby-build-system)
6288 (arguments
6289 ;; Some tests fail even outside Guix, so disable tests.
6290 ;; https://github.com/blowmage/minitest-rg/issues/12
6291 ;; https://github.com/blowmage/minitest-rg/pull/13
6292 `(#:tests? #f))
6293 (propagated-inputs
6294 (list ruby-minitest))
6295 (synopsis "Coloured output for Minitest")
6296 (description
6297 "@code{minitest-rg} changes the colour of the output from Minitest.")
6298 (home-page "https://blowmage.com/minitest-rg/")
6299 (license license:expat)))
6300
6301(define-public ruby-minitest-global-expectations
6302 (package
6303 (name "ruby-minitest-global-expectations")
6304 (version "1.0.1")
6305 (source
6306 (origin
6307 (method url-fetch)
6308 (uri (rubygems-uri "minitest-global_expectations"
6309 version))
6310 (sha256
6311 (base32
6312 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
6313 (build-system ruby-build-system)
6314 (propagated-inputs
6315 (list ruby-minitest))
6316 (synopsis "Adjust minitest behaviour for calling expectation methods")
6317 (description
6318 "Minitest-global_expectations allows continued use of expectation methods
6319on all objects. Calling expectation methods on all objects was deprecated in
6320minitest 5.12, and is planned to be removed from minitest 6.")
6321 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
6322 (license license:expat)))
6323
6324(define-public ruby-daemons
6325 (package
6326 (name "ruby-daemons")
6327 (version "1.2.5")
6328 (source (origin
6329 (method url-fetch)
6330 (uri (rubygems-uri "daemons" version))
6331 (sha256
6332 (base32
6333 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
6334 (build-system ruby-build-system)
6335 (arguments
6336 `(#:tests? #f)) ; no test suite
6337 (synopsis "Daemonize Ruby programs")
6338 (description "Daemons provides a way to wrap existing Ruby scripts to be
6339run as a daemon and to be controlled by simple start/stop/restart commands.")
6340 (home-page "https://github.com/thuehlinger/daemons")
6341 (license license:expat)))
6342
6343(define-public ruby-dalli
6344 (package
6345 (name "ruby-dalli")
6346 (version "3.2.4")
6347 (source (origin
6348 (method git-fetch) ;for tests
6349 (uri (git-reference
6350 (url "https://github.com/petergoldstein/dalli")
6351 (commit (string-append "v" version))))
6352 (file-name (git-file-name name version))
6353 (sha256
6354 (base32
6355 "1hhqqv1j3zd2y0vr6maaabsflrvkf1x0i6z8n725mhqydp3f9gwp"))))
6356 (build-system ruby-build-system)
6357 ;; Disable tests to avoid a dependency cycle with ruby-activesupport,
6358 ;; through ruby-ruby-prof.
6359 (arguments (list #:tests? #f))
6360 (synopsis "High performance memcached client for Ruby")
6361 (description "Dalli is a high performance pure Ruby client for accessing
6362memcached servers. Dalli supports:
6363
6364@itemize
6365@item Simple and complex memcached configurations
6366@item Fail-over between memcached instances
6367@item Fine-grained control of data serialization and compression
6368@item Thread-safe operation
6369@item SSL/TLS connections to memcached
6370@item SASL authentication.
6371@end itemize
6372
6373The name is a variant of Salvador Dali for his famous painting The Persistence
6374of Memory.")
6375 (home-page "https://github.com/petergoldstein/dalli")
6376 (license license:expat)))
6377
6378(define-public ruby-data_uri
6379 (package
6380 (name "ruby-data_uri")
6381 (version "0.1.0")
6382 (source
6383 (origin
6384 (method url-fetch)
6385 (uri (rubygems-uri "data_uri" version))
6386 (sha256
6387 (base32
6388 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
6389 (build-system ruby-build-system)
6390 (synopsis "URI class for parsing data URIs")
6391 (description
6392 "Data @acronym{URI, universal resource identifier}s allow resources to be
6393embedded inside a URI. The URI::Data class provides support for parsing these
6394URIs using the normal URI.parse method.")
6395 (home-page "https://github.com/dball/data_uri")
6396 (license license:expat)))
6397
6398(define-public ruby-debug
6399 (package
6400 (name "ruby-debug")
6401 (version "1.7.2")
6402 (source (origin
6403 (method url-fetch)
6404 (uri (rubygems-uri "debug" version))
6405 (sha256
6406 (base32
6407 "0x59508j69w9p275gabysv521n210pd3n060gqfgsiqjms1h0ldf"))))
6408 (build-system ruby-build-system)
6409 (arguments (list #:test-target "test_all"))
6410 (propagated-inputs (list ruby-irb ruby-reline))
6411 (synopsis "Debugging functionality for Ruby")
6412 (description "Debugging functionality for Ruby. This is completely
6413rewritten debug.rb which was contained by the ancient Ruby versions. It is
6414included with Ruby itself, but this package is made available so that the
6415latest version can be made available independently from Ruby.")
6416 (home-page "https://github.com/ruby/debug")
6417 (license license:bsd-2)))
6418
6419(define-public ruby-deep-merge
6420 (package
6421 (name "ruby-deep-merge")
6422 (version "1.2.1")
6423 (home-page "https://github.com/danielsdeleo/deep_merge")
6424 ;; The Rubygem source does not contain the gemspec required for tests.
6425 (source (origin
6426 (method git-fetch)
6427 (uri (git-reference (url home-page) (commit version)))
6428 (file-name (git-file-name name version))
6429 (sha256
6430 (base32
6431 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
6432 (build-system ruby-build-system)
6433 (native-inputs
6434 (list ruby-minitest))
6435 (synopsis "Recursively merge hashes")
6436 (description
6437 "Deep Merge is a set of utility functions for @code{Hash}. It permits
6438you to merge elements inside a hash together recursively.")
6439 (license license:expat)))
6440
6441(define-public ruby-delayed-job
6442 (package
6443 (name "ruby-delayed-job")
6444 (version "4.2.0")
6445 (source (origin
6446 (method url-fetch)
6447 (uri (rubygems-uri "delayed_job" version))
6448 (sha256
6449 (base32
6450 "1vqkfxflcxa7zyj8m3dlgqxc2f5xvrw22k482y1kk14hpdl1zp2i"))))
6451 (build-system ruby-build-system)
6452 (arguments
6453 (list #:phases
6454 #~(modify-phases %standard-phases
6455 (add-after 'unpack 'disable-bundler
6456 (lambda _
6457 (substitute* "Rakefile"
6458 (("require 'bundler/setup'") "")
6459 (("Bundler::GemHelper\\.install_tasks") ""))))
6460 (add-after 'unpack 'disable-rubocop
6461 (lambda _
6462 (substitute* "Rakefile"
6463 (("require 'rubocop/rake_task'") "")
6464 (("RuboCop::RakeTask.new") ""))))
6465 (add-after 'extract-gemspec 'remove-dependency-on-actionmailer
6466 (lambda _
6467 (substitute* "spec/helper.rb"
6468 (("require 'action_mailer'") ""))
6469 (substitute* "delayed_job.gemspec"
6470 (("\"spec/performable_mailer_spec.rb\".freeze, ") ""))
6471 (delete-file "spec/performable_mailer_spec.rb"))))))
6472 (native-inputs
6473 (list ruby-activerecord
6474 ruby-rspec
6475 ruby-simplecov
6476 ruby-simplecov-lcov
6477 ruby-zeitwerk
6478 ruby-mini-portile-2))
6479 (propagated-inputs
6480 (list ruby-activesupport))
6481 (synopsis "Asynchronous background tasks execution library")
6482 (description "Delayed_job (or DJ) encapsulates the common pattern of
6483asynchronously executing longer tasks in the background. It is a direct
6484extraction from Shopify where the job table is responsible for a multitude of
6485core tasks.")
6486 (home-page "https://github.com/collectiveidea/delayed_job")
6487 (license license:expat)))
6488
6489(define-public ruby-git
6490 (package
6491 (name "ruby-git")
6492 (version "1.3.0")
6493 (source (origin
6494 (method url-fetch)
6495 (uri (rubygems-uri "git" version))
6496 (sha256
6497 (base32
6498 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
6499 (build-system ruby-build-system)
6500 (arguments
6501 `(#:tests? #f ; no tests
6502 #:phases (modify-phases %standard-phases
6503 (add-after 'install 'patch-git-binary
6504 (lambda* (#:key inputs outputs #:allow-other-keys)
6505 ;; Make the default git binary an absolute path to the
6506 ;; store.
6507 (let ((git (search-input-file inputs "/bin/git"))
6508 (config (string-append
6509 (assoc-ref outputs "out")
6510 "/lib/ruby/vendor_ruby/gems/git-"
6511 ,version "/lib/git/config.rb")))
6512 (substitute* (list config)
6513 (("'git'")
6514 (string-append "'" git "'")))))))))
6515 (inputs
6516 (list git))
6517 (synopsis "Ruby wrappers for Git")
6518 (description "Ruby/Git is a Ruby library that can be used to create, read
6519and manipulate Git repositories by wrapping system calls to the git binary.")
6520 (home-page "https://github.com/schacon/ruby-git")
6521 (license license:expat)))
6522
6523(define-public ruby-hocon
6524 (package
6525 (name "ruby-hocon")
6526 (version "1.4.0")
6527 (home-page "https://github.com/puppetlabs/ruby-hocon")
6528 (source (origin
6529 (method git-fetch)
6530 (uri (git-reference (url home-page) (commit version)))
6531 (file-name (git-file-name name version))
6532 (sha256
6533 (base32
6534 "04wgv0pwrghawnl6qp346z59fvp9v37jymq8p0lsrzxa6nvrykmk"))))
6535 (build-system ruby-build-system)
6536 (arguments
6537 (list
6538 #:phases
6539 #~(modify-phases %standard-phases
6540 (replace 'check
6541 (lambda* (#:key tests? #:allow-other-keys)
6542 (if tests?
6543 (invoke "rspec")
6544 (format #t "test suite not run~%")))))))
6545 (native-inputs
6546 (list bundler ruby-rspec))
6547 (synopsis "HOCON config library")
6548 (description
6549 "This package provides Ruby support for the @acronym{HOCON,
6550Human-Optimized Config Object Notation} configuration file format. It
6551supports parsing and modifying HOCON and JSON files, and rendering parsed
6552objects back to a @code{String}.")
6553 (license license:asl2.0)))
6554
6555(define-public ruby-slop
6556 (package
6557 (name "ruby-slop")
6558 (version "4.10.1")
6559 (source (origin
6560 (method url-fetch)
6561 (uri (rubygems-uri "slop" version))
6562 (sha256
6563 (base32
6564 "1iyrjskgxyn8i1679qwkzns85p909aq77cgx2m4fs5ygzysj4hw4"))))
6565 (build-system ruby-build-system)
6566 (synopsis "Ruby command line option parser")
6567 (description "Slop provides a Ruby domain specific language for gathering
6568options and parsing command line flags.")
6569 (home-page "https://github.com/leejarvis/slop")
6570 (license license:expat)))
6571
6572(define-public ruby-slop-3
6573 (package (inherit ruby-slop)
6574 (version "3.6.0")
6575 (source (origin
6576 (method url-fetch)
6577 (uri (rubygems-uri "slop" version))
6578 (sha256
6579 (base32
6580 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
6581
6582(define-public ruby-multi-xml
6583 (package
6584 (name "ruby-multi-xml")
6585 (version "0.6.0")
6586 (source
6587 (origin
6588 (method url-fetch)
6589 (uri (rubygems-uri "multi_xml" version))
6590 (sha256
6591 (base32
6592 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
6593 (build-system ruby-build-system)
6594 (arguments
6595 '(#:tests? #f)) ; No included tests
6596 (synopsis "Swappable XML backends for Ruby")
6597 (description
6598 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
6599Nokogiri, Ox, or REXML.")
6600 (home-page "https://github.com/sferik/multi_xml")
6601 (license license:expat)))
6602
6603(define-public ruby-multipart-parser
6604 (package
6605 (name "ruby-multipart-parser")
6606 (version "0.1.1")
6607 (source (origin
6608 (method url-fetch)
6609 (uri (rubygems-uri "multipart-parser" version))
6610 (sha256
6611 (base32
6612 "0xb4p475yrfm883h9kn80a021myn17dvs50wpa1djzcmlq7p0882"))))
6613 (build-system ruby-build-system)
6614 (arguments
6615 (list
6616 #:phases #~(modify-phases %standard-phases
6617 (add-after 'unpack 'skip-failing-test
6618 ;; One test fails for unknown reasons (see:
6619 ;; https://github.com/danabr/multipart-parser/issues/7).
6620 (lambda _
6621 (substitute* "test/multipart_parser/reader_test.rb"
6622 (("def test_long" all)
6623 (string-append all "\n return true"))))))))
6624 (synopsis "Parser for multipart MIME messages")
6625 (description "@code{multipart-parser} is a simple parser for multipart
6626MIME messages, written in Ruby, based on felixge/node-formidable's parser. It
6627has the following characteristics:
6628@itemize
6629@item Pure Ruby
6630@item Event-driven API
6631@item Only supports one level of multipart parsing
6632@item Does not perform I/O
6633@item Does not depend on any other library.
6634@end itemize")
6635 (home-page "https://github.com/danabr/multipart-parser")
6636 (license license:expat)))
6637
6638(define-public ruby-multipart-post
6639 (package
6640 (name "ruby-multipart-post")
6641 (version "2.0.0")
6642 (source (origin
6643 (method url-fetch)
6644 (uri (rubygems-uri "multipart-post" version))
6645 (sha256
6646 (base32
6647 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
6648 (build-system ruby-build-system)
6649 (native-inputs
6650 (list bundler))
6651 (synopsis "Multipart POST library for Ruby")
6652 (description "Multipart-Post Adds multipart POST capability to Ruby's
6653net/http library.")
6654 (home-page "https://github.com/nicksieger/multipart-post")
6655 (license license:expat)))
6656
6657(define-public ruby-multi-json
6658 (package
6659 (name "ruby-multi-json")
6660 (version "1.15.0")
6661 (source
6662 (origin
6663 (method git-fetch)
6664 ;; Tests are not distributed at rubygems.org so download from GitHub
6665 ;; instead.
6666 (uri (git-reference
6667 (url "https://github.com/intridea/multi_json")
6668 (commit (string-append "v" version))))
6669 (file-name (git-file-name name version))
6670 (sha256
6671 (base32
6672 "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
6673 (build-system ruby-build-system)
6674 (arguments
6675 (list
6676 ;; TODO Tests don't currently work with Ruby 3
6677 #:tests? #f
6678 #:phases
6679 #~(modify-phases %standard-phases
6680 (add-before 'check 'pre-check
6681 (lambda _
6682 ;; As seen in the .travis.yml file.
6683 (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
6684 (native-inputs
6685 (list ruby-rspec ruby-json-pure ruby-oj ruby-yajl-ruby))
6686 (synopsis "Common interface to multiple JSON libraries for Ruby")
6687 (description
6688 "This package provides a common interface to multiple JSON libraries,
6689including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
6690NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
6691 (home-page "https://github.com/intridea/multi_json")
6692 (license license:expat)))
6693
6694(define-public ruby-arr-pm
6695 (package
6696 (name "ruby-arr-pm")
6697 (version "0.0.12")
6698 (source (origin
6699 (method url-fetch)
6700 (uri (rubygems-uri "arr-pm" version))
6701 (sha256
6702 (base32
6703 "0fddw0vwdrr7v3a0lfqbmnd664j48a9psrjd3wh3k4i3flplizzx"))))
6704 (build-system ruby-build-system)
6705 (arguments
6706 (list #:phases
6707 #~(modify-phases %standard-phases
6708 (replace 'check
6709 (lambda* (#:key tests? #:allow-other-keys)
6710 (when tests?
6711 (invoke "rspec")))))))
6712 (native-inputs (list ruby-flores ruby-insist ruby-rspec ruby-stud))
6713 (synopsis "RPM reader/writer library written in Ruby")
6714 (description "This library allows reading and writing RPM packages. It is
6715used by the @command{fpm} tool. It is written in pure Ruby because
6716@code{librpm} is not available on all systems and requires many
6717dependencies.")
6718 (home-page "https://github.com/jordansissel/ruby-arr-pm")
6719 (license license:asl2.0)))
6720
6721(define-public ruby-arel
6722 (package
6723 (name "ruby-arel")
6724 (version "9.0.0")
6725 (source (origin
6726 (method url-fetch)
6727 (uri (rubygems-uri "arel" version))
6728 (sha256
6729 (base32
6730 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
6731 (build-system ruby-build-system)
6732 (arguments '(#:tests? #f)) ; no tests
6733 (home-page "https://github.com/rails/arel")
6734 (synopsis "SQL AST manager for Ruby")
6735 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
6736Ruby. It simplifies the generation of complex SQL queries and adapts to
6737various relational database implementations.")
6738 (license license:expat)))
6739
6740(define-public ruby-minitar
6741 ;; We package from the GitHub source to fix the security issue reported at
6742 ;; https://github.com/halostatue/minitar/issues/16.
6743 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
6744 (package
6745 (name "ruby-minitar")
6746 (version (string-append "0.5.4-1." (string-take commit 8)))
6747 (source
6748 (origin
6749 (method git-fetch)
6750 (uri (git-reference
6751 (url "https://github.com/halostatue/minitar")
6752 (commit commit)))
6753 (file-name (string-append name "-" version "-checkout"))
6754 (sha256
6755 (base32
6756 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
6757 (build-system ruby-build-system)
6758 (arguments
6759 '(#:tests? #f)) ; missing a gemspec
6760 (synopsis "Ruby library and utility for handling tar archives")
6761 (description
6762 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
6763that provides the ability to deal with POSIX tar archive files.")
6764 (home-page "http://www.github.com/atoulme/minitar")
6765 (license (list license:gpl2+ license:ruby)))))
6766
6767(define-public ruby-nokogiri
6768 (package
6769 (name "ruby-nokogiri")
6770 (version "1.18.10")
6771 (source (origin
6772 (method git-fetch)
6773 (uri (git-reference
6774 (url "https://github.com/sparklemotion/nokogiri")
6775 (commit (string-append "v" version))))
6776 (file-name (git-file-name name version))
6777 (sha256
6778 (base32
6779 "1lrng9xbhyw4mkm50wyzab7dyxdwav4q4zyzx9bgilcnaqwc6rbq"))))
6780 (build-system ruby-build-system)
6781 (arguments
6782 (list #:gem-flags #~(list "--" "--use-system-libraries"
6783 (string-append "--with-xml2-include="
6784 #$(this-package-input "libxml2")
6785 "/include/libxml2"))
6786 #:phases #~(modify-phases %standard-phases
6787 (add-after 'install 'delete-mkmf.log
6788 (lambda _
6789 ;; Rubygems installs build log files that embed volatile file
6790 ;; names (see:
6791 ;; https://github.com/rubygems/rubygems/issues/6259).
6792 (for-each delete-file
6793 (find-files #$output "^mkmf\\.log$"))))
6794 (delete 'check)
6795 (add-after 'install 'check
6796 (lambda* (#:key tests? #:allow-other-keys)
6797 (setenv "GEM_PATH" (string-append
6798 (getenv "GEM_PATH") ":"
6799 #$output "/lib/ruby/vendor_ruby"))
6800 (when tests?
6801 (for-each (lambda (file)
6802 (invoke "ruby" "-Itest" file))
6803 (find-files "test" "^test_.*\\.rb"))))))))
6804 (native-inputs (list ruby-hoe ruby-rubyzip))
6805 (inputs (list zlib libxml2 libxslt))
6806 (propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
6807 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
6808 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
6809both CSS3 selector and XPath 1.0 support.")
6810 (home-page "https://nokogiri.org/")
6811 (license license:expat)))
6812
6813(define-public ruby-method-source
6814 (package
6815 (name "ruby-method-source")
6816 (version "1.1.0")
6817 (source
6818 (origin
6819 (method url-fetch)
6820 (uri (rubygems-uri "method_source" version))
6821 (sha256
6822 (base32 "1igmc3sq9ay90f8xjvfnswd1dybj1s3fi0dwd53inwsvqk4h24qq"))))
6823 (build-system ruby-build-system)
6824 (arguments
6825 (list
6826 #:ruby ruby-3.3
6827 #:test-target "spec"
6828 #:phases
6829 #~(modify-phases %standard-phases
6830 (add-after 'unpack 'remove-git-ls-files
6831 (lambda* (#:key outputs #:allow-other-keys)
6832 (substitute* "Rakefile"
6833 (("git ls-files")
6834 "find . -type f")))))))
6835 (native-inputs (list ruby-rspec))
6836 (synopsis "Retrieve the source code for Ruby methods")
6837 (description
6838 "Method_source retrieves the source code for Ruby methods.
6839Additionally, it can extract source code from Proc and Lambda objects or just
6840extract comments.")
6841 (home-page "https://github.com/banister/method_source")
6842 (license license:expat)))
6843
6844(define-public ruby-coderay
6845 (package
6846 (name "ruby-coderay")
6847 (version "1.1.2")
6848 (source
6849 (origin
6850 (method url-fetch)
6851 (uri (rubygems-uri "coderay" version))
6852 (sha256
6853 (base32
6854 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
6855 (build-system ruby-build-system)
6856 (arguments
6857 '(#:tests? #f)) ; missing test files
6858 (synopsis "Ruby syntax highlighting library")
6859 (description "Coderay is a Ruby library that provides syntax highlighting
6860for select languages.")
6861 (home-page "http://coderay.rubychan.de")
6862 (license license:expat)))
6863
6864(define-public ruby-cuke-modeler
6865 (package
6866 (name "ruby-cuke-modeler")
6867 (version "3.31.0")
6868 (source (origin
6869 (method git-fetch)
6870 (uri (git-reference
6871 (url "https://github.com/enkessler/cuke_modeler")
6872 (commit (string-append "v" version))))
6873 (file-name (git-file-name name version))
6874 (sha256
6875 (base32
6876 "0g03zz8p4xn8k2yfq0421qn0wfxr459v1fh1xalhgqy6ri93lnbs"))))
6877 (build-system ruby-build-system)
6878 (arguments
6879 (list #:test-target "default"
6880 #:phases
6881 #~(modify-phases %standard-phases
6882 (add-after 'unpack 'improve-reproducibility
6883 (lambda _
6884 (substitute*
6885 "testing/rspec/spec/unit/cuke_modeler_unit_spec.rb"
6886 (("#\\{Time.now.year\\}") ""))))
6887 (add-after 'unpack 'relax-requirements
6888 (lambda _
6889 (substitute* "rakefiles/testing_tasks.rb"
6890 (("=> \\[:clear_old_results\\]") "")
6891 (("'bundle', 'exec', ") "")
6892 (("current_version = .*") "")
6893 (("unsupported_versions\\.include\\?\\(current_version\\)") "false")
6894 (("bundle exec ") ""))
6895 (substitute* "Rakefile"
6896 (("Rainbow.enabled = true") "")
6897 (("require_relative 'rakefiles/documentation_tasks'") "")
6898 (("require_relative 'rakefiles/other_tasks'") "")
6899 (("require_relative 'rakefiles/release_tasks'") "")
6900 (("require_relative 'rakefiles/reporting_tasks'") ""))
6901 (substitute* "environments/rspec_env.rb"
6902 (("require 'simplecov'") ""))
6903 (substitute* "environments/cucumber_env.rb"
6904 (("require 'simplecov'") "")))))))
6905 (native-inputs
6906 (list ruby-childprocess
6907 ruby-cucumber
6908 ruby-rainbow
6909 ruby-rspec))
6910 (propagated-inputs (list ruby-cucumber-gherkin))
6911 (synopsis "Gherkin test suite analysis tool")
6912 (description "CukeModeler facilitates modeling a test suite that is
6913written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
6914providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
6915the @code{cucumber-gherkin} generates when parsing features, as well as
6916providing models for feature files and directories in order to be able to have
6917a fully traversable model tree of a test suite's structure. These models can
6918then be analyzed or manipulated more easily than the underlying AST layer.")
6919 (home-page "https://github.com/enkessler/cuke_modeler")
6920 (license license:expat)))
6921
6922(define-public ruby-parallel-tests
6923 (package
6924 (name "ruby-parallel-tests")
6925 (version "5.7.0")
6926 (home-page "https://github.com/grosser/parallel_tests")
6927 (source (origin
6928 (method git-fetch)
6929 (uri (git-reference
6930 (url home-page)
6931 (commit (string-append "v" version))))
6932 (file-name (string-append name version))
6933 (sha256
6934 (base32
6935 "005vj7j4wz2i15c43aqcxvqchrpa412d4h9mfp6nia0dgd3iwgjy"))))
6936 (build-system ruby-build-system)
6937 (arguments
6938 '(#:test-target "spec" ;avoid rubocop dependency
6939 #:phases (modify-phases %standard-phases
6940 (add-after 'patch-source-shebangs 'patch-shell-invocations
6941 (lambda _
6942 (substitute* '("lib/parallel_tests/tasks.rb"
6943 "spec/parallel_tests/tasks_spec.rb")
6944 (("/bin/sh") (which "sh"))
6945 (("/bin/bash") (which "bash")))))
6946 (add-before 'check 'relax-requirements
6947 (lambda _
6948 ;; Remove hard coded version constraints, instead just
6949 ;; use whatever versions are available in Guix.
6950 (delete-file "Gemfile.lock")
6951 (substitute* "Gemfile"
6952 (("'minitest',.*")
6953 "'minitest'\n")
6954 (("'cucumber',.*")
6955 "'cucumber'\n")
6956 ;; Do not depend on a git-fetched spinach version.
6957 (("gem 'spinach',.*")
6958 "gem 'spinach'\n")
6959 ((".*rubocop.*") ""))))
6960 (add-before 'check 'disable-rails-test
6961 (lambda _
6962 ;; XXX: This test attempts to download and run the test
6963 ;; suites of multiple Rails versions(!) directly.
6964 (delete-file "spec/rails_spec.rb")))
6965 (add-before 'check 'disable-problematic-tests
6966 (lambda _
6967 ;; This test fails, probably because of the newer
6968 ;; Cucumber version used here.
6969 (delete-file "spec/parallel_tests/cucumber/\
6970failure_logger_spec.rb")
6971 ;; This uses Bundler extensively.
6972 (delete-file "spec/integration_spec.rb")))
6973 (add-before 'check 'set-HOME
6974 (lambda _
6975 ;; Some tests check the output of Bundler, and fail when
6976 ;; Bundler warns that /homeless-shelter does not exist.
6977 (setenv "HOME" "/tmp"))))))
6978 (native-inputs
6979 (list ruby-bump
6980 ruby-cucumber
6981 ruby-cuke-modeler
6982 ruby-minitest
6983 ruby-rake
6984 ruby-rspec
6985 ruby-spinach))
6986 (propagated-inputs
6987 (list ruby-parallel))
6988 (synopsis "Run tests in parallel")
6989 (description
6990 "This package can speed up @code{Test::Unit}, @code{RSpec},
6991@code{Cucumber}, and @code{Spinach} tests by running them concurrently
6992across multiple CPU cores.")
6993 (license license:expat)))
6994
6995(define-public ruby-parser
6996 (package
6997 (name "ruby-parser")
6998 (version "3.3.7.0")
6999 (source
7000 (origin
7001 (method url-fetch)
7002 (uri (rubygems-uri "parser" version))
7003 (sha256
7004 (base32
7005 "16qi2qhpszm842awxghmsp64yvvawafq96w5jw98irz3f4bh2jbl"))))
7006 (build-system ruby-build-system)
7007 (arguments '(#:tests? #f)) ; tests not included in gem
7008 (native-inputs (list bundler ruby-cliver ruby-simplecov))
7009 (inputs (list ragel))
7010 (propagated-inputs (list ruby-ast ruby-racc))
7011 (synopsis "Ruby parser written in pure Ruby")
7012 (description
7013 "This package provides a Ruby parser written in pure Ruby.")
7014 (home-page "https://github.com/whitequark/parser")
7015 (license license:expat)))
7016
7017(define-public ruby-set
7018 (package
7019 (name "ruby-set")
7020 (version "1.0.3")
7021 (source (origin
7022 (method url-fetch)
7023 (uri (rubygems-uri "set" version))
7024 (sha256
7025 (base32
7026 "07kc057nrkddrybqmlbmgf9x7nsmbc3ni6gy1z6xjx5b838vlj33"))))
7027 (build-system ruby-build-system)
7028 (synopsis
7029 "Ruby class to deal with collections of unordered, unique values")
7030 (description
7031 "This package provides a class to deal with collections of unordered,
7032unique values")
7033 (home-page "https://github.com/ruby/set")
7034 (license license:bsd-2)))
7035
7036(define-public ruby-sexp-processor
7037 (package
7038 (name "ruby-sexp-processor")
7039 (version "4.17.0")
7040 (source
7041 (origin
7042 (method url-fetch)
7043 (uri (rubygems-uri "sexp_processor" version))
7044 (sha256
7045 (base32
7046 "0vzz9mhg4kkdqf179pm30i204h7iskanxrk53j0csf0qrrs4iajd"))))
7047 (build-system ruby-build-system)
7048 (native-inputs
7049 (list ruby-hoe
7050 ruby-minitest
7051 ruby-minitest-proveit))
7052 (synopsis "ParseTree fork which includes generic S-exp processing tools")
7053 (description "The sexp_processor package is derived from ParseTree, but
7054contrary to ParseTree, it includes all the generic S-exp processing tools.
7055Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
7056@code{Environment}")
7057 (home-page "https://github.com/seattlerb/sexp_processor")
7058 (license license:expat)))
7059
7060(define-public ruby-ruby-parser
7061 (package
7062 (name "ruby-ruby-parser")
7063 (version "3.20.2")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 (uri (rubygems-uri "ruby_parser" version))
7068 (sha256
7069 (base32
7070 "0q851n8654wkjrq8jawq8vi5yhr1y9vpyr2vj7cnn3sa4ikg6d3z"))))
7071 (build-system ruby-build-system)
7072 (arguments
7073 (list
7074 #:phases
7075 #~(modify-phases %standard-phases
7076 (add-after 'unpack 'patch
7077 (lambda _
7078 (substitute* "Rakefile"
7079 (("`which bison`")
7080 (string-append "\"" (which "bison") "\""))
7081 (("which unifdef")
7082 (which "unifdef"))))))))
7083 (native-inputs
7084 (list ruby-hoe
7085 ruby-racc
7086 unifdef
7087 bison
7088 ruby-minitest))
7089 (propagated-inputs
7090 (list ruby-sexp-processor))
7091 (home-page "https://github.com/seattlerb/ruby_parser/")
7092 (synopsis "Ruby parser written in pure Ruby")
7093 (description "The ruby_parser (RP) package provides a Ruby parser written
7094in pure Ruby. It outputs S-expressions which can be manipulated and converted
7095back to Ruby via the @code{ruby2ruby} library.")
7096 (license license:expat)))
7097
7098(define-public ruby-ruby-version
7099 (package
7100 (name "ruby-ruby-version")
7101 (version "1.0.3")
7102 (source (origin
7103 (method url-fetch)
7104 (uri (rubygems-uri "ruby_version" version))
7105 (sha256
7106 (base32
7107 "1dfcy4bz7kgmp4i7kvqg2w5l9rsf6vp9hhqqfg4ydds60yazjc2r"))))
7108 (build-system ruby-build-system)
7109 (arguments
7110 (list #:phases
7111 #~(modify-phases %standard-phases
7112 (add-after 'extract-gemspec 'relax-requirements
7113 (lambda _
7114 (delete-file "Gemfile.lock")
7115 (substitute* "ruby_version.gemspec"
7116 (("\"Gemfile.lock\".freeze, ") "")
7117 ;; Allow a newers versions of development dependencies.
7118 (("~>") ">=")))))))
7119 (native-inputs (list ruby-rdoc ruby-rubygems-tasks ruby-rspec))
7120 (synopsis "Ruby class for checking the Ruby version")
7121 (description "This package provides a @code{RubyVersion} class which
7122offers a convenient Domain Specific Language (DSL) for checking for the right
7123Ruby version.")
7124 (home-page "https://github.com/janlelis/ruby_version")
7125 (license license:expat)))
7126
7127(define-public ruby-prawn-manual-builder
7128 (package
7129 (name "ruby-prawn-manual-builder")
7130 (version "0.3.1")
7131 (source
7132 (origin
7133 (method url-fetch)
7134 (uri (rubygems-uri "prawn-manual_builder" version))
7135 (sha256
7136 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
7137 (build-system ruby-build-system)
7138 (arguments
7139 '(#:tests? #f ; no included tests
7140 #:phases
7141 (modify-phases %standard-phases
7142 (add-after 'extract-gemspec 'patch-gemspec
7143 (lambda _
7144 (substitute* ".gemspec"
7145 ;; Loosen the requirement for pdf-inspector
7146 (("~> 1\\.0\\.7") ">= 0")))))))
7147 (propagated-inputs
7148 (list ruby-coderay))
7149 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
7150 (description
7151 "This package provides a tool for writing manuals for Prawn and Prawn
7152accessories")
7153 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
7154 (license %prawn-project-licenses)))
7155
7156(define-public ruby-progress_bar
7157 (package
7158 (name "ruby-progress_bar")
7159 (version "1.1.0")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (rubygems-uri "progress_bar" version))
7164 (sha256
7165 (base32
7166 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
7167 (build-system ruby-build-system)
7168 (arguments
7169 '(#:test-target "spec"))
7170 (propagated-inputs
7171 (list ruby-highline ruby-options))
7172 (native-inputs
7173 (list bundler ruby-rspec ruby-timecop))
7174 (synopsis
7175 "Ruby library for displaying progress bars")
7176 (description
7177 "ProgressBar is a simple library for displaying progress bars. The
7178maximum value is configurable, and additional information can be displayed
7179like the percentage completion, estimated time remaining, elapsed time and
7180rate.")
7181 (home-page "https://github.com/paul/progress_bar")
7182 (license license:wtfpl2)))
7183
7184(define-public ruby-progressbar
7185 (package
7186 (name "ruby-progressbar")
7187 (version "1.10.1")
7188 (source
7189 (origin
7190 (method url-fetch)
7191 (uri (rubygems-uri "ruby-progressbar" version))
7192 (sha256
7193 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
7194 (build-system ruby-build-system)
7195 (arguments
7196 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
7197 #:tests? #f))
7198 (synopsis "Text progress bar library for Ruby")
7199 (description
7200 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
7201The output can be customized with a formatting system.")
7202 (home-page "https://github.com/jfelchner/ruby-progressbar")
7203 (license license:expat)))
7204
7205(define-public ruby-latest-ruby
7206 (package
7207 (name "ruby-latest-ruby")
7208 (version "3.1.0")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (rubygems-uri "latest_ruby" version))
7212 (sha256
7213 (base32
7214 "15rqwgxzpnkzdiz8m02jra0zq5sx0fiz61vkfrj1ls6slqfhnzqg"))))
7215 (build-system ruby-build-system)
7216 (arguments
7217 '(#:tests? #f)) ; No Rakefile
7218 (synopsis "Answers the question of what the latest Ruby version is")
7219 (description "Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.")
7220 (home-page "https://github.com/kyrylo/latest_ruby")
7221 (license license:zlib)))
7222
7223(define-public ruby-pry
7224 (package
7225 (name "ruby-pry")
7226 (version "0.14.2")
7227 (source
7228 (origin
7229 (method url-fetch)
7230 (uri (rubygems-uri "pry" version))
7231 (sha256
7232 (base32
7233 "0k9kqkd9nps1w1r1rb7wjr31hqzkka2bhi8b518x78dcxppm9zn4"))))
7234 (build-system ruby-build-system)
7235 (arguments
7236 '(#:tests? #f)) ; no tests
7237 (propagated-inputs
7238 (list ruby-coderay ruby-method-source))
7239 (synopsis "Ruby REPL")
7240 (description "Pry is an IRB alternative and runtime developer console for
7241Ruby. It features syntax highlighting, a plugin architecture, runtime
7242invocation, and source and documentation browsing.")
7243 (home-page "https://cobaltbluemedia.com/pryrepl/")
7244 (license license:expat)))
7245
7246(define-public ruby-pry-doc
7247 (package
7248 (name "ruby-pry-doc")
7249 (version "1.6.0")
7250 (source (origin
7251 (method url-fetch)
7252 (uri (rubygems-uri "pry-doc" version))
7253 (sha256
7254 (base32
7255 "0qq58vsmmvi9i4d15pav46ca5pd85qx3fxv17pq7ia5lqgxcrc8r"))))
7256 (build-system ruby-build-system)
7257 (propagated-inputs (list ruby-pry ruby-yard))
7258 (native-inputs (list ruby-latest-ruby ruby-rspec ruby-rake)) ;for tests
7259 (synopsis "Provides YARD and extended documentation support for Pry")
7260 (description
7261 "Pry Doc is a Pry REPL plugin. It provides extended documentation
7262support for the REPL by means of improving the @code{show-doc} and
7263@code{show-source} commands. With help of the plugin the commands are
7264be able to display the source code and the docs of Ruby methods and
7265classes implemented in C.")
7266 (home-page "https://github.com/pry/pry-doc")
7267 (license license:expat)))
7268
7269(define-public ruby-single-cov
7270 (package
7271 (name "ruby-single-cov")
7272 (version "1.11.0")
7273 (home-page "https://github.com/grosser/single_cov")
7274 (source (origin
7275 (method git-fetch)
7276 (uri (git-reference (url home-page)
7277 (commit (string-append "v" version))))
7278 (file-name (git-file-name name version))
7279 (sha256
7280 (base32
7281 "10xfciy1an4jlc2fb59m4cllxgfv98n9kcj7frgs44dbmlyfxb08"))))
7282 (build-system ruby-build-system)
7283 (arguments
7284 '(#:test-target "spec" ;to avoid rubocop requirement
7285 #:phases (modify-phases %standard-phases
7286 ;; XXX: Warnings make a few tests fail.
7287 ;; Add mutex-m in Gemfile to avoid them.
7288 (add-after 'unpack 'add-mutex-m
7289 (lambda _
7290 (substitute* "Gemfile"
7291 (("^gem \"bump\".*" all)
7292 (string-append all "gem \"mutex_m\"\n")))))
7293 (replace 'replace-git-ls-files
7294 (lambda _
7295 (substitute* "single_cov.gemspec"
7296 (("`git ls-files lib/ bin/ MIT-LICENSE`")
7297 ;; There no longer appear to be a 'bin'
7298 ;; sub-directory.
7299 "`find lib/ MIT-LICENSE -type f | sort`"))))
7300 (add-before 'check 'remove-version-constraints
7301 (lambda _
7302 (delete-file "Gemfile.lock")))
7303 (add-before 'check 'relax-requirements
7304 (lambda _
7305 ;; Remove extraneous requirements.
7306 (substitute* "Rakefile"
7307 ((".*require.*bump.*") ""))
7308 (substitute* "Gemfile"
7309 ((".*gem \"bump\".*") "")
7310 ((".*gem \"rubocop\".*") ""))))
7311 (add-before 'check 'disable-failing-test
7312 (lambda _
7313 ;; XXX: This test copies assets from minitest, but can
7314 ;; not cope with the files being read-only. Just skip
7315 ;; it for now.
7316 (substitute* "specs/single_cov_spec.rb"
7317 (("it \"complains when coverage is bad\"")
7318 "xit \"complains when coverage is bad\"")
7319 (("it \"does not duplicate coverage\"")
7320 "xit \"does not duplicate coverage\"")))))))
7321 (native-inputs (list ruby-minitest ruby-mutex-m ruby-rspec ruby-simplecov))
7322 (synopsis "Code coverage reporting tool")
7323 (description
7324 "This package provides actionable code coverage reports for Ruby
7325projects. It has very little overhead and can be easily integrated with
7326development tools to catch coverage problems early.")
7327 (license license:expat)))
7328
7329(define-public ruby-oedipus-lex
7330 (package
7331 (name "ruby-oedipus-lex")
7332 (version "2.6.1")
7333 (source
7334 (origin
7335 (method url-fetch)
7336 (uri (rubygems-uri "oedipus_lex" version))
7337 (sha256
7338 (base32
7339 "06l4d3l75vhdcmnavnkzr7bd39rb0njxhkbmwrw6ni64z2hlj7w7"))))
7340 (build-system ruby-build-system)
7341 (native-inputs
7342 (list ruby-hoe
7343 ruby-minitest))
7344 (synopsis "Ruby lexer")
7345 (description
7346 "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
7347It is based primarily on generating code much like you would a hand-written
7348lexer. It uses StrScanner within a multi-level case statement. As such,
7349Oedipus matches on the first match, not the longest.")
7350 (home-page "https://github.com/seattlerb/oedipus_lex")
7351 (license license:expat)))
7352
7353(define-public ruby-guard
7354 (package
7355 (name "ruby-guard")
7356 (version "2.13.0")
7357 (source (origin
7358 (method git-fetch)
7359 ;; The gem does not include a Rakefile, nor does it contain a
7360 ;; gemspec file, nor does it come with the tests. This is why
7361 ;; we fetch the tarball from Github.
7362 (uri (git-reference
7363 (url "https://github.com/guard/guard")
7364 (commit (string-append "v" version))))
7365 (file-name (git-file-name name version))
7366 (sha256
7367 (base32
7368 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
7369 (build-system ruby-build-system)
7370 (arguments
7371 `(#:tests? #f ; tests require cucumber
7372 #:phases
7373 (modify-phases %standard-phases
7374 (add-after 'unpack 'remove-git-ls-files
7375 (lambda* (#:key outputs #:allow-other-keys)
7376 (substitute* "guard.gemspec"
7377 (("git ls-files -z") "find . -type f -print0"))))
7378 (replace 'build
7379 (lambda _
7380 (invoke "gem" "build" "guard.gemspec"))))))
7381 (propagated-inputs
7382 (list ruby-formatador
7383 ruby-listen
7384 ruby-lumberjack
7385 ruby-nenv
7386 ruby-notiffany
7387 ruby-pry
7388 ruby-shellany
7389 ruby-thor))
7390 (native-inputs
7391 (list bundler ruby-rspec))
7392 (synopsis "Tool to handle events on file system modifications")
7393 (description
7394 "Guard is a command line tool to easily handle events on file system
7395modifications. Guard automates various tasks by running custom rules whenever
7396file or directories are modified.")
7397 (home-page "https://guardgem.org/")
7398 (license license:expat)))
7399
7400(define-public ruby-spinach
7401 (package
7402 (name "ruby-spinach")
7403 (version "0.12.0")
7404 (home-page "https://github.com/codegram/spinach")
7405 (source (origin
7406 (method url-fetch)
7407 (uri (rubygems-uri "spinach" version))
7408 (sha256
7409 (base32
7410 "1v9nvpvlgjx698dc4q2p1l45sxm5fjjzfxayrkyzb9nv0q0xfjsp"))))
7411 (build-system ruby-build-system)
7412 (arguments
7413 ;; FIXME: Disable tests altogether because they depend on 'capybara'
7414 ;; which in turn depends on many other unpackaged gems. Enable once
7415 ;; capybara is available.
7416 '(#:tests? #f))
7417 (propagated-inputs
7418 (list ruby-colorize ruby-gherkin-ruby))
7419 (synopsis "Gherkin-based BDD framework")
7420 (description
7421 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
7422framework that leverages the expressive @code{Gherkin} language to help you
7423define executable specifications of your code.")
7424 (license license:expat)))
7425
7426(define-public ruby-timers
7427 (package
7428 (name "ruby-timers")
7429 (version "4.3.5")
7430 (source (origin
7431 (method git-fetch)
7432 (uri (git-reference
7433 (url "https://github.com/socketry/timers")
7434 (commit (string-append "v" version))))
7435 (file-name (git-file-name name version))
7436 (sha256
7437 (base32
7438 "1vvahlhk6i1xks1bsha6s64pjjxhagmzvvf1q9h6z3lpcba43rpx"))))
7439 (build-system ruby-build-system)
7440 (arguments
7441 (list #:phases
7442 #~(modify-phases %standard-phases
7443 (add-before 'build 'prune-gems.rb
7444 (lambda _
7445 (substitute* "gems.rb"
7446 ;; These are only required for maintenance.
7447 ((".*gem \"bake-modernize\".*") "")
7448 ((".*gem \"bake-gem\".*") "")
7449 ;; Not actually required by the tests.
7450 ((".*gem 'benchmark-ips'.*") "")
7451 ((".*gem \"ruby-prof\".*") ""))))
7452 (add-before 'build 'remove-missing-signing-key
7453 (lambda _
7454 ;; Otherwise, the build fails with ENOENT.
7455 (substitute* "timers.gemspec"
7456 ((".*spec.signing_key.*") ""))))
7457 (replace 'check
7458 (lambda* (#:key tests? #:allow-other-keys)
7459 (when tests?
7460 (invoke "bake" "test")))))))
7461 (native-inputs
7462 (list ruby-covered
7463 ruby-bake-test
7464 ruby-bake-test-external
7465 ruby-sus))
7466 (synopsis "Collection of Ruby timer classes")
7467 (description "Timers offers a collections of one-shot and periodic timers,
7468intended for use with event loops such as async.")
7469 (home-page "https://github.com/socketry/timers")
7470 (license license:expat)))
7471
7472(define-public ruby-tilt
7473 (package
7474 (name "ruby-tilt")
7475 (version "2.7.0")
7476 (source
7477 (origin
7478 (method git-fetch) ;the distributed gem lacks tests
7479 (uri (git-reference
7480 (url "https://github.com/jeremyevans/tilt")
7481 (commit (string-append "v" version))))
7482 (file-name (git-file-name name version))
7483 (sha256
7484 (base32 "1yzf4mgnypb2dxj1jw08qli01pnczyafgb7akjgl131i96zpdg03"))))
7485 (build-system ruby-build-system)
7486 (arguments
7487 (list
7488 #:phases
7489 #~(modify-phases %standard-phases
7490 (add-before 'check 'set-SASS_IMPLEMENTATION
7491 (lambda _
7492 (setenv "SASS_IMPLEMENTATION" "sassc"))))))
7493 (native-inputs
7494 ;; Missing optional dependencies:
7495 ;; - babel/transpiler by tilt/babel
7496 ;; - coffee_script by tilt/coffee
7497 ;; - commonmarker by tilt/commonmarker
7498 ;; - livescript by tilt/livescript
7499 ;; - radius by tilt/radius
7500 ;; - typescript-node by tilt/typescript
7501 (list ruby-asciidoctor/minimal
7502 ruby-builder
7503 ruby-erubi
7504 ruby-haml
7505 ruby-kramdown
7506 ruby-liquid
7507 ruby-markaby
7508 ruby-nokogiri
7509 ruby-pandoc-ruby
7510 ruby-prawn
7511 ruby-rdiscount
7512 ruby-redcarpet
7513 ruby-redcloth
7514 ruby-sassc
7515 ruby-slim
7516 ruby-yajl-ruby))
7517 (synopsis "Generic interface to multiple Ruby template engines")
7518 (description
7519 "Tilt is a thin interface over a number of different Ruby template
7520engines in an attempt to make their usage as generic as possible.")
7521 (home-page "https://github.com/rtomayko/tilt/")
7522 (license license:expat)))
7523
7524(define-public ruby-tilt/minimal
7525 (hidden-package
7526 (package
7527 (inherit ruby-tilt)
7528 (arguments (list #:tests? #f))
7529 (native-inputs (list))))); clear out for minimal build
7530
7531(define-public ruby-thread-safe
7532 (package
7533 (name "ruby-thread-safe")
7534 (version "0.3.6")
7535 (source
7536 (origin
7537 (method url-fetch)
7538 (uri (rubygems-uri "thread_safe" version))
7539 (sha256
7540 (base32
7541 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
7542 (build-system ruby-build-system)
7543 (arguments
7544 '(#:tests? #f)) ; needs simplecov, among others
7545 (synopsis "Thread-safe utilities for Ruby")
7546 (description "The thread_safe library provides thread-safe collections and
7547utilities for Ruby.")
7548 (home-page "https://github.com/ruby-concurrency/thread_safe")
7549 (license license:asl2.0)))
7550
7551(define-public ruby-tzinfo
7552 ;; XXX: Unreleased for [email protected].
7553 (let ((commit "5cfebcbdbe3beff2a254ea0709a1586968a301a0")
7554 (revision "0"))
7555 (package
7556 (name "ruby-tzinfo")
7557 (version (git-version "2.0.6" revision commit))
7558 (source
7559 (origin
7560 (method git-fetch)
7561 (uri (git-reference
7562 ;; Pull from git because the gem has no tests.
7563 (url "https://github.com/tzinfo/tzinfo")
7564 (commit commit)))
7565 (file-name (git-file-name name version))
7566 (sha256
7567 (base32 "02sp9pp3qxds1cw8kks3iha6ib5wrjybh4d2qjm0rksrqkq1gd6q"))))
7568 (build-system ruby-build-system)
7569 (arguments
7570 (list
7571 #:phases
7572 #~(modify-phases %standard-phases
7573 (add-after 'unpack 'skip-safe-tests
7574 (lambda _
7575 (substitute* "test/test_utils.rb"
7576 (("def safe_test\\(options = \\{\\}\\)")
7577 "def safe_test(options = {})
7578 skip('The Guix build environment has an unsafe load path')"))))
7579 (add-before 'check 'pre-check
7580 (lambda _
7581 (setenv "HOME" (getcwd))
7582 (substitute* "Gemfile"
7583 (("simplecov.*") "simplecov'\n"))))
7584 (replace 'check
7585 (lambda* (#:key tests? test-target #:allow-other-keys)
7586 (when tests?
7587 (invoke "bundler" "exec" "rake" test-target)))))))
7588 (propagated-inputs
7589 (list ruby-concurrent-ruby))
7590 (native-inputs
7591 (list ruby-simplecov))
7592 (synopsis "Time zone library for Ruby")
7593 (description "TZInfo is a Ruby library that provides daylight savings
7594aware transformations between times in different time zones.")
7595 (home-page "https://tzinfo.github.io")
7596 (license license:expat))))
7597
7598(define-public ruby-tzinfo-data
7599 (package
7600 (name "ruby-tzinfo-data")
7601 (version "1.2025.2")
7602 (source
7603 (origin
7604 (method git-fetch)
7605 ;; Download from GitHub because the rubygems version does not contain
7606 ;; Rakefile or tests.
7607 (uri (git-reference
7608 (url "https://github.com/tzinfo/tzinfo-data")
7609 (commit (string-append "v" version))))
7610 (file-name (git-file-name name version))
7611 (sha256
7612 (base32 "00hsw1rga03js3la1fdjvzlixqjjg5fw3xpx71mppkhk61ks728f"))))
7613 (build-system ruby-build-system)
7614 (arguments
7615 (list
7616 #:phases
7617 #~(modify-phases %standard-phases
7618 (add-after 'unpack 'patch-source
7619 (lambda* (#:key inputs #:allow-other-keys)
7620 (substitute* "Rakefile"
7621 (("URI\\.parse\\(url\\)\\.open")
7622 "URI.open(url)")
7623 (("https://data.iana.org/time-zones/releases")
7624 (assoc-ref inputs "tzdata")))))
7625 (add-before 'check 'pre-check
7626 (lambda _
7627 (setenv "HOME" (getcwd))
7628 (substitute* "Rakefile"
7629 ;; Don't need gpg, and it may break after a time.
7630 (("gpg ") "echo ")
7631 ((" sh\\(\\\"make -C" text)
7632 (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
7633 " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
7634 (setenv "CC" #$(cc-for-target)))))))
7635 (propagated-inputs
7636 (list ruby-tzinfo))
7637 (native-inputs
7638 `(("tzdata"
7639 ,(file-union "tzdata-for-ruby-tzdata-info"
7640 `(("tzdata2025b.tar.gz"
7641 ,(origin
7642 (method url-fetch)
7643 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz")
7644 (sha256
7645 (base32
7646 "0x0lswl5v3q3ml8ig4djc76p9zc593xajzp22x881isz6h9h908i"))))
7647 ("tzdata2025b.tar.gz.asc"
7648 ,(origin
7649 (method url-fetch)
7650 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz.asc")
7651 (sha256
7652 (base32
7653 "0ss9h9nqy4hb09ywzsgqrs33l92w8kbjd7m8ahvi9h3mh4jhd742"))))
7654 ("tzcode2025b.tar.gz"
7655 ,(origin
7656 (method url-fetch)
7657 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz")
7658 (sha256
7659 (base32
7660 "1v1mw6599afdcmf5dal7zvjbl3caibkzmlw7kka71vi56pdzxy05"))))
7661 ("tzcode2025b.tar.gz.asc"
7662 ,(origin
7663 (method url-fetch)
7664 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz.asc")
7665 (sha256
7666 (base32
7667 "13vj6s9mvw9083xhzyzzs1a4lgyfqmibx6k2rh4nb2ggy3gmwa22")))))))))
7668 (synopsis "Data from the IANA Time Zone database")
7669 (description
7670 "This library provides @code{TZInfo::Data}, which contains data from the
7671IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
7672 (home-page "https://tzinfo.github.io")
7673 (license license:expat)))
7674
7675(define-public ruby-rb-inotify
7676 (package
7677 (name "ruby-rb-inotify")
7678 (version "0.10.1")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (rubygems-uri "rb-inotify" version))
7683 (sha256
7684 (base32
7685 "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"))))
7686 (build-system ruby-build-system)
7687 (arguments
7688 (list
7689 #:tests? #f ; there are no tests
7690 #:phases
7691 #~(modify-phases %standard-phases
7692 ;; Building the gemspec with rake is not working here since it is
7693 ;; generated with Jeweler. It is also unnecessary because the
7694 ;; existing gemspec does not use any development tools to generate a
7695 ;; list of files.
7696 (replace 'build
7697 (lambda _
7698 (invoke "gem" "build" "rb-inotify.gemspec"))))))
7699 (propagated-inputs
7700 (list ruby-ffi))
7701 (native-inputs
7702 (list ruby-yard))
7703 (synopsis "Ruby wrapper for Linux's inotify")
7704 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
7705kernel subsystem for monitoring changes to files and directories.")
7706 (home-page "https://github.com/nex3/rb-inotify")
7707 (license license:expat)))
7708
7709(define-public ruby-pry-editline
7710 (package
7711 (name "ruby-pry-editline")
7712 (version "1.1.2")
7713 (source (origin
7714 (method url-fetch)
7715 (uri (rubygems-uri "pry-editline" version))
7716 (sha256
7717 (base32
7718 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
7719 (build-system ruby-build-system)
7720 (arguments `(#:tests? #f)) ; no tests included
7721 (native-inputs
7722 (list bundler))
7723 (synopsis "Open the current REPL line in an editor")
7724 (description
7725 "This gem provides a plugin for the Ruby REPL to enable opening the
7726current line in an external editor.")
7727 (home-page "https://github.com/tpope/pry-editline")
7728 (license license:expat)))
7729
7730(define-public ruby-sdoc
7731 (package
7732 (name "ruby-sdoc")
7733 (version "1.1.0")
7734 (source (origin
7735 (method url-fetch)
7736 (uri (rubygems-uri "sdoc" version))
7737 (sha256
7738 (base32
7739 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
7740 (build-system ruby-build-system)
7741 (arguments
7742 `(#:phases
7743 (modify-phases %standard-phases
7744 (add-before 'check 'set-rubylib-and-patch-gemfile
7745 (lambda _
7746 (setenv "RUBYLIB" "lib")
7747 (substitute* "sdoc.gemspec"
7748 (("s.add_runtime_dependency.*") "\n")
7749 (("s.add_dependency.*") "\n"))
7750 (substitute* "Gemfile"
7751 (("gem \"rake\".*")
7752 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n")))))))
7753 (propagated-inputs
7754 (list ruby-json))
7755 (native-inputs
7756 (list bundler ruby-minitest ruby-hoe))
7757 (synopsis "Generate searchable RDoc documentation")
7758 (description
7759 "SDoc is an RDoc documentation generator to build searchable HTML
7760documentation for Ruby code.")
7761 (home-page "https://github.com/voloko/sdoc")
7762 (license license:expat)))
7763
7764(define-public ruby-tins
7765 (package
7766 (name "ruby-tins")
7767 (version "1.29.1")
7768 (source (origin
7769 (method url-fetch)
7770 (uri (rubygems-uri "tins" version))
7771 (sha256
7772 (base32
7773 "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
7774 (build-system ruby-build-system)
7775 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
7776 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
7777 ;; the gemspec.
7778 (arguments
7779 `(#:tests? #f ; there are no tests
7780 #:phases
7781 (modify-phases %standard-phases
7782 (replace 'build
7783 (lambda _
7784 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
7785 ;; causes an error.
7786 (substitute* "tins.gemspec"
7787 (("\"lib/spruz\", ") ""))
7788 (invoke "gem" "build" "tins.gemspec"))))))
7789 (propagated-inputs
7790 (list ruby-sync))
7791 (synopsis "Assorted tools for Ruby")
7792 (description "Tins is a Ruby library providing assorted tools.")
7793 (home-page "https://github.com/flori/tins")
7794 (license license:expat)))
7795
7796(define-public ruby-gemtext
7797 (package
7798 (name "ruby-gemtext")
7799 (version "1.0.3")
7800 (source
7801 (origin
7802 (method url-fetch)
7803 (uri (rubygems-uri "gemtext" version))
7804 (sha256
7805 (base32 "1z559f5z0zvwnqgnny0zf4mppiary020ljxwpw3bdxi2hr9aj3gp"))))
7806 (build-system ruby-build-system)
7807 (synopsis "Gemtext parser for Ruby")
7808 (description
7809 "This package is a Ruby parser library for Gemtext (hypertext format
7810which is intended to serve as the native response format of the Gemini
7811file transfer protocol) and produces a document object of various
7812nodes.")
7813 (home-page "https://github.com/exastencil/gemtext")
7814 (license license:expat)))
7815
7816(define-public ruby-gem-hadar
7817 (package
7818 (name "ruby-gem-hadar")
7819 (version "1.11.0")
7820 (source (origin
7821 (method url-fetch)
7822 (uri (rubygems-uri "gem_hadar" version))
7823 (sha256
7824 (base32
7825 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
7826 (build-system ruby-build-system)
7827 ;; This gem needs itself at development time. We disable rebuilding of the
7828 ;; gemspec to avoid this loop.
7829 (arguments
7830 `(#:tests? #f ; there are no tests
7831 #:phases
7832 (modify-phases %standard-phases
7833 (replace 'build
7834 (lambda _
7835 (invoke "gem" "build" "gem_hadar.gemspec"))))))
7836 (propagated-inputs
7837 (list git-minimal ruby-tins ruby-yard))
7838 (synopsis "Library for the development of Ruby gems")
7839 (description
7840 "This library contains some useful functionality to support the
7841development of Ruby gems.")
7842 (home-page "https://github.com/flori/gem_hadar")
7843 (license license:expat)))
7844
7845(define-public ruby-term-ansicolor
7846 (package
7847 (name "ruby-term-ansicolor")
7848 (version "1.7.1")
7849 (source (origin
7850 (method url-fetch)
7851 (uri (rubygems-uri "term-ansicolor" version))
7852 (sha256
7853 (base32
7854 "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
7855 (build-system ruby-build-system)
7856 ;; Rebuilding the gemspec seems to require git, even though this is not a
7857 ;; git repository, so we just build the gem from the existing gemspec.
7858 (arguments
7859 (list
7860 #:phases
7861 #~(modify-phases %standard-phases
7862 (add-after 'unpack 'fix-test
7863 (lambda -
7864 (substitute* "tests/hsl_triple_test.rb"
7865 (("0\\\\\\.0%")
7866 "0\\.?0?%"))))
7867 (replace 'build
7868 (lambda _
7869 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
7870 (propagated-inputs
7871 (list ruby-tins))
7872 (native-inputs
7873 (list ruby-gem-hadar))
7874 (synopsis "Ruby library to control the attributes of terminal output")
7875 (description
7876 "This Ruby library uses ANSI escape sequences to control the attributes
7877of terminal output.")
7878 (home-page "https://flori.github.io/term-ansicolor/")
7879 ;; There is no mention of the "or later" clause.
7880 (license license:gpl2)))
7881
7882(define-public ruby-immutable-ruby
7883 (package
7884 (name "ruby-immutable-ruby")
7885 (version "0.2.0")
7886 (source
7887 (origin
7888 (method git-fetch)
7889 (uri (git-reference
7890 (url "https://github.com/immutable-ruby/immutable-ruby")
7891 (commit version)))
7892 (file-name (git-file-name name version))
7893 (sha256
7894 (base32 "02sbb24yhg8lxmp4va9js3kn81j268ih4ac4nvgvnq86zdribl8k"))))
7895 (build-system ruby-build-system)
7896 (arguments
7897 (list
7898 #:phases
7899 #~(modify-phases %standard-phases
7900 (replace 'check
7901 (lambda* (#:key tests? #:allow-other-keys)
7902 (when tests? (invoke "ruby" (which "rspec"))))))))
7903 (propagated-inputs (list ruby-concurrent-ruby ruby-sorted-set))
7904 (native-inputs (list ruby-benchmark-ips ruby-pry ruby-rspec))
7905 (synopsis "Efficient, immutable, Thread-Safe Collection classes")
7906 (description
7907 "Immutable-Ruby provides 6 persistent data structures:
7908@code{Hash}, @code{Vector}, @code{Set}, @code{SortedSet}, @code{List}, and
7909@code{Deque} (which works as an immutable queue or stack). Immutable is forked
7910from the Hamster library.")
7911 (home-page "https://github.com/immutable-ruby/immutable-ruby")
7912 (license license:expat)))
7913
7914(define-public ruby-immutable-struct
7915 (package
7916 (name "ruby-immutable-struct")
7917 (version "2.5.0")
7918 (source
7919 (origin
7920 (method git-fetch)
7921 (uri (git-reference
7922 (url "https://github.com/stitchfix/immutable-struct")
7923 (commit version)))
7924 (file-name (git-file-name name version))
7925 (sha256
7926 (base32
7927 "0vsr2spypjf0i7ppg2a0gj3mjj5k3dyqsx224cbsxw51p6cc11c1"))))
7928 (build-system ruby-build-system)
7929 (arguments
7930 (list
7931 #:phases
7932 #~(modify-phases %standard-phases
7933 (replace 'check
7934 (lambda* (#:key tests? #:allow-other-keys)
7935 (when tests?
7936 (invoke "ruby" (which "rspec"))))))))
7937 (native-inputs
7938 (list ruby-rspec))
7939 (synopsis "Ruby library for creating immutable struct classes")
7940 (description
7941 "This package provides a library to help create value objects without
7942the pain of Ruby's Struct (or its setters).")
7943 (home-page "https://stitchfix.github.io/immutable-struct/")
7944 (license license:expat)))
7945
7946(define-public ruby-faker
7947 (package
7948 (name "ruby-faker")
7949 (version "3.6.1")
7950 (source
7951 (origin
7952 (method git-fetch)
7953 (uri (git-reference
7954 (url "https://github.com/faker-ruby/faker")
7955 (commit (string-append "v" version))))
7956 (file-name (git-file-name name version))
7957 (sha256
7958 (base32 "1jv39j3rv1bx4155rsq7cvl13kb173gl8ypvjd7v4ba5cnl5zrrl"))))
7959 (build-system ruby-build-system)
7960 (arguments
7961 (list
7962 #:phases
7963 #~(modify-phases %standard-phases
7964 (add-after 'unpack 'remove-rubocop-from-rakefile
7965 (lambda _
7966 (substitute* "Rakefile"
7967 (("require 'rubocop/rake_task'")
7968 "")
7969 (("RuboCop::RakeTask\\.new")
7970 "")))))))
7971 (native-inputs (list ruby-yard ruby-simplecov ruby-timecop))
7972 (propagated-inputs (list ruby-i18n))
7973 (synopsis "Library for generating fake data")
7974 (description
7975 "Faker is a port of Data::Faker from Perl. It is used to
7976easily generate fake data: names, addresses, phone numbers, etc.")
7977 (home-page "https://github.com/faker-ruby/faker")
7978 (license license:expat)))
7979
7980(define-public ruby-terraform
7981 (package
7982 (name "ruby-terraform")
7983 (version "1.9.0")
7984 (source
7985 (origin
7986 (method git-fetch)
7987 (uri (git-reference
7988 (url "https://github.com/infrablocks/ruby_terraform")
7989 (commit (string-append "v" version))))
7990 (file-name (git-file-name name version))
7991 (sha256
7992 (base32
7993 "0j2gzpg28d62l2dgm9cnblwq76h148b2rdscql41f7913q7f5x82"))))
7994 (build-system ruby-build-system)
7995 (arguments
7996 (list
7997 #:test-target "spec"
7998 #:phases
7999 #~(modify-phases %standard-phases
8000 (add-after 'unpack 'remove-gemlock
8001 (lambda _
8002 (delete-file "Gemfile.lock")))
8003 (add-after 'unpack 'disable-bundler
8004 (lambda _
8005 (substitute* "spec/spec_helper.rb"
8006 (("require 'bundler/setup'") ""))))
8007 (add-before 'check 'disable-falinig-tests
8008 (lambda _
8009 (substitute* "spec/ruby_terraform/commands/plan_spec.rb"
8010 (("it 'logs an error raised when running the command'")
8011 "xit 'logs an error raised when running the command'")
8012 (("it 'raises execution error when an error occurs running the command'")
8013 "xit 'raises execution error when an error occurs running the command'"))))
8014 (replace 'check
8015 (lambda* (#:key tests? #:allow-other-keys)
8016 (when tests?
8017 (invoke "rspec")))))))
8018 (native-inputs
8019 (list ruby-rspec
8020 ruby-faker
8021 ruby-simplecov))
8022 (propagated-inputs
8023 (list ruby-lino ruby-immutable-struct))
8024 (synopsis "Ruby wrapper around the Terraform command line interface")
8025 (description
8026 "This package provides a Ruby wrapper around the Terraform command line
8027interface so that Terraform can be more easily invoked from Ruby code.")
8028 (home-page "https://github.com/infrablocks/ruby_terraform")
8029 (license license:expat)))
8030
8031(define-public ruby-pstree
8032 (package
8033 (name "ruby-pstree")
8034 (version "0.3.0")
8035 (source (origin
8036 (method url-fetch)
8037 (uri (rubygems-uri "pstree" version))
8038 (sha256
8039 (base32
8040 "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
8041 (build-system ruby-build-system)
8042 (native-inputs
8043 (list ruby-gem-hadar bundler))
8044 (synopsis "Create a process tree data structure")
8045 (description
8046 "This library uses the output of the @code{ps} command to create a
8047process tree data structure for the current host.")
8048 (home-page "https://github.com/flori/pstree")
8049 ;; There is no mention of the "or later" clause.
8050 (license license:gpl2)))
8051
8052(define-public ruby-psych
8053 (let ((revision "0")
8054 ;; For older Ractor workaround.
8055 (commit "1a4d383efe0bf12e0e7d67c8ecf61ab39aec526c"))
8056 (package
8057 (name "ruby-psych")
8058 (version (git-version "5.4.0" revision commit))
8059 (source (origin
8060 (method git-fetch) ;for tests
8061 (uri (git-reference
8062 (url "https://github.com/ruby/psych")
8063 (commit commit)))
8064 (file-name (git-file-name name version))
8065 (sha256
8066 (base32
8067 "0nkpzy9f7r457inc3a4jx961zvjkl6xsw8yfvwzp7901hmpp4wvy"))))
8068 (build-system ruby-build-system)
8069 (arguments
8070 (list
8071 #:phases
8072 #~(modify-phases %standard-phases
8073 (add-before 'build 'compile
8074 (lambda _
8075 (invoke "rake" "compile"))))))
8076 (inputs
8077 (list libyaml))
8078 (native-inputs
8079 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8080 (propagated-inputs (list ruby-date ruby-stringio))
8081 (synopsis "Ruby YAML parser and emitter")
8082 (description
8083 "Psych is a YAML parser and emitter. Psych leverages libyaml for its
8084YAML parsing and emitting capabilities. In addition to wrapping libyaml,
8085Psych also knows how to serialize and de-serialize most Ruby objects to and
8086from the YAML format.")
8087 (home-page "https://github.com/ruby/psych")
8088 (license license:expat))))
8089
8090(define-public ruby-psych-3
8091 (package
8092 (inherit ruby-psych)
8093 (version "3.3.4")
8094 (source (origin
8095 (method git-fetch) ;for tests
8096 (uri (git-reference
8097 (url "https://github.com/ruby/psych")
8098 (commit (string-append "v" version))))
8099 (file-name (git-file-name "ruby-psych" version))
8100 (sha256
8101 (base32
8102 "11f7bxbhaj5697izap7hfbiln6lfk5cks78a498mkyhs2ylhl0fc"))))
8103 (arguments
8104 (substitute-keyword-arguments arguments
8105 ((#:phases phases '%standard-phases)
8106 #~(modify-phases #$phases
8107 (add-after 'unpack 'fix-deprecated-syntax
8108 (lambda _
8109 (substitute* "test/psych/test_yaml.rb"
8110 (("Regexp\\.new\\('',0,'n'\\)")
8111 "Regexp.new('',Regexp::NOENCODING)"))))
8112 (replace 'check
8113 (lambda* (#:key tests? #:allow-other-keys)
8114 (when tests?
8115 (invoke "rake" "test"))))))))
8116 (native-inputs (modify-inputs native-inputs
8117 (append ruby-bigdecimal)))))
8118
8119(define-public ruby-utils
8120 (package
8121 (name "ruby-utils")
8122 (version "0.9.0")
8123 (source (origin
8124 (method url-fetch)
8125 (uri (rubygems-uri "utils" version))
8126 (sha256
8127 (base32
8128 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
8129 (build-system ruby-build-system)
8130 (propagated-inputs
8131 (list ruby-tins ruby-term-ansicolor ruby-pstree ruby-pry-editline))
8132 (native-inputs
8133 (list ruby-gem-hadar bundler))
8134 (synopsis "Command line tools for working with Ruby")
8135 (description
8136 "This package provides assorted command line tools that may be useful
8137when working with Ruby code.")
8138 (home-page "https://github.com/flori/utils")
8139 ;; There is no mention of the "or later" clause.
8140 (license license:gpl2)))
8141
8142(define-public ruby-jaro-winkler
8143 (package
8144 (name "ruby-jaro-winkler")
8145 (version "1.6.0")
8146 (source
8147 (origin
8148 (method url-fetch)
8149 (uri (rubygems-uri "jaro_winkler" version))
8150 (sha256
8151 (base32 "09645h5an19zc1i7wlmixszj8xxqb2zc8qlf8dmx39bxpas1l24b"))))
8152 (build-system ruby-build-system)
8153 (arguments
8154 '(#:tests? #f)) ; no included tests
8155 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
8156 (description
8157 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
8158algorithm. It is written as a C extension and will fallback to a pure Ruby
8159implementation on platforms where this is unsupported.")
8160 (home-page "https://github.com/tonytonyjan/jaro_winkler")
8161 (license license:expat)))
8162
8163(define-public ruby-json-pure
8164 (package
8165 (name "ruby-json-pure")
8166 (version "2.6.3")
8167 (source
8168 (origin
8169 ;; For tests
8170 (method git-fetch)
8171 (uri (git-reference
8172 (url "https://github.com/flori/json.git")
8173 (commit (string-append "v" version))))
8174 (file-name (git-file-name name version))
8175 (sha256
8176 (base32
8177 "0551269c98a07m6bl594syh5vknrm3c636a4dxis9jpsb7vf7lfx"))))
8178 (build-system ruby-build-system)
8179 (arguments
8180 (list
8181 #:phases
8182 #~(modify-phases %standard-phases
8183 (add-after 'unpack 'fix-rakefile
8184 (lambda _
8185 (substitute* "Rakefile"
8186 ;; Since this is not a git repository, do not call 'git'.
8187 (("`git ls-files`") "`find . -type f |sort`")))))))
8188 (native-inputs
8189 (list bundler ragel ruby-simplecov ruby-test-unit which))
8190 (synopsis "JSON implementation in pure Ruby")
8191 (description
8192 "This package provides a JSON implementation written in pure Ruby.")
8193 (home-page "https://flori.github.io/json/")
8194 (license license:ruby)))
8195
8196(define-public ruby-jwt
8197 (package
8198 (name "ruby-jwt")
8199 (version "2.7.1")
8200 (source
8201 (origin
8202 ;; For tests
8203 (method git-fetch)
8204 (uri (git-reference
8205 (url "https://github.com/jwt/ruby-jwt")
8206 (commit (string-append "v" version))))
8207 (file-name (git-file-name name version))
8208 (sha256
8209 (base32
8210 "12ss6knfis6a6a41qndalnlvq3yykhpg6igzll8qyssnnwi9zdw7"))))
8211 (build-system ruby-build-system)
8212 (arguments
8213 (list
8214 #:test-target "test"
8215 #:phases
8216 #~(modify-phases %standard-phases
8217 (add-after 'unpack 'remove-unnecessary-dependencies
8218 (lambda _
8219 (substitute* "ruby-jwt.gemspec"
8220 (("spec\\.add_development_dependency 'appraisal'") "")
8221 (("spec\\.add_development_dependency 'simplecov'") ""))
8222 (substitute* "Gemfile"
8223 (("gem 'rubocop'.*") ""))
8224 (substitute* "Rakefile"
8225 (("require 'rubocop/rake_task'") "")
8226 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") ""))
8227 (substitute* "spec/spec_helper.rb"
8228 (("require 'simplecov.*") "\n")
8229 ;; Use [].each to disable running the SimpleCov configuration
8230 ;; block
8231 (("SimpleCov\\.configure") "[].each")
8232 (("require 'codeclimate-test-reporter'") "")
8233 (("require 'codacy-coverage'") "")
8234 (("Codacy::Reporter\\.start") "")))))))
8235 (native-inputs
8236 (list bundler ruby-rspec ruby-rbnacl))
8237 (synopsis "Ruby implementation of the JSON Web Token standard")
8238 (description
8239 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
8240@acronym{JWT, JSON Web Token} standard.")
8241 (home-page "https://github.com/jwt/ruby-jwt")
8242 (license license:expat)))
8243
8244;; Even though this package only provides bindings for a Mac OSX API it is
8245;; required by "ruby-listen" at runtime.
8246(define-public ruby-rb-fsevent
8247 (package
8248 (name "ruby-rb-fsevent")
8249 (version "0.10.3")
8250 (source (origin
8251 (method url-fetch)
8252 (uri (rubygems-uri "rb-fsevent" version))
8253 (sha256
8254 (base32
8255 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
8256 (build-system ruby-build-system)
8257 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
8258 ;; "listen", which needs "rb-fsevent" at runtime.
8259 (arguments `(#:tests? #f))
8260 (synopsis "FSEvents API with signals catching")
8261 (description
8262 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
8263 (home-page "https://rubygems.org/gems/rb-fsevent")
8264 (license license:expat)))
8265
8266(define-public ruby-listen
8267 (package
8268 (name "ruby-listen")
8269 (version "3.8.0")
8270 (source
8271 (origin
8272 ;; The gem does not include a Rakefile, so fetch from the Git
8273 ;; repository.
8274 (method git-fetch)
8275 (uri (git-reference
8276 (url "https://github.com/guard/listen")
8277 (commit (string-append "v" version))))
8278 (file-name (git-file-name name version))
8279 (sha256
8280 (base32
8281 "1skkglml094dw1xr4742in1rwwa84ld0mz4nkw6qa8pwhx48x2n5"))))
8282 (build-system ruby-build-system)
8283 (arguments
8284 (list
8285 #:test-target "spec"
8286 #:phases
8287 #~(modify-phases %standard-phases
8288 (add-after 'unpack 'fix-files-in-gemspec
8289 (lambda _
8290 (substitute* "listen.gemspec"
8291 (("`git ls-files -z`")
8292 "`find . -type f -printf '%P\\\\0' |sort -z`"))))
8293 (add-before 'check 'remove-unnecessary-dependencies'
8294 (lambda _
8295 (substitute* "Rakefile"
8296 ;; Rubocop is for code linting, and is unnecessary for running
8297 ;; the tests.
8298 ((".*rubocop.*") "")))))))
8299 (native-inputs
8300 (list bundler ruby-rspec))
8301 (inputs
8302 (list ;; ruby-thor is used for the command line interface, and is referenced
8303 ;; in the wrapper, and therefore just needs to be an input.
8304 ruby-thor))
8305 (propagated-inputs
8306 (list ruby-rb-fsevent ruby-rb-inotify))
8307 (synopsis "Listen to file modifications")
8308 (description "The Listen gem listens to file modifications and notifies
8309you about the changes.")
8310 (home-page "https://github.com/guard/listen")
8311 (license license:expat)))
8312
8313(define-public ruby-loofah
8314 (package
8315 (name "ruby-loofah")
8316 (version "2.24.1")
8317 (source
8318 (origin
8319 ;; Build from git because the gem lacks tests.
8320 (method git-fetch)
8321 (uri (git-reference (url "https://github.com/flavorjones/loofah")
8322 (commit (string-append "v" version))))
8323 (file-name (git-file-name name version))
8324 (sha256
8325 (base32 "07ngn69i86afqcpwv3yc977krbgq8b201gxz0pg3kp8wrliig44f"))))
8326 (build-system ruby-build-system)
8327 (arguments
8328 (list
8329 ;; tests: 1093 runs, 3586 assertions, 0 failures, 0 errors, 0 skips
8330 #:phases
8331 #~(modify-phases %standard-phases
8332 (add-after 'unpack 'skip-failing-tests
8333 (lambda _
8334 (delete-file "test/assets/testdata_sanitizer_tests1.dat"))))))
8335 (native-inputs
8336 (list ruby-hoe ruby-hoe-markdown ruby-rr))
8337 (propagated-inputs
8338 (list ruby-nokogiri ruby-crass))
8339 (home-page "https://github.com/flavorjones/loofah")
8340 (synopsis "Ruby library for manipulating and transforming HTML/XML")
8341 (description
8342 "Loofah is a general library for manipulating and transforming HTML/XML
8343documents and fragments. It's built on top of Nokogiri and libxml2.")
8344 (license license:expat)))
8345
8346(define-public ruby-crass
8347 (package
8348 (name "ruby-crass")
8349 (version "1.0.6")
8350 (home-page "https://github.com/rgrove/crass")
8351 (source (origin
8352 ;; The gem does not contain tests, so pull from git.
8353 (method git-fetch)
8354 (uri (git-reference
8355 (url home-page)
8356 (commit (string-append "v" version))))
8357 (file-name (git-file-name name version))
8358 (sha256
8359 (base32
8360 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
8361 (build-system ruby-build-system)
8362 (arguments
8363 (list #:phases
8364 #~(modify-phases %standard-phases
8365 (add-after 'unpack 'patch-minitest
8366 (lambda _
8367 (substitute* "test/support/common.rb"
8368 (("MiniTest")
8369 "Minitest")))))))
8370 (synopsis "Pure Ruby CSS parser")
8371 (description
8372 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
8373 (license license:expat)))
8374
8375(define-public ruby-samovar
8376 (package
8377 (name "ruby-samovar")
8378 (version "2.1.4")
8379 (source (origin
8380 (method git-fetch) ;for tests
8381 (uri (git-reference
8382 (url "https://github.com/ioquatix/samovar")
8383 (commit (string-append "v" version))))
8384 (file-name (git-file-name name version))
8385 (sha256
8386 (base32
8387 "05pc5xlbv44anx0sfqssh0xhxg297bvl5slsl7k1vnka4k5fhax6"))))
8388 (build-system ruby-build-system)
8389 (native-inputs (list ruby-covered ruby-rspec))
8390 (propagated-inputs (list ruby-console ruby-mapping))
8391 (synopsis "Flexible option parser for Ruby")
8392 (description "Samovar is a modern framework for building command-line
8393tools and applications. It provides a declarative class-based DSL for
8394building command-line parsers that include automatic documentation generation.
8395It helps you keep your functionality clean and isolated where possible.")
8396 (home-page "https://github.com/ioquatix/samovar")
8397 (license license:expat)))
8398
8399(define-public ruby-sanitize
8400 (package
8401 (name "ruby-sanitize")
8402 (version "7.0.0")
8403 (source (origin
8404 (method git-fetch)
8405 ;; The gem does not include the Rakefile, so we download the
8406 ;; source from Github.
8407 (uri (git-reference
8408 (url "https://github.com/rgrove/sanitize")
8409 (commit (string-append "v" version))))
8410 (file-name (git-file-name name version))
8411 (sha256
8412 (base32
8413 "14598z31g319q7vmn23jriwkm26705ciwy73a8dlsxqhp1wrcv69"))))
8414 (build-system ruby-build-system)
8415 (arguments
8416 (list
8417 #:phases
8418 #~(modify-phases %standard-phases
8419 (add-after 'unpack 'patch
8420 (lambda _
8421 (substitute* "Rakefile"
8422 (("require \"standard/rake\"") "")))))))
8423 (propagated-inputs (list ruby-crass ruby-nokogiri))
8424 (native-inputs (list ruby-minitest))
8425 (home-page "https://github.com/rgrove/sanitize")
8426 (synopsis "Whitelist-based HTML and CSS sanitizer")
8427 (description
8428 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
8429acceptable elements, attributes, and CSS properties, Sanitize will remove all
8430unacceptable HTML and/or CSS from a string.")
8431 (license license:expat)))
8432
8433(define-public ruby-sync
8434 (package
8435 (name "ruby-sync")
8436 (version "0.5.0")
8437 (source
8438 (origin
8439 (method url-fetch)
8440 (uri (rubygems-uri "sync" version))
8441 (sha256
8442 (base32
8443 "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
8444 (build-system ruby-build-system)
8445 (synopsis "Ruby module with a two-phase lock and counter")
8446 (description "This package provides a Ruby module that provides a two-phase
8447lock with a counter.")
8448 (home-page "https://github.com/ruby/sync")
8449 (license license:bsd-2)))
8450
8451(define-public ruby-oj
8452 (package
8453 (name "ruby-oj")
8454 (version "3.16.9")
8455 (source
8456 (origin
8457 (method git-fetch)
8458 ;; Version on rubygems.org does not contain Rakefile, so download from
8459 ;; GitHub instead.
8460 (uri (git-reference
8461 (url "https://github.com/ohler55/oj")
8462 (commit (string-append "v" version))))
8463 (file-name (git-file-name name version))
8464 (sha256
8465 (base32
8466 "01zsvzgpn336lk93v8fr4lpjdl28hiq9iddxr7rcra3d28780fzi"))))
8467 (build-system ruby-build-system)
8468 (arguments
8469 '(#:test-target "test_all"
8470 #:phases
8471 (modify-phases %standard-phases
8472 (add-after 'unpack 'patch-bash
8473 (lambda* (#:key inputs #:allow-other-keys)
8474 (substitute* "test/test_writer.rb"
8475 (("/bin/bash")
8476 (search-input-file inputs "bin/bash")))))
8477 (add-before 'check 'disable-bundler
8478 (lambda _
8479 (substitute* "Rakefile"
8480 (("Bundler\\.with_clean_env") "1.times")
8481 (("bundle exec ") "")))))))
8482 (native-inputs
8483 (list bash-minimal bundler ruby-rspec ruby-rake-compiler))
8484 (synopsis "JSON parser for Ruby optimized for speed")
8485 (description
8486 "Oj is a JSON parser and generator for Ruby, where the encoding and
8487decoding of JSON is implemented as a C extension to Ruby.")
8488 (home-page "https://www.ohler.com/oj/")
8489 (license (list license:expat ; Ruby code
8490 license:bsd-3)))) ; extension code
8491
8492(define-public ruby-ox
8493 (package
8494 (name "ruby-ox")
8495 (version "2.14.21")
8496 (source
8497 (origin
8498 (method url-fetch)
8499 (uri (rubygems-uri "ox" version))
8500 (sha256
8501 (base32
8502 "1fd0pjv8svyq8g49zaqfksq9zhxv1rwvsqslvxhimaywggwpmirc"))))
8503 (build-system ruby-build-system)
8504 (arguments
8505 '(#:tests? #f)) ; no tests
8506 (synopsis "Optimized XML library for Ruby")
8507 (description
8508 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
8509written as a native C extension. It was designed to be an alternative to
8510Nokogiri and other Ruby XML parsers for generic XML parsing and as an
8511alternative to Marshal for Object serialization.")
8512 (home-page "https://www.ohler.com/ox")
8513 (license license:expat)))
8514
8515(define-public ruby-redcloth
8516 (package
8517 (name "ruby-redcloth")
8518 (version "4.3.2")
8519 (source (origin
8520 (method url-fetch)
8521 (uri (rubygems-uri "RedCloth" version))
8522 (sha256
8523 (base32
8524 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
8525 (build-system ruby-build-system)
8526 (arguments
8527 `(#:tests? #f ; no tests
8528 #:phases
8529 (modify-phases %standard-phases
8530 ;; Redcloth has complicated rake tasks to build various versions for
8531 ;; multiple targets using RVM. We don't want this so we just use the
8532 ;; existing gemspec.
8533 (replace 'build
8534 (lambda _
8535 (invoke "gem" "build" "redcloth.gemspec"))))))
8536 (native-inputs
8537 `(("bundler" ,bundler)
8538 ("ruby-diff-lcs" ,ruby-diff-lcs)
8539 ("ruby-rspec-2" ,ruby-rspec-2)))
8540 (synopsis "Textile markup language parser for Ruby")
8541 (description
8542 "RedCloth is a Ruby parser for the Textile markup language.")
8543 (home-page "http://redcloth.org")
8544 (license license:expat)))
8545
8546(define-public ruby-pg
8547 (package
8548 (name "ruby-pg")
8549 (version "1.6.3")
8550 (home-page "https://github.com/ged/ruby-pg")
8551 (source
8552 (origin
8553 (method git-fetch)
8554 (uri (git-reference
8555 (url home-page)
8556 (commit (string-append "v" version))))
8557 (file-name (git-file-name name version))
8558 (sha256
8559 (base32 "0nvswm5dv0n3mm8isnnvd8rzw7s47dd5kgma34fhnyhidc6v4pca"))))
8560 (build-system ruby-build-system)
8561 (arguments
8562 (list
8563 #:test-target "spec"
8564 #:phases
8565 #~(modify-phases %standard-phases
8566 (add-before 'build 'compile
8567 (lambda _
8568 (invoke "rake" "compile")))
8569 ;; Some tests rely on postgresql_lib_path.rb, but it is not
8570 ;; available until the gem is installed. Run tests after
8571 ;; installing to work around it.
8572 (delete 'check)
8573 (add-after 'install 'check
8574 (lambda* (#:key tests? #:allow-other-keys)
8575 (let ((new-gem (string-append #$output
8576 "/lib/ruby/vendor_ruby")))
8577 (setenv "GEM_PATH"
8578 (string-append (getenv "GEM_PATH") ":" new-gem))
8579 (when tests?
8580 (invoke "rspec"))))))))
8581 (native-inputs (list ruby-rake-compiler ruby-hoe ruby-rspec))
8582 (inputs (list postgresql))
8583 (synopsis "Ruby interface to PostgreSQL")
8584 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
8585with PostgreSQL 10 and later.")
8586 (license license:ruby)))
8587
8588(define-public ruby-byebug
8589 (package
8590 (name "ruby-byebug")
8591 (version "12.0.0")
8592 (source
8593 (origin
8594 (method git-fetch)
8595 (uri (git-reference
8596 (url "https://github.com/deivid-rodriguez/byebug")
8597 (commit (string-append "v" version))))
8598 (file-name (git-file-name name version))
8599 (sha256
8600 (base32
8601 "0pjdadc079rmasgiwdxcz8h9wvzk3mb6xq8xr02xxv616ihwxllk"))
8602 (modules '((guix build utils)))
8603 (snippet
8604 '(begin
8605 ;; Remove wrappers that try to setup a bundle environment.
8606 (with-directory-excursion "bin"
8607 (for-each delete-file '("rake" "rubocop"))
8608 ;; ruby-minitest doesn't come with a launcher, so fix the one
8609 ;; provided.
8610 (substitute* "minitest"
8611 (("load File\\.expand_path\\(\"bundle\".*") "")
8612 (("require \"bundler/setup\".*") "")))))))
8613 (build-system ruby-build-system)
8614 (arguments
8615 (list
8616 #:phases
8617 #~(modify-phases %standard-phases
8618 (add-after 'unpack 'sanitize-dependencies
8619 (lambda _
8620 (delete-file "tasks/release.rake")
8621 (substitute* "Rakefile"
8622 ((".*tasks/release.rake.*") ""))))
8623 (add-after 'unpack 'skip-tmp-path-sensitive-test
8624 (lambda _
8625 (substitute* "test/commands/where_test.rb"
8626 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
8627 "unless true\n"))))
8628 (add-before 'build 'compile
8629 (lambda _
8630 (invoke "rake" "compile")))
8631 (add-before 'check 'patch-tests
8632 (lambda _
8633 ;; srand': no implicit conversion of nil into Integer (TypeError)
8634 (delete-file "test/minitest_runner_test.rb")
8635 ;; Expects 5, gets 162. From a file containing ~10 lines.
8636 (substitute* "test/commands/finish_test.rb"
8637 (("test_finish_inside_autoloaded_files")
8638 "finish_inside_autoloaded_files"))))
8639 (add-before 'check 'set-home
8640 (lambda _
8641 (setenv "HOME" (getcwd)))))))
8642 (native-inputs
8643 (list bundler
8644 ruby-minitest
8645 ruby-pry
8646 ruby-rake-compiler
8647 ruby-rubocop
8648 ruby-yard))
8649 (synopsis "Debugger for Ruby 2")
8650 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
8651TracePoint C API for execution control and the Debug Inspector C API for call
8652stack navigation. The core component provides support that front-ends can
8653build on. It provides breakpoint handling and bindings for stack frames among
8654other things and it comes with a command line interface.")
8655 (home-page "https://github.com/deivid-rodriguez/byebug")
8656 (license license:bsd-2)))
8657
8658(define-public ruby-netrc
8659 (package
8660 (name "ruby-netrc")
8661 (version "0.11.0")
8662 (source (origin
8663 (method url-fetch)
8664 (uri (rubygems-uri "netrc" version))
8665 (sha256
8666 (base32
8667 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
8668 (build-system ruby-build-system)
8669 (arguments
8670 `(#:phases
8671 (modify-phases %standard-phases
8672 (replace 'check
8673 ;; There is no Rakefile and minitest can only run one file at once,
8674 ;; so we have to iterate over all test files.
8675 (lambda _
8676 (for-each (lambda (file)
8677 (invoke "ruby" "-Itest" file))
8678 (find-files "./test" "test_.*\\.rb"))))
8679 (add-before 'check 'patch-tests-for-newer-ruby
8680 (lambda _
8681 (substitute* "test/test_netrc.rb"
8682 (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
8683 (native-inputs
8684 (list ruby-minitest))
8685 (synopsis "Library to read and update netrc files")
8686 (description
8687 "This library can read and update netrc files, preserving formatting
8688including comments and whitespace.")
8689 (home-page "https://github.com/geemus/netrc")
8690 (license license:expat)))
8691
8692(define-public ruby-unf-ext
8693 (package
8694 (name "ruby-unf-ext")
8695 (version "0.0.9.1")
8696 (source (origin
8697 (method url-fetch)
8698 (uri (rubygems-uri "unf_ext" version))
8699 (sha256
8700 (base32
8701 "1sf6bxvf6x8gihv6j63iakixmdddgls58cpxpg32chckb2l18qcj"))))
8702 (build-system ruby-build-system)
8703 (arguments
8704 `(#:phases
8705 (modify-phases %standard-phases
8706 (add-after 'build 'build-ext
8707 (lambda _ (invoke "rake" "compile:unf_ext")))
8708 (add-before 'check 'lose-rake-compiler-dock-dependency
8709 (lambda _
8710 ;; rake-compiler-dock is listed in the gemspec, but only
8711 ;; required when cross-compiling.
8712 (substitute* "unf_ext.gemspec"
8713 ((".*rake-compiler-dock.*") "")))))))
8714 (native-inputs
8715 (list bundler ruby-rake-compiler ruby-test-unit))
8716 (synopsis "Unicode normalization form support library")
8717 (description
8718 "This package provides unicode normalization form support for Ruby.")
8719 (home-page "https://github.com/knu/ruby-unf_ext")
8720 (license license:expat)))
8721
8722(define-public ruby-tdiff
8723 ;; Use a newer than released snapshot so that rspec-2 is not required.
8724 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
8725 (package
8726 (name "ruby-tdiff")
8727 (version (string-append "0.3.3-1." (string-take commit 8)))
8728 (source (origin
8729 (method git-fetch)
8730 (uri (git-reference
8731 (url "https://github.com/postmodern/tdiff")
8732 (commit commit)))
8733 (file-name (string-append name "-" version "-checkout"))
8734 (sha256
8735 (base32
8736 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
8737 (build-system ruby-build-system)
8738 (native-inputs
8739 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8740 (synopsis "Calculate the differences between two tree-like structures")
8741 (description
8742 "This library provides functions to calculate the differences between two
8743tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
8744 (home-page "https://github.com/postmodern/tdiff")
8745 (license license:expat))))
8746
8747(define-public ruby-nokogiri-diff
8748 ;; Use a newer than released snapshot so that rspec-2 is not required.
8749 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
8750 (package
8751 (name "ruby-nokogiri-diff")
8752 (version (string-append "0.2.0-1." (string-take commit 8)))
8753 (source (origin
8754 (method git-fetch)
8755 (uri (git-reference
8756 (url "https://github.com/postmodern/nokogiri-diff")
8757 (commit commit)))
8758 (file-name (string-append name "-" version "-checkout"))
8759 (sha256
8760 (base32
8761 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
8762 (build-system ruby-build-system)
8763 (propagated-inputs
8764 (list ruby-tdiff
8765 ruby-nokogiri))
8766 (native-inputs
8767 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8768 (synopsis "Calculate the differences between two XML/HTML documents")
8769 (description
8770 "@code{Nokogiri::Diff} adds the ability to calculate the
8771differences (added or removed nodes) between two XML/HTML documents.")
8772 (home-page "https://github.com/postmodern/nokogiri-diff")
8773 (license license:expat))))
8774
8775(define-public ruby-racc
8776 (package
8777 (name "ruby-racc")
8778 (version "1.8.1")
8779 (source
8780 (origin
8781 (method git-fetch) ;for tests
8782 (uri (git-reference
8783 (url "https://github.com/ruby/racc")
8784 (commit (string-append "v" version))))
8785 (file-name (git-file-name name version))
8786 (sha256
8787 (base32
8788 "1sg2mqp6yxdxrn9kbbsxkd6930fxvm4yjl8knsc0wq6fkipnhm8q"))))
8789 (build-system ruby-build-system)
8790 (arguments
8791 (list
8792 #:phases
8793 #~(modify-phases %standard-phases
8794 (add-before 'build 'compile
8795 (lambda _
8796 (invoke "rake" "compile"))))))
8797 (native-inputs
8798 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8799 (synopsis "LALR(1) parser generator for Ruby")
8800 (description
8801 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
8802generates Ruby program.")
8803 (home-page "https://i.loveruby.net/en/projects/racc/")
8804 (license (list
8805 ;; Generally licensed under the LGPL2.1, and some files also
8806 ;; available under the same license as Ruby.
8807 license:lgpl2.1
8808 license:ruby))))
8809
8810(define-public ruby-rack
8811 (package
8812 (name "ruby-rack")
8813 ;; Do not upgrade to version 3, as Rails doesn't support it yet.
8814 (version "2.2.22")
8815 (source
8816 (origin
8817 (method git-fetch) ;for tests
8818 (uri (git-reference
8819 (url "https://github.com/rack/rack")
8820 (commit (string-append "v" version))))
8821 (file-name (git-file-name name version))
8822 (sha256
8823 (base32
8824 "0b56zbq0pr133839dv2n0qq5326kak7czv92awg12ipghwx5q9gj"))))
8825 (build-system ruby-build-system)
8826 (arguments
8827 (list
8828 #:phases
8829 #~(modify-phases %standard-phases
8830 (add-before 'check 'fix-tests
8831 (lambda _
8832 ;; This test fails in the build environment (and passes outside
8833 ;; of it).
8834 (substitute* "test/spec_files.rb"
8835 (("res.body.must_equal expected_body") ""))
8836 ;; A few of the tests use the length of a file on disk for
8837 ;; Content-Length and Content-Range headers. However, this file
8838 ;; has a shebang in it which an earlier phase patches, growing
8839 ;; the file size from 193 to 239 bytes when the store prefix is
8840 ;; "/gnu/store".
8841 (let ((size-diff (- (string-length (which "ruby"))
8842 (string-length "/usr/bin/env ruby"))))
8843 (substitute* '("test/spec_files.rb")
8844 (("208" bytes)
8845 (number->string (+ (string->number bytes) size-diff)))
8846 (("bytes(.)22-33" all delimiter)
8847 (string-append "bytes"
8848 delimiter
8849 (number->string (+ 22 size-diff))
8850 "-"
8851 (number->string (+ 33 size-diff)))))))))))
8852 (native-inputs
8853 (list ruby-minitest
8854 ruby-minitest-global-expectations
8855 ruby-webrick))
8856 (synopsis "Unified web application interface for Ruby")
8857 (description "Rack provides a minimal, modular and adaptable interface for
8858developing web applications in Ruby. By wrapping HTTP requests and responses,
8859it unifies the API for web servers, web frameworks, and software in between
8860into a single method call.")
8861 (home-page "https://github.com/rack/rack")
8862 (license license:expat)))
8863
8864(define-public ruby-rack-next
8865 (package
8866 (inherit ruby-rack)
8867 (name "ruby-rack")
8868 (version "3.2.5")
8869 (source (origin
8870 (method git-fetch) ;for tests
8871 (uri (git-reference
8872 (url "https://github.com/rack/rack")
8873 (commit (string-append "v" version))))
8874 (file-name (git-file-name name version))
8875 (sha256
8876 (base32
8877 "1l1q3x9k56kwa81r1fpm0z9r92c4r4dryblw5jzcawx1pbvvsh6z"))))
8878 (arguments '())))
8879
8880(define-public ruby-rackup
8881 (package
8882 (name "ruby-rackup")
8883 (version "2.3.1")
8884 (source (origin
8885 (method git-fetch)
8886 (uri (git-reference
8887 (url "https://github.com/rack/rackup")
8888 (commit (string-append "v" version))))
8889 (file-name (git-file-name name version))
8890 (sha256
8891 (base32
8892 "0w8npy6n77wfykq6wb4484rk94raks75n4fsb5xi7kgjg2ngqfg3"))))
8893 (build-system ruby-build-system)
8894 (native-inputs (list ruby-minitest-global-expectations))
8895 (inputs (list ruby-rack-next ruby-webrick))
8896 (synopsis "Command line interface (CLI) for running for Rack applications")
8897 (description "This package provides a command line interface for running
8898for Rack applications.")
8899 (home-page "https://github.com/rack/rackup")
8900 (license license:expat)))
8901
8902(define-public ruby-rackup-1
8903 (package
8904 (inherit ruby-rackup)
8905 (name "ruby-rackup")
8906 (version "1.0.1")
8907 (source (origin
8908 (method git-fetch)
8909 (uri (git-reference
8910 (url "https://github.com/rack/rackup")
8911 (commit (string-append "v" version))))
8912 (file-name (git-file-name name version))
8913 (sha256
8914 (base32
8915 "1xdfxsz7jx2gwfq212y9mca6q0i5s7kyqbfcscy1315awg57ynyp"))))))
8916
8917(define-public ruby-rack-cache
8918 (package
8919 (name "ruby-rack-cache")
8920 (version "1.13.0")
8921 (source (origin
8922 (method url-fetch)
8923 (uri (rubygems-uri "rack-cache" version))
8924 (sha256
8925 (base32
8926 "1cqpax628h2mhnsjfg91c3klxwx2pkvaj061cisb0saqa99b0jgm"))))
8927 (build-system ruby-build-system)
8928 (arguments
8929 (list
8930 ;; The test suite depends on ruby-memcached, which is not available in
8931 ;; Guix and bundles a very dated copy of memcached (undesirable).
8932 #:tests? #f))
8933 (propagated-inputs (list ruby-rack))
8934 (synopsis "Component to enable HTTP caching for Rack-based applications")
8935 (description "Rack::Cache is suitable as a drop-in component to enable
8936HTTP caching for Rack-based applications that produce freshness (Expires,
8937Cache-Control) and/or validation (Last-Modified, ETag) information.")
8938 (home-page "https://github.com/rtomayko/rack-cache")
8939 (license license:expat)))
8940
8941(define-public ruby-rack-test
8942 (package
8943 (name "ruby-rack-test")
8944 (version "2.1.0")
8945 (source
8946 (origin
8947 (method url-fetch)
8948 (uri (rubygems-uri "rack-test" version))
8949 (sha256
8950 (base32
8951 "1ysx29gk9k14a14zsp5a8czys140wacvp91fja8xcja0j1hzqq8c"))))
8952 (build-system ruby-build-system)
8953 (arguments
8954 ;; Disable tests because of circular dependencies: requires sinatra,
8955 ;; which requires rack-protection, which requires rack-test. Instead
8956 ;; simply require the library.
8957 `(#:phases
8958 (modify-phases %standard-phases
8959 (replace 'check
8960 (lambda* (#:key tests? #:allow-other-keys)
8961 (when tests?
8962 (invoke "ruby" "-Ilib" "-r" "rack/test")))))))
8963 (propagated-inputs
8964 (list ruby-rack))
8965 (synopsis "Testing API for Rack applications")
8966 (description
8967 "Rack::Test is a small, simple testing API for Rack applications. It can
8968be used on its own or as a reusable starting point for Web frameworks and
8969testing libraries to build on.")
8970 (home-page "https://github.com/rack/rack-test")
8971 (license license:expat)))
8972
8973(define-public ruby-rack-session
8974 (package
8975 (name "ruby-rack-session")
8976 ;; Stay on version 1 until all the rack users such as Rails can use rack 3
8977 ;; (rack-session 2 requires rack 3).
8978 (version "1.0.1")
8979 (source (origin
8980 (method git-fetch) ;for tests
8981 (uri (git-reference
8982 (url "https://github.com/rack/rack-session")
8983 (commit (string-append "v" version))))
8984 (file-name (git-file-name name version))
8985 (sha256
8986 (base32
8987 "0rv955wd7ckp5jgy5c229wmajh48jpcy8s0iv5i8ma61wf7qw0i1"))))
8988 (build-system ruby-build-system)
8989 (native-inputs
8990 (list ruby-minitest-global-expectations
8991 ruby-minitest-sprint))
8992 (propagated-inputs
8993 (list ruby-rack))
8994 (synopsis "Session management for Rack")
8995 (description "This package provides a session management implementation
8996for Rack.")
8997 (home-page "https://github.com/rack/rack-session")
8998 (license license:expat)))
8999
9000(define-public ruby-rack-protection
9001 (package
9002 (name "ruby-rack-protection")
9003 (version "3.0.5")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (rubygems-uri "rack-protection" version))
9008 (sha256
9009 (base32
9010 "1a12m1mv8dc0g90fs1myvis8vsgr427k1arg1q4a9qlfw6fqyhis"))))
9011 (build-system ruby-build-system)
9012 (arguments
9013 '(;; Tests missing from the gem.
9014 #:tests? #f))
9015 (propagated-inputs
9016 (list ruby-rack))
9017 (native-inputs
9018 (list bundler ruby-rspec-2 ruby-rack-test))
9019 (synopsis "Rack middleware that protects against typical web attacks")
9020 (description "Rack middleware that can be used to protect against typical
9021web attacks. It can protect all Rack apps, including Rails. For instance, it
9022protects against cross site request forgery, cross site scripting,
9023clickjacking, directory traversal, session hijacking and IP spoofing.")
9024 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
9025 (license license:expat)))
9026
9027(define-public ruby-rainbow
9028 (package
9029 (name "ruby-rainbow")
9030 (version "3.1.1")
9031 (source
9032 (origin
9033 (method url-fetch)
9034 (uri (rubygems-uri "rainbow" version))
9035 (sha256
9036 (base32
9037 "0smwg4mii0fm38pyb5fddbmrdpifwv22zv3d3px2xx497am93503"))))
9038 (build-system ruby-build-system)
9039 (arguments
9040 '(#:phases
9041 (modify-phases %standard-phases
9042 ;; Run rspec directly, to avoid requiring Rubocop which is used from
9043 ;; the Rakefile.
9044 (replace 'check
9045 (lambda* (#:key tests? #:allow-other-keys)
9046 (when tests?
9047 (invoke "rspec")))))))
9048 (native-inputs
9049 (list bundler ruby-rspec))
9050 (synopsis "Colorize printed text on ANSI terminals")
9051 (description
9052 "@code{rainbow} provides a string presenter object to colorize strings by
9053wrapping them in ANSI escape codes.")
9054 (home-page "https://github.com/ku1ik/rainbow")
9055 (license license:expat)))
9056
9057(define-public ruby-rr
9058 (package
9059 (name "ruby-rr")
9060 (version "1.2.1")
9061 (source
9062 (origin
9063 (method url-fetch)
9064 (uri (rubygems-uri "rr" version))
9065 (sha256
9066 (base32
9067 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
9068 (build-system ruby-build-system)
9069 (arguments
9070 '(#:tests? #f)) ; test files not included
9071 (native-inputs
9072 (list bundler ruby-rspec))
9073 (synopsis "Ruby test double framework")
9074 (description
9075 "RR is a test double framework that features a rich selection of double
9076techniques and a terse syntax.")
9077 (home-page "https://rr.github.io/rr/")
9078 (license license:expat)))
9079
9080(define-public ruby-rest-client
9081 (package
9082 (name "ruby-rest-client")
9083 (version "2.1.0")
9084 (source
9085 (origin
9086 (method url-fetch)
9087 (uri (rubygems-uri "rest-client" version))
9088 (sha256
9089 (base32
9090 "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im"))))
9091 (build-system ruby-build-system)
9092 (arguments
9093 (list
9094 ;; TODO Some tests are currently broken
9095 #:tests? #f
9096 #:phases
9097 #~(modify-phases %standard-phases
9098 (add-before 'check 'remove-unnecessary-development-dependencies
9099 (lambda _
9100 (substitute* "rest-client.gemspec"
9101 ;; Remove rubocop as it's unused. Rubocop also indirectly
9102 ;; depends on this package through ruby-parser and ruby-ast so
9103 ;; this avoids a dependency loop.
9104 ((".*rubocop.*") "\n")
9105 ;; Remove pry as it's unused, it's a debugging tool
9106 ((".*pry.*") "\n")
9107 ;; Remove an unnecessarily strict rdoc dependency
9108 ((".*rdoc.*") "\n"))))
9109 (add-before 'check 'delete-network-dependent-tests
9110 (lambda _
9111 (delete-file "spec/integration/request_spec.rb")
9112 (delete-file "spec/integration/httpbin_spec.rb")))
9113 (replace 'check
9114 (lambda* (#:key tests? #:allow-other-keys)
9115 (when tests?
9116 (invoke "rspec")))))))
9117 (propagated-inputs
9118 (list ruby-http-accept-1
9119 ruby-http-cookie
9120 ruby-mime-types
9121 ruby-netrc))
9122 (native-inputs
9123 (list bundler
9124 ruby-webmock-2
9125 ruby-rspec))
9126 (synopsis "Simple HTTP and REST client for Ruby")
9127 (description
9128 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
9129inspired by the Sinatra microframework style of specifying actions:
9130@code{get}, @code{put}, @code{post}, @code{delete}.")
9131 (home-page "https://github.com/rest-client/rest-client")
9132 (license license:expat)))
9133
9134(define-public ruby-rubocop-ast
9135 (package
9136 (name "ruby-rubocop-ast")
9137 (version "1.37.0")
9138 (source
9139 (origin
9140 (method git-fetch) ;no test suite in distributed gem
9141 (uri (git-reference
9142 (url "https://github.com/rubocop/rubocop-ast")
9143 (commit (string-append "v" version))))
9144 (file-name (git-file-name name version))
9145 (sha256
9146 (base32
9147 "1ww1vxcx6qaih4g68mrbq4xlgrqbv8w7cqxdaz629sazpw2hkycs"))))
9148 (build-system ruby-build-system)
9149 (arguments
9150 `(#:test-target "spec"
9151 #:phases (modify-phases %standard-phases
9152 (add-after 'unpack 'relax-dependencies
9153 (lambda _
9154 (substitute* "Gemfile"
9155 (("gem 'simplecov', '~> 0.10', '< 0.18'")
9156 "gem 'simplecov', '~> 0.10'"))))
9157 (add-before 'build 'generate-lexer
9158 (lambda _
9159 (setenv "RUBOCOP_VERSION" "none")
9160 (invoke "rake" "generate")))
9161 (replace 'replace-git-ls-files
9162 (lambda _
9163 (substitute* "rubocop-ast.gemspec"
9164 (("`git ls-files(.*)`" _ files)
9165 (format #f "`find ~a -type f| sort`" files))))))))
9166 (native-inputs
9167 (list ruby-bump
9168 ruby-oedipus-lex
9169 ruby-prism
9170 ruby-racc
9171 ruby-rake
9172 ruby-rspec
9173 ruby-simplecov))
9174 (propagated-inputs
9175 (list ruby-parser))
9176 (synopsis "RuboCop's AST extensions and NodePattern functionality")
9177 (description "Rubocop::AST extends @code{ruby-parser} with classes used
9178by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
9179@itemize
9180@item @code{RuboCop::AST::Node}
9181@item @code{RuboCop::AST::NodePattern}
9182@end itemize")
9183 (home-page "https://rubocop.org/")
9184 (license license:expat)))
9185
9186(define-public ruby-rexml
9187 (package
9188 (name "ruby-rexml")
9189 (version "3.2.5")
9190 (source
9191 (origin
9192 (method git-fetch) ;no tests in distributed gem
9193 (uri (git-reference
9194 (url "https://github.com/ruby/rexml")
9195 (commit (string-append "v" version))))
9196 (file-name (git-file-name name version))
9197 (sha256
9198 (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
9199 (build-system ruby-build-system)
9200 (synopsis "XML toolkit for Ruby")
9201 (description "Inspired by Electric XML library for Java, REXML aims to be
9202easy-to-use API, small and fast. It supports both tree and stream document
9203parsing.")
9204 (home-page "https://github.com/ruby/rexml")
9205 (license license:bsd-2)))
9206
9207(define-public ruby-character-set
9208 (package
9209 (name "ruby-character-set")
9210 (version "1.8.0")
9211 (source
9212 (origin
9213 (method url-fetch)
9214 (uri (rubygems-uri "character_set" version))
9215 (sha256
9216 (base32
9217 "0l9z2pihzc11f0jpq2sx789zwpmwf5nyhsjps45zzvfs5931fwrb"))))
9218 (build-system ruby-build-system)
9219 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
9220 (synopsis "Ruby library to manipulate Unicode")
9221 (description "CharacterSet is a C-extended Ruby library to work with sets
9222of Unicode code points. It can read and write these sets in various formats
9223and implements the @code{stdlib} @code{Set} interface for them. It also
9224offers an alternate paradigm of @code{String} processing which grants much
9225better performance than @code{Regexp} and @code{String} methods from the
9226@code{stdlib} where applicable. Many parts can be used independently, e.g.:
9227@itemize
9228@item @code{CharacterSet::Character}
9229@item @code{CharacterSet::Parser}
9230@item @code{CharacterSet::Writer}
9231@item @code{RangeCompressor}
9232@end itemize")
9233 (home-page "https://github.com/jaynetics/character_set")
9234 (license license:expat)))
9235
9236(define-public ruby-range-compressor
9237 (package
9238 (name "ruby-range-compressor")
9239 (version "1.2.0")
9240 (source
9241 (origin
9242 (method git-fetch)
9243 (uri (git-reference
9244 (url "https://github.com/janosch-x/range_compressor")
9245 (commit (string-append "v" version))))
9246 (file-name (git-file-name name version))
9247 (sha256
9248 (base32
9249 "1zmc44si5ac2h7r1x4f1j8z5yr6wz528c7dssh0g70fmczs3pfga"))))
9250 (build-system ruby-build-system)
9251 (arguments
9252 (list
9253 #:test-target "spec"
9254 #:phases
9255 #~(modify-phases %standard-phases
9256 (add-after 'extract-gemspec 'strip-version-requirements
9257 (lambda _
9258 (substitute* "range_compressor.gemspec"
9259 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
9260 (string-append stripped "\n"))))))))
9261 (native-inputs
9262 (list ruby-rspec
9263 ruby-sorted-set))
9264 (synopsis "Simple arrays of objects to arrays of ranges compressor")
9265 (description "RangeCompresses is a tiny library that allows compressing
9266arrays of objects into arrays of ranges. For example, it can turn the
9267following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
9268 (home-page "https://github.com/janosch-x/range_compressor")
9269 (license license:expat)))
9270
9271(define-public ruby-regexp-property-values
9272 (package
9273 (name "ruby-regexp-property-values")
9274 (version "1.5.2")
9275 (source
9276 (origin
9277 (method git-fetch)
9278 (uri (git-reference ;no test suite in distributed gem
9279 (url "https://github.com/jaynetics/regexp_property_values")
9280 (commit (string-append "v" version))))
9281 (file-name (git-file-name name version))
9282 (sha256
9283 (base32 "039xrhixdr87kcmwqnly3xr8d1681v054ybj7bpvswzrjbnzjffp"))))
9284 (build-system ruby-build-system)
9285 (arguments
9286 '(#:test-target "default"))
9287 (native-inputs
9288 (list ruby-character-set ruby-rake ruby-rake-compiler
9289 ruby-range-compressor ruby-rspec))
9290 (synopsis "Inspect Ruby's regex engine property values")
9291 (description "This small library lets you see which property values are
9292supported by the regular expression engine of the Ruby version you are running
9293and can directly read out their code point ranges. In other words, it
9294determines all supported values for @code{\\p{value}} expressions and what
9295they match.")
9296 (home-page "https://github.com/jaynetics/regexp_property_values")
9297 (license license:expat)))
9298
9299(define-public ruby-regexp-parser
9300 (package
9301 (name "ruby-regexp-parser")
9302 (version "2.9.0")
9303 (source
9304 (origin
9305 (method git-fetch) ;bin/test missing from gem
9306 (uri (git-reference
9307 (url "https://github.com/ammar/regexp_parser")
9308 (commit (string-append "v" version))))
9309 (file-name (git-file-name name version))
9310 (sha256
9311 (base32 "108yjd737f7ky0acijqd5iydnia358szbyc8a80lab2v9dpqs9ax"))))
9312 (build-system ruby-build-system)
9313 (arguments
9314 (list
9315 #:test-target "default"
9316 #:phases
9317 #~(modify-phases %standard-phases
9318 (add-after 'unpack 'find-ragel
9319 (lambda* (#:key inputs #:allow-other-keys)
9320 (substitute* "tasks/ragel.rake"
9321 (("command -v ragel")
9322 (string-append (search-input-file inputs "bin/ragel") " -v")))))
9323 (add-before 'build 'compile-scanner.rb
9324 (lambda _
9325 (invoke "rake" "build")
9326 ;; XXX: This is needed otherwise the install
9327 ;; phase fails to delete the installed cached
9328 ;; gem file.
9329 (delete-file-recursively "pkg"))))))
9330 (native-inputs (list ragel
9331 ruby-ice-nine
9332 ruby-leto
9333 ruby-regexp-property-values
9334 ruby-rspec))
9335 (synopsis "Regular expression parser library for Ruby")
9336 (description "A Ruby gem for tokenizing, parsing, and transforming regular
9337expressions. It comprises the following components:
9338@itemize
9339@item A scanner/tokenizer based on Ragel,
9340@item A lexer that produces a stream of token objects,
9341@item A parser that produces a tree of Expression objects.
9342@end itemize")
9343 (home-page "https://github.com/ammar/regexp_parser")
9344 (license license:expat)))
9345
9346(define-public ruby-test-queue
9347 (package
9348 (name "ruby-test-queue")
9349 (version "0.4.2")
9350 (source
9351 (origin
9352 (method url-fetch)
9353 (uri (rubygems-uri "test-queue" version))
9354 (sha256
9355 (base32
9356 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
9357 (build-system ruby-build-system)
9358 (arguments
9359 '(#:phases
9360 (modify-phases %standard-phases
9361 (replace 'check
9362 (lambda* (#:key tests? #:allow-other-keys)
9363 (when tests?
9364 (invoke "rspec")))))))
9365 (native-inputs
9366 (list ruby-rspec))
9367 (synopsis "Minitest/RSpec parallel test runner for CI environments")
9368 (description "The test-queue module is a parallel test runner,
9369built using a centralized queue to ensure optimal distribution of
9370tests between workers. It is specifically optimized for Continuous
9371Integration (CI) environments: build statistics from each run are
9372stored locally and used to sort the queue at the beginning of the next
9373run.")
9374 (home-page "https://github.com/tmm1/test-queue")
9375 (license license:expat)))
9376
9377(define-public ruby-rubocop
9378 (package
9379 (name "ruby-rubocop")
9380 ;; XXX: Also update ruby-rubocop/minimal in ruby-build.scm.
9381 (version "1.68.0")
9382 (source
9383 (origin
9384 (method git-fetch) ;no tests in distributed gem
9385 (uri (git-reference
9386 (url "https://github.com/rubocop/rubocop")
9387 (commit (string-append "v" version))))
9388 (file-name (git-file-name name version))
9389 (sha256
9390 (base32
9391 "0pfsrgkg2dhb6a2rknciqskgxgmb9kf48rvbkhay9n8n6m712v2w"))))
9392 (build-system ruby-build-system)
9393 (arguments
9394 `(#:test-target "default"
9395 ;; TODO: Figure out why test hangs.
9396 #:tests? ,(not (or (%current-target-system)
9397 (target-riscv64?)))
9398 #:phases
9399 (modify-phases %standard-phases
9400 (add-after 'unpack 'loosen-dependencies
9401 (lambda _
9402 (substitute* "rubocop.gemspec"
9403 (("'unicode\\-display\\_width'.*") "'unicode-display_width')\n"))))
9404 (add-before 'check 'set-home
9405 (lambda _
9406 (setenv "HOME" (getcwd))))
9407 ;; Rubocop depends on itself for tests, directly and indirectly. By
9408 ;; regenerating the TODO list we test rubocop against itself and
9409 ;; forgo adjusting the test suite to our environment each release.
9410 (replace 'check
9411 (lambda* (#:key tests? #:allow-other-keys)
9412 (when tests?
9413 (make-file-writable ".rubocop_todo.yml")
9414 (invoke "./exe/rubocop" "--auto-gen-config")))))))
9415 (native-inputs
9416 (list ruby-pry
9417 ruby-rake
9418 ruby-rspec
9419 ruby-rubocop-ast
9420 ruby-rubocop-capybara-minimal
9421 ruby-rubocop-factory-bot
9422 ruby-rubocop/minimal
9423 ruby-rubocop-performance-minimal
9424 ruby-rubocop-rake-minimal
9425 ruby-rubocop-rspec-minimal
9426 ruby-simplecov
9427 ruby-stackprof
9428 ruby-test-queue
9429 ruby-webmock
9430 ruby-yard))
9431 (propagated-inputs
9432 (list ruby-json
9433 ruby-language-server-protocol
9434 ruby-parallel
9435 ruby-parser
9436 ruby-progressbar
9437 ruby-rainbow
9438 ruby-regexp-parser
9439 ruby-rexml
9440 ruby-rubocop-ast
9441 ruby-unicode-display-width))
9442 (synopsis "Ruby code style checking tool")
9443 (description
9444 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
9445the community-driven Ruby Style Guide.")
9446 (home-page "https://github.com/rubocop/rubocop")
9447 (license license:expat)))
9448
9449(define-public ruby-contest
9450 (package
9451 (name "ruby-contest")
9452 (version "0.1.3")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (rubygems-uri "contest" version))
9457 (sha256
9458 (base32
9459 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
9460 (build-system ruby-build-system)
9461 (synopsis "Write declarative tests using nested contexts")
9462 (description
9463 "Contest allows writing declarative @code{Test::Unit} tests using nested
9464contexts without performance penalties.")
9465 (home-page "https://github.com/citrusbyte/contest")
9466 (license license:expat)))
9467
9468(define-public ruby-creole
9469 (package
9470 (name "ruby-creole")
9471 (version "0.5.0")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (rubygems-uri "creole" version))
9476 (sha256
9477 (base32
9478 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
9479 (build-system ruby-build-system)
9480 (native-inputs
9481 (list ruby-bacon))
9482 (synopsis "Creole markup language converter")
9483 (description
9484 "Creole is a lightweight markup language and this library for converting
9485creole to @code{HTML}.")
9486 (home-page "https://github.com/minad/creole")
9487 (license license:ruby)))
9488
9489(define-public ruby-middleware
9490 (package
9491 (name "ruby-middleware")
9492 (version "0.1.0")
9493 (source
9494 (origin
9495 (method url-fetch)
9496 (uri (rubygems-uri "middleware" version))
9497 (sha256
9498 (base32
9499 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
9500 (build-system ruby-build-system)
9501 (arguments '(#:tests? #f)) ;no test suite
9502 (synopsis "Implementation of a middleware abstraction for Ruby")
9503 (description "Middleware is a generalized implementation of a middleware
9504abstraction for Ruby.")
9505 (home-page "https://github.com/mitchellh/middleware")
9506 (license license:expat)))
9507
9508(define-public ruby-benchmark-ips
9509 (package
9510 (name "ruby-benchmark-ips")
9511 (version "2.12.0")
9512 (source
9513 (origin
9514 (method git-fetch) ;no tests in distributed gem
9515 (uri (git-reference
9516 (url "https://github.com/evanphx/benchmark-ips")
9517 (commit (string-append "v" version))))
9518 (file-name (git-file-name name version))
9519 (sha256
9520 (base32
9521 "19pa2a1lgjzrxcz6vxwfiq5qq337vr15bbbpc2mfwzljdlx5059s"))))
9522 (build-system ruby-build-system)
9523 (arguments
9524 (list
9525 #:phases
9526 #~(modify-phases %standard-phases
9527 (add-after 'unpack 'patch
9528 (lambda _
9529 (substitute* "Gemfile"
9530 (("gem 'rake'.*")
9531 "gem 'rake'"))
9532 (substitute* "benchmark-ips.gemspec"
9533 (("git ls-files -- examples lib")
9534 "find examples lib -type f | sort")))))))
9535 (native-inputs
9536 (list ruby-hoe))
9537 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
9538 (description "Benchmark-ips enhances the Ruby Benchmark module with the
9539iterations per second count. For short snippets of code, it can automatically
9540figure out how many times to run the code to get interesting data.")
9541 (home-page "https://github.com/evanphx/benchmark-ips")
9542 (license license:expat)))
9543
9544(define-public ruby-ffi-rzmq-core
9545 (package
9546 (name "ruby-ffi-rzmq-core")
9547 (version "1.0.7")
9548 (source
9549 (origin
9550 (method url-fetch)
9551 (uri (rubygems-uri "ffi-rzmq-core" version))
9552 (sha256
9553 (base32
9554 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
9555 (build-system ruby-build-system)
9556 (arguments
9557 `(#:phases
9558 (modify-phases %standard-phases
9559 (add-after 'unpack 'patch-libzmq-search-path
9560 (lambda* (#:key inputs #:allow-other-keys)
9561 (let ((zeromq (assoc-ref inputs "zeromq")))
9562 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
9563 (("/usr/local/lib")
9564 (string-append zeromq "/lib"))))))
9565 (replace 'check
9566 (lambda _
9567 (invoke "rspec"))))))
9568 (native-inputs
9569 (list ruby-rspec))
9570 (inputs
9571 (list zeromq))
9572 (propagated-inputs (list ruby-ffi))
9573 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
9574 (description "This library only provides the FFI wrapper for the ZeroMQ
9575networking library. It can be used to implement a Ruby API for the ZeroMQ
9576library.")
9577 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
9578 (license license:expat)))
9579
9580(define-public ruby-ffi-rzmq
9581 (package
9582 (name "ruby-ffi-rzmq")
9583 (version "2.0.7")
9584 (source
9585 (origin
9586 (method url-fetch)
9587 (uri (rubygems-uri "ffi-rzmq" version))
9588 (sha256
9589 (base32
9590 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
9591 (build-system ruby-build-system)
9592 (arguments '(#:phases (modify-phases %standard-phases
9593 (replace 'check
9594 (lambda* (#:key tests? #:allow-other-keys)
9595 (when tests?
9596 (invoke "rspec")))))))
9597 (native-inputs
9598 (list ruby-rspec))
9599 (propagated-inputs
9600 (list ruby-ffi-rzmq-core))
9601 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
9602 (description "This library provides a high-level API that wraps the ZeroMQ
9603networking library using the Ruby foreign function interface (FFI). It is a
9604pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
9605for FFI.")
9606 (home-page "https://github.com/chuckremes/ffi-rzmq")
9607 (license license:expat)))
9608
9609(define-public ruby-sawyer
9610 (package
9611 (name "ruby-sawyer")
9612 (version "0.9.2")
9613 (source
9614 (origin
9615 (method url-fetch)
9616 (uri (rubygems-uri "sawyer" version))
9617 (sha256
9618 (base32
9619 "1jks1qjbmqm8f9kvwa81vqj39avaj9wdnzc531xm29a55bb74fps"))))
9620 (build-system ruby-build-system)
9621 (propagated-inputs
9622 (list ruby-addressable ruby-faraday))
9623 (synopsis "Experimental hypermedia agent for Ruby")
9624 (description "Sawyer is an experimental hypermedia agent for Ruby built on
9625top of Faraday.")
9626 (home-page "https://github.com/lostisland/sawyer")
9627 (license license:expat)))
9628
9629(define-public ruby-octokit
9630 (package
9631 (name "ruby-octokit")
9632 (version "6.1.1")
9633 (source (origin
9634 (method git-fetch)
9635 (uri (git-reference
9636 (url "https://github.com/octokit/octokit.rb")
9637 (commit (string-append "v" version))))
9638 (file-name (git-file-name name version))
9639 (sha256
9640 (base32
9641 "02bcmh0b0v80cis1l80lhzxw8adb69xkz6qgg4m7qcmj3y5arwmk"))))
9642 (build-system ruby-build-system)
9643 (arguments
9644 (list
9645 #:phases
9646 #~(modify-phases %standard-phases
9647 (add-after 'unpack 'remove-unnecessary-dependencies
9648 (lambda _
9649 (substitute* "spec/spec_helper.rb"
9650 (("require 'pry-byebug'") "")))))))
9651 (native-inputs
9652 (list ruby-faraday-multipart
9653 ruby-jwt
9654 ruby-mime-types
9655 ruby-multi-json
9656 ruby-netrc
9657 ruby-rbnacl
9658 ruby-rspec
9659 ruby-simplecov
9660 ruby-webmock
9661 ruby-vcr-expat))
9662 (propagated-inputs (list ruby-faraday ruby-sawyer))
9663 (synopsis "Ruby toolkit for the GitHub API")
9664 (description "Octokit wraps the GitHub API in a flat API client that
9665follows Ruby conventions and requires little knowledge of REST.")
9666 (home-page "https://github.com/octokit/octokit.rb")
9667 (license license:expat)))
9668
9669(define-public ruby-hashicorp-checkpoint
9670 (package
9671 (name "ruby-hashicorp-checkpoint")
9672 (version "0.1.5")
9673 (source (origin
9674 (method url-fetch)
9675 (uri (rubygems-uri "hashicorp-checkpoint" version))
9676 (sha256
9677 (base32
9678 "1z6mwzvd7p2wqhmk07dwrhvm0ncgqm7pxn0pr2k025rwsspp9bsd"))))
9679 (build-system ruby-build-system)
9680 (arguments
9681 (list #:tests? #f)) ;; no need to test, useless outside HashiCorp anyway
9682 (synopsis "Internal HashiCorp service to check version information")
9683 (description "This package is probably useless outside of internal
9684HashiCorp use. It is open source for disclosure and because HashiCorp's open
9685source projects must be able to link to it.")
9686 (home-page "https://github.com/hashicorp/ruby-checkpoint")
9687 (license license:mpl2.0)))
9688
9689(define-public ruby-vagrant-cloud
9690 (package
9691 (name "ruby-vagrant-cloud")
9692 (version "3.1.3")
9693 (source (origin
9694 (method git-fetch)
9695 (uri (git-reference
9696 (url "https://github.com/hashicorp/vagrant_cloud")
9697 (commit (string-append "v" version))))
9698 (file-name (git-file-name name version))
9699 (sha256
9700 (base32
9701 "06hlijj4b1z5ki8l4hsjwmjwccs5qbf6h6bjrd22n1x71l3jnm4i"))))
9702 (build-system ruby-build-system)
9703 (arguments
9704 (list
9705 #:test-target "spec"
9706 #:phases
9707 #~(modify-phases %standard-phases
9708 (add-after 'extract-gemspec 'relax-requirements
9709 (lambda _
9710 (substitute* "vagrant_cloud.gemspec"
9711 (("dependency 'rexml', .*")
9712 "dependency 'rexml'\n")))))))
9713 (native-inputs (list ruby-rspec ruby-webmock))
9714 (propagated-inputs (list ruby-excon ruby-log4r ruby-oauth2 ruby-rexml))
9715 (synopsis "Vagrant Cloud API library")
9716 (description "This library provides the functionality to create, modify,
9717and delete boxes, versions, and providers on HashiCorp's Vagrant Cloud.")
9718 (home-page "https://github.com/hashicorp/vagrant_cloud")
9719 (license license:asl2.0)))
9720
9721(define-public ruby-libvirt
9722 (package
9723 (name "ruby-libvirt")
9724 (version "0.8.2")
9725 (source (origin
9726 (method url-fetch)
9727 (uri (rubygems-uri "ruby-libvirt" version))
9728 (sha256
9729 (base32
9730 "0v6vj5vs9v01zr00bflqpfczhwcyc6jdf8k2dqn42lq6d87si77d"))))
9731 (build-system ruby-build-system)
9732 (arguments
9733 (list
9734 #:tests? #f)) ; tests require access to libvirt socket
9735 (native-inputs (list pkg-config))
9736 (inputs (list libvirt))
9737 (synopsis "Ruby bindings for libvirt")
9738 (description "This package provides Ruby language binding for libvirt's
9739native C API.")
9740 (home-page "https://ruby.libvirt.org/")
9741 (license license:lgpl2.1+)))
9742
9743(define-public ruby-fog-core
9744 (package
9745 (name "ruby-fog-core")
9746 (version "2.6.0")
9747 (source (origin
9748 (method git-fetch) ; for tests
9749 (uri (git-reference
9750 (url "https://github.com/fog/fog-core")
9751 (commit (string-append "v" version))))
9752 (file-name (git-file-name name version))
9753 (sha256
9754 (base32
9755 "1k1xivzgmzqk6svaxsgznyvy5911gvsc2rjrc3jm67057wnx9w8c"))))
9756 (build-system ruby-build-system)
9757 (arguments
9758 (list
9759 #:phases
9760 #~(modify-phases %standard-phases
9761 (add-before 'check 'set-home
9762 (lambda _
9763 (setenv "HOME" "/tmp"))))))
9764 (native-inputs (list ruby-minitest-stub-const))
9765 (propagated-inputs (list ruby-builder ruby-excon ruby-formatador
9766 ruby-mime-types))
9767 (synopsis "Shared classes and tests for fog providers and services")
9768 (description "@code{fog} is a Ruby cloud services library. This package
9769provides shared classes and tests for @code{fog} providers and services.")
9770 (home-page "https://github.com/fog/fog-core")
9771 (license license:expat)))
9772
9773(define-public ruby-fog-json
9774 (package
9775 (name "ruby-fog-json")
9776 (version "1.2.0")
9777 (source (origin
9778 (method git-fetch) ; for tests
9779 (uri (git-reference
9780 (url "https://github.com/fog/fog-json")
9781 (commit (string-append "v" version))))
9782 (file-name (git-file-name name version))
9783 (sha256
9784 (base32
9785 "0f4hbmhy22b1gbkzd3pnj5xvljp6bl7inc2y4fxh29nrmcn4pgb0"))))
9786 (build-system ruby-build-system)
9787 (native-inputs (list ruby-minitest))
9788 (propagated-inputs (list ruby-fog-core ruby-multi-json))
9789 (synopsis "JSON parsing tools used by @code{fog} providers")
9790 (description "This package containse the JSON parsing tools shared between
9791a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9792services library.")
9793 (home-page "https://github.com/fog/fog-json")
9794 (license license:expat)))
9795
9796(define-public ruby-fog-xml
9797 (package
9798 (name "ruby-fog-xml")
9799 (version "0.1.5")
9800 (source (origin
9801 (method git-fetch) ; for tests
9802 (uri (git-reference
9803 (url "https://github.com/fog/fog-xml")
9804 (commit (string-append "v" version))))
9805 (file-name (git-file-name name version))
9806 (sha256
9807 (base32
9808 "1v896k9j44axhgvwjvk1j0amy27a9fm6ynv656fxqa1m2wib6dzh"))))
9809 (build-system ruby-build-system)
9810 (arguments
9811 (list
9812 #:phases
9813 #~(modify-phases %standard-phases
9814 (add-after 'unpack 'sanitize-dependencies
9815 (lambda _
9816 (substitute* "fog-xml.gemspec"
9817 ((".*coveralls.*") ""))))
9818 ;; Run tests via bundler so rake picks up the minitest gem from
9819 ;; native-inputs, not the one installed otherwise. This is required
9820 ;; since [email protected] needs minitest@4 and can not be upgraded to
9821 ;; minitest@5.
9822 (replace 'check
9823 (lambda* (#:key tests? #:allow-other-keys)
9824 (when tests?
9825 (invoke "bundle" "exec" "rake")))))))
9826 (native-inputs (list ruby-minitest ruby-pry ruby-coveralls))
9827 (propagated-inputs (list ruby-fog-core ruby-nokogiri))
9828 (synopsis "XML parsing tools used by @code{fog} providers")
9829 (description "This package containse the XML parsing tools shared between
9830a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9831services library.")
9832 (home-page "https://github.com/fog/fog-xml")
9833 (license license:expat)))
9834
9835(define-public ruby-fog-libvirt
9836 (package
9837 (name "ruby-fog-libvirt")
9838 (version "0.15.0")
9839 (source (origin
9840 (method git-fetch) ; for tests
9841 (uri (git-reference
9842 (url "https://github.com/fog/fog-libvirt")
9843 (commit (string-append "v" version))))
9844 (file-name (git-file-name name version))
9845 (sha256
9846 (base32
9847 "1ljv08gg78sgg17wmpg4zv9aabwv1zh754q7i2a2mi1wc0y3z1z8"))))
9848 (build-system ruby-build-system)
9849 (native-inputs (list ruby-minitest-stub-const ruby-mocha ruby-net-ssh
9850 ruby-netrc ruby-octokit ruby-pry ruby-rubocop
9851 ruby-shindo ruby-simplecov ruby-yard ))
9852 (propagated-inputs (list ruby-fog-core ruby-fog-json ruby-fog-xml
9853 ruby-json ruby-libvirt))
9854 (synopsis "Ruby libvirt provider, either standalone or as a module for
9855@code{fog}")
9856 (description "This library can be used as a module for @code{fog} or as
9857standalone libvirt provider. @code{fog} is a Ruby cloud services library.")
9858 (home-page "https://github.com/fog/fog-libvirt")
9859 (license license:expat)))
9860
9861(define-public ruby-pry-byebug
9862 (package
9863 (name "ruby-pry-byebug")
9864 (version "3.11.0")
9865 (source
9866 (origin
9867 (method git-fetch)
9868 (uri (git-reference
9869 (url "https://github.com/deivid-rodriguez/pry-byebug")
9870 (commit (string-append "v" version))))
9871 (file-name (git-file-name name version))
9872 (sha256
9873 (base32
9874 "15vv1lii895bq6bj7j69vh5dcjfaq1dsrk6dy4p40rwzrzdid6nb"))))
9875 (build-system ruby-build-system)
9876 (arguments
9877 `(#:phases (modify-phases %standard-phases
9878 (add-after 'unpack 'sanitize-dependencies
9879 (lambda _
9880 (substitute* "Rakefile"
9881 ((".*chandler/tasks.*") ""))))
9882 (add-before 'check 'set-home
9883 (lambda _
9884 (setenv "HOME" (getcwd)))))))
9885 (native-inputs (list ruby-rubocop ruby-simplecov))
9886 (propagated-inputs (list ruby-byebug ruby-pry))
9887 (synopsis "Step-by-step debugging and stack navigation in Pry")
9888 (description "This package adds step-by-step debugging and stack
9889navigation capabilities to @code{pry}, using @code{byebug}.")
9890 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
9891 (license license:expat)))
9892
9893(define-public ruby-stackprof
9894 (let ((commit "5d832832e4afcb88521292d6dfad4a9af760ef7c")
9895 (revision "0"))
9896 (package
9897 (name "ruby-stackprof")
9898 (version (git-version "0.2.27" revision commit))
9899 (source
9900 (origin
9901 (method git-fetch)
9902 (uri (git-reference
9903 (url "https://github.com/tmm1/stackprof")
9904 (commit commit)))
9905 (file-name (git-file-name name version))
9906 (sha256
9907 (base32 "184n5lpsclrw5ypcskk3gxbg28acxr5jkjaxlxc3nl4jzsjrammw"))))
9908 (build-system ruby-build-system)
9909 (arguments
9910 (list
9911 #:phases
9912 #~(modify-phases %standard-phases
9913 (add-before 'check 'patch-gemspec
9914 (lambda _
9915 (substitute* "stackprof.gemspec"
9916 (("rake-compiler.*")
9917 "rake-compiler', [\"> 0.9\"]\n"))))
9918 (add-before 'check 'skip-dubious-test
9919 (lambda _
9920 (substitute* "test/test_stackprof.rb"
9921 ;; This unreliable test can fail with "Expected 0 to be >= 1."
9922 (("def test_(cputime)" _ name)
9923 (string-append "def skip_" name))
9924 ;; This test often fails
9925 (("def test_gc") "def skip_test_gc")
9926 ;; This test is known to fail on 32-bit systems.
9927 ;; /gnu/store/...-stackprof-0.2.27.gem
9928 (("def test_raw") "def skip_test_raw"))))
9929 (add-before 'check 'build-tests
9930 (lambda _
9931 (invoke "rake" "compile")))
9932 (replace 'check
9933 (lambda* (#:key tests? #:allow-other-keys)
9934 (when tests?
9935 (invoke "bundle" "exec" "rake" "default")))))))
9936 (native-inputs
9937 (list bundler ruby-minitest ruby-rake-compiler))
9938 (synopsis "Sampling profiler for Ruby code")
9939 (description
9940 "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
9941wallclock and object allocation samplers.")
9942 (home-page "https://github.com/tmm1/stackprof")
9943 (license license:expat))))
9944
9945(define-public ruby-bindex
9946 (package
9947 (name "ruby-bindex")
9948 (version "0.8.1")
9949 (source
9950 (origin
9951 (method url-fetch)
9952 (uri (rubygems-uri "bindex" version))
9953 (sha256
9954 (base32 "0zmirr3m02p52bzq4xgksq4pn8j641rx5d4czk68pv9rqnfwq7kv"))))
9955 (build-system ruby-build-system)
9956 (arguments
9957 (list #:test-target "default"
9958 #:phases
9959 #~(modify-phases %standard-phases
9960 (add-after 'unpack 'avoid-bundler
9961 (lambda _
9962 (substitute* "Rakefile"
9963 (("^Bundler::.*") ""))))
9964 (add-after 'unpack 'patch-minitest
9965 (lambda _
9966 (substitute* "test/test_helper.rb"
9967 (("MiniTest")
9968 "Minitest")))))))
9969 (native-inputs (list bundler ruby-rake-compiler))
9970 (synopsis "Bindings for Ruby exceptions")
9971 (description
9972 "This package provides bindings for any kind of Ruby exceptions.")
9973 (home-page "https://github.com/gsamokovarov/bindex")
9974 (license license:expat)))
9975
9976(define-public ruby-binding-of-caller
9977 (package
9978 (name "ruby-binding-of-caller")
9979 (version "0.8.0")
9980 (source
9981 (origin
9982 (method url-fetch)
9983 (uri (rubygems-uri "binding_of_caller" version))
9984 (sha256
9985 (base32
9986 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
9987 (build-system ruby-build-system)
9988 ;; Attempting to run the test suite fails with a rake deprecation error
9989 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
9990 (arguments '(#:tests? #f))
9991 (propagated-inputs
9992 (list ruby-debug-inspector))
9993 (synopsis "Retrieve the binding of a method's caller")
9994 (description "The @code{binding_of_caller} module provides the
9995@code{Binding#of_caller} method. It allows accessing bindings from upper
9996frames in the call stack and can evaluate code in that context.")
9997 (home-page "https://github.com/banister/binding_of_caller")
9998 (license license:expat)))
9999
10000(define-public ruby-pry-stack-explorer
10001 (package
10002 (name "ruby-pry-stack-explorer")
10003 (version "0.5.1")
10004 (source
10005 (origin
10006 (method url-fetch)
10007 (uri (rubygems-uri "pry-stack_explorer" version))
10008 (sha256
10009 (base32
10010 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
10011 (build-system ruby-build-system)
10012 (arguments '(#:tests? #f)) ;no test suite in gem release
10013 (propagated-inputs
10014 (list ruby-binding-of-caller ruby-pry))
10015 (synopsis "Call-stack navigation plugin for the Pry REPL")
10016 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
10017add support to navigate the call-stack.")
10018 (home-page "https://github.com/pry/pry-stack_explorer")
10019 (license license:expat)))
10020
10021(define-public ruby-varint
10022 (package
10023 (name "ruby-varint")
10024 (version "0.1.1")
10025 (source
10026 (origin
10027 (method url-fetch)
10028 (uri (rubygems-uri "varint" version))
10029 (sha256
10030 (base32
10031 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
10032 (build-system ruby-build-system)
10033 (arguments '(#:tests? #f)) ;no test suite
10034 (synopsis "Variable length integers (varint) C extension for Ruby")
10035 (description "This package provides a small C extension to speed up
10036variable length integers (varint) in Ruby Protocol Buffers.")
10037 (home-page "https://github.com/liquidm/varint")
10038 (license license:bsd-3)))
10039
10040(define-public ruby-version-gem
10041 (package
10042 (name "ruby-version-gem")
10043 (version "1.1.8")
10044 (source (origin
10045 (method git-fetch) ;for tests
10046 (uri (git-reference
10047 (url "https://gitlab.com/oauth-xx/version_gem")
10048 (commit (string-append "v" version))))
10049 (file-name (git-file-name name version))
10050 (sha256
10051 (base32
10052 "1cspiyvixb6q0zyvis5jaa1q35g69jh32m83r8br8hi1yr95fiql"))))
10053 (build-system ruby-build-system)
10054 (arguments
10055 (list
10056 #:phases
10057 #~(modify-phases %standard-phases
10058 (add-before 'build 'drop-signing-key-requirement
10059 (lambda _
10060 (substitute* "version_gem.gemspec"
10061 (("spec.signing_key =.*")
10062 "spec.signing_key = nil")))))))
10063 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
10064 (synopsis "Improved @code{Version} module for Ruby")
10065 (description "VersionGem aims to provide introspection of a @code{Version}
10066module based on a @code{Version::VERSION} constant string while not interfering
10067with gemspec parsing where the @code{VERSION} string is traditionally used.")
10068 (home-page "https://gitlab.com/oauth-xx/version_gem")
10069 (license license:expat)))
10070
10071;;; Note: Do NOT update to a newer version; this is the last commit that is
10072;;; still licensed as free software, the project having switched to the
10073;;; Hippocratic license afterward (see:
10074;;; https://github.com/vcr/vcr/issues/959).
10075(define-public ruby-vcr-expat
10076 (let ((revision "0")
10077 (commit-dont-touch "842b2bf89099dc91f2c643d0d85d1abd54eb7e85")) ;
10078 (package
10079 (name "ruby-vcr-expat")
10080 (version (git-version "5.0.0" revision commit-dont-touch))
10081 (source (origin
10082 (method git-fetch)
10083 (uri (git-reference
10084 (url "https://github.com/vcr/vcr")
10085 (commit commit-dont-touch)))
10086 (file-name (git-file-name name version))
10087 (sha256
10088 (base32
10089 "02mzifd2655kjh35bbry01n66jjcjrsw6ncqlybfkjcaqrw2zalv"))))
10090 (build-system ruby-build-system)
10091 (arguments (list #:tests? #f)) ;avoid all dependencies
10092 (home-page "https://github.com/vcr/vcr")
10093 (synopsis "HTTP interaction recorder [old version]")
10094 (description "Record your test suite's HTTP interactions and replay them
10095during future test runs for fast, deterministic, accurate tests. This is an
10096older version of VCR that is free software under the Expat license. The
10097project later switched to the Hippocratic license, which is non-free.
10098@emph{Do not use it in new free software projects}.")
10099 (license license:expat))))
10100
10101(define-public ruby-ruby-prof
10102 (package
10103 (name "ruby-ruby-prof")
10104 (version "1.7.2")
10105 (source
10106 (origin
10107 (method url-fetch)
10108 (uri (rubygems-uri "ruby-prof" version))
10109 (sha256
10110 (base32
10111 "0h23zjwma8car8jpq7af8gw39qi88rn24mass7r13ripmky28117"))))
10112 (build-system ruby-build-system)
10113 (arguments
10114 ;; FIXME: Investigate why the tests fail on i686-linux.
10115 `(#:tests? ,(not (or (%current-target-system)
10116 (target-x86-32?)))
10117 #:phases
10118 (modify-phases %standard-phases
10119 ;; The LineNumbersTest test fails non-deterministically (see:
10120 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
10121 (add-after 'extract-gemspec 'delete-flaky-test
10122 (lambda _
10123 (delete-file "test/line_number_test.rb")
10124 (delete-file "test/measure_process_time_test.rb")
10125 (substitute* "ruby-prof.gemspec"
10126 (("\"test/line_number_test\\.rb\"\\.freeze, ") "")
10127 (("\"test/measure_process_time_test\\.rb\"\\.freeze, ") ""))))
10128 (add-before 'check 'compile
10129 (lambda _
10130 (invoke "rake" "compile"))))))
10131 (native-inputs (list bundler ruby-minitest ruby-rake-compiler ruby-rdoc))
10132 (propagated-inputs (list ruby-base64))
10133 (synopsis "Fast code profiler for Ruby")
10134 (description "RubyProf is a fast code profiler for Ruby. Its features
10135include:
10136@table @asis
10137@item Speed
10138Being a C extension, it is many times faster than the standard Ruby profiler.
10139@item Measurement Modes
10140It can measure program wall time, process time, object allocations and memory
10141usage.
10142@item Reports
10143A variety of text and cross-referenced HTML reports can be generated.
10144@item Threads
10145Profiling multiple threads simultaneously is supported.
10146@end table")
10147 (home-page "https://github.com/ruby-prof/ruby-prof")
10148 (license license:bsd-2)))
10149
10150(define-public ruby-ruby-memcheck
10151 (package
10152 (name "ruby-ruby-memcheck")
10153 (version "1.3.2")
10154 (source (origin
10155 (method git-fetch)
10156 (uri (git-reference
10157 (url "https://github.com/Shopify/ruby_memcheck")
10158 (commit version)))
10159 (file-name (git-file-name name version))
10160 (sha256
10161 (base32
10162 "0fj4j4d062sw2kx2qlj877gjbj1xbb691njr8x9nbah6615idlni"))))
10163 (build-system ruby-build-system)
10164 (arguments
10165 (list
10166 ;; The tests seem to fail on 32bit x86
10167 #:tests? (not (or (target-x86-32?)
10168 (%current-target-system)))
10169 #:phases
10170 #~(modify-phases %standard-phases
10171 (add-after 'unpack 'patch-valgrind-path
10172 (lambda* (#:key inputs #:allow-other-keys)
10173 (substitute* "lib/ruby_memcheck/configuration.rb"
10174 (("DEFAULT_VALGRIND = \"valgrind\"")
10175 (format #f "DEFAULT_VALGRIND = ~s"
10176 (search-input-file inputs "bin/valgrind"))))))
10177 (add-before 'replace-git-ls-files 'standardize-git-ls-files
10178 (lambda _
10179 (substitute* "ruby_memcheck.gemspec"
10180 (("%x\\(git ls-files -z)")
10181 "`git ls-files -z`")))))))
10182 (native-inputs (list ruby-rake-compiler ruby-rspec))
10183 (inputs (list valgrind/pinned))
10184 (propagated-inputs (list ruby-nokogiri))
10185 (synopsis "Valgrind memcheck tool for Ruby")
10186 (description "The @code{ruby_memcheck} gem provides a sane way to use
10187Valgrind's memcheck on your native extension gem, that filters out all the
10188false positives caused by Ruby not freeing all of the memory it allocates
10189during shutdown.")
10190 (home-page "https://github.com/Shopify/ruby_memcheck")
10191 (license license:expat)))
10192
10193(define-public ruby-memory-profiler
10194 (package
10195 (name "ruby-memory-profiler")
10196 (version "1.1.0")
10197 (source
10198 (origin
10199 (method git-fetch)
10200 (uri (git-reference
10201 (url "https://github.com/SamSaffron/memory_profiler")
10202 (commit (string-append "v" version))))
10203 (file-name (git-file-name name version))
10204 (sha256
10205 (base32
10206 "1g9s8j2d892vb34zcwkxkjh3mywvc4p52ggbfzmgqzrdskf2nja6"))))
10207 (build-system ruby-build-system)
10208 (arguments
10209 (list
10210 #:phases
10211 #~(modify-phases %standard-phases
10212 (add-after 'unpack 'skip-flaky-tests
10213 (lambda _
10214 ;; XXX: These tests check the number of logged lines, which
10215 ;; can change with ruby versions.
10216 (for-each delete-file
10217 (list "test/test_reporter.rb"
10218 "test/test_reporter_public_start_stop.rb"
10219 "test/test_reporter_private_start_stop.rb")))))))
10220 (synopsis "Memory profiling routines for Ruby")
10221 (description
10222 "This package provides memory profiling routines for Ruby.")
10223 (home-page "https://github.com/SamSaffron/memory_profiler")
10224 (license license:expat)))
10225
10226(define-public ruby-gherkin-ruby
10227 (package
10228 (name "ruby-gherkin-ruby")
10229 (version "0.3.2")
10230 (home-page "https://github.com/codegram/gherkin-ruby")
10231 (source (origin
10232 (method url-fetch)
10233 (uri (rubygems-uri "gherkin-ruby" version))
10234 (sha256
10235 (base32
10236 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
10237 (build-system ruby-build-system)
10238 (synopsis "Pure Ruby Gherkin parser")
10239 (description
10240 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
10241200 lines of code.")
10242 ;; XXX: No license information anywhere but Readme.md.
10243 (license license:expat)))
10244
10245(define-public ruby-aruba
10246 (package
10247 (name "ruby-aruba")
10248 (version "2.4.1")
10249 (source (origin
10250 (method git-fetch)
10251 (uri (git-reference
10252 (url "https://github.com/cucumber/aruba")
10253 (commit (string-append "v" version))))
10254 (file-name (git-file-name name version))
10255 (sha256
10256 (base32
10257 "08f1a5am9g03ar80q72qljnb466561hwh0dwqsiqls96d9acxz1a"))))
10258 (build-system ruby-build-system)
10259 (arguments
10260 (list
10261 ;; XXX: Only run the "spec" target and not the "cucumber" one, as it is
10262 ;; slow and has multiple unexplained test failures.
10263 #:test-target "spec"
10264 #:phases
10265 #~(modify-phases %standard-phases
10266 (add-after 'unpack 'patch-paths
10267 (lambda _
10268 ;; This test file relies on a dynamically generated script;
10269 ;; patch its #!/bin/bash shebang.
10270 (substitute* "spec/aruba/api/commands_spec.rb"
10271 (("/bin/bash")
10272 (which "bash")))))
10273 (add-after 'extract-gemspec 'relax-constraints
10274 (lambda _
10275 (substitute* "aruba.gemspec"
10276 (("(spec\\.add_dependency 'irb').*" _ dep)
10277 (string-append dep "\n")))))
10278 (add-before 'check 'relax-requirements
10279 ;; Many development requirements are not actually needed.
10280 (lambda _
10281 (substitute* "aruba.gemspec"
10282 (("(spec.*dependency.*simplecov.*,.*),.*" _ minver) minver)
10283 ((".*appraisal.*") "")
10284 ((".*kramdown.*") "")
10285 ((".*rubocop.*") ""))
10286 (substitute* "Rakefile"
10287 (("Bundler\\.setup") "")
10288 ((".*require.*rubocop/rake_task.*") "")
10289 ((".*RuboCop::RakeTask.new.*") ""))
10290 (substitute* "spec/spec_helper.rb"
10291 (("require 'simplecov'") "")
10292 (("SimpleCov.*") ""))))
10293 ;; The tests rely on the Gem being installed, so move the check
10294 ;; phase after the install phase.
10295 (delete 'check)
10296 (add-after 'install 'check
10297 (assoc-ref %standard-phases 'check))
10298 (add-before 'check 'set-GEM_PATH
10299 (lambda _
10300 (setenv "GEM_PATH" (string-append
10301 (getenv "GEM_PATH") ":"
10302 #$output "/lib/ruby/vendor_ruby"))))
10303 (add-before 'check 'set-home
10304 (lambda _
10305 (setenv "HOME" "/tmp"))))))
10306 (native-inputs
10307 (list ruby-rake-manifest
10308 ruby-rspec))
10309 (propagated-inputs
10310 (list ruby-contracts
10311 ruby-cucumber
10312 ruby-irb
10313 ruby-rspec-expectations
10314 ruby-thor))
10315 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
10316 (description
10317 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
10318command-line applications. It supports applications written in any
10319language.")
10320 (home-page "https://github.com/cucumber/aruba")
10321 (license license:expat)))
10322
10323(define-public ruby-memoist3
10324 (package
10325 (name "ruby-memoist3")
10326 (version "1.0.0")
10327 (source
10328 (origin
10329 (method url-fetch)
10330 (uri (rubygems-uri "memoist3" version))
10331 (sha256
10332 (base32 "0vyma0mpjibqigzl6j9lij7zh3kvqlyi88qc0mia6l7i5i044vk8"))))
10333 (build-system ruby-build-system)
10334 (synopsis "Method calling memoization library for Ruby")
10335 (description "Memoist is a memoization Ruby library for repeated method callings.")
10336 (home-page "https://github.com/honzasterba/memoist")
10337 (license license:expat)))
10338
10339(define-public ruby-sys-uname
10340 (package
10341 (name "ruby-sys-uname")
10342 (version "1.5.1")
10343 (source
10344 (origin
10345 (method url-fetch)
10346 (uri (rubygems-uri "sys-uname" version))
10347 (sha256
10348 (base32
10349 "0yvd71lzd2k46940k9l3l3yyjyxc4j1w6nmyrcjkqfdhj5j7wkbq"))))
10350 (build-system ruby-build-system)
10351 (arguments
10352 (list #:test-target "spec"
10353 #:phases #~(modify-phases %standard-phases
10354 (add-before 'check 'remove-rubocop
10355 (lambda _
10356 (substitute* "Rakefile"
10357 (("require 'rubocop/rake_task'") "")
10358 (("RuboCop::RakeTask\\.new") "")))))))
10359 (propagated-inputs (list ruby-ffi ruby-memoist3))
10360 (native-inputs (list ruby-rspec))
10361 (synopsis "Ruby interface for gathering system information")
10362 (description "The sys-uname library provides an interface for gathering
10363information about your current platform. It allows retrieving information
10364such as the OS name, OS version, system name, etc.")
10365 (home-page "https://github.com/djberg96/sys-uname")
10366 (license license:asl2.0)))
10367
10368(define-public ruby-cucumber
10369 (package
10370 (name "ruby-cucumber")
10371 (version "11.1.1")
10372 (source
10373 (origin
10374 (method git-fetch)
10375 (uri (git-reference
10376 (url "https://github.com/cucumber/cucumber-ruby")
10377 (commit (string-append "v" version))))
10378 (file-name (git-file-name name version))
10379 (sha256
10380 (base32
10381 "0n0fan1nvsd29l2rif66mr03ych97gyjw94xvj9xg3jfis8px4sk"))))
10382 (build-system ruby-build-system)
10383 (arguments
10384 (list #:test-target "spec"
10385 #:phases
10386 #~(modify-phases %standard-phases
10387 (add-after 'unpack 'disable-rubocop
10388 ;; Remove extraneous Lint checks.
10389 (lambda _
10390 (substitute* "Rakefile"
10391 (("require 'rubocop/rake_task'")
10392 "")
10393 (("RuboCop::RakeTask.new")
10394 ""))))
10395 (add-before 'check 'set-home
10396 (lambda _
10397 (setenv "HOME" (getcwd)))))))
10398 (propagated-inputs
10399 (list ruby-base64
10400 ruby-builder
10401 ruby-cucumber-ci-environment
10402 ruby-cucumber-core
10403 ruby-cucumber-expressions
10404 ruby-cucumber-html-formatter
10405 ruby-diff-lcs
10406 ruby-logger
10407 ruby-mini-mime
10408 ruby-multi-test
10409 ruby-sys-uname))
10410 (native-inputs
10411 (list ruby-cucumber-compatibility-kit
10412 ruby-nokogiri
10413 ruby-webrick
10414 ruby-rspec))
10415 (synopsis "Describe automated tests in plain language")
10416 (description "Cucumber is a tool for running automated tests written in
10417plain language. It's designed to support a Behaviour Driven Development (BDD)
10418software development workflow.")
10419 (home-page "https://cucumber.io/")
10420 (license license:expat)))
10421
10422(define-public ruby-cucumber-without-tests
10423 (package (inherit ruby-cucumber)
10424 (arguments
10425 '(#:tests? #f))
10426 (native-inputs
10427 '())
10428 (properties '((hidden? . #t)))))
10429
10430(define-public ruby-covered
10431 (package
10432 (name "ruby-covered")
10433 (version "0.20.2")
10434 (source (origin
10435 (method url-fetch)
10436 (uri (rubygems-uri "covered" version))
10437 (sha256
10438 (base32
10439 "04fpj493jn23ah5fq93956a5h2xj3z0hrckvc26fxcfsg5pbwypa"))))
10440 (build-system ruby-build-system)
10441 (arguments
10442 ;; XXX: The test suite is disabled to avoid dependency cycles with
10443 ;; ruby-samovar, through ruby-bake.
10444 (list #:tests? #f
10445 #:phases
10446 #~(modify-phases %standard-phases
10447 (add-after 'extract-gemspec 'relax-requirements
10448 (lambda _
10449 (substitute* ".gemspec"
10450 (("\">= 3.2\"")
10451 "\">= 2.7\"")))))))
10452 (propagated-inputs (list ruby-console ruby-msgpack))
10453 (synopsis "Modern approach to code coverage in Ruby")
10454 (description "Covered uses modern Ruby features to generate comprehensive
10455coverage, including support for templates which are compiled into Ruby. It
10456has the following features:
10457@itemize
10458@item
10459Incremental coverage -- if you run your full test suite, and the run a subset,
10460it will still report the correct coverage - so you can incrementally work on
10461improving coverage.
10462@item
10463Integration with RSpec, Minitest, Travis & Coveralls - no need to configure
10464anything - out of the box support for these platforms.
10465@item
10466It supports coverage of views -- templates compiled to Ruby code can be
10467tracked for coverage reporting.
10468@end itemize")
10469 (home-page "https://github.com/ioquatix/covered")
10470 (license license:expat)))
10471
10472(define-public ruby-coveralls
10473 (package
10474 (name "ruby-coveralls")
10475 (version "0.8.23")
10476 (source
10477 (origin
10478 (method url-fetch)
10479 (uri (rubygems-uri "coveralls" version))
10480 (sha256
10481 (base32
10482 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
10483 (build-system ruby-build-system)
10484 (arguments
10485 (list #:test-target "default"
10486 #:phases #~(modify-phases %standard-phases
10487 (add-after 'extract-gemspec 'disable-problematic-tests
10488 (lambda _
10489 (substitute* "spec/coveralls/coveralls_spec.rb"
10490 ;; This test fails for unknown reasons (perhaps
10491 ;; networking); skip it.
10492 (("it \"sends existing test results\"" all)
10493 (string-append "x" all)))
10494 ;; 3 simplecov tests fail, perhaps due to using a
10495 ;; newer simplecov version.
10496 (delete-file "spec/coveralls/simplecov_spec.rb")
10497 (substitute* "coveralls-ruby.gemspec"
10498 (("\"spec/coveralls/simplecov_spec.rb\".freeze, ")
10499 ""))))
10500 (add-after 'extract-gemspec 'relax-requirements
10501 (lambda _
10502 (substitute* "coveralls-ruby.gemspec"
10503 (("%q<simplecov>.freeze, \\[\"~> 0.16.1\"]")
10504 "%q<simplecov>.freeze")))))))
10505 (native-inputs
10506 (list git-minimal/pinned
10507 ruby-pry
10508 ruby-rspec
10509 ruby-truthy
10510 ruby-vcr-expat
10511 ruby-webmock))
10512 (propagated-inputs
10513 (list ruby-json
10514 ruby-term-ansicolor
10515 ruby-thor
10516 ruby-tins
10517 ruby-simplecov))
10518 (synopsis "Ruby implementation of the Coveralls API")
10519 (description "This package provides a Ruby implementation of the Coveralls
10520API.")
10521 (home-page "https://coveralls.io")
10522 (license license:expat)))
10523
10524(define-public ruby-skiptrace
10525 (package
10526 (name "ruby-skiptrace")
10527 (version "0.8.1")
10528 (source
10529 (origin
10530 (method url-fetch)
10531 (uri (rubygems-uri "skiptrace" version))
10532 (sha256
10533 (base32
10534 "1qpjy6pqd8hx4w7bai64jsr10mwbpnnb65wcbssyqcnalimi1s12"))))
10535 (build-system ruby-build-system)
10536 (arguments
10537 (list
10538 #:phases
10539 #~(modify-phases %standard-phases
10540 (add-after 'unpack 'remove-git-from-gemspec
10541 (lambda _
10542 (substitute* "skiptrace.gemspec"
10543 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
10544 (add-after 'unpack 'patch-minitest
10545 (lambda _
10546 (substitute* "test/test_helper.rb"
10547 (("MiniTest")
10548 "Minitest"))))
10549 (replace 'check
10550 (lambda* (#:key tests? #:allow-other-keys)
10551 (when tests?
10552 (invoke "bundle" "exec" "rake" "default")))))))
10553 (native-inputs
10554 (list bundler ruby-rake-compiler))
10555 (synopsis "Provides access for bindings relating to Ruby exceptions")
10556 (description
10557 "@code{skiptrace} provides a way to access the bindings that relate to
10558exceptions in Ruby, providing more information about the context in which the
10559exception occurred.")
10560 (home-page "https://github.com/gsamokovarov/skiptrace")
10561 (license license:expat)))
10562
10563(define-public ruby-bio-logger
10564 (package
10565 (name "ruby-bio-logger")
10566 (version "1.0.1")
10567 (source
10568 (origin
10569 (method url-fetch)
10570 (uri (rubygems-uri "bio-logger" version))
10571 (sha256
10572 (base32
10573 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
10574 (build-system ruby-build-system)
10575 (arguments
10576 `(#:tests? #f)) ; rake errors, missing shoulda
10577 (propagated-inputs
10578 (list ruby-log4r))
10579 (synopsis "Log4r wrapper for Ruby")
10580 (description "Bio-logger is a wrapper around Log4r adding extra logging
10581features such as filtering and fine grained logging.")
10582 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
10583 (license license:expat)))
10584
10585(define-public ruby-yajl-ruby
10586 (package
10587 (name "ruby-yajl-ruby")
10588 (version "1.4.3")
10589 (source
10590 (origin
10591 (method url-fetch)
10592 (uri (rubygems-uri "yajl-ruby" version))
10593 (sha256
10594 (base32
10595 "1lni4jbyrlph7sz8y49q84pb0sbj82lgwvnjnsiv01xf26f4v5wc"))))
10596 (build-system ruby-build-system)
10597 (arguments
10598 (list
10599 #:test-target "spec"
10600 #:phases
10601 #~(modify-phases %standard-phases
10602 (add-before 'check 'patch-test-to-update-load-path
10603 (lambda _
10604 (substitute* "spec/parsing/large_number_spec.rb"
10605 (("require \"yajl\"")
10606 "$LOAD_PATH << 'lib'; require 'yajl'")))))))
10607 (native-inputs
10608 (list ruby-rake-compiler ruby-rspec))
10609 (synopsis "Streaming JSON parsing and encoding library for Ruby")
10610 (description
10611 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
10612is compatible with the JSON gem, so yajl-ruby can act as a drop in
10613replacement.
10614
10615A modified copy of yajl is used, and included in the package.")
10616 (home-page "https://github.com/brianmario/yajl-ruby")
10617 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
10618 license:bsd-3)))) ; Included, modified copy of yajl
10619
10620(define-public ruby-yard
10621 (package
10622 (name "ruby-yard")
10623 (version "0.9.37")
10624 (source
10625 (origin
10626 (method git-fetch)
10627 ;; Tests do not pass if we build from the distributed gem.
10628 (uri (git-reference
10629 (url "https://github.com/lsegal/yard")
10630 (commit (string-append "v" version))))
10631 (file-name (git-file-name name version))
10632 (sha256
10633 (base32
10634 "04255dmxrkjyw3175d17hlmss66qvcy41jawfkxi3pp3nhlznir8"))))
10635 (build-system ruby-build-system)
10636 (arguments
10637 (list
10638 #:test-target "default"
10639 #:phases
10640 #~(modify-phases %standard-phases
10641 (add-after 'unpack 'do-not-set-date-in-gemspec
10642 ;; Fix a reproducibility issue (see:
10643 ;; https://github.com/lsegal/yard/issues/1343).
10644 (lambda _
10645 (substitute* "yard.gemspec"
10646 ((".*s\\.date.*") ""))))
10647 (add-before 'check 'prepare-for-tests
10648 (lambda* (#:key tests? #:allow-other-keys)
10649 (when tests?
10650 (substitute* "Rakefile"
10651 ((".*[Ss]amus.*") ""))
10652 ;; Delete the Gemfile to avoid errors relating to it.
10653 (delete-file "Gemfile")
10654 ;; $HOME needs to be set to somewhere writeable for tests to
10655 ;; run.
10656 (setenv "HOME" "/tmp")
10657 ;; This test fails
10658 ;; #<File (class)> received :open with unexpected arguments
10659 ;; expected: ("gem1.gem", "rb")
10660 ;; got: ("/gnu/store/.../lib/ruby/vendor_ruby/specifications/asciidoctor-2.0.18.gemspec", "r:UTF-8:-")
10661 (substitute* "spec/cli/diff_spec.rb"
10662 (("it \"searches for .gem file")
10663 "xit \"searches for .gem file"))))))))
10664 (native-inputs
10665 (list ruby-rspec
10666 ruby-rack
10667 ruby-redcloth
10668 ruby-webrick
10669 ruby-asciidoctor/minimal))
10670 (synopsis "Documentation generation tool for Ruby")
10671 (description "YARD is a documentation generation tool for the Ruby
10672programming language. It enables the user to generate consistent, usable
10673documentation that can be exported to a number of formats very easily, and
10674also supports extending for custom Ruby constructs such as custom class level
10675definitions.")
10676 (home-page "https://yardoc.org")
10677 (license license:expat)))
10678
10679(define-public ruby-yard/minimal
10680 (hidden-package
10681 (package
10682 (inherit ruby-yard)
10683 (arguments
10684 (ensure-keyword-arguments
10685 (package-arguments ruby-yard)
10686 (list #:tests? #f)))
10687 (native-inputs '()))))
10688
10689(define-public ruby-spectroscope
10690 (package
10691 (name "ruby-spectroscope")
10692 (version "0.1.0")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (rubygems-uri "spectroscope" version))
10697 (sha256
10698 (base32
10699 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
10700 (build-system ruby-build-system)
10701 (arguments
10702 `(#:phases
10703 (modify-phases %standard-phases
10704 (replace 'check
10705 (lambda _
10706 (with-output-to-file ".test"
10707 (lambda _
10708 (display
10709 "\
10710require 'ae/should'
10711require 'rspec'
10712
10713include RSpec
10714
10715Test.run :default do |run|
10716 run.files << 'spec/*_spec.rb'
10717end")))
10718 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
10719 (native-inputs
10720 (list ruby-ae ruby-rspec))
10721 (propagated-inputs
10722 (list ruby-rubytest))
10723 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
10724 (description "Spectroscope is a Behavior-Driven Development (BDD)
10725framework built on RubyTest, designed to emulate RSpec in most respects. It
10726is assertion framework independent so any number of assertion systems can be
10727used, such as Assay or AE.")
10728 (home-page "http://rubyworks.github.com/spectroscope/")
10729 (license license:bsd-2)))
10730
10731(define-public ruby-tomparse
10732 (package
10733 (name "ruby-tomparse")
10734 (version "0.4.2")
10735 (source
10736 (origin
10737 (method url-fetch)
10738 (uri (rubygems-uri "tomparse" version))
10739 (sha256
10740 (base32
10741 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
10742 (build-system ruby-build-system)
10743 ;; TODO: Tests require citron and rulebow, not yet packaged.
10744 (arguments '(#:tests? #f))
10745 (synopsis "TomDoc parser for Ruby")
10746 (description "TomParse is a TomDoc parser for Ruby. It takes a code
10747comment as input and parses it into a convenient object-oriented structure in
10748accordance with the TomDoc standard. See
10749@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
10750TomDoc format.")
10751 (home-page "http://rubyworks.github.com/tomparse/")
10752 (license license:bsd-2)))
10753
10754(define-public ruby-yard-tomdoc
10755 (package
10756 (name "ruby-yard-tomdoc")
10757 (version "0.7.1")
10758 (source
10759 (origin
10760 (method url-fetch)
10761 (uri (rubygems-uri "yard-tomdoc" version))
10762 (sha256
10763 (base32
10764 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
10765 (build-system ruby-build-system)
10766 (arguments
10767 `(#:phases (modify-phases %standard-phases
10768 (replace 'check
10769 (lambda _
10770 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
10771 (native-inputs
10772 (list ruby-rubytest-cli ruby-spectroscope ruby-ae))
10773 (propagated-inputs
10774 (list ruby-tomparse ruby-yard))
10775 (synopsis "TomDoc syntax for YARD")
10776 (description "This module adds support for the TomDoc documentation format
10777to YARD, a documentation generation tool for Ruby.")
10778 (home-page "http://rubyworks.github.com/yard-tomdoc/")
10779 (license license:expat)))
10780
10781(define-public ruby-clap
10782 (package
10783 (name "ruby-clap")
10784 (version "1.0.0")
10785 (source (origin
10786 (method url-fetch)
10787 (uri (rubygems-uri "clap" version))
10788 (sha256
10789 (base32
10790 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
10791 (build-system ruby-build-system)
10792 ;; Clap needs cutest for running tests, but cutest needs clap.
10793 (arguments `(#:tests? #f))
10794 (synopsis "Command line argument parsing for simple applications")
10795 (description
10796 "Clap provides command line argument parsing features. It covers the
10797simple case of executing code based on the flags or parameters passed.")
10798 (home-page "https://github.com/djanowski/cutest")
10799 (license license:expat)))
10800
10801(define-public ruby-cutest
10802 (package
10803 (name "ruby-cutest")
10804 (version "1.2.2")
10805 (source (origin
10806 (method url-fetch)
10807 (uri (rubygems-uri "cutest" version))
10808 (sha256
10809 (base32
10810 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
10811 (build-system ruby-build-system)
10812 (propagated-inputs
10813 (list ruby-clap))
10814 (synopsis "Run tests in separate processes")
10815 (description
10816 "Cutest runs tests in separate processes to avoid shared state.")
10817 (home-page "https://github.com/djanowski/cutest")
10818 (license license:expat)))
10819
10820(define-public ruby-pygmentize
10821 (package
10822 (name "ruby-pygmentize")
10823 (version "0.0.3")
10824 (source (origin
10825 (method url-fetch)
10826 (uri (rubygems-uri "pygmentize" version))
10827 (sha256
10828 (base32
10829 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
10830 (build-system ruby-build-system)
10831 (arguments
10832 `(#:phases
10833 (modify-phases %standard-phases
10834 (add-after 'unpack 'fix-pygmentize-path
10835 (lambda _
10836 (substitute* "lib/pygmentize.rb"
10837 (("\"/usr/bin/env python.*")
10838 (string-append "\"" (which "pygmentize") "\"\n")))))
10839 (add-after 'build 'do-not-use-vendor-directory
10840 (lambda _
10841 ;; Remove bundled pygments sources
10842 ;; FIXME: ruby-build-system does not support snippets.
10843 (delete-file-recursively "vendor")
10844 (substitute* "pygmentize.gemspec"
10845 (("\"vendor/\\*\\*/\\*\",") "")))))))
10846 (inputs
10847 `(("pygments" ,python-pygments)))
10848 (native-inputs
10849 (list ruby-cutest ruby-nokogiri))
10850 (synopsis "Thin Ruby wrapper around pygmentize")
10851 (description
10852 "Pygmentize provides a simple way to call pygmentize from within a Ruby
10853application.")
10854 (home-page "https://github.com/djanowski/pygmentize")
10855 (license license:expat)))
10856
10857(define-public ruby-event-emitter
10858 (package
10859 (name "ruby-event-emitter")
10860 (version "0.2.6")
10861 (source (origin
10862 (method url-fetch)
10863 (uri (rubygems-uri "event_emitter" version))
10864 (sha256
10865 (base32
10866 "148k9qv8102l3m6klc24dwip79f9y4bjr5z19dckd7ffbjyrf9n7"))))
10867 (build-system ruby-build-system)
10868 (arguments
10869 (list #:phases #~(modify-phases %standard-phases
10870 (add-after 'unpack 'patch-minitest
10871 (lambda _
10872 (substitute* (find-files "test" "\\.rb$")
10873 (("MiniTest")
10874 "Minitest"))))
10875 (add-after 'extract-gemspec 'relax-requirements
10876 (lambda _
10877 (substitute* "event_emitter.gemspec"
10878 (("~> 1.15") ">= 1.15")))))))
10879 (synopsis "Ruby port of EventEmitter from Node.js")
10880 (description
10881 "This package provides a Ruby port of EventEmitter from Node.js.")
10882 (home-page "https://shokai.github.io/event_emitter/")
10883 (license license:expat)))
10884
10885(define-public ruby-eventmachine
10886 (package
10887 (name "ruby-eventmachine")
10888 (version "1.2.7")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (rubygems-uri "eventmachine" version))
10893 (sha256
10894 (base32
10895 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
10896 (build-system ruby-build-system)
10897 (arguments
10898 '(#:tests? #f)) ; test suite tries to connect to google.com
10899 (inputs
10900 (list openssl))
10901 (native-inputs
10902 (list ruby-rake-compiler))
10903 (synopsis "Single-threaded network event framework for Ruby")
10904 (description
10905 "EventMachine implements a single-threaded engine for arbitrary network
10906communications. EventMachine wraps all interactions with sockets, allowing
10907programs to concentrate on the implementation of network protocols. It can be
10908used to create both network servers and clients.")
10909 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
10910 (home-page "https://github.com/eventmachine/eventmachine")
10911 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
10912
10913(define-public ruby-ruby-engine
10914 (package
10915 (name "ruby-ruby-engine")
10916 (version "2.0.3")
10917 (source
10918 (origin
10919 (method url-fetch)
10920 (uri (rubygems-uri "ruby_engine" version))
10921 (sha256
10922 (base32 "1ala4zx6gdq271n2bh2x4h1v9j2rbmnx71m1nszw5kfgz3gffana"))))
10923 (build-system ruby-build-system)
10924 (arguments
10925 `(#:phases
10926 (modify-phases %standard-phases
10927 (add-after 'extract-gemspec 'clean-up
10928 (lambda _
10929 (delete-file "Gemfile.lock")
10930 (substitute* "ruby_engine.gemspec"
10931 ;; Remove unnecessary imports that would entail further
10932 ;; dependencies.
10933 ((".*<rdoc.*") "")
10934 ((".*<rubygems-tasks.*") "")
10935 (("\"Gemfile.lock\".freeze, ") "")
10936 ;; Soften rake/rspec dependencies
10937 (("%q<(rake|rspec)>.freeze, \\[\"~> .*\"\\.freeze\\]" all dep)
10938 (format #f "~s" dep)))
10939 (substitute* "Rakefile"
10940 (("require 'rubygems/tasks'") "")
10941 (("Gem::Tasks.new") "")))))))
10942 (native-inputs
10943 (list bundler ruby-rake ruby-rspec))
10944 (synopsis "Simplifies checking for Ruby implementation")
10945 (description
10946 "@code{ruby_engine} provides an RubyEngine class that can be used to
10947check which implementation of Ruby is in use. It can provide the interpreter
10948name and provides query methods such as @code{RubyEngine.mri?}.")
10949 (home-page "https://github.com/janlelis/ruby_engine")
10950 (license license:expat)))
10951
10952(define-public ruby-mimemagic
10953 (package
10954 (name "ruby-mimemagic")
10955 (version "0.3.3")
10956 (source
10957 (origin
10958 (method url-fetch)
10959 (uri (rubygems-uri "mimemagic" version))
10960 (sha256
10961 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
10962 (build-system ruby-build-system)
10963 (arguments
10964 '(#:phases
10965 (modify-phases %standard-phases
10966 ;; This phase breaks the tests, as it patches some of the test data.
10967 (delete 'patch-source-shebangs))))
10968 (native-inputs
10969 (list ruby-bacon))
10970 (synopsis "Ruby library for MIME detection by extension or content")
10971 (description
10972 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
10973extension or content, using the freedesktop.org.xml shared-mime-info
10974database.")
10975 (home-page "https://github.com/minad/mimemagic")
10976 (license license:expat)))
10977
10978(define-public ruby-mini-mime
10979 (package
10980 (name "ruby-mini-mime")
10981 (version "1.1.2")
10982 (source
10983 (origin
10984 (method url-fetch)
10985 (uri (rubygems-uri "mini_mime" version))
10986 (sha256
10987 (base32
10988 "0lbim375gw2dk6383qirz13hgdmxlan0vc5da2l072j3qw6fqjm5"))))
10989 (build-system ruby-build-system)
10990 (synopsis "Lightweight mime type lookup toy")
10991 (description "This package provides a lightweight mime type lookup toy.")
10992 (home-page "https://github.com/discourse/mini_mime")
10993 (license license:expat)))
10994
10995(define-public ruby-fileutils
10996 (package
10997 (name "ruby-fileutils")
10998 (version "1.7.0")
10999 (source (origin
11000 (method git-fetch) ;for tests
11001 (uri (git-reference
11002 (url "https://github.com/ruby/fileutils")
11003 (commit (string-append "v" version))))
11004 (file-name (git-file-name name version))
11005 (sha256
11006 (base32
11007 "0m68gaqclnc2wflilmrnr19kky2gr6fjf6k3yq02sf9scs281kid"))))
11008 (build-system ruby-build-system)
11009 (arguments
11010 (list
11011 #:phases
11012 #~(modify-phases %standard-phases
11013 (add-before 'check 'disable-problematic-tests
11014 (lambda _
11015 (substitute* "test/fileutils/test_fileutils.rb"
11016 ;; The 'test_chown' tests depends on /etc/groups, which
11017 ;; doesn't exist in the build environment.
11018 (("def test_chown.*" all)
11019 (string-append all " return true\n"))
11020 ;; The 'test_cp_r_dev' expects a RuntimeError to be raised
11021 ;; when copying a char device to a directory, but this is not
11022 ;; triggered in the build environment, for reasons unknown.
11023 (("def test_cp_r_dev.*" all)
11024 (string-append all " return true\n"))))))))
11025 (synopsis "Ruby utility library to manipulate files")
11026 (description "The FileUtils Ruby library includes Several file utility
11027methods for copying, moving, removing, etc.")
11028 (home-page "https://github.com/ruby/fileutils")
11029 (license license:bsd-2)))
11030
11031(define-public ruby-sqlite3
11032 (package
11033 (name "ruby-sqlite3")
11034 (version "2.5.0")
11035 (source
11036 (origin
11037 (method git-fetch) ;for tests
11038 (uri (git-reference
11039 (url "https://github.com/sparklemotion/sqlite3-ruby")
11040 (commit (string-append "v" version))))
11041 (file-name (git-file-name name version))
11042 (sha256
11043 (base32
11044 "1fanv7bv5lszd5g752yy8nmpjhrl9gqwbbkbis2xbh83y96f2zfm"))))
11045 (build-system ruby-build-system)
11046 (arguments
11047 (list
11048 #:gem-flags #~(list "--" "--enable-system-libraries")
11049 #:modules '((guix build ruby-build-system)
11050 (guix build utils)
11051 (ice-9 rdelim)
11052 (ice-9 textual-ports))
11053 #:phases
11054 #~(modify-phases %standard-phases
11055 (add-after 'unpack 'relax-requirements
11056 (lambda _
11057 ;; Don't try to format C code, remove rubocop-rake.
11058 (delete-file "rakelib/format.rake")
11059 ;; Don't try to run valgrind-like memory tests.
11060 ;; This cuts all lines after Minitest::TestTask.create
11061 (with-atomic-file-replacement
11062 "rakelib/test.rake"
11063 (lambda (in out)
11064 (let loop ()
11065 (let ((line (read-line in)))
11066 (cond
11067 ((eof-object? line) #f)
11068 ((string-prefix? "Minitest::TestTask.create" line) #f)
11069 (else
11070 (format out "~a~%" line)
11071 (loop)))))))))
11072 (delete 'check)
11073 (add-after 'install 'check
11074 (lambda* (#:key tests? #:allow-other-keys)
11075 (when tests?
11076 (setenv "GEM_PATH"
11077 (string-append (getenv "GEM_PATH") ":"
11078 #$output "/lib/ruby/vendor_ruby"))
11079 (invoke "rake" "test")))))))
11080 (propagated-inputs
11081 (list ruby-mini-portile-2))
11082 (inputs
11083 (list sqlite))
11084 (native-inputs
11085 (list ruby-hoe
11086 ruby-rake-compiler
11087 ruby-rake-compiler-dock))
11088 (synopsis "Interface with SQLite3 databases")
11089 (description
11090 "This module allows Ruby programs to interface with the SQLite3 database
11091engine.")
11092 (home-page
11093 "https://github.com/sparklemotion/sqlite3-ruby")
11094 (license license:bsd-3)))
11095
11096(define-public ruby-sqlite3-1.4
11097 (package/inherit ruby-sqlite3
11098 (name "ruby-sqlite3")
11099 (version "1.4.4")
11100 (source
11101 (origin
11102 (method git-fetch) ;for tests
11103 (uri (git-reference
11104 (url "https://github.com/sparklemotion/sqlite3-ruby")
11105 (commit (string-append "v" version))))
11106 (file-name (git-file-name name version))
11107 (sha256
11108 (base32
11109 "0ngirjbai3f5ki2sf6m4gxbbrjpr3b35bz5nrz1cifyw1jk6a6sr"))))
11110 (arguments
11111 (substitute-keyword-arguments arguments
11112 ((#:tests? #t #t) #f)
11113 ((#:gem-flags _ #f)
11114 ''("--"
11115 "--enable-system-libraries"
11116 "--with-cflags=-Wno-error=incompatible-pointer-types -Wno-error=int-conversion"))
11117 ((#:phases phases #~%standard-phases)
11118 #~(modify-phases #$phases
11119 (delete 'relax-requirements)
11120 (add-after 'unpack 'fix-version
11121 (lambda _
11122 (substitute* "sqlite3.gemspec"
11123 (("s\\.version = .*")
11124 (format #f "s.version = ~s~%" #$version)))))))))))
11125
11126(define-public ruby-shoulda-context
11127 (package
11128 (name "ruby-shoulda-context")
11129 (version "2.0.0")
11130 (source
11131 (origin
11132 (method url-fetch)
11133 (uri (rubygems-uri "shoulda-context" version))
11134 (sha256
11135 (base32
11136 "0d1clcp92jv8756h09kbc55qiqncn666alx0s83za06q5hs4bpvs"))))
11137 (build-system ruby-build-system)
11138 (arguments
11139 `(#:phases
11140 (modify-phases %standard-phases
11141 (replace 'check
11142 (lambda* (#:key tests? #:allow-other-keys)
11143 (when tests?
11144 ;; Do not run tests to avoid circular dependence with rails.
11145 ;; Instead just import the library to test.
11146 (invoke "ruby" "-Ilib" "-r" "shoulda-context")))))))
11147 (synopsis "Test::Unit context framework extracted from Shoulda")
11148 (description
11149 "@code{shoulda-context} is the context framework extracted from Shoulda.
11150Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
11151context, setup, and should blocks combine to produce natural test method
11152names.")
11153 (home-page "https://github.com/thoughtbot/shoulda-context")
11154 (license license:expat)))
11155
11156(define-public ruby-shoulda-matchers
11157 (package
11158 (name "ruby-shoulda-matchers")
11159 (version "5.3.0")
11160 (source
11161 (origin
11162 (method url-fetch)
11163 (uri (rubygems-uri "shoulda-matchers" version))
11164 (sha256
11165 (base32
11166 "11igjgh16dl5pwqizdmclzlzpv7mbmnh8fx7m9b5kfsjhwxqdfpn"))))
11167 (build-system ruby-build-system)
11168 (arguments
11169 `(#:phases
11170 (modify-phases %standard-phases
11171 (replace 'check
11172 (lambda* (#:key tests? #:allow-other-keys)
11173 (when tests?
11174 ;; Do not run tests to avoid circular dependence with rails. Instead
11175 ;; just import the library to test.
11176 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
11177 (propagated-inputs
11178 (list ruby-activesupport))
11179 (synopsis "Collection of testing matchers extracted from Shoulda")
11180 (description
11181 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
11182test common Rails functionality. These tests would otherwise be much longer,
11183more complex, and error-prone.")
11184 (home-page "https://github.com/thoughtbot/shoulda-matchers")
11185 (license license:expat)))
11186
11187(define-public ruby-shoulda
11188 (package
11189 (name "ruby-shoulda")
11190 (version "4.0.0")
11191 (source
11192 (origin
11193 (method url-fetch)
11194 (uri (rubygems-uri "shoulda" version))
11195 (sha256
11196 (base32
11197 "02lww34kn1g6lidp4rx4rs6bqvirrzxlfw1y2wm11aif8f622xz6"))))
11198 (build-system ruby-build-system)
11199 (arguments
11200 `(#:phases
11201 (modify-phases %standard-phases
11202 (replace 'check
11203 (lambda* (#:key tests? #:allow-other-keys)
11204 (when tests?
11205 ;; Don't run tests to avoid circular dependence with rails.
11206 ;; Instead just import the library to test.
11207 (invoke "ruby" "-Ilib" "-r" "shoulda"))))
11208 (add-after 'extract-gemspec 'relax-requirements
11209 (lambda _
11210 (substitute* "shoulda.gemspec"
11211 ;; An older version of shoulda-matchers (4.0) is used, out of
11212 ;; little maintenance rather than because of an real
11213 ;; incompatibility (see:
11214 ;; https://github.com/thoughtbot/shoulda/issues/275).
11215 ((", \\[\"~> 4.0\"]") "")))))))
11216 (propagated-inputs
11217 (list ruby-shoulda-context ruby-shoulda-matchers))
11218 (synopsis "Context framework and matchers for testing")
11219 (description
11220 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
11221@code{shoulda-matchers} providing tools for writing tests.")
11222 (home-page "https://github.com/thoughtbot/shoulda")
11223 (license license:expat)))
11224
11225(define-public ruby-unf
11226 (package
11227 (name "ruby-unf")
11228 (version "0.2.0")
11229 (source
11230 (origin
11231 (method git-fetch)
11232 (uri (git-reference
11233 (url "https://github.com/knu/ruby-unf")
11234 (commit (string-append "v" version))))
11235 (file-name (git-file-name name version))
11236 (sha256
11237 (base32 "1zczv2z4yk73gymh5ymjgf857z6274nwv7gnslip507ds67r78ay"))
11238 (modules '((guix build utils)))
11239 (snippet #~(begin
11240 (delete-file-recursively "ext")
11241 (substitute* "unf.gemspec"
11242 (("gem\\.extensions.*") ""))))))
11243 (build-system ruby-build-system)
11244 (arguments
11245 `(#:phases
11246 (modify-phases %standard-phases
11247 (add-before 'check 'add-dependency-to-bundler
11248 (lambda _
11249 ;; test-unit is required but not provided by the bundler
11250 ;; environment. This is fixed in the upstream repository but fix
11251 ;; has not been released.
11252 (substitute* "Gemfile"
11253 (("^gemspec") "gem 'test-unit'\ngemspec")))))))
11254 (propagated-inputs
11255 (list ruby-unf-ext))
11256 (native-inputs
11257 (list ruby-shoulda bundler ruby-test-unit))
11258 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
11259 (description
11260 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
11261support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
11262@code{java.text.Normalizer} on JRuby.")
11263 (home-page "https://github.com/knu/ruby-unf")
11264 (license license:bsd-2)))
11265
11266(define-public ruby-warden
11267 (package
11268 (name "ruby-warden")
11269 (version "1.2.8")
11270 (source
11271 (origin
11272 (method url-fetch)
11273 (uri (rubygems-uri "warden" version))
11274 (sha256
11275 (base32
11276 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
11277 (build-system ruby-build-system)
11278 (arguments
11279 '(#:tests? #f)) ; No included tests
11280 (propagated-inputs
11281 (list ruby-rack))
11282 (synopsis "Rack middleware providing authentication")
11283 (description
11284 "Warden is a Rack-based middleware that provides a mechanism for
11285authentication in Ruby web applications.")
11286 (home-page "https://github.com/wardencommunity/warden")
11287 (license license:expat)))
11288
11289(define-public ruby-warden-oauth2
11290 (package
11291 (name "ruby-warden-oauth2")
11292 (version "0.0.1")
11293 (source
11294 (origin
11295 (method url-fetch)
11296 (uri (rubygems-uri "warden-oauth2" version))
11297 (sha256
11298 (base32
11299 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
11300 (build-system ruby-build-system)
11301 (arguments
11302 '(#:test-target "spec"
11303 #:phases
11304 (modify-phases %standard-phases
11305 (add-after 'unpack 'remove-unnecessary-dependencies
11306 (lambda _
11307 (substitute* "Gemfile"
11308 ;; All of these gems relate to development, and are unnecessary
11309 ;; when running the tests
11310 (("gem 'guard-bundler'") "")
11311 (("gem 'guard'") "")
11312 (("gem 'guard-rspec'") "")
11313 (("gem 'rb-fsevent'") "")
11314 (("gem 'pry'") "")
11315 (("gem 'growl'") ""))))
11316 ;; The test suite doesn't work with rspec@2, and this is incompatible
11317 ;; with the current version of Rake, so invoke Rspec directly
11318 (replace 'check
11319 (lambda* (#:key tests? #:allow-other-keys)
11320 (when tests?
11321 (invoke "bundle" "exec" "rspec")))))))
11322 (propagated-inputs
11323 (list ruby-warden))
11324 (native-inputs
11325 (list bundler ruby-rspec-2 ruby-rack-test))
11326 (synopsis "OAuth 2.0 strategies for Warden")
11327 (description
11328 "This library extends Warden to support OAuth 2.0 authorized API
11329requests.")
11330 (home-page "https://github.com/opperator/warden-oauth2")
11331 (license license:expat)))
11332
11333(define-public ruby-webmock
11334 (package
11335 (name "ruby-webmock")
11336 (version "3.11.2")
11337 (source
11338 (origin
11339 (method url-fetch)
11340 (uri (rubygems-uri "webmock" version))
11341 (sha256
11342 (base32
11343 "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
11344 (build-system ruby-build-system)
11345 (native-inputs
11346 (list bundler ruby-rspec))
11347 (propagated-inputs
11348 (list ruby-addressable ruby-crack ruby-hashdiff))
11349 (synopsis "Allows stubbing and setting expectations on HTTP requests")
11350 (description
11351 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
11352requests. This is useful when testing software.")
11353 (home-page "https://github.com/bblimke/webmock")
11354 (license license:expat)))
11355
11356(define-public ruby-webmock-2
11357 (package
11358 (inherit ruby-webmock)
11359 (name "ruby-webmock")
11360 (version "2.3.2")
11361 (source
11362 (origin
11363 (method url-fetch)
11364 (uri (rubygems-uri "webmock" version))
11365 (sha256
11366 (base32
11367 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
11368
11369(define-public ruby-unicode-display-width
11370 (package
11371 (name "ruby-unicode-display-width")
11372 (version "3.2.0")
11373 (source
11374 (origin
11375 (method url-fetch)
11376 (uri (rubygems-uri "unicode-display_width" version))
11377 (sha256
11378 (base32
11379 "0hiwhnqpq271xqari6mg996fgjps42sffm9cpk6ljn8sd2srdp8c"))))
11380 (build-system ruby-build-system)
11381 (arguments
11382 '(;; Test data not included.
11383 #:tests? #f))
11384 (propagated-inputs (list ruby-unicode-emoji))
11385 (synopsis "Determine the monospace display width of Ruby strings")
11386 (description
11387 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
11388display width of strings in Ruby.")
11389 (home-page "https://github.com/janlelis/unicode-display_width")
11390 (license license:expat)))
11391
11392;; There is another gem called 'ruby-version' so we use an underscore in this
11393;; name
11394(define-public ruby_version
11395 (package
11396 (name "ruby_version")
11397 (version "1.0.2")
11398 (source
11399 (origin
11400 (method url-fetch)
11401 (uri (rubygems-uri "ruby_version" version))
11402 (sha256
11403 (base32
11404 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
11405 (build-system ruby-build-system)
11406 (arguments
11407 `(#:phases
11408 (modify-phases %standard-phases
11409 (add-before 'check 'fix-dependencies
11410 (lambda _
11411 ;; Remove the Gemfile.lock, as we want to use Guix packages at
11412 ;; whatever versions.
11413 (delete-file "Gemfile.lock")
11414 ;; Remove the included gem files as they unnecessary.
11415 (delete-file-recursively "pkg/")
11416 ;; Accept any version of rake, rdoc and rspec
11417 (substitute* "ruby_version.gemspec"
11418 (("%q<rake.*") "%q<rake>)\n")
11419 (("%q<rdoc.*") "%q<rdoc>)\n")
11420 (("%q<rspec.*") "%q<rspec>)\n"))
11421 ;; Do not use bundler.
11422 (substitute* "Rakefile"
11423 (("Bundler\\.setup.*") "nil\n")))))))
11424 (native-inputs
11425 (list ruby-rdoc ruby-rspec ruby-rubygems-tasks))
11426 (synopsis "Ruby library to help check the Ruby version")
11427 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
11428checking for the right Ruby version in software.")
11429 (home-page "https://github.com/janlelis/ruby_version")
11430 (license license:expat)))
11431
11432(define-public ruby-websocket-client-simple
11433 (package
11434 (name "ruby-websocket-client-simple")
11435 (version "0.9.0")
11436 (source (origin
11437 (method url-fetch)
11438 (uri (rubygems-uri "websocket-client-simple" version))
11439 (sha256
11440 (base32
11441 "029iar7fnnrgmc1k463xlkpr4n72s4zdgri13rqmmcr295g7r8zr"))))
11442 (build-system ruby-build-system)
11443 (arguments (list #:test-target "default"))
11444 (native-inputs (list ruby-eventmachine ruby-websocket-eventmachine-server))
11445 (propagated-inputs (list ruby-event-emitter ruby-websocket))
11446 (synopsis "Simple WebSocket client for Ruby")
11447 (description "This package provides a simple WebSocket client for Ruby.")
11448 (home-page "https://github.com/ruby-jp/websocket-client-simple")
11449 (license license:expat)))
11450
11451(define-public ruby-websocket-eventmachine-base
11452 (package
11453 (name "ruby-websocket-eventmachine-base")
11454 (version "1.2.0")
11455 (source (origin
11456 (method url-fetch)
11457 (uri (rubygems-uri "websocket-eventmachine-base" version))
11458 (sha256
11459 (base32
11460 "0wiz61mcwgs3k21cdr5l9b4jpg29gl6mflfampww2v525yc3hr1r"))))
11461 (build-system ruby-build-system)
11462 (arguments
11463 (list #:tests? #f)) ;no test suite
11464 (propagated-inputs (list ruby-eventmachine ruby-websocket
11465 ruby-websocket-native))
11466 (synopsis "WebSocket base for Ruby client and server")
11467 (description "This package provides a WebSocket base for a Ruby client and
11468server.")
11469 (home-page "https://github.com/imanel/websocket-eventmachine-base")
11470 (license license:expat)))
11471
11472(define-public ruby-websocket-eventmachine-server
11473 (package
11474 (name "ruby-websocket-eventmachine-server")
11475 (version "1.0.1")
11476 (source (origin
11477 (method url-fetch)
11478 (uri (rubygems-uri "websocket-eventmachine-server" version))
11479 (sha256
11480 (base32
11481 "0iqpzc8s028nck1flqaj784gvyn64wy1h3svpa4y2847wklg8sms"))))
11482 (build-system ruby-build-system)
11483 ;; TODO: The test suite requires Autobahn, not yet packaged in Guix.
11484 (arguments (list #:tests? #f))
11485 (propagated-inputs (list ruby-websocket-eventmachine-base))
11486 (synopsis "WebSocket server for Ruby")
11487 (description "This package provides a WebSocket server for Ruby.")
11488 (home-page "https://github.com/imanel/websocket-eventmachine-server")
11489 (license license:expat)))
11490
11491(define-public ruby-websocket-native
11492 (package
11493 (name "ruby-websocket-native")
11494 (version "1.0.0")
11495 (source (origin
11496 (method url-fetch)
11497 (uri (rubygems-uri "websocket-native" version))
11498 (sha256
11499 (base32
11500 "1kgvd3gyzh7hk0ddzn85jrs4csxm54qnvla95ldyn6rzgfbjchdn"))))
11501 (build-system ruby-build-system)
11502 (arguments
11503 (list #:test-target "spec"
11504 #:phases #~(modify-phases %standard-phases
11505 (add-before 'check 'disable-problematic-tests
11506 (lambda _
11507 (substitute* "spec/websocket_spec.rb"
11508 (("it \"should have mask_native defined\"" all)
11509 (string-append "x" all)))))
11510 (add-after 'build 'compile
11511 (lambda _
11512 (invoke "rake" "compile"))))))
11513 (native-inputs (list ruby-rake-compiler ruby-rspec))
11514 (synopsis "Native Ruby extension for the WebSocket gem")
11515 (description "This package provides a native extension that can increase
11516performance by about 25% compared to the pure Ruby WebSocket implementation.")
11517 (home-page "https://github.com/imanel/websocket-ruby-native")
11518 (license license:expat)))
11519
11520(define-public ruby-websocket-driver
11521 (package
11522 (name "ruby-websocket-driver")
11523 (version "0.7.1")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 (uri (rubygems-uri "websocket-driver" version))
11528 (sha256
11529 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
11530 (build-system ruby-build-system)
11531 (arguments
11532 '(#:tests? #f)) ; no included tests
11533 (propagated-inputs
11534 (list ruby-websocket-extensions))
11535 (synopsis "WebSocket protocol handler with pluggable I/O")
11536 (description
11537 "@code{websocket-driver} provides a complete implementation of the
11538WebSocket protocols that can be hooked up to any TCP library")
11539 (home-page "https://github.com/faye/websocket-driver-ruby")
11540 (license license:expat)))
11541
11542(define-public ruby-websocket-extensions
11543 (package
11544 (name "ruby-websocket-extensions")
11545 (version "0.1.3")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (rubygems-uri "websocket-extensions" version))
11550 (sha256
11551 (base32
11552 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
11553 (build-system ruby-build-system)
11554 (arguments
11555 '(;; No included tests
11556 #:tests? #f))
11557 (synopsis "Generic extension manager for WebSocket connections")
11558 (description
11559 "@code{websocket-extensions} provides a container for registering
11560extension plugins.")
11561 (home-page "https://github.com/faye/websocket-extensions-ruby")
11562 (license license:expat)))
11563
11564(define-public ruby-domain-name
11565 (package
11566 (name "ruby-domain-name")
11567 (version "0.5.20190701")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (rubygems-uri "domain_name" version))
11572 (sha256
11573 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
11574 (build-system ruby-build-system)
11575 (arguments
11576 `(#:phases
11577 (modify-phases %standard-phases
11578 (add-before 'check 'fix-versions
11579 (lambda _
11580 ;; Fix NameError that appears to already be fixed upstream.
11581 (substitute* "Rakefile"
11582 (("DomainName::VERSION")
11583 "Bundler::GemHelper.gemspec.version"))
11584 ;; Loosen unnecessarily strict test-unit version specification.
11585 (substitute* "domain_name.gemspec"
11586 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
11587 #t)))))
11588 (propagated-inputs
11589 (list ruby-unf))
11590 (native-inputs
11591 (list ruby-shoulda bundler ruby-test-unit))
11592 (synopsis "Domain name manipulation library")
11593 (description
11594 "@code{domain_name} is a Domain name manipulation library. It parses a
11595domain name ready for extracting the registered domain and TLD (Top Level
11596Domain). It can also be used for cookie domain validation based on the Public
11597Suffix List.")
11598 (home-page "https://github.com/knu/ruby-domain_name")
11599 (license license:bsd-2)))
11600
11601(define-public ruby-dotenv
11602 (package
11603 (name "ruby-dotenv")
11604 (version "3.1.7")
11605 (source (origin
11606 (method git-fetch) ;for the tests
11607 (uri (git-reference
11608 (url "https://github.com/bkeepers/dotenv")
11609 (commit (string-append "v" version))))
11610 (file-name (git-file-name name version))
11611 (sha256
11612 (base32
11613 "19j0acy12si537hwi4q54q8n5ycmlvfd2ik5y6r7jir6ww06l8yx"))))
11614 (build-system ruby-build-system)
11615 (arguments
11616 (list
11617 #:test-target "spec"
11618 #:phases
11619 #~(modify-phases %standard-phases
11620 (add-after 'unpack 'do-not-build-dotenv-rails
11621 (lambda _
11622 ;; The repository includes the definitions of two packages,
11623 ;; 'dotenv' and 'dotenv-rails'. Since we want to package them
11624 ;; separately, remove the dotenv-rails and associated Rake
11625 ;; tasks.
11626 (delete-file "dotenv-rails.gemspec")
11627 (delete-file "spec/dotenv/rails_spec.rb")
11628 (delete-file "spec/dotenv/log_subscriber_spec.rb")
11629 (substitute* "spec/spec_helper.rb"
11630 (("require \"dotenv\"" all)
11631 (string-append "require \"pathname\"\n" all)))
11632 (substitute* "Rakefile"
11633 (("DotenvRailsGemHelper.install_tasks name: \"dotenv-rails\"")
11634 "")
11635 ((", \"dotenv-rails:.*\"")
11636 ""))))
11637 (replace 'replace-git-ls-files
11638 (lambda _
11639 (substitute* "dotenv.gemspec"
11640 (("`git ls-files (README.md LICENSE lib bin) \\| ([^`]*`)"
11641 all files command)
11642 (string-append
11643 "`find " files " -type f | sort | " command))))))))
11644 (native-inputs (list ruby-standard ruby-rspec))
11645 (synopsis "Ruby library for setting environment variables")
11646 (description "Dotenv is a Ruby library for setting environment variables
11647defined in a @file{.env} file.")
11648 (home-page "https://github.com/bkeepers/dotenv")
11649 (license license:expat)))
11650
11651(define-public ruby-dotenv-rails
11652 (package
11653 (inherit ruby-dotenv)
11654 (name "ruby-dotenv-rails")
11655 (arguments
11656 (substitute-keyword-arguments arguments
11657 ((#:phases phases '%standard-phases)
11658 #~(modify-phases #$phases
11659 (delete 'do-not-build-dotenv-rails)
11660 (add-after 'unpack 'delete-Gemfile
11661 (lambda _
11662 ;; It defines extraneous dependencies; remove it.
11663 (delete-file "Gemfile")))
11664 (add-after 'unpack 'remove-extraneous-gemspec
11665 (lambda _
11666 (delete-file "dotenv.gemspec")
11667 (substitute* "Gemfile"
11668 ((".*\"dotenv\".*") ""))
11669 (substitute* "Rakefile"
11670 ;; Remove the dotenv-related Rake tasks.
11671 (("Bundler::GemHelper.install_tasks name: \"dotenv\"")
11672 "")
11673 (("\"dotenv:[^\"]*\", ")
11674 ""))))
11675 (replace 'replace-git-ls-files
11676 (lambda _
11677 (substitute* "dotenv-rails.gemspec"
11678 (("`git ls-files lib \\| grep rails`")
11679 "`find lib -type f | sort | grep rails`"))))))))
11680 (native-inputs (list ruby-rspec ruby-spring ruby-standard))
11681 (propagated-inputs (list ruby-dotenv ruby-railties))
11682 (synopsis "Ruby library for setting environment variables in Rails project")
11683 (description "Dotenv is a Ruby library for setting environment variables
11684defined in a @file{.env} file. This is the Rails variant, adapted for use
11685with Ruby on Rails projects.")))
11686
11687(define-public ruby-http-accept
11688 (package
11689 (name "ruby-http-accept")
11690 (version "2.2.0")
11691 (source (origin
11692 (method git-fetch) ;for the tests
11693 (uri (git-reference
11694 (url "https://github.com/socketry/http-accept")
11695 (commit (string-append "v" version))))
11696 (file-name (git-file-name name version))
11697 (sha256
11698 (base32
11699 "1d69cy12hqbcqrhw4dibvdq5pqklxsa59kih6pzl479nxq79rgs7"))))
11700 (build-system ruby-build-system)
11701 (arguments
11702 (list
11703 #:phases
11704 #~(modify-phases %standard-phases
11705 (add-after 'unpack 'remove-missing-key-directive
11706 ;; This seem to be a common problem in Ruby projects (see:
11707 ;; https://github.com/prawnpdf/ttfunk/issues/99).
11708 (lambda _
11709 (substitute* "http-accept.gemspec"
11710 ((".*spec.signing_key.*") ""))))
11711 (replace 'check
11712 (lambda* (#:key tests? #:allow-other-keys)
11713 (when tests?
11714 (invoke "rspec")))))))
11715 (native-inputs
11716 (list ruby-rspec
11717 ruby-covered))
11718 (synopsis "Parse Accept and Accept-Language HTTP headers")
11719 (description
11720 "This package provides a set of parsers for Accept and Accept-Language
11721HTTP headers.")
11722 (home-page "https://github.com/socketry/http-accept")
11723 (license license:expat)))
11724
11725(define-public ruby-http-accept-1
11726 (package
11727 (inherit ruby-http-accept)
11728 (version "1.7.0")
11729 (source (origin
11730 (method git-fetch) ;for the tests
11731 (uri (git-reference
11732 (url "https://github.com/ioquatix/http-accept")
11733 (commit (string-append "v" version))))
11734 (file-name (git-file-name "ruby-http-accept" version))
11735 (sha256
11736 (base32
11737 "1hnqmqpa135s3xgcvv30qzqm8zp88my1aj05m72d2q9cvc31g92z"))))))
11738
11739(define-public ruby-http-cookie
11740 (package
11741 (name "ruby-http-cookie")
11742 (version "1.0.5")
11743 (source
11744 (origin
11745 (method url-fetch)
11746 (uri (rubygems-uri "http-cookie" version))
11747 (sha256
11748 (base32
11749 "13rilvlv8kwbzqfb644qp6hrbsj82cbqmnzcvqip1p6vqx36sxbk"))))
11750 (build-system ruby-build-system)
11751 (arguments
11752 (list
11753 #:phases
11754 #~(modify-phases %standard-phases
11755 (add-before 'check 'add-dependency-to-bundler
11756 (lambda _
11757 ;; Fix NameError
11758 (substitute* "Rakefile"
11759 (("HTTP::Cookie::VERSION")
11760 "Bundler::GemHelper.gemspec.version")))))))
11761 (propagated-inputs
11762 (list ruby-domain-name))
11763 (native-inputs
11764 (list ruby-simplecov
11765 bundler
11766 ruby-sqlite3
11767 ruby-test-unit))
11768 (synopsis "Handle HTTP Cookies based on RFC 6265")
11769 (description
11770 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
11771RFC 6265. It has been designed with security, standards compliance and
11772compatibility in mind, to behave just the same as today's major web browsers.
11773It has built-in support for the legacy @code{cookies.txt} and
11774@code{cookies.sqlite} formats of Mozilla Firefox.")
11775 (home-page "https://github.com/sparklemotion/http-cookie")
11776 (license license:expat)))
11777
11778(define-public ruby-httpclient
11779 (package
11780 (name "ruby-httpclient")
11781 (version "2.8.3")
11782 (source
11783 (origin
11784 (method url-fetch)
11785 (uri (rubygems-uri "httpclient" version))
11786 (sha256
11787 (base32
11788 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
11789 (build-system ruby-build-system)
11790 (arguments
11791 '(;; TODO: Some tests currently fail
11792 ;; ------
11793 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
11794 ;; 2 omissions, 0 notifications
11795 ;; 91.866% passed
11796 ;; ------
11797 ;; 6.49 tests/s, 22.41 assertions/s
11798 #:tests? #f
11799 #:phases
11800 (modify-phases %standard-phases
11801 (replace 'check
11802 (lambda* (#:key tests? #:allow-other-keys)
11803 (if tests?
11804 (invoke "ruby"
11805 "-Ilib"
11806 "test/runner.rb")))))))
11807 (native-inputs
11808 (list ruby-rack))
11809 (synopsis
11810 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
11811 (description
11812 "The @code{httpclient} ruby library provides functionality related to
11813HTTP. Compared to the @code{net/http} library, @code{httpclient} also provides
11814Cookie, multithreading and authentication (digest, NTLM) support.
11815
11816Also provided is a @command{httpclient} command, which can perform HTTP
11817requests either using arguments or with an interactive prompt.")
11818 (home-page "https://github.com/nahi/httpclient")
11819 (license license:ruby)))
11820
11821(define-public ruby-ansi
11822 (package
11823 (name "ruby-ansi")
11824 (version "1.5.0")
11825 (source
11826 (origin
11827 (method git-fetch)
11828 ;; Fetch from GitHub as the gem does not contain testing code.
11829 (uri (git-reference
11830 (url "https://github.com/rubyworks/ansi")
11831 (commit version)))
11832 (file-name (git-file-name name version))
11833 (sha256
11834 (base32
11835 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
11836 (build-system ruby-build-system)
11837 (arguments
11838 `(#:phases
11839 (modify-phases %standard-phases
11840 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
11841 ;; cycle ansi, qed, ansi. Instead simply test that the library can
11842 ;; be require'd.
11843 (replace 'check
11844 (lambda _
11845 (invoke "ruby" "-Ilib" "-r" "ansi")))
11846 (add-before 'validate-runpath 'replace-broken-symlink
11847 (lambda* (#:key outputs #:allow-other-keys)
11848 (let* ((out (assoc-ref outputs "out"))
11849 (file (string-append
11850 out "/lib/ruby/vendor_ruby/gems/ansi-"
11851 ,version "/lib/ansi.yml")))
11852 ;; XXX: This symlink is broken since ruby 2.4.
11853 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
11854 (delete-file file)
11855 (symlink "../.index" file)))))))
11856 (synopsis "ANSI escape code related libraries")
11857 (description
11858 "This package is a collection of ANSI escape code related libraries
11859enabling ANSI colorization and stylization of console output. Included in the
11860library are the @code{Code} module, which defines ANSI codes as constants and
11861methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
11862@code{ProgressBar}, and a @code{String} subclass. The library also includes a
11863@code{Terminal} module which provides information about the current output
11864device.")
11865 (home-page "https://rubyworks.github.io/ansi/")
11866 (license license:bsd-2)))
11867
11868(define-public ruby-systemu
11869 (package
11870 (name "ruby-systemu")
11871 (version "2.6.5")
11872 (source
11873 (origin
11874 (method url-fetch)
11875 (uri (rubygems-uri "systemu" version))
11876 (sha256
11877 (base32
11878 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
11879 (build-system ruby-build-system)
11880 (arguments
11881 `(#:phases
11882 (modify-phases %standard-phases
11883 (add-before 'check 'set-version
11884 (lambda _
11885 (setenv "VERSION" ,version))))))
11886 (synopsis "Capture of stdout/stderr and handling of child processes")
11887 (description
11888 "Systemu can be used on any platform to return status, stdout, and stderr
11889of any command. Unlike other methods like @code{open3} and @code{popen4}
11890there is no danger of full pipes or threading issues hanging your process or
11891subprocess.")
11892 (home-page "https://github.com/ahoward/systemu")
11893 (license license:ruby)))
11894
11895(define-public ruby-bcrypt
11896 (package
11897 (name "ruby-bcrypt")
11898 (version "3.1.20")
11899 ;; FIXME: Unbundle the bcrypt library used.
11900 (source
11901 (origin
11902 (method git-fetch)
11903 (uri (git-reference
11904 (url "https://github.com/bcrypt-ruby/bcrypt-ruby")
11905 (commit (string-append "v" version))))
11906 (file-name (git-file-name name version))
11907 (sha256
11908 (base32 "0q6h8kmjb34hg6qjv31v374n3cavv00drsfyzv6nybdwipgyg62i"))))
11909 (build-system ruby-build-system)
11910 (arguments (list #:test-target "default")) ;compile + spec
11911 (native-inputs (list ruby-rake-compiler ruby-rspec))
11912 (synopsis "Ruby bcrypt wrapper")
11913 (description "This Ruby library provides a simple wrapper to bcrypt, a
11914secure hash algorithm for hashing passwords.")
11915 (home-page "https://github.com/bcrypt-ruby/bcrypt-ruby")
11916 (license license:expat)))
11917
11918(define-public ruby-bcrypt-pbkdf
11919 (package
11920 (name "ruby-bcrypt-pbkdf")
11921 (version "1.1.2.rc1")
11922 (source (origin
11923 (method url-fetch)
11924 (uri (rubygems-uri "bcrypt_pbkdf" version))
11925 (sha256
11926 (base32
11927 "1p2m7q7kwrj56ilw07mvzpqinryx525b05gpsa57wzm591y7waqm"))))
11928 (build-system ruby-build-system)
11929 (arguments
11930 (list #:phases #~(modify-phases %standard-phases
11931 (add-before 'build 'compile
11932 (lambda _
11933 (invoke "rake" "compile"))))))
11934 (native-inputs (list ruby-minitest ruby-rake-compiler
11935 ruby-rake-compiler-dock ruby-rdoc))
11936 (synopsis "Reading password encrypted Ed25519 keys in Ruby")
11937 (description
11938 "This gem implements @samp{bcrypt_pbkdf}, which is a variant of
11939PBKDF2 (Password-Based Key Derivation Function 2) with bcrypt-based
11940pseudorandom function. This is currently used by @samp{net-ssh} to
11941read password encrypted Ed25519 keys.")
11942 (home-page "https://github.com/net-ssh/bcrypt_pbkdf-ruby")
11943 (license license:expat)))
11944
11945(define-public ruby-bio-commandeer
11946 (package
11947 (name "ruby-bio-commandeer")
11948 (version "0.4.0")
11949 (source
11950 (origin
11951 (method url-fetch)
11952 (uri (rubygems-uri "bio-commandeer" version))
11953 (sha256
11954 (base32
11955 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
11956 (build-system ruby-build-system)
11957 (arguments
11958 `(#:phases
11959 (modify-phases %standard-phases
11960 (replace 'check
11961 ;; Run test without calling 'rake' so that jeweler is
11962 ;; not required as an input.
11963 (lambda _
11964 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
11965 (propagated-inputs
11966 (list ruby-bio-logger ruby-systemu))
11967 (native-inputs
11968 (list bundler ruby-rspec))
11969 (synopsis "Simplified running of shell commands from within Ruby")
11970 (description
11971 "Bio-commandeer provides an opinionated method of running shell commands
11972from within Ruby. The advantage of bio-commandeer over other methods of
11973running external commands is that when something goes wrong, messages printed
11974to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
11975detail to ease debugging.")
11976 (home-page "https://github.com/wwood/bioruby-commandeer")
11977 (license license:expat)))
11978
11979(define-public ruby-rubytest
11980 (package
11981 (name "ruby-rubytest")
11982 (version "0.8.1")
11983 (source
11984 (origin
11985 (method url-fetch)
11986 (uri (rubygems-uri "rubytest" version))
11987 (sha256
11988 (base32
11989 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
11990 (build-system ruby-build-system)
11991 (arguments
11992 ;; Disable regular testing to break the cycle rubytest, qed, brass,
11993 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
11994 ;; simply test that the library can be require'd.
11995 `(#:phases
11996 (modify-phases %standard-phases
11997 (replace 'check
11998 (lambda _
11999 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
12000 (propagated-inputs
12001 (list ruby-ansi))
12002 (synopsis "Universal test harness for Ruby")
12003 (description
12004 "Rubytest is a testing meta-framework for Ruby. It can handle any
12005compliant test framework and can run tests from multiple frameworks in a
12006single pass.")
12007 (home-page "https://rubyworks.github.io/rubytest")
12008 (license license:bsd-2)))
12009
12010(define-public ruby-brass
12011 (package
12012 (name "ruby-brass")
12013 (version "1.2.1")
12014 (source
12015 (origin
12016 (method url-fetch)
12017 (uri (rubygems-uri "brass" version))
12018 (sha256
12019 (base32
12020 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
12021 (build-system ruby-build-system)
12022 (arguments
12023 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
12024 ;; Instead simply test that the library can be require'd.
12025 `(#:phases
12026 (modify-phases %standard-phases
12027 (replace 'check
12028 (lambda* (#:key tests? #:allow-other-keys)
12029 (when tests?
12030 (invoke "ruby" "-Ilib" "-r" "brass")))))))
12031 (synopsis "Basic foundational assertions framework")
12032 (description
12033 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
12034foundational assertions framework for other assertion and test frameworks to
12035make use of.")
12036 (home-page "https://rubyworks.github.io/brass")
12037 (license license:bsd-2)))
12038
12039(define-public ruby-qed
12040 (package
12041 (name "ruby-qed")
12042 (version "2.9.2")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (rubygems-uri "qed" version))
12047 (sha256
12048 (base32
12049 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
12050 (build-system ruby-build-system)
12051 (arguments
12052 `(#:phases
12053 (modify-phases %standard-phases
12054 (replace 'check
12055 (lambda* (#:key tests? #:allow-other-keys)
12056 (when tests?
12057 (invoke "ruby" "-Ilib" "bin/qed")))))))
12058 (native-inputs
12059 (list ruby-ae-bootstrap))
12060 (propagated-inputs
12061 (list ruby-ansi ruby-brass))
12062 (synopsis "Test framework utilizing literate programming techniques")
12063 (description
12064 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
12065@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
12066Development} (BDD) utilizing Literate Programming techniques. QED sits
12067somewhere between lower-level testing tools like @code{Test::Unit} and
12068requirement specifications systems like Cucumber.")
12069 (home-page "https://rubyworks.github.io/qed")
12070 (license license:bsd-2)))
12071
12072(define-public ruby-que
12073 (package
12074 (name "ruby-que")
12075 (version "1.0.0.beta3")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (rubygems-uri "que" version))
12080 (sha256
12081 (base32
12082 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
12083 (build-system ruby-build-system)
12084 (arguments
12085 '(#:tests? #f)) ; No included tests
12086 (synopsis "Job queue using PostgreSQL written in Ruby")
12087 (description
12088 "This package provides a job queue that uses PostgreSQL for storing jobs
12089and locking between worker processes.")
12090 (home-page "https://github.com/chanks/que")
12091 (license license:expat)))
12092
12093(define-public ruby-queue-classic
12094 (package
12095 (name "ruby-queue-classic")
12096 (version "4.0.0")
12097 (source (origin
12098 (method url-fetch)
12099 (uri (rubygems-uri "queue_classic" version))
12100 (sha256
12101 (base32
12102 "0npyhajf2fc80apkw9s2kj0n254w5lcl4xpjidg5d5w1fb19abh6"))))
12103 (build-system ruby-build-system)
12104 (arguments (list #:tests? #f)) ;tests require a postgresql server
12105 (native-inputs (list ruby-activerecord ruby-minitest-reporters))
12106 (propagated-inputs (list ruby-pg))
12107 (synopsis "Queuing library for Ruby")
12108 (description "@code{queue_classic} is a queuing library for Ruby
12109applications (Rails, Sinatra, etc.) @code{queue_classic} features
12110asynchronous job polling, database maintained locks and has a single
12111dependency, @code{pg}.")
12112 (home-page "https://github.com/QueueClassic/queue_classic")
12113 (license license:expat)))
12114
12115(define-public ruby-pairing-heap
12116 (package
12117 (name "ruby-pairing-heap")
12118 (version "3.1.0")
12119 (source (origin
12120 (method url-fetch)
12121 (uri (rubygems-uri "pairing_heap" version))
12122 (sha256
12123 (base32
12124 "059kqpw53cancnp0bp7y1s74y1955riw33w3lqfbnms4b4mdh5zj"))))
12125 (build-system ruby-build-system)
12126 (arguments
12127 (list
12128 #:phases
12129 #~(modify-phases %standard-phases
12130 (add-after 'unpack 'patch
12131 (lambda _
12132 (substitute* "Rakefile"
12133 (("require \"standard/rake\"") "")
12134 ((":\"standard:fix\",") "")))))))
12135 (synopsis "Priority queue in pure Ruby")
12136 (description "This package provides a performant priority queue in pure
12137ruby with support for changing priority using pairing heap data structure")
12138 (home-page "https://github.com/mhib/pairing_heap")
12139 (license license:expat)))
12140
12141(define-public ruby-ae
12142 (package
12143 (name "ruby-ae")
12144 (version "1.8.2")
12145 (source
12146 (origin
12147 (method git-fetch)
12148 ;; Fetch from github so tests are included.
12149 (uri (git-reference
12150 (url "https://github.com/rubyworks/ae")
12151 (commit version)))
12152 (file-name (git-file-name name version))
12153 (sha256
12154 (base32
12155 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
12156 (build-system ruby-build-system)
12157 (arguments
12158 `(#:phases
12159 (modify-phases %standard-phases
12160 (replace 'check
12161 (lambda* (#:key tests? #:allow-other-keys)
12162 (when tests?
12163 (invoke "qed"))))
12164 (add-before 'validate-runpath 'replace-broken-symlink
12165 (lambda* (#:key outputs #:allow-other-keys)
12166 (let* ((out (assoc-ref outputs "out"))
12167 (file (string-append
12168 out "/lib/ruby/vendor_ruby/gems/ae-"
12169 ,version "/lib/ae.yml")))
12170 ;; XXX: This symlink is broken since ruby 2.4.
12171 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
12172 (delete-file file)
12173 (symlink "../.index" file)))))))
12174 (propagated-inputs
12175 (list ruby-ansi))
12176 (native-inputs
12177 (list ruby-qed))
12178 (synopsis "Assertions library")
12179 (description
12180 "Assertive Expressive (AE) is an assertions library specifically designed
12181for reuse by other test frameworks.")
12182 (home-page "https://rubyworks.github.io/ae/")
12183 (license license:bsd-2)))
12184
12185(define-public ruby-ae-bootstrap
12186 (hidden-package
12187 (package/inherit ruby-ae
12188 (arguments
12189 (substitute-keyword-arguments
12190 (package-arguments ruby-ae)
12191 ((#:tests? _ #t) #f)))
12192 (native-inputs '()))))
12193
12194(define-public ruby-lemon
12195 (package
12196 (name "ruby-lemon")
12197 (version "0.9.1")
12198 (source
12199 (origin
12200 (method url-fetch)
12201 (uri (rubygems-uri "lemon" version))
12202 (sha256
12203 (base32
12204 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
12205 (build-system ruby-build-system)
12206 (arguments
12207 `(#:phases
12208 (modify-phases %standard-phases
12209 (replace 'check (lambda _ (invoke "qed"))))))
12210 (propagated-inputs
12211 (list ruby-ae ruby-ansi ruby-rubytest))
12212 (native-inputs
12213 (list ruby-qed))
12214 (synopsis "Test framework correlating code structure and test unit")
12215 (description
12216 "Lemon is a unit testing framework that enforces highly formal
12217case-to-class and unit-to-method test construction. This enforcement can help
12218focus concern on individual units of behavior.")
12219 (home-page "https://rubyworks.github.io/lemon")
12220 (license license:bsd-2)))
12221
12222(define-public ruby-leto
12223 (package
12224 (name "ruby-leto")
12225 (version "2.1.0")
12226 (source
12227 (origin
12228 (method url-fetch)
12229 (uri (rubygems-uri "leto" version))
12230 (sha256
12231 (base32 "1ys0qr95zjbln8mfq2bxia63nkdfj1gxy89j6mdcbn6ljy6mb3ch"))))
12232 (build-system ruby-build-system)
12233 (arguments
12234 (list #:tests? #f ; No tests.
12235 #:phases
12236 #~(modify-phases %standard-phases
12237 (add-after 'unpack 'ignore-rubocop
12238 (lambda _
12239 (substitute* "Rakefile"
12240 (("RUBY_VERSION\\.to_f >= 3\\.0")
12241 "false")))))))
12242 (native-inputs (list ruby-rake ruby-rspec))
12243 (synopsis "Generic object traverser")
12244 (description
12245 "This package provides a generic object traverser for Ruby. It takes the
12246object and recursively yields:
12247@itemize
12248@item the given object
12249@item instance variables, class variables, constants
12250@item Hash keys and values
12251@item Enumerable members
12252@item Struct members
12253@item Data members
12254@item Range begins and ends
12255@end itemize")
12256 (home-page "https://github.com/jaynetics/leto")
12257 (license license:expat)))
12258
12259(define-public ruby-rubytest-cli
12260 (package
12261 (name "ruby-rubytest-cli")
12262 (version "0.2.0")
12263 (source
12264 (origin
12265 (method url-fetch)
12266 (uri (rubygems-uri "rubytest-cli" version))
12267 (sha256
12268 (base32
12269 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
12270 (build-system ruby-build-system)
12271 (arguments
12272 `(#:tests? #f)) ; no tests
12273 (propagated-inputs
12274 (list ruby-ansi ruby-rubytest))
12275 (synopsis "Command-line interface for rubytest")
12276 (description
12277 "Rubytest CLI is a command-line interface for running tests for
12278Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
12279 (home-page "https://rubyworks.github.io/rubytest-cli")
12280 (license license:bsd-2)))
12281
12282(define-public ruby-hashery
12283 (package
12284 (name "ruby-hashery")
12285 (version "2.1.2")
12286 (source
12287 (origin
12288 (method url-fetch)
12289 (uri (rubygems-uri "hashery" version))
12290 (sha256
12291 (base32
12292 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
12293 (build-system ruby-build-system)
12294 (arguments
12295 `(#:phases
12296 (modify-phases %standard-phases
12297 (replace 'check
12298 (lambda _
12299 (invoke "qed")
12300 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
12301 (native-inputs
12302 (list ruby-rubytest-cli ruby-qed ruby-lemon))
12303 (synopsis "Hash-like classes with extra features")
12304 (description
12305 "The Hashery is a tight collection of @code{Hash}-like classes.
12306Included are the auto-sorting @code{Dictionary} class, the efficient
12307@code{LRUHash}, the flexible @code{OpenHash} and the convenient
12308@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
12309defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
12310standard @code{Hash} making it possible to subclass and augment to fit any
12311specific use case.")
12312 (home-page "https://rubyworks.github.io/hashery")
12313 (license license:bsd-2)))
12314
12315(define-public ruby-rc4
12316 (package
12317 (name "ruby-rc4")
12318 (version "0.1.5")
12319 (source
12320 (origin
12321 (method url-fetch)
12322 (uri (rubygems-uri "ruby-rc4" version))
12323 (sha256
12324 (base32
12325 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
12326 (build-system ruby-build-system)
12327 (arguments
12328 `(#:phases
12329 (modify-phases %standard-phases
12330 (replace 'check
12331 (lambda _
12332 (invoke "rspec" "spec/rc4_spec.rb"))))))
12333 (native-inputs
12334 (list ruby-rspec-2))
12335 (synopsis "Implementation of the RC4 algorithm")
12336 (description
12337 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
12338 (home-page "https://github.com/caiges/Ruby-RC4")
12339 (license license:expat)))
12340
12341(define-public ruby-afm
12342 (package
12343 (name "ruby-afm")
12344 (version "0.2.2")
12345 (source
12346 (origin
12347 (method url-fetch)
12348 (uri (rubygems-uri "afm" version))
12349 (sha256
12350 (base32
12351 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
12352 (build-system ruby-build-system)
12353 (native-inputs
12354 (list bundler))
12355 (synopsis "Read Adobe Font Metrics (afm) files")
12356 (description
12357 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
12358files and use the data therein.")
12359 (home-page "https://github.com/halfbyte/afm")
12360 (license license:expat)))
12361
12362(define-public ruby-ascii85
12363 (package
12364 (name "ruby-ascii85")
12365 (version "1.0.3")
12366 (source
12367 (origin
12368 (method url-fetch)
12369 (uri (rubygems-uri "Ascii85" version))
12370 (sha256
12371 (base32
12372 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
12373 (build-system ruby-build-system)
12374 (native-inputs
12375 (list bundler))
12376 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
12377 (description
12378 "This library provides methods to encode and decode Ascii85
12379binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
12380@dfn{Portable Document Format} (PDF) file formats.")
12381 (home-page "https://github.com/datawraith/ascii85gem")
12382 (license license:expat)))
12383
12384(define-public ruby-ttfunk
12385 (package
12386 (name "ruby-ttfunk")
12387 (version "1.7.0")
12388 (source
12389 (origin
12390 (method git-fetch)
12391 ;; Fetch from github as the gem does not contain testing code.
12392 (uri (git-reference
12393 (url "https://github.com/prawnpdf/ttfunk")
12394 (commit version)))
12395 (file-name (git-file-name name version))
12396 (sha256
12397 (base32
12398 "1jyxn928mpyb1sikjd93s3v8fmh33232pq41ziaph513j7am6fi5"))))
12399 (build-system ruby-build-system)
12400 (arguments
12401 (list #:test-target "spec" ;avoid the rubocop target
12402 #:phases
12403 #~(modify-phases %standard-phases
12404 (add-after 'unpack 'remove-missing-key-directive
12405 ;; This seem to be a common problem in Ruby projects (see:
12406 ;; https://github.com/prawnpdf/ttfunk/issues/99).
12407 (lambda _
12408 (substitute* "ttfunk.gemspec"
12409 ((".*spec.signing_key.*") "")))))))
12410 (native-inputs (list ruby-prawn-dev))
12411 (synopsis "Font metrics parser for the Prawn PDF generator")
12412 (description
12413 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
12414part of the Prawn PDF generator.")
12415 (home-page "https://github.com/prawnpdf/ttfunk")
12416 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
12417 ;; for details."
12418 (license %prawn-project-licenses)))
12419
12420(define-public ruby-puma
12421 (package
12422 (name "ruby-puma")
12423 (version "7.2.0")
12424 (source
12425 (origin
12426 (method git-fetch) ;for tests
12427 (uri (git-reference
12428 (url "https://github.com/puma/puma")
12429 (commit (string-append "v" version))))
12430 (file-name (git-file-name name version))
12431 (sha256
12432 (base32
12433 "0f94jb50a8j9gvn0l59s8dahhry2alwk825ybsxh2y4n1ckyp3n7"))))
12434 (build-system ruby-build-system)
12435 (arguments
12436 (list
12437 #:phases
12438 #~(modify-phases %standard-phases
12439 (add-after 'unpack 'patch-Gemfile
12440 (lambda _
12441 (substitute* "Gemfile"
12442 (("gem \"rake-compiler\".*")
12443 "gem 'rake-compiler'\n"))))
12444 (add-after 'unpack 'disable-rubocop
12445 (lambda _
12446 (setenv "PUMA_NO_RUBOCOP" "1")))
12447 (add-before 'build 'increase-resource-limits
12448 (lambda _
12449 ;; The test suite requires a higher number of open files. Try
12450 ;; increasing the soft resource limit of max open files to 8192,
12451 ;; or equal to the hard limit, whichever is lower.
12452 ;; See: https://github.com/puma/puma/blob/a59afabe782ec8869bb709ca991b32c0b2cc95fd/CONTRIBUTING.md#file-limits
12453 (call-with-values (lambda () (getrlimit 'nofile))
12454 (lambda (soft hard)
12455 (when (and soft (< soft 8192))
12456 (if hard
12457 (setrlimit 'nofile (min hard 8192) hard)
12458 (setrlimit 'nofile 8192 #f))
12459 (format
12460 #t "increased maximum number of open files from ~d to ~d~%"
12461 soft (if hard (min hard 8192) 8192)))))))
12462 (add-before 'build 'fix-gemspec
12463 (lambda _
12464 (substitute* "puma.gemspec"
12465 (("`git ls-files -- bin docs ext lib tools`")
12466 "`find bin docs ext lib tools -type f |sort`"))))
12467 (delete 'check) ;moved after install
12468 (add-after 'install 'check
12469 (lambda* (#:key tests? #:allow-other-keys)
12470 (when tests?
12471 ;; Increase our test verbosity
12472 (setenv "PUMA_TEST_DEBUG" "1")
12473 (setenv "TESTOPTS" "-v -vv")
12474 (invoke "bundle" "exec" "rake" "test"))))
12475 (add-after 'install 'delete-mkmf.log
12476 (lambda _
12477 ;; Rubygems installs build log files that embed volatile file
12478 ;; names (see:
12479 ;; https://github.com/rubygems/rubygems/issues/6259).
12480 (for-each delete-file (find-files #$output "^mkmf\\.log$"))))
12481 (add-before 'check 'tune-test-environment
12482 (lambda _
12483 ;; Disable minitest parallelization to reduce IO contention,
12484 ;; especially since the tests are run without multiple workers
12485 (setenv "MT_CPU" "0")
12486 ;; The default value is 45 s and easily causes timeouts.
12487 (setenv "TEST_CASE_TIMEOUT" "120")
12488 ;; Give puma tests more time to respond before puma fails them
12489 (setenv "RESP_READ_TIMEOUT" "30")))
12490 (add-before 'check 'disable-problematic-tests
12491 (lambda _
12492 (let-syntax ((skip-tests
12493 (syntax-rules ()
12494 ((_ file test ...)
12495 (substitute* file
12496 (((string-append "def " test ".*") all)
12497 (string-append
12498 all " skip('flaky test on guix')\n")) ...)))))
12499 ;; The test failures were reported at:
12500 ;; https://github.com/puma/puma/issues/3093, but appear to be
12501 ;; caused by the Guix build container, perhaps the lack of
12502 ;; zombie process reaping (see:
12503 ;; https://issues.guix.gnu.org/30948).
12504 ;; Many of these tests seem to only fail on the 'cli' portion
12505 ;; due to something causing them to hang indefinitely
12506 (skip-tests "test/test_plugin.rb"
12507 "test_plugin")
12508 (skip-tests "test/test_plugin_systemd.rb"
12509 "test_plugin_systemd"
12510 "test_systemd_watchdog"
12511 "test_systemd_notify"
12512 "test_refork_phased_restart_with_fork_worker_and_high_worker_count")
12513 (skip-tests "test/test_pumactl.rb"
12514 "test_control_url_and_status"
12515 "test_control_ssl_ipv6"
12516 "test_control_ssl_ipv4")
12517 ;; Disabling the test/*_integration_* tests as they contain many flaky tests
12518 (delete-file "test/test_integration_cluster.rb")
12519 (delete-file "test/test_integration_pumactl.rb")
12520 (delete-file "test/test_integration_single.rb")
12521 (delete-file "test/test_integration_ssl.rb")
12522 (delete-file "test/test_integration_ssl_session.rb")
12523 ;; Other files containing many problematic tests
12524 (delete-file "test/test_cli.rb")
12525 ;; All the tests in the 'test_worker_gem_independence.rb'
12526 ;; module fail with "Expected false to be truthy.".
12527 ;; tests try changing different module versions, but guix
12528 ;; doesn't expose alternate module versions to be tested with
12529 (delete-file "test/test_worker_gem_independence.rb"))))
12530 (add-before 'check 'set-home
12531 (lambda _
12532 ;; Some tests fail if the cannot write to HOME.
12533 (setenv "HOME" "/tmp")))
12534 (add-before 'check 'set-paths
12535 (lambda _
12536 ;; The test suite requires the 'puma' command to be on PATH.
12537 (setenv "PATH" (string-append (getenv "PATH") ":"
12538 #$output "/bin"))
12539 (setenv "GEM_PATH" (string-append
12540 (getenv "GEM_PATH") ":"
12541 #$output "/lib/ruby/vendor_ruby")))))))
12542 (native-inputs
12543 (list bundler
12544 curl
12545 ruby-json
12546 ruby-localhost
12547 ruby-m
12548 ruby-minitest
12549 ruby-minitest-mock
12550 ruby-minitest-proveit
12551 ruby-minitest-retry
12552 ruby-minitest-stub-const
12553 ruby-rackup
12554 ruby-rack-next
12555 ruby-rake-compiler
12556 ruby-webrick))
12557 (inputs
12558 (list openssl
12559 ruby-nio4r))
12560 (propagated-inputs
12561 (list ruby-concurrent-ruby))
12562 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
12563 (description
12564 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
12565for Ruby/Rack applications. Puma is intended for use in both development and
12566production environments. In order to get the best throughput, it is highly
12567recommended that you use a Ruby implementation with real threads like Rubinius
12568or JRuby.")
12569 (home-page "https://puma.io/")
12570 (license license:expat)))
12571
12572(define-public ruby-hoe-git2
12573 (package
12574 (name "ruby-hoe-git2")
12575 (version "1.8.0")
12576 (source
12577 (origin
12578 (method git-fetch)
12579 (uri (git-reference
12580 (url "https://github.com/halostatue/hoe-git2")
12581 (commit (string-append "v" version))))
12582 (file-name (git-file-name name version))
12583 (sha256
12584 (base32 "15gpidgba1xx038srgnnh0dgfjpdq00vhmkl7kmnxl7awf9qldpx"))))
12585 (build-system ruby-build-system)
12586 (inputs (list git-minimal))
12587 (propagated-inputs
12588 (list ruby-hoe-3))
12589 (synopsis "Hoe plugins for tighter Git integration")
12590 (description
12591 "This package provides a set of Hoe plugins for tighter Git integration.
12592It provides tasks to automate release tagging and pushing and changelog
12593generation.")
12594 (home-page "https://github.com/halostatue/hoe-git2")
12595 (license license:expat)))
12596
12597(define-public ruby-hoe-markdown
12598 (package
12599 (name "ruby-hoe-markdown")
12600 (version "1.7.0")
12601 (home-page "https://github.com/flavorjones/hoe-markdown")
12602 (source
12603 (origin
12604 (method git-fetch)
12605 (uri (git-reference
12606 (url home-page)
12607 (commit (string-append "v" version))))
12608 (file-name (git-file-name name version))
12609 (sha256
12610 (base32 "1hkligky33b3rgcsx5qzvackgw6ghln4yp0lpw9wxy0lp14n0vr9"))))
12611 (build-system ruby-build-system)
12612 (arguments
12613 (list
12614 #:test-target "spec"
12615 #:phases
12616 #~(modify-phases %standard-phases
12617 (add-after 'unpack 'disable-bundler-dependency
12618 (lambda _
12619 (substitute* "spec/spec_helper.rb"
12620 (("require.*bundler/setup.*")
12621 ""))
12622 (substitute* "lib/hoe/markdown/standalone.rb"
12623 (("Bundler\\.load_gemspec")
12624 "Gem::Specification.load")))))))
12625 (native-inputs (list ruby-rspec))
12626 (propagated-inputs (list ruby-rake))
12627 (synopsis "Hoe plugin with Markdown helpers")
12628 (description
12629 "This package provides a Hoe plugin with various Markdown helpers, which
12630can be used to e.g. hyperlink Markdown documentation between project files.")
12631 (license license:expat)))
12632
12633(define-public ruby-timecop
12634 (package
12635 (name "ruby-timecop")
12636 (version "0.9.11")
12637 (source
12638 (origin
12639 (method url-fetch)
12640 (uri (rubygems-uri "timecop" version))
12641 (sha256
12642 (base32
12643 "0hkmrkg46qvfla31734d5y28q422z5kfgb41yy2227q4wp34sa21"))))
12644 (build-system ruby-build-system)
12645 (arguments
12646 (list
12647 #:phases
12648 #~(modify-phases %standard-phases
12649 (add-before 'check 'set-check-rubylib
12650 (lambda _
12651 ;; Set RUBYLIB so timecop tests finds its own lib.
12652 (setenv "RUBYLIB" "lib"))))))
12653 (native-inputs
12654 (list bundler
12655 ruby-minitest-rg
12656 ruby-mocha
12657 ruby-activesupport
12658 ruby-pry))
12659 (synopsis "Test mocks for time-dependent functions")
12660 (description
12661 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
12662making it easier to test time-dependent code. It provides a unified method to
12663mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
12664call.")
12665 (home-page "https://github.com/travisjeffery/timecop")
12666 (license license:expat)))
12667
12668(define-public ruby-concurrent-ruby
12669 (package
12670 (name "ruby-concurrent-ruby")
12671 (version "1.3.6")
12672 (source
12673 (origin
12674 (method git-fetch)
12675 (uri (git-reference
12676 ;for tests
12677 (url "https://github.com/ruby-concurrency/concurrent-ruby")
12678 (commit (string-append "v" version))))
12679 (file-name (git-file-name name version))
12680 (sha256
12681 (base32 "08h7r9hh22v1r5pk67gq7b5cpl0vbqh63sh9svw9l2qas2fs8kng"))))
12682 (build-system ruby-build-system)
12683 (arguments
12684 (list
12685 #:tests? #f ;the test suite is run in ruby-concurrent-ruby-edge
12686 #:phases
12687 #~(modify-phases %standard-phases
12688 (add-after 'unpack 'delete-unwanted-gemspecs
12689 (lambda _
12690 (for-each delete-file
12691 '("concurrent-ruby-ext.gemspec"
12692 "concurrent-ruby-edge.gemspec"))))
12693 (add-after 'unpack 'do-not-install-concurrent_ruby.jar
12694 (lambda _
12695 ;; This file is only built when building the Java
12696 ;; extension.
12697 (substitute* "concurrent-ruby.gemspec"
12698 (("'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'")
12699 "")))))))
12700 (synopsis "Concurrency library for Ruby")
12701 (description
12702 "Concurrent Ruby includes concurrency tools such as agents,
12703futures, promises, thread pools, actors, supervisors, and more. It is
12704inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency
12705patterns.")
12706 (home-page "https://github.com/ruby-concurrency/concurrent-ruby")
12707 (license license:expat)))
12708
12709(define-public ruby-concurrent-ruby-ext
12710 (package
12711 (inherit ruby-concurrent-ruby)
12712 (name "ruby-concurrent-ruby-ext")
12713 (arguments
12714 (list
12715 #:tests? #f ;tested as part of concurrent-ruby-edge
12716 #:phases
12717 #~(modify-phases %standard-phases
12718 (add-after 'unpack 'delete-unwanted-gemspecs
12719 (lambda _
12720 (for-each delete-file
12721 '("concurrent-ruby.gemspec"
12722 "concurrent-ruby-edge.gemspec")))))))
12723 (native-inputs (list ruby-rake-compiler))
12724 (propagated-inputs (list ruby-concurrent-ruby))
12725 (synopsis "C extensions for concurrent-ruby")
12726 (description "This package provides C extensions to optimize the
12727concurrent-ruby gem when running under the Matz's Ruby Interpreter (MRI, also
12728known as CRuby).")))
12729
12730(define-public ruby-concurrent-ruby-edge
12731 (package
12732 (inherit ruby-concurrent-ruby)
12733 (name "ruby-concurrent-ruby-edge")
12734 (arguments
12735 (list
12736 #:phases
12737 #~(modify-phases %standard-phases
12738 (add-after 'unpack 'delete-unwanted-gemspecs
12739 (lambda _
12740 (for-each delete-file
12741 '("concurrent-ruby.gemspec"
12742 "concurrent-ruby-ext.gemspec"))))
12743 ;; The tests rely on the Gem being installed, so move the check
12744 ;; phase after the install phase.
12745 (delete 'check)
12746 (add-after 'install 'check
12747 (lambda* (#:key tests? #:allow-other-keys)
12748 (setenv "GEM_PATH" (string-append
12749 (getenv "GEM_PATH") ":"
12750 #$output "/lib/ruby/vendor_ruby"))
12751 (when tests?
12752 (invoke "rake" "ci")))))))
12753 (native-inputs
12754 (list ruby-rake-compiler
12755 ruby-rake-compiler-dock
12756 ruby-rspec
12757 ruby-timecop
12758 ruby-yard))
12759 (propagated-inputs
12760 (list ruby-concurrent-ruby ruby-concurrent-ruby-ext))
12761 (synopsis "Edge features and additions to the @code{concurrent-ruby} gem")
12762 (description "The @code{concurrent-ruby-edge} gem includes
12763@code{concurrent-ruby} features that are under active development and may
12764change frequently. They are expected not to keep backward
12765compatibility (there may also lack tests and documentation), although semantic
12766versions are obeyed though. Features developed in @code{concurrent-ruby-edge}
12767are expected to move to @code{concurrent-ruby} when final.")))
12768
12769(define-public ruby-pkg-config
12770 (package
12771 (name "ruby-pkg-config")
12772 (version "1.2.5")
12773 (source
12774 (origin
12775 (method url-fetch)
12776 (uri (rubygems-uri "pkg-config" version))
12777 (sha256
12778 (base32
12779 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
12780 (build-system ruby-build-system)
12781 (arguments
12782 ;; Tests require extra files not included in the gem.
12783 `(#:tests? #f))
12784 (synopsis "Detect libraries for compiling Ruby native extensions")
12785 (description
12786 "@code{pkg-config} can be used in your extconf.rb to properly detect need
12787libraries for compiling Ruby native extensions.")
12788 (home-page "https://github.com/ruby-gnome2/pkg-config")
12789 (license license:lgpl2.0+)))
12790
12791(define-public ruby-net-http-digest-auth
12792 (package
12793 (name "ruby-net-http-digest-auth")
12794 (version "1.4.1")
12795 (source
12796 (origin
12797 (method url-fetch)
12798 (uri (rubygems-uri "net-http-digest_auth" version))
12799 (sha256
12800 (base32
12801 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
12802 (build-system ruby-build-system)
12803 (native-inputs
12804 (list ruby-hoe
12805 ruby-minitest))
12806 (synopsis "RFC 2617 HTTP digest authentication library")
12807 (description
12808 "This library implements HTTP's digest authentication scheme based on
12809RFC 2617. This enables the use of the digest authentication scheme instead
12810of the more insecure basic authentication scheme.")
12811 (home-page "https://github.com/drbrain/net-http-digest_auth")
12812 (license license:expat)))
12813
12814(define-public ruby-mail
12815 (package
12816 (name "ruby-mail")
12817 (version "2.8.1")
12818 (source
12819 (origin
12820 (method url-fetch)
12821 (uri (rubygems-uri "mail" version))
12822 (sha256
12823 (base32 "1bf9pysw1jfgynv692hhaycfxa8ckay1gjw5hz3madrbrynryfzc"))))
12824 (build-system ruby-build-system)
12825 (propagated-inputs
12826 (list ruby-mini-mime))
12827 (arguments
12828 '(#:tests? #f)) ; no rakefile
12829 (synopsis "Mail library for Ruby")
12830 (description
12831 "Mail is an internet library for Ruby that is designed to handle email
12832generation, parsing and sending. The purpose of this library is to provide
12833a single point of access to handle all email functions, including sending
12834and receiving emails. All network type actions are done through proxy
12835methods to @code{Net::SMTP}, @code{Net::POP3} etc.
12836
12837Mail has been designed with a very simple object oriented system that
12838really opens up the email messages you are parsing, if you know what you
12839are doing, you can fiddle with every last bit of your email directly.")
12840 (home-page "https://github.com/mikel/mail")
12841 (license license:expat)))
12842
12843(define-public ruby-net-protocol
12844 (package
12845 (name "ruby-net-protocol")
12846 (version "0.2.1")
12847 (source (origin
12848 (method git-fetch)
12849 (uri (git-reference
12850 (url "https://github.com/ruby/net-protocol")
12851 (commit (string-append "v" version))))
12852 (file-name (git-file-name name version))
12853 (sha256
12854 (base32
12855 "0niivmjx7bc6vsylc1ag17mw6mnvjxw02s7cin1f0422xyr8msq9"))))
12856 (build-system ruby-build-system)
12857 (propagated-inputs (list ruby-timeout))
12858 (synopsis "Abstract interface for Ruby network clients")
12859 (description "This Ruby library provides an abstract interface for network
12860clients.")
12861 (home-page "https://github.com/ruby/net-protocol")
12862 (license (list license:bsd-2))))
12863
12864(define-public ruby-email-reply-trimmer
12865 (package
12866 (name "ruby-email-reply-trimmer")
12867 (version "0.1.13")
12868 (source
12869 (origin
12870 (method url-fetch)
12871 (uri (rubygems-uri "email_reply_trimmer" version))
12872 (sha256
12873 (base32
12874 "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
12875 (build-system ruby-build-system)
12876 (synopsis "Trim replies from plain text email")
12877 (description "EmailReplyTrimmer is a Ruby small library to trim replies
12878from plain text email.")
12879 (home-page "https://github.com/discourse/email_reply_trimmer")
12880 (license license:expat)))
12881
12882(define-public ruby-mathn
12883 (package
12884 (name "ruby-mathn")
12885 (version "0.1.0")
12886 (source
12887 (origin
12888 (method url-fetch)
12889 (uri (rubygems-uri "mathn" version))
12890 (sha256
12891 (base32
12892 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
12893 (build-system ruby-build-system)
12894 (native-inputs
12895 (list bundler ruby-rake-compiler))
12896 (synopsis "Extends math operations for increased precision")
12897 (description
12898 "This gem makes mathematical operations more precise in Ruby and
12899integrates other mathematical standard libraries. Prior to Ruby 2.5,
12900@code{mathn} was part of the Ruby standard library.")
12901 (home-page "https://github.com/ruby/mathn")
12902 (license license:bsd-2)))
12903
12904(define-public ruby-code-statistics
12905 (package
12906 (name "ruby-code-statistics")
12907 (version "0.2.13")
12908 (source
12909 (origin
12910 (method url-fetch)
12911 (uri (rubygems-uri "code_statistics" version))
12912 (sha256
12913 (base32
12914 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
12915 (build-system ruby-build-system)
12916 (arguments
12917 `(#:tests? #f)) ; Not all test code is included in gem.
12918 (synopsis "Port of the rails 'rake stats' method")
12919 (description
12920 "This gem is a port of the rails 'rake stats' method so it can be made
12921more robust and work for non rails projects.")
12922 (home-page "https://github.com/danmayer/code_statistics")
12923 (license license:expat)))
12924
12925(define-public ruby-ruby2-keywords
12926 (package
12927 (name "ruby-ruby2-keywords")
12928 (version "0.0.5")
12929 (source (origin
12930 (method git-fetch)
12931 (uri (git-reference
12932 (url "https://github.com/ruby/ruby2_keywords")
12933 (commit (string-append "v" version))))
12934 (file-name (git-file-name name version))
12935 (sha256
12936 (base32
12937 "1jhqb152zfr2yrxj6j8rzakkwdkg5viggwnnqrrfxwwy63msdi97"))))
12938 (build-system ruby-build-system)
12939 (arguments
12940 (list
12941 #:phases
12942 #~(modify-phases %standard-phases
12943 (add-after 'unpack 'delete-extraneous-rake-files
12944 (lambda _
12945 (for-each delete-file '("rakelib/changelogs.rake"
12946 "rakelib/epoch.rake"
12947 "rakelib/version.rake"))))
12948 (add-after 'extract-gemspec 'adjust-files
12949 (lambda _
12950 (substitute* "ruby2_keywords.gemspec"
12951 ;; This file is not present in the git checkout.
12952 ((".*\"ChangeLog\",.*") "")))))))
12953 (synopsis "Shim library for Module#ruby2_keywords")
12954 (description "Provides empty @code{Module#ruby2_keywords} method, for the
12955forward source-level compatibility against @command{ruby2.7} and
12956@command{ruby3}.")
12957 (home-page "https://github.com/ruby/ruby2_keywords")
12958 (license license:bsd-2)))
12959
12960(define-public ruby-rubypants
12961 (package
12962 (name "ruby-rubypants")
12963 (version "0.6.0")
12964 (source (origin
12965 (method url-fetch)
12966 (uri (rubygems-uri "rubypants" version))
12967 (sha256
12968 (base32
12969 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
12970 (build-system ruby-build-system)
12971 (arguments
12972 '(#:tests? #f)) ; need Codecov
12973 (synopsis "Port of the smart-quotes library SmartyPants")
12974 (description
12975 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
12976original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
12977and BBEdit that easily translates plain ASCII punctuation characters into
12978smart typographic punctuation HTML entities.")
12979 (home-page "https://github.com/jmcnevin/rubypants")
12980 (license license:bsd-2)))
12981
12982(define-public ruby-org-ruby
12983 (package
12984 (name "ruby-org-ruby")
12985 (version "0.9.12")
12986 (source (origin
12987 (method url-fetch)
12988 (uri (rubygems-uri "org-ruby" version))
12989 (sha256
12990 (base32
12991 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
12992 (build-system ruby-build-system)
12993 (arguments
12994 '(#:tests? #f)) ; no rakefile
12995 (propagated-inputs
12996 (list ruby-rubypants))
12997 (synopsis "Org-mode parser written in Ruby")
12998 (description
12999 "Org-ruby is an org-mode parser written in Ruby. The most significant
13000thing this library does today is convert org-mode files to HTML or Textile or
13001Markdown.")
13002 (home-page "https://github.com/wallyqs/org-ruby")
13003 (license license:expat)))
13004
13005(define-public ruby-rake-manifest
13006 (package
13007 (name "ruby-rake-manifest")
13008 (version "0.2.3")
13009 (source (origin
13010 (method git-fetch)
13011 (uri (git-reference
13012 (url "https://github.com/mvz/rake-manifest")
13013 (commit (string-append "v" version))))
13014 (file-name (git-file-name name version))
13015 (sha256
13016 (base32
13017 "16k2yvg773c25kp2vhzhp01rhf53k0nhrcmpv34k1fridw90r2k8"))))
13018 (build-system ruby-build-system)
13019 (arguments
13020 (list
13021 #:test-target "default"
13022 #:phases
13023 #~(modify-phases %standard-phases
13024 (delete 'check) ;moved after the install phase
13025 (add-after 'install 'check
13026 (assoc-ref %standard-phases 'check))
13027 (add-before 'check 'set-GEM_PATH
13028 (lambda _
13029 (setenv "GEM_PATH" (string-append
13030 (getenv "GEM_PATH") ":"
13031 #$output "/lib/ruby/vendor_ruby")))))))
13032 (native-inputs (list ruby-rspec ruby-simplecov))
13033 (synopsis "Rake tasks to generate and check a manifest file")
13034 (description "This package provides Rake tasks to generate and check a
13035manifest file.")
13036 (home-page "https://github.com/mvz/rake-manifest")
13037 (license license:expat)))
13038
13039(define-public ruby-sfl
13040 (package
13041 (name "ruby-sfl")
13042 (version "2.3")
13043 (source (origin
13044 (method url-fetch)
13045 (uri (rubygems-uri "sfl" version))
13046 (sha256
13047 (base32
13048 "1qm4hvhq9pszi9zs1cl9qgwx1n4wxq0af0hq9sbf6qihqd8rwwwr"))))
13049 (build-system ruby-build-system)
13050 (arguments
13051 `(#:tests? #f ;; some tests fail, gem is a dummy for ruby >= 1.9 anyway
13052 #:test-target "spec"))
13053 (synopsis "Spawn for Ruby 1.8")
13054 (description "This pure ruby library provides @code{spawn()} which is
13055almost perfectly compatible with ruby 1.9's.")
13056 (home-page "https://github.com/ujihisa/spawn-for-legacy")
13057 (license license:bsd-2)))
13058
13059(define-public ruby-childprocess
13060 (package
13061 (name "ruby-childprocess")
13062 (version "5.1.0")
13063 (source
13064 (origin
13065 (method url-fetch)
13066 (uri (rubygems-uri "childprocess" version))
13067 (sha256
13068 (base32
13069 "1v5nalaarxnfdm6rxb7q6fmc6nx097jd630ax6h9ch7xw95li3cs"))))
13070 (build-system ruby-build-system)
13071 (arguments
13072 `(#:test-target "spec"
13073 #:phases
13074 (modify-phases %standard-phases
13075 (add-after 'unpack 'sanitize-dependencies
13076 (lambda _
13077 (substitute* "childprocess.gemspec"
13078 ((".*coveralls.*") ""))
13079 (substitute* "spec/spec_helper.rb"
13080 ((".*[Cc]overalls.*") ""))))
13081 (add-after 'unpack 'patch
13082 (lambda _
13083 (substitute* "spec/spec_helper.rb"
13084 (("#!/bin/sh\\\\n") (string-append "#!" (which "sh") "\\n")))))
13085 (add-before 'check 'disable-broken-tests
13086 (lambda* (#:key tests? #:allow-other-keys)
13087 (when tests?
13088 (let ((skippedtests
13089 (list ;; Disable Rubygems version warning check
13090 "ChildProcess validates cleanly")))
13091 (setenv "SPEC_OPTS"
13092 (string-append
13093 "--warnings" " "
13094 ;; Disable tests failing in the guix environment:
13095 "--example-matches "
13096 "'(^(?!.*(" (string-join skippedtests "|") ")).*)'")))
13097 (invoke "rspec")))))))
13098 (native-inputs
13099 (list ruby-coveralls ruby-rspec))
13100 (synopsis "Control external programs running in the background, in Ruby")
13101 (description "@code{childprocess} provides a gem to control external
13102programs running in the background, in Ruby.")
13103 (home-page "https://github.com/enkessler/childprocess")
13104 (license license:expat)))
13105
13106(define-public ruby-public-suffix
13107 (package
13108 (name "ruby-public-suffix")
13109 (version "4.0.5")
13110 (source (origin
13111 (method url-fetch)
13112 (uri (rubygems-uri "public_suffix" version))
13113 (sha256
13114 (base32
13115 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
13116 (build-system ruby-build-system)
13117 (arguments
13118 '(#:phases
13119 (modify-phases %standard-phases
13120 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
13121 ;; including it as an input can lead to circular dependencies.
13122 (add-after 'unpack 'remove-rubocop-from-Rakefile
13123 (lambda _
13124 (substitute* "Rakefile"
13125 (("require \"rubocop/rake\\_task\"") "")
13126 (("RuboCop::RakeTask\\.new") "")))))))
13127 (native-inputs
13128 (list bundler ruby-yard/minimal ruby-mocha ruby-minitest-reporters))
13129 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
13130 (synopsis "Domain name parser")
13131 (description "The gem @code{public_suffix} is a domain name parser,
13132written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
13133is one under which Internet users can (or historically could) directly
13134register names. Some examples of public suffixes are @code{.com},
13135@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
13136all known public suffixes.")
13137 (license license:expat)))
13138
13139(define-public ruby-addressable
13140 (package
13141 (name "ruby-addressable")
13142 (version "2.8.1")
13143 (source (origin
13144 (method url-fetch)
13145 (uri (rubygems-uri "addressable" version))
13146 (sha256
13147 (base32
13148 "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"))))
13149 (build-system ruby-build-system)
13150 (arguments
13151 '(#:test-target "spec"
13152 #:phases
13153 (modify-phases %standard-phases
13154 (add-after 'unpack 'disable-bundler
13155 (lambda _
13156 (substitute* "spec/spec_helper.rb"
13157 (("require 'bundler/setup'") ""))))
13158 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
13159 (lambda _
13160 (substitute* "Gemfile"
13161 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
13162 ((".*launchy.*") "")
13163 ((".*rake.*") "gem 'rake'\n")
13164 ((".*redcarpet.*") ""))))
13165 (add-before 'check 'delete-network-dependent-test
13166 (lambda _
13167 (delete-file "spec/addressable/net_http_compat_spec.rb"))))))
13168 (native-inputs
13169 (list bundler
13170 ruby-idn-ruby
13171 ruby-rspec
13172 ruby-rspec-its-minimal
13173 ruby-simplecov
13174 ruby-sporkmonger-rack-mount
13175 ruby-yard/minimal))
13176 (propagated-inputs
13177 (list ruby-public-suffix))
13178 (home-page "https://github.com/sporkmonger/addressable")
13179 (synopsis "Alternative URI implementation")
13180 (description "Addressable is a replacement for the URI implementation that
13181is part of Ruby's standard library. It more closely conforms to RFC 3986,
13182RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
13183 (license license:asl2.0)))
13184
13185(define-public ruby-colorize
13186 (package
13187 (name "ruby-colorize")
13188 (version "0.8.1")
13189 (source (origin
13190 (method url-fetch)
13191 (uri (rubygems-uri "colorize" version))
13192 (sha256
13193 (base32
13194 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
13195 (build-system ruby-build-system)
13196 (arguments
13197 '(#:phases (modify-phases %standard-phases
13198 (add-before 'check 'remove-codeclimate-dependency
13199 (lambda _
13200 (substitute* "test/test_colorize.rb"
13201 ;; Do not hook the tests into the online CodeClimate
13202 ;; service which is unnecessary for these tests.
13203 (("require 'codeclimate-test-reporter'")
13204 "")
13205 (("CodeClimate.*") "")))))))
13206 (synopsis "Add color effects to the @code{String} class")
13207 (description
13208 "This package extends the @code{String} class and adds a
13209@code{ColorizedString} with methods to set text color, background color,
13210and text effects.")
13211 (home-page "https://github.com/fazibear/colorize")
13212 (license license:gpl2+)))
13213
13214(define-public ruby-colorator
13215 (package
13216 (name "ruby-colorator")
13217 (version "1.1.0")
13218 (source (origin
13219 (method url-fetch)
13220 (uri (rubygems-uri "colorator" version))
13221 (sha256
13222 (base32
13223 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
13224 (build-system ruby-build-system)
13225 (arguments
13226 ;; No test target
13227 `(#:tests? #f))
13228 (home-page "http://octopress.org/colorator/")
13229 (synopsis "Terminal color library")
13230 (description "Colorator is a Ruby gem that helps you colorize your text
13231for the terminal.")
13232 (license license:expat)))
13233
13234(define-public ruby-command-line-reporter
13235 (package
13236 (name "ruby-command-line-reporter")
13237 (version "4.0.1")
13238 (source (origin
13239 (method url-fetch)
13240 (uri (rubygems-uri "command_line_reporter" version))
13241 (sha256
13242 (base32
13243 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
13244 (build-system ruby-build-system)
13245 (arguments
13246 ;; No Rakefile
13247 `(#:tests? #f
13248 #:phases
13249 (modify-phases %standard-phases
13250 (add-before 'build 'fix-dependencies
13251 (lambda _
13252 (substitute* ".gemspec"
13253 ;; colored is unmaintained
13254 (("colored") "colorator")
13255 ;; colorator version
13256 (("= 1.2") "= 1.1")))))))
13257 (propagated-inputs (list ruby-colorator))
13258 (home-page "https://github.com/wbailey/command_line_reporter")
13259 (synopsis "Report production while executing Ruby scripts")
13260 (description "This gem provides a DSL that makes it easy to write reports
13261of various types in ruby. It eliminates the need to litter your source with
13262puts statements, instead providing a more readable, expressive interface to
13263your application.")
13264 (license license:asl2.0)))
13265
13266(define-public ruby-command-line-reporter-3
13267 (package
13268 (inherit ruby-command-line-reporter)
13269 (version "3.3.6")
13270 (source (origin
13271 (method url-fetch)
13272 (uri (rubygems-uri "command_line_reporter" version))
13273 (sha256
13274 (base32
13275 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
13276
13277(define-public ruby-kpeg
13278 (package
13279 (name "ruby-kpeg")
13280 (version "1.3.3")
13281 (source
13282 (origin
13283 (method url-fetch)
13284 (uri (rubygems-uri "kpeg" version))
13285 (sha256
13286 (base32
13287 "0jxddpyb23digcd8b1b02gn94057a7mw17680c3c8s3bcb5xqfnp"))))
13288 (build-system ruby-build-system)
13289 (native-inputs
13290 (list ruby-hoe))
13291 (synopsis "PEG library for Ruby")
13292 (description "KPeg is a simple PEG library for Ruby. It provides an API as
13293well as native grammar to build the grammar. KPeg supports direct left
13294recursion of rules via the
13295@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
13296technique.")
13297 (home-page "https://github.com/evanphx/kpeg")
13298 (license license:expat)))
13299
13300(define-public ruby-rdoc
13301 (package
13302 (name "ruby-rdoc")
13303 (version "8.0.0")
13304 ;; The source contains some generated files via racc and kpeg.
13305 ;; However the generated result is not deterministic [1] with
13306 ;; multiple runs.
13307 ;; [1] https://github.com/ruby/rdoc/blob/v8.0.0/Rakefile#L91-L93
13308 (source
13309 (origin
13310 (method git-fetch)
13311 (uri (git-reference
13312 (url "https://github.com/ruby/rdoc")
13313 (commit (string-append "v" version))))
13314 (file-name (git-file-name name version))
13315 (sha256
13316 (base32
13317 "1ga4d34allpqglal403x897pxq0a713v4f6w0ln43x8xv362mapf"))))
13318 (build-system ruby-build-system)
13319 ;; Document generation in the install phase causes errors since it
13320 ;; conflicts with the Ruby's builtin version of RDoc.
13321 (arguments (list #:gem-flags #~(list "--no-document")))
13322 (native-inputs (list ruby-test-unit-ruby-core))
13323 (propagated-inputs (list ruby-erb ruby-tsort ruby-prism ruby-rbs))
13324 (home-page "https://ruby.github.io/rdoc/")
13325 (synopsis "HTML and command-line documentation utility")
13326 (description "RDoc produces HTML and command-line documentation for Ruby
13327projects. RDoc includes the @samp{rdoc} and @samp{ri} tools for
13328generating and displaying documentation from the command-line.")
13329 (license license:gpl2+)))
13330
13331(define-public ruby-sass-listen
13332 (package
13333 (name "ruby-sass-listen")
13334 (version "4.0.0")
13335 (source (origin
13336 (method url-fetch)
13337 (uri (rubygems-uri "sass-listen" version))
13338 (sha256
13339 (base32
13340 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
13341 (build-system ruby-build-system)
13342 (arguments
13343 ;; No test target
13344 `(#:tests? #f))
13345 (propagated-inputs
13346 (list ruby-rb-fsevent ruby-rb-inotify))
13347 (home-page "https://github.com/sass/listen")
13348 (synopsis "File modification notification library")
13349 (description "The Listen gem listens to file modifications and notifies you
13350about the changes.")
13351 (license license:expat)))
13352
13353(define-public ruby-terminfo
13354 (let ((commit "f4a597d92dcc465e7b343f9afb8cd45607c8e969")
13355 (revision "0"))
13356 (package
13357 (name "ruby-terminfo")
13358 (version (git-version "0.2" revision commit))
13359 (source
13360 (origin
13361 (method git-fetch)
13362 (uri
13363 (git-reference
13364 (url "https://github.com/genki/ruby-terminfo")
13365 (commit commit)))
13366 (file-name (git-file-name name version))
13367 (sha256
13368 (base32 "0b24sqf0jwj8m106nh35hjayw1kiyrpramb6vg7fnz32mqni6hdi"))))
13369 (build-system ruby-build-system)
13370 (arguments
13371 (list
13372 #:phases
13373 #~(modify-phases %standard-phases
13374 (delete 'replace-git-ls-files)
13375 (replace 'build
13376 (lambda _
13377 (invoke "ruby" "extconf.rb")
13378 (invoke "make")))
13379 (replace 'check
13380 (lambda* (#:key tests? #:allow-other-keys)
13381 (when tests?
13382 (for-each (lambda (f)
13383 (invoke "ruby" "-Ilib:test" "-Ilib:." f))
13384 (find-files "test" "^test_.*\\.rb$")))))
13385 (replace 'install
13386 (lambda _
13387 (invoke "make" "install" (string-append "prefix=" #$output)))))))
13388 (inputs
13389 (list ncurses))
13390 (native-inputs
13391 (list ruby-rubygems-tasks ruby-rdoc))
13392 (home-page "http://www.a-k-r.org/ruby-terminfo/")
13393 (synopsis "Terminfo binding for Ruby")
13394 (description "Ruby-terminfo provides terminfo binding for Ruby.")
13395 (license license:bsd-3))))
13396
13397(define-public ruby-diffy
13398 (package
13399 (name "ruby-diffy")
13400 (version "3.4.4")
13401 (source
13402 (origin
13403 (method url-fetch)
13404 (uri (rubygems-uri "diffy" version))
13405 (sha256
13406 (base32
13407 "1qs7drxvyzk3dg22xgblc12lq5kww9hhj7vpn8ay3l42rasllf3r"))))
13408 (build-system ruby-build-system)
13409 (arguments (list #:test-target "spec"))
13410 (native-inputs
13411 (list ruby-rake ruby-rspec))
13412 (home-page "https://github.com/samg/diffy")
13413 (synopsis "Convenient diffing in ruby")
13414 (description "Diffy provides a convenient way to generate a diff from two
13415strings or files.")
13416 (license license:expat)))
13417
13418(define-public ruby-sass-spec
13419 (package
13420 (name "ruby-sass-spec")
13421 (version "3.5.4")
13422 (source
13423 (origin
13424 (method git-fetch)
13425 (uri (git-reference
13426 (url "https://github.com/sass/sass-spec")
13427 (commit (string-append "v" version))))
13428 (file-name (git-file-name name version))
13429 (sha256
13430 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
13431 (build-system ruby-build-system)
13432 (propagated-inputs
13433 (list ruby-command-line-reporter-3
13434 ruby-diffy))
13435 (arguments
13436 (list
13437 ;; This package contains tests for a sass implementation, and the to
13438 ;; avoid any circular dependencies, the tests are not run here
13439 #:tests? #f
13440 #:phases
13441 #~(modify-phases %standard-phases
13442 (add-after 'unpack 'patch-test
13443 (lambda _
13444 (delete-file "spec/values/colors/alpha_hex-3.5/error")
13445 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
13446 (("string") "color")))))))
13447 (home-page "https://github.com/sass/sass-spec")
13448 (synopsis "Test suite for Sass")
13449 (description "Sass Spec is a test suite for Sass. Test cases are all in
13450the @file{spec} directory.")
13451 (license license:expat)))
13452
13453(define-public ruby-sass
13454 (package
13455 (name "ruby-sass")
13456 (version "3.7.4")
13457 (source
13458 (origin
13459 (method git-fetch)
13460 (uri (git-reference
13461 (url "https://github.com/sass/ruby-sass")
13462 (commit version)))
13463 (file-name (git-file-name name version))
13464 (sha256
13465 (base32 "03215h9jkni3l9w6lq28p8adaj3qzb47qgxd20l6kldjnm1a1yky"))))
13466 (build-system ruby-build-system)
13467 (arguments
13468 (list #:ruby ruby-3.3
13469 #:test-target "test:ruby"
13470 #:phases
13471 #~(modify-phases %standard-phases
13472 (add-after 'unpack 'patch-minitest
13473 (lambda _
13474 (substitute* (find-files "test" "\\.rb$")
13475 (("MiniTest")
13476 "Minitest"))))
13477 (add-before 'check 'disable-frozen-string-literal
13478 (lambda _
13479 (setenv "RUBYOPT" "--disable=frozen_string_literal"))))))
13480 (propagated-inputs
13481 (list ruby-sass-listen))
13482 (native-inputs
13483 (list ruby-sass-spec ruby-mathn ruby-cmath))
13484 (home-page "https://sass-lang.com/")
13485 (synopsis "CSS extension language")
13486 (description "Sass is a CSS extension language. It extends CSS with
13487features that don't exist yet like variables, nesting, mixins and inheritance.")
13488 (license license:expat)))
13489
13490(define-public ruby-sassc
13491 (package
13492 (name "ruby-sassc")
13493 (version "2.4.0")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (rubygems-uri "sassc" version))
13498 (sha256
13499 (base32
13500 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
13501 (build-system ruby-build-system)
13502 (arguments
13503 '(#:modules ((guix build ruby-build-system)
13504 (guix build utils)
13505 (ice-9 textual-ports))
13506 #:phases
13507 (modify-phases %standard-phases
13508 (add-after 'unpack 'patch-minitest
13509 (lambda _
13510 (substitute* (find-files "test" "\\.rb$")
13511 (("MiniTest")
13512 "Minitest"))))
13513 ;; TODO: This would be better as a snippet, but the ruby-build-system
13514 ;; doesn't seem to support that
13515 (add-after 'unpack 'remove-libsass
13516 (lambda _
13517 (delete-file-recursively "ext")
13518 (with-atomic-file-replacement "sassc.gemspec"
13519 (lambda (in out)
13520 (let* ((gemspec (get-string-all in))
13521 (index (string-contains gemspec "libsass_dir")))
13522 (display (string-append
13523 (string-take gemspec index)
13524 "\nend\n")
13525 out))))))
13526 (add-after 'unpack 'dont-check-the-libsass-version
13527 (lambda _
13528 (substitute* "test/native_test.rb"
13529 (("assert_equal.*Native\\.version") ""))))
13530 (add-after 'unpack 'remove-git-from-gemspec
13531 (lambda _
13532 (substitute* "sassc.gemspec"
13533 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
13534 (add-after 'unpack 'remove-extensions-from-gemspec
13535 (lambda _
13536 (substitute* "sassc.gemspec"
13537 (("\\[\"ext/extconf.rb\"\\]") "[]"))))
13538 (add-after 'unpack 'fix-Rakefile
13539 (lambda _
13540 (substitute* "Rakefile"
13541 (("test: 'compile:libsass'") ":test"))))
13542 (add-after 'unpack 'remove-unnecessary-dependencies
13543 (lambda _
13544 (substitute* "test/test_helper.rb"
13545 (("require \"pry\"") ""))))
13546 (add-before 'build 'patch-native.rb
13547 (lambda* (#:key inputs #:allow-other-keys)
13548 (substitute* "lib/sassc/native.rb"
13549 ((".*gem_root = spec.gem_dir") "")
13550 (("ffi_lib .*\n")
13551 (string-append
13552 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))))
13553 ;; The gemspec still references the libsass files, so just keep the
13554 ;; one in the gem.
13555 (delete 'extract-gemspec))))
13556 (propagated-inputs
13557 (list ruby-ffi ruby-rake))
13558 (inputs
13559 (list libsass))
13560 (native-inputs
13561 (list bundler ruby-rake-compiler ruby-minitest-around
13562 ruby-test-construct))
13563 (synopsis "Use libsss from Ruby")
13564 (description
13565 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
13566bindings to the libsass library. This enables rendering
13567@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
13568 (home-page "https://github.com/sass/sassc-ruby")
13569 (license license:expat)))
13570
13571(define-public ruby-jekyll-sass-converter
13572 (package
13573 (name "ruby-jekyll-sass-converter")
13574 (version "2.2.0")
13575 (source (origin
13576 (method url-fetch)
13577 (uri (rubygems-uri "jekyll-sass-converter" version))
13578 (sha256
13579 (base32
13580 "077xkkkb592vg8kxdia9jwsaz1bc70lkpf4hdvazjqphn5hlz2bi"))))
13581 (build-system ruby-build-system)
13582 (arguments
13583 ;; No rakefile
13584 `(#:tests? #f))
13585 (propagated-inputs (list ruby-sassc))
13586 (home-page "https://github.com/jekyll/jekyll-sass-converter")
13587 (synopsis "Sass converter for Jekyll")
13588 (description "This gem provide built-in support for the Sass converter
13589in Jekyll.")
13590 (license license:expat)))
13591
13592(define-public ruby-jekyll-watch
13593 (package
13594 (name "ruby-jekyll-watch")
13595 (version "2.1.2")
13596 (source (origin
13597 (method url-fetch)
13598 (uri (rubygems-uri "jekyll-watch" version))
13599 (sha256
13600 (base32
13601 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
13602 (build-system ruby-build-system)
13603 (propagated-inputs
13604 (list ruby-listen))
13605 (arguments
13606 ;; No rakefile
13607 `(#:tests? #f))
13608 (home-page "https://github.com/jekyll/jekyll-watch")
13609 (synopsis "Jekyll auto-rebuild support")
13610 (description "This gems add the @code{--watch} switch to the jekyll CLI
13611interface. It allows Jekyll to rebuild your site when a file changes.")
13612 (license license:expat)))
13613
13614(define-public ruby-parallel
13615 (package
13616 (name "ruby-parallel")
13617 (version "1.21.0")
13618 (source
13619 (origin
13620 (method git-fetch)
13621 (uri (git-reference
13622 (url "https://github.com/grosser/parallel")
13623 (commit (string-append "v" version))))
13624 (file-name (git-file-name name version))
13625 (sha256
13626 (base32
13627 "1xqjcvl3gq3shvrqp8wc3fbqibzh4mf1yczq6np9gd79558dwj3w"))))
13628 (build-system ruby-build-system)
13629 (arguments
13630 `(;; TODO 3 test failures
13631 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
13632 ;; open unnecessary pipes
13633 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
13634 ;; SQLite in processes
13635 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
13636 ;; SQLite in threads
13637 #:tests? #f
13638 #:test-target "rspec-rerun:spec"
13639 #:phases
13640 (modify-phases %standard-phases
13641 (add-after 'unpack 'patch-Gemfile
13642 (lambda _
13643 (substitute* "Gemfile"
13644 (("gem 'rspec-legacy_formatters'") "")
13645 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
13646 (add-before 'check 'delete-Gemfile.lock
13647 (lambda _
13648 ;; Bundler isn't being used for fetching dependencies, so
13649 ;; delete the Gemfile.lock
13650 (delete-file "Gemfile.lock")))
13651 (add-before 'build 'patch-gemspec
13652 (lambda _
13653 (substitute* "parallel.gemspec"
13654 (("git ls-files") "find")))))))
13655 (native-inputs
13656 (list ruby-rspec
13657 ruby-rspec-rerun
13658 bundler
13659 ruby-activerecord
13660 ruby-progressbar
13661 ruby-bump
13662 procps
13663 lsof
13664 ruby-mysql2
13665 ruby-sqlite3
13666 ruby-i18n))
13667 (home-page "https://github.com/grosser/parallel")
13668 (synopsis "Parallel processing in Ruby")
13669 (description "Parallel allows you to run any code in parallel Processes
13670(to use all CPUs) or Threads(to speedup blocking operations). It is best
13671suited for map-reduce or e.g. parallel downloads/uploads.")
13672 (license license:expat)))
13673
13674(define-public ruby-cabin
13675 (package
13676 (name "ruby-cabin")
13677 (version "0.9.0")
13678 (source (origin
13679 (method url-fetch)
13680 (uri (rubygems-uri "cabin" version))
13681 (sha256
13682 (base32
13683 "0b3b8j3iqnagjfn1261b9ncaac9g44zrx1kcg81yg4z9i513kici"))))
13684 (build-system ruby-build-system)
13685 (arguments (list #:tests? #f)) ;no Rakefile in released gem
13686 (synopsis "Structured and contextual logging experiments in Ruby")
13687 (description "This Ruby library provides an experimental logging system
13688that tries to make logging more flexible and more consumable than plain-text
13689logging.")
13690 (home-page "https://github.com/jordansissel/ruby-cabin")
13691 (license license:asl2.0)))
13692
13693(define-public ruby-capybara
13694 (package
13695 (name "ruby-capybara")
13696 (version "3.38.0")
13697 (source (origin
13698 (method url-fetch)
13699 (uri (rubygems-uri "capybara" version))
13700 (sha256
13701 (base32
13702 "123198zk2ak8mziwa5jc3ckgpmsg08zn064n3aywnqm9s1bwjv3v"))))
13703 (build-system ruby-build-system)
13704 (arguments
13705 (list #:tests? #f ;sinatra is currently broken with rack 3
13706 #:phases
13707 #~(modify-phases %standard-phases
13708 (add-after 'extract-gemspec 'remove-extraneous-requirements
13709 (lambda _
13710 (substitute* "spec/spec_helper.rb"
13711 ((".*require 'selenium_statistics'.*") "")
13712 ((".*SeleniumStatistics.print_results.*") ""))))
13713 (replace 'check
13714 (lambda* (#:key tests? #:allow-other-keys)
13715 (when tests?
13716 (invoke "rspec" "spec")))))))
13717 (native-inputs
13718 (list ruby-puma
13719 ruby-rspec
13720 ruby-selenium-webdriver
13721 ruby-sinatra))
13722 (propagated-inputs
13723 (list ruby-addressable
13724 ruby-launchy
13725 ruby-matrix
13726 ruby-mini-mime
13727 ruby-nokogiri
13728 ruby-rack
13729 ruby-rack-test
13730 ruby-regexp-parser
13731 ruby-xpath))
13732 (synopsis "Integration testing tool for rack-based web applications")
13733 (description "Capybara is an integration testing tool for rack based web
13734applications. It simulates how a user would interact with a website.")
13735 (home-page "https://github.com/teamcapybara/capybara")
13736 (license license:expat)))
13737
13738(define-public ruby-cane
13739 (package
13740 (name "ruby-cane")
13741 (version "3.0.0")
13742 (source (origin
13743 (method url-fetch)
13744 (uri (rubygems-uri "cane" version))
13745 (sha256
13746 (base32
13747 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
13748 (build-system ruby-build-system)
13749 (arguments `(#:tests? #f)); No rakefile
13750 (home-page "https://github.com/square/cane")
13751 (propagated-inputs
13752 (list ruby-parallel))
13753 (synopsis "Code quality threshold checking")
13754 (description "Cane fails your build if code quality thresholds are not met.")
13755 (license license:asl2.0)))
13756
13757(define-public ruby-morecane
13758 (package
13759 (name "ruby-morecane")
13760 (version "0.2.0")
13761 (source (origin
13762 (method url-fetch)
13763 (uri (rubygems-uri "morecane" version))
13764 (sha256
13765 (base32
13766 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
13767 (build-system ruby-build-system)
13768 (home-page "https://github.com/yob/morecane")
13769 (arguments `(#:tests? #f)); No rakefile
13770 (propagated-inputs
13771 (list ruby-parallel))
13772 (synopsis "Extra checks for cane")
13773 (description "The cane gem provides a great framework for running quality
13774checks over your ruby project as part of continuous integration build. It
13775comes with a few checks out of the box, but also provides an API for loading
13776custom checks. This gem provides a set of additional checks.")
13777 (license license:expat)))
13778
13779(define-public ruby-pdf-reader
13780 (package
13781 (name "ruby-pdf-reader")
13782 (version "2.4.0")
13783 (source (origin
13784 (method git-fetch) ;no test in distributed gem archive
13785 (uri (git-reference
13786 (url "https://github.com/yob/pdf-reader")
13787 (commit (string-append "v" version))))
13788 (file-name (git-file-name name version))
13789 (sha256
13790 (base32
13791 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
13792 (build-system ruby-build-system)
13793 (arguments `(#:test-target "spec"
13794 #:phases (modify-phases %standard-phases
13795 (add-after 'unpack 'do-not-use-bundler
13796 (lambda _
13797 (substitute* "spec/spec_helper.rb"
13798 ((".*[Bb]undler.*") "")))))))
13799 (native-inputs
13800 (list ruby-rspec ruby-cane ruby-morecane))
13801 (propagated-inputs
13802 (list ruby-afm ruby-ascii85 ruby-hashery ruby-rc4 ruby-ttfunk))
13803 (home-page "https://github.com/yob/pdf-reader")
13804 (synopsis "PDF parser in Ruby")
13805 (description "The PDF::Reader library implements a PDF parser conforming as
13806much as possible to the PDF specification from Adobe. It provides programmatic
13807access to the contents of a PDF file with a high degree of flexibility.")
13808 (license license:gpl3+)))
13809
13810(define-public ruby-pdf-inspector
13811 (let ((revision "1")
13812 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
13813 (package
13814 (name "ruby-pdf-inspector")
13815 (version (git-version "1.3.0" revision commit))
13816 (source (origin
13817 (method git-fetch)
13818 (uri (git-reference
13819 (url "https://github.com/prawnpdf/pdf-inspector")
13820 (commit commit)))
13821 (file-name (git-file-name name version))
13822 (sha256
13823 (base32
13824 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
13825 (build-system ruby-build-system)
13826 (arguments
13827 `(#:test-target "spec"
13828 #:phases (modify-phases %standard-phases
13829 (add-before 'build 'drop-signing-key-requirement
13830 (lambda _
13831 (substitute* "pdf-inspector.gemspec"
13832 (("spec.signing_key =.*")
13833 "spec.signing_key = nil"))))
13834 (replace 'check
13835 (lambda _
13836 (substitute* "pdf-inspector.gemspec"
13837 ((".*rubocop.*") "")
13838 ((".*yard.*") ""))
13839 (invoke "rspec"))))))
13840 (native-inputs
13841 (list ruby-rspec))
13842 (propagated-inputs
13843 (list ruby-pdf-reader))
13844 (home-page "https://github.com/prawnpdf/pdf-inspector")
13845 (synopsis "Analysis classes for inspecting PDF output")
13846 (description "This library provides a number of PDF::Reader based tools for
13847use in testing PDF output. Presently, the primary purpose of this tool is to
13848support the tests found in Prawn, a pure Ruby PDF generation library.")
13849 (license %prawn-project-licenses))))
13850
13851(define-public ruby-pdf-core
13852 (package
13853 (name "ruby-pdf-core")
13854 (version "0.9.0")
13855 (source (origin
13856 (method url-fetch)
13857 (uri (rubygems-uri "pdf-core" version))
13858 (sha256
13859 (base32
13860 "1fz0yj4zrlii2j08kaw11j769s373ayz8jrdhxwwjzmm28pqndjg"))))
13861 (build-system ruby-build-system)
13862 (arguments
13863 ; No test target
13864 `(#:tests? #f))
13865 (home-page "https://github.com/prawnpdf/pdf-core")
13866 (synopsis "Low level PDF features for Prawn")
13867 (description "This is an experimental gem that extracts low-level PDF
13868functionality from Prawn.")
13869 (license license:gpl3+)))
13870
13871(define-public ruby-prawn-dev
13872 (package
13873 (name "ruby-prawn-dev")
13874 (version "0.3.0")
13875 (source (origin
13876 (method url-fetch)
13877 (uri (rubygems-uri "prawn-dev" version))
13878 (sha256
13879 (base32
13880 "1hbzzgm0nwc6h8pyv8h9xx068bf676rispxcz4a0sm8nykz54z4x"))))
13881 (build-system ruby-build-system)
13882 (arguments
13883 (list
13884 #:tests? #f ;no test suite
13885 #:phases
13886 #~(modify-phases %standard-phases
13887 (add-after 'extract-gemspec 'drop-rubocop-dependency
13888 ;; Rubocop depends on Prawn. Remove it to avoid the
13889 ;; dependency cycle when using this tool to build
13890 ;; Prawn components.
13891 (lambda _
13892 (substitute* "lib/prawn/dev/tasks.rb"
13893 (("require 'rubocop/rake_task'")
13894 "")
13895 (("RuboCop::RakeTask.new")
13896 ""))
13897 (substitute* ".gemspec"
13898 ((".*add.*dependency.*(rubocop|simplecov).*")
13899 "")))))))
13900 (propagated-inputs (list ruby-rake ruby-rspec ruby-yard))
13901 (synopsis "Shared tools for Prawn projects development")
13902 (description "Prawn-dev contains tools to aid the development of the
13903various Prawn projects.")
13904 (home-page "https://prawnpdf.org/")
13905 (license license:expat)))
13906
13907(define-public ruby-prawn
13908 ;; There hasn't been a new release since 2017/03/17.
13909 (package
13910 (name "ruby-prawn")
13911 (version "2.4.0")
13912 (source (origin
13913 (method git-fetch)
13914 (uri (git-reference
13915 (url "https://github.com/prawnpdf/prawn")
13916 (commit version)))
13917 (file-name (git-file-name name version))
13918 (sha256
13919 (base32
13920 "1h1gww12wcdscij0lnd21p9zcbwrwc3miini5ppannc2birmj9ja"))))
13921 (build-system ruby-build-system)
13922 (arguments
13923 (list
13924 #:phases
13925 #~(modify-phases %standard-phases
13926 (add-before 'build 'drop-signing-key-requirement
13927 (lambda _
13928 (substitute* "prawn.gemspec"
13929 (("spec.signing_key =.*")
13930 "spec.signing_key = nil"))))
13931 (replace 'check
13932 (lambda* (#:key tests? #:allow-other-keys)
13933 (when tests?
13934 ;; The Prawn manual test fails (see:
13935 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
13936 ;; it.
13937 (invoke "rspec"
13938 "--exclude-pattern" "prawn_manual_spec.rb")))))))
13939 (propagated-inputs
13940 (list ruby-matrix
13941 ruby-pdf-core
13942 ruby-ttfunk))
13943 (native-inputs
13944 (list ruby-pdf-inspector
13945 ruby-prawn-manual-builder
13946 ruby-prawn-dev))
13947 (home-page "https://prawnpdf.org/api-docs/2.0/")
13948 (synopsis "PDF generation for Ruby")
13949 (description "Prawn is a pure Ruby PDF generation library.")
13950 (license %prawn-project-licenses)))
13951
13952(define-public ruby-prawn-table
13953 (package
13954 (name "ruby-prawn-table")
13955 (version "0.2.2")
13956 (source (origin
13957 (method url-fetch)
13958 (uri (rubygems-uri "prawn-table" version))
13959 (sha256
13960 (base32
13961 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
13962 (build-system ruby-build-system)
13963 (propagated-inputs
13964 (list ruby-prawn ruby-pdf-inspector))
13965 (native-inputs
13966 `(("bundler" ,bundler)
13967 ("ruby-yard" ,ruby-yard)
13968 ("ruby-mocha" ,ruby-mocha)
13969 ("ruby-coderay" ,ruby-coderay)
13970 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
13971 ("ruby-simplecov" ,ruby-simplecov)
13972 ("ruby-rspec-2" ,ruby-rspec-2)))
13973 (arguments
13974 '(;; TODO: 1 test fails
13975 ;; Failure/Error: pdf.page_count.should == 1
13976 ;; expected: 1
13977 ;; got: 2 (using ==)
13978 ;; # ./spec/table_spec.rb:1308
13979 ;;
13980 ;; 225 examples, 1 failure
13981 #:tests? #f
13982 #:phases
13983 (modify-phases %standard-phases
13984 (add-before 'check 'patch-gemspec
13985 (lambda _
13986 (substitute* "prawn-table.gemspec"
13987 ;; Loosen the requirement for pdf-inspector
13988 (("~> 1\\.1\\.0") ">= 0")
13989 ;; Loosen the requirement for pdf-reader
13990 (("~> 1\\.2") ">= 0"))))
13991 (replace 'check
13992 (lambda* (#:key tests? #:allow-other-keys)
13993 (when tests?
13994 (invoke "rspec")))))))
13995 (home-page "https://github.com/prawnpdf/prawn-table")
13996 (synopsis "Tables support for Prawn")
13997 (description "This gem provides tables support for Prawn.")
13998 (license license:gpl3+)))
13999
14000(define-public ruby-kramdown
14001 (package
14002 (name "ruby-kramdown")
14003 (version "2.3.1")
14004 (source (origin
14005 (method url-fetch)
14006 (uri (rubygems-uri "kramdown" version))
14007 (sha256
14008 (base32
14009 "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
14010 (build-system ruby-build-system)
14011 (arguments `(#:tests? #f)); FIXME: some test failures
14012 (native-inputs
14013 (list ruby-prawn ruby-prawn-table))
14014 (home-page "https://kramdown.gettalong.org/")
14015 (synopsis "Markdown parsing and converting library")
14016 (description "Kramdown is a library for parsing and converting a superset
14017of Markdown. It is completely written in Ruby, supports standard Markdown
14018(with some minor modifications) and various extensions that have been made
14019popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
14020 (license license:expat)))
14021
14022(define-public ruby-kramdown-parser-gfm
14023 (package
14024 (name "ruby-kramdown-parser-gfm")
14025 (version "1.1.0")
14026 (source
14027 (origin
14028 (method url-fetch)
14029 (uri (rubygems-uri "kramdown-parser-gfm" version))
14030 (sha256
14031 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
14032 (build-system ruby-build-system)
14033 (arguments
14034 `(#:tests? #f)) ;no rakefile
14035 (propagated-inputs
14036 (list ruby-kramdown))
14037 (synopsis "Kramdown parser for the GFM dialect of Markdown")
14038 (description
14039 "This is a parser for kramdown that converts Markdown documents in the
14040GFM dialect to HTML.")
14041 (home-page "https://github.com/kramdown/parser-gfm")
14042 (license license:expat)))
14043
14044(define-public ruby-http-parser.rb
14045 (package
14046 (name "ruby-http-parser.rb")
14047 (version "0.6.0")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (rubygems-uri "http_parser.rb" version))
14052 (sha256
14053 (base32
14054 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
14055 (build-system ruby-build-system)
14056 (arguments
14057 ;; No tests
14058 `(#:tests? #f))
14059 (native-inputs
14060 (list ruby-rake-compiler ruby-rspec))
14061 (home-page "https://github.com/tmm1/http_parser.rb")
14062 (synopsis "HTTP parser un Ruby")
14063 (description "This gem is a simple callback-based HTTP request/response
14064parser for writing http servers, clients and proxies.")
14065 (license license:expat)))
14066
14067(define-public ruby-excon
14068 (package
14069 (name "ruby-excon")
14070 (version "1.4.2")
14071 (source (origin
14072 (method git-fetch) ;for tests
14073 (uri (git-reference
14074 (url "https://github.com/excon/excon")
14075 (commit (string-append "v" version))))
14076 (file-name (git-file-name name version))
14077 (sha256
14078 (base32
14079 "0ym2jaj9cyn4kwv0936z6fvxh1j6jfw0j7dln1gy8xnsszv0p4w8"))))
14080 (build-system ruby-build-system)
14081 (arguments
14082 (list
14083 #:phases
14084 #~(modify-phases %standard-phases
14085 (replace 'replace-git-ls-files
14086 (lambda _
14087 (substitute* "excon.gemspec"
14088 (("`git ls-files -- data/. lib/.`")
14089 "`find data lib -type f`"))))
14090 (add-before 'check 'disable-incompatible-tests
14091 (lambda _
14092 ;; Tests require networking
14093 (delete-file "spec/requests/resolv_resolver_spec.rb")
14094 (delete-file "spec/requests/dns_timeout_spec.rb"))))))
14095 (native-inputs
14096 (list
14097 ruby-activesupport
14098 ruby-eventmachine
14099 ruby-json
14100 ruby-open4
14101 ruby-puma
14102 ruby-rspec
14103 ruby-shindo
14104 ruby-sinatra
14105 ruby-webrick))
14106 (propagated-inputs (list ruby-logger))
14107 (synopsis "Usable, fast, simple Ruby HTTP 1.1")
14108 (description "Excon was designed to be simple, fast and performant. It
14109works great as a general HTTP(s) client and is particularly well suited to
14110usage in API clients.")
14111 (home-page "https://github.com/excon/excon")
14112 (license license:expat)))
14113
14114(define-public ruby-em-websocket
14115 (package
14116 (name "ruby-em-websocket")
14117 (version "0.5.1")
14118 (source
14119 (origin
14120 (method url-fetch)
14121 (uri (rubygems-uri "em-websocket" version))
14122 (sha256
14123 (base32
14124 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
14125 (build-system ruby-build-system)
14126 (arguments
14127 ;; No tests
14128 `(#:tests? #f))
14129 (propagated-inputs
14130 (list ruby-eventmachine ruby-http-parser.rb))
14131 (native-inputs
14132 (list bundler ruby-rspec))
14133 (home-page "https://github.com/igrigorik/em-websocket")
14134 (synopsis "EventMachine based WebSocket server")
14135 (description "Em-websocket is an EventMachine based WebSocket server
14136implementation.")
14137 (license license:expat)))
14138
14139(define-public ruby-rouge
14140 (package
14141 (name "ruby-rouge")
14142 (version "3.26.1")
14143 (source (origin
14144 (method url-fetch)
14145 (uri (rubygems-uri "rouge" version))
14146 (sha256
14147 (base32
14148 "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
14149 (build-system ruby-build-system)
14150 (arguments `(#:tests? #f)); No rakefile
14151 (home-page "http://rouge.jneen.net/")
14152 (synopsis "Code highlighter")
14153 (description "Rouge is a code highlighter written in Ruby. It supports more
14154than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
14155is compatible with stylesheets designed for pygments.")
14156 (license (list
14157 ;; rouge is licensed under expat
14158 license:expat
14159 ;; pygments is licensed under bsd-2
14160 license:bsd-2))))
14161
14162(define-public ruby-hashie
14163 (let ((commit "73510552ba580867e9882fe092568916cbcd810b")
14164 (revision "0"))
14165 (package
14166 (name "ruby-hashie")
14167 (version (git-version "5.0.0" revision commit))
14168 (source (origin
14169 (method git-fetch) ;for tests
14170 (uri (git-reference
14171 (url "https://github.com/hashie/hashie")
14172 (commit commit)))
14173 (file-name (git-file-name name version))
14174 (sha256
14175 (base32
14176 "08rpx040h6vgx6ynk6w029f7z7c8aj2p4v135k2l1zxvnw617ddw"))))
14177 (build-system ruby-build-system)
14178 (arguments
14179 (list #:test-target "spec"
14180 #:phases #~(modify-phases %standard-phases
14181 (add-after 'unpack 'disable-bundler
14182 (lambda _
14183 (substitute* "Rakefile"
14184 ((".*require 'bundler'.*") "")
14185 ((".*Bundler.setup.*") "")
14186 (("Bundler::GemHelper\\.install_tasks") ""))))
14187 (add-after 'unpack 'disable-rubocop
14188 (lambda _
14189 (substitute* "Rakefile"
14190 (("require 'rubocop/rake_task'") "")
14191 (("RuboCop::RakeTask.new") ""))))
14192 (add-after 'unpack 'relax-requirements
14193 (lambda _
14194 ;; Contains multiple extraneous dependencies.
14195 (delete-file "Gemfile"))))))
14196 (native-inputs (list ruby-json ruby-pry ruby-rspec ruby-rspec-pending-for))
14197 (home-page "https://github.com/hashie/hashie")
14198 (synopsis "Extensions to Ruby Hashes")
14199 (description "Hashie is a collection of classes and mixins that make Ruby
14200hashes more powerful.")
14201 (license license:expat))))
14202
14203(define-public ruby-heredoc-unindent
14204 (package
14205 (name "ruby-heredoc-unindent")
14206 (version "1.2.0")
14207 (source (origin
14208 (method url-fetch)
14209 (uri (rubygems-uri "heredoc_unindent" version))
14210 (sha256
14211 (base32
14212 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
14213 (build-system ruby-build-system)
14214 (native-inputs
14215 (list ruby-hoe-3))
14216 (home-page "https://github.com/adrianomitre/heredoc_unindent")
14217 (synopsis "Heredoc indentation cleaner")
14218 (description "This gem removes common margin from indented strings, such
14219as the ones produced by indented heredocs. In other words, it strips out
14220leading whitespace chars at the beginning of each line, but only as much as
14221the line with the smallest margin.
14222
14223It is acknowledged that many strings defined by heredocs are just code and
14224fact is that most parsers are insensitive to indentation. If, however, the
14225strings are to be used otherwise, be it for printing or testing, the extra
14226indentation will probably be an issue and hence this gem.")
14227 (license license:expat)))
14228
14229(define-public ruby-safe-yaml
14230 (package
14231 (name "ruby-safe-yaml")
14232 (version "1.0.5")
14233 (source
14234 (origin
14235 (method git-fetch)
14236 (uri (git-reference
14237 (url "https://github.com/dtao/safe_yaml")
14238 (commit version)))
14239 (file-name (git-file-name name version))
14240 (sha256
14241 (base32
14242 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
14243 (build-system ruby-build-system)
14244 (native-inputs
14245 (list ruby-rspec ruby-hashie ruby-heredoc-unindent))
14246 (arguments
14247 (list
14248 ;; Tests are broken since the move to ruby@3.
14249 ;; There's ongoing effort on the Jekyll dependent
14250 ;; to remove this orphan dependency.
14251 #:tests? #f ; broken since move to ruby@3
14252 #:test-target "spec"
14253 #:phases
14254 #~(modify-phases %standard-phases
14255 (add-before 'check 'set-TZ
14256 (lambda _
14257 ;; This test is dependent on the timezone
14258 ;; spec/transform/to_date_spec.rb:35
14259 ;; # SafeYAML::Transform::ToDate converts times to the local
14260 ;; timezone
14261 (setenv "TZ" "UTC-11"))))))
14262 (home-page "https://github.com/dtao/safe_yaml")
14263 (synopsis "YAML parser")
14264 (description "The SafeYAML gem provides an alternative implementation of
14265YAML.load suitable for accepting user input in Ruby applications.")
14266 (license license:expat)))
14267
14268(define-public ruby-yaml-lint
14269 ;; No tags for releases.
14270 (let ((commit "d6a253f7d33234a9c24660d582cf7014e882c0c2")
14271 (revision "0"))
14272 (package
14273 (name "ruby-yaml-lint")
14274 (version (git-version "0.1.2" revision commit))
14275 (source
14276 (origin
14277 (method git-fetch)
14278 (uri (git-reference
14279 (url "https://github.com/Pryz/yaml-lint")
14280 (commit commit)))
14281 (file-name (git-file-name name version))
14282 (sha256
14283 (base32 "0zk0jwzmcaaiyixjvkzdb54xhiqcnjkma72nkv0vm5csaphfdjkx"))))
14284 (build-system ruby-build-system)
14285 (arguments
14286 `(#:phases
14287 (modify-phases %standard-phases
14288 (add-after 'unpack 'sanitize-dependencies
14289 (lambda _
14290 (substitute* "spec/spec_helper.rb"
14291 ((".*[Cc]overalls.*") ""))))
14292 (replace 'check
14293 (lambda* (#:key tests? #:allow-other-keys)
14294 (when tests?
14295 (invoke "rspec")))))))
14296 (native-inputs
14297 (list ruby-coveralls ruby-rspec ruby-simplecov))
14298 (synopsis "Simple YAML check tool")
14299 (description
14300 "@code{yaml-lint} will simply try to load the YAML file with the built-in
14301Ruby yaml library.")
14302 (home-page "https://github.com/Pryz/yaml-lint")
14303 (license license:expat))))
14304
14305(define-public ruby-matrix
14306 (package
14307 (name "ruby-matrix")
14308 (version "0.4.2")
14309 (source (origin
14310 (method git-fetch) ;for tests
14311 (uri (git-reference
14312 (url "https://github.com/ruby/matrix")
14313 (commit (string-append "v" version))))
14314 (file-name (git-file-name name version))
14315 (sha256
14316 (base32
14317 "1asxr0jzh39lk5f8a9wm5avykrcy0v2wgd1bl3cszjczh99xy5k2"))))
14318 (build-system ruby-build-system)
14319 (synopsis "@code{Matrix} and @code{Vector} classes implementation for Ruby")
14320 (description "This Ruby library provides an implementation of the
14321@code{Matrix} and @code{Vector} classes. The @code{Matrix} class represents a
14322mathematical matrix. It provides methods for creating matrices, operating on
14323them arithmetically and algebraically, and determining their mathematical
14324properties (trace, rank, inverse, determinant, eigensystem, etc.). The
14325@code{Vector} class represents a mathematical vector, which is useful in its
14326own right, and also constitutes a row or column of a @code{Matrix}.")
14327 (home-page "https://github.com/ruby/matrix")
14328 (license license:bsd-2)))
14329
14330(define-public ruby-m
14331 (package
14332 (name "ruby-m")
14333 (version "1.6.2")
14334 (source (origin
14335 (method git-fetch) ;for tests
14336 (uri (git-reference
14337 (url "https://github.com/qrush/m")
14338 (commit (string-append "v" version))))
14339 (file-name (git-file-name name version))
14340 (sha256
14341 (base32
14342 "0za9jsq341xyqjaswx2wrd4x42w9a2xygarh9spsvsxaxf5b1sz3"))))
14343 (build-system ruby-build-system)
14344 (arguments
14345 (list
14346 #:phases
14347 #~(modify-phases %standard-phases
14348 (add-after 'unpack 'sanitize-dependencies
14349 (lambda _
14350 (delete-file "Gemfile")
14351 (substitute* "m.gemspec"
14352 ((".*coveralls.*") ""))
14353 (substitute* "Rakefile"
14354 ((".*require \"coveralls\".*") "")
14355 ((".*require \"standard/rake\".*") "")
14356 (("Coveralls.push!") "")
14357 (("\"standard:fix\"") ""))))
14358 (add-before 'replace-git-ls-files 'pre-replace-git-ls-files
14359 (lambda _
14360 (substitute* "m.gemspec"
14361 (("git ls-files -- bin/\\*")
14362 "find bin -type f -not -regex '.*\\.gem$' | sort")
14363 (("git ls-files -- \\{test,spec,features}/\\*")
14364 "find test -type f -not -regex '.*\\.gem$' | sort"))))
14365 (delete 'check)
14366 (add-after 'install 'check
14367 (lambda* (#:key tests? #:allow-other-keys)
14368 (setenv "GEM_PATH" (string-append
14369 (getenv "GEM_PATH") ":"
14370 #$output "/lib/ruby/vendor_ruby"))
14371 (when tests?
14372 (invoke "rake" "test")))))))
14373 (native-inputs (list ruby-activesupport))
14374 (propagated-inputs (list ruby-method-source ruby-rake))
14375 (synopsis "Ruby test runner that can run tests by line number")
14376 (description "@code{m} stands for metal, a better test/unit and
14377@code{minitest} test runner that can run tests by line number.")
14378 (home-page "https://github.com/qrush/m")
14379 (license license:expat)))
14380
14381(define-public ruby-mercenary
14382 (package
14383 (name "ruby-mercenary")
14384 (version "0.4.0")
14385 (source (origin
14386 (method url-fetch)
14387 (uri (rubygems-uri "mercenary" version))
14388 (sha256
14389 (base32
14390 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
14391 (build-system ruby-build-system)
14392 (arguments `(#:test-target "spec"))
14393 (native-inputs
14394 (list bundler))
14395 (home-page "https://github.com/jekyll/mercenary")
14396 (synopsis "Command-line apps library in Ruby")
14397 (description "Mercenary is a lightweight and flexible library for writing
14398command-line apps in Ruby.")
14399 (license license:expat)))
14400
14401(define-public ruby-launchy
14402 (package
14403 (name "ruby-launchy")
14404 (version "2.5.2")
14405 (source (origin
14406 (method url-fetch)
14407 (uri (rubygems-uri "launchy" version))
14408 (sha256
14409 (base32
14410 "06r43899384das2bkbrpsdxsafyyqa94il7111053idfalb4984a"))))
14411 (build-system ruby-build-system)
14412 (native-inputs (list curl links ruby-simplecov))
14413 (propagated-inputs (list ruby-addressable))
14414 (synopsis "Ruby helper class for launching applications")
14415 (description
14416 "Launchy is helper class for launching applications in a fire and forget
14417manner. The aim of Launchy is to provide a common approach to launching
14418external applications from within Ruby programs.")
14419 (home-page "https://github.com/copiousfreetime/launchy")
14420 (license license:isc)))
14421
14422(define-public ruby-strscan
14423 (package
14424 (name "ruby-strscan")
14425 (version "3.1.8")
14426 (source
14427 (origin
14428 (method git-fetch) ;for tests
14429 (uri (git-reference
14430 (url "https://github.com/ruby/strscan")
14431 (commit (string-append "v" version))))
14432 (file-name (git-file-name name version))
14433 (sha256
14434 (base32 "0xnxa8s619jrg2l2sc4f3b3vwg3659hqpmnzhl0mg0v2wmny8vwr"))))
14435 (build-system ruby-build-system)
14436 (arguments
14437 (list
14438 #:phases
14439 #~(modify-phases %standard-phases
14440 (add-before 'check 'remove-bundler-setup
14441 (lambda _
14442 (substitute* "Rakefile"
14443 (("-rbundler/setup")
14444 ""))))
14445 (add-before 'check 'set-gem-path
14446 (lambda _
14447 (setenv "GEM_PATH"
14448 (string-append (getenv "GEM_PATH") ":"
14449 #$output "/lib/ruby/vendor_ruby"))))
14450 (delete 'check)
14451 (add-after 'install 'check
14452 (assoc-ref %standard-phases
14453 'check)))))
14454 (native-inputs (list ruby-rake-compiler ruby-test-unit
14455 ruby-test-unit-ruby-core))
14456 (synopsis "Lexical scanning operations for Ruby")
14457 (description
14458 "This package provides lexical scanning operations on a String in Ruby.")
14459 (home-page "https://github.com/ruby/strscan")
14460 (license (list license:ruby license:bsd-2))))
14461
14462(define-public ruby-liquid
14463 (package
14464 (name "ruby-liquid")
14465 (version "5.13.0")
14466 (source (origin
14467 (method git-fetch) ;for tests
14468 (uri (git-reference
14469 (url "https://github.com/Shopify/liquid")
14470 (commit (string-append "v" version))))
14471 (file-name (git-file-name name version))
14472 (sha256
14473 (base32
14474 "0i46vn4n6nhx4gbwx8c9nflg5k0nr8pbgifgpry3kbkrqsmkimib"))))
14475 (build-system ruby-build-system)
14476 (arguments
14477 (list
14478 #:phases
14479 #~(modify-phases %standard-phases
14480 (delete 'check) ;moved after the install phase
14481 (add-after 'install 'check
14482 (assoc-ref %standard-phases 'check))
14483 (add-before 'check 'set-GEM_PATH
14484 (lambda _
14485 (setenv "GEM_PATH" (string-append
14486 (getenv "GEM_PATH") ":"
14487 #$output "/lib/ruby/vendor_ruby"))))
14488 (add-before 'check 'delete-problematic-tests
14489 (lambda _
14490 ;; The following test fails with 'Unknown tag' errors (see:
14491 ;; https://github.com/Shopify/liquid/issues/1699).
14492 (delete-file "test/integration/tags/inline_comment_test.rb")))
14493 (add-before 'check 'remove-cache-tests
14494 (lambda _
14495 (substitute* "test/integration/expression_test.rb"
14496 (("require 'lru_redux'") "")
14497 (("test_expression_cache_with_lru_redux" name)
14498 (string-append name "; skip 'requires lru_redux gem';"))))))))
14499 (native-inputs (list ruby-rspec ruby-stackprof))
14500 (propagated-inputs (list ruby-strscan ruby-bigdecimal))
14501 (home-page "https://shopify.github.io/liquid/")
14502 (synopsis "Template language")
14503 (description "Liquid is a template language written in Ruby. It is used
14504to load dynamic content on storefronts.")
14505 (license license:expat)))
14506
14507(define-public ruby-liquid-4
14508 (package
14509 (inherit ruby-liquid)
14510 (name "ruby-liquid")
14511 (version "4.0.4")
14512 (source (origin
14513 (method git-fetch) ;for tests
14514 (uri (git-reference
14515 (url "https://github.com/Shopify/liquid")
14516 (commit (string-append "v" version))))
14517 (file-name (git-file-name name version))
14518 (sha256
14519 (base32
14520 "0cr321nd0zkbxirgdfmz37xx7j26zfnicjh585fi20vx60frry83"))))
14521 (arguments (list #:tests? #f))))
14522
14523;;; This variant is purposefully incomplete, lacking ruby-liquid so that it
14524;;; can be used for ruby-liquid's test suite.
14525(define-public ruby-liquid-c-bootstrap
14526 (package
14527 (name "ruby-liquid-c-bootstrap")
14528 (version "4.2.0")
14529 (source (origin
14530 (method url-fetch)
14531 (uri (rubygems-uri "liquid-c" version))
14532 (sha256
14533 (base32
14534 "040qspl1x0pm5l3zwf90w02rcygbk0xl9bb1jgbszpj857pyqh8p"))))
14535 (build-system ruby-build-system)
14536 (arguments (list #:tests? #f))
14537 (native-inputs (list ruby-rake-compiler))
14538 (synopsis "Liquid performance extension in C")
14539 (description "This package provides a Partial native implementation of the
14540liquid ruby gem in C that makes it operate about three times faster.")
14541 (home-page "https://github.com/shopify/liquid-c")
14542 (properties '((hidden? . #t)))
14543 (license license:expat)))
14544
14545(define-public ruby-liquid-c
14546 (package/inherit ruby-liquid-c-bootstrap
14547 (name "ruby-liquid-c")
14548 (arguments
14549 (list
14550 ;; Only run the unit tests, because the test:integration target fails
14551 ;; with "File does not exist: test_helper" (see:
14552 ;; https://github.com/Shopify/liquid-c/issues/188).
14553 #:test-target "test:unit"
14554 #:phases
14555 #~(modify-phases %standard-phases
14556 (add-after 'extract-gemspec 'relax-requirements
14557 (lambda _
14558 (substitute* "Gemfile"
14559 ;; Do not attempt to fetch a gem from git.
14560 (("git_source\\(:github) do \\|repo_name\\|")
14561 "if false")
14562 ((", github: \"Shopify/liquid\", ref: \"master\"")
14563 "")
14564 ;; Remove extraneous dependencies.
14565 ((".*byebug.*") "")
14566 ((".*rubocop.*") "")
14567 ;; Relax spy version specification.
14568 (("gem \"spy\", \"0.4.1\"")
14569 "gem \"spy\", \">= 0.4.1\""))))
14570 ;; XXX: Unclear if the binary_name has any influence on Memcheck.
14571 ;; But the tests fail if it's unset.
14572 (add-before 'check 'pre-check
14573 (lambda _
14574 (substitute* "Rakefile"
14575 (("require \"ruby_memcheck\"" all)
14576 (string-append all "
14577RubyMemcheck.config(binary_name: \"liquid_c.so\")"))))))))
14578 (native-inputs
14579 (list ruby-benchmark-ips
14580 ruby-rake-compiler
14581 ruby-ruby-memcheck
14582 ruby-spy
14583 ruby-stackprof))
14584 (propagated-inputs
14585 (list ruby-liquid))
14586 (properties
14587 (alist-delete 'hidden? (package-properties ruby-liquid-c-bootstrap)))))
14588
14589(define-public ruby-localhost
14590 (package
14591 (name "ruby-localhost")
14592 (version "1.1.10")
14593 (source (origin
14594 (method git-fetch) ;for tests
14595 (uri (git-reference
14596 (url "https://github.com/socketry/localhost")
14597 (commit (string-append "v" version))))
14598 (file-name (git-file-name name version))
14599 (sha256
14600 (base32
14601 "1yp70w15wpfk613ap5f4y15yx4n2qqwa67vqc2f4lv7npf3llcz0"))))
14602 (build-system ruby-build-system)
14603 (arguments
14604 ;; XXX: The test suite requires sus-fixtures-async, which requires async,
14605 ;; only available for Ruby 3.0.
14606 (list #:tests? #f
14607 #:phases
14608 #~(modify-phases %standard-phases
14609 (add-before 'build 'remove-missing-signing-key
14610 (lambda _
14611 ;; Otherwise, the build fails with ENOENT.
14612 (substitute* "localhost.gemspec"
14613 ((".*spec.signing_key.*") "")))))))
14614 (synopsis "API for generating per-user self-signed root certificates")
14615 (description "This package provides @code{localhost}, a Ruby library for
14616Managing a local certificate authority for self-signed, localhost development
14617servers.")
14618 (home-page "https://github.com/socketry/localhost")
14619 (license license:expat)))
14620
14621(define-public ruby-forwardable-extended
14622 (package
14623 (name "ruby-forwardable-extended")
14624 (version "2.6.0")
14625 (source (origin
14626 (method url-fetch)
14627 (uri (rubygems-uri "forwardable-extended" version))
14628 (sha256
14629 (base32
14630 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
14631 (build-system ruby-build-system)
14632 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
14633 (home-page "https://github.com/envygeeks/forwardable-extended")
14634 (synopsis "Delegation to hashes and instance variables in Forwardable")
14635 (description "Forwardable Extended provides more @code{Forwardable}
14636methods for your source as @code{Forwardable::Extended}.")
14637 (license license:expat)))
14638
14639(define-public ruby-pathutil
14640 (package
14641 (name "ruby-pathutil")
14642 (version "0.16.2")
14643 (source (origin
14644 (method url-fetch)
14645 (uri (rubygems-uri "pathutil" version))
14646 (sha256
14647 (base32
14648 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
14649 (build-system ruby-build-system)
14650 (propagated-inputs
14651 (list ruby-forwardable-extended))
14652 (native-inputs
14653 (list bundler ruby-rspec))
14654 ;; Fails with: cannot load such file --
14655 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
14656 (arguments `(#:tests? #f))
14657 (home-page "https://github.com/envygeeks/pathutil")
14658 (synopsis "Extended implementation of Pathname")
14659 (description "Pathutil tries to be a faster pure Ruby implementation of
14660Pathname.")
14661 (license license:expat)))
14662
14663(define-public ruby-terminal-table
14664 (package
14665 (name "ruby-terminal-table")
14666 (version "4.0.0")
14667 (source
14668 (origin
14669 (method git-fetch)
14670 (uri (git-reference
14671 (url "https://github.com/tj/terminal-table")
14672 (commit (string-append "v" version))))
14673 (file-name (git-file-name name version))
14674 (sha256
14675 (base32 "17s0zvbix72d5ivv1mqi9hyzqrippn01spglj6zg3g18v4vkg0lk"))))
14676 (arguments
14677 '(#:phases (modify-phases %standard-phases
14678 (add-before 'check 'remove-unnecessary-dependencies
14679 (lambda _
14680 (substitute* "terminal-table.gemspec"
14681 (("s.add_runtime_dependency.*")
14682 "\n")
14683 (("s.add_development_dependency.*")
14684 "\n"))
14685 (substitute* "Gemfile"
14686 ((".*tins.*")
14687 "\n"))))
14688 (replace 'check
14689 (lambda* (#:key tests? #:allow-other-keys)
14690 (when tests?
14691 (invoke "rspec")))))))
14692 (build-system ruby-build-system)
14693 (propagated-inputs (list ruby-unicode-display-width))
14694 (native-inputs (list ruby-rspec))
14695 (home-page "https://github.com/tj/terminal-table")
14696 (synopsis "Simple, feature rich ASCII table generation library")
14697 (description "Terminal Table is a fast and simple, yet feature rich
14698table generator written in Ruby. It supports ASCII and
14699Unicode formatted tables.")
14700 (license license:expat)))
14701
14702(define-public jekyll
14703 (package
14704 (name "jekyll")
14705 (version "4.4.1")
14706 (source (origin
14707 (method git-fetch) ;for tests
14708 (uri (git-reference
14709 (url "https://github.com/jekyll/jekyll")
14710 (commit (string-append "v" version))))
14711 (file-name (git-file-name name version))
14712 (sha256
14713 (base32
14714 "13cgr7nhxsmackzc976pcvrmam0il623rz13fnr9f7g4g3d1m1lq"))))
14715 (build-system ruby-build-system)
14716 (arguments
14717 (list #:modules '((guix build ruby-build-system)
14718 (guix build utils)
14719 (ice-9 ftw)
14720 (srfi srfi-26))
14721 ;; The cucumber acceptance suite is not run as it depends on an old
14722 ;; version (5).
14723 #:test-target "spec"
14724 #:phases
14725 #~(modify-phases %standard-phases
14726 (add-after 'unpack 'loosen-dependencies
14727 (lambda _
14728 (substitute* "jekyll.gemspec"
14729 (("(.*terminal-table.*,.*),.*" _ m)
14730 (string-append m ")\n")))))
14731 (add-before 'check 'disable-problematic-tests
14732 ;; TODO: Package the missing test inputs.
14733 (lambda _
14734 (with-directory-excursion "test"
14735 ;; Requires 'jekyll-coffeescript'.
14736 (delete-file "test_coffeescript.rb")
14737 ;; Requires 'tomlrb'.
14738 (delete-file "test_configuration.rb")
14739 (substitute* "test_filters.rb"
14740 ;; The sassify tests fail due to white space
14741 ;; differences (see:
14742 ;; https://github.com/jekyll/jekyll/issues/9322).
14743 ((".*s?ssify with simple string.*" all)
14744 (string-append all
14745 " skip('fails on guix')\n")))
14746 ;; Requires kramdown-syntax-coderay.
14747 (delete-file "test_kramdown.rb")
14748 ;; Requires 'test-theme', usually made available from the
14749 ;; local checkout via Bundler (not used here).
14750 (delete-file "test_layout_reader.rb")
14751 ;; Requires a large amount of un-packaged dependencies.
14752 (delete-file "test_plugin_manager.rb")
14753 ;; Requires 'classifier-reborn'.
14754 (delete-file "test_related_posts.rb")
14755 ;; This one causes a test failure similar to the ones for
14756 ;; sassify above.
14757 (delete-file "test_sass.rb")
14758 ;; This would require running the tests via 'bundle
14759 ;; exec', but the Gemfile contains too many (extraneous)
14760 ;; dependencies.
14761 (delete-file "test_site.rb")
14762 ;; Delete the theme tests, as they require 'test-theme',
14763 ;; usually made available from the local checkout via the
14764 ;; Gemfile/bundler (not used here).
14765 (for-each delete-file
14766 (scandir
14767 "." (cut string-prefix? "test_theme" <>)))
14768 ;; This one also relies on 'test-theme'.
14769 (delete-file "test_liquid_renderer.rb")
14770 ;; This test assumes internet connectivity, negate it, as
14771 ;; there's no Internet in the build container.
14772 (substitute* "test_utils.rb"
14773 (("assert Utils::Internet\\.connected\\?")
14774 "refute Utils::Internet.connected?"))
14775 ;; These tests fail non-deterministically (see:
14776 ;; https://github.com/jekyll/jekyll/issues/9323).
14777 (delete-file "test_new_command.rb")
14778 (delete-file "test_collections.rb")
14779 ;; This requires post-install run with GEM_PATH.
14780 ;; Also requires more native-inputs.
14781 (substitute* "test_commands_serve.rb"
14782 ((".*\"fork is not supported.*" all)
14783 (string-append all
14784 " skip('fails on guix')\n"))))))
14785 (replace 'check
14786 (lambda* (#:key tests? #:allow-other-keys)
14787 (when tests?
14788 ;; Invoke the test scripts manually, as 'rake test'
14789 ;; doesn't show any failure details, making debugging
14790 ;; needlessly difficult.
14791 (for-each (lambda (f)
14792 (invoke "ruby" "-I" "test" f))
14793 (find-files "test" "^test_.*\\.rb$"))))))))
14794 (native-inputs
14795 (list bundler
14796 ruby-httpclient
14797 ruby-minitest-profile
14798 ruby-minitest-reporters
14799 ruby-nokogiri
14800 ruby-rspec
14801 ruby-rspec-mocks
14802 ruby-shoulda
14803 ruby-simplecov))
14804 (propagated-inputs
14805 (list ruby-addressable
14806 ruby-colorator
14807 ruby-em-websocket
14808 ruby-i18n
14809 ruby-jekyll-sass-converter
14810 ruby-jekyll-watch
14811 ruby-kramdown-parser-gfm
14812 ruby-liquid-4
14813 ruby-mercenary
14814 ruby-pathutil
14815 ruby-rouge
14816 ruby-safe-yaml
14817 ruby-sassc
14818 ruby-terminal-table
14819 ruby-webrick))
14820 (home-page "https://jekyllrb.com/")
14821 (synopsis "Static site generator")
14822 (description "Jekyll is a simple, blog aware, static site generator.")
14823 (license license:expat)))
14824
14825(define-public ruby-jekyll-paginate-v2
14826 (package
14827 (name "ruby-jekyll-paginate-v2")
14828 (version "3.0.0")
14829 (source (origin
14830 (method url-fetch)
14831 (uri (rubygems-uri "jekyll-paginate-v2" version))
14832 (sha256
14833 (base32
14834 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
14835 (build-system ruby-build-system)
14836 (propagated-inputs
14837 (list jekyll))
14838 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
14839 (synopsis "Pagination Generator for Jekyll 3")
14840 (description "The Pagination Generator forms the core of the pagination
14841logic in Jekyll. It calculates and generates the pagination pages.")
14842 (license license:expat)))
14843
14844(define-public ruby-faraday-net-http
14845 (package
14846 (name "ruby-faraday-net-http")
14847 (version "3.0.2")
14848 (source (origin
14849 (method url-fetch)
14850 (uri (rubygems-uri "faraday-net_http" version))
14851 (sha256
14852 (base32
14853 "13byv3mp1gsjyv8k0ih4612y6vw5kqva6i03wcg4w2fqpsd950k8"))))
14854 (build-system ruby-build-system)
14855 ;; Do not run the test suite here as it would introduce a dependency cycle
14856 ;; with ruby-faraday, which uses it as part of its test suite.
14857 (arguments (list #:tests? #f))
14858 (synopsis "Faraday adapter for Net::HTTP")
14859 (description "This gem is a Faraday adapter for the @code{Net::HTTP}
14860library. Faraday is an HTTP client library that provides a common interface
14861over many adapters.")
14862 (home-page "https://github.com/lostisland/faraday-net_http")
14863 (license license:expat)))
14864
14865(define-public ruby-faraday
14866 (package
14867 (name "ruby-faraday")
14868 (version "2.13.1")
14869 (source (origin
14870 (method git-fetch)
14871 (uri (git-reference
14872 (url "https://github.com/lostisland/faraday")
14873 (commit (string-append "v" version))))
14874 (file-name (git-file-name name version))
14875 (sha256
14876 (base32
14877 "1nln6cs42hr99908bfjiyjpfpi1bmpgdf2w1dii2x8fczykgahsk"))))
14878 (build-system ruby-build-system)
14879 (arguments
14880 (list
14881 #:test-target "spec"
14882 #:phases
14883 #~(modify-phases %standard-phases
14884 (add-after 'unpack 'sanitize-dependencies
14885 (lambda _
14886 (substitute* "spec/spec_helper.rb"
14887 ((".*coveralls.*") "")
14888 ((", Coveralls::SimpleCov::Formatter") "")))))))
14889 (native-inputs
14890 (list ruby-coveralls
14891 ruby-pry
14892 ruby-rack
14893 ruby-rspec
14894 ruby-simplecov
14895 ruby-webmock))
14896 ;; Propagate faraday-net-http as this is the default adapter used, and
14897 ;; many Ruby projects assumes it is available.
14898 (propagated-inputs (list ruby-ruby2-keywords ruby-faraday-net-http))
14899 (synopsis "Ruby HTTP/REST API client library")
14900 (description "Faraday is a HTTP/REST API client library which provides a
14901common interface over different adapters.")
14902 (home-page "https://github.com/lostisland/faraday")
14903 (license license:expat)))
14904
14905(define-public ruby-nio4r
14906 (package
14907 (name "ruby-nio4r")
14908 (version "2.7.4")
14909 (source
14910 (origin
14911 (method git-fetch)
14912 (uri (git-reference
14913 (url "https://github.com/socketry/nio4r")
14914 (commit (string-append "v" version))))
14915 (file-name (git-file-name name version))
14916 (sha256
14917 (base32
14918 "1planm0yrzgkjqvxbfrcp477k030f1cyplpf8g1p7dppgzk2iqqm"))))
14919 (build-system ruby-build-system)
14920 (arguments
14921 '(#:test-target "spec"
14922 #:phases
14923 (modify-phases %standard-phases
14924 (add-after 'extract-gemspec 'delete-certificate
14925 (lambda _
14926 (substitute* "nio4r.gemspec"
14927 (("spec.cert_chain = .*") "")
14928 (("spec.signing_key = .*") ""))))
14929 (add-before 'check 'compile
14930 (lambda _
14931 (invoke "rake" "compile"))))))
14932 (native-inputs
14933 (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop))
14934 (synopsis "New I/O for Ruby")
14935 (description
14936 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
14937for scalable network clients and servers.")
14938 (home-page "https://github.com/socketry/nio4r")
14939 (license license:expat)))
14940
14941(define-public ruby-language-server-protocol
14942 (package
14943 (name "ruby-language-server-protocol")
14944 (version "3.17.0.3")
14945 (source (origin
14946 (method git-fetch) ;for tests
14947 (uri (git-reference
14948 (url "https://github.com/mtsmfm/language_server-protocol-ruby")
14949 (commit (string-append "v" version))))
14950 (file-name (git-file-name name version))
14951 (sha256
14952 (base32
14953 "0f2g301fz99c6nkca39s9227brlycznv8a9r4b4i99rg25m91lc6"))))
14954 (build-system ruby-build-system)
14955 (arguments
14956 (list
14957 #:phases
14958 #~(modify-phases %standard-phases
14959 (add-after 'unpack 'remove-unnecessary-dependencies
14960 (lambda _
14961 (substitute* "Gemfile"
14962 (("gem \"pry-byebug\"") ""))))
14963 (replace 'replace-git-ls-files
14964 (lambda _
14965 (substitute* "language_server-protocol.gemspec"
14966 (("git ls-files -z([^`]*)" _ files)
14967 (string-append "find " files
14968 " -type f -not -regex '.*\\.gem$'"
14969 " -print0 | sort -z"))))))))
14970 (native-inputs
14971 (list ruby-activesupport
14972 ruby-benchmark-ips
14973 ruby-m
14974 ruby-minitest
14975 ruby-minitest-power-assert))
14976 (synopsis "Language Server Protocol (LSP) development kit for Ruby")
14977 (description "This package provides a Language Server Protocol (LSP)
14978development kit for Ruby.")
14979 (home-page "https://github.com/mtsmfm/language_server-protocol-ruby")
14980 (license license:expat)))
14981
14982(define-public ruby-spy
14983 (package
14984 (name "ruby-spy")
14985 (version "1.0.5")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (rubygems-uri "spy" version))
14990 (sha256
14991 (base32 "0g2mma8q17m26k5s864ndlvvqllhcivwg2wdigjvb7z06iw17gds"))))
14992 (build-system ruby-build-system)
14993 (arguments
14994 (list
14995 #:phases
14996 #~(modify-phases %standard-phases
14997 (add-after 'extract-gemspec 'relax-requirements
14998 (lambda _
14999 (substitute* "spy.gemspec"
15000 ((".*(pry|coveralls).*")
15001 ""))
15002 (substitute* "test/test_helper.rb"
15003 ((".*(pry|[Cc]overalls).*")
15004 ""))
15005 (substitute* "Gemfile"
15006 ((".*(redcarpet|yard).*")
15007 ""))))
15008 (add-before 'check 'skip-failing-tests
15009 (lambda _
15010 (substitute* "test/spy/test_subroutine.rb"
15011 (("test_spy_hook_records_number_of_calls2" name)
15012 (string-append name "; skip 'fails with Ruby 3.4';"))))))))
15013 (native-inputs (list ruby-minitest-reporters
15014 ruby-rspec-core ruby-rspec-expectations))
15015 (synopsis "Mocking library for Ruby")
15016 (description
15017 "Spy is a mocking library. By default, it will raise an
15018error if you attempt to stub a method that doesn't exist or call the stubbed
15019method with the wrong arity.")
15020 (home-page "https://github.com/ryanong/spy")
15021 (license license:expat)))
15022
15023(define-public ruby-subprocess
15024 (package
15025 (name "ruby-subprocess")
15026 (version "1.5.6")
15027 (source (origin
15028 (method url-fetch)
15029 (uri (rubygems-uri "subprocess" version))
15030 (sha256
15031 (base32
15032 "0v49ahfx9b75qg42sl8a3l367g2vihc16g8z5f2raxpxjl1wh2s2"))))
15033 (build-system ruby-build-system)
15034 ;; Do not run the test suite, as there its test dependency ruby-sord would
15035 ;; introduce a cycle with ruby-sorbet-runtime.
15036 (arguments (list #:tests? #f))
15037 (native-inputs (list ruby-minitest ruby-pry))
15038 (synopsis "Ruby library to control and communicate with spawned processes")
15039 (description "This Ruby library is controlling and communicating with
15040spawned processes. It is designed after Python's @code{subprocess} module.")
15041 (home-page "https://github.com/stripe/subprocess")
15042 (license license:expat)))
15043
15044(define-public ruby-sus
15045 (package
15046 (name "ruby-sus")
15047 (version "0.20.3")
15048 (source (origin
15049 (method git-fetch) ;for gems.rb
15050 (uri (git-reference
15051 (url "https://github.com/ioquatix/sus")
15052 (commit (string-append "v" version))))
15053 (file-name (git-file-name name version))
15054 (sha256
15055 (base32
15056 "0j4rkh9li79674h3lfkxlcdygscmb22l77i7hwhxl3gw103gkpdr"))))
15057 (build-system ruby-build-system)
15058 (arguments
15059 (list #:phases
15060 #~(modify-phases %standard-phases
15061 (add-before 'build 'prune-gems.rb
15062 (lambda _
15063 (substitute* "gems.rb"
15064 (("gem \"bake-modernize\"") "")
15065 (("gem \"bake-gem\"") "")
15066 (("gem \"utopia-project\"") ""))))
15067 (add-before 'build 'remove-missing-signing-key
15068 (lambda _
15069 ;; Otherwise, the build fails with ENOENT.
15070 (substitute* "sus.gemspec"
15071 ((".*spec.signing_key.*") ""))))
15072 (delete 'check) ;moved after install
15073 (add-after 'install 'check
15074 (lambda* (#:key tests? #:allow-other-keys)
15075 (when tests?
15076 (setenv "CONSOLE_LEVEL" "debug")
15077 (setenv "HOME" "/tmp")
15078 ;; 'bundle exec' must be used to workaround a problem
15079 ;; when using bake test and GEM_PATH (see:
15080 ;; https://github.com/ioquatix/bake/issues/11).
15081 (invoke "bundle" "exec" "bake" "test"))))
15082 (add-before 'check 'set-paths
15083 (lambda _
15084 (setenv "PATH" (string-append (getenv "PATH") ":"
15085 #$output "/bin"))
15086 (setenv "GEM_PATH" (string-append
15087 (getenv "GEM_PATH") ":"
15088 #$output "/lib/ruby/vendor_ruby")))))))
15089 (native-inputs (list ruby-bake-test ruby-bake-test-external ruby-covered))
15090 (synopsis "Fast and scalable test runner for Ruby")
15091 (description "This package provides a fast and scalable test runner for Ruby.")
15092 (home-page "https://github.com/ioquatix/sus")
15093 (license license:expat)))
15094
15095(define-public ruby-syntax-tree
15096 (package
15097 (name "ruby-syntax-tree")
15098 (version "6.2.0")
15099 (source (origin
15100 (method git-fetch) ;for tests
15101 (uri (git-reference
15102 (url "https://github.com/ruby-syntax-tree/syntax_tree")
15103 (commit (string-append "v" version))))
15104 (file-name (git-file-name name version))
15105 (sha256
15106 (base32
15107 "0sbcpybh2m7vqiq4nd6b15iaha6q58210lq8wkdka8934gfizvdk"))))
15108 (build-system ruby-build-system)
15109 (arguments
15110 (list
15111 ;; Some tests are broken with [email protected].
15112 ;; See: https://github.com/ruby-syntax-tree/syntax_tree/issues/457
15113 #:tests? #f
15114 #:phases
15115 #~(modify-phases %standard-phases
15116 ;; The tests rely on the Gem being installed, so move the check
15117 ;; phase after the install phase.
15118 (delete 'check)
15119 (add-after 'install 'check
15120 (lambda* (#:key tests? #:allow-other-keys)
15121 (setenv "GEM_PATH" (string-append
15122 #$output "/lib/ruby/vendor_ruby:"
15123 (getenv "GEM_PATH")))
15124 (when tests?
15125 (invoke "rake" "test")))))))
15126 (native-inputs (list ruby-rubocop-ast ruby-simplecov))
15127 (propagated-inputs (list ruby-prettier-print))
15128 (synopsis "Fast Ruby parser and formatter")
15129 (description "Syntax Tree is a suite of tools built on top of the internal
15130CRuby parser. It provides the ability to generate a syntax tree from source,
15131as well as the tools necessary to inspect and manipulate that syntax tree. It
15132can be used to build formatters, linters, language servers, and more.")
15133 (home-page "https://github.com/ruby-syntax-tree/syntax_tree")
15134 (license license:expat)))
15135
15136(define-public ruby-stringio
15137 (package
15138 (name "ruby-stringio")
15139 (version "3.1.0")
15140 (source (origin
15141 (method git-fetch)
15142 (uri (git-reference
15143 (url "https://github.com/ruby/stringio")
15144 (commit (string-append "v" version))))
15145 (file-name (git-file-name name version))
15146 (sha256
15147 (base32
15148 "1jgi2w5y0z0x9mfapr2pdlag4wvn03fpf5kbai8bscyh8nn79yka"))))
15149 (build-system ruby-build-system)
15150 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
15151 (synopsis "Pseudo `IO` class from and to `String`")
15152 (description "Pseudo `IO` class from and to `String`.")
15153 (home-page "https://github.com/ruby/stringio")
15154 (license license:bsd-2)))
15155
15156(define-public ruby-stream
15157 (package
15158 (name "ruby-stream")
15159 (version "0.5.5")
15160 (source (origin
15161 (method url-fetch)
15162 (uri (rubygems-uri "stream" version))
15163 (sha256
15164 (base32
15165 "016m9v81vpj14d8g5ins91zc4pzl7vf5f1gxl7jhfsfy601k7cv2"))))
15166 (build-system ruby-build-system)
15167 (arguments
15168 '(#:phases
15169 (modify-phases %standard-phases
15170 (add-before 'check 'remove-version-constraints
15171 (lambda _
15172 (delete-file "Gemfile.lock"))))))
15173 (native-inputs (list bundler ruby-stringio ruby-webrick ruby-yard))
15174 (synopsis "Interface for external iterators")
15175 (description "Module Stream defines an interface for external iterators.")
15176 (home-page "https://github.com/monora/stream")
15177 (license license:bsd-2)))
15178
15179(define sorbet-version "0.5.10610.20230106174520-1fa668010")
15180
15181(define sorbet-monorepo
15182 (origin
15183 (method git-fetch)
15184 (uri (git-reference
15185 (url "https://github.com/sorbet/sorbet")
15186 (commit sorbet-version)))
15187 (file-name (string-append "sorbet-" sorbet-version "-checkout"))
15188 (sha256
15189 (base32
15190 "0f21dl06alxwn6xgdxyrkd58plmmsv04z2bcls9ld4cfzsrs5537"))))
15191
15192(define (make-sorbet-gem-source gem)
15193 "Return the source of GEM, a sub-directory."
15194 (computed-file
15195 (string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout")
15196 (with-imported-modules (source-module-closure '((guix build utils)))
15197 #~(begin
15198 (use-modules (guix build utils))
15199 (copy-recursively (string-append #$sorbet-monorepo
15200 "/gems/sorbet-" #$gem)
15201 #$output)))))
15202
15203(define-public ruby-sorbet-runtime
15204 (package
15205 (name "ruby-sorbet-runtime")
15206 (version sorbet-version)
15207 (source (make-sorbet-gem-source "runtime"))
15208 (build-system ruby-build-system)
15209 ;; 25 out of 841 tests currently fail, seemingly due to invalid
15210 ;; assumptions about file names in the build environment (see:
15211 ;; https://github.com/sorbet/sorbet/issues/6650).
15212 (arguments (list #:tests? #f))
15213 (native-inputs
15214 (list ruby-minitest
15215 ruby-mocha
15216 ruby-rubocop
15217 ruby-rubocop-performance
15218 ruby-concurrent-ruby
15219 ruby-pry
15220 ruby-parser
15221 ruby-subprocess))
15222 (synopsis "Runtime type checking component for Sorbet")
15223 (description "Sorbet's runtime type checking component. Sorbet is a
15224powerful type checker for Ruby.")
15225 (home-page "https://sorbet.org")
15226 (license license:asl2.0)))
15227
15228(define-public ruby-mustache
15229 (package
15230 (name "ruby-mustache")
15231 (version "1.1.1")
15232 (source
15233 (origin
15234 (method url-fetch)
15235 (uri (rubygems-uri "mustache" version))
15236 (sha256
15237 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
15238 (build-system ruby-build-system)
15239 (native-inputs
15240 `(("ruby-simplecov" ,ruby-simplecov)
15241 ("test-patch"
15242 ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch"))))
15243 (arguments
15244 `(#:phases
15245 (modify-phases %standard-phases
15246 (add-after 'unpack 'patch-tests
15247 (lambda* (#:key inputs #:allow-other-keys)
15248 (invoke "patch" "-p1" "--batch" "-i"
15249 (assoc-ref inputs "test-patch")))))))
15250 (synopsis "Framework-agnostic way to render logic-free views")
15251 (description
15252 "Mustache is a framework-agnostic way to render logic-free views.
15253Think of Mustache as a replacement for your views. Instead of views
15254consisting of ERB or HAML with random helpers and arbitrary logic,
15255your views are broken into two parts: a Ruby class and an HTML
15256template.")
15257 (home-page "https://github.com/mustache/mustache")
15258 (license license:expat)))
15259
15260(define-public ruby-mustermann
15261 (package
15262 (name "ruby-mustermann")
15263 (version "3.0.0")
15264 (source
15265 (origin
15266 (method url-fetch)
15267 (uri (rubygems-uri "mustermann" version))
15268 (sha256
15269 (base32
15270 "0rwbq20s2gdh8dljjsgj5s6wqqfmnbclhvv2c2608brv7jm6jdbd"))))
15271 (build-system ruby-build-system)
15272 (arguments
15273 ;; No tests.
15274 '(#:tests? #f))
15275 (synopsis "Library implementing patterns that behave like regular expressions")
15276 (description "Given a string pattern, Mustermann will turn it into an
15277object that behaves like a regular expression and has comparable performance
15278characteristics.")
15279 (home-page "https://github.com/sinatra/mustermann")
15280 (license license:expat)))
15281
15282(define-public ruby-mutex-m
15283 (package
15284 (name "ruby-mutex-m")
15285 (version "0.3.0")
15286 (source
15287 (origin
15288 (method git-fetch)
15289 (uri (git-reference
15290 (url "https://github.com/ruby/mutex_m")
15291 (commit (string-append "v" version))))
15292 (file-name (git-file-name name version))
15293 (sha256
15294 (base32 "162khhcahd6bn4r63driw23745lyg7h5dx5hli3clxbrpa1c0qvx"))))
15295 (build-system ruby-build-system)
15296 (synopsis "Mixin to extend objects to be handled like a Mutex.")
15297 (description
15298 "When @code{mutex_m} is required, any object that extends or includes
15299@code{Mutex_m} will be treated like a Mutex.")
15300 (home-page "https://github.com/ruby/mutex_m")
15301 (license license:bsd-2)))
15302
15303(define-public ruby-prettier-print
15304 (package
15305 (name "ruby-prettier-print")
15306 (version "1.2.1")
15307 (source (origin
15308 (method git-fetch) ;for tests
15309 (uri (git-reference
15310 (url "https://github.com/ruby-syntax-tree/prettier_print")
15311 (commit (string-append "v" version))))
15312 (file-name (git-file-name name version))
15313 (sha256
15314 (base32
15315 "00cg40jc0il1hpsrpsrqwhsxmx7day9lxp1ksrm08zxzsrz9ykqz"))))
15316 (build-system ruby-build-system)
15317 (native-inputs (list ruby-simplecov))
15318 (synopsis "Compatible and featureful implementation of @code{prettyprint}")
15319 (description "This package provides a drop-in replacement for the
15320@code{prettyprint} gem, with more functionality.")
15321 (home-page "https://github.com/ruby-syntax-tree/prettier_print")
15322 (license license:expat)))
15323
15324(define-public ruby-html-proofer
15325 (package
15326 (name "ruby-html-proofer")
15327 (version "5.0.3")
15328 (source
15329 (origin
15330 (method git-fetch)
15331 (uri (git-reference
15332 (url "https://github.com/gjtorikian/html-proofer")
15333 (commit (string-append "v" version))))
15334 (file-name (git-file-name name version))
15335 (sha256
15336 (base32
15337 "01ksss3ikppc45z2q33bx8bb9785bqlp1rdqascaqg9mhs392adk"))))
15338 (build-system ruby-build-system)
15339 (arguments
15340 (list
15341 ;; Tests require vcr, which is under the Hippocratic license, which is
15342 ;; not a free software license (see:
15343 ;; https://www.gnu.org/licenses/license-list.html#hippocratic).
15344 #:tests? #f
15345 #:phases
15346 #~(modify-phases %standard-phases
15347 (add-after 'extract-gemspec 'relax-requirements
15348 (lambda _
15349 (substitute* "html-proofer.gemspec"
15350 (("required_ruby_version = \\[\">= 3.1\"")
15351 "required_ruby_version = [\">= 2.6\""))))
15352 (replace 'replace-git-ls-files
15353 (lambda _
15354 ;; The html-proofer.gemspec file contains 'all_files = %x(git
15355 ;; ls-files -z).split("\x0")', but the original phase matches on
15356 ;; `git ls-files -z`.
15357 ;; TODO: Improve ruby-build-system patterns on core-updates.
15358 (substitute* "html-proofer.gemspec"
15359 (("git ls-files -z")
15360 "find . -type f -not -regex '.*\\.gem$' -print0 \
15361| sort -z | cut -zc3-")))))))
15362 (propagated-inputs
15363 (list ruby-addressable
15364 ruby-mercenary
15365 ruby-nokogiri
15366 ruby-parallel
15367 ruby-rainbow
15368 ruby-typhoeus
15369 ruby-yell))
15370 (synopsis "Test your rendered HTML files to make sure they're accurate")
15371 (description
15372 "HTMLProofer is a set of tests to validate your HTML output. These
15373tests check if your image references are legitimate, if they have alt tags,
15374if your internal links are working, and so on. It's intended to be an
15375all-in-one checker for your output.")
15376 (home-page "https://github.com/gjtorikian/html-proofer")
15377 (license license:expat)))
15378
15379(define-public ruby-htmlentities
15380 (package
15381 (name "ruby-htmlentities")
15382 (version "4.3.4")
15383 (source
15384 (origin
15385 (method url-fetch)
15386 (uri (rubygems-uri "htmlentities" version))
15387 (sha256
15388 (base32
15389 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
15390 (build-system ruby-build-system)
15391 (arguments
15392 `(#:phases
15393 (modify-phases %standard-phases
15394 (replace 'check
15395 (lambda _
15396 (map (lambda (file)
15397 (invoke "ruby" "-Itest" file))
15398 (find-files "./test" ".*_test\\.rb")))))))
15399 (synopsis "Encode and decode (X)HTML entities")
15400 (description
15401 "This package provides a module for encoding and decoding (X)HTML
15402entities.")
15403 (home-page "https://github.com/threedaymonk/htmlentities")
15404 (license license:expat)))
15405
15406;;; FIXME: Currently broken with rack 3, awaiting the merge for
15407;;; https://github.com/sinatra/sinatra/pull/1857 and a new release.
15408(define-public ruby-sinatra
15409 (package
15410 (name "ruby-sinatra")
15411 (version "3.0.5")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (rubygems-uri "sinatra" version))
15416 (sha256
15417 (base32
15418 "1ryfja9yd3fq8n1p5yi3qnd0pjk7bkycmxxmbb1bj0axlr1pdv20"))))
15419 (build-system ruby-build-system)
15420 (propagated-inputs
15421 (list ruby-mustermann ruby-rack ruby-rack-protection ruby-tilt/minimal))
15422 (synopsis "DSL for quick web applications creation in Ruby")
15423 (description
15424 "Sinatra is a DSL for quickly creating web applications in Ruby with
15425minimal effort.")
15426 (home-page "https://sinatrarb.com/")
15427 (license license:expat)))
15428
15429(define-public ruby-timeout
15430 (package
15431 (name "ruby-timeout")
15432 (version "0.6.1")
15433 (source (origin
15434 (method git-fetch) ;for tests
15435 (uri (git-reference
15436 (url "https://github.com/ruby/timeout")
15437 (commit (string-append "v" version))))
15438 (file-name (git-file-name name version))
15439 (sha256
15440 (base32
15441 "1901x2cabiiiq9awz636aifsrxnx8k4wbgpaq0dz6486pf1jv2sl"))))
15442 (build-system ruby-build-system)
15443 (native-inputs (list ruby-test-unit-ruby-core))
15444 (synopsis "Timeout library for Ruby")
15445 (description "Timeout provides a way to auto-terminate a potentially
15446long-running operation if it hasn't finished in a fixed amount of time.")
15447 (home-page "https://github.com/ruby/timeout")
15448 (license (list license:bsd-2 license:ruby))))
15449
15450(define-public ruby-thin
15451 (package
15452 (name "ruby-thin")
15453 (version "1.7.2")
15454 (source
15455 (origin
15456 (method url-fetch)
15457 (uri (rubygems-uri "thin" version))
15458 (sha256
15459 (base32
15460 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
15461 (build-system ruby-build-system)
15462 (arguments
15463 '(#:tests? #f
15464 #:gem-flags '("--" "--with-cflags=-Wno-error=implicit-function-declaration")))
15465 (propagated-inputs
15466 (list ruby-daemons ruby-eventmachine ruby-rack))
15467 (synopsis "Thin and fast web server for Ruby")
15468 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
15469@itemize
15470@item the Mongrel parser,
15471@item Event Machine, a network I/O library with high scalability, performance
15472and stability,
15473@item Rack, a minimal interface between webservers and Ruby frameworks.
15474@end itemize\n")
15475 (home-page "https://github.com/macournoyer/thin")
15476 (license license:ruby)))
15477
15478(define-public ruby-truthy
15479 (package
15480 (name "ruby-truthy")
15481 (version "1.0.0")
15482 (source (origin
15483 (method url-fetch)
15484 (uri (rubygems-uri "truthy" version))
15485 (sha256
15486 (base32
15487 "19silgd65j3qwfk5w891p9wcmzdmi9ddm2kg5zbvvqn2h9lkfzmd"))))
15488 (build-system ruby-build-system)
15489 (arguments (list #:phases #~(modify-phases %standard-phases
15490 (replace 'check
15491 (lambda* (#:key tests? #:allow-other-keys)
15492 (when tests?
15493 (substitute* "spec/spec_helper.rb"
15494 (("require 'spec'")
15495 "require 'rspec'"))
15496 (invoke "rspec")))))))
15497 (native-inputs (list ruby-rspec))
15498 (synopsis "Object truthiness-related Ruby library")
15499 (description "This library makes it easier to discover the truth values of
15500various Ruby objects.")
15501 (home-page "https://github.com/ymendel/truthy")
15502 (license license:expat)))
15503
15504(define-public ruby-tsort
15505 (package
15506 (name "ruby-tsort")
15507 (version "0.2.0")
15508 (source
15509 (origin
15510 (method url-fetch)
15511 (uri (rubygems-uri "tsort" version))
15512 (sha256
15513 (base32 "17q8h020dw73wjmql50lqw5ddsngg67jfw8ncjv476l5ys9sfl4n"))))
15514 (build-system ruby-build-system)
15515 (synopsis "Topological sorting library for Ruby")
15516 (description
15517 "This RubyGem implements topological sorting using Tarjan's algorithm
15518for strongly connected components. It is designed to be able to be
15519used with any object which can be interpreted as a directed graph.")
15520 (home-page "https://github.com/ruby/tsort")
15521 (license (list license:ruby license:bsd-2))))
15522
15523(define-public ruby-skinny
15524 (package
15525 (name "ruby-skinny")
15526 (version "0.2.4")
15527 (source
15528 (origin
15529 (method url-fetch)
15530 (uri (rubygems-uri "skinny" version))
15531 (sha256
15532 (base32
15533 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
15534 (build-system ruby-build-system)
15535 (arguments
15536 '(#:tests? #f ; No included tests
15537 #:phases
15538 (modify-phases %standard-phases
15539 (add-before 'build 'patch-gemspec
15540 (lambda _
15541 (substitute* ".gemspec"
15542 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
15543 "<eventmachine>, [\">= 1.0.0\"")
15544 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, [")))))))
15545 (propagated-inputs
15546 (list ruby-eventmachine ruby-thin))
15547 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
15548 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
15549the Thin library.")
15550 (home-page "https://github.com/sj26/skinny")
15551 (license license:expat)))
15552
15553(define-public ruby-sys-filesystem
15554 (package
15555 (name "ruby-sys-filesystem")
15556 (version "1.3.4")
15557 (source (origin
15558 (method url-fetch)
15559 (uri (rubygems-uri "sys-filesystem" version))
15560 (sha256
15561 (base32
15562 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
15563 (build-system ruby-build-system)
15564 (arguments
15565 '(#:phases (modify-phases %standard-phases
15566 (add-before 'check 'set-HOME
15567 (lambda _
15568 ;; Some tests attempt to stat $HOME. Let them.
15569 (setenv "HOME" "/tmp"))))))
15570 (propagated-inputs
15571 (list ruby-ffi))
15572 (native-inputs
15573 (list ruby-mkmf-lite))
15574 (synopsis "Gather file system information")
15575 (description
15576 "The @code{sys-filesystem} library provides a cross-platform interface
15577for gathering file system information, such as disk space and mount points.")
15578 (home-page "https://github.com/djberg96/sys-filesystem")
15579 (license license:asl2.0)))
15580
15581(define-public mailcatcher
15582 (package
15583 (name "mailcatcher")
15584 (version "0.7.1")
15585 (source
15586 (origin
15587 (method url-fetch)
15588 (uri (rubygems-uri "mailcatcher" version))
15589 (sha256
15590 (base32
15591 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
15592 (build-system ruby-build-system)
15593 (arguments
15594 ;; Tests require web/assets which is not included in the output. We
15595 ;; might be able to fix this by adding the Git repository to the GEM_PATH
15596 ;; of the tests. See ruby-mysql2.
15597 '(#:tests? #f
15598 #:phases
15599 (modify-phases %standard-phases
15600 (add-before 'build 'patch-gemspec
15601 (lambda _
15602 (substitute* ".gemspec"
15603 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
15604 "<eventmachine>, [\">= 1.0.9.1")
15605 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
15606 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
15607 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))))
15608 (add-before 'build 'loosen-dependency-contraint
15609 (lambda _
15610 (substitute* "lib/mail_catcher.rb"
15611 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
15612 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
15613 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
15614 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\"")))))))
15615 (inputs
15616 (list ruby-eventmachine
15617 ruby-mail
15618 ruby-rack
15619 ruby-sinatra
15620 ruby-skinny
15621 ruby-sqlite3
15622 ruby-thin))
15623 (synopsis "SMTP server which catches messages to display them a browser")
15624 (description
15625 "MailCatcher runs a super simple SMTP server which catches any message
15626sent to it to display in a web interface. Run mailcatcher, set your favourite
15627app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
15628then check out http://127.0.0.1:1080 to see the mail.")
15629 (home-page "https://mailcatcher.me")
15630 (license license:expat)))
15631
15632(define-public ruby-backport
15633 (package
15634 (name "ruby-backport")
15635 (version "1.1.2")
15636 (source
15637 (origin
15638 ;; The gem does not include test code, so fetch from the Git repository.
15639 (method git-fetch)
15640 (uri (git-reference
15641 (url "https://github.com/castwide/backport")
15642 (commit (string-append "v" version))))
15643 (file-name (git-file-name name version))
15644 (sha256
15645 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
15646 (build-system ruby-build-system)
15647 (arguments
15648 `(#:test-target "spec"))
15649 (native-inputs
15650 (list bundler ruby-rspec))
15651 (inputs
15652 (list ruby-simplecov))
15653 (synopsis "Pure Ruby library for event-driven IO")
15654 (description
15655 "This package provides a pure Ruby library for event-driven IO.")
15656 (home-page "https://github.com/castwide/backport")
15657 (license license:expat)))
15658
15659(define-public ruby-json-schema
15660 (package
15661 (name "ruby-json-schema")
15662 (version "2.8.1")
15663 (source
15664 (origin
15665 (method url-fetch)
15666 (uri (rubygems-uri "json-schema" version))
15667 (sha256
15668 (base32
15669 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
15670 (build-system ruby-build-system)
15671 (arguments
15672 `(#:tests? #f ; no tests
15673 #:phases
15674 (modify-phases %standard-phases
15675 (replace 'build
15676 (lambda _
15677 (invoke "gem" "build" ".gemspec"))))))
15678 (propagated-inputs
15679 (list ruby-addressable))
15680 (synopsis "Ruby JSON Schema Validator")
15681 (description "This library provides Ruby with an interface for validating
15682JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
15683support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
15684is also included.")
15685 (home-page "https://github.com/ruby-json-schema/json-schema")
15686 (license license:expat)))
15687
15688(define-public swagger-diff
15689 (package
15690 (name "swagger-diff")
15691 (version "2.0.0")
15692 (source
15693 (origin
15694 (method url-fetch)
15695 (uri (rubygems-uri "swagger-diff" version))
15696 (sha256
15697 (base32
15698 "18kbrijkafs3vfsbaqz0cqfj7jrz3aj8xr4fgn5if63wlximybv2"))))
15699 (build-system ruby-build-system)
15700 (arguments
15701 (list
15702 #:test-target "spec"
15703 #:phases
15704 #~(modify-phases %standard-phases
15705 ;; Don't run or require rubocop, the code linting tool, as this is a
15706 ;; bit unnecessary.
15707 (add-after 'unpack 'dont-run-rubocop
15708 (lambda _
15709 (substitute* "Rakefile"
15710 ((".*rubocop.*") "")
15711 ((".*RuboCop.*") "")))))))
15712 (propagated-inputs
15713 (list ruby-json-schema))
15714 (native-inputs
15715 (list bundler ruby-rspec-core ruby-rspec-expectations))
15716 (synopsis
15717 "Compare Open API Initiative specification files")
15718 (description
15719 "Swagger::Diff is a utility for comparing two different Open API
15720Initiative (OAI) specifications (formerly known as Swagger specifications).
15721It is intended to determine whether a newer API specification is
15722backwards-compatible with an older API specification.")
15723 (home-page "https://github.com/civisanalytics/swagger-diff")
15724 (license license:bsd-3)))
15725
15726(define-public ruby-reverse-markdown
15727 (package
15728 (name "ruby-reverse-markdown")
15729 (version "1.1.0")
15730 (source
15731 (origin
15732 (method url-fetch)
15733 (uri (rubygems-uri "reverse_markdown" version))
15734 (sha256
15735 (base32
15736 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
15737 (build-system ruby-build-system)
15738 (propagated-inputs
15739 (list ruby-nokogiri))
15740 (native-inputs
15741 (list bundler ruby-rspec ruby-kramdown ruby-simplecov))
15742 (arguments
15743 `(#:phases
15744 (modify-phases %standard-phases
15745 (replace 'check
15746 (lambda* (#:key tests? #:allow-other-keys)
15747 (when tests?
15748 (invoke "rspec")))))))
15749 (synopsis "Convert HTML into Markdown")
15750 (description
15751 "This Ruby module allows you to map simple HTML back into
15752Markdown---e.g., if you want to import existing HTML data in your
15753application.")
15754 (home-page "https://github.com/xijo/reverse_markdown")
15755 (license license:wtfpl2)))
15756
15757(define-public ruby-solargraph
15758 (package
15759 (name "ruby-solargraph")
15760 (version "0.40.3")
15761 (source
15762 (origin
15763 (method url-fetch)
15764 (uri (rubygems-uri "solargraph" version))
15765 (sha256
15766 (base32
15767 "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
15768 (build-system ruby-build-system)
15769 (propagated-inputs
15770 (list ruby-backport
15771 bundler
15772 ruby-benchmark
15773 ruby-e2mmap
15774 ruby-jaro-winkler
15775 ruby-kramdown
15776 ruby-kramdown-parser-gfm
15777 ruby-maruku
15778 ruby-nokogiri
15779 ruby-parser
15780 ruby-reverse-markdown
15781 ruby-rubocop
15782 ruby-thor
15783 ruby-tilt
15784 ruby-yard))
15785 (native-inputs
15786 (list ruby-rspec ruby-pry ruby-simplecov ruby-webmock))
15787 ;; FIXME: can't figure out how to run the tests properly:
15788
15789 ;; An error occurred while loading spec_helper.
15790 ;; Failure/Error: return gem_original_require(path)
15791 ;; LoadError:
15792 ;; cannot load such file -- spec_helper
15793 (arguments
15794 '(#:tests? #f
15795 #:phases
15796 (modify-phases %standard-phases
15797 (replace 'check
15798 (lambda* (#:key tests? #:allow-other-keys)
15799 (when tests?
15800 (invoke "rspec")))))))
15801 (synopsis
15802 "IDE tools for code completion, inline documentation, and static analysis")
15803 (description
15804 "Solargraph provides a comprehensive suite of tools for Ruby
15805programming: intellisense, diagnostics, inline documentation, and type
15806checking.")
15807 (home-page "https://solargraph.org/")
15808 (license license:expat)))
15809
15810(define-public ruby-wayback-machine-downloader
15811 (package
15812 (name "ruby-wayback-machine-downloader")
15813 (version "2.2.1")
15814 (source
15815 (origin
15816 (method url-fetch)
15817 (uri (rubygems-uri
15818 "wayback_machine_downloader"
15819 version))
15820 (sha256
15821 (base32
15822 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
15823 (build-system ruby-build-system)
15824 (arguments
15825 '(#:tests? #f)) ; no tests
15826 (synopsis "Download archived websites from the Wayback Machine")
15827 (description
15828 "Wayback Machine Downloader is a command line tool for downloading
15829websites from the Internet Archive's Wayback Machine (archive.org).
15830It allows fine grained control over what to download by specifying
15831which snapshots to consider and what files to include.")
15832 (home-page
15833 "https://github.com/hartator/wayback-machine-downloader")
15834 (license license:expat)))
15835
15836(define-public ruby-zeitwerk
15837 (package
15838 (name "ruby-zeitwerk")
15839 (version "2.7.1")
15840 (source
15841 (origin
15842 (method git-fetch) ;for tests
15843 (uri (git-reference
15844 (url "https://github.com/fxn/zeitwerk")
15845 (commit (string-append "v" version))))
15846 (file-name (git-file-name name version))
15847 (sha256
15848 (base32
15849 "19qmcdpbh4bl878zd1w19064yjkpb8sxaydcasqfa7p8cfg3hnsr"))))
15850 (build-system ruby-build-system)
15851 (native-inputs
15852 (list ruby-minitest
15853 ruby-minitest-focus
15854 ruby-minitest-proveit
15855 ruby-minitest-reporters
15856 ruby-warning))
15857 (synopsis "Efficient and thread-safe code loader for Ruby")
15858 (description
15859 "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
15860and application may have their own independent autoloader, with its own
15861configuration, inflector, and logger. Supports autoloading, reloading, and
15862eager loading.")
15863 (home-page "https://github.com/fxn/zeitwerk")
15864 (license license:expat)))
15865
15866(define-public ruby-warning
15867 (package
15868 (name "ruby-warning")
15869 (version "1.5.0")
15870 (source
15871 (origin
15872 (method url-fetch)
15873 (uri (rubygems-uri "warning" version))
15874 (sha256
15875 (base32 "0lwcf7fsz1sda1fdbqq1i4q9kzg4f5vwrzgfg1vpa1hcxagw84hg"))))
15876 (build-system ruby-build-system)
15877 (arguments '(#:tests? #f)) ; No tests bundled.
15878 (synopsis "Custom processing for warnings")
15879 (description
15880 "This package adds custom processing for warnings for Ruby, including the
15881ability to ignore specific warning messages, ignore warnings in specific
15882files/directories, include backtraces with warnings, treat warnings as errors,
15883deduplicate warnings, and add custom handling for all warnings in specific
15884files/directories.")
15885 (home-page "https://github.com/jeremyevans/ruby-warning")
15886 (license license:expat)))
15887
15888(define-public ruby-wwtd
15889 (package
15890 (name "ruby-wwtd")
15891 (version "1.4.1")
15892 (home-page "https://github.com/grosser/wwtd")
15893 (source (origin
15894 (method git-fetch)
15895 (uri (git-reference
15896 (url home-page)
15897 (commit (string-append "v" version))))
15898 (file-name (git-file-name name version))
15899 (sha256
15900 (base32
15901 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
15902 (modules '((guix build utils)))
15903 (snippet
15904 '(begin
15905 ;; Remove bundled library.
15906 (delete-file "spec/rake-12.3.0.gem")))))
15907 (build-system ruby-build-system)
15908 (arguments
15909 '(;; XXX: Tests need multiple versions of ruby, wants to run
15910 ;; `bundle install`, etc.
15911 #:tests? #f
15912 #:phases (modify-phases %standard-phases
15913 (replace 'replace-git-ls-files
15914 (lambda _
15915 (substitute* "wwtd.gemspec"
15916 (("git ls-files lib/ bin/`")
15917 "find lib/ bin/ -type f |sort`"))))
15918 (add-before 'check 'remove-version-constraints
15919 (lambda _
15920 (delete-file "Gemfile.lock")))
15921 (replace 'check
15922 (lambda* (#:key tests? #:allow-other-keys)
15923 (if tests?
15924 (invoke "rspec" "spec/")
15925 (format #t "test suite not run~%")))))))
15926 (native-inputs
15927 (list ruby-bump ruby-rspec))
15928 (synopsis "Run @file{.travis.yml} files locally")
15929 (description
15930 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
15931defined in @file{.travis.yml} on your local machine, using @code{rvm},
15932@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
15933 (license license:expat)))
15934
15935(define-public ruby-rugged
15936 (package
15937 (name "ruby-rugged")
15938 (version "1.9.0")
15939 (source (origin
15940 (method git-fetch)
15941 (uri (git-reference
15942 (url "https://github.com/libgit2/rugged")
15943 (commit (string-append "v" version))))
15944 (file-name (git-file-name name version))
15945 (sha256
15946 (base32
15947 "0ixylc4hv4iqrkhzacq8nar70da8pml26nf9vmgys1kp2j7zc35g"))))
15948 (build-system ruby-build-system)
15949 (arguments
15950 (list #:gem-flags
15951 #~(list "--" "--use-system-libraries")
15952 #:phases
15953 #~(modify-phases %standard-phases
15954 (add-after 'unpack 'adjust-extconf.rb
15955 (lambda _
15956 (delete-file-recursively "vendor")
15957 ;; Neither using --with-git2-dir=$prefix nor providing
15958 ;; pkg-config allows locating the libgit2 prefix (see:
15959 ;; https://github.com/libgit2/rugged/issues/955).
15960 (substitute* "ext/rugged/extconf.rb"
15961 (("LIBGIT2_VER") "LIBGIT2_VERSION")
15962 (("LIBGIT2_DIR = File.join.*'vendor', 'libgit2'.*")
15963 (format #f "LIBGIT2_DIR = ~s~%"
15964 #$(this-package-input "libgit2"))))))
15965 (delete 'check) ;moved after the install phase
15966 (add-after 'install 'check
15967 (assoc-ref %standard-phases 'check))
15968 (add-before 'check 'set-GEM_PATH
15969 (lambda _
15970 (setenv "GEM_PATH" (string-append
15971 (getenv "GEM_PATH") ":"
15972 #$output "/lib/ruby/vendor_ruby"))))
15973 (add-before 'check 'disable-problematic-tests
15974 (lambda _
15975 (with-directory-excursion "test"
15976 (for-each delete-file
15977 ;; These tests require an actual libgit2 git
15978 ;; repository checkout.
15979 '("blame_test.rb"
15980 "blob_test.rb"
15981 "cherrypick_test.rb"
15982 "commit_test.rb"
15983 "config_test.rb"
15984 "diff_test.rb"
15985 "index_test.rb"
15986 "merge_test.rb"
15987 "note_test.rb"
15988 "object_test.rb"
15989 "patch_test.rb"
15990 "rebase_test.rb"
15991 "reference_test.rb"
15992 "remote_test.rb"
15993 "repo_apply_test.rb"
15994 "repo_ignore_test.rb"
15995 "repo_pack_test.rb"
15996 "repo_reset_test.rb"
15997 "repo_test.rb"
15998 "revert_test.rb"
15999 "settings_test.rb"
16000 "status_test.rb"
16001 "submodule_test.rb"
16002 "tag_test.rb"
16003 "tree_test.rb"
16004 "walker_test.rb"))
16005 (delete-file-recursively "online")))))))
16006 (native-inputs (list git-minimal/pinned ruby-rake-compiler))
16007 (inputs (list libgit2))
16008 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
16009 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
16010you the speed and portability of libgit2 with the beauty of the Ruby
16011language.")
16012 (home-page "https://www.rubydoc.info/gems/rugged")
16013 (license license:expat)))
16014
16015(define-public ruby-yell
16016 (package
16017 (name "ruby-yell")
16018 (version "2.2.2")
16019 (source
16020 (origin
16021 (method url-fetch)
16022 (uri (rubygems-uri "yell" version))
16023 (sha256
16024 (base32
16025 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
16026 (build-system ruby-build-system)
16027 (arguments
16028 `(#:phases
16029 (modify-phases %standard-phases
16030 (replace 'check
16031 (lambda _
16032 (invoke "rake" "examples")))))) ; there is no test target.
16033 (synopsis
16034 "Extensible logging library for Ruby")
16035 (description
16036 "Yell is a comprehensive logging replacement for Ruby. It defines
16037multiple adapters, various log level combinations and message formatting
16038options.")
16039 (home-page "https://github.com/rudionrails/yell")
16040 (license license:expat)))
16041
16042(define-public ruby-e2mmap
16043 (package
16044 (name "ruby-e2mmap")
16045 (version "0.1.0")
16046 (source
16047 (origin
16048 (method url-fetch)
16049 (uri (rubygems-uri "e2mmap" version))
16050 (sha256
16051 (base32
16052 "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
16053 (build-system ruby-build-system)
16054 (arguments
16055 `(#:tests? #f)) ;; There is a rakefile but no tests
16056 (synopsis
16057 "Module for defining custom exceptions with specific messages")
16058 (description
16059 "Exception2MessageMapper (e2mmap) is a helper module for easily defining
16060exceptions with predefined messages.")
16061 (home-page "https://github.com/ruby/e2mmap")
16062 (license license:bsd-2)))
16063
16064(define-public ruby-benchmark
16065 (package
16066 (name "ruby-benchmark")
16067 (version "0.4.0")
16068 (source
16069 (origin
16070 (method url-fetch)
16071 (uri (rubygems-uri "benchmark" version))
16072 (sha256
16073 (base32
16074 "0jl71qcgamm96dzyqk695j24qszhcc7liw74qc83fpjljp2gh4hg"))))
16075 (build-system ruby-build-system)
16076 (synopsis "Performance benchmarking library")
16077 (description "This package provides methods for benchmarking Ruby code,
16078giving detailed reports on the time taken for each task.")
16079 (home-page "https://github.com/ruby/benchmark")
16080 (license license:bsd-2)))
16081
16082(define-public ruby-jekyll-feed
16083 (package
16084 (name "ruby-jekyll-feed")
16085 (version "0.15.1")
16086 (source
16087 (origin
16088 (method url-fetch)
16089 (uri (rubygems-uri "jekyll-feed" version))
16090 (sha256
16091 (base32
16092 "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
16093 (build-system ruby-build-system)
16094 (arguments
16095 `(#:tests? #false)) ;there are none
16096 (propagated-inputs
16097 (list jekyll))
16098 (synopsis
16099 "Jekyll plugin to generate an Atom feed of your Jekyll posts")
16100 (description
16101 "This package provides a Jekyll plugin to generate an Atom feed
16102of your Jekyll posts.")
16103 (home-page
16104 "https://github.com/jekyll/jekyll-feed")
16105 (license license:expat)))
16106
16107(define-public ruby-jekyll-sitemap
16108 (package
16109 (name "ruby-jekyll-sitemap")
16110 (version "1.4.0")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (rubygems-uri "jekyll-sitemap" version))
16115 (sha256
16116 (base32
16117 "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
16118 (build-system ruby-build-system)
16119 (arguments
16120 `(#:tests? #false)) ;there are none
16121 (propagated-inputs
16122 (list jekyll))
16123 (synopsis
16124 "Automatically generate a sitemap.xml for your Jekyll site")
16125 (description
16126 "This package provides a Jekyll plugin to silently generate
16127a sitemaps.org compliant sitemap for your Jekyll site.")
16128 (home-page
16129 "https://github.com/jekyll/jekyll-sitemap")
16130 (license license:expat)))
16131
16132(define-public ruby-jekyll-seo-tag
16133 (package
16134 (name "ruby-jekyll-seo-tag")
16135 (version "2.7.1")
16136 (source
16137 (origin
16138 (method url-fetch)
16139 (uri (rubygems-uri "jekyll-seo-tag" version))
16140 (sha256
16141 (base32
16142 "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
16143 (build-system ruby-build-system)
16144 (arguments
16145 `(#:tests? #false))
16146 (propagated-inputs
16147 (list jekyll))
16148 (synopsis
16149 "Jekyll plugin to add metadata tags for search engines and social networks")
16150 (description
16151 "This package provides a Jekyll plugin to add metadata tags for search engines
16152and social networks to better index and display your site's content.")
16153 (home-page
16154 "https://github.com/jekyll/jekyll-seo-tag")
16155 (license license:expat)))
16156
16157(define-public ruby-taskjuggler
16158 (package
16159 (name "ruby-taskjuggler")
16160 (version "3.8.1")
16161 (source
16162 (origin
16163 (method url-fetch)
16164 (uri (rubygems-uri "taskjuggler" version))
16165 (sha256
16166 (base32
16167 "16d5vgz54all8vl3haqy6j69plny3np4kc3wq7wy3xa3i0h7v60z"))))
16168 (build-system ruby-build-system)
16169 (native-inputs (list ruby-rspec tzdata-for-tests))
16170 (propagated-inputs
16171 (list ruby-mail ruby-term-ansicolor))
16172 (arguments
16173 '(#:phases (modify-phases %standard-phases
16174 (replace 'replace-git-ls-files
16175 (lambda _
16176 (substitute* "tasks/rdoc.rake"
16177 (("`git ls-files -- lib`")
16178 "`find lib/ -type f |sort`"))))
16179 (add-before 'check 'tzdir-setup
16180 (lambda* (#:key inputs #:allow-other-keys)
16181 (setenv "TZDIR"
16182 (string-append (assoc-ref inputs "tzdata")
16183 "/share/zoneinfo"))))
16184 (add-before 'check 'delete-test-BatchProcessor
16185 ;; test_BatchProcessor fails with exception:
16186 ;; run> terminated with exception (report_on_exception is true)
16187 (lambda _
16188 (delete-file "test/test_BatchProcessor.rb"))))))
16189 (synopsis
16190 "Project management command line tool with a domain specific language")
16191 (description
16192 "TaskJuggler (tj3) is a project management tool for project planning and
16193tracking using a domain specific language; projects are plain text files
16194written using your favourite text editor. It includes reporting in HTML, CSV
16195or iCalendar format and an email based status tracking system to send and
16196receive time sheets from collaborators.
16197
16198It covers the complete spectrum of project management tasks from the first
16199idea to the completion of the project. It assists you during project scoping,
16200resource assignment, cost and revenue planning, risk and communication
16201management, status tracking and reporting.")
16202 (home-page "https://taskjuggler.org")
16203 (license license:gpl2)))
16204
16205(define-public ruby-cmath
16206 (package
16207 (name "ruby-cmath")
16208 (version "1.0.0")
16209 (source
16210 (origin
16211 (method url-fetch)
16212 (uri (rubygems-uri "cmath" version))
16213 (sha256
16214 (base32
16215 "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
16216 (build-system ruby-build-system)
16217 (arguments
16218 `(#:tests? #false))
16219 (native-inputs
16220 (list bundler ruby-rake-compiler))
16221 (synopsis "Trigonometric functions for complex numbers")
16222 (description
16223 "This gem is a library that provides trigonometric and transcendental
16224functions for complex numbers. The functions in this module accept integers,
16225floating-point numbers or complex numbers as arguments.")
16226 (home-page "https://github.com/ruby/cmath")
16227 (license license:bsd-2)))
16228
16229(define-public ruby-sucker-punch
16230 (package
16231 (name "ruby-sucker-punch")
16232 (version "3.1.0")
16233 (source
16234 (origin
16235 (method url-fetch)
16236 (uri (rubygems-uri "sucker_punch" version))
16237 (sha256
16238 (base32 "12by9vx8q6l4i56q62k1s1ymaxbpg4rny5zngj5i5h09kyh2yp4p"))))
16239 (build-system ruby-build-system)
16240 (arguments
16241 `(#:phases
16242 (modify-phases %standard-phases
16243 (add-after 'extract-gemspec 'less-strict-dependencies
16244 (lambda _
16245 (substitute* "sucker_punch.gemspec"
16246 (("1.0.0") "1.0")))))))
16247 (native-inputs
16248 (list
16249 ruby-pry))
16250 (propagated-inputs
16251 (list ruby-concurrent-ruby))
16252 (home-page "https://github.com/brandonhilkert/sucker_punch")
16253 (synopsis "Asynchronous processing library for Ruby")
16254 (description "Sucker Punch is a single-process Ruby asynchronous processing
16255library. It is perfect for asynchronous processes like emailing, data crunching
16256or social platform manipulation; and generally recommended for jobs that are
16257fast and non-mission critical like logs, emails, etc.")
16258 (license license:expat)))
16259
16260(define-public ruby-countdownlatch
16261 (package
16262 (name "ruby-countdownlatch")
16263 (version "1.0.0")
16264 (source
16265 (origin
16266 (method url-fetch)
16267 (uri (rubygems-uri "countdownlatch" version))
16268 (sha256
16269 (base32 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
16270 (build-system ruby-build-system)
16271 (home-page "https://github.com/benlangfeld/countdownlatch")
16272 (synopsis "Thread synchronization aid Ruby")
16273 (description "CountDownLatch is a synchronization aid that allows one or
16274more threads to wait until a set of operations being performed in other threads
16275completes.")
16276 (license license:expat)))
16277
16278(define-public ruby-value-semantics
16279 (package
16280 (name "ruby-value-semantics")
16281 (version "3.6.1")
16282 (source
16283 (origin
16284 (method url-fetch)
16285 (uri (rubygems-uri "value_semantics" version))
16286 (sha256
16287 (base32 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
16288 (build-system ruby-build-system)
16289 (arguments
16290 `(#:phases
16291 (modify-phases %standard-phases
16292 (replace 'check
16293 (lambda* (#:key tests? #:allow-other-keys)
16294 (when tests?
16295 (invoke "rspec")))))))
16296 (native-inputs
16297 (list
16298 ruby-rspec))
16299 (home-page "https://github.com/tomdalling/value_semantics")
16300 (synopsis "Ruby gem for making value classes")
16301 (description "ValueSemantics generates modules that provide conventional
16302value semantics for a given set of attributes. The behaviour is similar to an
16303immutable Struct class, plus extensible, lightweight validation and coercion.")
16304 (license license:expat)))
16305
16306(define-public ruby-promise
16307 (package
16308 (name "ruby-promise")
16309 (version "0.7.4")
16310 (source
16311 (origin
16312 (method url-fetch)
16313 (uri (rubygems-uri "promise.rb" version))
16314 (sha256
16315 (base32 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
16316 (build-system ruby-build-system)
16317 (arguments
16318 `(#:test-target "spec"
16319 #:phases
16320 (modify-phases %standard-phases
16321 (add-after 'extract-gemspec 'less-strict-dependencies
16322 (lambda _
16323 (substitute* "Rakefile"
16324 (("if Gem.ruby_version.*") "if false\n"))
16325 (substitute* "spec/spec_helper.rb"
16326 ((".*devtools/spec_helper.*") "\n")))))))
16327 (native-inputs
16328 (list
16329 ruby-rspec
16330 ruby-rspec-its
16331 ruby-awesome-print
16332 ruby-fuubar))
16333 (home-page "https://github.com/lgierth/promise.rb")
16334 (synopsis "Asynchronous operation library for Ruby")
16335 (description "Promise is a Ruby implementation of the Promises/A+
16336specification. It provides 100% mutation coverage, tested on MRI 1.9, 2.0, 2.1,
163372.2, Rubinius, and JRuby.")
16338 (license license:unlicense)))
16339
16340(define-public ruby-multicodecs
16341 (package
16342 (name "ruby-multicodecs")
16343 (version "0.2.1")
16344 (source
16345 (origin
16346 (method url-fetch)
16347 (uri (rubygems-uri "multicodecs" version))
16348 (sha256
16349 (base32 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
16350 (build-system ruby-build-system)
16351 (home-page "https://github.com/SleeplessByte/ruby-multicodec")
16352 (synopsis "Ruby implementation of multiformats/multicodec")
16353 (description "Multicodecs is the ruby implementation of
16354multiformats/multicodec, a canonical table of of codecs used by various
16355multiformats.")
16356 (license license:expat)))
16357
16358(define-public ruby-multihashes
16359 (package
16360 (name "ruby-multihashes")
16361 (version "0.2.0")
16362 (source
16363 (origin
16364 (method url-fetch)
16365 (uri (rubygems-uri "multihashes" version))
16366 (sha256
16367 (base32 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
16368 (build-system ruby-build-system)
16369 (propagated-inputs
16370 (list
16371 ruby-multicodecs))
16372 (home-page "https://github.com/multiformats/ruby-multihash")
16373 (synopsis "Multihash implementation for Ruby")
16374 (description "Multihashes provides a simple, low-level multihash
16375implementation for Ruby. A multihash is a digest with an embedded hash function
16376code")
16377 (license license:expat)))
16378
16379(define-public ruby-lazy-object
16380 (package
16381 (name "ruby-lazy-object")
16382 (version "0.0.3")
16383 (source
16384 (origin
16385 (method url-fetch)
16386 (uri (rubygems-uri "lazy_object" version))
16387 (sha256
16388 (base32 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
16389 (build-system ruby-build-system)
16390 (arguments
16391 `(#:test-target "spec"))
16392 (home-page "https://github.com/HornsAndHooves/lazy_object")
16393 (synopsis "Object wrapper that forwards all calls to the reference object")
16394 (description "LazyObject is an object wrapper that forwards all calls to the
16395reference object. This object is not created until the first method dispatch.")
16396 (license license:expat)))
16397
16398(define-public ruby-citrus
16399 (package
16400 (name "ruby-citrus")
16401 (version "3.0.2")
16402 (source
16403 (origin
16404 (method git-fetch)
16405 ;; Download from GitHub because the rubygems version does not contain
16406 ;; files needed for tests.
16407 (uri (git-reference
16408 (url "https://github.com/mjackson/citrus")
16409 (commit (string-append "v" version))))
16410 (file-name (git-file-name name version))
16411 (sha256
16412 (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
16413 (build-system ruby-build-system)
16414 (arguments
16415 (list #:phases
16416 #~(modify-phases %standard-phases
16417 (add-after 'unpack 'fix-citrus-version
16418 (lambda _
16419 (substitute* '("lib/citrus.rb" "citrus.gemspec")
16420 (("require 'citrus/version'")
16421 "")
16422 (("Citrus\\.version")
16423 (format #f "~s" #$version))))))))
16424 (home-page "https://mjackson.github.io/citrus/")
16425 (synopsis "Parsing Expressions for Ruby")
16426 (description "Citrus is a parsing library for Ruby that combines the
16427expressiveness of the language with the parsing expressions.")
16428 (license license:expat)))
16429
16430(define-public ruby-cbor
16431 (package
16432 (name "ruby-cbor")
16433 (version "0.5.10.1")
16434 (source
16435 (origin
16436 (method url-fetch)
16437 (uri (rubygems-uri "cbor" version))
16438 (sha256
16439 (base32 "1w3d5dhx4vjd707ihkcmq7fy78p5fgawcjdqw2byxnfw32gzgkbr"))))
16440 (build-system ruby-build-system)
16441 (arguments
16442 `(#:test-target "spec"))
16443 (native-inputs
16444 (list
16445 ruby-rspec
16446 ruby-rake-compiler
16447 ruby-yard))
16448 (home-page "https://cbor.io/")
16449 (synopsis "Concise Binary Object Representation")
16450 (description "CBOR is a library for the
16451@acronym{CBOR, Concise Binary Object Representation} format, based on
16452Sadayuki Furuhashi's MessagePack library.")
16453 (license license:asl2.0)))
16454
16455(define-public ruby-gem-release
16456 (package
16457 (name "ruby-gem-release")
16458 (version "2.2.2")
16459 (source
16460 (origin
16461 (method url-fetch)
16462 (uri (rubygems-uri "gem-release" version))
16463 (sha256
16464 (base32 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
16465 (build-system ruby-build-system)
16466 (arguments
16467 ;; No rakefile
16468 `(#:tests? #f))
16469 (home-page "https://github.com/svenfuchs/gem-release")
16470 (synopsis "Ruby gem plugin for release management")
16471 (description "GemRelease is a gem plugin that aims at making gem development
16472easier by automating repetitive work based on conventions, configuration, and
16473templates.")
16474 (license license:expat)))
16475
16476(define-public ruby-base32
16477 (package
16478 (name "ruby-base32")
16479 (version "0.3.4")
16480 (source
16481 (origin
16482 (method url-fetch)
16483 (uri (rubygems-uri "base32" version))
16484 (sha256
16485 (base32 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
16486 (build-system ruby-build-system)
16487 (native-inputs
16488 (list
16489 ruby-gem-release))
16490 (home-page "https://github.com/stesla/base32")
16491 (synopsis "Ruby extension for base32 encoding and decoding")
16492 (description "Base32 is a library which provides base32 decoding and
16493encoding.")
16494 (license license:expat)))
16495
16496(define-public ruby-dhall
16497 (package
16498 (name "ruby-dhall")
16499 (version "0.5.2")
16500 (source
16501 (origin
16502 (method url-fetch)
16503 (uri (rubygems-uri "dhall" version))
16504 (sha256
16505 (base32 "09wcq8xc1ynld04r2f332bx8cn7rjc4afaq8hm1dr2fc35jlpn6m"))))
16506 (build-system ruby-build-system)
16507 (arguments
16508 ;; No test in gem archive
16509 `(#:tests? #f))
16510 (propagated-inputs
16511 (list
16512 ruby-base32
16513 ruby-cbor
16514 ruby-citrus
16515 ruby-lazy-object
16516 ruby-multihashes
16517 ruby-promise
16518 ruby-value-semantics))
16519 (home-page "https://git.sr.ht/~singpolyma/dhall-ruby")
16520 (synopsis "Ruby implementation of the Dhall configuration language")
16521 (description "Dhall.rb is a Ruby implementation of the Dhall configuration
16522language. Dhall is a memory safe and non-Turing-complete configuration
16523language.")
16524 (license license:gpl3+)))
16525
16526(define-public ruby-money
16527 (package
16528 (name "ruby-money")
16529 (version "6.16.0")
16530 (source
16531 (origin
16532 (method url-fetch)
16533 (uri (rubygems-uri "money" version))
16534 (sha256
16535 (base32 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
16536 (build-system ruby-build-system)
16537 (arguments
16538 ;; No rakefile.
16539 `(#:tests? #f))
16540 (propagated-inputs
16541 (list
16542 ruby-i18n))
16543 (home-page "https://rubymoney.github.io/money/")
16544 (synopsis "Currency conversion library for Ruby")
16545 (description "RubyMoney provides a library for dealing with money and
16546currency conversion. Its features are:
16547@itemize
16548@item
16549Provides a Money class which encapsulates all information about a certain
16550amount of money, such as its value and its currency.
16551@item
16552Provides a Money::Currency class which encapsulates all information about a
16553monetary unit.
16554@item
16555Represents monetary values as integers, in cents; so avoids floating point
16556rounding errors.
16557@item
16558Represents currency as Money::Currency instances providing a high level of
16559flexibility.
16560@item Provides APIs for exchanging money from one currency to another.
16561@end itemize")
16562 (license license:expat)))
16563
16564(define-public ruby-monetize
16565 (package
16566 (name "ruby-monetize")
16567 (version "1.11.0")
16568 (source
16569 (origin
16570 (method url-fetch)
16571 (uri (rubygems-uri "monetize" version))
16572 (sha256
16573 (base32 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
16574 (build-system ruby-build-system)
16575 (arguments
16576 `(#:test-target "spec"))
16577 (native-inputs
16578 (list
16579 ruby-rspec))
16580 (propagated-inputs
16581 (list
16582 ruby-money))
16583 (home-page "https://github.com/RubyMoney/monetize")
16584 (synopsis "Convert various objects into Money objects")
16585 (description "Monetize provides a library for converting various objects
16586into Money objects.")
16587 (license license:expat)))
16588
16589(define-public ruby-money-open-exchange-rates
16590 (package
16591 (name "ruby-money-open-exchange-rates")
16592 (version "1.4.0")
16593 (source
16594 (origin
16595 (method git-fetch)
16596 ;; Download from GitHub because the rubygems version does not contain
16597 ;; Rakefile.
16598 (uri (git-reference
16599 (url "https://github.com/spk/money-open-exchange-rates")
16600 (commit (string-append "v" version))))
16601 (file-name (git-file-name name version))
16602 (sha256
16603 (base32 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
16604 (build-system ruby-build-system)
16605 (native-inputs
16606 (list
16607 ruby-minitest
16608 ruby-mocha
16609 ruby-monetize
16610 ruby-rake
16611 ruby-rubocop
16612 ruby-timecop
16613 ruby-webmock))
16614 (propagated-inputs
16615 (list
16616 ruby-money))
16617 (home-page "https://spk.github.io/money-open-exchange-rates/")
16618 (synopsis "Money open exchange rates for Ruby")
16619 (description "This package provides a gem that calculates the exchange rate
16620using published rates from open-exchange-rates. Compatible with the money gem.")
16621 (license license:expat)))
16622
16623(define-public ruby-roda
16624 (package
16625 (name "ruby-roda")
16626 (version "3.57.0")
16627 (source
16628 (origin
16629 (method url-fetch)
16630 (uri (rubygems-uri "roda" version))
16631 (sha256
16632 (base32 "0nkfxnbcfnriywvx9kpamp850cwjmqv8ssajc95d0aiyjr4kdrfy"))))
16633 (build-system ruby-build-system)
16634 (arguments
16635 ;; No rakefile
16636 `(#:tests? #f))
16637 (propagated-inputs (list ruby-rack))
16638 (home-page "https://roda.jeremyevans.net")
16639 (synopsis "Routing Tree Web Toolkit")
16640 (description "Roda is a routing tree web toolkit, designed for building fast
16641and maintainable web applications in ruby.")
16642 (license license:expat)))
16643
16644(define-public ruby-nori
16645 (package
16646 (name "ruby-nori")
16647 (version "2.6.0")
16648 (source
16649 (origin
16650 (method url-fetch)
16651 (uri (rubygems-uri "nori" version))
16652 (sha256
16653 (base32 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
16654 (build-system ruby-build-system)
16655 (arguments
16656 ;; Tests require too old version of rspec
16657 `(#:tests? #f))
16658 (native-inputs
16659 (list ruby-nokogiri
16660 ruby-rake
16661 ruby-rspec))
16662 (home-page "https://github.com/savonrb/nori")
16663 (synopsis "XML to Hash translator")
16664 (description "Nori is a simple XML parsing ripped from Crack which in-turn
16665ripped from Merb. It supports pluggable parsers and ships with both REXML and
16666Nokogiri implementations.")
16667 (license license:expat)))
16668
16669;; This package is deprecated per upstream and should be phased out.
16670(define-public ruby-faraday-middleware
16671 (package
16672 (name "ruby-faraday-middleware")
16673 (version "1.2.0")
16674 (source
16675 (origin
16676 (method url-fetch)
16677 (uri (rubygems-uri "faraday_middleware" version))
16678 (sha256
16679 (base32 "1bw8mfh4yin2xk7138rg3fhb2p5g2dlmdma88k82psah9mbmvlfy"))))
16680 (build-system ruby-build-system)
16681 (arguments `(#:tests? #f))
16682 (propagated-inputs (list ruby-faraday))
16683 (home-page "https://github.com/lostisland/faraday_middleware")
16684 (synopsis "Various middleware for Faraday")
16685 (description "Faraday_Middleware is a collection of middleware for the
16686Faraday-based API wrappers.")
16687 (license license:expat)))
16688
16689(define-public ruby-faraday-multipart
16690 (package
16691 (name "ruby-faraday-multipart")
16692 (version "1.0.4")
16693 (source (origin
16694 (method git-fetch)
16695 (uri (git-reference
16696 (url "https://github.com/lostisland/faraday-multipart")
16697 (commit (string-append "v" version))))
16698 (file-name (git-file-name name version))
16699 (sha256
16700 (base32
16701 "0ywxhff40a688n50lxrn4d8y096l8sbrwp1jfz4zd3kdiiygclka"))))
16702 (build-system ruby-build-system)
16703 (arguments (list #:test-target "spec"))
16704 (native-inputs (list ruby-faraday ruby-multipart-parser ruby-rspec))
16705 (propagated-inputs (list ruby-multipart-post))
16706 (synopsis "Multipart-post requests extension for Faraday")
16707 (description "This Ruby gem extends Faraday to perform multipart-post
16708requests.")
16709 (home-page "https://github.com/lostisland/faraday-multipart")
16710 (license license:expat)))
16711
16712(define-public ruby-bandwidth-iris
16713 (package
16714 (name "ruby-bandwidth-iris")
16715 (version "7.0.0")
16716 (source
16717 (origin
16718 (method url-fetch)
16719 (uri (rubygems-uri "ruby-bandwidth-iris" version))
16720 (sha256
16721 (base32 "131c4jhyvnrwbhizkks17fi9g85cwsq5f1p8zi408zyf63n7230d"))))
16722 (build-system ruby-build-system)
16723 (arguments
16724 ;; XXX: Tests don't require helper for some reason, so all fail.
16725 `(#:tests? #f))
16726 (native-inputs
16727 (list ruby-rspec
16728 ruby-yard))
16729 (propagated-inputs
16730 (list ruby-activesupport
16731 ruby-builder
16732 ruby-faraday
16733 ruby-faraday-middleware
16734 ruby-nori))
16735 (home-page "https://github.com/Bandwidth/ruby-bandwidth-iris")
16736 (synopsis "Gem for integrating to Bandwidth's Iris API")
16737 (description "Bandwidth IRIS is a Ruby SDK for Bandwidth Phone Number
16738Dashboard. It is a Ruby Client library for IRIS / BBS API.")
16739 (license license:expat)))
16740
16741(define-public ruby-securerandom
16742 (package
16743 (name "ruby-securerandom")
16744 (version "0.4.1")
16745 (source
16746 (origin
16747 (method url-fetch)
16748 (uri (rubygems-uri "securerandom" version))
16749 (sha256
16750 (base32 "1cd0iriqfsf1z91qg271sm88xjnfd92b832z49p1nd542ka96lfc"))))
16751 (build-system ruby-build-system)
16752 (arguments '(#:tests? #f)) ; No tests found.
16753 (synopsis "Interface for secure random number generator")
16754 (description "This package provides a Ruby interface for secure random
16755number generators.")
16756 (home-page "https://github.com/ruby/securerandom")
16757 (license (list license:bsd-2))))
16758
16759(define-public ruby-selenium-webdriver
16760 (package
16761 (name "ruby-selenium-webdriver")
16762 (version "4.22.0")
16763 (source (origin
16764 (method url-fetch)
16765 (uri (rubygems-uri "selenium-webdriver" version))
16766 (sha256
16767 (base32
16768 "0rjxlivsh32xvjq78p1m1sr366aa04wms4hwb2r187ygrnmp0hv4"))))
16769 (build-system ruby-build-system)
16770 ;; FIXME: The gem release lacks test files, and the git checkout lacks
16771 ;; JavaScript source that is generated using Bazel, which isn't available
16772 ;; in Guix yet, so disable the test suite for now.
16773 (arguments (list #:tests? #f))
16774 (propagated-inputs (list ruby-base64
16775 ruby-rexml
16776 ruby-rubyzip
16777 ruby-websocket))
16778 (synopsis "Selenium browser automation bindings for Ruby")
16779 (description "Selenium implements the W3C WebDriver protocol to automate
16780popular browsers. It aims to mimic the behaviour of a real user as it
16781interacts with the application's HTML. It's primarily intended for web
16782application testing, but any web-based task can be automated. This package
16783provides the Ruby bindings of Selenium.")
16784 (home-page "https://www.selenium.dev/")
16785 (license license:asl2.0)))
16786
16787(define-public ruby-sentry-core
16788 (package
16789 (name "ruby-sentry-core")
16790 (version "5.3.1")
16791 (source
16792 (origin
16793 (method url-fetch)
16794 (uri (rubygems-uri "sentry-ruby-core" version))
16795 (sha256
16796 (base32 "141mrw8wghhsjvln9m6ld3hap3xc5v901jjiz007xywy25725hyd"))))
16797 (build-system ruby-build-system)
16798 (arguments
16799 ;; No rakefile in gem.
16800 `(#:tests? #f))
16801 (propagated-inputs
16802 (list ruby-concurrent-ruby
16803 ruby-faraday))
16804 (home-page "https://sentry.io/for/ruby/")
16805 (synopsis "Client interface for the Sentry error logger")
16806 (description "Sentry-Core provides a gem that provides a client
16807interface for the Sentry error logger.")
16808 (license license:expat)))
16809
16810(define-public ruby-sentry
16811 (package
16812 (name "ruby-sentry")
16813 (version "5.3.1")
16814 (source
16815 (origin
16816 (method url-fetch)
16817 (uri (rubygems-uri "sentry-ruby" version))
16818 (sha256
16819 (base32 "0by9mvw8rklzpyx59vfija8h3ssfvxvf5nbqxfmygfy6lm1vdngz"))))
16820 (build-system ruby-build-system)
16821 (arguments
16822 ;; No rakefile in gem
16823 `(#:tests? #f))
16824 (propagated-inputs
16825 (list ruby-concurrent-ruby
16826 ruby-faraday
16827 ruby-sentry-core))
16828 (home-page "https://sentry.io/for/ruby/")
16829 (synopsis "Client interface for the Sentry error logger")
16830 (description "Sentry provides a gem that provides a client
16831interface for the Sentry error logger.")
16832 (license license:expat)))
16833
16834(define-public ruby-webrick
16835 (package
16836 (name "ruby-webrick")
16837 (version "1.8.1")
16838 (source (origin
16839 (method git-fetch) ;for tests
16840 (uri (git-reference
16841 (url "https://github.com/ruby/webrick")
16842 (commit (string-append "v" version))))
16843 (file-name (git-file-name name version))
16844 (sha256
16845 (base32
16846 "1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
16847 (build-system ruby-build-system)
16848 (arguments
16849 (list #:phases
16850 #~(modify-phases %standard-phases
16851 (add-after 'extract-gemspec 'delete-problematic-tests
16852 (lambda _
16853 ;; The httresponse tests fail for
16854 ;; unknown reasons (see:
16855 ;; https://github.com/ruby/webrick/issues/112).
16856 (delete-file "test/webrick/test_httpresponse.rb"))))))
16857 (home-page "https://github.com/ruby/webrick")
16858 (synopsis "HTTP server toolkit")
16859 (description "WEBrick is an HTTP server toolkit that can be configured as an
16860HTTPS server, a proxy server, and a virtual-host server.")
16861 (license license:bsd-2)))
16862
16863(define-public ruby-websocket
16864 (let ((commit "950e416a19a76c7e6a673a7e5baa6283476dbec1")
16865 (revision "1"))
16866 (package
16867 (name "ruby-websocket")
16868 (version (git-version "1.2.9" revision commit))
16869 (source (origin
16870 (method git-fetch)
16871 (uri (git-reference
16872 (url "https://github.com/imanel/websocket-ruby")
16873 (commit commit)))
16874 (sha256
16875 (base32
16876 "1i6r0glpxy47zdf76aqgcpjgcgydla0733hfdhp628pmrinnkgwv"))
16877 (file-name (git-file-name name version))))
16878 (build-system ruby-build-system)
16879 (arguments (list #:test-target "spec"
16880 #:phases #~(modify-phases %standard-phases
16881 (add-after 'unpack 'disable-rubocop
16882 (lambda _
16883 (substitute* "Rakefile"
16884 (("require 'rubocop/rake_task'") "")
16885 (("RuboCop::RakeTask.new") "")))))))
16886 (native-inputs
16887 (list ruby-rspec
16888 ruby-webrick))
16889 (synopsis "WebSocket protocol Ruby library")
16890 (description "This package provides a Ruby library to handle the WebSocket
16891protocol.")
16892 (home-page "https://github.com/imanel/websocket-ruby")
16893 (license license:expat))))
16894
16895(define-public ruby-braintree
16896 (package
16897 (name "ruby-braintree")
16898 (version "4.24.0")
16899 (source
16900 (origin
16901 (method git-fetch) ;for tests
16902 (uri (git-reference
16903 (url "https://github.com/braintree/braintree_ruby")
16904 (commit version)))
16905 (file-name (git-file-name name version))
16906 (sha256
16907 (base32 "1bj229cn37k5m0hb3hw868k8dy4pgvpgfixm61zngbp7p7a2xqpx"))))
16908 (build-system ruby-build-system)
16909 (arguments
16910 (list
16911 #:test-target "test:unit"
16912 #:phases
16913 #~(modify-phases %standard-phases
16914 (add-after 'unpack 'disable-rubocop
16915 (lambda _
16916 (substitute* "Rakefile"
16917 (("sh \"rubocop\"") ""))))
16918 (add-after 'unpack 'disable-bundler
16919 (lambda _
16920 (delete-file "Gemfile"))))))
16921 (native-inputs
16922 (list ruby-libxml
16923 ruby-pry
16924 ruby-rake
16925 ruby-rspec
16926 ruby-webrick))
16927 (propagated-inputs
16928 (list ruby-builder
16929 ruby-rexml))
16930 (home-page "https://www.braintreepayments.com/")
16931 (synopsis "Integration access to the Braintree Gateway")
16932 (description "Braintree provides resources and tools for developers to
16933integrate Braintree's global payments platform.")
16934 (license license:expat)))
16935
16936(define-public ruby-niceogiri
16937 (package
16938 (name "ruby-niceogiri")
16939 (version "1.1.2")
16940 (source
16941 (origin
16942 (method url-fetch)
16943 (uri (rubygems-uri "niceogiri" version))
16944 (sha256
16945 (base32 "1ha93211bc9cvh23s9w89zz7rq8irpf64ccd9arvg8v1sxg2798a"))))
16946 (build-system ruby-build-system)
16947 (arguments
16948 `(#:test-target "spec"
16949 #:phases
16950 (modify-phases %standard-phases
16951 (add-after 'extract-gemspec 'less-strict-dependencies
16952 (lambda _
16953 (substitute* "niceogiri.gemspec"
16954 (("2\\.7") "3.8") ;rspec
16955 ((".*dependency.*bundler.*") "\n")
16956 ((".*dependency.*guard-rspec.*") "\n")))))))
16957 (native-inputs
16958 (list ruby-rspec
16959 ruby-yard))
16960 (propagated-inputs (list ruby-nokogiri))
16961 (home-page "https://github.com/benlangfeld/Niceogiri")
16962 (synopsis "Supplement for Nokogiri")
16963 (description "Niceogiri provides wrappers and helpers for XML manipulation
16964using Nokogiri.")
16965 (license license:expat)))
16966
16967(define-public ruby-blather
16968 (package
16969 (name "ruby-blather")
16970 (version "2.0.0")
16971 (source
16972 (origin
16973 (method url-fetch)
16974 (uri (rubygems-uri "blather" version))
16975 (sha256
16976 (base32 "05ry2x835fj4pzk61282pcz86n018cr39zbgwbi213md74i90s7c"))))
16977 (build-system ruby-build-system)
16978 (arguments
16979 ;; XXX: Tests require too old version of rspec.
16980 `(#:tests? #f))
16981 (native-inputs
16982 (list ruby-countdownlatch
16983 ruby-mocha
16984 ruby-rb-fsevent
16985 ruby-rspec
16986 ruby-yard))
16987 (propagated-inputs
16988 (list ruby-activesupport
16989 ruby-eventmachine
16990 ruby-niceogiri
16991 ruby-nokogiri
16992 ruby-sucker-punch))
16993 (home-page "https://github.com/adhearsion/blather")
16994 (synopsis "XMPP Domain Specific Language for Ruby")
16995 (description "Blather is a XMPP DSL for Ruby written on top of EventMachine
16996and Nokogiri.")
16997 (license license:expat)))
16998
16999(define-public ruby-wapiti
17000 (package
17001 (name "ruby-wapiti")
17002 (version "2.1.0")
17003 ;; the gem archive lacks tests
17004 (source (origin
17005 (method git-fetch)
17006 (uri (git-reference
17007 (url "https://github.com/inukshuk/wapiti-ruby")
17008 (commit (string-append "v" version))))
17009 (file-name (git-file-name name version))
17010 (sha256
17011 (base32
17012 "1273dqvn6flq2qv9qbp104rgc7zp1gqx4096s0v0z5f0qnhzc7d6"))))
17013 (build-system ruby-build-system)
17014 (propagated-inputs
17015 (list ruby-builder
17016 ruby-rexml))
17017 (native-inputs
17018 (list ruby-pry
17019 ruby-rake-compiler
17020 ruby-rspec
17021 ruby-simplecov))
17022 (arguments
17023 (list
17024 #:test-target "spec"
17025 #:phases
17026 #~(modify-phases %standard-phases
17027 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17028 (lambda args
17029 (substitute* "wapiti.gemspec"
17030 (("`git ls-files spec`")
17031 "`find spec -type f | sort`"))))
17032 (add-before 'build 'compile
17033 (lambda args
17034 (invoke "rake" "compile"))))))
17035 (home-page "https://github.com/inukshuk/wapiti-ruby")
17036 (synopsis "Wicked fast Conditional Random Fields for Ruby")
17037 (description
17038 "The Wapiti-Ruby gem provides a wicked fast linear-chain @acronym{CRF,
17039Conditional Random Fields} API for sequence segmentation and labelling. It is
17040based on the codebase of @url{https://wapiti.limsi.fr, Wapiti}.")
17041 (license license:bsd-2)))
17042
17043(define-public ruby-namae
17044 (package
17045 (name "ruby-namae")
17046 (version "1.1.1")
17047 (source (origin
17048 (method url-fetch)
17049 (uri (rubygems-uri "namae" version))
17050 (sha256
17051 (base32
17052 "1j3nl1klkx3gymrdxfc1hlq4a8qlvhhl9aj5v1v08b9fz27sky0l"))))
17053 (build-system ruby-build-system)
17054 (native-inputs
17055 (list ruby-cucumber
17056 ruby-rspec
17057 ruby-simplecov))
17058 (arguments
17059 (list
17060 #:phases
17061 #~(modify-phases %standard-phases
17062 (add-after 'extract-gemspec 'allow-newer-cucumber
17063 (lambda args
17064 (substitute* "Gemfile"
17065 (("'cucumber', '[^']*'")
17066 "'cucumber'"))))
17067 (replace 'check
17068 ;; Avoid 'rake' so we don't need jeweler.
17069 (lambda* (#:key tests? #:allow-other-keys)
17070 (when tests?
17071 (apply invoke
17072 "rspec"
17073 (find-files "spec" "_spec\\.rb$"))))))))
17074 (home-page "https://github.com/berkmancenter/namae")
17075 (synopsis "Parser for human names")
17076 (description
17077 "Namae (名前) is a parser for human names. It recognizes personal names
17078of various cultural backgrounds and tries to split them into their component
17079parts (e.g., given and family names, honorifics etc.).")
17080 (license (list license:bsd-2 license:agpl3+))))
17081
17082(define-public ruby-latex-decode
17083 (package
17084 (name "ruby-latex-decode")
17085 (version "0.4.0")
17086 (source (origin
17087 (method git-fetch)
17088 (uri (git-reference
17089 (url "https://github.com/inukshuk/latex-decode")
17090 (commit (string-append "v" version))))
17091 (sha256
17092 (base32
17093 "1f5j67ayd04pjkmzvn0hk7cr8yqvn0gyg9ns6a0vhzj2gwna9ihy"))
17094 (file-name (git-file-name name version))))
17095 (build-system ruby-build-system)
17096 (native-inputs
17097 (list ruby-cucumber
17098 ruby-rspec))
17099 (arguments
17100 (list
17101 #:test-target "cucumber"
17102 #:phases
17103 #~(modify-phases %standard-phases
17104 (add-after 'extract-gemspec 'avoid-bundler
17105 (lambda args
17106 (substitute* "Rakefile"
17107 (("require 'bundler" orig)
17108 (string-append "# " orig " # patched for Guix"))
17109 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
17110 (string-append orig " do |c|\n"
17111 " c.bundler = false # patched for Guix\n"
17112 "end"))
17113 (("Bundler\\.setup" orig)
17114 (string-append "true # " orig " # patched for Guix")))
17115 (substitute* "cucumber.yml"
17116 ;; thanks to avoiding bundler, we can't use this option
17117 ((" --publish-quiet")
17118 ""))))
17119 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17120 (lambda args
17121 (substitute* "latex-decode.gemspec"
17122 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
17123 "`find {test,spec,features} -type f | sort`")))))))
17124 (home-page "https://github.com/inukshuk/latex-decode")
17125 (synopsis "Convert LaTeX to Unicode")
17126 (description
17127 "This package provides a gem to convert LaTeX input to Unicode. Its
17128original use was as an input filter for BibTeX-Ruby, but it can be used
17129independently to decode LaTeX. Many of the patterns used by this Ruby gem are
17130based on François Charette's equivalent Perl module @code{LaTeX::Decode}.")
17131 (license license:gpl3+)))
17132
17133(define-public ruby-link-header
17134 (package
17135 (name "ruby-link-header")
17136 (version "0.0.8")
17137 (source (origin
17138 (method url-fetch)
17139 (uri (rubygems-uri "link_header" version))
17140 (sha256
17141 (base32
17142 "1yamrdq4rywmnpdhbygnkkl9fdy249fg5r851nrkkxr97gj5rihm"))))
17143 (build-system ruby-build-system)
17144 (home-page "https://github.com/asplake/link_header")
17145 (synopsis "Parse and format HTTP @code{Link} headers")
17146 (description
17147 "This gem provides the classes @code{LinkHeader} and
17148@code{LinkHeader::Link}, which represent HTTP @code{Link} headers conforming
17149to RFC 5988. Objects can be constructed from and converted to text or a
17150JSON-friendly @code{Array} representation. They can also be used to generate
17151corresponding HTML @code{link} elements.")
17152 (license license:expat)))
17153
17154(define-public ruby-lint-roller
17155 (package
17156 (name "ruby-lint-roller")
17157 (version "1.1.0")
17158 (source
17159 (origin
17160 (method url-fetch)
17161 (uri (rubygems-uri "lint_roller" version))
17162 (sha256
17163 (base32 "11yc0d84hsnlvx8cpk4cbj6a4dz9pk0r1k29p0n1fz9acddq831c"))))
17164 (build-system ruby-build-system)
17165 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
17166 (native-inputs (list ruby-minitest))
17167 (synopsis "Specification for linter and formatter rulesets")
17168 (description
17169 "This package provides a plugin specification for Ruby linter and
17170formatter rulesets.")
17171 (home-page "https://github.com/standardrb/lint_roller")
17172 (license license:expat)))
17173
17174(define-public ruby-rdf
17175 (package
17176 (name "ruby-rdf")
17177 (version "3.2.8")
17178 (source (origin
17179 (method url-fetch)
17180 (uri (rubygems-uri "rdf" version))
17181 (sha256
17182 (base32
17183 "1cj0k8ryd8hgbkgqb5swvy6fiygxny3y5bln0my5gv6dbfv3gm20"))))
17184 (build-system ruby-build-system)
17185 (propagated-inputs (list ruby-link-header))
17186 (arguments
17187 (list #:tests? #f)) ;; tests have many cyclic dependencies
17188 (home-page "https://ruby-rdf.github.io/")
17189 (synopsis "Linked Data for Ruby")
17190 (description
17191 "This gem contains the core algorithms and classes used for doing basic
17192programming with @acronym{RDF, Resource Description Framework} data,
17193implemented in pure Ruby.")
17194 (license license:unlicense)))
17195
17196(define-public ruby-rdf-vocab
17197 (package
17198 (name "ruby-rdf-vocab")
17199 (version "3.2.1")
17200 (source (origin
17201 (method url-fetch)
17202 (uri (rubygems-uri "rdf-vocab" version))
17203 (sha256
17204 (base32
17205 "1bqmp9rfjvd56ajjz68ij6jla1wjf1fqg7bi4dpnjrsmn4pwaq7l"))))
17206 (build-system ruby-build-system)
17207 (propagated-inputs
17208 (list ruby-rdf))
17209 (arguments
17210 (list #:tests? #f)) ;; tests have many cyclic dependencies
17211 (home-page "https://github.com/ruby-rdf/rdf-vocab")
17212 (synopsis "Common RDF vocabularies")
17213 (description
17214 "This gem extends @code{ruby-rdf} with several common @acronym{RDF,
17215Resource Description Framework} vocabularies.")
17216 (license license:unlicense)))
17217
17218(define-public ruby-rdiscount
17219 (package
17220 (name "ruby-rdiscount")
17221 (version "2.2.7.3")
17222 (source
17223 (origin
17224 (method git-fetch) ;for the full test suite
17225 (uri (git-reference
17226 (url "https://github.com/davidfstr/rdiscount")
17227 (commit version)))
17228 (file-name (git-file-name name version))
17229 (sha256
17230 (base32
17231 "1lnf598sngcy6b701h33h5l9rn2abl80x0jpynz7jxb4imhd5r80"))))
17232 (build-system ruby-build-system)
17233 (native-inputs (list perl))
17234 (synopsis "Discount Markdown Processor for Ruby")
17235 (description "Discount is an implementation of John Gruber's Markdown
17236markup language in C. It implements all of the language described in the
17237markdown syntax document and passes the Markdown 1.0 test suite.")
17238 (home-page "https://dafoster.net/projects/rdiscount/")
17239 (license license:bsd-3)))
17240
17241(define-public ruby-bibtex-ruby
17242 (package
17243 (name "ruby-bibtex-ruby")
17244 (version "6.1.0")
17245 (source
17246 (origin
17247 (method url-fetch)
17248 (uri (rubygems-uri "bibtex-ruby" version))
17249 (sha256
17250 (base32 "1ggx2j1gi46f1a6p45l1abk3nryfg1pj0cdlyrnilnqqpr1cfc96"))))
17251 (build-system ruby-build-system)
17252 (propagated-inputs (list ruby-latex-decode ruby-racc ruby-rdf
17253 ruby-rdf-vocab))
17254 (native-inputs (list ruby-cucumber ruby-minitest ruby-yard))
17255 (arguments
17256 (list
17257 #:phases
17258 #~(modify-phases %standard-phases
17259 (add-after 'extract-gemspec 'sanitize-dependencies
17260 (lambda* (#:key inputs #:allow-other-keys)
17261 (substitute* "Gemfile"
17262 ((".*(gnuplot|ruby-prof|simplecov|iconv|redcarpet|unicode).*")
17263 ""))
17264 (substitute* "Rakefile"
17265 (("require 'bundler" orig)
17266 (string-append "# " orig " # patched for Guix"))
17267 (("Bundler\\.setup" orig)
17268 (string-append "true # " orig " # patched for Guix"))
17269 (("bundle exec racc")
17270 (string-append "bundle exec "
17271 (search-input-file inputs "/bin/racc")))))))))
17272 (home-page "https://github.com/inukshuk/bibtex-ruby")
17273 (synopsis "Rubyist's Swiss Army knife for all things BibTeX")
17274 (description
17275 "BibTeX-Ruby is the Rubyist's Swiss Army knife for all things BibTeX.
17276It includes a parser for all common BibTeX objects and a sophisticated name
17277parser that tokenizes correctly formatted names. BibTeX-Ruby recognizes
17278BibTeX string replacements, joins values containing multiple strings or
17279variables, supports cross-references, and decodes common LaTeX formatting
17280instructions to unicode. If you are in a hurry, it also allows for easy
17281export/conversion to formats such as YAML, JSON, CSL, and XML (BibTeXML).")
17282 (license license:gpl3+)))
17283
17284(define-public ruby-bigdecimal
17285 (package
17286 (name "ruby-bigdecimal")
17287 (version "4.1.2")
17288 (source
17289 (origin
17290 (method git-fetch) ;for tests
17291 (uri (git-reference
17292 (url "https://github.com/ruby/bigdecimal")
17293 (commit (string-append "v" version))))
17294 (file-name (git-file-name name version))
17295 (sha256
17296 (base32 "0dw7c9pjqxb9p5r2y79f1r5w5i1y96r5f0ppd6p39ghg5476dx43"))))
17297 (build-system ruby-build-system)
17298 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
17299 (synopsis "Arbitrary precision decimal floating point number for Ruby")
17300 (description
17301 "This Ruby library provides a class for arbitrary precision decimal
17302floating point numbers.")
17303 (home-page "https://github.com/ruby/bigdecimal")
17304 (license (list license:ruby license:bsd-2))))
17305
17306(define-public ruby-unicode-emoji
17307 (package
17308 (name "ruby-unicode-emoji")
17309 (version "4.2.0")
17310 (source
17311 (origin
17312 (method url-fetch)
17313 (uri (rubygems-uri "unicode-emoji" version))
17314 (sha256
17315 (base32 "03zqn207zypycbz5m9mn7ym763wgpk7hcqbkpx02wrbm1wank7ji"))))
17316 (build-system ruby-build-system)
17317 (arguments
17318 (list
17319 #:test-target "spec"
17320 #:phases
17321 #~(modify-phases %standard-phases
17322 ;; The tests normally try to download the sources if they're not
17323 ;; present; however, guix also packages some of the unicode test
17324 ;; files that we can leverage instead
17325 (add-after 'unpack 'use-guix-bundled-unicode-emoji
17326 (lambda _
17327 (let ((emoji (search-input-directory %build-inputs
17328 "share/unicode/emoji")))
17329 (substitute* "spec/emoji_test_txt_spec.rb"
17330 (("\\_\\_dir\\_\\_\\, \"data/emoji\\-test\\.txt")
17331 (string-append "\"" emoji "/emoji-test.txt"))))
17332 ;; Disable failing test (likely fails due to expecting
17333 ;; unicode-emoji v17.0 spec, but guix currently providing v12.0)
17334 (substitute* "Rakefile"
17335 (("sh \"ruby spec.*")
17336 (string-append
17337 "sh \"ruby spec/unicode_emoji_spec.rb -v --show-skips\""
17338 "\n"
17339 ;; Disable tests
17340 "sh \"ruby spec/emoji_test_txt_spec.rb -v --show-skips" " "
17341 "-e '/REGEX_INCLUDE_MQE.*" ;; Regex continues
17342 "(0153|1115|1129|1841|1855|1966|1980|2001|2015)/'\""))))))))
17343 (native-inputs (list unicode-emoji))
17344 (home-page "https://github.com/janlelis/unicode-emoji")
17345 (synopsis "Provides Unicode Emoji data and regexes")
17346 (description
17347 "Provides Unicode Emoji data and regexes, incorporating the latest Unicode
17348and Emoji standards. Includes a categorized list of recommended Emoji.")
17349 (license license:expat)))
17350
17351(define-public ruby-unicode-scripts
17352 (package
17353 (name "ruby-unicode-scripts")
17354 (version "1.11.0")
17355 (source (origin
17356 (method url-fetch)
17357 (uri (rubygems-uri "unicode-scripts" version))
17358 (sha256
17359 (base32
17360 "0r3d7qms3syx1ijn027vj4fycy5dzh8bwl99i8ykrgyadx01569d"))))
17361 (build-system ruby-build-system)
17362 (arguments (list #:test-target "spec"))
17363 (home-page "https://github.com/janlelis/unicode-scripts")
17364 (synopsis "Unicode script classification library")
17365 (description "This gem provides a simple interface for classifying Ruby
17366strings using the Unicode @code{Script} and @code{Script_Extensions}
17367properties.")
17368 (license license:expat)))
17369
17370(define-public ruby-citeproc
17371 (package
17372 (name "ruby-citeproc")
17373 (version "1.0.10")
17374 (source (origin
17375 (method url-fetch)
17376 (uri (rubygems-uri "citeproc" version))
17377 (sha256
17378 (base32
17379 "13vl5sjmksk5a8kjcqnjxh7kn9gn1n4f9p1rvqfgsfhs54p0m6l2"))))
17380 (build-system ruby-build-system)
17381 (propagated-inputs
17382 (list ruby-namae))
17383 (arguments
17384 (list #:tests? #f)) ;; tests have a cyclic dependency
17385 (home-page "https://github.com/inukshuk/citeproc")
17386 (synopsis "Interface for Ruby citation processors")
17387 (description
17388 "CiteProc is a citation processor interface and citation data API based
17389on the @acronym{CSL, Citation Style Language} specifications. To actually
17390process citations, a dedicated processor engine is required: a pure Ruby
17391engine is available in the @code{citeproc-ruby} gem.")
17392 (license (list license:agpl3+ license:bsd-2))))
17393
17394(define-public ruby-ed25519
17395 (package
17396 (name "ruby-ed25519")
17397 (version "1.3.0")
17398 (source (origin
17399 (method git-fetch)
17400 (uri (git-reference
17401 (url "https://github.com/RubyCrypto/ed25519")
17402 (commit (string-append "v" version))))
17403 (file-name (git-file-name name version))
17404 (sha256
17405 (base32
17406 "1jm5w2dyhyrndcx0d02v0gjbzl1abhbx2wkp3gxzwcndghmkz98r"))))
17407 (build-system ruby-build-system)
17408 (arguments
17409 (list
17410 #:test-target "spec"
17411 #:phases
17412 #~(modify-phases %standard-phases
17413 (add-before 'build 'compile
17414 (lambda _
17415 (invoke "rake" "compile")))
17416 (add-after 'unpack 'remove-unnecessary-dependencies
17417 (lambda _
17418 ;; Coveralls relates to a network service, and RuboCop to code
17419 ;; linting and both are unnecessary to run the tests
17420 (substitute* "Gemfile"
17421 ((".*coveralls.*")
17422 "\n")
17423 ((".*rubocop.*")
17424 "\n"))
17425 (substitute* "spec/spec_helper.rb"
17426 (("require \"coveralls\"")
17427 "")
17428 (("Coveralls.wear!")
17429 ""))
17430 (substitute* "Rakefile"
17431 (("require \"rubocop/rake_task\"")
17432 "")
17433 (("RuboCop::RakeTask.new")
17434 "")))))))
17435 (native-inputs (list ruby-rake-compiler ruby-rspec))
17436 (synopsis
17437 "Ruby binding to the Ed25519 elliptic curve public-key signature system")
17438 (description
17439 "This package provides a Ruby binding to the Ed25519 elliptic curve
17440public-key signature system described in
17441@url{https://www.ietf.org/rfc/rfc8032.txt, RFC 8032}.")
17442 (home-page "https://github.com/RubyCrypto/ed25519")
17443 (license license:expat)))
17444
17445(define-public ruby-edtf
17446 (package
17447 (name "ruby-edtf")
17448 (version "3.1.0")
17449 (source (origin
17450 (method git-fetch)
17451 (uri (git-reference
17452 (url "https://github.com/inukshuk/edtf-ruby")
17453 (commit (string-append "v" version))))
17454 (sha256
17455 (base32
17456 "18j8xq8zmrn41cs2gpd1i87agi9905asvnjqndky2cqb5zg3q14g"))
17457 (snippet
17458 ;; remove generated file
17459 #~(delete-file "lib/edtf/parser.rb"))
17460 (file-name (git-file-name name version))))
17461 (build-system ruby-build-system)
17462 (propagated-inputs
17463 (list ruby-activesupport))
17464 (native-inputs
17465 (list ruby-cucumber
17466 ruby-rspec))
17467 (arguments
17468 (list
17469 #:phases
17470 #~(modify-phases %standard-phases
17471 (add-after 'extract-gemspec 'avoid-bundler
17472 (lambda args
17473 (substitute* "Rakefile"
17474 (("require 'bundler" orig)
17475 (string-append "# " orig " # patched for Guix"))
17476 (("bundle exec racc")
17477 "racc")
17478 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
17479 (string-append orig " do |c|\n"
17480 " c.bundler = false # patched for Guix\n"
17481 "end"))
17482 (("Bundler\\.setup" orig)
17483 (string-append "true # " orig " # patched for Guix")))))
17484 (add-after 'avoid-bundler 'patch-cucumber-options
17485 (lambda args
17486 (substitute* "cucumber.yml"
17487 ;; this option is not supported, at least in our configuration
17488 ((" --publish-quiet")
17489 ""))))
17490 (add-before 'build 'compile
17491 (lambda args
17492 (invoke "rake" "racc")))
17493 (replace 'check
17494 (lambda* (#:key tests? #:allow-other-keys)
17495 (when tests?
17496 (invoke "rake")))))))
17497 (home-page "https://github.com/inukshuk/edtf-ruby")
17498 (synopsis "Ruby implementation of Extended Date/Time Format")
17499 (description
17500 "EDTF-Ruby provides a parser and an API for the @acronym{EDTF, Extended
17501Date/Time Format} standard, implemented as an extension to Ruby's @code{Date}
17502class.")
17503 (license license:bsd-2)))
17504
17505(define-public ruby-gli
17506 (package
17507 (name "ruby-gli")
17508 (version "2.21.0")
17509 (source (origin
17510 (method git-fetch)
17511 (uri (git-reference
17512 (url "https://github.com/davetron5000/gli")
17513 (commit (string-append "v" version))))
17514 (sha256
17515 (base32
17516 "09b1r9hlx4dy2yq036nk7hc2nbswhia6q3na9v11z94yibc8mgja"))
17517 (file-name (git-file-name name version))))
17518 (build-system ruby-build-system)
17519 (native-inputs
17520 (list ruby-minitest
17521 ruby-rainbow
17522 ruby-rdoc
17523 ruby-sdoc))
17524 (arguments
17525 (list
17526 #:phases
17527 #~(modify-phases %standard-phases
17528 (add-after 'extract-gemspec 'patch-gemspec-version
17529 (lambda args
17530 (substitute* "gli.gemspec"
17531 ;; this trick fails in our build environment
17532 (("require File\\.join[(]\\[" orig)
17533 (string-append "# patched for Guix # " orig))
17534 (("s\\.version = GLI::VERSION")
17535 #$(string-append "s.version = '"
17536 (package-version this-package)
17537 "' # patched for Guix")))))
17538 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17539 (lambda args
17540 (substitute* "gli.gemspec"
17541 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
17542 "`find {test,spec,features} -type f | sort`"))))
17543 (add-after 'replace-another-git-ls-files 'fix-rubyopt
17544 (lambda args
17545 (substitute* "Rakefile"
17546 (("ENV\\[\"RUBYOPT\"]")
17547 "(ENV['RUBYOPT'] || '')")))))))
17548 (home-page "https://davetron5000.github.io/gli/")
17549 (synopsis "Git-Like Interface command-line parser")
17550 (description
17551 "GLI allows you to create command-line applications in Ruby with Git-Like
17552Interfaces: that is, they take subcommands in the style of @command{git} and
17553@command{gem}. GLI uses a simple domain-specific language, but retains all
17554the power of the built-in @code{OptionParser}.")
17555 (license license:asl2.0)))
17556
17557(define-public ruby-anystyle-data
17558 (package
17559 (name "ruby-anystyle-data")
17560 (version "1.3.0")
17561 (source (origin
17562 (method git-fetch)
17563 (uri (git-reference
17564 (url "https://github.com/inukshuk/anystyle-data")
17565 (commit (string-append "v" version))))
17566 (sha256
17567 (base32
17568 "1jh880310m3gjdrk4m8rwwnsf0824zkf26clpr8p64sac2fyy907"))
17569 (snippet
17570 ;; remove pre-built file
17571 #~(delete-file "lib/anystyle/data/dict.txt.gz"))
17572 (patches
17573 (search-patches "ruby-anystyle-data-immutable-install.patch"))
17574 (file-name (git-file-name name version))))
17575 (build-system ruby-build-system)
17576 (arguments
17577 (list
17578 #:tests? #f ;; there are none
17579 #:modules
17580 `((guix build ruby-build-system)
17581 (guix build utils)
17582 (srfi srfi-26))
17583 #:phases
17584 #~(modify-phases %standard-phases
17585 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17586 (lambda args
17587 (substitute* "anystyle-data.gemspec"
17588 (("`git ls-files lib README\\.md LICENSE`\\.split[(][^)]*[)]")
17589 (string-append
17590 "["
17591 (string-join
17592 (map (cut string-append "\"" <> "\"")
17593 `("README.md"
17594 "LICENSE"
17595 "lib/anystyle/data.rb"
17596 "lib/anystyle/data/dict.txt.gz"
17597 "lib/anystyle/data/setup.rb"
17598 "lib/anystyle/data/version.rb"))
17599 ", ")
17600 "]")))))
17601 (add-before 'build 'compile-dict
17602 (lambda args
17603 (invoke "rake" "compile"))))))
17604 (home-page "https://anystyle.io")
17605 (synopsis "AnyStyle parser dictionary data")
17606 (description
17607 "This gem provides parser dictionary data for AnyStyle.")
17608 (license license:bsd-2)))
17609
17610(define-public ruby-anystyle
17611 (package
17612 (name "ruby-anystyle")
17613 (version "1.4.2")
17614 (source (origin
17615 (method git-fetch)
17616 (uri (git-reference
17617 (url "https://github.com/inukshuk/anystyle")
17618 (commit (string-append "v" version))))
17619 (sha256
17620 (base32
17621 "0xhy7wj8v7iahikck6vxbdpncaz5w2gb11b32kmvg5ckgi2kz23p"))
17622 (snippet
17623 ;; There is an optional dependency on
17624 ;; <https://github.com/feedbackmine/language_detector>, which
17625 ;; seems like it was intended to be free software, but
17626 ;; doesn't have a clear license statement. Maybe someone can
17627 ;; do more sleuthing, or else find a replacement? See also
17628 ;; <https://github.com/inukshuk/anystyle/issues/186>. For
17629 ;; now, patch it out, but leave a pointer to follow up.
17630 #~(begin
17631 (use-modules (guix build utils))
17632 (substitute* "Gemfile"
17633 (("gem 'language_detector', github: '[^']*'" orig)
17634 (string-append "# " orig " # unclear license")))
17635 (substitute* "spec/anystyle/parser_spec.rb"
17636 (("language: 'en'," orig)
17637 (string-append "# " orig " # no lanugage_detector")))))
17638 (patches
17639 (search-patches
17640 "ruby-anystyle-fix-dictionary-populate.patch"))
17641 (file-name (git-file-name name version))))
17642 (build-system ruby-build-system)
17643 (propagated-inputs
17644 (list ruby-anystyle-data
17645 ruby-bibtex-ruby
17646 ruby-namae
17647 ruby-wapiti))
17648 (native-inputs
17649 (list ruby-byebug
17650 ruby-citeproc
17651 ruby-edtf
17652 ruby-gdbm
17653 ruby-rspec
17654 ruby-unicode-scripts))
17655 (arguments
17656 (list
17657 #:test-target "spec"
17658 #:phases
17659 #~(modify-phases %standard-phases
17660 (add-after 'extract-gemspec 'avoid-bundler
17661 (lambda args
17662 (substitute* "Rakefile"
17663 (("require 'bundler" orig)
17664 (string-append "# " orig " # patched for Guix"))
17665 (("Bundler\\.setup" orig)
17666 (string-append "true # " orig " # patched for Guix")))))
17667 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17668 (lambda args
17669 (substitute* "anystyle.gemspec"
17670 (("`git ls-files spec`")
17671 "`find spec -type f | sort`"))))
17672 (add-after 'wrap 'populate-dictionaries
17673 (lambda args
17674 ;; We must initialize these files here, or they will never be
17675 ;; usable with the default settings. A more flexible approach
17676 ;; might use something like `Gem.find_files()` or
17677 ;; XDG_DATA_DIRS.
17678 (with-output-to-file "initialize-dictionaries.rb"
17679 (lambda ()
17680 (display "\
17681require 'anystyle/dictionary' # must come before 'anystyle/data'
17682require 'anystyle/data'
17683[:marshal, :gdbm].each do |adapter|
17684 AnyStyle::Dictionary.create({adapter: adapter}).open().close()
17685end
17686")))
17687 (let* ((old-gems (getenv "GEM_PATH"))
17688 (new-gems (string-append #$output
17689 "/lib/ruby/vendor_ruby:"
17690 old-gems)))
17691 (dynamic-wind
17692 (lambda ()
17693 (setenv "GEM_PATH" new-gems))
17694 (lambda ()
17695 (invoke "ruby" "initialize-dictionaries.rb"))
17696 (lambda ()
17697 (setenv "GEM_PATH" old-gems)))))))))
17698 (home-page "https://anystyle.io")
17699 (synopsis "Fast and smart citation reference parsing (Ruby library)")
17700 (description
17701 "AnyStyle is a very fast and smart parser for academic reference lists
17702and bibliographies. AnyStyle uses powerful machine learning heuristics based
17703on Conditional Random Fields and aims to make it easy to train the model with
17704data that is relevant to your parsing needs.
17705
17706This package provides the Ruby module @code{AnyStyle}. AnyStyle can also be
17707used via the @command{anystyle} command-line utility or a web application,
17708though the later has not yet been packaged for Guix.")
17709 (license license:bsd-2)))
17710
17711(define-public anystyle
17712 (package
17713 (name "anystyle")
17714 (version "1.4.5")
17715 (source (origin
17716 (method git-fetch)
17717 (uri (git-reference
17718 (url "https://github.com/inukshuk/anystyle-cli")
17719 (commit (string-append "v" version))))
17720 (sha256
17721 (base32
17722 "10jx830mx9vh7rsz87ndvz8w5b5azd9s231vwyb0dqxs921v6qwy"))
17723 (file-name (git-file-name name version))))
17724 (build-system ruby-build-system)
17725 (propagated-inputs
17726 (list ruby-anystyle
17727 ruby-bibtex-ruby
17728 ruby-gli))
17729 (native-inputs
17730 (list ruby-gdbm
17731 txt2man))
17732 (arguments
17733 (list
17734 #:modules
17735 `((guix build ruby-build-system)
17736 (ice-9 popen)
17737 (srfi srfi-1)
17738 (guix build utils))
17739 #:phases
17740 #~(modify-phases %standard-phases
17741 (add-after 'extract-gemspec 'less-strict-dependencies
17742 (lambda args
17743 (substitute* "anystyle-cli.gemspec"
17744 (("'bibtex-ruby', '[^']*'")
17745 "'bibtex-ruby'"))))
17746 (add-before 'build 'change-default-dictionary-adapter
17747 (lambda args
17748 ;; Since we always have gdbm available, using it will give a
17749 ;; faster startup time, which is particularly worth-while for
17750 ;; a command-line tool.
17751 (substitute* "bin/anystyle"
17752 (("default_value: 'ruby',")
17753 "default_value: 'gdbm', # patched for Guix"))))
17754 (replace 'check
17755 (lambda* (#:key tests? #:allow-other-keys)
17756 ;; There are no tests, but let's use this opportunity to do a
17757 ;; basic test of our own that things run ok. It works especially
17758 ;; well to test this here since we know the 'ruby-anystile'
17759 ;; package is in its final, immutable installed form.
17760 (when tests?
17761 (let ((common
17762 `("require 'anystyle'"
17763 ,(string-append
17764 "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture"
17765 " et la différence (1 éd.). Paris: Éditions du"
17766 " Seuil.'"))))
17767 (for-each
17768 (lambda (lines)
17769 (apply invoke "ruby"
17770 (fold-right (lambda (line lst)
17771 (cons* "-e" line lst))
17772 '()
17773 lines)))
17774 `(,common
17775 ("require 'anystyle/dictionary'"
17776 "AnyStyle::Dictionary.defaults[:adapter] = :gdbm"
17777 ,@common)))))))
17778 (add-after 'wrap 'check-cli
17779 (lambda* (#:key tests? outputs #:allow-other-keys)
17780 (when tests?
17781 (with-output-to-file "check-cli.in"
17782 (lambda ()
17783 (for-each
17784 display
17785 '("Derrida, J. (1967). L’écriture et la différence "
17786 "(1 éd.). Paris: Éditions du Seuil.\n"))))
17787 (invoke (search-input-file outputs "/bin/anystyle")
17788 "parse"
17789 "check-cli.in"))))
17790 (add-after 'wrap 'generate-man-page
17791 ;; generating a man page also tests that the command actually runs
17792 (lambda args
17793 (define (run-with-output-file file command . args)
17794 (format (current-output-port)
17795 "running: ~s\nwith output to: ~s\n"
17796 (cons command args)
17797 file)
17798 (unless (zero?
17799 (with-output-to-file file
17800 (lambda ()
17801 (status:exit-val
17802 (close-pipe
17803 (apply open-pipe* OPEN_WRITE command args))))))
17804 (error "command failed")))
17805 (let ((anystyle (string-append #$output "/bin/anystyle")))
17806 (run-with-output-file "intro.txt"
17807 anystyle "--help")
17808 (for-each (lambda (cmd)
17809 (let ((file (string-append cmd ".txt")))
17810 (run-with-output-file file
17811 anystyle cmd "--help")
17812 ;; indent headings to create subsections
17813 (substitute* file
17814 (("^[A-Z]" orig)
17815 (string-append " " orig)))
17816 ;; generate a section heading
17817 (call-with-output-file
17818 (string-append "section-" file)
17819 (lambda (out)
17820 (format out "\n\n~a COMMAND\n\n"
17821 (string-upcase cmd))))))
17822 '("check" "find" "parse" "train"))
17823 (substitute* `("intro.txt"
17824 "check.txt" "find.txt" "parse.txt" "train.txt")
17825 ;; format "tag list" for txt2man"
17826 ((" - ")
17827 " ")
17828 ;; restore formatting of the "name" sections
17829 (("(anystyle|check|find|parse|train) ([A-Z])" _ cmd post)
17830 (string-append cmd " - " post)))
17831 (run-with-output-file "anystyle.txt"
17832 "cat"
17833 "intro.txt"
17834 "section-check.txt" "check.txt"
17835 "section-find.txt" "find.txt"
17836 "section-parse.txt" "parse.txt"
17837 "section-train.txt" "train.txt")
17838 (run-with-output-file
17839 "anystyle.1"
17840 "txt2man"
17841 "-v" "General Commands Manual" "-t" "anystyle" "-s" "1"
17842 "-r" #$(string-append "anystyle-cli "
17843 (package-version this-package))
17844 "-B" "check" "-B" "find" "-B" "parse" "-B" "train"
17845 "anystyle.txt")
17846 (install-file "anystyle.1"
17847 (string-append #$output "/share/man/man1"))))))))
17848 (home-page "https://anystyle.io")
17849 (synopsis "Fast and smart citation reference parsing")
17850 (description
17851 "AnyStyle is a very fast and smart parser for academic reference lists
17852and bibliographies. AnyStyle uses powerful machine learning heuristics based
17853on Conditional Random Fields and aims to make it easy to train the model with
17854data that is relevant to your parsing needs.
17855
17856This package provides the @command{anystyle} command-line utility. AnyStyle
17857can also be used as a Ruby library or as a web application, though the later
17858has not yet been packaged for Guix.")
17859 (license license:bsd-2)
17860 (properties `((upstream-name . "anystyle-cli")))))
17861
17862(define-public ruby-google-protobuf
17863 (package
17864 (name "ruby-google-protobuf")
17865 (version "4.35.1")
17866 (source (origin
17867 (method url-fetch)
17868 (uri (rubygems-uri "google-protobuf" version))
17869 (sha256
17870 (base32
17871 "09ipzsijxkrgwnyic0l4yhnazw46ca7ll0adza6za66r649lg9m3"))))
17872 (build-system ruby-build-system)
17873 (arguments
17874 (list #:tests? #f)) ; There are no tests.
17875 (native-inputs (list ruby-rake))
17876 (synopsis "Protocol Buffers are Google's data interchange format")
17877 (description "This library contains the Ruby extension that implements
17878Protocol Buffers functionality in Ruby.
17879
17880The Ruby extension makes use of generated Ruby code that defines message and
17881enum types in a Ruby DSL. You may write definitions in this DSL directly, but
17882we recommend using protoc's Ruby generation support with @code{.proto} files.
17883The build process in this directory only installs the extension; you need to
17884install @code{protoc} (in package ruby-grpc-tools) as well to have Ruby code
17885generation functionality.")
17886 (home-page "https://protobuf.dev")
17887 (license license:bsd-3)))
17888
17889(define-public ruby-googleapis-common-protos-types
17890 (package
17891 (name "ruby-googleapis-common-protos-types")
17892 (version "1.13.0")
17893 (source (origin
17894 (method url-fetch)
17895 (uri (rubygems-uri "googleapis-common-protos-types" version))
17896 (sha256
17897 (base32
17898 "1zrxnv9s2q39f2nh32x7nbfi8lpwzmmn3ji4adglg8dlfr1xrz16"))))
17899 (build-system ruby-build-system)
17900 (arguments
17901 `(#:tests? #f)) ;; has no tests
17902 (propagated-inputs (list ruby-google-protobuf))
17903 (synopsis "Common protocol buffer types used by Google APIs")
17904 (description "Common protocol buffer types used by Google APIs")
17905 (home-page "https://github.com/googleapis/common-protos-ruby")
17906 (license license:asl2.0)))
17907
17908(define-public ruby-grpc
17909 (package
17910 (name "ruby-grpc")
17911 (version "1.74.1")
17912 (source (origin
17913 (method url-fetch)
17914 (uri (rubygems-uri "grpc" version))
17915 (sha256
17916 (base32
17917 "12qy6yga90hs2pdzkxwm80d38dbmjdxmf2szqwb40ky1jr4klfp7"))))
17918 (build-system ruby-build-system)
17919 (arguments
17920 `(#:tests? #f)) ;; has no tests
17921 ;; TODO remove third-party sources (zlib, upb, utf8-range, re2, c-ares,
17922 ;; boringssl-with-bazel, address_sorting, abseil-cpp), see Makefile
17923 (propagated-inputs (list ruby-google-protobuf
17924 ruby-googleapis-common-protos-types))
17925 (synopsis "GRPC system in Ruby")
17926 (description "GRPC is a high performance, open-source universal RPC
17927framework. This package provides a ruby interface for it.")
17928 (home-page "https://github.com/grpc/grpc/tree/master/src/ruby")
17929 (license license:asl2.0)))
17930
17931;;;
17932;;; Avoid adding new packages to the end of this file. To reduce the chances
17933;;; of a merge conflict, place them above by existing packages with similar
17934;;; functionality or similar names.
17935;;;