projects/guix·blob java-team · refs

17725 lines · 654.6 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 jupyter)
81 #:use-module (gnu packages rails)
82 #:use-module (gnu packages readline)
83 #:use-module (gnu packages autotools)
84 #:use-module (gnu packages graphviz)
85 #:use-module (gnu packages haskell-xyz)
86 #:use-module (gnu packages java)
87 #:use-module (gnu packages libffi)
88 #:use-module (gnu packages libidn)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages lsof)
91 #:use-module (gnu packages man)
92 #:use-module (gnu packages maths)
93 #:use-module (gnu packages ncurses)
94 #:use-module (gnu packages networking)
95 #:use-module (gnu packages node)
96 #:use-module (gnu packages pdf)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-build)
102 #:use-module (gnu packages python-xyz)
103 #:use-module (gnu packages ragel)
104 #:use-module (gnu packages rsync)
105 #:use-module (gnu packages sqlite)
106 #:use-module (gnu packages tls)
107 #:use-module (gnu packages valgrind)
108 #:use-module (gnu packages version-control)
109 #:use-module (gnu packages virtualization)
110 #:use-module (gnu packages web-browsers)
111 #:use-module (gnu packages serialization)
112 #:use-module (gnu packages unicode)
113 #:use-module (gnu packages xml)
114 #:use-module (gnu packages web)
115 #:use-module (gnu packages ruby)
116 #:use-module (gnu packages ruby-check)
117 #:use-module ((srfi srfi-1) #:select (alist-delete)))
118
119(define %prawn-project-licenses
120 ;; This set of licenses applies to most (all?) components of the Prawn
121 ;; project (it is triple licensed).
122 (list license:ruby
123 license:gpl2+
124 license:gpl3+))
125
126(define-public ruby-colsole
127 (package
128 (name "ruby-colsole")
129 (version "1.0.0")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (rubygems-uri "colsole" version))
134 (sha256
135 (base32 "1fvf6dz2wsvjk7q24z0dm8lajq3p2l6i5ywf3mxj683rmhwq49bg"))))
136 (build-system ruby-build-system)
137 (arguments
138 (list
139 #:phases
140 #~(modify-phases %standard-phases
141 (replace 'check
142 (lambda* (#:key tests? #:allow-other-keys)
143 (when tests?
144 (invoke "rspec" "-c" "spec")))))))
145 (native-inputs (list ruby-rspec))
146 (synopsis "Utility functions for colorful console applications")
147 (description
148 "Utility functions for writing colorful console applications.")
149 (home-page "https://github.com/DannyBen/colsole")
150 (license license:expat)))
151
152(define-public ruby-commander
153 (package
154 (name "ruby-commander")
155 (version "4.6.0")
156 (source
157 (origin
158 (method url-fetch)
159 (uri (rubygems-uri "commander" version))
160 (sha256
161 (base32
162 "1n8k547hqq9hvbyqbx2qi08g0bky20bbjca1df8cqq5frhzxq7bx"))))
163 (build-system ruby-build-system)
164 (arguments
165 (list
166 #:test-target "spec"
167 #:phases
168 #~(modify-phases %standard-phases
169 ;; Don't run or require rubocop, the code linting tool, as this is a
170 ;; bit unnecessary.
171 (add-after 'unpack 'dont-run-rubocop
172 (lambda _
173 (substitute* "Rakefile"
174 ((".*rubocop.*") "")
175 ((".*RuboCop.*") "")))))))
176 (propagated-inputs
177 (list ruby-highline))
178 (native-inputs
179 (list bundler ruby-rspec-core ruby-rspec-expectations
180 ruby-rspec-mocks ruby-simplecov))
181 (home-page "https://github.com/commander-rb/commander")
182 (synopsis "Library for building Ruby command-line executables")
183 (description
184 "Commander aims to be a complete solution for Ruby command-line
185executables. Commander bridges the gap between other terminal related
186libraries (OptionParser, HighLine), while providing many new features, and an
187elegant API.")
188 (license license:expat)))
189
190(define-public ruby-completely
191 (package
192 (name "ruby-completely")
193 (version "0.7.5")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (rubygems-uri "completely" version))
198 (sha256
199 (base32 "00nakfa4yg4qj8m4ircg5mkr99xjzynrkisr5ihpbdpylsqgbf2f"))))
200 (build-system ruby-build-system)
201 (propagated-inputs (list ruby-colsole ruby-mister-bin))
202 (arguments
203 (list
204 #:tests? #f)) ; no tests
205 (native-inputs (list ruby-rspec))
206 (synopsis
207 "Generate Bash completion scripts using simple YAML configuration")
208 (description
209 "Command line utility and a Ruby library to generate Bash completion
210scripts from simple YAML configuration.")
211 (home-page "https://github.com/bashly-framework/completely")
212 (license license:expat)))
213
214(define-public ruby-docopt-ng
215 (package
216 (name "ruby-docopt-ng")
217 (version "0.7.1")
218 (source
219 (origin
220 (method url-fetch)
221 (uri (rubygems-uri "docopt_ng" version))
222 (sha256
223 (base32 "0rsnl5s7k2s1gl4n4dg68ssg577kf11sl4a4l2lb2fpswj718950"))))
224 (build-system ruby-build-system)
225 (arguments
226 (list
227 #:phases
228 #~(modify-phases %standard-phases
229 (replace 'check
230 (lambda _
231 (invoke "rspec" "-c" "spec"))))))
232 (native-inputs (list ruby-rspec))
233 (synopsis
234 "The Ruby port of Docopt, the option parser written originally in Python")
235 (description
236 "Parse command line arguments from nothing more than a usage message.")
237 (home-page "https://docopt.org/")
238 (license license:expat)))
239
240(define-public ruby-erb
241 (package
242 (name "ruby-erb")
243 (version "6.0.7")
244 (source
245 (origin
246 (method git-fetch) ;for tests
247 (uri (git-reference
248 (url "https://github.com/ruby/erb")
249 (commit (string-append "v" version))))
250 (file-name (git-file-name name version))
251 (sha256
252 (base32 "0di25f0nsl99isnc1lr9r954sjs2c64cf31idzyfi9wr2s3gs6qw"))))
253 (build-system ruby-build-system)
254 (arguments
255 (list
256 #:phases
257 #~(modify-phases %standard-phases
258 (add-before 'check 'omit-failing-tests
259 (lambda _
260 ;; TODO: Remove when newer Ractor is used by default.
261 (substitute* "test/erb/test_erb.rb"
262 (("def test_.*ractor.*" def)
263 (string-append def "; omit \"incompatible Ractor usage\"\n"))))))))
264 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
265 (synopsis "Easy to use but powerful templating system")
266 (description "ERB is an easy to use, but also very powerful, template
267processor.")
268 (home-page "https://github.com/ruby/erb")
269 (license (list license:ruby license:bsd-2))))
270
271(define-public ruby-filewatcher
272 (package
273 (name "ruby-filewatcher")
274 (version "2.1.0")
275 (source
276 (origin
277 (method url-fetch)
278 (uri (rubygems-uri "filewatcher" version))
279 (sha256
280 (base32 "03f9v57c5zag09mi10yjhdx7y0vv2w5wrnwzbij9hhkwh43rk077"))))
281 (build-system ruby-build-system)
282 (arguments
283 (list
284 #:phases
285 #~(modify-phases %standard-phases
286 (replace 'check
287 (lambda* (#:key tests? #:allow-other-keys)
288 (when tests?
289 (substitute* "spec/spec_helper.rb"
290 (("require 'simplecov'") "")
291 (("SimpleCov\\.start") ""))
292 (setenv "HOME" (getcwd))
293 (invoke "rspec" "-Ilib" "-rfilewatcher/spec_helper"
294 "-Ispec" "-rspec_helper")))))))
295 (native-inputs (list ruby-rspec))
296 (propagated-inputs (list ruby-module-methods))
297 (synopsis "Ruby gem to perform actions when files are changed")
298 (description "Detect changes in file system. Works anywhere. No config
299files. Pure Ruby implementation and minimalistic Ruby API.")
300 (home-page "http://github.com/filewatcher/filewatcher")
301 (license license:expat)))
302
303(define-public ruby-gtx
304 (package
305 (name "ruby-gtx")
306 (version "0.1.1")
307 (source
308 (origin
309 (method url-fetch)
310 (uri (rubygems-uri "gtx" version))
311 (sha256
312 (base32 "1w0hbr9i6jpn9spbb13ipg2fajkwa51y56jw21ziwsddmv997274"))))
313 (build-system ruby-build-system)
314 (arguments
315 (list
316 ;; no tests in Gem
317 #:tests? #f))
318 (native-inputs (list ruby-rspec))
319 (propagated-inputs (list ruby-erb))
320 (synopsis "Minimal template engine that transpiles to ERB")
321 (description "@code{GTX} creates templates are code-first, while also
322that transpiling to ERB.")
323 (home-page "https://github.com/dannyben/gtx")
324 (license license:expat)))
325
326(define-public ruby-highline
327 (package
328 (name "ruby-highline")
329 (version "3.1.2")
330 (source
331 (origin
332 (method git-fetch) ;for tests
333 (uri (git-reference
334 (url "https://github.com/JEG2/highline")
335 (commit (string-append "v" version))))
336 (file-name (git-file-name name version))
337 (sha256
338 (base32
339 "09ysksjmlzhpr5d21qhhl7bq7b3f03qk7jc1k08iwrvx3fjid8gv"))))
340 (build-system ruby-build-system)
341 (arguments
342 (list
343 #:phases
344 #~(modify-phases %standard-phases
345 (add-before 'check 'remove-coverage-and-failing-test
346 (lambda _
347 (substitute* "test/test_helper.rb"
348 (("require \"simplecov\" if RUBY_ENGINE == \"ruby\"")
349 ""))
350 ;; TODO: Package dry-types gem.
351 (delete-file "test/test_highline.rb"))))))
352 (native-inputs
353 (list bundler ruby-code-statistics))
354 (synopsis
355 "HighLine helps you build command-line interfaces")
356 (description
357 "HighLine provides a high-level IO library that provides validation,
358type conversion, and more for command-line interfaces. HighLine also includes
359a menu system for providing multiple options to the user.")
360 (home-page "https://github.com/JEG2/highline")
361 (license (list license:gpl2 license:ruby))))
362
363(define-public ruby-lp
364 (package
365 (name "ruby-lp")
366 (version "0.2.1")
367 (source
368 (origin
369 (method url-fetch)
370 (uri (rubygems-uri "lp" version))
371 (sha256
372 (base32 "0ns1aza32n929w7smg1dsn4g6qlfi7k1jrvssyn35cicmwn0gyyr"))))
373 (build-system ruby-build-system)
374 (arguments
375 (list
376 ;; no tests in Gem
377 #:tests? #f))
378 (native-inputs (list ruby-rspec))
379 (synopsis "Lovely print")
380 (description "Colorful YAML dump for debug purposes.")
381 (home-page "https://github.com/dannyben/lp")
382 (license license:expat)))
383
384(define-public ruby-mister-bin
385 (package
386 (name "ruby-mister-bin")
387 (version "0.8.1")
388 (source
389 (origin
390 (method url-fetch)
391 (uri (rubygems-uri "mister_bin" version))
392 (sha256
393 (base32 "1zz3vpy6xrgzln2dpxgcnrq1bpzz0syl60whqc9zf8j29mayw1fy"))))
394 (build-system ruby-build-system)
395 (arguments
396 (list
397 ;; no tests in Gem
398 #:tests? #f))
399 (native-inputs (list ruby-rspec))
400 (propagated-inputs (list ruby-colsole ruby-docopt-ng))
401 (synopsis "Easily add a command line interface to Ruby Gems")
402 (description "Develop rich, scalable and testable command line interfaces
403for Ruby Gems or other Ruby applications.")
404 (home-page "https://github.com/dannyben/mister_bin")
405 (license license:expat)))
406
407(define-public ruby-module-methods
408 (package
409 (name "ruby-module-methods")
410 (version "0.1.0")
411 (source
412 (origin
413 (method url-fetch)
414 (uri (rubygems-uri "module_methods" version))
415 (sha256
416 (base32 "1886wjscfripgzlmyvcd0jmlzwr6hxvklm2a5rm32dw5bf7bvjki"))))
417 (build-system ruby-build-system)
418 (arguments
419 (list
420 #:tests? #f)) ;no tests
421 (native-inputs (list ruby-rspec))
422 (synopsis "Extendable module for modules with instance and class methods")
423 (description
424 "Extendable module for modules with instance and class methods. These
425modules can be included into each other modules and saving all chain, including
426@code{inherited} or @code{included} (class) methods.")
427 (home-page "https://github.com/AlexWayfer/module_methods")
428 (license license:expat)))
429
430(define-public ruby-ostruct
431 (package
432 (name "ruby-ostruct")
433 (version "0.6.3")
434 (source
435 (origin
436 (method url-fetch)
437 (uri (rubygems-uri "ostruct" version))
438 (sha256
439 (base32 "04nrir9wdpc4izqwqbysxyly8y7hsfr4fsv69rw91lfi9d5fv8lm"))))
440 (arguments
441 (list
442 ;; no tests
443 #:tests? #f))
444 (build-system ruby-build-system)
445 (synopsis "Class to build custom data structures, similar to a Hash")
446 (description
447 "An OpenStruct is a data structure, similar to a Hash, that
448allows the definition of arbitrary attributes with their accompanying values.
449This is accomplished by using Ruby's metaprogramming to define methods on the
450class itself.")
451 (home-page "https://github.com/ruby/ostruct")
452 (license (list license:bsd-2))))
453
454(define-public ruby-pastel
455 (package
456 (name "ruby-pastel")
457 (version "0.8.0")
458 (source
459 (origin
460 (method url-fetch)
461 (uri (rubygems-uri "pastel" version))
462 (sha256
463 (base32 "0xash2gj08dfjvq4hy6l1z22s5v30fhizwgs10d6nviggpxsj7a8"))))
464 (build-system ruby-build-system)
465 (arguments
466 (list
467 ;; no tests
468 #:tests? #f))
469 (propagated-inputs (list ruby-tty-color))
470 (synopsis "Ruby terminal output styling with an intuitive and clean API")
471 (description
472 "Ruby @code{::Pastel} is a simple, minimal and intuitive API
473for styling strings that doesn't monkey patch the String class. Part of the
474TTY Toolkit project which provides a range of terminal application capabilities.")
475 (home-page "https://ttytoolkit.org")
476 (license license:expat)))
477
478(define-public ruby-requires
479 (package
480 (name "ruby-requires")
481 (version "1.1.0")
482 (source
483 (origin
484 (method url-fetch)
485 (uri (rubygems-uri "requires" version))
486 (sha256
487 (base32 "0dlibxp6jfdl4favj2pgsm2pw84hhr2cdiizfs51ldkpddm50njp"))))
488 (build-system ruby-build-system)
489 (arguments
490 (list
491 ;; no tests
492 #:tests? #f))
493 (native-inputs (list ruby-rspec))
494 (synopsis "Adds Ruby functions that allow requiring a directory")
495 (description "A tiny convenience function (@code{requires}) to require
496or autoload all Ruby files in a directory.")
497 (home-page "https://github.com/DannyBen/requires/")
498 (license license:expat)))
499
500(define-public ruby-rsync
501 (package
502 (name "ruby-rsync")
503 (version "1.0.9")
504 (source
505 (origin
506 (method url-fetch)
507 (uri (rubygems-uri "rsync" version))
508 (sha256
509 (base32
510 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
511 (build-system ruby-build-system)
512 (arguments
513 '(#:test-target "spec"
514 #:phases
515 (modify-phases %standard-phases
516 (add-after 'unpack 'remove-coveralls-requirement
517 (lambda _
518 (substitute* "spec/spec_helper.rb"
519 (("require 'coveralls'") "")
520 (("Coveralls.wear!") "")))))))
521 (native-inputs
522 (list bundler rsync ruby-rspec-core ruby-rspec-expectations
523 ruby-rspec-mocks))
524 (home-page "https://github.com/jbussdieker/ruby-rsync")
525 (synopsis "Ruby wrapper around rsync")
526 (description
527 "Ruby Rsync is a Ruby library that can synchronize files between remote
528hosts by wrapping the @file{rsync} binary.")
529 (license license:expat)))
530
531(define-public ruby-strings
532 (package
533 (name "ruby-strings")
534 (version "0.2.1")
535 (source
536 (origin
537 (method url-fetch)
538 (uri (rubygems-uri "strings" version))
539 (sha256
540 (base32 "1yynb0qhhhplmpzavfrrlwdnd1rh7rkwzcs4xf0mpy2wr6rr6clk"))))
541 (build-system ruby-build-system)
542 (arguments
543 (list
544 #:phases
545 #~(modify-phases %standard-phases
546 (replace 'check
547 (lambda* (#:key tests? #:allow-other-keys)
548 (when tests?
549 (invoke "rspec" "-c" "spec")))))))
550 (native-inputs (list ruby-rspec))
551 (propagated-inputs (list ruby-strings-ansi ruby-unicode-display-width
552 ruby-unicode-utils))
553 (synopsis "Ruby functions for transforming strings")
554 (description "This package provides a set of methods for working with
555strings such as align, truncate, wrap and many more.")
556 (home-page "https://github.com/piotrmurach/strings")
557 (license license:expat)))
558
559(define-public ruby-strings-ansi
560 (package
561 (name "ruby-strings-ansi")
562 (version "0.2.0")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (rubygems-uri "strings-ansi" version))
567 (sha256
568 (base32 "120wa6yjc63b84lprglc52f40hx3fx920n4dmv14rad41rv2s9lh"))))
569 (build-system ruby-build-system)
570 (arguments
571 (list
572 ;; FIXME: tests seems to depend on ruby-strings
573 #:tests? #f))
574 (native-inputs (list bundler ruby-rspec))
575 (synopsis "Handle ANSI escape codes in strings")
576 (description
577 "@code{strings::ANSI} provides Ruby methods for processing ANSI escape
578codes in strings.")
579 (home-page "https://github.com/piotrmurach/strings-ansi")
580 (license license:expat)))
581
582(define-public ruby-tty-color
583 (package
584 (name "ruby-tty-color")
585 (version "0.6.0")
586 (source
587 (origin
588 (method url-fetch)
589 (uri (rubygems-uri "tty-color" version))
590 (sha256
591 (base32 "0aik4kmhwwrmkysha7qibi2nyzb4c8kp42bd5vxnf8sf7b53g73g"))))
592 (build-system ruby-build-system)
593 (arguments
594 (list
595 ;; no tests in Gem
596 #:tests? #f))
597 (native-inputs (list ruby-rspec))
598 (synopsis "Terminal color capabilities detection for Ruby")
599 (description
600 "@code{TTY:Color} provides an independent color support
601detection component. It is part of the TTY Toolkit project which provides
602a range of terminal application capabilities.")
603 (home-page "https://ttytoolkit.org")
604 (license license:expat)))
605
606(define-public ruby-tty-markdown
607 (package
608 (name "ruby-tty-markdown")
609 (version "0.7.2")
610 (source
611 (origin
612 (method url-fetch)
613 (uri (rubygems-uri "tty-markdown" version))
614 (sha256
615 (base32 "04f599zn5rfndq4d9l0acllfpc041bzdkkz2h6x0dl18f2wivn0y"))))
616 (build-system ruby-build-system)
617 (arguments
618 (list
619 #:phases
620 #~(modify-phases %standard-phases
621 (replace 'check
622 (lambda* (#:key tests? #:allow-other-keys)
623 (when tests?
624 (invoke "rspec" "-c" "spec")))))))
625 (native-inputs (list ruby-rspec))
626 (propagated-inputs (list ruby-kramdown
627 ruby-pastel
628 ruby-rouge
629 ruby-strings
630 ruby-tty-color
631 ruby-tty-screen))
632 (synopsis "Convert a markdown document into terminal friendly output")
633 (description
634 "@code{TTY:Markdown} is a markdown processing component for Ruby. It's
635used to convert markdown text or documents into a terminal friendly output.
636Part of the TTY Toolkit project.")
637 (home-page "https://ttytoolkit.org")
638 (license license:expat)))
639
640(define-public ruby-tty-screen
641 (package
642 (name "ruby-tty-screen")
643 (version "0.8.2")
644 (source
645 (origin
646 (method url-fetch)
647 (uri (rubygems-uri "tty-screen" version))
648 (sha256
649 (base32 "0l4vh6g333jxm9lakilkva2gn17j6gb052626r1pdbmy2lhnb460"))))
650 (build-system ruby-build-system)
651 (arguments
652 (list
653 ;; no tests
654 #:tests? #f))
655 (native-inputs (list ruby-rspec))
656 (synopsis "Terminal screen properties detection for Ruby")
657 (description
658 "Cross-platform terminal screen size detection that supports Ruby MRI,
659JRuby, TruffleRuby and Rubinius interpreters. @code{TTY:Screen} is part of
660the @code{TTY} Toolkit projects.")
661 (home-page "https://ttytoolkit.org")
662 (license license:expat)))
663
664(define-public ruby-unicode-utils
665 (package
666 (name "ruby-unicode-utils")
667 (version "1.4.0")
668 (source
669 (origin
670 (method url-fetch)
671 (uri (rubygems-uri "unicode_utils" version))
672 (sha256
673 (base32 "0h1a5yvrxzlf0lxxa1ya31jcizslf774arnsd89vgdhk4g7x08mr"))))
674 (build-system ruby-build-system)
675 (arguments
676 (list
677 ;; no tests in Gem
678 #:tests? #f))
679 (synopsis "Additional Unicode aware functions for Ruby 1.9")
680 (description
681 "@code{UnicodeUtils} implements Unicode algorithms for case
682conversion, normalization, text segmentation and more in pure Ruby code.")
683 (home-page "https://github.com/lang/unicode_utils")
684 (license license:bsd-2)))
685
686(define-public ruby-i18n
687 (package
688 (name "ruby-i18n")
689 (version "1.13.0")
690 (source (origin
691 (method url-fetch)
692 (uri (rubygems-uri "i18n" version))
693 (sha256
694 (base32
695 "1yk33slipi3i1kydzrrchbi7cgisaxym6pgwlzx7ir8vjk6wl90x"))))
696 (build-system ruby-build-system)
697 (arguments
698 '(#:tests? #f)) ; no tests
699 (propagated-inputs (list ruby-concurrent-ruby))
700 (synopsis "Internationalization library for Ruby")
701 (description "Ruby i18n is an internationalization and localization
702solution for Ruby programs. It features translation and localization,
703interpolation of values to translations, pluralization, customizable
704transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
705translation data, custom key/scope separator, custom exception handlers, and
706an extensible architecture with a swappable backend.")
707 (home-page "https://github.com/ruby-i18n/i18n")
708 (license license:expat)))
709
710(define-public ruby-ice-nine
711 (package
712 (name "ruby-ice-nine")
713 (version "0.11.2")
714 (source
715 (origin
716 (method url-fetch)
717 (uri (rubygems-uri "ice_nine" version))
718 (sha256
719 (base32 "1nv35qg1rps9fsis28hz2cq2fx1i96795f91q4nmkm934xynll2x"))))
720 (build-system ruby-build-system)
721 (arguments
722 (list #:tests? #f)) ;Dependency on convoluted unpackaged ruby-devtools.
723 (synopsis "Deep Freeze Ruby Objects")
724 (description
725 "This package provides a function to deep freeze Ruby objects.")
726 (home-page "https://github.com/dkubb/ice_nine")
727 (license license:expat)))
728
729(define-public ruby-io-console
730 (package
731 (name "ruby-io-console")
732 (version "0.6.0")
733 (source (origin
734 (method git-fetch) ;for tests
735 (uri (git-reference
736 (url "https://github.com/ruby/io-console/")
737 (commit (string-append "v" version))))
738 (file-name (git-file-name name version))
739 (sha256
740 (base32
741 "0gwxrp29b6awkid1sf85sbh529mnq6hb86m8c2443cm6nc4vr8qb"))))
742 (build-system ruby-build-system)
743 (arguments
744 (list #:phases #~(modify-phases %standard-phases
745 (add-after 'unpack 'delete-rakelib-files
746 (lambda _
747 ;; These depend on git and other extraneous
748 ;; dependencies, and are loaded by rake.
749 (delete-file-recursively "rakelib"))))))
750 (native-inputs (list ruby-rake-compiler))
751 (synopsis "Console capabilities library for IO instances")
752 (description "IO.console adds console capabilities to Ruby IO instances.")
753 (home-page "https://github.com/ruby/io-console")
754 (license license:bsd-2)))
755
756(define-public ruby-irb
757 (package
758 (name "ruby-irb")
759 (version "1.6.3")
760 (source (origin
761 (method url-fetch)
762 (uri (rubygems-uri "irb" version))
763 (sha256
764 (base32
765 "1h9s07n5v3z029v18924ws9vdkdc80n6llp9ccx77yg1krv2g0f3"))))
766 (build-system ruby-build-system)
767 ;; XXX: Disable the test suite, as it requires debug, which requires this
768 ;; package (dependency cycle).
769 (arguments (list #:tests? #f))
770 (propagated-inputs (list ruby-reline))
771 (synopsis "Ruby command-line tool for REPL (Read Eval Print Loop)")
772 (description "IRB is an interactive Ruby command-line tool for REPL (Read
773Eval Print Loop).")
774 (home-page "https://github.com/ruby/irb")
775 (license license:bsd-2)))
776
777(define-public ruby-irb-1.1.1
778 (package
779 (inherit ruby-irb)
780 (version "1.1.1")
781 (source (origin
782 (method url-fetch)
783 (uri (rubygems-uri "irb" version))
784 (sha256
785 (base32
786 "0h605w798s2bg9wg681ynvvzgdz1yy69gh387bl0khw9ll7wkn8v"))))))
787
788(define-public ruby-iruby
789 (package
790 (name "ruby-iruby")
791 (version "0.8.3")
792 (source
793 (origin
794 (method url-fetch)
795 (uri (rubygems-uri "iruby" version))
796 (sha256
797 (base32
798 "13qdw2ykzn6yjs4biiyvy1dr5j5v3kb1q7r98ds0kvg22rbs1s56"))))
799 (build-system ruby-build-system)
800 (arguments
801 (list
802 #:phases
803 #~(modify-phases %standard-phases
804 (add-before 'check 'prepare-for-tests
805 (lambda* (#:key inputs #:allow-other-keys)
806 ;; Remove Bundler setup.
807 (substitute* "test/run-test.rb"
808 (("require \"bundler/setup\"") ""))
809 ;; Set an exact Ruby executable path.
810 (substitute* "test/iruby/application/register_test.rb"
811 (("#!/usr/bin/env ruby")
812 (string-append "#!"
813 (search-input-file inputs "/bin/ruby"))))
814 (delete-file "test/integration_test.rb")
815 (setenv "HOME" (getcwd)))))))
816 (native-inputs (list ruby-rake ruby-test-unit ruby-test-unit-rr jupyter))
817 (inputs
818 (list python-ipython))
819 (propagated-inputs
820 (list ruby-data_uri
821 ruby-ffi-rzmq
822 ruby-irb
823 ruby-logger
824 ruby-mime-types
825 ;; Optional inputs
826 ruby-pry))
827 (synopsis "Ruby kernel for Jupyter/IPython")
828 (description
829 "This package provides a Ruby kernel for Jupyter/IPython frontends
830(e.g. notebook). Please note that to work, it requires the @samp{jupyter}
831package.")
832 (home-page "https://github.com/SciRuby/iruby")
833 (license license:expat)))
834
835(define-public ruby-date
836 (package
837 (name "ruby-date")
838 (version "3.3.3")
839 (source (origin
840 (method git-fetch)
841 (uri (git-reference
842 (url "https://github.com/ruby/date")
843 (commit (string-append "v" version))))
844 (file-name (git-file-name name version))
845 (sha256
846 (base32
847 "1jiqjnaap1jk1r8z37iicnzqha1rhc713qmcir17f4vnz8ac8v75"))))
848 (build-system ruby-build-system)
849 (arguments (list #:test-target "default"))
850 (native-inputs (list ruby-rake-compiler))
851 (synopsis "Ruby @code{Object} subclass with date comparison capability")
852 (description "This package provides a subclass of @code{Object} that
853includes the @code{Comparable} module for handling dates.")
854 (home-page "https://github.com/ruby/date")
855 (license license:bsd-2)))
856
857(define-public ruby-time
858 (package
859 (name "ruby-time")
860 (version "0.3.0")
861 (source (origin
862 (method git-fetch) ; for tests
863 (uri (git-reference
864 (url "https://github.com/ruby/time")
865 (commit (string-append "v" version))))
866 (file-name (git-file-name name version))
867 (sha256
868 (base32
869 "0jd6df2lxd60wcxyaf37j8v3nnfn952d5xhg6aap9zlcdmkk4g2n"))))
870 (build-system ruby-build-system)
871 (propagated-inputs (list ruby-date))
872 (native-inputs (list ruby-test-unit-ruby-core))
873 (synopsis
874 "Extends the Time class with methods for parsing and conversion")
875 (description
876 "When this gem is @code{require}d, it extends the Time class with with
877additional methods for parsing and converting Times.")
878 (home-page "https://github.com/ruby/time")
879 (license license:bsd-2)))
880
881(define-public ruby-sorted-set
882 (package
883 (name "ruby-sorted-set")
884 (version "1.0.3")
885 (source (origin
886 (method url-fetch)
887 (uri (rubygems-uri "sorted_set" version))
888 (sha256
889 (base32
890 "0brpwv68d7m9qbf5js4bg8bmg4v7h4ghz312jv9cnnccdvp8nasg"))))
891 (build-system ruby-build-system)
892 (propagated-inputs
893 (list ruby-rbtree ruby-set))
894 (synopsis
895 "Ruby Set variant whose elements are sorted in ascending order")
896 (description
897 "This package implements a variant of Set whose elements are sorted in
898ascending order")
899 (home-page "https://github.com/knu/sorted_set")
900 (license license:bsd-2)))
901
902(define-public ruby-rspec-given
903 (package
904 (name "ruby-rspec-given")
905 (version "3.8.2")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (rubygems-uri "rspec-given" version))
910 (sha256
911 (base32
912 "0xzzxjjzwrsp84p12sd6ab3jbm9kh7sbnqpxgc9mlfq3s3ll0fdj"))))
913 (build-system ruby-build-system)
914 (arguments
915 `(#:test-target "rs"
916 #:phases
917 (modify-phases %standard-phases
918 (add-after 'unpack 'fix-rakefile
919 (lambda _
920 (substitute* '("Rakefile" "rakelib/gemspec.rake")
921 (("require '\\./lib/given/.*") "")
922 (("Given::VERSION") (format #f "~s" ,version))
923 ;; Fix the error: "cannot load such file -- example_helper"
924 (("sh \"rspec")
925 "sh \"rspec -Ilib:examples"))))
926 (add-after 'extract-gemspec 'delete-failing-tests
927 ;; See: https://github.com/jimweirich/rspec-given/issues/57
928 ;; and https://github.com/rspec-given/rspec-given/issues/32
929 (lambda _
930 (substitute* ".gemspec"
931 (("\"spec/lib/given/line_extractor_spec.rb\".freeze, ")
932 "")
933 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
934 "")
935 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
936 ""))
937 (delete-file "spec/lib/given/line_extractor_spec.rb")
938 (delete-file "spec/lib/given/natural_assertion_spec.rb")
939 (delete-file "examples/integration/failing_messages_spec.rb"))))))
940 (native-inputs
941 (list ruby-rspec ruby-minitest))
942 (propagated-inputs
943 (list ruby-given-core ruby-rspec))
944 (synopsis "Given/When/Then for RSpec and Minitest")
945 (description "Given is an RSpec extension that allows the use of
946Given/When/Then terminology when defining specifications, in a way similar to
947the Cucumber Gherkin language.")
948 (home-page "https://github.com/rspec-given/rspec-given")
949 (license license:expat)))
950
951(define-public ruby-rspec-its
952 (package
953 (name "ruby-rspec-its")
954 (version "1.3.0")
955 (source
956 (origin
957 (method git-fetch)
958 (uri (git-reference
959 (url "https://github.com/rspec/rspec-its")
960 (commit (string-append "v" version))))
961 (file-name (git-file-name name version))
962 (sha256
963 (base32
964 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
965 (build-system ruby-build-system)
966 (arguments
967 `(#:test-target "spec"
968 #:phases
969 (modify-phases %standard-phases
970 (add-after 'unpack 'dont-install-gems-from-gemfile
971 (lambda _
972 (substitute* "Gemfile"
973 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
974 ""))))
975 (add-before 'build 'loosen-ffi-requirement
976 (lambda _
977 ;; Accept any version of ruby-ffi.
978 (substitute* "Gemfile"
979 ((" gem 'ffi', '~> 1\\.9\\.25'")
980 " gem 'ffi'"))))
981 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
982 (lambda _
983 (substitute* "rspec-its.gemspec"
984 (("rake.*") "rake'\n")
985 (("spec.add_development_dependency 'cucumber'.*")
986 "spec.add_development_dependency 'cucumber'\n")
987 (("bundler.*") "bundler'\n")
988 (("\"aruba.*") "'aruba'\n")))))))
989 (propagated-inputs
990 (list ruby-rspec-core ruby-rspec-expectations))
991 (native-inputs
992 (list bundler ruby-cucumber ruby-ffi ruby-aruba))
993 (synopsis "RSpec extension that provides the @code{its} method")
994 (description
995 "RSpec::Its provides the its method as a short-hand to specify the expected
996value of an attribute. For example, one can use @code{its(:size)\\{should
997eq(1)\\}}.")
998 (home-page "https://github.com/rspec/rspec-its")
999 (license license:expat)))
1000
1001;;; This variant is used to break a cycle with ruby-protobuf.
1002(define-public ruby-rspec-its-minimal
1003 (hidden-package
1004 (package
1005 (inherit ruby-rspec-its)
1006 (arguments
1007 (substitute-keyword-arguments arguments
1008 ((#:tests? _ #f) #f)))
1009 (native-inputs '()))))
1010
1011(define-public ruby-rspec-block-is-expected
1012 (package
1013 (name "ruby-rspec-block-is-expected")
1014 (version "1.0.5")
1015 (source (origin
1016 (method git-fetch) ;for tests
1017 (uri (git-reference
1018 (url "https://github.com/pboling/rspec-block_is_expected")
1019 (commit (string-append "v" version))))
1020 (file-name (git-file-name name version))
1021 (sha256
1022 (base32
1023 "1zi5z12lkw3fiwgr7g61845wj73asr2vzw4zsjv45klnnfspwass"))))
1024 (build-system ruby-build-system)
1025 (arguments
1026 (list #:phases #~(modify-phases %standard-phases
1027 (add-after 'unpack 'relax-requirements
1028 (lambda _
1029 (substitute* "Rakefile"
1030 (("require 'rubocop/rake_task'") "")
1031 (("RuboCop::RakeTask.new") ""))
1032 ;; Contains extraneous requirements not actually
1033 ;; needed for the test suite.
1034 (delete-file "Gemfile")))
1035 (add-before 'build 'drop-signing-key-requirement
1036 (lambda _
1037 (substitute* "rspec-block_is_expected.gemspec"
1038 (("spec.signing_key =.*")
1039 "spec.signing_key = nil")))))))
1040 (native-inputs (list ruby-rspec-pending-for ruby-rspec-expectations))
1041 (propagated-inputs (list ruby-rspec-core))
1042 (synopsis "Simplify testing of blocks in RSpec")
1043 (description "This RSpec plugin allows you to use @code{block_is_expected}
1044similarly to how you would use @code{is_expected} if a block was wrapping the
1045subject.")
1046 (home-page "https://github.com/pboling/rspec-block_is_expected")
1047 (license license:expat)))
1048
1049(define-public ruby-rspec-block-is-expected-bootstrap
1050 (package/inherit ruby-rspec-block-is-expected
1051 (arguments
1052 (substitute-keyword-arguments
1053 (package-arguments ruby-rspec-block-is-expected)
1054 ((#:tests? tests? #t)
1055 #f)))
1056 (native-inputs '())
1057 (properties '((hidden? . #t)))))
1058
1059(define-public ruby-rspec-pending-for
1060 (package
1061 (name "ruby-rspec-pending-for")
1062 (version "0.1.17")
1063 (source
1064 (origin
1065 (method git-fetch) ;for tests
1066 (uri (git-reference
1067 (url "https://github.com/pboling/rspec-pending_for")
1068 (commit (string-append "v" version))))
1069 (file-name (git-file-name name version))
1070 (sha256
1071 (base32 "0mczm7lwcji2q7xhsrrpffhgdn0n6kdykvx64y2r6726fs467wnl"))))
1072 (build-system ruby-build-system)
1073 (arguments
1074 (list
1075 #:phases
1076 #~(modify-phases %standard-phases
1077 (add-before 'build 'configure
1078 (lambda _
1079 (substitute* "rspec-pending_for.gemspec"
1080 (("spec\\.signing_key = .*")
1081 "spec.signing_key = nil\n")))))))
1082 (native-inputs (list ruby-rspec-block-is-expected-bootstrap ruby-rspec
1083 ruby-simplecov))
1084 (propagated-inputs (list ruby-rspec-core ruby-ruby-engine
1085 ruby-ruby-version))
1086 (synopsis "Skip RSpec tests for specific Ruby engines or versions")
1087 (description
1088 "This RSpec plugin makes it easy to mark test cases as pending or skipped
1089for a specific Ruby engine (e.g. MRI or JRuby) or version combinations.")
1090 (home-page "https://github.com/pboling/rspec-pending_for")
1091 (license license:expat)))
1092
1093(define-public ruby-rspec-rerun
1094 (package
1095 (name "ruby-rspec-rerun")
1096 (version "1.1.0")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (rubygems-uri "rspec-rerun" version))
1101 (sha256
1102 (base32
1103 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
1104 (build-system ruby-build-system)
1105 (arguments
1106 '(;; No included tests
1107 #:tests? #f))
1108 (propagated-inputs (list ruby-rspec))
1109 (synopsis "Track failed RSpec tests to re-run them")
1110 (description
1111 "This package provides an automated way to track, and then re-run failed
1112RSpec tests.")
1113 (home-page "https://github.com/dblock/rspec-rerun")
1114 (license license:expat)))
1115
1116(define-public ruby-rspec-stubbed-env
1117 ;; There is no release nor tag (see:
1118 ;; https://github.com/pboling/rspec-stubbed_env/issues/7).
1119 (let ((revision "0")
1120 (commit "9d767dec77a6d130f6ad83c48a00a5c81b14b9fa"))
1121 (package
1122 (name "ruby-rspec-stubbed-env")
1123 (version (git-version "1.0.0" revision commit))
1124 (source (origin
1125 (method git-fetch)
1126 (uri (git-reference
1127 (url "https://github.com/pboling/rspec-stubbed_env")
1128 (commit commit)))
1129 (file-name (git-file-name name version))
1130 (sha256
1131 (base32
1132 "1dy4m04h613dp0s59rknjd6h4lqs1h17mffc5kd8kh046mk8nr1p"))))
1133 (build-system ruby-build-system)
1134 (arguments
1135 (list #:test-target "spec"
1136 #:phases #~(modify-phases %standard-phases
1137 (add-after 'unpack 'streamline-requirements
1138 (lambda _
1139 ;; Remove extraneous development dependencies.
1140 (substitute* "rspec-stubbed_env.gemspec"
1141 ((".*bundler.*") "")
1142 ((".*rubocop.*") "")))))))
1143 (native-inputs (list ruby-simplecov))
1144 (propagated-inputs (list ruby-rspec))
1145 (synopsis "RSpec plugin to stub environment variables")
1146 (description
1147 "This RSpec plugin can be used to stub environment variables in a scoped
1148context for testing.")
1149 (home-page "https://github.com/pboling/rspec-stubbed_env")
1150 (license license:expat))))
1151
1152(define-public ruby-rspec-wait
1153 (package
1154 (name "ruby-rspec-wait")
1155 (version "0.0.9")
1156 (source
1157 (origin
1158 (method url-fetch)
1159 (uri (rubygems-uri "rspec-wait" version))
1160 (sha256
1161 (base32
1162 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
1163 (build-system ruby-build-system)
1164 (arguments
1165 '(#:phases
1166 (modify-phases %standard-phases
1167 (replace 'check
1168 (lambda _
1169 (invoke "rake" "spec"))))))
1170 (native-inputs
1171 (list bundler))
1172 (propagated-inputs
1173 (list ruby-rspec))
1174 (home-page "https://github.com/laserlemon/rspec-wait")
1175 (synopsis "Wait for conditions in RSpec")
1176 (description
1177 "RSpec::Wait strives to make it easier to test asynchronous or slow
1178interactions.")
1179 (license license:expat)))
1180
1181(define-public ruby-rspec-debug
1182 (package
1183 (name "ruby-rspec-debug")
1184 (version "0.2.0")
1185 (source (origin
1186 (method git-fetch) ;for tests
1187 (uri (git-reference
1188 (url "https://github.com/ko1/rspec-debug")
1189 (commit (string-append "v" version))))
1190 (file-name (git-file-name name version))
1191 (sha256
1192 (base32
1193 "125p1zxjznkk765nyqvkksw8x1nbm7xk4sjc1wza2fyp5hvyiddn"))))
1194 (build-system ruby-build-system)
1195 (arguments
1196 (list #:test-target "spec"
1197 #:phases #~(modify-phases %standard-phases
1198 (add-after 'extract-gemspec 'relax-dependencies
1199 (lambda _
1200 (substitute* "Gemfile"
1201 (("~>") ">=")))))))
1202 (native-inputs (list ruby-rspec))
1203 (propagated-inputs (list ruby-debug))
1204 (synopsis "Invoke Ruby debugger when spec fails")
1205 (description "This package can be used to have the execution stopped for
1206inspection in the Ruby debugger upon encountering a failure. To use it, set
1207the @env{RSPEC_DEBUG} environment variable to @samp{true} then invoke the
1208@command{rspec} command as usual.")
1209 (home-page "https://github.com/ko1/rspec-debug")
1210 (license license:expat)))
1211
1212(define-public ruby-specinfra
1213 (package
1214 (name "ruby-specinfra")
1215 (version "2.88.1")
1216 (source (origin
1217 (method url-fetch)
1218 (uri (rubygems-uri "specinfra" version))
1219 (sha256
1220 (base32
1221 "07lap3sknncffpq9jw1x1mn9c5xxd058wxs5vnyz1y0lawdjfnsf"))))
1222 (build-system ruby-build-system)
1223 (propagated-inputs (list ruby-net-scp ruby-net-ssh ruby-net-telnet
1224 ruby-sfl))
1225 (arguments
1226 (list
1227 #:test-target "spec"
1228 #:phases
1229 #~(modify-phases %standard-phases
1230 (add-after 'extract-gemspec 'relax-dependencies
1231 (lambda _
1232 (substitute* "specinfra.gemspec"
1233 (("%q<net-telnet>.freeze, \\[.*\\]")
1234 "%q<net-telnet>.freeze, [\">= 0\"]")))))))
1235 (synopsis "Common layer for serverspec and itamae")
1236 (description "This Gem provides a common layer for serverspec and
1237itamae.")
1238 (home-page "https://github.com/mizzy/specinfra")
1239 (license license:expat)))
1240
1241(define-public ruby-serverspec
1242 (package
1243 (name "ruby-serverspec")
1244 (version "2.42.3")
1245 (source (origin
1246 (method url-fetch)
1247 (uri (rubygems-uri "serverspec" version))
1248 (sha256
1249 (base32
1250 "0kfaqrqynly8n3dy5qrbjvx4lx6mk9a5vynwb7xwqj8bixm0mab4"))))
1251 (build-system ruby-build-system)
1252 (propagated-inputs (list ruby-multi-json ruby-rspec ruby-rspec-its
1253 ruby-specinfra))
1254 (arguments
1255 (list #:test-target "spec"))
1256 (synopsis
1257 "RSpec tests for servers configured by Puppet, Chef, Itamae, etc")
1258 (description
1259 "With Serverspec, you can write RSpec tests for checking your servers are
1260configured correctly.
1261
1262Serverspec tests your servers’ actual state by executing command locally, via
1263SSH, via WinRM, via Docker API and so on. So you don’t need to install any
1264agent software on your servers and can use any configuration management
1265tools, Puppet, Ansible, CFEngine, Itamae and so on.
1266
1267But the true aim of Serverspec is to help refactoring infrastructure code.")
1268 (home-page "https://serverspec.org/")
1269 (license license:expat)))
1270
1271(define-public ruby-base64
1272 (package
1273 (name "ruby-base64")
1274 (version "0.3.0")
1275 (source
1276 (origin
1277 (method git-fetch) ; The gem lacks the test files.
1278 (uri (git-reference
1279 (url "https://github.com/ruby/base64")
1280 (commit (string-append "v" version))))
1281 (file-name (git-file-name name version))
1282 (sha256
1283 (base32
1284 "08n9hnbqf8hsci22zgq7ha3jxnxmw0plydc3l9zahvfawm6jplnx"))))
1285 (build-system ruby-build-system)
1286 (native-inputs (list ruby-rake ruby-test-unit))
1287 (synopsis "Base64 encoding/decoding in Ruby")
1288 (description
1289 "This package provides support for encoding and decoding binary data
1290using a Base64 representation.")
1291 (home-page "https://github.com/ruby/base64")
1292 (license (list license:bsd-2))))
1293
1294(define-public ruby-bump
1295 (package
1296 (name "ruby-bump")
1297 (version "0.7.0")
1298 (source
1299 (origin
1300 (method url-fetch)
1301 (uri (rubygems-uri "bump" version))
1302 (sha256
1303 (base32
1304 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
1305 (build-system ruby-build-system)
1306 (arguments
1307 '(;; No included tests
1308 #:tests? #f))
1309 (synopsis "Tool for working with Rubygems")
1310 (description
1311 "Bump provides commands to manage Rubygem versioning, updating to the
1312next patch version for example.")
1313 (home-page "https://github.com/gregorym/bump")
1314 (license license:expat)))
1315
1316(define-public ruby-rjb
1317 (package
1318 (name "ruby-rjb")
1319 (version "1.6.7")
1320 (source (origin
1321 (method url-fetch)
1322 (uri (rubygems-uri "rjb" version))
1323 (sha256
1324 (base32
1325 "0ck802bm8cklhmqsgzhsa0y8lg80qy52dp3m8rlld3zc5gv1rsb9"))))
1326 (build-system ruby-build-system)
1327 (arguments
1328 (list
1329 #:tests? #f ; no rakefile
1330 #:phases
1331 #~(modify-phases %standard-phases
1332 (add-before 'build 'set-java-home
1333 (lambda* (#:key inputs #:allow-other-keys)
1334 (setenv "JAVA_HOME" (assoc-ref inputs "jdk")))))))
1335 (native-inputs
1336 `(("jdk" ,icedtea "jdk")))
1337 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1338 (description "RJB is a bridge program that connects Ruby and Java via the
1339Java Native Interface.")
1340 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
1341 (license license:lgpl2.1+)))
1342
1343(define-public ruby-log4r
1344 (package
1345 (name "ruby-log4r")
1346 (version "1.1.10")
1347 (source
1348 (origin
1349 (method url-fetch)
1350 (uri (rubygems-uri "log4r" version))
1351 (sha256
1352 (base32
1353 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1354 (build-system ruby-build-system)
1355 (arguments
1356 '(#:tests? #f)) ; no Rakefile in gem
1357 (synopsis "Flexible logging library for Ruby")
1358 (description "Comprehensive and flexible logging library written
1359in Ruby for use in Ruby programs. It features a hierarchical logging
1360system of any number of levels, custom level names, logger
1361inheritance, multiple output destinations per log event, execution
1362tracing, custom formatting, thread safteyness, XML and YAML
1363configuration, and more.")
1364 (home-page "http://log4r.rubyforge.org/")
1365 (license license:bsd-3)))
1366
1367(define-public ruby-logger
1368 (package
1369 (name "ruby-logger")
1370 (version "1.7.0")
1371 (source
1372 (origin
1373 (method git-fetch) ;for tests
1374 (uri (git-reference
1375 (url "https://github.com/ruby/logger")
1376 (commit (string-append "v" version))))
1377 (file-name (git-file-name name version))
1378 (sha256
1379 (base32 "18mcqih97jnwyv8w8kv67rcnpa3pzh7iy0xgwgmvd8i3a0cwxzpf"))))
1380 (build-system ruby-build-system)
1381 (native-inputs (list ruby-test-unit ruby-test-unit-ruby-core))
1382 (synopsis "Simple logging utility")
1383 (arguments
1384 (list
1385 #:phases
1386 #~(modify-phases %standard-phases
1387 (replace 'replace-git-ls-files
1388 (lambda _
1389 (substitute* "logger.gemspec"
1390 (("spec\\.files = .*")
1391 "spec.files = `find lib BSDL COPYING README.md -type f \
1392| sort`.split\n")))))))
1393 (description
1394 "Logger is a simple but powerful logging utility to output
1395messages in a Ruby program.
1396
1397Logger has the following features:
1398
1399@itemize @bullet
1400@item Printing messages to different levels such as @code{info} and @code{error}
1401@item Auto-rolling of log files
1402@item Setting the format of log messages
1403@item Specifying a program name in conjunction with the message
1404@end itemize")
1405 (home-page "https://github.com/ruby/logger")
1406 (license (list license:ruby license:bsd-2))))
1407
1408(define-public ruby-atoulme-antwrap
1409 (package
1410 (name "ruby-atoulme-antwrap")
1411 (version "0.7.5")
1412 (source (origin
1413 (method url-fetch)
1414 (uri (rubygems-uri "atoulme-Antwrap" version))
1415 (sha256
1416 (base32
1417 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1418 (build-system ruby-build-system)
1419 ;; Test data required for most of the tests are not included.
1420 (arguments `(#:tests? #f))
1421 (native-inputs
1422 (list ruby-hoe))
1423 (inputs
1424 (list ruby-rjb))
1425 (synopsis "Ruby wrapper for the Ant build tool")
1426 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1427tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1428script.")
1429 (home-page "http://rubyforge.org/projects/antwrap/")
1430 (license license:expat)))
1431
1432(define-public ruby-atoulme-saikuro
1433 (package
1434 (name "ruby-atoulme-saikuro")
1435 (version "1.2.1")
1436 (source (origin
1437 (method url-fetch)
1438 (uri (rubygems-uri "atoulme-Saikuro" version))
1439 (sha256
1440 (base32
1441 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1442 (build-system ruby-build-system)
1443 (arguments
1444 (list
1445 #:phases
1446 #~(modify-phases %standard-phases
1447 (add-after 'unpack 'fix-module-resolution
1448 (lambda _
1449 (substitute* "lib/saikuro.rb"
1450 ;; irb 1.2.0 or later doesn't have RubyToken
1451 (("require 'irb/ruby-lex'")
1452 "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'"))))
1453 (delete 'check)
1454 (add-after 'install 'check
1455 (lambda* (#:key outputs #:allow-other-keys)
1456 (let* ((out (assoc-ref outputs "out"))
1457 (saikuro (string-append out "/bin/saikuro")))
1458 (setenv "GEM_PATH" (string-append
1459 (getenv "GEM_PATH") ":"
1460 #$output "/lib/ruby/vendor_ruby"))
1461 (invoke saikuro "--cyclo" "--token" "--input_directory" "tests")))))))
1462 (propagated-inputs (list ruby-irb-1.1.1
1463 ruby-e2mmap)) ;required by rubygems
1464 (synopsis "Cyclomatic complexity analyzer")
1465 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1466given Ruby source code Saikuro will generate a report listing the cyclomatic
1467complexity of each method found. In addition, Saikuro counts the number of
1468lines per method and can generate a listing of the number of tokens on each
1469line of code.")
1470 (home-page "http://www.github.com/atoulme/Saikuro")
1471 ;; File headers contain the BSD-3 license and the README.rdoc says that
1472 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1473 ;; of the Expat license.
1474 (license license:bsd-3)))
1475
1476(define-public ruby-awesome-print
1477 (package
1478 (name "ruby-awesome-print")
1479 (version "1.9.2")
1480 (source
1481 (origin
1482 (method url-fetch)
1483 (uri (rubygems-uri "awesome_print" version))
1484 (sha256
1485 (base32
1486 "0vkq6c8y2jvaw03ynds5vjzl1v9wg608cimkd3bidzxc0jvk56z9"))))
1487 (build-system ruby-build-system)
1488 (arguments
1489 (list
1490 #:phases
1491 #~(modify-phases %standard-phases
1492 (replace 'check
1493 (lambda _
1494 ;; Remove failing test.
1495 (for-each delete-file
1496 '("spec/ext/nokogiri_spec.rb"
1497 "spec/colors_spec.rb"
1498 "spec/formats_spec.rb"
1499 "spec/methods_spec.rb"
1500 "spec/misc_spec.rb"
1501 "spec/objects_spec.rb"))
1502 (invoke "rspec" "-c" "spec"))))))
1503 (native-inputs
1504 (list ruby-nokogiri ruby-rspec ruby-simplecov))
1505 (synopsis "Pretty print Ruby objects to visualize their structure")
1506 (description
1507 "Ruby dubugging companion: pretty print Ruby objects to visualize their
1508structure. Supports custom object formatting via plugins.")
1509 (home-page "https://github.com/awesome-print/awesome_print")
1510 (license license:expat)))
1511
1512(define-public ruby-pandoc-ruby
1513 (package
1514 (name "ruby-pandoc-ruby")
1515 (version "2.1.10")
1516 (source
1517 (origin
1518 (method git-fetch) ;the gem lacks many test files
1519 (uri (git-reference
1520 (url "https://github.com/xwmx/pandoc-ruby")
1521 (commit version)))
1522 (file-name (git-file-name name version))
1523 (sha256
1524 (base32
1525 "0zi66884rkd06vifar6zv9927bjcfl7c357cvra2w539vniyydly"))))
1526 (build-system ruby-build-system)
1527 (arguments
1528 `(#:tests? #f ; Disable tests since they depend on pandoc behavior
1529 ; and there are no upstream releases.
1530 #:phases
1531 (modify-phases %standard-phases
1532 (add-after 'unpack 'patch-pandoc-path
1533 (lambda* (#:key inputs #:allow-other-keys)
1534 (let ((pandoc (search-input-file inputs "/bin/pandoc")))
1535 (substitute* "lib/pandoc-ruby.rb"
1536 (("@pandoc_path = 'pandoc'")
1537 (format #f "@pandoc_path = '~a'" pandoc)))
1538 (substitute* "test/test_pandoc_ruby.rb"
1539 (("('|\")pandoc" _ quote)
1540 (string-append quote pandoc))
1541 (("\\^pandoc")
1542 ".*pandoc")))))
1543 (add-after 'unpack 'adjust-tests
1544 ;; The tests expect filenames with spaces. Because they don't have
1545 ;; spaces the quotes around the output are dropped automatically.
1546 (lambda _
1547 (substitute* "test/test_pandoc_ruby.rb"
1548 (("\\\\\"#\\{file\\.path\\}\\\\\"") "#{file.path}"))))
1549 (add-after 'extract-gemspec 'remove-Gemfile.lock
1550 (lambda _
1551 (delete-file "Gemfile.lock")
1552 (substitute* "pandoc-ruby.gemspec"
1553 (("Gemfile\\.lock") "")))))))
1554 (native-inputs
1555 (list ruby-mocha))
1556 (inputs
1557 (list pandoc))
1558 (synopsis "Ruby wrapper for Pandoc")
1559 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1560command line tools for converting one markup format to another. Pandoc can
1561convert documents from a variety of formats including markdown,
1562reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1563variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1564ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1565markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1566more.")
1567 (home-page "https://github.com/xwmx/pandoc-ruby")
1568 (license license:expat)))
1569
1570(define-public ruby-patron
1571 (package
1572 (name "ruby-patron")
1573 (version "0.13.3")
1574 (source
1575 (origin
1576 (method url-fetch)
1577 (uri (rubygems-uri "patron" version))
1578 (sha256
1579 (base32
1580 "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
1581 (build-system ruby-build-system)
1582 (inputs
1583 (list curl))
1584 (arguments
1585 `(#:tests? #f)) ; no included tests
1586 (synopsis "Ruby HTTP client library based on @code{libcurl}")
1587 (description
1588 "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
1589not try to expose the full power (read complexity) of @code{libcurl} but
1590instead tries to provide a sane API while taking advantage of @code{libcurl}
1591under the hood.")
1592 (home-page "https://github.com/toland/patron")
1593 (license license:expat)))
1594
1595(define-public ruby-slim
1596 (package
1597 (name "ruby-slim")
1598 (version "5.2.1")
1599 (source
1600 (origin
1601 (method url-fetch)
1602 (uri (rubygems-uri "slim" version))
1603 (sha256
1604 (base32
1605 "1rqk7jn66wgx50b18ndhbppjq55rbcwgqg1rbhnhxwiggvzisdbj"))))
1606 (build-system ruby-build-system)
1607 (arguments
1608 `(#:phases
1609 (modify-phases %standard-phases
1610 ;; See: https://github.com/slim-template/slim/issues/857 and
1611 ;; https://github.com/slim-template/slim/issues/858.
1612 (add-after 'unpack 'skip-broken-tests
1613 (lambda _
1614 (substitute* "test/core/test_embedded_engines.rb"
1615 (("def test_render_with_markdown")
1616 "def skipped_test_render_with_markdown"))
1617 (substitute* "test/translator/test_translator.rb"
1618 (("raise (\"Missing test for.*)" _ tail)
1619 (string-append "print " tail)))))
1620 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1621 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1622 (add-after 'unpack 'prevent-bundler-interference
1623 (lambda _
1624 (substitute* "Rakefile"
1625 (("require 'bundler/setup'") "nil")
1626 (("Bundler::GemHelper\\.install_tasks") "nil")))))))
1627 (native-inputs
1628 (list ruby-rack-test ruby-minitest ruby-sinatra ruby-kramdown))
1629 (propagated-inputs
1630 (list ruby-temple ruby-tilt/minimal))
1631 (synopsis "Minimalist template language for Ruby")
1632 (description "Slim is a template language for Ruby that aims to reduce the
1633syntax to the minimum while remaining clear.")
1634 (home-page "http://slim-lang.com/")
1635 (license license:expat)))
1636
1637(define-public ruby-asciidoctor
1638 (package
1639 (name "ruby-asciidoctor")
1640 (version "2.0.26")
1641 (source
1642 (origin
1643 (method git-fetch) ;the gem release lacks a Rakefile
1644 (uri (git-reference
1645 (url "https://github.com/asciidoctor/asciidoctor")
1646 (commit (string-append "v" version))))
1647 (file-name (git-file-name name version))
1648 (sha256
1649 (base32
1650 "06kj20z8zlvbhv663gddk5ffv8rv2ba5spaf6j8fix4607wwjx5p"))))
1651 (build-system ruby-build-system)
1652 (arguments
1653 (list
1654 #:test-target "test:all"
1655 #:phases
1656 #~(modify-phases %standard-phases
1657 (add-after 'extract-gemspec 'strip-version-requirements
1658 (lambda _
1659 (delete-file "Gemfile")
1660 (substitute* "asciidoctor.gemspec"
1661 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1662 (string-append stripped "\n")))))
1663 (add-after 'install 'install-man-page
1664 (lambda* (#:key outputs #:allow-other-keys)
1665 (install-file (search-input-file
1666 outputs (string-append "lib/ruby/vendor_ruby/"
1667 "gems/asciidoctor-"
1668 #$version
1669 "/man/asciidoctor.1"))
1670 (string-append #$output "/share/man/man1")))))))
1671 (native-inputs
1672 (list ruby-asciimath
1673 ruby-coderay
1674 ruby-concurrent-ruby
1675 ruby-erubi
1676 ruby-haml
1677 ruby-minitest
1678 ruby-nokogiri
1679 ruby-open-uri-cached
1680 ruby-rouge
1681 ruby-slim
1682 ruby-tilt))
1683 (synopsis "Converter from AsciiDoc content to other formats")
1684 (description "Asciidoctor is a text processor and publishing toolchain for
1685converting AsciiDoc content to HTML5, DocBook 5, PDF, and other formats.")
1686 (home-page "https://asciidoctor.org")
1687 (license license:expat)))
1688
1689 (define-public ruby-asciidoctor/minimal
1690 (hidden-package
1691 (package
1692 (inherit ruby-asciidoctor)
1693 (arguments (list #:tests? #f))
1694 (native-inputs (list ))))); clear out for minimal build
1695
1696(define-public ruby-asciidoctor-diagram
1697 (package
1698 (name "ruby-asciidoctor-diagram")
1699 (version "3.1.0")
1700 (source
1701 (origin
1702 (method url-fetch)
1703 (uri (rubygems-uri "asciidoctor-diagram" version))
1704 (sha256
1705 (base32 "15sc6yb4qyxy4v3bki26xn0j4k8rgjjiz3nwrxsprn6f0y6ysbp3"))))
1706 (arguments (list #:tests? #f)) ;tests not bundled in gem
1707 (native-inputs (list ruby-rspec))
1708 (propagated-inputs (list ruby-asciidoctor ruby-rexml))
1709 (build-system ruby-build-system)
1710 (synopsis "Asciidoctor diagram extension")
1711 (description "Asciidoctor Diagram is a set of Asciidoctor extensions that
1712enable you to add diagrams, which you describe using plain text, to your
1713AsciiDoc document. The extension will run the appropriate diagram processor to
1714generate an image from the input text. The generated image is then inserted
1715into your converted document.
1716
1717Detailed usage instructions can be found on the
1718@url{https://docs.asciidoctor.org/diagram-extension/latest/,
1719Asciidoctor documentation site}.
1720
1721Asciidoctor Diagram was inspired by the
1722@url{https://code.google.com/p/asciidoc-plantuml/, AsciiDoc PlantUML filter}.")
1723 (home-page "https://github.com/asciidoctor/asciidoctor-diagram")
1724 (license license:expat)))
1725
1726(define-public ruby-asciidoctor-multipage
1727 (package
1728 (name "ruby-asciidoctor-multipage")
1729 (version "0.0.16")
1730 (source (origin
1731 (method git-fetch)
1732 (uri (git-reference
1733 (url "https://github.com/owenh000/asciidoctor-multipage")
1734 (commit (string-append "v" version))))
1735 (file-name (git-file-name name version))
1736 (sha256
1737 (base32
1738 "0rnz7qxdw5qbi3qjplihhk468kv690njdi06yllgylc75k62ar1p"))))
1739 (propagated-inputs (list ruby-asciidoctor ruby-slim))
1740 (build-system ruby-build-system)
1741 (arguments
1742 `(#:phases (modify-phases %standard-phases
1743 (add-after 'extract-gemspec 'strip-version-requirements
1744 (lambda _
1745 (delete-file "Gemfile")
1746 (substitute* "asciidoctor-multipage.gemspec"
1747 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1748 (string-append stripped "\n"))))))))
1749 (synopsis
1750 "Asciidoctor extension for generating HTML output using multiple pages")
1751 (description
1752 "Asciidoctor generates single-page documents. This extension
1753splits documents up into multiple HTML pages according to their headings, with
1754configurable levels.")
1755 (license license:expat)
1756 (home-page "https://github.com/owenh000/asciidoctor-multipage")))
1757
1758(define-public ruby-asciidoctor-pdf
1759 (package
1760 (name "ruby-asciidoctor-pdf")
1761 (version "2.3.24")
1762 (source
1763 (origin
1764 (method git-fetch) ;no test suite in the distributed gem
1765 (uri (git-reference
1766 (url "https://github.com/asciidoctor/asciidoctor-pdf")
1767 (commit (string-append "v" version))))
1768 (file-name (git-file-name name version))
1769 (sha256
1770 (base32
1771 "0njpbgfdwzw7rbjj5vg5xjmykm55x588fk437nvaqg6bq7pv66mw"))
1772 (patches
1773 (search-patches
1774 "ruby-asciidoctor-pdf-support-prawn-svg-0_36.patch"))))
1775 (build-system ruby-build-system)
1776 (arguments
1777 (list
1778 #:phases
1779 #~(modify-phases %standard-phases
1780 (add-after 'extract-gemspec 'relax-dependencies
1781 (lambda _
1782 (substitute* "asciidoctor-pdf.gemspec"
1783 (("~>") ">="))))
1784 ;; The tests rely on the Gem being installed, so move the check
1785 ;; phase after the install phase.
1786 (delete 'check)
1787 (add-after 'install 'check
1788 (lambda* (#:key tests? #:allow-other-keys)
1789 (setenv "GEM_PATH" (string-append
1790 (getenv "GEM_PATH") ":"
1791 #$output "/lib/ruby/vendor_ruby"))
1792 (when tests?
1793 (let ((skippedtests
1794 (list ;; Disable tests requiring write access
1795 "should render linear gradient in SVG"
1796 ;; Disable visual+cli tests requiring network access
1797 "should allow remote image in SVG to be read if allow"
1798 "should warn if remote image is missing and allow"
1799 "should replace video with poster image if allow"
1800 "should read remote image over"
1801 "should embed remote image")))
1802 (setenv "SPEC_OPTS"
1803 (string-append
1804 "--warnings" " "
1805 ;; Disable tests failing in the guix environment:
1806 "--example-matches "
1807 "'(^(?!.*(" (string-join skippedtests "|") ")).*)'")))
1808 ;; The Fontconfig error: No writable cache directories errors
1809 ;; are caused by our read-only test environment and are
1810 ;; non-failing
1811 (invoke "rspec" "-t" "~network")))))))
1812 (native-inputs
1813 (list poppler
1814 ruby-chunky-png
1815 ruby-coderay
1816 ruby-pdf-inspector
1817 ruby-rouge
1818 ruby-rspec))
1819 (propagated-inputs
1820 (list ruby-asciidoctor
1821 ruby-concurrent-ruby
1822 ruby-prawn
1823 ruby-prawn-icon
1824 ruby-prawn-svg
1825 ruby-prawn-table
1826 ruby-prawn-templates
1827 ruby-text-hyphen
1828 ruby-treetop
1829 ruby-ttfunk))
1830 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1831 (description "Asciidoctor PDF is an extension for Asciidoctor that
1832converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1833PDF library. It has features such as:
1834@itemize
1835@item Direct AsciiDoc to PDF conversion
1836@item Configuration-driven theme (style and layout)
1837@item Scalable Vector Graphics (SVG) support
1838@item PDF document outline (i.e., bookmarks)
1839@item Table of contents page(s)
1840@item Document metadata (title, authors, subject, keywords, etc.)
1841@item Internal cross reference links
1842@item Syntax highlighting with Rouge, Pygments, or CodeRay
1843@item Page numbering
1844@item Customizable running content (header and footer)
1845@item
1846“Keep together” blocks (i.e., page breaks avoided in certain block content)
1847@item Orphaned section titles avoided
1848@item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1849@item Table border settings honored
1850@item Font-based icons
1851@item Custom TrueType (TTF) fonts
1852@item Double-sided printing mode (margins alternate on recto and verso pages)
1853@end itemize")
1854 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1855 (license license:expat)))
1856
1857(define-public ruby-prawn-icon
1858 (package
1859 (name "ruby-prawn-icon")
1860 (version "3.1.0")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (rubygems-uri "prawn-icon" version))
1865 (sha256
1866 (base32
1867 "049k42bqy4iq9hddf7jah83b6qr8ka63w1d63illh1mf4f4dihdk"))))
1868 (build-system ruby-build-system)
1869 (arguments
1870 `(#:test-target "spec"
1871 #:phases (modify-phases %standard-phases
1872 (add-after 'unpack 'remove-unnecessary-dependencies
1873 (lambda _
1874 (substitute* '("Rakefile" "spec/spec_helper.rb")
1875 ((".*[Bb]undler.*") "")
1876 (("^require 'rubocop.*") "")
1877 (("^RuboCop.*") "")))))))
1878 (native-inputs
1879 (list ruby-pdf-inspector ruby-pdf-reader ruby-rspec ruby-simplecov))
1880 (propagated-inputs
1881 (list ruby-prawn))
1882 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1883 (description "@code{Prawn::Icon} provides various icon fonts including
1884FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1885toolkit.")
1886 (home-page "https://github.com/jessedoyle/prawn-icon/")
1887 (license %prawn-project-licenses)))
1888
1889(define-public ruby-css-parser
1890 (package
1891 (name "ruby-css-parser")
1892 (version "1.21.1")
1893 (source
1894 (origin
1895 (method url-fetch)
1896 (uri (rubygems-uri "css_parser" version))
1897 (sha256
1898 (base32 "1izp5vna86s7xivqzml4nviy01bv76arrd5is8wkncwp1by3zzbc"))))
1899 (build-system ruby-build-system)
1900 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1901 (propagated-inputs
1902 (list ruby-addressable))
1903 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1904 (description "This package allows loading, parsing and cascading Cascading
1905Style Sheets (CSS) rule sets in Ruby.")
1906 (home-page "https://github.com/premailer/css_parser")
1907 (license license:expat)))
1908
1909(define-public ruby-prism
1910 (package
1911 (name "ruby-prism")
1912 (version "1.6.0")
1913 (source (origin
1914 (method git-fetch)
1915 (uri (git-reference
1916 (url "https://github.com/ruby/prism.git")
1917 (commit (string-append "v" version))))
1918 (file-name (git-file-name name version))
1919 (sha256
1920 (base32
1921 "1104w3bcsg1zwi2ipbkn62a11ik5f357xrscgxrc3iyy46lq8bgn"))))
1922 (build-system ruby-build-system)
1923 (arguments
1924 `(#:phases
1925 (modify-phases %standard-phases
1926 (replace 'build
1927 (lambda _
1928 (setenv "CC" ,(cc-for-target))
1929 (invoke "rake" "compile")))
1930 (replace 'install
1931 (lambda* (#:key outputs #:allow-other-keys)
1932 (setenv "GEM_HOME" (string-append (assoc-ref outputs "out")
1933 "/lib/ruby/vendor_ruby"))
1934 (invoke "rake" "install")
1935 ;; Make build reproducible.
1936 (for-each delete-file
1937 (find-files (string-append (assoc-ref outputs "out")
1938 "/lib/ruby/vendor_ruby")
1939 "gem_make.out$")))))))
1940 (native-inputs
1941 (list ruby-rake ruby-rake-compiler))
1942 (synopsis "Parser for Ruby source code")
1943 (description "This package provides a parser for Ruby source code,
1944written in C.")
1945 (home-page "https://ruby.github.io/prism/")
1946 (license license:expat)))
1947
1948(define-public ruby-prawn-svg
1949 (package
1950 (name "ruby-prawn-svg")
1951 (version "0.37.0")
1952 (source
1953 (origin
1954 (method url-fetch)
1955 (uri (rubygems-uri "prawn-svg" version))
1956 (sha256
1957 (base32 "0c18drdsms06h5c5hmhdi7sbck72f2sp3sbgwyr7frq65h1xs6r7"))))
1958 (build-system ruby-build-system)
1959 (arguments
1960 (list #:test-target "spec"
1961 #:phases
1962 #~(modify-phases %standard-phases
1963 (add-after 'unpack 'do-not-use-bundler
1964 (lambda _
1965 (substitute* "spec/spec_helper.rb"
1966 ((".*[Bb]undler.*") ""))))
1967 (replace 'check
1968 (lambda* (#:key tests? #:allow-other-keys)
1969 (when tests?
1970 ;; This test fails due to the recent rspec 3.12 used
1971 ;; (see: https://github.com/mogest/prawn-svg/issues/151).
1972 (delete-file "spec/prawn/svg/interface_spec.rb")
1973 (invoke "rspec" "-Ilib" "-rprawn-svg")))))))
1974 (native-inputs (list ruby-rspec))
1975 (propagated-inputs (list ruby-css-parser ruby-matrix ruby-prawn ruby-rexml))
1976 (synopsis "SVG renderer for the Prawn PDF library")
1977 (description "This library allows rendering Scalable Vector Graphics (SVG)
1978graphics directly into a Portable Document Format (PDF) document using the
1979Prawn module.")
1980 (home-page "https://github.com/mogest/prawn-svg")
1981 (license license:expat)))
1982
1983(define-public ruby-prawn-templates
1984 (package
1985 (name "ruby-prawn-templates")
1986 (version "0.1.2")
1987 (source
1988 (origin
1989 (method git-fetch)
1990 (uri (git-reference
1991 (url "https://github.com/prawnpdf/prawn-templates")
1992 (commit version)))
1993 (file-name (git-file-name name version))
1994 (sha256
1995 (base32
1996 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1997 (build-system ruby-build-system)
1998 (arguments
1999 `(#:phases (modify-phases %standard-phases
2000 (add-after 'unpack 'do-not-use-bundler
2001 (lambda _
2002 (substitute* "spec/spec_helper.rb"
2003 ((".*[Bb]undler.*") ""))))
2004 (replace 'check
2005 (lambda* (#:key tests? #:allow-other-keys)
2006 (when tests?
2007 (invoke "rspec")))))))
2008 (native-inputs
2009 (list ruby-pdf-inspector ruby-rspec))
2010 (propagated-inputs
2011 (list ruby-pdf-reader ruby-prawn))
2012 (synopsis "Prawn extension to include or combine PDF documents")
2013 (description "This @strong{unmaintained} package provides a Prawn
2014extension that allows including other Portable Document Format (PDF) documents
2015as background or combining several PDF documents into one. This functionality
2016used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
2017of its many longstanding issues.")
2018 (home-page "https://github.com/prawnpdf/prawn-templates")
2019 (license %prawn-project-licenses)))
2020
2021(define-public ruby-polyglot
2022 (package
2023 (name "ruby-polyglot")
2024 (version "0.3.5")
2025 (source
2026 (origin
2027 (method url-fetch)
2028 (uri (rubygems-uri "polyglot" version))
2029 (sha256
2030 (base32
2031 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
2032 (build-system ruby-build-system)
2033 (arguments `(#:tests? #f)) ;no test suite
2034 (synopsis "Augment @code{require} to load non-Ruby file types")
2035 (description "The Polyglot library allows a Ruby module to register a
2036loader for the file type associated with a filename extension, and it augments
2037@code{require} to find and load matching files.")
2038 (home-page "https://github.com/cjheath/polyglot")
2039 (license license:expat)))
2040
2041(define-public ruby-treetop
2042 (package
2043 (name "ruby-treetop")
2044 (version "1.6.12")
2045 (source
2046 (origin
2047 (method git-fetch) ;no test suite in distributed gem
2048 (uri (git-reference
2049 (url "https://github.com/cjheath/treetop")
2050 (commit (string-append "v" version))))
2051 (file-name (git-file-name name version))
2052 (sha256
2053 (base32
2054 "0cgs6f9z0a9dq5fc03710zsch4gmh1771wq36mq81qsql4x9vksf"))))
2055 (build-system ruby-build-system)
2056 (arguments
2057 `(#:test-target "spec"))
2058 (native-inputs
2059 (list ruby-activesupport ruby-rr ruby-rspec))
2060 (propagated-inputs
2061 (list ruby-polyglot))
2062 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
2063 (description "This package provides a Ruby-based Parsing Expression
2064Grammar (PEG) parser generator Domain Specific Language (DSL).")
2065 (home-page "https://github.com/cjheath/treetop")
2066 (license license:expat)))
2067
2068(define-public ruby-typhoeus
2069 (package
2070 (name "ruby-typhoeus")
2071 (version "1.4.0")
2072 (source
2073 (origin
2074 (method url-fetch)
2075 (uri (rubygems-uri "typhoeus" version))
2076 (sha256
2077 (base32
2078 "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
2079 (build-system ruby-build-system)
2080 (arguments
2081 `(#:tests? #f)) ; no included tests
2082 (propagated-inputs
2083 (list ruby-ethon))
2084 (synopsis "@code{libcurl} wrapper in Ruby")
2085 (description
2086 "Like a modern code version of the mythical beast with 100 serpent heads,
2087Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
2088logic.")
2089 (home-page "https://github.com/typhoeus/typhoeus")
2090 (license license:expat)))
2091
2092;;; A minimal variant used to build ruby-rubocop itself.
2093(define-public ruby-rubocop-capybara-minimal
2094 (package
2095 (name "ruby-rubocop-capybara")
2096 (version "2.21.0")
2097 (source (origin
2098 (method git-fetch) ;for tests
2099 (uri (git-reference
2100 (url "https://github.com/rubocop/rubocop-capybara")
2101 (commit (string-append "v" version))))
2102 (file-name (git-file-name name version))
2103 (sha256
2104 (base32
2105 "19r2s782r9ch2g1lxgrvk22d9qqkxi69brza16bfwp2rl2064qnc"))))
2106 (build-system ruby-build-system)
2107 (arguments (list #:tests? #f))
2108 (synopsis "Capybara plugin for RuboCop")
2109 (description "This package provides a RuboCop plugin that can be used for
2110code style checking of Capybara test files (RSpec, Cucumber, Minitest).")
2111 (home-page "https://github.com/rubocop/rubocop-capybara")
2112 (properties '((hidden? . #t)))
2113 (license license:expat)))
2114
2115(define-public ruby-rubocop-capybara
2116 (package
2117 (inherit ruby-rubocop-capybara-minimal)
2118 (arguments
2119 (list #:test-target "spec"
2120 #:phases #~(modify-phases %standard-phases
2121 (add-after 'unpack 'relax-requirements
2122 (lambda _
2123 (substitute* "Gemfile"
2124 (("gem 'rubocop-rspec', '~> 2.16.0'")
2125 "gem 'rubocop-rspec', '>= 2.16.0'")
2126 (("gem 'danger'.*") "")))))))
2127 (native-inputs
2128 (list ruby-bump
2129 ruby-rack
2130 ruby-rake
2131 ruby-rspec
2132 ruby-rubocop
2133 ruby-rubocop-performance-minimal
2134 ruby-rubocop-rake-minimal
2135 ruby-rubocop-rspec-minimal
2136 ruby-simplecov
2137 ruby-yard))
2138 (properties
2139 (alist-delete 'hidden?
2140 (package-properties ruby-rubocop-capybara-minimal)))))
2141
2142(define-public ruby-rubocop-factory-bot
2143 (package
2144 (name "ruby-rubocop-factory-bot")
2145 (version "2.26.1")
2146 (source
2147 (origin
2148 (method url-fetch)
2149 (uri (rubygems-uri "rubocop-factory_bot" version))
2150 (sha256
2151 (base32 "1aljadsjx7affcarzbhz7pydpy6fgqb8hl951y0cmrffxpa3rqcd"))))
2152 (build-system ruby-build-system)
2153 (arguments '(#:tests? #f)) ; No tests bundled.
2154 (synopsis "Code style checking for factory_bot files")
2155 (description
2156 "This package provides a plugin for the @code{RuboCop} code style
2157enforcing & linting tool for @code{factory_bot} files.")
2158 (home-page "https://github.com/rubocop/rubocop-factory_bot")
2159 (license license:expat)))
2160
2161;;; A minimal variant used to build ruby-rubocop itself.
2162(define-public ruby-rubocop-rake-minimal
2163 (package
2164 (name "ruby-rubocop-rake")
2165 (version "0.6.0")
2166 (source (origin
2167 (method git-fetch) ;for tests
2168 (uri (git-reference
2169 (url "https://github.com/rubocop/rubocop-rake")
2170 (commit (string-append "v" version))))
2171 (file-name (git-file-name name version))
2172 (sha256
2173 (base32
2174 "1r53szwglikbir1fvpz4i51p915khrrkl6rp61zcx3dcrclkr3ld"))))
2175 (build-system ruby-build-system)
2176 (arguments (list #:tests? #f)) ;avoid extra dependencies
2177 (synopsis "RuboCop plugin for Rake")
2178 (description "This package provides a RuboCop plugin for Rake.")
2179 (home-page "https://github.com/rubocop/rubocop-rake")
2180 (properties '((hidden? . #t)))
2181 (license license:expat)))
2182
2183(define-public ruby-rubocop-rake
2184 (package
2185 (inherit ruby-rubocop-rake-minimal)
2186 (arguments
2187 (list #:test-target "spec"))
2188 (native-inputs
2189 (list ruby-rake
2190 ruby-rspec
2191 ruby-rubocop
2192 ruby-rubocop-rspec))
2193 (propagated-inputs
2194 (list ruby-rubocop))
2195 (properties
2196 (alist-delete 'hidden? (package-properties ruby-rubocop-rake-minimal)))))
2197
2198;;; A minimal variant used to build ruby-rubocop itself.
2199(define-public ruby-rubocop-rspec-minimal
2200 (package
2201 (name "ruby-rubocop-rspec")
2202 (version "2.26.0")
2203 (source
2204 (origin
2205 (method git-fetch)
2206 (uri (git-reference
2207 (url "https://github.com/rubocop/rubocop-rspec")
2208 (commit (string-append "v" version))))
2209 (file-name (git-file-name name version))
2210 (sha256
2211 (base32
2212 "1w9whadx60kv4vlbnk77b5yyhhfcg717r9cr334zqznqr1bqr8mh"))))
2213 (build-system ruby-build-system)
2214 (arguments
2215 (list #:tests? #f ;avoid extra dependencies
2216 #:phases
2217 #~(modify-phases %standard-phases
2218 (add-after 'unpack 'relax-requirements
2219 (lambda _
2220 (substitute* "Gemfile"
2221 (("gem 'danger'.*") "")))))))
2222 (propagated-inputs (list ruby-rubocop-factory-bot))
2223 (synopsis "Code style checking for RSpec files")
2224 (description "This package provides a plugin for the RuboCop code style
2225enforcing & linting tool.")
2226 (home-page "https://github.com/rubocop/rubocop-rspec")
2227 (properties '((hidden? . #t)))
2228 (license license:expat)))
2229
2230(define-public ruby-rubocop-rspec
2231 (package
2232 (inherit ruby-rubocop-rspec-minimal)
2233 (arguments
2234 (substitute-keyword-arguments
2235 (package-arguments ruby-rubocop-rspec-minimal)
2236 ((#:tests? _ #f) #t)
2237 ((#:test-target _ "test") "spec")))
2238 (native-inputs
2239 (list ruby-bump
2240 ruby-rack
2241 ruby-rspec
2242 ruby-rubocop-performance-minimal
2243 ruby-rubocop-rake-minimal
2244 ruby-simplecov
2245 ruby-yard))
2246 (propagated-inputs
2247 (list ruby-rubocop
2248 ruby-rubocop-ast
2249 ruby-rubocop-capybara
2250 ruby-rubocop-factory-bot))
2251 (properties
2252 (alist-delete 'hidden? (package-properties ruby-rubocop-rspec-minimal)))))
2253
2254(define-public ruby-rubocop-packaging
2255 (package
2256 (name "ruby-rubocop-packaging")
2257 (version "0.5.2")
2258 (source
2259 (origin
2260 (method git-fetch)
2261 (uri (git-reference
2262 (url "https://github.com/utkarsh2102/rubocop-packaging")
2263 (commit (string-append "v" version))))
2264 (file-name (git-file-name name version))
2265 (sha256
2266 (base32
2267 "08jsfp42z0aj32002z2hz8vkmza0jvnrqk9rk2v0xb8qdxkgbx3l"))))
2268 (build-system ruby-build-system)
2269 (arguments
2270 (list #:test-target "spec"
2271 #:phases
2272 #~(modify-phases %standard-phases
2273 (add-after 'unpack 'skip-problematic-tests
2274 (lambda _
2275 ;; Tests are actually running fine, except for a prefix.
2276 ;; This doesn't impair functionality, ignored for now.
2277 (delete-file
2278 "spec/rubocop/cop/packaging/gemspec_git_spec.rb"))))))
2279 (propagated-inputs
2280 (list ruby-rubocop))
2281 (native-inputs
2282 (list ruby-rspec
2283 ruby-yard
2284 ruby-bump))
2285 (synopsis
2286 "Collection of RuboCop checks for downstream compatibility issues")
2287 (description
2288 "This package provides a collection of RuboCop cops to check for
2289downstream compatibility issues in the Ruby code.")
2290 (home-page "https://github.com/utkarsh2102/rubocop-packaging")
2291 (license license:expat)))
2292
2293(define-public ruby-rubocop-performance
2294 (package
2295 (name "ruby-rubocop-performance")
2296 (version "1.23.1")
2297 (source
2298 (origin
2299 (method git-fetch)
2300 (uri (git-reference
2301 (url "https://github.com/rubocop/rubocop-performance")
2302 (commit (string-append "v" version))))
2303 (file-name (git-file-name name version))
2304 (sha256
2305 (base32
2306 "0d1p6pgrcnj58q1g0np5j4vbk7wavj31b4bapi5p4gckqlnc7xjd"))))
2307 (build-system ruby-build-system)
2308 (arguments
2309 `(#:tests? #f ; tests require a git checkout of rubocop's source code.
2310 #:phases
2311 (modify-phases %standard-phases
2312 (replace 'replace-git-ls-files
2313 (lambda _
2314 (substitute* "rubocop-performance.gemspec"
2315 (("`git ls-files -z config lib LICENSE.txt README.md`")
2316 "`find config lib LICENSE.txt README.md \
2317-type f -print0 |sort -z`"))))
2318 (add-before 'check 'set-HOME
2319 (lambda _
2320 (setenv "HOME" "/tmp"))))))
2321 (propagated-inputs
2322 (list ruby-rubocop ruby-rubocop-ast))
2323 (native-inputs
2324 (list ruby-bump ruby-yard))
2325 (synopsis "Performance optimizations checkers for Ruby code")
2326 (description "This package provides a collection of RuboCop cops to check
2327for performance optimizations in Ruby code.")
2328 (home-page "https://docs.rubocop.org/rubocop-performance/")
2329 (license license:expat)))
2330
2331(define-public ruby-rubocop-performance-minimal
2332 (hidden-package
2333 (package
2334 (inherit ruby-rubocop-performance)
2335 (arguments
2336 (substitute-keyword-arguments arguments
2337 ((#:tests? _ #f) #f)))
2338 (propagated-inputs '())
2339 (native-inputs '()))))
2340
2341(define-public ruby-stud
2342 (package
2343 (name "ruby-stud")
2344 (version "0.0.23")
2345 (source (origin
2346 (method url-fetch)
2347 (uri (rubygems-uri "stud" version))
2348 (sha256
2349 (base32
2350 "0qpb57cbpm9rwgsygqxifca0zma87drnlacv49cqs2n5iyi6z8kb"))))
2351 (build-system ruby-build-system)
2352 (native-inputs (list ruby-rspec))
2353 (arguments
2354 (list #:phases #~(modify-phases %standard-phases
2355 ;; No Rakefile is included, so run rspec directly.
2356 (replace 'check
2357 (lambda* (#:key tests? #:allow-other-keys)
2358 (when tests?
2359 (invoke "rspec")))))))
2360 (synopsis "Retries, worker supervision, resource pools and more for Ruby")
2361 (description "The Stud Ruby library adds a few things missing from the
2362standard Ruby library such as:
2363@table @code
2364@item {Stud::Try}
2365Retry on failure, with back-off, where failure is any exception.
2366@item {Stud::Pool}
2367Generic resource pools.
2368@item {Stud::Task}
2369Tasks (threads that can return values, exceptions, etc.)
2370@item {Stud.interval}
2371Interval execution (do X every N seconds).
2372@item {Stud::Buffer}
2373Batch and flush behavior.
2374@end itemize")
2375 (home-page "https://github.com/jordansissel/ruby-stud")
2376 (license license:asl2.0)))
2377
2378(define-public ruby-standard-custom
2379 (package
2380 (name "ruby-standard-custom")
2381 (version "1.0.2")
2382 (source
2383 (origin
2384 (method url-fetch)
2385 (uri (rubygems-uri "standard-custom" version))
2386 (sha256
2387 (base32 "0av55ai0nv23z5mhrwj1clmxpgyngk7vk6rh58d4y1ws2y2dqjj2"))))
2388 (build-system ruby-build-system)
2389 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
2390 (propagated-inputs (list ruby-lint-roller ruby-rubocop))
2391 (synopsis "Plugin of custom cops for Standard Ruby")
2392 (description
2393 "This package provides a implementations of custom cops that are bundled
2394as defaults in Standard Ruby.")
2395 (home-page "https://github.com/standardrb/standard-custom")
2396 (license license:expat)))
2397
2398(define-public ruby-standard-performance
2399 (package
2400 (name "ruby-standard-performance")
2401 (version "1.6.0")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (rubygems-uri "standard-performance" version))
2406 (sha256
2407 (base32 "1x298w3wmq8cavbsg903wc3arxp3xh2x8263brvy128436m732rd"))))
2408 (build-system ruby-build-system)
2409 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
2410 (propagated-inputs (list ruby-lint-roller ruby-rubocop-performance))
2411 (synopsis "Standard Ruby Plugin for rubocop-performance")
2412 (description
2413 "This package is a Standard Ruby Plugin providing configuration for
2414@code{rubocop-performance}.")
2415 (home-page "https://github.com/standardrb/standard-performance")
2416 (license license:expat)))
2417
2418(define-public ruby-standard
2419 (package
2420 (name "ruby-standard")
2421 (version "1.37.0")
2422 (source
2423 (origin
2424 (method git-fetch) ;no test suite in distributed gem
2425 (uri (git-reference
2426 (url "https://github.com/testdouble/standard")
2427 (commit (string-append "v" version))))
2428 (file-name (git-file-name name version))
2429 (sha256
2430 (base32 "0gm9fn6fz41aya34xz7kzda8xxs7h98n7cjx66qbcy2w0qhs40wc"))))
2431 (build-system ruby-build-system)
2432 (arguments
2433 (list
2434 #:phases
2435 #~(modify-phases %standard-phases
2436 (add-after 'unpack 'set-HOME
2437 (lambda _
2438 ;; Some tests fail otherwise.
2439 (setenv "HOME" "/tmp")))
2440 (add-after 'unpack 'relax-requirements
2441 (lambda _
2442 (substitute* "standard.gemspec"
2443 (("\"rubocop\", \".*\"")
2444 (string-append
2445 "\"rubocop\", \"~> "
2446 #$(package-version
2447 (this-package-input "ruby-rubocop"))
2448 "\""))
2449 (("\"rubocop-performance\", \".*\"")
2450 (string-append
2451 "\"rubocop-performance\", \"~> "
2452 #$(package-version
2453 (this-package-input "ruby-rubocop-performance"))
2454 "\"")))))
2455 (add-after 'unpack 'delete-problematic-tests
2456 ;; These tests fail for unknown reasons (see:
2457 ;; https://github.com/testdouble/standard/issues/532).
2458 (lambda _
2459 (delete-file "test/standard_test.rb")
2460 (substitute* "test/standard/base_test.rb"
2461 ((".*test_configures_all_rubocop_cops.*" all)
2462 (string-append all
2463 " skip('fails on guix')\n"))))))))
2464 (native-inputs
2465 (list ruby-simplecov))
2466 (propagated-inputs
2467 (list ruby-language-server-protocol
2468 ruby-lint-roller
2469 ruby-rubocop
2470 ruby-rubocop-performance
2471 ruby-standard-custom
2472 ruby-standard-performance))
2473 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
2474 (description "Standard is a port of StandardJS. Like StandardJS, it aims
2475to save time in the following ways:
2476@itemize
2477@item No configuration.
2478@item Automatically format code.
2479@item Catch style issues and programmer errors early.
2480@end itemize")
2481 (home-page "https://github.com/testdouble/standard")
2482 (license license:expat)))
2483
2484(define-public ruby-chunky-png
2485 (package
2486 (name "ruby-chunky-png")
2487 (version "1.4.0")
2488 (source
2489 (origin
2490 (method git-fetch)
2491 (uri (git-reference
2492 (url "https://github.com/wvanbergen/chunky_png")
2493 (commit (string-append "v" version))))
2494 (file-name (git-file-name name version))
2495 (sha256
2496 (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))
2497 (patches
2498 (search-patches "ruby-chunky-png-ruby-3-2-support.patch"))))
2499 (build-system ruby-build-system)
2500 (arguments
2501 (list
2502 #:test-target "spec"
2503 #:phases
2504 #~(modify-phases %standard-phases
2505 (add-after 'unpack 'disable-bundler
2506 (lambda _
2507 (substitute* (find-files "." "\\.rb$")
2508 (("require.*bundler/setup.*") "")))))))
2509 (native-inputs
2510 (list bundler ruby-rspec ruby-standard ruby-yard))
2511 (synopsis "Ruby library to handle PNG images")
2512 (description "ChunkyPNG is a pure Ruby library that can read and write
2513Portable Network Graphics (PNG) images without depending on an external image
2514library. It tries to be memory efficient and reasonably fast. It has
2515features such as:
2516@itemize
2517@item
2518Decoding support for any image that the PNG standard allows. This includes all
2519standard color modes, all bit depths, all transparency, and interlacing and
2520filtering options.
2521@item
2522Encoding support for images of all color modes (true color, grayscale, and
2523indexed) and transparency for all these color modes. The best color mode is
2524chosen automatically, based on the amount of used colors.
2525@item Read/write access to the image's pixels.
2526@item Read/write access to all image metadata that is stored in chunks.
2527@item
2528Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
2529pixel, depending on the hardware).
2530@item
2531Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
2532integer math and a highly optimized saving routine.
2533@item Interoperability with RMagick.
2534@end itemize
2535
2536ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
2537loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
2538Deal with untrusted images in a separate process, e.g., by using @code{fork}
2539or a background processing library.")
2540 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
2541 (license license:expat)))
2542
2543(define-public ruby-text-hyphen
2544 (package
2545 (name "ruby-text-hyphen")
2546 (version "1.5.0")
2547 (source
2548 (origin
2549 (method url-fetch)
2550 (uri (rubygems-uri "text-hyphen" version))
2551 (sha256
2552 (base32
2553 "01js0wxz84cc5hzxgqbcqnsa0y6crhdi6plmgkzyfm55p0rlajn4"))))
2554 (build-system ruby-build-system)
2555 (native-inputs
2556 (list ruby-hoe))
2557 (synopsis "Ruby library to hyphenate words in various languages")
2558 (description "Text::Hyphen is a Ruby library to hyphenate words in various
2559languages using Ruby-fied versions of TeX hyphenation patterns. It will
2560properly hyphenate various words according to the rules of the language the
2561word is written in. The algorithm is based on that of the TeX typesetting
2562system by Donald E. Knuth.")
2563 (home-page "https://github.com/halostatue/text-hyphen")
2564 ;; The whole is licensed under the Expat license, but parts use various
2565 ;; versions of the LaTeX Project Public License.
2566 (license license:expat)))
2567
2568(define-public ruby-open-uri-cached
2569 (package
2570 (name "ruby-open-uri-cached")
2571 (version "1.0.0")
2572 (source
2573 (origin
2574 (method url-fetch)
2575 (uri (rubygems-uri "open-uri-cached" version))
2576 (sha256
2577 (base32
2578 "03v0if3jlvbclnd6jgjk94fbhf0h2fq1wxr0mbx7018sxzm0biwr"))))
2579 (build-system ruby-build-system)
2580 (arguments
2581 `(#:tests? #f)) ;no test suite
2582 (synopsis "OpenURI with transparent disk caching")
2583 (description "OpenURI with transparent disk caching, which is
2584useful to avoid making excessive queries, for example when scraping
2585web pages.")
2586 (home-page "https://github.com/tigris/open-uri-cached")
2587 (license license:expat)))
2588
2589(define-public ruby-ast
2590 (package
2591 (name "ruby-ast")
2592 (version "2.4.2")
2593 (source
2594 (origin
2595 (method git-fetch) ;no test included in gem from v2.4.1
2596 (uri (git-reference
2597 (url "https://github.com/whitequark/ast")
2598 (commit (string-append "v" version))))
2599 (file-name (git-file-name name version))
2600 (sha256
2601 (base32
2602 "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
2603 (build-system ruby-build-system)
2604 (arguments
2605 '(#:phases
2606 (modify-phases %standard-phases
2607 (add-after 'unpack 'remove-coveralls-requirement
2608 (lambda _
2609 (substitute* "test/helper.rb"
2610 (("require 'coveralls'") "")
2611 (("Coveralls::SimpleCov::Formatter") ""))))
2612 (add-after 'extract-gemspec 'remove-unnecessary-requirements
2613 (lambda* (#:key inputs #:allow-other-keys)
2614 (substitute* "ast.gemspec"
2615 ((".*coveralls.*") "\n")
2616 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
2617 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
2618 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
2619 (("12\\.3") "13.0")))))))
2620 (native-inputs
2621 (list bundler
2622 ruby-bacon
2623 ruby-bacon-colored-output
2624 ruby-json-pure
2625 ruby-kramdown
2626 ruby-mime-types
2627 ruby-racc
2628 ruby-rest-client
2629 ruby-simplecov
2630 ruby-yard))
2631 (synopsis "Library for working with Abstract Syntax Trees")
2632 (description
2633 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
2634It does this through immutable data structures.")
2635 (home-page "https://whitequark.github.io/ast/")
2636 (license license:expat)))
2637
2638(define-public ruby-sporkmonger-rack-mount
2639 ;; Testing the addressable gem requires a newer commit than that released, so
2640 ;; use an up to date version.
2641 (let ((revision "1")
2642 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
2643 (package
2644 (name "ruby-sporkmonger-rack-mount")
2645 (version (git-version "0.8.3" revision commit))
2646 (source (origin
2647 (method git-fetch)
2648 (uri (git-reference
2649 (url "https://github.com/sporkmonger/rack-mount")
2650 (commit commit)))
2651 (file-name (git-file-name name version))
2652 (sha256
2653 (base32
2654 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
2655 (build-system ruby-build-system)
2656 (arguments
2657 ;; Tests currently fail so disable them.
2658 ;; https://github.com/sporkmonger/rack-mount/pull/1
2659 `(#:tests? #f))
2660 (propagated-inputs (list ruby-rack))
2661 (synopsis "Stackable dynamic tree based Rack router")
2662 (description
2663 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
2664continue trying routes if the response returns pass. This allows multiple
2665routes to be nested or stacked on top of each other.")
2666 (home-page "https://github.com/sporkmonger/rack-mount")
2667 (license license:expat))))
2668
2669(define-public ruby-ci-reporter
2670 (package
2671 (name "ruby-ci-reporter")
2672 (version "2.1.0")
2673 (source (origin
2674 (method url-fetch)
2675 (uri (rubygems-uri "ci_reporter" version))
2676 (sha256
2677 (base32
2678 "0qcafasmjjr8a5gzr4k92ncm6h2943skwllhjzwz8spawdwc7dla"))))
2679 (build-system ruby-build-system)
2680 (arguments
2681 `(#:test-target "rspec"))
2682 (propagated-inputs
2683 (list ruby-builder ruby-rexml))
2684 (native-inputs
2685 (list bundler ruby-rspec))
2686 (synopsis "Generate XML reports of runs test")
2687 (description
2688 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2689you to generate XML reports of your test runs. The resulting files can be
2690read by a continuous integration system that understands Ant's JUnit report
2691format.")
2692 (home-page "https://github.com/nicksieger/ci_reporter")
2693 (license license:expat)))
2694
2695(define-public ruby-console
2696 (package
2697 (name "ruby-console")
2698 (version "1.16.2")
2699 (source (origin
2700 (method url-fetch)
2701 (uri (rubygems-uri "console" version))
2702 (sha256
2703 (base32
2704 "0y1bv3kd1l9p0k5n3anvvjxdrcq113pyngz2g29i9mvdgbbx7kq2"))))
2705 (build-system ruby-build-system)
2706 ;; XXX: Disable test suite to avoid dependency cycles with ruby-samovar.
2707 (arguments (list #:tests? #f))
2708 (propagated-inputs (list ruby-fiber-local))
2709 (synopsis "Console logging library for Ruby")
2710 (description "This gem provides beautiful console logging for Ruby
2711applications. It implements fast, buffered log output and has the following
2712features:
2713@itemize
2714@item Thread safe global logger with per-fiber context
2715@item Carry along context with nested loggers
2716@item Enable/disable log levels per class
2717@item Detailed logging of exceptions
2718@item Beautiful logging to the terminal or structured logging using JSON.
2719@end itemize")
2720 (home-page "https://github.com/socketry/console")
2721 (license license:expat)))
2722
2723(define-public ruby-contracts
2724 (package
2725 (name "ruby-contracts")
2726 (version "0.17.2")
2727 (source
2728 (origin
2729 (method url-fetch)
2730 (uri (rubygems-uri "contracts" version))
2731 (sha256
2732 (base32
2733 "1sclvlwnlxfaj1595xd0rn3x3w0ljic3vqgnx6476lr7x8xbpbiv"))))
2734 (build-system ruby-build-system)
2735 (arguments
2736 (list
2737 #:test-target "spec"
2738 #:phases
2739 #~(modify-phases %standard-phases
2740 ;; Don't run or require rubocop, the code linting tool, as this is a
2741 ;; bit unnecessary.
2742 (add-after 'unpack 'dont-run-rubocop
2743 (lambda _
2744 (substitute* "Rakefile"
2745 ((".*rubocop.*") "")
2746 ((".*RuboCop.*") "")))))))
2747 (native-inputs
2748 (list ruby-rspec))
2749 (synopsis "Method contracts for Ruby")
2750 (description
2751 "This library provides contracts for Ruby. A contract describes the
2752correct inputs and output for a method, and will raise an error if a incorrect
2753value is found.")
2754 (home-page "https://github.com/egonSchiele/contracts.ruby")
2755 (license license:bsd-2)))
2756
2757(define-public ruby-crack
2758 (package
2759 (name "ruby-crack")
2760 (version "0.4.5")
2761 (source
2762 (origin
2763 (method url-fetch)
2764 (uri (rubygems-uri "crack" version))
2765 (sha256
2766 (base32
2767 "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
2768 (build-system ruby-build-system)
2769 (arguments
2770 `(#:phases
2771 (modify-phases %standard-phases
2772 (replace 'check
2773 (lambda* (#:key tests? #:allow-other-keys)
2774 (when tests?
2775 (for-each (lambda (file)
2776 (display file)(display "\n")
2777 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2778 (find-files "test" ".*rb$"))))))))
2779 (synopsis "Simple JSON and XML parsing for Ruby")
2780 (description
2781 "@code{crack} provides really simple JSON and XML parsing, extracted from
2782code in Merb and Rails.")
2783 (home-page "https://github.com/jnunemaker/crack")
2784 (license license:expat)))
2785
2786(define-public ruby-clamp
2787 (package
2788 (name "ruby-clamp")
2789 (version "1.3.2")
2790 (source (origin
2791 (method url-fetch)
2792 (uri (rubygems-uri "clamp" version))
2793 (sha256
2794 (base32
2795 "08m0syh06bhx8dqn560ivjg96l5cs5s3l9jh2szsnlcdcyl9jsjg"))))
2796 (build-system ruby-build-system)
2797 (arguments
2798 (list #:test-target "spec"
2799 #:phases #~(modify-phases %standard-phases
2800 (add-after 'unpack 'do-not-require-rubocop
2801 (lambda _
2802 (substitute* "Rakefile"
2803 (("require \"rubocop/rake_task\"")
2804 "")
2805 (("RuboCop::RakeTask.new")
2806 "")))))))
2807 (native-inputs (list ruby-rspec))
2808 (synopsis "Command-line parsing library for Ruby")
2809 (description "Clamp provides an object-model for command-line utilities.
2810It handles parsing of command-line options, and generation of usage help.")
2811 (home-page "https://github.com/mdub/clamp")
2812 (license license:expat)))
2813
2814(define-public ruby-cliver
2815 (package
2816 (name "ruby-cliver")
2817 (version "0.3.2")
2818 (source
2819 (origin
2820 (method url-fetch)
2821 (uri (rubygems-uri "cliver" version))
2822 (sha256
2823 (base32
2824 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2825 (build-system ruby-build-system)
2826 (arguments
2827 '(#:phases
2828 (modify-phases %standard-phases
2829 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2830 ;; would be nice, but the tests look to be incompatible:
2831 ;;
2832 ;; NoMethodError: undefined method `last_comment'
2833 (replace 'check
2834 (lambda* (#:key tests? #:allow-other-keys)
2835 (when tests?
2836 (invoke "rspec")))))))
2837 (native-inputs
2838 (list bundler ruby-rspec-2))
2839 (synopsis "Assertions for command-line dependencies in Ruby")
2840 (description
2841 "@code{cliver} provides a way to detect missing command-line
2842dependencies, including versions.")
2843 (home-page "https://github.com/yaauie/cliver")
2844 (license license:expat)))
2845
2846(define-public ruby-czmq-ffi-gen
2847 (package
2848 (name "ruby-czmq-ffi-gen")
2849 (version "0.13.0")
2850 (source
2851 (origin
2852 (method url-fetch)
2853 (uri (rubygems-uri "czmq-ffi-gen" version))
2854 (sha256
2855 (base32
2856 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2857 (build-system ruby-build-system)
2858 (arguments
2859 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2860 #:phases
2861 (modify-phases %standard-phases
2862 (add-after 'unpack 'patch-lib_dirs
2863 (lambda* (#:key inputs #:allow-other-keys)
2864 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2865 (("lib\\_dirs = \\[.*\\]")
2866 (string-append "lib_dirs = ['"
2867 (assoc-ref inputs "czmq") "/lib"
2868 "']")))
2869 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2870 (("lib\\_dirs = \\[.*\\]")
2871 (string-append "lib_dirs = ['"
2872 (assoc-ref inputs "zeromq") "/lib"
2873 "']"))))))))
2874 (inputs
2875 (list zeromq czmq))
2876 (propagated-inputs (list ruby-ffi))
2877 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2878 (description
2879 "These Ruby bindings are not intended to be directly used, but rather
2880used by higher level bindings like those provided by CZTop.")
2881 (home-page
2882 "https://github.com/paddor/czmq-ffi-gen")
2883 (license license:isc)))
2884
2885(define-public ruby-cztop
2886 (package
2887 (name "ruby-cztop")
2888 (version "0.12.2")
2889 (source
2890 (origin
2891 (method url-fetch)
2892 (uri (rubygems-uri "cztop" version))
2893 (sha256
2894 (base32
2895 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2896 (build-system ruby-build-system)
2897 (arguments
2898 '(#:test-target "spec"
2899 #:phases
2900 (modify-phases %standard-phases
2901 (add-after 'unpack 'patch-lib_paths
2902 (lambda* (#:key inputs #:allow-other-keys)
2903 (substitute* "lib/cztop/poller/zmq.rb"
2904 (("lib\\_paths = \\[.*\\]")
2905 (string-append "lib_paths = ['"
2906 (assoc-ref inputs "zeromq") "/lib"
2907 "']"))))))))
2908 (native-inputs
2909 (list bundler ruby-rspec))
2910 (inputs
2911 (list zeromq))
2912 (propagated-inputs
2913 (list ruby-czmq-ffi-gen))
2914 (synopsis "CZMQ Ruby bindings")
2915 (description
2916 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2917CZMQ. The focus of of CZTop is on being easy to use and providing first class
2918support for security mechanisms.")
2919 (home-page "https://github.com/paddor/cztop")
2920 (license license:isc)))
2921
2922(define-public ruby-saikuro-treemap
2923 (package
2924 (name "ruby-saikuro-treemap")
2925 (version "0.2.0")
2926 (source (origin
2927 (method url-fetch)
2928 (uri (rubygems-uri "saikuro_treemap" version))
2929 (sha256
2930 (base32
2931 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2932 (build-system ruby-build-system)
2933 ;; Some of the tests fail because the generated JSON has keys in a
2934 ;; different order. This is a problem with the test suite rather than any
2935 ;; of the involved libraries.
2936 (arguments `(#:tests? #f))
2937 (propagated-inputs
2938 (list ruby-json-pure ruby-atoulme-saikuro))
2939 (synopsis "Generate complexity treemap based on saikuro analysis")
2940 (description
2941 "This gem generates a treemap showing the complexity of Ruby code on
2942which it is run. It uses Saikuro under the covers to analyze Ruby code
2943complexity.")
2944 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2945 (license license:expat)))
2946
2947(define-public ruby-oauth2
2948 (package
2949 (name "ruby-oauth2")
2950 (version "2.0.12")
2951 (source
2952 (origin
2953 (method git-fetch)
2954 (uri (git-reference
2955 (url "https://gitlab.com/oauth-xx/oauth2")
2956 (commit (string-append "v" version))))
2957 (file-name (git-file-name name version))
2958 (sha256
2959 (base32 "0cgya1rjf2v6f4j86cq1k5hpd1ks7xayvddsidsnc0fl3zkm8ygj"))))
2960 (build-system ruby-build-system)
2961 (native-inputs
2962 (list bundler
2963 ruby-addressable
2964 ruby-backports
2965 ruby-rexml
2966 ruby-rspec-block-is-expected
2967 ruby-rspec-pending-for
2968 ruby-rspec-stubbed-env
2969 ruby-silent-stream))
2970 (propagated-inputs
2971 (list ruby-faraday
2972 ruby-hashie
2973 ruby-jwt
2974 ruby-multi-xml
2975 ruby-rack
2976 ruby-snaky-hash
2977 ruby-version-gem))
2978 (synopsis "Ruby wrapper for the OAuth 2.0")
2979 (description
2980 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2981with a similar style to the original OAuth spec.")
2982 (home-page "https://github.com/oauth-xx/oauth2")
2983 (license license:expat)))
2984
2985(define-public ruby-omniauth
2986 (package
2987 (name "ruby-omniauth")
2988 (version "2.1.1")
2989 (source (origin
2990 (method git-fetch) ;for tests
2991 (uri (git-reference
2992 (url "https://github.com/omniauth/omniauth")
2993 (commit (string-append "v" version))))
2994 (file-name (git-file-name name version))
2995 (sha256
2996 (base32
2997 "1mm7a4ll7ymamrbsl63yi6i34qpwmh2nh5a9kj961gja1iz2gyd1"))))
2998 (build-system ruby-build-system)
2999 (arguments
3000 (list #:phases
3001 #~(modify-phases %standard-phases
3002 (add-after 'unpack 'relax-requirements
3003 (lambda _
3004 (substitute* "spec/helper.rb"
3005 ;; This condition is used to require coveralls and
3006 ;; simplecov; override it to avoid these extraneous
3007 ;; requirements.
3008 (("RUBY_VERSION >= '1.9'")
3009 "false")
3010 (("require 'rack/freeze'") "")))))))
3011 (native-inputs (list ruby-rspec))
3012 (propagated-inputs (list ruby-hashie ruby-rack ruby-rack-test
3013 ruby-rack-protection))
3014 (synopsis "Generalized Rack framework for multiple-provider authentication")
3015 (description
3016 "This package provides a generalized Rack framework for multiple-provider
3017authentication.")
3018 (home-page "https://github.com/omniauth/omniauth")
3019 (license license:expat)))
3020
3021(define-public ruby-omniauth-oauth2
3022 (package
3023 (name "ruby-omniauth-oauth2")
3024 (version "1.8.0")
3025 (source
3026 (origin
3027 (method url-fetch)
3028 (uri (rubygems-uri "omniauth-oauth2" version))
3029 (sha256
3030 (base32
3031 "0y4y122xm8zgrxn5nnzwg6w39dnjss8pcq2ppbpx9qn7kiayky5j"))))
3032 (build-system ruby-build-system)
3033 (arguments
3034 (list #:phases
3035 #~(modify-phases %standard-phases
3036 (add-after 'unpack 'relax-requirements
3037 (lambda _
3038 (substitute* "spec/helper.rb"
3039 ;; This condition is used to require coveralls and
3040 ;; simplecov; override it to avoid these extraneous
3041 ;; requirements.
3042 (("RUBY_VERSION >= \"1.9\"")
3043 "false")))))))
3044 (propagated-inputs (list ruby-oauth2 ruby-omniauth))
3045 (native-inputs (list ruby-rspec ruby-rack-test ruby-webmock))
3046 (synopsis "Abstract OAuth2 strategy for OmniAuth")
3047 (description
3048 "This library provides a generic OAuth2 strategy for OmniAuth. It
3049doesn't provide a way to gather user information, so should be used as a
3050building block for authentication strategies.")
3051 (home-page "https://github.com/omniauth/omniauth-oauth2")
3052 (license license:expat)))
3053
3054(define-public ruby-open4
3055 (package
3056 (name "ruby-open4")
3057 (version "1.3.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (rubygems-uri "open4" version))
3062 (sha256
3063 (base32
3064 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
3065 (build-system ruby-build-system)
3066 (arguments
3067 '(#:phases
3068 (modify-phases %standard-phases
3069 (add-after 'unpack 'patch-minitest
3070 (lambda _
3071 (substitute* "test/lib/test_case.rb"
3072 (("MiniTest::Unit::TestCase")
3073 "Minitest::Test"))))
3074 (add-after 'unpack 'patch
3075 (lambda _
3076 (substitute* "rakefile"
3077 ;; Update the Rakefile so it works
3078 (("-rubygems") "-rrubygems")
3079 (("Config") "RbConfig"))))
3080 (add-before 'check 'set-LIB
3081 (lambda _
3082 ;; This is used in the rakefile when running the tests
3083 (setenv "LIB" "open4"))))))
3084 (native-inputs (list ruby-minitest))
3085 (synopsis "Open child processes from Ruby and manage them easily")
3086 (description
3087 "@code{Open4} is a Ruby library to run child processes and manage their
3088input and output.")
3089 (home-page "https://github.com/ahoward/open4")
3090 (license license:ruby)))
3091
3092(define-public ruby-options
3093 (package
3094 (name "ruby-options")
3095 (version "2.3.2")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (rubygems-uri "options" version))
3100 (sha256
3101 (base32
3102 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
3103 (build-system ruby-build-system)
3104 (arguments
3105 (list
3106 #:phases
3107 #~(modify-phases %standard-phases
3108 (replace 'check
3109 (lambda* (#:key tests? #:allow-other-keys)
3110 (when tests?
3111 (substitute* "spec/options_spec.rb"
3112 (("require .* \"/spec_helper\"")
3113 "require \"spec_helper\"\n"))
3114 (substitute* "spec/spec_helper.rb"
3115 (("require 'spec'")
3116 "require 'rspec'\n"))
3117 (invoke "rspec" "spec")))))))
3118 (native-inputs (list ruby-rspec))
3119 (synopsis "Ruby library to parse options from *args cleanly")
3120 (description
3121 "The @code{options} library helps with parsing keyword options in Ruby
3122functions.")
3123 (home-page "https://github.com/ahoward/options")
3124 (license license:ruby)))
3125
3126(define-public ruby-erubi
3127 (package
3128 (name "ruby-erubi")
3129 (version "1.11.0")
3130 (source
3131 (origin
3132 (method git-fetch)
3133 (uri (git-reference
3134 (url "https://github.com/jeremyevans/erubi")
3135 (commit version)))
3136 (file-name (git-file-name name version))
3137 (sha256
3138 (base32 "0y4qskz260fjwbnjps5z5yygjwgh6ds0f97lfa9gsmh6zqa1lvvx"))))
3139 (build-system ruby-build-system)
3140 (arguments
3141 (list #:test-target "spec"))
3142 (native-inputs (list ruby-minitest
3143 ruby-minitest-global-expectations))
3144 (synopsis "ERB template engine for Ruby")
3145 (description
3146 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
3147Erubis")
3148 (home-page "https://github.com/jeremyevans/erubi")
3149 (license license:expat)))
3150
3151(define-public ruby-erubis
3152 (package
3153 (name "ruby-erubis")
3154 (version "2.7.0")
3155 (source
3156 (origin
3157 (method url-fetch)
3158 (uri (rubygems-uri "erubis" version))
3159 (sha256
3160 (base32
3161 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
3162 (build-system ruby-build-system)
3163 (arguments
3164 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
3165 (synopsis "Implementation of embedded Ruby (eRuby)")
3166 (description
3167 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
3168features such as multi-language support, auto escaping, auto trimming spaces
3169around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
3170support.")
3171 (home-page "http://www.kuwata-lab.com/erubis/")
3172 (license license:expat)))
3173
3174(define-public ruby-ethon
3175 (package
3176 (name "ruby-ethon")
3177 (version "0.17.0")
3178 (source
3179 (origin
3180 (method git-fetch)
3181 (uri (git-reference
3182 (url "https://github.com/typhoeus/ethon")
3183 (commit (string-append "v" version))))
3184 (file-name (git-file-name name version))
3185 (sha256
3186 (base32
3187 "06rjq0r3bbybycqp6n2xqpcqmz5x8lymnk6fj5wsq59s8gf843r9"))))
3188 (build-system ruby-build-system)
3189 (arguments
3190 (list
3191 #:phases
3192 #~(modify-phases %standard-phases
3193 (add-after 'unpack 'libcurl-use-absolute-reference
3194 (lambda* (#:key inputs #:allow-other-keys)
3195 (substitute* "lib/ethon/curls/settings.rb"
3196 (("libcurl', 'libcurl\\.so\\.4")
3197 (search-input-file inputs "/lib/libcurl.so")))))
3198 (add-after 'extract-gemspec 'remove-MIME-types-version-constraint
3199 (lambda _
3200 (substitute* "Gemfile"
3201 (("(gem \"mime-types\").*" _ gem)
3202 gem))))
3203 ;; Tell Bundler not to request perf dependencies
3204 (add-after 'extract-gemspec 'remove-Bundler-setup
3205 (lambda _
3206 (substitute* "spec/spec_helper.rb"
3207 (("Bundler.setup")
3208 ""))))
3209 (replace 'check
3210 (lambda* (#:key tests? #:allow-other-keys)
3211 (when tests?
3212 (for-each (lambda (file)
3213 (invoke "ruby" "-Ispec" file))
3214 (find-files "spec" "_spec\\.rb$"))))))))
3215 (native-inputs (list ruby-rspec ruby-sinatra ruby-mustermann
3216 ruby-mime-types ruby-webrick))
3217 (inputs
3218 (list curl))
3219 (propagated-inputs
3220 (list ruby-ffi))
3221 (synopsis "Very lightweight @code{libcurl} wrapper")
3222 (description
3223 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
3224 (home-page "https://github.com/typhoeus/ethon")
3225 (license license:expat)))
3226
3227(define-public ruby-execjs
3228 (package
3229 (name "ruby-execjs")
3230 (version "2.7.0")
3231 (source
3232 (origin
3233 ;; fetch from github as the gem does not contain testing code
3234 (method git-fetch)
3235 (uri (git-reference
3236 (url "https://github.com/rails/execjs")
3237 (commit (string-append "v" version))))
3238 (file-name (git-file-name name version))
3239 (sha256
3240 (base32
3241 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
3242 (build-system ruby-build-system)
3243 (native-inputs
3244 (list bundler
3245 ;; The test suite tests all the available backends. Currently, this just
3246 ;; means the node backend.
3247 ;;
3248 ;; PASSED: test:node
3249 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
3250 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
3251 node-lts))
3252 (synopsis "Run JavaScript code from Ruby")
3253 (description
3254 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
3255runtime to evaluate your JavaScript program, then returns the result to you as
3256a Ruby object.")
3257 (home-page "https://github.com/rails/execjs")
3258 (license license:expat)))
3259
3260(define-public ruby-fakefs
3261 (package
3262 (name "ruby-fakefs")
3263 (version "2.8.0")
3264 (home-page "https://github.com/fakefs/fakefs")
3265 (source (origin
3266 ;; The Rubygems release does not contain tests.
3267 (method git-fetch)
3268 (uri (git-reference
3269 (url home-page)
3270 (commit (string-append "v" version))))
3271 (file-name (git-file-name name version))
3272 (sha256
3273 (base32
3274 "0a3vq6cllml279j77hxipmbln31pjw6di3zdgpzqvhqgazv55v10"))))
3275 (build-system ruby-build-system)
3276 (arguments
3277 '(#:phases (modify-phases %standard-phases
3278 (replace 'replace-git-ls-files
3279 (lambda _
3280 (substitute* "fakefs.gemspec"
3281 (("`git ls-files lib README.md LICENSE`")
3282 "`find lib README.md LICENSE -type f | sort`"))))
3283 (add-before 'check 'remove-version-constraints
3284 (lambda _
3285 ;; Drop hard version requirements for test dependencies.
3286 (substitute* "fakefs.gemspec"
3287 (("(.*add_development_dependency .*), .*" _ dep)
3288 (string-append dep "\n"))))))))
3289 (native-inputs
3290 (list ruby-bump ruby-maxitest ruby-pry ruby-rubocop ruby-rspec))
3291 (synopsis "Fake file system for Ruby")
3292 (description
3293 "This package provides a fake file system for use in test suites. It
3294avoids the need for manually creating temporary directories, or dealing
3295with platform intricacies in @code{File} and @code{FileUtils}.")
3296 (license license:expat)))
3297
3298(define-public ruby-orderedhash
3299 (package
3300 (name "ruby-orderedhash")
3301 (version "0.0.6")
3302 (source (origin
3303 (method url-fetch)
3304 (uri (rubygems-uri "orderedhash" version))
3305 (sha256
3306 (base32
3307 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
3308 (build-system ruby-build-system)
3309 (arguments
3310 '(#:tests? #f)) ; no test suite
3311 (synopsis "Ruby library providing an order-preserving hash")
3312 (description "Orderedhash is a Ruby library providing a hash
3313implementation that preserves the order of items and features some array-like
3314extensions.")
3315 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
3316 (license license:public-domain)))
3317
3318(define-public ruby-libxml
3319 (package
3320 (name "ruby-libxml")
3321 (version "5.0.5")
3322 (source
3323 (origin
3324 (method url-fetch)
3325 (uri (rubygems-uri "libxml-ruby" version))
3326 (sha256
3327 (base32 "16jfgrgb3ys7lk4b7m6s5kg3jdd5w976k6hmf1fmbpw254ahgg7i"))))
3328 (build-system ruby-build-system)
3329 (native-inputs (list ruby-minitest ruby-rake-compiler))
3330 (arguments
3331 (list
3332 #:gem-flags
3333 ;; TODO: Re-enable when documentation generation works
3334 #~(list "--no-document"
3335 "--"
3336 (string-append "--with-xml2-include="
3337 #$(this-package-input "libxml2")
3338 "/include/libxml2" ))
3339 #:phases
3340 #~(modify-phases %standard-phases
3341 ;; tests: 393 runs, 42523 assertions, 0 failures, 0 errors, 20 skips
3342 ;;
3343 ;; TODO: Implement #:test-flags in ruby-build-system and figure out
3344 ;; how to skip tests more elegant.
3345 (add-after 'unpack 'skip-failing-tests
3346 (lambda _
3347 (for-each
3348 (lambda (method)
3349 (substitute* "test/test_canonicalize.rb"
3350 (((string-append "def " method) def)
3351 (string-append def "; skip \"CR/LF mismatch\";"))))
3352 '("test_canonicalize_with_w3c_c14n_3_1"
3353 "test_canonicalize_with_w3c_c14n_3_2"
3354 "test_canonicalize_with_w3c_c14n_3_3"
3355 "test_canonicalize_with_w3c_c14n_3_4"))
3356 (substitute* "test/test_schema.rb"
3357 (("def test_schema_load_from_uri" def)
3358 (string-append def "; skip \"missing XLink schema\";")))
3359 (substitute* "test/test_reader.rb"
3360 (("def test_string_encoding" def)
3361 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3362 (substitute* "test/test_sax_parser.rb"
3363 (("def test_noexistent_file" def)
3364 (string-append def "; skip \"assertion is not equal\";")))
3365 (substitute* "test/test_html_parser.rb"
3366 (("def test_no_implied" def)
3367 (string-append def "; skip \"no such file or directory\";"))
3368 (("def test_noexistent_file" def)
3369 (string-append def "; skip \"no such file or directory\";")))
3370 (substitute* "test/test_html_parser_context.rb"
3371 (("def test_default_options" def)
3372 (string-append def "; skip \"assertion is not equal\";")))
3373 (substitute* "test/test_dtd.rb"
3374 (("def test_external_dtd" def)
3375 (string-append def "; skip \"assertion is not equal\";")))
3376 (for-each
3377 (lambda (method)
3378 (substitute* "test/test_xml.rb"
3379 (((string-append "def " method) def)
3380 (string-append def "; skip \"expected false to be truthy\";"))))
3381 '("test_enabled_ftp"
3382 "test_enabled_docbook"
3383 "test_enabled_unicode"
3384 "test_enabled_http"))
3385 (substitute* "test/test_reader.rb"
3386 (("def test_invalid_encoding" def)
3387 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3388 (for-each
3389 (lambda (method)
3390 (substitute* "test/test_parser.rb"
3391 (((string-append "def " method) def)
3392 (string-append def "; skip \"assertion is not equal\";"))))
3393 '("test_bad_xml"
3394 "test_noexistent_file"
3395 "test_file_encoding"
3396 "test_string_encoding"))))
3397 (add-after 'install 'set-gem-path
3398 (lambda _
3399 (setenv "GEM_PATH" (string-append
3400 (getenv "GEM_PATH") ":"
3401 #$output "/lib/ruby/vendor_ruby"))))
3402 (delete 'check)
3403 (add-after 'set-gem-path 'check
3404 (assoc-ref %standard-phases 'check)))))
3405 (inputs
3406 (list libxml2
3407 zlib))
3408 (home-page "https://xml4r.github.io/libxml-ruby/")
3409 (synopsis "Ruby bindings for GNOME Libxml2")
3410 (description
3411 "The Libxml-Ruby project provides Ruby language bindings for the GNOME
3412Libxml2 XML toolkit.")
3413 (license license:expat)))
3414
3415(define-public ruby-lino
3416 (package
3417 (name "ruby-lino")
3418 (version "4.1.0")
3419 (source
3420 (origin
3421 (method git-fetch)
3422 (uri (git-reference
3423 (url "https://github.com/infrablocks/lino")
3424 (commit (string-append "v" version))))
3425 (file-name (git-file-name name version))
3426 (sha256
3427 (base32 "0hz7ivjl6ig63gng8b3y6cmmjymf809044c04460f8kq9q9xr9d7"))))
3428 (build-system ruby-build-system)
3429 (arguments
3430 (list
3431 #:phases
3432 #~(modify-phases %standard-phases
3433 (add-after 'unpack 'loosen-dependency-constraints
3434 (lambda _
3435 (substitute* "lino.gemspec"
3436 (("~>") ">="))))
3437 (add-after 'unpack 'remove-unnecessary-dependencies
3438 (lambda _
3439 (delete-file "Gemfile.lock")
3440 (substitute* "lino.gemspec"
3441 (("'hamster'.*") "'immutable-ruby', '~> 0.2'\n")
3442 ((".*rake_circle_ci.*") "\n")
3443 ((".*rake_git.*") "\n")
3444 ((".*rake_gpg.*") "\n")
3445 ((".*rake_ssh.*") "\n")
3446 ((".*rake_simplecov.*") "\n")
3447 (("spec\\.add_development_dependency 'simplecov'") ""))
3448 (substitute* "spec/spec_helper.rb"
3449 ((".*simplecov.*") "\n")
3450 ((".*bundler.*") "\n")
3451 ;; Use [].each to disable running the SimpleCov configuration
3452 ;; block
3453 (("SimpleCov\\.start") "[].each"))))
3454 (add-after 'unpack 'replace-hamster-with-immutable
3455 (lambda _
3456 (substitute* "lib/lino/builders/command_line.rb"
3457 (("hamster") "immutable/vector"))
3458 (substitute* "lib/lino/builders/subcommand.rb"
3459 (("hamster") "immutable/vector")
3460 (("Hamster") "Immutable"))
3461 (substitute* (find-files "lib/lino/builders/mixins/" "\\.rb")
3462 (("Hamster") "Immutable"))
3463 (substitute* (find-files "lib/lino/model/" "\\.rb")
3464 (("Hamster") "Immutable"))))
3465 ;; Reduce required development dependencies by running rspec directly.
3466 (replace 'check
3467 (lambda* (#:key tests? #:allow-other-keys)
3468 (when tests?
3469 (invoke "ruby" (which "rspec"))))))))
3470 (propagated-inputs (list ruby-childprocess ruby-immutable-ruby ruby-open4))
3471 (native-inputs (list ruby-rspec))
3472 (synopsis "Build and execute commands in Ruby")
3473 (description
3474 "@code{Lino} provides an interface to run external commands. It provides
3475an interface to add options as well as managing the standard input, output and
3476error streams.")
3477 (home-page "https://github.com/infrablocks/lino")
3478 (license license:expat)))
3479
3480(define-public ruby-x25519
3481 (package
3482 (name "ruby-x25519")
3483 (version "1.0.10")
3484 (source (origin
3485 (method git-fetch)
3486 (uri (git-reference
3487 (url "https://github.com/RubyCrypto/x25519")
3488 (commit (string-append "v" version))))
3489 (file-name (git-file-name name version))
3490 (sha256
3491 (base32
3492 "1g0311ly32f6hfn4q5fvkbjbl2bhv1l9fx6s0kglxfsrwq51926y"))
3493 (patches
3494 (search-patches
3495 "ruby-x25519-automatic-fallback-non-x86_64.patch"))))
3496 (build-system ruby-build-system)
3497 (arguments
3498 (list #:test-target "spec"
3499 #:phases #~(modify-phases %standard-phases
3500 (add-after 'unpack 'remove-unnecessary-dependencies
3501 (lambda _
3502 (substitute* "Gemfile"
3503 ((".*rubocop.*")
3504 ""))
3505 (substitute* "Rakefile"
3506 (("require \"rubocop/rake_task\"")
3507 "")
3508 (("RuboCop::RakeTask.new")
3509 ""))))
3510 (add-before 'build 'compile
3511 (lambda _
3512 (invoke "rake" "compile"))))))
3513 (native-inputs (list ruby-rake-compiler ruby-rspec))
3514 (synopsis "Cryptography library for Ruby providing the X25519
3515Diffie-Hellman function")
3516 (description
3517 "The x25519 gem is an efficient public key cryptography library for
3518Ruby providing key exchange/agreement via the X25519 (as known as
3519Curve25519) Elliptic Curve Diffie-Hellman function as described in
3520@url{https://www.ietf.org/rfc/rfc7748.txt, RFC 7748}.")
3521 (home-page "https://github.com/RubyCrypto/x25519")
3522 (license license:bsd-3)))
3523
3524(define-public ruby-xml-simple
3525 (package
3526 (name "ruby-xml-simple")
3527 (version "1.1.5")
3528 (source (origin
3529 (method url-fetch)
3530 (uri (rubygems-uri "xml-simple" version))
3531 (sha256
3532 (base32
3533 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
3534 (build-system ruby-build-system)
3535 (arguments
3536 '(#:tests? #f)) ; no test suite
3537 (synopsis "Simple Ruby library for XML processing")
3538 (description "This library provides a simple API for XML processing in
3539Ruby.")
3540 (home-page "https://github.com/maik/xml-simple")
3541 (license license:ruby)))
3542
3543(define-public ruby-xpath
3544 (package
3545 (name "ruby-xpath")
3546 (version "3.2.0")
3547 (source (origin
3548 (method url-fetch)
3549 (uri (rubygems-uri "xpath" version))
3550 (sha256
3551 (base32
3552 "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"))))
3553 (build-system ruby-build-system)
3554 (arguments (list #:phases #~(modify-phases %standard-phases
3555 (replace 'check
3556 (lambda* (#:key tests? #:allow-other-keys)
3557 (when tests?
3558 (invoke "rspec" "spec" )))))))
3559 (native-inputs (list ruby-pry ruby-rspec))
3560 (propagated-inputs (list ruby-nokogiri))
3561 (synopsis "Ruby DSL for generating XPath expressions")
3562 (description "XPath is a Ruby domain-specific language (DSL) for
3563generating XPath expressions.")
3564 (home-page "https://github.com/teamcapybara/xpath")
3565 (license license:expat)))
3566
3567(define-public ruby-thor
3568 (package
3569 (name "ruby-thor")
3570 (version "1.5.0")
3571 (source (origin
3572 ;; Pull from git because the gem has no tests.
3573 (method git-fetch)
3574 (uri (git-reference
3575 (url "https://github.com/rails/thor")
3576 (commit (string-append "v" version))))
3577 (file-name (git-file-name name version))
3578 (sha256
3579 (base32
3580 "1mfc7x81zvi56as2r5zlbp9qrn71pdxlsnry06zi8rfykb4qnwfm"))))
3581 (build-system ruby-build-system)
3582 (arguments
3583 (list
3584 #:phases
3585 #~(modify-phases %standard-phases
3586 (add-after 'unpack 'remove-coveralls-dependency
3587 (lambda _
3588 ;; Do not hook the test suite into the online coveralls service.
3589 (substitute* "Gemfile"
3590 ((".*coveralls.*") ""))
3591 (substitute* "spec/helper.rb"
3592 (("require \"coveralls\"") "")
3593 (("Coveralls::SimpleCov::Formatter") ""))))
3594 (add-after 'unpack 'disable-problematic-tests
3595 (lambda _
3596 ;; These tests attempt to check the git repository for
3597 ;; tabs vs spaces, double vs single quotes, etc, and
3598 ;; depend on the git checkout.
3599 (delete-file "spec/quality_spec.rb")
3600 (substitute* "spec/parser/options_spec.rb"
3601 ;; This test fails for unknown reasons (see:
3602 ;; https://github.com/rails/thor/issues/814).
3603 (("it \"raises an error for unknown switches" all)
3604 (string-append "x" all)))))
3605 (replace 'check
3606 (lambda* (#:key tests? #:allow-other-keys)
3607 (when tests?
3608 (invoke "rspec" "spec" )))))))
3609 (native-inputs (list ruby-rspec ruby-simplecov ruby-webmock))
3610 (synopsis "Ruby toolkit for building command-line interfaces")
3611 (description "Thor is a toolkit for building powerful command-line
3612interfaces.")
3613 (home-page "http://whatisthor.com/")
3614 (license license:expat)))
3615
3616(define-public ruby-lumberjack
3617 (package
3618 (name "ruby-lumberjack")
3619 (version "1.0.13")
3620 (source (origin
3621 (method url-fetch)
3622 (uri (rubygems-uri "lumberjack" version))
3623 (sha256
3624 (base32
3625 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
3626 (build-system ruby-build-system)
3627 (native-inputs
3628 (list ruby-rspec ruby-timecop))
3629 (synopsis "Logging utility library for Ruby")
3630 (description "Lumberjack is a simple logging utility that can be a drop in
3631replacement for Logger or ActiveSupport::BufferedLogger. It provides support
3632for automatically rolling log files even with multiple processes writing the
3633same log file.")
3634 (home-page "https://github.com/bdurand/lumberjack")
3635 (license license:expat)))
3636
3637(define-public ruby-rbnacl
3638 (package
3639 (name "ruby-rbnacl")
3640 (version "7.1.1")
3641 (source (origin
3642 (method url-fetch)
3643 (uri (rubygems-uri "rbnacl" version))
3644 (sha256
3645 (base32
3646 "0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
3647 (build-system ruby-build-system)
3648 (arguments
3649 (list
3650 #:phases
3651 #~(modify-phases %standard-phases
3652 (add-after 'unpack 'remove-unnecessary-dependencies
3653 (lambda _
3654 ;; Coveralls relates to a network service, and Rubocop to code
3655 ;; linting and both are unnecessary to run the tests
3656 (substitute* "Gemfile"
3657 ((".*rubocop.*")
3658 "\n")
3659 ((".*guard-rspec.*")
3660 "\n")
3661 ((".*coveralls.*")
3662 "\n"))
3663 (substitute* "spec/spec_helper.rb"
3664 (("require \"coveralls\"")
3665 "")
3666 (("Coveralls.wear!")
3667 ""))))
3668 (add-after 'unpack 'use-libsodium-from-store
3669 (lambda* (#:key inputs #:allow-other-keys)
3670 (substitute* '("lib/rbnacl/init.rb"
3671 "lib/rbnacl/sodium.rb")
3672 (("ffi_lib \\[.+\\]")
3673 (string-append "ffi_lib [\""
3674 (assoc-ref inputs "libsodium")
3675 "/lib/libsodium.so" "\"]")))))
3676 ;; Run Rspec directly to avoid the Rubocop dependency in the
3677 ;; Rakefile
3678 (replace 'check
3679 (lambda* (#:key tests? #:allow-other-keys)
3680 (when tests?
3681 (invoke "rspec")))))))
3682 (propagated-inputs (list ruby-ffi))
3683 (inputs (list libsodium))
3684 (native-inputs (list bundler ruby-rspec))
3685 (synopsis "Ruby FFI binding to libsodium")
3686 (description
3687 "This package provides Ruby FFI bindings to the Networking and
3688Cryptography (NaCl) library, also known as libsodium. This provides a
3689high-level toolkit for building cryptographic systems and protocols.")
3690 (home-page "https://github.com/RubyCrypto/rbnacl")
3691 (license license:expat)))
3692
3693(define-public ruby-rbs
3694 (package
3695 (name "ruby-rbs")
3696 (version "4.1.3")
3697 (source
3698 (origin
3699 (method git-fetch) ;for tests and templates
3700 (uri (git-reference
3701 (url "https://github.com/ruby/rbs")
3702 (commit (string-append "v" version))))
3703 (file-name (git-file-name name version))
3704 (sha256
3705 (base32 "06v0yxbqiib9fwii6j5qyzyfpyla1rm6vrh1mn33fyx91b84zrpk"))
3706 (modules '((guix build utils)
3707 (ice-9 regex)))
3708 (snippet
3709 '(begin
3710 ;; These are generated files or unrunnable tests.
3711 (for-each delete-file
3712 (cons* "src/lexer.c"
3713 ;; RDoc requires RBS as a runtime library.
3714 "test/rbs/annotate/rdoc_annotator_test.rb"
3715 "test/rbs/annotate/rdoc_source_test.rb"
3716 ;; These requires network connections.
3717 "test/rbs/cli_test.rb"
3718 "test/rbs/collection/config_test.rb"
3719 "test/rbs/collection/installer_test.rb"
3720 "test/rbs/collection/sources/git_test.rb"
3721 "test/rbs/environment_loader_test.rb"
3722 "test/rbs/test/runtime_test_test.rb"
3723 (map (lambda (file)
3724 (let ((matched (string-match
3725 "templates/(.+)\\.erb" file)))
3726 (match:substring matched 1)))
3727 (find-files "templates" "\\.erb"))))
3728 ;; Remove unnecessary usages of LLVM tools.
3729 (substitute* "Rakefile"
3730 (("sh \"clang-format .* src/lexer.c\"")
3731 "")
3732 (("Rake::Task\\[\"format:c\"\\]\\.invoke")
3733 "")
3734 (("compile_task\\.prerequisites\\.unshift\\(:setup_extconf_compile_commands_json\\)")
3735 ""))))))
3736 (build-system ruby-build-system)
3737 (arguments
3738 (list
3739 #:phases
3740 #~(modify-phases %standard-phases
3741 (add-before 'build 'compile
3742 (lambda _
3743 (invoke "rake" "lexer" "templates")
3744 (invoke "rake" "compile")))
3745 (add-before 'check 'set-home
3746 (lambda _
3747 (setenv "HOME" "/tmp"))))))
3748 (native-inputs (list ruby-rake-compiler re2c ruby-json-schema ruby-rspec))
3749 (propagated-inputs (list ruby-logger ruby-prism ruby-tsort))
3750 (synopsis "Type signatures for Ruby")
3751 (description
3752 "RBS is the language for type signatures for Ruby and standard library
3753definitions.")
3754 (home-page "https://github.com/ruby/rbs")
3755 (license (list license:ruby license:bsd-2))))
3756
3757(define-public ruby-rbtree
3758 (package
3759 (name "ruby-rbtree")
3760 (version "0.4.6")
3761 (source (origin
3762 (method url-fetch)
3763 (uri (rubygems-uri "rbtree" version))
3764 (sha256
3765 (base32
3766 "1z0h1x7fpkzxamnvbw1nry64qd6n0nqkwprfair29z94kd3a9vhl"))))
3767 (build-system ruby-build-system)
3768 (arguments
3769 (list
3770 #:phases
3771 #~(modify-phases %standard-phases
3772 (add-before 'build 'extconf
3773 (lambda _
3774 (invoke "ruby" "extconf.rb")
3775 (invoke "make" "install" (string-append "prefix=" #$output))))
3776 (replace 'check
3777 (lambda* (#:key tests? #:allow-other-keys)
3778 (when tests?
3779 (invoke "ruby" "-I." "test.rb")))))))
3780 (synopsis "Ruby implementation of a sorted associative collection")
3781 (description
3782 "This package provides a RBTree is a sorted associative collection that
3783is implemented with a Red-Black Tree. It maps keys to values like a Hash, but
3784maintains its elements in ascending key order. The interface is the almost
3785identical to that of Hash.")
3786 (home-page "http://rbtree.rubyforge.org/")
3787 (license license:expat)))
3788
3789(define-public ruby-rgl
3790 (package
3791 (name "ruby-rgl")
3792 (version "0.6.6")
3793 (source (origin
3794 (method url-fetch)
3795 (uri (rubygems-uri "rgl" version))
3796 (sha256
3797 (base32
3798 "0dji1k9knrf8cxm5psd3pgd9i8f7cfq182jwjpi1pwxw15axf496"))))
3799 (build-system ruby-build-system)
3800 (arguments
3801 (list
3802 #:phases
3803 #~(modify-phases %standard-phases
3804 (add-after 'unpack 'remove-unnecessary-dependencies
3805 (lambda _
3806 (substitute* "Gemfile"
3807 ;; Caring about coverage is a not a packager's task but a
3808 ;; developer's
3809 ;;(("gem \"simplecov\"") "")
3810 ;; CodeClimate is an online service, and is unnecessary for
3811 ;; running the tests
3812 (("gem \"codeclimate-test-reporter\", .*") "\n")))))))
3813 (native-inputs (list ruby-test-unit ruby-simplecov ruby-yard graphviz-minimal))
3814 (propagated-inputs (list ruby-pairing-heap ruby-rexml ruby-stream))
3815 (synopsis "Framework for graph data structures and algorithms")
3816 (description "RGL is a framework for graph data structures and algorithms.
3817The design of the library is much influenced by the Boost Graph Library (BGL)
3818which is written in C++.")
3819 (home-page "https://github.com/monora/rgl")
3820 (license license:bsd-2)))
3821
3822(define-public ruby-hkdf
3823 (package
3824 (name "ruby-hkdf")
3825 (version "1.0.0")
3826 (source
3827 (origin
3828 (method git-fetch)
3829 (uri (git-reference
3830 (url "https://github.com/jtdowney/hkdf")
3831 (commit (string-append "v" version))))
3832 (file-name (git-file-name name version))
3833 (sha256
3834 (base32
3835 "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
3836 (build-system ruby-build-system)
3837 (arguments
3838 `(#:test-target "default"))
3839 (native-inputs
3840 (list ruby-rspec))
3841 (synopsis "HMAC-based Key Derivation Function")
3842 (description
3843 "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
3844HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
3845take some source key material and generate suitable cryptographic keys from it.")
3846 (home-page "https://github.com/jtdowney/hkdf")
3847 (license license:expat)))
3848
3849(define-public ruby-neatjson
3850 (package
3851 (name "ruby-neatjson")
3852 (version "0.10.5")
3853 (source
3854 (origin
3855 (method url-fetch)
3856 (uri (rubygems-uri "neatjson" version))
3857 (sha256
3858 (base32 "0wm1lq8yl6rzysh3wg6fa55w5534k6ppiz0qb7jyvdy582mk5i0s"))))
3859 (build-system ruby-build-system)
3860 (arguments
3861 (list
3862 #:phases
3863 #~(modify-phases %standard-phases
3864 (replace 'check
3865 (lambda* (#:key tests? #:allow-other-keys)
3866 (if tests?
3867 (invoke "ruby" "test/test_neatjson.rb")
3868 (format #t "test suite not run~%")))))))
3869 (synopsis "JSON strings from Ruby objects generator")
3870 (description
3871 "This package implements a functionality of pretty-print JSON with more
3872formatting options than the built-in @code{JSON.pretty_generate}, such as
3873keeping arrays and objects on a single line when possible, aligning or sorting
3874object keys, customizing numeric representation, and more.")
3875 (home-page "https://github.com/Phrogz/NeatJSON")
3876 (license license:expat)))
3877
3878(define-public ruby-nenv
3879 (package
3880 (name "ruby-nenv")
3881 (version "0.3.0")
3882 (source (origin
3883 (method url-fetch)
3884 (uri (rubygems-uri "nenv" version))
3885 (sha256
3886 (base32
3887 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
3888 (build-system ruby-build-system)
3889 (arguments
3890 `(#:tests? #f)) ; no tests included
3891 (native-inputs
3892 (list ruby-rspec bundler))
3893 (synopsis "Ruby interface for modifying the environment")
3894 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
3895and inspect the environment.")
3896 (home-page "https://github.com/e2/nenv")
3897 (license license:expat)))
3898
3899(define-public ruby-ptools
3900 (package
3901 (name "ruby-ptools")
3902 (version "1.5.0")
3903 (source (origin
3904 (method url-fetch)
3905 (uri (rubygems-uri "ptools" version))
3906 (sha256
3907 (base32
3908 "0damllbshkxycrwjv80sz78h76dw7r9z54d17mb5cbha1daq9q2d"))))
3909 (build-system ruby-build-system)
3910 (arguments
3911 (list
3912 #:test-target "spec:all"
3913 #:phases
3914 #~(modify-phases %standard-phases
3915 (add-after 'unpack 'patch
3916 (lambda _
3917 (substitute* "Rakefile"
3918 ;; Don't require rubocop
3919 (("require 'rubocop/rake_task'") "")
3920 (("RuboCop::RakeTask.new") "")
3921 ;; Do not attempt to sign the gem.
3922 (("spec\\.signing_key = .*") ""))
3923
3924 (substitute* "spec/binary_spec.rb"
3925 (("/bin/ls") (which "ls"))
3926 (("/bin/cat") (which "cat"))
3927 (("/bin/chmod") (which "chmod"))
3928 (("/bin/df") (which "df"))))))))
3929 (native-inputs
3930 (list ruby-rspec))
3931 (synopsis "Extra methods for Ruby's @code{File} class")
3932 (description
3933 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
3934class with many additional methods modelled after common POSIX tools, such as
3935@code{File.which} for finding executables, @code{File.tail} to print the last
3936lines of a file, @code{File.wc} to count words, and so on.")
3937 (home-page "https://github.com/djberg96/ptools")
3938 (license license:artistic2.0)))
3939
3940(define-public ruby-permutation
3941 (package
3942 (name "ruby-permutation")
3943 (version "0.1.8")
3944 (source (origin
3945 (method url-fetch)
3946 (uri (rubygems-uri "permutation" version))
3947 (sha256
3948 (base32
3949 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
3950 (build-system ruby-build-system)
3951 (arguments
3952 `(#:phases
3953 (modify-phases %standard-phases
3954 (add-after 'unpack 'fix-rakefile
3955 (lambda _
3956 (substitute* "Rakefile"
3957 (("require 'rake/gempackagetask'")
3958 "require 'rubygems/package_task'")
3959 (("include Config") ""))))
3960 (replace 'check
3961 (lambda _
3962 (invoke "ruby" "-Ilib" "test/test.rb"))))))
3963 (synopsis "Library to perform operations with sequence permutations")
3964 (description "This package provides a Ruby library to perform different
3965operations with permutations of sequences, such as strings and arrays.")
3966 (home-page "https://flori.github.io/permutation")
3967 (license license:gpl2))) ; GPL 2 only
3968
3969(define-public ruby-shellany
3970 (package
3971 (name "ruby-shellany")
3972 (version "0.0.1")
3973 (source (origin
3974 (method url-fetch)
3975 (uri (rubygems-uri "shellany" version))
3976 (sha256
3977 (base32
3978 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
3979 (build-system ruby-build-system)
3980 (arguments
3981 `(#:test-target "default"
3982 #:phases
3983 (modify-phases %standard-phases
3984 (add-after 'unpack 'fix-version-test
3985 (lambda _
3986 (substitute* "spec/shellany_spec.rb"
3987 (("^RSpec") "require \"shellany\"\nRSpec")))))))
3988 (native-inputs
3989 (list ruby-rspec ruby-nenv bundler))
3990 (synopsis "Capture command output")
3991 (description "Shellany is a Ruby library providing functions to capture
3992the output produced by running shell commands.")
3993 (home-page "https://rubygems.org/gems/shellany")
3994 (license license:expat)))
3995
3996(define-public ruby-notiffany
3997 (package
3998 (name "ruby-notiffany")
3999 (version "0.1.3")
4000 (source (origin
4001 (method url-fetch)
4002 (uri (rubygems-uri "notiffany" version))
4003 (sha256
4004 (base32
4005 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
4006 (build-system ruby-build-system)
4007 ;; Tests are not included in the gem.
4008 (arguments `(#:tests? #f))
4009 (propagated-inputs
4010 (list ruby-shellany ruby-nenv))
4011 (native-inputs
4012 (list bundler))
4013 (synopsis "Wrapper library for notification libraries")
4014 (description "Notiffany is a Ruby wrapper library for notification
4015libraries such as Libnotify.")
4016 (home-page "https://github.com/guard/notiffany")
4017 (license license:expat)))
4018
4019(define-public ruby-forking-test-runner
4020 (package
4021 (name "ruby-forking-test-runner")
4022 (version "1.6.0")
4023 (home-page "https://github.com/grosser/forking_test_runner")
4024 (source (origin
4025 (method git-fetch)
4026 (uri (git-reference (url home-page)
4027 (commit (string-append "v" version))))
4028 (file-name (git-file-name name version))
4029 (sha256
4030 (base32
4031 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
4032 (build-system ruby-build-system)
4033 (arguments
4034 '(#:test-target "spec"
4035 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
4036 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
4037 #:tests? #f
4038 #:phases (modify-phases %standard-phases
4039 (replace 'replace-git-ls-files
4040 (lambda _
4041 (substitute* "forking_test_runner.gemspec"
4042 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4043 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))))
4044 (add-before 'check 'remove-version-constraints
4045 (lambda _
4046 ;; Ignore hard coded version constraints for the tests.
4047 (delete-file "Gemfile.lock")))
4048 (add-before 'check 'set-HOME
4049 (lambda _
4050 ;; Many tests invoke Bundler, and fails when Bundler
4051 ;; warns that /homeless-shelter does not exist.
4052 (setenv "HOME" "/tmp"))))))
4053 (native-inputs
4054 (list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
4055 (propagated-inputs
4056 (list ruby-parallel-tests))
4057 (synopsis "Run every test in a fork")
4058 (description
4059 "This package is a wrapper around @code{parallel_tests} that runs every
4060test in a fork to avoid pollution and get clean output per test.")
4061 (license license:expat)))
4062
4063(define-public ruby-formatador
4064 (package
4065 (name "ruby-formatador")
4066 (version "0.2.5")
4067 (source (origin
4068 (method url-fetch)
4069 (uri (rubygems-uri "formatador" version))
4070 (sha256
4071 (base32
4072 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
4073 (build-system ruby-build-system)
4074 ;; Circular dependency: Tests require ruby-shindo, which requires
4075 ;; ruby-formatador at runtime.
4076 (arguments `(#:tests? #f))
4077 (synopsis "Ruby library to format text on stdout")
4078 (description "Formatador is a Ruby library to format text printed to the
4079standard output stream.")
4080 (home-page "https://github.com/geemus/formatador")
4081 (license license:expat)))
4082
4083(define-public ruby-fuubar
4084 (package
4085 (name "ruby-fuubar")
4086 (version "2.3.2")
4087 (source
4088 (origin
4089 ;; Fetch from the git repository, as the gem package doesn't include
4090 ;; the tests.
4091 (method git-fetch)
4092 (uri (git-reference
4093 (url "https://github.com/thekompanee/fuubar")
4094 (commit (string-append "releases/v" version))))
4095 (file-name (git-file-name name version))
4096 (sha256
4097 (base32
4098 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
4099 (build-system ruby-build-system)
4100 (arguments
4101 '(;; TODO: Some tests fail, unsure why.
4102 ;; 21 examples, 7 failures
4103 #:tests? #f
4104 #:phases
4105 (modify-phases %standard-phases
4106 (add-before 'build 'delete-certificate
4107 (lambda _
4108 ;; Remove 's.cert_chain' as we do not build with a private key
4109 (substitute* "fuubar.gemspec"
4110 ((".*cert_chain.*") "")
4111 ((".*signing_key.*") ""))))
4112 (replace 'check
4113 (lambda* (#:key tests? #:allow-other-keys)
4114 (when tests?
4115 (invoke "rspec")))))))
4116 (native-inputs
4117 (list bundler))
4118 (propagated-inputs
4119 (list ruby-rspec-core ruby-progressbar))
4120 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
4121 (description
4122 "Fuubar is an RSpec formatter that uses a progress bar instead of a
4123string of letters and dots as feedback. It also stops on the first test
4124failure.")
4125 (home-page "https://github.com/thekompanee/fuubar")
4126 (license license:expat)))
4127
4128(define-public ruby-haml
4129 (package
4130 (name "ruby-haml")
4131 (version "7.2.0")
4132 (source
4133 (origin
4134 (method url-fetch)
4135 (uri (rubygems-uri "haml" version))
4136 (sha256
4137 (base32
4138 "0nnmzj6g2wynxbrp9j885zab4nkzfryhl2bv6cj1gazyyxqjpzc7"))))
4139 (build-system ruby-build-system)
4140 (arguments
4141 (list #:tests? #f)) ; No included tests
4142 (propagated-inputs
4143 (list ruby-thor ruby-tilt/minimal ruby-temple))
4144 (synopsis "Haml is a Ruby library to generate HTML documents")
4145 (description
4146 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
4147HTML or XML that is designed to express the structure of documents using
4148indentation rather than closing tags. It was originally envisioned as a
4149plugin for Ruby on Rails, but it can function as a stand-alone templating
4150engine.")
4151 (home-page "https://haml.info/")
4152 (license license:expat)))
4153
4154(define-public ruby-hashdiff
4155 (package
4156 (name "ruby-hashdiff")
4157 (version "1.0.1")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (rubygems-uri "hashdiff" version))
4162 (sha256
4163 (base32
4164 "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
4165 (build-system ruby-build-system)
4166 (arguments
4167 '(#:phases
4168 (modify-phases %standard-phases
4169 ;; Run tests directly via rspec to avoid depending on rubocop.
4170 (replace 'check
4171 (lambda* (#:key tests? #:allow-other-keys)
4172 (when tests?
4173 (invoke "rspec")))))))
4174 (native-inputs
4175 (list bundler ruby-rspec-2))
4176 (synopsis "HashDiff computes the smallest difference between two hashes")
4177 (description
4178 "HashDiff is a Ruby library to compute the smallest difference between
4179two hashes.")
4180 (home-page "https://github.com/liufengyun/hashdiff")
4181 (license license:expat)))
4182
4183(define-public ruby-hydra-minimal
4184 ;; No releases yet.
4185 (let ((commit "d985443af5ea81f4ca13559380d20e96140de56e")
4186 (revision "2"))
4187 (package
4188 (name "ruby-hydra-minimal")
4189 (version (git-version "0.0.0" revision commit))
4190 (home-page "https://github.com/hyphenation/hydra")
4191 (source (origin
4192 (method git-fetch)
4193 (uri (git-reference (url home-page) (commit commit)))
4194 (file-name (git-file-name name version))
4195 ;; byebug is a non-essential debugging utility that brings in
4196 ;; many dependencies.
4197 (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
4198 (sha256
4199 (base32
4200 "0mlc6zw9vwxx4zgxjdpk8qn6ibplm80k6w4axc6k7m1l5dg65jqd"))))
4201 (build-system ruby-build-system)
4202 (arguments
4203 (list
4204 #:tests? #f)) ;avoid rspec dependency.
4205 (synopsis "Ruby hyphenation patterns")
4206 (description
4207 "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
4208It is a low-dependency variant of ruby-hydra.")
4209 (license license:expat))))
4210
4211(define-public ruby-hydra
4212 (package
4213 (inherit ruby-hydra-minimal)
4214 (name "ruby-hydra")
4215 (arguments
4216 (substitute-keyword-arguments arguments
4217 ((#:tests? tests? #t)
4218 #t)
4219 ((#:phases phases #~%standard-phases)
4220 #~(modify-phases #$phases
4221 (add-after 'unpack 'make-files-writable
4222 (lambda _
4223 (for-each make-file-writable (find-files "."))))
4224 (replace 'check
4225 (lambda* (#:key tests? #:allow-other-keys)
4226 (when tests?
4227 (invoke "rspec"))))))))
4228 (native-inputs
4229 (list ruby-rspec))
4230 (description
4231 "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
4232
4233(define-public ruby-shindo
4234 (package
4235 (name "ruby-shindo")
4236 (version "0.3.11")
4237 (source (origin
4238 (method url-fetch)
4239 (uri (rubygems-uri "shindo" version))
4240 (sha256
4241 (base32
4242 "1wccg3a4g3agfyszipkdnbcgsazcfwdbz1gv51q8m17m9plvpzdp"))))
4243 (build-system ruby-build-system)
4244 (arguments
4245 (list
4246 #:test-target "tests"
4247 #:phases
4248 #~(modify-phases %standard-phases
4249 (add-after 'unpack 'fix-tests
4250 (lambda _
4251 (substitute* "tests/tests_helper.rb"
4252 (("-rrubygems") ""))))
4253 ;; Move the 'check phase to after 'install, to use installed shindo.
4254 (delete 'check)
4255 (add-after 'install 'configure-tests
4256 (lambda* (#:key tests? #:allow-other-keys)
4257 (when tests?
4258 (setenv "GEM_PATH"
4259 (string-append
4260 (getenv "GEM_PATH") ":"
4261 #$output "/lib/ruby/vendor_ruby"))
4262 (setenv "PATH"
4263 (string-append
4264 (getenv "PATH") ":" #$output "/bin")))))
4265 (add-after 'configure-tests 'check
4266 (assoc-ref %standard-phases 'check)))))
4267 (propagated-inputs
4268 (list ruby-formatador))
4269 (synopsis "Simple depth first Ruby testing")
4270 (description "Shindo is a simple depth first testing library for Ruby.")
4271 (home-page "https://github.com/geemus/shindo")
4272 (license license:expat)))
4273
4274(define-public ruby-rubygems-tasks
4275 (package
4276 (name "ruby-rubygems-tasks")
4277 (version "0.3.0")
4278 (source
4279 (origin
4280 (method url-fetch)
4281 (uri (rubygems-uri "rubygems-tasks" version))
4282 (sha256
4283 (base32 "06g10wg5nbca1lj9m9i5qyslp7cwdm00fhy3n1q0qxcbxpkwmpzx"))))
4284 (build-system ruby-build-system)
4285 ;; Tests need Internet access.
4286 (arguments
4287 `(#:tests? #f))
4288 (synopsis "Rake tasks for managing and releasing Ruby Gems")
4289 (description "Rubygems-task provides Rake tasks for managing and releasing
4290Ruby Gems.")
4291 (home-page "https://github.com/postmodern/rubygems-tasks")
4292 (license license:expat)))
4293
4294(define-public ruby-rubyzip
4295 (package
4296 (name "ruby-rubyzip")
4297 (version "2.3.2")
4298 (source (origin
4299 (method git-fetch)
4300 (uri (git-reference
4301 (url "https://github.com/rubyzip/rubyzip")
4302 (commit (string-append "v" version))))
4303 (file-name (git-file-name name version))
4304 (sha256
4305 (base32
4306 "03p8c990n6c1r4g64w0vv7z2iaswisl07l2f1lbh1s78cvmlmfxx"))))
4307 (build-system ruby-build-system)
4308 (arguments
4309 '(#:phases
4310 (modify-phases %standard-phases
4311 (add-after 'unpack 'disable-rubocop
4312 (lambda _
4313 (substitute* "Rakefile"
4314 (("require 'rubocop/rake_task'") "")
4315 (("RuboCop::RakeTask.new") ""))))
4316 (add-before 'check 'patch-tests
4317 (lambda* (#:key inputs #:allow-other-keys)
4318 (substitute* "test/gentestfiles.rb"
4319 (("/usr/bin/zip") (which "zip")))))
4320 (add-after 'patch-source-shebangs 'unpatch-some-source-shebangs
4321 (lambda _
4322 ;; The tests compare zipped files with data test files; since the
4323 ;; zip files do not have their shebangs patched, the data files
4324 ;; compared with their extracted version must also be left
4325 ;; un-patched.
4326 (substitute* (find-files "test/data" "\\.(txt|rb)$")
4327 (((which "ruby"))
4328 "/usr/bin/env ruby")))))))
4329 (native-inputs
4330 (list bundler ruby-simplecov zip unzip))
4331 (synopsis "Ruby module is for reading and writing zip files")
4332 (description
4333 "The rubyzip module provides ways to read from and create zip files.")
4334 (home-page "https://github.com/rubyzip/rubyzip")
4335 (license license:bsd-2)))
4336
4337(define-public ruby-silent-stream
4338 (package
4339 (name "ruby-silent-stream")
4340 (version "1.0.6")
4341 (source (origin
4342 (method url-fetch)
4343 (uri (rubygems-uri "silent_stream" version))
4344 (sha256
4345 (base32
4346 "10381fpvjzfjvhgfyv700607fpa29firgf52w5w5536m4fh6x63m"))))
4347 (build-system ruby-build-system)
4348 (synopsis "ActiveSupport stream silencing without ActiveSupport")
4349 (description "SilentStream is an extraction of some parts of
4350ActiveSupport's Kernel Reporting Core Extensions around silencing IO
4351streams.")
4352 (home-page "https://github.com/pboling/silent_stream")
4353 (license license:expat)))
4354
4355(define-public ruby-simplecov-lcov
4356 (package
4357 (name "ruby-simplecov-lcov")
4358 (version "0.8.0")
4359 (source (origin
4360 (method url-fetch)
4361 (uri (rubygems-uri "simplecov-lcov" version))
4362 (sha256
4363 (base32
4364 "1h8kswnshgb9zidvc88f4zjy4gflgz3854sx9wrw8ppgnwfg6581"))))
4365 (build-system ruby-build-system)
4366 ;; The test suite fails half of its tests; it seems to rely on older
4367 ;; versions of simplecov, rspec, possibly others (see:
4368 ;; https://github.com/fortissimo1997/simplecov-lcov/issues/29).
4369 (arguments (list #:tests? #f
4370 #:test-target "spec"))
4371 (native-inputs
4372 (list ruby-activesupport
4373 ruby-coveralls
4374 ruby-rspec
4375 ruby-simplecov))
4376 (synopsis "SimpleCov formatter to generate a lcov style coverage")
4377 (description "This package provides a SimpleCov formatter to generate a
4378lcov-style coverage report.")
4379 (home-page "https://github.com/fortissimo1997/simplecov-lcov")
4380 (license license:expat)))
4381
4382(define-public ruby-snaky-hash
4383 (package
4384 (name "ruby-snaky-hash")
4385 (version "2.0.3")
4386 (source
4387 (origin
4388 (method git-fetch)
4389 (uri (git-reference
4390 (url "https://gitlab.com/oauth-xx/snaky_hash")
4391 (commit (string-append "v" version))))
4392 (file-name (git-file-name name version))
4393 (sha256
4394 (base32 "0qmcm0765ny4qsvbm51fgg2bpk3gnxy9ycg0p572x0qmacy13yzf"))))
4395 (build-system ruby-build-system)
4396 (native-inputs
4397 (list ruby-backports
4398 ruby-rspec
4399 ruby-rspec-block-is-expected
4400 ruby-rspec-pending-for))
4401 (propagated-inputs (list ruby-hashie ruby-version-gem))
4402 (synopsis "Hash keys and look-ups normalization Ruby library")
4403 (description "The SnakyHash Ruby library provides classes for normalizing
4404hash keys and look-ups, and a pseudo-object interface.")
4405 (home-page "https://gitlab.com/oauth-xx/snaky_hash")
4406 (license license:expat)))
4407
4408(define-public ruby-useragent
4409 (package
4410 (name "ruby-useragent")
4411 (version "0.16.10")
4412 (source (origin
4413 (method url-fetch)
4414 (uri (rubygems-uri "useragent" version))
4415 (sha256
4416 (base32
4417 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
4418 (build-system ruby-build-system)
4419 (arguments
4420 '(#:tests? #f)) ; no test suite
4421 (synopsis "HTTP user agent parser for Ruby")
4422 (description "UserAgent is a Ruby library that parses and compares HTTP
4423User Agents.")
4424 (home-page "https://github.com/gshutler/useragent")
4425 (license license:expat)))
4426
4427(define-public ruby-backports
4428 (package
4429 (name "ruby-backports")
4430 (version "3.11.4")
4431 (source
4432 (origin
4433 (method url-fetch)
4434 (uri (rubygems-uri "backports" version))
4435 (sha256
4436 (base32
4437 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
4438 (build-system ruby-build-system)
4439 (arguments
4440 '(;; TODO: This should be default, but there is one test failure
4441 #:test-target "all_spec"))
4442 (native-inputs
4443 (list ruby-mspec ruby-activesupport))
4444 (synopsis "Backports of the features in newer Ruby versions")
4445 (description
4446 "Backports enables more compatibility across Ruby versions by providing
4447backports of some features.")
4448 (home-page "https://github.com/marcandre/backports")
4449 (license license:expat)))
4450
4451(define-public ruby-bacon
4452 (package
4453 (name "ruby-bacon")
4454 (version "1.2.0")
4455 (source (origin
4456 (method url-fetch)
4457 (uri (rubygems-uri "bacon" version))
4458 (sha256
4459 (base32
4460 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
4461 (build-system ruby-build-system)
4462 (synopsis "Small RSpec clone")
4463 (description "Bacon is a small RSpec clone providing all essential
4464features.")
4465 (home-page "https://github.com/chneukirchen/bacon")
4466 (license license:expat)))
4467
4468(define-public ruby-bacon-bits
4469 (package
4470 (name "ruby-bacon-bits")
4471 (version "0.1.0")
4472 (source
4473 (origin
4474 (method url-fetch)
4475 (uri (rubygems-uri "bacon-bits" version))
4476 (sha256
4477 (base32
4478 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
4479 (build-system ruby-build-system)
4480 (arguments
4481 ;; No tests
4482 '(#:tests? #f))
4483 (propagated-inputs (list ruby-bacon))
4484 (synopsis "Extensions to Bacon, for disabling tests, before and after
4485blocks and more")
4486 (description
4487 "This extends the bacon testing framework with useful extensions to
4488disable tests, have before and after blocks that run once and more.")
4489 (home-page "https://github.com/cldwalker/bacon-bits")
4490 (license license:expat)))
4491
4492(define-public ruby-bacon-colored-output
4493 (package
4494 (name "ruby-bacon-colored-output")
4495 (version "1.1.1")
4496 (source
4497 (origin
4498 (method url-fetch)
4499 (uri (rubygems-uri "bacon-colored_output" version))
4500 (sha256
4501 (base32
4502 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
4503 (build-system ruby-build-system)
4504 (arguments
4505 '(;; No included tests
4506 #:tests? #f))
4507 (propagated-inputs
4508 (list ruby-bacon))
4509 (synopsis "Colored output for Bacon test framework")
4510 (description
4511 "This package adds color through ANSI escape codes to Bacon test
4512output.")
4513 (home-page "https://github.com/whitequark/bacon-colored_output")
4514 (license license:expat)))
4515
4516(define-public ruby-bake
4517 (package
4518 (name "ruby-bake")
4519 (version "0.18.2")
4520 (source (origin
4521 (method git-fetch) ;for tests
4522 (uri (git-reference
4523 (url "https://github.com/ioquatix/bake")
4524 (commit (string-append "v" version))))
4525 (file-name (git-file-name name version))
4526 (sha256
4527 (base32
4528 "19yi1fxzz9n580gig3p3j6nxbgcfcassa6b0q07jkqrzxdqn7xhn"))))
4529 (build-system ruby-build-system)
4530 (arguments
4531 (list #:phases
4532 #~(modify-phases %standard-phases
4533 (add-after 'unpack 'sanitize-dependencies
4534 (lambda _
4535 ;; These dependencies are not needed to build and run tests
4536 ;; and contain circular dependencies.
4537 (substitute* "gems.rb"
4538 ((".*'bake-modernize'.*") "")
4539 ((".*'bake-gem'.*") "")
4540 ((".*'bake-github-pages'.*") "")
4541 ((".*'utopia-project'.*") ""))))
4542 (add-before 'build 'drop-signing-key-requirement
4543 (lambda _
4544 (substitute* "bake.gemspec"
4545 (("spec.signing_key =.*")
4546 "spec.signing_key = nil"))))
4547 (replace 'check
4548 (lambda* (#:key tests? #:allow-other-keys)
4549 (when tests?
4550 (substitute* "spec/spec_helper.rb"
4551 (("require 'bundler'") "")
4552 (("Bundler\\.setup") ""))
4553 (substitute* "spec/bake/command/call_spec.rb"
4554 (("context 'with value generating task'" ctx)
4555 (string-append ctx ", skip: 'always fails'")))
4556 (invoke "rspec")))))))
4557 (native-inputs (list ruby-covered ruby-rspec))
4558 (propagated-inputs (list ruby-bigdecimal ruby-samovar))
4559 (synopsis "Replacement for rake with a simpler syntax")
4560 (description "Bake is a task execution tool, inspired by Rake, but
4561codifying many of the use cases which are typically implemented in an ad-hoc
4562manner.")
4563 (home-page "https://github.com/ioquatix/bake")
4564 (license license:expat)))
4565
4566(define-public ruby-bake-test
4567 (package
4568 (name "ruby-bake-test")
4569 (version "0.2.0")
4570 (source (origin
4571 (method url-fetch)
4572 (uri (rubygems-uri "bake-test" version))
4573 (sha256
4574 (base32
4575 "1p6kfpncj0s4zyynrrq6c735jvh0dnwyv7kfqym4rpyka4f85qdp"))))
4576 (build-system ruby-build-system)
4577 ;; XXX: Disable the test suite to avoid a circular dependency with
4578 ;; ruby-sus.
4579 (arguments (list #:tests? #f))
4580 (propagated-inputs (list ruby-bake))
4581 (synopsis "Test suite automatic runner for Ruby")
4582 (description "@command{bake-test} automatically discovers how to run local
4583test suites for Ruby projects. It supports @command{rspec}, @command{sus}, as
4584well as @samp{rake}.")
4585 (home-page "https://github.com/ioquatix/bake-test")
4586 (license license:expat)))
4587
4588(define-public ruby-bake-test-external
4589 (package
4590 (name "ruby-bake-test-external")
4591 (version "0.3.2")
4592 (source (origin
4593 (method url-fetch)
4594 (uri (rubygems-uri "bake-test-external" version))
4595 (sha256
4596 (base32
4597 "0749xc7jkz1c5gsq1giwhrqy6s6xqm48bdvs414372881wki2jmh"))))
4598 (build-system ruby-build-system)
4599 ;; The test suite relies on git and network access to clone external
4600 ;; repositories.
4601 (arguments (list #:tests? #f))
4602 (propagated-inputs (list ruby-bake))
4603 (synopsis "Continuous integration extension for Bake")
4604 (description "Bake Test External adds a @samp{test:external} action to the
4605@command{bake} command to run the test suites of dependent projects to check
4606for breakage.")
4607 (home-page "https://github.com/ioquatix/bake-test-external")
4608 (license license:expat)))
4609
4610(define-public ruby-connection-pool
4611 (package
4612 (name "ruby-connection-pool")
4613 (version "2.4.1")
4614 (source (origin
4615 (method git-fetch)
4616 (uri (git-reference
4617 (url "https://github.com/mperham/connection_pool")
4618 (commit (string-append "v" version))))
4619 (file-name (git-file-name name version))
4620 (sha256
4621 (base32
4622 "1iijshb1n9xl5knvpzzx0vqlw7v7mskiw1cpfj1cmdmssavyhsx5"))))
4623 (build-system ruby-build-system)
4624 (arguments
4625 (list
4626 #:phases
4627 #~(modify-phases %standard-phases
4628 (add-after 'unpack 'patch
4629 (lambda _
4630 (substitute* "Rakefile"
4631 (("require \"standard/rake\"") "")
4632 ((":\"standard:fix\",") "")))))))
4633 (native-inputs
4634 (list bundler))
4635 (synopsis "Generic connection pool for Ruby")
4636 (description "Connection_pool provides a generic connection pooling
4637interface for Ruby programs.")
4638 (home-page "https://github.com/mperham/connection_pool")
4639 (license license:expat)))
4640
4641(define-public ruby-fast-gettext
4642 (package
4643 (name "ruby-fast-gettext")
4644 (version "4.1.0")
4645 (home-page "https://github.com/grosser/fast_gettext")
4646 (source (origin
4647 (method git-fetch)
4648 (uri (git-reference (url home-page)
4649 (commit (string-append "v" version))))
4650 (file-name (git-file-name name version))
4651 (sha256
4652 (base32
4653 "04p9s0r67xgvckab9ydb3fbnrc7g20p5c05z2zsacynlkp9x5jp9"))))
4654 (build-system ruby-build-system)
4655 (arguments
4656 (list
4657 #:test-target "spec"
4658 #:phases
4659 #~(modify-phases %standard-phases
4660 (add-before 'check 'remove-version-constraints
4661 (lambda _
4662 (delete-file "Gemfile.lock"))))))
4663 (native-inputs
4664 (list ;; For tests.
4665 ruby-activerecord
4666 ruby-activesupport
4667 ruby-bump
4668 ruby-forking-test-runner
4669 ruby-i18n
4670 ruby-rubocop
4671 ruby-rubocop-packaging
4672 ruby-rspec
4673 ruby-single-cov
4674 ruby-sqlite3
4675 ruby-wwtd))
4676 (synopsis "Fast implementation of @code{GetText}")
4677 (description
4678 "This package provides an alternative implementation of the Ruby
4679@code{GetText} library that is approximately 12x faster yet thread safe.")
4680 ;; Some parts are covered by the Ruby license, see file headers.
4681 (license (list license:expat license:ruby))))
4682
4683(define-public ruby-fiber-local
4684 (package
4685 (name "ruby-fiber-local")
4686 (version "1.0.0")
4687 (source (origin
4688 (method git-fetch)
4689 (uri (git-reference
4690 (url "https://github.com/socketry/fiber-local")
4691 (commit (string-append "v" version))))
4692 (file-name (git-file-name name version))
4693 (sha256
4694 (base32
4695 "0pp5b81h0lysdnphgprkixh1az0fkrgir5sbcp0mm8arxf3f8m90"))))
4696 (build-system ruby-build-system)
4697 (arguments
4698 (list #:phases
4699 #~(modify-phases %standard-phases
4700 (add-after 'extract-gemspec 'sanitize-dependencies
4701 (lambda _
4702 ;; This pulls in extraneous maintenance dependencies.
4703 (delete-file "gems.rb")
4704 ;; Depending on ruby-covered would introduce a dependency
4705 ;; cycle with it.
4706 (substitute* '("fiber-local.gemspec" "spec/spec_helper.rb")
4707 ((".*covered.*") ""))))
4708 (replace 'check
4709 (lambda* (#:key tests? #:allow-other-keys)
4710 (when tests?
4711 (invoke "rspec")))))))
4712 (native-inputs (list ruby-rspec))
4713 (synopsis "Ruby module to simplify fiber-local state management")
4714 (description "This package provides a class-level mixin to make managing
4715fiber-local state easy. It provides easy access to a fiber-local state from a
4716fiber, and defaults to a shared thread-local state.")
4717 (home-page "https://github.com/socketry/fiber-local")
4718 (license license:expat)))
4719
4720(define-public ruby-flores
4721 (let ((commit "92fded00b04b1e3d308edb7440d7b7ab2c89ab5e")
4722 (revision "0"))
4723 (package
4724 (name "ruby-flores")
4725 (version (git-version "0.0.8" revision commit))
4726 (source
4727 (origin
4728 (method git-fetch)
4729 (uri (git-reference
4730 (url "https://github.com/jordansissel/ruby-flores")
4731 (commit commit)))
4732 (sha256
4733 (base32 "0jvnw0jli2zzxklfk751vfbi4acf9lijppk67346j3b2qxqi8xms"))
4734 (patches
4735 (search-patches "ruby-flores-fix-deprecations.patch"))))
4736 (build-system ruby-build-system)
4737 (arguments
4738 (list #:phases
4739 #~(modify-phases %standard-phases
4740 (add-after 'unpack 'fix-gemspec
4741 (lambda _
4742 (substitute* "flores.gemspec"
4743 ;; Since this is not a git repository, do not call 'git'.
4744 (("git ls-files") "find . -type f |sort"))))
4745 (replace 'check
4746 (lambda* (#:key tests? #:allow-other-keys)
4747 (when tests?
4748 (invoke "ruby" (which "rspec"))))))))
4749 (native-inputs (list ruby-rspec ruby-simplecov))
4750 (synopsis "Fuzzing, randomization, and stress testing library")
4751 (description "Flores is a fuzzing, randomization, and stress library to
4752help tests uncover more bugs.")
4753 (home-page "https://github.com/jordansissel/ruby-flores")
4754 (license license:asl2.0))))
4755
4756(define-public ruby-ipaddr
4757 (package
4758 (name "ruby-ipaddr")
4759 (version "1.2.6")
4760 (source (origin
4761 (method git-fetch) ;for tests
4762 (uri (git-reference
4763 (url "https://github.com/ruby/ipaddr")
4764 (commit (string-append "v" version))))
4765 (file-name (git-file-name name version))
4766 (sha256
4767 (base32
4768 "0h3z8i1fa8s4gx48322fflhpkzghd4bmd9109hglsgdkic7b0dyp"))))
4769 (build-system ruby-build-system)
4770 (native-inputs (list ruby-test-unit-ruby-core))
4771 (synopsis "Manipulate IP addresses")
4772 (description "This package provides a set of methods to manipulate an IP
4773address. Both IPv4 and IPv6 are supported.")
4774 (home-page "https://github.com/ruby/ipaddr")
4775 (license license:bsd-2)))
4776
4777(define-public ruby-fake-ftp
4778 (package
4779 (name "ruby-fake-ftp")
4780 (version "0.3.0")
4781 (source (origin
4782 (method url-fetch)
4783 (uri (rubygems-uri "fake_ftp" version))
4784 (sha256
4785 (base32
4786 "1zl9q9m4x7lz9890g0h1qqj7hcxnwzpjfnfbxadjblps7b5054q4"))))
4787 (build-system ruby-build-system)
4788 (native-inputs (list ruby-rspec ruby-rubocop ruby-simplecov))
4789 (arguments
4790 '(#:test-target "spec"))
4791 (synopsis "Fake FTP server for use with ruby tests")
4792 (description "This package allows you to test FTP implementations in ruby.
4793It is a minimal single-client FTP server that can be bound to any arbitrary
4794port on localhost.")
4795 (home-page "https://rubygems.org/gems/fake_ftp")
4796 (license license:expat)))
4797
4798(define-public ruby-net-telnet
4799 (package
4800 (name "ruby-net-telnet")
4801 (version "0.2.0")
4802 (source (origin
4803 (method url-fetch)
4804 (uri (rubygems-uri "net-telnet" version))
4805 (sha256
4806 (base32
4807 "16nkxc79nqm7fd6w1fba4kb98vpgwnyfnlwxarpdcgywz300fc15"))))
4808 (build-system ruby-build-system)
4809 (synopsis "Telnet client functionality")
4810 (description "This package provides telnet client functionality.")
4811 (home-page "https://github.com/ruby/net-telnet")
4812 (license license:bsd-2)))
4813
4814(define-public ruby-net-ftp
4815 (package
4816 (name "ruby-net-ftp")
4817 (version "0.3.4")
4818 (source (origin
4819 (method git-fetch) ;for tests
4820 (uri (git-reference
4821 (url "https://github.com/ruby/net-ftp")
4822 (commit (string-append "v" version))))
4823 (file-name (git-file-name name version))
4824 (sha256
4825 (base32
4826 "11b1sw7c4c7xrhn5li5m0wylw42hp52jp6pqacyb43hkw1m5zr36"))))
4827 (build-system ruby-build-system)
4828 (propagated-inputs (list ruby-net-protocol ruby-time))
4829 (synopsis "File Transfer Protocol client library")
4830 (description "This class implements the File Transfer Protocol. If you
4831have used a command-line FTP program, and are familiar with the commands, you
4832will be able to use this class easily. Some extra features are included to
4833take advantage of Ruby's style and strengths.")
4834 (home-page "https://github.com/ruby/net-ftp")
4835 (license license:bsd-2)))
4836
4837(define-public ruby-net-http-persistent
4838 (package
4839 (name "ruby-net-http-persistent")
4840 (version "4.0.2")
4841 (source (origin
4842 (method url-fetch)
4843 (uri (rubygems-uri "net-http-persistent" version))
4844 (sha256
4845 (base32
4846 "0i1as2lgnw7b4jid0gw5glv5hnxz36nmfsbr9rmxbcap72ijgy03"))))
4847 (build-system ruby-build-system)
4848 (native-inputs
4849 (list ruby-connection-pool
4850 ruby-hoe
4851 ruby-rake-manifest))
4852 (synopsis "Persistent HTTP connection manager")
4853 (description "Net::HTTP::Persistent manages persistent HTTP connections
4854using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
4855 (home-page "https://github.com/drbrain/net-http-persistent")
4856 (license license:expat)))
4857
4858(define-public ruby-net-imap
4859 (package
4860 (name "ruby-net-imap")
4861 (version "0.6.6")
4862 (source (origin
4863 (method git-fetch) ;for tests
4864 (uri (git-reference
4865 (url "https://github.com/ruby/net-imap")
4866 (commit (string-append "v" version))))
4867 (file-name (git-file-name name version))
4868 (sha256
4869 (base32
4870 "052myg3kgr1fjb3zaki8cfn3s55pd5nn5v4jhbvak8kkpc4hf5gy"))))
4871 (build-system ruby-build-system)
4872 (arguments
4873 (list #:phases
4874 #~(modify-phases %standard-phases
4875 (add-before 'replace-git-ls-files 'adjust-for-git-ls-files
4876 (lambda _
4877 ;; Adjust the git ls-files invocation so that it matches
4878 ;; the expected pattern.
4879 (substitute* "net-imap.gemspec"
4880 (("`git ls-files -z 2>/dev/null`")
4881 "`git ls-files -z`"))))
4882 (add-before 'check 'disable-simplecov
4883 (lambda _
4884 (setenv "SIMPLECOV_DISABLE" "yes"))))))
4885 (native-inputs (list ruby-psych ruby-test-unit-ruby-core))
4886 (propagated-inputs (list ruby-date ruby-net-protocol))
4887 (synopsis "Ruby client api for Internet Message Access Protocol")
4888 (description "@code{Net::IMAP} implements Internet Message Access
4889Protocol (IMAP) client functionality. The protocol is described in
4890@url{https://tools.ietf.org/html/rfc3501, IMAP}.")
4891 (home-page "https://github.com/ruby/net-imap")
4892 (license license:bsd-2)))
4893
4894(define-public ruby-net-pop
4895 (package
4896 (name "ruby-net-pop")
4897 (version "0.1.2")
4898 (source (origin
4899 (method git-fetch)
4900 (uri (git-reference
4901 (url "https://github.com/ruby/net-pop")
4902 (commit (string-append "v" version))))
4903 (file-name (git-file-name name version))
4904 (sha256
4905 (base32
4906 "05vz6a56va2rbr7ld78gdzwy1j5mzs98cz82ax5aqa83pzzk6jld"))))
4907 (build-system ruby-build-system)
4908 (propagated-inputs (list ruby-net-protocol))
4909 (synopsis "Ruby client library for POP3")
4910 (description "This library provides functionality for retrieving email via
4911POP3, the Post Office Protocol version 3, as specified by
4912@url{http://www.ietf.org/rfc/rfc1939.txt, RFC1939}.")
4913 (home-page "https://github.com/ruby/net-pop")
4914 (license license:bsd-2)))
4915
4916(define-public ruby-net-smtp
4917 (package
4918 (name "ruby-net-smtp")
4919 (version "0.3.3")
4920 (source (origin
4921 (method git-fetch) ;for tests
4922 (uri (git-reference
4923 (url "https://github.com/ruby/net-smtp")
4924 (commit (string-append "v" version))))
4925 (file-name (git-file-name name version))
4926 (sha256
4927 (base32
4928 "0ca2wh45xvc09rv6v6sz3vbnkzrjzk5c4l6dk50zk4dwxvghma8r"))))
4929 (build-system ruby-build-system)
4930 (arguments
4931 (list
4932 #:phases
4933 #~(modify-phases %standard-phases
4934 (add-before 'check 'regenerate-certificate
4935 ;; On version 0.5.0 a Makefile was introduced to regenerated
4936 ;; the certificates, and instead of calling openssl directory
4937 ;; we could do (with-directory-excursion "test/net/fixtures"
4938 ;; (invoke "make" "regen_certs"). However the certificate is
4939 ;; expired versions before 0.5.0 as well.
4940 (lambda _
4941 (with-directory-excursion "test/net/fixtures"
4942 (invoke
4943 "openssl" "req" "-new" "-key" "server.key" "-out"
4944 "server.csr" "-subj"
4945 "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost")
4946 (invoke "openssl" "req" "-new" "-x509" "-days" "3650"
4947 "-key" "server.key" "-out" "cacert.pem" "-subj"
4948 (string-append
4949 "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby "
4950 "Core Team/CN=Ruby Test "
4951 "CA/[email protected]"))
4952 (invoke "openssl" "x509" "-days" "3650" "-CA" "cacert.pem"
4953 "-CAkey" "server.key" "-set_serial" "00" "-in"
4954 "server.csr" "-req" "-out" "server.crt")))))))
4955 (native-inputs (list openssl))
4956 (propagated-inputs (list ruby-net-protocol))
4957 (synopsis "Simple Mail Transfer Protocol client library for Ruby")
4958 (description "This library provides functionality to send Internet mail
4959via SMTP, the Simple Mail Transfer Protocol. The SMTP protocol specification
4960is known as @url{http://www.ietf.org/rfc/rfc2821.txt, RFC2821}.")
4961 (home-page "https://github.com/ruby/net-smtp")
4962 (license license:bsd-2)))
4963
4964(define-public ruby-pleaserun
4965 (package
4966 (name "ruby-pleaserun")
4967 (version "0.0.32")
4968 (source (origin
4969 (method url-fetch)
4970 (uri (rubygems-uri "pleaserun" version))
4971 (sha256
4972 (base32
4973 "1aykf0l8327bqkkf5xd9jcglsib973zpy37cfnlf4j0vp0cdpn2d"))))
4974 (build-system ruby-build-system)
4975 (arguments
4976 (list #:phases
4977 #~(modify-phases %standard-phases
4978 (add-after 'extract-gemspec 'relax-requirements
4979 (lambda _
4980 (substitute* "pleaserun.gemspec"
4981 ;; Mustache is pinned at 0.99.8, for portability with
4982 ;; older Rubies.
4983 (("dependency\\(%q<mustache>.freeze.*")
4984 "dependency(%q<mustache>.freeze)\n"))))
4985 (replace 'check
4986 (lambda* (#:key tests? #:allow-other-keys)
4987 (when tests?
4988 ;; The cli_spec.rb test fails non-deterministically with
4989 ;; a Errno::EISDIR error (see:
4990 ;; https://github.com/jordansissel/pleaserun/issues/155)
4991 (invoke "rspec" "--exclude-pattern"
4992 "spec/pleaserun/cli_spec.rb")))))))
4993 (native-inputs (list ruby-flores ruby-rspec))
4994 (propagated-inputs (list ruby-cabin
4995 ruby-clamp
4996 ruby-dotenv
4997 ruby-insist
4998 ruby-mustache
4999 ruby-stud))
5000 (synopsis "Init scripts and service definitions generation tool")
5001 (description "Pleaserun is a tool to generate startup scripts and service
5002definitions. It targets service managers such as systemd, Upstart, launchd,
5003sysv init, and runit.")
5004 (home-page "https://github.com/jordansissel/pleaserun")
5005 (license license:asl2.0)))
5006
5007(define-public ruby-power-assert
5008 (package
5009 (name "ruby-power-assert")
5010 (version "1.1.5")
5011 (source (origin
5012 (method url-fetch)
5013 (uri (rubygems-uri "power_assert" version))
5014 (sha256
5015 (base32
5016 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
5017 (build-system ruby-build-system)
5018 (arguments
5019 '(#:tests? #f)) ; No included tests
5020 (native-inputs
5021 (list bundler))
5022 (synopsis "Assert library with descriptive assertion messages")
5023 (description "Power-assert is an assertion library providing descriptive
5024assertion messages for tests.")
5025 (home-page "https://github.com/k-tsj/power_assert")
5026 (license (list license:bsd-2 license:ruby))))
5027
5028(define-public ruby-powerpack
5029 (package
5030 (name "ruby-powerpack")
5031 (version "0.1.3")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (rubygems-uri "powerpack" version))
5036 (sha256
5037 (base32
5038 "1f71axvlhnxja0k17qqxdi4qh5ck807hqg4i3j6cgy8fgzmyg7rg"))))
5039 (build-system ruby-build-system)
5040 (arguments
5041 (list #:test-target "spec"))
5042 (native-inputs
5043 (list bundler ruby-rspec ruby-yard))
5044 (synopsis "Useful extensions to core Ruby classes")
5045 (description
5046 "This package provides a few useful extensions to core Ruby classes,
5047including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
5048@code{String}.")
5049 (home-page "https://github.com/bbatsov/powerpack")
5050 (license license:expat)))
5051
5052(define-public ruby-locale
5053 (package
5054 (name "ruby-locale")
5055 (version "2.1.2")
5056 (source (origin
5057 (method url-fetch)
5058 (uri (rubygems-uri "locale" version))
5059 (sha256
5060 (base32
5061 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
5062 (build-system ruby-build-system)
5063 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5064 ;; which needs ruby-gettext, which needs ruby-locale. To break the
5065 ;; dependency cycle we disable tests.
5066 (arguments `(#:tests? #f))
5067 (native-inputs
5068 (list bundler ruby-yard/minimal))
5069 (synopsis "Ruby library providing basic localization APIs")
5070 (description
5071 "Ruby-Locale is the pure ruby library which provides basic APIs for
5072localization.")
5073 (home-page "https://github.com/ruby-gettext/locale")
5074 (license (list license:lgpl3+ license:ruby))))
5075
5076(define-public ruby-temple
5077 (package
5078 (name "ruby-temple")
5079 (version "0.10.0")
5080 (source (origin
5081 (method git-fetch) ;for tests
5082 (uri (git-reference
5083 (url "https://github.com/judofyr/temple")
5084 (commit (string-append "v" version))))
5085 (file-name (git-file-name name version))
5086 (sha256
5087 (base32
5088 "0rr9fnlcgj9nm3b6hzzjsvcw8x3y7z48j7slk7xxff2mh8s7y3y0"))))
5089 (build-system ruby-build-system)
5090 (arguments
5091 (list #:phases
5092 #~(modify-phases %standard-phases
5093 (add-after 'replace-git-ls-files 'replace-more-git-ls-files
5094 (lambda _
5095 (substitute* "temple.gemspec"
5096 ;; There no longer are test, spec or features
5097 ;; directories.
5098 ((".*`git ls-files -- \\{test,spec,features}/\\*`.*")
5099 "")
5100 ;; There isn't any bin directory either.
5101 ((".*`git ls-files -- bin/\\*`.*")
5102 ""))))
5103 (replace 'check
5104 (lambda* (#:key tests? #:allow-other-keys)
5105 (when tests?
5106 (invoke "rspec")))))))
5107 (native-inputs (list ruby-bacon ruby-erubi ruby-rspec ruby-tilt/minimal))
5108 (synopsis "Template compilation framework in Ruby")
5109 (description "Temple is an abstraction and framework for compiling
5110templates to pure Ruby.")
5111 (home-page "https://github.com/judofyr/temple")
5112 (license license:expat)))
5113
5114(define-public ruby-text
5115 (package
5116 (name "ruby-text")
5117 (version "1.3.1")
5118 (source (origin
5119 (method url-fetch)
5120 (uri (rubygems-uri "text" version))
5121 (sha256
5122 (base32
5123 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
5124 (build-system ruby-build-system)
5125 (synopsis "Collection of text algorithms for Ruby")
5126 (description
5127 "This package provides a collection of text algorithms: Levenshtein,
5128Soundex, Metaphone, Double Metaphone, Porter Stemming.")
5129 (home-page "https://github.com/threedaymonk/text")
5130 (license license:expat)))
5131
5132(define-public ruby-gdbm
5133 (package
5134 (name "ruby-gdbm")
5135 (version "2.1.0")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (rubygems-uri "gdbm" version))
5140 (sha256
5141 (base32 "0xxygf50b2fvy8lcn2vip27vq32p607d3lwd1diplvkajijq8q8b"))))
5142 (build-system ruby-build-system)
5143 (arguments '(#:tests? #f)) ; No bundled tests.
5144 (inputs (list gdbm))
5145 (synopsis "Ruby extension for GNU dbm")
5146 (description "This package provides a Ruby extension for GNU dbm.")
5147 (home-page "https://github.com/ruby/gdbm")
5148 (license license:bsd-2)))
5149
5150(define-public ruby-gettext
5151 (package
5152 (name "ruby-gettext")
5153 (version "3.4.4")
5154 (source (origin
5155 (method url-fetch)
5156 (uri (rubygems-uri "gettext" version))
5157 (sha256
5158 (base32
5159 "11hlxkk2yr9wjwd3nf8kgmsjcd8wf35yqlxi9wpvrgmvrk9n9a2k"))))
5160 (build-system ruby-build-system)
5161 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5162 ;; which needs ruby-gettext. To break the dependency cycle we disable
5163 ;; tests.
5164 (arguments `(#:tests? #f))
5165 (propagated-inputs
5166 (list ruby-locale ruby-text ruby-erubi))
5167 (native-inputs
5168 (list bundler ruby-yard/minimal))
5169 (synopsis "GNU gettext-like program for Ruby")
5170 (description
5171 "Gettext is a GNU gettext-like program for Ruby. The catalog
5172file (po-file) used is the same as that used by GNU gettext, allowing you to
5173use GNU gettext tools for maintenance.")
5174 (home-page "https://ruby-gettext.github.com/")
5175 (license (list license:lgpl3+ license:ruby))))
5176
5177(define-public ruby-packnga
5178 (package
5179 (name "ruby-packnga")
5180 (version "1.0.4")
5181 (source (origin
5182 (method url-fetch)
5183 (uri (rubygems-uri "packnga" version))
5184 (sha256
5185 (base32
5186 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
5187 (build-system ruby-build-system)
5188 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
5189 ;; To break the dependency cycle we disable tests.
5190 (arguments `(#:tests? #f))
5191 (propagated-inputs
5192 (list ruby-gettext ruby-yard))
5193 (native-inputs
5194 (list bundler))
5195 (synopsis "Utility library to package internationalized libraries")
5196 (description
5197 "Packnga is a library to translate to many languages using YARD.")
5198 (home-page "https://ranguba.org/packnga/")
5199 (license license:lgpl2.0+)))
5200
5201(define-public ruby-test-construct
5202 (let ((commit "43933e84e63bba2b44bc020d8c8fb78ce8597ac3")
5203 (revision "0"))
5204 (package
5205 (name "ruby-test-construct")
5206 (version (git-version "2.0.2" revision commit))
5207 (source
5208 (origin
5209 (method git-fetch)
5210 (uri (git-reference
5211 (url "https://github.com/bhb/test_construct")
5212 (commit commit)))
5213 (file-name (git-file-name name version))
5214 (sha256
5215 (base32 "0gif8sap3npvsn4jrppr16jqig8icafk60p74ankhjwrjycccfza"))))
5216 (build-system ruby-build-system)
5217 (native-inputs
5218 (list bundler ruby-mocha ruby-rspec))
5219 (synopsis "Creates temporary files and directories for testing")
5220 (description
5221 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
5222temporary files and directories during tests.")
5223 (home-page "https://github.com/bhb/test_construct")
5224 (license license:expat))))
5225
5226(define-public ruby-test-unit
5227 (package
5228 (name "ruby-test-unit")
5229 (version "3.7.8")
5230 (source (origin
5231 (method git-fetch) ;for tests
5232 (uri (git-reference
5233 (url "https://github.com/test-unit/test-unit")
5234 (commit version)))
5235 (file-name (git-file-name name version))
5236 (sha256
5237 (base32
5238 "0a5p6l8y6gbrsm4wfjnl6h3a944n8w875znf6n3k37d997fllxia"))))
5239 (build-system ruby-build-system)
5240 (arguments
5241 (list
5242 #:phases
5243 #~(modify-phases %standard-phases
5244 ;; This avoids requiring extra dependencies in Rakefile.
5245 (replace 'check
5246 (lambda* (#:key tests? #:allow-other-keys)
5247 (when tests?
5248 (invoke "ruby" "test/run.rb")))))))
5249 (propagated-inputs
5250 (list ruby-power-assert))
5251 (synopsis "Unit testing framework for Ruby")
5252 (description "@code{Test::Unit} is unit testing framework for Ruby, based
5253on xUnit principles. These were originally designed by Kent Beck, creator of
5254extreme programming software development methodology, for Smalltalk's SUnit.
5255It allows writing tests, checking results and automated testing in Ruby.")
5256 (home-page "https://test-unit.github.io/")
5257 (license (list license:psfl license:ruby))))
5258
5259(define-public ruby-test-unit-ruby-core
5260 (package
5261 (name "ruby-test-unit-ruby-core")
5262 (version "1.0.5")
5263 (source
5264 (origin
5265 (method url-fetch)
5266 (uri (rubygems-uri "test-unit-ruby-core" version))
5267 (sha256
5268 (base32 "1i7fa4hlj6xiqvjaikagwrmiyc21jzyswvd4grjbfqysziwsxygc"))))
5269 (build-system ruby-build-system)
5270 (arguments
5271 (list #:tests? #f)) ; contains no tests
5272 (synopsis "Additional test assertions for Ruby standard libraries")
5273 (description "This package provides additional test assertions for Ruby
5274standard libraries.")
5275 (home-page "https://github.com/ruby/test-unit-ruby-core")
5276 (license license:ruby)))
5277
5278(define-public ruby-mapping
5279 (package
5280 (name "ruby-mapping")
5281 (version "1.1.3")
5282 (source (origin
5283 (method git-fetch) ;for tests
5284 (uri (git-reference
5285 (url "https://github.com/ioquatix/mapping")
5286 (commit (string-append "v" version))))
5287 (file-name (git-file-name name version))
5288 (sha256
5289 (base32
5290 "0ydvn5lfyhzc4qbcyag0vx6ah8zl99h2ailj3025wgj5pz4cfmnb"))))
5291 (build-system ruby-build-system)
5292 (arguments
5293 (list
5294 #:phases
5295 #~(modify-phases %standard-phases
5296 (add-before 'extract-gemspec 'remove-certs
5297 (lambda _
5298 (substitute* "mapping.gemspec"
5299 (("spec\\.signing_key .*")
5300 ""))))
5301 (replace 'check
5302 (lambda* (#:key tests? #:allow-other-keys)
5303 (delete-file "config/sus.rb") ;remove covored gem
5304 (invoke "sus"))))))
5305 (native-inputs (list ruby-sus))
5306 (synopsis "Map model objects based on their class to a given output model")
5307 (description "The @code{mapping} gem maps model objects based on their
5308class to a given output model. It is useful for versioning external
5309interfaces (e.g. JSON APIs) or processing structured data from one format to
5310another.")
5311 (home-page "https://github.com/ioquatix/mapping")
5312 (license license:expat)))
5313
5314(define-public ruby-markaby
5315 (package
5316 (name "ruby-markaby")
5317 (version "0.9.4")
5318 (source
5319 (origin
5320 (method url-fetch)
5321 (uri (rubygems-uri "markaby" version))
5322 (sha256
5323 (base32
5324 "1vizqpa9pks5nlqj0jjx2d1q6f9vfmjjbb774v1kp591pq5nhmcm"))))
5325 (build-system ruby-build-system)
5326 (arguments
5327 (list
5328 #:phases
5329 #~(modify-phases %standard-phases
5330 ;; Run rspec manually without using the Rakefile, as the versions of
5331 ;; Rake and RSpec 2 are incompatible:
5332 ;;
5333 ;; NoMethodError: undefined method `last_comment'
5334 (replace 'check
5335 (lambda* (#:key tests? #:allow-other-keys)
5336 ;; Skip some broken tests, this should be redundant with the
5337 ;; next release
5338 (delete-file "spec/markaby/markaby_test_unit_spec.rb")
5339 (substitute* "spec/markaby/markaby_spec.rb"
5340 (("generated.should == str")
5341 "# Test broken: generated.should == str"))
5342
5343 (when tests?
5344 (invoke "rspec")))))))
5345 (propagated-inputs
5346 (list ruby-builder))
5347 (native-inputs
5348 (list bundler ruby-rspec-2))
5349 (synopsis "Write HTML pages in pure Ruby")
5350 (description
5351 "Markaby allows writing HTML packages in pure Ruby. This is similar to
5352the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
5353mixture of HTML and additional ERB syntax.")
5354 (home-page "https://markaby.github.io/")
5355 (license license:expat)))
5356
5357(define-public ruby-maruku
5358 (package
5359 (name "ruby-maruku")
5360 (version "0.7.3")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri (rubygems-uri "maruku" version))
5365 (sha256
5366 (base32
5367 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
5368 (build-system ruby-build-system)
5369 (arguments
5370 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
5371 #:tests? #f
5372 #:phases
5373 (modify-phases %standard-phases
5374 (replace 'check
5375 (lambda* (#:key tests? #:allow-other-keys)
5376 (when tests?
5377 (invoke "rspec")))))))
5378 (native-inputs
5379 (list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
5380 (synopsis "Markdown interpreter in Ruby")
5381 (description
5382 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
5383HTML, and PDF through LaTeX.")
5384 (home-page "https://github.com/bhollis/maruku")
5385 (license license:expat)))
5386
5387(define-public ruby-metaclass
5388 (package
5389 (name "ruby-metaclass")
5390 (version "0.0.4")
5391 (source (origin
5392 (method url-fetch)
5393 (uri (rubygems-uri "metaclass" version))
5394 (sha256
5395 (base32
5396 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
5397 (build-system ruby-build-system)
5398 (arguments
5399 `(#:phases
5400 (modify-phases %standard-phases
5401 (add-after 'unpack 'add-test-unit-to-search-path
5402 (lambda* (#:key inputs #:allow-other-keys)
5403 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
5404 (substitute* "Rakefile"
5405 (("t\\.libs << \"test\"" line)
5406 (string-append line "; t.libs << \""
5407 test-unit "/lib/ruby/vendor_ruby"
5408 "/gems/test-unit-"
5409 ,(package-version ruby-test-unit)
5410 "/lib\"")))))))))
5411 (native-inputs
5412 (list bundler ruby-test-unit))
5413 (synopsis "Ruby library adding metaclass method to all objects")
5414 (description
5415 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
5416objects.")
5417 (home-page "https://github.com/floehopper/metaclass")
5418 (license license:expat)))
5419
5420(define-public ruby-mkmf-lite
5421 (package
5422 (name "ruby-mkmf-lite")
5423 (version "0.5.2")
5424 (source (origin
5425 (method url-fetch)
5426 (uri (rubygems-uri "mkmf-lite" version))
5427 (sha256
5428 (base32
5429 "0rqa5kzswhqkj7r9mqrqz4mjd2vdxsblgybb52gj3mwr1gwvl4c5"))))
5430 (build-system ruby-build-system)
5431 (arguments
5432 (list
5433 #:phases
5434 #~(modify-phases %standard-phases
5435 ;; Avoid rubocop dependency
5436 (replace 'check
5437 (lambda* (#:key tests? #:allow-other-keys)
5438 (when tests?
5439 (invoke "rspec")))))))
5440 (propagated-inputs
5441 (list ruby-ptools))
5442 (native-inputs
5443 (list ruby-rspec))
5444 (synopsis "Lightweight alternative to @code{mkmf}")
5445 (description
5446 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
5447for use as a library. It does not create packages, builds, or log files of
5448any kind. Instead, it provides mixin methods that you can use in FFI or tests
5449to check for the presence of header files, constants, and so on.")
5450 (home-page "https://github.com/djberg96/mkmf-lite")
5451 (license license:asl2.0)))
5452
5453(define-public ruby-msgpack
5454 (package
5455 (name "ruby-msgpack")
5456 (version "1.8.4")
5457 (source (origin
5458 (method git-fetch) ;for tests
5459 (uri (git-reference
5460 (url "https://github.com/msgpack/msgpack-ruby")
5461 (commit (string-append "v" version))))
5462 (file-name (git-file-name name version))
5463 (sha256
5464 (base32
5465 "1cbv9xkfgsvzygmhfihfbb939wgvzkqdl7vsb6y1alhqwbk6n4jq"))))
5466 (build-system ruby-build-system)
5467 (arguments (list #:test-target "spec"))
5468 (native-inputs
5469 (list ruby-rake-compiler
5470 ruby-ruby-memcheck
5471 ruby-rspec
5472 ruby-yard))
5473 (synopsis "Efficient object serialization library for Ruby")
5474 (description "MessagePack is a binary-based efficient object serialization
5475library. It enables to exchange structured objects between many languages
5476like JSON. Unlike JSON, it is very fast and small.")
5477 (home-page "https://msgpack.org/")
5478 (license license:asl2.0)))
5479
5480(define-public ruby-mspec
5481 (package
5482 (name "ruby-mspec")
5483 (version "1.9.1")
5484 (source
5485 (origin
5486 (method url-fetch)
5487 (uri (rubygems-uri "mspec" version))
5488 (sha256
5489 (base32
5490 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
5491 (build-system ruby-build-system)
5492 (arguments
5493 '(;; TODO: 3 test failures
5494 ;; ./spec/mocks/mock_spec.rb:82
5495 ;; ./spec/utils/name_map_spec.rb:151
5496 ;; ./spec/utils/name_map_spec.rb:155
5497 #:tests? #f
5498 #:phases
5499 (modify-phases %standard-phases
5500 (add-after 'extract-gemspec 'change-dependency-constraints
5501 (lambda _
5502 (substitute* "mspec.gemspec"
5503 (("rake.*") "rake>)\n")
5504 (("rspec.*") "rspec>)\n"))))
5505 (replace 'check
5506 (lambda* (#:key tests? #:allow-other-keys)
5507 (when tests?
5508 (invoke "rspec" "spec")))))))
5509 (native-inputs
5510 (list bundler ruby-rake ruby-rspec))
5511 (synopsis "MSpec is a specialized framework for RubySpec")
5512 (description
5513 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
5514for basic features. MSpec contains additional features that assist in writing
5515specs for Ruby implementations in ruby/spec.")
5516 (home-page "http://rubyspec.org")
5517 (license license:expat)))
5518
5519(define-public ruby-mysql2
5520 (package
5521 (name "ruby-mysql2")
5522 (version "0.5.6")
5523 (source
5524 (origin
5525 (method git-fetch)
5526 (uri (git-reference
5527 (url "https://github.com/brianmario/mysql2")
5528 (commit version)))
5529 (file-name (git-file-name name version))
5530 (sha256
5531 (base32
5532 "0m68qykz94l2frqc05nfhkls7rmmq8nss2xajz8j8p8n7xahhscb"))))
5533 (build-system ruby-build-system)
5534 (arguments
5535 '(;; TODO: Tests require a running MySQL/MariaDB service
5536 #:tests? #f
5537 #:phases
5538 (modify-phases %standard-phases
5539 (replace 'replace-git-ls-files
5540 (lambda _
5541 (substitute* "mysql2.gemspec"
5542 (("git ls-files .*`") "find . -type f |sort`"))))
5543 (add-before 'install 'set-MAKEFLAGS
5544 (lambda* (#:key outputs #:allow-other-keys)
5545 (setenv "MAKEFLAGS"
5546 (string-append
5547 "V=1 "
5548 "prefix=" (assoc-ref outputs "out")))))
5549 ;; Move the 'check phase to after 'install, as then you can test
5550 ;; using the installed mysql2 gem in the store.
5551 (delete 'check)
5552 (add-after 'install 'check
5553 (lambda* (#:key outputs tests? #:allow-other-keys)
5554 (setenv "GEM_PATH"
5555 (string-append
5556 (getenv "GEM_PATH")
5557 ":"
5558 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
5559 (when tests?
5560 (invoke "rspec")))))))
5561 (inputs
5562 `(("mariadb-dev" ,mariadb "dev")
5563 ("zlib" ,zlib)))
5564 (native-inputs
5565 (list ruby-rspec ruby-rake-compiler))
5566 (synopsis "MySQL library for Ruby, binding to libmysql")
5567 (description
5568 "This package provides a simple, fast MySQL library for Ruby, binding to
5569libmysql.")
5570 (home-page "https://github.com/brianmario/mysql2")
5571 (license license:expat)))
5572
5573(define-public ruby-blankslate
5574 (package
5575 (name "ruby-blankslate")
5576 (version "3.1.3")
5577 (source (origin
5578 (method url-fetch)
5579 (uri (rubygems-uri "blankslate" version))
5580 (sha256
5581 (base32
5582 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
5583 (build-system ruby-build-system)
5584 (arguments
5585 `(#:phases
5586 (modify-phases %standard-phases
5587 (replace 'check
5588 (lambda _ (invoke "rspec" "spec/"))))))
5589 (native-inputs
5590 (list bundler ruby-rspec))
5591 (synopsis "Abstract base class with no predefined methods")
5592 (description
5593 "BlankSlate provides an abstract base class with no predefined
5594methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
5595as a base class when writing classes that depend upon
5596@code{method_missing} (e.g. dynamic proxies).")
5597 (home-page "https://github.com/masover/blankslate")
5598 (license license:expat)))
5599
5600(define-public ruby-bond
5601 (package
5602 (name "ruby-bond")
5603 (version "0.5.1")
5604 (source
5605 (origin
5606 (method url-fetch)
5607 (uri (rubygems-uri "bond" version))
5608 (sha256
5609 (base32
5610 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
5611 (build-system ruby-build-system)
5612 (arguments
5613 ;; The test suite fails (see:
5614 ;; https://github.com/cldwalker/bond/issues/46).
5615 `(#:tests? #f))
5616 (native-inputs
5617 (list ruby-bacon ruby-bacon-bits ruby-mocha-on-bacon))
5618 (synopsis "Bond can provide custom autocompletion for arguments, methods
5619and more")
5620 (description
5621 "Bond can autocomplete argument(s) to methods, uniquely completing per
5622module, per method and per argument. Bond provides a configuration system and
5623a DSL for creating custom completions and completion rules. Bond can also
5624load completions that ship with gems. Bond is able to offer more than irb's
5625completion since it uses the full line of input when completing as opposed to
5626irb's last-word approach.")
5627 (home-page "http://tagaholic.me/bond/")
5628 (license license:expat)))
5629
5630(define-public ruby-idn-ruby
5631 (package
5632 (name "ruby-idn-ruby")
5633 (version "0.1.0")
5634 (source
5635 (origin
5636 (method url-fetch)
5637 (uri (rubygems-uri "idn-ruby" version))
5638 (sha256
5639 (base32
5640 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
5641 (build-system ruby-build-system)
5642 (arguments
5643 '(#:phases
5644 (modify-phases %standard-phases
5645 (delete 'check)
5646 (add-after 'install 'check
5647 (lambda* (#:key tests? outputs #:allow-other-keys)
5648 (when tests?
5649 (let* ((gem-file (cadr (find-files "." "\\.gem")))
5650 (name-and-version (basename gem-file ".gem")))
5651 (apply invoke
5652 "ruby" "--verbose"
5653 (string-append "-I"
5654 (assoc-ref outputs "out")
5655 "/lib/ruby/vendor_ruby/gems/"
5656 name-and-version
5657 "/lib")
5658 (find-files "./test" ".*\\.rb")))))))))
5659 (inputs
5660 (list libidn))
5661 (synopsis "Ruby Bindings for the GNU LibIDN library")
5662 (description
5663 "Ruby Bindings for the GNU LibIDN library, an implementation of the
5664Stringprep, Punycode and IDNA specifications. These are used to encode and
5665decode internationalized domain + names according to the IDNA2003
5666specifications.
5667
5668Included are the most important parts of the Stringprep, Punycode and IDNA
5669APIs like performing Stringprep processings, encoding to and decoding from
5670Punycode strings and converting entire domain names to and from the ACE
5671encoded form.")
5672 (home-page "https://github.com/deepfryed/idn-ruby")
5673 (license license:asl2.0)))
5674
5675(define-public ruby-insist
5676 (package
5677 (name "ruby-insist")
5678 (version "1.0.0")
5679 (source
5680 (origin
5681 (method url-fetch)
5682 (uri (rubygems-uri "insist" version))
5683 (sha256
5684 (base32 "0bw3bdwns14mapbgb8cbjmr0amvwz8y72gyclq04xp43wpp5jrvg"))))
5685 (build-system ruby-build-system)
5686 (arguments
5687 (list
5688 #:phases
5689 #~(modify-phases %standard-phases
5690 (add-after 'unpack 'patch-minitest
5691 (lambda _
5692 (substitute* "test/testing.rb"
5693 (("MiniTest")
5694 "Minitest"))))
5695 (replace 'check
5696 (lambda* (#:key tests? #:allow-other-keys)
5697 (when tests?
5698 (invoke "ruby" "test/testing.rb")))))))
5699 (synopsis "Testing tool for Ruby")
5700 (description
5701 "This package provides a simple block-driven assertion
5702library for both testing and for production code that attempts to make test
5703definitions more readable.")
5704 (home-page "https://github.com/jordansissel/ruby-insist/")
5705 (license license:asl2.0)))
5706
5707(define-public ruby-introspection
5708 (package
5709 (name "ruby-introspection")
5710 (version "0.0.4")
5711 (source (origin
5712 (method url-fetch)
5713 (uri (rubygems-uri "introspection" version))
5714 (sha256
5715 (base32
5716 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
5717 (build-system ruby-build-system)
5718 (propagated-inputs
5719 (list ruby-metaclass))
5720 (native-inputs
5721 (list bundler
5722 ruby-blankslate))
5723 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
5724 (description
5725 "Introspection provides tools to inspect the hierarchy of method
5726definitions on a Ruby object.")
5727 (home-page "https://github.com/floehopper/introspection")
5728 (license license:expat)))
5729
5730(define-public ruby-redcarpet
5731 (package
5732 (name "ruby-redcarpet")
5733 (version "3.6.1")
5734 (source (origin
5735 (method git-fetch) ;for tests
5736 (uri (git-reference
5737 (url "https://github.com/vmg/redcarpet")
5738 (commit (string-append "v" version))))
5739 (file-name (git-file-name name version))
5740 (sha256
5741 (base32
5742 "0xb0lqpyrkhb078cwqng67szfa31vlhxsazz3nym0na6dgdj5s3r"))))
5743 (build-system ruby-build-system)
5744 (native-inputs
5745 (list ruby-test-unit ruby-rake-compiler perl tidy-html))
5746 (synopsis "Extensible Markdown to (X)HTML converter")
5747 (description
5748 "Redcarpet is an extensible Ruby library for Markdown processing and
5749conversion to (X)HTML.")
5750 (home-page "https://github.com/vmg/redcarpet")
5751 (license license:expat)))
5752
5753(define-public ruby-reline
5754 (package
5755 (name "ruby-reline")
5756 (version "0.3.3")
5757 (source (origin
5758 (method git-fetch) ;for tests
5759 (uri (git-reference
5760 (url "https://github.com/ruby/reline")
5761 (commit (string-append "v" version))))
5762 (file-name (git-file-name name version))
5763 (sha256
5764 (base32
5765 "1papa4f4prjml9qk6yydi4k5a4zgbzmxmbhd8fz9kfg1i34s35cw"))))
5766 (build-system ruby-build-system)
5767 (propagated-inputs (list ruby-io-console))
5768 (synopsis "GNU Readline or Editline implementation in Ruby")
5769 (description "Reline is a pure Ruby alternative GNU Readline or Editline
5770implementation.")
5771 (home-page "https://github.com/ruby/reline")
5772 (license (list license:bsd-2 license:ruby)))) ;dual license
5773
5774(define-public ruby-rerun
5775 (package
5776 (name "ruby-rerun")
5777 (version "0.13.0")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (rubygems-uri "rerun" version))
5782 (sha256
5783 (base32
5784 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
5785 (build-system ruby-build-system)
5786 (arguments
5787 '(#:tests? #f)) ; No included tests
5788 (propagated-inputs
5789 (list ruby-listen))
5790 (synopsis "Run a process, and restart when some monitored files change")
5791 (description
5792 "Rerun is a tool to launch programs, then monitor the file system, and
5793restart the program when any of the monitored files change. It's written in
5794Ruby, but can be used for all programs.")
5795 (home-page "https://github.com/alexch/rerun/")
5796 (license license:expat)))
5797
5798(define-public ruby-maxitest
5799 (package
5800 (name "ruby-maxitest")
5801 (version "6.0.0")
5802 (home-page "https://github.com/grosser/maxitest")
5803 (source (origin
5804 ;; Pull from git because the gem does not contain tests.
5805 (method git-fetch)
5806 (uri (git-reference
5807 (url home-page)
5808 (commit (string-append "v" version))))
5809 (file-name (git-file-name name version))
5810 (sha256
5811 (base32
5812 "08wwcjlq0gnzfpmf9jxs28x31d62xvx0gbvwrfr923mcn30myxrd"))))
5813 (build-system ruby-build-system)
5814 (arguments
5815 (list
5816 #:test-target "default"
5817 #:phases
5818 #~(modify-phases %standard-phases
5819 ;; Warnings make 2 tests fail. Add mutex-m in Gemfile to avoid them.
5820 (add-after 'unpack 'add-mutex-m
5821 (lambda _
5822 (substitute* "Gemfile"
5823 (("^gem \"bump\".*" all)
5824 (string-append all "gem \"mutex_m\"\n")))))
5825 (replace 'replace-git-ls-files
5826 (lambda _
5827 (substitute* "maxitest.gemspec"
5828 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
5829 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))))
5830 (add-before 'check 'remove-version-constraints
5831 (lambda _
5832 ;; Don't use specific versions of dependencies, instead
5833 ;; take whatever is available in Guix.
5834 (delete-file "Gemfile.lock")))
5835 (add-before 'check 'add-mtest-on-PATH
5836 (lambda _
5837 ;; Tests use 'mtest' which is not automatically added on
5838 ;; PATH.
5839 (setenv "PATH" (string-append (getcwd) "/bin:"
5840 (getenv "PATH"))))))))
5841 (native-inputs
5842 (list procps
5843 ruby-bump
5844 ruby-mutex-m
5845 ruby-rspec
5846 ruby-wwtd))
5847 (propagated-inputs
5848 (list ruby-minitest))
5849 (synopsis "Minitest with extra features")
5850 (description
5851 "Maxitest is a wrapper around Minitest with extra functionality such
5852as timeouts, an @command{mtest} executable that can run tests by line
5853number, support for interrupted tests, better backtraces, and more.")
5854 (license license:expat)))
5855
5856(define-public ruby-mocha
5857 (package
5858 (name "ruby-mocha")
5859 (version "3.1.0")
5860 (source (origin
5861 (method git-fetch) ;for tests
5862 (uri (git-reference
5863 (url "https://github.com/freerange/mocha")
5864 (commit (string-append "v" version))))
5865 (file-name (git-file-name name version))
5866 (sha256
5867 (base32
5868 "0qk47g498l6i2mdbkxvn4d82r8ka6l2v0ln4yj7r8dc9bgh1pjj1"))))
5869 (build-system ruby-build-system)
5870 (propagated-inputs
5871 (list ruby-ruby2-keywords))
5872 (native-inputs
5873 (list ruby-introspection))
5874 (synopsis "Mocking and stubbing library for Ruby")
5875 (description
5876 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
5877allows mocking and stubbing of methods on real (non-mock) classes.")
5878 (home-page "https://mocha.jamesmead.org/")
5879 ;; Mocha can be used with either license at the users choice.
5880 (license (list license:expat license:ruby))))
5881
5882(define-public ruby-mocha-on-bacon
5883 (package
5884 (name "ruby-mocha-on-bacon")
5885 (version "0.2.3")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (rubygems-uri "mocha-on-bacon" version))
5890 (sha256
5891 (base32
5892 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
5893 (build-system ruby-build-system)
5894 (arguments
5895 ;; rubygems.org release missing tests
5896 '(#:tests? #f))
5897 (propagated-inputs (list ruby-mocha))
5898 (synopsis "Mocha adapter for Bacon")
5899 (description
5900 "This package provides a Mocha adapter for Bacon, allowing you to use the
5901Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
5902 (home-page
5903 "https://github.com/alloy/mocha-on-bacon")
5904 (license license:expat)))
5905
5906(define-public ruby-net-ssh
5907 (package
5908 (name "ruby-net-ssh")
5909 (version "7.1.0")
5910 (source (origin
5911 (method git-fetch) ;for tests
5912 (uri (git-reference
5913 (url "https://github.com/net-ssh/net-ssh")
5914 (commit (string-append "v" version))))
5915 (file-name (git-file-name name version))
5916 (sha256
5917 (base32
5918 "1dkbyzpl31jygnnva5sa754vk42q1fih4qz5ipqw5gqiafrrlb91"))))
5919 (build-system ruby-build-system)
5920 (native-inputs
5921 (list bundler
5922 ruby-bcrypt-pbkdf
5923 ruby-ed25519
5924 ruby-mocha
5925 ruby-rbnacl
5926 ruby-test-unit
5927 ruby-x25519))
5928 (synopsis "Ruby implementation of the SSH2 client protocol")
5929 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
5930client protocol. It allows you to write programs that invoke and interact
5931with processes on remote servers, via SSH2.")
5932 (home-page "https://github.com/net-ssh/net-ssh")
5933 (license license:expat)))
5934
5935(define-public ruby-net-scp
5936 (package
5937 (name "ruby-net-scp")
5938 (version "4.1.0")
5939 (source
5940 (origin
5941 (method git-fetch)
5942 (uri (git-reference
5943 (url "https://github.com/net-ssh/net-scp")
5944 (commit (string-append "v" version))))
5945 (file-name (git-file-name name version))
5946 (sha256
5947 (base32 "0v512gbsapdwbdsm8vxn1mz521gbab71r2bx5khccvjgb3rbw8fp"))))
5948 (build-system ruby-build-system)
5949 (native-inputs
5950 (list bundler ruby-test-unit ruby-mocha))
5951 (propagated-inputs
5952 (list ruby-net-ssh))
5953 (synopsis "Pure-Ruby SCP client library")
5954 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
5955client protocol.")
5956 (home-page "https://github.com/net-ssh/net-scp")
5957 (license license:expat)))
5958
5959(define-public ruby-net-sftp
5960 (package
5961 (name "ruby-net-sftp")
5962 (version "4.0.0")
5963 (source (origin
5964 (method url-fetch)
5965 (uri (rubygems-uri "net-sftp" version))
5966 (sha256
5967 (base32
5968 "0r33aa2d61hv1psm0l0mm6ik3ycsnq8symv7h84kpyf2b7493fv5"))))
5969 (build-system ruby-build-system)
5970 (propagated-inputs (list ruby-net-ssh))
5971 (synopsis "Pure Ruby implementation of the SFTP client protocol")
5972 (description
5973 "@code{Net::SFTP} is a pure Ruby implementation of the SFTP
5974protocol (specifically, versions 1 through 6 of the SFTP protocol). Note that
5975this is the “Secure File Transfer Protocol”, typically run over an SSH
5976connection, and has nothing to do with the FTP protocol.")
5977 (home-page "https://github.com/net-ssh/net-sftp")
5978 (license license:expat)))
5979
5980(define-public ruby-minima
5981 (package
5982 (name "ruby-minima")
5983 (version "2.5.1")
5984 (source (origin
5985 (method url-fetch)
5986 (uri (rubygems-uri "minima" version))
5987 (sha256
5988 (base32
5989 "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"))))
5990 (arguments
5991 (list #:phases #~(modify-phases %standard-phases
5992 (replace 'check
5993 (lambda* (#:key tests? #:allow-other-keys)
5994 (when tests?
5995 (invoke "jekyll" "build"))
5996 ;; Without the following, an attempt to remove
5997 ;; minima-<version>.gem is made during installation,
5998 ;; which will fail.
5999 (delete-file #$(string-append "_site/minima-"
6000 version ".gem")))))))
6001 (build-system ruby-build-system)
6002 (propagated-inputs (list jekyll ruby-jekyll-feed ruby-jekyll-seo-tag))
6003 (synopsis "Beautiful, minimal theme for Jekyll")
6004 (description
6005 "Minima is a one-size-fits-all Jekyll theme for writers. It's Jekyll's
6006default (and first) theme. It's what you get when you run @code{jekyll new}.")
6007 (home-page "https://github.com/jekyll/minima")
6008 (license license:expat)))
6009
6010(define-public ruby-minitest-around
6011 (package
6012 (name "ruby-minitest-around")
6013 (version "0.5.0")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (rubygems-uri "minitest-around" version))
6018 (sha256
6019 (base32
6020 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
6021 (build-system ruby-build-system)
6022 (arguments
6023 '(#:phases
6024 (modify-phases %standard-phases
6025 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
6026 (lambda _
6027 (substitute* "minitest-around.gemspec"
6028 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n")))))))
6029 (propagated-inputs
6030 (list ruby-minitest))
6031 (native-inputs
6032 (list bundler ruby-cucumber ruby-bump ruby-test-construct))
6033 (synopsis "Run code around tests in Minitest")
6034 (description
6035 "This library provides a way to run code around tests in Minitest,
6036written using either the unit test or spec style.")
6037 (home-page "https://github.com/splattael/minitest-around")
6038 (license license:expat)))
6039
6040(define-public ruby-minitest-retry
6041 (package
6042 (name "ruby-minitest-retry")
6043 (version "0.2.2")
6044 (source (origin
6045 (method url-fetch)
6046 (uri (rubygems-uri "minitest-retry" version))
6047 (sha256
6048 (base32
6049 "1c1zq0b1a9y0hbqphq4ybijnjldlis1g6kyhx92q2ynnqfmzhfga"))))
6050 (build-system ruby-build-system)
6051 (propagated-inputs (list ruby-minitest))
6052 (synopsis "Minitest extension to re-run failing tests")
6053 (description "This package provides the @code{Minitest::Retry} class,
6054which extends Minitest to allow retrying tests when they fail.")
6055 (home-page "https://github.com/y-yagi/minitest-retry")
6056 (license license:expat)))
6057
6058(define-public ruby-minitest-sprint
6059 (package
6060 (name "ruby-minitest-sprint")
6061 (version "1.1.0")
6062 (source (origin
6063 (method url-fetch)
6064 (uri (rubygems-uri "minitest-sprint" version))
6065 (sha256
6066 (base32
6067 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
6068 (build-system ruby-build-system)
6069 (native-inputs
6070 (list ruby-hoe ruby-minitest))
6071 (synopsis "Fast test suite runner for minitest")
6072 (description "Minitest-sprint is a test runner for minitest that makes it
6073easier to re-run individual failing tests.")
6074 (home-page "https://github.com/seattlerb/minitest-sprint")
6075 (license license:expat)))
6076
6077(define-public ruby-minitest-stub-const
6078 ;; XXX: Minitest update unreleased.
6079 (let ((commit "dbcaa18249e48a4b0efa8b09f01a2b111db800e0")
6080 (revision "0"))
6081 (package
6082 (name "ruby-minitest-stub-const")
6083 (version (git-version "0.6" revision commit)) ;for Rakefile
6084 (source
6085 (origin
6086 (method git-fetch)
6087 (uri (git-reference
6088 (url "https://github.com/adammck/minitest-stub-const")
6089 (commit commit)))
6090 (file-name (git-file-name name version))
6091 (sha256
6092 (base32 "08avrpvk8yj1f6x1m8bcq7gdf08x1zcx9iamjysxnalrpwnw5lh6"))))
6093 (build-system ruby-build-system)
6094 (synopsis "Stub constants for the duration of a block in MiniTest")
6095 (description
6096 "This package provides a MiniTest extension to stub constants for the
6097duration of a block in MiniTest.")
6098 (home-page "https://github.com/adammck/minitest-stub-const")
6099 (license license:expat))))
6100
6101(define-public ruby-minitest-bacon
6102 (package
6103 (name "ruby-minitest-bacon")
6104 (version "1.0.3")
6105 (source (origin
6106 (method url-fetch)
6107 (uri (rubygems-uri "minitest-bacon" version))
6108 (sha256
6109 (base32
6110 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
6111 (build-system ruby-build-system)
6112 (native-inputs
6113 (list ruby-hoe))
6114 (inputs
6115 (list ruby-minitest))
6116 (synopsis "Bacon compatibility library for minitest")
6117 (description "Minitest-bacon extends minitest with bacon-like
6118functionality, making it easier to migrate test suites from bacon to minitest.")
6119 (home-page "https://github.com/seattlerb/minitest-bacon")
6120 (license license:expat)))
6121
6122(define-public ruby-minitest-power-assert
6123 (package
6124 (name "ruby-minitest-power-assert")
6125 (version "0.3.1")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (rubygems-uri "minitest-power_assert" version))
6129 (sha256
6130 (base32
6131 "1dazl6nbxjvvmi5jamrsygkz396s29b7cd841ni6qy4izk8jd9b7"))))
6132 (build-system ruby-build-system)
6133 (propagated-inputs (list ruby-minitest ruby-power-assert))
6134 (synopsis "Power Assert implementation for Minitest")
6135 (description "This gem provides a Power Assert implementation for
6136Minitest. It is inspired by the @code{test-unit-power_assert} gem.")
6137 (home-page "https://github.com/hsbt/minitest-power_assert")
6138 (license license:bsd-2)))
6139
6140(define-public ruby-minitest-profile
6141 (package
6142 (name "ruby-minitest-profile")
6143 (version "0.0.2")
6144 (source (origin
6145 (method url-fetch)
6146 (uri (rubygems-uri "minitest-profile" version))
6147 (sha256
6148 (base32
6149 "13h4nwbq6yv7hsaa7dpj90lry4rc5qqnpzvm9n2s57mm2xi31xfa"))))
6150 (build-system ruby-build-system)
6151 (synopsis "Display the slowest tests in a MiniTest suite")
6152 (description "This package provides a MiniTest plugin for displaying the
6153slowest tests in a minitest suite.")
6154 (home-page "https://github.com/nmeans/minitest-profile")
6155 (license license:expat)))
6156
6157(define-public ruby-minitest-proveit
6158 (package
6159 (name "ruby-minitest-proveit")
6160 (version "1.0.0")
6161 (source (origin
6162 (method url-fetch)
6163 (uri (rubygems-uri "minitest-proveit" version))
6164 (sha256
6165 (base32
6166 "0k1hpr8lgkgygfivgcsnnib7xjlf9ribgpn7yidvb4q0l0q2yfmr"))))
6167 (build-system ruby-build-system)
6168 (native-inputs (list ruby-hoe))
6169 (propagated-inputs (list ruby-minitest))
6170 (synopsis "Assertion-based tests extension for MiniTest")
6171 (description "The @code{minitest-proveit} MiniTest extension ensures all
6172tests to prove success (via at least one assertion) rather than rely on the
6173absence of failure.")
6174 (home-page "https://github.com/seattlerb/minitest-proveit")
6175 (license license:expat)))
6176
6177(define-public ruby-minitest-reporters
6178 (package
6179 (name "ruby-minitest-reporters")
6180 (version "1.7.1")
6181 (source
6182 (origin
6183 (method url-fetch)
6184 (uri (rubygems-uri "minitest-reporters" version))
6185 (sha256
6186 (base32
6187 "0b2na3mr8l712c0fa03r9n43l5qwcgrhc1iywwpw7f4m1hx42q2h"))))
6188 (build-system ruby-build-system)
6189 (arguments
6190 '(#:phases
6191 (modify-phases %standard-phases
6192 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
6193 ;; including it as an input can lead to circular dependencies.
6194 (add-after 'unpack 'remove-rubocop-from-Rakefile
6195 (lambda _
6196 (substitute* "Rakefile"
6197 (("require 'rubocop/rake\\_task'") "")
6198 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))))
6199 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
6200 (lambda _
6201 (substitute* "minitest-reporters.gemspec"
6202 ((".*%q<rubocop>.*") "\n")))))))
6203 (propagated-inputs
6204 (list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
6205 (native-inputs
6206 (list bundler ruby-maruku))
6207 (synopsis "Enhanced reporting for Minitest tests")
6208 (description
6209 "@code{minitest/reporters} provides a custom Minitest runner to improve
6210how the test state is reported. A number of different reporters are
6211available, including a spec reporter, progress bar reporter, a HTML
6212reporter.")
6213 (home-page "https://github.com/kern/minitest-reporters")
6214 (license license:expat)))
6215
6216(define-public ruby-minitest-rg
6217 (package
6218 (name "ruby-minitest-rg")
6219 (version "5.3.0")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (rubygems-uri "minitest-rg" version))
6224 (sha256
6225 (base32
6226 "0vwgmk9dnvhlcwxi7j5z150sdqyy3fjs8r8wzx64ig3ivpnb188j"))))
6227 (build-system ruby-build-system)
6228 (arguments
6229 ;; Some tests fail even outside Guix, so disable tests.
6230 ;; https://github.com/blowmage/minitest-rg/issues/12
6231 ;; https://github.com/blowmage/minitest-rg/pull/13
6232 `(#:tests? #f))
6233 (propagated-inputs
6234 (list ruby-minitest))
6235 (synopsis "Coloured output for Minitest")
6236 (description
6237 "@code{minitest-rg} changes the colour of the output from Minitest.")
6238 (home-page "https://blowmage.com/minitest-rg/")
6239 (license license:expat)))
6240
6241(define-public ruby-minitest-global-expectations
6242 (package
6243 (name "ruby-minitest-global-expectations")
6244 (version "1.0.1")
6245 (source
6246 (origin
6247 (method url-fetch)
6248 (uri (rubygems-uri "minitest-global_expectations"
6249 version))
6250 (sha256
6251 (base32
6252 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
6253 (build-system ruby-build-system)
6254 (propagated-inputs
6255 (list ruby-minitest))
6256 (synopsis "Adjust minitest behaviour for calling expectation methods")
6257 (description
6258 "Minitest-global_expectations allows continued use of expectation methods
6259on all objects. Calling expectation methods on all objects was deprecated in
6260minitest 5.12, and is planned to be removed from minitest 6.")
6261 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
6262 (license license:expat)))
6263
6264(define-public ruby-daemons
6265 (package
6266 (name "ruby-daemons")
6267 (version "1.2.5")
6268 (source (origin
6269 (method url-fetch)
6270 (uri (rubygems-uri "daemons" version))
6271 (sha256
6272 (base32
6273 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
6274 (build-system ruby-build-system)
6275 (arguments
6276 `(#:tests? #f)) ; no test suite
6277 (synopsis "Daemonize Ruby programs")
6278 (description "Daemons provides a way to wrap existing Ruby scripts to be
6279run as a daemon and to be controlled by simple start/stop/restart commands.")
6280 (home-page "https://github.com/thuehlinger/daemons")
6281 (license license:expat)))
6282
6283(define-public ruby-dalli
6284 (package
6285 (name "ruby-dalli")
6286 (version "3.2.4")
6287 (source (origin
6288 (method git-fetch) ;for tests
6289 (uri (git-reference
6290 (url "https://github.com/petergoldstein/dalli")
6291 (commit (string-append "v" version))))
6292 (file-name (git-file-name name version))
6293 (sha256
6294 (base32
6295 "1hhqqv1j3zd2y0vr6maaabsflrvkf1x0i6z8n725mhqydp3f9gwp"))))
6296 (build-system ruby-build-system)
6297 ;; Disable tests to avoid a dependency cycle with ruby-activesupport,
6298 ;; through ruby-ruby-prof.
6299 (arguments (list #:tests? #f))
6300 (synopsis "High performance memcached client for Ruby")
6301 (description "Dalli is a high performance pure Ruby client for accessing
6302memcached servers. Dalli supports:
6303
6304@itemize
6305@item Simple and complex memcached configurations
6306@item Fail-over between memcached instances
6307@item Fine-grained control of data serialization and compression
6308@item Thread-safe operation
6309@item SSL/TLS connections to memcached
6310@item SASL authentication.
6311@end itemize
6312
6313The name is a variant of Salvador Dali for his famous painting The Persistence
6314of Memory.")
6315 (home-page "https://github.com/petergoldstein/dalli")
6316 (license license:expat)))
6317
6318(define-public ruby-data_uri
6319 (package
6320 (name "ruby-data_uri")
6321 (version "0.1.0")
6322 (source
6323 (origin
6324 (method url-fetch)
6325 (uri (rubygems-uri "data_uri" version))
6326 (sha256
6327 (base32
6328 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
6329 (build-system ruby-build-system)
6330 (synopsis "URI class for parsing data URIs")
6331 (description
6332 "Data @acronym{URI, universal resource identifier}s allow resources to be
6333embedded inside a URI. The URI::Data class provides support for parsing these
6334URIs using the normal URI.parse method.")
6335 (home-page "https://github.com/dball/data_uri")
6336 (license license:expat)))
6337
6338(define-public ruby-debug
6339 (package
6340 (name "ruby-debug")
6341 (version "1.7.2")
6342 (source (origin
6343 (method url-fetch)
6344 (uri (rubygems-uri "debug" version))
6345 (sha256
6346 (base32
6347 "0x59508j69w9p275gabysv521n210pd3n060gqfgsiqjms1h0ldf"))))
6348 (build-system ruby-build-system)
6349 (arguments (list #:test-target "test_all"))
6350 (propagated-inputs (list ruby-irb ruby-reline))
6351 (synopsis "Debugging functionality for Ruby")
6352 (description "Debugging functionality for Ruby. This is completely
6353rewritten debug.rb which was contained by the ancient Ruby versions. It is
6354included with Ruby itself, but this package is made available so that the
6355latest version can be made available independently from Ruby.")
6356 (home-page "https://github.com/ruby/debug")
6357 (license license:bsd-2)))
6358
6359(define-public ruby-deep-merge
6360 (package
6361 (name "ruby-deep-merge")
6362 (version "1.2.1")
6363 (home-page "https://github.com/danielsdeleo/deep_merge")
6364 ;; The Rubygem source does not contain the gemspec required for tests.
6365 (source (origin
6366 (method git-fetch)
6367 (uri (git-reference (url home-page) (commit version)))
6368 (file-name (git-file-name name version))
6369 (sha256
6370 (base32
6371 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
6372 (build-system ruby-build-system)
6373 (native-inputs
6374 (list ruby-minitest))
6375 (synopsis "Recursively merge hashes")
6376 (description
6377 "Deep Merge is a set of utility functions for @code{Hash}. It permits
6378you to merge elements inside a hash together recursively.")
6379 (license license:expat)))
6380
6381(define-public ruby-delayed-job
6382 (package
6383 (name "ruby-delayed-job")
6384 (version "4.2.0")
6385 (source (origin
6386 (method url-fetch)
6387 (uri (rubygems-uri "delayed_job" version))
6388 (sha256
6389 (base32
6390 "1vqkfxflcxa7zyj8m3dlgqxc2f5xvrw22k482y1kk14hpdl1zp2i"))))
6391 (build-system ruby-build-system)
6392 (arguments
6393 (list #:phases
6394 #~(modify-phases %standard-phases
6395 (add-after 'unpack 'disable-bundler
6396 (lambda _
6397 (substitute* "Rakefile"
6398 (("require 'bundler/setup'") "")
6399 (("Bundler::GemHelper\\.install_tasks") ""))))
6400 (add-after 'unpack 'disable-rubocop
6401 (lambda _
6402 (substitute* "Rakefile"
6403 (("require 'rubocop/rake_task'") "")
6404 (("RuboCop::RakeTask.new") ""))))
6405 (add-after 'extract-gemspec 'remove-dependency-on-actionmailer
6406 (lambda _
6407 (substitute* "spec/helper.rb"
6408 (("require 'action_mailer'") ""))
6409 (substitute* "delayed_job.gemspec"
6410 (("\"spec/performable_mailer_spec.rb\".freeze, ") ""))
6411 (delete-file "spec/performable_mailer_spec.rb"))))))
6412 (native-inputs
6413 (list ruby-activerecord
6414 ruby-rspec
6415 ruby-simplecov
6416 ruby-simplecov-lcov
6417 ruby-zeitwerk
6418 ruby-mini-portile-2))
6419 (propagated-inputs
6420 (list ruby-activesupport))
6421 (synopsis "Asynchronous background tasks execution library")
6422 (description "Delayed_job (or DJ) encapsulates the common pattern of
6423asynchronously executing longer tasks in the background. It is a direct
6424extraction from Shopify where the job table is responsible for a multitude of
6425core tasks.")
6426 (home-page "https://github.com/collectiveidea/delayed_job")
6427 (license license:expat)))
6428
6429(define-public ruby-git
6430 (package
6431 (name "ruby-git")
6432 (version "1.3.0")
6433 (source (origin
6434 (method url-fetch)
6435 (uri (rubygems-uri "git" version))
6436 (sha256
6437 (base32
6438 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
6439 (build-system ruby-build-system)
6440 (arguments
6441 `(#:tests? #f ; no tests
6442 #:phases (modify-phases %standard-phases
6443 (add-after 'install 'patch-git-binary
6444 (lambda* (#:key inputs outputs #:allow-other-keys)
6445 ;; Make the default git binary an absolute path to the
6446 ;; store.
6447 (let ((git (search-input-file inputs "/bin/git"))
6448 (config (string-append
6449 (assoc-ref outputs "out")
6450 "/lib/ruby/vendor_ruby/gems/git-"
6451 ,version "/lib/git/config.rb")))
6452 (substitute* (list config)
6453 (("'git'")
6454 (string-append "'" git "'")))))))))
6455 (inputs
6456 (list git))
6457 (synopsis "Ruby wrappers for Git")
6458 (description "Ruby/Git is a Ruby library that can be used to create, read
6459and manipulate Git repositories by wrapping system calls to the git binary.")
6460 (home-page "https://github.com/schacon/ruby-git")
6461 (license license:expat)))
6462
6463(define-public ruby-hocon
6464 (package
6465 (name "ruby-hocon")
6466 (version "1.4.0")
6467 (home-page "https://github.com/puppetlabs/ruby-hocon")
6468 (source (origin
6469 (method git-fetch)
6470 (uri (git-reference (url home-page) (commit version)))
6471 (file-name (git-file-name name version))
6472 (sha256
6473 (base32
6474 "04wgv0pwrghawnl6qp346z59fvp9v37jymq8p0lsrzxa6nvrykmk"))))
6475 (build-system ruby-build-system)
6476 (arguments
6477 (list
6478 #:phases
6479 #~(modify-phases %standard-phases
6480 (replace 'check
6481 (lambda* (#:key tests? #:allow-other-keys)
6482 (if tests?
6483 (invoke "rspec")
6484 (format #t "test suite not run~%")))))))
6485 (native-inputs
6486 (list bundler ruby-rspec))
6487 (synopsis "HOCON config library")
6488 (description
6489 "This package provides Ruby support for the @acronym{HOCON,
6490Human-Optimized Config Object Notation} configuration file format. It
6491supports parsing and modifying HOCON and JSON files, and rendering parsed
6492objects back to a @code{String}.")
6493 (license license:asl2.0)))
6494
6495(define-public ruby-slop
6496 (package
6497 (name "ruby-slop")
6498 (version "4.10.1")
6499 (source (origin
6500 (method url-fetch)
6501 (uri (rubygems-uri "slop" version))
6502 (sha256
6503 (base32
6504 "1iyrjskgxyn8i1679qwkzns85p909aq77cgx2m4fs5ygzysj4hw4"))))
6505 (build-system ruby-build-system)
6506 (synopsis "Ruby command line option parser")
6507 (description "Slop provides a Ruby domain specific language for gathering
6508options and parsing command line flags.")
6509 (home-page "https://github.com/leejarvis/slop")
6510 (license license:expat)))
6511
6512(define-public ruby-slop-3
6513 (package (inherit ruby-slop)
6514 (version "3.6.0")
6515 (source (origin
6516 (method url-fetch)
6517 (uri (rubygems-uri "slop" version))
6518 (sha256
6519 (base32
6520 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
6521
6522(define-public ruby-multi-xml
6523 (package
6524 (name "ruby-multi-xml")
6525 (version "0.6.0")
6526 (source
6527 (origin
6528 (method url-fetch)
6529 (uri (rubygems-uri "multi_xml" version))
6530 (sha256
6531 (base32
6532 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
6533 (build-system ruby-build-system)
6534 (arguments
6535 '(#:tests? #f)) ; No included tests
6536 (synopsis "Swappable XML backends for Ruby")
6537 (description
6538 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
6539Nokogiri, Ox, or REXML.")
6540 (home-page "https://github.com/sferik/multi_xml")
6541 (license license:expat)))
6542
6543(define-public ruby-multipart-parser
6544 (package
6545 (name "ruby-multipart-parser")
6546 (version "0.1.1")
6547 (source (origin
6548 (method url-fetch)
6549 (uri (rubygems-uri "multipart-parser" version))
6550 (sha256
6551 (base32
6552 "0xb4p475yrfm883h9kn80a021myn17dvs50wpa1djzcmlq7p0882"))))
6553 (build-system ruby-build-system)
6554 (arguments
6555 (list
6556 #:phases #~(modify-phases %standard-phases
6557 (add-after 'unpack 'skip-failing-test
6558 ;; One test fails for unknown reasons (see:
6559 ;; https://github.com/danabr/multipart-parser/issues/7).
6560 (lambda _
6561 (substitute* "test/multipart_parser/reader_test.rb"
6562 (("def test_long" all)
6563 (string-append all "\n return true"))))))))
6564 (synopsis "Parser for multipart MIME messages")
6565 (description "@code{multipart-parser} is a simple parser for multipart
6566MIME messages, written in Ruby, based on felixge/node-formidable's parser. It
6567has the following characteristics:
6568@itemize
6569@item Pure Ruby
6570@item Event-driven API
6571@item Only supports one level of multipart parsing
6572@item Does not perform I/O
6573@item Does not depend on any other library.
6574@end itemize")
6575 (home-page "https://github.com/danabr/multipart-parser")
6576 (license license:expat)))
6577
6578(define-public ruby-multipart-post
6579 (package
6580 (name "ruby-multipart-post")
6581 (version "2.0.0")
6582 (source (origin
6583 (method url-fetch)
6584 (uri (rubygems-uri "multipart-post" version))
6585 (sha256
6586 (base32
6587 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
6588 (build-system ruby-build-system)
6589 (native-inputs
6590 (list bundler))
6591 (synopsis "Multipart POST library for Ruby")
6592 (description "Multipart-Post Adds multipart POST capability to Ruby's
6593net/http library.")
6594 (home-page "https://github.com/nicksieger/multipart-post")
6595 (license license:expat)))
6596
6597(define-public ruby-multi-json
6598 (package
6599 (name "ruby-multi-json")
6600 (version "1.15.0")
6601 (source
6602 (origin
6603 (method git-fetch)
6604 ;; Tests are not distributed at rubygems.org so download from GitHub
6605 ;; instead.
6606 (uri (git-reference
6607 (url "https://github.com/intridea/multi_json")
6608 (commit (string-append "v" version))))
6609 (file-name (git-file-name name version))
6610 (sha256
6611 (base32
6612 "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
6613 (build-system ruby-build-system)
6614 (arguments
6615 (list
6616 ;; TODO Tests don't currently work with Ruby 3
6617 #:tests? #f
6618 #:phases
6619 #~(modify-phases %standard-phases
6620 (add-before 'check 'pre-check
6621 (lambda _
6622 ;; As seen in the .travis.yml file.
6623 (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
6624 (native-inputs
6625 (list ruby-rspec ruby-json-pure ruby-oj ruby-yajl-ruby))
6626 (synopsis "Common interface to multiple JSON libraries for Ruby")
6627 (description
6628 "This package provides a common interface to multiple JSON libraries,
6629including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
6630NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
6631 (home-page "https://github.com/intridea/multi_json")
6632 (license license:expat)))
6633
6634(define-public ruby-arr-pm
6635 (package
6636 (name "ruby-arr-pm")
6637 (version "0.0.12")
6638 (source (origin
6639 (method url-fetch)
6640 (uri (rubygems-uri "arr-pm" version))
6641 (sha256
6642 (base32
6643 "0fddw0vwdrr7v3a0lfqbmnd664j48a9psrjd3wh3k4i3flplizzx"))))
6644 (build-system ruby-build-system)
6645 (arguments
6646 (list #:phases
6647 #~(modify-phases %standard-phases
6648 (replace 'check
6649 (lambda* (#:key tests? #:allow-other-keys)
6650 (when tests?
6651 (invoke "rspec")))))))
6652 (native-inputs (list ruby-flores ruby-insist ruby-rspec ruby-stud))
6653 (synopsis "RPM reader/writer library written in Ruby")
6654 (description "This library allows reading and writing RPM packages. It is
6655used by the @command{fpm} tool. It is written in pure Ruby because
6656@code{librpm} is not available on all systems and requires many
6657dependencies.")
6658 (home-page "https://github.com/jordansissel/ruby-arr-pm")
6659 (license license:asl2.0)))
6660
6661(define-public ruby-arel
6662 (package
6663 (name "ruby-arel")
6664 (version "9.0.0")
6665 (source (origin
6666 (method url-fetch)
6667 (uri (rubygems-uri "arel" version))
6668 (sha256
6669 (base32
6670 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
6671 (build-system ruby-build-system)
6672 (arguments '(#:tests? #f)) ; no tests
6673 (home-page "https://github.com/rails/arel")
6674 (synopsis "SQL AST manager for Ruby")
6675 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
6676Ruby. It simplifies the generation of complex SQL queries and adapts to
6677various relational database implementations.")
6678 (license license:expat)))
6679
6680(define-public ruby-minitar
6681 ;; We package from the GitHub source to fix the security issue reported at
6682 ;; https://github.com/halostatue/minitar/issues/16.
6683 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
6684 (package
6685 (name "ruby-minitar")
6686 (version (string-append "0.5.4-1." (string-take commit 8)))
6687 (source
6688 (origin
6689 (method git-fetch)
6690 (uri (git-reference
6691 (url "https://github.com/halostatue/minitar")
6692 (commit commit)))
6693 (file-name (string-append name "-" version "-checkout"))
6694 (sha256
6695 (base32
6696 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
6697 (build-system ruby-build-system)
6698 (arguments
6699 '(#:tests? #f)) ; missing a gemspec
6700 (synopsis "Ruby library and utility for handling tar archives")
6701 (description
6702 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
6703that provides the ability to deal with POSIX tar archive files.")
6704 (home-page "http://www.github.com/atoulme/minitar")
6705 (license (list license:gpl2+ license:ruby)))))
6706
6707(define-public ruby-nokogiri
6708 (package
6709 (name "ruby-nokogiri")
6710 (version "1.18.10")
6711 (source (origin
6712 (method git-fetch)
6713 (uri (git-reference
6714 (url "https://github.com/sparklemotion/nokogiri")
6715 (commit (string-append "v" version))))
6716 (file-name (git-file-name name version))
6717 (sha256
6718 (base32
6719 "1lrng9xbhyw4mkm50wyzab7dyxdwav4q4zyzx9bgilcnaqwc6rbq"))))
6720 (build-system ruby-build-system)
6721 (arguments
6722 (list #:gem-flags #~(list "--" "--use-system-libraries"
6723 (string-append "--with-xml2-include="
6724 #$(this-package-input "libxml2")
6725 "/include/libxml2"))
6726 #:phases #~(modify-phases %standard-phases
6727 (add-after 'install 'delete-mkmf.log
6728 (lambda _
6729 ;; Rubygems installs build log files that embed volatile file
6730 ;; names (see:
6731 ;; https://github.com/rubygems/rubygems/issues/6259).
6732 (for-each delete-file
6733 (find-files #$output "^mkmf\\.log$"))))
6734 (delete 'check)
6735 (add-after 'install 'check
6736 (lambda* (#:key tests? #:allow-other-keys)
6737 (setenv "GEM_PATH" (string-append
6738 (getenv "GEM_PATH") ":"
6739 #$output "/lib/ruby/vendor_ruby"))
6740 (when tests?
6741 (for-each (lambda (file)
6742 (invoke "ruby" "-Itest" file))
6743 (find-files "test" "^test_.*\\.rb"))))))))
6744 (native-inputs (list ruby-hoe ruby-rubyzip))
6745 (inputs (list zlib libxml2 libxslt))
6746 (propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
6747 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
6748 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
6749both CSS3 selector and XPath 1.0 support.")
6750 (home-page "https://nokogiri.org/")
6751 (license license:expat)))
6752
6753(define-public ruby-method-source
6754 (package
6755 (name "ruby-method-source")
6756 (version "1.1.0")
6757 (source
6758 (origin
6759 (method url-fetch)
6760 (uri (rubygems-uri "method_source" version))
6761 (sha256
6762 (base32 "1igmc3sq9ay90f8xjvfnswd1dybj1s3fi0dwd53inwsvqk4h24qq"))))
6763 (build-system ruby-build-system)
6764 (arguments
6765 (list
6766 #:ruby ruby-3.3
6767 #:test-target "spec"
6768 #:phases
6769 #~(modify-phases %standard-phases
6770 (add-after 'unpack 'remove-git-ls-files
6771 (lambda* (#:key outputs #:allow-other-keys)
6772 (substitute* "Rakefile"
6773 (("git ls-files")
6774 "find . -type f")))))))
6775 (native-inputs (list ruby-rspec))
6776 (synopsis "Retrieve the source code for Ruby methods")
6777 (description
6778 "Method_source retrieves the source code for Ruby methods.
6779Additionally, it can extract source code from Proc and Lambda objects or just
6780extract comments.")
6781 (home-page "https://github.com/banister/method_source")
6782 (license license:expat)))
6783
6784(define-public ruby-coderay
6785 (package
6786 (name "ruby-coderay")
6787 (version "1.1.2")
6788 (source
6789 (origin
6790 (method url-fetch)
6791 (uri (rubygems-uri "coderay" version))
6792 (sha256
6793 (base32
6794 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
6795 (build-system ruby-build-system)
6796 (arguments
6797 '(#:tests? #f)) ; missing test files
6798 (synopsis "Ruby syntax highlighting library")
6799 (description "Coderay is a Ruby library that provides syntax highlighting
6800for select languages.")
6801 (home-page "http://coderay.rubychan.de")
6802 (license license:expat)))
6803
6804(define-public ruby-cuke-modeler
6805 (package
6806 (name "ruby-cuke-modeler")
6807 (version "3.31.0")
6808 (source (origin
6809 (method git-fetch)
6810 (uri (git-reference
6811 (url "https://github.com/enkessler/cuke_modeler")
6812 (commit (string-append "v" version))))
6813 (file-name (git-file-name name version))
6814 (sha256
6815 (base32
6816 "0g03zz8p4xn8k2yfq0421qn0wfxr459v1fh1xalhgqy6ri93lnbs"))))
6817 (build-system ruby-build-system)
6818 (arguments
6819 (list #:test-target "default"
6820 #:phases
6821 #~(modify-phases %standard-phases
6822 (add-after 'unpack 'improve-reproducibility
6823 (lambda _
6824 (substitute*
6825 "testing/rspec/spec/unit/cuke_modeler_unit_spec.rb"
6826 (("#\\{Time.now.year\\}") ""))))
6827 (add-after 'unpack 'relax-requirements
6828 (lambda _
6829 (substitute* "rakefiles/testing_tasks.rb"
6830 (("=> \\[:clear_old_results\\]") "")
6831 (("'bundle', 'exec', ") "")
6832 (("current_version = .*") "")
6833 (("unsupported_versions\\.include\\?\\(current_version\\)") "false")
6834 (("bundle exec ") ""))
6835 (substitute* "Rakefile"
6836 (("Rainbow.enabled = true") "")
6837 (("require_relative 'rakefiles/documentation_tasks'") "")
6838 (("require_relative 'rakefiles/other_tasks'") "")
6839 (("require_relative 'rakefiles/release_tasks'") "")
6840 (("require_relative 'rakefiles/reporting_tasks'") ""))
6841 (substitute* "environments/rspec_env.rb"
6842 (("require 'simplecov'") ""))
6843 (substitute* "environments/cucumber_env.rb"
6844 (("require 'simplecov'") "")))))))
6845 (native-inputs
6846 (list ruby-childprocess
6847 ruby-cucumber
6848 ruby-rainbow
6849 ruby-rspec))
6850 (propagated-inputs (list ruby-cucumber-gherkin))
6851 (synopsis "Gherkin test suite analysis tool")
6852 (description "CukeModeler facilitates modeling a test suite that is
6853written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
6854providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
6855the @code{cucumber-gherkin} generates when parsing features, as well as
6856providing models for feature files and directories in order to be able to have
6857a fully traversable model tree of a test suite's structure. These models can
6858then be analyzed or manipulated more easily than the underlying AST layer.")
6859 (home-page "https://github.com/enkessler/cuke_modeler")
6860 (license license:expat)))
6861
6862(define-public ruby-parallel-tests
6863 (package
6864 (name "ruby-parallel-tests")
6865 (version "5.7.0")
6866 (home-page "https://github.com/grosser/parallel_tests")
6867 (source (origin
6868 (method git-fetch)
6869 (uri (git-reference
6870 (url home-page)
6871 (commit (string-append "v" version))))
6872 (file-name (string-append name version))
6873 (sha256
6874 (base32
6875 "005vj7j4wz2i15c43aqcxvqchrpa412d4h9mfp6nia0dgd3iwgjy"))))
6876 (build-system ruby-build-system)
6877 (arguments
6878 '(#:test-target "spec" ;avoid rubocop dependency
6879 #:phases (modify-phases %standard-phases
6880 (add-after 'patch-source-shebangs 'patch-shell-invocations
6881 (lambda _
6882 (substitute* '("lib/parallel_tests/tasks.rb"
6883 "spec/parallel_tests/tasks_spec.rb")
6884 (("/bin/sh") (which "sh"))
6885 (("/bin/bash") (which "bash")))))
6886 (add-before 'check 'relax-requirements
6887 (lambda _
6888 ;; Remove hard coded version constraints, instead just
6889 ;; use whatever versions are available in Guix.
6890 (delete-file "Gemfile.lock")
6891 (substitute* "Gemfile"
6892 (("'minitest',.*")
6893 "'minitest'\n")
6894 (("'cucumber',.*")
6895 "'cucumber'\n")
6896 ;; Do not depend on a git-fetched spinach version.
6897 (("gem 'spinach',.*")
6898 "gem 'spinach'\n")
6899 ((".*rubocop.*") ""))))
6900 (add-before 'check 'disable-rails-test
6901 (lambda _
6902 ;; XXX: This test attempts to download and run the test
6903 ;; suites of multiple Rails versions(!) directly.
6904 (delete-file "spec/rails_spec.rb")))
6905 (add-before 'check 'disable-problematic-tests
6906 (lambda _
6907 ;; This test fails, probably because of the newer
6908 ;; Cucumber version used here.
6909 (delete-file "spec/parallel_tests/cucumber/\
6910failure_logger_spec.rb")
6911 ;; This uses Bundler extensively.
6912 (delete-file "spec/integration_spec.rb")))
6913 (add-before 'check 'set-HOME
6914 (lambda _
6915 ;; Some tests check the output of Bundler, and fail when
6916 ;; Bundler warns that /homeless-shelter does not exist.
6917 (setenv "HOME" "/tmp"))))))
6918 (native-inputs
6919 (list ruby-bump
6920 ruby-cucumber
6921 ruby-cuke-modeler
6922 ruby-minitest
6923 ruby-rake
6924 ruby-rspec
6925 ruby-spinach))
6926 (propagated-inputs
6927 (list ruby-parallel))
6928 (synopsis "Run tests in parallel")
6929 (description
6930 "This package can speed up @code{Test::Unit}, @code{RSpec},
6931@code{Cucumber}, and @code{Spinach} tests by running them concurrently
6932across multiple CPU cores.")
6933 (license license:expat)))
6934
6935(define-public ruby-parser
6936 (package
6937 (name "ruby-parser")
6938 (version "3.3.7.0")
6939 (source
6940 (origin
6941 (method url-fetch)
6942 (uri (rubygems-uri "parser" version))
6943 (sha256
6944 (base32
6945 "16qi2qhpszm842awxghmsp64yvvawafq96w5jw98irz3f4bh2jbl"))))
6946 (build-system ruby-build-system)
6947 (arguments '(#:tests? #f)) ; tests not included in gem
6948 (native-inputs (list bundler ruby-cliver ruby-simplecov))
6949 (inputs (list ragel))
6950 (propagated-inputs (list ruby-ast ruby-racc))
6951 (synopsis "Ruby parser written in pure Ruby")
6952 (description
6953 "This package provides a Ruby parser written in pure Ruby.")
6954 (home-page "https://github.com/whitequark/parser")
6955 (license license:expat)))
6956
6957(define-public ruby-set
6958 (package
6959 (name "ruby-set")
6960 (version "1.0.3")
6961 (source (origin
6962 (method url-fetch)
6963 (uri (rubygems-uri "set" version))
6964 (sha256
6965 (base32
6966 "07kc057nrkddrybqmlbmgf9x7nsmbc3ni6gy1z6xjx5b838vlj33"))))
6967 (build-system ruby-build-system)
6968 (synopsis
6969 "Ruby class to deal with collections of unordered, unique values")
6970 (description
6971 "This package provides a class to deal with collections of unordered,
6972unique values")
6973 (home-page "https://github.com/ruby/set")
6974 (license license:bsd-2)))
6975
6976(define-public ruby-sexp-processor
6977 (package
6978 (name "ruby-sexp-processor")
6979 (version "4.17.0")
6980 (source
6981 (origin
6982 (method url-fetch)
6983 (uri (rubygems-uri "sexp_processor" version))
6984 (sha256
6985 (base32
6986 "0vzz9mhg4kkdqf179pm30i204h7iskanxrk53j0csf0qrrs4iajd"))))
6987 (build-system ruby-build-system)
6988 (native-inputs
6989 (list ruby-hoe
6990 ruby-minitest
6991 ruby-minitest-proveit))
6992 (synopsis "ParseTree fork which includes generic S-exp processing tools")
6993 (description "The sexp_processor package is derived from ParseTree, but
6994contrary to ParseTree, it includes all the generic S-exp processing tools.
6995Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
6996@code{Environment}")
6997 (home-page "https://github.com/seattlerb/sexp_processor")
6998 (license license:expat)))
6999
7000(define-public ruby-ruby-parser
7001 (package
7002 (name "ruby-ruby-parser")
7003 (version "3.20.2")
7004 (source
7005 (origin
7006 (method url-fetch)
7007 (uri (rubygems-uri "ruby_parser" version))
7008 (sha256
7009 (base32
7010 "0q851n8654wkjrq8jawq8vi5yhr1y9vpyr2vj7cnn3sa4ikg6d3z"))))
7011 (build-system ruby-build-system)
7012 (arguments
7013 (list
7014 #:phases
7015 #~(modify-phases %standard-phases
7016 (add-after 'unpack 'patch
7017 (lambda _
7018 (substitute* "Rakefile"
7019 (("`which bison`")
7020 (string-append "\"" (which "bison") "\""))
7021 (("which unifdef")
7022 (which "unifdef"))))))))
7023 (native-inputs
7024 (list ruby-hoe
7025 ruby-racc
7026 unifdef
7027 bison
7028 ruby-minitest))
7029 (propagated-inputs
7030 (list ruby-sexp-processor))
7031 (home-page "https://github.com/seattlerb/ruby_parser/")
7032 (synopsis "Ruby parser written in pure Ruby")
7033 (description "The ruby_parser (RP) package provides a Ruby parser written
7034in pure Ruby. It outputs S-expressions which can be manipulated and converted
7035back to Ruby via the @code{ruby2ruby} library.")
7036 (license license:expat)))
7037
7038(define-public ruby-ruby-version
7039 (package
7040 (name "ruby-ruby-version")
7041 (version "1.0.3")
7042 (source (origin
7043 (method url-fetch)
7044 (uri (rubygems-uri "ruby_version" version))
7045 (sha256
7046 (base32
7047 "1dfcy4bz7kgmp4i7kvqg2w5l9rsf6vp9hhqqfg4ydds60yazjc2r"))))
7048 (build-system ruby-build-system)
7049 (arguments
7050 (list #:phases
7051 #~(modify-phases %standard-phases
7052 (add-after 'extract-gemspec 'relax-requirements
7053 (lambda _
7054 (delete-file "Gemfile.lock")
7055 (substitute* "ruby_version.gemspec"
7056 (("\"Gemfile.lock\".freeze, ") "")
7057 ;; Allow a newers versions of development dependencies.
7058 (("~>") ">=")))))))
7059 (native-inputs (list ruby-rdoc ruby-rubygems-tasks ruby-rspec))
7060 (synopsis "Ruby class for checking the Ruby version")
7061 (description "This package provides a @code{RubyVersion} class which
7062offers a convenient Domain Specific Language (DSL) for checking for the right
7063Ruby version.")
7064 (home-page "https://github.com/janlelis/ruby_version")
7065 (license license:expat)))
7066
7067(define-public ruby-prawn-manual-builder
7068 (package
7069 (name "ruby-prawn-manual-builder")
7070 (version "0.3.1")
7071 (source
7072 (origin
7073 (method url-fetch)
7074 (uri (rubygems-uri "prawn-manual_builder" version))
7075 (sha256
7076 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
7077 (build-system ruby-build-system)
7078 (arguments
7079 '(#:tests? #f ; no included tests
7080 #:phases
7081 (modify-phases %standard-phases
7082 (add-after 'extract-gemspec 'patch-gemspec
7083 (lambda _
7084 (substitute* ".gemspec"
7085 ;; Loosen the requirement for pdf-inspector
7086 (("~> 1\\.0\\.7") ">= 0")))))))
7087 (propagated-inputs
7088 (list ruby-coderay))
7089 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
7090 (description
7091 "This package provides a tool for writing manuals for Prawn and Prawn
7092accessories")
7093 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
7094 (license %prawn-project-licenses)))
7095
7096(define-public ruby-progress_bar
7097 (package
7098 (name "ruby-progress_bar")
7099 (version "1.1.0")
7100 (source
7101 (origin
7102 (method url-fetch)
7103 (uri (rubygems-uri "progress_bar" version))
7104 (sha256
7105 (base32
7106 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
7107 (build-system ruby-build-system)
7108 (arguments
7109 '(#:test-target "spec"))
7110 (propagated-inputs
7111 (list ruby-highline ruby-options))
7112 (native-inputs
7113 (list bundler ruby-rspec ruby-timecop))
7114 (synopsis
7115 "Ruby library for displaying progress bars")
7116 (description
7117 "ProgressBar is a simple library for displaying progress bars. The
7118maximum value is configurable, and additional information can be displayed
7119like the percentage completion, estimated time remaining, elapsed time and
7120rate.")
7121 (home-page "https://github.com/paul/progress_bar")
7122 (license license:wtfpl2)))
7123
7124(define-public ruby-progressbar
7125 (package
7126 (name "ruby-progressbar")
7127 (version "1.10.1")
7128 (source
7129 (origin
7130 (method url-fetch)
7131 (uri (rubygems-uri "ruby-progressbar" version))
7132 (sha256
7133 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
7134 (build-system ruby-build-system)
7135 (arguments
7136 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
7137 #:tests? #f))
7138 (synopsis "Text progress bar library for Ruby")
7139 (description
7140 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
7141The output can be customized with a formatting system.")
7142 (home-page "https://github.com/jfelchner/ruby-progressbar")
7143 (license license:expat)))
7144
7145(define-public ruby-latest-ruby
7146 (package
7147 (name "ruby-latest-ruby")
7148 (version "3.1.0")
7149 (source (origin
7150 (method url-fetch)
7151 (uri (rubygems-uri "latest_ruby" version))
7152 (sha256
7153 (base32
7154 "15rqwgxzpnkzdiz8m02jra0zq5sx0fiz61vkfrj1ls6slqfhnzqg"))))
7155 (build-system ruby-build-system)
7156 (arguments
7157 '(#:tests? #f)) ; No Rakefile
7158 (synopsis "Answers the question of what the latest Ruby version is")
7159 (description "Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.")
7160 (home-page "https://github.com/kyrylo/latest_ruby")
7161 (license license:zlib)))
7162
7163(define-public ruby-pry
7164 (package
7165 (name "ruby-pry")
7166 (version "0.14.2")
7167 (source
7168 (origin
7169 (method url-fetch)
7170 (uri (rubygems-uri "pry" version))
7171 (sha256
7172 (base32
7173 "0k9kqkd9nps1w1r1rb7wjr31hqzkka2bhi8b518x78dcxppm9zn4"))))
7174 (build-system ruby-build-system)
7175 (arguments
7176 '(#:tests? #f)) ; no tests
7177 (propagated-inputs
7178 (list ruby-coderay ruby-method-source))
7179 (synopsis "Ruby REPL")
7180 (description "Pry is an IRB alternative and runtime developer console for
7181Ruby. It features syntax highlighting, a plugin architecture, runtime
7182invocation, and source and documentation browsing.")
7183 (home-page "https://cobaltbluemedia.com/pryrepl/")
7184 (license license:expat)))
7185
7186(define-public ruby-pry-doc
7187 (package
7188 (name "ruby-pry-doc")
7189 (version "1.6.0")
7190 (source (origin
7191 (method url-fetch)
7192 (uri (rubygems-uri "pry-doc" version))
7193 (sha256
7194 (base32
7195 "0qq58vsmmvi9i4d15pav46ca5pd85qx3fxv17pq7ia5lqgxcrc8r"))))
7196 (build-system ruby-build-system)
7197 (propagated-inputs (list ruby-pry ruby-yard))
7198 (native-inputs (list ruby-latest-ruby ruby-rspec ruby-rake)) ;for tests
7199 (synopsis "Provides YARD and extended documentation support for Pry")
7200 (description
7201 "Pry Doc is a Pry REPL plugin. It provides extended documentation
7202support for the REPL by means of improving the @code{show-doc} and
7203@code{show-source} commands. With help of the plugin the commands are
7204be able to display the source code and the docs of Ruby methods and
7205classes implemented in C.")
7206 (home-page "https://github.com/pry/pry-doc")
7207 (license license:expat)))
7208
7209(define-public ruby-single-cov
7210 (package
7211 (name "ruby-single-cov")
7212 (version "1.11.0")
7213 (home-page "https://github.com/grosser/single_cov")
7214 (source (origin
7215 (method git-fetch)
7216 (uri (git-reference (url home-page)
7217 (commit (string-append "v" version))))
7218 (file-name (git-file-name name version))
7219 (sha256
7220 (base32
7221 "10xfciy1an4jlc2fb59m4cllxgfv98n9kcj7frgs44dbmlyfxb08"))))
7222 (build-system ruby-build-system)
7223 (arguments
7224 '(#:test-target "spec" ;to avoid rubocop requirement
7225 #:phases (modify-phases %standard-phases
7226 ;; XXX: Warnings make a few tests fail.
7227 ;; Add mutex-m in Gemfile to avoid them.
7228 (add-after 'unpack 'add-mutex-m
7229 (lambda _
7230 (substitute* "Gemfile"
7231 (("^gem \"bump\".*" all)
7232 (string-append all "gem \"mutex_m\"\n")))))
7233 (replace 'replace-git-ls-files
7234 (lambda _
7235 (substitute* "single_cov.gemspec"
7236 (("`git ls-files lib/ bin/ MIT-LICENSE`")
7237 ;; There no longer appear to be a 'bin'
7238 ;; sub-directory.
7239 "`find lib/ MIT-LICENSE -type f | sort`"))))
7240 (add-before 'check 'remove-version-constraints
7241 (lambda _
7242 (delete-file "Gemfile.lock")))
7243 (add-before 'check 'relax-requirements
7244 (lambda _
7245 ;; Remove extraneous requirements.
7246 (substitute* "Rakefile"
7247 ((".*require.*bump.*") ""))
7248 (substitute* "Gemfile"
7249 ((".*gem \"bump\".*") "")
7250 ((".*gem \"rubocop\".*") ""))))
7251 (add-before 'check 'disable-failing-test
7252 (lambda _
7253 ;; XXX: This test copies assets from minitest, but can
7254 ;; not cope with the files being read-only. Just skip
7255 ;; it for now.
7256 (substitute* "specs/single_cov_spec.rb"
7257 (("it \"complains when coverage is bad\"")
7258 "xit \"complains when coverage is bad\"")
7259 (("it \"does not duplicate coverage\"")
7260 "xit \"does not duplicate coverage\"")))))))
7261 (native-inputs (list ruby-minitest ruby-mutex-m ruby-rspec ruby-simplecov))
7262 (synopsis "Code coverage reporting tool")
7263 (description
7264 "This package provides actionable code coverage reports for Ruby
7265projects. It has very little overhead and can be easily integrated with
7266development tools to catch coverage problems early.")
7267 (license license:expat)))
7268
7269(define-public ruby-oedipus-lex
7270 (package
7271 (name "ruby-oedipus-lex")
7272 (version "2.6.1")
7273 (source
7274 (origin
7275 (method url-fetch)
7276 (uri (rubygems-uri "oedipus_lex" version))
7277 (sha256
7278 (base32
7279 "06l4d3l75vhdcmnavnkzr7bd39rb0njxhkbmwrw6ni64z2hlj7w7"))))
7280 (build-system ruby-build-system)
7281 (native-inputs
7282 (list ruby-hoe
7283 ruby-minitest))
7284 (synopsis "Ruby lexer")
7285 (description
7286 "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
7287It is based primarily on generating code much like you would a hand-written
7288lexer. It uses StrScanner within a multi-level case statement. As such,
7289Oedipus matches on the first match, not the longest.")
7290 (home-page "https://github.com/seattlerb/oedipus_lex")
7291 (license license:expat)))
7292
7293(define-public ruby-guard
7294 (package
7295 (name "ruby-guard")
7296 (version "2.13.0")
7297 (source (origin
7298 (method git-fetch)
7299 ;; The gem does not include a Rakefile, nor does it contain a
7300 ;; gemspec file, nor does it come with the tests. This is why
7301 ;; we fetch the tarball from Github.
7302 (uri (git-reference
7303 (url "https://github.com/guard/guard")
7304 (commit (string-append "v" version))))
7305 (file-name (git-file-name name version))
7306 (sha256
7307 (base32
7308 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
7309 (build-system ruby-build-system)
7310 (arguments
7311 `(#:tests? #f ; tests require cucumber
7312 #:phases
7313 (modify-phases %standard-phases
7314 (add-after 'unpack 'remove-git-ls-files
7315 (lambda* (#:key outputs #:allow-other-keys)
7316 (substitute* "guard.gemspec"
7317 (("git ls-files -z") "find . -type f -print0"))))
7318 (replace 'build
7319 (lambda _
7320 (invoke "gem" "build" "guard.gemspec"))))))
7321 (propagated-inputs
7322 (list ruby-formatador
7323 ruby-listen
7324 ruby-lumberjack
7325 ruby-nenv
7326 ruby-notiffany
7327 ruby-pry
7328 ruby-shellany
7329 ruby-thor))
7330 (native-inputs
7331 (list bundler ruby-rspec))
7332 (synopsis "Tool to handle events on file system modifications")
7333 (description
7334 "Guard is a command line tool to easily handle events on file system
7335modifications. Guard automates various tasks by running custom rules whenever
7336file or directories are modified.")
7337 (home-page "https://guardgem.org/")
7338 (license license:expat)))
7339
7340(define-public ruby-spinach
7341 (package
7342 (name "ruby-spinach")
7343 (version "0.12.0")
7344 (home-page "https://github.com/codegram/spinach")
7345 (source (origin
7346 (method url-fetch)
7347 (uri (rubygems-uri "spinach" version))
7348 (sha256
7349 (base32
7350 "1v9nvpvlgjx698dc4q2p1l45sxm5fjjzfxayrkyzb9nv0q0xfjsp"))))
7351 (build-system ruby-build-system)
7352 (arguments
7353 ;; FIXME: Disable tests altogether because they depend on 'capybara'
7354 ;; which in turn depends on many other unpackaged gems. Enable once
7355 ;; capybara is available.
7356 '(#:tests? #f))
7357 (propagated-inputs
7358 (list ruby-colorize ruby-gherkin-ruby))
7359 (synopsis "Gherkin-based BDD framework")
7360 (description
7361 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
7362framework that leverages the expressive @code{Gherkin} language to help you
7363define executable specifications of your code.")
7364 (license license:expat)))
7365
7366(define-public ruby-timers
7367 (package
7368 (name "ruby-timers")
7369 (version "4.3.5")
7370 (source (origin
7371 (method git-fetch)
7372 (uri (git-reference
7373 (url "https://github.com/socketry/timers")
7374 (commit (string-append "v" version))))
7375 (file-name (git-file-name name version))
7376 (sha256
7377 (base32
7378 "1vvahlhk6i1xks1bsha6s64pjjxhagmzvvf1q9h6z3lpcba43rpx"))))
7379 (build-system ruby-build-system)
7380 (arguments
7381 (list #:phases
7382 #~(modify-phases %standard-phases
7383 (add-before 'build 'prune-gems.rb
7384 (lambda _
7385 (substitute* "gems.rb"
7386 ;; These are only required for maintenance.
7387 ((".*gem \"bake-modernize\".*") "")
7388 ((".*gem \"bake-gem\".*") "")
7389 ;; Not actually required by the tests.
7390 ((".*gem 'benchmark-ips'.*") "")
7391 ((".*gem \"ruby-prof\".*") ""))))
7392 (add-before 'build 'remove-missing-signing-key
7393 (lambda _
7394 ;; Otherwise, the build fails with ENOENT.
7395 (substitute* "timers.gemspec"
7396 ((".*spec.signing_key.*") ""))))
7397 (replace 'check
7398 (lambda* (#:key tests? #:allow-other-keys)
7399 (when tests?
7400 (invoke "bake" "test")))))))
7401 (native-inputs
7402 (list ruby-covered
7403 ruby-bake-test
7404 ruby-bake-test-external
7405 ruby-sus))
7406 (synopsis "Collection of Ruby timer classes")
7407 (description "Timers offers a collections of one-shot and periodic timers,
7408intended for use with event loops such as async.")
7409 (home-page "https://github.com/socketry/timers")
7410 (license license:expat)))
7411
7412(define-public ruby-tilt
7413 (package
7414 (name "ruby-tilt")
7415 (version "2.7.0")
7416 (source
7417 (origin
7418 (method git-fetch) ;the distributed gem lacks tests
7419 (uri (git-reference
7420 (url "https://github.com/jeremyevans/tilt")
7421 (commit (string-append "v" version))))
7422 (file-name (git-file-name name version))
7423 (sha256
7424 (base32 "1yzf4mgnypb2dxj1jw08qli01pnczyafgb7akjgl131i96zpdg03"))))
7425 (build-system ruby-build-system)
7426 (arguments
7427 (list
7428 #:phases
7429 #~(modify-phases %standard-phases
7430 (add-before 'check 'set-SASS_IMPLEMENTATION
7431 (lambda _
7432 (setenv "SASS_IMPLEMENTATION" "sassc"))))))
7433 (native-inputs
7434 ;; Missing optional dependencies:
7435 ;; - babel/transpiler by tilt/babel
7436 ;; - coffee_script by tilt/coffee
7437 ;; - commonmarker by tilt/commonmarker
7438 ;; - livescript by tilt/livescript
7439 ;; - radius by tilt/radius
7440 ;; - typescript-node by tilt/typescript
7441 (list ruby-asciidoctor/minimal
7442 ruby-builder
7443 ruby-erubi
7444 ruby-haml
7445 ruby-kramdown
7446 ruby-liquid
7447 ruby-markaby
7448 ruby-nokogiri
7449 ruby-pandoc-ruby
7450 ruby-prawn
7451 ruby-rdiscount
7452 ruby-redcarpet
7453 ruby-redcloth
7454 ruby-sassc
7455 ruby-slim
7456 ruby-yajl-ruby))
7457 (synopsis "Generic interface to multiple Ruby template engines")
7458 (description
7459 "Tilt is a thin interface over a number of different Ruby template
7460engines in an attempt to make their usage as generic as possible.")
7461 (home-page "https://github.com/rtomayko/tilt/")
7462 (license license:expat)))
7463
7464(define-public ruby-tilt/minimal
7465 (hidden-package
7466 (package
7467 (inherit ruby-tilt)
7468 (arguments (list #:tests? #f))
7469 (native-inputs (list))))); clear out for minimal build
7470
7471(define-public ruby-thread-safe
7472 (package
7473 (name "ruby-thread-safe")
7474 (version "0.3.6")
7475 (source
7476 (origin
7477 (method url-fetch)
7478 (uri (rubygems-uri "thread_safe" version))
7479 (sha256
7480 (base32
7481 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
7482 (build-system ruby-build-system)
7483 (arguments
7484 '(#:tests? #f)) ; needs simplecov, among others
7485 (synopsis "Thread-safe utilities for Ruby")
7486 (description "The thread_safe library provides thread-safe collections and
7487utilities for Ruby.")
7488 (home-page "https://github.com/ruby-concurrency/thread_safe")
7489 (license license:asl2.0)))
7490
7491(define-public ruby-tzinfo
7492 ;; XXX: Unreleased for [email protected].
7493 (let ((commit "5cfebcbdbe3beff2a254ea0709a1586968a301a0")
7494 (revision "0"))
7495 (package
7496 (name "ruby-tzinfo")
7497 (version (git-version "2.0.6" revision commit))
7498 (source
7499 (origin
7500 (method git-fetch)
7501 (uri (git-reference
7502 ;; Pull from git because the gem has no tests.
7503 (url "https://github.com/tzinfo/tzinfo")
7504 (commit commit)))
7505 (file-name (git-file-name name version))
7506 (sha256
7507 (base32 "02sp9pp3qxds1cw8kks3iha6ib5wrjybh4d2qjm0rksrqkq1gd6q"))))
7508 (build-system ruby-build-system)
7509 (arguments
7510 (list
7511 #:phases
7512 #~(modify-phases %standard-phases
7513 (add-after 'unpack 'skip-safe-tests
7514 (lambda _
7515 (substitute* "test/test_utils.rb"
7516 (("def safe_test\\(options = \\{\\}\\)")
7517 "def safe_test(options = {})
7518 skip('The Guix build environment has an unsafe load path')"))))
7519 (add-before 'check 'pre-check
7520 (lambda _
7521 (setenv "HOME" (getcwd))
7522 (substitute* "Gemfile"
7523 (("simplecov.*") "simplecov'\n"))))
7524 (replace 'check
7525 (lambda* (#:key tests? test-target #:allow-other-keys)
7526 (when tests?
7527 (invoke "bundler" "exec" "rake" test-target)))))))
7528 (propagated-inputs
7529 (list ruby-concurrent-ruby))
7530 (native-inputs
7531 (list ruby-simplecov))
7532 (synopsis "Time zone library for Ruby")
7533 (description "TZInfo is a Ruby library that provides daylight savings
7534aware transformations between times in different time zones.")
7535 (home-page "https://tzinfo.github.io")
7536 (license license:expat))))
7537
7538(define-public ruby-tzinfo-data
7539 (package
7540 (name "ruby-tzinfo-data")
7541 (version "1.2025.2")
7542 (source
7543 (origin
7544 (method git-fetch)
7545 ;; Download from GitHub because the rubygems version does not contain
7546 ;; Rakefile or tests.
7547 (uri (git-reference
7548 (url "https://github.com/tzinfo/tzinfo-data")
7549 (commit (string-append "v" version))))
7550 (file-name (git-file-name name version))
7551 (sha256
7552 (base32 "00hsw1rga03js3la1fdjvzlixqjjg5fw3xpx71mppkhk61ks728f"))))
7553 (build-system ruby-build-system)
7554 (arguments
7555 (list
7556 #:phases
7557 #~(modify-phases %standard-phases
7558 (add-after 'unpack 'patch-source
7559 (lambda* (#:key inputs #:allow-other-keys)
7560 (substitute* "Rakefile"
7561 (("URI\\.parse\\(url\\)\\.open")
7562 "URI.open(url)")
7563 (("https://data.iana.org/time-zones/releases")
7564 (assoc-ref inputs "tzdata")))))
7565 (add-before 'check 'pre-check
7566 (lambda _
7567 (setenv "HOME" (getcwd))
7568 (substitute* "Rakefile"
7569 ;; Don't need gpg, and it may break after a time.
7570 (("gpg ") "echo ")
7571 ((" sh\\(\\\"make -C" text)
7572 (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
7573 " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
7574 (setenv "CC" #$(cc-for-target)))))))
7575 (propagated-inputs
7576 (list ruby-tzinfo))
7577 (native-inputs
7578 `(("tzdata"
7579 ,(file-union "tzdata-for-ruby-tzdata-info"
7580 `(("tzdata2025b.tar.gz"
7581 ,(origin
7582 (method url-fetch)
7583 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz")
7584 (sha256
7585 (base32
7586 "0x0lswl5v3q3ml8ig4djc76p9zc593xajzp22x881isz6h9h908i"))))
7587 ("tzdata2025b.tar.gz.asc"
7588 ,(origin
7589 (method url-fetch)
7590 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz.asc")
7591 (sha256
7592 (base32
7593 "0ss9h9nqy4hb09ywzsgqrs33l92w8kbjd7m8ahvi9h3mh4jhd742"))))
7594 ("tzcode2025b.tar.gz"
7595 ,(origin
7596 (method url-fetch)
7597 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz")
7598 (sha256
7599 (base32
7600 "1v1mw6599afdcmf5dal7zvjbl3caibkzmlw7kka71vi56pdzxy05"))))
7601 ("tzcode2025b.tar.gz.asc"
7602 ,(origin
7603 (method url-fetch)
7604 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz.asc")
7605 (sha256
7606 (base32
7607 "13vj6s9mvw9083xhzyzzs1a4lgyfqmibx6k2rh4nb2ggy3gmwa22")))))))))
7608 (synopsis "Data from the IANA Time Zone database")
7609 (description
7610 "This library provides @code{TZInfo::Data}, which contains data from the
7611IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
7612 (home-page "https://tzinfo.github.io")
7613 (license license:expat)))
7614
7615(define-public ruby-rb-inotify
7616 (package
7617 (name "ruby-rb-inotify")
7618 (version "0.10.1")
7619 (source
7620 (origin
7621 (method url-fetch)
7622 (uri (rubygems-uri "rb-inotify" version))
7623 (sha256
7624 (base32
7625 "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"))))
7626 (build-system ruby-build-system)
7627 (arguments
7628 (list
7629 #:tests? #f ; there are no tests
7630 #:phases
7631 #~(modify-phases %standard-phases
7632 ;; Building the gemspec with rake is not working here since it is
7633 ;; generated with Jeweler. It is also unnecessary because the
7634 ;; existing gemspec does not use any development tools to generate a
7635 ;; list of files.
7636 (replace 'build
7637 (lambda _
7638 (invoke "gem" "build" "rb-inotify.gemspec"))))))
7639 (propagated-inputs
7640 (list ruby-ffi))
7641 (native-inputs
7642 (list ruby-yard))
7643 (synopsis "Ruby wrapper for Linux's inotify")
7644 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
7645kernel subsystem for monitoring changes to files and directories.")
7646 (home-page "https://github.com/nex3/rb-inotify")
7647 (license license:expat)))
7648
7649(define-public ruby-pry-editline
7650 (package
7651 (name "ruby-pry-editline")
7652 (version "1.1.2")
7653 (source (origin
7654 (method url-fetch)
7655 (uri (rubygems-uri "pry-editline" version))
7656 (sha256
7657 (base32
7658 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
7659 (build-system ruby-build-system)
7660 (arguments `(#:tests? #f)) ; no tests included
7661 (native-inputs
7662 (list bundler))
7663 (synopsis "Open the current REPL line in an editor")
7664 (description
7665 "This gem provides a plugin for the Ruby REPL to enable opening the
7666current line in an external editor.")
7667 (home-page "https://github.com/tpope/pry-editline")
7668 (license license:expat)))
7669
7670(define-public ruby-sdoc
7671 (package
7672 (name "ruby-sdoc")
7673 (version "1.1.0")
7674 (source (origin
7675 (method url-fetch)
7676 (uri (rubygems-uri "sdoc" version))
7677 (sha256
7678 (base32
7679 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
7680 (build-system ruby-build-system)
7681 (arguments
7682 `(#:phases
7683 (modify-phases %standard-phases
7684 (add-before 'check 'set-rubylib-and-patch-gemfile
7685 (lambda _
7686 (setenv "RUBYLIB" "lib")
7687 (substitute* "sdoc.gemspec"
7688 (("s.add_runtime_dependency.*") "\n")
7689 (("s.add_dependency.*") "\n"))
7690 (substitute* "Gemfile"
7691 (("gem \"rake\".*")
7692 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n")))))))
7693 (propagated-inputs
7694 (list ruby-json))
7695 (native-inputs
7696 (list bundler ruby-minitest ruby-hoe))
7697 (synopsis "Generate searchable RDoc documentation")
7698 (description
7699 "SDoc is an RDoc documentation generator to build searchable HTML
7700documentation for Ruby code.")
7701 (home-page "https://github.com/voloko/sdoc")
7702 (license license:expat)))
7703
7704(define-public ruby-tins
7705 (package
7706 (name "ruby-tins")
7707 (version "1.29.1")
7708 (source (origin
7709 (method url-fetch)
7710 (uri (rubygems-uri "tins" version))
7711 (sha256
7712 (base32
7713 "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
7714 (build-system ruby-build-system)
7715 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
7716 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
7717 ;; the gemspec.
7718 (arguments
7719 `(#:tests? #f ; there are no tests
7720 #:phases
7721 (modify-phases %standard-phases
7722 (replace 'build
7723 (lambda _
7724 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
7725 ;; causes an error.
7726 (substitute* "tins.gemspec"
7727 (("\"lib/spruz\", ") ""))
7728 (invoke "gem" "build" "tins.gemspec"))))))
7729 (propagated-inputs
7730 (list ruby-sync))
7731 (synopsis "Assorted tools for Ruby")
7732 (description "Tins is a Ruby library providing assorted tools.")
7733 (home-page "https://github.com/flori/tins")
7734 (license license:expat)))
7735
7736(define-public ruby-gemtext
7737 (package
7738 (name "ruby-gemtext")
7739 (version "1.0.3")
7740 (source
7741 (origin
7742 (method url-fetch)
7743 (uri (rubygems-uri "gemtext" version))
7744 (sha256
7745 (base32 "1z559f5z0zvwnqgnny0zf4mppiary020ljxwpw3bdxi2hr9aj3gp"))))
7746 (build-system ruby-build-system)
7747 (synopsis "Gemtext parser for Ruby")
7748 (description
7749 "This package is a Ruby parser library for Gemtext (hypertext format
7750which is intended to serve as the native response format of the Gemini
7751file transfer protocol) and produces a document object of various
7752nodes.")
7753 (home-page "https://github.com/exastencil/gemtext")
7754 (license license:expat)))
7755
7756(define-public ruby-gem-hadar
7757 (package
7758 (name "ruby-gem-hadar")
7759 (version "1.11.0")
7760 (source (origin
7761 (method url-fetch)
7762 (uri (rubygems-uri "gem_hadar" version))
7763 (sha256
7764 (base32
7765 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
7766 (build-system ruby-build-system)
7767 ;; This gem needs itself at development time. We disable rebuilding of the
7768 ;; gemspec to avoid this loop.
7769 (arguments
7770 `(#:tests? #f ; there are no tests
7771 #:phases
7772 (modify-phases %standard-phases
7773 (replace 'build
7774 (lambda _
7775 (invoke "gem" "build" "gem_hadar.gemspec"))))))
7776 (propagated-inputs
7777 (list git-minimal ruby-tins ruby-yard))
7778 (synopsis "Library for the development of Ruby gems")
7779 (description
7780 "This library contains some useful functionality to support the
7781development of Ruby gems.")
7782 (home-page "https://github.com/flori/gem_hadar")
7783 (license license:expat)))
7784
7785(define-public ruby-term-ansicolor
7786 (package
7787 (name "ruby-term-ansicolor")
7788 (version "1.7.1")
7789 (source (origin
7790 (method url-fetch)
7791 (uri (rubygems-uri "term-ansicolor" version))
7792 (sha256
7793 (base32
7794 "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
7795 (build-system ruby-build-system)
7796 ;; Rebuilding the gemspec seems to require git, even though this is not a
7797 ;; git repository, so we just build the gem from the existing gemspec.
7798 (arguments
7799 (list
7800 #:phases
7801 #~(modify-phases %standard-phases
7802 (add-after 'unpack 'fix-test
7803 (lambda -
7804 (substitute* "tests/hsl_triple_test.rb"
7805 (("0\\\\\\.0%")
7806 "0\\.?0?%"))))
7807 (replace 'build
7808 (lambda _
7809 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
7810 (propagated-inputs
7811 (list ruby-tins))
7812 (native-inputs
7813 (list ruby-gem-hadar))
7814 (synopsis "Ruby library to control the attributes of terminal output")
7815 (description
7816 "This Ruby library uses ANSI escape sequences to control the attributes
7817of terminal output.")
7818 (home-page "https://flori.github.io/term-ansicolor/")
7819 ;; There is no mention of the "or later" clause.
7820 (license license:gpl2)))
7821
7822(define-public ruby-immutable-ruby
7823 (package
7824 (name "ruby-immutable-ruby")
7825 (version "0.2.0")
7826 (source
7827 (origin
7828 (method git-fetch)
7829 (uri (git-reference
7830 (url "https://github.com/immutable-ruby/immutable-ruby")
7831 (commit version)))
7832 (file-name (git-file-name name version))
7833 (sha256
7834 (base32 "02sbb24yhg8lxmp4va9js3kn81j268ih4ac4nvgvnq86zdribl8k"))))
7835 (build-system ruby-build-system)
7836 (arguments
7837 (list
7838 #:phases
7839 #~(modify-phases %standard-phases
7840 (replace 'check
7841 (lambda* (#:key tests? #:allow-other-keys)
7842 (when tests? (invoke "ruby" (which "rspec"))))))))
7843 (propagated-inputs (list ruby-concurrent-ruby ruby-sorted-set))
7844 (native-inputs (list ruby-benchmark-ips ruby-pry ruby-rspec))
7845 (synopsis "Efficient, immutable, Thread-Safe Collection classes")
7846 (description
7847 "Immutable-Ruby provides 6 persistent data structures:
7848@code{Hash}, @code{Vector}, @code{Set}, @code{SortedSet}, @code{List}, and
7849@code{Deque} (which works as an immutable queue or stack). Immutable is forked
7850from the Hamster library.")
7851 (home-page "https://github.com/immutable-ruby/immutable-ruby")
7852 (license license:expat)))
7853
7854(define-public ruby-immutable-struct
7855 (package
7856 (name "ruby-immutable-struct")
7857 (version "2.5.0")
7858 (source
7859 (origin
7860 (method git-fetch)
7861 (uri (git-reference
7862 (url "https://github.com/stitchfix/immutable-struct")
7863 (commit version)))
7864 (file-name (git-file-name name version))
7865 (sha256
7866 (base32
7867 "0vsr2spypjf0i7ppg2a0gj3mjj5k3dyqsx224cbsxw51p6cc11c1"))))
7868 (build-system ruby-build-system)
7869 (arguments
7870 (list
7871 #:phases
7872 #~(modify-phases %standard-phases
7873 (replace 'check
7874 (lambda* (#:key tests? #:allow-other-keys)
7875 (when tests?
7876 (invoke "ruby" (which "rspec"))))))))
7877 (native-inputs
7878 (list ruby-rspec))
7879 (synopsis "Ruby library for creating immutable struct classes")
7880 (description
7881 "This package provides a library to help create value objects without
7882the pain of Ruby's Struct (or its setters).")
7883 (home-page "https://stitchfix.github.io/immutable-struct/")
7884 (license license:expat)))
7885
7886(define-public ruby-faker
7887 (package
7888 (name "ruby-faker")
7889 (version "3.6.1")
7890 (source
7891 (origin
7892 (method git-fetch)
7893 (uri (git-reference
7894 (url "https://github.com/faker-ruby/faker")
7895 (commit (string-append "v" version))))
7896 (file-name (git-file-name name version))
7897 (sha256
7898 (base32 "1jv39j3rv1bx4155rsq7cvl13kb173gl8ypvjd7v4ba5cnl5zrrl"))))
7899 (build-system ruby-build-system)
7900 (arguments
7901 (list
7902 #:phases
7903 #~(modify-phases %standard-phases
7904 (add-after 'unpack 'remove-rubocop-from-rakefile
7905 (lambda _
7906 (substitute* "Rakefile"
7907 (("require 'rubocop/rake_task'")
7908 "")
7909 (("RuboCop::RakeTask\\.new")
7910 "")))))))
7911 (native-inputs (list ruby-yard ruby-simplecov ruby-timecop))
7912 (propagated-inputs (list ruby-i18n))
7913 (synopsis "Library for generating fake data")
7914 (description
7915 "Faker is a port of Data::Faker from Perl. It is used to
7916easily generate fake data: names, addresses, phone numbers, etc.")
7917 (home-page "https://github.com/faker-ruby/faker")
7918 (license license:expat)))
7919
7920(define-public ruby-terraform
7921 (package
7922 (name "ruby-terraform")
7923 (version "1.9.0")
7924 (source
7925 (origin
7926 (method git-fetch)
7927 (uri (git-reference
7928 (url "https://github.com/infrablocks/ruby_terraform")
7929 (commit (string-append "v" version))))
7930 (file-name (git-file-name name version))
7931 (sha256
7932 (base32
7933 "0j2gzpg28d62l2dgm9cnblwq76h148b2rdscql41f7913q7f5x82"))))
7934 (build-system ruby-build-system)
7935 (arguments
7936 (list
7937 #:test-target "spec"
7938 #:phases
7939 #~(modify-phases %standard-phases
7940 (add-after 'unpack 'remove-gemlock
7941 (lambda _
7942 (delete-file "Gemfile.lock")))
7943 (add-after 'unpack 'disable-bundler
7944 (lambda _
7945 (substitute* "spec/spec_helper.rb"
7946 (("require 'bundler/setup'") ""))))
7947 (add-before 'check 'disable-falinig-tests
7948 (lambda _
7949 (substitute* "spec/ruby_terraform/commands/plan_spec.rb"
7950 (("it 'logs an error raised when running the command'")
7951 "xit 'logs an error raised when running the command'")
7952 (("it 'raises execution error when an error occurs running the command'")
7953 "xit 'raises execution error when an error occurs running the command'"))))
7954 (replace 'check
7955 (lambda* (#:key tests? #:allow-other-keys)
7956 (when tests?
7957 (invoke "rspec")))))))
7958 (native-inputs
7959 (list ruby-rspec
7960 ruby-faker
7961 ruby-simplecov))
7962 (propagated-inputs
7963 (list ruby-lino ruby-immutable-struct))
7964 (synopsis "Ruby wrapper around the Terraform command line interface")
7965 (description
7966 "This package provides a Ruby wrapper around the Terraform command line
7967interface so that Terraform can be more easily invoked from Ruby code.")
7968 (home-page "https://github.com/infrablocks/ruby_terraform")
7969 (license license:expat)))
7970
7971(define-public ruby-pstree
7972 (package
7973 (name "ruby-pstree")
7974 (version "0.3.0")
7975 (source (origin
7976 (method url-fetch)
7977 (uri (rubygems-uri "pstree" version))
7978 (sha256
7979 (base32
7980 "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
7981 (build-system ruby-build-system)
7982 (native-inputs
7983 (list ruby-gem-hadar bundler))
7984 (synopsis "Create a process tree data structure")
7985 (description
7986 "This library uses the output of the @code{ps} command to create a
7987process tree data structure for the current host.")
7988 (home-page "https://github.com/flori/pstree")
7989 ;; There is no mention of the "or later" clause.
7990 (license license:gpl2)))
7991
7992(define-public ruby-psych
7993 (let ((revision "0")
7994 ;; For older Ractor workaround.
7995 (commit "1a4d383efe0bf12e0e7d67c8ecf61ab39aec526c"))
7996 (package
7997 (name "ruby-psych")
7998 (version (git-version "5.4.0" revision commit))
7999 (source (origin
8000 (method git-fetch) ;for tests
8001 (uri (git-reference
8002 (url "https://github.com/ruby/psych")
8003 (commit commit)))
8004 (file-name (git-file-name name version))
8005 (sha256
8006 (base32
8007 "0nkpzy9f7r457inc3a4jx961zvjkl6xsw8yfvwzp7901hmpp4wvy"))))
8008 (build-system ruby-build-system)
8009 (arguments
8010 (list
8011 #:phases
8012 #~(modify-phases %standard-phases
8013 (add-before 'build 'compile
8014 (lambda _
8015 (invoke "rake" "compile"))))))
8016 (inputs
8017 (list libyaml))
8018 (native-inputs
8019 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8020 (propagated-inputs (list ruby-date ruby-stringio))
8021 (synopsis "Ruby YAML parser and emitter")
8022 (description
8023 "Psych is a YAML parser and emitter. Psych leverages libyaml for its
8024YAML parsing and emitting capabilities. In addition to wrapping libyaml,
8025Psych also knows how to serialize and de-serialize most Ruby objects to and
8026from the YAML format.")
8027 (home-page "https://github.com/ruby/psych")
8028 (license license:expat))))
8029
8030(define-public ruby-utils
8031 (package
8032 (name "ruby-utils")
8033 (version "0.9.0")
8034 (source (origin
8035 (method url-fetch)
8036 (uri (rubygems-uri "utils" version))
8037 (sha256
8038 (base32
8039 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
8040 (build-system ruby-build-system)
8041 (propagated-inputs
8042 (list ruby-tins ruby-term-ansicolor ruby-pstree ruby-pry-editline))
8043 (native-inputs
8044 (list ruby-gem-hadar bundler))
8045 (synopsis "Command line tools for working with Ruby")
8046 (description
8047 "This package provides assorted command line tools that may be useful
8048when working with Ruby code.")
8049 (home-page "https://github.com/flori/utils")
8050 ;; There is no mention of the "or later" clause.
8051 (license license:gpl2)))
8052
8053(define-public ruby-jaro-winkler
8054 (package
8055 (name "ruby-jaro-winkler")
8056 (version "1.6.0")
8057 (source
8058 (origin
8059 (method url-fetch)
8060 (uri (rubygems-uri "jaro_winkler" version))
8061 (sha256
8062 (base32 "09645h5an19zc1i7wlmixszj8xxqb2zc8qlf8dmx39bxpas1l24b"))))
8063 (build-system ruby-build-system)
8064 (arguments
8065 '(#:tests? #f)) ; no included tests
8066 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
8067 (description
8068 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
8069algorithm. It is written as a C extension and will fallback to a pure Ruby
8070implementation on platforms where this is unsupported.")
8071 (home-page "https://github.com/tonytonyjan/jaro_winkler")
8072 (license license:expat)))
8073
8074(define-public ruby-json-pure
8075 (package
8076 (name "ruby-json-pure")
8077 (version "2.6.3")
8078 (source
8079 (origin
8080 ;; For tests
8081 (method git-fetch)
8082 (uri (git-reference
8083 (url "https://github.com/flori/json.git")
8084 (commit (string-append "v" version))))
8085 (file-name (git-file-name name version))
8086 (sha256
8087 (base32
8088 "0551269c98a07m6bl594syh5vknrm3c636a4dxis9jpsb7vf7lfx"))))
8089 (build-system ruby-build-system)
8090 (arguments
8091 (list
8092 #:phases
8093 #~(modify-phases %standard-phases
8094 (add-after 'unpack 'fix-rakefile
8095 (lambda _
8096 (substitute* "Rakefile"
8097 ;; Since this is not a git repository, do not call 'git'.
8098 (("`git ls-files`") "`find . -type f |sort`")))))))
8099 (native-inputs
8100 (list bundler ragel ruby-simplecov ruby-test-unit which))
8101 (synopsis "JSON implementation in pure Ruby")
8102 (description
8103 "This package provides a JSON implementation written in pure Ruby.")
8104 (home-page "https://flori.github.io/json/")
8105 (license license:ruby)))
8106
8107(define-public ruby-jwt
8108 (package
8109 (name "ruby-jwt")
8110 (version "3.2.0")
8111 (source
8112 (origin
8113 ;; For tests
8114 (method git-fetch)
8115 (uri (git-reference
8116 (url "https://github.com/jwt/ruby-jwt")
8117 (commit (string-append "v" version))))
8118 (file-name (git-file-name name version))
8119 (sha256
8120 (base32
8121 "1kjla8ixb56vgrq766r1h8xizyl59q15xc1lxc1867yp61aih5d4"))))
8122 (build-system ruby-build-system)
8123 (arguments
8124 (list
8125 #:test-target "test"
8126 #:phases
8127 #~(modify-phases %standard-phases
8128 (add-after 'unpack 'remove-unnecessary-dependencies
8129 (lambda _
8130 (substitute* "Rakefile"
8131 (("require 'bundler/setup'") "")
8132 (("require 'rubocop/rake_task'") "")
8133 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") ""))
8134 (substitute* "spec/spec_helper.rb"
8135 (("require 'simplecov'") "")))))))
8136 (propagated-inputs (list ruby-base64))
8137 (native-inputs
8138 (list ruby-rspec ruby-rbnacl))
8139 (synopsis "Ruby implementation of the JSON Web Token standard")
8140 (description
8141 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
8142@acronym{JWT, JSON Web Token} standard.")
8143 (home-page "https://github.com/jwt/ruby-jwt")
8144 (license license:expat)))
8145
8146;; Even though this package only provides bindings for a Mac OSX API it is
8147;; required by "ruby-listen" at runtime.
8148(define-public ruby-rb-fsevent
8149 (package
8150 (name "ruby-rb-fsevent")
8151 (version "0.10.3")
8152 (source (origin
8153 (method url-fetch)
8154 (uri (rubygems-uri "rb-fsevent" version))
8155 (sha256
8156 (base32
8157 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
8158 (build-system ruby-build-system)
8159 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
8160 ;; "listen", which needs "rb-fsevent" at runtime.
8161 (arguments `(#:tests? #f))
8162 (synopsis "FSEvents API with signals catching")
8163 (description
8164 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
8165 (home-page "https://rubygems.org/gems/rb-fsevent")
8166 (license license:expat)))
8167
8168(define-public ruby-listen
8169 (package
8170 (name "ruby-listen")
8171 (version "3.8.0")
8172 (source
8173 (origin
8174 ;; The gem does not include a Rakefile, so fetch from the Git
8175 ;; repository.
8176 (method git-fetch)
8177 (uri (git-reference
8178 (url "https://github.com/guard/listen")
8179 (commit (string-append "v" version))))
8180 (file-name (git-file-name name version))
8181 (sha256
8182 (base32
8183 "1skkglml094dw1xr4742in1rwwa84ld0mz4nkw6qa8pwhx48x2n5"))))
8184 (build-system ruby-build-system)
8185 (arguments
8186 (list
8187 #:test-target "spec"
8188 #:phases
8189 #~(modify-phases %standard-phases
8190 (add-after 'unpack 'fix-files-in-gemspec
8191 (lambda _
8192 (substitute* "listen.gemspec"
8193 (("`git ls-files -z`")
8194 "`find . -type f -printf '%P\\\\0' |sort -z`"))))
8195 (add-before 'check 'remove-unnecessary-dependencies'
8196 (lambda _
8197 (substitute* "Rakefile"
8198 ;; Rubocop is for code linting, and is unnecessary for running
8199 ;; the tests.
8200 ((".*rubocop.*") "")))))))
8201 (native-inputs
8202 (list bundler ruby-rspec))
8203 (inputs
8204 (list ;; ruby-thor is used for the command line interface, and is referenced
8205 ;; in the wrapper, and therefore just needs to be an input.
8206 ruby-thor))
8207 (propagated-inputs
8208 (list ruby-rb-fsevent ruby-rb-inotify))
8209 (synopsis "Listen to file modifications")
8210 (description "The Listen gem listens to file modifications and notifies
8211you about the changes.")
8212 (home-page "https://github.com/guard/listen")
8213 (license license:expat)))
8214
8215(define-public ruby-loofah
8216 (package
8217 (name "ruby-loofah")
8218 (version "2.24.1")
8219 (source
8220 (origin
8221 ;; Build from git because the gem lacks tests.
8222 (method git-fetch)
8223 (uri (git-reference (url "https://github.com/flavorjones/loofah")
8224 (commit (string-append "v" version))))
8225 (file-name (git-file-name name version))
8226 (sha256
8227 (base32 "07ngn69i86afqcpwv3yc977krbgq8b201gxz0pg3kp8wrliig44f"))))
8228 (build-system ruby-build-system)
8229 (arguments
8230 (list
8231 ;; tests: 1093 runs, 3586 assertions, 0 failures, 0 errors, 0 skips
8232 #:phases
8233 #~(modify-phases %standard-phases
8234 (add-after 'unpack 'skip-failing-tests
8235 (lambda _
8236 (delete-file "test/assets/testdata_sanitizer_tests1.dat"))))))
8237 (native-inputs
8238 (list ruby-hoe ruby-hoe-markdown ruby-rr))
8239 (propagated-inputs
8240 (list ruby-nokogiri ruby-crass))
8241 (home-page "https://github.com/flavorjones/loofah")
8242 (synopsis "Ruby library for manipulating and transforming HTML/XML")
8243 (description
8244 "Loofah is a general library for manipulating and transforming HTML/XML
8245documents and fragments. It's built on top of Nokogiri and libxml2.")
8246 (license license:expat)))
8247
8248(define-public ruby-crass
8249 (package
8250 (name "ruby-crass")
8251 (version "1.0.6")
8252 (home-page "https://github.com/rgrove/crass")
8253 (source (origin
8254 ;; The gem does not contain tests, so pull from git.
8255 (method git-fetch)
8256 (uri (git-reference
8257 (url home-page)
8258 (commit (string-append "v" version))))
8259 (file-name (git-file-name name version))
8260 (sha256
8261 (base32
8262 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
8263 (build-system ruby-build-system)
8264 (arguments
8265 (list #:phases
8266 #~(modify-phases %standard-phases
8267 (add-after 'unpack 'patch-minitest
8268 (lambda _
8269 (substitute* "test/support/common.rb"
8270 (("MiniTest")
8271 "Minitest")))))))
8272 (synopsis "Pure Ruby CSS parser")
8273 (description
8274 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
8275 (license license:expat)))
8276
8277(define-public ruby-samovar
8278 (package
8279 (name "ruby-samovar")
8280 (version "2.1.4")
8281 (source (origin
8282 (method git-fetch) ;for tests
8283 (uri (git-reference
8284 (url "https://github.com/ioquatix/samovar")
8285 (commit (string-append "v" version))))
8286 (file-name (git-file-name name version))
8287 (sha256
8288 (base32
8289 "05pc5xlbv44anx0sfqssh0xhxg297bvl5slsl7k1vnka4k5fhax6"))))
8290 (build-system ruby-build-system)
8291 (native-inputs (list ruby-covered ruby-rspec))
8292 (propagated-inputs (list ruby-console ruby-mapping))
8293 (synopsis "Flexible option parser for Ruby")
8294 (description "Samovar is a modern framework for building command-line
8295tools and applications. It provides a declarative class-based DSL for
8296building command-line parsers that include automatic documentation generation.
8297It helps you keep your functionality clean and isolated where possible.")
8298 (home-page "https://github.com/ioquatix/samovar")
8299 (license license:expat)))
8300
8301(define-public ruby-sanitize
8302 (package
8303 (name "ruby-sanitize")
8304 (version "7.0.0")
8305 (source (origin
8306 (method git-fetch)
8307 ;; The gem does not include the Rakefile, so we download the
8308 ;; source from Github.
8309 (uri (git-reference
8310 (url "https://github.com/rgrove/sanitize")
8311 (commit (string-append "v" version))))
8312 (file-name (git-file-name name version))
8313 (sha256
8314 (base32
8315 "14598z31g319q7vmn23jriwkm26705ciwy73a8dlsxqhp1wrcv69"))))
8316 (build-system ruby-build-system)
8317 (arguments
8318 (list
8319 #:phases
8320 #~(modify-phases %standard-phases
8321 (add-after 'unpack 'patch
8322 (lambda _
8323 (substitute* "Rakefile"
8324 (("require \"standard/rake\"") "")))))))
8325 (propagated-inputs (list ruby-crass ruby-nokogiri))
8326 (native-inputs (list ruby-minitest))
8327 (home-page "https://github.com/rgrove/sanitize")
8328 (synopsis "Whitelist-based HTML and CSS sanitizer")
8329 (description
8330 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
8331acceptable elements, attributes, and CSS properties, Sanitize will remove all
8332unacceptable HTML and/or CSS from a string.")
8333 (license license:expat)))
8334
8335(define-public ruby-sync
8336 (package
8337 (name "ruby-sync")
8338 (version "0.5.0")
8339 (source
8340 (origin
8341 (method url-fetch)
8342 (uri (rubygems-uri "sync" version))
8343 (sha256
8344 (base32
8345 "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
8346 (build-system ruby-build-system)
8347 (synopsis "Ruby module with a two-phase lock and counter")
8348 (description "This package provides a Ruby module that provides a two-phase
8349lock with a counter.")
8350 (home-page "https://github.com/ruby/sync")
8351 (license license:bsd-2)))
8352
8353(define-public ruby-oj
8354 (package
8355 (name "ruby-oj")
8356 (version "3.16.9")
8357 (source
8358 (origin
8359 (method git-fetch)
8360 ;; Version on rubygems.org does not contain Rakefile, so download from
8361 ;; GitHub instead.
8362 (uri (git-reference
8363 (url "https://github.com/ohler55/oj")
8364 (commit (string-append "v" version))))
8365 (file-name (git-file-name name version))
8366 (sha256
8367 (base32
8368 "01zsvzgpn336lk93v8fr4lpjdl28hiq9iddxr7rcra3d28780fzi"))))
8369 (build-system ruby-build-system)
8370 (arguments
8371 '(#:test-target "test_all"
8372 #:phases
8373 (modify-phases %standard-phases
8374 (add-after 'unpack 'patch-bash
8375 (lambda* (#:key inputs #:allow-other-keys)
8376 (substitute* "test/test_writer.rb"
8377 (("/bin/bash")
8378 (search-input-file inputs "bin/bash")))))
8379 (add-before 'check 'disable-bundler
8380 (lambda _
8381 (substitute* "Rakefile"
8382 (("Bundler\\.with_clean_env") "1.times")
8383 (("bundle exec ") "")))))))
8384 (native-inputs
8385 (list bash-minimal bundler ruby-rspec ruby-rake-compiler))
8386 (synopsis "JSON parser for Ruby optimized for speed")
8387 (description
8388 "Oj is a JSON parser and generator for Ruby, where the encoding and
8389decoding of JSON is implemented as a C extension to Ruby.")
8390 (home-page "https://www.ohler.com/oj/")
8391 (license (list license:expat ; Ruby code
8392 license:bsd-3)))) ; extension code
8393
8394(define-public ruby-ox
8395 (package
8396 (name "ruby-ox")
8397 (version "2.14.21")
8398 (source
8399 (origin
8400 (method url-fetch)
8401 (uri (rubygems-uri "ox" version))
8402 (sha256
8403 (base32
8404 "1fd0pjv8svyq8g49zaqfksq9zhxv1rwvsqslvxhimaywggwpmirc"))))
8405 (build-system ruby-build-system)
8406 (arguments
8407 '(#:tests? #f)) ; no tests
8408 (synopsis "Optimized XML library for Ruby")
8409 (description
8410 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
8411written as a native C extension. It was designed to be an alternative to
8412Nokogiri and other Ruby XML parsers for generic XML parsing and as an
8413alternative to Marshal for Object serialization.")
8414 (home-page "https://www.ohler.com/ox")
8415 (license license:expat)))
8416
8417(define-public ruby-redcloth
8418 (package
8419 (name "ruby-redcloth")
8420 (version "4.3.2")
8421 (source (origin
8422 (method url-fetch)
8423 (uri (rubygems-uri "RedCloth" version))
8424 (sha256
8425 (base32
8426 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
8427 (build-system ruby-build-system)
8428 (arguments
8429 `(#:tests? #f ; no tests
8430 #:phases
8431 (modify-phases %standard-phases
8432 ;; Redcloth has complicated rake tasks to build various versions for
8433 ;; multiple targets using RVM. We don't want this so we just use the
8434 ;; existing gemspec.
8435 (replace 'build
8436 (lambda _
8437 (invoke "gem" "build" "redcloth.gemspec"))))))
8438 (native-inputs
8439 `(("bundler" ,bundler)
8440 ("ruby-diff-lcs" ,ruby-diff-lcs)
8441 ("ruby-rspec-2" ,ruby-rspec-2)))
8442 (synopsis "Textile markup language parser for Ruby")
8443 (description
8444 "RedCloth is a Ruby parser for the Textile markup language.")
8445 (home-page "http://redcloth.org")
8446 (license license:expat)))
8447
8448(define-public ruby-pg
8449 (package
8450 (name "ruby-pg")
8451 (version "1.6.3")
8452 (home-page "https://github.com/ged/ruby-pg")
8453 (source
8454 (origin
8455 (method git-fetch)
8456 (uri (git-reference
8457 (url home-page)
8458 (commit (string-append "v" version))))
8459 (file-name (git-file-name name version))
8460 (sha256
8461 (base32 "0nvswm5dv0n3mm8isnnvd8rzw7s47dd5kgma34fhnyhidc6v4pca"))))
8462 (build-system ruby-build-system)
8463 (arguments
8464 (list
8465 #:test-target "spec"
8466 #:phases
8467 #~(modify-phases %standard-phases
8468 (add-before 'build 'compile
8469 (lambda _
8470 (invoke "rake" "compile")))
8471 ;; Some tests rely on postgresql_lib_path.rb, but it is not
8472 ;; available until the gem is installed. Run tests after
8473 ;; installing to work around it.
8474 (delete 'check)
8475 (add-after 'install 'check
8476 (lambda* (#:key tests? #:allow-other-keys)
8477 (let ((new-gem (string-append #$output
8478 "/lib/ruby/vendor_ruby")))
8479 (setenv "GEM_PATH"
8480 (string-append (getenv "GEM_PATH") ":" new-gem))
8481 (when tests?
8482 (invoke "rspec"))))))))
8483 (native-inputs (list ruby-rake-compiler ruby-hoe ruby-rspec))
8484 (inputs (list postgresql))
8485 (synopsis "Ruby interface to PostgreSQL")
8486 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
8487with PostgreSQL 10 and later.")
8488 (license license:ruby)))
8489
8490(define-public ruby-byebug
8491 (package
8492 (name "ruby-byebug")
8493 (version "12.0.0")
8494 (source
8495 (origin
8496 (method git-fetch)
8497 (uri (git-reference
8498 (url "https://github.com/deivid-rodriguez/byebug")
8499 (commit (string-append "v" version))))
8500 (file-name (git-file-name name version))
8501 (sha256
8502 (base32
8503 "0pjdadc079rmasgiwdxcz8h9wvzk3mb6xq8xr02xxv616ihwxllk"))
8504 (modules '((guix build utils)))
8505 (snippet
8506 '(begin
8507 ;; Remove wrappers that try to setup a bundle environment.
8508 (with-directory-excursion "bin"
8509 (for-each delete-file '("rake" "rubocop"))
8510 ;; ruby-minitest doesn't come with a launcher, so fix the one
8511 ;; provided.
8512 (substitute* "minitest"
8513 (("load File\\.expand_path\\(\"bundle\".*") "")
8514 (("require \"bundler/setup\".*") "")))))))
8515 (build-system ruby-build-system)
8516 (arguments
8517 (list
8518 #:phases
8519 #~(modify-phases %standard-phases
8520 (add-after 'unpack 'sanitize-dependencies
8521 (lambda _
8522 (delete-file "tasks/release.rake")
8523 (substitute* "Rakefile"
8524 ((".*tasks/release.rake.*") ""))))
8525 (add-after 'unpack 'skip-tmp-path-sensitive-test
8526 (lambda _
8527 (substitute* "test/commands/where_test.rb"
8528 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
8529 "unless true\n"))))
8530 (add-before 'build 'compile
8531 (lambda _
8532 (invoke "rake" "compile")))
8533 (add-before 'check 'patch-tests
8534 (lambda _
8535 ;; srand': no implicit conversion of nil into Integer (TypeError)
8536 (delete-file "test/minitest_runner_test.rb")
8537 ;; Expects 5, gets 162. From a file containing ~10 lines.
8538 (substitute* "test/commands/finish_test.rb"
8539 (("test_finish_inside_autoloaded_files")
8540 "finish_inside_autoloaded_files"))))
8541 (add-before 'check 'set-home
8542 (lambda _
8543 (setenv "HOME" (getcwd)))))))
8544 (native-inputs
8545 (list bundler
8546 ruby-minitest
8547 ruby-pry
8548 ruby-rake-compiler
8549 ruby-rubocop
8550 ruby-yard))
8551 (synopsis "Debugger for Ruby 2")
8552 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
8553TracePoint C API for execution control and the Debug Inspector C API for call
8554stack navigation. The core component provides support that front-ends can
8555build on. It provides breakpoint handling and bindings for stack frames among
8556other things and it comes with a command line interface.")
8557 (home-page "https://github.com/deivid-rodriguez/byebug")
8558 (license license:bsd-2)))
8559
8560(define-public ruby-netrc
8561 (package
8562 (name "ruby-netrc")
8563 (version "0.11.0")
8564 (source (origin
8565 (method url-fetch)
8566 (uri (rubygems-uri "netrc" version))
8567 (sha256
8568 (base32
8569 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
8570 (build-system ruby-build-system)
8571 (arguments
8572 `(#:phases
8573 (modify-phases %standard-phases
8574 (replace 'check
8575 ;; There is no Rakefile and minitest can only run one file at once,
8576 ;; so we have to iterate over all test files.
8577 (lambda _
8578 (for-each (lambda (file)
8579 (invoke "ruby" "-Itest" file))
8580 (find-files "./test" "test_.*\\.rb"))))
8581 (add-before 'check 'patch-tests-for-newer-ruby
8582 (lambda _
8583 (substitute* "test/test_netrc.rb"
8584 (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
8585 (native-inputs
8586 (list ruby-minitest))
8587 (synopsis "Library to read and update netrc files")
8588 (description
8589 "This library can read and update netrc files, preserving formatting
8590including comments and whitespace.")
8591 (home-page "https://github.com/geemus/netrc")
8592 (license license:expat)))
8593
8594(define-public ruby-unf-ext
8595 (package
8596 (name "ruby-unf-ext")
8597 (version "0.0.9.1")
8598 (source (origin
8599 (method url-fetch)
8600 (uri (rubygems-uri "unf_ext" version))
8601 (sha256
8602 (base32
8603 "1sf6bxvf6x8gihv6j63iakixmdddgls58cpxpg32chckb2l18qcj"))))
8604 (build-system ruby-build-system)
8605 (arguments
8606 `(#:phases
8607 (modify-phases %standard-phases
8608 (add-after 'build 'build-ext
8609 (lambda _ (invoke "rake" "compile:unf_ext")))
8610 (add-before 'check 'lose-rake-compiler-dock-dependency
8611 (lambda _
8612 ;; rake-compiler-dock is listed in the gemspec, but only
8613 ;; required when cross-compiling.
8614 (substitute* "unf_ext.gemspec"
8615 ((".*rake-compiler-dock.*") "")))))))
8616 (native-inputs
8617 (list bundler ruby-rake-compiler ruby-test-unit))
8618 (synopsis "Unicode normalization form support library")
8619 (description
8620 "This package provides unicode normalization form support for Ruby.")
8621 (home-page "https://github.com/knu/ruby-unf_ext")
8622 (license license:expat)))
8623
8624(define-public ruby-tdiff
8625 ;; Use a newer than released snapshot so that rspec-2 is not required.
8626 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
8627 (package
8628 (name "ruby-tdiff")
8629 (version (string-append "0.3.3-1." (string-take commit 8)))
8630 (source (origin
8631 (method git-fetch)
8632 (uri (git-reference
8633 (url "https://github.com/postmodern/tdiff")
8634 (commit commit)))
8635 (file-name (string-append name "-" version "-checkout"))
8636 (sha256
8637 (base32
8638 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
8639 (build-system ruby-build-system)
8640 (native-inputs
8641 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8642 (synopsis "Calculate the differences between two tree-like structures")
8643 (description
8644 "This library provides functions to calculate the differences between two
8645tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
8646 (home-page "https://github.com/postmodern/tdiff")
8647 (license license:expat))))
8648
8649(define-public ruby-nokogiri-diff
8650 ;; Use a newer than released snapshot so that rspec-2 is not required.
8651 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
8652 (package
8653 (name "ruby-nokogiri-diff")
8654 (version (string-append "0.2.0-1." (string-take commit 8)))
8655 (source (origin
8656 (method git-fetch)
8657 (uri (git-reference
8658 (url "https://github.com/postmodern/nokogiri-diff")
8659 (commit commit)))
8660 (file-name (string-append name "-" version "-checkout"))
8661 (sha256
8662 (base32
8663 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
8664 (build-system ruby-build-system)
8665 (propagated-inputs
8666 (list ruby-tdiff
8667 ruby-nokogiri))
8668 (native-inputs
8669 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8670 (synopsis "Calculate the differences between two XML/HTML documents")
8671 (description
8672 "@code{Nokogiri::Diff} adds the ability to calculate the
8673differences (added or removed nodes) between two XML/HTML documents.")
8674 (home-page "https://github.com/postmodern/nokogiri-diff")
8675 (license license:expat))))
8676
8677(define-public ruby-racc
8678 (package
8679 (name "ruby-racc")
8680 (version "1.8.1")
8681 (source
8682 (origin
8683 (method git-fetch) ;for tests
8684 (uri (git-reference
8685 (url "https://github.com/ruby/racc")
8686 (commit (string-append "v" version))))
8687 (file-name (git-file-name name version))
8688 (sha256
8689 (base32
8690 "1sg2mqp6yxdxrn9kbbsxkd6930fxvm4yjl8knsc0wq6fkipnhm8q"))))
8691 (build-system ruby-build-system)
8692 (arguments
8693 (list
8694 #:phases
8695 #~(modify-phases %standard-phases
8696 (add-before 'build 'compile
8697 (lambda _
8698 (invoke "rake" "compile"))))))
8699 (native-inputs
8700 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8701 (synopsis "LALR(1) parser generator for Ruby")
8702 (description
8703 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
8704generates Ruby program.")
8705 (home-page "https://i.loveruby.net/en/projects/racc/")
8706 (license (list
8707 ;; Generally licensed under the LGPL2.1, and some files also
8708 ;; available under the same license as Ruby.
8709 license:lgpl2.1
8710 license:ruby))))
8711
8712(define-public ruby-rack
8713 (package
8714 (name "ruby-rack")
8715 ;; Do not upgrade to version 3, as Rails doesn't support it yet.
8716 (version "2.2.22")
8717 (source
8718 (origin
8719 (method git-fetch) ;for tests
8720 (uri (git-reference
8721 (url "https://github.com/rack/rack")
8722 (commit (string-append "v" version))))
8723 (file-name (git-file-name name version))
8724 (sha256
8725 (base32
8726 "0b56zbq0pr133839dv2n0qq5326kak7czv92awg12ipghwx5q9gj"))))
8727 (build-system ruby-build-system)
8728 (arguments
8729 (list
8730 #:phases
8731 #~(modify-phases %standard-phases
8732 (add-before 'check 'fix-tests
8733 (lambda _
8734 ;; This test fails in the build environment (and passes outside
8735 ;; of it).
8736 (substitute* "test/spec_files.rb"
8737 (("res.body.must_equal expected_body") ""))
8738 ;; A few of the tests use the length of a file on disk for
8739 ;; Content-Length and Content-Range headers. However, this file
8740 ;; has a shebang in it which an earlier phase patches, growing
8741 ;; the file size from 193 to 239 bytes when the store prefix is
8742 ;; "/gnu/store".
8743 (let ((size-diff (- (string-length (which "ruby"))
8744 (string-length "/usr/bin/env ruby"))))
8745 (substitute* '("test/spec_files.rb")
8746 (("208" bytes)
8747 (number->string (+ (string->number bytes) size-diff)))
8748 (("bytes(.)22-33" all delimiter)
8749 (string-append "bytes"
8750 delimiter
8751 (number->string (+ 22 size-diff))
8752 "-"
8753 (number->string (+ 33 size-diff)))))))))))
8754 (native-inputs
8755 (list ruby-minitest
8756 ruby-minitest-global-expectations
8757 ruby-webrick))
8758 (synopsis "Unified web application interface for Ruby")
8759 (description "Rack provides a minimal, modular and adaptable interface for
8760developing web applications in Ruby. By wrapping HTTP requests and responses,
8761it unifies the API for web servers, web frameworks, and software in between
8762into a single method call.")
8763 (home-page "https://github.com/rack/rack")
8764 (license license:expat)))
8765
8766(define-public ruby-rack-next
8767 (package
8768 (inherit ruby-rack)
8769 (name "ruby-rack")
8770 (version "3.2.5")
8771 (source (origin
8772 (method git-fetch) ;for tests
8773 (uri (git-reference
8774 (url "https://github.com/rack/rack")
8775 (commit (string-append "v" version))))
8776 (file-name (git-file-name name version))
8777 (sha256
8778 (base32
8779 "1l1q3x9k56kwa81r1fpm0z9r92c4r4dryblw5jzcawx1pbvvsh6z"))))
8780 (arguments '())))
8781
8782(define-public ruby-rackup
8783 (package
8784 (name "ruby-rackup")
8785 (version "2.3.1")
8786 (source (origin
8787 (method git-fetch)
8788 (uri (git-reference
8789 (url "https://github.com/rack/rackup")
8790 (commit (string-append "v" version))))
8791 (file-name (git-file-name name version))
8792 (sha256
8793 (base32
8794 "0w8npy6n77wfykq6wb4484rk94raks75n4fsb5xi7kgjg2ngqfg3"))))
8795 (build-system ruby-build-system)
8796 (native-inputs (list ruby-minitest-global-expectations))
8797 (inputs (list ruby-rack-next ruby-webrick))
8798 (synopsis "Command line interface (CLI) for running for Rack applications")
8799 (description "This package provides a command line interface for running
8800for Rack applications.")
8801 (home-page "https://github.com/rack/rackup")
8802 (license license:expat)))
8803
8804(define-public ruby-rackup-1
8805 (package
8806 (inherit ruby-rackup)
8807 (name "ruby-rackup")
8808 (version "1.0.1")
8809 (source (origin
8810 (method git-fetch)
8811 (uri (git-reference
8812 (url "https://github.com/rack/rackup")
8813 (commit (string-append "v" version))))
8814 (file-name (git-file-name name version))
8815 (sha256
8816 (base32
8817 "1xdfxsz7jx2gwfq212y9mca6q0i5s7kyqbfcscy1315awg57ynyp"))))))
8818
8819(define-public ruby-rack-cache
8820 (package
8821 (name "ruby-rack-cache")
8822 (version "1.13.0")
8823 (source (origin
8824 (method url-fetch)
8825 (uri (rubygems-uri "rack-cache" version))
8826 (sha256
8827 (base32
8828 "1cqpax628h2mhnsjfg91c3klxwx2pkvaj061cisb0saqa99b0jgm"))))
8829 (build-system ruby-build-system)
8830 (arguments
8831 (list
8832 ;; The test suite depends on ruby-memcached, which is not available in
8833 ;; Guix and bundles a very dated copy of memcached (undesirable).
8834 #:tests? #f))
8835 (propagated-inputs (list ruby-rack))
8836 (synopsis "Component to enable HTTP caching for Rack-based applications")
8837 (description "Rack::Cache is suitable as a drop-in component to enable
8838HTTP caching for Rack-based applications that produce freshness (Expires,
8839Cache-Control) and/or validation (Last-Modified, ETag) information.")
8840 (home-page "https://github.com/rtomayko/rack-cache")
8841 (license license:expat)))
8842
8843(define-public ruby-rack-test
8844 (package
8845 (name "ruby-rack-test")
8846 (version "2.1.0")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (rubygems-uri "rack-test" version))
8851 (sha256
8852 (base32
8853 "1ysx29gk9k14a14zsp5a8czys140wacvp91fja8xcja0j1hzqq8c"))))
8854 (build-system ruby-build-system)
8855 (arguments
8856 ;; Disable tests because of circular dependencies: requires sinatra,
8857 ;; which requires rack-protection, which requires rack-test. Instead
8858 ;; simply require the library.
8859 `(#:phases
8860 (modify-phases %standard-phases
8861 (replace 'check
8862 (lambda* (#:key tests? #:allow-other-keys)
8863 (when tests?
8864 (invoke "ruby" "-Ilib" "-r" "rack/test")))))))
8865 (propagated-inputs
8866 (list ruby-rack))
8867 (synopsis "Testing API for Rack applications")
8868 (description
8869 "Rack::Test is a small, simple testing API for Rack applications. It can
8870be used on its own or as a reusable starting point for Web frameworks and
8871testing libraries to build on.")
8872 (home-page "https://github.com/rack/rack-test")
8873 (license license:expat)))
8874
8875(define-public ruby-rack-session
8876 (package
8877 (name "ruby-rack-session")
8878 ;; Stay on version 1 until all the rack users such as Rails can use rack 3
8879 ;; (rack-session 2 requires rack 3).
8880 (version "1.0.1")
8881 (source (origin
8882 (method git-fetch) ;for tests
8883 (uri (git-reference
8884 (url "https://github.com/rack/rack-session")
8885 (commit (string-append "v" version))))
8886 (file-name (git-file-name name version))
8887 (sha256
8888 (base32
8889 "0rv955wd7ckp5jgy5c229wmajh48jpcy8s0iv5i8ma61wf7qw0i1"))))
8890 (build-system ruby-build-system)
8891 (native-inputs
8892 (list ruby-minitest-global-expectations
8893 ruby-minitest-sprint))
8894 (propagated-inputs
8895 (list ruby-rack))
8896 (synopsis "Session management for Rack")
8897 (description "This package provides a session management implementation
8898for Rack.")
8899 (home-page "https://github.com/rack/rack-session")
8900 (license license:expat)))
8901
8902(define-public ruby-rack-protection
8903 (package
8904 (name "ruby-rack-protection")
8905 (version "3.0.5")
8906 (source
8907 (origin
8908 (method url-fetch)
8909 (uri (rubygems-uri "rack-protection" version))
8910 (sha256
8911 (base32
8912 "1a12m1mv8dc0g90fs1myvis8vsgr427k1arg1q4a9qlfw6fqyhis"))))
8913 (build-system ruby-build-system)
8914 (arguments
8915 '(;; Tests missing from the gem.
8916 #:tests? #f))
8917 (propagated-inputs
8918 (list ruby-rack))
8919 (native-inputs
8920 (list bundler ruby-rspec-2 ruby-rack-test))
8921 (synopsis "Rack middleware that protects against typical web attacks")
8922 (description "Rack middleware that can be used to protect against typical
8923web attacks. It can protect all Rack apps, including Rails. For instance, it
8924protects against cross site request forgery, cross site scripting,
8925clickjacking, directory traversal, session hijacking and IP spoofing.")
8926 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
8927 (license license:expat)))
8928
8929(define-public ruby-rainbow
8930 (package
8931 (name "ruby-rainbow")
8932 (version "3.1.1")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (rubygems-uri "rainbow" version))
8937 (sha256
8938 (base32
8939 "0smwg4mii0fm38pyb5fddbmrdpifwv22zv3d3px2xx497am93503"))))
8940 (build-system ruby-build-system)
8941 (arguments
8942 '(#:phases
8943 (modify-phases %standard-phases
8944 ;; Run rspec directly, to avoid requiring Rubocop which is used from
8945 ;; the Rakefile.
8946 (replace 'check
8947 (lambda* (#:key tests? #:allow-other-keys)
8948 (when tests?
8949 (invoke "rspec")))))))
8950 (native-inputs
8951 (list bundler ruby-rspec))
8952 (synopsis "Colorize printed text on ANSI terminals")
8953 (description
8954 "@code{rainbow} provides a string presenter object to colorize strings by
8955wrapping them in ANSI escape codes.")
8956 (home-page "https://github.com/ku1ik/rainbow")
8957 (license license:expat)))
8958
8959(define-public ruby-rr
8960 (package
8961 (name "ruby-rr")
8962 (version "1.2.1")
8963 (source
8964 (origin
8965 (method url-fetch)
8966 (uri (rubygems-uri "rr" version))
8967 (sha256
8968 (base32
8969 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
8970 (build-system ruby-build-system)
8971 (arguments
8972 '(#:tests? #f)) ; test files not included
8973 (native-inputs
8974 (list bundler ruby-rspec))
8975 (synopsis "Ruby test double framework")
8976 (description
8977 "RR is a test double framework that features a rich selection of double
8978techniques and a terse syntax.")
8979 (home-page "https://rr.github.io/rr/")
8980 (license license:expat)))
8981
8982(define-public ruby-rest-client
8983 (package
8984 (name "ruby-rest-client")
8985 (version "2.1.0")
8986 (source
8987 (origin
8988 (method url-fetch)
8989 (uri (rubygems-uri "rest-client" version))
8990 (sha256
8991 (base32
8992 "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im"))))
8993 (build-system ruby-build-system)
8994 (arguments
8995 (list
8996 ;; TODO Some tests are currently broken
8997 #:tests? #f
8998 #:phases
8999 #~(modify-phases %standard-phases
9000 (add-before 'check 'remove-unnecessary-development-dependencies
9001 (lambda _
9002 (substitute* "rest-client.gemspec"
9003 ;; Remove rubocop as it's unused. Rubocop also indirectly
9004 ;; depends on this package through ruby-parser and ruby-ast so
9005 ;; this avoids a dependency loop.
9006 ((".*rubocop.*") "\n")
9007 ;; Remove pry as it's unused, it's a debugging tool
9008 ((".*pry.*") "\n")
9009 ;; Remove an unnecessarily strict rdoc dependency
9010 ((".*rdoc.*") "\n"))))
9011 (add-before 'check 'delete-network-dependent-tests
9012 (lambda _
9013 (delete-file "spec/integration/request_spec.rb")
9014 (delete-file "spec/integration/httpbin_spec.rb")))
9015 (replace 'check
9016 (lambda* (#:key tests? #:allow-other-keys)
9017 (when tests?
9018 (invoke "rspec")))))))
9019 (propagated-inputs
9020 (list ruby-http-accept-1
9021 ruby-http-cookie
9022 ruby-mime-types
9023 ruby-netrc))
9024 (native-inputs
9025 (list bundler
9026 ruby-webmock-2
9027 ruby-rspec))
9028 (synopsis "Simple HTTP and REST client for Ruby")
9029 (description
9030 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
9031inspired by the Sinatra microframework style of specifying actions:
9032@code{get}, @code{put}, @code{post}, @code{delete}.")
9033 (home-page "https://github.com/rest-client/rest-client")
9034 (license license:expat)))
9035
9036(define-public ruby-rubocop-ast
9037 (package
9038 (name "ruby-rubocop-ast")
9039 (version "1.37.0")
9040 (source
9041 (origin
9042 (method git-fetch) ;no test suite in distributed gem
9043 (uri (git-reference
9044 (url "https://github.com/rubocop/rubocop-ast")
9045 (commit (string-append "v" version))))
9046 (file-name (git-file-name name version))
9047 (sha256
9048 (base32
9049 "1ww1vxcx6qaih4g68mrbq4xlgrqbv8w7cqxdaz629sazpw2hkycs"))))
9050 (build-system ruby-build-system)
9051 (arguments
9052 `(#:test-target "spec"
9053 #:phases (modify-phases %standard-phases
9054 (add-after 'unpack 'relax-dependencies
9055 (lambda _
9056 (substitute* "Gemfile"
9057 (("gem 'simplecov', '~> 0.10', '< 0.18'")
9058 "gem 'simplecov', '~> 0.10'"))))
9059 (add-before 'build 'generate-lexer
9060 (lambda _
9061 (setenv "RUBOCOP_VERSION" "none")
9062 (invoke "rake" "generate")))
9063 (replace 'replace-git-ls-files
9064 (lambda _
9065 (substitute* "rubocop-ast.gemspec"
9066 (("`git ls-files(.*)`" _ files)
9067 (format #f "`find ~a -type f| sort`" files))))))))
9068 (native-inputs
9069 (list ruby-bump
9070 ruby-oedipus-lex
9071 ruby-prism
9072 ruby-racc
9073 ruby-rake
9074 ruby-rspec
9075 ruby-simplecov))
9076 (propagated-inputs
9077 (list ruby-parser))
9078 (synopsis "RuboCop's AST extensions and NodePattern functionality")
9079 (description "Rubocop::AST extends @code{ruby-parser} with classes used
9080by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
9081@itemize
9082@item @code{RuboCop::AST::Node}
9083@item @code{RuboCop::AST::NodePattern}
9084@end itemize")
9085 (home-page "https://rubocop.org/")
9086 (license license:expat)))
9087
9088(define-public ruby-rexml
9089 (package
9090 (name "ruby-rexml")
9091 (version "3.2.5")
9092 (source
9093 (origin
9094 (method git-fetch) ;no tests in distributed gem
9095 (uri (git-reference
9096 (url "https://github.com/ruby/rexml")
9097 (commit (string-append "v" version))))
9098 (file-name (git-file-name name version))
9099 (sha256
9100 (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
9101 (build-system ruby-build-system)
9102 (synopsis "XML toolkit for Ruby")
9103 (description "Inspired by Electric XML library for Java, REXML aims to be
9104easy-to-use API, small and fast. It supports both tree and stream document
9105parsing.")
9106 (home-page "https://github.com/ruby/rexml")
9107 (license license:bsd-2)))
9108
9109(define-public ruby-character-set
9110 (package
9111 (name "ruby-character-set")
9112 (version "1.8.0")
9113 (source
9114 (origin
9115 (method url-fetch)
9116 (uri (rubygems-uri "character_set" version))
9117 (sha256
9118 (base32
9119 "0l9z2pihzc11f0jpq2sx789zwpmwf5nyhsjps45zzvfs5931fwrb"))))
9120 (build-system ruby-build-system)
9121 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
9122 (synopsis "Ruby library to manipulate Unicode")
9123 (description "CharacterSet is a C-extended Ruby library to work with sets
9124of Unicode code points. It can read and write these sets in various formats
9125and implements the @code{stdlib} @code{Set} interface for them. It also
9126offers an alternate paradigm of @code{String} processing which grants much
9127better performance than @code{Regexp} and @code{String} methods from the
9128@code{stdlib} where applicable. Many parts can be used independently, e.g.:
9129@itemize
9130@item @code{CharacterSet::Character}
9131@item @code{CharacterSet::Parser}
9132@item @code{CharacterSet::Writer}
9133@item @code{RangeCompressor}
9134@end itemize")
9135 (home-page "https://github.com/jaynetics/character_set")
9136 (license license:expat)))
9137
9138(define-public ruby-range-compressor
9139 (package
9140 (name "ruby-range-compressor")
9141 (version "1.2.0")
9142 (source
9143 (origin
9144 (method git-fetch)
9145 (uri (git-reference
9146 (url "https://github.com/janosch-x/range_compressor")
9147 (commit (string-append "v" version))))
9148 (file-name (git-file-name name version))
9149 (sha256
9150 (base32
9151 "1zmc44si5ac2h7r1x4f1j8z5yr6wz528c7dssh0g70fmczs3pfga"))))
9152 (build-system ruby-build-system)
9153 (arguments
9154 (list
9155 #:test-target "spec"
9156 #:phases
9157 #~(modify-phases %standard-phases
9158 (add-after 'extract-gemspec 'strip-version-requirements
9159 (lambda _
9160 (substitute* "range_compressor.gemspec"
9161 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
9162 (string-append stripped "\n"))))))))
9163 (native-inputs
9164 (list ruby-rspec
9165 ruby-sorted-set))
9166 (synopsis "Simple arrays of objects to arrays of ranges compressor")
9167 (description "RangeCompresses is a tiny library that allows compressing
9168arrays of objects into arrays of ranges. For example, it can turn the
9169following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
9170 (home-page "https://github.com/janosch-x/range_compressor")
9171 (license license:expat)))
9172
9173(define-public ruby-regexp-property-values
9174 (package
9175 (name "ruby-regexp-property-values")
9176 (version "1.5.2")
9177 (source
9178 (origin
9179 (method git-fetch)
9180 (uri (git-reference ;no test suite in distributed gem
9181 (url "https://github.com/jaynetics/regexp_property_values")
9182 (commit (string-append "v" version))))
9183 (file-name (git-file-name name version))
9184 (sha256
9185 (base32 "039xrhixdr87kcmwqnly3xr8d1681v054ybj7bpvswzrjbnzjffp"))))
9186 (build-system ruby-build-system)
9187 (arguments
9188 '(#:test-target "default"))
9189 (native-inputs
9190 (list ruby-character-set ruby-rake ruby-rake-compiler
9191 ruby-range-compressor ruby-rspec))
9192 (synopsis "Inspect Ruby's regex engine property values")
9193 (description "This small library lets you see which property values are
9194supported by the regular expression engine of the Ruby version you are running
9195and can directly read out their code point ranges. In other words, it
9196determines all supported values for @code{\\p{value}} expressions and what
9197they match.")
9198 (home-page "https://github.com/jaynetics/regexp_property_values")
9199 (license license:expat)))
9200
9201(define-public ruby-regexp-parser
9202 (package
9203 (name "ruby-regexp-parser")
9204 (version "2.9.0")
9205 (source
9206 (origin
9207 (method git-fetch) ;bin/test missing from gem
9208 (uri (git-reference
9209 (url "https://github.com/ammar/regexp_parser")
9210 (commit (string-append "v" version))))
9211 (file-name (git-file-name name version))
9212 (sha256
9213 (base32 "108yjd737f7ky0acijqd5iydnia358szbyc8a80lab2v9dpqs9ax"))))
9214 (build-system ruby-build-system)
9215 (arguments
9216 (list
9217 #:test-target "default"
9218 #:phases
9219 #~(modify-phases %standard-phases
9220 (add-after 'unpack 'find-ragel
9221 (lambda* (#:key inputs #:allow-other-keys)
9222 (substitute* "tasks/ragel.rake"
9223 (("command -v ragel")
9224 (string-append (search-input-file inputs "bin/ragel") " -v")))))
9225 (add-before 'build 'compile-scanner.rb
9226 (lambda _
9227 (invoke "rake" "build")
9228 ;; XXX: This is needed otherwise the install
9229 ;; phase fails to delete the installed cached
9230 ;; gem file.
9231 (delete-file-recursively "pkg"))))))
9232 (native-inputs (list ragel
9233 ruby-ice-nine
9234 ruby-leto
9235 ruby-regexp-property-values
9236 ruby-rspec))
9237 (synopsis "Regular expression parser library for Ruby")
9238 (description "A Ruby gem for tokenizing, parsing, and transforming regular
9239expressions. It comprises the following components:
9240@itemize
9241@item A scanner/tokenizer based on Ragel,
9242@item A lexer that produces a stream of token objects,
9243@item A parser that produces a tree of Expression objects.
9244@end itemize")
9245 (home-page "https://github.com/ammar/regexp_parser")
9246 (license license:expat)))
9247
9248(define-public ruby-test-queue
9249 (package
9250 (name "ruby-test-queue")
9251 (version "0.4.2")
9252 (source
9253 (origin
9254 (method url-fetch)
9255 (uri (rubygems-uri "test-queue" version))
9256 (sha256
9257 (base32
9258 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
9259 (build-system ruby-build-system)
9260 (arguments
9261 '(#:phases
9262 (modify-phases %standard-phases
9263 (replace 'check
9264 (lambda* (#:key tests? #:allow-other-keys)
9265 (when tests?
9266 (invoke "rspec")))))))
9267 (native-inputs
9268 (list ruby-rspec))
9269 (synopsis "Minitest/RSpec parallel test runner for CI environments")
9270 (description "The test-queue module is a parallel test runner,
9271built using a centralized queue to ensure optimal distribution of
9272tests between workers. It is specifically optimized for Continuous
9273Integration (CI) environments: build statistics from each run are
9274stored locally and used to sort the queue at the beginning of the next
9275run.")
9276 (home-page "https://github.com/tmm1/test-queue")
9277 (license license:expat)))
9278
9279(define-public ruby-rubocop
9280 (package
9281 (name "ruby-rubocop")
9282 ;; XXX: Also update ruby-rubocop/minimal in ruby-build.scm.
9283 (version "1.68.0")
9284 (source
9285 (origin
9286 (method git-fetch) ;no tests in distributed gem
9287 (uri (git-reference
9288 (url "https://github.com/rubocop/rubocop")
9289 (commit (string-append "v" version))))
9290 (file-name (git-file-name name version))
9291 (sha256
9292 (base32
9293 "0pfsrgkg2dhb6a2rknciqskgxgmb9kf48rvbkhay9n8n6m712v2w"))))
9294 (build-system ruby-build-system)
9295 (arguments
9296 `(#:test-target "default"
9297 ;; TODO: Figure out why test hangs.
9298 #:tests? ,(not (or (%current-target-system)
9299 (target-riscv64?)))
9300 #:phases
9301 (modify-phases %standard-phases
9302 (add-after 'unpack 'loosen-dependencies
9303 (lambda _
9304 (substitute* "rubocop.gemspec"
9305 (("'unicode\\-display\\_width'.*") "'unicode-display_width')\n"))))
9306 (add-before 'check 'set-home
9307 (lambda _
9308 (setenv "HOME" (getcwd))))
9309 ;; Rubocop depends on itself for tests, directly and indirectly. By
9310 ;; regenerating the TODO list we test rubocop against itself and
9311 ;; forgo adjusting the test suite to our environment each release.
9312 (replace 'check
9313 (lambda* (#:key tests? #:allow-other-keys)
9314 (when tests?
9315 (make-file-writable ".rubocop_todo.yml")
9316 (invoke "./exe/rubocop" "--auto-gen-config")))))))
9317 (native-inputs
9318 (list ruby-pry
9319 ruby-rake
9320 ruby-rspec
9321 ruby-rubocop-ast
9322 ruby-rubocop-capybara-minimal
9323 ruby-rubocop-factory-bot
9324 ruby-rubocop/minimal
9325 ruby-rubocop-performance-minimal
9326 ruby-rubocop-rake-minimal
9327 ruby-rubocop-rspec-minimal
9328 ruby-simplecov
9329 ruby-stackprof
9330 ruby-test-queue
9331 ruby-webmock
9332 ruby-yard))
9333 (propagated-inputs
9334 (list ruby-json
9335 ruby-language-server-protocol
9336 ruby-parallel
9337 ruby-parser
9338 ruby-progressbar
9339 ruby-rainbow
9340 ruby-regexp-parser
9341 ruby-rexml
9342 ruby-rubocop-ast
9343 ruby-unicode-display-width))
9344 (synopsis "Ruby code style checking tool")
9345 (description
9346 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
9347the community-driven Ruby Style Guide.")
9348 (home-page "https://github.com/rubocop/rubocop")
9349 (license license:expat)))
9350
9351(define-public ruby-contest
9352 (package
9353 (name "ruby-contest")
9354 (version "0.1.3")
9355 (source
9356 (origin
9357 (method url-fetch)
9358 (uri (rubygems-uri "contest" version))
9359 (sha256
9360 (base32
9361 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
9362 (build-system ruby-build-system)
9363 (synopsis "Write declarative tests using nested contexts")
9364 (description
9365 "Contest allows writing declarative @code{Test::Unit} tests using nested
9366contexts without performance penalties.")
9367 (home-page "https://github.com/citrusbyte/contest")
9368 (license license:expat)))
9369
9370(define-public ruby-creole
9371 (package
9372 (name "ruby-creole")
9373 (version "0.5.0")
9374 (source
9375 (origin
9376 (method url-fetch)
9377 (uri (rubygems-uri "creole" version))
9378 (sha256
9379 (base32
9380 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
9381 (build-system ruby-build-system)
9382 (native-inputs
9383 (list ruby-bacon))
9384 (synopsis "Creole markup language converter")
9385 (description
9386 "Creole is a lightweight markup language and this library for converting
9387creole to @code{HTML}.")
9388 (home-page "https://github.com/minad/creole")
9389 (license license:ruby)))
9390
9391(define-public ruby-middleware
9392 (package
9393 (name "ruby-middleware")
9394 (version "0.1.0")
9395 (source
9396 (origin
9397 (method url-fetch)
9398 (uri (rubygems-uri "middleware" version))
9399 (sha256
9400 (base32
9401 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
9402 (build-system ruby-build-system)
9403 (arguments '(#:tests? #f)) ;no test suite
9404 (synopsis "Implementation of a middleware abstraction for Ruby")
9405 (description "Middleware is a generalized implementation of a middleware
9406abstraction for Ruby.")
9407 (home-page "https://github.com/mitchellh/middleware")
9408 (license license:expat)))
9409
9410(define-public ruby-benchmark-ips
9411 (package
9412 (name "ruby-benchmark-ips")
9413 (version "2.12.0")
9414 (source
9415 (origin
9416 (method git-fetch) ;no tests in distributed gem
9417 (uri (git-reference
9418 (url "https://github.com/evanphx/benchmark-ips")
9419 (commit (string-append "v" version))))
9420 (file-name (git-file-name name version))
9421 (sha256
9422 (base32
9423 "19pa2a1lgjzrxcz6vxwfiq5qq337vr15bbbpc2mfwzljdlx5059s"))))
9424 (build-system ruby-build-system)
9425 (arguments
9426 (list
9427 #:phases
9428 #~(modify-phases %standard-phases
9429 (add-after 'unpack 'patch
9430 (lambda _
9431 (substitute* "Gemfile"
9432 (("gem 'rake'.*")
9433 "gem 'rake'"))
9434 (substitute* "benchmark-ips.gemspec"
9435 (("git ls-files -- examples lib")
9436 "find examples lib -type f | sort")))))))
9437 (native-inputs
9438 (list ruby-hoe))
9439 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
9440 (description "Benchmark-ips enhances the Ruby Benchmark module with the
9441iterations per second count. For short snippets of code, it can automatically
9442figure out how many times to run the code to get interesting data.")
9443 (home-page "https://github.com/evanphx/benchmark-ips")
9444 (license license:expat)))
9445
9446(define-public ruby-ffi-rzmq-core
9447 (package
9448 (name "ruby-ffi-rzmq-core")
9449 (version "1.0.7")
9450 (source
9451 (origin
9452 (method url-fetch)
9453 (uri (rubygems-uri "ffi-rzmq-core" version))
9454 (sha256
9455 (base32
9456 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
9457 (build-system ruby-build-system)
9458 (arguments
9459 `(#:phases
9460 (modify-phases %standard-phases
9461 (add-after 'unpack 'patch-libzmq-search-path
9462 (lambda* (#:key inputs #:allow-other-keys)
9463 (let ((zeromq (assoc-ref inputs "zeromq")))
9464 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
9465 (("/usr/local/lib")
9466 (string-append zeromq "/lib"))))))
9467 (replace 'check
9468 (lambda _
9469 (invoke "rspec"))))))
9470 (native-inputs
9471 (list ruby-rspec))
9472 (inputs
9473 (list zeromq))
9474 (propagated-inputs (list ruby-ffi))
9475 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
9476 (description "This library only provides the FFI wrapper for the ZeroMQ
9477networking library. It can be used to implement a Ruby API for the ZeroMQ
9478library.")
9479 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
9480 (license license:expat)))
9481
9482(define-public ruby-ffi-rzmq
9483 (package
9484 (name "ruby-ffi-rzmq")
9485 (version "2.0.7")
9486 (source
9487 (origin
9488 (method url-fetch)
9489 (uri (rubygems-uri "ffi-rzmq" version))
9490 (sha256
9491 (base32
9492 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
9493 (build-system ruby-build-system)
9494 (arguments '(#:phases (modify-phases %standard-phases
9495 (replace 'check
9496 (lambda* (#:key tests? #:allow-other-keys)
9497 (when tests?
9498 (invoke "rspec")))))))
9499 (native-inputs
9500 (list ruby-rspec))
9501 (propagated-inputs
9502 (list ruby-ffi-rzmq-core))
9503 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
9504 (description "This library provides a high-level API that wraps the ZeroMQ
9505networking library using the Ruby foreign function interface (FFI). It is a
9506pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
9507for FFI.")
9508 (home-page "https://github.com/chuckremes/ffi-rzmq")
9509 (license license:expat)))
9510
9511(define-public ruby-sawyer
9512 (package
9513 (name "ruby-sawyer")
9514 (version "0.9.2")
9515 (source
9516 (origin
9517 (method url-fetch)
9518 (uri (rubygems-uri "sawyer" version))
9519 (sha256
9520 (base32
9521 "1jks1qjbmqm8f9kvwa81vqj39avaj9wdnzc531xm29a55bb74fps"))))
9522 (build-system ruby-build-system)
9523 (propagated-inputs
9524 (list ruby-addressable ruby-faraday))
9525 (synopsis "Experimental hypermedia agent for Ruby")
9526 (description "Sawyer is an experimental hypermedia agent for Ruby built on
9527top of Faraday.")
9528 (home-page "https://github.com/lostisland/sawyer")
9529 (license license:expat)))
9530
9531(define-public ruby-octokit
9532 (package
9533 (name "ruby-octokit")
9534 (version "6.1.1")
9535 (source (origin
9536 (method git-fetch)
9537 (uri (git-reference
9538 (url "https://github.com/octokit/octokit.rb")
9539 (commit (string-append "v" version))))
9540 (file-name (git-file-name name version))
9541 (sha256
9542 (base32
9543 "02bcmh0b0v80cis1l80lhzxw8adb69xkz6qgg4m7qcmj3y5arwmk"))))
9544 (build-system ruby-build-system)
9545 (arguments
9546 (list
9547 #:phases
9548 #~(modify-phases %standard-phases
9549 (add-after 'unpack 'remove-unnecessary-dependencies
9550 (lambda _
9551 (substitute* "spec/spec_helper.rb"
9552 (("require 'pry-byebug'") "")))))))
9553 (native-inputs
9554 (list ruby-faraday-multipart
9555 ruby-jwt
9556 ruby-mime-types
9557 ruby-multi-json
9558 ruby-netrc
9559 ruby-rbnacl
9560 ruby-rspec
9561 ruby-simplecov
9562 ruby-webmock
9563 ruby-vcr-expat))
9564 (propagated-inputs (list ruby-faraday ruby-sawyer))
9565 (synopsis "Ruby toolkit for the GitHub API")
9566 (description "Octokit wraps the GitHub API in a flat API client that
9567follows Ruby conventions and requires little knowledge of REST.")
9568 (home-page "https://github.com/octokit/octokit.rb")
9569 (license license:expat)))
9570
9571(define-public ruby-hashicorp-checkpoint
9572 (package
9573 (name "ruby-hashicorp-checkpoint")
9574 (version "0.1.5")
9575 (source (origin
9576 (method url-fetch)
9577 (uri (rubygems-uri "hashicorp-checkpoint" version))
9578 (sha256
9579 (base32
9580 "1z6mwzvd7p2wqhmk07dwrhvm0ncgqm7pxn0pr2k025rwsspp9bsd"))))
9581 (build-system ruby-build-system)
9582 (arguments
9583 (list #:tests? #f)) ;; no need to test, useless outside HashiCorp anyway
9584 (synopsis "Internal HashiCorp service to check version information")
9585 (description "This package is probably useless outside of internal
9586HashiCorp use. It is open source for disclosure and because HashiCorp's open
9587source projects must be able to link to it.")
9588 (home-page "https://github.com/hashicorp/ruby-checkpoint")
9589 (license license:mpl2.0)))
9590
9591(define-public ruby-vagrant-cloud
9592 (package
9593 (name "ruby-vagrant-cloud")
9594 (version "3.1.3")
9595 (source (origin
9596 (method git-fetch)
9597 (uri (git-reference
9598 (url "https://github.com/hashicorp/vagrant_cloud")
9599 (commit (string-append "v" version))))
9600 (file-name (git-file-name name version))
9601 (sha256
9602 (base32
9603 "06hlijj4b1z5ki8l4hsjwmjwccs5qbf6h6bjrd22n1x71l3jnm4i"))))
9604 (build-system ruby-build-system)
9605 (arguments
9606 (list
9607 #:test-target "spec"
9608 #:phases
9609 #~(modify-phases %standard-phases
9610 (add-after 'extract-gemspec 'relax-requirements
9611 (lambda _
9612 (substitute* "vagrant_cloud.gemspec"
9613 (("dependency 'rexml', .*")
9614 "dependency 'rexml'\n")))))))
9615 (native-inputs (list ruby-rspec ruby-webmock))
9616 (propagated-inputs (list ruby-excon ruby-log4r ruby-oauth2 ruby-rexml))
9617 (synopsis "Vagrant Cloud API library")
9618 (description "This library provides the functionality to create, modify,
9619and delete boxes, versions, and providers on HashiCorp's Vagrant Cloud.")
9620 (home-page "https://github.com/hashicorp/vagrant_cloud")
9621 (license license:asl2.0)))
9622
9623(define-public ruby-libvirt
9624 (package
9625 (name "ruby-libvirt")
9626 (version "0.8.2")
9627 (source (origin
9628 (method url-fetch)
9629 (uri (rubygems-uri "ruby-libvirt" version))
9630 (sha256
9631 (base32
9632 "0v6vj5vs9v01zr00bflqpfczhwcyc6jdf8k2dqn42lq6d87si77d"))))
9633 (build-system ruby-build-system)
9634 (arguments
9635 (list
9636 #:tests? #f)) ; tests require access to libvirt socket
9637 (native-inputs (list pkg-config))
9638 (inputs (list libvirt))
9639 (synopsis "Ruby bindings for libvirt")
9640 (description "This package provides Ruby language binding for libvirt's
9641native C API.")
9642 (home-page "https://ruby.libvirt.org/")
9643 (license license:lgpl2.1+)))
9644
9645(define-public ruby-fog-core
9646 (package
9647 (name "ruby-fog-core")
9648 (version "2.6.0")
9649 (source (origin
9650 (method git-fetch) ; for tests
9651 (uri (git-reference
9652 (url "https://github.com/fog/fog-core")
9653 (commit (string-append "v" version))))
9654 (file-name (git-file-name name version))
9655 (sha256
9656 (base32
9657 "1k1xivzgmzqk6svaxsgznyvy5911gvsc2rjrc3jm67057wnx9w8c"))))
9658 (build-system ruby-build-system)
9659 (arguments
9660 (list
9661 #:phases
9662 #~(modify-phases %standard-phases
9663 (add-before 'check 'set-home
9664 (lambda _
9665 (setenv "HOME" "/tmp"))))))
9666 (native-inputs (list ruby-minitest-stub-const))
9667 (propagated-inputs (list ruby-builder ruby-excon ruby-formatador
9668 ruby-mime-types))
9669 (synopsis "Shared classes and tests for fog providers and services")
9670 (description "@code{fog} is a Ruby cloud services library. This package
9671provides shared classes and tests for @code{fog} providers and services.")
9672 (home-page "https://github.com/fog/fog-core")
9673 (license license:expat)))
9674
9675(define-public ruby-fog-json
9676 (package
9677 (name "ruby-fog-json")
9678 (version "1.2.0")
9679 (source (origin
9680 (method git-fetch) ; for tests
9681 (uri (git-reference
9682 (url "https://github.com/fog/fog-json")
9683 (commit (string-append "v" version))))
9684 (file-name (git-file-name name version))
9685 (sha256
9686 (base32
9687 "0f4hbmhy22b1gbkzd3pnj5xvljp6bl7inc2y4fxh29nrmcn4pgb0"))))
9688 (build-system ruby-build-system)
9689 (native-inputs (list ruby-minitest))
9690 (propagated-inputs (list ruby-fog-core ruby-multi-json))
9691 (synopsis "JSON parsing tools used by @code{fog} providers")
9692 (description "This package containse the JSON parsing tools shared between
9693a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9694services library.")
9695 (home-page "https://github.com/fog/fog-json")
9696 (license license:expat)))
9697
9698(define-public ruby-fog-xml
9699 (package
9700 (name "ruby-fog-xml")
9701 (version "0.1.5")
9702 (source (origin
9703 (method git-fetch) ; for tests
9704 (uri (git-reference
9705 (url "https://github.com/fog/fog-xml")
9706 (commit (string-append "v" version))))
9707 (file-name (git-file-name name version))
9708 (sha256
9709 (base32
9710 "1v896k9j44axhgvwjvk1j0amy27a9fm6ynv656fxqa1m2wib6dzh"))))
9711 (build-system ruby-build-system)
9712 (arguments
9713 (list
9714 #:phases
9715 #~(modify-phases %standard-phases
9716 (add-after 'unpack 'sanitize-dependencies
9717 (lambda _
9718 (substitute* "fog-xml.gemspec"
9719 ((".*coveralls.*") ""))))
9720 ;; Run tests via bundler so rake picks up the minitest gem from
9721 ;; native-inputs, not the one installed otherwise. This is required
9722 ;; since [email protected] needs minitest@4 and can not be upgraded to
9723 ;; minitest@5.
9724 (replace 'check
9725 (lambda* (#:key tests? #:allow-other-keys)
9726 (when tests?
9727 (invoke "bundle" "exec" "rake")))))))
9728 (native-inputs (list ruby-minitest ruby-pry ruby-coveralls))
9729 (propagated-inputs (list ruby-fog-core ruby-nokogiri))
9730 (synopsis "XML parsing tools used by @code{fog} providers")
9731 (description "This package containse the XML parsing tools shared between
9732a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9733services library.")
9734 (home-page "https://github.com/fog/fog-xml")
9735 (license license:expat)))
9736
9737(define-public ruby-fog-libvirt
9738 (package
9739 (name "ruby-fog-libvirt")
9740 (version "0.15.0")
9741 (source (origin
9742 (method git-fetch) ; for tests
9743 (uri (git-reference
9744 (url "https://github.com/fog/fog-libvirt")
9745 (commit (string-append "v" version))))
9746 (file-name (git-file-name name version))
9747 (sha256
9748 (base32
9749 "1ljv08gg78sgg17wmpg4zv9aabwv1zh754q7i2a2mi1wc0y3z1z8"))))
9750 (build-system ruby-build-system)
9751 (native-inputs (list ruby-minitest-stub-const ruby-mocha ruby-net-ssh
9752 ruby-netrc ruby-octokit ruby-pry ruby-rubocop
9753 ruby-shindo ruby-simplecov ruby-yard ))
9754 (propagated-inputs (list ruby-fog-core ruby-fog-json ruby-fog-xml
9755 ruby-json ruby-libvirt))
9756 (synopsis "Ruby libvirt provider, either standalone or as a module for
9757@code{fog}")
9758 (description "This library can be used as a module for @code{fog} or as
9759standalone libvirt provider. @code{fog} is a Ruby cloud services library.")
9760 (home-page "https://github.com/fog/fog-libvirt")
9761 (license license:expat)))
9762
9763(define-public ruby-pry-byebug
9764 (package
9765 (name "ruby-pry-byebug")
9766 (version "3.11.0")
9767 (source
9768 (origin
9769 (method git-fetch)
9770 (uri (git-reference
9771 (url "https://github.com/deivid-rodriguez/pry-byebug")
9772 (commit (string-append "v" version))))
9773 (file-name (git-file-name name version))
9774 (sha256
9775 (base32
9776 "15vv1lii895bq6bj7j69vh5dcjfaq1dsrk6dy4p40rwzrzdid6nb"))))
9777 (build-system ruby-build-system)
9778 (arguments
9779 `(#:phases (modify-phases %standard-phases
9780 (add-after 'unpack 'sanitize-dependencies
9781 (lambda _
9782 (substitute* "Rakefile"
9783 ((".*chandler/tasks.*") ""))))
9784 (add-before 'check 'set-home
9785 (lambda _
9786 (setenv "HOME" (getcwd)))))))
9787 (native-inputs (list ruby-rubocop ruby-simplecov))
9788 (propagated-inputs (list ruby-byebug ruby-pry))
9789 (synopsis "Step-by-step debugging and stack navigation in Pry")
9790 (description "This package adds step-by-step debugging and stack
9791navigation capabilities to @code{pry}, using @code{byebug}.")
9792 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
9793 (license license:expat)))
9794
9795(define-public ruby-stackprof
9796 (let ((commit "5d832832e4afcb88521292d6dfad4a9af760ef7c")
9797 (revision "0"))
9798 (package
9799 (name "ruby-stackprof")
9800 (version (git-version "0.2.27" revision commit))
9801 (source
9802 (origin
9803 (method git-fetch)
9804 (uri (git-reference
9805 (url "https://github.com/tmm1/stackprof")
9806 (commit commit)))
9807 (file-name (git-file-name name version))
9808 (sha256
9809 (base32 "184n5lpsclrw5ypcskk3gxbg28acxr5jkjaxlxc3nl4jzsjrammw"))))
9810 (build-system ruby-build-system)
9811 (arguments
9812 (list
9813 #:phases
9814 #~(modify-phases %standard-phases
9815 (add-before 'check 'patch-gemspec
9816 (lambda _
9817 (substitute* "stackprof.gemspec"
9818 (("rake-compiler.*")
9819 "rake-compiler', [\"> 0.9\"]\n"))))
9820 (add-before 'check 'skip-dubious-test
9821 (lambda _
9822 (substitute* "test/test_stackprof.rb"
9823 ;; This unreliable test can fail with "Expected 0 to be >= 1."
9824 (("def test_(cputime)" _ name)
9825 (string-append "def skip_" name))
9826 ;; This test often fails
9827 (("def test_gc") "def skip_test_gc")
9828 ;; This test is known to fail on 32-bit systems.
9829 ;; /gnu/store/...-stackprof-0.2.27.gem
9830 (("def test_raw") "def skip_test_raw"))))
9831 (add-before 'check 'build-tests
9832 (lambda _
9833 (invoke "rake" "compile")))
9834 (replace 'check
9835 (lambda* (#:key tests? #:allow-other-keys)
9836 (when tests?
9837 (invoke "bundle" "exec" "rake" "default")))))))
9838 (native-inputs
9839 (list bundler ruby-minitest ruby-rake-compiler))
9840 (synopsis "Sampling profiler for Ruby code")
9841 (description
9842 "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
9843wallclock and object allocation samplers.")
9844 (home-page "https://github.com/tmm1/stackprof")
9845 (license license:expat))))
9846
9847(define-public ruby-bindex
9848 (package
9849 (name "ruby-bindex")
9850 (version "0.8.1")
9851 (source
9852 (origin
9853 (method url-fetch)
9854 (uri (rubygems-uri "bindex" version))
9855 (sha256
9856 (base32 "0zmirr3m02p52bzq4xgksq4pn8j641rx5d4czk68pv9rqnfwq7kv"))))
9857 (build-system ruby-build-system)
9858 (arguments
9859 (list #:test-target "default"
9860 #:phases
9861 #~(modify-phases %standard-phases
9862 (add-after 'unpack 'avoid-bundler
9863 (lambda _
9864 (substitute* "Rakefile"
9865 (("^Bundler::.*") ""))))
9866 (add-after 'unpack 'patch-minitest
9867 (lambda _
9868 (substitute* "test/test_helper.rb"
9869 (("MiniTest")
9870 "Minitest")))))))
9871 (native-inputs (list bundler ruby-rake-compiler))
9872 (synopsis "Bindings for Ruby exceptions")
9873 (description
9874 "This package provides bindings for any kind of Ruby exceptions.")
9875 (home-page "https://github.com/gsamokovarov/bindex")
9876 (license license:expat)))
9877
9878(define-public ruby-binding-of-caller
9879 (package
9880 (name "ruby-binding-of-caller")
9881 (version "0.8.0")
9882 (source
9883 (origin
9884 (method url-fetch)
9885 (uri (rubygems-uri "binding_of_caller" version))
9886 (sha256
9887 (base32
9888 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
9889 (build-system ruby-build-system)
9890 ;; Attempting to run the test suite fails with a rake deprecation error
9891 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
9892 (arguments '(#:tests? #f))
9893 (propagated-inputs
9894 (list ruby-debug-inspector))
9895 (synopsis "Retrieve the binding of a method's caller")
9896 (description "The @code{binding_of_caller} module provides the
9897@code{Binding#of_caller} method. It allows accessing bindings from upper
9898frames in the call stack and can evaluate code in that context.")
9899 (home-page "https://github.com/banister/binding_of_caller")
9900 (license license:expat)))
9901
9902(define-public ruby-pry-stack-explorer
9903 (package
9904 (name "ruby-pry-stack-explorer")
9905 (version "0.5.1")
9906 (source
9907 (origin
9908 (method url-fetch)
9909 (uri (rubygems-uri "pry-stack_explorer" version))
9910 (sha256
9911 (base32
9912 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
9913 (build-system ruby-build-system)
9914 (arguments '(#:tests? #f)) ;no test suite in gem release
9915 (propagated-inputs
9916 (list ruby-binding-of-caller ruby-pry))
9917 (synopsis "Call-stack navigation plugin for the Pry REPL")
9918 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
9919add support to navigate the call-stack.")
9920 (home-page "https://github.com/pry/pry-stack_explorer")
9921 (license license:expat)))
9922
9923(define-public ruby-varint
9924 (package
9925 (name "ruby-varint")
9926 (version "0.1.1")
9927 (source
9928 (origin
9929 (method url-fetch)
9930 (uri (rubygems-uri "varint" version))
9931 (sha256
9932 (base32
9933 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
9934 (build-system ruby-build-system)
9935 (arguments '(#:tests? #f)) ;no test suite
9936 (synopsis "Variable length integers (varint) C extension for Ruby")
9937 (description "This package provides a small C extension to speed up
9938variable length integers (varint) in Ruby Protocol Buffers.")
9939 (home-page "https://github.com/liquidm/varint")
9940 (license license:bsd-3)))
9941
9942(define-public ruby-version-gem
9943 (package
9944 (name "ruby-version-gem")
9945 (version "1.1.8")
9946 (source (origin
9947 (method git-fetch) ;for tests
9948 (uri (git-reference
9949 (url "https://gitlab.com/oauth-xx/version_gem")
9950 (commit (string-append "v" version))))
9951 (file-name (git-file-name name version))
9952 (sha256
9953 (base32
9954 "1cspiyvixb6q0zyvis5jaa1q35g69jh32m83r8br8hi1yr95fiql"))))
9955 (build-system ruby-build-system)
9956 (arguments
9957 (list
9958 #:phases
9959 #~(modify-phases %standard-phases
9960 (add-before 'build 'drop-signing-key-requirement
9961 (lambda _
9962 (substitute* "version_gem.gemspec"
9963 (("spec.signing_key =.*")
9964 "spec.signing_key = nil")))))))
9965 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
9966 (synopsis "Improved @code{Version} module for Ruby")
9967 (description "VersionGem aims to provide introspection of a @code{Version}
9968module based on a @code{Version::VERSION} constant string while not interfering
9969with gemspec parsing where the @code{VERSION} string is traditionally used.")
9970 (home-page "https://gitlab.com/oauth-xx/version_gem")
9971 (license license:expat)))
9972
9973;;; Note: Do NOT update to a newer version; this is the last commit that is
9974;;; still licensed as free software, the project having switched to the
9975;;; Hippocratic license afterward (see:
9976;;; https://github.com/vcr/vcr/issues/959).
9977(define-public ruby-vcr-expat
9978 (let ((revision "0")
9979 (commit-dont-touch "842b2bf89099dc91f2c643d0d85d1abd54eb7e85")) ;
9980 (package
9981 (name "ruby-vcr-expat")
9982 (version (git-version "5.0.0" revision commit-dont-touch))
9983 (source (origin
9984 (method git-fetch)
9985 (uri (git-reference
9986 (url "https://github.com/vcr/vcr")
9987 (commit commit-dont-touch)))
9988 (file-name (git-file-name name version))
9989 (sha256
9990 (base32
9991 "02mzifd2655kjh35bbry01n66jjcjrsw6ncqlybfkjcaqrw2zalv"))))
9992 (build-system ruby-build-system)
9993 (arguments (list #:tests? #f)) ;avoid all dependencies
9994 (home-page "https://github.com/vcr/vcr")
9995 (synopsis "HTTP interaction recorder [old version]")
9996 (description "Record your test suite's HTTP interactions and replay them
9997during future test runs for fast, deterministic, accurate tests. This is an
9998older version of VCR that is free software under the Expat license. The
9999project later switched to the Hippocratic license, which is non-free.
10000@emph{Do not use it in new free software projects}.")
10001 (license license:expat))))
10002
10003(define-public ruby-ruby-prof
10004 (package
10005 (name "ruby-ruby-prof")
10006 (version "1.7.2")
10007 (source
10008 (origin
10009 (method url-fetch)
10010 (uri (rubygems-uri "ruby-prof" version))
10011 (sha256
10012 (base32
10013 "0h23zjwma8car8jpq7af8gw39qi88rn24mass7r13ripmky28117"))))
10014 (build-system ruby-build-system)
10015 (arguments
10016 ;; FIXME: Investigate why the tests fail on i686-linux.
10017 `(#:tests? ,(not (or (%current-target-system)
10018 (target-x86-32?)))
10019 #:phases
10020 (modify-phases %standard-phases
10021 ;; The LineNumbersTest test fails non-deterministically (see:
10022 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
10023 (add-after 'extract-gemspec 'delete-flaky-test
10024 (lambda _
10025 (delete-file "test/line_number_test.rb")
10026 (delete-file "test/measure_process_time_test.rb")
10027 (substitute* "ruby-prof.gemspec"
10028 (("\"test/line_number_test\\.rb\"\\.freeze, ") "")
10029 (("\"test/measure_process_time_test\\.rb\"\\.freeze, ") ""))))
10030 (add-before 'check 'compile
10031 (lambda _
10032 (invoke "rake" "compile"))))))
10033 (native-inputs (list bundler ruby-minitest ruby-rake-compiler ruby-rdoc))
10034 (propagated-inputs (list ruby-base64))
10035 (synopsis "Fast code profiler for Ruby")
10036 (description "RubyProf is a fast code profiler for Ruby. Its features
10037include:
10038@table @asis
10039@item Speed
10040Being a C extension, it is many times faster than the standard Ruby profiler.
10041@item Measurement Modes
10042It can measure program wall time, process time, object allocations and memory
10043usage.
10044@item Reports
10045A variety of text and cross-referenced HTML reports can be generated.
10046@item Threads
10047Profiling multiple threads simultaneously is supported.
10048@end table")
10049 (home-page "https://github.com/ruby-prof/ruby-prof")
10050 (license license:bsd-2)))
10051
10052(define-public ruby-ruby-memcheck
10053 (package
10054 (name "ruby-ruby-memcheck")
10055 (version "1.3.2")
10056 (source (origin
10057 (method git-fetch)
10058 (uri (git-reference
10059 (url "https://github.com/Shopify/ruby_memcheck")
10060 (commit version)))
10061 (file-name (git-file-name name version))
10062 (sha256
10063 (base32
10064 "0fj4j4d062sw2kx2qlj877gjbj1xbb691njr8x9nbah6615idlni"))))
10065 (build-system ruby-build-system)
10066 (arguments
10067 (list
10068 ;; The tests seem to fail on 32bit x86
10069 #:tests? (not (or (target-x86-32?)
10070 (%current-target-system)))
10071 #:phases
10072 #~(modify-phases %standard-phases
10073 (add-after 'unpack 'patch-valgrind-path
10074 (lambda* (#:key inputs #:allow-other-keys)
10075 (substitute* "lib/ruby_memcheck/configuration.rb"
10076 (("DEFAULT_VALGRIND = \"valgrind\"")
10077 (format #f "DEFAULT_VALGRIND = ~s"
10078 (search-input-file inputs "bin/valgrind"))))))
10079 (add-before 'replace-git-ls-files 'standardize-git-ls-files
10080 (lambda _
10081 (substitute* "ruby_memcheck.gemspec"
10082 (("%x\\(git ls-files -z)")
10083 "`git ls-files -z`")))))))
10084 (native-inputs (list ruby-rake-compiler ruby-rspec))
10085 (inputs (list valgrind/pinned))
10086 (propagated-inputs (list ruby-nokogiri))
10087 (synopsis "Valgrind memcheck tool for Ruby")
10088 (description "The @code{ruby_memcheck} gem provides a sane way to use
10089Valgrind's memcheck on your native extension gem, that filters out all the
10090false positives caused by Ruby not freeing all of the memory it allocates
10091during shutdown.")
10092 (home-page "https://github.com/Shopify/ruby_memcheck")
10093 (license license:expat)))
10094
10095(define-public ruby-memory-profiler
10096 (package
10097 (name "ruby-memory-profiler")
10098 (version "1.1.0")
10099 (source
10100 (origin
10101 (method git-fetch)
10102 (uri (git-reference
10103 (url "https://github.com/SamSaffron/memory_profiler")
10104 (commit (string-append "v" version))))
10105 (file-name (git-file-name name version))
10106 (sha256
10107 (base32
10108 "1g9s8j2d892vb34zcwkxkjh3mywvc4p52ggbfzmgqzrdskf2nja6"))))
10109 (build-system ruby-build-system)
10110 (arguments
10111 (list
10112 #:phases
10113 #~(modify-phases %standard-phases
10114 (add-after 'unpack 'skip-flaky-tests
10115 (lambda _
10116 ;; XXX: These tests check the number of logged lines, which
10117 ;; can change with ruby versions.
10118 (for-each delete-file
10119 (list "test/test_reporter.rb"
10120 "test/test_reporter_public_start_stop.rb"
10121 "test/test_reporter_private_start_stop.rb")))))))
10122 (synopsis "Memory profiling routines for Ruby")
10123 (description
10124 "This package provides memory profiling routines for Ruby.")
10125 (home-page "https://github.com/SamSaffron/memory_profiler")
10126 (license license:expat)))
10127
10128(define-public ruby-gherkin-ruby
10129 (package
10130 (name "ruby-gherkin-ruby")
10131 (version "0.3.2")
10132 (home-page "https://github.com/codegram/gherkin-ruby")
10133 (source (origin
10134 (method url-fetch)
10135 (uri (rubygems-uri "gherkin-ruby" version))
10136 (sha256
10137 (base32
10138 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
10139 (build-system ruby-build-system)
10140 (synopsis "Pure Ruby Gherkin parser")
10141 (description
10142 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
10143200 lines of code.")
10144 ;; XXX: No license information anywhere but Readme.md.
10145 (license license:expat)))
10146
10147(define-public ruby-aruba
10148 (package
10149 (name "ruby-aruba")
10150 (version "2.4.1")
10151 (source (origin
10152 (method git-fetch)
10153 (uri (git-reference
10154 (url "https://github.com/cucumber/aruba")
10155 (commit (string-append "v" version))))
10156 (file-name (git-file-name name version))
10157 (sha256
10158 (base32
10159 "08f1a5am9g03ar80q72qljnb466561hwh0dwqsiqls96d9acxz1a"))))
10160 (build-system ruby-build-system)
10161 (arguments
10162 (list
10163 ;; XXX: Only run the "spec" target and not the "cucumber" one, as it is
10164 ;; slow and has multiple unexplained test failures.
10165 #:test-target "spec"
10166 #:phases
10167 #~(modify-phases %standard-phases
10168 (add-after 'unpack 'patch-paths
10169 (lambda _
10170 ;; This test file relies on a dynamically generated script;
10171 ;; patch its #!/bin/bash shebang.
10172 (substitute* "spec/aruba/api/commands_spec.rb"
10173 (("/bin/bash")
10174 (which "bash")))))
10175 (add-after 'extract-gemspec 'relax-constraints
10176 (lambda _
10177 (substitute* "aruba.gemspec"
10178 (("(spec\\.add_dependency 'irb').*" _ dep)
10179 (string-append dep "\n")))))
10180 (add-before 'check 'relax-requirements
10181 ;; Many development requirements are not actually needed.
10182 (lambda _
10183 (substitute* "aruba.gemspec"
10184 (("(spec.*dependency.*simplecov.*,.*),.*" _ minver) minver)
10185 ((".*appraisal.*") "")
10186 ((".*kramdown.*") "")
10187 ((".*rubocop.*") ""))
10188 (substitute* "Rakefile"
10189 (("Bundler\\.setup") "")
10190 ((".*require.*rubocop/rake_task.*") "")
10191 ((".*RuboCop::RakeTask.new.*") ""))
10192 (substitute* "spec/spec_helper.rb"
10193 (("require 'simplecov'") "")
10194 (("SimpleCov.*") ""))))
10195 ;; The tests rely on the Gem being installed, so move the check
10196 ;; phase after the install phase.
10197 (delete 'check)
10198 (add-after 'install 'check
10199 (assoc-ref %standard-phases 'check))
10200 (add-before 'check 'set-GEM_PATH
10201 (lambda _
10202 (setenv "GEM_PATH" (string-append
10203 (getenv "GEM_PATH") ":"
10204 #$output "/lib/ruby/vendor_ruby"))))
10205 (add-before 'check 'set-home
10206 (lambda _
10207 (setenv "HOME" "/tmp"))))))
10208 (native-inputs
10209 (list ruby-rake-manifest
10210 ruby-rspec))
10211 (propagated-inputs
10212 (list ruby-contracts
10213 ruby-cucumber
10214 ruby-irb
10215 ruby-rspec-expectations
10216 ruby-thor))
10217 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
10218 (description
10219 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
10220command-line applications. It supports applications written in any
10221language.")
10222 (home-page "https://github.com/cucumber/aruba")
10223 (license license:expat)))
10224
10225(define-public ruby-memoist3
10226 (package
10227 (name "ruby-memoist3")
10228 (version "1.0.0")
10229 (source
10230 (origin
10231 (method url-fetch)
10232 (uri (rubygems-uri "memoist3" version))
10233 (sha256
10234 (base32 "0vyma0mpjibqigzl6j9lij7zh3kvqlyi88qc0mia6l7i5i044vk8"))))
10235 (build-system ruby-build-system)
10236 (synopsis "Method calling memoization library for Ruby")
10237 (description "Memoist is a memoization Ruby library for repeated method callings.")
10238 (home-page "https://github.com/honzasterba/memoist")
10239 (license license:expat)))
10240
10241(define-public ruby-sys-uname
10242 (package
10243 (name "ruby-sys-uname")
10244 (version "1.5.1")
10245 (source
10246 (origin
10247 (method url-fetch)
10248 (uri (rubygems-uri "sys-uname" version))
10249 (sha256
10250 (base32
10251 "0yvd71lzd2k46940k9l3l3yyjyxc4j1w6nmyrcjkqfdhj5j7wkbq"))))
10252 (build-system ruby-build-system)
10253 (arguments
10254 (list #:test-target "spec"
10255 #:phases #~(modify-phases %standard-phases
10256 (add-before 'check 'remove-rubocop
10257 (lambda _
10258 (substitute* "Rakefile"
10259 (("require 'rubocop/rake_task'") "")
10260 (("RuboCop::RakeTask\\.new") "")))))))
10261 (propagated-inputs (list ruby-ffi ruby-memoist3))
10262 (native-inputs (list ruby-rspec))
10263 (synopsis "Ruby interface for gathering system information")
10264 (description "The sys-uname library provides an interface for gathering
10265information about your current platform. It allows retrieving information
10266such as the OS name, OS version, system name, etc.")
10267 (home-page "https://github.com/djberg96/sys-uname")
10268 (license license:asl2.0)))
10269
10270(define-public ruby-cucumber
10271 (package
10272 (name "ruby-cucumber")
10273 (version "11.1.1")
10274 (source
10275 (origin
10276 (method git-fetch)
10277 (uri (git-reference
10278 (url "https://github.com/cucumber/cucumber-ruby")
10279 (commit (string-append "v" version))))
10280 (file-name (git-file-name name version))
10281 (sha256
10282 (base32
10283 "0n0fan1nvsd29l2rif66mr03ych97gyjw94xvj9xg3jfis8px4sk"))))
10284 (build-system ruby-build-system)
10285 (arguments
10286 (list #:test-target "spec"
10287 #:phases
10288 #~(modify-phases %standard-phases
10289 (add-after 'unpack 'disable-rubocop
10290 ;; Remove extraneous Lint checks.
10291 (lambda _
10292 (substitute* "Rakefile"
10293 (("require 'rubocop/rake_task'")
10294 "")
10295 (("RuboCop::RakeTask.new")
10296 ""))))
10297 (add-before 'check 'set-home
10298 (lambda _
10299 (setenv "HOME" (getcwd)))))))
10300 (propagated-inputs
10301 (list ruby-base64
10302 ruby-builder
10303 ruby-cucumber-ci-environment
10304 ruby-cucumber-core
10305 ruby-cucumber-expressions
10306 ruby-cucumber-html-formatter
10307 ruby-diff-lcs
10308 ruby-logger
10309 ruby-mini-mime
10310 ruby-multi-test
10311 ruby-sys-uname))
10312 (native-inputs
10313 (list ruby-cucumber-compatibility-kit
10314 ruby-nokogiri
10315 ruby-webrick
10316 ruby-rspec))
10317 (synopsis "Describe automated tests in plain language")
10318 (description "Cucumber is a tool for running automated tests written in
10319plain language. It's designed to support a Behaviour Driven Development (BDD)
10320software development workflow.")
10321 (home-page "https://cucumber.io/")
10322 (license license:expat)))
10323
10324(define-public ruby-cucumber-without-tests
10325 (package (inherit ruby-cucumber)
10326 (arguments
10327 '(#:tests? #f))
10328 (native-inputs
10329 '())
10330 (properties '((hidden? . #t)))))
10331
10332(define-public ruby-covered
10333 (package
10334 (name "ruby-covered")
10335 (version "0.20.2")
10336 (source (origin
10337 (method url-fetch)
10338 (uri (rubygems-uri "covered" version))
10339 (sha256
10340 (base32
10341 "04fpj493jn23ah5fq93956a5h2xj3z0hrckvc26fxcfsg5pbwypa"))))
10342 (build-system ruby-build-system)
10343 (arguments
10344 ;; XXX: The test suite is disabled to avoid dependency cycles with
10345 ;; ruby-samovar, through ruby-bake.
10346 (list #:tests? #f
10347 #:phases
10348 #~(modify-phases %standard-phases
10349 (add-after 'extract-gemspec 'relax-requirements
10350 (lambda _
10351 (substitute* ".gemspec"
10352 (("\">= 3.2\"")
10353 "\">= 2.7\"")))))))
10354 (propagated-inputs (list ruby-console ruby-msgpack))
10355 (synopsis "Modern approach to code coverage in Ruby")
10356 (description "Covered uses modern Ruby features to generate comprehensive
10357coverage, including support for templates which are compiled into Ruby. It
10358has the following features:
10359@itemize
10360@item
10361Incremental coverage -- if you run your full test suite, and the run a subset,
10362it will still report the correct coverage - so you can incrementally work on
10363improving coverage.
10364@item
10365Integration with RSpec, Minitest, Travis & Coveralls - no need to configure
10366anything - out of the box support for these platforms.
10367@item
10368It supports coverage of views -- templates compiled to Ruby code can be
10369tracked for coverage reporting.
10370@end itemize")
10371 (home-page "https://github.com/ioquatix/covered")
10372 (license license:expat)))
10373
10374(define-public ruby-coveralls
10375 (package
10376 (name "ruby-coveralls")
10377 (version "0.8.23")
10378 (source
10379 (origin
10380 (method url-fetch)
10381 (uri (rubygems-uri "coveralls" version))
10382 (sha256
10383 (base32
10384 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
10385 (build-system ruby-build-system)
10386 (arguments
10387 (list #:test-target "default"
10388 #:phases #~(modify-phases %standard-phases
10389 (add-after 'extract-gemspec 'disable-problematic-tests
10390 (lambda _
10391 (substitute* "spec/coveralls/coveralls_spec.rb"
10392 ;; This test fails for unknown reasons (perhaps
10393 ;; networking); skip it.
10394 (("it \"sends existing test results\"" all)
10395 (string-append "x" all)))
10396 ;; 3 simplecov tests fail, perhaps due to using a
10397 ;; newer simplecov version.
10398 (delete-file "spec/coveralls/simplecov_spec.rb")
10399 (substitute* "coveralls-ruby.gemspec"
10400 (("\"spec/coveralls/simplecov_spec.rb\".freeze, ")
10401 ""))))
10402 (add-after 'extract-gemspec 'relax-requirements
10403 (lambda _
10404 (substitute* "coveralls-ruby.gemspec"
10405 (("%q<simplecov>.freeze, \\[\"~> 0.16.1\"]")
10406 "%q<simplecov>.freeze")))))))
10407 (native-inputs
10408 (list git-minimal/pinned
10409 ruby-pry
10410 ruby-rspec
10411 ruby-truthy
10412 ruby-vcr-expat
10413 ruby-webmock))
10414 (propagated-inputs
10415 (list ruby-json
10416 ruby-term-ansicolor
10417 ruby-thor
10418 ruby-tins
10419 ruby-simplecov))
10420 (synopsis "Ruby implementation of the Coveralls API")
10421 (description "This package provides a Ruby implementation of the Coveralls
10422API.")
10423 (home-page "https://coveralls.io")
10424 (license license:expat)))
10425
10426(define-public ruby-skiptrace
10427 (package
10428 (name "ruby-skiptrace")
10429 (version "0.8.1")
10430 (source
10431 (origin
10432 (method url-fetch)
10433 (uri (rubygems-uri "skiptrace" version))
10434 (sha256
10435 (base32
10436 "1qpjy6pqd8hx4w7bai64jsr10mwbpnnb65wcbssyqcnalimi1s12"))))
10437 (build-system ruby-build-system)
10438 (arguments
10439 (list
10440 #:phases
10441 #~(modify-phases %standard-phases
10442 (add-after 'unpack 'remove-git-from-gemspec
10443 (lambda _
10444 (substitute* "skiptrace.gemspec"
10445 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
10446 (add-after 'unpack 'patch-minitest
10447 (lambda _
10448 (substitute* "test/test_helper.rb"
10449 (("MiniTest")
10450 "Minitest"))))
10451 (replace 'check
10452 (lambda* (#:key tests? #:allow-other-keys)
10453 (when tests?
10454 (invoke "bundle" "exec" "rake" "default")))))))
10455 (native-inputs
10456 (list bundler ruby-rake-compiler))
10457 (synopsis "Provides access for bindings relating to Ruby exceptions")
10458 (description
10459 "@code{skiptrace} provides a way to access the bindings that relate to
10460exceptions in Ruby, providing more information about the context in which the
10461exception occurred.")
10462 (home-page "https://github.com/gsamokovarov/skiptrace")
10463 (license license:expat)))
10464
10465(define-public ruby-bio-logger
10466 (package
10467 (name "ruby-bio-logger")
10468 (version "1.0.1")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (rubygems-uri "bio-logger" version))
10473 (sha256
10474 (base32
10475 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
10476 (build-system ruby-build-system)
10477 (arguments
10478 `(#:tests? #f)) ; rake errors, missing shoulda
10479 (propagated-inputs
10480 (list ruby-log4r))
10481 (synopsis "Log4r wrapper for Ruby")
10482 (description "Bio-logger is a wrapper around Log4r adding extra logging
10483features such as filtering and fine grained logging.")
10484 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
10485 (license license:expat)))
10486
10487(define-public ruby-yajl-ruby
10488 (package
10489 (name "ruby-yajl-ruby")
10490 (version "1.4.3")
10491 (source
10492 (origin
10493 (method url-fetch)
10494 (uri (rubygems-uri "yajl-ruby" version))
10495 (sha256
10496 (base32
10497 "1lni4jbyrlph7sz8y49q84pb0sbj82lgwvnjnsiv01xf26f4v5wc"))))
10498 (build-system ruby-build-system)
10499 (arguments
10500 (list
10501 #:test-target "spec"
10502 #:phases
10503 #~(modify-phases %standard-phases
10504 (add-before 'check 'patch-test-to-update-load-path
10505 (lambda _
10506 (substitute* "spec/parsing/large_number_spec.rb"
10507 (("require \"yajl\"")
10508 "$LOAD_PATH << 'lib'; require 'yajl'")))))))
10509 (native-inputs
10510 (list ruby-rake-compiler ruby-rspec))
10511 (synopsis "Streaming JSON parsing and encoding library for Ruby")
10512 (description
10513 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
10514is compatible with the JSON gem, so yajl-ruby can act as a drop in
10515replacement.
10516
10517A modified copy of yajl is used, and included in the package.")
10518 (home-page "https://github.com/brianmario/yajl-ruby")
10519 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
10520 license:bsd-3)))) ; Included, modified copy of yajl
10521
10522(define-public ruby-yard
10523 (package
10524 (name "ruby-yard")
10525 (version "0.9.37")
10526 (source
10527 (origin
10528 (method git-fetch)
10529 ;; Tests do not pass if we build from the distributed gem.
10530 (uri (git-reference
10531 (url "https://github.com/lsegal/yard")
10532 (commit (string-append "v" version))))
10533 (file-name (git-file-name name version))
10534 (sha256
10535 (base32
10536 "04255dmxrkjyw3175d17hlmss66qvcy41jawfkxi3pp3nhlznir8"))))
10537 (build-system ruby-build-system)
10538 (arguments
10539 (list
10540 #:test-target "default"
10541 #:phases
10542 #~(modify-phases %standard-phases
10543 (add-after 'unpack 'do-not-set-date-in-gemspec
10544 ;; Fix a reproducibility issue (see:
10545 ;; https://github.com/lsegal/yard/issues/1343).
10546 (lambda _
10547 (substitute* "yard.gemspec"
10548 ((".*s\\.date.*") ""))))
10549 (add-before 'check 'prepare-for-tests
10550 (lambda* (#:key tests? #:allow-other-keys)
10551 (when tests?
10552 (substitute* "Rakefile"
10553 ((".*[Ss]amus.*") ""))
10554 ;; Delete the Gemfile to avoid errors relating to it.
10555 (delete-file "Gemfile")
10556 ;; $HOME needs to be set to somewhere writeable for tests to
10557 ;; run.
10558 (setenv "HOME" "/tmp")
10559 ;; This test fails
10560 ;; #<File (class)> received :open with unexpected arguments
10561 ;; expected: ("gem1.gem", "rb")
10562 ;; got: ("/gnu/store/.../lib/ruby/vendor_ruby/specifications/asciidoctor-2.0.18.gemspec", "r:UTF-8:-")
10563 (substitute* "spec/cli/diff_spec.rb"
10564 (("it \"searches for .gem file")
10565 "xit \"searches for .gem file"))))))))
10566 (native-inputs
10567 (list ruby-rspec
10568 ruby-rack
10569 ruby-redcloth
10570 ruby-webrick
10571 ruby-asciidoctor/minimal))
10572 (synopsis "Documentation generation tool for Ruby")
10573 (description "YARD is a documentation generation tool for the Ruby
10574programming language. It enables the user to generate consistent, usable
10575documentation that can be exported to a number of formats very easily, and
10576also supports extending for custom Ruby constructs such as custom class level
10577definitions.")
10578 (home-page "https://yardoc.org")
10579 (license license:expat)))
10580
10581(define-public ruby-yard/minimal
10582 (hidden-package
10583 (package
10584 (inherit ruby-yard)
10585 (arguments
10586 (ensure-keyword-arguments
10587 (package-arguments ruby-yard)
10588 (list #:tests? #f)))
10589 (native-inputs '()))))
10590
10591(define-public ruby-spectroscope
10592 (package
10593 (name "ruby-spectroscope")
10594 (version "0.1.0")
10595 (source
10596 (origin
10597 (method url-fetch)
10598 (uri (rubygems-uri "spectroscope" version))
10599 (sha256
10600 (base32
10601 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
10602 (build-system ruby-build-system)
10603 (arguments
10604 `(#:phases
10605 (modify-phases %standard-phases
10606 (replace 'check
10607 (lambda _
10608 (with-output-to-file ".test"
10609 (lambda _
10610 (display
10611 "\
10612require 'ae/should'
10613require 'rspec'
10614
10615include RSpec
10616
10617Test.run :default do |run|
10618 run.files << 'spec/*_spec.rb'
10619end")))
10620 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
10621 (native-inputs
10622 (list ruby-ae ruby-rspec))
10623 (propagated-inputs
10624 (list ruby-rubytest))
10625 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
10626 (description "Spectroscope is a Behavior-Driven Development (BDD)
10627framework built on RubyTest, designed to emulate RSpec in most respects. It
10628is assertion framework independent so any number of assertion systems can be
10629used, such as Assay or AE.")
10630 (home-page "http://rubyworks.github.com/spectroscope/")
10631 (license license:bsd-2)))
10632
10633(define-public ruby-tomparse
10634 (package
10635 (name "ruby-tomparse")
10636 (version "0.4.2")
10637 (source
10638 (origin
10639 (method url-fetch)
10640 (uri (rubygems-uri "tomparse" version))
10641 (sha256
10642 (base32
10643 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
10644 (build-system ruby-build-system)
10645 ;; TODO: Tests require citron and rulebow, not yet packaged.
10646 (arguments '(#:tests? #f))
10647 (synopsis "TomDoc parser for Ruby")
10648 (description "TomParse is a TomDoc parser for Ruby. It takes a code
10649comment as input and parses it into a convenient object-oriented structure in
10650accordance with the TomDoc standard. See
10651@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
10652TomDoc format.")
10653 (home-page "http://rubyworks.github.com/tomparse/")
10654 (license license:bsd-2)))
10655
10656(define-public ruby-yard-tomdoc
10657 (package
10658 (name "ruby-yard-tomdoc")
10659 (version "0.7.1")
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (rubygems-uri "yard-tomdoc" version))
10664 (sha256
10665 (base32
10666 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
10667 (build-system ruby-build-system)
10668 (arguments
10669 `(#:phases (modify-phases %standard-phases
10670 (replace 'check
10671 (lambda _
10672 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
10673 (native-inputs
10674 (list ruby-rubytest-cli ruby-spectroscope ruby-ae))
10675 (propagated-inputs
10676 (list ruby-tomparse ruby-yard))
10677 (synopsis "TomDoc syntax for YARD")
10678 (description "This module adds support for the TomDoc documentation format
10679to YARD, a documentation generation tool for Ruby.")
10680 (home-page "http://rubyworks.github.com/yard-tomdoc/")
10681 (license license:expat)))
10682
10683(define-public ruby-clap
10684 (package
10685 (name "ruby-clap")
10686 (version "1.0.0")
10687 (source (origin
10688 (method url-fetch)
10689 (uri (rubygems-uri "clap" version))
10690 (sha256
10691 (base32
10692 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
10693 (build-system ruby-build-system)
10694 ;; Clap needs cutest for running tests, but cutest needs clap.
10695 (arguments `(#:tests? #f))
10696 (synopsis "Command line argument parsing for simple applications")
10697 (description
10698 "Clap provides command line argument parsing features. It covers the
10699simple case of executing code based on the flags or parameters passed.")
10700 (home-page "https://github.com/djanowski/cutest")
10701 (license license:expat)))
10702
10703(define-public ruby-cutest
10704 (package
10705 (name "ruby-cutest")
10706 (version "1.2.2")
10707 (source (origin
10708 (method url-fetch)
10709 (uri (rubygems-uri "cutest" version))
10710 (sha256
10711 (base32
10712 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
10713 (build-system ruby-build-system)
10714 (propagated-inputs
10715 (list ruby-clap))
10716 (synopsis "Run tests in separate processes")
10717 (description
10718 "Cutest runs tests in separate processes to avoid shared state.")
10719 (home-page "https://github.com/djanowski/cutest")
10720 (license license:expat)))
10721
10722(define-public ruby-pygmentize
10723 (package
10724 (name "ruby-pygmentize")
10725 (version "0.0.3")
10726 (source (origin
10727 (method url-fetch)
10728 (uri (rubygems-uri "pygmentize" version))
10729 (sha256
10730 (base32
10731 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
10732 (build-system ruby-build-system)
10733 (arguments
10734 `(#:phases
10735 (modify-phases %standard-phases
10736 (add-after 'unpack 'fix-pygmentize-path
10737 (lambda _
10738 (substitute* "lib/pygmentize.rb"
10739 (("\"/usr/bin/env python.*")
10740 (string-append "\"" (which "pygmentize") "\"\n")))))
10741 (add-after 'build 'do-not-use-vendor-directory
10742 (lambda _
10743 ;; Remove bundled pygments sources
10744 ;; FIXME: ruby-build-system does not support snippets.
10745 (delete-file-recursively "vendor")
10746 (substitute* "pygmentize.gemspec"
10747 (("\"vendor/\\*\\*/\\*\",") "")))))))
10748 (inputs
10749 `(("pygments" ,python-pygments)))
10750 (native-inputs
10751 (list ruby-cutest ruby-nokogiri))
10752 (synopsis "Thin Ruby wrapper around pygmentize")
10753 (description
10754 "Pygmentize provides a simple way to call pygmentize from within a Ruby
10755application.")
10756 (home-page "https://github.com/djanowski/pygmentize")
10757 (license license:expat)))
10758
10759(define-public ruby-event-emitter
10760 (package
10761 (name "ruby-event-emitter")
10762 (version "0.2.6")
10763 (source (origin
10764 (method url-fetch)
10765 (uri (rubygems-uri "event_emitter" version))
10766 (sha256
10767 (base32
10768 "148k9qv8102l3m6klc24dwip79f9y4bjr5z19dckd7ffbjyrf9n7"))))
10769 (build-system ruby-build-system)
10770 (arguments
10771 (list #:phases #~(modify-phases %standard-phases
10772 (add-after 'unpack 'patch-minitest
10773 (lambda _
10774 (substitute* (find-files "test" "\\.rb$")
10775 (("MiniTest")
10776 "Minitest"))))
10777 (add-after 'extract-gemspec 'relax-requirements
10778 (lambda _
10779 (substitute* "event_emitter.gemspec"
10780 (("~> 1.15") ">= 1.15")))))))
10781 (synopsis "Ruby port of EventEmitter from Node.js")
10782 (description
10783 "This package provides a Ruby port of EventEmitter from Node.js.")
10784 (home-page "https://shokai.github.io/event_emitter/")
10785 (license license:expat)))
10786
10787(define-public ruby-eventmachine
10788 (package
10789 (name "ruby-eventmachine")
10790 (version "1.2.7")
10791 (source
10792 (origin
10793 (method url-fetch)
10794 (uri (rubygems-uri "eventmachine" version))
10795 (sha256
10796 (base32
10797 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
10798 (build-system ruby-build-system)
10799 (arguments
10800 '(#:tests? #f)) ; test suite tries to connect to google.com
10801 (inputs
10802 (list openssl))
10803 (native-inputs
10804 (list ruby-rake-compiler))
10805 (synopsis "Single-threaded network event framework for Ruby")
10806 (description
10807 "EventMachine implements a single-threaded engine for arbitrary network
10808communications. EventMachine wraps all interactions with sockets, allowing
10809programs to concentrate on the implementation of network protocols. It can be
10810used to create both network servers and clients.")
10811 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
10812 (home-page "https://github.com/eventmachine/eventmachine")
10813 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
10814
10815(define-public ruby-ruby-engine
10816 (package
10817 (name "ruby-ruby-engine")
10818 (version "2.0.3")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (rubygems-uri "ruby_engine" version))
10823 (sha256
10824 (base32 "1ala4zx6gdq271n2bh2x4h1v9j2rbmnx71m1nszw5kfgz3gffana"))))
10825 (build-system ruby-build-system)
10826 (arguments
10827 `(#:phases
10828 (modify-phases %standard-phases
10829 (add-after 'extract-gemspec 'clean-up
10830 (lambda _
10831 (delete-file "Gemfile.lock")
10832 (substitute* "ruby_engine.gemspec"
10833 ;; Remove unnecessary imports that would entail further
10834 ;; dependencies.
10835 ((".*<rdoc.*") "")
10836 ((".*<rubygems-tasks.*") "")
10837 (("\"Gemfile.lock\".freeze, ") "")
10838 ;; Soften rake/rspec dependencies
10839 (("%q<(rake|rspec)>.freeze, \\[\"~> .*\"\\.freeze\\]" all dep)
10840 (format #f "~s" dep)))
10841 (substitute* "Rakefile"
10842 (("require 'rubygems/tasks'") "")
10843 (("Gem::Tasks.new") "")))))))
10844 (native-inputs
10845 (list bundler ruby-rake ruby-rspec))
10846 (synopsis "Simplifies checking for Ruby implementation")
10847 (description
10848 "@code{ruby_engine} provides an RubyEngine class that can be used to
10849check which implementation of Ruby is in use. It can provide the interpreter
10850name and provides query methods such as @code{RubyEngine.mri?}.")
10851 (home-page "https://github.com/janlelis/ruby_engine")
10852 (license license:expat)))
10853
10854(define-public ruby-mimemagic
10855 (package
10856 (name "ruby-mimemagic")
10857 (version "0.3.3")
10858 (source
10859 (origin
10860 (method url-fetch)
10861 (uri (rubygems-uri "mimemagic" version))
10862 (sha256
10863 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
10864 (build-system ruby-build-system)
10865 (arguments
10866 '(#:phases
10867 (modify-phases %standard-phases
10868 ;; This phase breaks the tests, as it patches some of the test data.
10869 (delete 'patch-source-shebangs))))
10870 (native-inputs
10871 (list ruby-bacon))
10872 (synopsis "Ruby library for MIME detection by extension or content")
10873 (description
10874 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
10875extension or content, using the freedesktop.org.xml shared-mime-info
10876database.")
10877 (home-page "https://github.com/minad/mimemagic")
10878 (license license:expat)))
10879
10880(define-public ruby-mini-mime
10881 (package
10882 (name "ruby-mini-mime")
10883 (version "1.1.2")
10884 (source
10885 (origin
10886 (method url-fetch)
10887 (uri (rubygems-uri "mini_mime" version))
10888 (sha256
10889 (base32
10890 "0lbim375gw2dk6383qirz13hgdmxlan0vc5da2l072j3qw6fqjm5"))))
10891 (build-system ruby-build-system)
10892 (synopsis "Lightweight mime type lookup toy")
10893 (description "This package provides a lightweight mime type lookup toy.")
10894 (home-page "https://github.com/discourse/mini_mime")
10895 (license license:expat)))
10896
10897(define-public ruby-fileutils
10898 (package
10899 (name "ruby-fileutils")
10900 (version "1.7.0")
10901 (source (origin
10902 (method git-fetch) ;for tests
10903 (uri (git-reference
10904 (url "https://github.com/ruby/fileutils")
10905 (commit (string-append "v" version))))
10906 (file-name (git-file-name name version))
10907 (sha256
10908 (base32
10909 "0m68gaqclnc2wflilmrnr19kky2gr6fjf6k3yq02sf9scs281kid"))))
10910 (build-system ruby-build-system)
10911 (arguments
10912 (list
10913 #:phases
10914 #~(modify-phases %standard-phases
10915 (add-before 'check 'disable-problematic-tests
10916 (lambda _
10917 (substitute* "test/fileutils/test_fileutils.rb"
10918 ;; The 'test_chown' tests depends on /etc/groups, which
10919 ;; doesn't exist in the build environment.
10920 (("def test_chown.*" all)
10921 (string-append all " return true\n"))
10922 ;; The 'test_cp_r_dev' expects a RuntimeError to be raised
10923 ;; when copying a char device to a directory, but this is not
10924 ;; triggered in the build environment, for reasons unknown.
10925 (("def test_cp_r_dev.*" all)
10926 (string-append all " return true\n"))))))))
10927 (synopsis "Ruby utility library to manipulate files")
10928 (description "The FileUtils Ruby library includes Several file utility
10929methods for copying, moving, removing, etc.")
10930 (home-page "https://github.com/ruby/fileutils")
10931 (license license:bsd-2)))
10932
10933(define-public ruby-sqlite3
10934 (package
10935 (name "ruby-sqlite3")
10936 (version "2.5.0")
10937 (source
10938 (origin
10939 (method git-fetch) ;for tests
10940 (uri (git-reference
10941 (url "https://github.com/sparklemotion/sqlite3-ruby")
10942 (commit (string-append "v" version))))
10943 (file-name (git-file-name name version))
10944 (sha256
10945 (base32
10946 "1fanv7bv5lszd5g752yy8nmpjhrl9gqwbbkbis2xbh83y96f2zfm"))))
10947 (build-system ruby-build-system)
10948 (arguments
10949 (list
10950 #:gem-flags #~(list "--" "--enable-system-libraries")
10951 #:modules '((guix build ruby-build-system)
10952 (guix build utils)
10953 (ice-9 rdelim)
10954 (ice-9 textual-ports))
10955 #:phases
10956 #~(modify-phases %standard-phases
10957 (add-after 'unpack 'relax-requirements
10958 (lambda _
10959 ;; Don't try to format C code, remove rubocop-rake.
10960 (delete-file "rakelib/format.rake")
10961 ;; Don't try to run valgrind-like memory tests.
10962 ;; This cuts all lines after Minitest::TestTask.create
10963 (with-atomic-file-replacement
10964 "rakelib/test.rake"
10965 (lambda (in out)
10966 (let loop ()
10967 (let ((line (read-line in)))
10968 (cond
10969 ((eof-object? line) #f)
10970 ((string-prefix? "Minitest::TestTask.create" line) #f)
10971 (else
10972 (format out "~a~%" line)
10973 (loop)))))))))
10974 (delete 'check)
10975 (add-after 'install 'check
10976 (lambda* (#:key tests? #:allow-other-keys)
10977 (when tests?
10978 (setenv "GEM_PATH"
10979 (string-append (getenv "GEM_PATH") ":"
10980 #$output "/lib/ruby/vendor_ruby"))
10981 (invoke "rake" "test")))))))
10982 (propagated-inputs
10983 (list ruby-mini-portile-2))
10984 (inputs
10985 (list sqlite))
10986 (native-inputs
10987 (list ruby-hoe
10988 ruby-rake-compiler
10989 ruby-rake-compiler-dock))
10990 (synopsis "Interface with SQLite3 databases")
10991 (description
10992 "This module allows Ruby programs to interface with the SQLite3 database
10993engine.")
10994 (home-page
10995 "https://github.com/sparklemotion/sqlite3-ruby")
10996 (license license:bsd-3)))
10997
10998(define-public ruby-sqlite3-1.4
10999 (package/inherit ruby-sqlite3
11000 (name "ruby-sqlite3")
11001 (version "1.4.4")
11002 (source
11003 (origin
11004 (method git-fetch) ;for tests
11005 (uri (git-reference
11006 (url "https://github.com/sparklemotion/sqlite3-ruby")
11007 (commit (string-append "v" version))))
11008 (file-name (git-file-name name version))
11009 (sha256
11010 (base32
11011 "0ngirjbai3f5ki2sf6m4gxbbrjpr3b35bz5nrz1cifyw1jk6a6sr"))))
11012 (arguments
11013 (substitute-keyword-arguments arguments
11014 ((#:tests? #t #t) #f)
11015 ((#:gem-flags _ #f)
11016 ''("--"
11017 "--enable-system-libraries"
11018 "--with-cflags=-Wno-error=incompatible-pointer-types -Wno-error=int-conversion"))
11019 ((#:phases phases #~%standard-phases)
11020 #~(modify-phases #$phases
11021 (delete 'relax-requirements)
11022 (add-after 'unpack 'fix-version
11023 (lambda _
11024 (substitute* "sqlite3.gemspec"
11025 (("s\\.version = .*")
11026 (format #f "s.version = ~s~%" #$version)))))))))))
11027
11028(define-public ruby-shoulda-context
11029 (package
11030 (name "ruby-shoulda-context")
11031 (version "2.0.0")
11032 (source
11033 (origin
11034 (method url-fetch)
11035 (uri (rubygems-uri "shoulda-context" version))
11036 (sha256
11037 (base32
11038 "0d1clcp92jv8756h09kbc55qiqncn666alx0s83za06q5hs4bpvs"))))
11039 (build-system ruby-build-system)
11040 (arguments
11041 `(#:phases
11042 (modify-phases %standard-phases
11043 (replace 'check
11044 (lambda* (#:key tests? #:allow-other-keys)
11045 (when tests?
11046 ;; Do not run tests to avoid circular dependence with rails.
11047 ;; Instead just import the library to test.
11048 (invoke "ruby" "-Ilib" "-r" "shoulda-context")))))))
11049 (synopsis "Test::Unit context framework extracted from Shoulda")
11050 (description
11051 "@code{shoulda-context} is the context framework extracted from Shoulda.
11052Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
11053context, setup, and should blocks combine to produce natural test method
11054names.")
11055 (home-page "https://github.com/thoughtbot/shoulda-context")
11056 (license license:expat)))
11057
11058(define-public ruby-shoulda-matchers
11059 (package
11060 (name "ruby-shoulda-matchers")
11061 (version "5.3.0")
11062 (source
11063 (origin
11064 (method url-fetch)
11065 (uri (rubygems-uri "shoulda-matchers" version))
11066 (sha256
11067 (base32
11068 "11igjgh16dl5pwqizdmclzlzpv7mbmnh8fx7m9b5kfsjhwxqdfpn"))))
11069 (build-system ruby-build-system)
11070 (arguments
11071 `(#:phases
11072 (modify-phases %standard-phases
11073 (replace 'check
11074 (lambda* (#:key tests? #:allow-other-keys)
11075 (when tests?
11076 ;; Do not run tests to avoid circular dependence with rails. Instead
11077 ;; just import the library to test.
11078 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
11079 (propagated-inputs
11080 (list ruby-activesupport))
11081 (synopsis "Collection of testing matchers extracted from Shoulda")
11082 (description
11083 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
11084test common Rails functionality. These tests would otherwise be much longer,
11085more complex, and error-prone.")
11086 (home-page "https://github.com/thoughtbot/shoulda-matchers")
11087 (license license:expat)))
11088
11089(define-public ruby-shoulda
11090 (package
11091 (name "ruby-shoulda")
11092 (version "4.0.0")
11093 (source
11094 (origin
11095 (method url-fetch)
11096 (uri (rubygems-uri "shoulda" version))
11097 (sha256
11098 (base32
11099 "02lww34kn1g6lidp4rx4rs6bqvirrzxlfw1y2wm11aif8f622xz6"))))
11100 (build-system ruby-build-system)
11101 (arguments
11102 `(#:phases
11103 (modify-phases %standard-phases
11104 (replace 'check
11105 (lambda* (#:key tests? #:allow-other-keys)
11106 (when tests?
11107 ;; Don't run tests to avoid circular dependence with rails.
11108 ;; Instead just import the library to test.
11109 (invoke "ruby" "-Ilib" "-r" "shoulda"))))
11110 (add-after 'extract-gemspec 'relax-requirements
11111 (lambda _
11112 (substitute* "shoulda.gemspec"
11113 ;; An older version of shoulda-matchers (4.0) is used, out of
11114 ;; little maintenance rather than because of an real
11115 ;; incompatibility (see:
11116 ;; https://github.com/thoughtbot/shoulda/issues/275).
11117 ((", \\[\"~> 4.0\"]") "")))))))
11118 (propagated-inputs
11119 (list ruby-shoulda-context ruby-shoulda-matchers))
11120 (synopsis "Context framework and matchers for testing")
11121 (description
11122 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
11123@code{shoulda-matchers} providing tools for writing tests.")
11124 (home-page "https://github.com/thoughtbot/shoulda")
11125 (license license:expat)))
11126
11127(define-public ruby-unf
11128 (package
11129 (name "ruby-unf")
11130 (version "0.2.0")
11131 (source
11132 (origin
11133 (method git-fetch)
11134 (uri (git-reference
11135 (url "https://github.com/knu/ruby-unf")
11136 (commit (string-append "v" version))))
11137 (file-name (git-file-name name version))
11138 (sha256
11139 (base32 "1zczv2z4yk73gymh5ymjgf857z6274nwv7gnslip507ds67r78ay"))
11140 (modules '((guix build utils)))
11141 (snippet #~(begin
11142 (delete-file-recursively "ext")
11143 (substitute* "unf.gemspec"
11144 (("gem\\.extensions.*") ""))))))
11145 (build-system ruby-build-system)
11146 (arguments
11147 `(#:phases
11148 (modify-phases %standard-phases
11149 (add-before 'check 'add-dependency-to-bundler
11150 (lambda _
11151 ;; test-unit is required but not provided by the bundler
11152 ;; environment. This is fixed in the upstream repository but fix
11153 ;; has not been released.
11154 (substitute* "Gemfile"
11155 (("^gemspec") "gem 'test-unit'\ngemspec")))))))
11156 (propagated-inputs
11157 (list ruby-unf-ext))
11158 (native-inputs
11159 (list ruby-shoulda bundler ruby-test-unit))
11160 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
11161 (description
11162 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
11163support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
11164@code{java.text.Normalizer} on JRuby.")
11165 (home-page "https://github.com/knu/ruby-unf")
11166 (license license:bsd-2)))
11167
11168(define-public ruby-warden
11169 (package
11170 (name "ruby-warden")
11171 (version "1.2.8")
11172 (source
11173 (origin
11174 (method url-fetch)
11175 (uri (rubygems-uri "warden" version))
11176 (sha256
11177 (base32
11178 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
11179 (build-system ruby-build-system)
11180 (arguments
11181 '(#:tests? #f)) ; No included tests
11182 (propagated-inputs
11183 (list ruby-rack))
11184 (synopsis "Rack middleware providing authentication")
11185 (description
11186 "Warden is a Rack-based middleware that provides a mechanism for
11187authentication in Ruby web applications.")
11188 (home-page "https://github.com/wardencommunity/warden")
11189 (license license:expat)))
11190
11191(define-public ruby-warden-oauth2
11192 (package
11193 (name "ruby-warden-oauth2")
11194 (version "0.0.1")
11195 (source
11196 (origin
11197 (method url-fetch)
11198 (uri (rubygems-uri "warden-oauth2" version))
11199 (sha256
11200 (base32
11201 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
11202 (build-system ruby-build-system)
11203 (arguments
11204 '(#:test-target "spec"
11205 #:phases
11206 (modify-phases %standard-phases
11207 (add-after 'unpack 'remove-unnecessary-dependencies
11208 (lambda _
11209 (substitute* "Gemfile"
11210 ;; All of these gems relate to development, and are unnecessary
11211 ;; when running the tests
11212 (("gem 'guard-bundler'") "")
11213 (("gem 'guard'") "")
11214 (("gem 'guard-rspec'") "")
11215 (("gem 'rb-fsevent'") "")
11216 (("gem 'pry'") "")
11217 (("gem 'growl'") ""))))
11218 ;; The test suite doesn't work with rspec@2, and this is incompatible
11219 ;; with the current version of Rake, so invoke Rspec directly
11220 (replace 'check
11221 (lambda* (#:key tests? #:allow-other-keys)
11222 (when tests?
11223 (invoke "bundle" "exec" "rspec")))))))
11224 (propagated-inputs
11225 (list ruby-warden))
11226 (native-inputs
11227 (list bundler ruby-rspec-2 ruby-rack-test))
11228 (synopsis "OAuth 2.0 strategies for Warden")
11229 (description
11230 "This library extends Warden to support OAuth 2.0 authorized API
11231requests.")
11232 (home-page "https://github.com/opperator/warden-oauth2")
11233 (license license:expat)))
11234
11235(define-public ruby-webmock
11236 (package
11237 (name "ruby-webmock")
11238 (version "3.11.2")
11239 (source
11240 (origin
11241 (method url-fetch)
11242 (uri (rubygems-uri "webmock" version))
11243 (sha256
11244 (base32
11245 "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
11246 (build-system ruby-build-system)
11247 (native-inputs
11248 (list bundler ruby-rspec))
11249 (propagated-inputs
11250 (list ruby-addressable ruby-crack ruby-hashdiff))
11251 (synopsis "Allows stubbing and setting expectations on HTTP requests")
11252 (description
11253 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
11254requests. This is useful when testing software.")
11255 (home-page "https://github.com/bblimke/webmock")
11256 (license license:expat)))
11257
11258(define-public ruby-webmock-2
11259 (package
11260 (inherit ruby-webmock)
11261 (name "ruby-webmock")
11262 (version "2.3.2")
11263 (source
11264 (origin
11265 (method url-fetch)
11266 (uri (rubygems-uri "webmock" version))
11267 (sha256
11268 (base32
11269 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
11270
11271(define-public ruby-unicode-display-width
11272 (package
11273 (name "ruby-unicode-display-width")
11274 (version "3.2.0")
11275 (source
11276 (origin
11277 (method url-fetch)
11278 (uri (rubygems-uri "unicode-display_width" version))
11279 (sha256
11280 (base32
11281 "0hiwhnqpq271xqari6mg996fgjps42sffm9cpk6ljn8sd2srdp8c"))))
11282 (build-system ruby-build-system)
11283 (arguments
11284 '(;; Test data not included.
11285 #:tests? #f))
11286 (propagated-inputs (list ruby-unicode-emoji))
11287 (synopsis "Determine the monospace display width of Ruby strings")
11288 (description
11289 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
11290display width of strings in Ruby.")
11291 (home-page "https://github.com/janlelis/unicode-display_width")
11292 (license license:expat)))
11293
11294;; There is another gem called 'ruby-version' so we use an underscore in this
11295;; name
11296(define-public ruby_version
11297 (package
11298 (name "ruby_version")
11299 (version "1.0.2")
11300 (source
11301 (origin
11302 (method url-fetch)
11303 (uri (rubygems-uri "ruby_version" version))
11304 (sha256
11305 (base32
11306 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
11307 (build-system ruby-build-system)
11308 (arguments
11309 `(#:phases
11310 (modify-phases %standard-phases
11311 (add-before 'check 'fix-dependencies
11312 (lambda _
11313 ;; Remove the Gemfile.lock, as we want to use Guix packages at
11314 ;; whatever versions.
11315 (delete-file "Gemfile.lock")
11316 ;; Remove the included gem files as they unnecessary.
11317 (delete-file-recursively "pkg/")
11318 ;; Accept any version of rake, rdoc and rspec
11319 (substitute* "ruby_version.gemspec"
11320 (("%q<rake.*") "%q<rake>)\n")
11321 (("%q<rdoc.*") "%q<rdoc>)\n")
11322 (("%q<rspec.*") "%q<rspec>)\n"))
11323 ;; Do not use bundler.
11324 (substitute* "Rakefile"
11325 (("Bundler\\.setup.*") "nil\n")))))))
11326 (native-inputs
11327 (list ruby-rdoc ruby-rspec ruby-rubygems-tasks))
11328 (synopsis "Ruby library to help check the Ruby version")
11329 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
11330checking for the right Ruby version in software.")
11331 (home-page "https://github.com/janlelis/ruby_version")
11332 (license license:expat)))
11333
11334(define-public ruby-websocket-client-simple
11335 (package
11336 (name "ruby-websocket-client-simple")
11337 (version "0.9.0")
11338 (source (origin
11339 (method url-fetch)
11340 (uri (rubygems-uri "websocket-client-simple" version))
11341 (sha256
11342 (base32
11343 "029iar7fnnrgmc1k463xlkpr4n72s4zdgri13rqmmcr295g7r8zr"))))
11344 (build-system ruby-build-system)
11345 (arguments (list #:test-target "default"))
11346 (native-inputs (list ruby-eventmachine ruby-websocket-eventmachine-server))
11347 (propagated-inputs (list ruby-event-emitter ruby-websocket))
11348 (synopsis "Simple WebSocket client for Ruby")
11349 (description "This package provides a simple WebSocket client for Ruby.")
11350 (home-page "https://github.com/ruby-jp/websocket-client-simple")
11351 (license license:expat)))
11352
11353(define-public ruby-websocket-eventmachine-base
11354 (package
11355 (name "ruby-websocket-eventmachine-base")
11356 (version "1.2.0")
11357 (source (origin
11358 (method url-fetch)
11359 (uri (rubygems-uri "websocket-eventmachine-base" version))
11360 (sha256
11361 (base32
11362 "0wiz61mcwgs3k21cdr5l9b4jpg29gl6mflfampww2v525yc3hr1r"))))
11363 (build-system ruby-build-system)
11364 (arguments
11365 (list #:tests? #f)) ;no test suite
11366 (propagated-inputs (list ruby-eventmachine ruby-websocket
11367 ruby-websocket-native))
11368 (synopsis "WebSocket base for Ruby client and server")
11369 (description "This package provides a WebSocket base for a Ruby client and
11370server.")
11371 (home-page "https://github.com/imanel/websocket-eventmachine-base")
11372 (license license:expat)))
11373
11374(define-public ruby-websocket-eventmachine-server
11375 (package
11376 (name "ruby-websocket-eventmachine-server")
11377 (version "1.0.1")
11378 (source (origin
11379 (method url-fetch)
11380 (uri (rubygems-uri "websocket-eventmachine-server" version))
11381 (sha256
11382 (base32
11383 "0iqpzc8s028nck1flqaj784gvyn64wy1h3svpa4y2847wklg8sms"))))
11384 (build-system ruby-build-system)
11385 ;; TODO: The test suite requires Autobahn, not yet packaged in Guix.
11386 (arguments (list #:tests? #f))
11387 (propagated-inputs (list ruby-websocket-eventmachine-base))
11388 (synopsis "WebSocket server for Ruby")
11389 (description "This package provides a WebSocket server for Ruby.")
11390 (home-page "https://github.com/imanel/websocket-eventmachine-server")
11391 (license license:expat)))
11392
11393(define-public ruby-websocket-native
11394 (package
11395 (name "ruby-websocket-native")
11396 (version "1.0.0")
11397 (source (origin
11398 (method url-fetch)
11399 (uri (rubygems-uri "websocket-native" version))
11400 (sha256
11401 (base32
11402 "1kgvd3gyzh7hk0ddzn85jrs4csxm54qnvla95ldyn6rzgfbjchdn"))))
11403 (build-system ruby-build-system)
11404 (arguments
11405 (list #:test-target "spec"
11406 #:phases #~(modify-phases %standard-phases
11407 (add-before 'check 'disable-problematic-tests
11408 (lambda _
11409 (substitute* "spec/websocket_spec.rb"
11410 (("it \"should have mask_native defined\"" all)
11411 (string-append "x" all)))))
11412 (add-after 'build 'compile
11413 (lambda _
11414 (invoke "rake" "compile"))))))
11415 (native-inputs (list ruby-rake-compiler ruby-rspec))
11416 (synopsis "Native Ruby extension for the WebSocket gem")
11417 (description "This package provides a native extension that can increase
11418performance by about 25% compared to the pure Ruby WebSocket implementation.")
11419 (home-page "https://github.com/imanel/websocket-ruby-native")
11420 (license license:expat)))
11421
11422(define-public ruby-websocket-driver
11423 (package
11424 (name "ruby-websocket-driver")
11425 (version "0.7.1")
11426 (source
11427 (origin
11428 (method url-fetch)
11429 (uri (rubygems-uri "websocket-driver" version))
11430 (sha256
11431 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
11432 (build-system ruby-build-system)
11433 (arguments
11434 '(#:tests? #f)) ; no included tests
11435 (propagated-inputs
11436 (list ruby-websocket-extensions))
11437 (synopsis "WebSocket protocol handler with pluggable I/O")
11438 (description
11439 "@code{websocket-driver} provides a complete implementation of the
11440WebSocket protocols that can be hooked up to any TCP library")
11441 (home-page "https://github.com/faye/websocket-driver-ruby")
11442 (license license:expat)))
11443
11444(define-public ruby-websocket-extensions
11445 (package
11446 (name "ruby-websocket-extensions")
11447 (version "0.1.3")
11448 (source
11449 (origin
11450 (method url-fetch)
11451 (uri (rubygems-uri "websocket-extensions" version))
11452 (sha256
11453 (base32
11454 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
11455 (build-system ruby-build-system)
11456 (arguments
11457 '(;; No included tests
11458 #:tests? #f))
11459 (synopsis "Generic extension manager for WebSocket connections")
11460 (description
11461 "@code{websocket-extensions} provides a container for registering
11462extension plugins.")
11463 (home-page "https://github.com/faye/websocket-extensions-ruby")
11464 (license license:expat)))
11465
11466(define-public ruby-domain-name
11467 (package
11468 (name "ruby-domain-name")
11469 (version "0.5.20190701")
11470 (source
11471 (origin
11472 (method url-fetch)
11473 (uri (rubygems-uri "domain_name" version))
11474 (sha256
11475 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
11476 (build-system ruby-build-system)
11477 (arguments
11478 `(#:phases
11479 (modify-phases %standard-phases
11480 (add-before 'check 'fix-versions
11481 (lambda _
11482 ;; Fix NameError that appears to already be fixed upstream.
11483 (substitute* "Rakefile"
11484 (("DomainName::VERSION")
11485 "Bundler::GemHelper.gemspec.version"))
11486 ;; Loosen unnecessarily strict test-unit version specification.
11487 (substitute* "domain_name.gemspec"
11488 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
11489 #t)))))
11490 (propagated-inputs
11491 (list ruby-unf))
11492 (native-inputs
11493 (list ruby-shoulda bundler ruby-test-unit))
11494 (synopsis "Domain name manipulation library")
11495 (description
11496 "@code{domain_name} is a Domain name manipulation library. It parses a
11497domain name ready for extracting the registered domain and TLD (Top Level
11498Domain). It can also be used for cookie domain validation based on the Public
11499Suffix List.")
11500 (home-page "https://github.com/knu/ruby-domain_name")
11501 (license license:bsd-2)))
11502
11503(define-public ruby-dotenv
11504 (package
11505 (name "ruby-dotenv")
11506 (version "3.1.7")
11507 (source (origin
11508 (method git-fetch) ;for the tests
11509 (uri (git-reference
11510 (url "https://github.com/bkeepers/dotenv")
11511 (commit (string-append "v" version))))
11512 (file-name (git-file-name name version))
11513 (sha256
11514 (base32
11515 "19j0acy12si537hwi4q54q8n5ycmlvfd2ik5y6r7jir6ww06l8yx"))))
11516 (build-system ruby-build-system)
11517 (arguments
11518 (list
11519 #:test-target "spec"
11520 #:phases
11521 #~(modify-phases %standard-phases
11522 (add-after 'unpack 'do-not-build-dotenv-rails
11523 (lambda _
11524 ;; The repository includes the definitions of two packages,
11525 ;; 'dotenv' and 'dotenv-rails'. Since we want to package them
11526 ;; separately, remove the dotenv-rails and associated Rake
11527 ;; tasks.
11528 (delete-file "dotenv-rails.gemspec")
11529 (delete-file "spec/dotenv/rails_spec.rb")
11530 (delete-file "spec/dotenv/log_subscriber_spec.rb")
11531 (substitute* "spec/spec_helper.rb"
11532 (("require \"dotenv\"" all)
11533 (string-append "require \"pathname\"\n" all)))
11534 (substitute* "Rakefile"
11535 (("DotenvRailsGemHelper.install_tasks name: \"dotenv-rails\"")
11536 "")
11537 ((", \"dotenv-rails:.*\"")
11538 ""))))
11539 (replace 'replace-git-ls-files
11540 (lambda _
11541 (substitute* "dotenv.gemspec"
11542 (("`git ls-files (README.md LICENSE lib bin) \\| ([^`]*`)"
11543 all files command)
11544 (string-append
11545 "`find " files " -type f | sort | " command))))))))
11546 (native-inputs (list ruby-standard ruby-rspec))
11547 (synopsis "Ruby library for setting environment variables")
11548 (description "Dotenv is a Ruby library for setting environment variables
11549defined in a @file{.env} file.")
11550 (home-page "https://github.com/bkeepers/dotenv")
11551 (license license:expat)))
11552
11553(define-public ruby-dotenv-rails
11554 (package
11555 (inherit ruby-dotenv)
11556 (name "ruby-dotenv-rails")
11557 (arguments
11558 (substitute-keyword-arguments arguments
11559 ((#:phases phases '%standard-phases)
11560 #~(modify-phases #$phases
11561 (delete 'do-not-build-dotenv-rails)
11562 (add-after 'unpack 'delete-Gemfile
11563 (lambda _
11564 ;; It defines extraneous dependencies; remove it.
11565 (delete-file "Gemfile")))
11566 (add-after 'unpack 'remove-extraneous-gemspec
11567 (lambda _
11568 (delete-file "dotenv.gemspec")
11569 (substitute* "Gemfile"
11570 ((".*\"dotenv\".*") ""))
11571 (substitute* "Rakefile"
11572 ;; Remove the dotenv-related Rake tasks.
11573 (("Bundler::GemHelper.install_tasks name: \"dotenv\"")
11574 "")
11575 (("\"dotenv:[^\"]*\", ")
11576 ""))))
11577 (replace 'replace-git-ls-files
11578 (lambda _
11579 (substitute* "dotenv-rails.gemspec"
11580 (("`git ls-files lib \\| grep rails`")
11581 "`find lib -type f | sort | grep rails`"))))))))
11582 (native-inputs (list ruby-rspec ruby-spring ruby-standard))
11583 (propagated-inputs (list ruby-dotenv ruby-railties))
11584 (synopsis "Ruby library for setting environment variables in Rails project")
11585 (description "Dotenv is a Ruby library for setting environment variables
11586defined in a @file{.env} file. This is the Rails variant, adapted for use
11587with Ruby on Rails projects.")))
11588
11589(define-public ruby-http-accept
11590 (package
11591 (name "ruby-http-accept")
11592 (version "2.2.0")
11593 (source (origin
11594 (method git-fetch) ;for the tests
11595 (uri (git-reference
11596 (url "https://github.com/socketry/http-accept")
11597 (commit (string-append "v" version))))
11598 (file-name (git-file-name name version))
11599 (sha256
11600 (base32
11601 "1d69cy12hqbcqrhw4dibvdq5pqklxsa59kih6pzl479nxq79rgs7"))))
11602 (build-system ruby-build-system)
11603 (arguments
11604 (list
11605 #:phases
11606 #~(modify-phases %standard-phases
11607 (add-after 'unpack 'remove-missing-key-directive
11608 ;; This seem to be a common problem in Ruby projects (see:
11609 ;; https://github.com/prawnpdf/ttfunk/issues/99).
11610 (lambda _
11611 (substitute* "http-accept.gemspec"
11612 ((".*spec.signing_key.*") ""))))
11613 (replace 'check
11614 (lambda* (#:key tests? #:allow-other-keys)
11615 (when tests?
11616 (invoke "rspec")))))))
11617 (native-inputs
11618 (list ruby-rspec
11619 ruby-covered))
11620 (synopsis "Parse Accept and Accept-Language HTTP headers")
11621 (description
11622 "This package provides a set of parsers for Accept and Accept-Language
11623HTTP headers.")
11624 (home-page "https://github.com/socketry/http-accept")
11625 (license license:expat)))
11626
11627(define-public ruby-http-accept-1
11628 (package
11629 (inherit ruby-http-accept)
11630 (version "1.7.0")
11631 (source (origin
11632 (method git-fetch) ;for the tests
11633 (uri (git-reference
11634 (url "https://github.com/ioquatix/http-accept")
11635 (commit (string-append "v" version))))
11636 (file-name (git-file-name "ruby-http-accept" version))
11637 (sha256
11638 (base32
11639 "1hnqmqpa135s3xgcvv30qzqm8zp88my1aj05m72d2q9cvc31g92z"))))))
11640
11641(define-public ruby-http-cookie
11642 (package
11643 (name "ruby-http-cookie")
11644 (version "1.0.5")
11645 (source
11646 (origin
11647 (method url-fetch)
11648 (uri (rubygems-uri "http-cookie" version))
11649 (sha256
11650 (base32
11651 "13rilvlv8kwbzqfb644qp6hrbsj82cbqmnzcvqip1p6vqx36sxbk"))))
11652 (build-system ruby-build-system)
11653 (arguments
11654 (list
11655 #:phases
11656 #~(modify-phases %standard-phases
11657 (add-before 'check 'add-dependency-to-bundler
11658 (lambda _
11659 ;; Fix NameError
11660 (substitute* "Rakefile"
11661 (("HTTP::Cookie::VERSION")
11662 "Bundler::GemHelper.gemspec.version")))))))
11663 (propagated-inputs
11664 (list ruby-domain-name))
11665 (native-inputs
11666 (list ruby-simplecov
11667 bundler
11668 ruby-sqlite3
11669 ruby-test-unit))
11670 (synopsis "Handle HTTP Cookies based on RFC 6265")
11671 (description
11672 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
11673RFC 6265. It has been designed with security, standards compliance and
11674compatibility in mind, to behave just the same as today's major web browsers.
11675It has built-in support for the legacy @code{cookies.txt} and
11676@code{cookies.sqlite} formats of Mozilla Firefox.")
11677 (home-page "https://github.com/sparklemotion/http-cookie")
11678 (license license:expat)))
11679
11680(define-public ruby-httpclient
11681 (package
11682 (name "ruby-httpclient")
11683 (version "2.8.3")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (rubygems-uri "httpclient" version))
11688 (sha256
11689 (base32
11690 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
11691 (build-system ruby-build-system)
11692 (arguments
11693 '(;; TODO: Some tests currently fail
11694 ;; ------
11695 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
11696 ;; 2 omissions, 0 notifications
11697 ;; 91.866% passed
11698 ;; ------
11699 ;; 6.49 tests/s, 22.41 assertions/s
11700 #:tests? #f
11701 #:phases
11702 (modify-phases %standard-phases
11703 (replace 'check
11704 (lambda* (#:key tests? #:allow-other-keys)
11705 (if tests?
11706 (invoke "ruby"
11707 "-Ilib"
11708 "test/runner.rb")))))))
11709 (native-inputs
11710 (list ruby-rack))
11711 (synopsis
11712 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
11713 (description
11714 "The @code{httpclient} ruby library provides functionality related to
11715HTTP. Compared to the @code{net/http} library, @code{httpclient} also provides
11716Cookie, multithreading and authentication (digest, NTLM) support.
11717
11718Also provided is a @command{httpclient} command, which can perform HTTP
11719requests either using arguments or with an interactive prompt.")
11720 (home-page "https://github.com/nahi/httpclient")
11721 (license license:ruby)))
11722
11723(define-public ruby-ansi
11724 (package
11725 (name "ruby-ansi")
11726 (version "1.5.0")
11727 (source
11728 (origin
11729 (method git-fetch)
11730 ;; Fetch from GitHub as the gem does not contain testing code.
11731 (uri (git-reference
11732 (url "https://github.com/rubyworks/ansi")
11733 (commit version)))
11734 (file-name (git-file-name name version))
11735 (sha256
11736 (base32
11737 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
11738 (build-system ruby-build-system)
11739 (arguments
11740 `(#:phases
11741 (modify-phases %standard-phases
11742 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
11743 ;; cycle ansi, qed, ansi. Instead simply test that the library can
11744 ;; be require'd.
11745 (replace 'check
11746 (lambda _
11747 (invoke "ruby" "-Ilib" "-r" "ansi")))
11748 (add-before 'validate-runpath 'replace-broken-symlink
11749 (lambda* (#:key outputs #:allow-other-keys)
11750 (let* ((out (assoc-ref outputs "out"))
11751 (file (string-append
11752 out "/lib/ruby/vendor_ruby/gems/ansi-"
11753 ,version "/lib/ansi.yml")))
11754 ;; XXX: This symlink is broken since ruby 2.4.
11755 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
11756 (delete-file file)
11757 (symlink "../.index" file)))))))
11758 (synopsis "ANSI escape code related libraries")
11759 (description
11760 "This package is a collection of ANSI escape code related libraries
11761enabling ANSI colorization and stylization of console output. Included in the
11762library are the @code{Code} module, which defines ANSI codes as constants and
11763methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
11764@code{ProgressBar}, and a @code{String} subclass. The library also includes a
11765@code{Terminal} module which provides information about the current output
11766device.")
11767 (home-page "https://rubyworks.github.io/ansi/")
11768 (license license:bsd-2)))
11769
11770(define-public ruby-systemu
11771 (package
11772 (name "ruby-systemu")
11773 (version "2.6.5")
11774 (source
11775 (origin
11776 (method url-fetch)
11777 (uri (rubygems-uri "systemu" version))
11778 (sha256
11779 (base32
11780 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
11781 (build-system ruby-build-system)
11782 (arguments
11783 `(#:phases
11784 (modify-phases %standard-phases
11785 (add-before 'check 'set-version
11786 (lambda _
11787 (setenv "VERSION" ,version))))))
11788 (synopsis "Capture of stdout/stderr and handling of child processes")
11789 (description
11790 "Systemu can be used on any platform to return status, stdout, and stderr
11791of any command. Unlike other methods like @code{open3} and @code{popen4}
11792there is no danger of full pipes or threading issues hanging your process or
11793subprocess.")
11794 (home-page "https://github.com/ahoward/systemu")
11795 (license license:ruby)))
11796
11797(define-public ruby-bcrypt
11798 (package
11799 (name "ruby-bcrypt")
11800 (version "3.1.20")
11801 ;; FIXME: Unbundle the bcrypt library used.
11802 (source
11803 (origin
11804 (method git-fetch)
11805 (uri (git-reference
11806 (url "https://github.com/bcrypt-ruby/bcrypt-ruby")
11807 (commit (string-append "v" version))))
11808 (file-name (git-file-name name version))
11809 (sha256
11810 (base32 "0q6h8kmjb34hg6qjv31v374n3cavv00drsfyzv6nybdwipgyg62i"))))
11811 (build-system ruby-build-system)
11812 (arguments (list #:test-target "default")) ;compile + spec
11813 (native-inputs (list ruby-rake-compiler ruby-rspec))
11814 (synopsis "Ruby bcrypt wrapper")
11815 (description "This Ruby library provides a simple wrapper to bcrypt, a
11816secure hash algorithm for hashing passwords.")
11817 (home-page "https://github.com/bcrypt-ruby/bcrypt-ruby")
11818 (license license:expat)))
11819
11820(define-public ruby-bcrypt-pbkdf
11821 (package
11822 (name "ruby-bcrypt-pbkdf")
11823 (version "1.1.2.rc1")
11824 (source (origin
11825 (method url-fetch)
11826 (uri (rubygems-uri "bcrypt_pbkdf" version))
11827 (sha256
11828 (base32
11829 "1p2m7q7kwrj56ilw07mvzpqinryx525b05gpsa57wzm591y7waqm"))))
11830 (build-system ruby-build-system)
11831 (arguments
11832 (list #:phases #~(modify-phases %standard-phases
11833 (add-before 'build 'compile
11834 (lambda _
11835 (invoke "rake" "compile"))))))
11836 (native-inputs (list ruby-minitest ruby-rake-compiler
11837 ruby-rake-compiler-dock ruby-rdoc))
11838 (synopsis "Reading password encrypted Ed25519 keys in Ruby")
11839 (description
11840 "This gem implements @samp{bcrypt_pbkdf}, which is a variant of
11841PBKDF2 (Password-Based Key Derivation Function 2) with bcrypt-based
11842pseudorandom function. This is currently used by @samp{net-ssh} to
11843read password encrypted Ed25519 keys.")
11844 (home-page "https://github.com/net-ssh/bcrypt_pbkdf-ruby")
11845 (license license:expat)))
11846
11847(define-public ruby-bio-commandeer
11848 (package
11849 (name "ruby-bio-commandeer")
11850 (version "0.4.0")
11851 (source
11852 (origin
11853 (method url-fetch)
11854 (uri (rubygems-uri "bio-commandeer" version))
11855 (sha256
11856 (base32
11857 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
11858 (build-system ruby-build-system)
11859 (arguments
11860 `(#:phases
11861 (modify-phases %standard-phases
11862 (replace 'check
11863 ;; Run test without calling 'rake' so that jeweler is
11864 ;; not required as an input.
11865 (lambda _
11866 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
11867 (propagated-inputs
11868 (list ruby-bio-logger ruby-systemu))
11869 (native-inputs
11870 (list bundler ruby-rspec))
11871 (synopsis "Simplified running of shell commands from within Ruby")
11872 (description
11873 "Bio-commandeer provides an opinionated method of running shell commands
11874from within Ruby. The advantage of bio-commandeer over other methods of
11875running external commands is that when something goes wrong, messages printed
11876to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
11877detail to ease debugging.")
11878 (home-page "https://github.com/wwood/bioruby-commandeer")
11879 (license license:expat)))
11880
11881(define-public ruby-rubytest
11882 (package
11883 (name "ruby-rubytest")
11884 (version "0.8.1")
11885 (source
11886 (origin
11887 (method url-fetch)
11888 (uri (rubygems-uri "rubytest" version))
11889 (sha256
11890 (base32
11891 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
11892 (build-system ruby-build-system)
11893 (arguments
11894 ;; Disable regular testing to break the cycle rubytest, qed, brass,
11895 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
11896 ;; simply test that the library can be require'd.
11897 `(#:phases
11898 (modify-phases %standard-phases
11899 (replace 'check
11900 (lambda _
11901 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
11902 (propagated-inputs
11903 (list ruby-ansi))
11904 (synopsis "Universal test harness for Ruby")
11905 (description
11906 "Rubytest is a testing meta-framework for Ruby. It can handle any
11907compliant test framework and can run tests from multiple frameworks in a
11908single pass.")
11909 (home-page "https://rubyworks.github.io/rubytest")
11910 (license license:bsd-2)))
11911
11912(define-public ruby-brass
11913 (package
11914 (name "ruby-brass")
11915 (version "1.2.1")
11916 (source
11917 (origin
11918 (method url-fetch)
11919 (uri (rubygems-uri "brass" version))
11920 (sha256
11921 (base32
11922 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
11923 (build-system ruby-build-system)
11924 (arguments
11925 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
11926 ;; Instead simply test that the library can be require'd.
11927 `(#:phases
11928 (modify-phases %standard-phases
11929 (replace 'check
11930 (lambda* (#:key tests? #:allow-other-keys)
11931 (when tests?
11932 (invoke "ruby" "-Ilib" "-r" "brass")))))))
11933 (synopsis "Basic foundational assertions framework")
11934 (description
11935 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
11936foundational assertions framework for other assertion and test frameworks to
11937make use of.")
11938 (home-page "https://rubyworks.github.io/brass")
11939 (license license:bsd-2)))
11940
11941(define-public ruby-qed
11942 (package
11943 (name "ruby-qed")
11944 (version "2.9.2")
11945 (source
11946 (origin
11947 (method url-fetch)
11948 (uri (rubygems-uri "qed" version))
11949 (sha256
11950 (base32
11951 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
11952 (build-system ruby-build-system)
11953 (arguments
11954 `(#:phases
11955 (modify-phases %standard-phases
11956 (replace 'check
11957 (lambda* (#:key tests? #:allow-other-keys)
11958 (when tests?
11959 (invoke "ruby" "-Ilib" "bin/qed")))))))
11960 (native-inputs
11961 (list ruby-ae-bootstrap))
11962 (propagated-inputs
11963 (list ruby-ansi ruby-brass))
11964 (synopsis "Test framework utilizing literate programming techniques")
11965 (description
11966 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
11967@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
11968Development} (BDD) utilizing Literate Programming techniques. QED sits
11969somewhere between lower-level testing tools like @code{Test::Unit} and
11970requirement specifications systems like Cucumber.")
11971 (home-page "https://rubyworks.github.io/qed")
11972 (license license:bsd-2)))
11973
11974(define-public ruby-que
11975 (package
11976 (name "ruby-que")
11977 (version "1.0.0.beta3")
11978 (source
11979 (origin
11980 (method url-fetch)
11981 (uri (rubygems-uri "que" version))
11982 (sha256
11983 (base32
11984 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
11985 (build-system ruby-build-system)
11986 (arguments
11987 '(#:tests? #f)) ; No included tests
11988 (synopsis "Job queue using PostgreSQL written in Ruby")
11989 (description
11990 "This package provides a job queue that uses PostgreSQL for storing jobs
11991and locking between worker processes.")
11992 (home-page "https://github.com/chanks/que")
11993 (license license:expat)))
11994
11995(define-public ruby-queue-classic
11996 (package
11997 (name "ruby-queue-classic")
11998 (version "4.0.0")
11999 (source (origin
12000 (method url-fetch)
12001 (uri (rubygems-uri "queue_classic" version))
12002 (sha256
12003 (base32
12004 "0npyhajf2fc80apkw9s2kj0n254w5lcl4xpjidg5d5w1fb19abh6"))))
12005 (build-system ruby-build-system)
12006 (arguments (list #:tests? #f)) ;tests require a postgresql server
12007 (native-inputs (list ruby-activerecord ruby-minitest-reporters))
12008 (propagated-inputs (list ruby-pg))
12009 (synopsis "Queuing library for Ruby")
12010 (description "@code{queue_classic} is a queuing library for Ruby
12011applications (Rails, Sinatra, etc.) @code{queue_classic} features
12012asynchronous job polling, database maintained locks and has a single
12013dependency, @code{pg}.")
12014 (home-page "https://github.com/QueueClassic/queue_classic")
12015 (license license:expat)))
12016
12017(define-public ruby-pairing-heap
12018 (package
12019 (name "ruby-pairing-heap")
12020 (version "3.1.0")
12021 (source (origin
12022 (method url-fetch)
12023 (uri (rubygems-uri "pairing_heap" version))
12024 (sha256
12025 (base32
12026 "059kqpw53cancnp0bp7y1s74y1955riw33w3lqfbnms4b4mdh5zj"))))
12027 (build-system ruby-build-system)
12028 (arguments
12029 (list
12030 #:phases
12031 #~(modify-phases %standard-phases
12032 (add-after 'unpack 'patch
12033 (lambda _
12034 (substitute* "Rakefile"
12035 (("require \"standard/rake\"") "")
12036 ((":\"standard:fix\",") "")))))))
12037 (synopsis "Priority queue in pure Ruby")
12038 (description "This package provides a performant priority queue in pure
12039ruby with support for changing priority using pairing heap data structure")
12040 (home-page "https://github.com/mhib/pairing_heap")
12041 (license license:expat)))
12042
12043(define-public ruby-ae
12044 (package
12045 (name "ruby-ae")
12046 (version "1.8.2")
12047 (source
12048 (origin
12049 (method git-fetch)
12050 ;; Fetch from github so tests are included.
12051 (uri (git-reference
12052 (url "https://github.com/rubyworks/ae")
12053 (commit version)))
12054 (file-name (git-file-name name version))
12055 (sha256
12056 (base32
12057 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
12058 (build-system ruby-build-system)
12059 (arguments
12060 `(#:phases
12061 (modify-phases %standard-phases
12062 (replace 'check
12063 (lambda* (#:key tests? #:allow-other-keys)
12064 (when tests?
12065 (invoke "qed"))))
12066 (add-before 'validate-runpath 'replace-broken-symlink
12067 (lambda* (#:key outputs #:allow-other-keys)
12068 (let* ((out (assoc-ref outputs "out"))
12069 (file (string-append
12070 out "/lib/ruby/vendor_ruby/gems/ae-"
12071 ,version "/lib/ae.yml")))
12072 ;; XXX: This symlink is broken since ruby 2.4.
12073 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
12074 (delete-file file)
12075 (symlink "../.index" file)))))))
12076 (propagated-inputs
12077 (list ruby-ansi))
12078 (native-inputs
12079 (list ruby-qed))
12080 (synopsis "Assertions library")
12081 (description
12082 "Assertive Expressive (AE) is an assertions library specifically designed
12083for reuse by other test frameworks.")
12084 (home-page "https://rubyworks.github.io/ae/")
12085 (license license:bsd-2)))
12086
12087(define-public ruby-ae-bootstrap
12088 (hidden-package
12089 (package/inherit ruby-ae
12090 (arguments
12091 (substitute-keyword-arguments
12092 (package-arguments ruby-ae)
12093 ((#:tests? _ #t) #f)))
12094 (native-inputs '()))))
12095
12096(define-public ruby-lemon
12097 (package
12098 (name "ruby-lemon")
12099 (version "0.9.1")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (rubygems-uri "lemon" version))
12104 (sha256
12105 (base32
12106 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
12107 (build-system ruby-build-system)
12108 (arguments
12109 `(#:phases
12110 (modify-phases %standard-phases
12111 (replace 'check (lambda _ (invoke "qed"))))))
12112 (propagated-inputs
12113 (list ruby-ae ruby-ansi ruby-rubytest))
12114 (native-inputs
12115 (list ruby-qed))
12116 (synopsis "Test framework correlating code structure and test unit")
12117 (description
12118 "Lemon is a unit testing framework that enforces highly formal
12119case-to-class and unit-to-method test construction. This enforcement can help
12120focus concern on individual units of behavior.")
12121 (home-page "https://rubyworks.github.io/lemon")
12122 (license license:bsd-2)))
12123
12124(define-public ruby-leto
12125 (package
12126 (name "ruby-leto")
12127 (version "2.1.0")
12128 (source
12129 (origin
12130 (method url-fetch)
12131 (uri (rubygems-uri "leto" version))
12132 (sha256
12133 (base32 "1ys0qr95zjbln8mfq2bxia63nkdfj1gxy89j6mdcbn6ljy6mb3ch"))))
12134 (build-system ruby-build-system)
12135 (arguments
12136 (list #:tests? #f ; No tests.
12137 #:phases
12138 #~(modify-phases %standard-phases
12139 (add-after 'unpack 'ignore-rubocop
12140 (lambda _
12141 (substitute* "Rakefile"
12142 (("RUBY_VERSION\\.to_f >= 3\\.0")
12143 "false")))))))
12144 (native-inputs (list ruby-rake ruby-rspec))
12145 (synopsis "Generic object traverser")
12146 (description
12147 "This package provides a generic object traverser for Ruby. It takes the
12148object and recursively yields:
12149@itemize
12150@item the given object
12151@item instance variables, class variables, constants
12152@item Hash keys and values
12153@item Enumerable members
12154@item Struct members
12155@item Data members
12156@item Range begins and ends
12157@end itemize")
12158 (home-page "https://github.com/jaynetics/leto")
12159 (license license:expat)))
12160
12161(define-public ruby-rubytest-cli
12162 (package
12163 (name "ruby-rubytest-cli")
12164 (version "0.2.0")
12165 (source
12166 (origin
12167 (method url-fetch)
12168 (uri (rubygems-uri "rubytest-cli" version))
12169 (sha256
12170 (base32
12171 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
12172 (build-system ruby-build-system)
12173 (arguments
12174 `(#:tests? #f)) ; no tests
12175 (propagated-inputs
12176 (list ruby-ansi ruby-rubytest))
12177 (synopsis "Command-line interface for rubytest")
12178 (description
12179 "Rubytest CLI is a command-line interface for running tests for
12180Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
12181 (home-page "https://rubyworks.github.io/rubytest-cli")
12182 (license license:bsd-2)))
12183
12184(define-public ruby-hashery
12185 (package
12186 (name "ruby-hashery")
12187 (version "2.1.2")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (rubygems-uri "hashery" version))
12192 (sha256
12193 (base32
12194 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
12195 (build-system ruby-build-system)
12196 (arguments
12197 `(#:phases
12198 (modify-phases %standard-phases
12199 (replace 'check
12200 (lambda _
12201 (invoke "qed")
12202 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
12203 (native-inputs
12204 (list ruby-rubytest-cli ruby-qed ruby-lemon))
12205 (synopsis "Hash-like classes with extra features")
12206 (description
12207 "The Hashery is a tight collection of @code{Hash}-like classes.
12208Included are the auto-sorting @code{Dictionary} class, the efficient
12209@code{LRUHash}, the flexible @code{OpenHash} and the convenient
12210@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
12211defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
12212standard @code{Hash} making it possible to subclass and augment to fit any
12213specific use case.")
12214 (home-page "https://rubyworks.github.io/hashery")
12215 (license license:bsd-2)))
12216
12217(define-public ruby-rc4
12218 (package
12219 (name "ruby-rc4")
12220 (version "0.1.5")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (rubygems-uri "ruby-rc4" version))
12225 (sha256
12226 (base32
12227 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
12228 (build-system ruby-build-system)
12229 (arguments
12230 `(#:phases
12231 (modify-phases %standard-phases
12232 (replace 'check
12233 (lambda _
12234 (invoke "rspec" "spec/rc4_spec.rb"))))))
12235 (native-inputs
12236 (list ruby-rspec-2))
12237 (synopsis "Implementation of the RC4 algorithm")
12238 (description
12239 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
12240 (home-page "https://github.com/caiges/Ruby-RC4")
12241 (license license:expat)))
12242
12243(define-public ruby-afm
12244 (package
12245 (name "ruby-afm")
12246 (version "0.2.2")
12247 (source
12248 (origin
12249 (method url-fetch)
12250 (uri (rubygems-uri "afm" version))
12251 (sha256
12252 (base32
12253 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
12254 (build-system ruby-build-system)
12255 (native-inputs
12256 (list bundler))
12257 (synopsis "Read Adobe Font Metrics (afm) files")
12258 (description
12259 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
12260files and use the data therein.")
12261 (home-page "https://github.com/halfbyte/afm")
12262 (license license:expat)))
12263
12264(define-public ruby-ascii85
12265 (package
12266 (name "ruby-ascii85")
12267 (version "1.0.3")
12268 (source
12269 (origin
12270 (method url-fetch)
12271 (uri (rubygems-uri "Ascii85" version))
12272 (sha256
12273 (base32
12274 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
12275 (build-system ruby-build-system)
12276 (native-inputs
12277 (list bundler))
12278 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
12279 (description
12280 "This library provides methods to encode and decode Ascii85
12281binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
12282@dfn{Portable Document Format} (PDF) file formats.")
12283 (home-page "https://github.com/datawraith/ascii85gem")
12284 (license license:expat)))
12285
12286(define-public ruby-ttfunk
12287 (package
12288 (name "ruby-ttfunk")
12289 (version "1.7.0")
12290 (source
12291 (origin
12292 (method git-fetch)
12293 ;; Fetch from github as the gem does not contain testing code.
12294 (uri (git-reference
12295 (url "https://github.com/prawnpdf/ttfunk")
12296 (commit version)))
12297 (file-name (git-file-name name version))
12298 (sha256
12299 (base32
12300 "1jyxn928mpyb1sikjd93s3v8fmh33232pq41ziaph513j7am6fi5"))))
12301 (build-system ruby-build-system)
12302 (arguments
12303 (list #:test-target "spec" ;avoid the rubocop target
12304 #:phases
12305 #~(modify-phases %standard-phases
12306 (add-after 'unpack 'remove-missing-key-directive
12307 ;; This seem to be a common problem in Ruby projects (see:
12308 ;; https://github.com/prawnpdf/ttfunk/issues/99).
12309 (lambda _
12310 (substitute* "ttfunk.gemspec"
12311 ((".*spec.signing_key.*") "")))))))
12312 (native-inputs (list ruby-prawn-dev))
12313 (synopsis "Font metrics parser for the Prawn PDF generator")
12314 (description
12315 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
12316part of the Prawn PDF generator.")
12317 (home-page "https://github.com/prawnpdf/ttfunk")
12318 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
12319 ;; for details."
12320 (license %prawn-project-licenses)))
12321
12322(define-public ruby-puma
12323 (package
12324 (name "ruby-puma")
12325 (version "7.2.0")
12326 (source
12327 (origin
12328 (method git-fetch) ;for tests
12329 (uri (git-reference
12330 (url "https://github.com/puma/puma")
12331 (commit (string-append "v" version))))
12332 (file-name (git-file-name name version))
12333 (sha256
12334 (base32
12335 "0f94jb50a8j9gvn0l59s8dahhry2alwk825ybsxh2y4n1ckyp3n7"))))
12336 (build-system ruby-build-system)
12337 (arguments
12338 (list
12339 #:phases
12340 #~(modify-phases %standard-phases
12341 (add-after 'unpack 'patch-Gemfile
12342 (lambda _
12343 (substitute* "Gemfile"
12344 (("gem \"rake-compiler\".*")
12345 "gem 'rake-compiler'\n"))))
12346 (add-after 'unpack 'disable-rubocop
12347 (lambda _
12348 (setenv "PUMA_NO_RUBOCOP" "1")))
12349 (add-before 'build 'increase-resource-limits
12350 (lambda _
12351 ;; The test suite requires a higher number of open files. Try
12352 ;; increasing the soft resource limit of max open files to 8192,
12353 ;; or equal to the hard limit, whichever is lower.
12354 ;; See: https://github.com/puma/puma/blob/a59afabe782ec8869bb709ca991b32c0b2cc95fd/CONTRIBUTING.md#file-limits
12355 (call-with-values (lambda () (getrlimit 'nofile))
12356 (lambda (soft hard)
12357 (when (and soft (< soft 8192))
12358 (if hard
12359 (setrlimit 'nofile (min hard 8192) hard)
12360 (setrlimit 'nofile 8192 #f))
12361 (format
12362 #t "increased maximum number of open files from ~d to ~d~%"
12363 soft (if hard (min hard 8192) 8192)))))))
12364 (add-before 'build 'fix-gemspec
12365 (lambda _
12366 (substitute* "puma.gemspec"
12367 (("`git ls-files -- bin docs ext lib tools`")
12368 "`find bin docs ext lib tools -type f |sort`"))))
12369 (delete 'check) ;moved after install
12370 (add-after 'install 'check
12371 (lambda* (#:key tests? #:allow-other-keys)
12372 (when tests?
12373 ;; Increase our test verbosity
12374 (setenv "PUMA_TEST_DEBUG" "1")
12375 (setenv "TESTOPTS" "-v -vv")
12376 (invoke "bundle" "exec" "rake" "test"))))
12377 (add-after 'install 'delete-mkmf.log
12378 (lambda _
12379 ;; Rubygems installs build log files that embed volatile file
12380 ;; names (see:
12381 ;; https://github.com/rubygems/rubygems/issues/6259).
12382 (for-each delete-file (find-files #$output "^mkmf\\.log$"))))
12383 (add-before 'check 'tune-test-environment
12384 (lambda _
12385 ;; Disable minitest parallelization to reduce IO contention,
12386 ;; especially since the tests are run without multiple workers
12387 (setenv "MT_CPU" "0")
12388 ;; The default value is 45 s and easily causes timeouts.
12389 (setenv "TEST_CASE_TIMEOUT" "120")
12390 ;; Give puma tests more time to respond before puma fails them
12391 (setenv "RESP_READ_TIMEOUT" "30")))
12392 (add-before 'check 'disable-problematic-tests
12393 (lambda _
12394 (let-syntax ((skip-tests
12395 (syntax-rules ()
12396 ((_ file test ...)
12397 (substitute* file
12398 (((string-append "def " test ".*") all)
12399 (string-append
12400 all " skip('flaky test on guix')\n")) ...)))))
12401 ;; The test failures were reported at:
12402 ;; https://github.com/puma/puma/issues/3093, but appear to be
12403 ;; caused by the Guix build container, perhaps the lack of
12404 ;; zombie process reaping (see:
12405 ;; https://issues.guix.gnu.org/30948).
12406 ;; Many of these tests seem to only fail on the 'cli' portion
12407 ;; due to something causing them to hang indefinitely
12408 (skip-tests "test/test_plugin.rb"
12409 "test_plugin")
12410 (skip-tests "test/test_plugin_systemd.rb"
12411 "test_plugin_systemd"
12412 "test_systemd_watchdog"
12413 "test_systemd_notify"
12414 "test_refork_phased_restart_with_fork_worker_and_high_worker_count")
12415 (skip-tests "test/test_pumactl.rb"
12416 "test_control_url_and_status"
12417 "test_control_ssl_ipv6"
12418 "test_control_ssl_ipv4")
12419 ;; Disabling the test/*_integration_* tests as they contain many flaky tests
12420 (delete-file "test/test_integration_cluster.rb")
12421 (delete-file "test/test_integration_pumactl.rb")
12422 (delete-file "test/test_integration_single.rb")
12423 (delete-file "test/test_integration_ssl.rb")
12424 (delete-file "test/test_integration_ssl_session.rb")
12425 ;; Other files containing many problematic tests
12426 (delete-file "test/test_cli.rb")
12427 ;; All the tests in the 'test_worker_gem_independence.rb'
12428 ;; module fail with "Expected false to be truthy.".
12429 ;; tests try changing different module versions, but guix
12430 ;; doesn't expose alternate module versions to be tested with
12431 (delete-file "test/test_worker_gem_independence.rb"))))
12432 (add-before 'check 'set-home
12433 (lambda _
12434 ;; Some tests fail if the cannot write to HOME.
12435 (setenv "HOME" "/tmp")))
12436 (add-before 'check 'set-paths
12437 (lambda _
12438 ;; The test suite requires the 'puma' command to be on PATH.
12439 (setenv "PATH" (string-append (getenv "PATH") ":"
12440 #$output "/bin"))
12441 (setenv "GEM_PATH" (string-append
12442 (getenv "GEM_PATH") ":"
12443 #$output "/lib/ruby/vendor_ruby")))))))
12444 (native-inputs
12445 (list bundler
12446 curl
12447 ruby-json
12448 ruby-localhost
12449 ruby-m
12450 ruby-minitest
12451 ruby-minitest-mock
12452 ruby-minitest-proveit
12453 ruby-minitest-retry
12454 ruby-minitest-stub-const
12455 ruby-rackup
12456 ruby-rack-next
12457 ruby-rake-compiler
12458 ruby-webrick))
12459 (inputs
12460 (list openssl
12461 ruby-nio4r))
12462 (propagated-inputs
12463 (list ruby-concurrent-ruby))
12464 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
12465 (description
12466 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
12467for Ruby/Rack applications. Puma is intended for use in both development and
12468production environments. In order to get the best throughput, it is highly
12469recommended that you use a Ruby implementation with real threads like Rubinius
12470or JRuby.")
12471 (home-page "https://puma.io/")
12472 (license license:expat)))
12473
12474(define-public ruby-hoe-git2
12475 (package
12476 (name "ruby-hoe-git2")
12477 (version "1.8.0")
12478 (source
12479 (origin
12480 (method git-fetch)
12481 (uri (git-reference
12482 (url "https://github.com/halostatue/hoe-git2")
12483 (commit (string-append "v" version))))
12484 (file-name (git-file-name name version))
12485 (sha256
12486 (base32 "15gpidgba1xx038srgnnh0dgfjpdq00vhmkl7kmnxl7awf9qldpx"))))
12487 (build-system ruby-build-system)
12488 (inputs (list git-minimal))
12489 (propagated-inputs
12490 (list ruby-hoe-3))
12491 (synopsis "Hoe plugins for tighter Git integration")
12492 (description
12493 "This package provides a set of Hoe plugins for tighter Git integration.
12494It provides tasks to automate release tagging and pushing and changelog
12495generation.")
12496 (home-page "https://github.com/halostatue/hoe-git2")
12497 (license license:expat)))
12498
12499(define-public ruby-hoe-markdown
12500 (package
12501 (name "ruby-hoe-markdown")
12502 (version "1.7.0")
12503 (home-page "https://github.com/flavorjones/hoe-markdown")
12504 (source
12505 (origin
12506 (method git-fetch)
12507 (uri (git-reference
12508 (url home-page)
12509 (commit (string-append "v" version))))
12510 (file-name (git-file-name name version))
12511 (sha256
12512 (base32 "1hkligky33b3rgcsx5qzvackgw6ghln4yp0lpw9wxy0lp14n0vr9"))))
12513 (build-system ruby-build-system)
12514 (arguments
12515 (list
12516 #:test-target "spec"
12517 #:phases
12518 #~(modify-phases %standard-phases
12519 (add-after 'unpack 'disable-bundler-dependency
12520 (lambda _
12521 (substitute* "spec/spec_helper.rb"
12522 (("require.*bundler/setup.*")
12523 ""))
12524 (substitute* "lib/hoe/markdown/standalone.rb"
12525 (("Bundler\\.load_gemspec")
12526 "Gem::Specification.load")))))))
12527 (native-inputs (list ruby-rspec))
12528 (propagated-inputs (list ruby-rake))
12529 (synopsis "Hoe plugin with Markdown helpers")
12530 (description
12531 "This package provides a Hoe plugin with various Markdown helpers, which
12532can be used to e.g. hyperlink Markdown documentation between project files.")
12533 (license license:expat)))
12534
12535(define-public ruby-timecop
12536 (package
12537 (name "ruby-timecop")
12538 (version "0.9.11")
12539 (source
12540 (origin
12541 (method url-fetch)
12542 (uri (rubygems-uri "timecop" version))
12543 (sha256
12544 (base32
12545 "0hkmrkg46qvfla31734d5y28q422z5kfgb41yy2227q4wp34sa21"))))
12546 (build-system ruby-build-system)
12547 (arguments
12548 (list
12549 #:phases
12550 #~(modify-phases %standard-phases
12551 (add-before 'check 'set-check-rubylib
12552 (lambda _
12553 ;; Set RUBYLIB so timecop tests finds its own lib.
12554 (setenv "RUBYLIB" "lib"))))))
12555 (native-inputs
12556 (list bundler
12557 ruby-minitest-rg
12558 ruby-mocha
12559 ruby-activesupport
12560 ruby-pry))
12561 (synopsis "Test mocks for time-dependent functions")
12562 (description
12563 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
12564making it easier to test time-dependent code. It provides a unified method to
12565mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
12566call.")
12567 (home-page "https://github.com/travisjeffery/timecop")
12568 (license license:expat)))
12569
12570(define-public ruby-concurrent-ruby
12571 (package
12572 (name "ruby-concurrent-ruby")
12573 (version "1.3.6")
12574 (source
12575 (origin
12576 (method git-fetch)
12577 (uri (git-reference
12578 ;for tests
12579 (url "https://github.com/ruby-concurrency/concurrent-ruby")
12580 (commit (string-append "v" version))))
12581 (file-name (git-file-name name version))
12582 (sha256
12583 (base32 "08h7r9hh22v1r5pk67gq7b5cpl0vbqh63sh9svw9l2qas2fs8kng"))))
12584 (build-system ruby-build-system)
12585 (arguments
12586 (list
12587 #:tests? #f ;the test suite is run in ruby-concurrent-ruby-edge
12588 #:phases
12589 #~(modify-phases %standard-phases
12590 (add-after 'unpack 'delete-unwanted-gemspecs
12591 (lambda _
12592 (for-each delete-file
12593 '("concurrent-ruby-ext.gemspec"
12594 "concurrent-ruby-edge.gemspec"))))
12595 (add-after 'unpack 'do-not-install-concurrent_ruby.jar
12596 (lambda _
12597 ;; This file is only built when building the Java
12598 ;; extension.
12599 (substitute* "concurrent-ruby.gemspec"
12600 (("'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'")
12601 "")))))))
12602 (synopsis "Concurrency library for Ruby")
12603 (description
12604 "Concurrent Ruby includes concurrency tools such as agents,
12605futures, promises, thread pools, actors, supervisors, and more. It is
12606inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency
12607patterns.")
12608 (home-page "https://github.com/ruby-concurrency/concurrent-ruby")
12609 (license license:expat)))
12610
12611(define-public ruby-concurrent-ruby-ext
12612 (package
12613 (inherit ruby-concurrent-ruby)
12614 (name "ruby-concurrent-ruby-ext")
12615 (arguments
12616 (list
12617 #:tests? #f ;tested as part of concurrent-ruby-edge
12618 #:phases
12619 #~(modify-phases %standard-phases
12620 (add-after 'unpack 'delete-unwanted-gemspecs
12621 (lambda _
12622 (for-each delete-file
12623 '("concurrent-ruby.gemspec"
12624 "concurrent-ruby-edge.gemspec")))))))
12625 (native-inputs (list ruby-rake-compiler))
12626 (propagated-inputs (list ruby-concurrent-ruby))
12627 (synopsis "C extensions for concurrent-ruby")
12628 (description "This package provides C extensions to optimize the
12629concurrent-ruby gem when running under the Matz's Ruby Interpreter (MRI, also
12630known as CRuby).")))
12631
12632(define-public ruby-concurrent-ruby-edge
12633 (package
12634 (inherit ruby-concurrent-ruby)
12635 (name "ruby-concurrent-ruby-edge")
12636 (arguments
12637 (list
12638 #:phases
12639 #~(modify-phases %standard-phases
12640 (add-after 'unpack 'delete-unwanted-gemspecs
12641 (lambda _
12642 (for-each delete-file
12643 '("concurrent-ruby.gemspec"
12644 "concurrent-ruby-ext.gemspec"))))
12645 ;; The tests rely on the Gem being installed, so move the check
12646 ;; phase after the install phase.
12647 (delete 'check)
12648 (add-after 'install 'check
12649 (lambda* (#:key tests? #:allow-other-keys)
12650 (setenv "GEM_PATH" (string-append
12651 (getenv "GEM_PATH") ":"
12652 #$output "/lib/ruby/vendor_ruby"))
12653 (when tests?
12654 (invoke "rake" "ci")))))))
12655 (native-inputs
12656 (list ruby-rake-compiler
12657 ruby-rake-compiler-dock
12658 ruby-rspec
12659 ruby-timecop
12660 ruby-yard))
12661 (propagated-inputs
12662 (list ruby-concurrent-ruby ruby-concurrent-ruby-ext))
12663 (synopsis "Edge features and additions to the @code{concurrent-ruby} gem")
12664 (description "The @code{concurrent-ruby-edge} gem includes
12665@code{concurrent-ruby} features that are under active development and may
12666change frequently. They are expected not to keep backward
12667compatibility (there may also lack tests and documentation), although semantic
12668versions are obeyed though. Features developed in @code{concurrent-ruby-edge}
12669are expected to move to @code{concurrent-ruby} when final.")))
12670
12671(define-public ruby-pkg-config
12672 (package
12673 (name "ruby-pkg-config")
12674 (version "1.2.5")
12675 (source
12676 (origin
12677 (method url-fetch)
12678 (uri (rubygems-uri "pkg-config" version))
12679 (sha256
12680 (base32
12681 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
12682 (build-system ruby-build-system)
12683 (arguments
12684 ;; Tests require extra files not included in the gem.
12685 `(#:tests? #f))
12686 (synopsis "Detect libraries for compiling Ruby native extensions")
12687 (description
12688 "@code{pkg-config} can be used in your extconf.rb to properly detect need
12689libraries for compiling Ruby native extensions.")
12690 (home-page "https://github.com/ruby-gnome2/pkg-config")
12691 (license license:lgpl2.0+)))
12692
12693(define-public ruby-net-http-digest-auth
12694 (package
12695 (name "ruby-net-http-digest-auth")
12696 (version "1.4.1")
12697 (source
12698 (origin
12699 (method url-fetch)
12700 (uri (rubygems-uri "net-http-digest_auth" version))
12701 (sha256
12702 (base32
12703 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
12704 (build-system ruby-build-system)
12705 (native-inputs
12706 (list ruby-hoe
12707 ruby-minitest))
12708 (synopsis "RFC 2617 HTTP digest authentication library")
12709 (description
12710 "This library implements HTTP's digest authentication scheme based on
12711RFC 2617. This enables the use of the digest authentication scheme instead
12712of the more insecure basic authentication scheme.")
12713 (home-page "https://github.com/drbrain/net-http-digest_auth")
12714 (license license:expat)))
12715
12716(define-public ruby-mail
12717 (package
12718 (name "ruby-mail")
12719 (version "2.8.1")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (rubygems-uri "mail" version))
12724 (sha256
12725 (base32 "1bf9pysw1jfgynv692hhaycfxa8ckay1gjw5hz3madrbrynryfzc"))))
12726 (build-system ruby-build-system)
12727 (propagated-inputs
12728 (list ruby-mini-mime))
12729 (arguments
12730 '(#:tests? #f)) ; no rakefile
12731 (synopsis "Mail library for Ruby")
12732 (description
12733 "Mail is an internet library for Ruby that is designed to handle email
12734generation, parsing and sending. The purpose of this library is to provide
12735a single point of access to handle all email functions, including sending
12736and receiving emails. All network type actions are done through proxy
12737methods to @code{Net::SMTP}, @code{Net::POP3} etc.
12738
12739Mail has been designed with a very simple object oriented system that
12740really opens up the email messages you are parsing, if you know what you
12741are doing, you can fiddle with every last bit of your email directly.")
12742 (home-page "https://github.com/mikel/mail")
12743 (license license:expat)))
12744
12745(define-public ruby-net-protocol
12746 (package
12747 (name "ruby-net-protocol")
12748 (version "0.2.1")
12749 (source (origin
12750 (method git-fetch)
12751 (uri (git-reference
12752 (url "https://github.com/ruby/net-protocol")
12753 (commit (string-append "v" version))))
12754 (file-name (git-file-name name version))
12755 (sha256
12756 (base32
12757 "0niivmjx7bc6vsylc1ag17mw6mnvjxw02s7cin1f0422xyr8msq9"))))
12758 (build-system ruby-build-system)
12759 (propagated-inputs (list ruby-timeout))
12760 (synopsis "Abstract interface for Ruby network clients")
12761 (description "This Ruby library provides an abstract interface for network
12762clients.")
12763 (home-page "https://github.com/ruby/net-protocol")
12764 (license (list license:bsd-2))))
12765
12766(define-public ruby-email-reply-trimmer
12767 (package
12768 (name "ruby-email-reply-trimmer")
12769 (version "0.1.13")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (rubygems-uri "email_reply_trimmer" version))
12774 (sha256
12775 (base32
12776 "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
12777 (build-system ruby-build-system)
12778 (synopsis "Trim replies from plain text email")
12779 (description "EmailReplyTrimmer is a Ruby small library to trim replies
12780from plain text email.")
12781 (home-page "https://github.com/discourse/email_reply_trimmer")
12782 (license license:expat)))
12783
12784(define-public ruby-mathn
12785 (package
12786 (name "ruby-mathn")
12787 (version "0.1.0")
12788 (source
12789 (origin
12790 (method url-fetch)
12791 (uri (rubygems-uri "mathn" version))
12792 (sha256
12793 (base32
12794 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
12795 (build-system ruby-build-system)
12796 (native-inputs
12797 (list bundler ruby-rake-compiler))
12798 (synopsis "Extends math operations for increased precision")
12799 (description
12800 "This gem makes mathematical operations more precise in Ruby and
12801integrates other mathematical standard libraries. Prior to Ruby 2.5,
12802@code{mathn} was part of the Ruby standard library.")
12803 (home-page "https://github.com/ruby/mathn")
12804 (license license:bsd-2)))
12805
12806(define-public ruby-code-statistics
12807 (package
12808 (name "ruby-code-statistics")
12809 (version "0.2.13")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (rubygems-uri "code_statistics" version))
12814 (sha256
12815 (base32
12816 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
12817 (build-system ruby-build-system)
12818 (arguments
12819 `(#:tests? #f)) ; Not all test code is included in gem.
12820 (synopsis "Port of the rails 'rake stats' method")
12821 (description
12822 "This gem is a port of the rails 'rake stats' method so it can be made
12823more robust and work for non rails projects.")
12824 (home-page "https://github.com/danmayer/code_statistics")
12825 (license license:expat)))
12826
12827(define-public ruby-ruby2-keywords
12828 (package
12829 (name "ruby-ruby2-keywords")
12830 (version "0.0.5")
12831 (source (origin
12832 (method git-fetch)
12833 (uri (git-reference
12834 (url "https://github.com/ruby/ruby2_keywords")
12835 (commit (string-append "v" version))))
12836 (file-name (git-file-name name version))
12837 (sha256
12838 (base32
12839 "1jhqb152zfr2yrxj6j8rzakkwdkg5viggwnnqrrfxwwy63msdi97"))))
12840 (build-system ruby-build-system)
12841 (arguments
12842 (list
12843 #:phases
12844 #~(modify-phases %standard-phases
12845 (add-after 'unpack 'delete-extraneous-rake-files
12846 (lambda _
12847 (for-each delete-file '("rakelib/changelogs.rake"
12848 "rakelib/epoch.rake"
12849 "rakelib/version.rake"))))
12850 (add-after 'extract-gemspec 'adjust-files
12851 (lambda _
12852 (substitute* "ruby2_keywords.gemspec"
12853 ;; This file is not present in the git checkout.
12854 ((".*\"ChangeLog\",.*") "")))))))
12855 (synopsis "Shim library for Module#ruby2_keywords")
12856 (description "Provides empty @code{Module#ruby2_keywords} method, for the
12857forward source-level compatibility against @command{ruby2.7} and
12858@command{ruby3}.")
12859 (home-page "https://github.com/ruby/ruby2_keywords")
12860 (license license:bsd-2)))
12861
12862(define-public ruby-rubypants
12863 (package
12864 (name "ruby-rubypants")
12865 (version "0.6.0")
12866 (source (origin
12867 (method url-fetch)
12868 (uri (rubygems-uri "rubypants" version))
12869 (sha256
12870 (base32
12871 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
12872 (build-system ruby-build-system)
12873 (arguments
12874 '(#:tests? #f)) ; need Codecov
12875 (synopsis "Port of the smart-quotes library SmartyPants")
12876 (description
12877 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
12878original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
12879and BBEdit that easily translates plain ASCII punctuation characters into
12880smart typographic punctuation HTML entities.")
12881 (home-page "https://github.com/jmcnevin/rubypants")
12882 (license license:bsd-2)))
12883
12884(define-public ruby-org-ruby
12885 (package
12886 (name "ruby-org-ruby")
12887 (version "0.9.12")
12888 (source (origin
12889 (method url-fetch)
12890 (uri (rubygems-uri "org-ruby" version))
12891 (sha256
12892 (base32
12893 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
12894 (build-system ruby-build-system)
12895 (arguments
12896 '(#:tests? #f)) ; no rakefile
12897 (propagated-inputs
12898 (list ruby-rubypants))
12899 (synopsis "Org-mode parser written in Ruby")
12900 (description
12901 "Org-ruby is an org-mode parser written in Ruby. The most significant
12902thing this library does today is convert org-mode files to HTML or Textile or
12903Markdown.")
12904 (home-page "https://github.com/wallyqs/org-ruby")
12905 (license license:expat)))
12906
12907(define-public ruby-rake-manifest
12908 (package
12909 (name "ruby-rake-manifest")
12910 (version "0.2.3")
12911 (source (origin
12912 (method git-fetch)
12913 (uri (git-reference
12914 (url "https://github.com/mvz/rake-manifest")
12915 (commit (string-append "v" version))))
12916 (file-name (git-file-name name version))
12917 (sha256
12918 (base32
12919 "16k2yvg773c25kp2vhzhp01rhf53k0nhrcmpv34k1fridw90r2k8"))))
12920 (build-system ruby-build-system)
12921 (arguments
12922 (list
12923 #:test-target "default"
12924 #:phases
12925 #~(modify-phases %standard-phases
12926 (delete 'check) ;moved after the install phase
12927 (add-after 'install 'check
12928 (assoc-ref %standard-phases 'check))
12929 (add-before 'check 'set-GEM_PATH
12930 (lambda _
12931 (setenv "GEM_PATH" (string-append
12932 (getenv "GEM_PATH") ":"
12933 #$output "/lib/ruby/vendor_ruby")))))))
12934 (native-inputs (list ruby-rspec ruby-simplecov))
12935 (synopsis "Rake tasks to generate and check a manifest file")
12936 (description "This package provides Rake tasks to generate and check a
12937manifest file.")
12938 (home-page "https://github.com/mvz/rake-manifest")
12939 (license license:expat)))
12940
12941(define-public ruby-sfl
12942 (package
12943 (name "ruby-sfl")
12944 (version "2.3")
12945 (source (origin
12946 (method url-fetch)
12947 (uri (rubygems-uri "sfl" version))
12948 (sha256
12949 (base32
12950 "1qm4hvhq9pszi9zs1cl9qgwx1n4wxq0af0hq9sbf6qihqd8rwwwr"))))
12951 (build-system ruby-build-system)
12952 (arguments
12953 `(#:tests? #f ;; some tests fail, gem is a dummy for ruby >= 1.9 anyway
12954 #:test-target "spec"))
12955 (synopsis "Spawn for Ruby 1.8")
12956 (description "This pure ruby library provides @code{spawn()} which is
12957almost perfectly compatible with ruby 1.9's.")
12958 (home-page "https://github.com/ujihisa/spawn-for-legacy")
12959 (license license:bsd-2)))
12960
12961(define-public ruby-childprocess
12962 (package
12963 (name "ruby-childprocess")
12964 (version "5.1.0")
12965 (source
12966 (origin
12967 (method url-fetch)
12968 (uri (rubygems-uri "childprocess" version))
12969 (sha256
12970 (base32
12971 "1v5nalaarxnfdm6rxb7q6fmc6nx097jd630ax6h9ch7xw95li3cs"))))
12972 (build-system ruby-build-system)
12973 (arguments
12974 `(#:test-target "spec"
12975 #:phases
12976 (modify-phases %standard-phases
12977 (add-after 'unpack 'sanitize-dependencies
12978 (lambda _
12979 (substitute* "childprocess.gemspec"
12980 ((".*coveralls.*") ""))
12981 (substitute* "spec/spec_helper.rb"
12982 ((".*[Cc]overalls.*") ""))))
12983 (add-after 'unpack 'patch
12984 (lambda _
12985 (substitute* "spec/spec_helper.rb"
12986 (("#!/bin/sh\\\\n") (string-append "#!" (which "sh") "\\n")))))
12987 (add-before 'check 'disable-broken-tests
12988 (lambda* (#:key tests? #:allow-other-keys)
12989 (when tests?
12990 (let ((skippedtests
12991 (list ;; Disable Rubygems version warning check
12992 "ChildProcess validates cleanly")))
12993 (setenv "SPEC_OPTS"
12994 (string-append
12995 "--warnings" " "
12996 ;; Disable tests failing in the guix environment:
12997 "--example-matches "
12998 "'(^(?!.*(" (string-join skippedtests "|") ")).*)'")))
12999 (invoke "rspec")))))))
13000 (native-inputs
13001 (list ruby-coveralls ruby-rspec))
13002 (synopsis "Control external programs running in the background, in Ruby")
13003 (description "@code{childprocess} provides a gem to control external
13004programs running in the background, in Ruby.")
13005 (home-page "https://github.com/enkessler/childprocess")
13006 (license license:expat)))
13007
13008(define-public ruby-public-suffix
13009 (package
13010 (name "ruby-public-suffix")
13011 (version "4.0.5")
13012 (source (origin
13013 (method url-fetch)
13014 (uri (rubygems-uri "public_suffix" version))
13015 (sha256
13016 (base32
13017 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
13018 (build-system ruby-build-system)
13019 (arguments
13020 '(#:phases
13021 (modify-phases %standard-phases
13022 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
13023 ;; including it as an input can lead to circular dependencies.
13024 (add-after 'unpack 'remove-rubocop-from-Rakefile
13025 (lambda _
13026 (substitute* "Rakefile"
13027 (("require \"rubocop/rake\\_task\"") "")
13028 (("RuboCop::RakeTask\\.new") "")))))))
13029 (native-inputs
13030 (list bundler ruby-yard/minimal ruby-mocha ruby-minitest-reporters))
13031 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
13032 (synopsis "Domain name parser")
13033 (description "The gem @code{public_suffix} is a domain name parser,
13034written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
13035is one under which Internet users can (or historically could) directly
13036register names. Some examples of public suffixes are @code{.com},
13037@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
13038all known public suffixes.")
13039 (license license:expat)))
13040
13041(define-public ruby-addressable
13042 (package
13043 (name "ruby-addressable")
13044 (version "2.8.1")
13045 (source (origin
13046 (method url-fetch)
13047 (uri (rubygems-uri "addressable" version))
13048 (sha256
13049 (base32
13050 "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"))))
13051 (build-system ruby-build-system)
13052 (arguments
13053 '(#:test-target "spec"
13054 #:phases
13055 (modify-phases %standard-phases
13056 (add-after 'unpack 'disable-bundler
13057 (lambda _
13058 (substitute* "spec/spec_helper.rb"
13059 (("require 'bundler/setup'") ""))))
13060 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
13061 (lambda _
13062 (substitute* "Gemfile"
13063 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
13064 ((".*launchy.*") "")
13065 ((".*rake.*") "gem 'rake'\n")
13066 ((".*redcarpet.*") ""))))
13067 (add-before 'check 'delete-network-dependent-test
13068 (lambda _
13069 (delete-file "spec/addressable/net_http_compat_spec.rb"))))))
13070 (native-inputs
13071 (list bundler
13072 ruby-idn-ruby
13073 ruby-rspec
13074 ruby-rspec-its-minimal
13075 ruby-simplecov
13076 ruby-sporkmonger-rack-mount
13077 ruby-yard/minimal))
13078 (propagated-inputs
13079 (list ruby-public-suffix))
13080 (home-page "https://github.com/sporkmonger/addressable")
13081 (synopsis "Alternative URI implementation")
13082 (description "Addressable is a replacement for the URI implementation that
13083is part of Ruby's standard library. It more closely conforms to RFC 3986,
13084RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
13085 (license license:asl2.0)))
13086
13087(define-public ruby-colorize
13088 (package
13089 (name "ruby-colorize")
13090 (version "0.8.1")
13091 (source (origin
13092 (method url-fetch)
13093 (uri (rubygems-uri "colorize" version))
13094 (sha256
13095 (base32
13096 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
13097 (build-system ruby-build-system)
13098 (arguments
13099 '(#:phases (modify-phases %standard-phases
13100 (add-before 'check 'remove-codeclimate-dependency
13101 (lambda _
13102 (substitute* "test/test_colorize.rb"
13103 ;; Do not hook the tests into the online CodeClimate
13104 ;; service which is unnecessary for these tests.
13105 (("require 'codeclimate-test-reporter'")
13106 "")
13107 (("CodeClimate.*") "")))))))
13108 (synopsis "Add color effects to the @code{String} class")
13109 (description
13110 "This package extends the @code{String} class and adds a
13111@code{ColorizedString} with methods to set text color, background color,
13112and text effects.")
13113 (home-page "https://github.com/fazibear/colorize")
13114 (license license:gpl2+)))
13115
13116(define-public ruby-colorator
13117 (package
13118 (name "ruby-colorator")
13119 (version "1.1.0")
13120 (source (origin
13121 (method url-fetch)
13122 (uri (rubygems-uri "colorator" version))
13123 (sha256
13124 (base32
13125 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
13126 (build-system ruby-build-system)
13127 (arguments
13128 ;; No test target
13129 `(#:tests? #f))
13130 (home-page "http://octopress.org/colorator/")
13131 (synopsis "Terminal color library")
13132 (description "Colorator is a Ruby gem that helps you colorize your text
13133for the terminal.")
13134 (license license:expat)))
13135
13136(define-public ruby-command-line-reporter
13137 (package
13138 (name "ruby-command-line-reporter")
13139 (version "4.0.1")
13140 (source (origin
13141 (method url-fetch)
13142 (uri (rubygems-uri "command_line_reporter" version))
13143 (sha256
13144 (base32
13145 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
13146 (build-system ruby-build-system)
13147 (arguments
13148 ;; No Rakefile
13149 `(#:tests? #f
13150 #:phases
13151 (modify-phases %standard-phases
13152 (add-before 'build 'fix-dependencies
13153 (lambda _
13154 (substitute* ".gemspec"
13155 ;; colored is unmaintained
13156 (("colored") "colorator")
13157 ;; colorator version
13158 (("= 1.2") "= 1.1")))))))
13159 (propagated-inputs (list ruby-colorator))
13160 (home-page "https://github.com/wbailey/command_line_reporter")
13161 (synopsis "Report production while executing Ruby scripts")
13162 (description "This gem provides a DSL that makes it easy to write reports
13163of various types in ruby. It eliminates the need to litter your source with
13164puts statements, instead providing a more readable, expressive interface to
13165your application.")
13166 (license license:asl2.0)))
13167
13168(define-public ruby-command-line-reporter-3
13169 (package
13170 (inherit ruby-command-line-reporter)
13171 (version "3.3.6")
13172 (source (origin
13173 (method url-fetch)
13174 (uri (rubygems-uri "command_line_reporter" version))
13175 (sha256
13176 (base32
13177 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
13178
13179(define-public ruby-kpeg
13180 (package
13181 (name "ruby-kpeg")
13182 (version "1.3.3")
13183 (source
13184 (origin
13185 (method url-fetch)
13186 (uri (rubygems-uri "kpeg" version))
13187 (sha256
13188 (base32
13189 "0jxddpyb23digcd8b1b02gn94057a7mw17680c3c8s3bcb5xqfnp"))))
13190 (build-system ruby-build-system)
13191 (native-inputs
13192 (list ruby-hoe))
13193 (synopsis "PEG library for Ruby")
13194 (description "KPeg is a simple PEG library for Ruby. It provides an API as
13195well as native grammar to build the grammar. KPeg supports direct left
13196recursion of rules via the
13197@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
13198technique.")
13199 (home-page "https://github.com/evanphx/kpeg")
13200 (license license:expat)))
13201
13202(define-public ruby-rdoc
13203 (package
13204 (name "ruby-rdoc")
13205 (version "8.0.0")
13206 ;; The source contains some generated files via racc and kpeg.
13207 ;; However the generated result is not deterministic [1] with
13208 ;; multiple runs.
13209 ;; [1] https://github.com/ruby/rdoc/blob/v8.0.0/Rakefile#L91-L93
13210 (source
13211 (origin
13212 (method git-fetch)
13213 (uri (git-reference
13214 (url "https://github.com/ruby/rdoc")
13215 (commit (string-append "v" version))))
13216 (file-name (git-file-name name version))
13217 (sha256
13218 (base32
13219 "1ga4d34allpqglal403x897pxq0a713v4f6w0ln43x8xv362mapf"))))
13220 (build-system ruby-build-system)
13221 ;; Document generation in the install phase causes errors since it
13222 ;; conflicts with the Ruby's builtin version of RDoc.
13223 (arguments (list #:gem-flags #~(list "--no-document")))
13224 (native-inputs (list ruby-test-unit-ruby-core))
13225 (propagated-inputs (list ruby-erb ruby-tsort ruby-prism ruby-rbs))
13226 (home-page "https://ruby.github.io/rdoc/")
13227 (synopsis "HTML and command-line documentation utility")
13228 (description "RDoc produces HTML and command-line documentation for Ruby
13229projects. RDoc includes the @samp{rdoc} and @samp{ri} tools for
13230generating and displaying documentation from the command-line.")
13231 (license license:gpl2+)))
13232
13233(define-public ruby-sass-listen
13234 (package
13235 (name "ruby-sass-listen")
13236 (version "4.0.0")
13237 (source (origin
13238 (method url-fetch)
13239 (uri (rubygems-uri "sass-listen" version))
13240 (sha256
13241 (base32
13242 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
13243 (build-system ruby-build-system)
13244 (arguments
13245 ;; No test target
13246 `(#:tests? #f))
13247 (propagated-inputs
13248 (list ruby-rb-fsevent ruby-rb-inotify))
13249 (home-page "https://github.com/sass/listen")
13250 (synopsis "File modification notification library")
13251 (description "The Listen gem listens to file modifications and notifies you
13252about the changes.")
13253 (license license:expat)))
13254
13255(define-public ruby-terminfo
13256 (let ((commit "f4a597d92dcc465e7b343f9afb8cd45607c8e969")
13257 (revision "0"))
13258 (package
13259 (name "ruby-terminfo")
13260 (version (git-version "0.2" revision commit))
13261 (source
13262 (origin
13263 (method git-fetch)
13264 (uri
13265 (git-reference
13266 (url "https://github.com/genki/ruby-terminfo")
13267 (commit commit)))
13268 (file-name (git-file-name name version))
13269 (sha256
13270 (base32 "0b24sqf0jwj8m106nh35hjayw1kiyrpramb6vg7fnz32mqni6hdi"))))
13271 (build-system ruby-build-system)
13272 (arguments
13273 (list
13274 #:phases
13275 #~(modify-phases %standard-phases
13276 (delete 'replace-git-ls-files)
13277 (replace 'build
13278 (lambda _
13279 (invoke "ruby" "extconf.rb")
13280 (invoke "make")))
13281 (replace 'check
13282 (lambda* (#:key tests? #:allow-other-keys)
13283 (when tests?
13284 (for-each (lambda (f)
13285 (invoke "ruby" "-Ilib:test" "-Ilib:." f))
13286 (find-files "test" "^test_.*\\.rb$")))))
13287 (replace 'install
13288 (lambda _
13289 (invoke "make" "install" (string-append "prefix=" #$output)))))))
13290 (inputs
13291 (list ncurses))
13292 (native-inputs
13293 (list ruby-rubygems-tasks ruby-rdoc))
13294 (home-page "http://www.a-k-r.org/ruby-terminfo/")
13295 (synopsis "Terminfo binding for Ruby")
13296 (description "Ruby-terminfo provides terminfo binding for Ruby.")
13297 (license license:bsd-3))))
13298
13299(define-public ruby-diffy
13300 (package
13301 (name "ruby-diffy")
13302 (version "3.4.4")
13303 (source
13304 (origin
13305 (method url-fetch)
13306 (uri (rubygems-uri "diffy" version))
13307 (sha256
13308 (base32
13309 "1qs7drxvyzk3dg22xgblc12lq5kww9hhj7vpn8ay3l42rasllf3r"))))
13310 (build-system ruby-build-system)
13311 (arguments (list #:test-target "spec"))
13312 (native-inputs
13313 (list ruby-rake ruby-rspec))
13314 (home-page "https://github.com/samg/diffy")
13315 (synopsis "Convenient diffing in ruby")
13316 (description "Diffy provides a convenient way to generate a diff from two
13317strings or files.")
13318 (license license:expat)))
13319
13320(define-public ruby-sass-spec
13321 (package
13322 (name "ruby-sass-spec")
13323 (version "3.5.4")
13324 (source
13325 (origin
13326 (method git-fetch)
13327 (uri (git-reference
13328 (url "https://github.com/sass/sass-spec")
13329 (commit (string-append "v" version))))
13330 (file-name (git-file-name name version))
13331 (sha256
13332 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
13333 (build-system ruby-build-system)
13334 (propagated-inputs
13335 (list ruby-command-line-reporter-3
13336 ruby-diffy))
13337 (arguments
13338 (list
13339 ;; This package contains tests for a sass implementation, and the to
13340 ;; avoid any circular dependencies, the tests are not run here
13341 #:tests? #f
13342 #:phases
13343 #~(modify-phases %standard-phases
13344 (add-after 'unpack 'patch-test
13345 (lambda _
13346 (delete-file "spec/values/colors/alpha_hex-3.5/error")
13347 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
13348 (("string") "color")))))))
13349 (home-page "https://github.com/sass/sass-spec")
13350 (synopsis "Test suite for Sass")
13351 (description "Sass Spec is a test suite for Sass. Test cases are all in
13352the @file{spec} directory.")
13353 (license license:expat)))
13354
13355(define-public ruby-sassc
13356 (package
13357 (name "ruby-sassc")
13358 (version "2.4.0")
13359 (source
13360 (origin
13361 (method url-fetch)
13362 (uri (rubygems-uri "sassc" version))
13363 (sha256
13364 (base32
13365 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
13366 (build-system ruby-build-system)
13367 (arguments
13368 '(#:modules ((guix build ruby-build-system)
13369 (guix build utils)
13370 (ice-9 textual-ports))
13371 #:phases
13372 (modify-phases %standard-phases
13373 (add-after 'unpack 'patch-minitest
13374 (lambda _
13375 (substitute* (find-files "test" "\\.rb$")
13376 (("MiniTest")
13377 "Minitest"))))
13378 ;; TODO: This would be better as a snippet, but the ruby-build-system
13379 ;; doesn't seem to support that
13380 (add-after 'unpack 'remove-libsass
13381 (lambda _
13382 (delete-file-recursively "ext")
13383 (with-atomic-file-replacement "sassc.gemspec"
13384 (lambda (in out)
13385 (let* ((gemspec (get-string-all in))
13386 (index (string-contains gemspec "libsass_dir")))
13387 (display (string-append
13388 (string-take gemspec index)
13389 "\nend\n")
13390 out))))))
13391 (add-after 'unpack 'dont-check-the-libsass-version
13392 (lambda _
13393 (substitute* "test/native_test.rb"
13394 (("assert_equal.*Native\\.version") ""))))
13395 (add-after 'unpack 'remove-git-from-gemspec
13396 (lambda _
13397 (substitute* "sassc.gemspec"
13398 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
13399 (add-after 'unpack 'remove-extensions-from-gemspec
13400 (lambda _
13401 (substitute* "sassc.gemspec"
13402 (("\\[\"ext/extconf.rb\"\\]") "[]"))))
13403 (add-after 'unpack 'fix-Rakefile
13404 (lambda _
13405 (substitute* "Rakefile"
13406 (("test: 'compile:libsass'") ":test"))))
13407 (add-after 'unpack 'remove-unnecessary-dependencies
13408 (lambda _
13409 (substitute* "test/test_helper.rb"
13410 (("require \"pry\"") ""))))
13411 (add-before 'build 'patch-native.rb
13412 (lambda* (#:key inputs #:allow-other-keys)
13413 (substitute* "lib/sassc/native.rb"
13414 ((".*gem_root = spec.gem_dir") "")
13415 (("ffi_lib .*\n")
13416 (string-append
13417 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))))
13418 ;; The gemspec still references the libsass files, so just keep the
13419 ;; one in the gem.
13420 (delete 'extract-gemspec))))
13421 (propagated-inputs
13422 (list ruby-ffi ruby-rake))
13423 (inputs
13424 (list libsass))
13425 (native-inputs
13426 (list bundler ruby-rake-compiler ruby-minitest-around
13427 ruby-test-construct))
13428 (synopsis "Use libsss from Ruby")
13429 (description
13430 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
13431bindings to the libsass library. This enables rendering
13432@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
13433 (home-page "https://github.com/sass/sassc-ruby")
13434 (license license:expat)))
13435
13436(define-public ruby-jekyll-sass-converter
13437 (package
13438 (name "ruby-jekyll-sass-converter")
13439 (version "2.2.0")
13440 (source (origin
13441 (method url-fetch)
13442 (uri (rubygems-uri "jekyll-sass-converter" version))
13443 (sha256
13444 (base32
13445 "077xkkkb592vg8kxdia9jwsaz1bc70lkpf4hdvazjqphn5hlz2bi"))))
13446 (build-system ruby-build-system)
13447 (arguments
13448 ;; No rakefile
13449 `(#:tests? #f))
13450 (propagated-inputs (list ruby-sassc))
13451 (home-page "https://github.com/jekyll/jekyll-sass-converter")
13452 (synopsis "Sass converter for Jekyll")
13453 (description "This gem provide built-in support for the Sass converter
13454in Jekyll.")
13455 (license license:expat)))
13456
13457(define-public ruby-jekyll-watch
13458 (package
13459 (name "ruby-jekyll-watch")
13460 (version "2.1.2")
13461 (source (origin
13462 (method url-fetch)
13463 (uri (rubygems-uri "jekyll-watch" version))
13464 (sha256
13465 (base32
13466 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
13467 (build-system ruby-build-system)
13468 (propagated-inputs
13469 (list ruby-listen))
13470 (arguments
13471 ;; No rakefile
13472 `(#:tests? #f))
13473 (home-page "https://github.com/jekyll/jekyll-watch")
13474 (synopsis "Jekyll auto-rebuild support")
13475 (description "This gems add the @code{--watch} switch to the jekyll CLI
13476interface. It allows Jekyll to rebuild your site when a file changes.")
13477 (license license:expat)))
13478
13479(define-public ruby-parallel
13480 (package
13481 (name "ruby-parallel")
13482 (version "1.21.0")
13483 (source
13484 (origin
13485 (method git-fetch)
13486 (uri (git-reference
13487 (url "https://github.com/grosser/parallel")
13488 (commit (string-append "v" version))))
13489 (file-name (git-file-name name version))
13490 (sha256
13491 (base32
13492 "1xqjcvl3gq3shvrqp8wc3fbqibzh4mf1yczq6np9gd79558dwj3w"))))
13493 (build-system ruby-build-system)
13494 (arguments
13495 `(;; TODO 3 test failures
13496 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
13497 ;; open unnecessary pipes
13498 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
13499 ;; SQLite in processes
13500 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
13501 ;; SQLite in threads
13502 #:tests? #f
13503 #:test-target "rspec-rerun:spec"
13504 #:phases
13505 (modify-phases %standard-phases
13506 (add-after 'unpack 'patch-Gemfile
13507 (lambda _
13508 (substitute* "Gemfile"
13509 (("gem 'rspec-legacy_formatters'") "")
13510 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
13511 (add-before 'check 'delete-Gemfile.lock
13512 (lambda _
13513 ;; Bundler isn't being used for fetching dependencies, so
13514 ;; delete the Gemfile.lock
13515 (delete-file "Gemfile.lock")))
13516 (add-before 'build 'patch-gemspec
13517 (lambda _
13518 (substitute* "parallel.gemspec"
13519 (("git ls-files") "find")))))))
13520 (native-inputs
13521 (list ruby-rspec
13522 ruby-rspec-rerun
13523 bundler
13524 ruby-activerecord
13525 ruby-progressbar
13526 ruby-bump
13527 procps
13528 lsof
13529 ruby-mysql2
13530 ruby-sqlite3
13531 ruby-i18n))
13532 (home-page "https://github.com/grosser/parallel")
13533 (synopsis "Parallel processing in Ruby")
13534 (description "Parallel allows you to run any code in parallel Processes
13535(to use all CPUs) or Threads(to speedup blocking operations). It is best
13536suited for map-reduce or e.g. parallel downloads/uploads.")
13537 (license license:expat)))
13538
13539(define-public ruby-cabin
13540 (package
13541 (name "ruby-cabin")
13542 (version "0.9.0")
13543 (source (origin
13544 (method url-fetch)
13545 (uri (rubygems-uri "cabin" version))
13546 (sha256
13547 (base32
13548 "0b3b8j3iqnagjfn1261b9ncaac9g44zrx1kcg81yg4z9i513kici"))))
13549 (build-system ruby-build-system)
13550 (arguments (list #:tests? #f)) ;no Rakefile in released gem
13551 (synopsis "Structured and contextual logging experiments in Ruby")
13552 (description "This Ruby library provides an experimental logging system
13553that tries to make logging more flexible and more consumable than plain-text
13554logging.")
13555 (home-page "https://github.com/jordansissel/ruby-cabin")
13556 (license license:asl2.0)))
13557
13558(define-public ruby-capybara
13559 (package
13560 (name "ruby-capybara")
13561 (version "3.38.0")
13562 (source (origin
13563 (method url-fetch)
13564 (uri (rubygems-uri "capybara" version))
13565 (sha256
13566 (base32
13567 "123198zk2ak8mziwa5jc3ckgpmsg08zn064n3aywnqm9s1bwjv3v"))))
13568 (build-system ruby-build-system)
13569 (arguments
13570 (list #:tests? #f ;sinatra is currently broken with rack 3
13571 #:phases
13572 #~(modify-phases %standard-phases
13573 (add-after 'extract-gemspec 'remove-extraneous-requirements
13574 (lambda _
13575 (substitute* "spec/spec_helper.rb"
13576 ((".*require 'selenium_statistics'.*") "")
13577 ((".*SeleniumStatistics.print_results.*") ""))))
13578 (replace 'check
13579 (lambda* (#:key tests? #:allow-other-keys)
13580 (when tests?
13581 (invoke "rspec" "spec")))))))
13582 (native-inputs
13583 (list ruby-puma
13584 ruby-rspec
13585 ruby-selenium-webdriver
13586 ruby-sinatra))
13587 (propagated-inputs
13588 (list ruby-addressable
13589 ruby-launchy
13590 ruby-matrix
13591 ruby-mini-mime
13592 ruby-nokogiri
13593 ruby-rack
13594 ruby-rack-test
13595 ruby-regexp-parser
13596 ruby-xpath))
13597 (synopsis "Integration testing tool for rack-based web applications")
13598 (description "Capybara is an integration testing tool for rack based web
13599applications. It simulates how a user would interact with a website.")
13600 (home-page "https://github.com/teamcapybara/capybara")
13601 (license license:expat)))
13602
13603(define-public ruby-cane
13604 (package
13605 (name "ruby-cane")
13606 (version "3.0.0")
13607 (source (origin
13608 (method url-fetch)
13609 (uri (rubygems-uri "cane" version))
13610 (sha256
13611 (base32
13612 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
13613 (build-system ruby-build-system)
13614 (arguments `(#:tests? #f)); No rakefile
13615 (home-page "https://github.com/square/cane")
13616 (propagated-inputs
13617 (list ruby-parallel))
13618 (synopsis "Code quality threshold checking")
13619 (description "Cane fails your build if code quality thresholds are not met.")
13620 (license license:asl2.0)))
13621
13622(define-public ruby-morecane
13623 (package
13624 (name "ruby-morecane")
13625 (version "0.2.0")
13626 (source (origin
13627 (method url-fetch)
13628 (uri (rubygems-uri "morecane" version))
13629 (sha256
13630 (base32
13631 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
13632 (build-system ruby-build-system)
13633 (home-page "https://github.com/yob/morecane")
13634 (arguments `(#:tests? #f)); No rakefile
13635 (propagated-inputs
13636 (list ruby-parallel))
13637 (synopsis "Extra checks for cane")
13638 (description "The cane gem provides a great framework for running quality
13639checks over your ruby project as part of continuous integration build. It
13640comes with a few checks out of the box, but also provides an API for loading
13641custom checks. This gem provides a set of additional checks.")
13642 (license license:expat)))
13643
13644(define-public ruby-pdf-reader
13645 (package
13646 (name "ruby-pdf-reader")
13647 (version "2.4.0")
13648 (source (origin
13649 (method git-fetch) ;no test in distributed gem archive
13650 (uri (git-reference
13651 (url "https://github.com/yob/pdf-reader")
13652 (commit (string-append "v" version))))
13653 (file-name (git-file-name name version))
13654 (sha256
13655 (base32
13656 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
13657 (build-system ruby-build-system)
13658 (arguments `(#:test-target "spec"
13659 #:phases (modify-phases %standard-phases
13660 (add-after 'unpack 'do-not-use-bundler
13661 (lambda _
13662 (substitute* "spec/spec_helper.rb"
13663 ((".*[Bb]undler.*") "")))))))
13664 (native-inputs
13665 (list ruby-rspec ruby-cane ruby-morecane))
13666 (propagated-inputs
13667 (list ruby-afm ruby-ascii85 ruby-hashery ruby-rc4 ruby-ttfunk))
13668 (home-page "https://github.com/yob/pdf-reader")
13669 (synopsis "PDF parser in Ruby")
13670 (description "The PDF::Reader library implements a PDF parser conforming as
13671much as possible to the PDF specification from Adobe. It provides programmatic
13672access to the contents of a PDF file with a high degree of flexibility.")
13673 (license license:gpl3+)))
13674
13675(define-public ruby-pdf-inspector
13676 (let ((revision "1")
13677 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
13678 (package
13679 (name "ruby-pdf-inspector")
13680 (version (git-version "1.3.0" revision commit))
13681 (source (origin
13682 (method git-fetch)
13683 (uri (git-reference
13684 (url "https://github.com/prawnpdf/pdf-inspector")
13685 (commit commit)))
13686 (file-name (git-file-name name version))
13687 (sha256
13688 (base32
13689 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
13690 (build-system ruby-build-system)
13691 (arguments
13692 `(#:test-target "spec"
13693 #:phases (modify-phases %standard-phases
13694 (add-before 'build 'drop-signing-key-requirement
13695 (lambda _
13696 (substitute* "pdf-inspector.gemspec"
13697 (("spec.signing_key =.*")
13698 "spec.signing_key = nil"))))
13699 (replace 'check
13700 (lambda _
13701 (substitute* "pdf-inspector.gemspec"
13702 ((".*rubocop.*") "")
13703 ((".*yard.*") ""))
13704 (invoke "rspec"))))))
13705 (native-inputs
13706 (list ruby-rspec))
13707 (propagated-inputs
13708 (list ruby-pdf-reader))
13709 (home-page "https://github.com/prawnpdf/pdf-inspector")
13710 (synopsis "Analysis classes for inspecting PDF output")
13711 (description "This library provides a number of PDF::Reader based tools for
13712use in testing PDF output. Presently, the primary purpose of this tool is to
13713support the tests found in Prawn, a pure Ruby PDF generation library.")
13714 (license %prawn-project-licenses))))
13715
13716(define-public ruby-pdf-core
13717 (package
13718 (name "ruby-pdf-core")
13719 (version "0.9.0")
13720 (source (origin
13721 (method url-fetch)
13722 (uri (rubygems-uri "pdf-core" version))
13723 (sha256
13724 (base32
13725 "1fz0yj4zrlii2j08kaw11j769s373ayz8jrdhxwwjzmm28pqndjg"))))
13726 (build-system ruby-build-system)
13727 (arguments
13728 ; No test target
13729 `(#:tests? #f))
13730 (home-page "https://github.com/prawnpdf/pdf-core")
13731 (synopsis "Low level PDF features for Prawn")
13732 (description "This is an experimental gem that extracts low-level PDF
13733functionality from Prawn.")
13734 (license license:gpl3+)))
13735
13736(define-public ruby-prawn-dev
13737 (package
13738 (name "ruby-prawn-dev")
13739 (version "0.3.0")
13740 (source (origin
13741 (method url-fetch)
13742 (uri (rubygems-uri "prawn-dev" version))
13743 (sha256
13744 (base32
13745 "1hbzzgm0nwc6h8pyv8h9xx068bf676rispxcz4a0sm8nykz54z4x"))))
13746 (build-system ruby-build-system)
13747 (arguments
13748 (list
13749 #:tests? #f ;no test suite
13750 #:phases
13751 #~(modify-phases %standard-phases
13752 (add-after 'extract-gemspec 'drop-rubocop-dependency
13753 ;; Rubocop depends on Prawn. Remove it to avoid the
13754 ;; dependency cycle when using this tool to build
13755 ;; Prawn components.
13756 (lambda _
13757 (substitute* "lib/prawn/dev/tasks.rb"
13758 (("require 'rubocop/rake_task'")
13759 "")
13760 (("RuboCop::RakeTask.new")
13761 ""))
13762 (substitute* ".gemspec"
13763 ((".*add.*dependency.*(rubocop|simplecov).*")
13764 "")))))))
13765 (propagated-inputs (list ruby-rake ruby-rspec ruby-yard))
13766 (synopsis "Shared tools for Prawn projects development")
13767 (description "Prawn-dev contains tools to aid the development of the
13768various Prawn projects.")
13769 (home-page "https://prawnpdf.org/")
13770 (license license:expat)))
13771
13772(define-public ruby-prawn
13773 ;; There hasn't been a new release since 2017/03/17.
13774 (package
13775 (name "ruby-prawn")
13776 (version "2.4.0")
13777 (source (origin
13778 (method git-fetch)
13779 (uri (git-reference
13780 (url "https://github.com/prawnpdf/prawn")
13781 (commit version)))
13782 (file-name (git-file-name name version))
13783 (sha256
13784 (base32
13785 "1h1gww12wcdscij0lnd21p9zcbwrwc3miini5ppannc2birmj9ja"))))
13786 (build-system ruby-build-system)
13787 (arguments
13788 (list
13789 #:phases
13790 #~(modify-phases %standard-phases
13791 (add-before 'build 'drop-signing-key-requirement
13792 (lambda _
13793 (substitute* "prawn.gemspec"
13794 (("spec.signing_key =.*")
13795 "spec.signing_key = nil"))))
13796 (replace 'check
13797 (lambda* (#:key tests? #:allow-other-keys)
13798 (when tests?
13799 ;; The Prawn manual test fails (see:
13800 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
13801 ;; it.
13802 (invoke "rspec"
13803 "--exclude-pattern" "prawn_manual_spec.rb")))))))
13804 (propagated-inputs
13805 (list ruby-matrix
13806 ruby-pdf-core
13807 ruby-ttfunk))
13808 (native-inputs
13809 (list ruby-pdf-inspector
13810 ruby-prawn-manual-builder
13811 ruby-prawn-dev))
13812 (home-page "https://prawnpdf.org/api-docs/2.0/")
13813 (synopsis "PDF generation for Ruby")
13814 (description "Prawn is a pure Ruby PDF generation library.")
13815 (license %prawn-project-licenses)))
13816
13817(define-public ruby-prawn-table
13818 (package
13819 (name "ruby-prawn-table")
13820 (version "0.2.2")
13821 (source (origin
13822 (method url-fetch)
13823 (uri (rubygems-uri "prawn-table" version))
13824 (sha256
13825 (base32
13826 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
13827 (build-system ruby-build-system)
13828 (propagated-inputs
13829 (list ruby-prawn ruby-pdf-inspector))
13830 (native-inputs
13831 `(("bundler" ,bundler)
13832 ("ruby-yard" ,ruby-yard)
13833 ("ruby-mocha" ,ruby-mocha)
13834 ("ruby-coderay" ,ruby-coderay)
13835 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
13836 ("ruby-simplecov" ,ruby-simplecov)
13837 ("ruby-rspec-2" ,ruby-rspec-2)))
13838 (arguments
13839 '(;; TODO: 1 test fails
13840 ;; Failure/Error: pdf.page_count.should == 1
13841 ;; expected: 1
13842 ;; got: 2 (using ==)
13843 ;; # ./spec/table_spec.rb:1308
13844 ;;
13845 ;; 225 examples, 1 failure
13846 #:tests? #f
13847 #:phases
13848 (modify-phases %standard-phases
13849 (add-before 'check 'patch-gemspec
13850 (lambda _
13851 (substitute* "prawn-table.gemspec"
13852 ;; Loosen the requirement for pdf-inspector
13853 (("~> 1\\.1\\.0") ">= 0")
13854 ;; Loosen the requirement for pdf-reader
13855 (("~> 1\\.2") ">= 0"))))
13856 (replace 'check
13857 (lambda* (#:key tests? #:allow-other-keys)
13858 (when tests?
13859 (invoke "rspec")))))))
13860 (home-page "https://github.com/prawnpdf/prawn-table")
13861 (synopsis "Tables support for Prawn")
13862 (description "This gem provides tables support for Prawn.")
13863 (license license:gpl3+)))
13864
13865(define-public ruby-kramdown
13866 (package
13867 (name "ruby-kramdown")
13868 (version "2.3.1")
13869 (source (origin
13870 (method url-fetch)
13871 (uri (rubygems-uri "kramdown" version))
13872 (sha256
13873 (base32
13874 "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
13875 (build-system ruby-build-system)
13876 (arguments `(#:tests? #f)); FIXME: some test failures
13877 (native-inputs
13878 (list ruby-prawn ruby-prawn-table))
13879 (home-page "https://kramdown.gettalong.org/")
13880 (synopsis "Markdown parsing and converting library")
13881 (description "Kramdown is a library for parsing and converting a superset
13882of Markdown. It is completely written in Ruby, supports standard Markdown
13883(with some minor modifications) and various extensions that have been made
13884popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
13885 (license license:expat)))
13886
13887(define-public ruby-kramdown-parser-gfm
13888 (package
13889 (name "ruby-kramdown-parser-gfm")
13890 (version "1.1.0")
13891 (source
13892 (origin
13893 (method url-fetch)
13894 (uri (rubygems-uri "kramdown-parser-gfm" version))
13895 (sha256
13896 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
13897 (build-system ruby-build-system)
13898 (arguments
13899 `(#:tests? #f)) ;no rakefile
13900 (propagated-inputs
13901 (list ruby-kramdown))
13902 (synopsis "Kramdown parser for the GFM dialect of Markdown")
13903 (description
13904 "This is a parser for kramdown that converts Markdown documents in the
13905GFM dialect to HTML.")
13906 (home-page "https://github.com/kramdown/parser-gfm")
13907 (license license:expat)))
13908
13909(define-public ruby-http-parser.rb
13910 (package
13911 (name "ruby-http-parser.rb")
13912 (version "0.6.0")
13913 (source
13914 (origin
13915 (method url-fetch)
13916 (uri (rubygems-uri "http_parser.rb" version))
13917 (sha256
13918 (base32
13919 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
13920 (build-system ruby-build-system)
13921 (arguments
13922 ;; No tests
13923 `(#:tests? #f))
13924 (native-inputs
13925 (list ruby-rake-compiler ruby-rspec))
13926 (home-page "https://github.com/tmm1/http_parser.rb")
13927 (synopsis "HTTP parser un Ruby")
13928 (description "This gem is a simple callback-based HTTP request/response
13929parser for writing http servers, clients and proxies.")
13930 (license license:expat)))
13931
13932(define-public ruby-excon
13933 (package
13934 (name "ruby-excon")
13935 (version "1.4.2")
13936 (source (origin
13937 (method git-fetch) ;for tests
13938 (uri (git-reference
13939 (url "https://github.com/excon/excon")
13940 (commit (string-append "v" version))))
13941 (file-name (git-file-name name version))
13942 (sha256
13943 (base32
13944 "0ym2jaj9cyn4kwv0936z6fvxh1j6jfw0j7dln1gy8xnsszv0p4w8"))))
13945 (build-system ruby-build-system)
13946 (arguments
13947 (list
13948 #:phases
13949 #~(modify-phases %standard-phases
13950 (replace 'replace-git-ls-files
13951 (lambda _
13952 (substitute* "excon.gemspec"
13953 (("`git ls-files -- data/. lib/.`")
13954 "`find data lib -type f`"))))
13955 (add-before 'check 'disable-incompatible-tests
13956 (lambda _
13957 ;; Tests require networking
13958 (delete-file "spec/requests/resolv_resolver_spec.rb")
13959 (delete-file "spec/requests/dns_timeout_spec.rb"))))))
13960 (native-inputs
13961 (list
13962 ruby-activesupport
13963 ruby-eventmachine
13964 ruby-json
13965 ruby-open4
13966 ruby-puma
13967 ruby-rspec
13968 ruby-shindo
13969 ruby-sinatra
13970 ruby-webrick))
13971 (propagated-inputs (list ruby-logger))
13972 (synopsis "Usable, fast, simple Ruby HTTP 1.1")
13973 (description "Excon was designed to be simple, fast and performant. It
13974works great as a general HTTP(s) client and is particularly well suited to
13975usage in API clients.")
13976 (home-page "https://github.com/excon/excon")
13977 (license license:expat)))
13978
13979(define-public ruby-em-websocket
13980 (package
13981 (name "ruby-em-websocket")
13982 (version "0.5.1")
13983 (source
13984 (origin
13985 (method url-fetch)
13986 (uri (rubygems-uri "em-websocket" version))
13987 (sha256
13988 (base32
13989 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
13990 (build-system ruby-build-system)
13991 (arguments
13992 ;; No tests
13993 `(#:tests? #f))
13994 (propagated-inputs
13995 (list ruby-eventmachine ruby-http-parser.rb))
13996 (native-inputs
13997 (list bundler ruby-rspec))
13998 (home-page "https://github.com/igrigorik/em-websocket")
13999 (synopsis "EventMachine based WebSocket server")
14000 (description "Em-websocket is an EventMachine based WebSocket server
14001implementation.")
14002 (license license:expat)))
14003
14004(define-public ruby-rouge
14005 (package
14006 (name "ruby-rouge")
14007 (version "3.26.1")
14008 (source (origin
14009 (method url-fetch)
14010 (uri (rubygems-uri "rouge" version))
14011 (sha256
14012 (base32
14013 "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
14014 (build-system ruby-build-system)
14015 (arguments `(#:tests? #f)); No rakefile
14016 (home-page "http://rouge.jneen.net/")
14017 (synopsis "Code highlighter")
14018 (description "Rouge is a code highlighter written in Ruby. It supports more
14019than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
14020is compatible with stylesheets designed for pygments.")
14021 (license (list
14022 ;; rouge is licensed under expat
14023 license:expat
14024 ;; pygments is licensed under bsd-2
14025 license:bsd-2))))
14026
14027(define-public ruby-hashie
14028 (let ((commit "73510552ba580867e9882fe092568916cbcd810b")
14029 (revision "0"))
14030 (package
14031 (name "ruby-hashie")
14032 (version (git-version "5.0.0" revision commit))
14033 (source (origin
14034 (method git-fetch) ;for tests
14035 (uri (git-reference
14036 (url "https://github.com/hashie/hashie")
14037 (commit commit)))
14038 (file-name (git-file-name name version))
14039 (sha256
14040 (base32
14041 "08rpx040h6vgx6ynk6w029f7z7c8aj2p4v135k2l1zxvnw617ddw"))))
14042 (build-system ruby-build-system)
14043 (arguments
14044 (list #:test-target "spec"
14045 #:phases #~(modify-phases %standard-phases
14046 (add-after 'unpack 'disable-bundler
14047 (lambda _
14048 (substitute* "Rakefile"
14049 ((".*require 'bundler'.*") "")
14050 ((".*Bundler.setup.*") "")
14051 (("Bundler::GemHelper\\.install_tasks") ""))))
14052 (add-after 'unpack 'disable-rubocop
14053 (lambda _
14054 (substitute* "Rakefile"
14055 (("require 'rubocop/rake_task'") "")
14056 (("RuboCop::RakeTask.new") ""))))
14057 (add-after 'unpack 'relax-requirements
14058 (lambda _
14059 ;; Contains multiple extraneous dependencies.
14060 (delete-file "Gemfile"))))))
14061 (native-inputs (list ruby-json ruby-pry ruby-rspec ruby-rspec-pending-for))
14062 (home-page "https://github.com/hashie/hashie")
14063 (synopsis "Extensions to Ruby Hashes")
14064 (description "Hashie is a collection of classes and mixins that make Ruby
14065hashes more powerful.")
14066 (license license:expat))))
14067
14068(define-public ruby-heredoc-unindent
14069 (package
14070 (name "ruby-heredoc-unindent")
14071 (version "1.2.0")
14072 (source (origin
14073 (method url-fetch)
14074 (uri (rubygems-uri "heredoc_unindent" version))
14075 (sha256
14076 (base32
14077 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
14078 (build-system ruby-build-system)
14079 (native-inputs
14080 (list ruby-hoe-3))
14081 (home-page "https://github.com/adrianomitre/heredoc_unindent")
14082 (synopsis "Heredoc indentation cleaner")
14083 (description "This gem removes common margin from indented strings, such
14084as the ones produced by indented heredocs. In other words, it strips out
14085leading whitespace chars at the beginning of each line, but only as much as
14086the line with the smallest margin.
14087
14088It is acknowledged that many strings defined by heredocs are just code and
14089fact is that most parsers are insensitive to indentation. If, however, the
14090strings are to be used otherwise, be it for printing or testing, the extra
14091indentation will probably be an issue and hence this gem.")
14092 (license license:expat)))
14093
14094(define-public ruby-safe-yaml
14095 (package
14096 (name "ruby-safe-yaml")
14097 (version "1.0.5")
14098 (source
14099 (origin
14100 (method git-fetch)
14101 (uri (git-reference
14102 (url "https://github.com/dtao/safe_yaml")
14103 (commit version)))
14104 (file-name (git-file-name name version))
14105 (sha256
14106 (base32
14107 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
14108 (build-system ruby-build-system)
14109 (native-inputs
14110 (list ruby-rspec ruby-hashie ruby-heredoc-unindent))
14111 (arguments
14112 (list
14113 ;; Tests are broken since the move to ruby@3.
14114 ;; There's ongoing effort on the Jekyll dependent
14115 ;; to remove this orphan dependency.
14116 #:tests? #f ; broken since move to ruby@3
14117 #:test-target "spec"
14118 #:phases
14119 #~(modify-phases %standard-phases
14120 (add-before 'check 'set-TZ
14121 (lambda _
14122 ;; This test is dependent on the timezone
14123 ;; spec/transform/to_date_spec.rb:35
14124 ;; # SafeYAML::Transform::ToDate converts times to the local
14125 ;; timezone
14126 (setenv "TZ" "UTC-11"))))))
14127 (home-page "https://github.com/dtao/safe_yaml")
14128 (synopsis "YAML parser")
14129 (description "The SafeYAML gem provides an alternative implementation of
14130YAML.load suitable for accepting user input in Ruby applications.")
14131 (license license:expat)))
14132
14133(define-public ruby-yaml-lint
14134 ;; No tags for releases.
14135 (let ((commit "d6a253f7d33234a9c24660d582cf7014e882c0c2")
14136 (revision "0"))
14137 (package
14138 (name "ruby-yaml-lint")
14139 (version (git-version "0.1.2" revision commit))
14140 (source
14141 (origin
14142 (method git-fetch)
14143 (uri (git-reference
14144 (url "https://github.com/Pryz/yaml-lint")
14145 (commit commit)))
14146 (file-name (git-file-name name version))
14147 (sha256
14148 (base32 "0zk0jwzmcaaiyixjvkzdb54xhiqcnjkma72nkv0vm5csaphfdjkx"))))
14149 (build-system ruby-build-system)
14150 (arguments
14151 `(#:phases
14152 (modify-phases %standard-phases
14153 (add-after 'unpack 'sanitize-dependencies
14154 (lambda _
14155 (substitute* "spec/spec_helper.rb"
14156 ((".*[Cc]overalls.*") ""))))
14157 (replace 'check
14158 (lambda* (#:key tests? #:allow-other-keys)
14159 (when tests?
14160 (invoke "rspec")))))))
14161 (native-inputs
14162 (list ruby-coveralls ruby-rspec ruby-simplecov))
14163 (synopsis "Simple YAML check tool")
14164 (description
14165 "@code{yaml-lint} will simply try to load the YAML file with the built-in
14166Ruby yaml library.")
14167 (home-page "https://github.com/Pryz/yaml-lint")
14168 (license license:expat))))
14169
14170(define-public ruby-matrix
14171 (package
14172 (name "ruby-matrix")
14173 (version "0.4.2")
14174 (source (origin
14175 (method git-fetch) ;for tests
14176 (uri (git-reference
14177 (url "https://github.com/ruby/matrix")
14178 (commit (string-append "v" version))))
14179 (file-name (git-file-name name version))
14180 (sha256
14181 (base32
14182 "1asxr0jzh39lk5f8a9wm5avykrcy0v2wgd1bl3cszjczh99xy5k2"))))
14183 (build-system ruby-build-system)
14184 (synopsis "@code{Matrix} and @code{Vector} classes implementation for Ruby")
14185 (description "This Ruby library provides an implementation of the
14186@code{Matrix} and @code{Vector} classes. The @code{Matrix} class represents a
14187mathematical matrix. It provides methods for creating matrices, operating on
14188them arithmetically and algebraically, and determining their mathematical
14189properties (trace, rank, inverse, determinant, eigensystem, etc.). The
14190@code{Vector} class represents a mathematical vector, which is useful in its
14191own right, and also constitutes a row or column of a @code{Matrix}.")
14192 (home-page "https://github.com/ruby/matrix")
14193 (license license:bsd-2)))
14194
14195(define-public ruby-m
14196 (package
14197 (name "ruby-m")
14198 (version "1.6.2")
14199 (source (origin
14200 (method git-fetch) ;for tests
14201 (uri (git-reference
14202 (url "https://github.com/qrush/m")
14203 (commit (string-append "v" version))))
14204 (file-name (git-file-name name version))
14205 (sha256
14206 (base32
14207 "0za9jsq341xyqjaswx2wrd4x42w9a2xygarh9spsvsxaxf5b1sz3"))))
14208 (build-system ruby-build-system)
14209 (arguments
14210 (list
14211 #:phases
14212 #~(modify-phases %standard-phases
14213 (add-after 'unpack 'sanitize-dependencies
14214 (lambda _
14215 (delete-file "Gemfile")
14216 (substitute* "m.gemspec"
14217 ((".*coveralls.*") ""))
14218 (substitute* "Rakefile"
14219 ((".*require \"coveralls\".*") "")
14220 ((".*require \"standard/rake\".*") "")
14221 (("Coveralls.push!") "")
14222 (("\"standard:fix\"") ""))))
14223 (add-before 'replace-git-ls-files 'pre-replace-git-ls-files
14224 (lambda _
14225 (substitute* "m.gemspec"
14226 (("git ls-files -- bin/\\*")
14227 "find bin -type f -not -regex '.*\\.gem$' | sort")
14228 (("git ls-files -- \\{test,spec,features}/\\*")
14229 "find test -type f -not -regex '.*\\.gem$' | sort"))))
14230 (delete 'check)
14231 (add-after 'install 'check
14232 (lambda* (#:key tests? #:allow-other-keys)
14233 (setenv "GEM_PATH" (string-append
14234 (getenv "GEM_PATH") ":"
14235 #$output "/lib/ruby/vendor_ruby"))
14236 (when tests?
14237 (invoke "rake" "test")))))))
14238 (native-inputs (list ruby-activesupport))
14239 (propagated-inputs (list ruby-method-source ruby-rake))
14240 (synopsis "Ruby test runner that can run tests by line number")
14241 (description "@code{m} stands for metal, a better test/unit and
14242@code{minitest} test runner that can run tests by line number.")
14243 (home-page "https://github.com/qrush/m")
14244 (license license:expat)))
14245
14246(define-public ruby-mercenary
14247 (package
14248 (name "ruby-mercenary")
14249 (version "0.4.0")
14250 (source (origin
14251 (method url-fetch)
14252 (uri (rubygems-uri "mercenary" version))
14253 (sha256
14254 (base32
14255 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
14256 (build-system ruby-build-system)
14257 (arguments `(#:test-target "spec"))
14258 (native-inputs
14259 (list bundler))
14260 (home-page "https://github.com/jekyll/mercenary")
14261 (synopsis "Command-line apps library in Ruby")
14262 (description "Mercenary is a lightweight and flexible library for writing
14263command-line apps in Ruby.")
14264 (license license:expat)))
14265
14266(define-public ruby-launchy
14267 (package
14268 (name "ruby-launchy")
14269 (version "2.5.2")
14270 (source (origin
14271 (method url-fetch)
14272 (uri (rubygems-uri "launchy" version))
14273 (sha256
14274 (base32
14275 "06r43899384das2bkbrpsdxsafyyqa94il7111053idfalb4984a"))))
14276 (build-system ruby-build-system)
14277 (native-inputs (list curl links ruby-simplecov))
14278 (propagated-inputs (list ruby-addressable))
14279 (synopsis "Ruby helper class for launching applications")
14280 (description
14281 "Launchy is helper class for launching applications in a fire and forget
14282manner. The aim of Launchy is to provide a common approach to launching
14283external applications from within Ruby programs.")
14284 (home-page "https://github.com/copiousfreetime/launchy")
14285 (license license:isc)))
14286
14287(define-public ruby-strscan
14288 (package
14289 (name "ruby-strscan")
14290 (version "3.1.8")
14291 (source
14292 (origin
14293 (method git-fetch) ;for tests
14294 (uri (git-reference
14295 (url "https://github.com/ruby/strscan")
14296 (commit (string-append "v" version))))
14297 (file-name (git-file-name name version))
14298 (sha256
14299 (base32 "0xnxa8s619jrg2l2sc4f3b3vwg3659hqpmnzhl0mg0v2wmny8vwr"))))
14300 (build-system ruby-build-system)
14301 (arguments
14302 (list
14303 #:phases
14304 #~(modify-phases %standard-phases
14305 (add-before 'check 'remove-bundler-setup
14306 (lambda _
14307 (substitute* "Rakefile"
14308 (("-rbundler/setup")
14309 ""))))
14310 (add-before 'check 'set-gem-path
14311 (lambda _
14312 (setenv "GEM_PATH"
14313 (string-append (getenv "GEM_PATH") ":"
14314 #$output "/lib/ruby/vendor_ruby"))))
14315 (delete 'check)
14316 (add-after 'install 'check
14317 (assoc-ref %standard-phases
14318 'check)))))
14319 (native-inputs (list ruby-rake-compiler ruby-test-unit
14320 ruby-test-unit-ruby-core))
14321 (synopsis "Lexical scanning operations for Ruby")
14322 (description
14323 "This package provides lexical scanning operations on a String in Ruby.")
14324 (home-page "https://github.com/ruby/strscan")
14325 (license (list license:ruby license:bsd-2))))
14326
14327(define-public ruby-liquid
14328 (package
14329 (name "ruby-liquid")
14330 (version "5.13.0")
14331 (source (origin
14332 (method git-fetch) ;for tests
14333 (uri (git-reference
14334 (url "https://github.com/Shopify/liquid")
14335 (commit (string-append "v" version))))
14336 (file-name (git-file-name name version))
14337 (sha256
14338 (base32
14339 "0i46vn4n6nhx4gbwx8c9nflg5k0nr8pbgifgpry3kbkrqsmkimib"))))
14340 (build-system ruby-build-system)
14341 (arguments
14342 (list
14343 #:phases
14344 #~(modify-phases %standard-phases
14345 (delete 'check) ;moved after the install phase
14346 (add-after 'install 'check
14347 (assoc-ref %standard-phases 'check))
14348 (add-before 'check 'set-GEM_PATH
14349 (lambda _
14350 (setenv "GEM_PATH" (string-append
14351 (getenv "GEM_PATH") ":"
14352 #$output "/lib/ruby/vendor_ruby"))))
14353 (add-before 'check 'delete-problematic-tests
14354 (lambda _
14355 ;; The following test fails with 'Unknown tag' errors (see:
14356 ;; https://github.com/Shopify/liquid/issues/1699).
14357 (delete-file "test/integration/tags/inline_comment_test.rb")))
14358 (add-before 'check 'remove-cache-tests
14359 (lambda _
14360 (substitute* "test/integration/expression_test.rb"
14361 (("require 'lru_redux'") "")
14362 (("test_expression_cache_with_lru_redux" name)
14363 (string-append name "; skip 'requires lru_redux gem';"))))))))
14364 (native-inputs (list ruby-rspec ruby-stackprof))
14365 (propagated-inputs (list ruby-strscan ruby-bigdecimal))
14366 (home-page "https://shopify.github.io/liquid/")
14367 (synopsis "Template language")
14368 (description "Liquid is a template language written in Ruby. It is used
14369to load dynamic content on storefronts.")
14370 (license license:expat)))
14371
14372(define-public ruby-liquid-4
14373 (package
14374 (inherit ruby-liquid)
14375 (name "ruby-liquid")
14376 (version "4.0.4")
14377 (source (origin
14378 (method git-fetch) ;for tests
14379 (uri (git-reference
14380 (url "https://github.com/Shopify/liquid")
14381 (commit (string-append "v" version))))
14382 (file-name (git-file-name name version))
14383 (sha256
14384 (base32
14385 "0cr321nd0zkbxirgdfmz37xx7j26zfnicjh585fi20vx60frry83"))))
14386 (arguments (list #:tests? #f))))
14387
14388(define-public ruby-localhost
14389 (package
14390 (name "ruby-localhost")
14391 (version "1.1.10")
14392 (source (origin
14393 (method git-fetch) ;for tests
14394 (uri (git-reference
14395 (url "https://github.com/socketry/localhost")
14396 (commit (string-append "v" version))))
14397 (file-name (git-file-name name version))
14398 (sha256
14399 (base32
14400 "1yp70w15wpfk613ap5f4y15yx4n2qqwa67vqc2f4lv7npf3llcz0"))))
14401 (build-system ruby-build-system)
14402 (arguments
14403 ;; XXX: The test suite requires sus-fixtures-async, which requires async,
14404 ;; only available for Ruby 3.0.
14405 (list #:tests? #f
14406 #:phases
14407 #~(modify-phases %standard-phases
14408 (add-before 'build 'remove-missing-signing-key
14409 (lambda _
14410 ;; Otherwise, the build fails with ENOENT.
14411 (substitute* "localhost.gemspec"
14412 ((".*spec.signing_key.*") "")))))))
14413 (synopsis "API for generating per-user self-signed root certificates")
14414 (description "This package provides @code{localhost}, a Ruby library for
14415Managing a local certificate authority for self-signed, localhost development
14416servers.")
14417 (home-page "https://github.com/socketry/localhost")
14418 (license license:expat)))
14419
14420(define-public ruby-forwardable-extended
14421 (package
14422 (name "ruby-forwardable-extended")
14423 (version "2.6.0")
14424 (source (origin
14425 (method url-fetch)
14426 (uri (rubygems-uri "forwardable-extended" version))
14427 (sha256
14428 (base32
14429 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
14430 (build-system ruby-build-system)
14431 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
14432 (home-page "https://github.com/envygeeks/forwardable-extended")
14433 (synopsis "Delegation to hashes and instance variables in Forwardable")
14434 (description "Forwardable Extended provides more @code{Forwardable}
14435methods for your source as @code{Forwardable::Extended}.")
14436 (license license:expat)))
14437
14438(define-public ruby-pathutil
14439 (package
14440 (name "ruby-pathutil")
14441 (version "0.16.2")
14442 (source (origin
14443 (method url-fetch)
14444 (uri (rubygems-uri "pathutil" version))
14445 (sha256
14446 (base32
14447 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
14448 (build-system ruby-build-system)
14449 (propagated-inputs
14450 (list ruby-forwardable-extended))
14451 (native-inputs
14452 (list bundler ruby-rspec))
14453 ;; Fails with: cannot load such file --
14454 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
14455 (arguments `(#:tests? #f))
14456 (home-page "https://github.com/envygeeks/pathutil")
14457 (synopsis "Extended implementation of Pathname")
14458 (description "Pathutil tries to be a faster pure Ruby implementation of
14459Pathname.")
14460 (license license:expat)))
14461
14462(define-public ruby-terminal-table
14463 (package
14464 (name "ruby-terminal-table")
14465 (version "4.0.0")
14466 (source
14467 (origin
14468 (method git-fetch)
14469 (uri (git-reference
14470 (url "https://github.com/tj/terminal-table")
14471 (commit (string-append "v" version))))
14472 (file-name (git-file-name name version))
14473 (sha256
14474 (base32 "17s0zvbix72d5ivv1mqi9hyzqrippn01spglj6zg3g18v4vkg0lk"))))
14475 (arguments
14476 '(#:phases (modify-phases %standard-phases
14477 (add-before 'check 'remove-unnecessary-dependencies
14478 (lambda _
14479 (substitute* "terminal-table.gemspec"
14480 (("s.add_runtime_dependency.*")
14481 "\n")
14482 (("s.add_development_dependency.*")
14483 "\n"))
14484 (substitute* "Gemfile"
14485 ((".*tins.*")
14486 "\n"))))
14487 (replace 'check
14488 (lambda* (#:key tests? #:allow-other-keys)
14489 (when tests?
14490 (invoke "rspec")))))))
14491 (build-system ruby-build-system)
14492 (propagated-inputs (list ruby-unicode-display-width))
14493 (native-inputs (list ruby-rspec))
14494 (home-page "https://github.com/tj/terminal-table")
14495 (synopsis "Simple, feature rich ASCII table generation library")
14496 (description "Terminal Table is a fast and simple, yet feature rich
14497table generator written in Ruby. It supports ASCII and
14498Unicode formatted tables.")
14499 (license license:expat)))
14500
14501(define-public jekyll
14502 (package
14503 (name "jekyll")
14504 (version "4.4.1")
14505 (source (origin
14506 (method git-fetch) ;for tests
14507 (uri (git-reference
14508 (url "https://github.com/jekyll/jekyll")
14509 (commit (string-append "v" version))))
14510 (file-name (git-file-name name version))
14511 (sha256
14512 (base32
14513 "13cgr7nhxsmackzc976pcvrmam0il623rz13fnr9f7g4g3d1m1lq"))))
14514 (build-system ruby-build-system)
14515 (arguments
14516 (list #:modules '((guix build ruby-build-system)
14517 (guix build utils)
14518 (ice-9 ftw)
14519 (srfi srfi-26))
14520 ;; The cucumber acceptance suite is not run as it depends on an old
14521 ;; version (5).
14522 #:test-target "spec"
14523 #:phases
14524 #~(modify-phases %standard-phases
14525 (add-after 'unpack 'loosen-dependencies
14526 (lambda _
14527 (substitute* "jekyll.gemspec"
14528 (("(.*terminal-table.*,.*),.*" _ m)
14529 (string-append m ")\n")))))
14530 (add-before 'check 'disable-problematic-tests
14531 ;; TODO: Package the missing test inputs.
14532 (lambda _
14533 (with-directory-excursion "test"
14534 ;; Requires 'jekyll-coffeescript'.
14535 (delete-file "test_coffeescript.rb")
14536 ;; Requires 'tomlrb'.
14537 (delete-file "test_configuration.rb")
14538 (substitute* "test_filters.rb"
14539 ;; The sassify tests fail due to white space
14540 ;; differences (see:
14541 ;; https://github.com/jekyll/jekyll/issues/9322).
14542 ((".*s?ssify with simple string.*" all)
14543 (string-append all
14544 " skip('fails on guix')\n")))
14545 ;; Requires kramdown-syntax-coderay.
14546 (delete-file "test_kramdown.rb")
14547 ;; Requires 'test-theme', usually made available from the
14548 ;; local checkout via Bundler (not used here).
14549 (delete-file "test_layout_reader.rb")
14550 ;; Requires a large amount of un-packaged dependencies.
14551 (delete-file "test_plugin_manager.rb")
14552 ;; Requires 'classifier-reborn'.
14553 (delete-file "test_related_posts.rb")
14554 ;; This one causes a test failure similar to the ones for
14555 ;; sassify above.
14556 (delete-file "test_sass.rb")
14557 ;; This would require running the tests via 'bundle
14558 ;; exec', but the Gemfile contains too many (extraneous)
14559 ;; dependencies.
14560 (delete-file "test_site.rb")
14561 ;; Delete the theme tests, as they require 'test-theme',
14562 ;; usually made available from the local checkout via the
14563 ;; Gemfile/bundler (not used here).
14564 (for-each delete-file
14565 (scandir
14566 "." (cut string-prefix? "test_theme" <>)))
14567 ;; This one also relies on 'test-theme'.
14568 (delete-file "test_liquid_renderer.rb")
14569 ;; This test assumes internet connectivity, negate it, as
14570 ;; there's no Internet in the build container.
14571 (substitute* "test_utils.rb"
14572 (("assert Utils::Internet\\.connected\\?")
14573 "refute Utils::Internet.connected?"))
14574 ;; These tests fail non-deterministically (see:
14575 ;; https://github.com/jekyll/jekyll/issues/9323).
14576 (delete-file "test_new_command.rb")
14577 (delete-file "test_collections.rb")
14578 ;; This requires post-install run with GEM_PATH.
14579 ;; Also requires more native-inputs.
14580 (substitute* "test_commands_serve.rb"
14581 ((".*\"fork is not supported.*" all)
14582 (string-append all
14583 " skip('fails on guix')\n"))))))
14584 (replace 'check
14585 (lambda* (#:key tests? #:allow-other-keys)
14586 (when tests?
14587 ;; Invoke the test scripts manually, as 'rake test'
14588 ;; doesn't show any failure details, making debugging
14589 ;; needlessly difficult.
14590 (for-each (lambda (f)
14591 (invoke "ruby" "-I" "test" f))
14592 (find-files "test" "^test_.*\\.rb$"))))))))
14593 (native-inputs
14594 (list bundler
14595 ruby-httpclient
14596 ruby-minitest-profile
14597 ruby-minitest-reporters
14598 ruby-nokogiri
14599 ruby-rspec
14600 ruby-rspec-mocks
14601 ruby-shoulda
14602 ruby-simplecov))
14603 (propagated-inputs
14604 (list ruby-addressable
14605 ruby-colorator
14606 ruby-em-websocket
14607 ruby-i18n
14608 ruby-jekyll-sass-converter
14609 ruby-jekyll-watch
14610 ruby-kramdown-parser-gfm
14611 ruby-liquid-4
14612 ruby-mercenary
14613 ruby-pathutil
14614 ruby-rouge
14615 ruby-safe-yaml
14616 ruby-sassc
14617 ruby-terminal-table
14618 ruby-webrick))
14619 (home-page "https://jekyllrb.com/")
14620 (synopsis "Static site generator")
14621 (description "Jekyll is a simple, blog aware, static site generator.")
14622 (license license:expat)))
14623
14624(define-public ruby-jekyll-paginate-v2
14625 (package
14626 (name "ruby-jekyll-paginate-v2")
14627 (version "3.0.0")
14628 (source (origin
14629 (method url-fetch)
14630 (uri (rubygems-uri "jekyll-paginate-v2" version))
14631 (sha256
14632 (base32
14633 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
14634 (build-system ruby-build-system)
14635 (propagated-inputs
14636 (list jekyll))
14637 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
14638 (synopsis "Pagination Generator for Jekyll 3")
14639 (description "The Pagination Generator forms the core of the pagination
14640logic in Jekyll. It calculates and generates the pagination pages.")
14641 (license license:expat)))
14642
14643(define-public ruby-faraday-net-http
14644 (package
14645 (name "ruby-faraday-net-http")
14646 (version "3.0.2")
14647 (source (origin
14648 (method url-fetch)
14649 (uri (rubygems-uri "faraday-net_http" version))
14650 (sha256
14651 (base32
14652 "13byv3mp1gsjyv8k0ih4612y6vw5kqva6i03wcg4w2fqpsd950k8"))))
14653 (build-system ruby-build-system)
14654 ;; Do not run the test suite here as it would introduce a dependency cycle
14655 ;; with ruby-faraday, which uses it as part of its test suite.
14656 (arguments (list #:tests? #f))
14657 (synopsis "Faraday adapter for Net::HTTP")
14658 (description "This gem is a Faraday adapter for the @code{Net::HTTP}
14659library. Faraday is an HTTP client library that provides a common interface
14660over many adapters.")
14661 (home-page "https://github.com/lostisland/faraday-net_http")
14662 (license license:expat)))
14663
14664(define-public ruby-faraday
14665 (package
14666 (name "ruby-faraday")
14667 (version "2.13.1")
14668 (source (origin
14669 (method git-fetch)
14670 (uri (git-reference
14671 (url "https://github.com/lostisland/faraday")
14672 (commit (string-append "v" version))))
14673 (file-name (git-file-name name version))
14674 (sha256
14675 (base32
14676 "1nln6cs42hr99908bfjiyjpfpi1bmpgdf2w1dii2x8fczykgahsk"))))
14677 (build-system ruby-build-system)
14678 (arguments
14679 (list
14680 #:test-target "spec"
14681 #:phases
14682 #~(modify-phases %standard-phases
14683 (add-after 'unpack 'sanitize-dependencies
14684 (lambda _
14685 (substitute* "spec/spec_helper.rb"
14686 ((".*coveralls.*") "")
14687 ((", Coveralls::SimpleCov::Formatter") "")))))))
14688 (native-inputs
14689 (list ruby-coveralls
14690 ruby-pry
14691 ruby-rack
14692 ruby-rspec
14693 ruby-simplecov
14694 ruby-webmock))
14695 ;; Propagate faraday-net-http as this is the default adapter used, and
14696 ;; many Ruby projects assumes it is available.
14697 (propagated-inputs (list ruby-ruby2-keywords ruby-faraday-net-http))
14698 (synopsis "Ruby HTTP/REST API client library")
14699 (description "Faraday is a HTTP/REST API client library which provides a
14700common interface over different adapters.")
14701 (home-page "https://github.com/lostisland/faraday")
14702 (license license:expat)))
14703
14704(define-public ruby-nio4r
14705 (package
14706 (name "ruby-nio4r")
14707 (version "2.7.4")
14708 (source
14709 (origin
14710 (method git-fetch)
14711 (uri (git-reference
14712 (url "https://github.com/socketry/nio4r")
14713 (commit (string-append "v" version))))
14714 (file-name (git-file-name name version))
14715 (sha256
14716 (base32
14717 "1planm0yrzgkjqvxbfrcp477k030f1cyplpf8g1p7dppgzk2iqqm"))))
14718 (build-system ruby-build-system)
14719 (arguments
14720 '(#:test-target "spec"
14721 #:phases
14722 (modify-phases %standard-phases
14723 (add-after 'extract-gemspec 'delete-certificate
14724 (lambda _
14725 (substitute* "nio4r.gemspec"
14726 (("spec.cert_chain = .*") "")
14727 (("spec.signing_key = .*") ""))))
14728 (add-before 'check 'compile
14729 (lambda _
14730 (invoke "rake" "compile"))))))
14731 (native-inputs
14732 (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop))
14733 (synopsis "New I/O for Ruby")
14734 (description
14735 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
14736for scalable network clients and servers.")
14737 (home-page "https://github.com/socketry/nio4r")
14738 (license license:expat)))
14739
14740(define-public ruby-language-server-protocol
14741 (package
14742 (name "ruby-language-server-protocol")
14743 (version "3.17.0.3")
14744 (source (origin
14745 (method git-fetch) ;for tests
14746 (uri (git-reference
14747 (url "https://github.com/mtsmfm/language_server-protocol-ruby")
14748 (commit (string-append "v" version))))
14749 (file-name (git-file-name name version))
14750 (sha256
14751 (base32
14752 "0f2g301fz99c6nkca39s9227brlycznv8a9r4b4i99rg25m91lc6"))))
14753 (build-system ruby-build-system)
14754 (arguments
14755 (list
14756 #:phases
14757 #~(modify-phases %standard-phases
14758 (add-after 'unpack 'remove-unnecessary-dependencies
14759 (lambda _
14760 (substitute* "Gemfile"
14761 (("gem \"pry-byebug\"") ""))))
14762 (replace 'replace-git-ls-files
14763 (lambda _
14764 (substitute* "language_server-protocol.gemspec"
14765 (("git ls-files -z([^`]*)" _ files)
14766 (string-append "find " files
14767 " -type f -not -regex '.*\\.gem$'"
14768 " -print0 | sort -z"))))))))
14769 (native-inputs
14770 (list ruby-activesupport
14771 ruby-benchmark-ips
14772 ruby-m
14773 ruby-minitest
14774 ruby-minitest-power-assert))
14775 (synopsis "Language Server Protocol (LSP) development kit for Ruby")
14776 (description "This package provides a Language Server Protocol (LSP)
14777development kit for Ruby.")
14778 (home-page "https://github.com/mtsmfm/language_server-protocol-ruby")
14779 (license license:expat)))
14780
14781(define-public ruby-spy
14782 (package
14783 (name "ruby-spy")
14784 (version "1.0.5")
14785 (source
14786 (origin
14787 (method url-fetch)
14788 (uri (rubygems-uri "spy" version))
14789 (sha256
14790 (base32 "0g2mma8q17m26k5s864ndlvvqllhcivwg2wdigjvb7z06iw17gds"))))
14791 (build-system ruby-build-system)
14792 (arguments
14793 (list
14794 #:phases
14795 #~(modify-phases %standard-phases
14796 (add-after 'extract-gemspec 'relax-requirements
14797 (lambda _
14798 (substitute* "spy.gemspec"
14799 ((".*(pry|coveralls).*")
14800 ""))
14801 (substitute* "test/test_helper.rb"
14802 ((".*(pry|[Cc]overalls).*")
14803 ""))
14804 (substitute* "Gemfile"
14805 ((".*(redcarpet|yard).*")
14806 ""))))
14807 (add-before 'check 'skip-failing-tests
14808 (lambda _
14809 (substitute* "test/spy/test_subroutine.rb"
14810 (("test_spy_hook_records_number_of_calls2" name)
14811 (string-append name "; skip 'fails with Ruby 3.4';"))))))))
14812 (native-inputs (list ruby-minitest-reporters
14813 ruby-rspec-core ruby-rspec-expectations))
14814 (synopsis "Mocking library for Ruby")
14815 (description
14816 "Spy is a mocking library. By default, it will raise an
14817error if you attempt to stub a method that doesn't exist or call the stubbed
14818method with the wrong arity.")
14819 (home-page "https://github.com/ryanong/spy")
14820 (license license:expat)))
14821
14822(define-public ruby-subprocess
14823 (package
14824 (name "ruby-subprocess")
14825 (version "1.5.6")
14826 (source (origin
14827 (method url-fetch)
14828 (uri (rubygems-uri "subprocess" version))
14829 (sha256
14830 (base32
14831 "0v49ahfx9b75qg42sl8a3l367g2vihc16g8z5f2raxpxjl1wh2s2"))))
14832 (build-system ruby-build-system)
14833 ;; Do not run the test suite, as there its test dependency ruby-sord would
14834 ;; introduce a cycle with ruby-sorbet-runtime.
14835 (arguments (list #:tests? #f))
14836 (native-inputs (list ruby-minitest ruby-pry))
14837 (synopsis "Ruby library to control and communicate with spawned processes")
14838 (description "This Ruby library is controlling and communicating with
14839spawned processes. It is designed after Python's @code{subprocess} module.")
14840 (home-page "https://github.com/stripe/subprocess")
14841 (license license:expat)))
14842
14843(define-public ruby-sus
14844 (package
14845 (name "ruby-sus")
14846 (version "0.20.3")
14847 (source (origin
14848 (method git-fetch) ;for gems.rb
14849 (uri (git-reference
14850 (url "https://github.com/ioquatix/sus")
14851 (commit (string-append "v" version))))
14852 (file-name (git-file-name name version))
14853 (sha256
14854 (base32
14855 "0j4rkh9li79674h3lfkxlcdygscmb22l77i7hwhxl3gw103gkpdr"))))
14856 (build-system ruby-build-system)
14857 (arguments
14858 (list #:phases
14859 #~(modify-phases %standard-phases
14860 (add-before 'build 'remove-missing-signing-key
14861 (lambda _
14862 ;; Otherwise, the build fails with ENOENT.
14863 (substitute* "sus.gemspec"
14864 ((".*spec.signing_key.*") ""))))
14865 (delete 'check) ;moved after install
14866 (add-after 'install 'check
14867 (lambda* (#:key tests? #:allow-other-keys)
14868 (when tests?
14869 (setenv "CONSOLE_LEVEL" "debug")
14870 (setenv "HOME" "/tmp")
14871 (delete-file "config/sus.rb") ;remove covored gem
14872 (invoke "sus"))))
14873 (add-before 'check 'set-paths
14874 (lambda _
14875 (setenv "PATH" (string-append (getenv "PATH") ":"
14876 #$output "/bin"))
14877 (setenv "GEM_PATH" (string-append
14878 (getenv "GEM_PATH") ":"
14879 #$output "/lib/ruby/vendor_ruby")))))))
14880 (synopsis "Fast and scalable test runner for Ruby")
14881 (description "This package provides a fast and scalable test runner for Ruby.")
14882 (home-page "https://github.com/ioquatix/sus")
14883 (license license:expat)))
14884
14885(define-public ruby-syntax-tree
14886 (package
14887 (name "ruby-syntax-tree")
14888 (version "6.2.0")
14889 (source (origin
14890 (method git-fetch) ;for tests
14891 (uri (git-reference
14892 (url "https://github.com/ruby-syntax-tree/syntax_tree")
14893 (commit (string-append "v" version))))
14894 (file-name (git-file-name name version))
14895 (sha256
14896 (base32
14897 "0sbcpybh2m7vqiq4nd6b15iaha6q58210lq8wkdka8934gfizvdk"))))
14898 (build-system ruby-build-system)
14899 (arguments
14900 (list
14901 ;; Some tests are broken with [email protected].
14902 ;; See: https://github.com/ruby-syntax-tree/syntax_tree/issues/457
14903 #:tests? #f
14904 #:phases
14905 #~(modify-phases %standard-phases
14906 ;; The tests rely on the Gem being installed, so move the check
14907 ;; phase after the install phase.
14908 (delete 'check)
14909 (add-after 'install 'check
14910 (lambda* (#:key tests? #:allow-other-keys)
14911 (setenv "GEM_PATH" (string-append
14912 #$output "/lib/ruby/vendor_ruby:"
14913 (getenv "GEM_PATH")))
14914 (when tests?
14915 (invoke "rake" "test")))))))
14916 (native-inputs (list ruby-rubocop-ast ruby-simplecov))
14917 (propagated-inputs (list ruby-prettier-print))
14918 (synopsis "Fast Ruby parser and formatter")
14919 (description "Syntax Tree is a suite of tools built on top of the internal
14920CRuby parser. It provides the ability to generate a syntax tree from source,
14921as well as the tools necessary to inspect and manipulate that syntax tree. It
14922can be used to build formatters, linters, language servers, and more.")
14923 (home-page "https://github.com/ruby-syntax-tree/syntax_tree")
14924 (license license:expat)))
14925
14926(define-public ruby-stringio
14927 (package
14928 (name "ruby-stringio")
14929 (version "3.1.0")
14930 (source (origin
14931 (method git-fetch)
14932 (uri (git-reference
14933 (url "https://github.com/ruby/stringio")
14934 (commit (string-append "v" version))))
14935 (file-name (git-file-name name version))
14936 (sha256
14937 (base32
14938 "1jgi2w5y0z0x9mfapr2pdlag4wvn03fpf5kbai8bscyh8nn79yka"))))
14939 (build-system ruby-build-system)
14940 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
14941 (synopsis "Pseudo `IO` class from and to `String`")
14942 (description "Pseudo `IO` class from and to `String`.")
14943 (home-page "https://github.com/ruby/stringio")
14944 (license license:bsd-2)))
14945
14946(define-public ruby-stream
14947 (package
14948 (name "ruby-stream")
14949 (version "0.5.5")
14950 (source (origin
14951 (method url-fetch)
14952 (uri (rubygems-uri "stream" version))
14953 (sha256
14954 (base32
14955 "016m9v81vpj14d8g5ins91zc4pzl7vf5f1gxl7jhfsfy601k7cv2"))))
14956 (build-system ruby-build-system)
14957 (arguments
14958 '(#:phases
14959 (modify-phases %standard-phases
14960 (add-before 'check 'remove-version-constraints
14961 (lambda _
14962 (delete-file "Gemfile.lock"))))))
14963 (native-inputs (list bundler ruby-stringio ruby-webrick ruby-yard))
14964 (synopsis "Interface for external iterators")
14965 (description "Module Stream defines an interface for external iterators.")
14966 (home-page "https://github.com/monora/stream")
14967 (license license:bsd-2)))
14968
14969(define sorbet-version "0.5.10610.20230106174520-1fa668010")
14970
14971(define sorbet-monorepo
14972 (origin
14973 (method git-fetch)
14974 (uri (git-reference
14975 (url "https://github.com/sorbet/sorbet")
14976 (commit sorbet-version)))
14977 (file-name (string-append "sorbet-" sorbet-version "-checkout"))
14978 (sha256
14979 (base32
14980 "0f21dl06alxwn6xgdxyrkd58plmmsv04z2bcls9ld4cfzsrs5537"))))
14981
14982(define (make-sorbet-gem-source gem)
14983 "Return the source of GEM, a sub-directory."
14984 (computed-file
14985 (string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout")
14986 (with-imported-modules (source-module-closure '((guix build utils)))
14987 #~(begin
14988 (use-modules (guix build utils))
14989 (copy-recursively (string-append #$sorbet-monorepo
14990 "/gems/sorbet-" #$gem)
14991 #$output)))))
14992
14993(define-public ruby-sorbet-runtime
14994 (package
14995 (name "ruby-sorbet-runtime")
14996 (version sorbet-version)
14997 (source (make-sorbet-gem-source "runtime"))
14998 (build-system ruby-build-system)
14999 ;; 25 out of 841 tests currently fail, seemingly due to invalid
15000 ;; assumptions about file names in the build environment (see:
15001 ;; https://github.com/sorbet/sorbet/issues/6650).
15002 (arguments (list #:tests? #f))
15003 (native-inputs
15004 (list ruby-minitest
15005 ruby-mocha
15006 ruby-rubocop
15007 ruby-rubocop-performance
15008 ruby-concurrent-ruby
15009 ruby-pry
15010 ruby-parser
15011 ruby-subprocess))
15012 (synopsis "Runtime type checking component for Sorbet")
15013 (description "Sorbet's runtime type checking component. Sorbet is a
15014powerful type checker for Ruby.")
15015 (home-page "https://sorbet.org")
15016 (license license:asl2.0)))
15017
15018(define-public ruby-mustache
15019 (package
15020 (name "ruby-mustache")
15021 (version "1.1.1")
15022 (source
15023 (origin
15024 (method url-fetch)
15025 (uri (rubygems-uri "mustache" version))
15026 (sha256
15027 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
15028 (build-system ruby-build-system)
15029 (native-inputs
15030 `(("ruby-simplecov" ,ruby-simplecov)
15031 ("test-patch"
15032 ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch"))))
15033 (arguments
15034 `(#:phases
15035 (modify-phases %standard-phases
15036 (add-after 'unpack 'patch-tests
15037 (lambda* (#:key inputs #:allow-other-keys)
15038 (invoke "patch" "-p1" "--batch" "-i"
15039 (assoc-ref inputs "test-patch")))))))
15040 (synopsis "Framework-agnostic way to render logic-free views")
15041 (description
15042 "Mustache is a framework-agnostic way to render logic-free views.
15043Think of Mustache as a replacement for your views. Instead of views
15044consisting of ERB or HAML with random helpers and arbitrary logic,
15045your views are broken into two parts: a Ruby class and an HTML
15046template.")
15047 (home-page "https://github.com/mustache/mustache")
15048 (license license:expat)))
15049
15050(define-public ruby-mustermann
15051 (package
15052 (name "ruby-mustermann")
15053 (version "3.0.0")
15054 (source
15055 (origin
15056 (method url-fetch)
15057 (uri (rubygems-uri "mustermann" version))
15058 (sha256
15059 (base32
15060 "0rwbq20s2gdh8dljjsgj5s6wqqfmnbclhvv2c2608brv7jm6jdbd"))))
15061 (build-system ruby-build-system)
15062 (arguments
15063 ;; No tests.
15064 '(#:tests? #f))
15065 (synopsis "Library implementing patterns that behave like regular expressions")
15066 (description "Given a string pattern, Mustermann will turn it into an
15067object that behaves like a regular expression and has comparable performance
15068characteristics.")
15069 (home-page "https://github.com/sinatra/mustermann")
15070 (license license:expat)))
15071
15072(define-public ruby-mutex-m
15073 (package
15074 (name "ruby-mutex-m")
15075 (version "0.3.0")
15076 (source
15077 (origin
15078 (method git-fetch)
15079 (uri (git-reference
15080 (url "https://github.com/ruby/mutex_m")
15081 (commit (string-append "v" version))))
15082 (file-name (git-file-name name version))
15083 (sha256
15084 (base32 "162khhcahd6bn4r63driw23745lyg7h5dx5hli3clxbrpa1c0qvx"))))
15085 (build-system ruby-build-system)
15086 (synopsis "Mixin to extend objects to be handled like a Mutex.")
15087 (description
15088 "When @code{mutex_m} is required, any object that extends or includes
15089@code{Mutex_m} will be treated like a Mutex.")
15090 (home-page "https://github.com/ruby/mutex_m")
15091 (license license:bsd-2)))
15092
15093(define-public ruby-prettier-print
15094 (package
15095 (name "ruby-prettier-print")
15096 (version "1.2.1")
15097 (source (origin
15098 (method git-fetch) ;for tests
15099 (uri (git-reference
15100 (url "https://github.com/ruby-syntax-tree/prettier_print")
15101 (commit (string-append "v" version))))
15102 (file-name (git-file-name name version))
15103 (sha256
15104 (base32
15105 "00cg40jc0il1hpsrpsrqwhsxmx7day9lxp1ksrm08zxzsrz9ykqz"))))
15106 (build-system ruby-build-system)
15107 (native-inputs (list ruby-simplecov))
15108 (synopsis "Compatible and featureful implementation of @code{prettyprint}")
15109 (description "This package provides a drop-in replacement for the
15110@code{prettyprint} gem, with more functionality.")
15111 (home-page "https://github.com/ruby-syntax-tree/prettier_print")
15112 (license license:expat)))
15113
15114(define-public ruby-html-proofer
15115 (package
15116 (name "ruby-html-proofer")
15117 (version "5.0.3")
15118 (source
15119 (origin
15120 (method git-fetch)
15121 (uri (git-reference
15122 (url "https://github.com/gjtorikian/html-proofer")
15123 (commit (string-append "v" version))))
15124 (file-name (git-file-name name version))
15125 (sha256
15126 (base32
15127 "01ksss3ikppc45z2q33bx8bb9785bqlp1rdqascaqg9mhs392adk"))))
15128 (build-system ruby-build-system)
15129 (arguments
15130 (list
15131 ;; Tests require vcr, which is under the Hippocratic license, which is
15132 ;; not a free software license (see:
15133 ;; https://www.gnu.org/licenses/license-list.html#hippocratic).
15134 #:tests? #f
15135 #:phases
15136 #~(modify-phases %standard-phases
15137 (add-after 'extract-gemspec 'relax-requirements
15138 (lambda _
15139 (substitute* "html-proofer.gemspec"
15140 (("required_ruby_version = \\[\">= 3.1\"")
15141 "required_ruby_version = [\">= 2.6\""))))
15142 (replace 'replace-git-ls-files
15143 (lambda _
15144 ;; The html-proofer.gemspec file contains 'all_files = %x(git
15145 ;; ls-files -z).split("\x0")', but the original phase matches on
15146 ;; `git ls-files -z`.
15147 ;; TODO: Improve ruby-build-system patterns on core-updates.
15148 (substitute* "html-proofer.gemspec"
15149 (("git ls-files -z")
15150 "find . -type f -not -regex '.*\\.gem$' -print0 \
15151| sort -z | cut -zc3-")))))))
15152 (propagated-inputs
15153 (list ruby-addressable
15154 ruby-mercenary
15155 ruby-nokogiri
15156 ruby-parallel
15157 ruby-rainbow
15158 ruby-typhoeus
15159 ruby-yell))
15160 (synopsis "Test your rendered HTML files to make sure they're accurate")
15161 (description
15162 "HTMLProofer is a set of tests to validate your HTML output. These
15163tests check if your image references are legitimate, if they have alt tags,
15164if your internal links are working, and so on. It's intended to be an
15165all-in-one checker for your output.")
15166 (home-page "https://github.com/gjtorikian/html-proofer")
15167 (license license:expat)))
15168
15169(define-public ruby-htmlentities
15170 (package
15171 (name "ruby-htmlentities")
15172 (version "4.3.4")
15173 (source
15174 (origin
15175 (method url-fetch)
15176 (uri (rubygems-uri "htmlentities" version))
15177 (sha256
15178 (base32
15179 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
15180 (build-system ruby-build-system)
15181 (arguments
15182 `(#:phases
15183 (modify-phases %standard-phases
15184 (replace 'check
15185 (lambda _
15186 (map (lambda (file)
15187 (invoke "ruby" "-Itest" file))
15188 (find-files "./test" ".*_test\\.rb")))))))
15189 (synopsis "Encode and decode (X)HTML entities")
15190 (description
15191 "This package provides a module for encoding and decoding (X)HTML
15192entities.")
15193 (home-page "https://github.com/threedaymonk/htmlentities")
15194 (license license:expat)))
15195
15196;;; FIXME: Currently broken with rack 3, awaiting the merge for
15197;;; https://github.com/sinatra/sinatra/pull/1857 and a new release.
15198(define-public ruby-sinatra
15199 (package
15200 (name "ruby-sinatra")
15201 (version "3.0.5")
15202 (source
15203 (origin
15204 (method url-fetch)
15205 (uri (rubygems-uri "sinatra" version))
15206 (sha256
15207 (base32
15208 "1ryfja9yd3fq8n1p5yi3qnd0pjk7bkycmxxmbb1bj0axlr1pdv20"))))
15209 (build-system ruby-build-system)
15210 (propagated-inputs
15211 (list ruby-mustermann ruby-rack ruby-rack-protection ruby-tilt/minimal))
15212 (synopsis "DSL for quick web applications creation in Ruby")
15213 (description
15214 "Sinatra is a DSL for quickly creating web applications in Ruby with
15215minimal effort.")
15216 (home-page "https://sinatrarb.com/")
15217 (license license:expat)))
15218
15219(define-public ruby-timeout
15220 (package
15221 (name "ruby-timeout")
15222 (version "0.6.1")
15223 (source (origin
15224 (method git-fetch) ;for tests
15225 (uri (git-reference
15226 (url "https://github.com/ruby/timeout")
15227 (commit (string-append "v" version))))
15228 (file-name (git-file-name name version))
15229 (sha256
15230 (base32
15231 "1901x2cabiiiq9awz636aifsrxnx8k4wbgpaq0dz6486pf1jv2sl"))))
15232 (build-system ruby-build-system)
15233 (native-inputs (list ruby-test-unit-ruby-core))
15234 (synopsis "Timeout library for Ruby")
15235 (description "Timeout provides a way to auto-terminate a potentially
15236long-running operation if it hasn't finished in a fixed amount of time.")
15237 (home-page "https://github.com/ruby/timeout")
15238 (license (list license:bsd-2 license:ruby))))
15239
15240(define-public ruby-thin
15241 (package
15242 (name "ruby-thin")
15243 (version "1.7.2")
15244 (source
15245 (origin
15246 (method url-fetch)
15247 (uri (rubygems-uri "thin" version))
15248 (sha256
15249 (base32
15250 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
15251 (build-system ruby-build-system)
15252 (arguments
15253 '(#:tests? #f
15254 #:gem-flags '("--" "--with-cflags=-Wno-error=implicit-function-declaration")))
15255 (propagated-inputs
15256 (list ruby-daemons ruby-eventmachine ruby-rack))
15257 (synopsis "Thin and fast web server for Ruby")
15258 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
15259@itemize
15260@item the Mongrel parser,
15261@item Event Machine, a network I/O library with high scalability, performance
15262and stability,
15263@item Rack, a minimal interface between webservers and Ruby frameworks.
15264@end itemize\n")
15265 (home-page "https://github.com/macournoyer/thin")
15266 (license license:ruby)))
15267
15268(define-public ruby-truthy
15269 (package
15270 (name "ruby-truthy")
15271 (version "1.0.0")
15272 (source (origin
15273 (method url-fetch)
15274 (uri (rubygems-uri "truthy" version))
15275 (sha256
15276 (base32
15277 "19silgd65j3qwfk5w891p9wcmzdmi9ddm2kg5zbvvqn2h9lkfzmd"))))
15278 (build-system ruby-build-system)
15279 (arguments (list #:phases #~(modify-phases %standard-phases
15280 (replace 'check
15281 (lambda* (#:key tests? #:allow-other-keys)
15282 (when tests?
15283 (substitute* "spec/spec_helper.rb"
15284 (("require 'spec'")
15285 "require 'rspec'"))
15286 (invoke "rspec")))))))
15287 (native-inputs (list ruby-rspec))
15288 (synopsis "Object truthiness-related Ruby library")
15289 (description "This library makes it easier to discover the truth values of
15290various Ruby objects.")
15291 (home-page "https://github.com/ymendel/truthy")
15292 (license license:expat)))
15293
15294(define-public ruby-tsort
15295 (package
15296 (name "ruby-tsort")
15297 (version "0.2.0")
15298 (source
15299 (origin
15300 (method url-fetch)
15301 (uri (rubygems-uri "tsort" version))
15302 (sha256
15303 (base32 "17q8h020dw73wjmql50lqw5ddsngg67jfw8ncjv476l5ys9sfl4n"))))
15304 (build-system ruby-build-system)
15305 (synopsis "Topological sorting library for Ruby")
15306 (description
15307 "This RubyGem implements topological sorting using Tarjan's algorithm
15308for strongly connected components. It is designed to be able to be
15309used with any object which can be interpreted as a directed graph.")
15310 (home-page "https://github.com/ruby/tsort")
15311 (license (list license:ruby license:bsd-2))))
15312
15313(define-public ruby-skinny
15314 (package
15315 (name "ruby-skinny")
15316 (version "0.2.4")
15317 (source
15318 (origin
15319 (method url-fetch)
15320 (uri (rubygems-uri "skinny" version))
15321 (sha256
15322 (base32
15323 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
15324 (build-system ruby-build-system)
15325 (arguments
15326 '(#:tests? #f ; No included tests
15327 #:phases
15328 (modify-phases %standard-phases
15329 (add-before 'build 'patch-gemspec
15330 (lambda _
15331 (substitute* ".gemspec"
15332 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
15333 "<eventmachine>, [\">= 1.0.0\"")
15334 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, [")))))))
15335 (propagated-inputs
15336 (list ruby-eventmachine ruby-thin))
15337 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
15338 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
15339the Thin library.")
15340 (home-page "https://github.com/sj26/skinny")
15341 (license license:expat)))
15342
15343(define-public ruby-sys-filesystem
15344 (package
15345 (name "ruby-sys-filesystem")
15346 (version "1.3.4")
15347 (source (origin
15348 (method url-fetch)
15349 (uri (rubygems-uri "sys-filesystem" version))
15350 (sha256
15351 (base32
15352 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
15353 (build-system ruby-build-system)
15354 (arguments
15355 '(#:phases (modify-phases %standard-phases
15356 (add-before 'check 'set-HOME
15357 (lambda _
15358 ;; Some tests attempt to stat $HOME. Let them.
15359 (setenv "HOME" "/tmp"))))))
15360 (propagated-inputs
15361 (list ruby-ffi))
15362 (native-inputs
15363 (list ruby-mkmf-lite))
15364 (synopsis "Gather file system information")
15365 (description
15366 "The @code{sys-filesystem} library provides a cross-platform interface
15367for gathering file system information, such as disk space and mount points.")
15368 (home-page "https://github.com/djberg96/sys-filesystem")
15369 (license license:asl2.0)))
15370
15371(define-public mailcatcher
15372 (package
15373 (name "mailcatcher")
15374 (version "0.7.1")
15375 (source
15376 (origin
15377 (method url-fetch)
15378 (uri (rubygems-uri "mailcatcher" version))
15379 (sha256
15380 (base32
15381 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
15382 (build-system ruby-build-system)
15383 (arguments
15384 ;; Tests require web/assets which is not included in the output. We
15385 ;; might be able to fix this by adding the Git repository to the GEM_PATH
15386 ;; of the tests. See ruby-mysql2.
15387 '(#:tests? #f
15388 #:phases
15389 (modify-phases %standard-phases
15390 (add-before 'build 'patch-gemspec
15391 (lambda _
15392 (substitute* ".gemspec"
15393 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
15394 "<eventmachine>, [\">= 1.0.9.1")
15395 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
15396 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
15397 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))))
15398 (add-before 'build 'loosen-dependency-contraint
15399 (lambda _
15400 (substitute* "lib/mail_catcher.rb"
15401 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
15402 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
15403 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
15404 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\"")))))))
15405 (inputs
15406 (list ruby-eventmachine
15407 ruby-mail
15408 ruby-rack
15409 ruby-sinatra
15410 ruby-skinny
15411 ruby-sqlite3
15412 ruby-thin))
15413 (synopsis "SMTP server which catches messages to display them a browser")
15414 (description
15415 "MailCatcher runs a super simple SMTP server which catches any message
15416sent to it to display in a web interface. Run mailcatcher, set your favourite
15417app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
15418then check out http://127.0.0.1:1080 to see the mail.")
15419 (home-page "https://mailcatcher.me")
15420 (license license:expat)))
15421
15422(define-public ruby-backport
15423 (package
15424 (name "ruby-backport")
15425 (version "1.1.2")
15426 (source
15427 (origin
15428 ;; The gem does not include test code, so fetch from the Git repository.
15429 (method git-fetch)
15430 (uri (git-reference
15431 (url "https://github.com/castwide/backport")
15432 (commit (string-append "v" version))))
15433 (file-name (git-file-name name version))
15434 (sha256
15435 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
15436 (build-system ruby-build-system)
15437 (arguments
15438 `(#:test-target "spec"))
15439 (native-inputs
15440 (list bundler ruby-rspec))
15441 (inputs
15442 (list ruby-simplecov))
15443 (synopsis "Pure Ruby library for event-driven IO")
15444 (description
15445 "This package provides a pure Ruby library for event-driven IO.")
15446 (home-page "https://github.com/castwide/backport")
15447 (license license:expat)))
15448
15449(define-public ruby-json-schema
15450 (package
15451 (name "ruby-json-schema")
15452 (version "2.8.1")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (rubygems-uri "json-schema" version))
15457 (sha256
15458 (base32
15459 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
15460 (build-system ruby-build-system)
15461 (arguments
15462 `(#:tests? #f ; no tests
15463 #:phases
15464 (modify-phases %standard-phases
15465 (replace 'build
15466 (lambda _
15467 (invoke "gem" "build" ".gemspec"))))))
15468 (propagated-inputs
15469 (list ruby-addressable))
15470 (synopsis "Ruby JSON Schema Validator")
15471 (description "This library provides Ruby with an interface for validating
15472JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
15473support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
15474is also included.")
15475 (home-page "https://github.com/ruby-json-schema/json-schema")
15476 (license license:expat)))
15477
15478(define-public swagger-diff
15479 (package
15480 (name "swagger-diff")
15481 (version "2.0.0")
15482 (source
15483 (origin
15484 (method url-fetch)
15485 (uri (rubygems-uri "swagger-diff" version))
15486 (sha256
15487 (base32
15488 "18kbrijkafs3vfsbaqz0cqfj7jrz3aj8xr4fgn5if63wlximybv2"))))
15489 (build-system ruby-build-system)
15490 (arguments
15491 (list
15492 #:test-target "spec"
15493 #:phases
15494 #~(modify-phases %standard-phases
15495 ;; Don't run or require rubocop, the code linting tool, as this is a
15496 ;; bit unnecessary.
15497 (add-after 'unpack 'dont-run-rubocop
15498 (lambda _
15499 (substitute* "Rakefile"
15500 ((".*rubocop.*") "")
15501 ((".*RuboCop.*") "")))))))
15502 (propagated-inputs
15503 (list ruby-json-schema))
15504 (native-inputs
15505 (list bundler ruby-rspec-core ruby-rspec-expectations))
15506 (synopsis
15507 "Compare Open API Initiative specification files")
15508 (description
15509 "Swagger::Diff is a utility for comparing two different Open API
15510Initiative (OAI) specifications (formerly known as Swagger specifications).
15511It is intended to determine whether a newer API specification is
15512backwards-compatible with an older API specification.")
15513 (home-page "https://github.com/civisanalytics/swagger-diff")
15514 (license license:bsd-3)))
15515
15516(define-public ruby-reverse-markdown
15517 (package
15518 (name "ruby-reverse-markdown")
15519 (version "1.1.0")
15520 (source
15521 (origin
15522 (method url-fetch)
15523 (uri (rubygems-uri "reverse_markdown" version))
15524 (sha256
15525 (base32
15526 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
15527 (build-system ruby-build-system)
15528 (propagated-inputs
15529 (list ruby-nokogiri))
15530 (native-inputs
15531 (list bundler ruby-rspec ruby-kramdown ruby-simplecov))
15532 (arguments
15533 `(#:phases
15534 (modify-phases %standard-phases
15535 (replace 'check
15536 (lambda* (#:key tests? #:allow-other-keys)
15537 (when tests?
15538 (invoke "rspec")))))))
15539 (synopsis "Convert HTML into Markdown")
15540 (description
15541 "This Ruby module allows you to map simple HTML back into
15542Markdown---e.g., if you want to import existing HTML data in your
15543application.")
15544 (home-page "https://github.com/xijo/reverse_markdown")
15545 (license license:wtfpl2)))
15546
15547(define-public ruby-solargraph
15548 (package
15549 (name "ruby-solargraph")
15550 (version "0.40.3")
15551 (source
15552 (origin
15553 (method url-fetch)
15554 (uri (rubygems-uri "solargraph" version))
15555 (sha256
15556 (base32
15557 "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
15558 (build-system ruby-build-system)
15559 (propagated-inputs
15560 (list ruby-backport
15561 bundler
15562 ruby-benchmark
15563 ruby-e2mmap
15564 ruby-jaro-winkler
15565 ruby-kramdown
15566 ruby-kramdown-parser-gfm
15567 ruby-maruku
15568 ruby-nokogiri
15569 ruby-parser
15570 ruby-reverse-markdown
15571 ruby-rubocop
15572 ruby-thor
15573 ruby-tilt
15574 ruby-yard))
15575 (native-inputs
15576 (list ruby-rspec ruby-pry ruby-simplecov ruby-webmock))
15577 ;; FIXME: can't figure out how to run the tests properly:
15578
15579 ;; An error occurred while loading spec_helper.
15580 ;; Failure/Error: return gem_original_require(path)
15581 ;; LoadError:
15582 ;; cannot load such file -- spec_helper
15583 (arguments
15584 '(#:tests? #f
15585 #:phases
15586 (modify-phases %standard-phases
15587 (replace 'check
15588 (lambda* (#:key tests? #:allow-other-keys)
15589 (when tests?
15590 (invoke "rspec")))))))
15591 (synopsis
15592 "IDE tools for code completion, inline documentation, and static analysis")
15593 (description
15594 "Solargraph provides a comprehensive suite of tools for Ruby
15595programming: intellisense, diagnostics, inline documentation, and type
15596checking.")
15597 (home-page "https://solargraph.org/")
15598 (license license:expat)))
15599
15600(define-public ruby-wayback-machine-downloader
15601 (package
15602 (name "ruby-wayback-machine-downloader")
15603 (version "2.2.1")
15604 (source
15605 (origin
15606 (method url-fetch)
15607 (uri (rubygems-uri
15608 "wayback_machine_downloader"
15609 version))
15610 (sha256
15611 (base32
15612 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
15613 (build-system ruby-build-system)
15614 (arguments
15615 '(#:tests? #f)) ; no tests
15616 (synopsis "Download archived websites from the Wayback Machine")
15617 (description
15618 "Wayback Machine Downloader is a command line tool for downloading
15619websites from the Internet Archive's Wayback Machine (archive.org).
15620It allows fine grained control over what to download by specifying
15621which snapshots to consider and what files to include.")
15622 (home-page
15623 "https://github.com/hartator/wayback-machine-downloader")
15624 (license license:expat)))
15625
15626(define-public ruby-zeitwerk
15627 (package
15628 (name "ruby-zeitwerk")
15629 (version "2.7.1")
15630 (source
15631 (origin
15632 (method git-fetch) ;for tests
15633 (uri (git-reference
15634 (url "https://github.com/fxn/zeitwerk")
15635 (commit (string-append "v" version))))
15636 (file-name (git-file-name name version))
15637 (sha256
15638 (base32
15639 "19qmcdpbh4bl878zd1w19064yjkpb8sxaydcasqfa7p8cfg3hnsr"))))
15640 (build-system ruby-build-system)
15641 (native-inputs
15642 (list ruby-minitest
15643 ruby-minitest-focus
15644 ruby-minitest-proveit
15645 ruby-minitest-reporters
15646 ruby-warning))
15647 (synopsis "Efficient and thread-safe code loader for Ruby")
15648 (description
15649 "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
15650and application may have their own independent autoloader, with its own
15651configuration, inflector, and logger. Supports autoloading, reloading, and
15652eager loading.")
15653 (home-page "https://github.com/fxn/zeitwerk")
15654 (license license:expat)))
15655
15656(define-public ruby-warning
15657 (package
15658 (name "ruby-warning")
15659 (version "1.5.0")
15660 (source
15661 (origin
15662 (method url-fetch)
15663 (uri (rubygems-uri "warning" version))
15664 (sha256
15665 (base32 "0lwcf7fsz1sda1fdbqq1i4q9kzg4f5vwrzgfg1vpa1hcxagw84hg"))))
15666 (build-system ruby-build-system)
15667 (arguments '(#:tests? #f)) ; No tests bundled.
15668 (synopsis "Custom processing for warnings")
15669 (description
15670 "This package adds custom processing for warnings for Ruby, including the
15671ability to ignore specific warning messages, ignore warnings in specific
15672files/directories, include backtraces with warnings, treat warnings as errors,
15673deduplicate warnings, and add custom handling for all warnings in specific
15674files/directories.")
15675 (home-page "https://github.com/jeremyevans/ruby-warning")
15676 (license license:expat)))
15677
15678(define-public ruby-wwtd
15679 (package
15680 (name "ruby-wwtd")
15681 (version "1.4.1")
15682 (home-page "https://github.com/grosser/wwtd")
15683 (source (origin
15684 (method git-fetch)
15685 (uri (git-reference
15686 (url home-page)
15687 (commit (string-append "v" version))))
15688 (file-name (git-file-name name version))
15689 (sha256
15690 (base32
15691 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
15692 (modules '((guix build utils)))
15693 (snippet
15694 '(begin
15695 ;; Remove bundled library.
15696 (delete-file "spec/rake-12.3.0.gem")))))
15697 (build-system ruby-build-system)
15698 (arguments
15699 '(;; XXX: Tests need multiple versions of ruby, wants to run
15700 ;; `bundle install`, etc.
15701 #:tests? #f
15702 #:phases (modify-phases %standard-phases
15703 (replace 'replace-git-ls-files
15704 (lambda _
15705 (substitute* "wwtd.gemspec"
15706 (("git ls-files lib/ bin/`")
15707 "find lib/ bin/ -type f |sort`"))))
15708 (add-before 'check 'remove-version-constraints
15709 (lambda _
15710 (delete-file "Gemfile.lock")))
15711 (replace 'check
15712 (lambda* (#:key tests? #:allow-other-keys)
15713 (if tests?
15714 (invoke "rspec" "spec/")
15715 (format #t "test suite not run~%")))))))
15716 (native-inputs
15717 (list ruby-bump ruby-rspec))
15718 (synopsis "Run @file{.travis.yml} files locally")
15719 (description
15720 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
15721defined in @file{.travis.yml} on your local machine, using @code{rvm},
15722@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
15723 (license license:expat)))
15724
15725(define-public ruby-rugged
15726 (package
15727 (name "ruby-rugged")
15728 (version "1.9.0")
15729 (source (origin
15730 (method git-fetch)
15731 (uri (git-reference
15732 (url "https://github.com/libgit2/rugged")
15733 (commit (string-append "v" version))))
15734 (file-name (git-file-name name version))
15735 (sha256
15736 (base32
15737 "0ixylc4hv4iqrkhzacq8nar70da8pml26nf9vmgys1kp2j7zc35g"))))
15738 (build-system ruby-build-system)
15739 (arguments
15740 (list #:gem-flags
15741 #~(list "--" "--use-system-libraries")
15742 #:phases
15743 #~(modify-phases %standard-phases
15744 (add-after 'unpack 'adjust-extconf.rb
15745 (lambda _
15746 (delete-file-recursively "vendor")
15747 ;; Neither using --with-git2-dir=$prefix nor providing
15748 ;; pkg-config allows locating the libgit2 prefix (see:
15749 ;; https://github.com/libgit2/rugged/issues/955).
15750 (substitute* "ext/rugged/extconf.rb"
15751 (("LIBGIT2_VER") "LIBGIT2_VERSION")
15752 (("LIBGIT2_DIR = File.join.*'vendor', 'libgit2'.*")
15753 (format #f "LIBGIT2_DIR = ~s~%"
15754 #$(this-package-input "libgit2"))))))
15755 (delete 'check) ;moved after the install phase
15756 (add-after 'install 'check
15757 (assoc-ref %standard-phases 'check))
15758 (add-before 'check 'set-GEM_PATH
15759 (lambda _
15760 (setenv "GEM_PATH" (string-append
15761 (getenv "GEM_PATH") ":"
15762 #$output "/lib/ruby/vendor_ruby"))))
15763 (add-before 'check 'disable-problematic-tests
15764 (lambda _
15765 (with-directory-excursion "test"
15766 (for-each delete-file
15767 ;; These tests require an actual libgit2 git
15768 ;; repository checkout.
15769 '("blame_test.rb"
15770 "blob_test.rb"
15771 "cherrypick_test.rb"
15772 "commit_test.rb"
15773 "config_test.rb"
15774 "diff_test.rb"
15775 "index_test.rb"
15776 "merge_test.rb"
15777 "note_test.rb"
15778 "object_test.rb"
15779 "patch_test.rb"
15780 "rebase_test.rb"
15781 "reference_test.rb"
15782 "remote_test.rb"
15783 "repo_apply_test.rb"
15784 "repo_ignore_test.rb"
15785 "repo_pack_test.rb"
15786 "repo_reset_test.rb"
15787 "repo_test.rb"
15788 "revert_test.rb"
15789 "settings_test.rb"
15790 "status_test.rb"
15791 "submodule_test.rb"
15792 "tag_test.rb"
15793 "tree_test.rb"
15794 "walker_test.rb"))
15795 (delete-file-recursively "online")))))))
15796 (native-inputs (list git-minimal/pinned ruby-rake-compiler))
15797 (inputs (list libgit2))
15798 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
15799 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
15800you the speed and portability of libgit2 with the beauty of the Ruby
15801language.")
15802 (home-page "https://www.rubydoc.info/gems/rugged")
15803 (license license:expat)))
15804
15805(define-public ruby-yell
15806 (package
15807 (name "ruby-yell")
15808 (version "2.2.2")
15809 (source
15810 (origin
15811 (method url-fetch)
15812 (uri (rubygems-uri "yell" version))
15813 (sha256
15814 (base32
15815 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
15816 (build-system ruby-build-system)
15817 (arguments
15818 `(#:phases
15819 (modify-phases %standard-phases
15820 (replace 'check
15821 (lambda _
15822 (invoke "rake" "examples")))))) ; there is no test target.
15823 (synopsis
15824 "Extensible logging library for Ruby")
15825 (description
15826 "Yell is a comprehensive logging replacement for Ruby. It defines
15827multiple adapters, various log level combinations and message formatting
15828options.")
15829 (home-page "https://github.com/rudionrails/yell")
15830 (license license:expat)))
15831
15832(define-public ruby-e2mmap
15833 (package
15834 (name "ruby-e2mmap")
15835 (version "0.1.0")
15836 (source
15837 (origin
15838 (method url-fetch)
15839 (uri (rubygems-uri "e2mmap" version))
15840 (sha256
15841 (base32
15842 "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
15843 (build-system ruby-build-system)
15844 (arguments
15845 `(#:tests? #f)) ;; There is a rakefile but no tests
15846 (synopsis
15847 "Module for defining custom exceptions with specific messages")
15848 (description
15849 "Exception2MessageMapper (e2mmap) is a helper module for easily defining
15850exceptions with predefined messages.")
15851 (home-page "https://github.com/ruby/e2mmap")
15852 (license license:bsd-2)))
15853
15854(define-public ruby-benchmark
15855 (package
15856 (name "ruby-benchmark")
15857 (version "0.4.0")
15858 (source
15859 (origin
15860 (method url-fetch)
15861 (uri (rubygems-uri "benchmark" version))
15862 (sha256
15863 (base32
15864 "0jl71qcgamm96dzyqk695j24qszhcc7liw74qc83fpjljp2gh4hg"))))
15865 (build-system ruby-build-system)
15866 (synopsis "Performance benchmarking library")
15867 (description "This package provides methods for benchmarking Ruby code,
15868giving detailed reports on the time taken for each task.")
15869 (home-page "https://github.com/ruby/benchmark")
15870 (license license:bsd-2)))
15871
15872(define-public ruby-jekyll-feed
15873 (package
15874 (name "ruby-jekyll-feed")
15875 (version "0.15.1")
15876 (source
15877 (origin
15878 (method url-fetch)
15879 (uri (rubygems-uri "jekyll-feed" version))
15880 (sha256
15881 (base32
15882 "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
15883 (build-system ruby-build-system)
15884 (arguments
15885 `(#:tests? #false)) ;there are none
15886 (propagated-inputs
15887 (list jekyll))
15888 (synopsis
15889 "Jekyll plugin to generate an Atom feed of your Jekyll posts")
15890 (description
15891 "This package provides a Jekyll plugin to generate an Atom feed
15892of your Jekyll posts.")
15893 (home-page
15894 "https://github.com/jekyll/jekyll-feed")
15895 (license license:expat)))
15896
15897(define-public ruby-jekyll-sitemap
15898 (package
15899 (name "ruby-jekyll-sitemap")
15900 (version "1.4.0")
15901 (source
15902 (origin
15903 (method url-fetch)
15904 (uri (rubygems-uri "jekyll-sitemap" version))
15905 (sha256
15906 (base32
15907 "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
15908 (build-system ruby-build-system)
15909 (arguments
15910 `(#:tests? #false)) ;there are none
15911 (propagated-inputs
15912 (list jekyll))
15913 (synopsis
15914 "Automatically generate a sitemap.xml for your Jekyll site")
15915 (description
15916 "This package provides a Jekyll plugin to silently generate
15917a sitemaps.org compliant sitemap for your Jekyll site.")
15918 (home-page
15919 "https://github.com/jekyll/jekyll-sitemap")
15920 (license license:expat)))
15921
15922(define-public ruby-jekyll-seo-tag
15923 (package
15924 (name "ruby-jekyll-seo-tag")
15925 (version "2.7.1")
15926 (source
15927 (origin
15928 (method url-fetch)
15929 (uri (rubygems-uri "jekyll-seo-tag" version))
15930 (sha256
15931 (base32
15932 "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
15933 (build-system ruby-build-system)
15934 (arguments
15935 `(#:tests? #false))
15936 (propagated-inputs
15937 (list jekyll))
15938 (synopsis
15939 "Jekyll plugin to add metadata tags for search engines and social networks")
15940 (description
15941 "This package provides a Jekyll plugin to add metadata tags for search engines
15942and social networks to better index and display your site's content.")
15943 (home-page
15944 "https://github.com/jekyll/jekyll-seo-tag")
15945 (license license:expat)))
15946
15947(define-public ruby-taskjuggler
15948 (package
15949 (name "ruby-taskjuggler")
15950 (version "3.8.1")
15951 (source
15952 (origin
15953 (method url-fetch)
15954 (uri (rubygems-uri "taskjuggler" version))
15955 (sha256
15956 (base32
15957 "16d5vgz54all8vl3haqy6j69plny3np4kc3wq7wy3xa3i0h7v60z"))))
15958 (build-system ruby-build-system)
15959 (native-inputs (list ruby-rspec tzdata-for-tests))
15960 (propagated-inputs
15961 (list ruby-mail ruby-term-ansicolor))
15962 (arguments
15963 '(#:phases (modify-phases %standard-phases
15964 (replace 'replace-git-ls-files
15965 (lambda _
15966 (substitute* "tasks/rdoc.rake"
15967 (("`git ls-files -- lib`")
15968 "`find lib/ -type f |sort`"))))
15969 (add-before 'check 'tzdir-setup
15970 (lambda* (#:key inputs #:allow-other-keys)
15971 (setenv "TZDIR"
15972 (string-append (assoc-ref inputs "tzdata")
15973 "/share/zoneinfo"))))
15974 (add-before 'check 'delete-test-BatchProcessor
15975 ;; test_BatchProcessor fails with exception:
15976 ;; run> terminated with exception (report_on_exception is true)
15977 (lambda _
15978 (delete-file "test/test_BatchProcessor.rb"))))))
15979 (synopsis
15980 "Project management command line tool with a domain specific language")
15981 (description
15982 "TaskJuggler (tj3) is a project management tool for project planning and
15983tracking using a domain specific language; projects are plain text files
15984written using your favourite text editor. It includes reporting in HTML, CSV
15985or iCalendar format and an email based status tracking system to send and
15986receive time sheets from collaborators.
15987
15988It covers the complete spectrum of project management tasks from the first
15989idea to the completion of the project. It assists you during project scoping,
15990resource assignment, cost and revenue planning, risk and communication
15991management, status tracking and reporting.")
15992 (home-page "https://taskjuggler.org")
15993 (license license:gpl2)))
15994
15995(define-public ruby-cmath
15996 (package
15997 (name "ruby-cmath")
15998 (version "1.0.0")
15999 (source
16000 (origin
16001 (method url-fetch)
16002 (uri (rubygems-uri "cmath" version))
16003 (sha256
16004 (base32
16005 "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
16006 (build-system ruby-build-system)
16007 (arguments
16008 `(#:tests? #false))
16009 (native-inputs
16010 (list bundler ruby-rake-compiler))
16011 (synopsis "Trigonometric functions for complex numbers")
16012 (description
16013 "This gem is a library that provides trigonometric and transcendental
16014functions for complex numbers. The functions in this module accept integers,
16015floating-point numbers or complex numbers as arguments.")
16016 (home-page "https://github.com/ruby/cmath")
16017 (license license:bsd-2)))
16018
16019(define-public ruby-sucker-punch
16020 (package
16021 (name "ruby-sucker-punch")
16022 (version "3.1.0")
16023 (source
16024 (origin
16025 (method url-fetch)
16026 (uri (rubygems-uri "sucker_punch" version))
16027 (sha256
16028 (base32 "12by9vx8q6l4i56q62k1s1ymaxbpg4rny5zngj5i5h09kyh2yp4p"))))
16029 (build-system ruby-build-system)
16030 (arguments
16031 `(#:phases
16032 (modify-phases %standard-phases
16033 (add-after 'extract-gemspec 'less-strict-dependencies
16034 (lambda _
16035 (substitute* "sucker_punch.gemspec"
16036 (("1.0.0") "1.0")))))))
16037 (native-inputs
16038 (list
16039 ruby-pry))
16040 (propagated-inputs
16041 (list ruby-concurrent-ruby))
16042 (home-page "https://github.com/brandonhilkert/sucker_punch")
16043 (synopsis "Asynchronous processing library for Ruby")
16044 (description "Sucker Punch is a single-process Ruby asynchronous processing
16045library. It is perfect for asynchronous processes like emailing, data crunching
16046or social platform manipulation; and generally recommended for jobs that are
16047fast and non-mission critical like logs, emails, etc.")
16048 (license license:expat)))
16049
16050(define-public ruby-countdownlatch
16051 (package
16052 (name "ruby-countdownlatch")
16053 (version "1.0.0")
16054 (source
16055 (origin
16056 (method url-fetch)
16057 (uri (rubygems-uri "countdownlatch" version))
16058 (sha256
16059 (base32 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
16060 (build-system ruby-build-system)
16061 (home-page "https://github.com/benlangfeld/countdownlatch")
16062 (synopsis "Thread synchronization aid Ruby")
16063 (description "CountDownLatch is a synchronization aid that allows one or
16064more threads to wait until a set of operations being performed in other threads
16065completes.")
16066 (license license:expat)))
16067
16068(define-public ruby-value-semantics
16069 (package
16070 (name "ruby-value-semantics")
16071 (version "3.6.1")
16072 (source
16073 (origin
16074 (method url-fetch)
16075 (uri (rubygems-uri "value_semantics" version))
16076 (sha256
16077 (base32 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
16078 (build-system ruby-build-system)
16079 (arguments
16080 `(#:phases
16081 (modify-phases %standard-phases
16082 (replace 'check
16083 (lambda* (#:key tests? #:allow-other-keys)
16084 (when tests?
16085 (invoke "rspec")))))))
16086 (native-inputs
16087 (list
16088 ruby-rspec))
16089 (home-page "https://github.com/tomdalling/value_semantics")
16090 (synopsis "Ruby gem for making value classes")
16091 (description "ValueSemantics generates modules that provide conventional
16092value semantics for a given set of attributes. The behaviour is similar to an
16093immutable Struct class, plus extensible, lightweight validation and coercion.")
16094 (license license:expat)))
16095
16096(define-public ruby-promise
16097 (package
16098 (name "ruby-promise")
16099 (version "0.7.4")
16100 (source
16101 (origin
16102 (method url-fetch)
16103 (uri (rubygems-uri "promise.rb" version))
16104 (sha256
16105 (base32 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
16106 (build-system ruby-build-system)
16107 (arguments
16108 `(#:test-target "spec"
16109 #:phases
16110 (modify-phases %standard-phases
16111 (add-after 'extract-gemspec 'less-strict-dependencies
16112 (lambda _
16113 (substitute* "Rakefile"
16114 (("if Gem.ruby_version.*") "if false\n"))
16115 (substitute* "spec/spec_helper.rb"
16116 ((".*devtools/spec_helper.*") "\n")))))))
16117 (native-inputs
16118 (list
16119 ruby-rspec
16120 ruby-rspec-its
16121 ruby-awesome-print
16122 ruby-fuubar))
16123 (home-page "https://github.com/lgierth/promise.rb")
16124 (synopsis "Asynchronous operation library for Ruby")
16125 (description "Promise is a Ruby implementation of the Promises/A+
16126specification. It provides 100% mutation coverage, tested on MRI 1.9, 2.0, 2.1,
161272.2, Rubinius, and JRuby.")
16128 (license license:unlicense)))
16129
16130(define-public ruby-multicodecs
16131 (package
16132 (name "ruby-multicodecs")
16133 (version "0.2.1")
16134 (source
16135 (origin
16136 (method url-fetch)
16137 (uri (rubygems-uri "multicodecs" version))
16138 (sha256
16139 (base32 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
16140 (build-system ruby-build-system)
16141 (home-page "https://github.com/SleeplessByte/ruby-multicodec")
16142 (synopsis "Ruby implementation of multiformats/multicodec")
16143 (description "Multicodecs is the ruby implementation of
16144multiformats/multicodec, a canonical table of of codecs used by various
16145multiformats.")
16146 (license license:expat)))
16147
16148(define-public ruby-multihashes
16149 (package
16150 (name "ruby-multihashes")
16151 (version "0.2.0")
16152 (source
16153 (origin
16154 (method url-fetch)
16155 (uri (rubygems-uri "multihashes" version))
16156 (sha256
16157 (base32 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
16158 (build-system ruby-build-system)
16159 (propagated-inputs
16160 (list
16161 ruby-multicodecs))
16162 (home-page "https://github.com/multiformats/ruby-multihash")
16163 (synopsis "Multihash implementation for Ruby")
16164 (description "Multihashes provides a simple, low-level multihash
16165implementation for Ruby. A multihash is a digest with an embedded hash function
16166code")
16167 (license license:expat)))
16168
16169(define-public ruby-lazy-object
16170 (package
16171 (name "ruby-lazy-object")
16172 (version "0.0.3")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (rubygems-uri "lazy_object" version))
16177 (sha256
16178 (base32 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
16179 (build-system ruby-build-system)
16180 (arguments
16181 `(#:test-target "spec"))
16182 (home-page "https://github.com/HornsAndHooves/lazy_object")
16183 (synopsis "Object wrapper that forwards all calls to the reference object")
16184 (description "LazyObject is an object wrapper that forwards all calls to the
16185reference object. This object is not created until the first method dispatch.")
16186 (license license:expat)))
16187
16188(define-public ruby-citrus
16189 (package
16190 (name "ruby-citrus")
16191 (version "3.0.2")
16192 (source
16193 (origin
16194 (method git-fetch)
16195 ;; Download from GitHub because the rubygems version does not contain
16196 ;; files needed for tests.
16197 (uri (git-reference
16198 (url "https://github.com/mjackson/citrus")
16199 (commit (string-append "v" version))))
16200 (file-name (git-file-name name version))
16201 (sha256
16202 (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
16203 (build-system ruby-build-system)
16204 (arguments
16205 (list #:phases
16206 #~(modify-phases %standard-phases
16207 (add-after 'unpack 'fix-citrus-version
16208 (lambda _
16209 (substitute* '("lib/citrus.rb" "citrus.gemspec")
16210 (("require 'citrus/version'")
16211 "")
16212 (("Citrus\\.version")
16213 (format #f "~s" #$version))))))))
16214 (home-page "https://mjackson.github.io/citrus/")
16215 (synopsis "Parsing Expressions for Ruby")
16216 (description "Citrus is a parsing library for Ruby that combines the
16217expressiveness of the language with the parsing expressions.")
16218 (license license:expat)))
16219
16220(define-public ruby-cbor
16221 (package
16222 (name "ruby-cbor")
16223 (version "0.5.10.1")
16224 (source
16225 (origin
16226 (method url-fetch)
16227 (uri (rubygems-uri "cbor" version))
16228 (sha256
16229 (base32 "1w3d5dhx4vjd707ihkcmq7fy78p5fgawcjdqw2byxnfw32gzgkbr"))))
16230 (build-system ruby-build-system)
16231 (arguments
16232 `(#:test-target "spec"))
16233 (native-inputs
16234 (list
16235 ruby-rspec
16236 ruby-rake-compiler
16237 ruby-yard))
16238 (home-page "https://cbor.io/")
16239 (synopsis "Concise Binary Object Representation")
16240 (description "CBOR is a library for the
16241@acronym{CBOR, Concise Binary Object Representation} format, based on
16242Sadayuki Furuhashi's MessagePack library.")
16243 (license license:asl2.0)))
16244
16245(define-public ruby-gem-release
16246 (package
16247 (name "ruby-gem-release")
16248 (version "2.2.2")
16249 (source
16250 (origin
16251 (method url-fetch)
16252 (uri (rubygems-uri "gem-release" version))
16253 (sha256
16254 (base32 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
16255 (build-system ruby-build-system)
16256 (arguments
16257 ;; No rakefile
16258 `(#:tests? #f))
16259 (home-page "https://github.com/svenfuchs/gem-release")
16260 (synopsis "Ruby gem plugin for release management")
16261 (description "GemRelease is a gem plugin that aims at making gem development
16262easier by automating repetitive work based on conventions, configuration, and
16263templates.")
16264 (license license:expat)))
16265
16266(define-public ruby-base32
16267 (package
16268 (name "ruby-base32")
16269 (version "0.3.4")
16270 (source
16271 (origin
16272 (method url-fetch)
16273 (uri (rubygems-uri "base32" version))
16274 (sha256
16275 (base32 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
16276 (build-system ruby-build-system)
16277 (native-inputs
16278 (list
16279 ruby-gem-release))
16280 (home-page "https://github.com/stesla/base32")
16281 (synopsis "Ruby extension for base32 encoding and decoding")
16282 (description "Base32 is a library which provides base32 decoding and
16283encoding.")
16284 (license license:expat)))
16285
16286(define-public ruby-dhall
16287 (package
16288 (name "ruby-dhall")
16289 (version "0.5.2")
16290 (source
16291 (origin
16292 (method url-fetch)
16293 (uri (rubygems-uri "dhall" version))
16294 (sha256
16295 (base32 "09wcq8xc1ynld04r2f332bx8cn7rjc4afaq8hm1dr2fc35jlpn6m"))))
16296 (build-system ruby-build-system)
16297 (arguments
16298 ;; No test in gem archive
16299 `(#:tests? #f))
16300 (propagated-inputs
16301 (list
16302 ruby-base32
16303 ruby-cbor
16304 ruby-citrus
16305 ruby-lazy-object
16306 ruby-multihashes
16307 ruby-promise
16308 ruby-value-semantics))
16309 (home-page "https://git.sr.ht/~singpolyma/dhall-ruby")
16310 (synopsis "Ruby implementation of the Dhall configuration language")
16311 (description "Dhall.rb is a Ruby implementation of the Dhall configuration
16312language. Dhall is a memory safe and non-Turing-complete configuration
16313language.")
16314 (license license:gpl3+)))
16315
16316(define-public ruby-money
16317 (package
16318 (name "ruby-money")
16319 (version "6.16.0")
16320 (source
16321 (origin
16322 (method url-fetch)
16323 (uri (rubygems-uri "money" version))
16324 (sha256
16325 (base32 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
16326 (build-system ruby-build-system)
16327 (arguments
16328 ;; No rakefile.
16329 `(#:tests? #f))
16330 (propagated-inputs
16331 (list
16332 ruby-i18n))
16333 (home-page "https://rubymoney.github.io/money/")
16334 (synopsis "Currency conversion library for Ruby")
16335 (description "RubyMoney provides a library for dealing with money and
16336currency conversion. Its features are:
16337@itemize
16338@item
16339Provides a Money class which encapsulates all information about a certain
16340amount of money, such as its value and its currency.
16341@item
16342Provides a Money::Currency class which encapsulates all information about a
16343monetary unit.
16344@item
16345Represents monetary values as integers, in cents; so avoids floating point
16346rounding errors.
16347@item
16348Represents currency as Money::Currency instances providing a high level of
16349flexibility.
16350@item Provides APIs for exchanging money from one currency to another.
16351@end itemize")
16352 (license license:expat)))
16353
16354(define-public ruby-monetize
16355 (package
16356 (name "ruby-monetize")
16357 (version "1.11.0")
16358 (source
16359 (origin
16360 (method url-fetch)
16361 (uri (rubygems-uri "monetize" version))
16362 (sha256
16363 (base32 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
16364 (build-system ruby-build-system)
16365 (arguments
16366 `(#:test-target "spec"))
16367 (native-inputs
16368 (list
16369 ruby-rspec))
16370 (propagated-inputs
16371 (list
16372 ruby-money))
16373 (home-page "https://github.com/RubyMoney/monetize")
16374 (synopsis "Convert various objects into Money objects")
16375 (description "Monetize provides a library for converting various objects
16376into Money objects.")
16377 (license license:expat)))
16378
16379(define-public ruby-money-open-exchange-rates
16380 (package
16381 (name "ruby-money-open-exchange-rates")
16382 (version "1.4.0")
16383 (source
16384 (origin
16385 (method git-fetch)
16386 ;; Download from GitHub because the rubygems version does not contain
16387 ;; Rakefile.
16388 (uri (git-reference
16389 (url "https://github.com/spk/money-open-exchange-rates")
16390 (commit (string-append "v" version))))
16391 (file-name (git-file-name name version))
16392 (sha256
16393 (base32 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
16394 (build-system ruby-build-system)
16395 (native-inputs
16396 (list
16397 ruby-minitest
16398 ruby-mocha
16399 ruby-monetize
16400 ruby-rake
16401 ruby-rubocop
16402 ruby-timecop
16403 ruby-webmock))
16404 (propagated-inputs
16405 (list
16406 ruby-money))
16407 (home-page "https://spk.github.io/money-open-exchange-rates/")
16408 (synopsis "Money open exchange rates for Ruby")
16409 (description "This package provides a gem that calculates the exchange rate
16410using published rates from open-exchange-rates. Compatible with the money gem.")
16411 (license license:expat)))
16412
16413(define-public ruby-roda
16414 (package
16415 (name "ruby-roda")
16416 (version "3.57.0")
16417 (source
16418 (origin
16419 (method url-fetch)
16420 (uri (rubygems-uri "roda" version))
16421 (sha256
16422 (base32 "0nkfxnbcfnriywvx9kpamp850cwjmqv8ssajc95d0aiyjr4kdrfy"))))
16423 (build-system ruby-build-system)
16424 (arguments
16425 ;; No rakefile
16426 `(#:tests? #f))
16427 (propagated-inputs (list ruby-rack))
16428 (home-page "https://roda.jeremyevans.net")
16429 (synopsis "Routing Tree Web Toolkit")
16430 (description "Roda is a routing tree web toolkit, designed for building fast
16431and maintainable web applications in ruby.")
16432 (license license:expat)))
16433
16434(define-public ruby-nori
16435 (package
16436 (name "ruby-nori")
16437 (version "2.6.0")
16438 (source
16439 (origin
16440 (method url-fetch)
16441 (uri (rubygems-uri "nori" version))
16442 (sha256
16443 (base32 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
16444 (build-system ruby-build-system)
16445 (arguments
16446 ;; Tests require too old version of rspec
16447 `(#:tests? #f))
16448 (native-inputs
16449 (list ruby-nokogiri
16450 ruby-rake
16451 ruby-rspec))
16452 (home-page "https://github.com/savonrb/nori")
16453 (synopsis "XML to Hash translator")
16454 (description "Nori is a simple XML parsing ripped from Crack which in-turn
16455ripped from Merb. It supports pluggable parsers and ships with both REXML and
16456Nokogiri implementations.")
16457 (license license:expat)))
16458
16459;; This package is deprecated per upstream and should be phased out.
16460(define-public ruby-faraday-middleware
16461 (package
16462 (name "ruby-faraday-middleware")
16463 (version "1.2.0")
16464 (source
16465 (origin
16466 (method url-fetch)
16467 (uri (rubygems-uri "faraday_middleware" version))
16468 (sha256
16469 (base32 "1bw8mfh4yin2xk7138rg3fhb2p5g2dlmdma88k82psah9mbmvlfy"))))
16470 (build-system ruby-build-system)
16471 (arguments `(#:tests? #f))
16472 (propagated-inputs (list ruby-faraday))
16473 (home-page "https://github.com/lostisland/faraday_middleware")
16474 (synopsis "Various middleware for Faraday")
16475 (description "Faraday_Middleware is a collection of middleware for the
16476Faraday-based API wrappers.")
16477 (license license:expat)))
16478
16479(define-public ruby-faraday-multipart
16480 (package
16481 (name "ruby-faraday-multipart")
16482 (version "1.0.4")
16483 (source (origin
16484 (method git-fetch)
16485 (uri (git-reference
16486 (url "https://github.com/lostisland/faraday-multipart")
16487 (commit (string-append "v" version))))
16488 (file-name (git-file-name name version))
16489 (sha256
16490 (base32
16491 "0ywxhff40a688n50lxrn4d8y096l8sbrwp1jfz4zd3kdiiygclka"))))
16492 (build-system ruby-build-system)
16493 (arguments (list #:test-target "spec"))
16494 (native-inputs (list ruby-faraday ruby-multipart-parser ruby-rspec))
16495 (propagated-inputs (list ruby-multipart-post))
16496 (synopsis "Multipart-post requests extension for Faraday")
16497 (description "This Ruby gem extends Faraday to perform multipart-post
16498requests.")
16499 (home-page "https://github.com/lostisland/faraday-multipart")
16500 (license license:expat)))
16501
16502(define-public ruby-bandwidth-iris
16503 (package
16504 (name "ruby-bandwidth-iris")
16505 (version "7.0.0")
16506 (source
16507 (origin
16508 (method url-fetch)
16509 (uri (rubygems-uri "ruby-bandwidth-iris" version))
16510 (sha256
16511 (base32 "131c4jhyvnrwbhizkks17fi9g85cwsq5f1p8zi408zyf63n7230d"))))
16512 (build-system ruby-build-system)
16513 (arguments
16514 ;; XXX: Tests don't require helper for some reason, so all fail.
16515 `(#:tests? #f))
16516 (native-inputs
16517 (list ruby-rspec
16518 ruby-yard))
16519 (propagated-inputs
16520 (list ruby-activesupport
16521 ruby-builder
16522 ruby-faraday
16523 ruby-faraday-middleware
16524 ruby-nori))
16525 (home-page "https://github.com/Bandwidth/ruby-bandwidth-iris")
16526 (synopsis "Gem for integrating to Bandwidth's Iris API")
16527 (description "Bandwidth IRIS is a Ruby SDK for Bandwidth Phone Number
16528Dashboard. It is a Ruby Client library for IRIS / BBS API.")
16529 (license license:expat)))
16530
16531(define-public ruby-securerandom
16532 (package
16533 (name "ruby-securerandom")
16534 (version "0.4.1")
16535 (source
16536 (origin
16537 (method url-fetch)
16538 (uri (rubygems-uri "securerandom" version))
16539 (sha256
16540 (base32 "1cd0iriqfsf1z91qg271sm88xjnfd92b832z49p1nd542ka96lfc"))))
16541 (build-system ruby-build-system)
16542 (arguments '(#:tests? #f)) ; No tests found.
16543 (synopsis "Interface for secure random number generator")
16544 (description "This package provides a Ruby interface for secure random
16545number generators.")
16546 (home-page "https://github.com/ruby/securerandom")
16547 (license (list license:bsd-2))))
16548
16549(define-public ruby-selenium-webdriver
16550 (package
16551 (name "ruby-selenium-webdriver")
16552 (version "4.22.0")
16553 (source (origin
16554 (method url-fetch)
16555 (uri (rubygems-uri "selenium-webdriver" version))
16556 (sha256
16557 (base32
16558 "0rjxlivsh32xvjq78p1m1sr366aa04wms4hwb2r187ygrnmp0hv4"))))
16559 (build-system ruby-build-system)
16560 ;; FIXME: The gem release lacks test files, and the git checkout lacks
16561 ;; JavaScript source that is generated using Bazel, which isn't available
16562 ;; in Guix yet, so disable the test suite for now.
16563 (arguments (list #:tests? #f))
16564 (propagated-inputs (list ruby-base64
16565 ruby-rexml
16566 ruby-rubyzip
16567 ruby-websocket))
16568 (synopsis "Selenium browser automation bindings for Ruby")
16569 (description "Selenium implements the W3C WebDriver protocol to automate
16570popular browsers. It aims to mimic the behaviour of a real user as it
16571interacts with the application's HTML. It's primarily intended for web
16572application testing, but any web-based task can be automated. This package
16573provides the Ruby bindings of Selenium.")
16574 (home-page "https://www.selenium.dev/")
16575 (license license:asl2.0)))
16576
16577(define-public ruby-sentry-core
16578 (package
16579 (name "ruby-sentry-core")
16580 (version "5.3.1")
16581 (source
16582 (origin
16583 (method url-fetch)
16584 (uri (rubygems-uri "sentry-ruby-core" version))
16585 (sha256
16586 (base32 "141mrw8wghhsjvln9m6ld3hap3xc5v901jjiz007xywy25725hyd"))))
16587 (build-system ruby-build-system)
16588 (arguments
16589 ;; No rakefile in gem.
16590 `(#:tests? #f))
16591 (propagated-inputs
16592 (list ruby-concurrent-ruby
16593 ruby-faraday))
16594 (home-page "https://sentry.io/for/ruby/")
16595 (synopsis "Client interface for the Sentry error logger")
16596 (description "Sentry-Core provides a gem that provides a client
16597interface for the Sentry error logger.")
16598 (license license:expat)))
16599
16600(define-public ruby-sentry
16601 (package
16602 (name "ruby-sentry")
16603 (version "5.3.1")
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (rubygems-uri "sentry-ruby" version))
16608 (sha256
16609 (base32 "0by9mvw8rklzpyx59vfija8h3ssfvxvf5nbqxfmygfy6lm1vdngz"))))
16610 (build-system ruby-build-system)
16611 (arguments
16612 ;; No rakefile in gem
16613 `(#:tests? #f))
16614 (propagated-inputs
16615 (list ruby-concurrent-ruby
16616 ruby-faraday
16617 ruby-sentry-core))
16618 (home-page "https://sentry.io/for/ruby/")
16619 (synopsis "Client interface for the Sentry error logger")
16620 (description "Sentry provides a gem that provides a client
16621interface for the Sentry error logger.")
16622 (license license:expat)))
16623
16624(define-public ruby-webrick
16625 (package
16626 (name "ruby-webrick")
16627 (version "1.8.1")
16628 (source (origin
16629 (method git-fetch) ;for tests
16630 (uri (git-reference
16631 (url "https://github.com/ruby/webrick")
16632 (commit (string-append "v" version))))
16633 (file-name (git-file-name name version))
16634 (sha256
16635 (base32
16636 "1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
16637 (build-system ruby-build-system)
16638 (arguments
16639 (list #:phases
16640 #~(modify-phases %standard-phases
16641 (add-after 'extract-gemspec 'delete-problematic-tests
16642 (lambda _
16643 ;; The httresponse tests fail for
16644 ;; unknown reasons (see:
16645 ;; https://github.com/ruby/webrick/issues/112).
16646 (delete-file "test/webrick/test_httpresponse.rb"))))))
16647 (home-page "https://github.com/ruby/webrick")
16648 (synopsis "HTTP server toolkit")
16649 (description "WEBrick is an HTTP server toolkit that can be configured as an
16650HTTPS server, a proxy server, and a virtual-host server.")
16651 (license license:bsd-2)))
16652
16653(define-public ruby-websocket
16654 (let ((commit "950e416a19a76c7e6a673a7e5baa6283476dbec1")
16655 (revision "1"))
16656 (package
16657 (name "ruby-websocket")
16658 (version (git-version "1.2.9" revision commit))
16659 (source (origin
16660 (method git-fetch)
16661 (uri (git-reference
16662 (url "https://github.com/imanel/websocket-ruby")
16663 (commit commit)))
16664 (sha256
16665 (base32
16666 "1i6r0glpxy47zdf76aqgcpjgcgydla0733hfdhp628pmrinnkgwv"))
16667 (file-name (git-file-name name version))))
16668 (build-system ruby-build-system)
16669 (arguments (list #:test-target "spec"
16670 #:phases #~(modify-phases %standard-phases
16671 (add-after 'unpack 'disable-rubocop
16672 (lambda _
16673 (substitute* "Rakefile"
16674 (("require 'rubocop/rake_task'") "")
16675 (("RuboCop::RakeTask.new") "")))))))
16676 (native-inputs
16677 (list ruby-rspec
16678 ruby-webrick))
16679 (synopsis "WebSocket protocol Ruby library")
16680 (description "This package provides a Ruby library to handle the WebSocket
16681protocol.")
16682 (home-page "https://github.com/imanel/websocket-ruby")
16683 (license license:expat))))
16684
16685(define-public ruby-braintree
16686 (package
16687 (name "ruby-braintree")
16688 (version "4.24.0")
16689 (source
16690 (origin
16691 (method git-fetch) ;for tests
16692 (uri (git-reference
16693 (url "https://github.com/braintree/braintree_ruby")
16694 (commit version)))
16695 (file-name (git-file-name name version))
16696 (sha256
16697 (base32 "1bj229cn37k5m0hb3hw868k8dy4pgvpgfixm61zngbp7p7a2xqpx"))))
16698 (build-system ruby-build-system)
16699 (arguments
16700 (list
16701 #:test-target "test:unit"
16702 #:phases
16703 #~(modify-phases %standard-phases
16704 (add-after 'unpack 'disable-rubocop
16705 (lambda _
16706 (substitute* "Rakefile"
16707 (("sh \"rubocop\"") ""))))
16708 (add-after 'unpack 'disable-bundler
16709 (lambda _
16710 (delete-file "Gemfile"))))))
16711 (native-inputs
16712 (list ruby-libxml
16713 ruby-pry
16714 ruby-rake
16715 ruby-rspec
16716 ruby-webrick))
16717 (propagated-inputs
16718 (list ruby-builder
16719 ruby-rexml))
16720 (home-page "https://www.braintreepayments.com/")
16721 (synopsis "Integration access to the Braintree Gateway")
16722 (description "Braintree provides resources and tools for developers to
16723integrate Braintree's global payments platform.")
16724 (license license:expat)))
16725
16726(define-public ruby-niceogiri
16727 (package
16728 (name "ruby-niceogiri")
16729 (version "1.1.2")
16730 (source
16731 (origin
16732 (method url-fetch)
16733 (uri (rubygems-uri "niceogiri" version))
16734 (sha256
16735 (base32 "1ha93211bc9cvh23s9w89zz7rq8irpf64ccd9arvg8v1sxg2798a"))))
16736 (build-system ruby-build-system)
16737 (arguments
16738 `(#:test-target "spec"
16739 #:phases
16740 (modify-phases %standard-phases
16741 (add-after 'extract-gemspec 'less-strict-dependencies
16742 (lambda _
16743 (substitute* "niceogiri.gemspec"
16744 (("2\\.7") "3.8") ;rspec
16745 ((".*dependency.*bundler.*") "\n")
16746 ((".*dependency.*guard-rspec.*") "\n")))))))
16747 (native-inputs
16748 (list ruby-rspec
16749 ruby-yard))
16750 (propagated-inputs (list ruby-nokogiri))
16751 (home-page "https://github.com/benlangfeld/Niceogiri")
16752 (synopsis "Supplement for Nokogiri")
16753 (description "Niceogiri provides wrappers and helpers for XML manipulation
16754using Nokogiri.")
16755 (license license:expat)))
16756
16757(define-public ruby-blather
16758 (package
16759 (name "ruby-blather")
16760 (version "2.0.0")
16761 (source
16762 (origin
16763 (method url-fetch)
16764 (uri (rubygems-uri "blather" version))
16765 (sha256
16766 (base32 "05ry2x835fj4pzk61282pcz86n018cr39zbgwbi213md74i90s7c"))))
16767 (build-system ruby-build-system)
16768 (arguments
16769 ;; XXX: Tests require too old version of rspec.
16770 `(#:tests? #f))
16771 (native-inputs
16772 (list ruby-countdownlatch
16773 ruby-mocha
16774 ruby-rb-fsevent
16775 ruby-rspec
16776 ruby-yard))
16777 (propagated-inputs
16778 (list ruby-activesupport
16779 ruby-eventmachine
16780 ruby-niceogiri
16781 ruby-nokogiri
16782 ruby-sucker-punch))
16783 (home-page "https://github.com/adhearsion/blather")
16784 (synopsis "XMPP Domain Specific Language for Ruby")
16785 (description "Blather is a XMPP DSL for Ruby written on top of EventMachine
16786and Nokogiri.")
16787 (license license:expat)))
16788
16789(define-public ruby-wapiti
16790 (package
16791 (name "ruby-wapiti")
16792 (version "2.1.0")
16793 ;; the gem archive lacks tests
16794 (source (origin
16795 (method git-fetch)
16796 (uri (git-reference
16797 (url "https://github.com/inukshuk/wapiti-ruby")
16798 (commit (string-append "v" version))))
16799 (file-name (git-file-name name version))
16800 (sha256
16801 (base32
16802 "1273dqvn6flq2qv9qbp104rgc7zp1gqx4096s0v0z5f0qnhzc7d6"))))
16803 (build-system ruby-build-system)
16804 (propagated-inputs
16805 (list ruby-builder
16806 ruby-rexml))
16807 (native-inputs
16808 (list ruby-pry
16809 ruby-rake-compiler
16810 ruby-rspec
16811 ruby-simplecov))
16812 (arguments
16813 (list
16814 #:test-target "spec"
16815 #:phases
16816 #~(modify-phases %standard-phases
16817 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16818 (lambda args
16819 (substitute* "wapiti.gemspec"
16820 (("`git ls-files spec`")
16821 "`find spec -type f | sort`"))))
16822 (add-before 'build 'compile
16823 (lambda args
16824 (invoke "rake" "compile"))))))
16825 (home-page "https://github.com/inukshuk/wapiti-ruby")
16826 (synopsis "Wicked fast Conditional Random Fields for Ruby")
16827 (description
16828 "The Wapiti-Ruby gem provides a wicked fast linear-chain @acronym{CRF,
16829Conditional Random Fields} API for sequence segmentation and labelling. It is
16830based on the codebase of @url{https://wapiti.limsi.fr, Wapiti}.")
16831 (license license:bsd-2)))
16832
16833(define-public ruby-namae
16834 (package
16835 (name "ruby-namae")
16836 (version "1.1.1")
16837 (source (origin
16838 (method url-fetch)
16839 (uri (rubygems-uri "namae" version))
16840 (sha256
16841 (base32
16842 "1j3nl1klkx3gymrdxfc1hlq4a8qlvhhl9aj5v1v08b9fz27sky0l"))))
16843 (build-system ruby-build-system)
16844 (native-inputs
16845 (list ruby-cucumber
16846 ruby-rspec
16847 ruby-simplecov))
16848 (arguments
16849 (list
16850 #:phases
16851 #~(modify-phases %standard-phases
16852 (add-after 'extract-gemspec 'allow-newer-cucumber
16853 (lambda args
16854 (substitute* "Gemfile"
16855 (("'cucumber', '[^']*'")
16856 "'cucumber'"))))
16857 (replace 'check
16858 ;; Avoid 'rake' so we don't need jeweler.
16859 (lambda* (#:key tests? #:allow-other-keys)
16860 (when tests?
16861 (apply invoke
16862 "rspec"
16863 (find-files "spec" "_spec\\.rb$"))))))))
16864 (home-page "https://github.com/berkmancenter/namae")
16865 (synopsis "Parser for human names")
16866 (description
16867 "Namae (名前) is a parser for human names. It recognizes personal names
16868of various cultural backgrounds and tries to split them into their component
16869parts (e.g., given and family names, honorifics etc.).")
16870 (license (list license:bsd-2 license:agpl3+))))
16871
16872(define-public ruby-latex-decode
16873 (package
16874 (name "ruby-latex-decode")
16875 (version "0.4.0")
16876 (source (origin
16877 (method git-fetch)
16878 (uri (git-reference
16879 (url "https://github.com/inukshuk/latex-decode")
16880 (commit (string-append "v" version))))
16881 (sha256
16882 (base32
16883 "1f5j67ayd04pjkmzvn0hk7cr8yqvn0gyg9ns6a0vhzj2gwna9ihy"))
16884 (file-name (git-file-name name version))))
16885 (build-system ruby-build-system)
16886 (native-inputs
16887 (list ruby-cucumber
16888 ruby-rspec))
16889 (arguments
16890 (list
16891 #:test-target "cucumber"
16892 #:phases
16893 #~(modify-phases %standard-phases
16894 (add-after 'extract-gemspec 'avoid-bundler
16895 (lambda args
16896 (substitute* "Rakefile"
16897 (("require 'bundler" orig)
16898 (string-append "# " orig " # patched for Guix"))
16899 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
16900 (string-append orig " do |c|\n"
16901 " c.bundler = false # patched for Guix\n"
16902 "end"))
16903 (("Bundler\\.setup" orig)
16904 (string-append "true # " orig " # patched for Guix")))
16905 (substitute* "cucumber.yml"
16906 ;; thanks to avoiding bundler, we can't use this option
16907 ((" --publish-quiet")
16908 ""))))
16909 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16910 (lambda args
16911 (substitute* "latex-decode.gemspec"
16912 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
16913 "`find {test,spec,features} -type f | sort`")))))))
16914 (home-page "https://github.com/inukshuk/latex-decode")
16915 (synopsis "Convert LaTeX to Unicode")
16916 (description
16917 "This package provides a gem to convert LaTeX input to Unicode. Its
16918original use was as an input filter for BibTeX-Ruby, but it can be used
16919independently to decode LaTeX. Many of the patterns used by this Ruby gem are
16920based on François Charette's equivalent Perl module @code{LaTeX::Decode}.")
16921 (license license:gpl3+)))
16922
16923(define-public ruby-link-header
16924 (package
16925 (name "ruby-link-header")
16926 (version "0.0.8")
16927 (source (origin
16928 (method url-fetch)
16929 (uri (rubygems-uri "link_header" version))
16930 (sha256
16931 (base32
16932 "1yamrdq4rywmnpdhbygnkkl9fdy249fg5r851nrkkxr97gj5rihm"))))
16933 (build-system ruby-build-system)
16934 (home-page "https://github.com/asplake/link_header")
16935 (synopsis "Parse and format HTTP @code{Link} headers")
16936 (description
16937 "This gem provides the classes @code{LinkHeader} and
16938@code{LinkHeader::Link}, which represent HTTP @code{Link} headers conforming
16939to RFC 5988. Objects can be constructed from and converted to text or a
16940JSON-friendly @code{Array} representation. They can also be used to generate
16941corresponding HTML @code{link} elements.")
16942 (license license:expat)))
16943
16944(define-public ruby-lint-roller
16945 (package
16946 (name "ruby-lint-roller")
16947 (version "1.1.0")
16948 (source
16949 (origin
16950 (method url-fetch)
16951 (uri (rubygems-uri "lint_roller" version))
16952 (sha256
16953 (base32 "11yc0d84hsnlvx8cpk4cbj6a4dz9pk0r1k29p0n1fz9acddq831c"))))
16954 (build-system ruby-build-system)
16955 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
16956 (native-inputs (list ruby-minitest))
16957 (synopsis "Specification for linter and formatter rulesets")
16958 (description
16959 "This package provides a plugin specification for Ruby linter and
16960formatter rulesets.")
16961 (home-page "https://github.com/standardrb/lint_roller")
16962 (license license:expat)))
16963
16964(define-public ruby-rdf
16965 (package
16966 (name "ruby-rdf")
16967 (version "3.2.8")
16968 (source (origin
16969 (method url-fetch)
16970 (uri (rubygems-uri "rdf" version))
16971 (sha256
16972 (base32
16973 "1cj0k8ryd8hgbkgqb5swvy6fiygxny3y5bln0my5gv6dbfv3gm20"))))
16974 (build-system ruby-build-system)
16975 (propagated-inputs (list ruby-link-header))
16976 (arguments
16977 (list #:tests? #f)) ;; tests have many cyclic dependencies
16978 (home-page "https://ruby-rdf.github.io/")
16979 (synopsis "Linked Data for Ruby")
16980 (description
16981 "This gem contains the core algorithms and classes used for doing basic
16982programming with @acronym{RDF, Resource Description Framework} data,
16983implemented in pure Ruby.")
16984 (license license:unlicense)))
16985
16986(define-public ruby-rdf-vocab
16987 (package
16988 (name "ruby-rdf-vocab")
16989 (version "3.2.1")
16990 (source (origin
16991 (method url-fetch)
16992 (uri (rubygems-uri "rdf-vocab" version))
16993 (sha256
16994 (base32
16995 "1bqmp9rfjvd56ajjz68ij6jla1wjf1fqg7bi4dpnjrsmn4pwaq7l"))))
16996 (build-system ruby-build-system)
16997 (propagated-inputs
16998 (list ruby-rdf))
16999 (arguments
17000 (list #:tests? #f)) ;; tests have many cyclic dependencies
17001 (home-page "https://github.com/ruby-rdf/rdf-vocab")
17002 (synopsis "Common RDF vocabularies")
17003 (description
17004 "This gem extends @code{ruby-rdf} with several common @acronym{RDF,
17005Resource Description Framework} vocabularies.")
17006 (license license:unlicense)))
17007
17008(define-public ruby-rdiscount
17009 (package
17010 (name "ruby-rdiscount")
17011 (version "2.2.7.3")
17012 (source
17013 (origin
17014 (method git-fetch) ;for the full test suite
17015 (uri (git-reference
17016 (url "https://github.com/davidfstr/rdiscount")
17017 (commit version)))
17018 (file-name (git-file-name name version))
17019 (sha256
17020 (base32
17021 "1lnf598sngcy6b701h33h5l9rn2abl80x0jpynz7jxb4imhd5r80"))))
17022 (build-system ruby-build-system)
17023 (native-inputs (list perl))
17024 (synopsis "Discount Markdown Processor for Ruby")
17025 (description "Discount is an implementation of John Gruber's Markdown
17026markup language in C. It implements all of the language described in the
17027markdown syntax document and passes the Markdown 1.0 test suite.")
17028 (home-page "https://dafoster.net/projects/rdiscount/")
17029 (license license:bsd-3)))
17030
17031(define-public ruby-bibtex-ruby
17032 (package
17033 (name "ruby-bibtex-ruby")
17034 (version "6.1.0")
17035 (source
17036 (origin
17037 (method url-fetch)
17038 (uri (rubygems-uri "bibtex-ruby" version))
17039 (sha256
17040 (base32 "1ggx2j1gi46f1a6p45l1abk3nryfg1pj0cdlyrnilnqqpr1cfc96"))))
17041 (build-system ruby-build-system)
17042 (propagated-inputs (list ruby-latex-decode ruby-racc ruby-rdf
17043 ruby-rdf-vocab))
17044 (native-inputs (list ruby-cucumber ruby-minitest ruby-yard))
17045 (arguments
17046 (list
17047 #:phases
17048 #~(modify-phases %standard-phases
17049 (add-after 'extract-gemspec 'sanitize-dependencies
17050 (lambda* (#:key inputs #:allow-other-keys)
17051 (substitute* "Gemfile"
17052 ((".*(gnuplot|ruby-prof|simplecov|iconv|redcarpet|unicode).*")
17053 ""))
17054 (substitute* "Rakefile"
17055 (("require 'bundler" orig)
17056 (string-append "# " orig " # patched for Guix"))
17057 (("Bundler\\.setup" orig)
17058 (string-append "true # " orig " # patched for Guix"))
17059 (("bundle exec racc")
17060 (string-append "bundle exec "
17061 (search-input-file inputs "/bin/racc")))))))))
17062 (home-page "https://github.com/inukshuk/bibtex-ruby")
17063 (synopsis "Rubyist's Swiss Army knife for all things BibTeX")
17064 (description
17065 "BibTeX-Ruby is the Rubyist's Swiss Army knife for all things BibTeX.
17066It includes a parser for all common BibTeX objects and a sophisticated name
17067parser that tokenizes correctly formatted names. BibTeX-Ruby recognizes
17068BibTeX string replacements, joins values containing multiple strings or
17069variables, supports cross-references, and decodes common LaTeX formatting
17070instructions to unicode. If you are in a hurry, it also allows for easy
17071export/conversion to formats such as YAML, JSON, CSL, and XML (BibTeXML).")
17072 (license license:gpl3+)))
17073
17074(define-public ruby-bigdecimal
17075 (package
17076 (name "ruby-bigdecimal")
17077 (version "4.1.2")
17078 (source
17079 (origin
17080 (method git-fetch) ;for tests
17081 (uri (git-reference
17082 (url "https://github.com/ruby/bigdecimal")
17083 (commit (string-append "v" version))))
17084 (file-name (git-file-name name version))
17085 (sha256
17086 (base32 "0dw7c9pjqxb9p5r2y79f1r5w5i1y96r5f0ppd6p39ghg5476dx43"))))
17087 (build-system ruby-build-system)
17088 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
17089 (synopsis "Arbitrary precision decimal floating point number for Ruby")
17090 (description
17091 "This Ruby library provides a class for arbitrary precision decimal
17092floating point numbers.")
17093 (home-page "https://github.com/ruby/bigdecimal")
17094 (license (list license:ruby license:bsd-2))))
17095
17096(define-public ruby-unicode-emoji
17097 (package
17098 (name "ruby-unicode-emoji")
17099 (version "4.2.0")
17100 (source
17101 (origin
17102 (method url-fetch)
17103 (uri (rubygems-uri "unicode-emoji" version))
17104 (sha256
17105 (base32 "03zqn207zypycbz5m9mn7ym763wgpk7hcqbkpx02wrbm1wank7ji"))))
17106 (build-system ruby-build-system)
17107 (arguments
17108 (list
17109 #:test-target "spec"
17110 #:phases
17111 #~(modify-phases %standard-phases
17112 ;; The tests normally try to download the sources if they're not
17113 ;; present; however, guix also packages some of the unicode test
17114 ;; files that we can leverage instead
17115 (add-after 'unpack 'use-guix-bundled-unicode-emoji
17116 (lambda _
17117 (let ((emoji (search-input-directory %build-inputs
17118 "share/unicode/emoji")))
17119 (substitute* "spec/emoji_test_txt_spec.rb"
17120 (("\\_\\_dir\\_\\_\\, \"data/emoji\\-test\\.txt")
17121 (string-append "\"" emoji "/emoji-test.txt"))))
17122 ;; Disable failing test (likely fails due to expecting
17123 ;; unicode-emoji v17.0 spec, but guix currently providing v12.0)
17124 (substitute* "Rakefile"
17125 (("sh \"ruby spec.*")
17126 (string-append
17127 "sh \"ruby spec/unicode_emoji_spec.rb -v --show-skips\""
17128 "\n"
17129 ;; Disable tests
17130 "sh \"ruby spec/emoji_test_txt_spec.rb -v --show-skips" " "
17131 "-e '/REGEX_INCLUDE_MQE.*" ;; Regex continues
17132 "(0153|1115|1129|1841|1855|1966|1980|2001|2015)/'\""))))))))
17133 (native-inputs (list unicode-emoji))
17134 (home-page "https://github.com/janlelis/unicode-emoji")
17135 (synopsis "Provides Unicode Emoji data and regexes")
17136 (description
17137 "Provides Unicode Emoji data and regexes, incorporating the latest Unicode
17138and Emoji standards. Includes a categorized list of recommended Emoji.")
17139 (license license:expat)))
17140
17141(define-public ruby-unicode-scripts
17142 (package
17143 (name "ruby-unicode-scripts")
17144 (version "1.11.0")
17145 (source (origin
17146 (method url-fetch)
17147 (uri (rubygems-uri "unicode-scripts" version))
17148 (sha256
17149 (base32
17150 "0r3d7qms3syx1ijn027vj4fycy5dzh8bwl99i8ykrgyadx01569d"))))
17151 (build-system ruby-build-system)
17152 (arguments (list #:test-target "spec"))
17153 (home-page "https://github.com/janlelis/unicode-scripts")
17154 (synopsis "Unicode script classification library")
17155 (description "This gem provides a simple interface for classifying Ruby
17156strings using the Unicode @code{Script} and @code{Script_Extensions}
17157properties.")
17158 (license license:expat)))
17159
17160(define-public ruby-citeproc
17161 (package
17162 (name "ruby-citeproc")
17163 (version "1.0.10")
17164 (source (origin
17165 (method url-fetch)
17166 (uri (rubygems-uri "citeproc" version))
17167 (sha256
17168 (base32
17169 "13vl5sjmksk5a8kjcqnjxh7kn9gn1n4f9p1rvqfgsfhs54p0m6l2"))))
17170 (build-system ruby-build-system)
17171 (propagated-inputs
17172 (list ruby-namae))
17173 (arguments
17174 (list #:tests? #f)) ;; tests have a cyclic dependency
17175 (home-page "https://github.com/inukshuk/citeproc")
17176 (synopsis "Interface for Ruby citation processors")
17177 (description
17178 "CiteProc is a citation processor interface and citation data API based
17179on the @acronym{CSL, Citation Style Language} specifications. To actually
17180process citations, a dedicated processor engine is required: a pure Ruby
17181engine is available in the @code{citeproc-ruby} gem.")
17182 (license (list license:agpl3+ license:bsd-2))))
17183
17184(define-public ruby-ed25519
17185 (package
17186 (name "ruby-ed25519")
17187 (version "1.3.0")
17188 (source (origin
17189 (method git-fetch)
17190 (uri (git-reference
17191 (url "https://github.com/RubyCrypto/ed25519")
17192 (commit (string-append "v" version))))
17193 (file-name (git-file-name name version))
17194 (sha256
17195 (base32
17196 "1jm5w2dyhyrndcx0d02v0gjbzl1abhbx2wkp3gxzwcndghmkz98r"))))
17197 (build-system ruby-build-system)
17198 (arguments
17199 (list
17200 #:test-target "spec"
17201 #:phases
17202 #~(modify-phases %standard-phases
17203 (add-before 'build 'compile
17204 (lambda _
17205 (invoke "rake" "compile")))
17206 (add-after 'unpack 'remove-unnecessary-dependencies
17207 (lambda _
17208 ;; Coveralls relates to a network service, and RuboCop to code
17209 ;; linting and both are unnecessary to run the tests
17210 (substitute* "Gemfile"
17211 ((".*coveralls.*")
17212 "\n")
17213 ((".*rubocop.*")
17214 "\n"))
17215 (substitute* "spec/spec_helper.rb"
17216 (("require \"coveralls\"")
17217 "")
17218 (("Coveralls.wear!")
17219 ""))
17220 (substitute* "Rakefile"
17221 (("require \"rubocop/rake_task\"")
17222 "")
17223 (("RuboCop::RakeTask.new")
17224 "")))))))
17225 (native-inputs (list ruby-rake-compiler ruby-rspec))
17226 (synopsis
17227 "Ruby binding to the Ed25519 elliptic curve public-key signature system")
17228 (description
17229 "This package provides a Ruby binding to the Ed25519 elliptic curve
17230public-key signature system described in
17231@url{https://www.ietf.org/rfc/rfc8032.txt, RFC 8032}.")
17232 (home-page "https://github.com/RubyCrypto/ed25519")
17233 (license license:expat)))
17234
17235(define-public ruby-edtf
17236 (package
17237 (name "ruby-edtf")
17238 (version "3.1.0")
17239 (source (origin
17240 (method git-fetch)
17241 (uri (git-reference
17242 (url "https://github.com/inukshuk/edtf-ruby")
17243 (commit (string-append "v" version))))
17244 (sha256
17245 (base32
17246 "18j8xq8zmrn41cs2gpd1i87agi9905asvnjqndky2cqb5zg3q14g"))
17247 (snippet
17248 ;; remove generated file
17249 #~(delete-file "lib/edtf/parser.rb"))
17250 (file-name (git-file-name name version))))
17251 (build-system ruby-build-system)
17252 (propagated-inputs
17253 (list ruby-activesupport))
17254 (native-inputs
17255 (list ruby-cucumber
17256 ruby-rspec))
17257 (arguments
17258 (list
17259 #:phases
17260 #~(modify-phases %standard-phases
17261 (add-after 'extract-gemspec 'avoid-bundler
17262 (lambda args
17263 (substitute* "Rakefile"
17264 (("require 'bundler" orig)
17265 (string-append "# " orig " # patched for Guix"))
17266 (("bundle exec racc")
17267 "racc")
17268 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
17269 (string-append orig " do |c|\n"
17270 " c.bundler = false # patched for Guix\n"
17271 "end"))
17272 (("Bundler\\.setup" orig)
17273 (string-append "true # " orig " # patched for Guix")))))
17274 (add-after 'avoid-bundler 'patch-cucumber-options
17275 (lambda args
17276 (substitute* "cucumber.yml"
17277 ;; this option is not supported, at least in our configuration
17278 ((" --publish-quiet")
17279 ""))))
17280 (add-before 'build 'compile
17281 (lambda args
17282 (invoke "rake" "racc")))
17283 (replace 'check
17284 (lambda* (#:key tests? #:allow-other-keys)
17285 (when tests?
17286 (invoke "rake")))))))
17287 (home-page "https://github.com/inukshuk/edtf-ruby")
17288 (synopsis "Ruby implementation of Extended Date/Time Format")
17289 (description
17290 "EDTF-Ruby provides a parser and an API for the @acronym{EDTF, Extended
17291Date/Time Format} standard, implemented as an extension to Ruby's @code{Date}
17292class.")
17293 (license license:bsd-2)))
17294
17295(define-public ruby-gli
17296 (package
17297 (name "ruby-gli")
17298 (version "2.21.0")
17299 (source (origin
17300 (method git-fetch)
17301 (uri (git-reference
17302 (url "https://github.com/davetron5000/gli")
17303 (commit (string-append "v" version))))
17304 (sha256
17305 (base32
17306 "09b1r9hlx4dy2yq036nk7hc2nbswhia6q3na9v11z94yibc8mgja"))
17307 (file-name (git-file-name name version))))
17308 (build-system ruby-build-system)
17309 (native-inputs
17310 (list ruby-minitest
17311 ruby-rainbow
17312 ruby-rdoc
17313 ruby-sdoc))
17314 (arguments
17315 (list
17316 #:phases
17317 #~(modify-phases %standard-phases
17318 (add-after 'extract-gemspec 'patch-gemspec-version
17319 (lambda args
17320 (substitute* "gli.gemspec"
17321 ;; this trick fails in our build environment
17322 (("require File\\.join[(]\\[" orig)
17323 (string-append "# patched for Guix # " orig))
17324 (("s\\.version = GLI::VERSION")
17325 #$(string-append "s.version = '"
17326 (package-version this-package)
17327 "' # patched for Guix")))))
17328 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17329 (lambda args
17330 (substitute* "gli.gemspec"
17331 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
17332 "`find {test,spec,features} -type f | sort`"))))
17333 (add-after 'replace-another-git-ls-files 'fix-rubyopt
17334 (lambda args
17335 (substitute* "Rakefile"
17336 (("ENV\\[\"RUBYOPT\"]")
17337 "(ENV['RUBYOPT'] || '')")))))))
17338 (home-page "https://davetron5000.github.io/gli/")
17339 (synopsis "Git-Like Interface command-line parser")
17340 (description
17341 "GLI allows you to create command-line applications in Ruby with Git-Like
17342Interfaces: that is, they take subcommands in the style of @command{git} and
17343@command{gem}. GLI uses a simple domain-specific language, but retains all
17344the power of the built-in @code{OptionParser}.")
17345 (license license:asl2.0)))
17346
17347(define-public ruby-anystyle-data
17348 (package
17349 (name "ruby-anystyle-data")
17350 (version "1.3.0")
17351 (source (origin
17352 (method git-fetch)
17353 (uri (git-reference
17354 (url "https://github.com/inukshuk/anystyle-data")
17355 (commit (string-append "v" version))))
17356 (sha256
17357 (base32
17358 "1jh880310m3gjdrk4m8rwwnsf0824zkf26clpr8p64sac2fyy907"))
17359 (snippet
17360 ;; remove pre-built file
17361 #~(delete-file "lib/anystyle/data/dict.txt.gz"))
17362 (patches
17363 (search-patches "ruby-anystyle-data-immutable-install.patch"))
17364 (file-name (git-file-name name version))))
17365 (build-system ruby-build-system)
17366 (arguments
17367 (list
17368 #:tests? #f ;; there are none
17369 #:modules
17370 `((guix build ruby-build-system)
17371 (guix build utils)
17372 (srfi srfi-26))
17373 #:phases
17374 #~(modify-phases %standard-phases
17375 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17376 (lambda args
17377 (substitute* "anystyle-data.gemspec"
17378 (("`git ls-files lib README\\.md LICENSE`\\.split[(][^)]*[)]")
17379 (string-append
17380 "["
17381 (string-join
17382 (map (cut string-append "\"" <> "\"")
17383 `("README.md"
17384 "LICENSE"
17385 "lib/anystyle/data.rb"
17386 "lib/anystyle/data/dict.txt.gz"
17387 "lib/anystyle/data/setup.rb"
17388 "lib/anystyle/data/version.rb"))
17389 ", ")
17390 "]")))))
17391 (add-before 'build 'compile-dict
17392 (lambda args
17393 (invoke "rake" "compile"))))))
17394 (home-page "https://anystyle.io")
17395 (synopsis "AnyStyle parser dictionary data")
17396 (description
17397 "This gem provides parser dictionary data for AnyStyle.")
17398 (license license:bsd-2)))
17399
17400(define-public ruby-anystyle
17401 (package
17402 (name "ruby-anystyle")
17403 (version "1.4.2")
17404 (source (origin
17405 (method git-fetch)
17406 (uri (git-reference
17407 (url "https://github.com/inukshuk/anystyle")
17408 (commit (string-append "v" version))))
17409 (sha256
17410 (base32
17411 "0xhy7wj8v7iahikck6vxbdpncaz5w2gb11b32kmvg5ckgi2kz23p"))
17412 (snippet
17413 ;; There is an optional dependency on
17414 ;; <https://github.com/feedbackmine/language_detector>, which
17415 ;; seems like it was intended to be free software, but
17416 ;; doesn't have a clear license statement. Maybe someone can
17417 ;; do more sleuthing, or else find a replacement? See also
17418 ;; <https://github.com/inukshuk/anystyle/issues/186>. For
17419 ;; now, patch it out, but leave a pointer to follow up.
17420 #~(begin
17421 (use-modules (guix build utils))
17422 (substitute* "Gemfile"
17423 (("gem 'language_detector', github: '[^']*'" orig)
17424 (string-append "# " orig " # unclear license")))
17425 (substitute* "spec/anystyle/parser_spec.rb"
17426 (("language: 'en'," orig)
17427 (string-append "# " orig " # no lanugage_detector")))))
17428 (patches
17429 (search-patches
17430 "ruby-anystyle-fix-dictionary-populate.patch"))
17431 (file-name (git-file-name name version))))
17432 (build-system ruby-build-system)
17433 (propagated-inputs
17434 (list ruby-anystyle-data
17435 ruby-bibtex-ruby
17436 ruby-namae
17437 ruby-wapiti))
17438 (native-inputs
17439 (list ruby-byebug
17440 ruby-citeproc
17441 ruby-edtf
17442 ruby-gdbm
17443 ruby-rspec
17444 ruby-unicode-scripts))
17445 (arguments
17446 (list
17447 #:test-target "spec"
17448 #:phases
17449 #~(modify-phases %standard-phases
17450 (add-after 'extract-gemspec 'avoid-bundler
17451 (lambda args
17452 (substitute* "Rakefile"
17453 (("require 'bundler" orig)
17454 (string-append "# " orig " # patched for Guix"))
17455 (("Bundler\\.setup" orig)
17456 (string-append "true # " orig " # patched for Guix")))))
17457 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17458 (lambda args
17459 (substitute* "anystyle.gemspec"
17460 (("`git ls-files spec`")
17461 "`find spec -type f | sort`"))))
17462 (add-after 'wrap 'populate-dictionaries
17463 (lambda args
17464 ;; We must initialize these files here, or they will never be
17465 ;; usable with the default settings. A more flexible approach
17466 ;; might use something like `Gem.find_files()` or
17467 ;; XDG_DATA_DIRS.
17468 (with-output-to-file "initialize-dictionaries.rb"
17469 (lambda ()
17470 (display "\
17471require 'anystyle/dictionary' # must come before 'anystyle/data'
17472require 'anystyle/data'
17473[:marshal, :gdbm].each do |adapter|
17474 AnyStyle::Dictionary.create({adapter: adapter}).open().close()
17475end
17476")))
17477 (let* ((old-gems (getenv "GEM_PATH"))
17478 (new-gems (string-append #$output
17479 "/lib/ruby/vendor_ruby:"
17480 old-gems)))
17481 (dynamic-wind
17482 (lambda ()
17483 (setenv "GEM_PATH" new-gems))
17484 (lambda ()
17485 (invoke "ruby" "initialize-dictionaries.rb"))
17486 (lambda ()
17487 (setenv "GEM_PATH" old-gems)))))))))
17488 (home-page "https://anystyle.io")
17489 (synopsis "Fast and smart citation reference parsing (Ruby library)")
17490 (description
17491 "AnyStyle is a very fast and smart parser for academic reference lists
17492and bibliographies. AnyStyle uses powerful machine learning heuristics based
17493on Conditional Random Fields and aims to make it easy to train the model with
17494data that is relevant to your parsing needs.
17495
17496This package provides the Ruby module @code{AnyStyle}. AnyStyle can also be
17497used via the @command{anystyle} command-line utility or a web application,
17498though the later has not yet been packaged for Guix.")
17499 (license license:bsd-2)))
17500
17501(define-public anystyle
17502 (package
17503 (name "anystyle")
17504 (version "1.4.5")
17505 (source (origin
17506 (method git-fetch)
17507 (uri (git-reference
17508 (url "https://github.com/inukshuk/anystyle-cli")
17509 (commit (string-append "v" version))))
17510 (sha256
17511 (base32
17512 "10jx830mx9vh7rsz87ndvz8w5b5azd9s231vwyb0dqxs921v6qwy"))
17513 (file-name (git-file-name name version))))
17514 (build-system ruby-build-system)
17515 (propagated-inputs
17516 (list ruby-anystyle
17517 ruby-bibtex-ruby
17518 ruby-gli))
17519 (native-inputs
17520 (list ruby-gdbm
17521 txt2man))
17522 (arguments
17523 (list
17524 #:modules
17525 `((guix build ruby-build-system)
17526 (ice-9 popen)
17527 (srfi srfi-1)
17528 (guix build utils))
17529 #:phases
17530 #~(modify-phases %standard-phases
17531 (add-after 'extract-gemspec 'less-strict-dependencies
17532 (lambda args
17533 (substitute* "anystyle-cli.gemspec"
17534 (("'bibtex-ruby', '[^']*'")
17535 "'bibtex-ruby'"))))
17536 (add-before 'build 'change-default-dictionary-adapter
17537 (lambda args
17538 ;; Since we always have gdbm available, using it will give a
17539 ;; faster startup time, which is particularly worth-while for
17540 ;; a command-line tool.
17541 (substitute* "bin/anystyle"
17542 (("default_value: 'ruby',")
17543 "default_value: 'gdbm', # patched for Guix"))))
17544 (replace 'check
17545 (lambda* (#:key tests? #:allow-other-keys)
17546 ;; There are no tests, but let's use this opportunity to do a
17547 ;; basic test of our own that things run ok. It works especially
17548 ;; well to test this here since we know the 'ruby-anystile'
17549 ;; package is in its final, immutable installed form.
17550 (when tests?
17551 (let ((common
17552 `("require 'anystyle'"
17553 ,(string-append
17554 "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture"
17555 " et la différence (1 éd.). Paris: Éditions du"
17556 " Seuil.'"))))
17557 (for-each
17558 (lambda (lines)
17559 (apply invoke "ruby"
17560 (fold-right (lambda (line lst)
17561 (cons* "-e" line lst))
17562 '()
17563 lines)))
17564 `(,common
17565 ("require 'anystyle/dictionary'"
17566 "AnyStyle::Dictionary.defaults[:adapter] = :gdbm"
17567 ,@common)))))))
17568 (add-after 'wrap 'check-cli
17569 (lambda* (#:key tests? outputs #:allow-other-keys)
17570 (when tests?
17571 (with-output-to-file "check-cli.in"
17572 (lambda ()
17573 (for-each
17574 display
17575 '("Derrida, J. (1967). L’écriture et la différence "
17576 "(1 éd.). Paris: Éditions du Seuil.\n"))))
17577 (invoke (search-input-file outputs "/bin/anystyle")
17578 "parse"
17579 "check-cli.in"))))
17580 (add-after 'wrap 'generate-man-page
17581 ;; generating a man page also tests that the command actually runs
17582 (lambda args
17583 (define (run-with-output-file file command . args)
17584 (format (current-output-port)
17585 "running: ~s\nwith output to: ~s\n"
17586 (cons command args)
17587 file)
17588 (unless (zero?
17589 (with-output-to-file file
17590 (lambda ()
17591 (status:exit-val
17592 (close-pipe
17593 (apply open-pipe* OPEN_WRITE command args))))))
17594 (error "command failed")))
17595 (let ((anystyle (string-append #$output "/bin/anystyle")))
17596 (run-with-output-file "intro.txt"
17597 anystyle "--help")
17598 (for-each (lambda (cmd)
17599 (let ((file (string-append cmd ".txt")))
17600 (run-with-output-file file
17601 anystyle cmd "--help")
17602 ;; indent headings to create subsections
17603 (substitute* file
17604 (("^[A-Z]" orig)
17605 (string-append " " orig)))
17606 ;; generate a section heading
17607 (call-with-output-file
17608 (string-append "section-" file)
17609 (lambda (out)
17610 (format out "\n\n~a COMMAND\n\n"
17611 (string-upcase cmd))))))
17612 '("check" "find" "parse" "train"))
17613 (substitute* `("intro.txt"
17614 "check.txt" "find.txt" "parse.txt" "train.txt")
17615 ;; format "tag list" for txt2man"
17616 ((" - ")
17617 " ")
17618 ;; restore formatting of the "name" sections
17619 (("(anystyle|check|find|parse|train) ([A-Z])" _ cmd post)
17620 (string-append cmd " - " post)))
17621 (run-with-output-file "anystyle.txt"
17622 "cat"
17623 "intro.txt"
17624 "section-check.txt" "check.txt"
17625 "section-find.txt" "find.txt"
17626 "section-parse.txt" "parse.txt"
17627 "section-train.txt" "train.txt")
17628 (run-with-output-file
17629 "anystyle.1"
17630 "txt2man"
17631 "-v" "General Commands Manual" "-t" "anystyle" "-s" "1"
17632 "-r" #$(string-append "anystyle-cli "
17633 (package-version this-package))
17634 "-B" "check" "-B" "find" "-B" "parse" "-B" "train"
17635 "anystyle.txt")
17636 (install-file "anystyle.1"
17637 (string-append #$output "/share/man/man1"))))))))
17638 (home-page "https://anystyle.io")
17639 (synopsis "Fast and smart citation reference parsing")
17640 (description
17641 "AnyStyle is a very fast and smart parser for academic reference lists
17642and bibliographies. AnyStyle uses powerful machine learning heuristics based
17643on Conditional Random Fields and aims to make it easy to train the model with
17644data that is relevant to your parsing needs.
17645
17646This package provides the @command{anystyle} command-line utility. AnyStyle
17647can also be used as a Ruby library or as a web application, though the later
17648has not yet been packaged for Guix.")
17649 (license license:bsd-2)
17650 (properties `((upstream-name . "anystyle-cli")))))
17651
17652(define-public ruby-google-protobuf
17653 (package
17654 (name "ruby-google-protobuf")
17655 (version "4.35.1")
17656 (source (origin
17657 (method url-fetch)
17658 (uri (rubygems-uri "google-protobuf" version))
17659 (sha256
17660 (base32
17661 "09ipzsijxkrgwnyic0l4yhnazw46ca7ll0adza6za66r649lg9m3"))))
17662 (build-system ruby-build-system)
17663 (arguments
17664 (list #:tests? #f)) ; There are no tests.
17665 (native-inputs (list ruby-rake))
17666 (synopsis "Protocol Buffers are Google's data interchange format")
17667 (description "This library contains the Ruby extension that implements
17668Protocol Buffers functionality in Ruby.
17669
17670The Ruby extension makes use of generated Ruby code that defines message and
17671enum types in a Ruby DSL. You may write definitions in this DSL directly, but
17672we recommend using protoc's Ruby generation support with @code{.proto} files.
17673The build process in this directory only installs the extension; you need to
17674install @code{protoc} (in package ruby-grpc-tools) as well to have Ruby code
17675generation functionality.")
17676 (home-page "https://protobuf.dev")
17677 (license license:bsd-3)))
17678
17679(define-public ruby-googleapis-common-protos-types
17680 (package
17681 (name "ruby-googleapis-common-protos-types")
17682 (version "1.13.0")
17683 (source (origin
17684 (method url-fetch)
17685 (uri (rubygems-uri "googleapis-common-protos-types" version))
17686 (sha256
17687 (base32
17688 "1zrxnv9s2q39f2nh32x7nbfi8lpwzmmn3ji4adglg8dlfr1xrz16"))))
17689 (build-system ruby-build-system)
17690 (arguments
17691 `(#:tests? #f)) ;; has no tests
17692 (propagated-inputs (list ruby-google-protobuf))
17693 (synopsis "Common protocol buffer types used by Google APIs")
17694 (description "Common protocol buffer types used by Google APIs")
17695 (home-page "https://github.com/googleapis/common-protos-ruby")
17696 (license license:asl2.0)))
17697
17698(define-public ruby-grpc
17699 (package
17700 (name "ruby-grpc")
17701 (version "1.74.1")
17702 (source (origin
17703 (method url-fetch)
17704 (uri (rubygems-uri "grpc" version))
17705 (sha256
17706 (base32
17707 "12qy6yga90hs2pdzkxwm80d38dbmjdxmf2szqwb40ky1jr4klfp7"))))
17708 (build-system ruby-build-system)
17709 (arguments
17710 `(#:tests? #f)) ;; has no tests
17711 ;; TODO remove third-party sources (zlib, upb, utf8-range, re2, c-ares,
17712 ;; boringssl-with-bazel, address_sorting, abseil-cpp), see Makefile
17713 (propagated-inputs (list ruby-google-protobuf
17714 ruby-googleapis-common-protos-types))
17715 (synopsis "GRPC system in Ruby")
17716 (description "GRPC is a high performance, open-source universal RPC
17717framework. This package provides a ruby interface for it.")
17718 (home-page "https://github.com/grpc/grpc/tree/master/src/ruby")
17719 (license license:asl2.0)))
17720
17721;;;
17722;;; Avoid adding new packages to the end of this file. To reduce the chances
17723;;; of a merge conflict, place them above by existing packages with similar
17724;;; functionality or similar names.
17725;;;