projects/guix·blob python-team · refs

17767 lines · 656.3 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 (add-before 'check 'disable-frozen-string-literal
2465 (lambda _
2466 ;; Warnings about frozen string literals cause test failures.
2467 (setenv "RUBYOPT" "--disable-frozen-string-literal"))))))
2468 (native-inputs
2469 (list ruby-simplecov))
2470 (propagated-inputs
2471 (list ruby-language-server-protocol
2472 ruby-lint-roller
2473 ruby-rubocop
2474 ruby-rubocop-performance
2475 ruby-standard-custom
2476 ruby-standard-performance))
2477 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
2478 (description "Standard is a port of StandardJS. Like StandardJS, it aims
2479to save time in the following ways:
2480@itemize
2481@item No configuration.
2482@item Automatically format code.
2483@item Catch style issues and programmer errors early.
2484@end itemize")
2485 (home-page "https://github.com/testdouble/standard")
2486 (license license:expat)))
2487
2488(define-public ruby-chunky-png
2489 (package
2490 (name "ruby-chunky-png")
2491 (version "1.4.0")
2492 (source
2493 (origin
2494 (method git-fetch)
2495 (uri (git-reference
2496 (url "https://github.com/wvanbergen/chunky_png")
2497 (commit (string-append "v" version))))
2498 (file-name (git-file-name name version))
2499 (sha256
2500 (base32 "05qwj72dy2fcy0n2jnf3bfriybfj36m7s6pv9xash6295dbcp901"))
2501 (patches
2502 (search-patches "ruby-chunky-png-ruby-3-2-support.patch"))))
2503 (build-system ruby-build-system)
2504 (arguments
2505 (list
2506 #:test-target "spec"
2507 #:phases
2508 #~(modify-phases %standard-phases
2509 (add-after 'unpack 'disable-bundler
2510 (lambda _
2511 (substitute* (find-files "." "\\.rb$")
2512 (("require.*bundler/setup.*") "")))))))
2513 (native-inputs
2514 (list bundler ruby-rspec ruby-standard ruby-yard))
2515 (synopsis "Ruby library to handle PNG images")
2516 (description "ChunkyPNG is a pure Ruby library that can read and write
2517Portable Network Graphics (PNG) images without depending on an external image
2518library. It tries to be memory efficient and reasonably fast. It has
2519features such as:
2520@itemize
2521@item
2522Decoding support for any image that the PNG standard allows. This includes all
2523standard color modes, all bit depths, all transparency, and interlacing and
2524filtering options.
2525@item
2526Encoding support for images of all color modes (true color, grayscale, and
2527indexed) and transparency for all these color modes. The best color mode is
2528chosen automatically, based on the amount of used colors.
2529@item Read/write access to the image's pixels.
2530@item Read/write access to all image metadata that is stored in chunks.
2531@item
2532Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
2533pixel, depending on the hardware).
2534@item
2535Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
2536integer math and a highly optimized saving routine.
2537@item Interoperability with RMagick.
2538@end itemize
2539
2540ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
2541loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
2542Deal with untrusted images in a separate process, e.g., by using @code{fork}
2543or a background processing library.")
2544 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
2545 (license license:expat)))
2546
2547(define-public ruby-text-hyphen
2548 (package
2549 (name "ruby-text-hyphen")
2550 (version "1.5.0")
2551 (source
2552 (origin
2553 (method url-fetch)
2554 (uri (rubygems-uri "text-hyphen" version))
2555 (sha256
2556 (base32
2557 "01js0wxz84cc5hzxgqbcqnsa0y6crhdi6plmgkzyfm55p0rlajn4"))))
2558 (build-system ruby-build-system)
2559 (native-inputs
2560 (list ruby-hoe))
2561 (synopsis "Ruby library to hyphenate words in various languages")
2562 (description "Text::Hyphen is a Ruby library to hyphenate words in various
2563languages using Ruby-fied versions of TeX hyphenation patterns. It will
2564properly hyphenate various words according to the rules of the language the
2565word is written in. The algorithm is based on that of the TeX typesetting
2566system by Donald E. Knuth.")
2567 (home-page "https://github.com/halostatue/text-hyphen")
2568 ;; The whole is licensed under the Expat license, but parts use various
2569 ;; versions of the LaTeX Project Public License.
2570 (license license:expat)))
2571
2572(define-public ruby-open-uri-cached
2573 (package
2574 (name "ruby-open-uri-cached")
2575 (version "1.0.0")
2576 (source
2577 (origin
2578 (method url-fetch)
2579 (uri (rubygems-uri "open-uri-cached" version))
2580 (sha256
2581 (base32
2582 "03v0if3jlvbclnd6jgjk94fbhf0h2fq1wxr0mbx7018sxzm0biwr"))))
2583 (build-system ruby-build-system)
2584 (arguments
2585 `(#:tests? #f)) ;no test suite
2586 (synopsis "OpenURI with transparent disk caching")
2587 (description "OpenURI with transparent disk caching, which is
2588useful to avoid making excessive queries, for example when scraping
2589web pages.")
2590 (home-page "https://github.com/tigris/open-uri-cached")
2591 (license license:expat)))
2592
2593(define-public ruby-ast
2594 (package
2595 (name "ruby-ast")
2596 (version "2.4.2")
2597 (source
2598 (origin
2599 (method git-fetch) ;no test included in gem from v2.4.1
2600 (uri (git-reference
2601 (url "https://github.com/whitequark/ast")
2602 (commit (string-append "v" version))))
2603 (file-name (git-file-name name version))
2604 (sha256
2605 (base32
2606 "0vm94yml8rknr7z034vg6s3fpx6lml2prz9fn3hr67cx0143bb4h"))))
2607 (build-system ruby-build-system)
2608 (arguments
2609 '(#:phases
2610 (modify-phases %standard-phases
2611 (add-after 'unpack 'remove-coveralls-requirement
2612 (lambda _
2613 (substitute* "test/helper.rb"
2614 (("require 'coveralls'") "")
2615 (("Coveralls::SimpleCov::Formatter") ""))))
2616 (add-after 'extract-gemspec 'remove-unnecessary-requirements
2617 (lambda* (#:key inputs #:allow-other-keys)
2618 (substitute* "ast.gemspec"
2619 ((".*coveralls.*") "\n")
2620 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
2621 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
2622 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n")
2623 (("12\\.3") "13.0")))))))
2624 (native-inputs
2625 (list bundler
2626 ruby-bacon
2627 ruby-bacon-colored-output
2628 ruby-json-pure
2629 ruby-kramdown
2630 ruby-mime-types
2631 ruby-racc
2632 ruby-rest-client
2633 ruby-simplecov
2634 ruby-yard))
2635 (synopsis "Library for working with Abstract Syntax Trees")
2636 (description
2637 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
2638It does this through immutable data structures.")
2639 (home-page "https://whitequark.github.io/ast/")
2640 (license license:expat)))
2641
2642(define-public ruby-sporkmonger-rack-mount
2643 ;; Testing the addressable gem requires a newer commit than that released, so
2644 ;; use an up to date version.
2645 (let ((revision "1")
2646 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
2647 (package
2648 (name "ruby-sporkmonger-rack-mount")
2649 (version (git-version "0.8.3" revision commit))
2650 (source (origin
2651 (method git-fetch)
2652 (uri (git-reference
2653 (url "https://github.com/sporkmonger/rack-mount")
2654 (commit commit)))
2655 (file-name (git-file-name name version))
2656 (sha256
2657 (base32
2658 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
2659 (build-system ruby-build-system)
2660 (arguments
2661 ;; Tests currently fail so disable them.
2662 ;; https://github.com/sporkmonger/rack-mount/pull/1
2663 `(#:tests? #f))
2664 (propagated-inputs (list ruby-rack))
2665 (synopsis "Stackable dynamic tree based Rack router")
2666 (description
2667 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
2668continue trying routes if the response returns pass. This allows multiple
2669routes to be nested or stacked on top of each other.")
2670 (home-page "https://github.com/sporkmonger/rack-mount")
2671 (license license:expat))))
2672
2673(define-public ruby-ci-reporter
2674 (package
2675 (name "ruby-ci-reporter")
2676 (version "2.1.0")
2677 (source (origin
2678 (method url-fetch)
2679 (uri (rubygems-uri "ci_reporter" version))
2680 (sha256
2681 (base32
2682 "0qcafasmjjr8a5gzr4k92ncm6h2943skwllhjzwz8spawdwc7dla"))))
2683 (build-system ruby-build-system)
2684 (arguments
2685 `(#:test-target "rspec"))
2686 (propagated-inputs
2687 (list ruby-builder ruby-rexml))
2688 (native-inputs
2689 (list bundler ruby-rspec))
2690 (synopsis "Generate XML reports of runs test")
2691 (description
2692 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2693you to generate XML reports of your test runs. The resulting files can be
2694read by a continuous integration system that understands Ant's JUnit report
2695format.")
2696 (home-page "https://github.com/nicksieger/ci_reporter")
2697 (license license:expat)))
2698
2699(define-public ruby-console
2700 (package
2701 (name "ruby-console")
2702 (version "1.16.2")
2703 (source (origin
2704 (method url-fetch)
2705 (uri (rubygems-uri "console" version))
2706 (sha256
2707 (base32
2708 "0y1bv3kd1l9p0k5n3anvvjxdrcq113pyngz2g29i9mvdgbbx7kq2"))))
2709 (build-system ruby-build-system)
2710 ;; XXX: Disable test suite to avoid dependency cycles with ruby-samovar.
2711 (arguments (list #:tests? #f))
2712 (propagated-inputs (list ruby-fiber-local))
2713 (synopsis "Console logging library for Ruby")
2714 (description "This gem provides beautiful console logging for Ruby
2715applications. It implements fast, buffered log output and has the following
2716features:
2717@itemize
2718@item Thread safe global logger with per-fiber context
2719@item Carry along context with nested loggers
2720@item Enable/disable log levels per class
2721@item Detailed logging of exceptions
2722@item Beautiful logging to the terminal or structured logging using JSON.
2723@end itemize")
2724 (home-page "https://github.com/socketry/console")
2725 (license license:expat)))
2726
2727(define-public ruby-contracts
2728 (package
2729 (name "ruby-contracts")
2730 (version "0.17.2")
2731 (source
2732 (origin
2733 (method url-fetch)
2734 (uri (rubygems-uri "contracts" version))
2735 (sha256
2736 (base32
2737 "1sclvlwnlxfaj1595xd0rn3x3w0ljic3vqgnx6476lr7x8xbpbiv"))))
2738 (build-system ruby-build-system)
2739 (arguments
2740 (list
2741 #:test-target "spec"
2742 #:phases
2743 #~(modify-phases %standard-phases
2744 ;; Don't run or require rubocop, the code linting tool, as this is a
2745 ;; bit unnecessary.
2746 (add-after 'unpack 'dont-run-rubocop
2747 (lambda _
2748 (substitute* "Rakefile"
2749 ((".*rubocop.*") "")
2750 ((".*RuboCop.*") "")))))))
2751 (native-inputs
2752 (list ruby-rspec))
2753 (synopsis "Method contracts for Ruby")
2754 (description
2755 "This library provides contracts for Ruby. A contract describes the
2756correct inputs and output for a method, and will raise an error if a incorrect
2757value is found.")
2758 (home-page "https://github.com/egonSchiele/contracts.ruby")
2759 (license license:bsd-2)))
2760
2761(define-public ruby-crack
2762 (package
2763 (name "ruby-crack")
2764 (version "0.4.5")
2765 (source
2766 (origin
2767 (method url-fetch)
2768 (uri (rubygems-uri "crack" version))
2769 (sha256
2770 (base32
2771 "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"))))
2772 (build-system ruby-build-system)
2773 (arguments
2774 `(#:phases
2775 (modify-phases %standard-phases
2776 (replace 'check
2777 (lambda* (#:key tests? #:allow-other-keys)
2778 (when tests?
2779 (for-each (lambda (file)
2780 (display file)(display "\n")
2781 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2782 (find-files "test" ".*rb$"))))))))
2783 (synopsis "Simple JSON and XML parsing for Ruby")
2784 (description
2785 "@code{crack} provides really simple JSON and XML parsing, extracted from
2786code in Merb and Rails.")
2787 (home-page "https://github.com/jnunemaker/crack")
2788 (license license:expat)))
2789
2790(define-public ruby-clamp
2791 (package
2792 (name "ruby-clamp")
2793 (version "1.3.2")
2794 (source (origin
2795 (method url-fetch)
2796 (uri (rubygems-uri "clamp" version))
2797 (sha256
2798 (base32
2799 "08m0syh06bhx8dqn560ivjg96l5cs5s3l9jh2szsnlcdcyl9jsjg"))))
2800 (build-system ruby-build-system)
2801 (arguments
2802 (list #:test-target "spec"
2803 #:phases #~(modify-phases %standard-phases
2804 (add-after 'unpack 'do-not-require-rubocop
2805 (lambda _
2806 (substitute* "Rakefile"
2807 (("require \"rubocop/rake_task\"")
2808 "")
2809 (("RuboCop::RakeTask.new")
2810 "")))))))
2811 (native-inputs (list ruby-rspec))
2812 (synopsis "Command-line parsing library for Ruby")
2813 (description "Clamp provides an object-model for command-line utilities.
2814It handles parsing of command-line options, and generation of usage help.")
2815 (home-page "https://github.com/mdub/clamp")
2816 (license license:expat)))
2817
2818(define-public ruby-cliver
2819 (package
2820 (name "ruby-cliver")
2821 (version "0.3.2")
2822 (source
2823 (origin
2824 (method url-fetch)
2825 (uri (rubygems-uri "cliver" version))
2826 (sha256
2827 (base32
2828 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2829 (build-system ruby-build-system)
2830 (arguments
2831 '(#:phases
2832 (modify-phases %standard-phases
2833 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2834 ;; would be nice, but the tests look to be incompatible:
2835 ;;
2836 ;; NoMethodError: undefined method `last_comment'
2837 (replace 'check
2838 (lambda* (#:key tests? #:allow-other-keys)
2839 (when tests?
2840 (invoke "rspec")))))))
2841 (native-inputs
2842 (list bundler ruby-rspec-2))
2843 (synopsis "Assertions for command-line dependencies in Ruby")
2844 (description
2845 "@code{cliver} provides a way to detect missing command-line
2846dependencies, including versions.")
2847 (home-page "https://github.com/yaauie/cliver")
2848 (license license:expat)))
2849
2850(define-public ruby-czmq-ffi-gen
2851 (package
2852 (name "ruby-czmq-ffi-gen")
2853 (version "0.13.0")
2854 (source
2855 (origin
2856 (method url-fetch)
2857 (uri (rubygems-uri "czmq-ffi-gen" version))
2858 (sha256
2859 (base32
2860 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2861 (build-system ruby-build-system)
2862 (arguments
2863 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2864 #:phases
2865 (modify-phases %standard-phases
2866 (add-after 'unpack 'patch-lib_dirs
2867 (lambda* (#:key inputs #:allow-other-keys)
2868 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2869 (("lib\\_dirs = \\[.*\\]")
2870 (string-append "lib_dirs = ['"
2871 (assoc-ref inputs "czmq") "/lib"
2872 "']")))
2873 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2874 (("lib\\_dirs = \\[.*\\]")
2875 (string-append "lib_dirs = ['"
2876 (assoc-ref inputs "zeromq") "/lib"
2877 "']"))))))))
2878 (inputs
2879 (list zeromq czmq))
2880 (propagated-inputs (list ruby-ffi))
2881 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2882 (description
2883 "These Ruby bindings are not intended to be directly used, but rather
2884used by higher level bindings like those provided by CZTop.")
2885 (home-page
2886 "https://github.com/paddor/czmq-ffi-gen")
2887 (license license:isc)))
2888
2889(define-public ruby-cztop
2890 (package
2891 (name "ruby-cztop")
2892 (version "0.12.2")
2893 (source
2894 (origin
2895 (method url-fetch)
2896 (uri (rubygems-uri "cztop" version))
2897 (sha256
2898 (base32
2899 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2900 (build-system ruby-build-system)
2901 (arguments
2902 '(#:test-target "spec"
2903 #:phases
2904 (modify-phases %standard-phases
2905 (add-after 'unpack 'patch-lib_paths
2906 (lambda* (#:key inputs #:allow-other-keys)
2907 (substitute* "lib/cztop/poller/zmq.rb"
2908 (("lib\\_paths = \\[.*\\]")
2909 (string-append "lib_paths = ['"
2910 (assoc-ref inputs "zeromq") "/lib"
2911 "']"))))))))
2912 (native-inputs
2913 (list bundler ruby-rspec))
2914 (inputs
2915 (list zeromq))
2916 (propagated-inputs
2917 (list ruby-czmq-ffi-gen))
2918 (synopsis "CZMQ Ruby bindings")
2919 (description
2920 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2921CZMQ. The focus of of CZTop is on being easy to use and providing first class
2922support for security mechanisms.")
2923 (home-page "https://github.com/paddor/cztop")
2924 (license license:isc)))
2925
2926(define-public ruby-saikuro-treemap
2927 (package
2928 (name "ruby-saikuro-treemap")
2929 (version "0.2.0")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (rubygems-uri "saikuro_treemap" version))
2933 (sha256
2934 (base32
2935 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2936 (build-system ruby-build-system)
2937 ;; Some of the tests fail because the generated JSON has keys in a
2938 ;; different order. This is a problem with the test suite rather than any
2939 ;; of the involved libraries.
2940 (arguments `(#:tests? #f))
2941 (propagated-inputs
2942 (list ruby-json-pure ruby-atoulme-saikuro))
2943 (synopsis "Generate complexity treemap based on saikuro analysis")
2944 (description
2945 "This gem generates a treemap showing the complexity of Ruby code on
2946which it is run. It uses Saikuro under the covers to analyze Ruby code
2947complexity.")
2948 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
2949 (license license:expat)))
2950
2951(define-public ruby-oauth2
2952 (package
2953 (name "ruby-oauth2")
2954 (version "2.0.12")
2955 (source
2956 (origin
2957 (method git-fetch)
2958 (uri (git-reference
2959 (url "https://gitlab.com/oauth-xx/oauth2")
2960 (commit (string-append "v" version))))
2961 (file-name (git-file-name name version))
2962 (sha256
2963 (base32 "0cgya1rjf2v6f4j86cq1k5hpd1ks7xayvddsidsnc0fl3zkm8ygj"))))
2964 (build-system ruby-build-system)
2965 (native-inputs
2966 (list bundler
2967 ruby-addressable
2968 ruby-backports
2969 ruby-rexml
2970 ruby-rspec-block-is-expected
2971 ruby-rspec-pending-for
2972 ruby-rspec-stubbed-env
2973 ruby-silent-stream))
2974 (propagated-inputs
2975 (list ruby-faraday
2976 ruby-hashie
2977 ruby-jwt
2978 ruby-multi-xml
2979 ruby-rack
2980 ruby-snaky-hash
2981 ruby-version-gem))
2982 (synopsis "Ruby wrapper for the OAuth 2.0")
2983 (description
2984 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2985with a similar style to the original OAuth spec.")
2986 (home-page "https://github.com/oauth-xx/oauth2")
2987 (license license:expat)))
2988
2989(define-public ruby-omniauth
2990 (package
2991 (name "ruby-omniauth")
2992 (version "2.1.1")
2993 (source (origin
2994 (method git-fetch) ;for tests
2995 (uri (git-reference
2996 (url "https://github.com/omniauth/omniauth")
2997 (commit (string-append "v" version))))
2998 (file-name (git-file-name name version))
2999 (sha256
3000 (base32
3001 "1mm7a4ll7ymamrbsl63yi6i34qpwmh2nh5a9kj961gja1iz2gyd1"))))
3002 (build-system ruby-build-system)
3003 (arguments
3004 (list #:phases
3005 #~(modify-phases %standard-phases
3006 (add-after 'unpack 'relax-requirements
3007 (lambda _
3008 (substitute* "spec/helper.rb"
3009 ;; This condition is used to require coveralls and
3010 ;; simplecov; override it to avoid these extraneous
3011 ;; requirements.
3012 (("RUBY_VERSION >= '1.9'")
3013 "false")
3014 (("require 'rack/freeze'") "")))))))
3015 (native-inputs (list ruby-rspec))
3016 (propagated-inputs (list ruby-hashie ruby-rack ruby-rack-test
3017 ruby-rack-protection))
3018 (synopsis "Generalized Rack framework for multiple-provider authentication")
3019 (description
3020 "This package provides a generalized Rack framework for multiple-provider
3021authentication.")
3022 (home-page "https://github.com/omniauth/omniauth")
3023 (license license:expat)))
3024
3025(define-public ruby-omniauth-oauth2
3026 (package
3027 (name "ruby-omniauth-oauth2")
3028 (version "1.8.0")
3029 (source
3030 (origin
3031 (method url-fetch)
3032 (uri (rubygems-uri "omniauth-oauth2" version))
3033 (sha256
3034 (base32
3035 "0y4y122xm8zgrxn5nnzwg6w39dnjss8pcq2ppbpx9qn7kiayky5j"))))
3036 (build-system ruby-build-system)
3037 (arguments
3038 (list #:phases
3039 #~(modify-phases %standard-phases
3040 (add-after 'unpack 'relax-requirements
3041 (lambda _
3042 (substitute* "spec/helper.rb"
3043 ;; This condition is used to require coveralls and
3044 ;; simplecov; override it to avoid these extraneous
3045 ;; requirements.
3046 (("RUBY_VERSION >= \"1.9\"")
3047 "false")))))))
3048 (propagated-inputs (list ruby-oauth2 ruby-omniauth))
3049 (native-inputs (list ruby-rspec ruby-rack-test ruby-webmock))
3050 (synopsis "Abstract OAuth2 strategy for OmniAuth")
3051 (description
3052 "This library provides a generic OAuth2 strategy for OmniAuth. It
3053doesn't provide a way to gather user information, so should be used as a
3054building block for authentication strategies.")
3055 (home-page "https://github.com/omniauth/omniauth-oauth2")
3056 (license license:expat)))
3057
3058(define-public ruby-open4
3059 (package
3060 (name "ruby-open4")
3061 (version "1.3.4")
3062 (source
3063 (origin
3064 (method url-fetch)
3065 (uri (rubygems-uri "open4" version))
3066 (sha256
3067 (base32
3068 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
3069 (build-system ruby-build-system)
3070 (arguments
3071 '(#:phases
3072 (modify-phases %standard-phases
3073 (add-after 'unpack 'patch-minitest
3074 (lambda _
3075 (substitute* "test/lib/test_case.rb"
3076 (("MiniTest::Unit::TestCase")
3077 "Minitest::Test"))))
3078 (add-after 'unpack 'patch
3079 (lambda _
3080 (substitute* "rakefile"
3081 ;; Update the Rakefile so it works
3082 (("-rubygems") "-rrubygems")
3083 (("Config") "RbConfig"))))
3084 (add-before 'check 'set-LIB
3085 (lambda _
3086 ;; This is used in the rakefile when running the tests
3087 (setenv "LIB" "open4"))))))
3088 (native-inputs (list ruby-minitest))
3089 (synopsis "Open child processes from Ruby and manage them easily")
3090 (description
3091 "@code{Open4} is a Ruby library to run child processes and manage their
3092input and output.")
3093 (home-page "https://github.com/ahoward/open4")
3094 (license license:ruby)))
3095
3096(define-public ruby-options
3097 (package
3098 (name "ruby-options")
3099 (version "2.3.2")
3100 (source
3101 (origin
3102 (method url-fetch)
3103 (uri (rubygems-uri "options" version))
3104 (sha256
3105 (base32
3106 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
3107 (build-system ruby-build-system)
3108 (arguments
3109 (list
3110 #:phases
3111 #~(modify-phases %standard-phases
3112 (replace 'check
3113 (lambda* (#:key tests? #:allow-other-keys)
3114 (when tests?
3115 (substitute* "spec/options_spec.rb"
3116 (("require .* \"/spec_helper\"")
3117 "require \"spec_helper\"\n"))
3118 (substitute* "spec/spec_helper.rb"
3119 (("require 'spec'")
3120 "require 'rspec'\n"))
3121 (invoke "rspec" "spec")))))))
3122 (native-inputs (list ruby-rspec))
3123 (synopsis "Ruby library to parse options from *args cleanly")
3124 (description
3125 "The @code{options} library helps with parsing keyword options in Ruby
3126functions.")
3127 (home-page "https://github.com/ahoward/options")
3128 (license license:ruby)))
3129
3130(define-public ruby-erubi
3131 (package
3132 (name "ruby-erubi")
3133 (version "1.11.0")
3134 (source
3135 (origin
3136 (method git-fetch)
3137 (uri (git-reference
3138 (url "https://github.com/jeremyevans/erubi")
3139 (commit version)))
3140 (file-name (git-file-name name version))
3141 (sha256
3142 (base32 "0y4qskz260fjwbnjps5z5yygjwgh6ds0f97lfa9gsmh6zqa1lvvx"))))
3143 (build-system ruby-build-system)
3144 (arguments
3145 (list #:test-target "spec"))
3146 (native-inputs (list ruby-minitest
3147 ruby-minitest-global-expectations))
3148 (synopsis "ERB template engine for Ruby")
3149 (description
3150 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
3151Erubis")
3152 (home-page "https://github.com/jeremyevans/erubi")
3153 (license license:expat)))
3154
3155(define-public ruby-erubis
3156 (package
3157 (name "ruby-erubis")
3158 (version "2.7.0")
3159 (source
3160 (origin
3161 (method url-fetch)
3162 (uri (rubygems-uri "erubis" version))
3163 (sha256
3164 (base32
3165 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
3166 (build-system ruby-build-system)
3167 (arguments
3168 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
3169 (synopsis "Implementation of embedded Ruby (eRuby)")
3170 (description
3171 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
3172features such as multi-language support, auto escaping, auto trimming spaces
3173around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
3174support.")
3175 (home-page "http://www.kuwata-lab.com/erubis/")
3176 (license license:expat)))
3177
3178(define-public ruby-ethon
3179 (package
3180 (name "ruby-ethon")
3181 (version "0.17.0")
3182 (source
3183 (origin
3184 (method git-fetch)
3185 (uri (git-reference
3186 (url "https://github.com/typhoeus/ethon")
3187 (commit (string-append "v" version))))
3188 (file-name (git-file-name name version))
3189 (sha256
3190 (base32
3191 "06rjq0r3bbybycqp6n2xqpcqmz5x8lymnk6fj5wsq59s8gf843r9"))))
3192 (build-system ruby-build-system)
3193 (arguments
3194 (list
3195 #:phases
3196 #~(modify-phases %standard-phases
3197 (add-after 'unpack 'libcurl-use-absolute-reference
3198 (lambda* (#:key inputs #:allow-other-keys)
3199 (substitute* "lib/ethon/curls/settings.rb"
3200 (("libcurl', 'libcurl\\.so\\.4")
3201 (search-input-file inputs "/lib/libcurl.so")))))
3202 (add-after 'extract-gemspec 'remove-MIME-types-version-constraint
3203 (lambda _
3204 (substitute* "Gemfile"
3205 (("(gem \"mime-types\").*" _ gem)
3206 gem))))
3207 ;; Tell Bundler not to request perf dependencies
3208 (add-after 'extract-gemspec 'remove-Bundler-setup
3209 (lambda _
3210 (substitute* "spec/spec_helper.rb"
3211 (("Bundler.setup")
3212 ""))))
3213 (replace 'check
3214 (lambda* (#:key tests? #:allow-other-keys)
3215 (when tests?
3216 (for-each (lambda (file)
3217 (invoke "ruby" "-Ispec" file))
3218 (find-files "spec" "_spec\\.rb$"))))))))
3219 (native-inputs (list ruby-rspec ruby-sinatra ruby-mustermann
3220 ruby-mime-types ruby-webrick))
3221 (inputs
3222 (list curl))
3223 (propagated-inputs
3224 (list ruby-ffi))
3225 (synopsis "Very lightweight @code{libcurl} wrapper")
3226 (description
3227 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
3228 (home-page "https://github.com/typhoeus/ethon")
3229 (license license:expat)))
3230
3231(define-public ruby-execjs
3232 (package
3233 (name "ruby-execjs")
3234 (version "2.7.0")
3235 (source
3236 (origin
3237 ;; fetch from github as the gem does not contain testing code
3238 (method git-fetch)
3239 (uri (git-reference
3240 (url "https://github.com/rails/execjs")
3241 (commit (string-append "v" version))))
3242 (file-name (git-file-name name version))
3243 (sha256
3244 (base32
3245 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
3246 (build-system ruby-build-system)
3247 (native-inputs
3248 (list bundler
3249 ;; The test suite tests all the available backends. Currently, this just
3250 ;; means the node backend.
3251 ;;
3252 ;; PASSED: test:node
3253 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
3254 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
3255 node-lts))
3256 (synopsis "Run JavaScript code from Ruby")
3257 (description
3258 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
3259runtime to evaluate your JavaScript program, then returns the result to you as
3260a Ruby object.")
3261 (home-page "https://github.com/rails/execjs")
3262 (license license:expat)))
3263
3264(define-public ruby-fakefs
3265 (package
3266 (name "ruby-fakefs")
3267 (version "2.8.0")
3268 (home-page "https://github.com/fakefs/fakefs")
3269 (source (origin
3270 ;; The Rubygems release does not contain tests.
3271 (method git-fetch)
3272 (uri (git-reference
3273 (url home-page)
3274 (commit (string-append "v" version))))
3275 (file-name (git-file-name name version))
3276 (sha256
3277 (base32
3278 "0a3vq6cllml279j77hxipmbln31pjw6di3zdgpzqvhqgazv55v10"))))
3279 (build-system ruby-build-system)
3280 (arguments
3281 '(#:phases (modify-phases %standard-phases
3282 (replace 'replace-git-ls-files
3283 (lambda _
3284 (substitute* "fakefs.gemspec"
3285 (("`git ls-files lib README.md LICENSE`")
3286 "`find lib README.md LICENSE -type f | sort`"))))
3287 (add-before 'check 'remove-version-constraints
3288 (lambda _
3289 ;; Drop hard version requirements for test dependencies.
3290 (substitute* "fakefs.gemspec"
3291 (("(.*add_development_dependency .*), .*" _ dep)
3292 (string-append dep "\n"))))))))
3293 (native-inputs
3294 (list ruby-bump ruby-maxitest ruby-pry ruby-rubocop ruby-rspec))
3295 (synopsis "Fake file system for Ruby")
3296 (description
3297 "This package provides a fake file system for use in test suites. It
3298avoids the need for manually creating temporary directories, or dealing
3299with platform intricacies in @code{File} and @code{FileUtils}.")
3300 (license license:expat)))
3301
3302(define-public ruby-orderedhash
3303 (package
3304 (name "ruby-orderedhash")
3305 (version "0.0.6")
3306 (source (origin
3307 (method url-fetch)
3308 (uri (rubygems-uri "orderedhash" version))
3309 (sha256
3310 (base32
3311 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
3312 (build-system ruby-build-system)
3313 (arguments
3314 '(#:tests? #f)) ; no test suite
3315 (synopsis "Ruby library providing an order-preserving hash")
3316 (description "Orderedhash is a Ruby library providing a hash
3317implementation that preserves the order of items and features some array-like
3318extensions.")
3319 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
3320 (license license:public-domain)))
3321
3322(define-public ruby-libxml
3323 (package
3324 (name "ruby-libxml")
3325 (version "5.0.5")
3326 (source
3327 (origin
3328 (method url-fetch)
3329 (uri (rubygems-uri "libxml-ruby" version))
3330 (sha256
3331 (base32 "16jfgrgb3ys7lk4b7m6s5kg3jdd5w976k6hmf1fmbpw254ahgg7i"))))
3332 (build-system ruby-build-system)
3333 (native-inputs (list ruby-minitest ruby-rake-compiler))
3334 (arguments
3335 (list
3336 #:gem-flags
3337 ;; TODO: Re-enable when documentation generation works
3338 #~(list "--no-document"
3339 "--"
3340 (string-append "--with-xml2-include="
3341 #$(this-package-input "libxml2")
3342 "/include/libxml2" ))
3343 #:phases
3344 #~(modify-phases %standard-phases
3345 ;; tests: 393 runs, 42523 assertions, 0 failures, 0 errors, 20 skips
3346 ;;
3347 ;; TODO: Implement #:test-flags in ruby-build-system and figure out
3348 ;; how to skip tests more elegant.
3349 (add-after 'unpack 'skip-failing-tests
3350 (lambda _
3351 (for-each
3352 (lambda (method)
3353 (substitute* "test/test_canonicalize.rb"
3354 (((string-append "def " method) def)
3355 (string-append def "; skip \"CR/LF mismatch\";"))))
3356 '("test_canonicalize_with_w3c_c14n_3_1"
3357 "test_canonicalize_with_w3c_c14n_3_2"
3358 "test_canonicalize_with_w3c_c14n_3_3"
3359 "test_canonicalize_with_w3c_c14n_3_4"))
3360 (substitute* "test/test_schema.rb"
3361 (("def test_schema_load_from_uri" def)
3362 (string-append def "; skip \"missing XLink schema\";")))
3363 (substitute* "test/test_reader.rb"
3364 (("def test_string_encoding" def)
3365 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3366 (substitute* "test/test_sax_parser.rb"
3367 (("def test_noexistent_file" def)
3368 (string-append def "; skip \"assertion is not equal\";")))
3369 (substitute* "test/test_html_parser.rb"
3370 (("def test_no_implied" def)
3371 (string-append def "; skip \"no such file or directory\";"))
3372 (("def test_noexistent_file" def)
3373 (string-append def "; skip \"no such file or directory\";")))
3374 (substitute* "test/test_html_parser_context.rb"
3375 (("def test_default_options" def)
3376 (string-append def "; skip \"assertion is not equal\";")))
3377 (substitute* "test/test_dtd.rb"
3378 (("def test_external_dtd" def)
3379 (string-append def "; skip \"assertion is not equal\";")))
3380 (for-each
3381 (lambda (method)
3382 (substitute* "test/test_xml.rb"
3383 (((string-append "def " method) def)
3384 (string-append def "; skip \"expected false to be truthy\";"))))
3385 '("test_enabled_ftp"
3386 "test_enabled_docbook"
3387 "test_enabled_unicode"
3388 "test_enabled_http"))
3389 (substitute* "test/test_reader.rb"
3390 (("def test_invalid_encoding" def)
3391 (string-append def "; skip \"couldn't find end of Start Tag\";")))
3392 (for-each
3393 (lambda (method)
3394 (substitute* "test/test_parser.rb"
3395 (((string-append "def " method) def)
3396 (string-append def "; skip \"assertion is not equal\";"))))
3397 '("test_bad_xml"
3398 "test_noexistent_file"
3399 "test_file_encoding"
3400 "test_string_encoding"))))
3401 (add-after 'install 'set-gem-path
3402 (lambda _
3403 (setenv "GEM_PATH" (string-append
3404 (getenv "GEM_PATH") ":"
3405 #$output "/lib/ruby/vendor_ruby"))))
3406 (delete 'check)
3407 (add-after 'set-gem-path 'check
3408 (assoc-ref %standard-phases 'check)))))
3409 (inputs
3410 (list libxml2
3411 zlib))
3412 (home-page "https://xml4r.github.io/libxml-ruby/")
3413 (synopsis "Ruby bindings for GNOME Libxml2")
3414 (description
3415 "The Libxml-Ruby project provides Ruby language bindings for the GNOME
3416Libxml2 XML toolkit.")
3417 (license license:expat)))
3418
3419(define-public ruby-lino
3420 (package
3421 (name "ruby-lino")
3422 (version "4.1.0")
3423 (source
3424 (origin
3425 (method git-fetch)
3426 (uri (git-reference
3427 (url "https://github.com/infrablocks/lino")
3428 (commit (string-append "v" version))))
3429 (file-name (git-file-name name version))
3430 (sha256
3431 (base32 "0hz7ivjl6ig63gng8b3y6cmmjymf809044c04460f8kq9q9xr9d7"))))
3432 (build-system ruby-build-system)
3433 (arguments
3434 (list
3435 #:phases
3436 #~(modify-phases %standard-phases
3437 (add-after 'unpack 'loosen-dependency-constraints
3438 (lambda _
3439 (substitute* "lino.gemspec"
3440 (("~>") ">="))))
3441 (add-after 'unpack 'remove-unnecessary-dependencies
3442 (lambda _
3443 (delete-file "Gemfile.lock")
3444 (substitute* "lino.gemspec"
3445 (("'hamster'.*") "'immutable-ruby', '~> 0.2'\n")
3446 ((".*rake_circle_ci.*") "\n")
3447 ((".*rake_git.*") "\n")
3448 ((".*rake_gpg.*") "\n")
3449 ((".*rake_ssh.*") "\n")
3450 ((".*rake_simplecov.*") "\n")
3451 (("spec\\.add_development_dependency 'simplecov'") ""))
3452 (substitute* "spec/spec_helper.rb"
3453 ((".*simplecov.*") "\n")
3454 ((".*bundler.*") "\n")
3455 ;; Use [].each to disable running the SimpleCov configuration
3456 ;; block
3457 (("SimpleCov\\.start") "[].each"))))
3458 (add-after 'unpack 'replace-hamster-with-immutable
3459 (lambda _
3460 (substitute* "lib/lino/builders/command_line.rb"
3461 (("hamster") "immutable/vector"))
3462 (substitute* "lib/lino/builders/subcommand.rb"
3463 (("hamster") "immutable/vector")
3464 (("Hamster") "Immutable"))
3465 (substitute* (find-files "lib/lino/builders/mixins/" "\\.rb")
3466 (("Hamster") "Immutable"))
3467 (substitute* (find-files "lib/lino/model/" "\\.rb")
3468 (("Hamster") "Immutable"))))
3469 ;; Reduce required development dependencies by running rspec directly.
3470 (replace 'check
3471 (lambda* (#:key tests? #:allow-other-keys)
3472 (when tests?
3473 (invoke "ruby" (which "rspec"))))))))
3474 (propagated-inputs (list ruby-childprocess ruby-immutable-ruby ruby-open4))
3475 (native-inputs (list ruby-rspec))
3476 (synopsis "Build and execute commands in Ruby")
3477 (description
3478 "@code{Lino} provides an interface to run external commands. It provides
3479an interface to add options as well as managing the standard input, output and
3480error streams.")
3481 (home-page "https://github.com/infrablocks/lino")
3482 (license license:expat)))
3483
3484(define-public ruby-x25519
3485 (package
3486 (name "ruby-x25519")
3487 (version "1.0.10")
3488 (source (origin
3489 (method git-fetch)
3490 (uri (git-reference
3491 (url "https://github.com/RubyCrypto/x25519")
3492 (commit (string-append "v" version))))
3493 (file-name (git-file-name name version))
3494 (sha256
3495 (base32
3496 "1g0311ly32f6hfn4q5fvkbjbl2bhv1l9fx6s0kglxfsrwq51926y"))
3497 (patches
3498 (search-patches
3499 "ruby-x25519-automatic-fallback-non-x86_64.patch"))))
3500 (build-system ruby-build-system)
3501 (arguments
3502 (list #:test-target "spec"
3503 #:phases #~(modify-phases %standard-phases
3504 (add-after 'unpack 'remove-unnecessary-dependencies
3505 (lambda _
3506 (substitute* "Gemfile"
3507 ((".*rubocop.*")
3508 ""))
3509 (substitute* "Rakefile"
3510 (("require \"rubocop/rake_task\"")
3511 "")
3512 (("RuboCop::RakeTask.new")
3513 ""))))
3514 (add-before 'build 'compile
3515 (lambda _
3516 (invoke "rake" "compile"))))))
3517 (native-inputs (list ruby-rake-compiler ruby-rspec))
3518 (synopsis "Cryptography library for Ruby providing the X25519
3519Diffie-Hellman function")
3520 (description
3521 "The x25519 gem is an efficient public key cryptography library for
3522Ruby providing key exchange/agreement via the X25519 (as known as
3523Curve25519) Elliptic Curve Diffie-Hellman function as described in
3524@url{https://www.ietf.org/rfc/rfc7748.txt, RFC 7748}.")
3525 (home-page "https://github.com/RubyCrypto/x25519")
3526 (license license:bsd-3)))
3527
3528(define-public ruby-xml-simple
3529 (package
3530 (name "ruby-xml-simple")
3531 (version "1.1.5")
3532 (source (origin
3533 (method url-fetch)
3534 (uri (rubygems-uri "xml-simple" version))
3535 (sha256
3536 (base32
3537 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
3538 (build-system ruby-build-system)
3539 (arguments
3540 '(#:tests? #f)) ; no test suite
3541 (synopsis "Simple Ruby library for XML processing")
3542 (description "This library provides a simple API for XML processing in
3543Ruby.")
3544 (home-page "https://github.com/maik/xml-simple")
3545 (license license:ruby)))
3546
3547(define-public ruby-xpath
3548 (package
3549 (name "ruby-xpath")
3550 (version "3.2.0")
3551 (source (origin
3552 (method url-fetch)
3553 (uri (rubygems-uri "xpath" version))
3554 (sha256
3555 (base32
3556 "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"))))
3557 (build-system ruby-build-system)
3558 (arguments (list #:phases #~(modify-phases %standard-phases
3559 (replace 'check
3560 (lambda* (#:key tests? #:allow-other-keys)
3561 (when tests?
3562 (invoke "rspec" "spec" )))))))
3563 (native-inputs (list ruby-pry ruby-rspec))
3564 (propagated-inputs (list ruby-nokogiri))
3565 (synopsis "Ruby DSL for generating XPath expressions")
3566 (description "XPath is a Ruby domain-specific language (DSL) for
3567generating XPath expressions.")
3568 (home-page "https://github.com/teamcapybara/xpath")
3569 (license license:expat)))
3570
3571(define-public ruby-thor
3572 (package
3573 (name "ruby-thor")
3574 (version "1.5.0")
3575 (source (origin
3576 ;; Pull from git because the gem has no tests.
3577 (method git-fetch)
3578 (uri (git-reference
3579 (url "https://github.com/rails/thor")
3580 (commit (string-append "v" version))))
3581 (file-name (git-file-name name version))
3582 (sha256
3583 (base32
3584 "1mfc7x81zvi56as2r5zlbp9qrn71pdxlsnry06zi8rfykb4qnwfm"))))
3585 (build-system ruby-build-system)
3586 (arguments
3587 (list
3588 #:phases
3589 #~(modify-phases %standard-phases
3590 (add-after 'unpack 'remove-coveralls-dependency
3591 (lambda _
3592 ;; Do not hook the test suite into the online coveralls service.
3593 (substitute* "Gemfile"
3594 ((".*coveralls.*") ""))
3595 (substitute* "spec/helper.rb"
3596 (("require \"coveralls\"") "")
3597 (("Coveralls::SimpleCov::Formatter") ""))))
3598 (add-after 'unpack 'disable-problematic-tests
3599 (lambda _
3600 ;; These tests attempt to check the git repository for
3601 ;; tabs vs spaces, double vs single quotes, etc, and
3602 ;; depend on the git checkout.
3603 (delete-file "spec/quality_spec.rb")
3604 (substitute* "spec/parser/options_spec.rb"
3605 ;; This test fails for unknown reasons (see:
3606 ;; https://github.com/rails/thor/issues/814).
3607 (("it \"raises an error for unknown switches" all)
3608 (string-append "x" all)))))
3609 (replace 'check
3610 (lambda* (#:key tests? #:allow-other-keys)
3611 (when tests?
3612 (invoke "rspec" "spec" )))))))
3613 (native-inputs (list ruby-rspec ruby-simplecov ruby-webmock))
3614 (synopsis "Ruby toolkit for building command-line interfaces")
3615 (description "Thor is a toolkit for building powerful command-line
3616interfaces.")
3617 (home-page "http://whatisthor.com/")
3618 (license license:expat)))
3619
3620(define-public ruby-lumberjack
3621 (package
3622 (name "ruby-lumberjack")
3623 (version "1.0.13")
3624 (source (origin
3625 (method url-fetch)
3626 (uri (rubygems-uri "lumberjack" version))
3627 (sha256
3628 (base32
3629 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
3630 (build-system ruby-build-system)
3631 (native-inputs
3632 (list ruby-rspec ruby-timecop))
3633 (synopsis "Logging utility library for Ruby")
3634 (description "Lumberjack is a simple logging utility that can be a drop in
3635replacement for Logger or ActiveSupport::BufferedLogger. It provides support
3636for automatically rolling log files even with multiple processes writing the
3637same log file.")
3638 (home-page "https://github.com/bdurand/lumberjack")
3639 (license license:expat)))
3640
3641(define-public ruby-rbnacl
3642 (package
3643 (name "ruby-rbnacl")
3644 (version "7.1.1")
3645 (source (origin
3646 (method url-fetch)
3647 (uri (rubygems-uri "rbnacl" version))
3648 (sha256
3649 (base32
3650 "0y8yzianlkc9w6sbqy8iy8l0yym0y6x7p5rjflkfixq76fqmhvzk"))))
3651 (build-system ruby-build-system)
3652 (arguments
3653 (list
3654 #:phases
3655 #~(modify-phases %standard-phases
3656 (add-after 'unpack 'remove-unnecessary-dependencies
3657 (lambda _
3658 ;; Coveralls relates to a network service, and Rubocop to code
3659 ;; linting and both are unnecessary to run the tests
3660 (substitute* "Gemfile"
3661 ((".*rubocop.*")
3662 "\n")
3663 ((".*guard-rspec.*")
3664 "\n")
3665 ((".*coveralls.*")
3666 "\n"))
3667 (substitute* "spec/spec_helper.rb"
3668 (("require \"coveralls\"")
3669 "")
3670 (("Coveralls.wear!")
3671 ""))))
3672 (add-after 'unpack 'use-libsodium-from-store
3673 (lambda* (#:key inputs #:allow-other-keys)
3674 (substitute* '("lib/rbnacl/init.rb"
3675 "lib/rbnacl/sodium.rb")
3676 (("ffi_lib \\[.+\\]")
3677 (string-append "ffi_lib [\""
3678 (assoc-ref inputs "libsodium")
3679 "/lib/libsodium.so" "\"]")))))
3680 ;; Run Rspec directly to avoid the Rubocop dependency in the
3681 ;; Rakefile
3682 (replace 'check
3683 (lambda* (#:key tests? #:allow-other-keys)
3684 (when tests?
3685 (invoke "rspec")))))))
3686 (propagated-inputs (list ruby-ffi))
3687 (inputs (list libsodium))
3688 (native-inputs (list bundler ruby-rspec))
3689 (synopsis "Ruby FFI binding to libsodium")
3690 (description
3691 "This package provides Ruby FFI bindings to the Networking and
3692Cryptography (NaCl) library, also known as libsodium. This provides a
3693high-level toolkit for building cryptographic systems and protocols.")
3694 (home-page "https://github.com/RubyCrypto/rbnacl")
3695 (license license:expat)))
3696
3697(define-public ruby-rbs
3698 (package
3699 (name "ruby-rbs")
3700 (version "4.1.3")
3701 (source
3702 (origin
3703 (method git-fetch) ;for tests and templates
3704 (uri (git-reference
3705 (url "https://github.com/ruby/rbs")
3706 (commit (string-append "v" version))))
3707 (file-name (git-file-name name version))
3708 (sha256
3709 (base32 "06v0yxbqiib9fwii6j5qyzyfpyla1rm6vrh1mn33fyx91b84zrpk"))
3710 (modules '((guix build utils)
3711 (ice-9 regex)))
3712 (snippet
3713 '(begin
3714 ;; These are generated files or unrunnable tests.
3715 (for-each delete-file
3716 (cons* "src/lexer.c"
3717 ;; RDoc requires RBS as a runtime library.
3718 "test/rbs/annotate/rdoc_annotator_test.rb"
3719 "test/rbs/annotate/rdoc_source_test.rb"
3720 ;; These requires network connections.
3721 "test/rbs/cli_test.rb"
3722 "test/rbs/collection/config_test.rb"
3723 "test/rbs/collection/installer_test.rb"
3724 "test/rbs/collection/sources/git_test.rb"
3725 "test/rbs/environment_loader_test.rb"
3726 "test/rbs/test/runtime_test_test.rb"
3727 (map (lambda (file)
3728 (let ((matched (string-match
3729 "templates/(.+)\\.erb" file)))
3730 (match:substring matched 1)))
3731 (find-files "templates" "\\.erb"))))
3732 ;; Remove unnecessary usages of LLVM tools.
3733 (substitute* "Rakefile"
3734 (("sh \"clang-format .* src/lexer.c\"")
3735 "")
3736 (("Rake::Task\\[\"format:c\"\\]\\.invoke")
3737 "")
3738 (("compile_task\\.prerequisites\\.unshift\\(:setup_extconf_compile_commands_json\\)")
3739 ""))))))
3740 (build-system ruby-build-system)
3741 (arguments
3742 (list
3743 #:phases
3744 #~(modify-phases %standard-phases
3745 (add-before 'build 'compile
3746 (lambda _
3747 (invoke "rake" "lexer" "templates")
3748 (invoke "rake" "compile")))
3749 (add-before 'check 'set-home
3750 (lambda _
3751 (setenv "HOME" "/tmp"))))))
3752 (native-inputs (list ruby-rake-compiler re2c ruby-json-schema ruby-rspec))
3753 (propagated-inputs (list ruby-logger ruby-prism ruby-tsort))
3754 (synopsis "Type signatures for Ruby")
3755 (description
3756 "RBS is the language for type signatures for Ruby and standard library
3757definitions.")
3758 (home-page "https://github.com/ruby/rbs")
3759 (license (list license:ruby license:bsd-2))))
3760
3761(define-public ruby-rbtree
3762 (package
3763 (name "ruby-rbtree")
3764 (version "0.4.6")
3765 (source (origin
3766 (method url-fetch)
3767 (uri (rubygems-uri "rbtree" version))
3768 (sha256
3769 (base32
3770 "1z0h1x7fpkzxamnvbw1nry64qd6n0nqkwprfair29z94kd3a9vhl"))))
3771 (build-system ruby-build-system)
3772 (arguments
3773 (list
3774 #:phases
3775 #~(modify-phases %standard-phases
3776 (add-before 'build 'extconf
3777 (lambda _
3778 (invoke "ruby" "extconf.rb")
3779 (invoke "make" "install" (string-append "prefix=" #$output))))
3780 (replace 'check
3781 (lambda* (#:key tests? #:allow-other-keys)
3782 (when tests?
3783 (invoke "ruby" "-I." "test.rb")))))))
3784 (synopsis "Ruby implementation of a sorted associative collection")
3785 (description
3786 "This package provides a RBTree is a sorted associative collection that
3787is implemented with a Red-Black Tree. It maps keys to values like a Hash, but
3788maintains its elements in ascending key order. The interface is the almost
3789identical to that of Hash.")
3790 (home-page "http://rbtree.rubyforge.org/")
3791 (license license:expat)))
3792
3793(define-public ruby-rgl
3794 (package
3795 (name "ruby-rgl")
3796 (version "0.6.6")
3797 (source (origin
3798 (method url-fetch)
3799 (uri (rubygems-uri "rgl" version))
3800 (sha256
3801 (base32
3802 "0dji1k9knrf8cxm5psd3pgd9i8f7cfq182jwjpi1pwxw15axf496"))))
3803 (build-system ruby-build-system)
3804 (arguments
3805 (list
3806 #:phases
3807 #~(modify-phases %standard-phases
3808 (add-after 'unpack 'remove-unnecessary-dependencies
3809 (lambda _
3810 (substitute* "Gemfile"
3811 ;; Caring about coverage is a not a packager's task but a
3812 ;; developer's
3813 ;;(("gem \"simplecov\"") "")
3814 ;; CodeClimate is an online service, and is unnecessary for
3815 ;; running the tests
3816 (("gem \"codeclimate-test-reporter\", .*") "\n")))))))
3817 (native-inputs (list ruby-test-unit ruby-simplecov ruby-yard graphviz-minimal))
3818 (propagated-inputs (list ruby-pairing-heap ruby-rexml ruby-stream))
3819 (synopsis "Framework for graph data structures and algorithms")
3820 (description "RGL is a framework for graph data structures and algorithms.
3821The design of the library is much influenced by the Boost Graph Library (BGL)
3822which is written in C++.")
3823 (home-page "https://github.com/monora/rgl")
3824 (license license:bsd-2)))
3825
3826(define-public ruby-hkdf
3827 (package
3828 (name "ruby-hkdf")
3829 (version "1.0.0")
3830 (source
3831 (origin
3832 (method git-fetch)
3833 (uri (git-reference
3834 (url "https://github.com/jtdowney/hkdf")
3835 (commit (string-append "v" version))))
3836 (file-name (git-file-name name version))
3837 (sha256
3838 (base32
3839 "1xqwdmxfnhagivwgb5v9ilwpb4jxlsqwj7pnj43d65zzg5m8p9r5"))))
3840 (build-system ruby-build-system)
3841 (arguments
3842 `(#:test-target "default"))
3843 (native-inputs
3844 (list ruby-rspec))
3845 (synopsis "HMAC-based Key Derivation Function")
3846 (description
3847 "This package provides a Ruby implementation of RFC5869: @acronym{HKDF,
3848HMAC-based Extract-and-Expand Key Derivation Function}. The goal of HKDF is to
3849take some source key material and generate suitable cryptographic keys from it.")
3850 (home-page "https://github.com/jtdowney/hkdf")
3851 (license license:expat)))
3852
3853(define-public ruby-neatjson
3854 (package
3855 (name "ruby-neatjson")
3856 (version "0.10.5")
3857 (source
3858 (origin
3859 (method url-fetch)
3860 (uri (rubygems-uri "neatjson" version))
3861 (sha256
3862 (base32 "0wm1lq8yl6rzysh3wg6fa55w5534k6ppiz0qb7jyvdy582mk5i0s"))))
3863 (build-system ruby-build-system)
3864 (arguments
3865 (list
3866 #:phases
3867 #~(modify-phases %standard-phases
3868 (replace 'check
3869 (lambda* (#:key tests? #:allow-other-keys)
3870 (if tests?
3871 (invoke "ruby" "test/test_neatjson.rb")
3872 (format #t "test suite not run~%")))))))
3873 (synopsis "JSON strings from Ruby objects generator")
3874 (description
3875 "This package implements a functionality of pretty-print JSON with more
3876formatting options than the built-in @code{JSON.pretty_generate}, such as
3877keeping arrays and objects on a single line when possible, aligning or sorting
3878object keys, customizing numeric representation, and more.")
3879 (home-page "https://github.com/Phrogz/NeatJSON")
3880 (license license:expat)))
3881
3882(define-public ruby-nenv
3883 (package
3884 (name "ruby-nenv")
3885 (version "0.3.0")
3886 (source (origin
3887 (method url-fetch)
3888 (uri (rubygems-uri "nenv" version))
3889 (sha256
3890 (base32
3891 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
3892 (build-system ruby-build-system)
3893 (arguments
3894 `(#:tests? #f)) ; no tests included
3895 (native-inputs
3896 (list ruby-rspec bundler))
3897 (synopsis "Ruby interface for modifying the environment")
3898 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
3899and inspect the environment.")
3900 (home-page "https://github.com/e2/nenv")
3901 (license license:expat)))
3902
3903(define-public ruby-ptools
3904 (package
3905 (name "ruby-ptools")
3906 (version "1.5.0")
3907 (source (origin
3908 (method url-fetch)
3909 (uri (rubygems-uri "ptools" version))
3910 (sha256
3911 (base32
3912 "0damllbshkxycrwjv80sz78h76dw7r9z54d17mb5cbha1daq9q2d"))))
3913 (build-system ruby-build-system)
3914 (arguments
3915 (list
3916 #:test-target "spec:all"
3917 #:phases
3918 #~(modify-phases %standard-phases
3919 (add-after 'unpack 'patch
3920 (lambda _
3921 (substitute* "Rakefile"
3922 ;; Don't require rubocop
3923 (("require 'rubocop/rake_task'") "")
3924 (("RuboCop::RakeTask.new") "")
3925 ;; Do not attempt to sign the gem.
3926 (("spec\\.signing_key = .*") ""))
3927
3928 (substitute* "spec/binary_spec.rb"
3929 (("/bin/ls") (which "ls"))
3930 (("/bin/cat") (which "cat"))
3931 (("/bin/chmod") (which "chmod"))
3932 (("/bin/df") (which "df"))))))))
3933 (native-inputs
3934 (list ruby-rspec))
3935 (synopsis "Extra methods for Ruby's @code{File} class")
3936 (description
3937 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
3938class with many additional methods modelled after common POSIX tools, such as
3939@code{File.which} for finding executables, @code{File.tail} to print the last
3940lines of a file, @code{File.wc} to count words, and so on.")
3941 (home-page "https://github.com/djberg96/ptools")
3942 (license license:artistic2.0)))
3943
3944(define-public ruby-permutation
3945 (package
3946 (name "ruby-permutation")
3947 (version "0.1.8")
3948 (source (origin
3949 (method url-fetch)
3950 (uri (rubygems-uri "permutation" version))
3951 (sha256
3952 (base32
3953 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
3954 (build-system ruby-build-system)
3955 (arguments
3956 `(#:phases
3957 (modify-phases %standard-phases
3958 (add-after 'unpack 'fix-rakefile
3959 (lambda _
3960 (substitute* "Rakefile"
3961 (("require 'rake/gempackagetask'")
3962 "require 'rubygems/package_task'")
3963 (("include Config") ""))))
3964 (replace 'check
3965 (lambda _
3966 (invoke "ruby" "-Ilib" "test/test.rb"))))))
3967 (synopsis "Library to perform operations with sequence permutations")
3968 (description "This package provides a Ruby library to perform different
3969operations with permutations of sequences, such as strings and arrays.")
3970 (home-page "https://flori.github.io/permutation")
3971 (license license:gpl2))) ; GPL 2 only
3972
3973(define-public ruby-shellany
3974 (package
3975 (name "ruby-shellany")
3976 (version "0.0.1")
3977 (source (origin
3978 (method url-fetch)
3979 (uri (rubygems-uri "shellany" version))
3980 (sha256
3981 (base32
3982 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
3983 (build-system ruby-build-system)
3984 (arguments
3985 `(#:test-target "default"
3986 #:phases
3987 (modify-phases %standard-phases
3988 (add-after 'unpack 'fix-version-test
3989 (lambda _
3990 (substitute* "spec/shellany_spec.rb"
3991 (("^RSpec") "require \"shellany\"\nRSpec")))))))
3992 (native-inputs
3993 (list ruby-rspec ruby-nenv bundler))
3994 (synopsis "Capture command output")
3995 (description "Shellany is a Ruby library providing functions to capture
3996the output produced by running shell commands.")
3997 (home-page "https://rubygems.org/gems/shellany")
3998 (license license:expat)))
3999
4000(define-public ruby-notiffany
4001 (package
4002 (name "ruby-notiffany")
4003 (version "0.1.3")
4004 (source (origin
4005 (method url-fetch)
4006 (uri (rubygems-uri "notiffany" version))
4007 (sha256
4008 (base32
4009 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
4010 (build-system ruby-build-system)
4011 ;; Tests are not included in the gem.
4012 (arguments `(#:tests? #f))
4013 (propagated-inputs
4014 (list ruby-shellany ruby-nenv))
4015 (native-inputs
4016 (list bundler))
4017 (synopsis "Wrapper library for notification libraries")
4018 (description "Notiffany is a Ruby wrapper library for notification
4019libraries such as Libnotify.")
4020 (home-page "https://github.com/guard/notiffany")
4021 (license license:expat)))
4022
4023(define-public ruby-forking-test-runner
4024 (package
4025 (name "ruby-forking-test-runner")
4026 (version "1.6.0")
4027 (home-page "https://github.com/grosser/forking_test_runner")
4028 (source (origin
4029 (method git-fetch)
4030 (uri (git-reference (url home-page)
4031 (commit (string-append "v" version))))
4032 (file-name (git-file-name name version))
4033 (sha256
4034 (base32
4035 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
4036 (build-system ruby-build-system)
4037 (arguments
4038 '(#:test-target "spec"
4039 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
4040 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
4041 #:tests? #f
4042 #:phases (modify-phases %standard-phases
4043 (replace 'replace-git-ls-files
4044 (lambda _
4045 (substitute* "forking_test_runner.gemspec"
4046 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4047 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))))
4048 (add-before 'check 'remove-version-constraints
4049 (lambda _
4050 ;; Ignore hard coded version constraints for the tests.
4051 (delete-file "Gemfile.lock")))
4052 (add-before 'check 'set-HOME
4053 (lambda _
4054 ;; Many tests invoke Bundler, and fails when Bundler
4055 ;; warns that /homeless-shelter does not exist.
4056 (setenv "HOME" "/tmp"))))))
4057 (native-inputs
4058 (list ruby-activerecord ruby-bump ruby-rspec ruby-sqlite3 ruby-wwtd))
4059 (propagated-inputs
4060 (list ruby-parallel-tests))
4061 (synopsis "Run every test in a fork")
4062 (description
4063 "This package is a wrapper around @code{parallel_tests} that runs every
4064test in a fork to avoid pollution and get clean output per test.")
4065 (license license:expat)))
4066
4067(define-public ruby-formatador
4068 (package
4069 (name "ruby-formatador")
4070 (version "0.2.5")
4071 (source (origin
4072 (method url-fetch)
4073 (uri (rubygems-uri "formatador" version))
4074 (sha256
4075 (base32
4076 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
4077 (build-system ruby-build-system)
4078 ;; Circular dependency: Tests require ruby-shindo, which requires
4079 ;; ruby-formatador at runtime.
4080 (arguments `(#:tests? #f))
4081 (synopsis "Ruby library to format text on stdout")
4082 (description "Formatador is a Ruby library to format text printed to the
4083standard output stream.")
4084 (home-page "https://github.com/geemus/formatador")
4085 (license license:expat)))
4086
4087(define-public ruby-fuubar
4088 (package
4089 (name "ruby-fuubar")
4090 (version "2.3.2")
4091 (source
4092 (origin
4093 ;; Fetch from the git repository, as the gem package doesn't include
4094 ;; the tests.
4095 (method git-fetch)
4096 (uri (git-reference
4097 (url "https://github.com/thekompanee/fuubar")
4098 (commit (string-append "releases/v" version))))
4099 (file-name (git-file-name name version))
4100 (sha256
4101 (base32
4102 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
4103 (build-system ruby-build-system)
4104 (arguments
4105 '(;; TODO: Some tests fail, unsure why.
4106 ;; 21 examples, 7 failures
4107 #:tests? #f
4108 #:phases
4109 (modify-phases %standard-phases
4110 (add-before 'build 'delete-certificate
4111 (lambda _
4112 ;; Remove 's.cert_chain' as we do not build with a private key
4113 (substitute* "fuubar.gemspec"
4114 ((".*cert_chain.*") "")
4115 ((".*signing_key.*") ""))))
4116 (replace 'check
4117 (lambda* (#:key tests? #:allow-other-keys)
4118 (when tests?
4119 (invoke "rspec")))))))
4120 (native-inputs
4121 (list bundler))
4122 (propagated-inputs
4123 (list ruby-rspec-core ruby-progressbar))
4124 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
4125 (description
4126 "Fuubar is an RSpec formatter that uses a progress bar instead of a
4127string of letters and dots as feedback. It also stops on the first test
4128failure.")
4129 (home-page "https://github.com/thekompanee/fuubar")
4130 (license license:expat)))
4131
4132(define-public ruby-haml
4133 (package
4134 (name "ruby-haml")
4135 (version "7.2.0")
4136 (source
4137 (origin
4138 (method url-fetch)
4139 (uri (rubygems-uri "haml" version))
4140 (sha256
4141 (base32
4142 "0nnmzj6g2wynxbrp9j885zab4nkzfryhl2bv6cj1gazyyxqjpzc7"))))
4143 (build-system ruby-build-system)
4144 (arguments
4145 (list #:tests? #f)) ; No included tests
4146 (propagated-inputs
4147 (list ruby-thor ruby-tilt/minimal ruby-temple))
4148 (synopsis "Haml is a Ruby library to generate HTML documents")
4149 (description
4150 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
4151HTML or XML that is designed to express the structure of documents using
4152indentation rather than closing tags. It was originally envisioned as a
4153plugin for Ruby on Rails, but it can function as a stand-alone templating
4154engine.")
4155 (home-page "https://haml.info/")
4156 (license license:expat)))
4157
4158(define-public ruby-hashdiff
4159 (package
4160 (name "ruby-hashdiff")
4161 (version "1.0.1")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (rubygems-uri "hashdiff" version))
4166 (sha256
4167 (base32
4168 "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"))))
4169 (build-system ruby-build-system)
4170 (arguments
4171 '(#:phases
4172 (modify-phases %standard-phases
4173 ;; Run tests directly via rspec to avoid depending on rubocop.
4174 (replace 'check
4175 (lambda* (#:key tests? #:allow-other-keys)
4176 (when tests?
4177 (invoke "rspec")))))))
4178 (native-inputs
4179 (list bundler ruby-rspec-2))
4180 (synopsis "HashDiff computes the smallest difference between two hashes")
4181 (description
4182 "HashDiff is a Ruby library to compute the smallest difference between
4183two hashes.")
4184 (home-page "https://github.com/liufengyun/hashdiff")
4185 (license license:expat)))
4186
4187(define-public ruby-hydra-minimal
4188 ;; No releases yet.
4189 (let ((commit "d985443af5ea81f4ca13559380d20e96140de56e")
4190 (revision "2"))
4191 (package
4192 (name "ruby-hydra-minimal")
4193 (version (git-version "0.0.0" revision commit))
4194 (home-page "https://github.com/hyphenation/hydra")
4195 (source (origin
4196 (method git-fetch)
4197 (uri (git-reference (url home-page) (commit commit)))
4198 (file-name (git-file-name name version))
4199 ;; byebug is a non-essential debugging utility that brings in
4200 ;; many dependencies.
4201 (patches (search-patches "ruby-hydra-minimal-no-byebug.patch"))
4202 (sha256
4203 (base32
4204 "0mlc6zw9vwxx4zgxjdpk8qn6ibplm80k6w4axc6k7m1l5dg65jqd"))))
4205 (build-system ruby-build-system)
4206 (arguments
4207 (list
4208 #:tests? #f)) ;avoid rspec dependency.
4209 (synopsis "Ruby hyphenation patterns")
4210 (description
4211 "ruby-hydra-minimal is a Ruby library for working with hyphenation patterns.
4212It is a low-dependency variant of ruby-hydra.")
4213 (license license:expat))))
4214
4215(define-public ruby-hydra
4216 (package
4217 (inherit ruby-hydra-minimal)
4218 (name "ruby-hydra")
4219 (arguments
4220 (substitute-keyword-arguments arguments
4221 ((#:tests? tests? #t)
4222 #t)
4223 ((#:phases phases #~%standard-phases)
4224 #~(modify-phases #$phases
4225 (add-after 'unpack 'make-files-writable
4226 (lambda _
4227 (for-each make-file-writable (find-files "."))))
4228 (replace 'check
4229 (lambda* (#:key tests? #:allow-other-keys)
4230 (when tests?
4231 (invoke "rspec"))))))))
4232 (native-inputs
4233 (list ruby-rspec))
4234 (description
4235 "ruby-hydra is a Ruby library for working with hyphenation patterns.")))
4236
4237(define-public ruby-shindo
4238 (package
4239 (name "ruby-shindo")
4240 (version "0.3.11")
4241 (source (origin
4242 (method url-fetch)
4243 (uri (rubygems-uri "shindo" version))
4244 (sha256
4245 (base32
4246 "1wccg3a4g3agfyszipkdnbcgsazcfwdbz1gv51q8m17m9plvpzdp"))))
4247 (build-system ruby-build-system)
4248 (arguments
4249 (list
4250 #:test-target "tests"
4251 #:phases
4252 #~(modify-phases %standard-phases
4253 (add-after 'unpack 'fix-tests
4254 (lambda _
4255 (substitute* "tests/tests_helper.rb"
4256 (("-rrubygems") ""))))
4257 ;; Move the 'check phase to after 'install, to use installed shindo.
4258 (delete 'check)
4259 (add-after 'install 'configure-tests
4260 (lambda* (#:key tests? #:allow-other-keys)
4261 (when tests?
4262 (setenv "GEM_PATH"
4263 (string-append
4264 (getenv "GEM_PATH") ":"
4265 #$output "/lib/ruby/vendor_ruby"))
4266 (setenv "PATH"
4267 (string-append
4268 (getenv "PATH") ":" #$output "/bin")))))
4269 (add-after 'configure-tests 'check
4270 (assoc-ref %standard-phases 'check)))))
4271 (propagated-inputs
4272 (list ruby-formatador))
4273 (synopsis "Simple depth first Ruby testing")
4274 (description "Shindo is a simple depth first testing library for Ruby.")
4275 (home-page "https://github.com/geemus/shindo")
4276 (license license:expat)))
4277
4278(define-public ruby-rubygems-tasks
4279 (package
4280 (name "ruby-rubygems-tasks")
4281 (version "0.3.0")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (rubygems-uri "rubygems-tasks" version))
4286 (sha256
4287 (base32 "06g10wg5nbca1lj9m9i5qyslp7cwdm00fhy3n1q0qxcbxpkwmpzx"))))
4288 (build-system ruby-build-system)
4289 ;; Tests need Internet access.
4290 (arguments
4291 `(#:tests? #f))
4292 (synopsis "Rake tasks for managing and releasing Ruby Gems")
4293 (description "Rubygems-task provides Rake tasks for managing and releasing
4294Ruby Gems.")
4295 (home-page "https://github.com/postmodern/rubygems-tasks")
4296 (license license:expat)))
4297
4298(define-public ruby-rubyzip
4299 (package
4300 (name "ruby-rubyzip")
4301 (version "2.3.2")
4302 (source (origin
4303 (method git-fetch)
4304 (uri (git-reference
4305 (url "https://github.com/rubyzip/rubyzip")
4306 (commit (string-append "v" version))))
4307 (file-name (git-file-name name version))
4308 (sha256
4309 (base32
4310 "03p8c990n6c1r4g64w0vv7z2iaswisl07l2f1lbh1s78cvmlmfxx"))))
4311 (build-system ruby-build-system)
4312 (arguments
4313 '(#:phases
4314 (modify-phases %standard-phases
4315 (add-after 'unpack 'disable-rubocop
4316 (lambda _
4317 (substitute* "Rakefile"
4318 (("require 'rubocop/rake_task'") "")
4319 (("RuboCop::RakeTask.new") ""))))
4320 (add-before 'check 'patch-tests
4321 (lambda* (#:key inputs #:allow-other-keys)
4322 (substitute* "test/gentestfiles.rb"
4323 (("/usr/bin/zip") (which "zip")))))
4324 (add-after 'patch-source-shebangs 'unpatch-some-source-shebangs
4325 (lambda _
4326 ;; The tests compare zipped files with data test files; since the
4327 ;; zip files do not have their shebangs patched, the data files
4328 ;; compared with their extracted version must also be left
4329 ;; un-patched.
4330 (substitute* (find-files "test/data" "\\.(txt|rb)$")
4331 (((which "ruby"))
4332 "/usr/bin/env ruby")))))))
4333 (native-inputs
4334 (list bundler ruby-simplecov zip unzip))
4335 (synopsis "Ruby module is for reading and writing zip files")
4336 (description
4337 "The rubyzip module provides ways to read from and create zip files.")
4338 (home-page "https://github.com/rubyzip/rubyzip")
4339 (license license:bsd-2)))
4340
4341(define-public ruby-silent-stream
4342 (package
4343 (name "ruby-silent-stream")
4344 (version "1.0.6")
4345 (source (origin
4346 (method url-fetch)
4347 (uri (rubygems-uri "silent_stream" version))
4348 (sha256
4349 (base32
4350 "10381fpvjzfjvhgfyv700607fpa29firgf52w5w5536m4fh6x63m"))))
4351 (build-system ruby-build-system)
4352 (synopsis "ActiveSupport stream silencing without ActiveSupport")
4353 (description "SilentStream is an extraction of some parts of
4354ActiveSupport's Kernel Reporting Core Extensions around silencing IO
4355streams.")
4356 (home-page "https://github.com/pboling/silent_stream")
4357 (license license:expat)))
4358
4359(define-public ruby-simplecov-lcov
4360 (package
4361 (name "ruby-simplecov-lcov")
4362 (version "0.8.0")
4363 (source (origin
4364 (method url-fetch)
4365 (uri (rubygems-uri "simplecov-lcov" version))
4366 (sha256
4367 (base32
4368 "1h8kswnshgb9zidvc88f4zjy4gflgz3854sx9wrw8ppgnwfg6581"))))
4369 (build-system ruby-build-system)
4370 ;; The test suite fails half of its tests; it seems to rely on older
4371 ;; versions of simplecov, rspec, possibly others (see:
4372 ;; https://github.com/fortissimo1997/simplecov-lcov/issues/29).
4373 (arguments (list #:tests? #f
4374 #:test-target "spec"))
4375 (native-inputs
4376 (list ruby-activesupport
4377 ruby-coveralls
4378 ruby-rspec
4379 ruby-simplecov))
4380 (synopsis "SimpleCov formatter to generate a lcov style coverage")
4381 (description "This package provides a SimpleCov formatter to generate a
4382lcov-style coverage report.")
4383 (home-page "https://github.com/fortissimo1997/simplecov-lcov")
4384 (license license:expat)))
4385
4386(define-public ruby-snaky-hash
4387 (package
4388 (name "ruby-snaky-hash")
4389 (version "2.0.3")
4390 (source
4391 (origin
4392 (method git-fetch)
4393 (uri (git-reference
4394 (url "https://gitlab.com/oauth-xx/snaky_hash")
4395 (commit (string-append "v" version))))
4396 (file-name (git-file-name name version))
4397 (sha256
4398 (base32 "0qmcm0765ny4qsvbm51fgg2bpk3gnxy9ycg0p572x0qmacy13yzf"))))
4399 (build-system ruby-build-system)
4400 (native-inputs
4401 (list ruby-backports
4402 ruby-rspec
4403 ruby-rspec-block-is-expected
4404 ruby-rspec-pending-for))
4405 (propagated-inputs (list ruby-hashie ruby-version-gem))
4406 (synopsis "Hash keys and look-ups normalization Ruby library")
4407 (description "The SnakyHash Ruby library provides classes for normalizing
4408hash keys and look-ups, and a pseudo-object interface.")
4409 (home-page "https://gitlab.com/oauth-xx/snaky_hash")
4410 (license license:expat)))
4411
4412(define-public ruby-useragent
4413 (package
4414 (name "ruby-useragent")
4415 (version "0.16.10")
4416 (source (origin
4417 (method url-fetch)
4418 (uri (rubygems-uri "useragent" version))
4419 (sha256
4420 (base32
4421 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
4422 (build-system ruby-build-system)
4423 (arguments
4424 '(#:tests? #f)) ; no test suite
4425 (synopsis "HTTP user agent parser for Ruby")
4426 (description "UserAgent is a Ruby library that parses and compares HTTP
4427User Agents.")
4428 (home-page "https://github.com/gshutler/useragent")
4429 (license license:expat)))
4430
4431(define-public ruby-backports
4432 (package
4433 (name "ruby-backports")
4434 (version "3.11.4")
4435 (source
4436 (origin
4437 (method url-fetch)
4438 (uri (rubygems-uri "backports" version))
4439 (sha256
4440 (base32
4441 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
4442 (build-system ruby-build-system)
4443 (arguments
4444 '(;; TODO: This should be default, but there is one test failure
4445 #:test-target "all_spec"))
4446 (native-inputs
4447 (list ruby-mspec ruby-activesupport))
4448 (synopsis "Backports of the features in newer Ruby versions")
4449 (description
4450 "Backports enables more compatibility across Ruby versions by providing
4451backports of some features.")
4452 (home-page "https://github.com/marcandre/backports")
4453 (license license:expat)))
4454
4455(define-public ruby-bacon
4456 (package
4457 (name "ruby-bacon")
4458 (version "1.2.0")
4459 (source (origin
4460 (method url-fetch)
4461 (uri (rubygems-uri "bacon" version))
4462 (sha256
4463 (base32
4464 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
4465 (build-system ruby-build-system)
4466 (synopsis "Small RSpec clone")
4467 (description "Bacon is a small RSpec clone providing all essential
4468features.")
4469 (home-page "https://github.com/chneukirchen/bacon")
4470 (license license:expat)))
4471
4472(define-public ruby-bacon-bits
4473 (package
4474 (name "ruby-bacon-bits")
4475 (version "0.1.0")
4476 (source
4477 (origin
4478 (method url-fetch)
4479 (uri (rubygems-uri "bacon-bits" version))
4480 (sha256
4481 (base32
4482 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
4483 (build-system ruby-build-system)
4484 (arguments
4485 ;; No tests
4486 '(#:tests? #f))
4487 (propagated-inputs (list ruby-bacon))
4488 (synopsis "Extensions to Bacon, for disabling tests, before and after
4489blocks and more")
4490 (description
4491 "This extends the bacon testing framework with useful extensions to
4492disable tests, have before and after blocks that run once and more.")
4493 (home-page "https://github.com/cldwalker/bacon-bits")
4494 (license license:expat)))
4495
4496(define-public ruby-bacon-colored-output
4497 (package
4498 (name "ruby-bacon-colored-output")
4499 (version "1.1.1")
4500 (source
4501 (origin
4502 (method url-fetch)
4503 (uri (rubygems-uri "bacon-colored_output" version))
4504 (sha256
4505 (base32
4506 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
4507 (build-system ruby-build-system)
4508 (arguments
4509 '(;; No included tests
4510 #:tests? #f))
4511 (propagated-inputs
4512 (list ruby-bacon))
4513 (synopsis "Colored output for Bacon test framework")
4514 (description
4515 "This package adds color through ANSI escape codes to Bacon test
4516output.")
4517 (home-page "https://github.com/whitequark/bacon-colored_output")
4518 (license license:expat)))
4519
4520(define-public ruby-bake
4521 (package
4522 (name "ruby-bake")
4523 (version "0.18.2")
4524 (source (origin
4525 (method git-fetch) ;for tests
4526 (uri (git-reference
4527 (url "https://github.com/ioquatix/bake")
4528 (commit (string-append "v" version))))
4529 (file-name (git-file-name name version))
4530 (sha256
4531 (base32
4532 "19yi1fxzz9n580gig3p3j6nxbgcfcassa6b0q07jkqrzxdqn7xhn"))))
4533 (build-system ruby-build-system)
4534 (arguments
4535 (list #:phases
4536 #~(modify-phases %standard-phases
4537 (add-after 'unpack 'sanitize-dependencies
4538 (lambda _
4539 ;; These dependencies are not needed to build and run tests
4540 ;; and contain circular dependencies.
4541 (substitute* "gems.rb"
4542 ((".*'bake-modernize'.*") "")
4543 ((".*'bake-gem'.*") "")
4544 ((".*'bake-github-pages'.*") "")
4545 ((".*'utopia-project'.*") ""))))
4546 (add-before 'build 'drop-signing-key-requirement
4547 (lambda _
4548 (substitute* "bake.gemspec"
4549 (("spec.signing_key =.*")
4550 "spec.signing_key = nil"))))
4551 (replace 'check
4552 (lambda* (#:key tests? #:allow-other-keys)
4553 (when tests?
4554 (substitute* "spec/spec_helper.rb"
4555 (("require 'bundler'") "")
4556 (("Bundler\\.setup") ""))
4557 (substitute* "spec/bake/command/call_spec.rb"
4558 (("context 'with value generating task'" ctx)
4559 (string-append ctx ", skip: 'always fails'")))
4560 (invoke "rspec")))))))
4561 (native-inputs (list ruby-covered ruby-rspec))
4562 (propagated-inputs (list ruby-bigdecimal ruby-samovar))
4563 (synopsis "Replacement for rake with a simpler syntax")
4564 (description "Bake is a task execution tool, inspired by Rake, but
4565codifying many of the use cases which are typically implemented in an ad-hoc
4566manner.")
4567 (home-page "https://github.com/ioquatix/bake")
4568 (license license:expat)))
4569
4570(define-public ruby-bake-test
4571 (package
4572 (name "ruby-bake-test")
4573 (version "0.2.0")
4574 (source (origin
4575 (method url-fetch)
4576 (uri (rubygems-uri "bake-test" version))
4577 (sha256
4578 (base32
4579 "1p6kfpncj0s4zyynrrq6c735jvh0dnwyv7kfqym4rpyka4f85qdp"))))
4580 (build-system ruby-build-system)
4581 ;; XXX: Disable the test suite to avoid a circular dependency with
4582 ;; ruby-sus.
4583 (arguments (list #:tests? #f))
4584 (propagated-inputs (list ruby-bake))
4585 (synopsis "Test suite automatic runner for Ruby")
4586 (description "@command{bake-test} automatically discovers how to run local
4587test suites for Ruby projects. It supports @command{rspec}, @command{sus}, as
4588well as @samp{rake}.")
4589 (home-page "https://github.com/ioquatix/bake-test")
4590 (license license:expat)))
4591
4592(define-public ruby-bake-test-external
4593 (package
4594 (name "ruby-bake-test-external")
4595 (version "0.3.2")
4596 (source (origin
4597 (method url-fetch)
4598 (uri (rubygems-uri "bake-test-external" version))
4599 (sha256
4600 (base32
4601 "0749xc7jkz1c5gsq1giwhrqy6s6xqm48bdvs414372881wki2jmh"))))
4602 (build-system ruby-build-system)
4603 ;; The test suite relies on git and network access to clone external
4604 ;; repositories.
4605 (arguments (list #:tests? #f))
4606 (propagated-inputs (list ruby-bake))
4607 (synopsis "Continuous integration extension for Bake")
4608 (description "Bake Test External adds a @samp{test:external} action to the
4609@command{bake} command to run the test suites of dependent projects to check
4610for breakage.")
4611 (home-page "https://github.com/ioquatix/bake-test-external")
4612 (license license:expat)))
4613
4614(define-public ruby-connection-pool
4615 (package
4616 (name "ruby-connection-pool")
4617 (version "2.4.1")
4618 (source (origin
4619 (method git-fetch)
4620 (uri (git-reference
4621 (url "https://github.com/mperham/connection_pool")
4622 (commit (string-append "v" version))))
4623 (file-name (git-file-name name version))
4624 (sha256
4625 (base32
4626 "1iijshb1n9xl5knvpzzx0vqlw7v7mskiw1cpfj1cmdmssavyhsx5"))))
4627 (build-system ruby-build-system)
4628 (arguments
4629 (list
4630 #:phases
4631 #~(modify-phases %standard-phases
4632 (add-after 'unpack 'patch
4633 (lambda _
4634 (substitute* "Rakefile"
4635 (("require \"standard/rake\"") "")
4636 ((":\"standard:fix\",") "")))))))
4637 (native-inputs
4638 (list bundler))
4639 (synopsis "Generic connection pool for Ruby")
4640 (description "Connection_pool provides a generic connection pooling
4641interface for Ruby programs.")
4642 (home-page "https://github.com/mperham/connection_pool")
4643 (license license:expat)))
4644
4645(define-public ruby-fast-gettext
4646 (package
4647 (name "ruby-fast-gettext")
4648 (version "4.1.0")
4649 (home-page "https://github.com/grosser/fast_gettext")
4650 (source (origin
4651 (method git-fetch)
4652 (uri (git-reference (url home-page)
4653 (commit (string-append "v" version))))
4654 (file-name (git-file-name name version))
4655 (sha256
4656 (base32
4657 "04p9s0r67xgvckab9ydb3fbnrc7g20p5c05z2zsacynlkp9x5jp9"))))
4658 (build-system ruby-build-system)
4659 (arguments
4660 (list
4661 #:test-target "spec"
4662 #:phases
4663 #~(modify-phases %standard-phases
4664 (add-before 'check 'remove-version-constraints
4665 (lambda _
4666 (delete-file "Gemfile.lock"))))))
4667 (native-inputs
4668 (list ;; For tests.
4669 ruby-activerecord
4670 ruby-activesupport
4671 ruby-bump
4672 ruby-forking-test-runner
4673 ruby-i18n
4674 ruby-rubocop
4675 ruby-rubocop-packaging
4676 ruby-rspec
4677 ruby-single-cov
4678 ruby-sqlite3
4679 ruby-wwtd))
4680 (synopsis "Fast implementation of @code{GetText}")
4681 (description
4682 "This package provides an alternative implementation of the Ruby
4683@code{GetText} library that is approximately 12x faster yet thread safe.")
4684 ;; Some parts are covered by the Ruby license, see file headers.
4685 (license (list license:expat license:ruby))))
4686
4687(define-public ruby-fiber-local
4688 (package
4689 (name "ruby-fiber-local")
4690 (version "1.0.0")
4691 (source (origin
4692 (method git-fetch)
4693 (uri (git-reference
4694 (url "https://github.com/socketry/fiber-local")
4695 (commit (string-append "v" version))))
4696 (file-name (git-file-name name version))
4697 (sha256
4698 (base32
4699 "0pp5b81h0lysdnphgprkixh1az0fkrgir5sbcp0mm8arxf3f8m90"))))
4700 (build-system ruby-build-system)
4701 (arguments
4702 (list #:phases
4703 #~(modify-phases %standard-phases
4704 (add-after 'extract-gemspec 'sanitize-dependencies
4705 (lambda _
4706 ;; This pulls in extraneous maintenance dependencies.
4707 (delete-file "gems.rb")
4708 ;; Depending on ruby-covered would introduce a dependency
4709 ;; cycle with it.
4710 (substitute* '("fiber-local.gemspec" "spec/spec_helper.rb")
4711 ((".*covered.*") ""))))
4712 (replace 'check
4713 (lambda* (#:key tests? #:allow-other-keys)
4714 (when tests?
4715 (invoke "rspec")))))))
4716 (native-inputs (list ruby-rspec))
4717 (synopsis "Ruby module to simplify fiber-local state management")
4718 (description "This package provides a class-level mixin to make managing
4719fiber-local state easy. It provides easy access to a fiber-local state from a
4720fiber, and defaults to a shared thread-local state.")
4721 (home-page "https://github.com/socketry/fiber-local")
4722 (license license:expat)))
4723
4724(define-public ruby-flores
4725 (let ((commit "92fded00b04b1e3d308edb7440d7b7ab2c89ab5e")
4726 (revision "0"))
4727 (package
4728 (name "ruby-flores")
4729 (version (git-version "0.0.8" revision commit))
4730 (source
4731 (origin
4732 (method git-fetch)
4733 (uri (git-reference
4734 (url "https://github.com/jordansissel/ruby-flores")
4735 (commit commit)))
4736 (sha256
4737 (base32 "0jvnw0jli2zzxklfk751vfbi4acf9lijppk67346j3b2qxqi8xms"))
4738 (patches
4739 (search-patches "ruby-flores-fix-deprecations.patch"))))
4740 (build-system ruby-build-system)
4741 (arguments
4742 (list #:phases
4743 #~(modify-phases %standard-phases
4744 (add-after 'unpack 'fix-gemspec
4745 (lambda _
4746 (substitute* "flores.gemspec"
4747 ;; Since this is not a git repository, do not call 'git'.
4748 (("git ls-files") "find . -type f |sort"))))
4749 (replace 'check
4750 (lambda* (#:key tests? #:allow-other-keys)
4751 (when tests?
4752 ;; Requires SSL connections.
4753 (delete-file "spec/flores/pki_integration_spec.rb")
4754 (invoke "ruby" (which "rspec"))))))))
4755 (native-inputs (list ruby-rspec ruby-simplecov))
4756 (synopsis "Fuzzing, randomization, and stress testing library")
4757 (description "Flores is a fuzzing, randomization, and stress library to
4758help tests uncover more bugs.")
4759 (home-page "https://github.com/jordansissel/ruby-flores")
4760 (license license:asl2.0))))
4761
4762(define-public ruby-ipaddr
4763 (package
4764 (name "ruby-ipaddr")
4765 (version "1.2.6")
4766 (source (origin
4767 (method git-fetch) ;for tests
4768 (uri (git-reference
4769 (url "https://github.com/ruby/ipaddr")
4770 (commit (string-append "v" version))))
4771 (file-name (git-file-name name version))
4772 (sha256
4773 (base32
4774 "0h3z8i1fa8s4gx48322fflhpkzghd4bmd9109hglsgdkic7b0dyp"))))
4775 (build-system ruby-build-system)
4776 (native-inputs (list ruby-test-unit-ruby-core))
4777 (synopsis "Manipulate IP addresses")
4778 (description "This package provides a set of methods to manipulate an IP
4779address. Both IPv4 and IPv6 are supported.")
4780 (home-page "https://github.com/ruby/ipaddr")
4781 (license license:bsd-2)))
4782
4783(define-public ruby-fake-ftp
4784 (package
4785 (name "ruby-fake-ftp")
4786 (version "0.3.0")
4787 (source (origin
4788 (method url-fetch)
4789 (uri (rubygems-uri "fake_ftp" version))
4790 (sha256
4791 (base32
4792 "1zl9q9m4x7lz9890g0h1qqj7hcxnwzpjfnfbxadjblps7b5054q4"))))
4793 (build-system ruby-build-system)
4794 (native-inputs (list ruby-rspec ruby-rubocop ruby-simplecov))
4795 (arguments
4796 '(#:test-target "spec"))
4797 (synopsis "Fake FTP server for use with ruby tests")
4798 (description "This package allows you to test FTP implementations in ruby.
4799It is a minimal single-client FTP server that can be bound to any arbitrary
4800port on localhost.")
4801 (home-page "https://rubygems.org/gems/fake_ftp")
4802 (license license:expat)))
4803
4804(define-public ruby-net-telnet
4805 (package
4806 (name "ruby-net-telnet")
4807 (version "0.2.0")
4808 (source (origin
4809 (method url-fetch)
4810 (uri (rubygems-uri "net-telnet" version))
4811 (sha256
4812 (base32
4813 "16nkxc79nqm7fd6w1fba4kb98vpgwnyfnlwxarpdcgywz300fc15"))))
4814 (build-system ruby-build-system)
4815 (synopsis "Telnet client functionality")
4816 (description "This package provides telnet client functionality.")
4817 (home-page "https://github.com/ruby/net-telnet")
4818 (license license:bsd-2)))
4819
4820(define-public ruby-net-ftp
4821 (package
4822 (name "ruby-net-ftp")
4823 (version "0.3.4")
4824 (source (origin
4825 (method git-fetch) ;for tests
4826 (uri (git-reference
4827 (url "https://github.com/ruby/net-ftp")
4828 (commit (string-append "v" version))))
4829 (file-name (git-file-name name version))
4830 (sha256
4831 (base32
4832 "11b1sw7c4c7xrhn5li5m0wylw42hp52jp6pqacyb43hkw1m5zr36"))))
4833 (build-system ruby-build-system)
4834 (propagated-inputs (list ruby-net-protocol ruby-time))
4835 (synopsis "File Transfer Protocol client library")
4836 (description "This class implements the File Transfer Protocol. If you
4837have used a command-line FTP program, and are familiar with the commands, you
4838will be able to use this class easily. Some extra features are included to
4839take advantage of Ruby's style and strengths.")
4840 (home-page "https://github.com/ruby/net-ftp")
4841 (license license:bsd-2)))
4842
4843(define-public ruby-net-http-persistent
4844 (package
4845 (name "ruby-net-http-persistent")
4846 (version "4.0.2")
4847 (source (origin
4848 (method url-fetch)
4849 (uri (rubygems-uri "net-http-persistent" version))
4850 (sha256
4851 (base32
4852 "0i1as2lgnw7b4jid0gw5glv5hnxz36nmfsbr9rmxbcap72ijgy03"))))
4853 (build-system ruby-build-system)
4854 (native-inputs
4855 (list ruby-connection-pool
4856 ruby-hoe
4857 ruby-rake-manifest))
4858 (synopsis "Persistent HTTP connection manager")
4859 (description "Net::HTTP::Persistent manages persistent HTTP connections
4860using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
4861 (home-page "https://github.com/drbrain/net-http-persistent")
4862 (license license:expat)))
4863
4864(define-public ruby-net-imap
4865 (package
4866 (name "ruby-net-imap")
4867 (version "0.6.6")
4868 (source (origin
4869 (method git-fetch) ;for tests
4870 (uri (git-reference
4871 (url "https://github.com/ruby/net-imap")
4872 (commit (string-append "v" version))))
4873 (file-name (git-file-name name version))
4874 (sha256
4875 (base32
4876 "052myg3kgr1fjb3zaki8cfn3s55pd5nn5v4jhbvak8kkpc4hf5gy"))))
4877 (build-system ruby-build-system)
4878 (arguments
4879 (list #:phases
4880 #~(modify-phases %standard-phases
4881 (add-before 'replace-git-ls-files 'adjust-for-git-ls-files
4882 (lambda _
4883 ;; Adjust the git ls-files invocation so that it matches
4884 ;; the expected pattern.
4885 (substitute* "net-imap.gemspec"
4886 (("`git ls-files -z 2>/dev/null`")
4887 "`git ls-files -z`"))))
4888 (add-before 'check 'disable-simplecov
4889 (lambda _
4890 (setenv "SIMPLECOV_DISABLE" "yes"))))))
4891 (native-inputs (list ruby-psych ruby-test-unit-ruby-core))
4892 (propagated-inputs (list ruby-date ruby-net-protocol))
4893 (synopsis "Ruby client api for Internet Message Access Protocol")
4894 (description "@code{Net::IMAP} implements Internet Message Access
4895Protocol (IMAP) client functionality. The protocol is described in
4896@url{https://tools.ietf.org/html/rfc3501, IMAP}.")
4897 (home-page "https://github.com/ruby/net-imap")
4898 (license license:bsd-2)))
4899
4900(define-public ruby-net-pop
4901 (package
4902 (name "ruby-net-pop")
4903 (version "0.1.2")
4904 (source (origin
4905 (method git-fetch)
4906 (uri (git-reference
4907 (url "https://github.com/ruby/net-pop")
4908 (commit (string-append "v" version))))
4909 (file-name (git-file-name name version))
4910 (sha256
4911 (base32
4912 "05vz6a56va2rbr7ld78gdzwy1j5mzs98cz82ax5aqa83pzzk6jld"))))
4913 (build-system ruby-build-system)
4914 (propagated-inputs (list ruby-net-protocol))
4915 (synopsis "Ruby client library for POP3")
4916 (description "This library provides functionality for retrieving email via
4917POP3, the Post Office Protocol version 3, as specified by
4918@url{http://www.ietf.org/rfc/rfc1939.txt, RFC1939}.")
4919 (home-page "https://github.com/ruby/net-pop")
4920 (license license:bsd-2)))
4921
4922(define-public ruby-net-smtp
4923 (package
4924 (name "ruby-net-smtp")
4925 (version "0.3.3")
4926 (source (origin
4927 (method git-fetch) ;for tests
4928 (uri (git-reference
4929 (url "https://github.com/ruby/net-smtp")
4930 (commit (string-append "v" version))))
4931 (file-name (git-file-name name version))
4932 (sha256
4933 (base32
4934 "0ca2wh45xvc09rv6v6sz3vbnkzrjzk5c4l6dk50zk4dwxvghma8r"))))
4935 (build-system ruby-build-system)
4936 (arguments
4937 (list
4938 #:phases
4939 #~(modify-phases %standard-phases
4940 (add-before 'check 'regenerate-certificate
4941 ;; On version 0.5.0 a Makefile was introduced to regenerated
4942 ;; the certificates, and instead of calling openssl directory
4943 ;; we could do (with-directory-excursion "test/net/fixtures"
4944 ;; (invoke "make" "regen_certs"). However the certificate is
4945 ;; expired versions before 0.5.0 as well.
4946 (lambda _
4947 (with-directory-excursion "test/net/fixtures"
4948 (invoke
4949 "openssl" "req" "-new" "-key" "server.key" "-out"
4950 "server.csr" "-subj"
4951 "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost")
4952 (invoke "openssl" "req" "-new" "-x509" "-days" "3650"
4953 "-key" "server.key" "-out" "cacert.pem" "-subj"
4954 (string-append
4955 "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby "
4956 "Core Team/CN=Ruby Test "
4957 "CA/[email protected]"))
4958 (invoke "openssl" "x509" "-days" "3650" "-CA" "cacert.pem"
4959 "-CAkey" "server.key" "-set_serial" "00" "-in"
4960 "server.csr" "-req" "-out" "server.crt")))))))
4961 (native-inputs (list openssl))
4962 (propagated-inputs (list ruby-net-protocol))
4963 (synopsis "Simple Mail Transfer Protocol client library for Ruby")
4964 (description "This library provides functionality to send Internet mail
4965via SMTP, the Simple Mail Transfer Protocol. The SMTP protocol specification
4966is known as @url{http://www.ietf.org/rfc/rfc2821.txt, RFC2821}.")
4967 (home-page "https://github.com/ruby/net-smtp")
4968 (license license:bsd-2)))
4969
4970(define-public ruby-pleaserun
4971 (package
4972 (name "ruby-pleaserun")
4973 (version "0.0.34")
4974 (source (origin
4975 (method url-fetch)
4976 (uri (rubygems-uri "pleaserun" version))
4977 (sha256
4978 (base32
4979 "1gfpnpfma4xpnbmxljav5mkz7wbcgnr8p57lphp3rqjsi04593fs"))))
4980 (build-system ruby-build-system)
4981 (arguments
4982 (list #:phases
4983 #~(modify-phases %standard-phases
4984 (add-after 'extract-gemspec 'relax-requirements
4985 (lambda _
4986 (substitute* "pleaserun.gemspec"
4987 ;; Mustache is pinned at 0.99.8, for portability with
4988 ;; older Rubies.
4989 (("dependency\\(%q<mustache>.freeze.*")
4990 "dependency(%q<mustache>.freeze)\n")
4991 ;; Dotenv is specified as "~> 2", which is lower than the
4992 ;; packaged 3. This relax avoids errors of the fpm
4993 ;; package.
4994 (("dependency\\(%q<dotenv>.freeze.*")
4995 "dependency(%q<dotenv>.freeze)\n"))))
4996 (replace 'check
4997 (lambda* (#:key tests? #:allow-other-keys)
4998 (when tests?
4999 ;; The cli_spec.rb test fails non-deterministically with
5000 ;; a Errno::EISDIR error (see:
5001 ;; https://github.com/jordansissel/pleaserun/issues/155)
5002 (invoke "rspec" "--exclude-pattern"
5003 "spec/pleaserun/cli_spec.rb")))))))
5004 (native-inputs (list ruby-flores ruby-rspec))
5005 (propagated-inputs (list ruby-cabin
5006 ruby-clamp
5007 ruby-dotenv
5008 ruby-insist
5009 ruby-mustache
5010 ruby-stud))
5011 (synopsis "Init scripts and service definitions generation tool")
5012 (description "Pleaserun is a tool to generate startup scripts and service
5013definitions. It targets service managers such as systemd, Upstart, launchd,
5014sysv init, and runit.")
5015 (home-page "https://github.com/jordansissel/pleaserun")
5016 (license license:asl2.0)))
5017
5018(define-public ruby-power-assert
5019 (package
5020 (name "ruby-power-assert")
5021 (version "1.1.5")
5022 (source (origin
5023 (method url-fetch)
5024 (uri (rubygems-uri "power_assert" version))
5025 (sha256
5026 (base32
5027 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
5028 (build-system ruby-build-system)
5029 (arguments
5030 '(#:tests? #f)) ; No included tests
5031 (native-inputs
5032 (list bundler))
5033 (synopsis "Assert library with descriptive assertion messages")
5034 (description "Power-assert is an assertion library providing descriptive
5035assertion messages for tests.")
5036 (home-page "https://github.com/k-tsj/power_assert")
5037 (license (list license:bsd-2 license:ruby))))
5038
5039(define-public ruby-powerpack
5040 (package
5041 (name "ruby-powerpack")
5042 (version "0.1.3")
5043 (source
5044 (origin
5045 (method url-fetch)
5046 (uri (rubygems-uri "powerpack" version))
5047 (sha256
5048 (base32
5049 "1f71axvlhnxja0k17qqxdi4qh5ck807hqg4i3j6cgy8fgzmyg7rg"))))
5050 (build-system ruby-build-system)
5051 (arguments
5052 (list #:test-target "spec"))
5053 (native-inputs
5054 (list bundler ruby-rspec ruby-yard))
5055 (synopsis "Useful extensions to core Ruby classes")
5056 (description
5057 "This package provides a few useful extensions to core Ruby classes,
5058including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
5059@code{String}.")
5060 (home-page "https://github.com/bbatsov/powerpack")
5061 (license license:expat)))
5062
5063(define-public ruby-locale
5064 (package
5065 (name "ruby-locale")
5066 (version "2.1.2")
5067 (source (origin
5068 (method url-fetch)
5069 (uri (rubygems-uri "locale" version))
5070 (sha256
5071 (base32
5072 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
5073 (build-system ruby-build-system)
5074 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5075 ;; which needs ruby-gettext, which needs ruby-locale. To break the
5076 ;; dependency cycle we disable tests.
5077 (arguments `(#:tests? #f))
5078 (native-inputs
5079 (list bundler ruby-yard/minimal))
5080 (synopsis "Ruby library providing basic localization APIs")
5081 (description
5082 "Ruby-Locale is the pure ruby library which provides basic APIs for
5083localization.")
5084 (home-page "https://github.com/ruby-gettext/locale")
5085 (license (list license:lgpl3+ license:ruby))))
5086
5087(define-public ruby-temple
5088 (package
5089 (name "ruby-temple")
5090 (version "0.10.0")
5091 (source (origin
5092 (method git-fetch) ;for tests
5093 (uri (git-reference
5094 (url "https://github.com/judofyr/temple")
5095 (commit (string-append "v" version))))
5096 (file-name (git-file-name name version))
5097 (sha256
5098 (base32
5099 "0rr9fnlcgj9nm3b6hzzjsvcw8x3y7z48j7slk7xxff2mh8s7y3y0"))))
5100 (build-system ruby-build-system)
5101 (arguments
5102 (list #:phases
5103 #~(modify-phases %standard-phases
5104 (add-after 'replace-git-ls-files 'replace-more-git-ls-files
5105 (lambda _
5106 (substitute* "temple.gemspec"
5107 ;; There no longer are test, spec or features
5108 ;; directories.
5109 ((".*`git ls-files -- \\{test,spec,features}/\\*`.*")
5110 "")
5111 ;; There isn't any bin directory either.
5112 ((".*`git ls-files -- bin/\\*`.*")
5113 ""))))
5114 (replace 'check
5115 (lambda* (#:key tests? #:allow-other-keys)
5116 (when tests?
5117 (invoke "rspec")))))))
5118 (native-inputs (list ruby-bacon ruby-erubi ruby-rspec ruby-tilt/minimal))
5119 (synopsis "Template compilation framework in Ruby")
5120 (description "Temple is an abstraction and framework for compiling
5121templates to pure Ruby.")
5122 (home-page "https://github.com/judofyr/temple")
5123 (license license:expat)))
5124
5125(define-public ruby-text
5126 (package
5127 (name "ruby-text")
5128 (version "1.3.1")
5129 (source (origin
5130 (method url-fetch)
5131 (uri (rubygems-uri "text" version))
5132 (sha256
5133 (base32
5134 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
5135 (build-system ruby-build-system)
5136 (synopsis "Collection of text algorithms for Ruby")
5137 (description
5138 "This package provides a collection of text algorithms: Levenshtein,
5139Soundex, Metaphone, Double Metaphone, Porter Stemming.")
5140 (home-page "https://github.com/threedaymonk/text")
5141 (license license:expat)))
5142
5143(define-public ruby-gdbm
5144 (package
5145 (name "ruby-gdbm")
5146 (version "2.1.0")
5147 (source
5148 (origin
5149 (method url-fetch)
5150 (uri (rubygems-uri "gdbm" version))
5151 (sha256
5152 (base32 "0xxygf50b2fvy8lcn2vip27vq32p607d3lwd1diplvkajijq8q8b"))))
5153 (build-system ruby-build-system)
5154 (arguments '(#:tests? #f)) ; No bundled tests.
5155 (inputs (list gdbm))
5156 (synopsis "Ruby extension for GNU dbm")
5157 (description "This package provides a Ruby extension for GNU dbm.")
5158 (home-page "https://github.com/ruby/gdbm")
5159 (license license:bsd-2)))
5160
5161(define-public ruby-gettext
5162 (package
5163 (name "ruby-gettext")
5164 (version "3.4.4")
5165 (source (origin
5166 (method url-fetch)
5167 (uri (rubygems-uri "gettext" version))
5168 (sha256
5169 (base32
5170 "11hlxkk2yr9wjwd3nf8kgmsjcd8wf35yqlxi9wpvrgmvrk9n9a2k"))))
5171 (build-system ruby-build-system)
5172 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
5173 ;; which needs ruby-gettext. To break the dependency cycle we disable
5174 ;; tests.
5175 (arguments `(#:tests? #f))
5176 (propagated-inputs
5177 (list ruby-locale ruby-text ruby-erubi))
5178 (native-inputs
5179 (list bundler ruby-yard/minimal))
5180 (synopsis "GNU gettext-like program for Ruby")
5181 (description
5182 "Gettext is a GNU gettext-like program for Ruby. The catalog
5183file (po-file) used is the same as that used by GNU gettext, allowing you to
5184use GNU gettext tools for maintenance.")
5185 (home-page "https://ruby-gettext.github.com/")
5186 (license (list license:lgpl3+ license:ruby))))
5187
5188(define-public ruby-packnga
5189 (package
5190 (name "ruby-packnga")
5191 (version "1.0.4")
5192 (source (origin
5193 (method url-fetch)
5194 (uri (rubygems-uri "packnga" version))
5195 (sha256
5196 (base32
5197 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
5198 (build-system ruby-build-system)
5199 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
5200 ;; To break the dependency cycle we disable tests.
5201 (arguments `(#:tests? #f))
5202 (propagated-inputs
5203 (list ruby-gettext ruby-yard))
5204 (native-inputs
5205 (list bundler))
5206 (synopsis "Utility library to package internationalized libraries")
5207 (description
5208 "Packnga is a library to translate to many languages using YARD.")
5209 (home-page "https://ranguba.org/packnga/")
5210 (license license:lgpl2.0+)))
5211
5212(define-public ruby-test-construct
5213 (let ((commit "43933e84e63bba2b44bc020d8c8fb78ce8597ac3")
5214 (revision "0"))
5215 (package
5216 (name "ruby-test-construct")
5217 (version (git-version "2.0.2" revision commit))
5218 (source
5219 (origin
5220 (method git-fetch)
5221 (uri (git-reference
5222 (url "https://github.com/bhb/test_construct")
5223 (commit commit)))
5224 (file-name (git-file-name name version))
5225 (sha256
5226 (base32 "0gif8sap3npvsn4jrppr16jqig8icafk60p74ankhjwrjycccfza"))))
5227 (build-system ruby-build-system)
5228 (native-inputs
5229 (list bundler ruby-mocha ruby-rspec))
5230 (synopsis "Creates temporary files and directories for testing")
5231 (description
5232 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
5233temporary files and directories during tests.")
5234 (home-page "https://github.com/bhb/test_construct")
5235 (license license:expat))))
5236
5237(define-public ruby-test-unit
5238 (package
5239 (name "ruby-test-unit")
5240 (version "3.7.8")
5241 (source (origin
5242 (method git-fetch) ;for tests
5243 (uri (git-reference
5244 (url "https://github.com/test-unit/test-unit")
5245 (commit version)))
5246 (file-name (git-file-name name version))
5247 (sha256
5248 (base32
5249 "0a5p6l8y6gbrsm4wfjnl6h3a944n8w875znf6n3k37d997fllxia"))))
5250 (build-system ruby-build-system)
5251 (arguments
5252 (list
5253 #:phases
5254 #~(modify-phases %standard-phases
5255 ;; This avoids requiring extra dependencies in Rakefile.
5256 (replace 'check
5257 (lambda* (#:key tests? #:allow-other-keys)
5258 (when tests?
5259 (invoke "ruby" "test/run.rb")))))))
5260 (propagated-inputs
5261 (list ruby-power-assert))
5262 (synopsis "Unit testing framework for Ruby")
5263 (description "@code{Test::Unit} is unit testing framework for Ruby, based
5264on xUnit principles. These were originally designed by Kent Beck, creator of
5265extreme programming software development methodology, for Smalltalk's SUnit.
5266It allows writing tests, checking results and automated testing in Ruby.")
5267 (home-page "https://test-unit.github.io/")
5268 (license (list license:psfl license:ruby))))
5269
5270(define-public ruby-test-unit-ruby-core
5271 (package
5272 (name "ruby-test-unit-ruby-core")
5273 (version "1.0.5")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri (rubygems-uri "test-unit-ruby-core" version))
5278 (sha256
5279 (base32 "1i7fa4hlj6xiqvjaikagwrmiyc21jzyswvd4grjbfqysziwsxygc"))))
5280 (build-system ruby-build-system)
5281 (arguments
5282 (list #:tests? #f)) ; contains no tests
5283 (synopsis "Additional test assertions for Ruby standard libraries")
5284 (description "This package provides additional test assertions for Ruby
5285standard libraries.")
5286 (home-page "https://github.com/ruby/test-unit-ruby-core")
5287 (license license:ruby)))
5288
5289(define-public ruby-mapping
5290 (package
5291 (name "ruby-mapping")
5292 (version "1.1.3")
5293 (source (origin
5294 (method git-fetch) ;for tests
5295 (uri (git-reference
5296 (url "https://github.com/ioquatix/mapping")
5297 (commit (string-append "v" version))))
5298 (file-name (git-file-name name version))
5299 (sha256
5300 (base32
5301 "0ydvn5lfyhzc4qbcyag0vx6ah8zl99h2ailj3025wgj5pz4cfmnb"))))
5302 (build-system ruby-build-system)
5303 (arguments
5304 (list
5305 #:phases
5306 #~(modify-phases %standard-phases
5307 (add-before 'extract-gemspec 'remove-certs
5308 (lambda _
5309 (substitute* "mapping.gemspec"
5310 (("spec\\.signing_key .*")
5311 ""))))
5312 (replace 'check
5313 (lambda* (#:key tests? #:allow-other-keys)
5314 (delete-file "config/sus.rb") ;remove covored gem
5315 (invoke "sus"))))))
5316 (native-inputs (list ruby-sus))
5317 (synopsis "Map model objects based on their class to a given output model")
5318 (description "The @code{mapping} gem maps model objects based on their
5319class to a given output model. It is useful for versioning external
5320interfaces (e.g. JSON APIs) or processing structured data from one format to
5321another.")
5322 (home-page "https://github.com/ioquatix/mapping")
5323 (license license:expat)))
5324
5325(define-public ruby-markaby
5326 (package
5327 (name "ruby-markaby")
5328 (version "0.9.4")
5329 (source
5330 (origin
5331 (method url-fetch)
5332 (uri (rubygems-uri "markaby" version))
5333 (sha256
5334 (base32
5335 "1vizqpa9pks5nlqj0jjx2d1q6f9vfmjjbb774v1kp591pq5nhmcm"))))
5336 (build-system ruby-build-system)
5337 (arguments
5338 (list
5339 #:phases
5340 #~(modify-phases %standard-phases
5341 ;; Run rspec manually without using the Rakefile, as the versions of
5342 ;; Rake and RSpec 2 are incompatible:
5343 ;;
5344 ;; NoMethodError: undefined method `last_comment'
5345 (replace 'check
5346 (lambda* (#:key tests? #:allow-other-keys)
5347 ;; Skip some broken tests, this should be redundant with the
5348 ;; next release
5349 (delete-file "spec/markaby/markaby_test_unit_spec.rb")
5350 (substitute* "spec/markaby/markaby_spec.rb"
5351 (("generated.should == str")
5352 "# Test broken: generated.should == str"))
5353
5354 (when tests?
5355 (invoke "rspec")))))))
5356 (propagated-inputs
5357 (list ruby-builder))
5358 (native-inputs
5359 (list bundler ruby-rspec-2))
5360 (synopsis "Write HTML pages in pure Ruby")
5361 (description
5362 "Markaby allows writing HTML packages in pure Ruby. This is similar to
5363the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
5364mixture of HTML and additional ERB syntax.")
5365 (home-page "https://markaby.github.io/")
5366 (license license:expat)))
5367
5368(define-public ruby-maruku
5369 (package
5370 (name "ruby-maruku")
5371 (version "0.7.3")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 (uri (rubygems-uri "maruku" version))
5376 (sha256
5377 (base32
5378 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
5379 (build-system ruby-build-system)
5380 (arguments
5381 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
5382 #:tests? #f
5383 #:phases
5384 (modify-phases %standard-phases
5385 (replace 'check
5386 (lambda* (#:key tests? #:allow-other-keys)
5387 (when tests?
5388 (invoke "rspec")))))))
5389 (native-inputs
5390 (list ruby-rspec ruby-simplecov ruby-nokogiri-diff))
5391 (synopsis "Markdown interpreter in Ruby")
5392 (description
5393 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
5394HTML, and PDF through LaTeX.")
5395 (home-page "https://github.com/bhollis/maruku")
5396 (license license:expat)))
5397
5398(define-public ruby-metaclass
5399 (package
5400 (name "ruby-metaclass")
5401 (version "0.0.4")
5402 (source (origin
5403 (method url-fetch)
5404 (uri (rubygems-uri "metaclass" version))
5405 (sha256
5406 (base32
5407 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
5408 (build-system ruby-build-system)
5409 (arguments
5410 `(#:phases
5411 (modify-phases %standard-phases
5412 (add-after 'unpack 'add-test-unit-to-search-path
5413 (lambda* (#:key inputs #:allow-other-keys)
5414 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
5415 (substitute* "Rakefile"
5416 (("t\\.libs << \"test\"" line)
5417 (string-append line "; t.libs << \""
5418 test-unit "/lib/ruby/vendor_ruby"
5419 "/gems/test-unit-"
5420 ,(package-version ruby-test-unit)
5421 "/lib\"")))))))))
5422 (native-inputs
5423 (list bundler ruby-test-unit))
5424 (synopsis "Ruby library adding metaclass method to all objects")
5425 (description
5426 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
5427objects.")
5428 (home-page "https://github.com/floehopper/metaclass")
5429 (license license:expat)))
5430
5431(define-public ruby-mkmf-lite
5432 (package
5433 (name "ruby-mkmf-lite")
5434 (version "0.5.2")
5435 (source (origin
5436 (method url-fetch)
5437 (uri (rubygems-uri "mkmf-lite" version))
5438 (sha256
5439 (base32
5440 "0rqa5kzswhqkj7r9mqrqz4mjd2vdxsblgybb52gj3mwr1gwvl4c5"))))
5441 (build-system ruby-build-system)
5442 (arguments
5443 (list
5444 #:phases
5445 #~(modify-phases %standard-phases
5446 ;; Avoid rubocop dependency
5447 (replace 'check
5448 (lambda* (#:key tests? #:allow-other-keys)
5449 (when tests?
5450 (invoke "rspec")))))))
5451 (propagated-inputs
5452 (list ruby-ptools))
5453 (native-inputs
5454 (list ruby-rspec))
5455 (synopsis "Lightweight alternative to @code{mkmf}")
5456 (description
5457 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
5458for use as a library. It does not create packages, builds, or log files of
5459any kind. Instead, it provides mixin methods that you can use in FFI or tests
5460to check for the presence of header files, constants, and so on.")
5461 (home-page "https://github.com/djberg96/mkmf-lite")
5462 (license license:asl2.0)))
5463
5464(define-public ruby-msgpack
5465 (package
5466 (name "ruby-msgpack")
5467 (version "1.8.4")
5468 (source (origin
5469 (method git-fetch) ;for tests
5470 (uri (git-reference
5471 (url "https://github.com/msgpack/msgpack-ruby")
5472 (commit (string-append "v" version))))
5473 (file-name (git-file-name name version))
5474 (sha256
5475 (base32
5476 "1cbv9xkfgsvzygmhfihfbb939wgvzkqdl7vsb6y1alhqwbk6n4jq"))))
5477 (build-system ruby-build-system)
5478 (arguments (list #:test-target "spec"))
5479 (native-inputs
5480 (list ruby-rake-compiler
5481 ruby-ruby-memcheck
5482 ruby-rspec
5483 ruby-yard))
5484 (synopsis "Efficient object serialization library for Ruby")
5485 (description "MessagePack is a binary-based efficient object serialization
5486library. It enables to exchange structured objects between many languages
5487like JSON. Unlike JSON, it is very fast and small.")
5488 (home-page "https://msgpack.org/")
5489 (license license:asl2.0)))
5490
5491(define-public ruby-mspec
5492 (package
5493 (name "ruby-mspec")
5494 (version "1.9.1")
5495 (source
5496 (origin
5497 (method url-fetch)
5498 (uri (rubygems-uri "mspec" version))
5499 (sha256
5500 (base32
5501 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
5502 (build-system ruby-build-system)
5503 (arguments
5504 '(;; TODO: 3 test failures
5505 ;; ./spec/mocks/mock_spec.rb:82
5506 ;; ./spec/utils/name_map_spec.rb:151
5507 ;; ./spec/utils/name_map_spec.rb:155
5508 #:tests? #f
5509 #:phases
5510 (modify-phases %standard-phases
5511 (add-after 'extract-gemspec 'change-dependency-constraints
5512 (lambda _
5513 (substitute* "mspec.gemspec"
5514 (("rake.*") "rake>)\n")
5515 (("rspec.*") "rspec>)\n"))))
5516 (replace 'check
5517 (lambda* (#:key tests? #:allow-other-keys)
5518 (when tests?
5519 (invoke "rspec" "spec")))))))
5520 (native-inputs
5521 (list bundler ruby-rake ruby-rspec))
5522 (synopsis "MSpec is a specialized framework for RubySpec")
5523 (description
5524 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
5525for basic features. MSpec contains additional features that assist in writing
5526specs for Ruby implementations in ruby/spec.")
5527 (home-page "http://rubyspec.org")
5528 (license license:expat)))
5529
5530(define-public ruby-mysql2
5531 (package
5532 (name "ruby-mysql2")
5533 (version "0.5.6")
5534 (source
5535 (origin
5536 (method git-fetch)
5537 (uri (git-reference
5538 (url "https://github.com/brianmario/mysql2")
5539 (commit version)))
5540 (file-name (git-file-name name version))
5541 (sha256
5542 (base32
5543 "0m68qykz94l2frqc05nfhkls7rmmq8nss2xajz8j8p8n7xahhscb"))))
5544 (build-system ruby-build-system)
5545 (arguments
5546 '(;; TODO: Tests require a running MySQL/MariaDB service
5547 #:tests? #f
5548 #:phases
5549 (modify-phases %standard-phases
5550 (replace 'replace-git-ls-files
5551 (lambda _
5552 (substitute* "mysql2.gemspec"
5553 (("git ls-files .*`") "find . -type f |sort`"))))
5554 (add-before 'install 'set-MAKEFLAGS
5555 (lambda* (#:key outputs #:allow-other-keys)
5556 (setenv "MAKEFLAGS"
5557 (string-append
5558 "V=1 "
5559 "prefix=" (assoc-ref outputs "out")))))
5560 ;; Move the 'check phase to after 'install, as then you can test
5561 ;; using the installed mysql2 gem in the store.
5562 (delete 'check)
5563 (add-after 'install 'check
5564 (lambda* (#:key outputs tests? #:allow-other-keys)
5565 (setenv "GEM_PATH"
5566 (string-append
5567 (getenv "GEM_PATH")
5568 ":"
5569 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
5570 (when tests?
5571 (invoke "rspec")))))))
5572 (inputs
5573 `(("mariadb-dev" ,mariadb "dev")
5574 ("zlib" ,zlib)))
5575 (native-inputs
5576 (list ruby-rspec ruby-rake-compiler))
5577 (synopsis "MySQL library for Ruby, binding to libmysql")
5578 (description
5579 "This package provides a simple, fast MySQL library for Ruby, binding to
5580libmysql.")
5581 (home-page "https://github.com/brianmario/mysql2")
5582 (license license:expat)))
5583
5584(define-public ruby-blankslate
5585 (package
5586 (name "ruby-blankslate")
5587 (version "3.1.3")
5588 (source (origin
5589 (method url-fetch)
5590 (uri (rubygems-uri "blankslate" version))
5591 (sha256
5592 (base32
5593 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
5594 (build-system ruby-build-system)
5595 (arguments
5596 `(#:phases
5597 (modify-phases %standard-phases
5598 (replace 'check
5599 (lambda _ (invoke "rspec" "spec/"))))))
5600 (native-inputs
5601 (list bundler ruby-rspec))
5602 (synopsis "Abstract base class with no predefined methods")
5603 (description
5604 "BlankSlate provides an abstract base class with no predefined
5605methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
5606as a base class when writing classes that depend upon
5607@code{method_missing} (e.g. dynamic proxies).")
5608 (home-page "https://github.com/masover/blankslate")
5609 (license license:expat)))
5610
5611(define-public ruby-bond
5612 (package
5613 (name "ruby-bond")
5614 (version "0.5.1")
5615 (source
5616 (origin
5617 (method url-fetch)
5618 (uri (rubygems-uri "bond" version))
5619 (sha256
5620 (base32
5621 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
5622 (build-system ruby-build-system)
5623 (arguments
5624 ;; The test suite fails (see:
5625 ;; https://github.com/cldwalker/bond/issues/46).
5626 `(#:tests? #f))
5627 (native-inputs
5628 (list ruby-bacon ruby-bacon-bits ruby-mocha-on-bacon))
5629 (synopsis "Bond can provide custom autocompletion for arguments, methods
5630and more")
5631 (description
5632 "Bond can autocomplete argument(s) to methods, uniquely completing per
5633module, per method and per argument. Bond provides a configuration system and
5634a DSL for creating custom completions and completion rules. Bond can also
5635load completions that ship with gems. Bond is able to offer more than irb's
5636completion since it uses the full line of input when completing as opposed to
5637irb's last-word approach.")
5638 (home-page "http://tagaholic.me/bond/")
5639 (license license:expat)))
5640
5641(define-public ruby-idn-ruby
5642 (package
5643 (name "ruby-idn-ruby")
5644 (version "0.1.0")
5645 (source
5646 (origin
5647 (method url-fetch)
5648 (uri (rubygems-uri "idn-ruby" version))
5649 (sha256
5650 (base32
5651 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
5652 (build-system ruby-build-system)
5653 (arguments
5654 '(#:phases
5655 (modify-phases %standard-phases
5656 (delete 'check)
5657 (add-after 'install 'check
5658 (lambda* (#:key tests? outputs #:allow-other-keys)
5659 (when tests?
5660 (let* ((gem-file (cadr (find-files "." "\\.gem")))
5661 (name-and-version (basename gem-file ".gem")))
5662 (apply invoke
5663 "ruby" "--verbose"
5664 (string-append "-I"
5665 (assoc-ref outputs "out")
5666 "/lib/ruby/vendor_ruby/gems/"
5667 name-and-version
5668 "/lib")
5669 (find-files "./test" ".*\\.rb")))))))))
5670 (inputs
5671 (list libidn))
5672 (synopsis "Ruby Bindings for the GNU LibIDN library")
5673 (description
5674 "Ruby Bindings for the GNU LibIDN library, an implementation of the
5675Stringprep, Punycode and IDNA specifications. These are used to encode and
5676decode internationalized domain + names according to the IDNA2003
5677specifications.
5678
5679Included are the most important parts of the Stringprep, Punycode and IDNA
5680APIs like performing Stringprep processings, encoding to and decoding from
5681Punycode strings and converting entire domain names to and from the ACE
5682encoded form.")
5683 (home-page "https://github.com/deepfryed/idn-ruby")
5684 (license license:asl2.0)))
5685
5686(define-public ruby-insist
5687 (package
5688 (name "ruby-insist")
5689 (version "1.0.0")
5690 (source
5691 (origin
5692 (method url-fetch)
5693 (uri (rubygems-uri "insist" version))
5694 (sha256
5695 (base32 "0bw3bdwns14mapbgb8cbjmr0amvwz8y72gyclq04xp43wpp5jrvg"))))
5696 (build-system ruby-build-system)
5697 (arguments
5698 (list
5699 #:phases
5700 #~(modify-phases %standard-phases
5701 (add-after 'unpack 'patch-minitest
5702 (lambda _
5703 (substitute* "test/testing.rb"
5704 (("MiniTest")
5705 "Minitest"))))
5706 (replace 'check
5707 (lambda* (#:key tests? #:allow-other-keys)
5708 (when tests?
5709 (invoke "ruby" "test/testing.rb")))))))
5710 (synopsis "Testing tool for Ruby")
5711 (description
5712 "This package provides a simple block-driven assertion
5713library for both testing and for production code that attempts to make test
5714definitions more readable.")
5715 (home-page "https://github.com/jordansissel/ruby-insist/")
5716 (license license:asl2.0)))
5717
5718(define-public ruby-introspection
5719 (package
5720 (name "ruby-introspection")
5721 (version "0.0.4")
5722 (source (origin
5723 (method url-fetch)
5724 (uri (rubygems-uri "introspection" version))
5725 (sha256
5726 (base32
5727 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
5728 (build-system ruby-build-system)
5729 (propagated-inputs
5730 (list ruby-metaclass))
5731 (native-inputs
5732 (list bundler
5733 ruby-blankslate))
5734 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
5735 (description
5736 "Introspection provides tools to inspect the hierarchy of method
5737definitions on a Ruby object.")
5738 (home-page "https://github.com/floehopper/introspection")
5739 (license license:expat)))
5740
5741(define-public ruby-redcarpet
5742 (package
5743 (name "ruby-redcarpet")
5744 (version "3.6.1")
5745 (source (origin
5746 (method git-fetch) ;for tests
5747 (uri (git-reference
5748 (url "https://github.com/vmg/redcarpet")
5749 (commit (string-append "v" version))))
5750 (file-name (git-file-name name version))
5751 (sha256
5752 (base32
5753 "0xb0lqpyrkhb078cwqng67szfa31vlhxsazz3nym0na6dgdj5s3r"))))
5754 (build-system ruby-build-system)
5755 (native-inputs
5756 (list ruby-test-unit ruby-rake-compiler perl tidy-html))
5757 (synopsis "Extensible Markdown to (X)HTML converter")
5758 (description
5759 "Redcarpet is an extensible Ruby library for Markdown processing and
5760conversion to (X)HTML.")
5761 (home-page "https://github.com/vmg/redcarpet")
5762 (license license:expat)))
5763
5764(define-public ruby-reline
5765 (package
5766 (name "ruby-reline")
5767 (version "0.3.3")
5768 (source (origin
5769 (method git-fetch) ;for tests
5770 (uri (git-reference
5771 (url "https://github.com/ruby/reline")
5772 (commit (string-append "v" version))))
5773 (file-name (git-file-name name version))
5774 (sha256
5775 (base32
5776 "1papa4f4prjml9qk6yydi4k5a4zgbzmxmbhd8fz9kfg1i34s35cw"))))
5777 (build-system ruby-build-system)
5778 (propagated-inputs (list ruby-io-console))
5779 (synopsis "GNU Readline or Editline implementation in Ruby")
5780 (description "Reline is a pure Ruby alternative GNU Readline or Editline
5781implementation.")
5782 (home-page "https://github.com/ruby/reline")
5783 (license (list license:bsd-2 license:ruby)))) ;dual license
5784
5785(define-public ruby-rerun
5786 (package
5787 (name "ruby-rerun")
5788 (version "0.13.0")
5789 (source
5790 (origin
5791 (method url-fetch)
5792 (uri (rubygems-uri "rerun" version))
5793 (sha256
5794 (base32
5795 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
5796 (build-system ruby-build-system)
5797 (arguments
5798 '(#:tests? #f)) ; No included tests
5799 (propagated-inputs
5800 (list ruby-listen))
5801 (synopsis "Run a process, and restart when some monitored files change")
5802 (description
5803 "Rerun is a tool to launch programs, then monitor the file system, and
5804restart the program when any of the monitored files change. It's written in
5805Ruby, but can be used for all programs.")
5806 (home-page "https://github.com/alexch/rerun/")
5807 (license license:expat)))
5808
5809(define-public ruby-maxitest
5810 (package
5811 (name "ruby-maxitest")
5812 (version "6.0.0")
5813 (home-page "https://github.com/grosser/maxitest")
5814 (source (origin
5815 ;; Pull from git because the gem does not contain tests.
5816 (method git-fetch)
5817 (uri (git-reference
5818 (url home-page)
5819 (commit (string-append "v" version))))
5820 (file-name (git-file-name name version))
5821 (sha256
5822 (base32
5823 "08wwcjlq0gnzfpmf9jxs28x31d62xvx0gbvwrfr923mcn30myxrd"))))
5824 (build-system ruby-build-system)
5825 (arguments
5826 (list
5827 #:test-target "default"
5828 #:phases
5829 #~(modify-phases %standard-phases
5830 ;; Warnings make 2 tests fail. Add mutex-m in Gemfile to avoid them.
5831 (add-after 'unpack 'add-mutex-m
5832 (lambda _
5833 (substitute* "Gemfile"
5834 (("^gem \"bump\".*" all)
5835 (string-append all "gem \"mutex_m\"\n")))))
5836 (replace 'replace-git-ls-files
5837 (lambda _
5838 (substitute* "maxitest.gemspec"
5839 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
5840 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))))
5841 (add-before 'check 'remove-version-constraints
5842 (lambda _
5843 ;; Don't use specific versions of dependencies, instead
5844 ;; take whatever is available in Guix.
5845 (delete-file "Gemfile.lock")))
5846 (add-before 'check 'add-mtest-on-PATH
5847 (lambda _
5848 ;; Tests use 'mtest' which is not automatically added on
5849 ;; PATH.
5850 (setenv "PATH" (string-append (getcwd) "/bin:"
5851 (getenv "PATH"))))))))
5852 (native-inputs
5853 (list procps
5854 ruby-bump
5855 ruby-mutex-m
5856 ruby-rspec
5857 ruby-wwtd))
5858 (propagated-inputs
5859 (list ruby-minitest))
5860 (synopsis "Minitest with extra features")
5861 (description
5862 "Maxitest is a wrapper around Minitest with extra functionality such
5863as timeouts, an @command{mtest} executable that can run tests by line
5864number, support for interrupted tests, better backtraces, and more.")
5865 (license license:expat)))
5866
5867(define-public ruby-mocha
5868 (package
5869 (name "ruby-mocha")
5870 (version "3.1.0")
5871 (source (origin
5872 (method git-fetch) ;for tests
5873 (uri (git-reference
5874 (url "https://github.com/freerange/mocha")
5875 (commit (string-append "v" version))))
5876 (file-name (git-file-name name version))
5877 (sha256
5878 (base32
5879 "0qk47g498l6i2mdbkxvn4d82r8ka6l2v0ln4yj7r8dc9bgh1pjj1"))))
5880 (build-system ruby-build-system)
5881 (propagated-inputs
5882 (list ruby-ruby2-keywords))
5883 (native-inputs
5884 (list ruby-introspection))
5885 (synopsis "Mocking and stubbing library for Ruby")
5886 (description
5887 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
5888allows mocking and stubbing of methods on real (non-mock) classes.")
5889 (home-page "https://mocha.jamesmead.org/")
5890 ;; Mocha can be used with either license at the users choice.
5891 (license (list license:expat license:ruby))))
5892
5893(define-public ruby-mocha-on-bacon
5894 (package
5895 (name "ruby-mocha-on-bacon")
5896 (version "0.2.3")
5897 (source
5898 (origin
5899 (method url-fetch)
5900 (uri (rubygems-uri "mocha-on-bacon" version))
5901 (sha256
5902 (base32
5903 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
5904 (build-system ruby-build-system)
5905 (arguments
5906 ;; rubygems.org release missing tests
5907 '(#:tests? #f))
5908 (propagated-inputs (list ruby-mocha))
5909 (synopsis "Mocha adapter for Bacon")
5910 (description
5911 "This package provides a Mocha adapter for Bacon, allowing you to use the
5912Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
5913 (home-page
5914 "https://github.com/alloy/mocha-on-bacon")
5915 (license license:expat)))
5916
5917(define-public ruby-net-ssh
5918 (package
5919 (name "ruby-net-ssh")
5920 (version "7.1.0")
5921 (source (origin
5922 (method git-fetch) ;for tests
5923 (uri (git-reference
5924 (url "https://github.com/net-ssh/net-ssh")
5925 (commit (string-append "v" version))))
5926 (file-name (git-file-name name version))
5927 (sha256
5928 (base32
5929 "1dkbyzpl31jygnnva5sa754vk42q1fih4qz5ipqw5gqiafrrlb91"))))
5930 (build-system ruby-build-system)
5931 (arguments
5932 (list
5933 #:phases
5934 #~(modify-phases %standard-phases
5935 (add-before 'check 'disable-failing-tests
5936 (lambda _
5937 (substitute* "test/transport/test_algorithms.rb"
5938 (("test_key_exchange_when_server_does_not_support_preferred_kex_should_fallback_to_secondary"
5939 test)
5940 (string-append test
5941 "; skip 'requires older mocha gem, which is incompatible with Ruby 3.4+'"))))))))
5942 (native-inputs
5943 (list bundler
5944 ruby-bcrypt-pbkdf
5945 ruby-ed25519
5946 ruby-mocha
5947 ruby-rbnacl
5948 ruby-test-unit
5949 ruby-x25519))
5950 (synopsis "Ruby implementation of the SSH2 client protocol")
5951 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
5952client protocol. It allows you to write programs that invoke and interact
5953with processes on remote servers, via SSH2.")
5954 (home-page "https://github.com/net-ssh/net-ssh")
5955 (license license:expat)))
5956
5957(define-public ruby-net-scp
5958 (package
5959 (name "ruby-net-scp")
5960 (version "4.1.0")
5961 (source
5962 (origin
5963 (method git-fetch)
5964 (uri (git-reference
5965 (url "https://github.com/net-ssh/net-scp")
5966 (commit (string-append "v" version))))
5967 (file-name (git-file-name name version))
5968 (sha256
5969 (base32 "0v512gbsapdwbdsm8vxn1mz521gbab71r2bx5khccvjgb3rbw8fp"))))
5970 (build-system ruby-build-system)
5971 (native-inputs
5972 (list bundler ruby-test-unit ruby-mocha))
5973 (propagated-inputs
5974 (list ruby-net-ssh))
5975 (synopsis "Pure-Ruby SCP client library")
5976 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
5977client protocol.")
5978 (home-page "https://github.com/net-ssh/net-scp")
5979 (license license:expat)))
5980
5981(define-public ruby-net-sftp
5982 (package
5983 (name "ruby-net-sftp")
5984 (version "4.0.0")
5985 (source (origin
5986 (method url-fetch)
5987 (uri (rubygems-uri "net-sftp" version))
5988 (sha256
5989 (base32
5990 "0r33aa2d61hv1psm0l0mm6ik3ycsnq8symv7h84kpyf2b7493fv5"))))
5991 (build-system ruby-build-system)
5992 (propagated-inputs (list ruby-net-ssh))
5993 (synopsis "Pure Ruby implementation of the SFTP client protocol")
5994 (description
5995 "@code{Net::SFTP} is a pure Ruby implementation of the SFTP
5996protocol (specifically, versions 1 through 6 of the SFTP protocol). Note that
5997this is the “Secure File Transfer Protocol”, typically run over an SSH
5998connection, and has nothing to do with the FTP protocol.")
5999 (home-page "https://github.com/net-ssh/net-sftp")
6000 (license license:expat)))
6001
6002(define-public ruby-minima
6003 (package
6004 (name "ruby-minima")
6005 (version "2.5.1")
6006 (source (origin
6007 (method url-fetch)
6008 (uri (rubygems-uri "minima" version))
6009 (sha256
6010 (base32
6011 "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"))))
6012 (arguments
6013 (list #:phases #~(modify-phases %standard-phases
6014 (replace 'check
6015 (lambda* (#:key tests? #:allow-other-keys)
6016 (when tests?
6017 (invoke "jekyll" "build"))
6018 ;; Without the following, an attempt to remove
6019 ;; minima-<version>.gem is made during installation,
6020 ;; which will fail.
6021 (delete-file #$(string-append "_site/minima-"
6022 version ".gem")))))))
6023 (build-system ruby-build-system)
6024 (propagated-inputs (list jekyll ruby-jekyll-feed ruby-jekyll-seo-tag))
6025 (synopsis "Beautiful, minimal theme for Jekyll")
6026 (description
6027 "Minima is a one-size-fits-all Jekyll theme for writers. It's Jekyll's
6028default (and first) theme. It's what you get when you run @code{jekyll new}.")
6029 (home-page "https://github.com/jekyll/minima")
6030 (license license:expat)))
6031
6032(define-public ruby-minitest-around
6033 (package
6034 (name "ruby-minitest-around")
6035 (version "0.5.0")
6036 (source
6037 (origin
6038 (method url-fetch)
6039 (uri (rubygems-uri "minitest-around" version))
6040 (sha256
6041 (base32
6042 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
6043 (build-system ruby-build-system)
6044 (arguments
6045 '(#:phases
6046 (modify-phases %standard-phases
6047 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
6048 (lambda _
6049 (substitute* "minitest-around.gemspec"
6050 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n")))))))
6051 (propagated-inputs
6052 (list ruby-minitest))
6053 (native-inputs
6054 (list bundler ruby-cucumber ruby-bump ruby-test-construct))
6055 (synopsis "Run code around tests in Minitest")
6056 (description
6057 "This library provides a way to run code around tests in Minitest,
6058written using either the unit test or spec style.")
6059 (home-page "https://github.com/splattael/minitest-around")
6060 (license license:expat)))
6061
6062(define-public ruby-minitest-retry
6063 (package
6064 (name "ruby-minitest-retry")
6065 (version "0.2.2")
6066 (source (origin
6067 (method url-fetch)
6068 (uri (rubygems-uri "minitest-retry" version))
6069 (sha256
6070 (base32
6071 "1c1zq0b1a9y0hbqphq4ybijnjldlis1g6kyhx92q2ynnqfmzhfga"))))
6072 (build-system ruby-build-system)
6073 (propagated-inputs (list ruby-minitest))
6074 (synopsis "Minitest extension to re-run failing tests")
6075 (description "This package provides the @code{Minitest::Retry} class,
6076which extends Minitest to allow retrying tests when they fail.")
6077 (home-page "https://github.com/y-yagi/minitest-retry")
6078 (license license:expat)))
6079
6080(define-public ruby-minitest-sprint
6081 (package
6082 (name "ruby-minitest-sprint")
6083 (version "1.1.0")
6084 (source (origin
6085 (method url-fetch)
6086 (uri (rubygems-uri "minitest-sprint" version))
6087 (sha256
6088 (base32
6089 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
6090 (build-system ruby-build-system)
6091 (native-inputs
6092 (list ruby-hoe ruby-minitest))
6093 (synopsis "Fast test suite runner for minitest")
6094 (description "Minitest-sprint is a test runner for minitest that makes it
6095easier to re-run individual failing tests.")
6096 (home-page "https://github.com/seattlerb/minitest-sprint")
6097 (license license:expat)))
6098
6099(define-public ruby-minitest-stub-const
6100 ;; XXX: Minitest update unreleased.
6101 (let ((commit "dbcaa18249e48a4b0efa8b09f01a2b111db800e0")
6102 (revision "0"))
6103 (package
6104 (name "ruby-minitest-stub-const")
6105 (version (git-version "0.6" revision commit)) ;for Rakefile
6106 (source
6107 (origin
6108 (method git-fetch)
6109 (uri (git-reference
6110 (url "https://github.com/adammck/minitest-stub-const")
6111 (commit commit)))
6112 (file-name (git-file-name name version))
6113 (sha256
6114 (base32 "08avrpvk8yj1f6x1m8bcq7gdf08x1zcx9iamjysxnalrpwnw5lh6"))))
6115 (build-system ruby-build-system)
6116 (synopsis "Stub constants for the duration of a block in MiniTest")
6117 (description
6118 "This package provides a MiniTest extension to stub constants for the
6119duration of a block in MiniTest.")
6120 (home-page "https://github.com/adammck/minitest-stub-const")
6121 (license license:expat))))
6122
6123(define-public ruby-minitest-bacon
6124 (package
6125 (name "ruby-minitest-bacon")
6126 (version "1.0.3")
6127 (source (origin
6128 (method url-fetch)
6129 (uri (rubygems-uri "minitest-bacon" version))
6130 (sha256
6131 (base32
6132 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
6133 (build-system ruby-build-system)
6134 (native-inputs
6135 (list ruby-hoe))
6136 (inputs
6137 (list ruby-minitest))
6138 (synopsis "Bacon compatibility library for minitest")
6139 (description "Minitest-bacon extends minitest with bacon-like
6140functionality, making it easier to migrate test suites from bacon to minitest.")
6141 (home-page "https://github.com/seattlerb/minitest-bacon")
6142 (license license:expat)))
6143
6144(define-public ruby-minitest-power-assert
6145 (package
6146 (name "ruby-minitest-power-assert")
6147 (version "0.3.1")
6148 (source (origin
6149 (method url-fetch)
6150 (uri (rubygems-uri "minitest-power_assert" version))
6151 (sha256
6152 (base32
6153 "1dazl6nbxjvvmi5jamrsygkz396s29b7cd841ni6qy4izk8jd9b7"))))
6154 (build-system ruby-build-system)
6155 (propagated-inputs (list ruby-minitest ruby-power-assert))
6156 (synopsis "Power Assert implementation for Minitest")
6157 (description "This gem provides a Power Assert implementation for
6158Minitest. It is inspired by the @code{test-unit-power_assert} gem.")
6159 (home-page "https://github.com/hsbt/minitest-power_assert")
6160 (license license:bsd-2)))
6161
6162(define-public ruby-minitest-profile
6163 (package
6164 (name "ruby-minitest-profile")
6165 (version "0.0.2")
6166 (source (origin
6167 (method url-fetch)
6168 (uri (rubygems-uri "minitest-profile" version))
6169 (sha256
6170 (base32
6171 "13h4nwbq6yv7hsaa7dpj90lry4rc5qqnpzvm9n2s57mm2xi31xfa"))))
6172 (build-system ruby-build-system)
6173 (synopsis "Display the slowest tests in a MiniTest suite")
6174 (description "This package provides a MiniTest plugin for displaying the
6175slowest tests in a minitest suite.")
6176 (home-page "https://github.com/nmeans/minitest-profile")
6177 (license license:expat)))
6178
6179(define-public ruby-minitest-proveit
6180 (package
6181 (name "ruby-minitest-proveit")
6182 (version "1.0.0")
6183 (source (origin
6184 (method url-fetch)
6185 (uri (rubygems-uri "minitest-proveit" version))
6186 (sha256
6187 (base32
6188 "0k1hpr8lgkgygfivgcsnnib7xjlf9ribgpn7yidvb4q0l0q2yfmr"))))
6189 (build-system ruby-build-system)
6190 (native-inputs (list ruby-hoe))
6191 (propagated-inputs (list ruby-minitest))
6192 (synopsis "Assertion-based tests extension for MiniTest")
6193 (description "The @code{minitest-proveit} MiniTest extension ensures all
6194tests to prove success (via at least one assertion) rather than rely on the
6195absence of failure.")
6196 (home-page "https://github.com/seattlerb/minitest-proveit")
6197 (license license:expat)))
6198
6199(define-public ruby-minitest-reporters
6200 (package
6201 (name "ruby-minitest-reporters")
6202 (version "1.7.1")
6203 (source
6204 (origin
6205 (method url-fetch)
6206 (uri (rubygems-uri "minitest-reporters" version))
6207 (sha256
6208 (base32
6209 "0b2na3mr8l712c0fa03r9n43l5qwcgrhc1iywwpw7f4m1hx42q2h"))))
6210 (build-system ruby-build-system)
6211 (arguments
6212 '(#:phases
6213 (modify-phases %standard-phases
6214 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
6215 ;; including it as an input can lead to circular dependencies.
6216 (add-after 'unpack 'remove-rubocop-from-Rakefile
6217 (lambda _
6218 (substitute* "Rakefile"
6219 (("require 'rubocop/rake\\_task'") "")
6220 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))))
6221 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
6222 (lambda _
6223 (substitute* "minitest-reporters.gemspec"
6224 ((".*%q<rubocop>.*") "\n")))))))
6225 (propagated-inputs
6226 (list ruby-ansi ruby-builder ruby-minitest ruby-progressbar))
6227 (native-inputs
6228 (list bundler ruby-maruku))
6229 (synopsis "Enhanced reporting for Minitest tests")
6230 (description
6231 "@code{minitest/reporters} provides a custom Minitest runner to improve
6232how the test state is reported. A number of different reporters are
6233available, including a spec reporter, progress bar reporter, a HTML
6234reporter.")
6235 (home-page "https://github.com/kern/minitest-reporters")
6236 (license license:expat)))
6237
6238(define-public ruby-minitest-rg
6239 (package
6240 (name "ruby-minitest-rg")
6241 (version "5.3.0")
6242 (source
6243 (origin
6244 (method url-fetch)
6245 (uri (rubygems-uri "minitest-rg" version))
6246 (sha256
6247 (base32
6248 "0vwgmk9dnvhlcwxi7j5z150sdqyy3fjs8r8wzx64ig3ivpnb188j"))))
6249 (build-system ruby-build-system)
6250 (arguments
6251 ;; Some tests fail even outside Guix, so disable tests.
6252 ;; https://github.com/blowmage/minitest-rg/issues/12
6253 ;; https://github.com/blowmage/minitest-rg/pull/13
6254 `(#:tests? #f))
6255 (propagated-inputs
6256 (list ruby-minitest))
6257 (synopsis "Coloured output for Minitest")
6258 (description
6259 "@code{minitest-rg} changes the colour of the output from Minitest.")
6260 (home-page "https://blowmage.com/minitest-rg/")
6261 (license license:expat)))
6262
6263(define-public ruby-minitest-global-expectations
6264 (package
6265 (name "ruby-minitest-global-expectations")
6266 (version "1.0.1")
6267 (source
6268 (origin
6269 (method url-fetch)
6270 (uri (rubygems-uri "minitest-global_expectations"
6271 version))
6272 (sha256
6273 (base32
6274 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
6275 (build-system ruby-build-system)
6276 (propagated-inputs
6277 (list ruby-minitest))
6278 (synopsis "Adjust minitest behaviour for calling expectation methods")
6279 (description
6280 "Minitest-global_expectations allows continued use of expectation methods
6281on all objects. Calling expectation methods on all objects was deprecated in
6282minitest 5.12, and is planned to be removed from minitest 6.")
6283 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
6284 (license license:expat)))
6285
6286(define-public ruby-daemons
6287 (package
6288 (name "ruby-daemons")
6289 (version "1.2.5")
6290 (source (origin
6291 (method url-fetch)
6292 (uri (rubygems-uri "daemons" version))
6293 (sha256
6294 (base32
6295 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
6296 (build-system ruby-build-system)
6297 (arguments
6298 `(#:tests? #f)) ; no test suite
6299 (synopsis "Daemonize Ruby programs")
6300 (description "Daemons provides a way to wrap existing Ruby scripts to be
6301run as a daemon and to be controlled by simple start/stop/restart commands.")
6302 (home-page "https://github.com/thuehlinger/daemons")
6303 (license license:expat)))
6304
6305(define-public ruby-dalli
6306 (package
6307 (name "ruby-dalli")
6308 (version "3.2.4")
6309 (source (origin
6310 (method git-fetch) ;for tests
6311 (uri (git-reference
6312 (url "https://github.com/petergoldstein/dalli")
6313 (commit (string-append "v" version))))
6314 (file-name (git-file-name name version))
6315 (sha256
6316 (base32
6317 "1hhqqv1j3zd2y0vr6maaabsflrvkf1x0i6z8n725mhqydp3f9gwp"))))
6318 (build-system ruby-build-system)
6319 ;; Disable tests to avoid a dependency cycle with ruby-activesupport,
6320 ;; through ruby-ruby-prof.
6321 (arguments (list #:tests? #f))
6322 (synopsis "High performance memcached client for Ruby")
6323 (description "Dalli is a high performance pure Ruby client for accessing
6324memcached servers. Dalli supports:
6325
6326@itemize
6327@item Simple and complex memcached configurations
6328@item Fail-over between memcached instances
6329@item Fine-grained control of data serialization and compression
6330@item Thread-safe operation
6331@item SSL/TLS connections to memcached
6332@item SASL authentication.
6333@end itemize
6334
6335The name is a variant of Salvador Dali for his famous painting The Persistence
6336of Memory.")
6337 (home-page "https://github.com/petergoldstein/dalli")
6338 (license license:expat)))
6339
6340(define-public ruby-data_uri
6341 (package
6342 (name "ruby-data_uri")
6343 (version "0.1.0")
6344 (source
6345 (origin
6346 (method url-fetch)
6347 (uri (rubygems-uri "data_uri" version))
6348 (sha256
6349 (base32
6350 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
6351 (build-system ruby-build-system)
6352 (synopsis "URI class for parsing data URIs")
6353 (description
6354 "Data @acronym{URI, universal resource identifier}s allow resources to be
6355embedded inside a URI. The URI::Data class provides support for parsing these
6356URIs using the normal URI.parse method.")
6357 (home-page "https://github.com/dball/data_uri")
6358 (license license:expat)))
6359
6360(define-public ruby-debug
6361 (package
6362 (name "ruby-debug")
6363 (version "1.7.2")
6364 (source (origin
6365 (method url-fetch)
6366 (uri (rubygems-uri "debug" version))
6367 (sha256
6368 (base32
6369 "0x59508j69w9p275gabysv521n210pd3n060gqfgsiqjms1h0ldf"))))
6370 (build-system ruby-build-system)
6371 (arguments (list #:test-target "test_all"))
6372 (propagated-inputs (list ruby-irb ruby-reline))
6373 (synopsis "Debugging functionality for Ruby")
6374 (description "Debugging functionality for Ruby. This is completely
6375rewritten debug.rb which was contained by the ancient Ruby versions. It is
6376included with Ruby itself, but this package is made available so that the
6377latest version can be made available independently from Ruby.")
6378 (home-page "https://github.com/ruby/debug")
6379 (license license:bsd-2)))
6380
6381(define-public ruby-deep-merge
6382 (package
6383 (name "ruby-deep-merge")
6384 (version "1.2.1")
6385 (home-page "https://github.com/danielsdeleo/deep_merge")
6386 ;; The Rubygem source does not contain the gemspec required for tests.
6387 (source (origin
6388 (method git-fetch)
6389 (uri (git-reference (url home-page) (commit version)))
6390 (file-name (git-file-name name version))
6391 (sha256
6392 (base32
6393 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
6394 (build-system ruby-build-system)
6395 (native-inputs
6396 (list ruby-minitest))
6397 (synopsis "Recursively merge hashes")
6398 (description
6399 "Deep Merge is a set of utility functions for @code{Hash}. It permits
6400you to merge elements inside a hash together recursively.")
6401 (license license:expat)))
6402
6403(define-public ruby-delayed-job
6404 (package
6405 (name "ruby-delayed-job")
6406 (version "4.2.0")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (rubygems-uri "delayed_job" version))
6410 (sha256
6411 (base32
6412 "1vqkfxflcxa7zyj8m3dlgqxc2f5xvrw22k482y1kk14hpdl1zp2i"))))
6413 (build-system ruby-build-system)
6414 (arguments
6415 (list #:phases
6416 #~(modify-phases %standard-phases
6417 (add-after 'unpack 'disable-bundler
6418 (lambda _
6419 (substitute* "Rakefile"
6420 (("require 'bundler/setup'") "")
6421 (("Bundler::GemHelper\\.install_tasks") ""))))
6422 (add-after 'unpack 'disable-rubocop
6423 (lambda _
6424 (substitute* "Rakefile"
6425 (("require 'rubocop/rake_task'") "")
6426 (("RuboCop::RakeTask.new") ""))))
6427 (add-after 'extract-gemspec 'remove-dependency-on-actionmailer
6428 (lambda _
6429 (substitute* "spec/helper.rb"
6430 (("require 'action_mailer'") ""))
6431 (substitute* "delayed_job.gemspec"
6432 (("\"spec/performable_mailer_spec.rb\".freeze, ") ""))
6433 (delete-file "spec/performable_mailer_spec.rb"))))))
6434 (native-inputs
6435 (list ruby-activerecord
6436 ruby-rspec
6437 ruby-simplecov
6438 ruby-simplecov-lcov
6439 ruby-zeitwerk
6440 ruby-mini-portile-2))
6441 (propagated-inputs
6442 (list ruby-activesupport))
6443 (synopsis "Asynchronous background tasks execution library")
6444 (description "Delayed_job (or DJ) encapsulates the common pattern of
6445asynchronously executing longer tasks in the background. It is a direct
6446extraction from Shopify where the job table is responsible for a multitude of
6447core tasks.")
6448 (home-page "https://github.com/collectiveidea/delayed_job")
6449 (license license:expat)))
6450
6451(define-public ruby-git
6452 (package
6453 (name "ruby-git")
6454 (version "1.3.0")
6455 (source (origin
6456 (method url-fetch)
6457 (uri (rubygems-uri "git" version))
6458 (sha256
6459 (base32
6460 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
6461 (build-system ruby-build-system)
6462 (arguments
6463 `(#:tests? #f ; no tests
6464 #:phases (modify-phases %standard-phases
6465 (add-after 'install 'patch-git-binary
6466 (lambda* (#:key inputs outputs #:allow-other-keys)
6467 ;; Make the default git binary an absolute path to the
6468 ;; store.
6469 (let ((git (search-input-file inputs "/bin/git"))
6470 (config (string-append
6471 (assoc-ref outputs "out")
6472 "/lib/ruby/vendor_ruby/gems/git-"
6473 ,version "/lib/git/config.rb")))
6474 (substitute* (list config)
6475 (("'git'")
6476 (string-append "'" git "'")))))))))
6477 (inputs
6478 (list git))
6479 (synopsis "Ruby wrappers for Git")
6480 (description "Ruby/Git is a Ruby library that can be used to create, read
6481and manipulate Git repositories by wrapping system calls to the git binary.")
6482 (home-page "https://github.com/schacon/ruby-git")
6483 (license license:expat)))
6484
6485(define-public ruby-hocon
6486 (package
6487 (name "ruby-hocon")
6488 (version "1.4.0")
6489 (home-page "https://github.com/puppetlabs/ruby-hocon")
6490 (source (origin
6491 (method git-fetch)
6492 (uri (git-reference (url home-page) (commit version)))
6493 (file-name (git-file-name name version))
6494 (sha256
6495 (base32
6496 "04wgv0pwrghawnl6qp346z59fvp9v37jymq8p0lsrzxa6nvrykmk"))))
6497 (build-system ruby-build-system)
6498 (arguments
6499 (list
6500 #:phases
6501 #~(modify-phases %standard-phases
6502 (replace 'check
6503 (lambda* (#:key tests? #:allow-other-keys)
6504 (if tests?
6505 (invoke "rspec")
6506 (format #t "test suite not run~%")))))))
6507 (native-inputs
6508 (list bundler ruby-rspec))
6509 (synopsis "HOCON config library")
6510 (description
6511 "This package provides Ruby support for the @acronym{HOCON,
6512Human-Optimized Config Object Notation} configuration file format. It
6513supports parsing and modifying HOCON and JSON files, and rendering parsed
6514objects back to a @code{String}.")
6515 (license license:asl2.0)))
6516
6517(define-public ruby-slop
6518 (package
6519 (name "ruby-slop")
6520 (version "4.10.1")
6521 (source (origin
6522 (method url-fetch)
6523 (uri (rubygems-uri "slop" version))
6524 (sha256
6525 (base32
6526 "1iyrjskgxyn8i1679qwkzns85p909aq77cgx2m4fs5ygzysj4hw4"))))
6527 (build-system ruby-build-system)
6528 (synopsis "Ruby command line option parser")
6529 (description "Slop provides a Ruby domain specific language for gathering
6530options and parsing command line flags.")
6531 (home-page "https://github.com/leejarvis/slop")
6532 (license license:expat)))
6533
6534(define-public ruby-slop-3
6535 (package (inherit ruby-slop)
6536 (version "3.6.0")
6537 (source (origin
6538 (method url-fetch)
6539 (uri (rubygems-uri "slop" version))
6540 (sha256
6541 (base32
6542 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
6543
6544(define-public ruby-multi-xml
6545 (package
6546 (name "ruby-multi-xml")
6547 (version "0.6.0")
6548 (source
6549 (origin
6550 (method url-fetch)
6551 (uri (rubygems-uri "multi_xml" version))
6552 (sha256
6553 (base32
6554 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
6555 (build-system ruby-build-system)
6556 (arguments
6557 '(#:tests? #f)) ; No included tests
6558 (synopsis "Swappable XML backends for Ruby")
6559 (description
6560 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
6561Nokogiri, Ox, or REXML.")
6562 (home-page "https://github.com/sferik/multi_xml")
6563 (license license:expat)))
6564
6565(define-public ruby-multipart-parser
6566 (package
6567 (name "ruby-multipart-parser")
6568 (version "0.1.1")
6569 (source (origin
6570 (method url-fetch)
6571 (uri (rubygems-uri "multipart-parser" version))
6572 (sha256
6573 (base32
6574 "0xb4p475yrfm883h9kn80a021myn17dvs50wpa1djzcmlq7p0882"))))
6575 (build-system ruby-build-system)
6576 (arguments
6577 (list
6578 #:phases #~(modify-phases %standard-phases
6579 (add-after 'unpack 'skip-failing-test
6580 ;; One test fails for unknown reasons (see:
6581 ;; https://github.com/danabr/multipart-parser/issues/7).
6582 (lambda _
6583 (substitute* "test/multipart_parser/reader_test.rb"
6584 (("def test_long" all)
6585 (string-append all "\n return true"))))))))
6586 (synopsis "Parser for multipart MIME messages")
6587 (description "@code{multipart-parser} is a simple parser for multipart
6588MIME messages, written in Ruby, based on felixge/node-formidable's parser. It
6589has the following characteristics:
6590@itemize
6591@item Pure Ruby
6592@item Event-driven API
6593@item Only supports one level of multipart parsing
6594@item Does not perform I/O
6595@item Does not depend on any other library.
6596@end itemize")
6597 (home-page "https://github.com/danabr/multipart-parser")
6598 (license license:expat)))
6599
6600(define-public ruby-multipart-post
6601 (package
6602 (name "ruby-multipart-post")
6603 (version "2.0.0")
6604 (source (origin
6605 (method url-fetch)
6606 (uri (rubygems-uri "multipart-post" version))
6607 (sha256
6608 (base32
6609 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
6610 (build-system ruby-build-system)
6611 (native-inputs
6612 (list bundler))
6613 (synopsis "Multipart POST library for Ruby")
6614 (description "Multipart-Post Adds multipart POST capability to Ruby's
6615net/http library.")
6616 (home-page "https://github.com/nicksieger/multipart-post")
6617 (license license:expat)))
6618
6619(define-public ruby-multi-json
6620 (package
6621 (name "ruby-multi-json")
6622 (version "1.15.0")
6623 (source
6624 (origin
6625 (method git-fetch)
6626 ;; Tests are not distributed at rubygems.org so download from GitHub
6627 ;; instead.
6628 (uri (git-reference
6629 (url "https://github.com/intridea/multi_json")
6630 (commit (string-append "v" version))))
6631 (file-name (git-file-name name version))
6632 (sha256
6633 (base32
6634 "0mkdvy6i00yyksjvnv6znh7wf89j9506qzzjq6bsbmbkyqrszp4d"))))
6635 (build-system ruby-build-system)
6636 (arguments
6637 (list
6638 ;; TODO Tests don't currently work with Ruby 3
6639 #:tests? #f
6640 #:phases
6641 #~(modify-phases %standard-phases
6642 (add-before 'check 'pre-check
6643 (lambda _
6644 ;; As seen in the .travis.yml file.
6645 (setenv "SKIP_ADAPTERS" "gson,jr_jackson,nsjsonserialization"))))))
6646 (native-inputs
6647 (list ruby-rspec ruby-json-pure ruby-oj ruby-yajl-ruby))
6648 (synopsis "Common interface to multiple JSON libraries for Ruby")
6649 (description
6650 "This package provides a common interface to multiple JSON libraries,
6651including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
6652NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
6653 (home-page "https://github.com/intridea/multi_json")
6654 (license license:expat)))
6655
6656(define-public ruby-arr-pm
6657 (package
6658 (name "ruby-arr-pm")
6659 (version "0.0.12")
6660 (source (origin
6661 (method url-fetch)
6662 (uri (rubygems-uri "arr-pm" version))
6663 (sha256
6664 (base32
6665 "0fddw0vwdrr7v3a0lfqbmnd664j48a9psrjd3wh3k4i3flplizzx"))))
6666 (build-system ruby-build-system)
6667 (arguments
6668 (list #:phases
6669 #~(modify-phases %standard-phases
6670 (replace 'check
6671 (lambda* (#:key tests? #:allow-other-keys)
6672 (when tests?
6673 (invoke "rspec")))))))
6674 (native-inputs (list ruby-flores ruby-insist ruby-rspec ruby-stud))
6675 (synopsis "RPM reader/writer library written in Ruby")
6676 (description "This library allows reading and writing RPM packages. It is
6677used by the @command{fpm} tool. It is written in pure Ruby because
6678@code{librpm} is not available on all systems and requires many
6679dependencies.")
6680 (home-page "https://github.com/jordansissel/ruby-arr-pm")
6681 (license license:asl2.0)))
6682
6683(define-public ruby-arel
6684 (package
6685 (name "ruby-arel")
6686 (version "9.0.0")
6687 (source (origin
6688 (method url-fetch)
6689 (uri (rubygems-uri "arel" version))
6690 (sha256
6691 (base32
6692 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
6693 (build-system ruby-build-system)
6694 (arguments '(#:tests? #f)) ; no tests
6695 (home-page "https://github.com/rails/arel")
6696 (synopsis "SQL AST manager for Ruby")
6697 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
6698Ruby. It simplifies the generation of complex SQL queries and adapts to
6699various relational database implementations.")
6700 (license license:expat)))
6701
6702(define-public ruby-minitar
6703 ;; We package from the GitHub source to fix the security issue reported at
6704 ;; https://github.com/halostatue/minitar/issues/16.
6705 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
6706 (package
6707 (name "ruby-minitar")
6708 (version (string-append "0.5.4-1." (string-take commit 8)))
6709 (source
6710 (origin
6711 (method git-fetch)
6712 (uri (git-reference
6713 (url "https://github.com/halostatue/minitar")
6714 (commit commit)))
6715 (file-name (string-append name "-" version "-checkout"))
6716 (sha256
6717 (base32
6718 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
6719 (build-system ruby-build-system)
6720 (arguments
6721 '(#:tests? #f)) ; missing a gemspec
6722 (synopsis "Ruby library and utility for handling tar archives")
6723 (description
6724 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
6725that provides the ability to deal with POSIX tar archive files.")
6726 (home-page "http://www.github.com/atoulme/minitar")
6727 (license (list license:gpl2+ license:ruby)))))
6728
6729(define-public ruby-nokogiri
6730 (package
6731 (name "ruby-nokogiri")
6732 (version "1.18.10")
6733 (source (origin
6734 (method git-fetch)
6735 (uri (git-reference
6736 (url "https://github.com/sparklemotion/nokogiri")
6737 (commit (string-append "v" version))))
6738 (file-name (git-file-name name version))
6739 (sha256
6740 (base32
6741 "1lrng9xbhyw4mkm50wyzab7dyxdwav4q4zyzx9bgilcnaqwc6rbq"))))
6742 (build-system ruby-build-system)
6743 (arguments
6744 (list #:gem-flags #~(list "--" "--use-system-libraries"
6745 (string-append "--with-xml2-include="
6746 #$(this-package-input "libxml2")
6747 "/include/libxml2"))
6748 #:phases #~(modify-phases %standard-phases
6749 (add-after 'install 'delete-mkmf.log
6750 (lambda _
6751 ;; Rubygems installs build log files that embed volatile file
6752 ;; names (see:
6753 ;; https://github.com/rubygems/rubygems/issues/6259).
6754 (for-each delete-file
6755 (find-files #$output "^mkmf\\.log$"))))
6756 (delete 'check)
6757 (add-after 'install 'check
6758 (lambda* (#:key tests? #:allow-other-keys)
6759 (setenv "GEM_PATH" (string-append
6760 (getenv "GEM_PATH") ":"
6761 #$output "/lib/ruby/vendor_ruby"))
6762 (when tests?
6763 (for-each (lambda (file)
6764 (invoke "ruby" "-Itest" file))
6765 (find-files "test" "^test_.*\\.rb"))))))))
6766 (native-inputs (list ruby-hoe ruby-rubyzip))
6767 (inputs (list zlib libxml2 libxslt))
6768 (propagated-inputs (list ruby-mini-portile-2 ruby-pkg-config))
6769 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
6770 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
6771both CSS3 selector and XPath 1.0 support.")
6772 (home-page "https://nokogiri.org/")
6773 (license license:expat)))
6774
6775(define-public ruby-method-source
6776 (package
6777 (name "ruby-method-source")
6778 (version "1.1.0")
6779 (source
6780 (origin
6781 (method url-fetch)
6782 (uri (rubygems-uri "method_source" version))
6783 (sha256
6784 (base32 "1igmc3sq9ay90f8xjvfnswd1dybj1s3fi0dwd53inwsvqk4h24qq"))))
6785 (build-system ruby-build-system)
6786 (arguments
6787 (list
6788 #:ruby ruby-3.3
6789 #:test-target "spec"
6790 #:phases
6791 #~(modify-phases %standard-phases
6792 (add-after 'unpack 'remove-git-ls-files
6793 (lambda* (#:key outputs #:allow-other-keys)
6794 (substitute* "Rakefile"
6795 (("git ls-files")
6796 "find . -type f")))))))
6797 (native-inputs (list ruby-rspec))
6798 (synopsis "Retrieve the source code for Ruby methods")
6799 (description
6800 "Method_source retrieves the source code for Ruby methods.
6801Additionally, it can extract source code from Proc and Lambda objects or just
6802extract comments.")
6803 (home-page "https://github.com/banister/method_source")
6804 (license license:expat)))
6805
6806(define-public ruby-coderay
6807 (package
6808 (name "ruby-coderay")
6809 (version "1.1.2")
6810 (source
6811 (origin
6812 (method url-fetch)
6813 (uri (rubygems-uri "coderay" version))
6814 (sha256
6815 (base32
6816 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
6817 (build-system ruby-build-system)
6818 (arguments
6819 '(#:tests? #f)) ; missing test files
6820 (synopsis "Ruby syntax highlighting library")
6821 (description "Coderay is a Ruby library that provides syntax highlighting
6822for select languages.")
6823 (home-page "http://coderay.rubychan.de")
6824 (license license:expat)))
6825
6826(define-public ruby-cuke-modeler
6827 (package
6828 (name "ruby-cuke-modeler")
6829 (version "3.31.0")
6830 (source (origin
6831 (method git-fetch)
6832 (uri (git-reference
6833 (url "https://github.com/enkessler/cuke_modeler")
6834 (commit (string-append "v" version))))
6835 (file-name (git-file-name name version))
6836 (sha256
6837 (base32
6838 "0g03zz8p4xn8k2yfq0421qn0wfxr459v1fh1xalhgqy6ri93lnbs"))))
6839 (build-system ruby-build-system)
6840 (arguments
6841 (list #:test-target "default"
6842 #:phases
6843 #~(modify-phases %standard-phases
6844 (add-after 'unpack 'improve-reproducibility
6845 (lambda _
6846 (substitute*
6847 "testing/rspec/spec/unit/cuke_modeler_unit_spec.rb"
6848 (("#\\{Time.now.year\\}") ""))))
6849 (add-after 'unpack 'relax-requirements
6850 (lambda _
6851 (substitute* "rakefiles/testing_tasks.rb"
6852 (("=> \\[:clear_old_results\\]") "")
6853 (("'bundle', 'exec', ") "")
6854 (("current_version = .*") "")
6855 (("unsupported_versions\\.include\\?\\(current_version\\)") "false")
6856 (("bundle exec ") ""))
6857 (substitute* "Rakefile"
6858 (("Rainbow.enabled = true") "")
6859 (("require_relative 'rakefiles/documentation_tasks'") "")
6860 (("require_relative 'rakefiles/other_tasks'") "")
6861 (("require_relative 'rakefiles/release_tasks'") "")
6862 (("require_relative 'rakefiles/reporting_tasks'") ""))
6863 (substitute* "environments/rspec_env.rb"
6864 (("require 'simplecov'") ""))
6865 (substitute* "environments/cucumber_env.rb"
6866 (("require 'simplecov'") "")))))))
6867 (native-inputs
6868 (list ruby-childprocess
6869 ruby-cucumber
6870 ruby-rainbow
6871 ruby-rspec))
6872 (propagated-inputs (list ruby-cucumber-gherkin))
6873 (synopsis "Gherkin test suite analysis tool")
6874 (description "CukeModeler facilitates modeling a test suite that is
6875written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
6876providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
6877the @code{cucumber-gherkin} generates when parsing features, as well as
6878providing models for feature files and directories in order to be able to have
6879a fully traversable model tree of a test suite's structure. These models can
6880then be analyzed or manipulated more easily than the underlying AST layer.")
6881 (home-page "https://github.com/enkessler/cuke_modeler")
6882 (license license:expat)))
6883
6884(define-public ruby-parallel-tests
6885 (package
6886 (name "ruby-parallel-tests")
6887 (version "5.7.0")
6888 (home-page "https://github.com/grosser/parallel_tests")
6889 (source (origin
6890 (method git-fetch)
6891 (uri (git-reference
6892 (url home-page)
6893 (commit (string-append "v" version))))
6894 (file-name (string-append name version))
6895 (sha256
6896 (base32
6897 "005vj7j4wz2i15c43aqcxvqchrpa412d4h9mfp6nia0dgd3iwgjy"))))
6898 (build-system ruby-build-system)
6899 (arguments
6900 '(#:test-target "spec" ;avoid rubocop dependency
6901 #:phases (modify-phases %standard-phases
6902 (add-after 'patch-source-shebangs 'patch-shell-invocations
6903 (lambda _
6904 (substitute* '("lib/parallel_tests/tasks.rb"
6905 "spec/parallel_tests/tasks_spec.rb")
6906 (("/bin/sh") (which "sh"))
6907 (("/bin/bash") (which "bash")))))
6908 (add-before 'check 'relax-requirements
6909 (lambda _
6910 ;; Remove hard coded version constraints, instead just
6911 ;; use whatever versions are available in Guix.
6912 (delete-file "Gemfile.lock")
6913 (substitute* "Gemfile"
6914 (("'minitest',.*")
6915 "'minitest'\n")
6916 (("'cucumber',.*")
6917 "'cucumber'\n")
6918 ;; Do not depend on a git-fetched spinach version.
6919 (("gem 'spinach',.*")
6920 "gem 'spinach'\n")
6921 ((".*rubocop.*") ""))))
6922 (add-before 'check 'disable-rails-test
6923 (lambda _
6924 ;; XXX: This test attempts to download and run the test
6925 ;; suites of multiple Rails versions(!) directly.
6926 (delete-file "spec/rails_spec.rb")))
6927 (add-before 'check 'disable-problematic-tests
6928 (lambda _
6929 ;; This test fails, probably because of the newer
6930 ;; Cucumber version used here.
6931 (delete-file "spec/parallel_tests/cucumber/\
6932failure_logger_spec.rb")
6933 ;; This uses Bundler extensively.
6934 (delete-file "spec/integration_spec.rb")))
6935 (add-before 'check 'set-HOME
6936 (lambda _
6937 ;; Some tests check the output of Bundler, and fail when
6938 ;; Bundler warns that /homeless-shelter does not exist.
6939 (setenv "HOME" "/tmp"))))))
6940 (native-inputs
6941 (list ruby-bump
6942 ruby-cucumber
6943 ruby-cuke-modeler
6944 ruby-minitest
6945 ruby-rake
6946 ruby-rspec
6947 ruby-spinach))
6948 (propagated-inputs
6949 (list ruby-parallel))
6950 (synopsis "Run tests in parallel")
6951 (description
6952 "This package can speed up @code{Test::Unit}, @code{RSpec},
6953@code{Cucumber}, and @code{Spinach} tests by running them concurrently
6954across multiple CPU cores.")
6955 (license license:expat)))
6956
6957(define-public ruby-parser
6958 (package
6959 (name "ruby-parser")
6960 (version "3.3.7.0")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (rubygems-uri "parser" version))
6965 (sha256
6966 (base32
6967 "16qi2qhpszm842awxghmsp64yvvawafq96w5jw98irz3f4bh2jbl"))))
6968 (build-system ruby-build-system)
6969 (arguments '(#:tests? #f)) ; tests not included in gem
6970 (native-inputs (list bundler ruby-cliver ruby-simplecov))
6971 (inputs (list ragel))
6972 (propagated-inputs (list ruby-ast ruby-racc))
6973 (synopsis "Ruby parser written in pure Ruby")
6974 (description
6975 "This package provides a Ruby parser written in pure Ruby.")
6976 (home-page "https://github.com/whitequark/parser")
6977 (license license:expat)))
6978
6979(define-public ruby-set
6980 (package
6981 (name "ruby-set")
6982 (version "1.0.3")
6983 (source (origin
6984 (method url-fetch)
6985 (uri (rubygems-uri "set" version))
6986 (sha256
6987 (base32
6988 "07kc057nrkddrybqmlbmgf9x7nsmbc3ni6gy1z6xjx5b838vlj33"))))
6989 (build-system ruby-build-system)
6990 (synopsis
6991 "Ruby class to deal with collections of unordered, unique values")
6992 (description
6993 "This package provides a class to deal with collections of unordered,
6994unique values")
6995 (home-page "https://github.com/ruby/set")
6996 (license license:bsd-2)))
6997
6998(define-public ruby-sexp-processor
6999 (package
7000 (name "ruby-sexp-processor")
7001 (version "4.17.0")
7002 (source
7003 (origin
7004 (method url-fetch)
7005 (uri (rubygems-uri "sexp_processor" version))
7006 (sha256
7007 (base32
7008 "0vzz9mhg4kkdqf179pm30i204h7iskanxrk53j0csf0qrrs4iajd"))))
7009 (build-system ruby-build-system)
7010 (native-inputs
7011 (list ruby-hoe
7012 ruby-minitest
7013 ruby-minitest-proveit))
7014 (synopsis "ParseTree fork which includes generic S-exp processing tools")
7015 (description "The sexp_processor package is derived from ParseTree, but
7016contrary to ParseTree, it includes all the generic S-exp processing tools.
7017Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
7018@code{Environment}")
7019 (home-page "https://github.com/seattlerb/sexp_processor")
7020 (license license:expat)))
7021
7022(define-public ruby-ruby-parser
7023 (package
7024 (name "ruby-ruby-parser")
7025 (version "3.20.2")
7026 (source
7027 (origin
7028 (method url-fetch)
7029 (uri (rubygems-uri "ruby_parser" version))
7030 (sha256
7031 (base32
7032 "0q851n8654wkjrq8jawq8vi5yhr1y9vpyr2vj7cnn3sa4ikg6d3z"))))
7033 (build-system ruby-build-system)
7034 (arguments
7035 (list
7036 #:phases
7037 #~(modify-phases %standard-phases
7038 (add-after 'unpack 'patch
7039 (lambda _
7040 (substitute* "Rakefile"
7041 (("`which bison`")
7042 (string-append "\"" (which "bison") "\""))
7043 (("which unifdef")
7044 (which "unifdef"))))))))
7045 (native-inputs
7046 (list ruby-hoe
7047 ruby-racc
7048 unifdef
7049 bison
7050 ruby-minitest))
7051 (propagated-inputs
7052 (list ruby-sexp-processor))
7053 (home-page "https://github.com/seattlerb/ruby_parser/")
7054 (synopsis "Ruby parser written in pure Ruby")
7055 (description "The ruby_parser (RP) package provides a Ruby parser written
7056in pure Ruby. It outputs S-expressions which can be manipulated and converted
7057back to Ruby via the @code{ruby2ruby} library.")
7058 (license license:expat)))
7059
7060(define-public ruby-ruby-version
7061 (package
7062 (name "ruby-ruby-version")
7063 (version "1.0.3")
7064 (source (origin
7065 (method url-fetch)
7066 (uri (rubygems-uri "ruby_version" version))
7067 (sha256
7068 (base32
7069 "1dfcy4bz7kgmp4i7kvqg2w5l9rsf6vp9hhqqfg4ydds60yazjc2r"))))
7070 (build-system ruby-build-system)
7071 (arguments
7072 (list #:phases
7073 #~(modify-phases %standard-phases
7074 (add-after 'extract-gemspec 'relax-requirements
7075 (lambda _
7076 (delete-file "Gemfile.lock")
7077 (substitute* "ruby_version.gemspec"
7078 (("\"Gemfile.lock\".freeze, ") "")
7079 ;; Allow a newers versions of development dependencies.
7080 (("~>") ">=")))))))
7081 (native-inputs (list ruby-rdoc ruby-rubygems-tasks ruby-rspec))
7082 (synopsis "Ruby class for checking the Ruby version")
7083 (description "This package provides a @code{RubyVersion} class which
7084offers a convenient Domain Specific Language (DSL) for checking for the right
7085Ruby version.")
7086 (home-page "https://github.com/janlelis/ruby_version")
7087 (license license:expat)))
7088
7089(define-public ruby-prawn-manual-builder
7090 (package
7091 (name "ruby-prawn-manual-builder")
7092 (version "0.3.1")
7093 (source
7094 (origin
7095 (method url-fetch)
7096 (uri (rubygems-uri "prawn-manual_builder" version))
7097 (sha256
7098 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
7099 (build-system ruby-build-system)
7100 (arguments
7101 '(#:tests? #f ; no included tests
7102 #:phases
7103 (modify-phases %standard-phases
7104 (add-after 'extract-gemspec 'patch-gemspec
7105 (lambda _
7106 (substitute* ".gemspec"
7107 ;; Loosen the requirement for pdf-inspector
7108 (("~> 1\\.0\\.7") ">= 0")))))))
7109 (propagated-inputs
7110 (list ruby-coderay))
7111 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
7112 (description
7113 "This package provides a tool for writing manuals for Prawn and Prawn
7114accessories")
7115 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
7116 (license %prawn-project-licenses)))
7117
7118(define-public ruby-progress_bar
7119 (package
7120 (name "ruby-progress_bar")
7121 (version "1.1.0")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (rubygems-uri "progress_bar" version))
7126 (sha256
7127 (base32
7128 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
7129 (build-system ruby-build-system)
7130 (arguments
7131 '(#:test-target "spec"))
7132 (propagated-inputs
7133 (list ruby-highline ruby-options))
7134 (native-inputs
7135 (list bundler ruby-rspec ruby-timecop))
7136 (synopsis
7137 "Ruby library for displaying progress bars")
7138 (description
7139 "ProgressBar is a simple library for displaying progress bars. The
7140maximum value is configurable, and additional information can be displayed
7141like the percentage completion, estimated time remaining, elapsed time and
7142rate.")
7143 (home-page "https://github.com/paul/progress_bar")
7144 (license license:wtfpl2)))
7145
7146(define-public ruby-progressbar
7147 (package
7148 (name "ruby-progressbar")
7149 (version "1.10.1")
7150 (source
7151 (origin
7152 (method url-fetch)
7153 (uri (rubygems-uri "ruby-progressbar" version))
7154 (sha256
7155 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
7156 (build-system ruby-build-system)
7157 (arguments
7158 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
7159 #:tests? #f))
7160 (synopsis "Text progress bar library for Ruby")
7161 (description
7162 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
7163The output can be customized with a formatting system.")
7164 (home-page "https://github.com/jfelchner/ruby-progressbar")
7165 (license license:expat)))
7166
7167(define-public ruby-latest-ruby
7168 (package
7169 (name "ruby-latest-ruby")
7170 (version "3.1.0")
7171 (source (origin
7172 (method url-fetch)
7173 (uri (rubygems-uri "latest_ruby" version))
7174 (sha256
7175 (base32
7176 "15rqwgxzpnkzdiz8m02jra0zq5sx0fiz61vkfrj1ls6slqfhnzqg"))))
7177 (build-system ruby-build-system)
7178 (arguments
7179 '(#:tests? #f)) ; No Rakefile
7180 (synopsis "Answers the question of what the latest Ruby version is")
7181 (description "Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.")
7182 (home-page "https://github.com/kyrylo/latest_ruby")
7183 (license license:zlib)))
7184
7185(define-public ruby-pry
7186 (package
7187 (name "ruby-pry")
7188 (version "0.14.2")
7189 (source
7190 (origin
7191 (method url-fetch)
7192 (uri (rubygems-uri "pry" version))
7193 (sha256
7194 (base32
7195 "0k9kqkd9nps1w1r1rb7wjr31hqzkka2bhi8b518x78dcxppm9zn4"))))
7196 (build-system ruby-build-system)
7197 (arguments
7198 '(#:tests? #f)) ; no tests
7199 (propagated-inputs
7200 (list ruby-coderay ruby-method-source))
7201 (synopsis "Ruby REPL")
7202 (description "Pry is an IRB alternative and runtime developer console for
7203Ruby. It features syntax highlighting, a plugin architecture, runtime
7204invocation, and source and documentation browsing.")
7205 (home-page "https://cobaltbluemedia.com/pryrepl/")
7206 (license license:expat)))
7207
7208(define-public ruby-pry-doc
7209 (package
7210 (name "ruby-pry-doc")
7211 (version "1.6.0")
7212 (source (origin
7213 (method url-fetch)
7214 (uri (rubygems-uri "pry-doc" version))
7215 (sha256
7216 (base32
7217 "0qq58vsmmvi9i4d15pav46ca5pd85qx3fxv17pq7ia5lqgxcrc8r"))))
7218 (build-system ruby-build-system)
7219 (propagated-inputs (list ruby-pry ruby-yard))
7220 (native-inputs (list ruby-latest-ruby ruby-rspec ruby-rake)) ;for tests
7221 (synopsis "Provides YARD and extended documentation support for Pry")
7222 (description
7223 "Pry Doc is a Pry REPL plugin. It provides extended documentation
7224support for the REPL by means of improving the @code{show-doc} and
7225@code{show-source} commands. With help of the plugin the commands are
7226be able to display the source code and the docs of Ruby methods and
7227classes implemented in C.")
7228 (home-page "https://github.com/pry/pry-doc")
7229 (license license:expat)))
7230
7231(define-public ruby-single-cov
7232 (package
7233 (name "ruby-single-cov")
7234 (version "1.11.0")
7235 (home-page "https://github.com/grosser/single_cov")
7236 (source (origin
7237 (method git-fetch)
7238 (uri (git-reference (url home-page)
7239 (commit (string-append "v" version))))
7240 (file-name (git-file-name name version))
7241 (sha256
7242 (base32
7243 "10xfciy1an4jlc2fb59m4cllxgfv98n9kcj7frgs44dbmlyfxb08"))))
7244 (build-system ruby-build-system)
7245 (arguments
7246 '(#:test-target "spec" ;to avoid rubocop requirement
7247 #:phases (modify-phases %standard-phases
7248 ;; XXX: Warnings make a few tests fail.
7249 ;; Add mutex-m in Gemfile to avoid them.
7250 (add-after 'unpack 'add-mutex-m
7251 (lambda _
7252 (substitute* "Gemfile"
7253 (("^gem \"bump\".*" all)
7254 (string-append all "gem \"mutex_m\"\n")))))
7255 (replace 'replace-git-ls-files
7256 (lambda _
7257 (substitute* "single_cov.gemspec"
7258 (("`git ls-files lib/ bin/ MIT-LICENSE`")
7259 ;; There no longer appear to be a 'bin'
7260 ;; sub-directory.
7261 "`find lib/ MIT-LICENSE -type f | sort`"))))
7262 (add-before 'check 'remove-version-constraints
7263 (lambda _
7264 (delete-file "Gemfile.lock")))
7265 (add-before 'check 'relax-requirements
7266 (lambda _
7267 ;; Remove extraneous requirements.
7268 (substitute* "Rakefile"
7269 ((".*require.*bump.*") ""))
7270 (substitute* "Gemfile"
7271 ((".*gem \"bump\".*") "")
7272 ((".*gem \"rubocop\".*") ""))))
7273 (add-before 'check 'disable-failing-test
7274 (lambda _
7275 ;; XXX: This test copies assets from minitest, but can
7276 ;; not cope with the files being read-only. Just skip
7277 ;; it for now.
7278 (substitute* "specs/single_cov_spec.rb"
7279 (("it \"complains when coverage is bad\"")
7280 "xit \"complains when coverage is bad\"")
7281 (("it \"does not duplicate coverage\"")
7282 "xit \"does not duplicate coverage\"")))))))
7283 (native-inputs (list ruby-minitest ruby-mutex-m ruby-rspec ruby-simplecov))
7284 (synopsis "Code coverage reporting tool")
7285 (description
7286 "This package provides actionable code coverage reports for Ruby
7287projects. It has very little overhead and can be easily integrated with
7288development tools to catch coverage problems early.")
7289 (license license:expat)))
7290
7291(define-public ruby-oedipus-lex
7292 (package
7293 (name "ruby-oedipus-lex")
7294 (version "2.6.1")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (rubygems-uri "oedipus_lex" version))
7299 (sha256
7300 (base32
7301 "06l4d3l75vhdcmnavnkzr7bd39rb0njxhkbmwrw6ni64z2hlj7w7"))))
7302 (build-system ruby-build-system)
7303 (native-inputs
7304 (list ruby-hoe
7305 ruby-minitest))
7306 (synopsis "Ruby lexer")
7307 (description
7308 "Oedipus Lex is a lexer generator in the same family as Rexical and Rex.
7309It is based primarily on generating code much like you would a hand-written
7310lexer. It uses StrScanner within a multi-level case statement. As such,
7311Oedipus matches on the first match, not the longest.")
7312 (home-page "https://github.com/seattlerb/oedipus_lex")
7313 (license license:expat)))
7314
7315(define-public ruby-guard
7316 (package
7317 (name "ruby-guard")
7318 (version "2.13.0")
7319 (source (origin
7320 (method git-fetch)
7321 ;; The gem does not include a Rakefile, nor does it contain a
7322 ;; gemspec file, nor does it come with the tests. This is why
7323 ;; we fetch the tarball from Github.
7324 (uri (git-reference
7325 (url "https://github.com/guard/guard")
7326 (commit (string-append "v" version))))
7327 (file-name (git-file-name name version))
7328 (sha256
7329 (base32
7330 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
7331 (build-system ruby-build-system)
7332 (arguments
7333 `(#:tests? #f ; tests require cucumber
7334 #:phases
7335 (modify-phases %standard-phases
7336 (add-after 'unpack 'remove-git-ls-files
7337 (lambda* (#:key outputs #:allow-other-keys)
7338 (substitute* "guard.gemspec"
7339 (("git ls-files -z") "find . -type f -print0"))))
7340 (replace 'build
7341 (lambda _
7342 (invoke "gem" "build" "guard.gemspec"))))))
7343 (propagated-inputs
7344 (list ruby-formatador
7345 ruby-listen
7346 ruby-lumberjack
7347 ruby-nenv
7348 ruby-notiffany
7349 ruby-pry
7350 ruby-shellany
7351 ruby-thor))
7352 (native-inputs
7353 (list bundler ruby-rspec))
7354 (synopsis "Tool to handle events on file system modifications")
7355 (description
7356 "Guard is a command line tool to easily handle events on file system
7357modifications. Guard automates various tasks by running custom rules whenever
7358file or directories are modified.")
7359 (home-page "https://guardgem.org/")
7360 (license license:expat)))
7361
7362(define-public ruby-spinach
7363 (package
7364 (name "ruby-spinach")
7365 (version "0.12.0")
7366 (home-page "https://github.com/codegram/spinach")
7367 (source (origin
7368 (method url-fetch)
7369 (uri (rubygems-uri "spinach" version))
7370 (sha256
7371 (base32
7372 "1v9nvpvlgjx698dc4q2p1l45sxm5fjjzfxayrkyzb9nv0q0xfjsp"))))
7373 (build-system ruby-build-system)
7374 (arguments
7375 ;; FIXME: Disable tests altogether because they depend on 'capybara'
7376 ;; which in turn depends on many other unpackaged gems. Enable once
7377 ;; capybara is available.
7378 '(#:tests? #f))
7379 (propagated-inputs
7380 (list ruby-colorize ruby-gherkin-ruby))
7381 (synopsis "Gherkin-based BDD framework")
7382 (description
7383 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
7384framework that leverages the expressive @code{Gherkin} language to help you
7385define executable specifications of your code.")
7386 (license license:expat)))
7387
7388(define-public ruby-timers
7389 (package
7390 (name "ruby-timers")
7391 (version "4.3.5")
7392 (source (origin
7393 (method git-fetch)
7394 (uri (git-reference
7395 (url "https://github.com/socketry/timers")
7396 (commit (string-append "v" version))))
7397 (file-name (git-file-name name version))
7398 (sha256
7399 (base32
7400 "1vvahlhk6i1xks1bsha6s64pjjxhagmzvvf1q9h6z3lpcba43rpx"))))
7401 (build-system ruby-build-system)
7402 (arguments
7403 (list #:phases
7404 #~(modify-phases %standard-phases
7405 (add-before 'build 'prune-gems.rb
7406 (lambda _
7407 (substitute* "gems.rb"
7408 ;; These are only required for maintenance.
7409 ((".*gem \"bake-modernize\".*") "")
7410 ((".*gem \"bake-gem\".*") "")
7411 ;; Not actually required by the tests.
7412 ((".*gem 'benchmark-ips'.*") "")
7413 ((".*gem \"ruby-prof\".*") ""))))
7414 (add-before 'build 'remove-missing-signing-key
7415 (lambda _
7416 ;; Otherwise, the build fails with ENOENT.
7417 (substitute* "timers.gemspec"
7418 ((".*spec.signing_key.*") ""))))
7419 (replace 'check
7420 (lambda* (#:key tests? #:allow-other-keys)
7421 (when tests?
7422 (invoke "bake" "test")))))))
7423 (native-inputs
7424 (list ruby-covered
7425 ruby-bake-test
7426 ruby-bake-test-external
7427 ruby-sus))
7428 (synopsis "Collection of Ruby timer classes")
7429 (description "Timers offers a collections of one-shot and periodic timers,
7430intended for use with event loops such as async.")
7431 (home-page "https://github.com/socketry/timers")
7432 (license license:expat)))
7433
7434(define-public ruby-tilt
7435 (package
7436 (name "ruby-tilt")
7437 (version "2.7.0")
7438 (source
7439 (origin
7440 (method git-fetch) ;the distributed gem lacks tests
7441 (uri (git-reference
7442 (url "https://github.com/jeremyevans/tilt")
7443 (commit (string-append "v" version))))
7444 (file-name (git-file-name name version))
7445 (sha256
7446 (base32 "1yzf4mgnypb2dxj1jw08qli01pnczyafgb7akjgl131i96zpdg03"))))
7447 (build-system ruby-build-system)
7448 (arguments
7449 (list
7450 #:phases
7451 #~(modify-phases %standard-phases
7452 (add-before 'check 'set-SASS_IMPLEMENTATION
7453 (lambda _
7454 (setenv "SASS_IMPLEMENTATION" "sassc"))))))
7455 (native-inputs
7456 ;; Missing optional dependencies:
7457 ;; - babel/transpiler by tilt/babel
7458 ;; - coffee_script by tilt/coffee
7459 ;; - commonmarker by tilt/commonmarker
7460 ;; - livescript by tilt/livescript
7461 ;; - radius by tilt/radius
7462 ;; - typescript-node by tilt/typescript
7463 (list ruby-asciidoctor/minimal
7464 ruby-builder
7465 ruby-erubi
7466 ruby-haml
7467 ruby-kramdown
7468 ruby-liquid
7469 ruby-markaby
7470 ruby-nokogiri
7471 ruby-pandoc-ruby
7472 ruby-prawn
7473 ruby-rdiscount
7474 ruby-redcarpet
7475 ruby-redcloth
7476 ruby-sassc
7477 ruby-slim
7478 ruby-yajl-ruby))
7479 (synopsis "Generic interface to multiple Ruby template engines")
7480 (description
7481 "Tilt is a thin interface over a number of different Ruby template
7482engines in an attempt to make their usage as generic as possible.")
7483 (home-page "https://github.com/rtomayko/tilt/")
7484 (license license:expat)))
7485
7486(define-public ruby-tilt/minimal
7487 (hidden-package
7488 (package
7489 (inherit ruby-tilt)
7490 (arguments (list #:tests? #f))
7491 (native-inputs (list))))); clear out for minimal build
7492
7493(define-public ruby-thread-safe
7494 (package
7495 (name "ruby-thread-safe")
7496 (version "0.3.6")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (rubygems-uri "thread_safe" version))
7501 (sha256
7502 (base32
7503 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
7504 (build-system ruby-build-system)
7505 (arguments
7506 '(#:tests? #f)) ; needs simplecov, among others
7507 (synopsis "Thread-safe utilities for Ruby")
7508 (description "The thread_safe library provides thread-safe collections and
7509utilities for Ruby.")
7510 (home-page "https://github.com/ruby-concurrency/thread_safe")
7511 (license license:asl2.0)))
7512
7513(define-public ruby-tzinfo
7514 ;; XXX: Unreleased for [email protected].
7515 (let ((commit "5cfebcbdbe3beff2a254ea0709a1586968a301a0")
7516 (revision "0"))
7517 (package
7518 (name "ruby-tzinfo")
7519 (version (git-version "2.0.6" revision commit))
7520 (source
7521 (origin
7522 (method git-fetch)
7523 (uri (git-reference
7524 ;; Pull from git because the gem has no tests.
7525 (url "https://github.com/tzinfo/tzinfo")
7526 (commit commit)))
7527 (file-name (git-file-name name version))
7528 (sha256
7529 (base32 "02sp9pp3qxds1cw8kks3iha6ib5wrjybh4d2qjm0rksrqkq1gd6q"))))
7530 (build-system ruby-build-system)
7531 (arguments
7532 (list
7533 #:phases
7534 #~(modify-phases %standard-phases
7535 (add-after 'unpack 'skip-safe-tests
7536 (lambda _
7537 (substitute* "test/test_utils.rb"
7538 (("def safe_test\\(options = \\{\\}\\)")
7539 "def safe_test(options = {})
7540 skip('The Guix build environment has an unsafe load path')"))))
7541 (add-before 'check 'pre-check
7542 (lambda _
7543 (setenv "HOME" (getcwd))
7544 (substitute* "Gemfile"
7545 (("simplecov.*") "simplecov'\n"))))
7546 (replace 'check
7547 (lambda* (#:key tests? test-target #:allow-other-keys)
7548 (when tests?
7549 (invoke "bundler" "exec" "rake" test-target)))))))
7550 (propagated-inputs
7551 (list ruby-concurrent-ruby))
7552 (native-inputs
7553 (list ruby-simplecov))
7554 (synopsis "Time zone library for Ruby")
7555 (description "TZInfo is a Ruby library that provides daylight savings
7556aware transformations between times in different time zones.")
7557 (home-page "https://tzinfo.github.io")
7558 (license license:expat))))
7559
7560(define-public ruby-tzinfo-data
7561 (package
7562 (name "ruby-tzinfo-data")
7563 (version "1.2025.2")
7564 (source
7565 (origin
7566 (method git-fetch)
7567 ;; Download from GitHub because the rubygems version does not contain
7568 ;; Rakefile or tests.
7569 (uri (git-reference
7570 (url "https://github.com/tzinfo/tzinfo-data")
7571 (commit (string-append "v" version))))
7572 (file-name (git-file-name name version))
7573 (sha256
7574 (base32 "00hsw1rga03js3la1fdjvzlixqjjg5fw3xpx71mppkhk61ks728f"))))
7575 (build-system ruby-build-system)
7576 (arguments
7577 (list
7578 #:phases
7579 #~(modify-phases %standard-phases
7580 (add-after 'unpack 'patch-source
7581 (lambda* (#:key inputs #:allow-other-keys)
7582 (substitute* "Rakefile"
7583 (("URI\\.parse\\(url\\)\\.open")
7584 "URI.open(url)")
7585 (("https://data.iana.org/time-zones/releases")
7586 (assoc-ref inputs "tzdata")))))
7587 (add-before 'check 'pre-check
7588 (lambda _
7589 (setenv "HOME" (getcwd))
7590 (substitute* "Rakefile"
7591 ;; Don't need gpg, and it may break after a time.
7592 (("gpg ") "echo ")
7593 ((" sh\\(\\\"make -C" text)
7594 (string-append " sh(\"sed -i 's@/bin/sh@sh@' #{tzdb_combined_path}/Makefile \")\n"
7595 " sh(\"sed -i 's@cc=@cc?=@' #{tzdb_combined_path}/Makefile \")\n" text)))
7596 (setenv "CC" #$(cc-for-target)))))))
7597 (propagated-inputs
7598 (list ruby-tzinfo))
7599 (native-inputs
7600 `(("tzdata"
7601 ,(file-union "tzdata-for-ruby-tzdata-info"
7602 `(("tzdata2025b.tar.gz"
7603 ,(origin
7604 (method url-fetch)
7605 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz")
7606 (sha256
7607 (base32
7608 "0x0lswl5v3q3ml8ig4djc76p9zc593xajzp22x881isz6h9h908i"))))
7609 ("tzdata2025b.tar.gz.asc"
7610 ,(origin
7611 (method url-fetch)
7612 (uri "https://data.iana.org/time-zones/releases/tzdata2025b.tar.gz.asc")
7613 (sha256
7614 (base32
7615 "0ss9h9nqy4hb09ywzsgqrs33l92w8kbjd7m8ahvi9h3mh4jhd742"))))
7616 ("tzcode2025b.tar.gz"
7617 ,(origin
7618 (method url-fetch)
7619 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz")
7620 (sha256
7621 (base32
7622 "1v1mw6599afdcmf5dal7zvjbl3caibkzmlw7kka71vi56pdzxy05"))))
7623 ("tzcode2025b.tar.gz.asc"
7624 ,(origin
7625 (method url-fetch)
7626 (uri "https://data.iana.org/time-zones/releases/tzcode2025b.tar.gz.asc")
7627 (sha256
7628 (base32
7629 "13vj6s9mvw9083xhzyzzs1a4lgyfqmibx6k2rh4nb2ggy3gmwa22")))))))))
7630 (synopsis "Data from the IANA Time Zone database")
7631 (description
7632 "This library provides @code{TZInfo::Data}, which contains data from the
7633IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
7634 (home-page "https://tzinfo.github.io")
7635 (license license:expat)))
7636
7637(define-public ruby-rb-inotify
7638 (package
7639 (name "ruby-rb-inotify")
7640 (version "0.10.1")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (rubygems-uri "rb-inotify" version))
7645 (sha256
7646 (base32
7647 "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"))))
7648 (build-system ruby-build-system)
7649 (arguments
7650 (list
7651 #:tests? #f ; there are no tests
7652 #:phases
7653 #~(modify-phases %standard-phases
7654 ;; Building the gemspec with rake is not working here since it is
7655 ;; generated with Jeweler. It is also unnecessary because the
7656 ;; existing gemspec does not use any development tools to generate a
7657 ;; list of files.
7658 (replace 'build
7659 (lambda _
7660 (invoke "gem" "build" "rb-inotify.gemspec"))))))
7661 (propagated-inputs
7662 (list ruby-ffi))
7663 (native-inputs
7664 (list ruby-yard))
7665 (synopsis "Ruby wrapper for Linux's inotify")
7666 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
7667kernel subsystem for monitoring changes to files and directories.")
7668 (home-page "https://github.com/nex3/rb-inotify")
7669 (license license:expat)))
7670
7671(define-public ruby-pry-editline
7672 (package
7673 (name "ruby-pry-editline")
7674 (version "1.1.2")
7675 (source (origin
7676 (method url-fetch)
7677 (uri (rubygems-uri "pry-editline" version))
7678 (sha256
7679 (base32
7680 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
7681 (build-system ruby-build-system)
7682 (arguments `(#:tests? #f)) ; no tests included
7683 (native-inputs
7684 (list bundler))
7685 (synopsis "Open the current REPL line in an editor")
7686 (description
7687 "This gem provides a plugin for the Ruby REPL to enable opening the
7688current line in an external editor.")
7689 (home-page "https://github.com/tpope/pry-editline")
7690 (license license:expat)))
7691
7692(define-public ruby-sdoc
7693 (package
7694 (name "ruby-sdoc")
7695 (version "1.1.0")
7696 (source (origin
7697 (method url-fetch)
7698 (uri (rubygems-uri "sdoc" version))
7699 (sha256
7700 (base32
7701 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
7702 (build-system ruby-build-system)
7703 (arguments
7704 `(#:phases
7705 (modify-phases %standard-phases
7706 (add-before 'check 'set-rubylib-and-patch-gemfile
7707 (lambda _
7708 (setenv "RUBYLIB" "lib")
7709 (substitute* "sdoc.gemspec"
7710 (("s.add_runtime_dependency.*") "\n")
7711 (("s.add_dependency.*") "\n"))
7712 (substitute* "Gemfile"
7713 (("gem \"rake\".*")
7714 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n")))))))
7715 (propagated-inputs
7716 (list ruby-json))
7717 (native-inputs
7718 (list bundler ruby-minitest ruby-hoe))
7719 (synopsis "Generate searchable RDoc documentation")
7720 (description
7721 "SDoc is an RDoc documentation generator to build searchable HTML
7722documentation for Ruby code.")
7723 (home-page "https://github.com/voloko/sdoc")
7724 (license license:expat)))
7725
7726(define-public ruby-tins
7727 (package
7728 (name "ruby-tins")
7729 (version "1.29.1")
7730 (source (origin
7731 (method url-fetch)
7732 (uri (rubygems-uri "tins" version))
7733 (sha256
7734 (base32
7735 "0nzp88y19rqlcizp1nw8m44fvfxs9g3bhjpscz44dwfawfrmr0cb"))))
7736 (build-system ruby-build-system)
7737 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
7738 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
7739 ;; the gemspec.
7740 (arguments
7741 `(#:tests? #f ; there are no tests
7742 #:phases
7743 (modify-phases %standard-phases
7744 (replace 'build
7745 (lambda _
7746 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
7747 ;; causes an error.
7748 (substitute* "tins.gemspec"
7749 (("\"lib/spruz\", ") ""))
7750 (invoke "gem" "build" "tins.gemspec"))))))
7751 (propagated-inputs
7752 (list ruby-sync))
7753 (synopsis "Assorted tools for Ruby")
7754 (description "Tins is a Ruby library providing assorted tools.")
7755 (home-page "https://github.com/flori/tins")
7756 (license license:expat)))
7757
7758(define-public ruby-gemtext
7759 (package
7760 (name "ruby-gemtext")
7761 (version "1.0.3")
7762 (source
7763 (origin
7764 (method url-fetch)
7765 (uri (rubygems-uri "gemtext" version))
7766 (sha256
7767 (base32 "1z559f5z0zvwnqgnny0zf4mppiary020ljxwpw3bdxi2hr9aj3gp"))))
7768 (build-system ruby-build-system)
7769 (synopsis "Gemtext parser for Ruby")
7770 (description
7771 "This package is a Ruby parser library for Gemtext (hypertext format
7772which is intended to serve as the native response format of the Gemini
7773file transfer protocol) and produces a document object of various
7774nodes.")
7775 (home-page "https://github.com/exastencil/gemtext")
7776 (license license:expat)))
7777
7778(define-public ruby-gem-hadar
7779 (package
7780 (name "ruby-gem-hadar")
7781 (version "1.11.0")
7782 (source (origin
7783 (method url-fetch)
7784 (uri (rubygems-uri "gem_hadar" version))
7785 (sha256
7786 (base32
7787 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
7788 (build-system ruby-build-system)
7789 ;; This gem needs itself at development time. We disable rebuilding of the
7790 ;; gemspec to avoid this loop.
7791 (arguments
7792 `(#:tests? #f ; there are no tests
7793 #:phases
7794 (modify-phases %standard-phases
7795 (replace 'build
7796 (lambda _
7797 (invoke "gem" "build" "gem_hadar.gemspec"))))))
7798 (propagated-inputs
7799 (list git-minimal ruby-tins ruby-yard))
7800 (synopsis "Library for the development of Ruby gems")
7801 (description
7802 "This library contains some useful functionality to support the
7803development of Ruby gems.")
7804 (home-page "https://github.com/flori/gem_hadar")
7805 (license license:expat)))
7806
7807(define-public ruby-term-ansicolor
7808 (package
7809 (name "ruby-term-ansicolor")
7810 (version "1.7.1")
7811 (source (origin
7812 (method url-fetch)
7813 (uri (rubygems-uri "term-ansicolor" version))
7814 (sha256
7815 (base32
7816 "1xq5kci9215skdh27npyd3y55p812v4qb4x2hv3xsjvwqzz9ycwj"))))
7817 (build-system ruby-build-system)
7818 ;; Rebuilding the gemspec seems to require git, even though this is not a
7819 ;; git repository, so we just build the gem from the existing gemspec.
7820 (arguments
7821 (list
7822 #:phases
7823 #~(modify-phases %standard-phases
7824 (add-after 'unpack 'fix-test
7825 (lambda -
7826 (substitute* "tests/hsl_triple_test.rb"
7827 (("0\\\\\\.0%")
7828 "0\\.?0?%"))))
7829 (replace 'build
7830 (lambda _
7831 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
7832 (propagated-inputs
7833 (list ruby-tins))
7834 (native-inputs
7835 (list ruby-gem-hadar))
7836 (synopsis "Ruby library to control the attributes of terminal output")
7837 (description
7838 "This Ruby library uses ANSI escape sequences to control the attributes
7839of terminal output.")
7840 (home-page "https://flori.github.io/term-ansicolor/")
7841 ;; There is no mention of the "or later" clause.
7842 (license license:gpl2)))
7843
7844(define-public ruby-immutable-ruby
7845 (package
7846 (name "ruby-immutable-ruby")
7847 (version "0.2.0")
7848 (source
7849 (origin
7850 (method git-fetch)
7851 (uri (git-reference
7852 (url "https://github.com/immutable-ruby/immutable-ruby")
7853 (commit version)))
7854 (file-name (git-file-name name version))
7855 (sha256
7856 (base32 "02sbb24yhg8lxmp4va9js3kn81j268ih4ac4nvgvnq86zdribl8k"))))
7857 (build-system ruby-build-system)
7858 (arguments
7859 (list
7860 #:phases
7861 #~(modify-phases %standard-phases
7862 (replace 'check
7863 (lambda* (#:key tests? #:allow-other-keys)
7864 (when tests? (invoke "ruby" (which "rspec"))))))))
7865 (propagated-inputs (list ruby-concurrent-ruby ruby-sorted-set))
7866 (native-inputs (list ruby-benchmark-ips ruby-pry ruby-rspec))
7867 (synopsis "Efficient, immutable, Thread-Safe Collection classes")
7868 (description
7869 "Immutable-Ruby provides 6 persistent data structures:
7870@code{Hash}, @code{Vector}, @code{Set}, @code{SortedSet}, @code{List}, and
7871@code{Deque} (which works as an immutable queue or stack). Immutable is forked
7872from the Hamster library.")
7873 (home-page "https://github.com/immutable-ruby/immutable-ruby")
7874 (license license:expat)))
7875
7876(define-public ruby-immutable-struct
7877 (package
7878 (name "ruby-immutable-struct")
7879 (version "2.5.0")
7880 (source
7881 (origin
7882 (method git-fetch)
7883 (uri (git-reference
7884 (url "https://github.com/stitchfix/immutable-struct")
7885 (commit version)))
7886 (file-name (git-file-name name version))
7887 (sha256
7888 (base32
7889 "0vsr2spypjf0i7ppg2a0gj3mjj5k3dyqsx224cbsxw51p6cc11c1"))))
7890 (build-system ruby-build-system)
7891 (arguments
7892 (list
7893 #:phases
7894 #~(modify-phases %standard-phases
7895 (replace 'check
7896 (lambda* (#:key tests? #:allow-other-keys)
7897 (when tests?
7898 (invoke "ruby" (which "rspec"))))))))
7899 (native-inputs
7900 (list ruby-rspec))
7901 (synopsis "Ruby library for creating immutable struct classes")
7902 (description
7903 "This package provides a library to help create value objects without
7904the pain of Ruby's Struct (or its setters).")
7905 (home-page "https://stitchfix.github.io/immutable-struct/")
7906 (license license:expat)))
7907
7908(define-public ruby-faker
7909 (package
7910 (name "ruby-faker")
7911 (version "3.6.1")
7912 (source
7913 (origin
7914 (method git-fetch)
7915 (uri (git-reference
7916 (url "https://github.com/faker-ruby/faker")
7917 (commit (string-append "v" version))))
7918 (file-name (git-file-name name version))
7919 (sha256
7920 (base32 "1jv39j3rv1bx4155rsq7cvl13kb173gl8ypvjd7v4ba5cnl5zrrl"))))
7921 (build-system ruby-build-system)
7922 (arguments
7923 (list
7924 #:phases
7925 #~(modify-phases %standard-phases
7926 (add-after 'unpack 'remove-rubocop-from-rakefile
7927 (lambda _
7928 (substitute* "Rakefile"
7929 (("require 'rubocop/rake_task'")
7930 "")
7931 (("RuboCop::RakeTask\\.new")
7932 "")))))))
7933 (native-inputs (list ruby-yard ruby-simplecov ruby-timecop))
7934 (propagated-inputs (list ruby-i18n))
7935 (synopsis "Library for generating fake data")
7936 (description
7937 "Faker is a port of Data::Faker from Perl. It is used to
7938easily generate fake data: names, addresses, phone numbers, etc.")
7939 (home-page "https://github.com/faker-ruby/faker")
7940 (license license:expat)))
7941
7942(define-public ruby-terraform
7943 (package
7944 (name "ruby-terraform")
7945 (version "1.9.0")
7946 (source
7947 (origin
7948 (method git-fetch)
7949 (uri (git-reference
7950 (url "https://github.com/infrablocks/ruby_terraform")
7951 (commit (string-append "v" version))))
7952 (file-name (git-file-name name version))
7953 (sha256
7954 (base32
7955 "0j2gzpg28d62l2dgm9cnblwq76h148b2rdscql41f7913q7f5x82"))))
7956 (build-system ruby-build-system)
7957 (arguments
7958 (list
7959 #:test-target "spec"
7960 #:phases
7961 #~(modify-phases %standard-phases
7962 (add-after 'unpack 'remove-gemlock
7963 (lambda _
7964 (delete-file "Gemfile.lock")))
7965 (add-after 'unpack 'disable-bundler
7966 (lambda _
7967 (substitute* "spec/spec_helper.rb"
7968 (("require 'bundler/setup'") ""))))
7969 (add-before 'check 'disable-falinig-tests
7970 (lambda _
7971 (substitute* "spec/ruby_terraform/commands/plan_spec.rb"
7972 (("it 'logs an error raised when running the command'")
7973 "xit 'logs an error raised when running the command'")
7974 (("it 'raises execution error when an error occurs running the command'")
7975 "xit 'raises execution error when an error occurs running the command'"))))
7976 (replace 'check
7977 (lambda* (#:key tests? #:allow-other-keys)
7978 (when tests?
7979 (invoke "rspec")))))))
7980 (native-inputs
7981 (list ruby-rspec
7982 ruby-faker
7983 ruby-simplecov))
7984 (propagated-inputs
7985 (list ruby-lino ruby-immutable-struct))
7986 (synopsis "Ruby wrapper around the Terraform command line interface")
7987 (description
7988 "This package provides a Ruby wrapper around the Terraform command line
7989interface so that Terraform can be more easily invoked from Ruby code.")
7990 (home-page "https://github.com/infrablocks/ruby_terraform")
7991 (license license:expat)))
7992
7993(define-public ruby-pstree
7994 (package
7995 (name "ruby-pstree")
7996 (version "0.3.0")
7997 (source (origin
7998 (method url-fetch)
7999 (uri (rubygems-uri "pstree" version))
8000 (sha256
8001 (base32
8002 "0ld3ng37y92kv9vqnachw1l3n07hsc8hrnjs9d840liw0mysf1vp"))))
8003 (build-system ruby-build-system)
8004 (native-inputs
8005 (list ruby-gem-hadar bundler))
8006 (synopsis "Create a process tree data structure")
8007 (description
8008 "This library uses the output of the @code{ps} command to create a
8009process tree data structure for the current host.")
8010 (home-page "https://github.com/flori/pstree")
8011 ;; There is no mention of the "or later" clause.
8012 (license license:gpl2)))
8013
8014(define-public ruby-psych
8015 (let ((revision "0")
8016 ;; For older Ractor workaround.
8017 (commit "1a4d383efe0bf12e0e7d67c8ecf61ab39aec526c"))
8018 (package
8019 (name "ruby-psych")
8020 (version (git-version "5.4.0" revision commit))
8021 (source (origin
8022 (method git-fetch) ;for tests
8023 (uri (git-reference
8024 (url "https://github.com/ruby/psych")
8025 (commit commit)))
8026 (file-name (git-file-name name version))
8027 (sha256
8028 (base32
8029 "0nkpzy9f7r457inc3a4jx961zvjkl6xsw8yfvwzp7901hmpp4wvy"))))
8030 (build-system ruby-build-system)
8031 (arguments
8032 (list
8033 #:phases
8034 #~(modify-phases %standard-phases
8035 (add-before 'build 'compile
8036 (lambda _
8037 (invoke "rake" "compile"))))))
8038 (inputs
8039 (list libyaml))
8040 (native-inputs
8041 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8042 (propagated-inputs (list ruby-date ruby-stringio))
8043 (synopsis "Ruby YAML parser and emitter")
8044 (description
8045 "Psych is a YAML parser and emitter. Psych leverages libyaml for its
8046YAML parsing and emitting capabilities. In addition to wrapping libyaml,
8047Psych also knows how to serialize and de-serialize most Ruby objects to and
8048from the YAML format.")
8049 (home-page "https://github.com/ruby/psych")
8050 (license license:expat))))
8051
8052(define-public ruby-utils
8053 (package
8054 (name "ruby-utils")
8055 (version "0.9.0")
8056 (source (origin
8057 (method url-fetch)
8058 (uri (rubygems-uri "utils" version))
8059 (sha256
8060 (base32
8061 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
8062 (build-system ruby-build-system)
8063 (propagated-inputs
8064 (list ruby-tins ruby-term-ansicolor ruby-pstree ruby-pry-editline))
8065 (native-inputs
8066 (list ruby-gem-hadar bundler))
8067 (synopsis "Command line tools for working with Ruby")
8068 (description
8069 "This package provides assorted command line tools that may be useful
8070when working with Ruby code.")
8071 (home-page "https://github.com/flori/utils")
8072 ;; There is no mention of the "or later" clause.
8073 (license license:gpl2)))
8074
8075(define-public ruby-jaro-winkler
8076 (package
8077 (name "ruby-jaro-winkler")
8078 (version "1.6.0")
8079 (source
8080 (origin
8081 (method url-fetch)
8082 (uri (rubygems-uri "jaro_winkler" version))
8083 (sha256
8084 (base32 "09645h5an19zc1i7wlmixszj8xxqb2zc8qlf8dmx39bxpas1l24b"))))
8085 (build-system ruby-build-system)
8086 (arguments
8087 '(#:tests? #f)) ; no included tests
8088 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
8089 (description
8090 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
8091algorithm. It is written as a C extension and will fallback to a pure Ruby
8092implementation on platforms where this is unsupported.")
8093 (home-page "https://github.com/tonytonyjan/jaro_winkler")
8094 (license license:expat)))
8095
8096(define-public ruby-json-pure
8097 (package
8098 (name "ruby-json-pure")
8099 (version "2.6.3")
8100 (source
8101 (origin
8102 ;; For tests
8103 (method git-fetch)
8104 (uri (git-reference
8105 (url "https://github.com/flori/json.git")
8106 (commit (string-append "v" version))))
8107 (file-name (git-file-name name version))
8108 (sha256
8109 (base32
8110 "0551269c98a07m6bl594syh5vknrm3c636a4dxis9jpsb7vf7lfx"))))
8111 (build-system ruby-build-system)
8112 (arguments
8113 (list
8114 #:phases
8115 #~(modify-phases %standard-phases
8116 (add-after 'unpack 'fix-rakefile
8117 (lambda _
8118 (substitute* "Rakefile"
8119 ;; Since this is not a git repository, do not call 'git'.
8120 (("`git ls-files`") "`find . -type f |sort`")))))))
8121 (native-inputs
8122 (list bundler ragel ruby-simplecov ruby-test-unit which))
8123 (synopsis "JSON implementation in pure Ruby")
8124 (description
8125 "This package provides a JSON implementation written in pure Ruby.")
8126 (home-page "https://flori.github.io/json/")
8127 (license license:ruby)))
8128
8129(define-public ruby-jwt
8130 (package
8131 (name "ruby-jwt")
8132 (version "3.2.0")
8133 (source
8134 (origin
8135 ;; For tests
8136 (method git-fetch)
8137 (uri (git-reference
8138 (url "https://github.com/jwt/ruby-jwt")
8139 (commit (string-append "v" version))))
8140 (file-name (git-file-name name version))
8141 (sha256
8142 (base32
8143 "1kjla8ixb56vgrq766r1h8xizyl59q15xc1lxc1867yp61aih5d4"))))
8144 (build-system ruby-build-system)
8145 (arguments
8146 (list
8147 #:test-target "test"
8148 #:phases
8149 #~(modify-phases %standard-phases
8150 (add-after 'unpack 'remove-unnecessary-dependencies
8151 (lambda _
8152 (substitute* "Rakefile"
8153 (("require 'bundler/setup'") "")
8154 (("require 'rubocop/rake_task'") "")
8155 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") ""))
8156 (substitute* "spec/spec_helper.rb"
8157 (("require 'simplecov'") "")))))))
8158 (propagated-inputs (list ruby-base64))
8159 (native-inputs
8160 (list ruby-rspec ruby-rbnacl))
8161 (synopsis "Ruby implementation of the JSON Web Token standard")
8162 (description
8163 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
8164@acronym{JWT, JSON Web Token} standard.")
8165 (home-page "https://github.com/jwt/ruby-jwt")
8166 (license license:expat)))
8167
8168;; Even though this package only provides bindings for a Mac OSX API it is
8169;; required by "ruby-listen" at runtime.
8170(define-public ruby-rb-fsevent
8171 (package
8172 (name "ruby-rb-fsevent")
8173 (version "0.10.3")
8174 (source (origin
8175 (method url-fetch)
8176 (uri (rubygems-uri "rb-fsevent" version))
8177 (sha256
8178 (base32
8179 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
8180 (build-system ruby-build-system)
8181 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
8182 ;; "listen", which needs "rb-fsevent" at runtime.
8183 (arguments `(#:tests? #f))
8184 (synopsis "FSEvents API with signals catching")
8185 (description
8186 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
8187 (home-page "https://rubygems.org/gems/rb-fsevent")
8188 (license license:expat)))
8189
8190(define-public ruby-listen
8191 (package
8192 (name "ruby-listen")
8193 (version "3.8.0")
8194 (source
8195 (origin
8196 ;; The gem does not include a Rakefile, so fetch from the Git
8197 ;; repository.
8198 (method git-fetch)
8199 (uri (git-reference
8200 (url "https://github.com/guard/listen")
8201 (commit (string-append "v" version))))
8202 (file-name (git-file-name name version))
8203 (sha256
8204 (base32
8205 "1skkglml094dw1xr4742in1rwwa84ld0mz4nkw6qa8pwhx48x2n5"))))
8206 (build-system ruby-build-system)
8207 (arguments
8208 (list
8209 #:test-target "spec"
8210 #:phases
8211 #~(modify-phases %standard-phases
8212 (add-after 'unpack 'fix-files-in-gemspec
8213 (lambda _
8214 (substitute* "listen.gemspec"
8215 (("`git ls-files -z`")
8216 "`find . -type f -printf '%P\\\\0' |sort -z`"))))
8217 (add-before 'check 'remove-unnecessary-dependencies'
8218 (lambda _
8219 (substitute* "Rakefile"
8220 ;; Rubocop is for code linting, and is unnecessary for running
8221 ;; the tests.
8222 ((".*rubocop.*") "")))))))
8223 (native-inputs
8224 (list bundler ruby-rspec))
8225 (inputs
8226 (list ;; ruby-thor is used for the command line interface, and is referenced
8227 ;; in the wrapper, and therefore just needs to be an input.
8228 ruby-thor))
8229 (propagated-inputs
8230 (list ruby-rb-fsevent ruby-rb-inotify))
8231 (synopsis "Listen to file modifications")
8232 (description "The Listen gem listens to file modifications and notifies
8233you about the changes.")
8234 (home-page "https://github.com/guard/listen")
8235 (license license:expat)))
8236
8237(define-public ruby-loofah
8238 (package
8239 (name "ruby-loofah")
8240 (version "2.24.1")
8241 (source
8242 (origin
8243 ;; Build from git because the gem lacks tests.
8244 (method git-fetch)
8245 (uri (git-reference (url "https://github.com/flavorjones/loofah")
8246 (commit (string-append "v" version))))
8247 (file-name (git-file-name name version))
8248 (sha256
8249 (base32 "07ngn69i86afqcpwv3yc977krbgq8b201gxz0pg3kp8wrliig44f"))))
8250 (build-system ruby-build-system)
8251 (arguments
8252 (list
8253 ;; tests: 1093 runs, 3586 assertions, 0 failures, 0 errors, 0 skips
8254 #:phases
8255 #~(modify-phases %standard-phases
8256 (add-after 'unpack 'skip-failing-tests
8257 (lambda _
8258 (delete-file "test/assets/testdata_sanitizer_tests1.dat"))))))
8259 (native-inputs
8260 (list ruby-hoe ruby-hoe-markdown ruby-rr))
8261 (propagated-inputs
8262 (list ruby-nokogiri ruby-crass))
8263 (home-page "https://github.com/flavorjones/loofah")
8264 (synopsis "Ruby library for manipulating and transforming HTML/XML")
8265 (description
8266 "Loofah is a general library for manipulating and transforming HTML/XML
8267documents and fragments. It's built on top of Nokogiri and libxml2.")
8268 (license license:expat)))
8269
8270(define-public ruby-crass
8271 (package
8272 (name "ruby-crass")
8273 (version "1.0.6")
8274 (home-page "https://github.com/rgrove/crass")
8275 (source (origin
8276 ;; The gem does not contain tests, so pull from git.
8277 (method git-fetch)
8278 (uri (git-reference
8279 (url home-page)
8280 (commit (string-append "v" version))))
8281 (file-name (git-file-name name version))
8282 (sha256
8283 (base32
8284 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
8285 (build-system ruby-build-system)
8286 (arguments
8287 (list #:phases
8288 #~(modify-phases %standard-phases
8289 (add-after 'unpack 'patch-minitest
8290 (lambda _
8291 (substitute* "test/support/common.rb"
8292 (("MiniTest")
8293 "Minitest")))))))
8294 (synopsis "Pure Ruby CSS parser")
8295 (description
8296 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
8297 (license license:expat)))
8298
8299(define-public ruby-samovar
8300 (package
8301 (name "ruby-samovar")
8302 (version "2.1.4")
8303 (source (origin
8304 (method git-fetch) ;for tests
8305 (uri (git-reference
8306 (url "https://github.com/ioquatix/samovar")
8307 (commit (string-append "v" version))))
8308 (file-name (git-file-name name version))
8309 (sha256
8310 (base32
8311 "05pc5xlbv44anx0sfqssh0xhxg297bvl5slsl7k1vnka4k5fhax6"))))
8312 (build-system ruby-build-system)
8313 (native-inputs (list ruby-covered ruby-rspec))
8314 (propagated-inputs (list ruby-console ruby-mapping))
8315 (synopsis "Flexible option parser for Ruby")
8316 (description "Samovar is a modern framework for building command-line
8317tools and applications. It provides a declarative class-based DSL for
8318building command-line parsers that include automatic documentation generation.
8319It helps you keep your functionality clean and isolated where possible.")
8320 (home-page "https://github.com/ioquatix/samovar")
8321 (license license:expat)))
8322
8323(define-public ruby-sanitize
8324 (package
8325 (name "ruby-sanitize")
8326 (version "7.0.0")
8327 (source (origin
8328 (method git-fetch)
8329 ;; The gem does not include the Rakefile, so we download the
8330 ;; source from Github.
8331 (uri (git-reference
8332 (url "https://github.com/rgrove/sanitize")
8333 (commit (string-append "v" version))))
8334 (file-name (git-file-name name version))
8335 (sha256
8336 (base32
8337 "14598z31g319q7vmn23jriwkm26705ciwy73a8dlsxqhp1wrcv69"))))
8338 (build-system ruby-build-system)
8339 (arguments
8340 (list
8341 #:phases
8342 #~(modify-phases %standard-phases
8343 (add-after 'unpack 'patch
8344 (lambda _
8345 (substitute* "Rakefile"
8346 (("require \"standard/rake\"") "")))))))
8347 (propagated-inputs (list ruby-crass ruby-nokogiri))
8348 (native-inputs (list ruby-minitest))
8349 (home-page "https://github.com/rgrove/sanitize")
8350 (synopsis "Whitelist-based HTML and CSS sanitizer")
8351 (description
8352 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
8353acceptable elements, attributes, and CSS properties, Sanitize will remove all
8354unacceptable HTML and/or CSS from a string.")
8355 (license license:expat)))
8356
8357(define-public ruby-sync
8358 (package
8359 (name "ruby-sync")
8360 (version "0.5.0")
8361 (source
8362 (origin
8363 (method url-fetch)
8364 (uri (rubygems-uri "sync" version))
8365 (sha256
8366 (base32
8367 "1z9qlq4icyiv3hz1znvsq1wz2ccqjb1zwd6gkvnwg6n50z65d0v6"))))
8368 (build-system ruby-build-system)
8369 (synopsis "Ruby module with a two-phase lock and counter")
8370 (description "This package provides a Ruby module that provides a two-phase
8371lock with a counter.")
8372 (home-page "https://github.com/ruby/sync")
8373 (license license:bsd-2)))
8374
8375(define-public ruby-oj
8376 (package
8377 (name "ruby-oj")
8378 (version "3.16.9")
8379 (source
8380 (origin
8381 (method git-fetch)
8382 ;; Version on rubygems.org does not contain Rakefile, so download from
8383 ;; GitHub instead.
8384 (uri (git-reference
8385 (url "https://github.com/ohler55/oj")
8386 (commit (string-append "v" version))))
8387 (file-name (git-file-name name version))
8388 (sha256
8389 (base32
8390 "01zsvzgpn336lk93v8fr4lpjdl28hiq9iddxr7rcra3d28780fzi"))))
8391 (build-system ruby-build-system)
8392 (arguments
8393 '(#:test-target "test_all"
8394 #:phases
8395 (modify-phases %standard-phases
8396 (add-after 'unpack 'patch-bash
8397 (lambda* (#:key inputs #:allow-other-keys)
8398 (substitute* "test/test_writer.rb"
8399 (("/bin/bash")
8400 (search-input-file inputs "bin/bash")))))
8401 (add-before 'check 'disable-bundler
8402 (lambda _
8403 (substitute* "Rakefile"
8404 (("Bundler\\.with_clean_env") "1.times")
8405 (("bundle exec ") "")))))))
8406 (native-inputs
8407 (list bash-minimal bundler ruby-rspec ruby-rake-compiler))
8408 (synopsis "JSON parser for Ruby optimized for speed")
8409 (description
8410 "Oj is a JSON parser and generator for Ruby, where the encoding and
8411decoding of JSON is implemented as a C extension to Ruby.")
8412 (home-page "https://www.ohler.com/oj/")
8413 (license (list license:expat ; Ruby code
8414 license:bsd-3)))) ; extension code
8415
8416(define-public ruby-ox
8417 (package
8418 (name "ruby-ox")
8419 (version "2.14.21")
8420 (source
8421 (origin
8422 (method url-fetch)
8423 (uri (rubygems-uri "ox" version))
8424 (sha256
8425 (base32
8426 "1fd0pjv8svyq8g49zaqfksq9zhxv1rwvsqslvxhimaywggwpmirc"))))
8427 (build-system ruby-build-system)
8428 (arguments
8429 '(#:tests? #f)) ; no tests
8430 (synopsis "Optimized XML library for Ruby")
8431 (description
8432 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
8433written as a native C extension. It was designed to be an alternative to
8434Nokogiri and other Ruby XML parsers for generic XML parsing and as an
8435alternative to Marshal for Object serialization.")
8436 (home-page "https://www.ohler.com/ox")
8437 (license license:expat)))
8438
8439(define-public ruby-redcloth
8440 (package
8441 (name "ruby-redcloth")
8442 (version "4.3.2")
8443 (source (origin
8444 (method url-fetch)
8445 (uri (rubygems-uri "RedCloth" version))
8446 (sha256
8447 (base32
8448 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
8449 (build-system ruby-build-system)
8450 (arguments
8451 `(#:tests? #f ; no tests
8452 #:phases
8453 (modify-phases %standard-phases
8454 ;; Redcloth has complicated rake tasks to build various versions for
8455 ;; multiple targets using RVM. We don't want this so we just use the
8456 ;; existing gemspec.
8457 (replace 'build
8458 (lambda _
8459 (invoke "gem" "build" "redcloth.gemspec"))))))
8460 (native-inputs
8461 `(("bundler" ,bundler)
8462 ("ruby-diff-lcs" ,ruby-diff-lcs)
8463 ("ruby-rspec-2" ,ruby-rspec-2)))
8464 (synopsis "Textile markup language parser for Ruby")
8465 (description
8466 "RedCloth is a Ruby parser for the Textile markup language.")
8467 (home-page "http://redcloth.org")
8468 (license license:expat)))
8469
8470(define-public ruby-pg
8471 (package
8472 (name "ruby-pg")
8473 (version "1.6.3")
8474 (home-page "https://github.com/ged/ruby-pg")
8475 (source
8476 (origin
8477 (method git-fetch)
8478 (uri (git-reference
8479 (url home-page)
8480 (commit (string-append "v" version))))
8481 (file-name (git-file-name name version))
8482 (sha256
8483 (base32 "0nvswm5dv0n3mm8isnnvd8rzw7s47dd5kgma34fhnyhidc6v4pca"))))
8484 (build-system ruby-build-system)
8485 (arguments
8486 (list
8487 #:test-target "spec"
8488 #:phases
8489 #~(modify-phases %standard-phases
8490 (add-before 'build 'compile
8491 (lambda _
8492 (invoke "rake" "compile")))
8493 ;; Some tests rely on postgresql_lib_path.rb, but it is not
8494 ;; available until the gem is installed. Run tests after
8495 ;; installing to work around it.
8496 (delete 'check)
8497 (add-after 'install 'check
8498 (lambda* (#:key tests? #:allow-other-keys)
8499 (let ((new-gem (string-append #$output
8500 "/lib/ruby/vendor_ruby")))
8501 (setenv "GEM_PATH"
8502 (string-append (getenv "GEM_PATH") ":" new-gem))
8503 (when tests?
8504 (invoke "rspec"))))))))
8505 (native-inputs (list ruby-rake-compiler ruby-hoe ruby-rspec))
8506 (inputs (list postgresql))
8507 (synopsis "Ruby interface to PostgreSQL")
8508 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
8509with PostgreSQL 10 and later.")
8510 (license license:ruby)))
8511
8512(define-public ruby-byebug
8513 (package
8514 (name "ruby-byebug")
8515 (version "12.0.0")
8516 (source
8517 (origin
8518 (method git-fetch)
8519 (uri (git-reference
8520 (url "https://github.com/deivid-rodriguez/byebug")
8521 (commit (string-append "v" version))))
8522 (file-name (git-file-name name version))
8523 (sha256
8524 (base32
8525 "0pjdadc079rmasgiwdxcz8h9wvzk3mb6xq8xr02xxv616ihwxllk"))
8526 (modules '((guix build utils)))
8527 (snippet
8528 '(begin
8529 ;; Remove wrappers that try to setup a bundle environment.
8530 (with-directory-excursion "bin"
8531 (for-each delete-file '("rake" "rubocop"))
8532 ;; ruby-minitest doesn't come with a launcher, so fix the one
8533 ;; provided.
8534 (substitute* "minitest"
8535 (("load File\\.expand_path\\(\"bundle\".*") "")
8536 (("require \"bundler/setup\".*") "")))))))
8537 (build-system ruby-build-system)
8538 (arguments
8539 (list
8540 #:phases
8541 #~(modify-phases %standard-phases
8542 (add-after 'unpack 'sanitize-dependencies
8543 (lambda _
8544 (delete-file "tasks/release.rake")
8545 (substitute* "Rakefile"
8546 ((".*tasks/release.rake.*") ""))))
8547 (add-after 'unpack 'skip-tmp-path-sensitive-test
8548 (lambda _
8549 (substitute* "test/commands/where_test.rb"
8550 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
8551 "unless true\n"))))
8552 (add-before 'build 'compile
8553 (lambda _
8554 (invoke "rake" "compile")))
8555 (add-before 'check 'patch-tests
8556 (lambda _
8557 ;; srand': no implicit conversion of nil into Integer (TypeError)
8558 (delete-file "test/minitest_runner_test.rb")
8559 ;; Expects 5, gets 162. From a file containing ~10 lines.
8560 (substitute* "test/commands/finish_test.rb"
8561 (("test_finish_inside_autoloaded_files")
8562 "finish_inside_autoloaded_files"))))
8563 (add-before 'check 'set-home
8564 (lambda _
8565 (setenv "HOME" (getcwd)))))))
8566 (native-inputs
8567 (list bundler
8568 ruby-minitest
8569 ruby-pry
8570 ruby-rake-compiler
8571 ruby-rubocop
8572 ruby-yard))
8573 (synopsis "Debugger for Ruby 2")
8574 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
8575TracePoint C API for execution control and the Debug Inspector C API for call
8576stack navigation. The core component provides support that front-ends can
8577build on. It provides breakpoint handling and bindings for stack frames among
8578other things and it comes with a command line interface.")
8579 (home-page "https://github.com/deivid-rodriguez/byebug")
8580 (license license:bsd-2)))
8581
8582(define-public ruby-netrc
8583 (package
8584 (name "ruby-netrc")
8585 (version "0.11.0")
8586 (source (origin
8587 (method url-fetch)
8588 (uri (rubygems-uri "netrc" version))
8589 (sha256
8590 (base32
8591 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
8592 (build-system ruby-build-system)
8593 (arguments
8594 `(#:phases
8595 (modify-phases %standard-phases
8596 (replace 'check
8597 ;; There is no Rakefile and minitest can only run one file at once,
8598 ;; so we have to iterate over all test files.
8599 (lambda _
8600 (for-each (lambda (file)
8601 (invoke "ruby" "-Itest" file))
8602 (find-files "./test" "test_.*\\.rb"))))
8603 (add-before 'check 'patch-tests-for-newer-ruby
8604 (lambda _
8605 (substitute* "test/test_netrc.rb"
8606 (("Dir.pwd, '.netrc'") "Netrc.home_path, '.netrc'")))))))
8607 (native-inputs
8608 (list ruby-minitest))
8609 (synopsis "Library to read and update netrc files")
8610 (description
8611 "This library can read and update netrc files, preserving formatting
8612including comments and whitespace.")
8613 (home-page "https://github.com/geemus/netrc")
8614 (license license:expat)))
8615
8616(define-public ruby-unf-ext
8617 (package
8618 (name "ruby-unf-ext")
8619 (version "0.0.9.1")
8620 (source (origin
8621 (method url-fetch)
8622 (uri (rubygems-uri "unf_ext" version))
8623 (sha256
8624 (base32
8625 "1sf6bxvf6x8gihv6j63iakixmdddgls58cpxpg32chckb2l18qcj"))))
8626 (build-system ruby-build-system)
8627 (arguments
8628 `(#:phases
8629 (modify-phases %standard-phases
8630 (add-after 'build 'build-ext
8631 (lambda _ (invoke "rake" "compile:unf_ext")))
8632 (add-before 'check 'lose-rake-compiler-dock-dependency
8633 (lambda _
8634 ;; rake-compiler-dock is listed in the gemspec, but only
8635 ;; required when cross-compiling.
8636 (substitute* "unf_ext.gemspec"
8637 ((".*rake-compiler-dock.*") "")))))))
8638 (native-inputs
8639 (list bundler ruby-rake-compiler ruby-test-unit))
8640 (synopsis "Unicode normalization form support library")
8641 (description
8642 "This package provides unicode normalization form support for Ruby.")
8643 (home-page "https://github.com/knu/ruby-unf_ext")
8644 (license license:expat)))
8645
8646(define-public ruby-tdiff
8647 ;; Use a newer than released snapshot so that rspec-2 is not required.
8648 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
8649 (package
8650 (name "ruby-tdiff")
8651 (version (string-append "0.3.3-1." (string-take commit 8)))
8652 (source (origin
8653 (method git-fetch)
8654 (uri (git-reference
8655 (url "https://github.com/postmodern/tdiff")
8656 (commit commit)))
8657 (file-name (string-append name "-" version "-checkout"))
8658 (sha256
8659 (base32
8660 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
8661 (build-system ruby-build-system)
8662 (native-inputs
8663 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8664 (synopsis "Calculate the differences between two tree-like structures")
8665 (description
8666 "This library provides functions to calculate the differences between two
8667tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
8668 (home-page "https://github.com/postmodern/tdiff")
8669 (license license:expat))))
8670
8671(define-public ruby-nokogiri-diff
8672 ;; Use a newer than released snapshot so that rspec-2 is not required.
8673 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
8674 (package
8675 (name "ruby-nokogiri-diff")
8676 (version (string-append "0.2.0-1." (string-take commit 8)))
8677 (source (origin
8678 (method git-fetch)
8679 (uri (git-reference
8680 (url "https://github.com/postmodern/nokogiri-diff")
8681 (commit commit)))
8682 (file-name (string-append name "-" version "-checkout"))
8683 (sha256
8684 (base32
8685 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
8686 (build-system ruby-build-system)
8687 (propagated-inputs
8688 (list ruby-tdiff
8689 ruby-nokogiri))
8690 (native-inputs
8691 (list ruby-rspec ruby-yard/minimal ruby-rubygems-tasks))
8692 (synopsis "Calculate the differences between two XML/HTML documents")
8693 (description
8694 "@code{Nokogiri::Diff} adds the ability to calculate the
8695differences (added or removed nodes) between two XML/HTML documents.")
8696 (home-page "https://github.com/postmodern/nokogiri-diff")
8697 (license license:expat))))
8698
8699(define-public ruby-racc
8700 (package
8701 (name "ruby-racc")
8702 (version "1.8.1")
8703 (source
8704 (origin
8705 (method git-fetch) ;for tests
8706 (uri (git-reference
8707 (url "https://github.com/ruby/racc")
8708 (commit (string-append "v" version))))
8709 (file-name (git-file-name name version))
8710 (sha256
8711 (base32
8712 "1sg2mqp6yxdxrn9kbbsxkd6930fxvm4yjl8knsc0wq6fkipnhm8q"))))
8713 (build-system ruby-build-system)
8714 (arguments
8715 (list
8716 #:phases
8717 #~(modify-phases %standard-phases
8718 (add-before 'build 'compile
8719 (lambda _
8720 (invoke "rake" "compile"))))))
8721 (native-inputs
8722 (list ruby-rake-compiler ruby-test-unit-ruby-core))
8723 (synopsis "LALR(1) parser generator for Ruby")
8724 (description
8725 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
8726generates Ruby program.")
8727 (home-page "https://i.loveruby.net/en/projects/racc/")
8728 (license (list
8729 ;; Generally licensed under the LGPL2.1, and some files also
8730 ;; available under the same license as Ruby.
8731 license:lgpl2.1
8732 license:ruby))))
8733
8734(define-public ruby-rack
8735 (package
8736 (name "ruby-rack")
8737 ;; Do not upgrade to version 3, as Rails doesn't support it yet.
8738 (version "2.2.22")
8739 (source
8740 (origin
8741 (method git-fetch) ;for tests
8742 (uri (git-reference
8743 (url "https://github.com/rack/rack")
8744 (commit (string-append "v" version))))
8745 (file-name (git-file-name name version))
8746 (sha256
8747 (base32
8748 "0b56zbq0pr133839dv2n0qq5326kak7czv92awg12ipghwx5q9gj"))))
8749 (build-system ruby-build-system)
8750 (arguments
8751 (list
8752 #:phases
8753 #~(modify-phases %standard-phases
8754 (add-before 'check 'fix-tests
8755 (lambda _
8756 ;; This test fails in the build environment (and passes outside
8757 ;; of it).
8758 (substitute* "test/spec_files.rb"
8759 (("res.body.must_equal expected_body") ""))
8760 ;; A few of the tests use the length of a file on disk for
8761 ;; Content-Length and Content-Range headers. However, this file
8762 ;; has a shebang in it which an earlier phase patches, growing
8763 ;; the file size from 193 to 239 bytes when the store prefix is
8764 ;; "/gnu/store".
8765 (let ((size-diff (- (string-length (which "ruby"))
8766 (string-length "/usr/bin/env ruby"))))
8767 (substitute* '("test/spec_files.rb")
8768 (("208" bytes)
8769 (number->string (+ (string->number bytes) size-diff)))
8770 (("bytes(.)22-33" all delimiter)
8771 (string-append "bytes"
8772 delimiter
8773 (number->string (+ 22 size-diff))
8774 "-"
8775 (number->string (+ 33 size-diff)))))))))))
8776 (native-inputs
8777 (list ruby-minitest
8778 ruby-minitest-global-expectations
8779 ruby-webrick))
8780 (synopsis "Unified web application interface for Ruby")
8781 (description "Rack provides a minimal, modular and adaptable interface for
8782developing web applications in Ruby. By wrapping HTTP requests and responses,
8783it unifies the API for web servers, web frameworks, and software in between
8784into a single method call.")
8785 (home-page "https://github.com/rack/rack")
8786 (license license:expat)))
8787
8788(define-public ruby-rack-next
8789 (package
8790 (inherit ruby-rack)
8791 (name "ruby-rack")
8792 (version "3.2.5")
8793 (source (origin
8794 (method git-fetch) ;for tests
8795 (uri (git-reference
8796 (url "https://github.com/rack/rack")
8797 (commit (string-append "v" version))))
8798 (file-name (git-file-name name version))
8799 (sha256
8800 (base32
8801 "1l1q3x9k56kwa81r1fpm0z9r92c4r4dryblw5jzcawx1pbvvsh6z"))))
8802 (arguments '())))
8803
8804(define-public ruby-rackup
8805 (package
8806 (name "ruby-rackup")
8807 (version "2.3.1")
8808 (source (origin
8809 (method git-fetch)
8810 (uri (git-reference
8811 (url "https://github.com/rack/rackup")
8812 (commit (string-append "v" version))))
8813 (file-name (git-file-name name version))
8814 (sha256
8815 (base32
8816 "0w8npy6n77wfykq6wb4484rk94raks75n4fsb5xi7kgjg2ngqfg3"))))
8817 (build-system ruby-build-system)
8818 (native-inputs (list ruby-minitest-global-expectations))
8819 (inputs (list ruby-rack-next ruby-webrick))
8820 (synopsis "Command line interface (CLI) for running for Rack applications")
8821 (description "This package provides a command line interface for running
8822for Rack applications.")
8823 (home-page "https://github.com/rack/rackup")
8824 (license license:expat)))
8825
8826(define-public ruby-rackup-1
8827 (package
8828 (inherit ruby-rackup)
8829 (name "ruby-rackup")
8830 (version "1.0.1")
8831 (source (origin
8832 (method git-fetch)
8833 (uri (git-reference
8834 (url "https://github.com/rack/rackup")
8835 (commit (string-append "v" version))))
8836 (file-name (git-file-name name version))
8837 (sha256
8838 (base32
8839 "1xdfxsz7jx2gwfq212y9mca6q0i5s7kyqbfcscy1315awg57ynyp"))))))
8840
8841(define-public ruby-rack-cache
8842 (package
8843 (name "ruby-rack-cache")
8844 (version "1.13.0")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (rubygems-uri "rack-cache" version))
8848 (sha256
8849 (base32
8850 "1cqpax628h2mhnsjfg91c3klxwx2pkvaj061cisb0saqa99b0jgm"))))
8851 (build-system ruby-build-system)
8852 (arguments
8853 (list
8854 ;; The test suite depends on ruby-memcached, which is not available in
8855 ;; Guix and bundles a very dated copy of memcached (undesirable).
8856 #:tests? #f))
8857 (propagated-inputs (list ruby-rack))
8858 (synopsis "Component to enable HTTP caching for Rack-based applications")
8859 (description "Rack::Cache is suitable as a drop-in component to enable
8860HTTP caching for Rack-based applications that produce freshness (Expires,
8861Cache-Control) and/or validation (Last-Modified, ETag) information.")
8862 (home-page "https://github.com/rtomayko/rack-cache")
8863 (license license:expat)))
8864
8865(define-public ruby-rack-test
8866 (package
8867 (name "ruby-rack-test")
8868 (version "2.1.0")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (rubygems-uri "rack-test" version))
8873 (sha256
8874 (base32
8875 "1ysx29gk9k14a14zsp5a8czys140wacvp91fja8xcja0j1hzqq8c"))))
8876 (build-system ruby-build-system)
8877 (arguments
8878 ;; Disable tests because of circular dependencies: requires sinatra,
8879 ;; which requires rack-protection, which requires rack-test. Instead
8880 ;; simply require the library.
8881 `(#:phases
8882 (modify-phases %standard-phases
8883 (replace 'check
8884 (lambda* (#:key tests? #:allow-other-keys)
8885 (when tests?
8886 (invoke "ruby" "-Ilib" "-r" "rack/test")))))))
8887 (propagated-inputs
8888 (list ruby-rack))
8889 (synopsis "Testing API for Rack applications")
8890 (description
8891 "Rack::Test is a small, simple testing API for Rack applications. It can
8892be used on its own or as a reusable starting point for Web frameworks and
8893testing libraries to build on.")
8894 (home-page "https://github.com/rack/rack-test")
8895 (license license:expat)))
8896
8897(define-public ruby-rack-session
8898 (package
8899 (name "ruby-rack-session")
8900 ;; Stay on version 1 until all the rack users such as Rails can use rack 3
8901 ;; (rack-session 2 requires rack 3).
8902 (version "1.0.1")
8903 (source (origin
8904 (method git-fetch) ;for tests
8905 (uri (git-reference
8906 (url "https://github.com/rack/rack-session")
8907 (commit (string-append "v" version))))
8908 (file-name (git-file-name name version))
8909 (sha256
8910 (base32
8911 "0rv955wd7ckp5jgy5c229wmajh48jpcy8s0iv5i8ma61wf7qw0i1"))))
8912 (build-system ruby-build-system)
8913 (native-inputs
8914 (list ruby-minitest-global-expectations
8915 ruby-minitest-sprint))
8916 (propagated-inputs
8917 (list ruby-rack))
8918 (synopsis "Session management for Rack")
8919 (description "This package provides a session management implementation
8920for Rack.")
8921 (home-page "https://github.com/rack/rack-session")
8922 (license license:expat)))
8923
8924(define-public ruby-rack-protection
8925 (package
8926 (name "ruby-rack-protection")
8927 (version "3.0.5")
8928 (source
8929 (origin
8930 (method url-fetch)
8931 (uri (rubygems-uri "rack-protection" version))
8932 (sha256
8933 (base32
8934 "1a12m1mv8dc0g90fs1myvis8vsgr427k1arg1q4a9qlfw6fqyhis"))))
8935 (build-system ruby-build-system)
8936 (arguments
8937 '(;; Tests missing from the gem.
8938 #:tests? #f))
8939 (propagated-inputs
8940 (list ruby-rack))
8941 (native-inputs
8942 (list bundler ruby-rspec-2 ruby-rack-test))
8943 (synopsis "Rack middleware that protects against typical web attacks")
8944 (description "Rack middleware that can be used to protect against typical
8945web attacks. It can protect all Rack apps, including Rails. For instance, it
8946protects against cross site request forgery, cross site scripting,
8947clickjacking, directory traversal, session hijacking and IP spoofing.")
8948 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
8949 (license license:expat)))
8950
8951(define-public ruby-rainbow
8952 (package
8953 (name "ruby-rainbow")
8954 (version "3.1.1")
8955 (source
8956 (origin
8957 (method url-fetch)
8958 (uri (rubygems-uri "rainbow" version))
8959 (sha256
8960 (base32
8961 "0smwg4mii0fm38pyb5fddbmrdpifwv22zv3d3px2xx497am93503"))))
8962 (build-system ruby-build-system)
8963 (arguments
8964 '(#:phases
8965 (modify-phases %standard-phases
8966 ;; Run rspec directly, to avoid requiring Rubocop which is used from
8967 ;; the Rakefile.
8968 (replace 'check
8969 (lambda* (#:key tests? #:allow-other-keys)
8970 (when tests?
8971 (invoke "rspec")))))))
8972 (native-inputs
8973 (list bundler ruby-rspec))
8974 (synopsis "Colorize printed text on ANSI terminals")
8975 (description
8976 "@code{rainbow} provides a string presenter object to colorize strings by
8977wrapping them in ANSI escape codes.")
8978 (home-page "https://github.com/ku1ik/rainbow")
8979 (license license:expat)))
8980
8981(define-public ruby-rr
8982 (package
8983 (name "ruby-rr")
8984 (version "1.2.1")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (rubygems-uri "rr" version))
8989 (sha256
8990 (base32
8991 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
8992 (build-system ruby-build-system)
8993 (arguments
8994 '(#:tests? #f)) ; test files not included
8995 (native-inputs
8996 (list bundler ruby-rspec))
8997 (synopsis "Ruby test double framework")
8998 (description
8999 "RR is a test double framework that features a rich selection of double
9000techniques and a terse syntax.")
9001 (home-page "https://rr.github.io/rr/")
9002 (license license:expat)))
9003
9004(define-public ruby-rest-client
9005 (package
9006 (name "ruby-rest-client")
9007 (version "2.1.0")
9008 (source
9009 (origin
9010 (method url-fetch)
9011 (uri (rubygems-uri "rest-client" version))
9012 (sha256
9013 (base32
9014 "1qs74yzl58agzx9dgjhcpgmzfn61fqkk33k1js2y5yhlvc5l19im"))))
9015 (build-system ruby-build-system)
9016 (arguments
9017 (list
9018 ;; TODO Some tests are currently broken
9019 #:tests? #f
9020 #:phases
9021 #~(modify-phases %standard-phases
9022 (add-before 'check 'remove-unnecessary-development-dependencies
9023 (lambda _
9024 (substitute* "rest-client.gemspec"
9025 ;; Remove rubocop as it's unused. Rubocop also indirectly
9026 ;; depends on this package through ruby-parser and ruby-ast so
9027 ;; this avoids a dependency loop.
9028 ((".*rubocop.*") "\n")
9029 ;; Remove pry as it's unused, it's a debugging tool
9030 ((".*pry.*") "\n")
9031 ;; Remove an unnecessarily strict rdoc dependency
9032 ((".*rdoc.*") "\n"))))
9033 (add-before 'check 'delete-network-dependent-tests
9034 (lambda _
9035 (delete-file "spec/integration/request_spec.rb")
9036 (delete-file "spec/integration/httpbin_spec.rb")))
9037 (replace 'check
9038 (lambda* (#:key tests? #:allow-other-keys)
9039 (when tests?
9040 (invoke "rspec")))))))
9041 (propagated-inputs
9042 (list ruby-http-accept-1
9043 ruby-http-cookie
9044 ruby-mime-types
9045 ruby-netrc))
9046 (native-inputs
9047 (list bundler
9048 ruby-webmock-2
9049 ruby-rspec))
9050 (synopsis "Simple HTTP and REST client for Ruby")
9051 (description
9052 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
9053inspired by the Sinatra microframework style of specifying actions:
9054@code{get}, @code{put}, @code{post}, @code{delete}.")
9055 (home-page "https://github.com/rest-client/rest-client")
9056 (license license:expat)))
9057
9058(define-public ruby-rubocop-ast
9059 (package
9060 (name "ruby-rubocop-ast")
9061 (version "1.37.0")
9062 (source
9063 (origin
9064 (method git-fetch) ;no test suite in distributed gem
9065 (uri (git-reference
9066 (url "https://github.com/rubocop/rubocop-ast")
9067 (commit (string-append "v" version))))
9068 (file-name (git-file-name name version))
9069 (sha256
9070 (base32
9071 "1ww1vxcx6qaih4g68mrbq4xlgrqbv8w7cqxdaz629sazpw2hkycs"))))
9072 (build-system ruby-build-system)
9073 (arguments
9074 `(#:test-target "spec"
9075 #:phases (modify-phases %standard-phases
9076 (add-after 'unpack 'relax-dependencies
9077 (lambda _
9078 (substitute* "Gemfile"
9079 (("gem 'simplecov', '~> 0.10', '< 0.18'")
9080 "gem 'simplecov', '~> 0.10'"))))
9081 (add-before 'build 'generate-lexer
9082 (lambda _
9083 (setenv "RUBOCOP_VERSION" "none")
9084 (invoke "rake" "generate")))
9085 (replace 'replace-git-ls-files
9086 (lambda _
9087 (substitute* "rubocop-ast.gemspec"
9088 (("`git ls-files(.*)`" _ files)
9089 (format #f "`find ~a -type f| sort`" files))))))))
9090 (native-inputs
9091 (list ruby-bump
9092 ruby-oedipus-lex
9093 ruby-prism
9094 ruby-racc
9095 ruby-rake
9096 ruby-rspec
9097 ruby-simplecov))
9098 (propagated-inputs
9099 (list ruby-parser))
9100 (synopsis "RuboCop's AST extensions and NodePattern functionality")
9101 (description "Rubocop::AST extends @code{ruby-parser} with classes used
9102by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
9103@itemize
9104@item @code{RuboCop::AST::Node}
9105@item @code{RuboCop::AST::NodePattern}
9106@end itemize")
9107 (home-page "https://rubocop.org/")
9108 (license license:expat)))
9109
9110(define-public ruby-rexml
9111 (package
9112 (name "ruby-rexml")
9113 (version "3.2.5")
9114 (source
9115 (origin
9116 (method git-fetch) ;no tests in distributed gem
9117 (uri (git-reference
9118 (url "https://github.com/ruby/rexml")
9119 (commit (string-append "v" version))))
9120 (file-name (git-file-name name version))
9121 (sha256
9122 (base32 "13n6vaa80drqic2wri4q6k22qzvsn683vp5s8c9dllil6x04kn0x"))))
9123 (build-system ruby-build-system)
9124 (synopsis "XML toolkit for Ruby")
9125 (description "Inspired by Electric XML library for Java, REXML aims to be
9126easy-to-use API, small and fast. It supports both tree and stream document
9127parsing.")
9128 (home-page "https://github.com/ruby/rexml")
9129 (license license:bsd-2)))
9130
9131(define-public ruby-character-set
9132 (package
9133 (name "ruby-character-set")
9134 (version "1.8.0")
9135 (source
9136 (origin
9137 (method url-fetch)
9138 (uri (rubygems-uri "character_set" version))
9139 (sha256
9140 (base32
9141 "0l9z2pihzc11f0jpq2sx789zwpmwf5nyhsjps45zzvfs5931fwrb"))))
9142 (build-system ruby-build-system)
9143 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
9144 (synopsis "Ruby library to manipulate Unicode")
9145 (description "CharacterSet is a C-extended Ruby library to work with sets
9146of Unicode code points. It can read and write these sets in various formats
9147and implements the @code{stdlib} @code{Set} interface for them. It also
9148offers an alternate paradigm of @code{String} processing which grants much
9149better performance than @code{Regexp} and @code{String} methods from the
9150@code{stdlib} where applicable. Many parts can be used independently, e.g.:
9151@itemize
9152@item @code{CharacterSet::Character}
9153@item @code{CharacterSet::Parser}
9154@item @code{CharacterSet::Writer}
9155@item @code{RangeCompressor}
9156@end itemize")
9157 (home-page "https://github.com/jaynetics/character_set")
9158 (license license:expat)))
9159
9160(define-public ruby-range-compressor
9161 (package
9162 (name "ruby-range-compressor")
9163 (version "1.2.0")
9164 (source
9165 (origin
9166 (method git-fetch)
9167 (uri (git-reference
9168 (url "https://github.com/janosch-x/range_compressor")
9169 (commit (string-append "v" version))))
9170 (file-name (git-file-name name version))
9171 (sha256
9172 (base32
9173 "1zmc44si5ac2h7r1x4f1j8z5yr6wz528c7dssh0g70fmczs3pfga"))))
9174 (build-system ruby-build-system)
9175 (arguments
9176 (list
9177 #:test-target "spec"
9178 #:phases
9179 #~(modify-phases %standard-phases
9180 (add-after 'extract-gemspec 'strip-version-requirements
9181 (lambda _
9182 (substitute* "range_compressor.gemspec"
9183 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
9184 (string-append stripped "\n"))))))))
9185 (native-inputs
9186 (list ruby-rspec
9187 ruby-sorted-set))
9188 (synopsis "Simple arrays of objects to arrays of ranges compressor")
9189 (description "RangeCompresses is a tiny library that allows compressing
9190arrays of objects into arrays of ranges. For example, it can turn the
9191following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
9192 (home-page "https://github.com/janosch-x/range_compressor")
9193 (license license:expat)))
9194
9195(define-public ruby-regexp-property-values
9196 (package
9197 (name "ruby-regexp-property-values")
9198 (version "1.5.2")
9199 (source
9200 (origin
9201 (method git-fetch)
9202 (uri (git-reference ;no test suite in distributed gem
9203 (url "https://github.com/jaynetics/regexp_property_values")
9204 (commit (string-append "v" version))))
9205 (file-name (git-file-name name version))
9206 (sha256
9207 (base32 "039xrhixdr87kcmwqnly3xr8d1681v054ybj7bpvswzrjbnzjffp"))))
9208 (build-system ruby-build-system)
9209 (arguments
9210 '(#:test-target "default"))
9211 (native-inputs
9212 (list ruby-character-set ruby-rake ruby-rake-compiler
9213 ruby-range-compressor ruby-rspec))
9214 (synopsis "Inspect Ruby's regex engine property values")
9215 (description "This small library lets you see which property values are
9216supported by the regular expression engine of the Ruby version you are running
9217and can directly read out their code point ranges. In other words, it
9218determines all supported values for @code{\\p{value}} expressions and what
9219they match.")
9220 (home-page "https://github.com/jaynetics/regexp_property_values")
9221 (license license:expat)))
9222
9223(define-public ruby-regexp-parser
9224 (package
9225 (name "ruby-regexp-parser")
9226 (version "2.9.0")
9227 (source
9228 (origin
9229 (method git-fetch) ;bin/test missing from gem
9230 (uri (git-reference
9231 (url "https://github.com/ammar/regexp_parser")
9232 (commit (string-append "v" version))))
9233 (file-name (git-file-name name version))
9234 (sha256
9235 (base32 "108yjd737f7ky0acijqd5iydnia358szbyc8a80lab2v9dpqs9ax"))))
9236 (build-system ruby-build-system)
9237 (arguments
9238 (list
9239 #:test-target "default"
9240 #:phases
9241 #~(modify-phases %standard-phases
9242 (add-after 'unpack 'find-ragel
9243 (lambda* (#:key inputs #:allow-other-keys)
9244 (substitute* "tasks/ragel.rake"
9245 (("command -v ragel")
9246 (string-append (search-input-file inputs "bin/ragel") " -v")))))
9247 (add-before 'build 'compile-scanner.rb
9248 (lambda _
9249 (invoke "rake" "build")
9250 ;; XXX: This is needed otherwise the install
9251 ;; phase fails to delete the installed cached
9252 ;; gem file.
9253 (delete-file-recursively "pkg"))))))
9254 (native-inputs (list ragel
9255 ruby-ice-nine
9256 ruby-leto
9257 ruby-regexp-property-values
9258 ruby-rspec))
9259 (synopsis "Regular expression parser library for Ruby")
9260 (description "A Ruby gem for tokenizing, parsing, and transforming regular
9261expressions. It comprises the following components:
9262@itemize
9263@item A scanner/tokenizer based on Ragel,
9264@item A lexer that produces a stream of token objects,
9265@item A parser that produces a tree of Expression objects.
9266@end itemize")
9267 (home-page "https://github.com/ammar/regexp_parser")
9268 (license license:expat)))
9269
9270(define-public ruby-test-queue
9271 (package
9272 (name "ruby-test-queue")
9273 (version "0.4.2")
9274 (source
9275 (origin
9276 (method url-fetch)
9277 (uri (rubygems-uri "test-queue" version))
9278 (sha256
9279 (base32
9280 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
9281 (build-system ruby-build-system)
9282 (arguments
9283 '(#:phases
9284 (modify-phases %standard-phases
9285 (replace 'check
9286 (lambda* (#:key tests? #:allow-other-keys)
9287 (when tests?
9288 (invoke "rspec")))))))
9289 (native-inputs
9290 (list ruby-rspec))
9291 (synopsis "Minitest/RSpec parallel test runner for CI environments")
9292 (description "The test-queue module is a parallel test runner,
9293built using a centralized queue to ensure optimal distribution of
9294tests between workers. It is specifically optimized for Continuous
9295Integration (CI) environments: build statistics from each run are
9296stored locally and used to sort the queue at the beginning of the next
9297run.")
9298 (home-page "https://github.com/tmm1/test-queue")
9299 (license license:expat)))
9300
9301(define-public ruby-rubocop
9302 (package
9303 (name "ruby-rubocop")
9304 ;; XXX: Also update ruby-rubocop/minimal in ruby-build.scm.
9305 (version "1.68.0")
9306 (source
9307 (origin
9308 (method git-fetch) ;no tests in distributed gem
9309 (uri (git-reference
9310 (url "https://github.com/rubocop/rubocop")
9311 (commit (string-append "v" version))))
9312 (file-name (git-file-name name version))
9313 (sha256
9314 (base32
9315 "0pfsrgkg2dhb6a2rknciqskgxgmb9kf48rvbkhay9n8n6m712v2w"))))
9316 (build-system ruby-build-system)
9317 (arguments
9318 `(#:test-target "default"
9319 ;; TODO: Figure out why test hangs.
9320 #:tests? ,(not (or (%current-target-system)
9321 (target-riscv64?)))
9322 #:phases
9323 (modify-phases %standard-phases
9324 (add-after 'unpack 'loosen-dependencies
9325 (lambda _
9326 (substitute* "rubocop.gemspec"
9327 (("'unicode\\-display\\_width'.*") "'unicode-display_width')\n"))))
9328 (add-before 'check 'set-home
9329 (lambda _
9330 (setenv "HOME" (getcwd))))
9331 ;; Rubocop depends on itself for tests, directly and indirectly. By
9332 ;; regenerating the TODO list we test rubocop against itself and
9333 ;; forgo adjusting the test suite to our environment each release.
9334 (replace 'check
9335 (lambda* (#:key tests? #:allow-other-keys)
9336 (when tests?
9337 (make-file-writable ".rubocop_todo.yml")
9338 (invoke "./exe/rubocop" "--auto-gen-config")))))))
9339 (native-inputs
9340 (list ruby-pry
9341 ruby-rake
9342 ruby-rspec
9343 ruby-rubocop-ast
9344 ruby-rubocop-capybara-minimal
9345 ruby-rubocop-factory-bot
9346 ruby-rubocop/minimal
9347 ruby-rubocop-performance-minimal
9348 ruby-rubocop-rake-minimal
9349 ruby-rubocop-rspec-minimal
9350 ruby-simplecov
9351 ruby-stackprof
9352 ruby-test-queue
9353 ruby-webmock
9354 ruby-yard))
9355 (propagated-inputs
9356 (list ruby-json
9357 ruby-language-server-protocol
9358 ruby-parallel
9359 ruby-parser
9360 ruby-progressbar
9361 ruby-rainbow
9362 ruby-regexp-parser
9363 ruby-rexml
9364 ruby-rubocop-ast
9365 ruby-unicode-display-width))
9366 (synopsis "Ruby code style checking tool")
9367 (description
9368 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
9369the community-driven Ruby Style Guide.")
9370 (home-page "https://github.com/rubocop/rubocop")
9371 (license license:expat)))
9372
9373(define-public ruby-contest
9374 (package
9375 (name "ruby-contest")
9376 (version "0.1.3")
9377 (source
9378 (origin
9379 (method url-fetch)
9380 (uri (rubygems-uri "contest" version))
9381 (sha256
9382 (base32
9383 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
9384 (build-system ruby-build-system)
9385 (synopsis "Write declarative tests using nested contexts")
9386 (description
9387 "Contest allows writing declarative @code{Test::Unit} tests using nested
9388contexts without performance penalties.")
9389 (home-page "https://github.com/citrusbyte/contest")
9390 (license license:expat)))
9391
9392(define-public ruby-creole
9393 (package
9394 (name "ruby-creole")
9395 (version "0.5.0")
9396 (source
9397 (origin
9398 (method url-fetch)
9399 (uri (rubygems-uri "creole" version))
9400 (sha256
9401 (base32
9402 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
9403 (build-system ruby-build-system)
9404 (native-inputs
9405 (list ruby-bacon))
9406 (synopsis "Creole markup language converter")
9407 (description
9408 "Creole is a lightweight markup language and this library for converting
9409creole to @code{HTML}.")
9410 (home-page "https://github.com/minad/creole")
9411 (license license:ruby)))
9412
9413(define-public ruby-middleware
9414 (package
9415 (name "ruby-middleware")
9416 (version "0.1.0")
9417 (source
9418 (origin
9419 (method url-fetch)
9420 (uri (rubygems-uri "middleware" version))
9421 (sha256
9422 (base32
9423 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
9424 (build-system ruby-build-system)
9425 (arguments '(#:tests? #f)) ;no test suite
9426 (synopsis "Implementation of a middleware abstraction for Ruby")
9427 (description "Middleware is a generalized implementation of a middleware
9428abstraction for Ruby.")
9429 (home-page "https://github.com/mitchellh/middleware")
9430 (license license:expat)))
9431
9432(define-public ruby-benchmark-ips
9433 (package
9434 (name "ruby-benchmark-ips")
9435 (version "2.12.0")
9436 (source
9437 (origin
9438 (method git-fetch) ;no tests in distributed gem
9439 (uri (git-reference
9440 (url "https://github.com/evanphx/benchmark-ips")
9441 (commit (string-append "v" version))))
9442 (file-name (git-file-name name version))
9443 (sha256
9444 (base32
9445 "19pa2a1lgjzrxcz6vxwfiq5qq337vr15bbbpc2mfwzljdlx5059s"))))
9446 (build-system ruby-build-system)
9447 (arguments
9448 (list
9449 #:phases
9450 #~(modify-phases %standard-phases
9451 (add-after 'unpack 'patch
9452 (lambda _
9453 (substitute* "Gemfile"
9454 (("gem 'rake'.*")
9455 "gem 'rake'"))
9456 (substitute* "benchmark-ips.gemspec"
9457 (("git ls-files -- examples lib")
9458 "find examples lib -type f | sort")))))))
9459 (native-inputs
9460 (list ruby-hoe))
9461 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
9462 (description "Benchmark-ips enhances the Ruby Benchmark module with the
9463iterations per second count. For short snippets of code, it can automatically
9464figure out how many times to run the code to get interesting data.")
9465 (home-page "https://github.com/evanphx/benchmark-ips")
9466 (license license:expat)))
9467
9468(define-public ruby-ffi-rzmq-core
9469 (package
9470 (name "ruby-ffi-rzmq-core")
9471 (version "1.0.7")
9472 (source
9473 (origin
9474 (method url-fetch)
9475 (uri (rubygems-uri "ffi-rzmq-core" version))
9476 (sha256
9477 (base32
9478 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
9479 (build-system ruby-build-system)
9480 (arguments
9481 `(#:phases
9482 (modify-phases %standard-phases
9483 (add-after 'unpack 'patch-libzmq-search-path
9484 (lambda* (#:key inputs #:allow-other-keys)
9485 (let ((zeromq (assoc-ref inputs "zeromq")))
9486 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
9487 (("/usr/local/lib")
9488 (string-append zeromq "/lib"))))))
9489 (replace 'check
9490 (lambda _
9491 (invoke "rspec"))))))
9492 (native-inputs
9493 (list ruby-rspec))
9494 (inputs
9495 (list zeromq))
9496 (propagated-inputs (list ruby-ffi))
9497 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
9498 (description "This library only provides the FFI wrapper for the ZeroMQ
9499networking library. It can be used to implement a Ruby API for the ZeroMQ
9500library.")
9501 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
9502 (license license:expat)))
9503
9504(define-public ruby-ffi-rzmq
9505 (package
9506 (name "ruby-ffi-rzmq")
9507 (version "2.0.7")
9508 (source
9509 (origin
9510 (method url-fetch)
9511 (uri (rubygems-uri "ffi-rzmq" version))
9512 (sha256
9513 (base32
9514 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
9515 (build-system ruby-build-system)
9516 (arguments '(#:phases (modify-phases %standard-phases
9517 (replace 'check
9518 (lambda* (#:key tests? #:allow-other-keys)
9519 (when tests?
9520 (invoke "rspec")))))))
9521 (native-inputs
9522 (list ruby-rspec))
9523 (propagated-inputs
9524 (list ruby-ffi-rzmq-core))
9525 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
9526 (description "This library provides a high-level API that wraps the ZeroMQ
9527networking library using the Ruby foreign function interface (FFI). It is a
9528pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
9529for FFI.")
9530 (home-page "https://github.com/chuckremes/ffi-rzmq")
9531 (license license:expat)))
9532
9533(define-public ruby-sawyer
9534 (package
9535 (name "ruby-sawyer")
9536 (version "0.9.2")
9537 (source
9538 (origin
9539 (method url-fetch)
9540 (uri (rubygems-uri "sawyer" version))
9541 (sha256
9542 (base32
9543 "1jks1qjbmqm8f9kvwa81vqj39avaj9wdnzc531xm29a55bb74fps"))))
9544 (build-system ruby-build-system)
9545 (propagated-inputs
9546 (list ruby-addressable ruby-faraday))
9547 (synopsis "Experimental hypermedia agent for Ruby")
9548 (description "Sawyer is an experimental hypermedia agent for Ruby built on
9549top of Faraday.")
9550 (home-page "https://github.com/lostisland/sawyer")
9551 (license license:expat)))
9552
9553(define-public ruby-octokit
9554 (package
9555 (name "ruby-octokit")
9556 (version "6.1.1")
9557 (source (origin
9558 (method git-fetch)
9559 (uri (git-reference
9560 (url "https://github.com/octokit/octokit.rb")
9561 (commit (string-append "v" version))))
9562 (file-name (git-file-name name version))
9563 (sha256
9564 (base32
9565 "02bcmh0b0v80cis1l80lhzxw8adb69xkz6qgg4m7qcmj3y5arwmk"))))
9566 (build-system ruby-build-system)
9567 (arguments
9568 (list
9569 #:phases
9570 #~(modify-phases %standard-phases
9571 (add-after 'unpack 'remove-unnecessary-dependencies
9572 (lambda _
9573 (substitute* "spec/spec_helper.rb"
9574 (("require 'pry-byebug'") "")))))))
9575 (native-inputs
9576 (list ruby-faraday-multipart
9577 ruby-jwt
9578 ruby-mime-types
9579 ruby-multi-json
9580 ruby-netrc
9581 ruby-rbnacl
9582 ruby-rspec
9583 ruby-simplecov
9584 ruby-webmock
9585 ruby-vcr-expat))
9586 (propagated-inputs (list ruby-faraday ruby-sawyer))
9587 (synopsis "Ruby toolkit for the GitHub API")
9588 (description "Octokit wraps the GitHub API in a flat API client that
9589follows Ruby conventions and requires little knowledge of REST.")
9590 (home-page "https://github.com/octokit/octokit.rb")
9591 (license license:expat)))
9592
9593(define-public ruby-hashicorp-checkpoint
9594 (package
9595 (name "ruby-hashicorp-checkpoint")
9596 (version "0.1.5")
9597 (source (origin
9598 (method url-fetch)
9599 (uri (rubygems-uri "hashicorp-checkpoint" version))
9600 (sha256
9601 (base32
9602 "1z6mwzvd7p2wqhmk07dwrhvm0ncgqm7pxn0pr2k025rwsspp9bsd"))))
9603 (build-system ruby-build-system)
9604 (arguments
9605 (list #:tests? #f)) ;; no need to test, useless outside HashiCorp anyway
9606 (synopsis "Internal HashiCorp service to check version information")
9607 (description "This package is probably useless outside of internal
9608HashiCorp use. It is open source for disclosure and because HashiCorp's open
9609source projects must be able to link to it.")
9610 (home-page "https://github.com/hashicorp/ruby-checkpoint")
9611 (license license:mpl2.0)))
9612
9613(define-public ruby-vagrant-cloud
9614 (package
9615 (name "ruby-vagrant-cloud")
9616 (version "3.1.3")
9617 (source (origin
9618 (method git-fetch)
9619 (uri (git-reference
9620 (url "https://github.com/hashicorp/vagrant_cloud")
9621 (commit (string-append "v" version))))
9622 (file-name (git-file-name name version))
9623 (sha256
9624 (base32
9625 "06hlijj4b1z5ki8l4hsjwmjwccs5qbf6h6bjrd22n1x71l3jnm4i"))))
9626 (build-system ruby-build-system)
9627 (arguments
9628 (list
9629 #:test-target "spec"
9630 #:phases
9631 #~(modify-phases %standard-phases
9632 (add-after 'extract-gemspec 'relax-requirements
9633 (lambda _
9634 (substitute* "vagrant_cloud.gemspec"
9635 (("dependency 'rexml', .*")
9636 "dependency 'rexml'\n")))))))
9637 (native-inputs (list ruby-rspec ruby-webmock))
9638 (propagated-inputs (list ruby-excon ruby-log4r ruby-oauth2 ruby-rexml))
9639 (synopsis "Vagrant Cloud API library")
9640 (description "This library provides the functionality to create, modify,
9641and delete boxes, versions, and providers on HashiCorp's Vagrant Cloud.")
9642 (home-page "https://github.com/hashicorp/vagrant_cloud")
9643 (license license:asl2.0)))
9644
9645(define-public ruby-libvirt
9646 (package
9647 (name "ruby-libvirt")
9648 (version "0.8.2")
9649 (source (origin
9650 (method url-fetch)
9651 (uri (rubygems-uri "ruby-libvirt" version))
9652 (sha256
9653 (base32
9654 "0v6vj5vs9v01zr00bflqpfczhwcyc6jdf8k2dqn42lq6d87si77d"))))
9655 (build-system ruby-build-system)
9656 (arguments
9657 (list
9658 #:tests? #f)) ; tests require access to libvirt socket
9659 (native-inputs (list pkg-config))
9660 (inputs (list libvirt))
9661 (synopsis "Ruby bindings for libvirt")
9662 (description "This package provides Ruby language binding for libvirt's
9663native C API.")
9664 (home-page "https://ruby.libvirt.org/")
9665 (license license:lgpl2.1+)))
9666
9667(define-public ruby-fog-core
9668 (package
9669 (name "ruby-fog-core")
9670 (version "2.6.0")
9671 (source (origin
9672 (method git-fetch) ; for tests
9673 (uri (git-reference
9674 (url "https://github.com/fog/fog-core")
9675 (commit (string-append "v" version))))
9676 (file-name (git-file-name name version))
9677 (sha256
9678 (base32
9679 "1k1xivzgmzqk6svaxsgznyvy5911gvsc2rjrc3jm67057wnx9w8c"))))
9680 (build-system ruby-build-system)
9681 (arguments
9682 (list
9683 #:phases
9684 #~(modify-phases %standard-phases
9685 (add-before 'check 'set-home
9686 (lambda _
9687 (setenv "HOME" "/tmp"))))))
9688 (native-inputs (list ruby-minitest-stub-const))
9689 (propagated-inputs (list ruby-builder ruby-excon ruby-formatador
9690 ruby-mime-types))
9691 (synopsis "Shared classes and tests for fog providers and services")
9692 (description "@code{fog} is a Ruby cloud services library. This package
9693provides shared classes and tests for @code{fog} providers and services.")
9694 (home-page "https://github.com/fog/fog-core")
9695 (license license:expat)))
9696
9697(define-public ruby-fog-json
9698 (package
9699 (name "ruby-fog-json")
9700 (version "1.2.0")
9701 (source (origin
9702 (method git-fetch) ; for tests
9703 (uri (git-reference
9704 (url "https://github.com/fog/fog-json")
9705 (commit (string-append "v" version))))
9706 (file-name (git-file-name name version))
9707 (sha256
9708 (base32
9709 "0f4hbmhy22b1gbkzd3pnj5xvljp6bl7inc2y4fxh29nrmcn4pgb0"))))
9710 (build-system ruby-build-system)
9711 (native-inputs (list ruby-minitest))
9712 (propagated-inputs (list ruby-fog-core ruby-multi-json))
9713 (synopsis "JSON parsing tools used by @code{fog} providers")
9714 (description "This package containse the JSON parsing tools shared between
9715a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9716services library.")
9717 (home-page "https://github.com/fog/fog-json")
9718 (license license:expat)))
9719
9720(define-public ruby-fog-xml
9721 (package
9722 (name "ruby-fog-xml")
9723 (version "0.1.5")
9724 (source (origin
9725 (method git-fetch) ; for tests
9726 (uri (git-reference
9727 (url "https://github.com/fog/fog-xml")
9728 (commit (string-append "v" version))))
9729 (file-name (git-file-name name version))
9730 (sha256
9731 (base32
9732 "1v896k9j44axhgvwjvk1j0amy27a9fm6ynv656fxqa1m2wib6dzh"))))
9733 (build-system ruby-build-system)
9734 (arguments
9735 (list
9736 #:phases
9737 #~(modify-phases %standard-phases
9738 (add-after 'unpack 'sanitize-dependencies
9739 (lambda _
9740 (substitute* "fog-xml.gemspec"
9741 ((".*coveralls.*") ""))))
9742 ;; Run tests via bundler so rake picks up the minitest gem from
9743 ;; native-inputs, not the one installed otherwise. This is required
9744 ;; since [email protected] needs minitest@4 and can not be upgraded to
9745 ;; minitest@5.
9746 (replace 'check
9747 (lambda* (#:key tests? #:allow-other-keys)
9748 (when tests?
9749 (invoke "bundle" "exec" "rake")))))))
9750 (native-inputs (list ruby-minitest ruby-pry ruby-coveralls))
9751 (propagated-inputs (list ruby-fog-core ruby-nokogiri))
9752 (synopsis "XML parsing tools used by @code{fog} providers")
9753 (description "This package containse the XML parsing tools shared between
9754a number of providers in the @code{fog} gem. @code{fog} is a Ruby cloud
9755services library.")
9756 (home-page "https://github.com/fog/fog-xml")
9757 (license license:expat)))
9758
9759(define-public ruby-fog-libvirt
9760 (package
9761 (name "ruby-fog-libvirt")
9762 (version "0.15.0")
9763 (source (origin
9764 (method git-fetch) ; for tests
9765 (uri (git-reference
9766 (url "https://github.com/fog/fog-libvirt")
9767 (commit (string-append "v" version))))
9768 (file-name (git-file-name name version))
9769 (sha256
9770 (base32
9771 "1ljv08gg78sgg17wmpg4zv9aabwv1zh754q7i2a2mi1wc0y3z1z8"))))
9772 (build-system ruby-build-system)
9773 (native-inputs (list ruby-minitest-stub-const ruby-mocha ruby-net-ssh
9774 ruby-netrc ruby-octokit ruby-pry ruby-rubocop
9775 ruby-shindo ruby-simplecov ruby-yard ))
9776 (propagated-inputs (list ruby-fog-core ruby-fog-json ruby-fog-xml
9777 ruby-json ruby-libvirt))
9778 (synopsis "Ruby libvirt provider, either standalone or as a module for
9779@code{fog}")
9780 (description "This library can be used as a module for @code{fog} or as
9781standalone libvirt provider. @code{fog} is a Ruby cloud services library.")
9782 (home-page "https://github.com/fog/fog-libvirt")
9783 (license license:expat)))
9784
9785(define-public ruby-pry-byebug
9786 (package
9787 (name "ruby-pry-byebug")
9788 (version "3.11.0")
9789 (source
9790 (origin
9791 (method git-fetch)
9792 (uri (git-reference
9793 (url "https://github.com/deivid-rodriguez/pry-byebug")
9794 (commit (string-append "v" version))))
9795 (file-name (git-file-name name version))
9796 (sha256
9797 (base32
9798 "15vv1lii895bq6bj7j69vh5dcjfaq1dsrk6dy4p40rwzrzdid6nb"))))
9799 (build-system ruby-build-system)
9800 (arguments
9801 `(#:phases (modify-phases %standard-phases
9802 (add-after 'unpack 'sanitize-dependencies
9803 (lambda _
9804 (substitute* "Rakefile"
9805 ((".*chandler/tasks.*") ""))))
9806 (add-before 'check 'set-home
9807 (lambda _
9808 (setenv "HOME" (getcwd)))))))
9809 (native-inputs (list ruby-rubocop ruby-simplecov))
9810 (propagated-inputs (list ruby-byebug ruby-pry))
9811 (synopsis "Step-by-step debugging and stack navigation in Pry")
9812 (description "This package adds step-by-step debugging and stack
9813navigation capabilities to @code{pry}, using @code{byebug}.")
9814 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
9815 (license license:expat)))
9816
9817(define-public ruby-stackprof
9818 (let ((commit "5d832832e4afcb88521292d6dfad4a9af760ef7c")
9819 (revision "0"))
9820 (package
9821 (name "ruby-stackprof")
9822 (version (git-version "0.2.27" revision commit))
9823 (source
9824 (origin
9825 (method git-fetch)
9826 (uri (git-reference
9827 (url "https://github.com/tmm1/stackprof")
9828 (commit commit)))
9829 (file-name (git-file-name name version))
9830 (sha256
9831 (base32 "184n5lpsclrw5ypcskk3gxbg28acxr5jkjaxlxc3nl4jzsjrammw"))))
9832 (build-system ruby-build-system)
9833 (arguments
9834 (list
9835 #:phases
9836 #~(modify-phases %standard-phases
9837 (add-before 'check 'patch-gemspec
9838 (lambda _
9839 (substitute* "stackprof.gemspec"
9840 (("rake-compiler.*")
9841 "rake-compiler', [\"> 0.9\"]\n"))))
9842 (add-before 'check 'skip-dubious-test
9843 (lambda _
9844 (substitute* "test/test_stackprof.rb"
9845 ;; This unreliable test can fail with "Expected 0 to be >= 1."
9846 (("def test_(cputime)" _ name)
9847 (string-append "def skip_" name))
9848 ;; This test often fails
9849 (("def test_gc") "def skip_test_gc")
9850 ;; This test is known to fail on 32-bit systems.
9851 ;; /gnu/store/...-stackprof-0.2.27.gem
9852 (("def test_raw") "def skip_test_raw"))))
9853 (add-before 'check 'build-tests
9854 (lambda _
9855 (invoke "rake" "compile")))
9856 (replace 'check
9857 (lambda* (#:key tests? #:allow-other-keys)
9858 (when tests?
9859 (invoke "bundle" "exec" "rake" "default")))))))
9860 (native-inputs
9861 (list bundler ruby-minitest ruby-rake-compiler))
9862 (synopsis "Sampling profiler for Ruby code")
9863 (description
9864 "@code{stackprof} is a fast sampling profiler for Ruby code, with cpu,
9865wallclock and object allocation samplers.")
9866 (home-page "https://github.com/tmm1/stackprof")
9867 (license license:expat))))
9868
9869(define-public ruby-bindex
9870 (package
9871 (name "ruby-bindex")
9872 (version "0.8.1")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (rubygems-uri "bindex" version))
9877 (sha256
9878 (base32 "0zmirr3m02p52bzq4xgksq4pn8j641rx5d4czk68pv9rqnfwq7kv"))))
9879 (build-system ruby-build-system)
9880 (arguments
9881 (list #:test-target "default"
9882 #:phases
9883 #~(modify-phases %standard-phases
9884 (add-after 'unpack 'avoid-bundler
9885 (lambda _
9886 (substitute* "Rakefile"
9887 (("^Bundler::.*") ""))))
9888 (add-after 'unpack 'patch-minitest
9889 (lambda _
9890 (substitute* "test/test_helper.rb"
9891 (("MiniTest")
9892 "Minitest")))))))
9893 (native-inputs (list bundler ruby-rake-compiler))
9894 (synopsis "Bindings for Ruby exceptions")
9895 (description
9896 "This package provides bindings for any kind of Ruby exceptions.")
9897 (home-page "https://github.com/gsamokovarov/bindex")
9898 (license license:expat)))
9899
9900(define-public ruby-binding-of-caller
9901 (package
9902 (name "ruby-binding-of-caller")
9903 (version "0.8.0")
9904 (source
9905 (origin
9906 (method url-fetch)
9907 (uri (rubygems-uri "binding_of_caller" version))
9908 (sha256
9909 (base32
9910 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
9911 (build-system ruby-build-system)
9912 ;; Attempting to run the test suite fails with a rake deprecation error
9913 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
9914 (arguments '(#:tests? #f))
9915 (propagated-inputs
9916 (list ruby-debug-inspector))
9917 (synopsis "Retrieve the binding of a method's caller")
9918 (description "The @code{binding_of_caller} module provides the
9919@code{Binding#of_caller} method. It allows accessing bindings from upper
9920frames in the call stack and can evaluate code in that context.")
9921 (home-page "https://github.com/banister/binding_of_caller")
9922 (license license:expat)))
9923
9924(define-public ruby-pry-stack-explorer
9925 (package
9926 (name "ruby-pry-stack-explorer")
9927 (version "0.5.1")
9928 (source
9929 (origin
9930 (method url-fetch)
9931 (uri (rubygems-uri "pry-stack_explorer" version))
9932 (sha256
9933 (base32
9934 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
9935 (build-system ruby-build-system)
9936 (arguments '(#:tests? #f)) ;no test suite in gem release
9937 (propagated-inputs
9938 (list ruby-binding-of-caller ruby-pry))
9939 (synopsis "Call-stack navigation plugin for the Pry REPL")
9940 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
9941add support to navigate the call-stack.")
9942 (home-page "https://github.com/pry/pry-stack_explorer")
9943 (license license:expat)))
9944
9945(define-public ruby-varint
9946 (package
9947 (name "ruby-varint")
9948 (version "0.1.1")
9949 (source
9950 (origin
9951 (method url-fetch)
9952 (uri (rubygems-uri "varint" version))
9953 (sha256
9954 (base32
9955 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
9956 (build-system ruby-build-system)
9957 (arguments '(#:tests? #f)) ;no test suite
9958 (synopsis "Variable length integers (varint) C extension for Ruby")
9959 (description "This package provides a small C extension to speed up
9960variable length integers (varint) in Ruby Protocol Buffers.")
9961 (home-page "https://github.com/liquidm/varint")
9962 (license license:bsd-3)))
9963
9964(define-public ruby-version-gem
9965 (package
9966 (name "ruby-version-gem")
9967 (version "1.1.8")
9968 (source (origin
9969 (method git-fetch) ;for tests
9970 (uri (git-reference
9971 (url "https://gitlab.com/oauth-xx/version_gem")
9972 (commit (string-append "v" version))))
9973 (file-name (git-file-name name version))
9974 (sha256
9975 (base32
9976 "1cspiyvixb6q0zyvis5jaa1q35g69jh32m83r8br8hi1yr95fiql"))))
9977 (build-system ruby-build-system)
9978 (arguments
9979 (list
9980 #:phases
9981 #~(modify-phases %standard-phases
9982 (add-before 'build 'drop-signing-key-requirement
9983 (lambda _
9984 (substitute* "version_gem.gemspec"
9985 (("spec.signing_key =.*")
9986 "spec.signing_key = nil")))))))
9987 (native-inputs (list ruby-rspec ruby-rspec-block-is-expected))
9988 (synopsis "Improved @code{Version} module for Ruby")
9989 (description "VersionGem aims to provide introspection of a @code{Version}
9990module based on a @code{Version::VERSION} constant string while not interfering
9991with gemspec parsing where the @code{VERSION} string is traditionally used.")
9992 (home-page "https://gitlab.com/oauth-xx/version_gem")
9993 (license license:expat)))
9994
9995;;; Note: Do NOT update to a newer version; this is the last commit that is
9996;;; still licensed as free software, the project having switched to the
9997;;; Hippocratic license afterward (see:
9998;;; https://github.com/vcr/vcr/issues/959).
9999(define-public ruby-vcr-expat
10000 (let ((revision "0")
10001 (commit-dont-touch "842b2bf89099dc91f2c643d0d85d1abd54eb7e85")) ;
10002 (package
10003 (name "ruby-vcr-expat")
10004 (version (git-version "5.0.0" revision commit-dont-touch))
10005 (source (origin
10006 (method git-fetch)
10007 (uri (git-reference
10008 (url "https://github.com/vcr/vcr")
10009 (commit commit-dont-touch)))
10010 (file-name (git-file-name name version))
10011 (sha256
10012 (base32
10013 "02mzifd2655kjh35bbry01n66jjcjrsw6ncqlybfkjcaqrw2zalv"))))
10014 (build-system ruby-build-system)
10015 (arguments (list #:tests? #f)) ;avoid all dependencies
10016 (home-page "https://github.com/vcr/vcr")
10017 (synopsis "HTTP interaction recorder [old version]")
10018 (description "Record your test suite's HTTP interactions and replay them
10019during future test runs for fast, deterministic, accurate tests. This is an
10020older version of VCR that is free software under the Expat license. The
10021project later switched to the Hippocratic license, which is non-free.
10022@emph{Do not use it in new free software projects}.")
10023 (license license:expat))))
10024
10025(define-public ruby-ruby-prof
10026 (package
10027 (name "ruby-ruby-prof")
10028 (version "1.7.2")
10029 (source
10030 (origin
10031 (method url-fetch)
10032 (uri (rubygems-uri "ruby-prof" version))
10033 (sha256
10034 (base32
10035 "0h23zjwma8car8jpq7af8gw39qi88rn24mass7r13ripmky28117"))))
10036 (build-system ruby-build-system)
10037 (arguments
10038 ;; FIXME: Investigate why the tests fail on i686-linux.
10039 `(#:tests? ,(not (or (%current-target-system)
10040 (target-x86-32?)))
10041 #:phases
10042 (modify-phases %standard-phases
10043 ;; The LineNumbersTest test fails non-deterministically (see:
10044 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
10045 (add-after 'extract-gemspec 'delete-flaky-test
10046 (lambda _
10047 (delete-file "test/line_number_test.rb")
10048 (delete-file "test/measure_process_time_test.rb")
10049 (substitute* "ruby-prof.gemspec"
10050 (("\"test/line_number_test\\.rb\"\\.freeze, ") "")
10051 (("\"test/measure_process_time_test\\.rb\"\\.freeze, ") ""))))
10052 (add-before 'check 'compile
10053 (lambda _
10054 (invoke "rake" "compile"))))))
10055 (native-inputs (list bundler ruby-minitest ruby-rake-compiler ruby-rdoc))
10056 (propagated-inputs (list ruby-base64))
10057 (synopsis "Fast code profiler for Ruby")
10058 (description "RubyProf is a fast code profiler for Ruby. Its features
10059include:
10060@table @asis
10061@item Speed
10062Being a C extension, it is many times faster than the standard Ruby profiler.
10063@item Measurement Modes
10064It can measure program wall time, process time, object allocations and memory
10065usage.
10066@item Reports
10067A variety of text and cross-referenced HTML reports can be generated.
10068@item Threads
10069Profiling multiple threads simultaneously is supported.
10070@end table")
10071 (home-page "https://github.com/ruby-prof/ruby-prof")
10072 (license license:bsd-2)))
10073
10074(define-public ruby-ruby-memcheck
10075 (package
10076 (name "ruby-ruby-memcheck")
10077 (version "1.3.2")
10078 (source (origin
10079 (method git-fetch)
10080 (uri (git-reference
10081 (url "https://github.com/Shopify/ruby_memcheck")
10082 (commit version)))
10083 (file-name (git-file-name name version))
10084 (sha256
10085 (base32
10086 "0fj4j4d062sw2kx2qlj877gjbj1xbb691njr8x9nbah6615idlni"))))
10087 (build-system ruby-build-system)
10088 (arguments
10089 (list
10090 ;; The tests seem to fail on 32bit x86
10091 #:tests? (not (or (target-x86-32?)
10092 (%current-target-system)))
10093 #:phases
10094 #~(modify-phases %standard-phases
10095 (add-after 'unpack 'patch-valgrind-path
10096 (lambda* (#:key inputs #:allow-other-keys)
10097 (substitute* "lib/ruby_memcheck/configuration.rb"
10098 (("DEFAULT_VALGRIND = \"valgrind\"")
10099 (format #f "DEFAULT_VALGRIND = ~s"
10100 (search-input-file inputs "bin/valgrind"))))))
10101 (add-before 'replace-git-ls-files 'standardize-git-ls-files
10102 (lambda _
10103 (substitute* "ruby_memcheck.gemspec"
10104 (("%x\\(git ls-files -z)")
10105 "`git ls-files -z`")))))))
10106 (native-inputs (list ruby-rake-compiler ruby-rspec))
10107 (inputs (list valgrind/pinned))
10108 (propagated-inputs (list ruby-nokogiri))
10109 (synopsis "Valgrind memcheck tool for Ruby")
10110 (description "The @code{ruby_memcheck} gem provides a sane way to use
10111Valgrind's memcheck on your native extension gem, that filters out all the
10112false positives caused by Ruby not freeing all of the memory it allocates
10113during shutdown.")
10114 (home-page "https://github.com/Shopify/ruby_memcheck")
10115 (license license:expat)))
10116
10117(define-public ruby-memory-profiler
10118 (package
10119 (name "ruby-memory-profiler")
10120 (version "1.1.0")
10121 (source
10122 (origin
10123 (method git-fetch)
10124 (uri (git-reference
10125 (url "https://github.com/SamSaffron/memory_profiler")
10126 (commit (string-append "v" version))))
10127 (file-name (git-file-name name version))
10128 (sha256
10129 (base32
10130 "1g9s8j2d892vb34zcwkxkjh3mywvc4p52ggbfzmgqzrdskf2nja6"))))
10131 (build-system ruby-build-system)
10132 (arguments
10133 (list
10134 #:phases
10135 #~(modify-phases %standard-phases
10136 (add-after 'unpack 'skip-flaky-tests
10137 (lambda _
10138 ;; XXX: These tests check the number of logged lines, which
10139 ;; can change with ruby versions.
10140 (for-each delete-file
10141 (list "test/test_reporter.rb"
10142 "test/test_reporter_public_start_stop.rb"
10143 "test/test_reporter_private_start_stop.rb")))))))
10144 (synopsis "Memory profiling routines for Ruby")
10145 (description
10146 "This package provides memory profiling routines for Ruby.")
10147 (home-page "https://github.com/SamSaffron/memory_profiler")
10148 (license license:expat)))
10149
10150(define-public ruby-gherkin-ruby
10151 (package
10152 (name "ruby-gherkin-ruby")
10153 (version "0.3.2")
10154 (home-page "https://github.com/codegram/gherkin-ruby")
10155 (source (origin
10156 (method url-fetch)
10157 (uri (rubygems-uri "gherkin-ruby" version))
10158 (sha256
10159 (base32
10160 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
10161 (build-system ruby-build-system)
10162 (synopsis "Pure Ruby Gherkin parser")
10163 (description
10164 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
10165200 lines of code.")
10166 ;; XXX: No license information anywhere but Readme.md.
10167 (license license:expat)))
10168
10169(define-public ruby-aruba
10170 (package
10171 (name "ruby-aruba")
10172 (version "2.4.1")
10173 (source (origin
10174 (method git-fetch)
10175 (uri (git-reference
10176 (url "https://github.com/cucumber/aruba")
10177 (commit (string-append "v" version))))
10178 (file-name (git-file-name name version))
10179 (sha256
10180 (base32
10181 "08f1a5am9g03ar80q72qljnb466561hwh0dwqsiqls96d9acxz1a"))))
10182 (build-system ruby-build-system)
10183 (arguments
10184 (list
10185 ;; XXX: Only run the "spec" target and not the "cucumber" one, as it is
10186 ;; slow and has multiple unexplained test failures.
10187 #:test-target "spec"
10188 #:phases
10189 #~(modify-phases %standard-phases
10190 (add-after 'unpack 'patch-paths
10191 (lambda _
10192 ;; This test file relies on a dynamically generated script;
10193 ;; patch its #!/bin/bash shebang.
10194 (substitute* "spec/aruba/api/commands_spec.rb"
10195 (("/bin/bash")
10196 (which "bash")))))
10197 (add-after 'extract-gemspec 'relax-constraints
10198 (lambda _
10199 (substitute* "aruba.gemspec"
10200 (("(spec\\.add_dependency 'irb').*" _ dep)
10201 (string-append dep "\n")))))
10202 (add-before 'check 'relax-requirements
10203 ;; Many development requirements are not actually needed.
10204 (lambda _
10205 (substitute* "aruba.gemspec"
10206 (("(spec.*dependency.*simplecov.*,.*),.*" _ minver) minver)
10207 ((".*appraisal.*") "")
10208 ((".*kramdown.*") "")
10209 ((".*rubocop.*") ""))
10210 (substitute* "Rakefile"
10211 (("Bundler\\.setup") "")
10212 ((".*require.*rubocop/rake_task.*") "")
10213 ((".*RuboCop::RakeTask.new.*") ""))
10214 (substitute* "spec/spec_helper.rb"
10215 (("require 'simplecov'") "")
10216 (("SimpleCov.*") ""))))
10217 ;; The tests rely on the Gem being installed, so move the check
10218 ;; phase after the install phase.
10219 (delete 'check)
10220 (add-after 'install 'check
10221 (assoc-ref %standard-phases 'check))
10222 (add-before 'check 'set-GEM_PATH
10223 (lambda _
10224 (setenv "GEM_PATH" (string-append
10225 (getenv "GEM_PATH") ":"
10226 #$output "/lib/ruby/vendor_ruby"))))
10227 (add-before 'check 'set-home
10228 (lambda _
10229 (setenv "HOME" "/tmp"))))))
10230 (native-inputs
10231 (list ruby-rake-manifest
10232 ruby-rspec))
10233 (propagated-inputs
10234 (list ruby-contracts
10235 ruby-cucumber
10236 ruby-irb
10237 ruby-rspec-expectations
10238 ruby-thor))
10239 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
10240 (description
10241 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
10242command-line applications. It supports applications written in any
10243language.")
10244 (home-page "https://github.com/cucumber/aruba")
10245 (license license:expat)))
10246
10247(define-public ruby-memoist3
10248 (package
10249 (name "ruby-memoist3")
10250 (version "1.0.0")
10251 (source
10252 (origin
10253 (method url-fetch)
10254 (uri (rubygems-uri "memoist3" version))
10255 (sha256
10256 (base32 "0vyma0mpjibqigzl6j9lij7zh3kvqlyi88qc0mia6l7i5i044vk8"))))
10257 (build-system ruby-build-system)
10258 (synopsis "Method calling memoization library for Ruby")
10259 (description "Memoist is a memoization Ruby library for repeated method callings.")
10260 (home-page "https://github.com/honzasterba/memoist")
10261 (license license:expat)))
10262
10263(define-public ruby-sys-uname
10264 (package
10265 (name "ruby-sys-uname")
10266 (version "1.5.1")
10267 (source
10268 (origin
10269 (method url-fetch)
10270 (uri (rubygems-uri "sys-uname" version))
10271 (sha256
10272 (base32
10273 "0yvd71lzd2k46940k9l3l3yyjyxc4j1w6nmyrcjkqfdhj5j7wkbq"))))
10274 (build-system ruby-build-system)
10275 (arguments
10276 (list #:test-target "spec"
10277 #:phases #~(modify-phases %standard-phases
10278 (add-before 'check 'remove-rubocop
10279 (lambda _
10280 (substitute* "Rakefile"
10281 (("require 'rubocop/rake_task'") "")
10282 (("RuboCop::RakeTask\\.new") "")))))))
10283 (propagated-inputs (list ruby-ffi ruby-memoist3))
10284 (native-inputs (list ruby-rspec))
10285 (synopsis "Ruby interface for gathering system information")
10286 (description "The sys-uname library provides an interface for gathering
10287information about your current platform. It allows retrieving information
10288such as the OS name, OS version, system name, etc.")
10289 (home-page "https://github.com/djberg96/sys-uname")
10290 (license license:asl2.0)))
10291
10292(define-public ruby-cucumber
10293 (package
10294 (name "ruby-cucumber")
10295 (version "11.1.1")
10296 (source
10297 (origin
10298 (method git-fetch)
10299 (uri (git-reference
10300 (url "https://github.com/cucumber/cucumber-ruby")
10301 (commit (string-append "v" version))))
10302 (file-name (git-file-name name version))
10303 (sha256
10304 (base32
10305 "0n0fan1nvsd29l2rif66mr03ych97gyjw94xvj9xg3jfis8px4sk"))))
10306 (build-system ruby-build-system)
10307 (arguments
10308 (list #:test-target "spec"
10309 #:phases
10310 #~(modify-phases %standard-phases
10311 (add-after 'unpack 'disable-rubocop
10312 ;; Remove extraneous Lint checks.
10313 (lambda _
10314 (substitute* "Rakefile"
10315 (("require 'rubocop/rake_task'")
10316 "")
10317 (("RuboCop::RakeTask.new")
10318 ""))))
10319 (add-before 'check 'set-home
10320 (lambda _
10321 (setenv "HOME" (getcwd)))))))
10322 (propagated-inputs
10323 (list ruby-base64
10324 ruby-builder
10325 ruby-cucumber-ci-environment
10326 ruby-cucumber-core
10327 ruby-cucumber-expressions
10328 ruby-cucumber-html-formatter
10329 ruby-diff-lcs
10330 ruby-logger
10331 ruby-mini-mime
10332 ruby-multi-test
10333 ruby-sys-uname))
10334 (native-inputs
10335 (list ruby-cucumber-compatibility-kit
10336 ruby-nokogiri
10337 ruby-webrick
10338 ruby-rspec))
10339 (synopsis "Describe automated tests in plain language")
10340 (description "Cucumber is a tool for running automated tests written in
10341plain language. It's designed to support a Behaviour Driven Development (BDD)
10342software development workflow.")
10343 (home-page "https://cucumber.io/")
10344 (license license:expat)))
10345
10346(define-public ruby-cucumber-without-tests
10347 (package (inherit ruby-cucumber)
10348 (arguments
10349 '(#:tests? #f))
10350 (native-inputs
10351 '())
10352 (properties '((hidden? . #t)))))
10353
10354(define-public ruby-covered
10355 (package
10356 (name "ruby-covered")
10357 (version "0.20.2")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (rubygems-uri "covered" version))
10361 (sha256
10362 (base32
10363 "04fpj493jn23ah5fq93956a5h2xj3z0hrckvc26fxcfsg5pbwypa"))))
10364 (build-system ruby-build-system)
10365 (arguments
10366 ;; XXX: The test suite is disabled to avoid dependency cycles with
10367 ;; ruby-samovar, through ruby-bake.
10368 (list #:tests? #f
10369 #:phases
10370 #~(modify-phases %standard-phases
10371 (add-after 'extract-gemspec 'relax-requirements
10372 (lambda _
10373 (substitute* ".gemspec"
10374 (("\">= 3.2\"")
10375 "\">= 2.7\"")))))))
10376 (propagated-inputs (list ruby-console ruby-msgpack))
10377 (synopsis "Modern approach to code coverage in Ruby")
10378 (description "Covered uses modern Ruby features to generate comprehensive
10379coverage, including support for templates which are compiled into Ruby. It
10380has the following features:
10381@itemize
10382@item
10383Incremental coverage -- if you run your full test suite, and the run a subset,
10384it will still report the correct coverage - so you can incrementally work on
10385improving coverage.
10386@item
10387Integration with RSpec, Minitest, Travis & Coveralls - no need to configure
10388anything - out of the box support for these platforms.
10389@item
10390It supports coverage of views -- templates compiled to Ruby code can be
10391tracked for coverage reporting.
10392@end itemize")
10393 (home-page "https://github.com/ioquatix/covered")
10394 (license license:expat)))
10395
10396(define-public ruby-coveralls
10397 (package
10398 (name "ruby-coveralls")
10399 (version "0.8.23")
10400 (source
10401 (origin
10402 (method url-fetch)
10403 (uri (rubygems-uri "coveralls" version))
10404 (sha256
10405 (base32
10406 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
10407 (build-system ruby-build-system)
10408 (arguments
10409 (list #:test-target "default"
10410 #:phases #~(modify-phases %standard-phases
10411 (add-after 'extract-gemspec 'disable-problematic-tests
10412 (lambda _
10413 (substitute* "spec/coveralls/coveralls_spec.rb"
10414 ;; This test fails for unknown reasons (perhaps
10415 ;; networking); skip it.
10416 (("it \"sends existing test results\"" all)
10417 (string-append "x" all)))
10418 ;; 3 simplecov tests fail, perhaps due to using a
10419 ;; newer simplecov version.
10420 (delete-file "spec/coveralls/simplecov_spec.rb")
10421 (substitute* "coveralls-ruby.gemspec"
10422 (("\"spec/coveralls/simplecov_spec.rb\".freeze, ")
10423 ""))))
10424 (add-after 'extract-gemspec 'relax-requirements
10425 (lambda _
10426 (substitute* "coveralls-ruby.gemspec"
10427 (("%q<simplecov>.freeze, \\[\"~> 0.16.1\"]")
10428 "%q<simplecov>.freeze")))))))
10429 (native-inputs
10430 (list git-minimal/pinned
10431 ruby-pry
10432 ruby-rspec
10433 ruby-truthy
10434 ruby-vcr-expat
10435 ruby-webmock))
10436 (propagated-inputs
10437 (list ruby-json
10438 ruby-term-ansicolor
10439 ruby-thor
10440 ruby-tins
10441 ruby-simplecov))
10442 (synopsis "Ruby implementation of the Coveralls API")
10443 (description "This package provides a Ruby implementation of the Coveralls
10444API.")
10445 (home-page "https://coveralls.io")
10446 (license license:expat)))
10447
10448(define-public ruby-skiptrace
10449 (package
10450 (name "ruby-skiptrace")
10451 (version "0.8.1")
10452 (source
10453 (origin
10454 (method url-fetch)
10455 (uri (rubygems-uri "skiptrace" version))
10456 (sha256
10457 (base32
10458 "1qpjy6pqd8hx4w7bai64jsr10mwbpnnb65wcbssyqcnalimi1s12"))))
10459 (build-system ruby-build-system)
10460 (arguments
10461 (list
10462 #:phases
10463 #~(modify-phases %standard-phases
10464 (add-after 'unpack 'remove-git-from-gemspec
10465 (lambda _
10466 (substitute* "skiptrace.gemspec"
10467 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
10468 (add-after 'unpack 'patch-minitest
10469 (lambda _
10470 (substitute* "test/test_helper.rb"
10471 (("MiniTest")
10472 "Minitest"))))
10473 (replace 'check
10474 (lambda* (#:key tests? #:allow-other-keys)
10475 (when tests?
10476 (invoke "bundle" "exec" "rake" "default")))))))
10477 (native-inputs
10478 (list bundler ruby-rake-compiler))
10479 (synopsis "Provides access for bindings relating to Ruby exceptions")
10480 (description
10481 "@code{skiptrace} provides a way to access the bindings that relate to
10482exceptions in Ruby, providing more information about the context in which the
10483exception occurred.")
10484 (home-page "https://github.com/gsamokovarov/skiptrace")
10485 (license license:expat)))
10486
10487(define-public ruby-bio-logger
10488 (package
10489 (name "ruby-bio-logger")
10490 (version "1.0.1")
10491 (source
10492 (origin
10493 (method url-fetch)
10494 (uri (rubygems-uri "bio-logger" version))
10495 (sha256
10496 (base32
10497 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
10498 (build-system ruby-build-system)
10499 (arguments
10500 `(#:tests? #f)) ; rake errors, missing shoulda
10501 (propagated-inputs
10502 (list ruby-log4r))
10503 (synopsis "Log4r wrapper for Ruby")
10504 (description "Bio-logger is a wrapper around Log4r adding extra logging
10505features such as filtering and fine grained logging.")
10506 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
10507 (license license:expat)))
10508
10509(define-public ruby-yajl-ruby
10510 (package
10511 (name "ruby-yajl-ruby")
10512 (version "1.4.3")
10513 (source
10514 (origin
10515 (method url-fetch)
10516 (uri (rubygems-uri "yajl-ruby" version))
10517 (sha256
10518 (base32
10519 "1lni4jbyrlph7sz8y49q84pb0sbj82lgwvnjnsiv01xf26f4v5wc"))))
10520 (build-system ruby-build-system)
10521 (arguments
10522 (list
10523 #:test-target "spec"
10524 #:phases
10525 #~(modify-phases %standard-phases
10526 (add-before 'check 'patch-test-to-update-load-path
10527 (lambda _
10528 (substitute* "spec/parsing/large_number_spec.rb"
10529 (("require \"yajl\"")
10530 "$LOAD_PATH << 'lib'; require 'yajl'")))))))
10531 (native-inputs
10532 (list ruby-rake-compiler ruby-rspec))
10533 (synopsis "Streaming JSON parsing and encoding library for Ruby")
10534 (description
10535 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
10536is compatible with the JSON gem, so yajl-ruby can act as a drop in
10537replacement.
10538
10539A modified copy of yajl is used, and included in the package.")
10540 (home-page "https://github.com/brianmario/yajl-ruby")
10541 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
10542 license:bsd-3)))) ; Included, modified copy of yajl
10543
10544(define-public ruby-yard
10545 (package
10546 (name "ruby-yard")
10547 (version "0.9.37")
10548 (source
10549 (origin
10550 (method git-fetch)
10551 ;; Tests do not pass if we build from the distributed gem.
10552 (uri (git-reference
10553 (url "https://github.com/lsegal/yard")
10554 (commit (string-append "v" version))))
10555 (file-name (git-file-name name version))
10556 (sha256
10557 (base32
10558 "04255dmxrkjyw3175d17hlmss66qvcy41jawfkxi3pp3nhlznir8"))))
10559 (build-system ruby-build-system)
10560 (arguments
10561 (list
10562 #:test-target "default"
10563 #:phases
10564 #~(modify-phases %standard-phases
10565 (add-after 'unpack 'do-not-set-date-in-gemspec
10566 ;; Fix a reproducibility issue (see:
10567 ;; https://github.com/lsegal/yard/issues/1343).
10568 (lambda _
10569 (substitute* "yard.gemspec"
10570 ((".*s\\.date.*") ""))))
10571 (add-before 'check 'prepare-for-tests
10572 (lambda* (#:key tests? #:allow-other-keys)
10573 (when tests?
10574 (substitute* "Rakefile"
10575 ((".*[Ss]amus.*") ""))
10576 ;; Delete the Gemfile to avoid errors relating to it.
10577 (delete-file "Gemfile")
10578 ;; $HOME needs to be set to somewhere writeable for tests to
10579 ;; run.
10580 (setenv "HOME" "/tmp")
10581 ;; This test fails
10582 ;; #<File (class)> received :open with unexpected arguments
10583 ;; expected: ("gem1.gem", "rb")
10584 ;; got: ("/gnu/store/.../lib/ruby/vendor_ruby/specifications/asciidoctor-2.0.18.gemspec", "r:UTF-8:-")
10585 (substitute* "spec/cli/diff_spec.rb"
10586 (("it \"searches for .gem file")
10587 "xit \"searches for .gem file"))))))))
10588 (native-inputs
10589 (list ruby-rspec
10590 ruby-rack
10591 ruby-redcloth
10592 ruby-webrick
10593 ruby-asciidoctor/minimal))
10594 (synopsis "Documentation generation tool for Ruby")
10595 (description "YARD is a documentation generation tool for the Ruby
10596programming language. It enables the user to generate consistent, usable
10597documentation that can be exported to a number of formats very easily, and
10598also supports extending for custom Ruby constructs such as custom class level
10599definitions.")
10600 (home-page "https://yardoc.org")
10601 (license license:expat)))
10602
10603(define-public ruby-yard/minimal
10604 (hidden-package
10605 (package
10606 (inherit ruby-yard)
10607 (arguments
10608 (ensure-keyword-arguments
10609 (package-arguments ruby-yard)
10610 (list #:tests? #f)))
10611 (native-inputs '()))))
10612
10613(define-public ruby-spectroscope
10614 (package
10615 (name "ruby-spectroscope")
10616 (version "0.1.0")
10617 (source
10618 (origin
10619 (method url-fetch)
10620 (uri (rubygems-uri "spectroscope" version))
10621 (sha256
10622 (base32
10623 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
10624 (build-system ruby-build-system)
10625 (arguments
10626 `(#:phases
10627 (modify-phases %standard-phases
10628 (replace 'check
10629 (lambda _
10630 (with-output-to-file ".test"
10631 (lambda _
10632 (display
10633 "\
10634require 'ae/should'
10635require 'rspec'
10636
10637include RSpec
10638
10639Test.run :default do |run|
10640 run.files << 'spec/*_spec.rb'
10641end")))
10642 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
10643 (native-inputs
10644 (list ruby-ae ruby-rspec))
10645 (propagated-inputs
10646 (list ruby-rubytest))
10647 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
10648 (description "Spectroscope is a Behavior-Driven Development (BDD)
10649framework built on RubyTest, designed to emulate RSpec in most respects. It
10650is assertion framework independent so any number of assertion systems can be
10651used, such as Assay or AE.")
10652 (home-page "http://rubyworks.github.com/spectroscope/")
10653 (license license:bsd-2)))
10654
10655(define-public ruby-tomparse
10656 (package
10657 (name "ruby-tomparse")
10658 (version "0.4.2")
10659 (source
10660 (origin
10661 (method url-fetch)
10662 (uri (rubygems-uri "tomparse" version))
10663 (sha256
10664 (base32
10665 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
10666 (build-system ruby-build-system)
10667 ;; TODO: Tests require citron and rulebow, not yet packaged.
10668 (arguments '(#:tests? #f))
10669 (synopsis "TomDoc parser for Ruby")
10670 (description "TomParse is a TomDoc parser for Ruby. It takes a code
10671comment as input and parses it into a convenient object-oriented structure in
10672accordance with the TomDoc standard. See
10673@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
10674TomDoc format.")
10675 (home-page "http://rubyworks.github.com/tomparse/")
10676 (license license:bsd-2)))
10677
10678(define-public ruby-yard-tomdoc
10679 (package
10680 (name "ruby-yard-tomdoc")
10681 (version "0.7.1")
10682 (source
10683 (origin
10684 (method url-fetch)
10685 (uri (rubygems-uri "yard-tomdoc" version))
10686 (sha256
10687 (base32
10688 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
10689 (build-system ruby-build-system)
10690 (arguments
10691 `(#:phases (modify-phases %standard-phases
10692 (replace 'check
10693 (lambda _
10694 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
10695 (native-inputs
10696 (list ruby-rubytest-cli ruby-spectroscope ruby-ae))
10697 (propagated-inputs
10698 (list ruby-tomparse ruby-yard))
10699 (synopsis "TomDoc syntax for YARD")
10700 (description "This module adds support for the TomDoc documentation format
10701to YARD, a documentation generation tool for Ruby.")
10702 (home-page "http://rubyworks.github.com/yard-tomdoc/")
10703 (license license:expat)))
10704
10705(define-public ruby-clap
10706 (package
10707 (name "ruby-clap")
10708 (version "1.0.0")
10709 (source (origin
10710 (method url-fetch)
10711 (uri (rubygems-uri "clap" version))
10712 (sha256
10713 (base32
10714 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
10715 (build-system ruby-build-system)
10716 ;; Clap needs cutest for running tests, but cutest needs clap.
10717 (arguments `(#:tests? #f))
10718 (synopsis "Command line argument parsing for simple applications")
10719 (description
10720 "Clap provides command line argument parsing features. It covers the
10721simple case of executing code based on the flags or parameters passed.")
10722 (home-page "https://github.com/djanowski/cutest")
10723 (license license:expat)))
10724
10725(define-public ruby-cutest
10726 (package
10727 (name "ruby-cutest")
10728 (version "1.2.2")
10729 (source (origin
10730 (method url-fetch)
10731 (uri (rubygems-uri "cutest" version))
10732 (sha256
10733 (base32
10734 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
10735 (build-system ruby-build-system)
10736 (propagated-inputs
10737 (list ruby-clap))
10738 (synopsis "Run tests in separate processes")
10739 (description
10740 "Cutest runs tests in separate processes to avoid shared state.")
10741 (home-page "https://github.com/djanowski/cutest")
10742 (license license:expat)))
10743
10744(define-public ruby-pygmentize
10745 (package
10746 (name "ruby-pygmentize")
10747 (version "0.0.3")
10748 (source (origin
10749 (method url-fetch)
10750 (uri (rubygems-uri "pygmentize" version))
10751 (sha256
10752 (base32
10753 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
10754 (build-system ruby-build-system)
10755 (arguments
10756 `(#:phases
10757 (modify-phases %standard-phases
10758 (add-after 'unpack 'fix-pygmentize-path
10759 (lambda _
10760 (substitute* "lib/pygmentize.rb"
10761 (("\"/usr/bin/env python.*")
10762 (string-append "\"" (which "pygmentize") "\"\n")))))
10763 (add-after 'build 'do-not-use-vendor-directory
10764 (lambda _
10765 ;; Remove bundled pygments sources
10766 ;; FIXME: ruby-build-system does not support snippets.
10767 (delete-file-recursively "vendor")
10768 (substitute* "pygmentize.gemspec"
10769 (("\"vendor/\\*\\*/\\*\",") "")))))))
10770 (inputs
10771 `(("pygments" ,python-pygments)))
10772 (native-inputs
10773 (list ruby-cutest ruby-nokogiri))
10774 (synopsis "Thin Ruby wrapper around pygmentize")
10775 (description
10776 "Pygmentize provides a simple way to call pygmentize from within a Ruby
10777application.")
10778 (home-page "https://github.com/djanowski/pygmentize")
10779 (license license:expat)))
10780
10781(define-public ruby-event-emitter
10782 (package
10783 (name "ruby-event-emitter")
10784 (version "0.2.6")
10785 (source (origin
10786 (method url-fetch)
10787 (uri (rubygems-uri "event_emitter" version))
10788 (sha256
10789 (base32
10790 "148k9qv8102l3m6klc24dwip79f9y4bjr5z19dckd7ffbjyrf9n7"))))
10791 (build-system ruby-build-system)
10792 (arguments
10793 (list #:phases #~(modify-phases %standard-phases
10794 (add-after 'unpack 'patch-minitest
10795 (lambda _
10796 (substitute* (find-files "test" "\\.rb$")
10797 (("MiniTest")
10798 "Minitest"))))
10799 (add-after 'extract-gemspec 'relax-requirements
10800 (lambda _
10801 (substitute* "event_emitter.gemspec"
10802 (("~> 1.15") ">= 1.15")))))))
10803 (synopsis "Ruby port of EventEmitter from Node.js")
10804 (description
10805 "This package provides a Ruby port of EventEmitter from Node.js.")
10806 (home-page "https://shokai.github.io/event_emitter/")
10807 (license license:expat)))
10808
10809(define-public ruby-eventmachine
10810 (package
10811 (name "ruby-eventmachine")
10812 (version "1.2.7")
10813 (source
10814 (origin
10815 (method url-fetch)
10816 (uri (rubygems-uri "eventmachine" version))
10817 (sha256
10818 (base32
10819 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
10820 (build-system ruby-build-system)
10821 (arguments
10822 '(#:tests? #f)) ; test suite tries to connect to google.com
10823 (inputs
10824 (list openssl))
10825 (native-inputs
10826 (list ruby-rake-compiler))
10827 (synopsis "Single-threaded network event framework for Ruby")
10828 (description
10829 "EventMachine implements a single-threaded engine for arbitrary network
10830communications. EventMachine wraps all interactions with sockets, allowing
10831programs to concentrate on the implementation of network protocols. It can be
10832used to create both network servers and clients.")
10833 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
10834 (home-page "https://github.com/eventmachine/eventmachine")
10835 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
10836
10837(define-public ruby-ruby-engine
10838 (package
10839 (name "ruby-ruby-engine")
10840 (version "2.0.3")
10841 (source
10842 (origin
10843 (method url-fetch)
10844 (uri (rubygems-uri "ruby_engine" version))
10845 (sha256
10846 (base32 "1ala4zx6gdq271n2bh2x4h1v9j2rbmnx71m1nszw5kfgz3gffana"))))
10847 (build-system ruby-build-system)
10848 (arguments
10849 `(#:phases
10850 (modify-phases %standard-phases
10851 (add-after 'extract-gemspec 'clean-up
10852 (lambda _
10853 (delete-file "Gemfile.lock")
10854 (substitute* "ruby_engine.gemspec"
10855 ;; Remove unnecessary imports that would entail further
10856 ;; dependencies.
10857 ((".*<rdoc.*") "")
10858 ((".*<rubygems-tasks.*") "")
10859 (("\"Gemfile.lock\".freeze, ") "")
10860 ;; Soften rake/rspec dependencies
10861 (("%q<(rake|rspec)>.freeze, \\[\"~> .*\"\\.freeze\\]" all dep)
10862 (format #f "~s" dep)))
10863 (substitute* "Rakefile"
10864 (("require 'rubygems/tasks'") "")
10865 (("Gem::Tasks.new") "")))))))
10866 (native-inputs
10867 (list bundler ruby-rake ruby-rspec))
10868 (synopsis "Simplifies checking for Ruby implementation")
10869 (description
10870 "@code{ruby_engine} provides an RubyEngine class that can be used to
10871check which implementation of Ruby is in use. It can provide the interpreter
10872name and provides query methods such as @code{RubyEngine.mri?}.")
10873 (home-page "https://github.com/janlelis/ruby_engine")
10874 (license license:expat)))
10875
10876(define-public ruby-mimemagic
10877 (package
10878 (name "ruby-mimemagic")
10879 (version "0.3.3")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (rubygems-uri "mimemagic" version))
10884 (sha256
10885 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
10886 (build-system ruby-build-system)
10887 (arguments
10888 '(#:phases
10889 (modify-phases %standard-phases
10890 ;; This phase breaks the tests, as it patches some of the test data.
10891 (delete 'patch-source-shebangs))))
10892 (native-inputs
10893 (list ruby-bacon))
10894 (synopsis "Ruby library for MIME detection by extension or content")
10895 (description
10896 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
10897extension or content, using the freedesktop.org.xml shared-mime-info
10898database.")
10899 (home-page "https://github.com/minad/mimemagic")
10900 (license license:expat)))
10901
10902(define-public ruby-mini-mime
10903 (package
10904 (name "ruby-mini-mime")
10905 (version "1.1.2")
10906 (source
10907 (origin
10908 (method url-fetch)
10909 (uri (rubygems-uri "mini_mime" version))
10910 (sha256
10911 (base32
10912 "0lbim375gw2dk6383qirz13hgdmxlan0vc5da2l072j3qw6fqjm5"))))
10913 (build-system ruby-build-system)
10914 (synopsis "Lightweight mime type lookup toy")
10915 (description "This package provides a lightweight mime type lookup toy.")
10916 (home-page "https://github.com/discourse/mini_mime")
10917 (license license:expat)))
10918
10919(define-public ruby-fileutils
10920 (package
10921 (name "ruby-fileutils")
10922 (version "1.7.0")
10923 (source (origin
10924 (method git-fetch) ;for tests
10925 (uri (git-reference
10926 (url "https://github.com/ruby/fileutils")
10927 (commit (string-append "v" version))))
10928 (file-name (git-file-name name version))
10929 (sha256
10930 (base32
10931 "0m68gaqclnc2wflilmrnr19kky2gr6fjf6k3yq02sf9scs281kid"))))
10932 (build-system ruby-build-system)
10933 (arguments
10934 (list
10935 #:phases
10936 #~(modify-phases %standard-phases
10937 (add-before 'check 'disable-problematic-tests
10938 (lambda _
10939 (substitute* "test/fileutils/test_fileutils.rb"
10940 ;; The 'test_chown' tests depends on /etc/groups, which
10941 ;; doesn't exist in the build environment.
10942 (("def test_chown.*" all)
10943 (string-append all " return true\n"))
10944 ;; The 'test_cp_r_dev' expects a RuntimeError to be raised
10945 ;; when copying a char device to a directory, but this is not
10946 ;; triggered in the build environment, for reasons unknown.
10947 (("def test_cp_r_dev.*" all)
10948 (string-append all " return true\n"))))))))
10949 (synopsis "Ruby utility library to manipulate files")
10950 (description "The FileUtils Ruby library includes Several file utility
10951methods for copying, moving, removing, etc.")
10952 (home-page "https://github.com/ruby/fileutils")
10953 (license license:bsd-2)))
10954
10955(define-public ruby-sqlite3
10956 (package
10957 (name "ruby-sqlite3")
10958 (version "2.5.0")
10959 (source
10960 (origin
10961 (method git-fetch) ;for tests
10962 (uri (git-reference
10963 (url "https://github.com/sparklemotion/sqlite3-ruby")
10964 (commit (string-append "v" version))))
10965 (file-name (git-file-name name version))
10966 (sha256
10967 (base32
10968 "1fanv7bv5lszd5g752yy8nmpjhrl9gqwbbkbis2xbh83y96f2zfm"))))
10969 (build-system ruby-build-system)
10970 (arguments
10971 (list
10972 #:gem-flags #~(list "--" "--enable-system-libraries")
10973 #:modules '((guix build ruby-build-system)
10974 (guix build utils)
10975 (ice-9 rdelim)
10976 (ice-9 textual-ports))
10977 #:phases
10978 #~(modify-phases %standard-phases
10979 (add-after 'unpack 'relax-requirements
10980 (lambda _
10981 ;; Don't try to format C code, remove rubocop-rake.
10982 (delete-file "rakelib/format.rake")
10983 ;; Don't try to run valgrind-like memory tests.
10984 ;; This cuts all lines after Minitest::TestTask.create
10985 (with-atomic-file-replacement
10986 "rakelib/test.rake"
10987 (lambda (in out)
10988 (let loop ()
10989 (let ((line (read-line in)))
10990 (cond
10991 ((eof-object? line) #f)
10992 ((string-prefix? "Minitest::TestTask.create" line) #f)
10993 (else
10994 (format out "~a~%" line)
10995 (loop)))))))))
10996 (delete 'check)
10997 (add-after 'install 'check
10998 (lambda* (#:key tests? #:allow-other-keys)
10999 (when tests?
11000 (setenv "GEM_PATH"
11001 (string-append (getenv "GEM_PATH") ":"
11002 #$output "/lib/ruby/vendor_ruby"))
11003 (invoke "rake" "test")))))))
11004 (propagated-inputs
11005 (list ruby-mini-portile-2))
11006 (inputs
11007 (list sqlite))
11008 (native-inputs
11009 (list ruby-hoe
11010 ruby-rake-compiler
11011 ruby-rake-compiler-dock))
11012 (synopsis "Interface with SQLite3 databases")
11013 (description
11014 "This module allows Ruby programs to interface with the SQLite3 database
11015engine.")
11016 (home-page
11017 "https://github.com/sparklemotion/sqlite3-ruby")
11018 (license license:bsd-3)))
11019
11020(define-public ruby-sqlite3-1.4
11021 (package/inherit ruby-sqlite3
11022 (name "ruby-sqlite3")
11023 (version "1.4.4")
11024 (source
11025 (origin
11026 (method git-fetch) ;for tests
11027 (uri (git-reference
11028 (url "https://github.com/sparklemotion/sqlite3-ruby")
11029 (commit (string-append "v" version))))
11030 (file-name (git-file-name name version))
11031 (sha256
11032 (base32
11033 "0ngirjbai3f5ki2sf6m4gxbbrjpr3b35bz5nrz1cifyw1jk6a6sr"))))
11034 (arguments
11035 (substitute-keyword-arguments arguments
11036 ((#:tests? #t #t) #f)
11037 ((#:gem-flags _ #f)
11038 ''("--"
11039 "--enable-system-libraries"
11040 "--with-cflags=-Wno-error=incompatible-pointer-types -Wno-error=int-conversion"))
11041 ((#:phases phases #~%standard-phases)
11042 #~(modify-phases #$phases
11043 (delete 'relax-requirements)
11044 (add-after 'unpack 'fix-version
11045 (lambda _
11046 (substitute* "sqlite3.gemspec"
11047 (("s\\.version = .*")
11048 (format #f "s.version = ~s~%" #$version)))))))))))
11049
11050(define-public ruby-shoulda-context
11051 (package
11052 (name "ruby-shoulda-context")
11053 (version "2.0.0")
11054 (source
11055 (origin
11056 (method url-fetch)
11057 (uri (rubygems-uri "shoulda-context" version))
11058 (sha256
11059 (base32
11060 "0d1clcp92jv8756h09kbc55qiqncn666alx0s83za06q5hs4bpvs"))))
11061 (build-system ruby-build-system)
11062 (arguments
11063 `(#:phases
11064 (modify-phases %standard-phases
11065 (replace 'check
11066 (lambda* (#:key tests? #:allow-other-keys)
11067 (when tests?
11068 ;; Do not run tests to avoid circular dependence with rails.
11069 ;; Instead just import the library to test.
11070 (invoke "ruby" "-Ilib" "-r" "shoulda-context")))))))
11071 (synopsis "Test::Unit context framework extracted from Shoulda")
11072 (description
11073 "@code{shoulda-context} is the context framework extracted from Shoulda.
11074Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
11075context, setup, and should blocks combine to produce natural test method
11076names.")
11077 (home-page "https://github.com/thoughtbot/shoulda-context")
11078 (license license:expat)))
11079
11080(define-public ruby-shoulda-matchers
11081 (package
11082 (name "ruby-shoulda-matchers")
11083 (version "5.3.0")
11084 (source
11085 (origin
11086 (method url-fetch)
11087 (uri (rubygems-uri "shoulda-matchers" version))
11088 (sha256
11089 (base32
11090 "11igjgh16dl5pwqizdmclzlzpv7mbmnh8fx7m9b5kfsjhwxqdfpn"))))
11091 (build-system ruby-build-system)
11092 (arguments
11093 `(#:phases
11094 (modify-phases %standard-phases
11095 (replace 'check
11096 (lambda* (#:key tests? #:allow-other-keys)
11097 (when tests?
11098 ;; Do not run tests to avoid circular dependence with rails. Instead
11099 ;; just import the library to test.
11100 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
11101 (propagated-inputs
11102 (list ruby-activesupport))
11103 (synopsis "Collection of testing matchers extracted from Shoulda")
11104 (description
11105 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
11106test common Rails functionality. These tests would otherwise be much longer,
11107more complex, and error-prone.")
11108 (home-page "https://github.com/thoughtbot/shoulda-matchers")
11109 (license license:expat)))
11110
11111(define-public ruby-shoulda
11112 (package
11113 (name "ruby-shoulda")
11114 (version "4.0.0")
11115 (source
11116 (origin
11117 (method url-fetch)
11118 (uri (rubygems-uri "shoulda" version))
11119 (sha256
11120 (base32
11121 "02lww34kn1g6lidp4rx4rs6bqvirrzxlfw1y2wm11aif8f622xz6"))))
11122 (build-system ruby-build-system)
11123 (arguments
11124 `(#:phases
11125 (modify-phases %standard-phases
11126 (replace 'check
11127 (lambda* (#:key tests? #:allow-other-keys)
11128 (when tests?
11129 ;; Don't run tests to avoid circular dependence with rails.
11130 ;; Instead just import the library to test.
11131 (invoke "ruby" "-Ilib" "-r" "shoulda"))))
11132 (add-after 'extract-gemspec 'relax-requirements
11133 (lambda _
11134 (substitute* "shoulda.gemspec"
11135 ;; An older version of shoulda-matchers (4.0) is used, out of
11136 ;; little maintenance rather than because of an real
11137 ;; incompatibility (see:
11138 ;; https://github.com/thoughtbot/shoulda/issues/275).
11139 ((", \\[\"~> 4.0\"]") "")))))))
11140 (propagated-inputs
11141 (list ruby-shoulda-context ruby-shoulda-matchers))
11142 (synopsis "Context framework and matchers for testing")
11143 (description
11144 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
11145@code{shoulda-matchers} providing tools for writing tests.")
11146 (home-page "https://github.com/thoughtbot/shoulda")
11147 (license license:expat)))
11148
11149(define-public ruby-unf
11150 (package
11151 (name "ruby-unf")
11152 (version "0.2.0")
11153 (source
11154 (origin
11155 (method git-fetch)
11156 (uri (git-reference
11157 (url "https://github.com/knu/ruby-unf")
11158 (commit (string-append "v" version))))
11159 (file-name (git-file-name name version))
11160 (sha256
11161 (base32 "1zczv2z4yk73gymh5ymjgf857z6274nwv7gnslip507ds67r78ay"))
11162 (modules '((guix build utils)))
11163 (snippet #~(begin
11164 (delete-file-recursively "ext")
11165 (substitute* "unf.gemspec"
11166 (("gem\\.extensions.*") ""))))))
11167 (build-system ruby-build-system)
11168 (arguments
11169 `(#:phases
11170 (modify-phases %standard-phases
11171 (add-before 'check 'add-dependency-to-bundler
11172 (lambda _
11173 ;; test-unit is required but not provided by the bundler
11174 ;; environment. This is fixed in the upstream repository but fix
11175 ;; has not been released.
11176 (substitute* "Gemfile"
11177 (("^gemspec") "gem 'test-unit'\ngemspec")))))))
11178 (propagated-inputs
11179 (list ruby-unf-ext))
11180 (native-inputs
11181 (list ruby-shoulda bundler ruby-test-unit))
11182 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
11183 (description
11184 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
11185support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
11186@code{java.text.Normalizer} on JRuby.")
11187 (home-page "https://github.com/knu/ruby-unf")
11188 (license license:bsd-2)))
11189
11190(define-public ruby-warden
11191 (package
11192 (name "ruby-warden")
11193 (version "1.2.8")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (rubygems-uri "warden" version))
11198 (sha256
11199 (base32
11200 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
11201 (build-system ruby-build-system)
11202 (arguments
11203 '(#:tests? #f)) ; No included tests
11204 (propagated-inputs
11205 (list ruby-rack))
11206 (synopsis "Rack middleware providing authentication")
11207 (description
11208 "Warden is a Rack-based middleware that provides a mechanism for
11209authentication in Ruby web applications.")
11210 (home-page "https://github.com/wardencommunity/warden")
11211 (license license:expat)))
11212
11213(define-public ruby-warden-oauth2
11214 (package
11215 (name "ruby-warden-oauth2")
11216 (version "0.0.1")
11217 (source
11218 (origin
11219 (method url-fetch)
11220 (uri (rubygems-uri "warden-oauth2" version))
11221 (sha256
11222 (base32
11223 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
11224 (build-system ruby-build-system)
11225 (arguments
11226 '(#:phases
11227 (modify-phases %standard-phases
11228 (replace 'check
11229 (lambda* (#:key tests? #:allow-other-keys)
11230 (when tests?
11231 (substitute* "spec/spec_helper.rb"
11232 (("Bundler.setup .*") "\n"))
11233 (invoke "rspec")))))))
11234 (propagated-inputs
11235 (list ruby-warden ruby-base64))
11236 (native-inputs
11237 (list ruby-rspec-2 ruby-rack-test))
11238 (synopsis "OAuth 2.0 strategies for Warden")
11239 (description
11240 "This library extends Warden to support OAuth 2.0 authorized API
11241requests.")
11242 (home-page "https://github.com/opperator/warden-oauth2")
11243 (license license:expat)))
11244
11245(define-public ruby-webmock
11246 (package
11247 (name "ruby-webmock")
11248 (version "3.11.2")
11249 (source
11250 (origin
11251 (method url-fetch)
11252 (uri (rubygems-uri "webmock" version))
11253 (sha256
11254 (base32
11255 "1hdlbvfw316lkz251qnfk79drmaay7l51kidvicz41nhvw12xz8v"))))
11256 (build-system ruby-build-system)
11257 (native-inputs
11258 (list bundler ruby-rspec))
11259 (propagated-inputs
11260 (list ruby-addressable ruby-crack ruby-hashdiff))
11261 (synopsis "Allows stubbing and setting expectations on HTTP requests")
11262 (description
11263 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
11264requests. This is useful when testing software.")
11265 (home-page "https://github.com/bblimke/webmock")
11266 (license license:expat)))
11267
11268(define-public ruby-webmock-2
11269 (package
11270 (inherit ruby-webmock)
11271 (name "ruby-webmock")
11272 (version "2.3.2")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (rubygems-uri "webmock" version))
11277 (sha256
11278 (base32
11279 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))))
11280
11281(define-public ruby-unicode-display-width
11282 (package
11283 (name "ruby-unicode-display-width")
11284 (version "3.2.0")
11285 (source
11286 (origin
11287 (method url-fetch)
11288 (uri (rubygems-uri "unicode-display_width" version))
11289 (sha256
11290 (base32
11291 "0hiwhnqpq271xqari6mg996fgjps42sffm9cpk6ljn8sd2srdp8c"))))
11292 (build-system ruby-build-system)
11293 (arguments
11294 '(;; Test data not included.
11295 #:tests? #f))
11296 (propagated-inputs (list ruby-unicode-emoji))
11297 (synopsis "Determine the monospace display width of Ruby strings")
11298 (description
11299 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
11300display width of strings in Ruby.")
11301 (home-page "https://github.com/janlelis/unicode-display_width")
11302 (license license:expat)))
11303
11304;; There is another gem called 'ruby-version' so we use an underscore in this
11305;; name
11306(define-public ruby_version
11307 (package
11308 (name "ruby_version")
11309 (version "1.0.2")
11310 (source
11311 (origin
11312 (method url-fetch)
11313 (uri (rubygems-uri "ruby_version" version))
11314 (sha256
11315 (base32
11316 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
11317 (build-system ruby-build-system)
11318 (arguments
11319 `(#:phases
11320 (modify-phases %standard-phases
11321 (add-before 'check 'fix-dependencies
11322 (lambda _
11323 ;; Remove the Gemfile.lock, as we want to use Guix packages at
11324 ;; whatever versions.
11325 (delete-file "Gemfile.lock")
11326 ;; Remove the included gem files as they unnecessary.
11327 (delete-file-recursively "pkg/")
11328 ;; Accept any version of rake, rdoc and rspec
11329 (substitute* "ruby_version.gemspec"
11330 (("%q<rake.*") "%q<rake>)\n")
11331 (("%q<rdoc.*") "%q<rdoc>)\n")
11332 (("%q<rspec.*") "%q<rspec>)\n"))
11333 ;; Do not use bundler.
11334 (substitute* "Rakefile"
11335 (("Bundler\\.setup.*") "nil\n")))))))
11336 (native-inputs
11337 (list ruby-rdoc ruby-rspec ruby-rubygems-tasks))
11338 (synopsis "Ruby library to help check the Ruby version")
11339 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
11340checking for the right Ruby version in software.")
11341 (home-page "https://github.com/janlelis/ruby_version")
11342 (license license:expat)))
11343
11344(define-public ruby-websocket-client-simple
11345 (package
11346 (name "ruby-websocket-client-simple")
11347 (version "0.9.0")
11348 (source (origin
11349 (method url-fetch)
11350 (uri (rubygems-uri "websocket-client-simple" version))
11351 (sha256
11352 (base32
11353 "029iar7fnnrgmc1k463xlkpr4n72s4zdgri13rqmmcr295g7r8zr"))))
11354 (build-system ruby-build-system)
11355 (arguments (list #:test-target "default"))
11356 (native-inputs (list ruby-eventmachine ruby-websocket-eventmachine-server))
11357 (propagated-inputs (list ruby-event-emitter ruby-websocket))
11358 (synopsis "Simple WebSocket client for Ruby")
11359 (description "This package provides a simple WebSocket client for Ruby.")
11360 (home-page "https://github.com/ruby-jp/websocket-client-simple")
11361 (license license:expat)))
11362
11363(define-public ruby-websocket-eventmachine-base
11364 (package
11365 (name "ruby-websocket-eventmachine-base")
11366 (version "1.2.0")
11367 (source (origin
11368 (method url-fetch)
11369 (uri (rubygems-uri "websocket-eventmachine-base" version))
11370 (sha256
11371 (base32
11372 "0wiz61mcwgs3k21cdr5l9b4jpg29gl6mflfampww2v525yc3hr1r"))))
11373 (build-system ruby-build-system)
11374 (arguments
11375 (list #:tests? #f)) ;no test suite
11376 (propagated-inputs (list ruby-eventmachine ruby-websocket
11377 ruby-websocket-native))
11378 (synopsis "WebSocket base for Ruby client and server")
11379 (description "This package provides a WebSocket base for a Ruby client and
11380server.")
11381 (home-page "https://github.com/imanel/websocket-eventmachine-base")
11382 (license license:expat)))
11383
11384(define-public ruby-websocket-eventmachine-server
11385 (package
11386 (name "ruby-websocket-eventmachine-server")
11387 (version "1.0.1")
11388 (source (origin
11389 (method url-fetch)
11390 (uri (rubygems-uri "websocket-eventmachine-server" version))
11391 (sha256
11392 (base32
11393 "0iqpzc8s028nck1flqaj784gvyn64wy1h3svpa4y2847wklg8sms"))))
11394 (build-system ruby-build-system)
11395 ;; TODO: The test suite requires Autobahn, not yet packaged in Guix.
11396 (arguments (list #:tests? #f))
11397 (propagated-inputs (list ruby-websocket-eventmachine-base))
11398 (synopsis "WebSocket server for Ruby")
11399 (description "This package provides a WebSocket server for Ruby.")
11400 (home-page "https://github.com/imanel/websocket-eventmachine-server")
11401 (license license:expat)))
11402
11403(define-public ruby-websocket-native
11404 (package
11405 (name "ruby-websocket-native")
11406 (version "1.0.0")
11407 (source (origin
11408 (method url-fetch)
11409 (uri (rubygems-uri "websocket-native" version))
11410 (sha256
11411 (base32
11412 "1kgvd3gyzh7hk0ddzn85jrs4csxm54qnvla95ldyn6rzgfbjchdn"))))
11413 (build-system ruby-build-system)
11414 (arguments
11415 (list #:test-target "spec"
11416 #:phases #~(modify-phases %standard-phases
11417 (add-before 'check 'disable-problematic-tests
11418 (lambda _
11419 (substitute* "spec/websocket_spec.rb"
11420 (("it \"should have mask_native defined\"" all)
11421 (string-append "x" all)))))
11422 (add-after 'build 'compile
11423 (lambda _
11424 (invoke "rake" "compile"))))))
11425 (native-inputs (list ruby-rake-compiler ruby-rspec))
11426 (synopsis "Native Ruby extension for the WebSocket gem")
11427 (description "This package provides a native extension that can increase
11428performance by about 25% compared to the pure Ruby WebSocket implementation.")
11429 (home-page "https://github.com/imanel/websocket-ruby-native")
11430 (license license:expat)))
11431
11432(define-public ruby-websocket-driver
11433 (package
11434 (name "ruby-websocket-driver")
11435 (version "0.7.1")
11436 (source
11437 (origin
11438 (method url-fetch)
11439 (uri (rubygems-uri "websocket-driver" version))
11440 (sha256
11441 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
11442 (build-system ruby-build-system)
11443 (arguments
11444 '(#:tests? #f)) ; no included tests
11445 (propagated-inputs
11446 (list ruby-websocket-extensions))
11447 (synopsis "WebSocket protocol handler with pluggable I/O")
11448 (description
11449 "@code{websocket-driver} provides a complete implementation of the
11450WebSocket protocols that can be hooked up to any TCP library")
11451 (home-page "https://github.com/faye/websocket-driver-ruby")
11452 (license license:expat)))
11453
11454(define-public ruby-websocket-extensions
11455 (package
11456 (name "ruby-websocket-extensions")
11457 (version "0.1.3")
11458 (source
11459 (origin
11460 (method url-fetch)
11461 (uri (rubygems-uri "websocket-extensions" version))
11462 (sha256
11463 (base32
11464 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
11465 (build-system ruby-build-system)
11466 (arguments
11467 '(;; No included tests
11468 #:tests? #f))
11469 (synopsis "Generic extension manager for WebSocket connections")
11470 (description
11471 "@code{websocket-extensions} provides a container for registering
11472extension plugins.")
11473 (home-page "https://github.com/faye/websocket-extensions-ruby")
11474 (license license:expat)))
11475
11476(define-public ruby-domain-name
11477 (package
11478 (name "ruby-domain-name")
11479 (version "0.5.20190701")
11480 (source
11481 (origin
11482 (method url-fetch)
11483 (uri (rubygems-uri "domain_name" version))
11484 (sha256
11485 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
11486 (build-system ruby-build-system)
11487 (arguments
11488 `(#:phases
11489 (modify-phases %standard-phases
11490 (add-before 'check 'fix-versions
11491 (lambda _
11492 ;; Fix NameError that appears to already be fixed upstream.
11493 (substitute* "Rakefile"
11494 (("DomainName::VERSION")
11495 "Bundler::GemHelper.gemspec.version"))
11496 ;; Loosen unnecessarily strict test-unit version specification.
11497 (substitute* "domain_name.gemspec"
11498 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
11499 #t)))))
11500 (propagated-inputs
11501 (list ruby-unf))
11502 (native-inputs
11503 (list ruby-shoulda bundler ruby-test-unit))
11504 (synopsis "Domain name manipulation library")
11505 (description
11506 "@code{domain_name} is a Domain name manipulation library. It parses a
11507domain name ready for extracting the registered domain and TLD (Top Level
11508Domain). It can also be used for cookie domain validation based on the Public
11509Suffix List.")
11510 (home-page "https://github.com/knu/ruby-domain_name")
11511 (license license:bsd-2)))
11512
11513(define-public ruby-dotenv
11514 (package
11515 (name "ruby-dotenv")
11516 (version "3.1.7")
11517 (source (origin
11518 (method git-fetch) ;for the tests
11519 (uri (git-reference
11520 (url "https://github.com/bkeepers/dotenv")
11521 (commit (string-append "v" version))))
11522 (file-name (git-file-name name version))
11523 (sha256
11524 (base32
11525 "19j0acy12si537hwi4q54q8n5ycmlvfd2ik5y6r7jir6ww06l8yx"))))
11526 (build-system ruby-build-system)
11527 (arguments
11528 (list
11529 #:test-target "spec"
11530 #:phases
11531 #~(modify-phases %standard-phases
11532 (add-after 'unpack 'do-not-build-dotenv-rails
11533 (lambda _
11534 ;; The repository includes the definitions of two packages,
11535 ;; 'dotenv' and 'dotenv-rails'. Since we want to package them
11536 ;; separately, remove the dotenv-rails and associated Rake
11537 ;; tasks.
11538 (delete-file "dotenv-rails.gemspec")
11539 (delete-file "spec/dotenv/rails_spec.rb")
11540 (delete-file "spec/dotenv/log_subscriber_spec.rb")
11541 (substitute* "spec/spec_helper.rb"
11542 (("require \"dotenv\"" all)
11543 (string-append "require \"pathname\"\n" all)))
11544 (substitute* "Rakefile"
11545 (("DotenvRailsGemHelper.install_tasks name: \"dotenv-rails\"")
11546 "")
11547 ((", \"dotenv-rails:.*\"")
11548 ""))))
11549 (replace 'replace-git-ls-files
11550 (lambda _
11551 (substitute* "dotenv.gemspec"
11552 (("`git ls-files (README.md LICENSE lib bin) \\| ([^`]*`)"
11553 all files command)
11554 (string-append
11555 "`find " files " -type f | sort | " command))))))))
11556 (native-inputs (list ruby-standard ruby-rspec))
11557 (synopsis "Ruby library for setting environment variables")
11558 (description "Dotenv is a Ruby library for setting environment variables
11559defined in a @file{.env} file.")
11560 (home-page "https://github.com/bkeepers/dotenv")
11561 (license license:expat)))
11562
11563(define-public ruby-dotenv-rails
11564 (package
11565 (inherit ruby-dotenv)
11566 (name "ruby-dotenv-rails")
11567 (arguments
11568 (substitute-keyword-arguments arguments
11569 ((#:phases phases '%standard-phases)
11570 #~(modify-phases #$phases
11571 (delete 'do-not-build-dotenv-rails)
11572 (add-after 'unpack 'delete-Gemfile
11573 (lambda _
11574 ;; It defines extraneous dependencies; remove it.
11575 (delete-file "Gemfile")))
11576 (add-after 'unpack 'remove-extraneous-gemspec
11577 (lambda _
11578 (delete-file "dotenv.gemspec")
11579 (substitute* "Gemfile"
11580 ((".*\"dotenv\".*") ""))
11581 (substitute* "Rakefile"
11582 ;; Remove the dotenv-related Rake tasks.
11583 (("Bundler::GemHelper.install_tasks name: \"dotenv\"")
11584 "")
11585 (("\"dotenv:[^\"]*\", ")
11586 ""))))
11587 (replace 'replace-git-ls-files
11588 (lambda _
11589 (substitute* "dotenv-rails.gemspec"
11590 (("`git ls-files lib \\| grep rails`")
11591 "`find lib -type f | sort | grep rails`"))))))))
11592 (native-inputs (list ruby-rspec ruby-spring ruby-standard))
11593 (propagated-inputs (list ruby-dotenv ruby-railties))
11594 (synopsis "Ruby library for setting environment variables in Rails project")
11595 (description "Dotenv is a Ruby library for setting environment variables
11596defined in a @file{.env} file. This is the Rails variant, adapted for use
11597with Ruby on Rails projects.")))
11598
11599(define-public ruby-http-accept
11600 (package
11601 (name "ruby-http-accept")
11602 (version "2.2.0")
11603 (source (origin
11604 (method git-fetch) ;for the tests
11605 (uri (git-reference
11606 (url "https://github.com/socketry/http-accept")
11607 (commit (string-append "v" version))))
11608 (file-name (git-file-name name version))
11609 (sha256
11610 (base32
11611 "1d69cy12hqbcqrhw4dibvdq5pqklxsa59kih6pzl479nxq79rgs7"))))
11612 (build-system ruby-build-system)
11613 (arguments
11614 (list
11615 #:phases
11616 #~(modify-phases %standard-phases
11617 (add-after 'unpack 'remove-missing-key-directive
11618 ;; This seem to be a common problem in Ruby projects (see:
11619 ;; https://github.com/prawnpdf/ttfunk/issues/99).
11620 (lambda _
11621 (substitute* "http-accept.gemspec"
11622 ((".*spec.signing_key.*") ""))))
11623 (replace 'check
11624 (lambda* (#:key tests? #:allow-other-keys)
11625 (when tests?
11626 (invoke "rspec")))))))
11627 (native-inputs
11628 (list ruby-rspec
11629 ruby-covered))
11630 (synopsis "Parse Accept and Accept-Language HTTP headers")
11631 (description
11632 "This package provides a set of parsers for Accept and Accept-Language
11633HTTP headers.")
11634 (home-page "https://github.com/socketry/http-accept")
11635 (license license:expat)))
11636
11637(define-public ruby-http-accept-1
11638 (package
11639 (inherit ruby-http-accept)
11640 (version "1.7.0")
11641 (source (origin
11642 (method git-fetch) ;for the tests
11643 (uri (git-reference
11644 (url "https://github.com/ioquatix/http-accept")
11645 (commit (string-append "v" version))))
11646 (file-name (git-file-name "ruby-http-accept" version))
11647 (sha256
11648 (base32
11649 "1hnqmqpa135s3xgcvv30qzqm8zp88my1aj05m72d2q9cvc31g92z"))))))
11650
11651(define-public ruby-http-cookie
11652 (package
11653 (name "ruby-http-cookie")
11654 (version "1.0.5")
11655 (source
11656 (origin
11657 (method url-fetch)
11658 (uri (rubygems-uri "http-cookie" version))
11659 (sha256
11660 (base32
11661 "13rilvlv8kwbzqfb644qp6hrbsj82cbqmnzcvqip1p6vqx36sxbk"))))
11662 (build-system ruby-build-system)
11663 (arguments
11664 (list
11665 #:phases
11666 #~(modify-phases %standard-phases
11667 (add-before 'check 'add-dependency-to-bundler
11668 (lambda _
11669 ;; Fix NameError
11670 (substitute* "Rakefile"
11671 (("HTTP::Cookie::VERSION")
11672 "Bundler::GemHelper.gemspec.version")))))))
11673 (propagated-inputs
11674 (list ruby-domain-name))
11675 (native-inputs
11676 (list ruby-simplecov
11677 bundler
11678 ruby-sqlite3
11679 ruby-test-unit))
11680 (synopsis "Handle HTTP Cookies based on RFC 6265")
11681 (description
11682 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
11683RFC 6265. It has been designed with security, standards compliance and
11684compatibility in mind, to behave just the same as today's major web browsers.
11685It has built-in support for the legacy @code{cookies.txt} and
11686@code{cookies.sqlite} formats of Mozilla Firefox.")
11687 (home-page "https://github.com/sparklemotion/http-cookie")
11688 (license license:expat)))
11689
11690(define-public ruby-httpclient
11691 (package
11692 (name "ruby-httpclient")
11693 (version "2.8.3")
11694 (source
11695 (origin
11696 (method url-fetch)
11697 (uri (rubygems-uri "httpclient" version))
11698 (sha256
11699 (base32
11700 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
11701 (build-system ruby-build-system)
11702 (arguments
11703 '(;; TODO: Some tests currently fail
11704 ;; ------
11705 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
11706 ;; 2 omissions, 0 notifications
11707 ;; 91.866% passed
11708 ;; ------
11709 ;; 6.49 tests/s, 22.41 assertions/s
11710 #:tests? #f
11711 #:phases
11712 (modify-phases %standard-phases
11713 (replace 'check
11714 (lambda* (#:key tests? #:allow-other-keys)
11715 (if tests?
11716 (invoke "ruby"
11717 "-Ilib"
11718 "test/runner.rb")))))))
11719 (native-inputs
11720 (list ruby-rack))
11721 (synopsis
11722 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
11723 (description
11724 "The @code{httpclient} ruby library provides functionality related to
11725HTTP. Compared to the @code{net/http} library, @code{httpclient} also provides
11726Cookie, multithreading and authentication (digest, NTLM) support.
11727
11728Also provided is a @command{httpclient} command, which can perform HTTP
11729requests either using arguments or with an interactive prompt.")
11730 (home-page "https://github.com/nahi/httpclient")
11731 (license license:ruby)))
11732
11733(define-public ruby-ansi
11734 (package
11735 (name "ruby-ansi")
11736 (version "1.5.0")
11737 (source
11738 (origin
11739 (method git-fetch)
11740 ;; Fetch from GitHub as the gem does not contain testing code.
11741 (uri (git-reference
11742 (url "https://github.com/rubyworks/ansi")
11743 (commit version)))
11744 (file-name (git-file-name name version))
11745 (sha256
11746 (base32
11747 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
11748 (build-system ruby-build-system)
11749 (arguments
11750 `(#:phases
11751 (modify-phases %standard-phases
11752 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
11753 ;; cycle ansi, qed, ansi. Instead simply test that the library can
11754 ;; be require'd.
11755 (replace 'check
11756 (lambda _
11757 (invoke "ruby" "-Ilib" "-r" "ansi")))
11758 (add-before 'validate-runpath 'replace-broken-symlink
11759 (lambda* (#:key outputs #:allow-other-keys)
11760 (let* ((out (assoc-ref outputs "out"))
11761 (file (string-append
11762 out "/lib/ruby/vendor_ruby/gems/ansi-"
11763 ,version "/lib/ansi.yml")))
11764 ;; XXX: This symlink is broken since ruby 2.4.
11765 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
11766 (delete-file file)
11767 (symlink "../.index" file)))))))
11768 (synopsis "ANSI escape code related libraries")
11769 (description
11770 "This package is a collection of ANSI escape code related libraries
11771enabling ANSI colorization and stylization of console output. Included in the
11772library are the @code{Code} module, which defines ANSI codes as constants and
11773methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
11774@code{ProgressBar}, and a @code{String} subclass. The library also includes a
11775@code{Terminal} module which provides information about the current output
11776device.")
11777 (home-page "https://rubyworks.github.io/ansi/")
11778 (license license:bsd-2)))
11779
11780(define-public ruby-systemu
11781 (package
11782 (name "ruby-systemu")
11783 (version "2.6.5")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (rubygems-uri "systemu" version))
11788 (sha256
11789 (base32
11790 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
11791 (build-system ruby-build-system)
11792 (arguments
11793 `(#:phases
11794 (modify-phases %standard-phases
11795 (add-before 'check 'set-version
11796 (lambda _
11797 (setenv "VERSION" ,version))))))
11798 (synopsis "Capture of stdout/stderr and handling of child processes")
11799 (description
11800 "Systemu can be used on any platform to return status, stdout, and stderr
11801of any command. Unlike other methods like @code{open3} and @code{popen4}
11802there is no danger of full pipes or threading issues hanging your process or
11803subprocess.")
11804 (home-page "https://github.com/ahoward/systemu")
11805 (license license:ruby)))
11806
11807(define-public ruby-bcrypt
11808 (package
11809 (name "ruby-bcrypt")
11810 (version "3.1.20")
11811 ;; FIXME: Unbundle the bcrypt library used.
11812 (source
11813 (origin
11814 (method git-fetch)
11815 (uri (git-reference
11816 (url "https://github.com/bcrypt-ruby/bcrypt-ruby")
11817 (commit (string-append "v" version))))
11818 (file-name (git-file-name name version))
11819 (sha256
11820 (base32 "0q6h8kmjb34hg6qjv31v374n3cavv00drsfyzv6nybdwipgyg62i"))))
11821 (build-system ruby-build-system)
11822 (arguments (list #:test-target "default")) ;compile + spec
11823 (native-inputs (list ruby-rake-compiler ruby-rspec))
11824 (synopsis "Ruby bcrypt wrapper")
11825 (description "This Ruby library provides a simple wrapper to bcrypt, a
11826secure hash algorithm for hashing passwords.")
11827 (home-page "https://github.com/bcrypt-ruby/bcrypt-ruby")
11828 (license license:expat)))
11829
11830(define-public ruby-bcrypt-pbkdf
11831 (package
11832 (name "ruby-bcrypt-pbkdf")
11833 (version "1.1.2.rc1")
11834 (source (origin
11835 (method url-fetch)
11836 (uri (rubygems-uri "bcrypt_pbkdf" version))
11837 (sha256
11838 (base32
11839 "1p2m7q7kwrj56ilw07mvzpqinryx525b05gpsa57wzm591y7waqm"))))
11840 (build-system ruby-build-system)
11841 (arguments
11842 (list #:phases #~(modify-phases %standard-phases
11843 (add-before 'build 'compile
11844 (lambda _
11845 (invoke "rake" "compile"))))))
11846 (native-inputs (list ruby-minitest ruby-rake-compiler
11847 ruby-rake-compiler-dock ruby-rdoc))
11848 (synopsis "Reading password encrypted Ed25519 keys in Ruby")
11849 (description
11850 "This gem implements @samp{bcrypt_pbkdf}, which is a variant of
11851PBKDF2 (Password-Based Key Derivation Function 2) with bcrypt-based
11852pseudorandom function. This is currently used by @samp{net-ssh} to
11853read password encrypted Ed25519 keys.")
11854 (home-page "https://github.com/net-ssh/bcrypt_pbkdf-ruby")
11855 (license license:expat)))
11856
11857(define-public ruby-bio-commandeer
11858 (package
11859 (name "ruby-bio-commandeer")
11860 (version "0.4.0")
11861 (source
11862 (origin
11863 (method url-fetch)
11864 (uri (rubygems-uri "bio-commandeer" version))
11865 (sha256
11866 (base32
11867 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
11868 (build-system ruby-build-system)
11869 (arguments
11870 `(#:phases
11871 (modify-phases %standard-phases
11872 (replace 'check
11873 ;; Run test without calling 'rake' so that jeweler is
11874 ;; not required as an input.
11875 (lambda _
11876 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
11877 (propagated-inputs
11878 (list ruby-bio-logger ruby-systemu))
11879 (native-inputs
11880 (list bundler ruby-rspec))
11881 (synopsis "Simplified running of shell commands from within Ruby")
11882 (description
11883 "Bio-commandeer provides an opinionated method of running shell commands
11884from within Ruby. The advantage of bio-commandeer over other methods of
11885running external commands is that when something goes wrong, messages printed
11886to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
11887detail to ease debugging.")
11888 (home-page "https://github.com/wwood/bioruby-commandeer")
11889 (license license:expat)))
11890
11891(define-public ruby-rubytest
11892 (package
11893 (name "ruby-rubytest")
11894 (version "0.8.1")
11895 (source
11896 (origin
11897 (method url-fetch)
11898 (uri (rubygems-uri "rubytest" version))
11899 (sha256
11900 (base32
11901 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
11902 (build-system ruby-build-system)
11903 (arguments
11904 ;; Disable regular testing to break the cycle rubytest, qed, brass,
11905 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
11906 ;; simply test that the library can be require'd.
11907 `(#:phases
11908 (modify-phases %standard-phases
11909 (replace 'check
11910 (lambda _
11911 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
11912 (propagated-inputs
11913 (list ruby-ansi))
11914 (synopsis "Universal test harness for Ruby")
11915 (description
11916 "Rubytest is a testing meta-framework for Ruby. It can handle any
11917compliant test framework and can run tests from multiple frameworks in a
11918single pass.")
11919 (home-page "https://rubyworks.github.io/rubytest")
11920 (license license:bsd-2)))
11921
11922(define-public ruby-brass
11923 (package
11924 (name "ruby-brass")
11925 (version "1.2.1")
11926 (source
11927 (origin
11928 (method url-fetch)
11929 (uri (rubygems-uri "brass" version))
11930 (sha256
11931 (base32
11932 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
11933 (build-system ruby-build-system)
11934 (arguments
11935 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
11936 ;; Instead simply test that the library can be require'd.
11937 `(#:phases
11938 (modify-phases %standard-phases
11939 (replace 'check
11940 (lambda* (#:key tests? #:allow-other-keys)
11941 (when tests?
11942 (invoke "ruby" "-Ilib" "-r" "brass")))))))
11943 (synopsis "Basic foundational assertions framework")
11944 (description
11945 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
11946foundational assertions framework for other assertion and test frameworks to
11947make use of.")
11948 (home-page "https://rubyworks.github.io/brass")
11949 (license license:bsd-2)))
11950
11951(define-public ruby-qed
11952 (package
11953 (name "ruby-qed")
11954 (version "2.9.2")
11955 (source
11956 (origin
11957 (method url-fetch)
11958 (uri (rubygems-uri "qed" version))
11959 (sha256
11960 (base32
11961 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
11962 (build-system ruby-build-system)
11963 (arguments
11964 `(#:phases
11965 (modify-phases %standard-phases
11966 (replace 'check
11967 (lambda* (#:key tests? #:allow-other-keys)
11968 (when tests?
11969 (invoke "ruby" "-Ilib" "bin/qed")))))))
11970 (native-inputs
11971 (list ruby-ae-bootstrap))
11972 (propagated-inputs
11973 (list ruby-ansi ruby-brass))
11974 (synopsis "Test framework utilizing literate programming techniques")
11975 (description
11976 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
11977@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
11978Development} (BDD) utilizing Literate Programming techniques. QED sits
11979somewhere between lower-level testing tools like @code{Test::Unit} and
11980requirement specifications systems like Cucumber.")
11981 (home-page "https://rubyworks.github.io/qed")
11982 (license license:bsd-2)))
11983
11984(define-public ruby-que
11985 (package
11986 (name "ruby-que")
11987 (version "1.0.0.beta3")
11988 (source
11989 (origin
11990 (method url-fetch)
11991 (uri (rubygems-uri "que" version))
11992 (sha256
11993 (base32
11994 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
11995 (build-system ruby-build-system)
11996 (arguments
11997 '(#:tests? #f)) ; No included tests
11998 (synopsis "Job queue using PostgreSQL written in Ruby")
11999 (description
12000 "This package provides a job queue that uses PostgreSQL for storing jobs
12001and locking between worker processes.")
12002 (home-page "https://github.com/chanks/que")
12003 (license license:expat)))
12004
12005(define-public ruby-queue-classic
12006 (package
12007 (name "ruby-queue-classic")
12008 (version "4.0.0")
12009 (source (origin
12010 (method url-fetch)
12011 (uri (rubygems-uri "queue_classic" version))
12012 (sha256
12013 (base32
12014 "0npyhajf2fc80apkw9s2kj0n254w5lcl4xpjidg5d5w1fb19abh6"))))
12015 (build-system ruby-build-system)
12016 (arguments (list #:tests? #f)) ;tests require a postgresql server
12017 (native-inputs (list ruby-activerecord ruby-minitest-reporters))
12018 (propagated-inputs (list ruby-pg))
12019 (synopsis "Queuing library for Ruby")
12020 (description "@code{queue_classic} is a queuing library for Ruby
12021applications (Rails, Sinatra, etc.) @code{queue_classic} features
12022asynchronous job polling, database maintained locks and has a single
12023dependency, @code{pg}.")
12024 (home-page "https://github.com/QueueClassic/queue_classic")
12025 (license license:expat)))
12026
12027(define-public ruby-pairing-heap
12028 (package
12029 (name "ruby-pairing-heap")
12030 (version "3.1.0")
12031 (source (origin
12032 (method url-fetch)
12033 (uri (rubygems-uri "pairing_heap" version))
12034 (sha256
12035 (base32
12036 "059kqpw53cancnp0bp7y1s74y1955riw33w3lqfbnms4b4mdh5zj"))))
12037 (build-system ruby-build-system)
12038 (arguments
12039 (list
12040 #:phases
12041 #~(modify-phases %standard-phases
12042 (add-after 'unpack 'patch
12043 (lambda _
12044 (substitute* "Rakefile"
12045 (("require \"standard/rake\"") "")
12046 ((":\"standard:fix\",") "")))))))
12047 (synopsis "Priority queue in pure Ruby")
12048 (description "This package provides a performant priority queue in pure
12049ruby with support for changing priority using pairing heap data structure")
12050 (home-page "https://github.com/mhib/pairing_heap")
12051 (license license:expat)))
12052
12053(define-public ruby-ae
12054 (package
12055 (name "ruby-ae")
12056 (version "1.8.2")
12057 (source
12058 (origin
12059 (method git-fetch)
12060 ;; Fetch from github so tests are included.
12061 (uri (git-reference
12062 (url "https://github.com/rubyworks/ae")
12063 (commit version)))
12064 (file-name (git-file-name name version))
12065 (sha256
12066 (base32
12067 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
12068 (build-system ruby-build-system)
12069 (arguments
12070 `(#:phases
12071 (modify-phases %standard-phases
12072 (replace 'check
12073 (lambda* (#:key tests? #:allow-other-keys)
12074 (when tests?
12075 (invoke "qed"))))
12076 (add-before 'validate-runpath 'replace-broken-symlink
12077 (lambda* (#:key outputs #:allow-other-keys)
12078 (let* ((out (assoc-ref outputs "out"))
12079 (file (string-append
12080 out "/lib/ruby/vendor_ruby/gems/ae-"
12081 ,version "/lib/ae.yml")))
12082 ;; XXX: This symlink is broken since ruby 2.4.
12083 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
12084 (delete-file file)
12085 (symlink "../.index" file)))))))
12086 (propagated-inputs
12087 (list ruby-ansi))
12088 (native-inputs
12089 (list ruby-qed))
12090 (synopsis "Assertions library")
12091 (description
12092 "Assertive Expressive (AE) is an assertions library specifically designed
12093for reuse by other test frameworks.")
12094 (home-page "https://rubyworks.github.io/ae/")
12095 (license license:bsd-2)))
12096
12097(define-public ruby-ae-bootstrap
12098 (hidden-package
12099 (package/inherit ruby-ae
12100 (arguments
12101 (substitute-keyword-arguments
12102 (package-arguments ruby-ae)
12103 ((#:tests? _ #t) #f)))
12104 (native-inputs '()))))
12105
12106(define-public ruby-lemon
12107 (package
12108 (name "ruby-lemon")
12109 (version "0.9.1")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (rubygems-uri "lemon" version))
12114 (sha256
12115 (base32
12116 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
12117 (build-system ruby-build-system)
12118 (arguments
12119 `(#:phases
12120 (modify-phases %standard-phases
12121 (replace 'check (lambda _ (invoke "qed"))))))
12122 (propagated-inputs
12123 (list ruby-ae ruby-ansi ruby-rubytest))
12124 (native-inputs
12125 (list ruby-qed))
12126 (synopsis "Test framework correlating code structure and test unit")
12127 (description
12128 "Lemon is a unit testing framework that enforces highly formal
12129case-to-class and unit-to-method test construction. This enforcement can help
12130focus concern on individual units of behavior.")
12131 (home-page "https://rubyworks.github.io/lemon")
12132 (license license:bsd-2)))
12133
12134(define-public ruby-leto
12135 (package
12136 (name "ruby-leto")
12137 (version "2.1.0")
12138 (source
12139 (origin
12140 (method url-fetch)
12141 (uri (rubygems-uri "leto" version))
12142 (sha256
12143 (base32 "1ys0qr95zjbln8mfq2bxia63nkdfj1gxy89j6mdcbn6ljy6mb3ch"))))
12144 (build-system ruby-build-system)
12145 (arguments
12146 (list #:tests? #f ; No tests.
12147 #:phases
12148 #~(modify-phases %standard-phases
12149 (add-after 'unpack 'ignore-rubocop
12150 (lambda _
12151 (substitute* "Rakefile"
12152 (("RUBY_VERSION\\.to_f >= 3\\.0")
12153 "false")))))))
12154 (native-inputs (list ruby-rake ruby-rspec))
12155 (synopsis "Generic object traverser")
12156 (description
12157 "This package provides a generic object traverser for Ruby. It takes the
12158object and recursively yields:
12159@itemize
12160@item the given object
12161@item instance variables, class variables, constants
12162@item Hash keys and values
12163@item Enumerable members
12164@item Struct members
12165@item Data members
12166@item Range begins and ends
12167@end itemize")
12168 (home-page "https://github.com/jaynetics/leto")
12169 (license license:expat)))
12170
12171(define-public ruby-rubytest-cli
12172 (package
12173 (name "ruby-rubytest-cli")
12174 (version "0.2.0")
12175 (source
12176 (origin
12177 (method url-fetch)
12178 (uri (rubygems-uri "rubytest-cli" version))
12179 (sha256
12180 (base32
12181 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
12182 (build-system ruby-build-system)
12183 (arguments
12184 `(#:tests? #f)) ; no tests
12185 (propagated-inputs
12186 (list ruby-ansi ruby-rubytest))
12187 (synopsis "Command-line interface for rubytest")
12188 (description
12189 "Rubytest CLI is a command-line interface for running tests for
12190Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
12191 (home-page "https://rubyworks.github.io/rubytest-cli")
12192 (license license:bsd-2)))
12193
12194(define-public ruby-hashery
12195 (package
12196 (name "ruby-hashery")
12197 (version "2.1.2")
12198 (source
12199 (origin
12200 (method url-fetch)
12201 (uri (rubygems-uri "hashery" version))
12202 (sha256
12203 (base32
12204 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
12205 (build-system ruby-build-system)
12206 (arguments
12207 `(#:phases
12208 (modify-phases %standard-phases
12209 (replace 'check
12210 (lambda _
12211 (invoke "qed")
12212 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
12213 (native-inputs
12214 (list ruby-rubytest-cli ruby-qed ruby-lemon))
12215 (synopsis "Hash-like classes with extra features")
12216 (description
12217 "The Hashery is a tight collection of @code{Hash}-like classes.
12218Included are the auto-sorting @code{Dictionary} class, the efficient
12219@code{LRUHash}, the flexible @code{OpenHash} and the convenient
12220@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
12221defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
12222standard @code{Hash} making it possible to subclass and augment to fit any
12223specific use case.")
12224 (home-page "https://rubyworks.github.io/hashery")
12225 (license license:bsd-2)))
12226
12227(define-public ruby-rc4
12228 (package
12229 (name "ruby-rc4")
12230 (version "0.1.5")
12231 (source
12232 (origin
12233 (method url-fetch)
12234 (uri (rubygems-uri "ruby-rc4" version))
12235 (sha256
12236 (base32
12237 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
12238 (build-system ruby-build-system)
12239 (arguments
12240 `(#:phases
12241 (modify-phases %standard-phases
12242 (replace 'check
12243 (lambda _
12244 (invoke "rspec" "spec/rc4_spec.rb"))))))
12245 (native-inputs
12246 (list ruby-rspec-2))
12247 (synopsis "Implementation of the RC4 algorithm")
12248 (description
12249 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
12250 (home-page "https://github.com/caiges/Ruby-RC4")
12251 (license license:expat)))
12252
12253(define-public ruby-afm
12254 (package
12255 (name "ruby-afm")
12256 (version "0.2.2")
12257 (source
12258 (origin
12259 (method url-fetch)
12260 (uri (rubygems-uri "afm" version))
12261 (sha256
12262 (base32
12263 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
12264 (build-system ruby-build-system)
12265 (native-inputs
12266 (list bundler))
12267 (synopsis "Read Adobe Font Metrics (afm) files")
12268 (description
12269 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
12270files and use the data therein.")
12271 (home-page "https://github.com/halfbyte/afm")
12272 (license license:expat)))
12273
12274(define-public ruby-ascii85
12275 (package
12276 (name "ruby-ascii85")
12277 (version "1.0.3")
12278 (source
12279 (origin
12280 (method url-fetch)
12281 (uri (rubygems-uri "Ascii85" version))
12282 (sha256
12283 (base32
12284 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
12285 (build-system ruby-build-system)
12286 (native-inputs
12287 (list bundler))
12288 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
12289 (description
12290 "This library provides methods to encode and decode Ascii85
12291binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
12292@dfn{Portable Document Format} (PDF) file formats.")
12293 (home-page "https://github.com/datawraith/ascii85gem")
12294 (license license:expat)))
12295
12296(define-public ruby-ttfunk
12297 (package
12298 (name "ruby-ttfunk")
12299 (version "1.7.0")
12300 (source
12301 (origin
12302 (method git-fetch)
12303 ;; Fetch from github as the gem does not contain testing code.
12304 (uri (git-reference
12305 (url "https://github.com/prawnpdf/ttfunk")
12306 (commit version)))
12307 (file-name (git-file-name name version))
12308 (sha256
12309 (base32
12310 "1jyxn928mpyb1sikjd93s3v8fmh33232pq41ziaph513j7am6fi5"))))
12311 (build-system ruby-build-system)
12312 (arguments
12313 (list #:test-target "spec" ;avoid the rubocop target
12314 #:phases
12315 #~(modify-phases %standard-phases
12316 (add-after 'unpack 'remove-missing-key-directive
12317 ;; This seem to be a common problem in Ruby projects (see:
12318 ;; https://github.com/prawnpdf/ttfunk/issues/99).
12319 (lambda _
12320 (substitute* "ttfunk.gemspec"
12321 ((".*spec.signing_key.*") "")))))))
12322 (native-inputs (list ruby-prawn-dev))
12323 (synopsis "Font metrics parser for the Prawn PDF generator")
12324 (description
12325 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
12326part of the Prawn PDF generator.")
12327 (home-page "https://github.com/prawnpdf/ttfunk")
12328 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
12329 ;; for details."
12330 (license %prawn-project-licenses)))
12331
12332(define-public ruby-puma
12333 (package
12334 (name "ruby-puma")
12335 (version "7.2.0")
12336 (source
12337 (origin
12338 (method git-fetch) ;for tests
12339 (uri (git-reference
12340 (url "https://github.com/puma/puma")
12341 (commit (string-append "v" version))))
12342 (file-name (git-file-name name version))
12343 (sha256
12344 (base32
12345 "0f94jb50a8j9gvn0l59s8dahhry2alwk825ybsxh2y4n1ckyp3n7"))))
12346 (build-system ruby-build-system)
12347 (arguments
12348 (list
12349 #:phases
12350 #~(modify-phases %standard-phases
12351 (add-after 'unpack 'patch-Gemfile
12352 (lambda _
12353 (substitute* "Gemfile"
12354 (("gem \"rake-compiler\".*")
12355 "gem 'rake-compiler'\n"))))
12356 (add-after 'unpack 'disable-rubocop
12357 (lambda _
12358 (setenv "PUMA_NO_RUBOCOP" "1")))
12359 (add-before 'build 'increase-resource-limits
12360 (lambda _
12361 ;; The test suite requires a higher number of open files. Try
12362 ;; increasing the soft resource limit of max open files to 8192,
12363 ;; or equal to the hard limit, whichever is lower.
12364 ;; See: https://github.com/puma/puma/blob/a59afabe782ec8869bb709ca991b32c0b2cc95fd/CONTRIBUTING.md#file-limits
12365 (call-with-values (lambda () (getrlimit 'nofile))
12366 (lambda (soft hard)
12367 (when (and soft (< soft 8192))
12368 (if hard
12369 (setrlimit 'nofile (min hard 8192) hard)
12370 (setrlimit 'nofile 8192 #f))
12371 (format
12372 #t "increased maximum number of open files from ~d to ~d~%"
12373 soft (if hard (min hard 8192) 8192)))))))
12374 (add-before 'build 'fix-gemspec
12375 (lambda _
12376 (substitute* "puma.gemspec"
12377 (("`git ls-files -- bin docs ext lib tools`")
12378 "`find bin docs ext lib tools -type f |sort`"))))
12379 (delete 'check) ;moved after install
12380 (add-after 'install 'check
12381 (lambda* (#:key tests? #:allow-other-keys)
12382 (when tests?
12383 ;; Increase our test verbosity
12384 (setenv "PUMA_TEST_DEBUG" "1")
12385 (setenv "TESTOPTS" "-v -vv")
12386 (invoke "bundle" "exec" "rake" "test"))))
12387 (add-after 'install 'delete-mkmf.log
12388 (lambda _
12389 ;; Rubygems installs build log files that embed volatile file
12390 ;; names (see:
12391 ;; https://github.com/rubygems/rubygems/issues/6259).
12392 (for-each delete-file (find-files #$output "^mkmf\\.log$"))))
12393 (add-before 'check 'tune-test-environment
12394 (lambda _
12395 ;; Disable minitest parallelization to reduce IO contention,
12396 ;; especially since the tests are run without multiple workers
12397 (setenv "MT_CPU" "0")
12398 ;; The default value is 45 s and easily causes timeouts.
12399 (setenv "TEST_CASE_TIMEOUT" "120")
12400 ;; Give puma tests more time to respond before puma fails them
12401 (setenv "RESP_READ_TIMEOUT" "30")))
12402 (add-before 'check 'disable-problematic-tests
12403 (lambda _
12404 (let-syntax ((skip-tests
12405 (syntax-rules ()
12406 ((_ file test ...)
12407 (substitute* file
12408 (((string-append "def " test ".*") all)
12409 (string-append
12410 all " skip('flaky test on guix')\n")) ...)))))
12411 ;; The test failures were reported at:
12412 ;; https://github.com/puma/puma/issues/3093, but appear to be
12413 ;; caused by the Guix build container, perhaps the lack of
12414 ;; zombie process reaping (see:
12415 ;; https://issues.guix.gnu.org/30948).
12416 ;; Many of these tests seem to only fail on the 'cli' portion
12417 ;; due to something causing them to hang indefinitely
12418 (skip-tests "test/test_plugin.rb"
12419 "test_plugin")
12420 (skip-tests "test/test_plugin_systemd.rb"
12421 "test_plugin_systemd"
12422 "test_systemd_watchdog"
12423 "test_systemd_notify"
12424 "test_refork_phased_restart_with_fork_worker_and_high_worker_count")
12425 (skip-tests "test/test_pumactl.rb"
12426 "test_control_url_and_status"
12427 "test_control_ssl_ipv6"
12428 "test_control_ssl_ipv4")
12429 ;; Disabling the test/*_integration_* tests as they contain many flaky tests
12430 (delete-file "test/test_integration_cluster.rb")
12431 (delete-file "test/test_integration_pumactl.rb")
12432 (delete-file "test/test_integration_single.rb")
12433 (delete-file "test/test_integration_ssl.rb")
12434 (delete-file "test/test_integration_ssl_session.rb")
12435 ;; Other files containing many problematic tests
12436 (delete-file "test/test_cli.rb")
12437 ;; All the tests in the 'test_worker_gem_independence.rb'
12438 ;; module fail with "Expected false to be truthy.".
12439 ;; tests try changing different module versions, but guix
12440 ;; doesn't expose alternate module versions to be tested with
12441 (delete-file "test/test_worker_gem_independence.rb"))))
12442 (add-before 'check 'set-home
12443 (lambda _
12444 ;; Some tests fail if the cannot write to HOME.
12445 (setenv "HOME" "/tmp")))
12446 (add-before 'check 'set-paths
12447 (lambda _
12448 ;; The test suite requires the 'puma' command to be on PATH.
12449 (setenv "PATH" (string-append (getenv "PATH") ":"
12450 #$output "/bin"))
12451 (setenv "GEM_PATH" (string-append
12452 (getenv "GEM_PATH") ":"
12453 #$output "/lib/ruby/vendor_ruby")))))))
12454 (native-inputs
12455 (list bundler
12456 curl
12457 ruby-json
12458 ruby-localhost
12459 ruby-m
12460 ruby-minitest
12461 ruby-minitest-mock
12462 ruby-minitest-proveit
12463 ruby-minitest-retry
12464 ruby-minitest-stub-const
12465 ruby-rackup
12466 ruby-rack-next
12467 ruby-rake-compiler
12468 ruby-webrick))
12469 (inputs
12470 (list openssl
12471 ruby-nio4r))
12472 (propagated-inputs
12473 (list ruby-concurrent-ruby))
12474 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
12475 (description
12476 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
12477for Ruby/Rack applications. Puma is intended for use in both development and
12478production environments. In order to get the best throughput, it is highly
12479recommended that you use a Ruby implementation with real threads like Rubinius
12480or JRuby.")
12481 (home-page "https://puma.io/")
12482 (license license:expat)))
12483
12484(define-public ruby-hoe-git2
12485 (package
12486 (name "ruby-hoe-git2")
12487 (version "1.8.0")
12488 (source
12489 (origin
12490 (method git-fetch)
12491 (uri (git-reference
12492 (url "https://github.com/halostatue/hoe-git2")
12493 (commit (string-append "v" version))))
12494 (file-name (git-file-name name version))
12495 (sha256
12496 (base32 "15gpidgba1xx038srgnnh0dgfjpdq00vhmkl7kmnxl7awf9qldpx"))))
12497 (build-system ruby-build-system)
12498 (inputs (list git-minimal))
12499 (propagated-inputs
12500 (list ruby-hoe-3))
12501 (synopsis "Hoe plugins for tighter Git integration")
12502 (description
12503 "This package provides a set of Hoe plugins for tighter Git integration.
12504It provides tasks to automate release tagging and pushing and changelog
12505generation.")
12506 (home-page "https://github.com/halostatue/hoe-git2")
12507 (license license:expat)))
12508
12509(define-public ruby-hoe-markdown
12510 (package
12511 (name "ruby-hoe-markdown")
12512 (version "1.7.0")
12513 (home-page "https://github.com/flavorjones/hoe-markdown")
12514 (source
12515 (origin
12516 (method git-fetch)
12517 (uri (git-reference
12518 (url home-page)
12519 (commit (string-append "v" version))))
12520 (file-name (git-file-name name version))
12521 (sha256
12522 (base32 "1hkligky33b3rgcsx5qzvackgw6ghln4yp0lpw9wxy0lp14n0vr9"))))
12523 (build-system ruby-build-system)
12524 (arguments
12525 (list
12526 #:test-target "spec"
12527 #:phases
12528 #~(modify-phases %standard-phases
12529 (add-after 'unpack 'disable-bundler-dependency
12530 (lambda _
12531 (substitute* "spec/spec_helper.rb"
12532 (("require.*bundler/setup.*")
12533 ""))
12534 (substitute* "lib/hoe/markdown/standalone.rb"
12535 (("Bundler\\.load_gemspec")
12536 "Gem::Specification.load")))))))
12537 (native-inputs (list ruby-rspec))
12538 (propagated-inputs (list ruby-rake))
12539 (synopsis "Hoe plugin with Markdown helpers")
12540 (description
12541 "This package provides a Hoe plugin with various Markdown helpers, which
12542can be used to e.g. hyperlink Markdown documentation between project files.")
12543 (license license:expat)))
12544
12545(define-public ruby-timecop
12546 (package
12547 (name "ruby-timecop")
12548 (version "0.9.11")
12549 (source
12550 (origin
12551 (method url-fetch)
12552 (uri (rubygems-uri "timecop" version))
12553 (sha256
12554 (base32
12555 "0hkmrkg46qvfla31734d5y28q422z5kfgb41yy2227q4wp34sa21"))))
12556 (build-system ruby-build-system)
12557 (arguments
12558 (list
12559 #:phases
12560 #~(modify-phases %standard-phases
12561 (add-before 'check 'set-check-rubylib
12562 (lambda _
12563 ;; Set RUBYLIB so timecop tests finds its own lib.
12564 (setenv "RUBYLIB" "lib"))))))
12565 (native-inputs
12566 (list bundler
12567 ruby-minitest-rg
12568 ruby-mocha
12569 ruby-activesupport
12570 ruby-pry))
12571 (synopsis "Test mocks for time-dependent functions")
12572 (description
12573 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
12574making it easier to test time-dependent code. It provides a unified method to
12575mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
12576call.")
12577 (home-page "https://github.com/travisjeffery/timecop")
12578 (license license:expat)))
12579
12580(define-public ruby-concurrent-ruby
12581 (package
12582 (name "ruby-concurrent-ruby")
12583 (version "1.3.6")
12584 (source
12585 (origin
12586 (method git-fetch)
12587 (uri (git-reference
12588 ;for tests
12589 (url "https://github.com/ruby-concurrency/concurrent-ruby")
12590 (commit (string-append "v" version))))
12591 (file-name (git-file-name name version))
12592 (sha256
12593 (base32 "08h7r9hh22v1r5pk67gq7b5cpl0vbqh63sh9svw9l2qas2fs8kng"))))
12594 (build-system ruby-build-system)
12595 (arguments
12596 (list
12597 #:tests? #f ;the test suite is run in ruby-concurrent-ruby-edge
12598 #:phases
12599 #~(modify-phases %standard-phases
12600 (add-after 'unpack 'delete-unwanted-gemspecs
12601 (lambda _
12602 (for-each delete-file
12603 '("concurrent-ruby-ext.gemspec"
12604 "concurrent-ruby-edge.gemspec"))))
12605 (add-after 'unpack 'do-not-install-concurrent_ruby.jar
12606 (lambda _
12607 ;; This file is only built when building the Java
12608 ;; extension.
12609 (substitute* "concurrent-ruby.gemspec"
12610 (("'lib/concurrent-ruby/concurrent/concurrent_ruby.jar'")
12611 "")))))))
12612 (synopsis "Concurrency library for Ruby")
12613 (description
12614 "Concurrent Ruby includes concurrency tools such as agents,
12615futures, promises, thread pools, actors, supervisors, and more. It is
12616inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency
12617patterns.")
12618 (home-page "https://github.com/ruby-concurrency/concurrent-ruby")
12619 (license license:expat)))
12620
12621(define-public ruby-concurrent-ruby-ext
12622 (package
12623 (inherit ruby-concurrent-ruby)
12624 (name "ruby-concurrent-ruby-ext")
12625 (arguments
12626 (list
12627 #:tests? #f ;tested as part of concurrent-ruby-edge
12628 #:phases
12629 #~(modify-phases %standard-phases
12630 (add-after 'unpack 'delete-unwanted-gemspecs
12631 (lambda _
12632 (for-each delete-file
12633 '("concurrent-ruby.gemspec"
12634 "concurrent-ruby-edge.gemspec")))))))
12635 (native-inputs (list ruby-rake-compiler))
12636 (propagated-inputs (list ruby-concurrent-ruby))
12637 (synopsis "C extensions for concurrent-ruby")
12638 (description "This package provides C extensions to optimize the
12639concurrent-ruby gem when running under the Matz's Ruby Interpreter (MRI, also
12640known as CRuby).")))
12641
12642(define-public ruby-concurrent-ruby-edge
12643 (package
12644 (inherit ruby-concurrent-ruby)
12645 (name "ruby-concurrent-ruby-edge")
12646 (arguments
12647 (list
12648 #:phases
12649 #~(modify-phases %standard-phases
12650 (add-after 'unpack 'delete-unwanted-gemspecs
12651 (lambda _
12652 (for-each delete-file
12653 '("concurrent-ruby.gemspec"
12654 "concurrent-ruby-ext.gemspec"))))
12655 ;; The tests rely on the Gem being installed, so move the check
12656 ;; phase after the install phase.
12657 (delete 'check)
12658 (add-after 'install 'check
12659 (lambda* (#:key tests? #:allow-other-keys)
12660 (setenv "GEM_PATH" (string-append
12661 (getenv "GEM_PATH") ":"
12662 #$output "/lib/ruby/vendor_ruby"))
12663 (when tests?
12664 (invoke "rake" "ci")))))))
12665 (native-inputs
12666 (list ruby-rake-compiler
12667 ruby-rake-compiler-dock
12668 ruby-rspec
12669 ruby-timecop
12670 ruby-yard))
12671 (propagated-inputs
12672 (list ruby-concurrent-ruby ruby-concurrent-ruby-ext))
12673 (synopsis "Edge features and additions to the @code{concurrent-ruby} gem")
12674 (description "The @code{concurrent-ruby-edge} gem includes
12675@code{concurrent-ruby} features that are under active development and may
12676change frequently. They are expected not to keep backward
12677compatibility (there may also lack tests and documentation), although semantic
12678versions are obeyed though. Features developed in @code{concurrent-ruby-edge}
12679are expected to move to @code{concurrent-ruby} when final.")))
12680
12681(define-public ruby-pkg-config
12682 (package
12683 (name "ruby-pkg-config")
12684 (version "1.2.5")
12685 (source
12686 (origin
12687 (method url-fetch)
12688 (uri (rubygems-uri "pkg-config" version))
12689 (sha256
12690 (base32
12691 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
12692 (build-system ruby-build-system)
12693 (arguments
12694 ;; Tests require extra files not included in the gem.
12695 `(#:tests? #f))
12696 (synopsis "Detect libraries for compiling Ruby native extensions")
12697 (description
12698 "@code{pkg-config} can be used in your extconf.rb to properly detect need
12699libraries for compiling Ruby native extensions.")
12700 (home-page "https://github.com/ruby-gnome2/pkg-config")
12701 (license license:lgpl2.0+)))
12702
12703(define-public ruby-net-http-digest-auth
12704 (package
12705 (name "ruby-net-http-digest-auth")
12706 (version "1.4.1")
12707 (source
12708 (origin
12709 (method url-fetch)
12710 (uri (rubygems-uri "net-http-digest_auth" version))
12711 (sha256
12712 (base32
12713 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
12714 (build-system ruby-build-system)
12715 (native-inputs
12716 (list ruby-hoe
12717 ruby-minitest))
12718 (synopsis "RFC 2617 HTTP digest authentication library")
12719 (description
12720 "This library implements HTTP's digest authentication scheme based on
12721RFC 2617. This enables the use of the digest authentication scheme instead
12722of the more insecure basic authentication scheme.")
12723 (home-page "https://github.com/drbrain/net-http-digest_auth")
12724 (license license:expat)))
12725
12726(define-public ruby-mail
12727 (package
12728 (name "ruby-mail")
12729 (version "2.8.1")
12730 (source
12731 (origin
12732 (method url-fetch)
12733 (uri (rubygems-uri "mail" version))
12734 (sha256
12735 (base32 "1bf9pysw1jfgynv692hhaycfxa8ckay1gjw5hz3madrbrynryfzc"))))
12736 (build-system ruby-build-system)
12737 (propagated-inputs
12738 (list ruby-mini-mime))
12739 (arguments
12740 '(#:tests? #f)) ; no rakefile
12741 (synopsis "Mail library for Ruby")
12742 (description
12743 "Mail is an internet library for Ruby that is designed to handle email
12744generation, parsing and sending. The purpose of this library is to provide
12745a single point of access to handle all email functions, including sending
12746and receiving emails. All network type actions are done through proxy
12747methods to @code{Net::SMTP}, @code{Net::POP3} etc.
12748
12749Mail has been designed with a very simple object oriented system that
12750really opens up the email messages you are parsing, if you know what you
12751are doing, you can fiddle with every last bit of your email directly.")
12752 (home-page "https://github.com/mikel/mail")
12753 (license license:expat)))
12754
12755(define-public ruby-net-protocol
12756 (package
12757 (name "ruby-net-protocol")
12758 (version "0.2.1")
12759 (source (origin
12760 (method git-fetch)
12761 (uri (git-reference
12762 (url "https://github.com/ruby/net-protocol")
12763 (commit (string-append "v" version))))
12764 (file-name (git-file-name name version))
12765 (sha256
12766 (base32
12767 "0niivmjx7bc6vsylc1ag17mw6mnvjxw02s7cin1f0422xyr8msq9"))))
12768 (build-system ruby-build-system)
12769 (propagated-inputs (list ruby-timeout))
12770 (synopsis "Abstract interface for Ruby network clients")
12771 (description "This Ruby library provides an abstract interface for network
12772clients.")
12773 (home-page "https://github.com/ruby/net-protocol")
12774 (license (list license:bsd-2))))
12775
12776(define-public ruby-email-reply-trimmer
12777 (package
12778 (name "ruby-email-reply-trimmer")
12779 (version "0.1.13")
12780 (source
12781 (origin
12782 (method url-fetch)
12783 (uri (rubygems-uri "email_reply_trimmer" version))
12784 (sha256
12785 (base32
12786 "1jgcxifm48xq5dz9k47q43pqm5bfnf14l62l3bqhmv8f6z8dw4ki"))))
12787 (build-system ruby-build-system)
12788 (synopsis "Trim replies from plain text email")
12789 (description "EmailReplyTrimmer is a Ruby small library to trim replies
12790from plain text email.")
12791 (home-page "https://github.com/discourse/email_reply_trimmer")
12792 (license license:expat)))
12793
12794(define-public ruby-mathn
12795 (package
12796 (name "ruby-mathn")
12797 (version "0.1.0")
12798 (source
12799 (origin
12800 (method url-fetch)
12801 (uri (rubygems-uri "mathn" version))
12802 (sha256
12803 (base32
12804 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
12805 (build-system ruby-build-system)
12806 (native-inputs
12807 (list bundler ruby-rake-compiler))
12808 (synopsis "Extends math operations for increased precision")
12809 (description
12810 "This gem makes mathematical operations more precise in Ruby and
12811integrates other mathematical standard libraries. Prior to Ruby 2.5,
12812@code{mathn} was part of the Ruby standard library.")
12813 (home-page "https://github.com/ruby/mathn")
12814 (license license:bsd-2)))
12815
12816(define-public ruby-code-statistics
12817 (package
12818 (name "ruby-code-statistics")
12819 (version "0.2.13")
12820 (source
12821 (origin
12822 (method url-fetch)
12823 (uri (rubygems-uri "code_statistics" version))
12824 (sha256
12825 (base32
12826 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
12827 (build-system ruby-build-system)
12828 (arguments
12829 `(#:tests? #f)) ; Not all test code is included in gem.
12830 (synopsis "Port of the rails 'rake stats' method")
12831 (description
12832 "This gem is a port of the rails 'rake stats' method so it can be made
12833more robust and work for non rails projects.")
12834 (home-page "https://github.com/danmayer/code_statistics")
12835 (license license:expat)))
12836
12837(define-public ruby-ruby2-keywords
12838 (package
12839 (name "ruby-ruby2-keywords")
12840 (version "0.0.5")
12841 (source (origin
12842 (method git-fetch)
12843 (uri (git-reference
12844 (url "https://github.com/ruby/ruby2_keywords")
12845 (commit (string-append "v" version))))
12846 (file-name (git-file-name name version))
12847 (sha256
12848 (base32
12849 "1jhqb152zfr2yrxj6j8rzakkwdkg5viggwnnqrrfxwwy63msdi97"))))
12850 (build-system ruby-build-system)
12851 (arguments
12852 (list
12853 #:phases
12854 #~(modify-phases %standard-phases
12855 (add-after 'unpack 'delete-extraneous-rake-files
12856 (lambda _
12857 (for-each delete-file '("rakelib/changelogs.rake"
12858 "rakelib/epoch.rake"
12859 "rakelib/version.rake"))))
12860 (add-after 'extract-gemspec 'adjust-files
12861 (lambda _
12862 (substitute* "ruby2_keywords.gemspec"
12863 ;; This file is not present in the git checkout.
12864 ((".*\"ChangeLog\",.*") "")))))))
12865 (synopsis "Shim library for Module#ruby2_keywords")
12866 (description "Provides empty @code{Module#ruby2_keywords} method, for the
12867forward source-level compatibility against @command{ruby2.7} and
12868@command{ruby3}.")
12869 (home-page "https://github.com/ruby/ruby2_keywords")
12870 (license license:bsd-2)))
12871
12872(define-public ruby-rubypants
12873 (package
12874 (name "ruby-rubypants")
12875 (version "0.6.0")
12876 (source (origin
12877 (method url-fetch)
12878 (uri (rubygems-uri "rubypants" version))
12879 (sha256
12880 (base32
12881 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
12882 (build-system ruby-build-system)
12883 (arguments
12884 '(#:tests? #f)) ; need Codecov
12885 (synopsis "Port of the smart-quotes library SmartyPants")
12886 (description
12887 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
12888original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
12889and BBEdit that easily translates plain ASCII punctuation characters into
12890smart typographic punctuation HTML entities.")
12891 (home-page "https://github.com/jmcnevin/rubypants")
12892 (license license:bsd-2)))
12893
12894(define-public ruby-org-ruby
12895 (package
12896 (name "ruby-org-ruby")
12897 (version "0.9.12")
12898 (source (origin
12899 (method url-fetch)
12900 (uri (rubygems-uri "org-ruby" version))
12901 (sha256
12902 (base32
12903 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
12904 (build-system ruby-build-system)
12905 (arguments
12906 '(#:tests? #f)) ; no rakefile
12907 (propagated-inputs
12908 (list ruby-rubypants))
12909 (synopsis "Org-mode parser written in Ruby")
12910 (description
12911 "Org-ruby is an org-mode parser written in Ruby. The most significant
12912thing this library does today is convert org-mode files to HTML or Textile or
12913Markdown.")
12914 (home-page "https://github.com/wallyqs/org-ruby")
12915 (license license:expat)))
12916
12917(define-public ruby-rake-manifest
12918 (package
12919 (name "ruby-rake-manifest")
12920 (version "0.2.3")
12921 (source (origin
12922 (method git-fetch)
12923 (uri (git-reference
12924 (url "https://github.com/mvz/rake-manifest")
12925 (commit (string-append "v" version))))
12926 (file-name (git-file-name name version))
12927 (sha256
12928 (base32
12929 "16k2yvg773c25kp2vhzhp01rhf53k0nhrcmpv34k1fridw90r2k8"))))
12930 (build-system ruby-build-system)
12931 (arguments
12932 (list
12933 #:test-target "default"
12934 #:phases
12935 #~(modify-phases %standard-phases
12936 (delete 'check) ;moved after the install phase
12937 (add-after 'install 'check
12938 (assoc-ref %standard-phases 'check))
12939 (add-before 'check 'set-GEM_PATH
12940 (lambda _
12941 (setenv "GEM_PATH" (string-append
12942 (getenv "GEM_PATH") ":"
12943 #$output "/lib/ruby/vendor_ruby")))))))
12944 (native-inputs (list ruby-rspec ruby-simplecov))
12945 (synopsis "Rake tasks to generate and check a manifest file")
12946 (description "This package provides Rake tasks to generate and check a
12947manifest file.")
12948 (home-page "https://github.com/mvz/rake-manifest")
12949 (license license:expat)))
12950
12951(define-public ruby-sfl
12952 (package
12953 (name "ruby-sfl")
12954 (version "2.3")
12955 (source (origin
12956 (method url-fetch)
12957 (uri (rubygems-uri "sfl" version))
12958 (sha256
12959 (base32
12960 "1qm4hvhq9pszi9zs1cl9qgwx1n4wxq0af0hq9sbf6qihqd8rwwwr"))))
12961 (build-system ruby-build-system)
12962 (arguments
12963 `(#:tests? #f ;; some tests fail, gem is a dummy for ruby >= 1.9 anyway
12964 #:test-target "spec"))
12965 (synopsis "Spawn for Ruby 1.8")
12966 (description "This pure ruby library provides @code{spawn()} which is
12967almost perfectly compatible with ruby 1.9's.")
12968 (home-page "https://github.com/ujihisa/spawn-for-legacy")
12969 (license license:bsd-2)))
12970
12971(define-public ruby-childprocess
12972 (package
12973 (name "ruby-childprocess")
12974 (version "5.1.0")
12975 (source
12976 (origin
12977 (method url-fetch)
12978 (uri (rubygems-uri "childprocess" version))
12979 (sha256
12980 (base32
12981 "1v5nalaarxnfdm6rxb7q6fmc6nx097jd630ax6h9ch7xw95li3cs"))))
12982 (build-system ruby-build-system)
12983 (arguments
12984 `(#:test-target "spec"
12985 #:phases
12986 (modify-phases %standard-phases
12987 (add-after 'unpack 'sanitize-dependencies
12988 (lambda _
12989 (substitute* "childprocess.gemspec"
12990 ((".*coveralls.*") ""))
12991 (substitute* "spec/spec_helper.rb"
12992 ((".*[Cc]overalls.*") ""))))
12993 (add-after 'unpack 'patch
12994 (lambda _
12995 (substitute* "spec/spec_helper.rb"
12996 (("#!/bin/sh\\\\n") (string-append "#!" (which "sh") "\\n")))))
12997 (add-before 'check 'disable-broken-tests
12998 (lambda* (#:key tests? #:allow-other-keys)
12999 (when tests?
13000 (let ((skippedtests
13001 (list ;; Disable Rubygems version warning check
13002 "ChildProcess validates cleanly")))
13003 (setenv "SPEC_OPTS"
13004 (string-append
13005 "--warnings" " "
13006 ;; Disable tests failing in the guix environment:
13007 "--example-matches "
13008 "'(^(?!.*(" (string-join skippedtests "|") ")).*)'")))
13009 (invoke "rspec")))))))
13010 (native-inputs
13011 (list ruby-coveralls ruby-rspec))
13012 (synopsis "Control external programs running in the background, in Ruby")
13013 (description "@code{childprocess} provides a gem to control external
13014programs running in the background, in Ruby.")
13015 (home-page "https://github.com/enkessler/childprocess")
13016 (license license:expat)))
13017
13018(define-public ruby-public-suffix
13019 (package
13020 (name "ruby-public-suffix")
13021 (version "4.0.5")
13022 (source (origin
13023 (method url-fetch)
13024 (uri (rubygems-uri "public_suffix" version))
13025 (sha256
13026 (base32
13027 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
13028 (build-system ruby-build-system)
13029 (arguments
13030 '(#:phases
13031 (modify-phases %standard-phases
13032 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
13033 ;; including it as an input can lead to circular dependencies.
13034 (add-after 'unpack 'remove-rubocop-from-Rakefile
13035 (lambda _
13036 (substitute* "Rakefile"
13037 (("require \"rubocop/rake\\_task\"") "")
13038 (("RuboCop::RakeTask\\.new") "")))))))
13039 (native-inputs
13040 (list bundler ruby-yard/minimal ruby-mocha ruby-minitest-reporters))
13041 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
13042 (synopsis "Domain name parser")
13043 (description "The gem @code{public_suffix} is a domain name parser,
13044written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
13045is one under which Internet users can (or historically could) directly
13046register names. Some examples of public suffixes are @code{.com},
13047@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
13048all known public suffixes.")
13049 (license license:expat)))
13050
13051(define-public ruby-addressable
13052 (package
13053 (name "ruby-addressable")
13054 (version "2.8.1")
13055 (source (origin
13056 (method url-fetch)
13057 (uri (rubygems-uri "addressable" version))
13058 (sha256
13059 (base32
13060 "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"))))
13061 (build-system ruby-build-system)
13062 (arguments
13063 '(#:test-target "spec"
13064 #:phases
13065 (modify-phases %standard-phases
13066 (add-after 'unpack 'disable-bundler
13067 (lambda _
13068 (substitute* "spec/spec_helper.rb"
13069 (("require 'bundler/setup'") ""))))
13070 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
13071 (lambda _
13072 (substitute* "Gemfile"
13073 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
13074 ((".*launchy.*") "")
13075 ((".*rake.*") "gem 'rake'\n")
13076 ((".*redcarpet.*") ""))))
13077 (add-before 'check 'delete-network-dependent-test
13078 (lambda _
13079 (delete-file "spec/addressable/net_http_compat_spec.rb"))))))
13080 (native-inputs
13081 (list bundler
13082 ruby-idn-ruby
13083 ruby-rspec
13084 ruby-rspec-its-minimal
13085 ruby-simplecov
13086 ruby-sporkmonger-rack-mount
13087 ruby-yard/minimal))
13088 (propagated-inputs
13089 (list ruby-public-suffix))
13090 (home-page "https://github.com/sporkmonger/addressable")
13091 (synopsis "Alternative URI implementation")
13092 (description "Addressable is a replacement for the URI implementation that
13093is part of Ruby's standard library. It more closely conforms to RFC 3986,
13094RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
13095 (license license:asl2.0)))
13096
13097(define-public ruby-colorize
13098 (package
13099 (name "ruby-colorize")
13100 (version "0.8.1")
13101 (source (origin
13102 (method url-fetch)
13103 (uri (rubygems-uri "colorize" version))
13104 (sha256
13105 (base32
13106 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
13107 (build-system ruby-build-system)
13108 (arguments
13109 '(#:phases (modify-phases %standard-phases
13110 (add-before 'check 'remove-codeclimate-dependency
13111 (lambda _
13112 (substitute* "test/test_colorize.rb"
13113 ;; Do not hook the tests into the online CodeClimate
13114 ;; service which is unnecessary for these tests.
13115 (("require 'codeclimate-test-reporter'")
13116 "")
13117 (("CodeClimate.*") "")))))))
13118 (synopsis "Add color effects to the @code{String} class")
13119 (description
13120 "This package extends the @code{String} class and adds a
13121@code{ColorizedString} with methods to set text color, background color,
13122and text effects.")
13123 (home-page "https://github.com/fazibear/colorize")
13124 (license license:gpl2+)))
13125
13126(define-public ruby-colorator
13127 (package
13128 (name "ruby-colorator")
13129 (version "1.1.0")
13130 (source (origin
13131 (method url-fetch)
13132 (uri (rubygems-uri "colorator" version))
13133 (sha256
13134 (base32
13135 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
13136 (build-system ruby-build-system)
13137 (arguments
13138 ;; No test target
13139 `(#:tests? #f))
13140 (home-page "http://octopress.org/colorator/")
13141 (synopsis "Terminal color library")
13142 (description "Colorator is a Ruby gem that helps you colorize your text
13143for the terminal.")
13144 (license license:expat)))
13145
13146(define-public ruby-command-line-reporter
13147 (package
13148 (name "ruby-command-line-reporter")
13149 (version "4.0.1")
13150 (source (origin
13151 (method url-fetch)
13152 (uri (rubygems-uri "command_line_reporter" version))
13153 (sha256
13154 (base32
13155 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
13156 (build-system ruby-build-system)
13157 (arguments
13158 ;; No Rakefile
13159 `(#:tests? #f
13160 #:phases
13161 (modify-phases %standard-phases
13162 (add-before 'build 'fix-dependencies
13163 (lambda _
13164 (substitute* ".gemspec"
13165 ;; colored is unmaintained
13166 (("colored") "colorator")
13167 ;; colorator version
13168 (("= 1.2") "= 1.1")))))))
13169 (propagated-inputs (list ruby-colorator))
13170 (home-page "https://github.com/wbailey/command_line_reporter")
13171 (synopsis "Report production while executing Ruby scripts")
13172 (description "This gem provides a DSL that makes it easy to write reports
13173of various types in ruby. It eliminates the need to litter your source with
13174puts statements, instead providing a more readable, expressive interface to
13175your application.")
13176 (license license:asl2.0)))
13177
13178(define-public ruby-command-line-reporter-3
13179 (package
13180 (inherit ruby-command-line-reporter)
13181 (version "3.3.6")
13182 (source (origin
13183 (method url-fetch)
13184 (uri (rubygems-uri "command_line_reporter" version))
13185 (sha256
13186 (base32
13187 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
13188
13189(define-public ruby-kpeg
13190 (package
13191 (name "ruby-kpeg")
13192 (version "1.3.3")
13193 (source
13194 (origin
13195 (method url-fetch)
13196 (uri (rubygems-uri "kpeg" version))
13197 (sha256
13198 (base32
13199 "0jxddpyb23digcd8b1b02gn94057a7mw17680c3c8s3bcb5xqfnp"))))
13200 (build-system ruby-build-system)
13201 (native-inputs
13202 (list ruby-hoe))
13203 (synopsis "PEG library for Ruby")
13204 (description "KPeg is a simple PEG library for Ruby. It provides an API as
13205well as native grammar to build the grammar. KPeg supports direct left
13206recursion of rules via the
13207@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
13208technique.")
13209 (home-page "https://github.com/evanphx/kpeg")
13210 (license license:expat)))
13211
13212(define-public ruby-rdoc
13213 (package
13214 (name "ruby-rdoc")
13215 (version "8.0.0")
13216 ;; The source contains some generated files via racc and kpeg.
13217 ;; However the generated result is not deterministic [1] with
13218 ;; multiple runs.
13219 ;; [1] https://github.com/ruby/rdoc/blob/v8.0.0/Rakefile#L91-L93
13220 (source
13221 (origin
13222 (method git-fetch)
13223 (uri (git-reference
13224 (url "https://github.com/ruby/rdoc")
13225 (commit (string-append "v" version))))
13226 (file-name (git-file-name name version))
13227 (sha256
13228 (base32
13229 "1ga4d34allpqglal403x897pxq0a713v4f6w0ln43x8xv362mapf"))))
13230 (build-system ruby-build-system)
13231 ;; Document generation in the install phase causes errors since it
13232 ;; conflicts with the Ruby's builtin version of RDoc.
13233 (arguments (list #:gem-flags #~(list "--no-document")))
13234 (native-inputs (list ruby-test-unit-ruby-core))
13235 (propagated-inputs (list ruby-erb ruby-tsort ruby-prism ruby-rbs))
13236 (home-page "https://ruby.github.io/rdoc/")
13237 (synopsis "HTML and command-line documentation utility")
13238 (description "RDoc produces HTML and command-line documentation for Ruby
13239projects. RDoc includes the @samp{rdoc} and @samp{ri} tools for
13240generating and displaying documentation from the command-line.")
13241 (license license:gpl2+)))
13242
13243(define-public ruby-sass-listen
13244 (package
13245 (name "ruby-sass-listen")
13246 (version "4.0.0")
13247 (source (origin
13248 (method url-fetch)
13249 (uri (rubygems-uri "sass-listen" version))
13250 (sha256
13251 (base32
13252 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
13253 (build-system ruby-build-system)
13254 (arguments
13255 ;; No test target
13256 `(#:tests? #f))
13257 (propagated-inputs
13258 (list ruby-rb-fsevent ruby-rb-inotify))
13259 (home-page "https://github.com/sass/listen")
13260 (synopsis "File modification notification library")
13261 (description "The Listen gem listens to file modifications and notifies you
13262about the changes.")
13263 (license license:expat)))
13264
13265(define-public ruby-terminfo
13266 (let ((commit "f4a597d92dcc465e7b343f9afb8cd45607c8e969")
13267 (revision "0"))
13268 (package
13269 (name "ruby-terminfo")
13270 (version (git-version "0.2" revision commit))
13271 (source
13272 (origin
13273 (method git-fetch)
13274 (uri
13275 (git-reference
13276 (url "https://github.com/genki/ruby-terminfo")
13277 (commit commit)))
13278 (file-name (git-file-name name version))
13279 (sha256
13280 (base32 "0b24sqf0jwj8m106nh35hjayw1kiyrpramb6vg7fnz32mqni6hdi"))))
13281 (build-system ruby-build-system)
13282 (arguments
13283 (list
13284 #:phases
13285 #~(modify-phases %standard-phases
13286 (delete 'replace-git-ls-files)
13287 (replace 'build
13288 (lambda _
13289 (invoke "ruby" "extconf.rb")
13290 (invoke "make")))
13291 (replace 'check
13292 (lambda* (#:key tests? #:allow-other-keys)
13293 (when tests?
13294 (for-each (lambda (f)
13295 (invoke "ruby" "-Ilib:test" "-Ilib:." f))
13296 (find-files "test" "^test_.*\\.rb$")))))
13297 (replace 'install
13298 (lambda _
13299 (invoke "make" "install" (string-append "prefix=" #$output)))))))
13300 (inputs
13301 (list ncurses))
13302 (native-inputs
13303 (list ruby-rubygems-tasks ruby-rdoc))
13304 (home-page "http://www.a-k-r.org/ruby-terminfo/")
13305 (synopsis "Terminfo binding for Ruby")
13306 (description "Ruby-terminfo provides terminfo binding for Ruby.")
13307 (license license:bsd-3))))
13308
13309(define-public ruby-diffy
13310 (package
13311 (name "ruby-diffy")
13312 (version "3.4.4")
13313 (source
13314 (origin
13315 (method url-fetch)
13316 (uri (rubygems-uri "diffy" version))
13317 (sha256
13318 (base32
13319 "1qs7drxvyzk3dg22xgblc12lq5kww9hhj7vpn8ay3l42rasllf3r"))))
13320 (build-system ruby-build-system)
13321 (arguments (list #:test-target "spec"))
13322 (native-inputs
13323 (list ruby-rake ruby-rspec))
13324 (home-page "https://github.com/samg/diffy")
13325 (synopsis "Convenient diffing in ruby")
13326 (description "Diffy provides a convenient way to generate a diff from two
13327strings or files.")
13328 (license license:expat)))
13329
13330(define-public ruby-sass-spec
13331 (package
13332 (name "ruby-sass-spec")
13333 (version "3.5.4")
13334 (source
13335 (origin
13336 (method git-fetch)
13337 (uri (git-reference
13338 (url "https://github.com/sass/sass-spec")
13339 (commit (string-append "v" version))))
13340 (file-name (git-file-name name version))
13341 (sha256
13342 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
13343 (build-system ruby-build-system)
13344 (propagated-inputs
13345 (list ruby-command-line-reporter-3
13346 ruby-diffy))
13347 (arguments
13348 (list
13349 ;; This package contains tests for a sass implementation, and the to
13350 ;; avoid any circular dependencies, the tests are not run here
13351 #:tests? #f
13352 #:phases
13353 #~(modify-phases %standard-phases
13354 (add-after 'unpack 'patch-test
13355 (lambda _
13356 (delete-file "spec/values/colors/alpha_hex-3.5/error")
13357 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
13358 (("string") "color")))))))
13359 (home-page "https://github.com/sass/sass-spec")
13360 (synopsis "Test suite for Sass")
13361 (description "Sass Spec is a test suite for Sass. Test cases are all in
13362the @file{spec} directory.")
13363 (license license:expat)))
13364
13365(define-public ruby-sassc
13366 (package
13367 (name "ruby-sassc")
13368 (version "2.4.0")
13369 (source
13370 (origin
13371 (method url-fetch)
13372 (uri (rubygems-uri "sassc" version))
13373 (sha256
13374 (base32
13375 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
13376 (build-system ruby-build-system)
13377 (arguments
13378 '(#:modules ((guix build ruby-build-system)
13379 (guix build utils)
13380 (ice-9 textual-ports))
13381 #:phases
13382 (modify-phases %standard-phases
13383 (add-after 'unpack 'patch-minitest
13384 (lambda _
13385 (substitute* (find-files "test" "\\.rb$")
13386 (("MiniTest")
13387 "Minitest"))))
13388 ;; TODO: This would be better as a snippet, but the ruby-build-system
13389 ;; doesn't seem to support that
13390 (add-after 'unpack 'remove-libsass
13391 (lambda _
13392 (delete-file-recursively "ext")
13393 (with-atomic-file-replacement "sassc.gemspec"
13394 (lambda (in out)
13395 (let* ((gemspec (get-string-all in))
13396 (index (string-contains gemspec "libsass_dir")))
13397 (display (string-append
13398 (string-take gemspec index)
13399 "\nend\n")
13400 out))))))
13401 (add-after 'unpack 'dont-check-the-libsass-version
13402 (lambda _
13403 (substitute* "test/native_test.rb"
13404 (("assert_equal.*Native\\.version") ""))))
13405 (add-after 'unpack 'remove-git-from-gemspec
13406 (lambda _
13407 (substitute* "sassc.gemspec"
13408 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))))
13409 (add-after 'unpack 'remove-extensions-from-gemspec
13410 (lambda _
13411 (substitute* "sassc.gemspec"
13412 (("\\[\"ext/extconf.rb\"\\]") "[]"))))
13413 (add-after 'unpack 'fix-Rakefile
13414 (lambda _
13415 (substitute* "Rakefile"
13416 (("test: 'compile:libsass'") ":test"))))
13417 (add-after 'unpack 'remove-unnecessary-dependencies
13418 (lambda _
13419 (substitute* "test/test_helper.rb"
13420 (("require \"pry\"") ""))))
13421 (add-before 'build 'patch-native.rb
13422 (lambda* (#:key inputs #:allow-other-keys)
13423 (substitute* "lib/sassc/native.rb"
13424 ((".*gem_root = spec.gem_dir") "")
13425 (("ffi_lib .*\n")
13426 (string-append
13427 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))))
13428 ;; The gemspec still references the libsass files, so just keep the
13429 ;; one in the gem.
13430 (delete 'extract-gemspec))))
13431 (propagated-inputs
13432 (list ruby-ffi ruby-rake))
13433 (inputs
13434 (list libsass))
13435 (native-inputs
13436 (list bundler ruby-rake-compiler ruby-minitest-around
13437 ruby-test-construct))
13438 (synopsis "Use libsss from Ruby")
13439 (description
13440 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
13441bindings to the libsass library. This enables rendering
13442@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
13443 (home-page "https://github.com/sass/sassc-ruby")
13444 (license license:expat)))
13445
13446(define-public ruby-jekyll-sass-converter
13447 (package
13448 (name "ruby-jekyll-sass-converter")
13449 (version "2.2.0")
13450 (source (origin
13451 (method url-fetch)
13452 (uri (rubygems-uri "jekyll-sass-converter" version))
13453 (sha256
13454 (base32
13455 "077xkkkb592vg8kxdia9jwsaz1bc70lkpf4hdvazjqphn5hlz2bi"))))
13456 (build-system ruby-build-system)
13457 (arguments
13458 ;; No rakefile
13459 `(#:tests? #f))
13460 (propagated-inputs (list ruby-sassc))
13461 (home-page "https://github.com/jekyll/jekyll-sass-converter")
13462 (synopsis "Sass converter for Jekyll")
13463 (description "This gem provide built-in support for the Sass converter
13464in Jekyll.")
13465 (license license:expat)))
13466
13467(define-public ruby-jekyll-watch
13468 (package
13469 (name "ruby-jekyll-watch")
13470 (version "2.1.2")
13471 (source (origin
13472 (method url-fetch)
13473 (uri (rubygems-uri "jekyll-watch" version))
13474 (sha256
13475 (base32
13476 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
13477 (build-system ruby-build-system)
13478 (propagated-inputs
13479 (list ruby-listen))
13480 (arguments
13481 ;; No rakefile
13482 `(#:tests? #f))
13483 (home-page "https://github.com/jekyll/jekyll-watch")
13484 (synopsis "Jekyll auto-rebuild support")
13485 (description "This gems add the @code{--watch} switch to the jekyll CLI
13486interface. It allows Jekyll to rebuild your site when a file changes.")
13487 (license license:expat)))
13488
13489(define-public ruby-parallel
13490 (package
13491 (name "ruby-parallel")
13492 (version "1.21.0")
13493 (source
13494 (origin
13495 (method git-fetch)
13496 (uri (git-reference
13497 (url "https://github.com/grosser/parallel")
13498 (commit (string-append "v" version))))
13499 (file-name (git-file-name name version))
13500 (sha256
13501 (base32
13502 "1xqjcvl3gq3shvrqp8wc3fbqibzh4mf1yczq6np9gd79558dwj3w"))))
13503 (build-system ruby-build-system)
13504 (arguments
13505 `(;; TODO 3 test failures
13506 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
13507 ;; open unnecessary pipes
13508 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
13509 ;; SQLite in processes
13510 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
13511 ;; SQLite in threads
13512 #:tests? #f
13513 #:test-target "rspec-rerun:spec"
13514 #:phases
13515 (modify-phases %standard-phases
13516 (add-after 'unpack 'patch-Gemfile
13517 (lambda _
13518 (substitute* "Gemfile"
13519 (("gem 'rspec-legacy_formatters'") "")
13520 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
13521 (add-before 'check 'delete-Gemfile.lock
13522 (lambda _
13523 ;; Bundler isn't being used for fetching dependencies, so
13524 ;; delete the Gemfile.lock
13525 (delete-file "Gemfile.lock")))
13526 (add-before 'build 'patch-gemspec
13527 (lambda _
13528 (substitute* "parallel.gemspec"
13529 (("git ls-files") "find")))))))
13530 (native-inputs
13531 (list ruby-rspec
13532 ruby-rspec-rerun
13533 bundler
13534 ruby-activerecord
13535 ruby-progressbar
13536 ruby-bump
13537 procps
13538 lsof
13539 ruby-mysql2
13540 ruby-sqlite3
13541 ruby-i18n))
13542 (home-page "https://github.com/grosser/parallel")
13543 (synopsis "Parallel processing in Ruby")
13544 (description "Parallel allows you to run any code in parallel Processes
13545(to use all CPUs) or Threads(to speedup blocking operations). It is best
13546suited for map-reduce or e.g. parallel downloads/uploads.")
13547 (license license:expat)))
13548
13549(define-public ruby-cabin
13550 (package
13551 (name "ruby-cabin")
13552 (version "0.9.0")
13553 (source (origin
13554 (method url-fetch)
13555 (uri (rubygems-uri "cabin" version))
13556 (sha256
13557 (base32
13558 "0b3b8j3iqnagjfn1261b9ncaac9g44zrx1kcg81yg4z9i513kici"))))
13559 (build-system ruby-build-system)
13560 (arguments (list #:tests? #f)) ;no Rakefile in released gem
13561 (synopsis "Structured and contextual logging experiments in Ruby")
13562 (description "This Ruby library provides an experimental logging system
13563that tries to make logging more flexible and more consumable than plain-text
13564logging.")
13565 (home-page "https://github.com/jordansissel/ruby-cabin")
13566 (license license:asl2.0)))
13567
13568(define-public ruby-capybara
13569 (package
13570 (name "ruby-capybara")
13571 (version "3.38.0")
13572 (source (origin
13573 (method url-fetch)
13574 (uri (rubygems-uri "capybara" version))
13575 (sha256
13576 (base32
13577 "123198zk2ak8mziwa5jc3ckgpmsg08zn064n3aywnqm9s1bwjv3v"))))
13578 (build-system ruby-build-system)
13579 (arguments
13580 (list #:tests? #f ;sinatra is currently broken with rack 3
13581 #:phases
13582 #~(modify-phases %standard-phases
13583 (add-after 'extract-gemspec 'remove-extraneous-requirements
13584 (lambda _
13585 (substitute* "spec/spec_helper.rb"
13586 ((".*require 'selenium_statistics'.*") "")
13587 ((".*SeleniumStatistics.print_results.*") ""))))
13588 (replace 'check
13589 (lambda* (#:key tests? #:allow-other-keys)
13590 (when tests?
13591 (invoke "rspec" "spec")))))))
13592 (native-inputs
13593 (list ruby-puma
13594 ruby-rspec
13595 ruby-selenium-webdriver
13596 ruby-sinatra))
13597 (propagated-inputs
13598 (list ruby-addressable
13599 ruby-launchy
13600 ruby-matrix
13601 ruby-mini-mime
13602 ruby-nokogiri
13603 ruby-rack
13604 ruby-rack-test
13605 ruby-regexp-parser
13606 ruby-xpath))
13607 (synopsis "Integration testing tool for rack-based web applications")
13608 (description "Capybara is an integration testing tool for rack based web
13609applications. It simulates how a user would interact with a website.")
13610 (home-page "https://github.com/teamcapybara/capybara")
13611 (license license:expat)))
13612
13613(define-public ruby-cane
13614 (package
13615 (name "ruby-cane")
13616 (version "3.0.0")
13617 (source (origin
13618 (method url-fetch)
13619 (uri (rubygems-uri "cane" version))
13620 (sha256
13621 (base32
13622 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
13623 (build-system ruby-build-system)
13624 (arguments `(#:tests? #f)); No rakefile
13625 (home-page "https://github.com/square/cane")
13626 (propagated-inputs
13627 (list ruby-parallel))
13628 (synopsis "Code quality threshold checking")
13629 (description "Cane fails your build if code quality thresholds are not met.")
13630 (license license:asl2.0)))
13631
13632(define-public ruby-morecane
13633 (package
13634 (name "ruby-morecane")
13635 (version "0.2.0")
13636 (source (origin
13637 (method url-fetch)
13638 (uri (rubygems-uri "morecane" version))
13639 (sha256
13640 (base32
13641 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
13642 (build-system ruby-build-system)
13643 (home-page "https://github.com/yob/morecane")
13644 (arguments `(#:tests? #f)); No rakefile
13645 (propagated-inputs
13646 (list ruby-parallel))
13647 (synopsis "Extra checks for cane")
13648 (description "The cane gem provides a great framework for running quality
13649checks over your ruby project as part of continuous integration build. It
13650comes with a few checks out of the box, but also provides an API for loading
13651custom checks. This gem provides a set of additional checks.")
13652 (license license:expat)))
13653
13654(define-public ruby-pdf-reader
13655 (package
13656 (name "ruby-pdf-reader")
13657 (version "2.4.0")
13658 (source (origin
13659 (method git-fetch) ;no test in distributed gem archive
13660 (uri (git-reference
13661 (url "https://github.com/yob/pdf-reader")
13662 (commit (string-append "v" version))))
13663 (file-name (git-file-name name version))
13664 (sha256
13665 (base32
13666 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
13667 (build-system ruby-build-system)
13668 (arguments `(#:test-target "spec"
13669 #:phases (modify-phases %standard-phases
13670 (add-after 'unpack 'do-not-use-bundler
13671 (lambda _
13672 (substitute* "spec/spec_helper.rb"
13673 ((".*[Bb]undler.*") "")))))))
13674 (native-inputs
13675 (list ruby-rspec ruby-cane ruby-morecane))
13676 (propagated-inputs
13677 (list ruby-afm ruby-ascii85 ruby-hashery ruby-rc4 ruby-ttfunk))
13678 (home-page "https://github.com/yob/pdf-reader")
13679 (synopsis "PDF parser in Ruby")
13680 (description "The PDF::Reader library implements a PDF parser conforming as
13681much as possible to the PDF specification from Adobe. It provides programmatic
13682access to the contents of a PDF file with a high degree of flexibility.")
13683 (license license:gpl3+)))
13684
13685(define-public ruby-pdf-inspector
13686 (let ((revision "1")
13687 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
13688 (package
13689 (name "ruby-pdf-inspector")
13690 (version (git-version "1.3.0" revision commit))
13691 (source (origin
13692 (method git-fetch)
13693 (uri (git-reference
13694 (url "https://github.com/prawnpdf/pdf-inspector")
13695 (commit commit)))
13696 (file-name (git-file-name name version))
13697 (sha256
13698 (base32
13699 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
13700 (build-system ruby-build-system)
13701 (arguments
13702 `(#:test-target "spec"
13703 #:phases (modify-phases %standard-phases
13704 (add-before 'build 'drop-signing-key-requirement
13705 (lambda _
13706 (substitute* "pdf-inspector.gemspec"
13707 (("spec.signing_key =.*")
13708 "spec.signing_key = nil"))))
13709 (replace 'check
13710 (lambda _
13711 (substitute* "pdf-inspector.gemspec"
13712 ((".*rubocop.*") "")
13713 ((".*yard.*") ""))
13714 (invoke "rspec"))))))
13715 (native-inputs
13716 (list ruby-rspec))
13717 (propagated-inputs
13718 (list ruby-pdf-reader))
13719 (home-page "https://github.com/prawnpdf/pdf-inspector")
13720 (synopsis "Analysis classes for inspecting PDF output")
13721 (description "This library provides a number of PDF::Reader based tools for
13722use in testing PDF output. Presently, the primary purpose of this tool is to
13723support the tests found in Prawn, a pure Ruby PDF generation library.")
13724 (license %prawn-project-licenses))))
13725
13726(define-public ruby-pdf-core
13727 (package
13728 (name "ruby-pdf-core")
13729 (version "0.9.0")
13730 (source (origin
13731 (method url-fetch)
13732 (uri (rubygems-uri "pdf-core" version))
13733 (sha256
13734 (base32
13735 "1fz0yj4zrlii2j08kaw11j769s373ayz8jrdhxwwjzmm28pqndjg"))))
13736 (build-system ruby-build-system)
13737 (arguments
13738 ; No test target
13739 `(#:tests? #f))
13740 (home-page "https://github.com/prawnpdf/pdf-core")
13741 (synopsis "Low level PDF features for Prawn")
13742 (description "This is an experimental gem that extracts low-level PDF
13743functionality from Prawn.")
13744 (license license:gpl3+)))
13745
13746(define-public ruby-prawn-dev
13747 (package
13748 (name "ruby-prawn-dev")
13749 (version "0.3.0")
13750 (source (origin
13751 (method url-fetch)
13752 (uri (rubygems-uri "prawn-dev" version))
13753 (sha256
13754 (base32
13755 "1hbzzgm0nwc6h8pyv8h9xx068bf676rispxcz4a0sm8nykz54z4x"))))
13756 (build-system ruby-build-system)
13757 (arguments
13758 (list
13759 #:tests? #f ;no test suite
13760 #:phases
13761 #~(modify-phases %standard-phases
13762 (add-after 'extract-gemspec 'drop-rubocop-dependency
13763 ;; Rubocop depends on Prawn. Remove it to avoid the
13764 ;; dependency cycle when using this tool to build
13765 ;; Prawn components.
13766 (lambda _
13767 (substitute* "lib/prawn/dev/tasks.rb"
13768 (("require 'rubocop/rake_task'")
13769 "")
13770 (("RuboCop::RakeTask.new")
13771 ""))
13772 (substitute* ".gemspec"
13773 ((".*add.*dependency.*(rubocop|simplecov).*")
13774 "")))))))
13775 (propagated-inputs (list ruby-rake ruby-rspec ruby-yard))
13776 (synopsis "Shared tools for Prawn projects development")
13777 (description "Prawn-dev contains tools to aid the development of the
13778various Prawn projects.")
13779 (home-page "https://prawnpdf.org/")
13780 (license license:expat)))
13781
13782(define-public ruby-prawn
13783 ;; There hasn't been a new release since 2017/03/17.
13784 (package
13785 (name "ruby-prawn")
13786 (version "2.4.0")
13787 (source (origin
13788 (method git-fetch)
13789 (uri (git-reference
13790 (url "https://github.com/prawnpdf/prawn")
13791 (commit version)))
13792 (file-name (git-file-name name version))
13793 (sha256
13794 (base32
13795 "1h1gww12wcdscij0lnd21p9zcbwrwc3miini5ppannc2birmj9ja"))))
13796 (build-system ruby-build-system)
13797 (arguments
13798 (list
13799 #:phases
13800 #~(modify-phases %standard-phases
13801 (add-before 'build 'drop-signing-key-requirement
13802 (lambda _
13803 (substitute* "prawn.gemspec"
13804 (("spec.signing_key =.*")
13805 "spec.signing_key = nil"))))
13806 (replace 'check
13807 (lambda* (#:key tests? #:allow-other-keys)
13808 (when tests?
13809 ;; The Prawn manual test fails (see:
13810 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
13811 ;; it.
13812 (invoke "rspec"
13813 "--exclude-pattern" "prawn_manual_spec.rb")))))))
13814 (propagated-inputs
13815 (list ruby-matrix
13816 ruby-pdf-core
13817 ruby-ttfunk))
13818 (native-inputs
13819 (list ruby-pdf-inspector
13820 ruby-prawn-manual-builder
13821 ruby-prawn-dev))
13822 (home-page "https://prawnpdf.org/api-docs/2.0/")
13823 (synopsis "PDF generation for Ruby")
13824 (description "Prawn is a pure Ruby PDF generation library.")
13825 (license %prawn-project-licenses)))
13826
13827(define-public ruby-prawn-table
13828 (package
13829 (name "ruby-prawn-table")
13830 (version "0.2.2")
13831 (source (origin
13832 (method url-fetch)
13833 (uri (rubygems-uri "prawn-table" version))
13834 (sha256
13835 (base32
13836 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
13837 (build-system ruby-build-system)
13838 (propagated-inputs
13839 (list ruby-prawn ruby-pdf-inspector))
13840 (native-inputs
13841 `(("bundler" ,bundler)
13842 ("ruby-yard" ,ruby-yard)
13843 ("ruby-mocha" ,ruby-mocha)
13844 ("ruby-coderay" ,ruby-coderay)
13845 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
13846 ("ruby-simplecov" ,ruby-simplecov)
13847 ("ruby-rspec-2" ,ruby-rspec-2)))
13848 (arguments
13849 '(;; TODO: 1 test fails
13850 ;; Failure/Error: pdf.page_count.should == 1
13851 ;; expected: 1
13852 ;; got: 2 (using ==)
13853 ;; # ./spec/table_spec.rb:1308
13854 ;;
13855 ;; 225 examples, 1 failure
13856 #:tests? #f
13857 #:phases
13858 (modify-phases %standard-phases
13859 (add-before 'check 'patch-gemspec
13860 (lambda _
13861 (substitute* "prawn-table.gemspec"
13862 ;; Loosen the requirement for pdf-inspector
13863 (("~> 1\\.1\\.0") ">= 0")
13864 ;; Loosen the requirement for pdf-reader
13865 (("~> 1\\.2") ">= 0"))))
13866 (replace 'check
13867 (lambda* (#:key tests? #:allow-other-keys)
13868 (when tests?
13869 (invoke "rspec")))))))
13870 (home-page "https://github.com/prawnpdf/prawn-table")
13871 (synopsis "Tables support for Prawn")
13872 (description "This gem provides tables support for Prawn.")
13873 (license license:gpl3+)))
13874
13875(define-public ruby-kramdown
13876 (package
13877 (name "ruby-kramdown")
13878 (version "2.3.1")
13879 (source (origin
13880 (method url-fetch)
13881 (uri (rubygems-uri "kramdown" version))
13882 (sha256
13883 (base32
13884 "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"))))
13885 (build-system ruby-build-system)
13886 (arguments `(#:tests? #f)); FIXME: some test failures
13887 (native-inputs
13888 (list ruby-prawn ruby-prawn-table))
13889 (home-page "https://kramdown.gettalong.org/")
13890 (synopsis "Markdown parsing and converting library")
13891 (description "Kramdown is a library for parsing and converting a superset
13892of Markdown. It is completely written in Ruby, supports standard Markdown
13893(with some minor modifications) and various extensions that have been made
13894popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
13895 (license license:expat)))
13896
13897(define-public ruby-kramdown-parser-gfm
13898 (package
13899 (name "ruby-kramdown-parser-gfm")
13900 (version "1.1.0")
13901 (source
13902 (origin
13903 (method url-fetch)
13904 (uri (rubygems-uri "kramdown-parser-gfm" version))
13905 (sha256
13906 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
13907 (build-system ruby-build-system)
13908 (arguments
13909 `(#:tests? #f)) ;no rakefile
13910 (propagated-inputs
13911 (list ruby-kramdown))
13912 (synopsis "Kramdown parser for the GFM dialect of Markdown")
13913 (description
13914 "This is a parser for kramdown that converts Markdown documents in the
13915GFM dialect to HTML.")
13916 (home-page "https://github.com/kramdown/parser-gfm")
13917 (license license:expat)))
13918
13919(define-public ruby-http-parser.rb
13920 (package
13921 (name "ruby-http-parser.rb")
13922 (version "0.6.0")
13923 (source
13924 (origin
13925 (method url-fetch)
13926 (uri (rubygems-uri "http_parser.rb" version))
13927 (sha256
13928 (base32
13929 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
13930 (build-system ruby-build-system)
13931 (arguments
13932 ;; No tests
13933 `(#:tests? #f))
13934 (native-inputs
13935 (list ruby-rake-compiler ruby-rspec))
13936 (home-page "https://github.com/tmm1/http_parser.rb")
13937 (synopsis "HTTP parser un Ruby")
13938 (description "This gem is a simple callback-based HTTP request/response
13939parser for writing http servers, clients and proxies.")
13940 (license license:expat)))
13941
13942(define-public ruby-excon
13943 (package
13944 (name "ruby-excon")
13945 (version "1.4.2")
13946 (source (origin
13947 (method git-fetch) ;for tests
13948 (uri (git-reference
13949 (url "https://github.com/excon/excon")
13950 (commit (string-append "v" version))))
13951 (file-name (git-file-name name version))
13952 (sha256
13953 (base32
13954 "0ym2jaj9cyn4kwv0936z6fvxh1j6jfw0j7dln1gy8xnsszv0p4w8"))))
13955 (build-system ruby-build-system)
13956 (arguments
13957 (list
13958 #:phases
13959 #~(modify-phases %standard-phases
13960 (replace 'replace-git-ls-files
13961 (lambda _
13962 (substitute* "excon.gemspec"
13963 (("`git ls-files -- data/. lib/.`")
13964 "`find data lib -type f`"))))
13965 (add-before 'check 'disable-incompatible-tests
13966 (lambda _
13967 ;; Tests require networking
13968 (delete-file "spec/requests/resolv_resolver_spec.rb")
13969 (delete-file "spec/requests/dns_timeout_spec.rb"))))))
13970 (native-inputs
13971 (list
13972 ruby-activesupport
13973 ruby-eventmachine
13974 ruby-json
13975 ruby-open4
13976 ruby-puma
13977 ruby-rspec
13978 ruby-shindo
13979 ruby-sinatra
13980 ruby-webrick))
13981 (propagated-inputs (list ruby-logger))
13982 (synopsis "Usable, fast, simple Ruby HTTP 1.1")
13983 (description "Excon was designed to be simple, fast and performant. It
13984works great as a general HTTP(s) client and is particularly well suited to
13985usage in API clients.")
13986 (home-page "https://github.com/excon/excon")
13987 (license license:expat)))
13988
13989(define-public ruby-em-websocket
13990 (package
13991 (name "ruby-em-websocket")
13992 (version "0.5.1")
13993 (source
13994 (origin
13995 (method url-fetch)
13996 (uri (rubygems-uri "em-websocket" version))
13997 (sha256
13998 (base32
13999 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
14000 (build-system ruby-build-system)
14001 (arguments
14002 ;; No tests
14003 `(#:tests? #f))
14004 (propagated-inputs
14005 (list ruby-eventmachine ruby-http-parser.rb))
14006 (native-inputs
14007 (list bundler ruby-rspec))
14008 (home-page "https://github.com/igrigorik/em-websocket")
14009 (synopsis "EventMachine based WebSocket server")
14010 (description "Em-websocket is an EventMachine based WebSocket server
14011implementation.")
14012 (license license:expat)))
14013
14014(define-public ruby-rouge
14015 (package
14016 (name "ruby-rouge")
14017 (version "3.26.1")
14018 (source (origin
14019 (method url-fetch)
14020 (uri (rubygems-uri "rouge" version))
14021 (sha256
14022 (base32
14023 "197k0vskf72wxx0gzwld2jzg27bb7982xlvnzy9adlvkzp7nh8vf"))))
14024 (build-system ruby-build-system)
14025 (arguments `(#:tests? #f)); No rakefile
14026 (home-page "http://rouge.jneen.net/")
14027 (synopsis "Code highlighter")
14028 (description "Rouge is a code highlighter written in Ruby. It supports more
14029than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
14030is compatible with stylesheets designed for pygments.")
14031 (license (list
14032 ;; rouge is licensed under expat
14033 license:expat
14034 ;; pygments is licensed under bsd-2
14035 license:bsd-2))))
14036
14037(define-public ruby-hashie
14038 (let ((commit "73510552ba580867e9882fe092568916cbcd810b")
14039 (revision "0"))
14040 (package
14041 (name "ruby-hashie")
14042 (version (git-version "5.0.0" revision commit))
14043 (source (origin
14044 (method git-fetch) ;for tests
14045 (uri (git-reference
14046 (url "https://github.com/hashie/hashie")
14047 (commit commit)))
14048 (file-name (git-file-name name version))
14049 (sha256
14050 (base32
14051 "08rpx040h6vgx6ynk6w029f7z7c8aj2p4v135k2l1zxvnw617ddw"))))
14052 (build-system ruby-build-system)
14053 (arguments
14054 (list #:test-target "spec"
14055 #:phases #~(modify-phases %standard-phases
14056 (add-after 'unpack 'disable-bundler
14057 (lambda _
14058 (substitute* "Rakefile"
14059 ((".*require 'bundler'.*") "")
14060 ((".*Bundler.setup.*") "")
14061 (("Bundler::GemHelper\\.install_tasks") ""))))
14062 (add-after 'unpack 'disable-rubocop
14063 (lambda _
14064 (substitute* "Rakefile"
14065 (("require 'rubocop/rake_task'") "")
14066 (("RuboCop::RakeTask.new") ""))))
14067 (add-after 'unpack 'relax-requirements
14068 (lambda _
14069 ;; Contains multiple extraneous dependencies.
14070 (delete-file "Gemfile"))))))
14071 (native-inputs (list ruby-json ruby-pry ruby-rspec ruby-rspec-pending-for))
14072 (home-page "https://github.com/hashie/hashie")
14073 (synopsis "Extensions to Ruby Hashes")
14074 (description "Hashie is a collection of classes and mixins that make Ruby
14075hashes more powerful.")
14076 (license license:expat))))
14077
14078(define-public ruby-heredoc-unindent
14079 (package
14080 (name "ruby-heredoc-unindent")
14081 (version "1.2.0")
14082 (source (origin
14083 (method url-fetch)
14084 (uri (rubygems-uri "heredoc_unindent" version))
14085 (sha256
14086 (base32
14087 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
14088 (build-system ruby-build-system)
14089 (native-inputs
14090 (list ruby-hoe-3))
14091 (home-page "https://github.com/adrianomitre/heredoc_unindent")
14092 (synopsis "Heredoc indentation cleaner")
14093 (description "This gem removes common margin from indented strings, such
14094as the ones produced by indented heredocs. In other words, it strips out
14095leading whitespace chars at the beginning of each line, but only as much as
14096the line with the smallest margin.
14097
14098It is acknowledged that many strings defined by heredocs are just code and
14099fact is that most parsers are insensitive to indentation. If, however, the
14100strings are to be used otherwise, be it for printing or testing, the extra
14101indentation will probably be an issue and hence this gem.")
14102 (license license:expat)))
14103
14104(define-public ruby-safe-yaml
14105 (package
14106 (name "ruby-safe-yaml")
14107 (version "1.0.5")
14108 (source
14109 (origin
14110 (method git-fetch)
14111 (uri (git-reference
14112 (url "https://github.com/dtao/safe_yaml")
14113 (commit version)))
14114 (file-name (git-file-name name version))
14115 (sha256
14116 (base32
14117 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
14118 (build-system ruby-build-system)
14119 (native-inputs
14120 (list ruby-rspec ruby-hashie ruby-heredoc-unindent))
14121 (arguments
14122 (list
14123 ;; Tests are broken since the move to ruby@3.
14124 ;; There's ongoing effort on the Jekyll dependent
14125 ;; to remove this orphan dependency.
14126 #:tests? #f ; broken since move to ruby@3
14127 #:test-target "spec"
14128 #:phases
14129 #~(modify-phases %standard-phases
14130 (add-before 'check 'set-TZ
14131 (lambda _
14132 ;; This test is dependent on the timezone
14133 ;; spec/transform/to_date_spec.rb:35
14134 ;; # SafeYAML::Transform::ToDate converts times to the local
14135 ;; timezone
14136 (setenv "TZ" "UTC-11"))))))
14137 (home-page "https://github.com/dtao/safe_yaml")
14138 (synopsis "YAML parser")
14139 (description "The SafeYAML gem provides an alternative implementation of
14140YAML.load suitable for accepting user input in Ruby applications.")
14141 (license license:expat)))
14142
14143(define-public ruby-yaml-lint
14144 ;; No tags for releases.
14145 (let ((commit "d6a253f7d33234a9c24660d582cf7014e882c0c2")
14146 (revision "0"))
14147 (package
14148 (name "ruby-yaml-lint")
14149 (version (git-version "0.1.2" revision commit))
14150 (source
14151 (origin
14152 (method git-fetch)
14153 (uri (git-reference
14154 (url "https://github.com/Pryz/yaml-lint")
14155 (commit commit)))
14156 (file-name (git-file-name name version))
14157 (sha256
14158 (base32 "0zk0jwzmcaaiyixjvkzdb54xhiqcnjkma72nkv0vm5csaphfdjkx"))))
14159 (build-system ruby-build-system)
14160 (arguments
14161 `(#:phases
14162 (modify-phases %standard-phases
14163 (add-after 'unpack 'sanitize-dependencies
14164 (lambda _
14165 (substitute* "spec/spec_helper.rb"
14166 ((".*[Cc]overalls.*") ""))))
14167 (replace 'check
14168 (lambda* (#:key tests? #:allow-other-keys)
14169 (when tests?
14170 (invoke "rspec")))))))
14171 (native-inputs
14172 (list ruby-coveralls ruby-rspec ruby-simplecov))
14173 (synopsis "Simple YAML check tool")
14174 (description
14175 "@code{yaml-lint} will simply try to load the YAML file with the built-in
14176Ruby yaml library.")
14177 (home-page "https://github.com/Pryz/yaml-lint")
14178 (license license:expat))))
14179
14180(define-public ruby-matrix
14181 (package
14182 (name "ruby-matrix")
14183 (version "0.4.2")
14184 (source (origin
14185 (method git-fetch) ;for tests
14186 (uri (git-reference
14187 (url "https://github.com/ruby/matrix")
14188 (commit (string-append "v" version))))
14189 (file-name (git-file-name name version))
14190 (sha256
14191 (base32
14192 "1asxr0jzh39lk5f8a9wm5avykrcy0v2wgd1bl3cszjczh99xy5k2"))))
14193 (build-system ruby-build-system)
14194 (synopsis "@code{Matrix} and @code{Vector} classes implementation for Ruby")
14195 (description "This Ruby library provides an implementation of the
14196@code{Matrix} and @code{Vector} classes. The @code{Matrix} class represents a
14197mathematical matrix. It provides methods for creating matrices, operating on
14198them arithmetically and algebraically, and determining their mathematical
14199properties (trace, rank, inverse, determinant, eigensystem, etc.). The
14200@code{Vector} class represents a mathematical vector, which is useful in its
14201own right, and also constitutes a row or column of a @code{Matrix}.")
14202 (home-page "https://github.com/ruby/matrix")
14203 (license license:bsd-2)))
14204
14205(define-public ruby-m
14206 (package
14207 (name "ruby-m")
14208 (version "1.6.2")
14209 (source (origin
14210 (method git-fetch) ;for tests
14211 (uri (git-reference
14212 (url "https://github.com/qrush/m")
14213 (commit (string-append "v" version))))
14214 (file-name (git-file-name name version))
14215 (sha256
14216 (base32
14217 "0za9jsq341xyqjaswx2wrd4x42w9a2xygarh9spsvsxaxf5b1sz3"))))
14218 (build-system ruby-build-system)
14219 (arguments
14220 (list
14221 #:phases
14222 #~(modify-phases %standard-phases
14223 (add-after 'unpack 'sanitize-dependencies
14224 (lambda _
14225 (delete-file "Gemfile")
14226 (substitute* "m.gemspec"
14227 ((".*coveralls.*") ""))
14228 (substitute* "Rakefile"
14229 ((".*require \"coveralls\".*") "")
14230 ((".*require \"standard/rake\".*") "")
14231 (("Coveralls.push!") "")
14232 (("\"standard:fix\"") ""))))
14233 (add-before 'replace-git-ls-files 'pre-replace-git-ls-files
14234 (lambda _
14235 (substitute* "m.gemspec"
14236 (("git ls-files -- bin/\\*")
14237 "find bin -type f -not -regex '.*\\.gem$' | sort")
14238 (("git ls-files -- \\{test,spec,features}/\\*")
14239 "find test -type f -not -regex '.*\\.gem$' | sort"))))
14240 (delete 'check)
14241 (add-after 'install 'check
14242 (lambda* (#:key tests? #:allow-other-keys)
14243 (setenv "GEM_PATH" (string-append
14244 (getenv "GEM_PATH") ":"
14245 #$output "/lib/ruby/vendor_ruby"))
14246 (when tests?
14247 (invoke "rake" "test")))))))
14248 (native-inputs (list ruby-activesupport))
14249 (propagated-inputs (list ruby-method-source ruby-rake))
14250 (synopsis "Ruby test runner that can run tests by line number")
14251 (description "@code{m} stands for metal, a better test/unit and
14252@code{minitest} test runner that can run tests by line number.")
14253 (home-page "https://github.com/qrush/m")
14254 (license license:expat)))
14255
14256(define-public ruby-mercenary
14257 (package
14258 (name "ruby-mercenary")
14259 (version "0.4.0")
14260 (source (origin
14261 (method url-fetch)
14262 (uri (rubygems-uri "mercenary" version))
14263 (sha256
14264 (base32
14265 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
14266 (build-system ruby-build-system)
14267 (arguments `(#:test-target "spec"))
14268 (native-inputs
14269 (list bundler))
14270 (home-page "https://github.com/jekyll/mercenary")
14271 (synopsis "Command-line apps library in Ruby")
14272 (description "Mercenary is a lightweight and flexible library for writing
14273command-line apps in Ruby.")
14274 (license license:expat)))
14275
14276(define-public ruby-launchy
14277 (package
14278 (name "ruby-launchy")
14279 (version "2.5.2")
14280 (source (origin
14281 (method url-fetch)
14282 (uri (rubygems-uri "launchy" version))
14283 (sha256
14284 (base32
14285 "06r43899384das2bkbrpsdxsafyyqa94il7111053idfalb4984a"))))
14286 (build-system ruby-build-system)
14287 (native-inputs (list curl links ruby-simplecov))
14288 (propagated-inputs (list ruby-addressable))
14289 (synopsis "Ruby helper class for launching applications")
14290 (description
14291 "Launchy is helper class for launching applications in a fire and forget
14292manner. The aim of Launchy is to provide a common approach to launching
14293external applications from within Ruby programs.")
14294 (home-page "https://github.com/copiousfreetime/launchy")
14295 (license license:isc)))
14296
14297(define-public ruby-strscan
14298 (package
14299 (name "ruby-strscan")
14300 (version "3.1.8")
14301 (source
14302 (origin
14303 (method git-fetch) ;for tests
14304 (uri (git-reference
14305 (url "https://github.com/ruby/strscan")
14306 (commit (string-append "v" version))))
14307 (file-name (git-file-name name version))
14308 (sha256
14309 (base32 "0xnxa8s619jrg2l2sc4f3b3vwg3659hqpmnzhl0mg0v2wmny8vwr"))))
14310 (build-system ruby-build-system)
14311 (arguments
14312 (list
14313 #:phases
14314 #~(modify-phases %standard-phases
14315 (add-before 'check 'remove-bundler-setup
14316 (lambda _
14317 (substitute* "Rakefile"
14318 (("-rbundler/setup")
14319 ""))))
14320 (add-before 'check 'set-gem-path
14321 (lambda _
14322 (setenv "GEM_PATH"
14323 (string-append (getenv "GEM_PATH") ":"
14324 #$output "/lib/ruby/vendor_ruby"))))
14325 (delete 'check)
14326 (add-after 'install 'check
14327 (assoc-ref %standard-phases
14328 'check)))))
14329 (native-inputs (list ruby-rake-compiler ruby-test-unit
14330 ruby-test-unit-ruby-core))
14331 (synopsis "Lexical scanning operations for Ruby")
14332 (description
14333 "This package provides lexical scanning operations on a String in Ruby.")
14334 (home-page "https://github.com/ruby/strscan")
14335 (license (list license:ruby license:bsd-2))))
14336
14337(define-public ruby-liquid
14338 (package
14339 (name "ruby-liquid")
14340 (version "5.13.0")
14341 (source (origin
14342 (method git-fetch) ;for tests
14343 (uri (git-reference
14344 (url "https://github.com/Shopify/liquid")
14345 (commit (string-append "v" version))))
14346 (file-name (git-file-name name version))
14347 (sha256
14348 (base32
14349 "0i46vn4n6nhx4gbwx8c9nflg5k0nr8pbgifgpry3kbkrqsmkimib"))))
14350 (build-system ruby-build-system)
14351 (arguments
14352 (list
14353 #:phases
14354 #~(modify-phases %standard-phases
14355 (delete 'check) ;moved after the install phase
14356 (add-after 'install 'check
14357 (assoc-ref %standard-phases 'check))
14358 (add-before 'check 'set-GEM_PATH
14359 (lambda _
14360 (setenv "GEM_PATH" (string-append
14361 (getenv "GEM_PATH") ":"
14362 #$output "/lib/ruby/vendor_ruby"))))
14363 (add-before 'check 'delete-problematic-tests
14364 (lambda _
14365 ;; The following test fails with 'Unknown tag' errors (see:
14366 ;; https://github.com/Shopify/liquid/issues/1699).
14367 (delete-file "test/integration/tags/inline_comment_test.rb")))
14368 (add-before 'check 'remove-cache-tests
14369 (lambda _
14370 (substitute* "test/integration/expression_test.rb"
14371 (("require 'lru_redux'") "")
14372 (("test_expression_cache_with_lru_redux" name)
14373 (string-append name "; skip 'requires lru_redux gem';"))))))))
14374 (native-inputs (list ruby-rspec ruby-stackprof))
14375 (propagated-inputs (list ruby-strscan ruby-bigdecimal))
14376 (home-page "https://shopify.github.io/liquid/")
14377 (synopsis "Template language")
14378 (description "Liquid is a template language written in Ruby. It is used
14379to load dynamic content on storefronts.")
14380 (license license:expat)))
14381
14382(define-public ruby-liquid-4
14383 (package
14384 (inherit ruby-liquid)
14385 (name "ruby-liquid")
14386 (version "4.0.4")
14387 (source (origin
14388 (method git-fetch) ;for tests
14389 (uri (git-reference
14390 (url "https://github.com/Shopify/liquid")
14391 (commit (string-append "v" version))))
14392 (file-name (git-file-name name version))
14393 (sha256
14394 (base32
14395 "0cr321nd0zkbxirgdfmz37xx7j26zfnicjh585fi20vx60frry83"))))
14396 (arguments (list #:tests? #f))))
14397
14398(define-public ruby-localhost
14399 (package
14400 (name "ruby-localhost")
14401 (version "1.1.10")
14402 (source (origin
14403 (method git-fetch) ;for tests
14404 (uri (git-reference
14405 (url "https://github.com/socketry/localhost")
14406 (commit (string-append "v" version))))
14407 (file-name (git-file-name name version))
14408 (sha256
14409 (base32
14410 "1yp70w15wpfk613ap5f4y15yx4n2qqwa67vqc2f4lv7npf3llcz0"))))
14411 (build-system ruby-build-system)
14412 (arguments
14413 ;; XXX: The test suite requires sus-fixtures-async, which requires async,
14414 ;; only available for Ruby 3.0.
14415 (list #:tests? #f
14416 #:phases
14417 #~(modify-phases %standard-phases
14418 (add-before 'build 'remove-missing-signing-key
14419 (lambda _
14420 ;; Otherwise, the build fails with ENOENT.
14421 (substitute* "localhost.gemspec"
14422 ((".*spec.signing_key.*") "")))))))
14423 (synopsis "API for generating per-user self-signed root certificates")
14424 (description "This package provides @code{localhost}, a Ruby library for
14425Managing a local certificate authority for self-signed, localhost development
14426servers.")
14427 (home-page "https://github.com/socketry/localhost")
14428 (license license:expat)))
14429
14430(define-public ruby-forwardable-extended
14431 (package
14432 (name "ruby-forwardable-extended")
14433 (version "2.6.0")
14434 (source (origin
14435 (method url-fetch)
14436 (uri (rubygems-uri "forwardable-extended" version))
14437 (sha256
14438 (base32
14439 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
14440 (build-system ruby-build-system)
14441 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
14442 (home-page "https://github.com/envygeeks/forwardable-extended")
14443 (synopsis "Delegation to hashes and instance variables in Forwardable")
14444 (description "Forwardable Extended provides more @code{Forwardable}
14445methods for your source as @code{Forwardable::Extended}.")
14446 (license license:expat)))
14447
14448(define-public ruby-pathutil
14449 (package
14450 (name "ruby-pathutil")
14451 (version "0.16.2")
14452 (source (origin
14453 (method url-fetch)
14454 (uri (rubygems-uri "pathutil" version))
14455 (sha256
14456 (base32
14457 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
14458 (build-system ruby-build-system)
14459 (propagated-inputs
14460 (list ruby-forwardable-extended))
14461 (native-inputs
14462 (list bundler ruby-rspec))
14463 ;; Fails with: cannot load such file --
14464 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
14465 (arguments `(#:tests? #f))
14466 (home-page "https://github.com/envygeeks/pathutil")
14467 (synopsis "Extended implementation of Pathname")
14468 (description "Pathutil tries to be a faster pure Ruby implementation of
14469Pathname.")
14470 (license license:expat)))
14471
14472(define-public ruby-terminal-table
14473 (package
14474 (name "ruby-terminal-table")
14475 (version "4.0.0")
14476 (source
14477 (origin
14478 (method git-fetch)
14479 (uri (git-reference
14480 (url "https://github.com/tj/terminal-table")
14481 (commit (string-append "v" version))))
14482 (file-name (git-file-name name version))
14483 (sha256
14484 (base32 "17s0zvbix72d5ivv1mqi9hyzqrippn01spglj6zg3g18v4vkg0lk"))))
14485 (arguments
14486 '(#:phases (modify-phases %standard-phases
14487 (add-before 'check 'remove-unnecessary-dependencies
14488 (lambda _
14489 (substitute* "terminal-table.gemspec"
14490 (("s.add_runtime_dependency.*")
14491 "\n")
14492 (("s.add_development_dependency.*")
14493 "\n"))
14494 (substitute* "Gemfile"
14495 ((".*tins.*")
14496 "\n"))))
14497 (replace 'check
14498 (lambda* (#:key tests? #:allow-other-keys)
14499 (when tests?
14500 (invoke "rspec")))))))
14501 (build-system ruby-build-system)
14502 (propagated-inputs (list ruby-unicode-display-width))
14503 (native-inputs (list ruby-rspec))
14504 (home-page "https://github.com/tj/terminal-table")
14505 (synopsis "Simple, feature rich ASCII table generation library")
14506 (description "Terminal Table is a fast and simple, yet feature rich
14507table generator written in Ruby. It supports ASCII and
14508Unicode formatted tables.")
14509 (license license:expat)))
14510
14511(define-public jekyll
14512 (package
14513 (name "jekyll")
14514 (version "4.4.1")
14515 (source (origin
14516 (method git-fetch) ;for tests
14517 (uri (git-reference
14518 (url "https://github.com/jekyll/jekyll")
14519 (commit (string-append "v" version))))
14520 (file-name (git-file-name name version))
14521 (sha256
14522 (base32
14523 "13cgr7nhxsmackzc976pcvrmam0il623rz13fnr9f7g4g3d1m1lq"))))
14524 (build-system ruby-build-system)
14525 (arguments
14526 (list #:modules '((guix build ruby-build-system)
14527 (guix build utils)
14528 (ice-9 ftw)
14529 (srfi srfi-26))
14530 ;; The cucumber acceptance suite is not run as it depends on an old
14531 ;; version (5).
14532 #:test-target "spec"
14533 #:phases
14534 #~(modify-phases %standard-phases
14535 (add-after 'unpack 'loosen-dependencies
14536 (lambda _
14537 (substitute* "jekyll.gemspec"
14538 (("(.*terminal-table.*,.*),.*" _ m)
14539 (string-append m ")\n")))))
14540 (add-before 'check 'disable-problematic-tests
14541 ;; TODO: Package the missing test inputs.
14542 (lambda _
14543 (with-directory-excursion "test"
14544 ;; Requires 'jekyll-coffeescript'.
14545 (delete-file "test_coffeescript.rb")
14546 ;; Requires 'tomlrb'.
14547 (delete-file "test_configuration.rb")
14548 (substitute* "test_filters.rb"
14549 ;; The sassify tests fail due to white space
14550 ;; differences (see:
14551 ;; https://github.com/jekyll/jekyll/issues/9322).
14552 ((".*s?ssify with simple string.*" all)
14553 (string-append all
14554 " skip('fails on guix')\n")))
14555 ;; Requires kramdown-syntax-coderay.
14556 (delete-file "test_kramdown.rb")
14557 ;; Requires 'test-theme', usually made available from the
14558 ;; local checkout via Bundler (not used here).
14559 (delete-file "test_layout_reader.rb")
14560 ;; Requires a large amount of un-packaged dependencies.
14561 (delete-file "test_plugin_manager.rb")
14562 ;; Requires 'classifier-reborn'.
14563 (delete-file "test_related_posts.rb")
14564 ;; This one causes a test failure similar to the ones for
14565 ;; sassify above.
14566 (delete-file "test_sass.rb")
14567 ;; This would require running the tests via 'bundle
14568 ;; exec', but the Gemfile contains too many (extraneous)
14569 ;; dependencies.
14570 (delete-file "test_site.rb")
14571 ;; Delete the theme tests, as they require 'test-theme',
14572 ;; usually made available from the local checkout via the
14573 ;; Gemfile/bundler (not used here).
14574 (for-each delete-file
14575 (scandir
14576 "." (cut string-prefix? "test_theme" <>)))
14577 ;; This one also relies on 'test-theme'.
14578 (delete-file "test_liquid_renderer.rb")
14579 ;; This test assumes internet connectivity, negate it, as
14580 ;; there's no Internet in the build container.
14581 (substitute* "test_utils.rb"
14582 (("assert Utils::Internet\\.connected\\?")
14583 "refute Utils::Internet.connected?"))
14584 ;; These tests fail non-deterministically (see:
14585 ;; https://github.com/jekyll/jekyll/issues/9323).
14586 (delete-file "test_new_command.rb")
14587 (delete-file "test_collections.rb")
14588 ;; This requires post-install run with GEM_PATH.
14589 ;; Also requires more native-inputs.
14590 (substitute* "test_commands_serve.rb"
14591 ((".*\"fork is not supported.*" all)
14592 (string-append all
14593 " skip('fails on guix')\n"))))))
14594 (replace 'check
14595 (lambda* (#:key tests? #:allow-other-keys)
14596 (when tests?
14597 ;; Invoke the test scripts manually, as 'rake test'
14598 ;; doesn't show any failure details, making debugging
14599 ;; needlessly difficult.
14600 (for-each (lambda (f)
14601 (invoke "ruby" "-I" "test" f))
14602 (find-files "test" "^test_.*\\.rb$"))))))))
14603 (native-inputs
14604 (list bundler
14605 ruby-httpclient
14606 ruby-minitest-profile
14607 ruby-minitest-reporters
14608 ruby-nokogiri
14609 ruby-rspec
14610 ruby-rspec-mocks
14611 ruby-shoulda
14612 ruby-simplecov))
14613 (propagated-inputs
14614 (list ruby-addressable
14615 ruby-colorator
14616 ruby-em-websocket
14617 ruby-i18n
14618 ruby-jekyll-sass-converter
14619 ruby-jekyll-watch
14620 ruby-kramdown-parser-gfm
14621 ruby-liquid-4
14622 ruby-mercenary
14623 ruby-pathutil
14624 ruby-rouge
14625 ruby-safe-yaml
14626 ruby-sassc
14627 ruby-terminal-table
14628 ruby-webrick))
14629 (home-page "https://jekyllrb.com/")
14630 (synopsis "Static site generator")
14631 (description "Jekyll is a simple, blog aware, static site generator.")
14632 (license license:expat)))
14633
14634(define-public ruby-jekyll-paginate-v2
14635 (package
14636 (name "ruby-jekyll-paginate-v2")
14637 (version "3.0.0")
14638 (source (origin
14639 (method url-fetch)
14640 (uri (rubygems-uri "jekyll-paginate-v2" version))
14641 (sha256
14642 (base32
14643 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
14644 (build-system ruby-build-system)
14645 (propagated-inputs
14646 (list jekyll))
14647 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
14648 (synopsis "Pagination Generator for Jekyll 3")
14649 (description "The Pagination Generator forms the core of the pagination
14650logic in Jekyll. It calculates and generates the pagination pages.")
14651 (license license:expat)))
14652
14653(define-public ruby-faraday-net-http
14654 (package
14655 (name "ruby-faraday-net-http")
14656 (version "3.0.2")
14657 (source (origin
14658 (method url-fetch)
14659 (uri (rubygems-uri "faraday-net_http" version))
14660 (sha256
14661 (base32
14662 "13byv3mp1gsjyv8k0ih4612y6vw5kqva6i03wcg4w2fqpsd950k8"))))
14663 (build-system ruby-build-system)
14664 ;; Do not run the test suite here as it would introduce a dependency cycle
14665 ;; with ruby-faraday, which uses it as part of its test suite.
14666 (arguments (list #:tests? #f))
14667 (synopsis "Faraday adapter for Net::HTTP")
14668 (description "This gem is a Faraday adapter for the @code{Net::HTTP}
14669library. Faraday is an HTTP client library that provides a common interface
14670over many adapters.")
14671 (home-page "https://github.com/lostisland/faraday-net_http")
14672 (license license:expat)))
14673
14674(define-public ruby-faraday
14675 (package
14676 (name "ruby-faraday")
14677 (version "2.13.1")
14678 (source (origin
14679 (method git-fetch)
14680 (uri (git-reference
14681 (url "https://github.com/lostisland/faraday")
14682 (commit (string-append "v" version))))
14683 (file-name (git-file-name name version))
14684 (sha256
14685 (base32
14686 "1nln6cs42hr99908bfjiyjpfpi1bmpgdf2w1dii2x8fczykgahsk"))))
14687 (build-system ruby-build-system)
14688 (arguments
14689 (list
14690 #:test-target "spec"
14691 #:phases
14692 #~(modify-phases %standard-phases
14693 (add-after 'unpack 'sanitize-dependencies
14694 (lambda _
14695 (substitute* "spec/spec_helper.rb"
14696 ((".*coveralls.*") "")
14697 ((", Coveralls::SimpleCov::Formatter") "")))))))
14698 (native-inputs
14699 (list ruby-coveralls
14700 ruby-pry
14701 ruby-rack
14702 ruby-rspec
14703 ruby-simplecov
14704 ruby-webmock))
14705 ;; Propagate faraday-net-http as this is the default adapter used, and
14706 ;; many Ruby projects assumes it is available.
14707 (propagated-inputs (list ruby-ruby2-keywords ruby-faraday-net-http))
14708 (synopsis "Ruby HTTP/REST API client library")
14709 (description "Faraday is a HTTP/REST API client library which provides a
14710common interface over different adapters.")
14711 (home-page "https://github.com/lostisland/faraday")
14712 (license license:expat)))
14713
14714(define-public ruby-nio4r
14715 (package
14716 (name "ruby-nio4r")
14717 (version "2.7.4")
14718 (source
14719 (origin
14720 (method git-fetch)
14721 (uri (git-reference
14722 (url "https://github.com/socketry/nio4r")
14723 (commit (string-append "v" version))))
14724 (file-name (git-file-name name version))
14725 (sha256
14726 (base32
14727 "1planm0yrzgkjqvxbfrcp477k030f1cyplpf8g1p7dppgzk2iqqm"))))
14728 (build-system ruby-build-system)
14729 (arguments
14730 '(#:test-target "spec"
14731 #:phases
14732 (modify-phases %standard-phases
14733 (add-after 'extract-gemspec 'delete-certificate
14734 (lambda _
14735 (substitute* "nio4r.gemspec"
14736 (("spec.cert_chain = .*") "")
14737 (("spec.signing_key = .*") ""))))
14738 (add-before 'check 'compile
14739 (lambda _
14740 (invoke "rake" "compile"))))))
14741 (native-inputs
14742 (list bundler ruby-rake-compiler ruby-rspec ruby-rubocop))
14743 (synopsis "New I/O for Ruby")
14744 (description
14745 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
14746for scalable network clients and servers.")
14747 (home-page "https://github.com/socketry/nio4r")
14748 (license license:expat)))
14749
14750(define-public ruby-language-server-protocol
14751 (package
14752 (name "ruby-language-server-protocol")
14753 (version "3.17.0.3")
14754 (source (origin
14755 (method git-fetch) ;for tests
14756 (uri (git-reference
14757 (url "https://github.com/mtsmfm/language_server-protocol-ruby")
14758 (commit (string-append "v" version))))
14759 (file-name (git-file-name name version))
14760 (sha256
14761 (base32
14762 "0f2g301fz99c6nkca39s9227brlycznv8a9r4b4i99rg25m91lc6"))))
14763 (build-system ruby-build-system)
14764 (arguments
14765 (list
14766 #:phases
14767 #~(modify-phases %standard-phases
14768 (add-after 'unpack 'remove-unnecessary-dependencies
14769 (lambda _
14770 (substitute* "Gemfile"
14771 (("gem \"pry-byebug\"") ""))))
14772 (replace 'replace-git-ls-files
14773 (lambda _
14774 (substitute* "language_server-protocol.gemspec"
14775 (("git ls-files -z([^`]*)" _ files)
14776 (string-append "find " files
14777 " -type f -not -regex '.*\\.gem$'"
14778 " -print0 | sort -z"))))))))
14779 (native-inputs
14780 (list ruby-activesupport
14781 ruby-benchmark-ips
14782 ruby-m
14783 ruby-minitest
14784 ruby-minitest-power-assert))
14785 (synopsis "Language Server Protocol (LSP) development kit for Ruby")
14786 (description "This package provides a Language Server Protocol (LSP)
14787development kit for Ruby.")
14788 (home-page "https://github.com/mtsmfm/language_server-protocol-ruby")
14789 (license license:expat)))
14790
14791(define-public ruby-spy
14792 (package
14793 (name "ruby-spy")
14794 (version "1.0.5")
14795 (source
14796 (origin
14797 (method url-fetch)
14798 (uri (rubygems-uri "spy" version))
14799 (sha256
14800 (base32 "0g2mma8q17m26k5s864ndlvvqllhcivwg2wdigjvb7z06iw17gds"))))
14801 (build-system ruby-build-system)
14802 (arguments
14803 (list
14804 #:phases
14805 #~(modify-phases %standard-phases
14806 (add-after 'extract-gemspec 'relax-requirements
14807 (lambda _
14808 (substitute* "spy.gemspec"
14809 ((".*(pry|coveralls).*")
14810 ""))
14811 (substitute* "test/test_helper.rb"
14812 ((".*(pry|[Cc]overalls).*")
14813 ""))
14814 (substitute* "Gemfile"
14815 ((".*(redcarpet|yard).*")
14816 ""))))
14817 (add-before 'check 'skip-failing-tests
14818 (lambda _
14819 (substitute* "test/spy/test_subroutine.rb"
14820 (("test_spy_hook_records_number_of_calls2" name)
14821 (string-append name "; skip 'fails with Ruby 3.4';"))))))))
14822 (native-inputs (list ruby-minitest-reporters
14823 ruby-rspec-core ruby-rspec-expectations))
14824 (synopsis "Mocking library for Ruby")
14825 (description
14826 "Spy is a mocking library. By default, it will raise an
14827error if you attempt to stub a method that doesn't exist or call the stubbed
14828method with the wrong arity.")
14829 (home-page "https://github.com/ryanong/spy")
14830 (license license:expat)))
14831
14832(define-public ruby-subprocess
14833 (package
14834 (name "ruby-subprocess")
14835 (version "1.5.6")
14836 (source (origin
14837 (method url-fetch)
14838 (uri (rubygems-uri "subprocess" version))
14839 (sha256
14840 (base32
14841 "0v49ahfx9b75qg42sl8a3l367g2vihc16g8z5f2raxpxjl1wh2s2"))))
14842 (build-system ruby-build-system)
14843 ;; Do not run the test suite, as there its test dependency ruby-sord would
14844 ;; introduce a cycle with ruby-sorbet-runtime.
14845 (arguments (list #:tests? #f))
14846 (native-inputs (list ruby-minitest ruby-pry))
14847 (synopsis "Ruby library to control and communicate with spawned processes")
14848 (description "This Ruby library is controlling and communicating with
14849spawned processes. It is designed after Python's @code{subprocess} module.")
14850 (home-page "https://github.com/stripe/subprocess")
14851 (license license:expat)))
14852
14853(define-public ruby-sus
14854 (package
14855 (name "ruby-sus")
14856 (version "0.20.3")
14857 (source (origin
14858 (method git-fetch) ;for gems.rb
14859 (uri (git-reference
14860 (url "https://github.com/ioquatix/sus")
14861 (commit (string-append "v" version))))
14862 (file-name (git-file-name name version))
14863 (sha256
14864 (base32
14865 "0j4rkh9li79674h3lfkxlcdygscmb22l77i7hwhxl3gw103gkpdr"))))
14866 (build-system ruby-build-system)
14867 (arguments
14868 (list #:phases
14869 #~(modify-phases %standard-phases
14870 (add-before 'build 'remove-missing-signing-key
14871 (lambda _
14872 ;; Otherwise, the build fails with ENOENT.
14873 (substitute* "sus.gemspec"
14874 ((".*spec.signing_key.*") ""))))
14875 (delete 'check) ;moved after install
14876 (add-after 'install 'check
14877 (lambda* (#:key tests? #:allow-other-keys)
14878 (when tests?
14879 (setenv "CONSOLE_LEVEL" "debug")
14880 (setenv "HOME" "/tmp")
14881 (delete-file "config/sus.rb") ;remove covored gem
14882 (invoke "sus"))))
14883 (add-before 'check 'set-paths
14884 (lambda _
14885 (setenv "PATH" (string-append (getenv "PATH") ":"
14886 #$output "/bin"))
14887 (setenv "GEM_PATH" (string-append
14888 (getenv "GEM_PATH") ":"
14889 #$output "/lib/ruby/vendor_ruby")))))))
14890 (synopsis "Fast and scalable test runner for Ruby")
14891 (description "This package provides a fast and scalable test runner for Ruby.")
14892 (home-page "https://github.com/ioquatix/sus")
14893 (license license:expat)))
14894
14895(define-public ruby-syntax-tree
14896 (package
14897 (name "ruby-syntax-tree")
14898 (version "6.2.0")
14899 (source (origin
14900 (method git-fetch) ;for tests
14901 (uri (git-reference
14902 (url "https://github.com/ruby-syntax-tree/syntax_tree")
14903 (commit (string-append "v" version))))
14904 (file-name (git-file-name name version))
14905 (sha256
14906 (base32
14907 "0sbcpybh2m7vqiq4nd6b15iaha6q58210lq8wkdka8934gfizvdk"))))
14908 (build-system ruby-build-system)
14909 (arguments
14910 (list
14911 ;; Some tests are broken with [email protected].
14912 ;; See: https://github.com/ruby-syntax-tree/syntax_tree/issues/457
14913 #:tests? #f
14914 #:phases
14915 #~(modify-phases %standard-phases
14916 ;; The tests rely on the Gem being installed, so move the check
14917 ;; phase after the install phase.
14918 (delete 'check)
14919 (add-after 'install 'check
14920 (lambda* (#:key tests? #:allow-other-keys)
14921 (setenv "GEM_PATH" (string-append
14922 #$output "/lib/ruby/vendor_ruby:"
14923 (getenv "GEM_PATH")))
14924 (when tests?
14925 (invoke "rake" "test")))))))
14926 (native-inputs (list ruby-rubocop-ast ruby-simplecov))
14927 (propagated-inputs (list ruby-prettier-print))
14928 (synopsis "Fast Ruby parser and formatter")
14929 (description "Syntax Tree is a suite of tools built on top of the internal
14930CRuby parser. It provides the ability to generate a syntax tree from source,
14931as well as the tools necessary to inspect and manipulate that syntax tree. It
14932can be used to build formatters, linters, language servers, and more.")
14933 (home-page "https://github.com/ruby-syntax-tree/syntax_tree")
14934 (license license:expat)))
14935
14936(define-public ruby-stringio
14937 (package
14938 (name "ruby-stringio")
14939 (version "3.1.0")
14940 (source (origin
14941 (method git-fetch)
14942 (uri (git-reference
14943 (url "https://github.com/ruby/stringio")
14944 (commit (string-append "v" version))))
14945 (file-name (git-file-name name version))
14946 (sha256
14947 (base32
14948 "1jgi2w5y0z0x9mfapr2pdlag4wvn03fpf5kbai8bscyh8nn79yka"))))
14949 (build-system ruby-build-system)
14950 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
14951 (synopsis "Pseudo `IO` class from and to `String`")
14952 (description "Pseudo `IO` class from and to `String`.")
14953 (home-page "https://github.com/ruby/stringio")
14954 (license license:bsd-2)))
14955
14956(define-public ruby-stream
14957 (package
14958 (name "ruby-stream")
14959 (version "0.5.5")
14960 (source (origin
14961 (method url-fetch)
14962 (uri (rubygems-uri "stream" version))
14963 (sha256
14964 (base32
14965 "016m9v81vpj14d8g5ins91zc4pzl7vf5f1gxl7jhfsfy601k7cv2"))))
14966 (build-system ruby-build-system)
14967 (arguments
14968 '(#:phases
14969 (modify-phases %standard-phases
14970 (add-before 'check 'remove-version-constraints
14971 (lambda _
14972 (delete-file "Gemfile.lock"))))))
14973 (native-inputs (list bundler ruby-stringio ruby-webrick ruby-yard))
14974 (synopsis "Interface for external iterators")
14975 (description "Module Stream defines an interface for external iterators.")
14976 (home-page "https://github.com/monora/stream")
14977 (license license:bsd-2)))
14978
14979(define sorbet-version "0.5.10610.20230106174520-1fa668010")
14980
14981(define sorbet-monorepo
14982 (origin
14983 (method git-fetch)
14984 (uri (git-reference
14985 (url "https://github.com/sorbet/sorbet")
14986 (commit sorbet-version)))
14987 (file-name (string-append "sorbet-" sorbet-version "-checkout"))
14988 (sha256
14989 (base32
14990 "0f21dl06alxwn6xgdxyrkd58plmmsv04z2bcls9ld4cfzsrs5537"))))
14991
14992(define (make-sorbet-gem-source gem)
14993 "Return the source of GEM, a sub-directory."
14994 (computed-file
14995 (string-append "ruby-sorbet-" gem "-" sorbet-version "-checkout")
14996 (with-imported-modules (source-module-closure '((guix build utils)))
14997 #~(begin
14998 (use-modules (guix build utils))
14999 (copy-recursively (string-append #$sorbet-monorepo
15000 "/gems/sorbet-" #$gem)
15001 #$output)))))
15002
15003(define-public ruby-sorbet-runtime
15004 (package
15005 (name "ruby-sorbet-runtime")
15006 (version sorbet-version)
15007 (source (make-sorbet-gem-source "runtime"))
15008 (build-system ruby-build-system)
15009 ;; 25 out of 841 tests currently fail, seemingly due to invalid
15010 ;; assumptions about file names in the build environment (see:
15011 ;; https://github.com/sorbet/sorbet/issues/6650).
15012 (arguments (list #:tests? #f))
15013 (native-inputs
15014 (list ruby-minitest
15015 ruby-mocha
15016 ruby-rubocop
15017 ruby-rubocop-performance
15018 ruby-concurrent-ruby
15019 ruby-pry
15020 ruby-parser
15021 ruby-subprocess))
15022 (synopsis "Runtime type checking component for Sorbet")
15023 (description "Sorbet's runtime type checking component. Sorbet is a
15024powerful type checker for Ruby.")
15025 (home-page "https://sorbet.org")
15026 (license license:asl2.0)))
15027
15028(define-public ruby-mustache
15029 (package
15030 (name "ruby-mustache")
15031 (version "1.1.1")
15032 (source
15033 (origin
15034 (method url-fetch)
15035 (uri (rubygems-uri "mustache" version))
15036 (sha256
15037 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
15038 (build-system ruby-build-system)
15039 (native-inputs
15040 `(("ruby-simplecov" ,ruby-simplecov)
15041 ("test-patch"
15042 ,(search-patch "ruby-mustache-1.1.1-fix-race-condition-tests.patch"))))
15043 (arguments
15044 `(#:phases
15045 (modify-phases %standard-phases
15046 (add-after 'unpack 'patch-tests
15047 (lambda* (#:key inputs #:allow-other-keys)
15048 (invoke "patch" "-p1" "--batch" "-i"
15049 (assoc-ref inputs "test-patch")))))))
15050 (synopsis "Framework-agnostic way to render logic-free views")
15051 (description
15052 "Mustache is a framework-agnostic way to render logic-free views.
15053Think of Mustache as a replacement for your views. Instead of views
15054consisting of ERB or HAML with random helpers and arbitrary logic,
15055your views are broken into two parts: a Ruby class and an HTML
15056template.")
15057 (home-page "https://github.com/mustache/mustache")
15058 (license license:expat)))
15059
15060(define-public ruby-mustermann
15061 (package
15062 (name "ruby-mustermann")
15063 (version "3.0.0")
15064 (source
15065 (origin
15066 (method url-fetch)
15067 (uri (rubygems-uri "mustermann" version))
15068 (sha256
15069 (base32
15070 "0rwbq20s2gdh8dljjsgj5s6wqqfmnbclhvv2c2608brv7jm6jdbd"))))
15071 (build-system ruby-build-system)
15072 (arguments
15073 ;; No tests.
15074 '(#:tests? #f))
15075 (synopsis "Library implementing patterns that behave like regular expressions")
15076 (description "Given a string pattern, Mustermann will turn it into an
15077object that behaves like a regular expression and has comparable performance
15078characteristics.")
15079 (home-page "https://github.com/sinatra/mustermann")
15080 (license license:expat)))
15081
15082(define-public ruby-mutex-m
15083 (package
15084 (name "ruby-mutex-m")
15085 (version "0.3.0")
15086 (source
15087 (origin
15088 (method git-fetch)
15089 (uri (git-reference
15090 (url "https://github.com/ruby/mutex_m")
15091 (commit (string-append "v" version))))
15092 (file-name (git-file-name name version))
15093 (sha256
15094 (base32 "162khhcahd6bn4r63driw23745lyg7h5dx5hli3clxbrpa1c0qvx"))))
15095 (build-system ruby-build-system)
15096 (synopsis "Mixin to extend objects to be handled like a Mutex.")
15097 (description
15098 "When @code{mutex_m} is required, any object that extends or includes
15099@code{Mutex_m} will be treated like a Mutex.")
15100 (home-page "https://github.com/ruby/mutex_m")
15101 (license license:bsd-2)))
15102
15103(define-public ruby-prettier-print
15104 (package
15105 (name "ruby-prettier-print")
15106 (version "1.2.1")
15107 (source (origin
15108 (method git-fetch) ;for tests
15109 (uri (git-reference
15110 (url "https://github.com/ruby-syntax-tree/prettier_print")
15111 (commit (string-append "v" version))))
15112 (file-name (git-file-name name version))
15113 (sha256
15114 (base32
15115 "00cg40jc0il1hpsrpsrqwhsxmx7day9lxp1ksrm08zxzsrz9ykqz"))))
15116 (build-system ruby-build-system)
15117 (native-inputs (list ruby-simplecov))
15118 (synopsis "Compatible and featureful implementation of @code{prettyprint}")
15119 (description "This package provides a drop-in replacement for the
15120@code{prettyprint} gem, with more functionality.")
15121 (home-page "https://github.com/ruby-syntax-tree/prettier_print")
15122 (license license:expat)))
15123
15124(define-public ruby-html-proofer
15125 (package
15126 (name "ruby-html-proofer")
15127 (version "5.0.3")
15128 (source
15129 (origin
15130 (method git-fetch)
15131 (uri (git-reference
15132 (url "https://github.com/gjtorikian/html-proofer")
15133 (commit (string-append "v" version))))
15134 (file-name (git-file-name name version))
15135 (sha256
15136 (base32
15137 "01ksss3ikppc45z2q33bx8bb9785bqlp1rdqascaqg9mhs392adk"))))
15138 (build-system ruby-build-system)
15139 (arguments
15140 (list
15141 ;; Tests require vcr, which is under the Hippocratic license, which is
15142 ;; not a free software license (see:
15143 ;; https://www.gnu.org/licenses/license-list.html#hippocratic).
15144 #:tests? #f
15145 #:phases
15146 #~(modify-phases %standard-phases
15147 (add-after 'extract-gemspec 'relax-requirements
15148 (lambda _
15149 (substitute* "html-proofer.gemspec"
15150 (("required_ruby_version = \\[\">= 3.1\"")
15151 "required_ruby_version = [\">= 2.6\""))))
15152 (replace 'replace-git-ls-files
15153 (lambda _
15154 ;; The html-proofer.gemspec file contains 'all_files = %x(git
15155 ;; ls-files -z).split("\x0")', but the original phase matches on
15156 ;; `git ls-files -z`.
15157 ;; TODO: Improve ruby-build-system patterns on core-updates.
15158 (substitute* "html-proofer.gemspec"
15159 (("git ls-files -z")
15160 "find . -type f -not -regex '.*\\.gem$' -print0 \
15161| sort -z | cut -zc3-")))))))
15162 (propagated-inputs
15163 (list ruby-addressable
15164 ruby-mercenary
15165 ruby-nokogiri
15166 ruby-parallel
15167 ruby-rainbow
15168 ruby-typhoeus
15169 ruby-yell))
15170 (synopsis "Test your rendered HTML files to make sure they're accurate")
15171 (description
15172 "HTMLProofer is a set of tests to validate your HTML output. These
15173tests check if your image references are legitimate, if they have alt tags,
15174if your internal links are working, and so on. It's intended to be an
15175all-in-one checker for your output.")
15176 (home-page "https://github.com/gjtorikian/html-proofer")
15177 (license license:expat)))
15178
15179(define-public ruby-htmlentities
15180 (package
15181 (name "ruby-htmlentities")
15182 (version "4.3.4")
15183 (source
15184 (origin
15185 (method url-fetch)
15186 (uri (rubygems-uri "htmlentities" version))
15187 (sha256
15188 (base32
15189 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
15190 (build-system ruby-build-system)
15191 (arguments
15192 `(#:phases
15193 (modify-phases %standard-phases
15194 (replace 'check
15195 (lambda _
15196 (map (lambda (file)
15197 (invoke "ruby" "-Itest" file))
15198 (find-files "./test" ".*_test\\.rb")))))))
15199 (synopsis "Encode and decode (X)HTML entities")
15200 (description
15201 "This package provides a module for encoding and decoding (X)HTML
15202entities.")
15203 (home-page "https://github.com/threedaymonk/htmlentities")
15204 (license license:expat)))
15205
15206;;; FIXME: Currently broken with rack 3, awaiting the merge for
15207;;; https://github.com/sinatra/sinatra/pull/1857 and a new release.
15208(define-public ruby-sinatra
15209 (package
15210 (name "ruby-sinatra")
15211 (version "3.0.5")
15212 (source
15213 (origin
15214 (method url-fetch)
15215 (uri (rubygems-uri "sinatra" version))
15216 (sha256
15217 (base32
15218 "1ryfja9yd3fq8n1p5yi3qnd0pjk7bkycmxxmbb1bj0axlr1pdv20"))))
15219 (build-system ruby-build-system)
15220 (propagated-inputs
15221 (list ruby-mustermann ruby-rack ruby-rack-protection ruby-tilt/minimal))
15222 (synopsis "DSL for quick web applications creation in Ruby")
15223 (description
15224 "Sinatra is a DSL for quickly creating web applications in Ruby with
15225minimal effort.")
15226 (home-page "https://sinatrarb.com/")
15227 (license license:expat)))
15228
15229(define-public ruby-timeout
15230 (package
15231 (name "ruby-timeout")
15232 (version "0.6.1")
15233 (source (origin
15234 (method git-fetch) ;for tests
15235 (uri (git-reference
15236 (url "https://github.com/ruby/timeout")
15237 (commit (string-append "v" version))))
15238 (file-name (git-file-name name version))
15239 (sha256
15240 (base32
15241 "1901x2cabiiiq9awz636aifsrxnx8k4wbgpaq0dz6486pf1jv2sl"))))
15242 (build-system ruby-build-system)
15243 (native-inputs (list ruby-test-unit-ruby-core))
15244 (synopsis "Timeout library for Ruby")
15245 (description "Timeout provides a way to auto-terminate a potentially
15246long-running operation if it hasn't finished in a fixed amount of time.")
15247 (home-page "https://github.com/ruby/timeout")
15248 (license (list license:bsd-2 license:ruby))))
15249
15250(define-public ruby-thin
15251 (package
15252 (name "ruby-thin")
15253 (version "1.7.2")
15254 (source
15255 (origin
15256 (method url-fetch)
15257 (uri (rubygems-uri "thin" version))
15258 (sha256
15259 (base32
15260 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
15261 (build-system ruby-build-system)
15262 (arguments
15263 '(#:tests? #f
15264 #:gem-flags '("--" "--with-cflags=-Wno-error=implicit-function-declaration")))
15265 (propagated-inputs
15266 (list ruby-daemons ruby-eventmachine ruby-rack))
15267 (synopsis "Thin and fast web server for Ruby")
15268 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
15269@itemize
15270@item the Mongrel parser,
15271@item Event Machine, a network I/O library with high scalability, performance
15272and stability,
15273@item Rack, a minimal interface between webservers and Ruby frameworks.
15274@end itemize\n")
15275 (home-page "https://github.com/macournoyer/thin")
15276 (license license:ruby)))
15277
15278(define-public ruby-truthy
15279 (package
15280 (name "ruby-truthy")
15281 (version "1.0.0")
15282 (source (origin
15283 (method url-fetch)
15284 (uri (rubygems-uri "truthy" version))
15285 (sha256
15286 (base32
15287 "19silgd65j3qwfk5w891p9wcmzdmi9ddm2kg5zbvvqn2h9lkfzmd"))))
15288 (build-system ruby-build-system)
15289 (arguments (list #:phases #~(modify-phases %standard-phases
15290 (replace 'check
15291 (lambda* (#:key tests? #:allow-other-keys)
15292 (when tests?
15293 (substitute* "spec/spec_helper.rb"
15294 (("require 'spec'")
15295 "require 'rspec'"))
15296 (invoke "rspec")))))))
15297 (native-inputs (list ruby-rspec))
15298 (synopsis "Object truthiness-related Ruby library")
15299 (description "This library makes it easier to discover the truth values of
15300various Ruby objects.")
15301 (home-page "https://github.com/ymendel/truthy")
15302 (license license:expat)))
15303
15304(define-public ruby-tsort
15305 (package
15306 (name "ruby-tsort")
15307 (version "0.2.0")
15308 (source
15309 (origin
15310 (method url-fetch)
15311 (uri (rubygems-uri "tsort" version))
15312 (sha256
15313 (base32 "17q8h020dw73wjmql50lqw5ddsngg67jfw8ncjv476l5ys9sfl4n"))))
15314 (build-system ruby-build-system)
15315 (synopsis "Topological sorting library for Ruby")
15316 (description
15317 "This RubyGem implements topological sorting using Tarjan's algorithm
15318for strongly connected components. It is designed to be able to be
15319used with any object which can be interpreted as a directed graph.")
15320 (home-page "https://github.com/ruby/tsort")
15321 (license (list license:ruby license:bsd-2))))
15322
15323(define-public ruby-skinny
15324 (package
15325 (name "ruby-skinny")
15326 (version "0.2.4")
15327 (source
15328 (origin
15329 (method url-fetch)
15330 (uri (rubygems-uri "skinny" version))
15331 (sha256
15332 (base32
15333 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
15334 (build-system ruby-build-system)
15335 (arguments
15336 '(#:tests? #f ; No included tests
15337 #:phases
15338 (modify-phases %standard-phases
15339 (add-before 'build 'patch-gemspec
15340 (lambda _
15341 (substitute* ".gemspec"
15342 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
15343 "<eventmachine>, [\">= 1.0.0\"")
15344 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, [")))))))
15345 (propagated-inputs
15346 (list ruby-eventmachine ruby-thin))
15347 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
15348 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
15349the Thin library.")
15350 (home-page "https://github.com/sj26/skinny")
15351 (license license:expat)))
15352
15353(define-public ruby-sys-filesystem
15354 (package
15355 (name "ruby-sys-filesystem")
15356 (version "1.3.4")
15357 (source (origin
15358 (method url-fetch)
15359 (uri (rubygems-uri "sys-filesystem" version))
15360 (sha256
15361 (base32
15362 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
15363 (build-system ruby-build-system)
15364 (arguments
15365 '(#:phases (modify-phases %standard-phases
15366 (add-before 'check 'set-HOME
15367 (lambda _
15368 ;; Some tests attempt to stat $HOME. Let them.
15369 (setenv "HOME" "/tmp"))))))
15370 (propagated-inputs
15371 (list ruby-ffi))
15372 (native-inputs
15373 (list ruby-mkmf-lite))
15374 (synopsis "Gather file system information")
15375 (description
15376 "The @code{sys-filesystem} library provides a cross-platform interface
15377for gathering file system information, such as disk space and mount points.")
15378 (home-page "https://github.com/djberg96/sys-filesystem")
15379 (license license:asl2.0)))
15380
15381(define-public mailcatcher
15382 (package
15383 (name "mailcatcher")
15384 (version "0.7.1")
15385 (source
15386 (origin
15387 (method url-fetch)
15388 (uri (rubygems-uri "mailcatcher" version))
15389 (sha256
15390 (base32
15391 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
15392 (build-system ruby-build-system)
15393 (arguments
15394 ;; Tests require web/assets which is not included in the output. We
15395 ;; might be able to fix this by adding the Git repository to the GEM_PATH
15396 ;; of the tests. See ruby-mysql2.
15397 '(#:tests? #f
15398 #:phases
15399 (modify-phases %standard-phases
15400 (add-before 'build 'patch-gemspec
15401 (lambda _
15402 (substitute* ".gemspec"
15403 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
15404 "<eventmachine>, [\">= 1.0.9.1")
15405 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
15406 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
15407 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))))
15408 (add-before 'build 'loosen-dependency-contraint
15409 (lambda _
15410 (substitute* "lib/mail_catcher.rb"
15411 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
15412 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
15413 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
15414 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\"")))))))
15415 (inputs
15416 (list ruby-eventmachine
15417 ruby-mail
15418 ruby-rack
15419 ruby-sinatra
15420 ruby-skinny
15421 ruby-sqlite3
15422 ruby-thin))
15423 (synopsis "SMTP server which catches messages to display them a browser")
15424 (description
15425 "MailCatcher runs a super simple SMTP server which catches any message
15426sent to it to display in a web interface. Run mailcatcher, set your favourite
15427app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
15428then check out http://127.0.0.1:1080 to see the mail.")
15429 (home-page "https://mailcatcher.me")
15430 (license license:expat)))
15431
15432(define-public ruby-backport
15433 (package
15434 (name "ruby-backport")
15435 (version "1.1.2")
15436 (source
15437 (origin
15438 ;; The gem does not include test code, so fetch from the Git repository.
15439 (method git-fetch)
15440 (uri (git-reference
15441 (url "https://github.com/castwide/backport")
15442 (commit (string-append "v" version))))
15443 (file-name (git-file-name name version))
15444 (sha256
15445 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
15446 (build-system ruby-build-system)
15447 (arguments
15448 `(#:test-target "spec"))
15449 (native-inputs
15450 (list bundler ruby-rspec))
15451 (inputs
15452 (list ruby-simplecov))
15453 (synopsis "Pure Ruby library for event-driven IO")
15454 (description
15455 "This package provides a pure Ruby library for event-driven IO.")
15456 (home-page "https://github.com/castwide/backport")
15457 (license license:expat)))
15458
15459(define-public ruby-json-schema
15460 (package
15461 (name "ruby-json-schema")
15462 (version "2.8.1")
15463 (source
15464 (origin
15465 (method url-fetch)
15466 (uri (rubygems-uri "json-schema" version))
15467 (sha256
15468 (base32
15469 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
15470 (build-system ruby-build-system)
15471 (arguments
15472 `(#:tests? #f ; no tests
15473 #:phases
15474 (modify-phases %standard-phases
15475 (replace 'build
15476 (lambda _
15477 (invoke "gem" "build" ".gemspec"))))))
15478 (propagated-inputs
15479 (list ruby-addressable))
15480 (synopsis "Ruby JSON Schema Validator")
15481 (description "This library provides Ruby with an interface for validating
15482JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
15483support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
15484is also included.")
15485 (home-page "https://github.com/ruby-json-schema/json-schema")
15486 (license license:expat)))
15487
15488(define-public swagger-diff
15489 (package
15490 (name "swagger-diff")
15491 (version "2.0.0")
15492 (source
15493 (origin
15494 (method url-fetch)
15495 (uri (rubygems-uri "swagger-diff" version))
15496 (sha256
15497 (base32
15498 "18kbrijkafs3vfsbaqz0cqfj7jrz3aj8xr4fgn5if63wlximybv2"))))
15499 (build-system ruby-build-system)
15500 (arguments
15501 (list
15502 #:test-target "spec"
15503 #:phases
15504 #~(modify-phases %standard-phases
15505 ;; Don't run or require rubocop, the code linting tool, as this is a
15506 ;; bit unnecessary.
15507 (add-after 'unpack 'dont-run-rubocop
15508 (lambda _
15509 (substitute* "Rakefile"
15510 ((".*rubocop.*") "")
15511 ((".*RuboCop.*") "")))))))
15512 (propagated-inputs
15513 (list ruby-json-schema))
15514 (native-inputs
15515 (list bundler ruby-rspec-core ruby-rspec-expectations))
15516 (synopsis
15517 "Compare Open API Initiative specification files")
15518 (description
15519 "Swagger::Diff is a utility for comparing two different Open API
15520Initiative (OAI) specifications (formerly known as Swagger specifications).
15521It is intended to determine whether a newer API specification is
15522backwards-compatible with an older API specification.")
15523 (home-page "https://github.com/civisanalytics/swagger-diff")
15524 (license license:bsd-3)))
15525
15526(define-public ruby-reverse-markdown
15527 (package
15528 (name "ruby-reverse-markdown")
15529 (version "1.1.0")
15530 (source
15531 (origin
15532 (method url-fetch)
15533 (uri (rubygems-uri "reverse_markdown" version))
15534 (sha256
15535 (base32
15536 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
15537 (build-system ruby-build-system)
15538 (propagated-inputs
15539 (list ruby-nokogiri))
15540 (native-inputs
15541 (list bundler ruby-rspec ruby-kramdown ruby-simplecov))
15542 (arguments
15543 `(#:phases
15544 (modify-phases %standard-phases
15545 (replace 'check
15546 (lambda* (#:key tests? #:allow-other-keys)
15547 (when tests?
15548 (invoke "rspec")))))))
15549 (synopsis "Convert HTML into Markdown")
15550 (description
15551 "This Ruby module allows you to map simple HTML back into
15552Markdown---e.g., if you want to import existing HTML data in your
15553application.")
15554 (home-page "https://github.com/xijo/reverse_markdown")
15555 (license license:wtfpl2)))
15556
15557(define-public ruby-solargraph
15558 (package
15559 (name "ruby-solargraph")
15560 (version "0.40.3")
15561 (source
15562 (origin
15563 (method url-fetch)
15564 (uri (rubygems-uri "solargraph" version))
15565 (sha256
15566 (base32
15567 "1gf049rm0yvw4r8r5yyi890idbfg8qh0dikqx5prvkh11srl73bz"))))
15568 (build-system ruby-build-system)
15569 (propagated-inputs
15570 (list ruby-backport
15571 bundler
15572 ruby-benchmark
15573 ruby-e2mmap
15574 ruby-jaro-winkler
15575 ruby-kramdown
15576 ruby-kramdown-parser-gfm
15577 ruby-maruku
15578 ruby-nokogiri
15579 ruby-parser
15580 ruby-reverse-markdown
15581 ruby-rubocop
15582 ruby-thor
15583 ruby-tilt
15584 ruby-yard))
15585 (native-inputs
15586 (list ruby-rspec ruby-pry ruby-simplecov ruby-webmock))
15587 ;; FIXME: can't figure out how to run the tests properly:
15588
15589 ;; An error occurred while loading spec_helper.
15590 ;; Failure/Error: return gem_original_require(path)
15591 ;; LoadError:
15592 ;; cannot load such file -- spec_helper
15593 (arguments
15594 '(#:tests? #f
15595 #:phases
15596 (modify-phases %standard-phases
15597 (replace 'check
15598 (lambda* (#:key tests? #:allow-other-keys)
15599 (when tests?
15600 (invoke "rspec")))))))
15601 (synopsis
15602 "IDE tools for code completion, inline documentation, and static analysis")
15603 (description
15604 "Solargraph provides a comprehensive suite of tools for Ruby
15605programming: intellisense, diagnostics, inline documentation, and type
15606checking.")
15607 (home-page "https://solargraph.org/")
15608 (license license:expat)))
15609
15610(define-public ruby-wayback-machine-downloader
15611 (package
15612 (name "ruby-wayback-machine-downloader")
15613 (version "2.2.1")
15614 (source
15615 (origin
15616 (method url-fetch)
15617 (uri (rubygems-uri
15618 "wayback_machine_downloader"
15619 version))
15620 (sha256
15621 (base32
15622 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
15623 (build-system ruby-build-system)
15624 (arguments
15625 '(#:tests? #f)) ; no tests
15626 (synopsis "Download archived websites from the Wayback Machine")
15627 (description
15628 "Wayback Machine Downloader is a command line tool for downloading
15629websites from the Internet Archive's Wayback Machine (archive.org).
15630It allows fine grained control over what to download by specifying
15631which snapshots to consider and what files to include.")
15632 (home-page
15633 "https://github.com/hartator/wayback-machine-downloader")
15634 (license license:expat)))
15635
15636(define-public ruby-zeitwerk
15637 (package
15638 (name "ruby-zeitwerk")
15639 (version "2.7.1")
15640 (source
15641 (origin
15642 (method git-fetch) ;for tests
15643 (uri (git-reference
15644 (url "https://github.com/fxn/zeitwerk")
15645 (commit (string-append "v" version))))
15646 (file-name (git-file-name name version))
15647 (sha256
15648 (base32
15649 "19qmcdpbh4bl878zd1w19064yjkpb8sxaydcasqfa7p8cfg3hnsr"))))
15650 (build-system ruby-build-system)
15651 (native-inputs
15652 (list ruby-minitest
15653 ruby-minitest-focus
15654 ruby-minitest-proveit
15655 ruby-minitest-reporters
15656 ruby-warning))
15657 (synopsis "Efficient and thread-safe code loader for Ruby")
15658 (description
15659 "Zeitwerk implements constant autoloading with Ruby semantics. Each gem
15660and application may have their own independent autoloader, with its own
15661configuration, inflector, and logger. Supports autoloading, reloading, and
15662eager loading.")
15663 (home-page "https://github.com/fxn/zeitwerk")
15664 (license license:expat)))
15665
15666(define-public ruby-warning
15667 (package
15668 (name "ruby-warning")
15669 (version "1.5.0")
15670 (source
15671 (origin
15672 (method url-fetch)
15673 (uri (rubygems-uri "warning" version))
15674 (sha256
15675 (base32 "0lwcf7fsz1sda1fdbqq1i4q9kzg4f5vwrzgfg1vpa1hcxagw84hg"))))
15676 (build-system ruby-build-system)
15677 (arguments '(#:tests? #f)) ; No tests bundled.
15678 (synopsis "Custom processing for warnings")
15679 (description
15680 "This package adds custom processing for warnings for Ruby, including the
15681ability to ignore specific warning messages, ignore warnings in specific
15682files/directories, include backtraces with warnings, treat warnings as errors,
15683deduplicate warnings, and add custom handling for all warnings in specific
15684files/directories.")
15685 (home-page "https://github.com/jeremyevans/ruby-warning")
15686 (license license:expat)))
15687
15688(define-public ruby-wwtd
15689 (package
15690 (name "ruby-wwtd")
15691 (version "1.4.1")
15692 (home-page "https://github.com/grosser/wwtd")
15693 (source (origin
15694 (method git-fetch)
15695 (uri (git-reference
15696 (url home-page)
15697 (commit (string-append "v" version))))
15698 (file-name (git-file-name name version))
15699 (sha256
15700 (base32
15701 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
15702 (modules '((guix build utils)))
15703 (snippet
15704 '(begin
15705 ;; Remove bundled library.
15706 (delete-file "spec/rake-12.3.0.gem")))))
15707 (build-system ruby-build-system)
15708 (arguments
15709 '(;; XXX: Tests need multiple versions of ruby, wants to run
15710 ;; `bundle install`, etc.
15711 #:tests? #f
15712 #:phases (modify-phases %standard-phases
15713 (replace 'replace-git-ls-files
15714 (lambda _
15715 (substitute* "wwtd.gemspec"
15716 (("git ls-files lib/ bin/`")
15717 "find lib/ bin/ -type f |sort`"))))
15718 (add-before 'check 'remove-version-constraints
15719 (lambda _
15720 (delete-file "Gemfile.lock")))
15721 (replace 'check
15722 (lambda* (#:key tests? #:allow-other-keys)
15723 (if tests?
15724 (invoke "rspec" "spec/")
15725 (format #t "test suite not run~%")))))))
15726 (native-inputs
15727 (list ruby-bump ruby-rspec))
15728 (synopsis "Run @file{.travis.yml} files locally")
15729 (description
15730 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
15731defined in @file{.travis.yml} on your local machine, using @code{rvm},
15732@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
15733 (license license:expat)))
15734
15735(define-public ruby-rugged
15736 (package
15737 (name "ruby-rugged")
15738 (version "1.9.0")
15739 (source (origin
15740 (method git-fetch)
15741 (uri (git-reference
15742 (url "https://github.com/libgit2/rugged")
15743 (commit (string-append "v" version))))
15744 (file-name (git-file-name name version))
15745 (sha256
15746 (base32
15747 "0ixylc4hv4iqrkhzacq8nar70da8pml26nf9vmgys1kp2j7zc35g"))))
15748 (build-system ruby-build-system)
15749 (arguments
15750 (list #:gem-flags
15751 #~(list "--" "--use-system-libraries")
15752 #:phases
15753 #~(modify-phases %standard-phases
15754 (add-after 'unpack 'adjust-extconf.rb
15755 (lambda _
15756 (delete-file-recursively "vendor")
15757 ;; Neither using --with-git2-dir=$prefix nor providing
15758 ;; pkg-config allows locating the libgit2 prefix (see:
15759 ;; https://github.com/libgit2/rugged/issues/955).
15760 (substitute* "ext/rugged/extconf.rb"
15761 (("LIBGIT2_VER") "LIBGIT2_VERSION")
15762 (("LIBGIT2_DIR = File.join.*'vendor', 'libgit2'.*")
15763 (format #f "LIBGIT2_DIR = ~s~%"
15764 #$(this-package-input "libgit2"))))))
15765 (delete 'check) ;moved after the install phase
15766 (add-after 'install 'check
15767 (assoc-ref %standard-phases 'check))
15768 (add-before 'check 'set-GEM_PATH
15769 (lambda _
15770 (setenv "GEM_PATH" (string-append
15771 (getenv "GEM_PATH") ":"
15772 #$output "/lib/ruby/vendor_ruby"))))
15773 (add-before 'check 'disable-problematic-tests
15774 (lambda _
15775 (with-directory-excursion "test"
15776 (for-each delete-file
15777 ;; These tests require an actual libgit2 git
15778 ;; repository checkout.
15779 '("blame_test.rb"
15780 "blob_test.rb"
15781 "cherrypick_test.rb"
15782 "commit_test.rb"
15783 "config_test.rb"
15784 "diff_test.rb"
15785 "index_test.rb"
15786 "merge_test.rb"
15787 "note_test.rb"
15788 "object_test.rb"
15789 "patch_test.rb"
15790 "rebase_test.rb"
15791 "reference_test.rb"
15792 "remote_test.rb"
15793 "repo_apply_test.rb"
15794 "repo_ignore_test.rb"
15795 "repo_pack_test.rb"
15796 "repo_reset_test.rb"
15797 "repo_test.rb"
15798 "revert_test.rb"
15799 "settings_test.rb"
15800 "status_test.rb"
15801 "submodule_test.rb"
15802 "tag_test.rb"
15803 "tree_test.rb"
15804 "walker_test.rb"))
15805 (delete-file-recursively "online")))))))
15806 (native-inputs (list git-minimal/pinned ruby-rake-compiler))
15807 (inputs (list libgit2))
15808 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
15809 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
15810you the speed and portability of libgit2 with the beauty of the Ruby
15811language.")
15812 (home-page "https://www.rubydoc.info/gems/rugged")
15813 (license license:expat)))
15814
15815(define-public ruby-yell
15816 (package
15817 (name "ruby-yell")
15818 (version "2.2.2")
15819 (source
15820 (origin
15821 (method url-fetch)
15822 (uri (rubygems-uri "yell" version))
15823 (sha256
15824 (base32
15825 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
15826 (build-system ruby-build-system)
15827 (arguments
15828 `(#:phases
15829 (modify-phases %standard-phases
15830 (replace 'check
15831 (lambda _
15832 (invoke "rake" "examples")))))) ; there is no test target.
15833 (synopsis
15834 "Extensible logging library for Ruby")
15835 (description
15836 "Yell is a comprehensive logging replacement for Ruby. It defines
15837multiple adapters, various log level combinations and message formatting
15838options.")
15839 (home-page "https://github.com/rudionrails/yell")
15840 (license license:expat)))
15841
15842(define-public ruby-e2mmap
15843 (package
15844 (name "ruby-e2mmap")
15845 (version "0.1.0")
15846 (source
15847 (origin
15848 (method url-fetch)
15849 (uri (rubygems-uri "e2mmap" version))
15850 (sha256
15851 (base32
15852 "0n8gxjb63dck3vrmsdcqqll7xs7f3wk78mw8w0gdk9wp5nx6pvj5"))))
15853 (build-system ruby-build-system)
15854 (arguments
15855 `(#:tests? #f)) ;; There is a rakefile but no tests
15856 (synopsis
15857 "Module for defining custom exceptions with specific messages")
15858 (description
15859 "Exception2MessageMapper (e2mmap) is a helper module for easily defining
15860exceptions with predefined messages.")
15861 (home-page "https://github.com/ruby/e2mmap")
15862 (license license:bsd-2)))
15863
15864(define-public ruby-benchmark
15865 (package
15866 (name "ruby-benchmark")
15867 (version "0.4.0")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (rubygems-uri "benchmark" version))
15872 (sha256
15873 (base32
15874 "0jl71qcgamm96dzyqk695j24qszhcc7liw74qc83fpjljp2gh4hg"))))
15875 (build-system ruby-build-system)
15876 (synopsis "Performance benchmarking library")
15877 (description "This package provides methods for benchmarking Ruby code,
15878giving detailed reports on the time taken for each task.")
15879 (home-page "https://github.com/ruby/benchmark")
15880 (license license:bsd-2)))
15881
15882(define-public ruby-jekyll-feed
15883 (package
15884 (name "ruby-jekyll-feed")
15885 (version "0.15.1")
15886 (source
15887 (origin
15888 (method url-fetch)
15889 (uri (rubygems-uri "jekyll-feed" version))
15890 (sha256
15891 (base32
15892 "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"))))
15893 (build-system ruby-build-system)
15894 (arguments
15895 `(#:tests? #false)) ;there are none
15896 (propagated-inputs
15897 (list jekyll))
15898 (synopsis
15899 "Jekyll plugin to generate an Atom feed of your Jekyll posts")
15900 (description
15901 "This package provides a Jekyll plugin to generate an Atom feed
15902of your Jekyll posts.")
15903 (home-page
15904 "https://github.com/jekyll/jekyll-feed")
15905 (license license:expat)))
15906
15907(define-public ruby-jekyll-sitemap
15908 (package
15909 (name "ruby-jekyll-sitemap")
15910 (version "1.4.0")
15911 (source
15912 (origin
15913 (method url-fetch)
15914 (uri (rubygems-uri "jekyll-sitemap" version))
15915 (sha256
15916 (base32
15917 "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"))))
15918 (build-system ruby-build-system)
15919 (arguments
15920 `(#:tests? #false)) ;there are none
15921 (propagated-inputs
15922 (list jekyll))
15923 (synopsis
15924 "Automatically generate a sitemap.xml for your Jekyll site")
15925 (description
15926 "This package provides a Jekyll plugin to silently generate
15927a sitemaps.org compliant sitemap for your Jekyll site.")
15928 (home-page
15929 "https://github.com/jekyll/jekyll-sitemap")
15930 (license license:expat)))
15931
15932(define-public ruby-jekyll-seo-tag
15933 (package
15934 (name "ruby-jekyll-seo-tag")
15935 (version "2.7.1")
15936 (source
15937 (origin
15938 (method url-fetch)
15939 (uri (rubygems-uri "jekyll-seo-tag" version))
15940 (sha256
15941 (base32
15942 "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"))))
15943 (build-system ruby-build-system)
15944 (arguments
15945 `(#:tests? #false))
15946 (propagated-inputs
15947 (list jekyll))
15948 (synopsis
15949 "Jekyll plugin to add metadata tags for search engines and social networks")
15950 (description
15951 "This package provides a Jekyll plugin to add metadata tags for search engines
15952and social networks to better index and display your site's content.")
15953 (home-page
15954 "https://github.com/jekyll/jekyll-seo-tag")
15955 (license license:expat)))
15956
15957(define-public ruby-taskjuggler
15958 (package
15959 (name "ruby-taskjuggler")
15960 (version "3.8.1")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (rubygems-uri "taskjuggler" version))
15965 (sha256
15966 (base32
15967 "16d5vgz54all8vl3haqy6j69plny3np4kc3wq7wy3xa3i0h7v60z"))))
15968 (build-system ruby-build-system)
15969 (native-inputs (list ruby-rspec tzdata-for-tests))
15970 (propagated-inputs
15971 (list ruby-mail ruby-term-ansicolor))
15972 (arguments
15973 '(#:phases (modify-phases %standard-phases
15974 (replace 'replace-git-ls-files
15975 (lambda _
15976 (substitute* "tasks/rdoc.rake"
15977 (("`git ls-files -- lib`")
15978 "`find lib/ -type f |sort`"))))
15979 (add-before 'check 'tzdir-setup
15980 (lambda* (#:key inputs #:allow-other-keys)
15981 (setenv "TZDIR"
15982 (string-append (assoc-ref inputs "tzdata")
15983 "/share/zoneinfo"))))
15984 (add-before 'check 'delete-test-BatchProcessor
15985 ;; test_BatchProcessor fails with exception:
15986 ;; run> terminated with exception (report_on_exception is true)
15987 (lambda _
15988 (delete-file "test/test_BatchProcessor.rb"))))))
15989 (synopsis
15990 "Project management command line tool with a domain specific language")
15991 (description
15992 "TaskJuggler (tj3) is a project management tool for project planning and
15993tracking using a domain specific language; projects are plain text files
15994written using your favourite text editor. It includes reporting in HTML, CSV
15995or iCalendar format and an email based status tracking system to send and
15996receive time sheets from collaborators.
15997
15998It covers the complete spectrum of project management tasks from the first
15999idea to the completion of the project. It assists you during project scoping,
16000resource assignment, cost and revenue planning, risk and communication
16001management, status tracking and reporting.")
16002 (home-page "https://taskjuggler.org")
16003 (license license:gpl2)))
16004
16005(define-public ruby-cmath
16006 (package
16007 (name "ruby-cmath")
16008 (version "1.0.0")
16009 (source
16010 (origin
16011 (method url-fetch)
16012 (uri (rubygems-uri "cmath" version))
16013 (sha256
16014 (base32
16015 "1xkz6xyhpkjbdvpdib8450w62rls1mjryz0gzbbnadxkxn82nb8m"))))
16016 (build-system ruby-build-system)
16017 (arguments
16018 `(#:tests? #false))
16019 (native-inputs
16020 (list bundler ruby-rake-compiler))
16021 (synopsis "Trigonometric functions for complex numbers")
16022 (description
16023 "This gem is a library that provides trigonometric and transcendental
16024functions for complex numbers. The functions in this module accept integers,
16025floating-point numbers or complex numbers as arguments.")
16026 (home-page "https://github.com/ruby/cmath")
16027 (license license:bsd-2)))
16028
16029(define-public ruby-sucker-punch
16030 (package
16031 (name "ruby-sucker-punch")
16032 (version "3.1.0")
16033 (source
16034 (origin
16035 (method url-fetch)
16036 (uri (rubygems-uri "sucker_punch" version))
16037 (sha256
16038 (base32 "12by9vx8q6l4i56q62k1s1ymaxbpg4rny5zngj5i5h09kyh2yp4p"))))
16039 (build-system ruby-build-system)
16040 (arguments
16041 `(#:phases
16042 (modify-phases %standard-phases
16043 (add-after 'extract-gemspec 'less-strict-dependencies
16044 (lambda _
16045 (substitute* "sucker_punch.gemspec"
16046 (("1.0.0") "1.0")))))))
16047 (native-inputs
16048 (list
16049 ruby-pry))
16050 (propagated-inputs
16051 (list ruby-concurrent-ruby))
16052 (home-page "https://github.com/brandonhilkert/sucker_punch")
16053 (synopsis "Asynchronous processing library for Ruby")
16054 (description "Sucker Punch is a single-process Ruby asynchronous processing
16055library. It is perfect for asynchronous processes like emailing, data crunching
16056or social platform manipulation; and generally recommended for jobs that are
16057fast and non-mission critical like logs, emails, etc.")
16058 (license license:expat)))
16059
16060(define-public ruby-countdownlatch
16061 (package
16062 (name "ruby-countdownlatch")
16063 (version "1.0.0")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (rubygems-uri "countdownlatch" version))
16068 (sha256
16069 (base32 "1v6pbay6z07fp7yvnba1hmyacbicvmjndd8rn2h1b5rmpcb5s0j3"))))
16070 (build-system ruby-build-system)
16071 (home-page "https://github.com/benlangfeld/countdownlatch")
16072 (synopsis "Thread synchronization aid Ruby")
16073 (description "CountDownLatch is a synchronization aid that allows one or
16074more threads to wait until a set of operations being performed in other threads
16075completes.")
16076 (license license:expat)))
16077
16078(define-public ruby-value-semantics
16079 (package
16080 (name "ruby-value-semantics")
16081 (version "3.6.1")
16082 (source
16083 (origin
16084 (method url-fetch)
16085 (uri (rubygems-uri "value_semantics" version))
16086 (sha256
16087 (base32 "1vdwai8wf6r1fkvdpyz1vzxm89q7ghjvb3pqpg2kvwibwzd99dnx"))))
16088 (build-system ruby-build-system)
16089 (arguments
16090 `(#:phases
16091 (modify-phases %standard-phases
16092 (replace 'check
16093 (lambda* (#:key tests? #:allow-other-keys)
16094 (when tests?
16095 (invoke "rspec")))))))
16096 (native-inputs
16097 (list
16098 ruby-rspec))
16099 (home-page "https://github.com/tomdalling/value_semantics")
16100 (synopsis "Ruby gem for making value classes")
16101 (description "ValueSemantics generates modules that provide conventional
16102value semantics for a given set of attributes. The behaviour is similar to an
16103immutable Struct class, plus extensible, lightweight validation and coercion.")
16104 (license license:expat)))
16105
16106(define-public ruby-promise
16107 (package
16108 (name "ruby-promise")
16109 (version "0.7.4")
16110 (source
16111 (origin
16112 (method url-fetch)
16113 (uri (rubygems-uri "promise.rb" version))
16114 (sha256
16115 (base32 "0a819sikcqvhi8hck1y10d1nv2qkjvmmm553626fmrh51h2i089d"))))
16116 (build-system ruby-build-system)
16117 (arguments
16118 `(#:test-target "spec"
16119 #:phases
16120 (modify-phases %standard-phases
16121 (add-after 'extract-gemspec 'less-strict-dependencies
16122 (lambda _
16123 (substitute* "Rakefile"
16124 (("if Gem.ruby_version.*") "if false\n"))
16125 (substitute* "spec/spec_helper.rb"
16126 ((".*devtools/spec_helper.*") "\n")))))))
16127 (native-inputs
16128 (list
16129 ruby-rspec
16130 ruby-rspec-its
16131 ruby-awesome-print
16132 ruby-fuubar))
16133 (home-page "https://github.com/lgierth/promise.rb")
16134 (synopsis "Asynchronous operation library for Ruby")
16135 (description "Promise is a Ruby implementation of the Promises/A+
16136specification. It provides 100% mutation coverage, tested on MRI 1.9, 2.0, 2.1,
161372.2, Rubinius, and JRuby.")
16138 (license license:unlicense)))
16139
16140(define-public ruby-multicodecs
16141 (package
16142 (name "ruby-multicodecs")
16143 (version "0.2.1")
16144 (source
16145 (origin
16146 (method url-fetch)
16147 (uri (rubygems-uri "multicodecs" version))
16148 (sha256
16149 (base32 "0drq267di57l9zqw6zvqqimilz42rbc8z7392dwkk8wslq30s7v8"))))
16150 (build-system ruby-build-system)
16151 (home-page "https://github.com/SleeplessByte/ruby-multicodec")
16152 (synopsis "Ruby implementation of multiformats/multicodec")
16153 (description "Multicodecs is the ruby implementation of
16154multiformats/multicodec, a canonical table of of codecs used by various
16155multiformats.")
16156 (license license:expat)))
16157
16158(define-public ruby-multihashes
16159 (package
16160 (name "ruby-multihashes")
16161 (version "0.2.0")
16162 (source
16163 (origin
16164 (method url-fetch)
16165 (uri (rubygems-uri "multihashes" version))
16166 (sha256
16167 (base32 "17wiyy3fiv8rpgdv9ca01yncsmaaf8yg15bg18wc7m9frss1vgqg"))))
16168 (build-system ruby-build-system)
16169 (propagated-inputs
16170 (list
16171 ruby-multicodecs))
16172 (home-page "https://github.com/multiformats/ruby-multihash")
16173 (synopsis "Multihash implementation for Ruby")
16174 (description "Multihashes provides a simple, low-level multihash
16175implementation for Ruby. A multihash is a digest with an embedded hash function
16176code")
16177 (license license:expat)))
16178
16179(define-public ruby-lazy-object
16180 (package
16181 (name "ruby-lazy-object")
16182 (version "0.0.3")
16183 (source
16184 (origin
16185 (method url-fetch)
16186 (uri (rubygems-uri "lazy_object" version))
16187 (sha256
16188 (base32 "08px15lahc28ik9smvw1hgamf792gd6gq0s4k94yq1h7jq25wjn8"))))
16189 (build-system ruby-build-system)
16190 (arguments
16191 `(#:test-target "spec"))
16192 (home-page "https://github.com/HornsAndHooves/lazy_object")
16193 (synopsis "Object wrapper that forwards all calls to the reference object")
16194 (description "LazyObject is an object wrapper that forwards all calls to the
16195reference object. This object is not created until the first method dispatch.")
16196 (license license:expat)))
16197
16198(define-public ruby-citrus
16199 (package
16200 (name "ruby-citrus")
16201 (version "3.0.2")
16202 (source
16203 (origin
16204 (method git-fetch)
16205 ;; Download from GitHub because the rubygems version does not contain
16206 ;; files needed for tests.
16207 (uri (git-reference
16208 (url "https://github.com/mjackson/citrus")
16209 (commit (string-append "v" version))))
16210 (file-name (git-file-name name version))
16211 (sha256
16212 (base32 "197wrgqrddgm1xs3yvjvd8vkvil4h4mdrcp16jmd4b57rxrrr769"))))
16213 (build-system ruby-build-system)
16214 (arguments
16215 (list #:phases
16216 #~(modify-phases %standard-phases
16217 (add-after 'unpack 'fix-citrus-version
16218 (lambda _
16219 (substitute* '("lib/citrus.rb" "citrus.gemspec")
16220 (("require 'citrus/version'")
16221 "")
16222 (("Citrus\\.version")
16223 (format #f "~s" #$version))))))))
16224 (home-page "https://mjackson.github.io/citrus/")
16225 (synopsis "Parsing Expressions for Ruby")
16226 (description "Citrus is a parsing library for Ruby that combines the
16227expressiveness of the language with the parsing expressions.")
16228 (license license:expat)))
16229
16230(define-public ruby-cgi
16231 (package
16232 (name "ruby-cgi")
16233 (version "0.5.2")
16234 (source
16235 (origin
16236 (method git-fetch) ;for tests
16237 (uri (git-reference
16238 (url "https://github.com/ruby/cgi")
16239 (commit (string-append "v" version))))
16240 (file-name (git-file-name name version))
16241 (sha256
16242 (base32 "072rjh1nrpn6nlqr2jsv5jca7mzlh3acn8139p117x3j3knpzvy7"))))
16243 (build-system ruby-build-system)
16244 (arguments
16245 (list
16246 #:phases
16247 #~(modify-phases %standard-phases
16248 (add-before 'check 'delete-unused-rake-libs
16249 (lambda _
16250 ;; This requires the git executable.
16251 (delete-file "rakelib/changelogs.rake"))))))
16252 (native-inputs (list ruby-rake-compiler ruby-test-unit
16253 ruby-test-unit-ruby-core))
16254 (synopsis "Common Gateway Interface protocol for Ruby")
16255 (description
16256 "This Ruby library supports the Common Gateway Interface (CGI)
16257protocol. It provides escaping utilities, web form parsers, cookie or
16258session handlings, and HTML generations.")
16259 (home-page "https://github.com/ruby/cgi")
16260 (license (list license:ruby license:bsd-2))))
16261
16262(define-public ruby-cbor
16263 (package
16264 (name "ruby-cbor")
16265 (version "0.5.10.1")
16266 (source
16267 (origin
16268 (method url-fetch)
16269 (uri (rubygems-uri "cbor" version))
16270 (sha256
16271 (base32 "1w3d5dhx4vjd707ihkcmq7fy78p5fgawcjdqw2byxnfw32gzgkbr"))))
16272 (build-system ruby-build-system)
16273 (arguments
16274 `(#:test-target "spec"))
16275 (native-inputs
16276 (list
16277 ruby-rspec
16278 ruby-rake-compiler
16279 ruby-yard))
16280 (home-page "https://cbor.io/")
16281 (synopsis "Concise Binary Object Representation")
16282 (description "CBOR is a library for the
16283@acronym{CBOR, Concise Binary Object Representation} format, based on
16284Sadayuki Furuhashi's MessagePack library.")
16285 (license license:asl2.0)))
16286
16287(define-public ruby-gem-release
16288 (package
16289 (name "ruby-gem-release")
16290 (version "2.2.2")
16291 (source
16292 (origin
16293 (method url-fetch)
16294 (uri (rubygems-uri "gem-release" version))
16295 (sha256
16296 (base32 "108rrfaiayi14zrqbb6z0cbwcxh8n15am5ry2a86v7c8c3niysq9"))))
16297 (build-system ruby-build-system)
16298 (arguments
16299 ;; No rakefile
16300 `(#:tests? #f))
16301 (home-page "https://github.com/svenfuchs/gem-release")
16302 (synopsis "Ruby gem plugin for release management")
16303 (description "GemRelease is a gem plugin that aims at making gem development
16304easier by automating repetitive work based on conventions, configuration, and
16305templates.")
16306 (license license:expat)))
16307
16308(define-public ruby-base32
16309 (package
16310 (name "ruby-base32")
16311 (version "0.3.4")
16312 (source
16313 (origin
16314 (method url-fetch)
16315 (uri (rubygems-uri "base32" version))
16316 (sha256
16317 (base32 "1fjs0l3c5g9qxwp43kcnhc45slx29yjb6m6jxbb2x1krgjmi166b"))))
16318 (build-system ruby-build-system)
16319 (native-inputs
16320 (list
16321 ruby-gem-release))
16322 (home-page "https://github.com/stesla/base32")
16323 (synopsis "Ruby extension for base32 encoding and decoding")
16324 (description "Base32 is a library which provides base32 decoding and
16325encoding.")
16326 (license license:expat)))
16327
16328(define-public ruby-dhall
16329 (package
16330 (name "ruby-dhall")
16331 (version "0.5.2")
16332 (source
16333 (origin
16334 (method url-fetch)
16335 (uri (rubygems-uri "dhall" version))
16336 (sha256
16337 (base32 "09wcq8xc1ynld04r2f332bx8cn7rjc4afaq8hm1dr2fc35jlpn6m"))))
16338 (build-system ruby-build-system)
16339 (arguments
16340 ;; No test in gem archive
16341 `(#:tests? #f))
16342 (propagated-inputs
16343 (list
16344 ruby-base32
16345 ruby-cbor
16346 ruby-citrus
16347 ruby-lazy-object
16348 ruby-multihashes
16349 ruby-promise
16350 ruby-value-semantics))
16351 (home-page "https://git.sr.ht/~singpolyma/dhall-ruby")
16352 (synopsis "Ruby implementation of the Dhall configuration language")
16353 (description "Dhall.rb is a Ruby implementation of the Dhall configuration
16354language. Dhall is a memory safe and non-Turing-complete configuration
16355language.")
16356 (license license:gpl3+)))
16357
16358(define-public ruby-money
16359 (package
16360 (name "ruby-money")
16361 (version "6.16.0")
16362 (source
16363 (origin
16364 (method url-fetch)
16365 (uri (rubygems-uri "money" version))
16366 (sha256
16367 (base32 "0jkmsj5ymadik7bvl670bqwmvhsdyv7hjr8gq9z293hq35gnyiyg"))))
16368 (build-system ruby-build-system)
16369 (arguments
16370 ;; No rakefile.
16371 `(#:tests? #f))
16372 (propagated-inputs
16373 (list
16374 ruby-i18n))
16375 (home-page "https://rubymoney.github.io/money/")
16376 (synopsis "Currency conversion library for Ruby")
16377 (description "RubyMoney provides a library for dealing with money and
16378currency conversion. Its features are:
16379@itemize
16380@item
16381Provides a Money class which encapsulates all information about a certain
16382amount of money, such as its value and its currency.
16383@item
16384Provides a Money::Currency class which encapsulates all information about a
16385monetary unit.
16386@item
16387Represents monetary values as integers, in cents; so avoids floating point
16388rounding errors.
16389@item
16390Represents currency as Money::Currency instances providing a high level of
16391flexibility.
16392@item Provides APIs for exchanging money from one currency to another.
16393@end itemize")
16394 (license license:expat)))
16395
16396(define-public ruby-monetize
16397 (package
16398 (name "ruby-monetize")
16399 (version "1.11.0")
16400 (source
16401 (origin
16402 (method url-fetch)
16403 (uri (rubygems-uri "monetize" version))
16404 (sha256
16405 (base32 "0cna2myxdbwfq0gn6k2hgrh368dq7wld3jklm96443ysykd0difn"))))
16406 (build-system ruby-build-system)
16407 (arguments
16408 `(#:test-target "spec"))
16409 (native-inputs
16410 (list
16411 ruby-rspec))
16412 (propagated-inputs
16413 (list
16414 ruby-money))
16415 (home-page "https://github.com/RubyMoney/monetize")
16416 (synopsis "Convert various objects into Money objects")
16417 (description "Monetize provides a library for converting various objects
16418into Money objects.")
16419 (license license:expat)))
16420
16421(define-public ruby-money-open-exchange-rates
16422 (package
16423 (name "ruby-money-open-exchange-rates")
16424 (version "1.4.0")
16425 (source
16426 (origin
16427 (method git-fetch)
16428 ;; Download from GitHub because the rubygems version does not contain
16429 ;; Rakefile.
16430 (uri (git-reference
16431 (url "https://github.com/spk/money-open-exchange-rates")
16432 (commit (string-append "v" version))))
16433 (file-name (git-file-name name version))
16434 (sha256
16435 (base32 "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
16436 (build-system ruby-build-system)
16437 (native-inputs
16438 (list
16439 ruby-minitest
16440 ruby-mocha
16441 ruby-monetize
16442 ruby-rake
16443 ruby-rubocop
16444 ruby-timecop
16445 ruby-webmock))
16446 (propagated-inputs
16447 (list
16448 ruby-money))
16449 (home-page "https://spk.github.io/money-open-exchange-rates/")
16450 (synopsis "Money open exchange rates for Ruby")
16451 (description "This package provides a gem that calculates the exchange rate
16452using published rates from open-exchange-rates. Compatible with the money gem.")
16453 (license license:expat)))
16454
16455(define-public ruby-roda
16456 (package
16457 (name "ruby-roda")
16458 (version "3.57.0")
16459 (source
16460 (origin
16461 (method url-fetch)
16462 (uri (rubygems-uri "roda" version))
16463 (sha256
16464 (base32 "0nkfxnbcfnriywvx9kpamp850cwjmqv8ssajc95d0aiyjr4kdrfy"))))
16465 (build-system ruby-build-system)
16466 (arguments
16467 ;; No rakefile
16468 `(#:tests? #f))
16469 (propagated-inputs (list ruby-rack))
16470 (home-page "https://roda.jeremyevans.net")
16471 (synopsis "Routing Tree Web Toolkit")
16472 (description "Roda is a routing tree web toolkit, designed for building fast
16473and maintainable web applications in ruby.")
16474 (license license:expat)))
16475
16476(define-public ruby-nori
16477 (package
16478 (name "ruby-nori")
16479 (version "2.6.0")
16480 (source
16481 (origin
16482 (method url-fetch)
16483 (uri (rubygems-uri "nori" version))
16484 (sha256
16485 (base32 "066wc774a2zp4vrq3k7k8p0fhv30ymqmxma1jj7yg5735zls8agn"))))
16486 (build-system ruby-build-system)
16487 (arguments
16488 ;; Tests require too old version of rspec
16489 `(#:tests? #f))
16490 (native-inputs
16491 (list ruby-nokogiri
16492 ruby-rake
16493 ruby-rspec))
16494 (home-page "https://github.com/savonrb/nori")
16495 (synopsis "XML to Hash translator")
16496 (description "Nori is a simple XML parsing ripped from Crack which in-turn
16497ripped from Merb. It supports pluggable parsers and ships with both REXML and
16498Nokogiri implementations.")
16499 (license license:expat)))
16500
16501;; This package is deprecated per upstream and should be phased out.
16502(define-public ruby-faraday-middleware
16503 (package
16504 (name "ruby-faraday-middleware")
16505 (version "1.2.0")
16506 (source
16507 (origin
16508 (method url-fetch)
16509 (uri (rubygems-uri "faraday_middleware" version))
16510 (sha256
16511 (base32 "1bw8mfh4yin2xk7138rg3fhb2p5g2dlmdma88k82psah9mbmvlfy"))))
16512 (build-system ruby-build-system)
16513 (arguments `(#:tests? #f))
16514 (propagated-inputs (list ruby-faraday))
16515 (home-page "https://github.com/lostisland/faraday_middleware")
16516 (synopsis "Various middleware for Faraday")
16517 (description "Faraday_Middleware is a collection of middleware for the
16518Faraday-based API wrappers.")
16519 (license license:expat)))
16520
16521(define-public ruby-faraday-multipart
16522 (package
16523 (name "ruby-faraday-multipart")
16524 (version "1.0.4")
16525 (source (origin
16526 (method git-fetch)
16527 (uri (git-reference
16528 (url "https://github.com/lostisland/faraday-multipart")
16529 (commit (string-append "v" version))))
16530 (file-name (git-file-name name version))
16531 (sha256
16532 (base32
16533 "0ywxhff40a688n50lxrn4d8y096l8sbrwp1jfz4zd3kdiiygclka"))))
16534 (build-system ruby-build-system)
16535 (arguments (list #:test-target "spec"))
16536 (native-inputs (list ruby-faraday ruby-multipart-parser ruby-rspec))
16537 (propagated-inputs (list ruby-multipart-post))
16538 (synopsis "Multipart-post requests extension for Faraday")
16539 (description "This Ruby gem extends Faraday to perform multipart-post
16540requests.")
16541 (home-page "https://github.com/lostisland/faraday-multipart")
16542 (license license:expat)))
16543
16544(define-public ruby-bandwidth-iris
16545 (package
16546 (name "ruby-bandwidth-iris")
16547 (version "7.0.0")
16548 (source
16549 (origin
16550 (method url-fetch)
16551 (uri (rubygems-uri "ruby-bandwidth-iris" version))
16552 (sha256
16553 (base32 "131c4jhyvnrwbhizkks17fi9g85cwsq5f1p8zi408zyf63n7230d"))))
16554 (build-system ruby-build-system)
16555 (arguments
16556 ;; XXX: Tests don't require helper for some reason, so all fail.
16557 `(#:tests? #f))
16558 (native-inputs
16559 (list ruby-rspec
16560 ruby-yard))
16561 (propagated-inputs
16562 (list ruby-activesupport
16563 ruby-builder
16564 ruby-faraday
16565 ruby-faraday-middleware
16566 ruby-nori))
16567 (home-page "https://github.com/Bandwidth/ruby-bandwidth-iris")
16568 (synopsis "Gem for integrating to Bandwidth's Iris API")
16569 (description "Bandwidth IRIS is a Ruby SDK for Bandwidth Phone Number
16570Dashboard. It is a Ruby Client library for IRIS / BBS API.")
16571 (license license:expat)))
16572
16573(define-public ruby-securerandom
16574 (package
16575 (name "ruby-securerandom")
16576 (version "0.4.1")
16577 (source
16578 (origin
16579 (method url-fetch)
16580 (uri (rubygems-uri "securerandom" version))
16581 (sha256
16582 (base32 "1cd0iriqfsf1z91qg271sm88xjnfd92b832z49p1nd542ka96lfc"))))
16583 (build-system ruby-build-system)
16584 (arguments '(#:tests? #f)) ; No tests found.
16585 (synopsis "Interface for secure random number generator")
16586 (description "This package provides a Ruby interface for secure random
16587number generators.")
16588 (home-page "https://github.com/ruby/securerandom")
16589 (license (list license:bsd-2))))
16590
16591(define-public ruby-selenium-webdriver
16592 (package
16593 (name "ruby-selenium-webdriver")
16594 (version "4.22.0")
16595 (source (origin
16596 (method url-fetch)
16597 (uri (rubygems-uri "selenium-webdriver" version))
16598 (sha256
16599 (base32
16600 "0rjxlivsh32xvjq78p1m1sr366aa04wms4hwb2r187ygrnmp0hv4"))))
16601 (build-system ruby-build-system)
16602 ;; FIXME: The gem release lacks test files, and the git checkout lacks
16603 ;; JavaScript source that is generated using Bazel, which isn't available
16604 ;; in Guix yet, so disable the test suite for now.
16605 (arguments (list #:tests? #f))
16606 (propagated-inputs (list ruby-base64
16607 ruby-rexml
16608 ruby-rubyzip
16609 ruby-websocket))
16610 (synopsis "Selenium browser automation bindings for Ruby")
16611 (description "Selenium implements the W3C WebDriver protocol to automate
16612popular browsers. It aims to mimic the behaviour of a real user as it
16613interacts with the application's HTML. It's primarily intended for web
16614application testing, but any web-based task can be automated. This package
16615provides the Ruby bindings of Selenium.")
16616 (home-page "https://www.selenium.dev/")
16617 (license license:asl2.0)))
16618
16619(define-public ruby-sentry-core
16620 (package
16621 (name "ruby-sentry-core")
16622 (version "5.3.1")
16623 (source
16624 (origin
16625 (method url-fetch)
16626 (uri (rubygems-uri "sentry-ruby-core" version))
16627 (sha256
16628 (base32 "141mrw8wghhsjvln9m6ld3hap3xc5v901jjiz007xywy25725hyd"))))
16629 (build-system ruby-build-system)
16630 (arguments
16631 ;; No rakefile in gem.
16632 `(#:tests? #f))
16633 (propagated-inputs
16634 (list ruby-concurrent-ruby
16635 ruby-faraday))
16636 (home-page "https://sentry.io/for/ruby/")
16637 (synopsis "Client interface for the Sentry error logger")
16638 (description "Sentry-Core provides a gem that provides a client
16639interface for the Sentry error logger.")
16640 (license license:expat)))
16641
16642(define-public ruby-sentry
16643 (package
16644 (name "ruby-sentry")
16645 (version "5.3.1")
16646 (source
16647 (origin
16648 (method url-fetch)
16649 (uri (rubygems-uri "sentry-ruby" version))
16650 (sha256
16651 (base32 "0by9mvw8rklzpyx59vfija8h3ssfvxvf5nbqxfmygfy6lm1vdngz"))))
16652 (build-system ruby-build-system)
16653 (arguments
16654 ;; No rakefile in gem
16655 `(#:tests? #f))
16656 (propagated-inputs
16657 (list ruby-concurrent-ruby
16658 ruby-faraday
16659 ruby-sentry-core))
16660 (home-page "https://sentry.io/for/ruby/")
16661 (synopsis "Client interface for the Sentry error logger")
16662 (description "Sentry provides a gem that provides a client
16663interface for the Sentry error logger.")
16664 (license license:expat)))
16665
16666(define-public ruby-webrick
16667 (package
16668 (name "ruby-webrick")
16669 (version "1.8.1")
16670 (source (origin
16671 (method git-fetch) ;for tests
16672 (uri (git-reference
16673 (url "https://github.com/ruby/webrick")
16674 (commit (string-append "v" version))))
16675 (file-name (git-file-name name version))
16676 (sha256
16677 (base32
16678 "1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
16679 (build-system ruby-build-system)
16680 (arguments
16681 (list #:phases
16682 #~(modify-phases %standard-phases
16683 (add-after 'extract-gemspec 'delete-problematic-tests
16684 (lambda _
16685 ;; The httresponse tests fail for
16686 ;; unknown reasons (see:
16687 ;; https://github.com/ruby/webrick/issues/112).
16688 (delete-file "test/webrick/test_httpresponse.rb"))))))
16689 (home-page "https://github.com/ruby/webrick")
16690 (synopsis "HTTP server toolkit")
16691 (description "WEBrick is an HTTP server toolkit that can be configured as an
16692HTTPS server, a proxy server, and a virtual-host server.")
16693 (license license:bsd-2)))
16694
16695(define-public ruby-websocket
16696 (let ((commit "950e416a19a76c7e6a673a7e5baa6283476dbec1")
16697 (revision "1"))
16698 (package
16699 (name "ruby-websocket")
16700 (version (git-version "1.2.9" revision commit))
16701 (source (origin
16702 (method git-fetch)
16703 (uri (git-reference
16704 (url "https://github.com/imanel/websocket-ruby")
16705 (commit commit)))
16706 (sha256
16707 (base32
16708 "1i6r0glpxy47zdf76aqgcpjgcgydla0733hfdhp628pmrinnkgwv"))
16709 (file-name (git-file-name name version))))
16710 (build-system ruby-build-system)
16711 (arguments (list #:test-target "spec"
16712 #:phases #~(modify-phases %standard-phases
16713 (add-after 'unpack 'disable-rubocop
16714 (lambda _
16715 (substitute* "Rakefile"
16716 (("require 'rubocop/rake_task'") "")
16717 (("RuboCop::RakeTask.new") "")))))))
16718 (native-inputs
16719 (list ruby-rspec
16720 ruby-webrick))
16721 (synopsis "WebSocket protocol Ruby library")
16722 (description "This package provides a Ruby library to handle the WebSocket
16723protocol.")
16724 (home-page "https://github.com/imanel/websocket-ruby")
16725 (license license:expat))))
16726
16727(define-public ruby-braintree
16728 (package
16729 (name "ruby-braintree")
16730 (version "4.24.0")
16731 (source
16732 (origin
16733 (method git-fetch) ;for tests
16734 (uri (git-reference
16735 (url "https://github.com/braintree/braintree_ruby")
16736 (commit version)))
16737 (file-name (git-file-name name version))
16738 (sha256
16739 (base32 "1bj229cn37k5m0hb3hw868k8dy4pgvpgfixm61zngbp7p7a2xqpx"))))
16740 (build-system ruby-build-system)
16741 (arguments
16742 (list
16743 #:test-target "test:unit"
16744 #:phases
16745 #~(modify-phases %standard-phases
16746 (add-after 'unpack 'disable-rubocop
16747 (lambda _
16748 (substitute* "Rakefile"
16749 (("sh \"rubocop\"") ""))))
16750 (add-after 'unpack 'disable-bundler
16751 (lambda _
16752 (delete-file "Gemfile"))))))
16753 (native-inputs
16754 (list ruby-libxml
16755 ruby-pry
16756 ruby-rake
16757 ruby-rspec
16758 ruby-webrick))
16759 (propagated-inputs
16760 (list ruby-builder
16761 ruby-rexml))
16762 (home-page "https://www.braintreepayments.com/")
16763 (synopsis "Integration access to the Braintree Gateway")
16764 (description "Braintree provides resources and tools for developers to
16765integrate Braintree's global payments platform.")
16766 (license license:expat)))
16767
16768(define-public ruby-niceogiri
16769 (package
16770 (name "ruby-niceogiri")
16771 (version "1.1.2")
16772 (source
16773 (origin
16774 (method url-fetch)
16775 (uri (rubygems-uri "niceogiri" version))
16776 (sha256
16777 (base32 "1ha93211bc9cvh23s9w89zz7rq8irpf64ccd9arvg8v1sxg2798a"))))
16778 (build-system ruby-build-system)
16779 (arguments
16780 `(#:test-target "spec"
16781 #:phases
16782 (modify-phases %standard-phases
16783 (add-after 'extract-gemspec 'less-strict-dependencies
16784 (lambda _
16785 (substitute* "niceogiri.gemspec"
16786 (("2\\.7") "3.8") ;rspec
16787 ((".*dependency.*bundler.*") "\n")
16788 ((".*dependency.*guard-rspec.*") "\n")))))))
16789 (native-inputs
16790 (list ruby-rspec
16791 ruby-yard))
16792 (propagated-inputs (list ruby-nokogiri))
16793 (home-page "https://github.com/benlangfeld/Niceogiri")
16794 (synopsis "Supplement for Nokogiri")
16795 (description "Niceogiri provides wrappers and helpers for XML manipulation
16796using Nokogiri.")
16797 (license license:expat)))
16798
16799(define-public ruby-blather
16800 (package
16801 (name "ruby-blather")
16802 (version "2.0.0")
16803 (source
16804 (origin
16805 (method url-fetch)
16806 (uri (rubygems-uri "blather" version))
16807 (sha256
16808 (base32 "05ry2x835fj4pzk61282pcz86n018cr39zbgwbi213md74i90s7c"))))
16809 (build-system ruby-build-system)
16810 (arguments
16811 ;; XXX: Tests require too old version of rspec.
16812 `(#:tests? #f))
16813 (native-inputs
16814 (list ruby-countdownlatch
16815 ruby-mocha
16816 ruby-rb-fsevent
16817 ruby-rspec
16818 ruby-yard))
16819 (propagated-inputs
16820 (list ruby-activesupport
16821 ruby-eventmachine
16822 ruby-niceogiri
16823 ruby-nokogiri
16824 ruby-sucker-punch))
16825 (home-page "https://github.com/adhearsion/blather")
16826 (synopsis "XMPP Domain Specific Language for Ruby")
16827 (description "Blather is a XMPP DSL for Ruby written on top of EventMachine
16828and Nokogiri.")
16829 (license license:expat)))
16830
16831(define-public ruby-wapiti
16832 (package
16833 (name "ruby-wapiti")
16834 (version "2.1.0")
16835 ;; the gem archive lacks tests
16836 (source (origin
16837 (method git-fetch)
16838 (uri (git-reference
16839 (url "https://github.com/inukshuk/wapiti-ruby")
16840 (commit (string-append "v" version))))
16841 (file-name (git-file-name name version))
16842 (sha256
16843 (base32
16844 "1273dqvn6flq2qv9qbp104rgc7zp1gqx4096s0v0z5f0qnhzc7d6"))))
16845 (build-system ruby-build-system)
16846 (propagated-inputs
16847 (list ruby-builder
16848 ruby-rexml))
16849 (native-inputs
16850 (list ruby-pry
16851 ruby-rake-compiler
16852 ruby-rspec
16853 ruby-simplecov))
16854 (arguments
16855 (list
16856 #:test-target "spec"
16857 #:phases
16858 #~(modify-phases %standard-phases
16859 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16860 (lambda args
16861 (substitute* "wapiti.gemspec"
16862 (("`git ls-files spec`")
16863 "`find spec -type f | sort`"))))
16864 (add-before 'build 'compile
16865 (lambda args
16866 (invoke "rake" "compile"))))))
16867 (home-page "https://github.com/inukshuk/wapiti-ruby")
16868 (synopsis "Wicked fast Conditional Random Fields for Ruby")
16869 (description
16870 "The Wapiti-Ruby gem provides a wicked fast linear-chain @acronym{CRF,
16871Conditional Random Fields} API for sequence segmentation and labelling. It is
16872based on the codebase of @url{https://wapiti.limsi.fr, Wapiti}.")
16873 (license license:bsd-2)))
16874
16875(define-public ruby-namae
16876 (package
16877 (name "ruby-namae")
16878 (version "1.1.1")
16879 (source (origin
16880 (method url-fetch)
16881 (uri (rubygems-uri "namae" version))
16882 (sha256
16883 (base32
16884 "1j3nl1klkx3gymrdxfc1hlq4a8qlvhhl9aj5v1v08b9fz27sky0l"))))
16885 (build-system ruby-build-system)
16886 (native-inputs
16887 (list ruby-cucumber
16888 ruby-rspec
16889 ruby-simplecov))
16890 (arguments
16891 (list
16892 #:phases
16893 #~(modify-phases %standard-phases
16894 (add-after 'extract-gemspec 'allow-newer-cucumber
16895 (lambda args
16896 (substitute* "Gemfile"
16897 (("'cucumber', '[^']*'")
16898 "'cucumber'"))))
16899 (replace 'check
16900 ;; Avoid 'rake' so we don't need jeweler.
16901 (lambda* (#:key tests? #:allow-other-keys)
16902 (when tests?
16903 (apply invoke
16904 "rspec"
16905 (find-files "spec" "_spec\\.rb$"))))))))
16906 (home-page "https://github.com/berkmancenter/namae")
16907 (synopsis "Parser for human names")
16908 (description
16909 "Namae (名前) is a parser for human names. It recognizes personal names
16910of various cultural backgrounds and tries to split them into their component
16911parts (e.g., given and family names, honorifics etc.).")
16912 (license (list license:bsd-2 license:agpl3+))))
16913
16914(define-public ruby-latex-decode
16915 (package
16916 (name "ruby-latex-decode")
16917 (version "0.4.0")
16918 (source (origin
16919 (method git-fetch)
16920 (uri (git-reference
16921 (url "https://github.com/inukshuk/latex-decode")
16922 (commit (string-append "v" version))))
16923 (sha256
16924 (base32
16925 "1f5j67ayd04pjkmzvn0hk7cr8yqvn0gyg9ns6a0vhzj2gwna9ihy"))
16926 (file-name (git-file-name name version))))
16927 (build-system ruby-build-system)
16928 (native-inputs
16929 (list ruby-cucumber
16930 ruby-rspec))
16931 (arguments
16932 (list
16933 #:test-target "cucumber"
16934 #:phases
16935 #~(modify-phases %standard-phases
16936 (add-after 'extract-gemspec 'avoid-bundler
16937 (lambda args
16938 (substitute* "Rakefile"
16939 (("require 'bundler" orig)
16940 (string-append "# " orig " # patched for Guix"))
16941 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
16942 (string-append orig " do |c|\n"
16943 " c.bundler = false # patched for Guix\n"
16944 "end"))
16945 (("Bundler\\.setup" orig)
16946 (string-append "true # " orig " # patched for Guix")))
16947 (substitute* "cucumber.yml"
16948 ;; thanks to avoiding bundler, we can't use this option
16949 ((" --publish-quiet")
16950 ""))))
16951 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
16952 (lambda args
16953 (substitute* "latex-decode.gemspec"
16954 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
16955 "`find {test,spec,features} -type f | sort`")))))))
16956 (home-page "https://github.com/inukshuk/latex-decode")
16957 (synopsis "Convert LaTeX to Unicode")
16958 (description
16959 "This package provides a gem to convert LaTeX input to Unicode. Its
16960original use was as an input filter for BibTeX-Ruby, but it can be used
16961independently to decode LaTeX. Many of the patterns used by this Ruby gem are
16962based on François Charette's equivalent Perl module @code{LaTeX::Decode}.")
16963 (license license:gpl3+)))
16964
16965(define-public ruby-link-header
16966 (package
16967 (name "ruby-link-header")
16968 (version "0.0.8")
16969 (source (origin
16970 (method url-fetch)
16971 (uri (rubygems-uri "link_header" version))
16972 (sha256
16973 (base32
16974 "1yamrdq4rywmnpdhbygnkkl9fdy249fg5r851nrkkxr97gj5rihm"))))
16975 (build-system ruby-build-system)
16976 (home-page "https://github.com/asplake/link_header")
16977 (synopsis "Parse and format HTTP @code{Link} headers")
16978 (description
16979 "This gem provides the classes @code{LinkHeader} and
16980@code{LinkHeader::Link}, which represent HTTP @code{Link} headers conforming
16981to RFC 5988. Objects can be constructed from and converted to text or a
16982JSON-friendly @code{Array} representation. They can also be used to generate
16983corresponding HTML @code{link} elements.")
16984 (license license:expat)))
16985
16986(define-public ruby-lint-roller
16987 (package
16988 (name "ruby-lint-roller")
16989 (version "1.1.0")
16990 (source
16991 (origin
16992 (method url-fetch)
16993 (uri (rubygems-uri "lint_roller" version))
16994 (sha256
16995 (base32 "11yc0d84hsnlvx8cpk4cbj6a4dz9pk0r1k29p0n1fz9acddq831c"))))
16996 (build-system ruby-build-system)
16997 (arguments '(#:tests? #f)) ;Circular dependency on ruby-standard.
16998 (native-inputs (list ruby-minitest))
16999 (synopsis "Specification for linter and formatter rulesets")
17000 (description
17001 "This package provides a plugin specification for Ruby linter and
17002formatter rulesets.")
17003 (home-page "https://github.com/standardrb/lint_roller")
17004 (license license:expat)))
17005
17006(define-public ruby-rdf
17007 (package
17008 (name "ruby-rdf")
17009 (version "3.2.8")
17010 (source (origin
17011 (method url-fetch)
17012 (uri (rubygems-uri "rdf" version))
17013 (sha256
17014 (base32
17015 "1cj0k8ryd8hgbkgqb5swvy6fiygxny3y5bln0my5gv6dbfv3gm20"))))
17016 (build-system ruby-build-system)
17017 (propagated-inputs (list ruby-link-header))
17018 (arguments
17019 (list #:tests? #f)) ;; tests have many cyclic dependencies
17020 (home-page "https://ruby-rdf.github.io/")
17021 (synopsis "Linked Data for Ruby")
17022 (description
17023 "This gem contains the core algorithms and classes used for doing basic
17024programming with @acronym{RDF, Resource Description Framework} data,
17025implemented in pure Ruby.")
17026 (license license:unlicense)))
17027
17028(define-public ruby-rdf-vocab
17029 (package
17030 (name "ruby-rdf-vocab")
17031 (version "3.2.1")
17032 (source (origin
17033 (method url-fetch)
17034 (uri (rubygems-uri "rdf-vocab" version))
17035 (sha256
17036 (base32
17037 "1bqmp9rfjvd56ajjz68ij6jla1wjf1fqg7bi4dpnjrsmn4pwaq7l"))))
17038 (build-system ruby-build-system)
17039 (propagated-inputs
17040 (list ruby-rdf))
17041 (arguments
17042 (list #:tests? #f)) ;; tests have many cyclic dependencies
17043 (home-page "https://github.com/ruby-rdf/rdf-vocab")
17044 (synopsis "Common RDF vocabularies")
17045 (description
17046 "This gem extends @code{ruby-rdf} with several common @acronym{RDF,
17047Resource Description Framework} vocabularies.")
17048 (license license:unlicense)))
17049
17050(define-public ruby-rdiscount
17051 (package
17052 (name "ruby-rdiscount")
17053 (version "2.2.7.3")
17054 (source
17055 (origin
17056 (method git-fetch) ;for the full test suite
17057 (uri (git-reference
17058 (url "https://github.com/davidfstr/rdiscount")
17059 (commit version)))
17060 (file-name (git-file-name name version))
17061 (sha256
17062 (base32
17063 "1lnf598sngcy6b701h33h5l9rn2abl80x0jpynz7jxb4imhd5r80"))))
17064 (build-system ruby-build-system)
17065 (native-inputs (list perl))
17066 (synopsis "Discount Markdown Processor for Ruby")
17067 (description "Discount is an implementation of John Gruber's Markdown
17068markup language in C. It implements all of the language described in the
17069markdown syntax document and passes the Markdown 1.0 test suite.")
17070 (home-page "https://dafoster.net/projects/rdiscount/")
17071 (license license:bsd-3)))
17072
17073(define-public ruby-bibtex-ruby
17074 (package
17075 (name "ruby-bibtex-ruby")
17076 (version "6.1.0")
17077 (source
17078 (origin
17079 (method url-fetch)
17080 (uri (rubygems-uri "bibtex-ruby" version))
17081 (sha256
17082 (base32 "1ggx2j1gi46f1a6p45l1abk3nryfg1pj0cdlyrnilnqqpr1cfc96"))))
17083 (build-system ruby-build-system)
17084 (propagated-inputs (list ruby-latex-decode ruby-racc ruby-rdf
17085 ruby-rdf-vocab))
17086 (native-inputs (list ruby-cucumber ruby-minitest ruby-yard))
17087 (arguments
17088 (list
17089 #:phases
17090 #~(modify-phases %standard-phases
17091 (add-after 'extract-gemspec 'sanitize-dependencies
17092 (lambda* (#:key inputs #:allow-other-keys)
17093 (substitute* "Gemfile"
17094 ((".*(gnuplot|ruby-prof|simplecov|iconv|redcarpet|unicode).*")
17095 ""))
17096 (substitute* "Rakefile"
17097 (("require 'bundler" orig)
17098 (string-append "# " orig " # patched for Guix"))
17099 (("Bundler\\.setup" orig)
17100 (string-append "true # " orig " # patched for Guix"))
17101 (("bundle exec racc")
17102 (string-append "bundle exec "
17103 (search-input-file inputs "/bin/racc")))))))))
17104 (home-page "https://github.com/inukshuk/bibtex-ruby")
17105 (synopsis "Rubyist's Swiss Army knife for all things BibTeX")
17106 (description
17107 "BibTeX-Ruby is the Rubyist's Swiss Army knife for all things BibTeX.
17108It includes a parser for all common BibTeX objects and a sophisticated name
17109parser that tokenizes correctly formatted names. BibTeX-Ruby recognizes
17110BibTeX string replacements, joins values containing multiple strings or
17111variables, supports cross-references, and decodes common LaTeX formatting
17112instructions to unicode. If you are in a hurry, it also allows for easy
17113export/conversion to formats such as YAML, JSON, CSL, and XML (BibTeXML).")
17114 (license license:gpl3+)))
17115
17116(define-public ruby-bigdecimal
17117 (package
17118 (name "ruby-bigdecimal")
17119 (version "4.1.2")
17120 (source
17121 (origin
17122 (method git-fetch) ;for tests
17123 (uri (git-reference
17124 (url "https://github.com/ruby/bigdecimal")
17125 (commit (string-append "v" version))))
17126 (file-name (git-file-name name version))
17127 (sha256
17128 (base32 "0dw7c9pjqxb9p5r2y79f1r5w5i1y96r5f0ppd6p39ghg5476dx43"))))
17129 (build-system ruby-build-system)
17130 (native-inputs (list ruby-rake-compiler ruby-test-unit-ruby-core))
17131 (synopsis "Arbitrary precision decimal floating point number for Ruby")
17132 (description
17133 "This Ruby library provides a class for arbitrary precision decimal
17134floating point numbers.")
17135 (home-page "https://github.com/ruby/bigdecimal")
17136 (license (list license:ruby license:bsd-2))))
17137
17138(define-public ruby-unicode-emoji
17139 (package
17140 (name "ruby-unicode-emoji")
17141 (version "4.2.0")
17142 (source
17143 (origin
17144 (method url-fetch)
17145 (uri (rubygems-uri "unicode-emoji" version))
17146 (sha256
17147 (base32 "03zqn207zypycbz5m9mn7ym763wgpk7hcqbkpx02wrbm1wank7ji"))))
17148 (build-system ruby-build-system)
17149 (arguments
17150 (list
17151 #:test-target "spec"
17152 #:phases
17153 #~(modify-phases %standard-phases
17154 ;; The tests normally try to download the sources if they're not
17155 ;; present; however, guix also packages some of the unicode test
17156 ;; files that we can leverage instead
17157 (add-after 'unpack 'use-guix-bundled-unicode-emoji
17158 (lambda _
17159 (let ((emoji (search-input-directory %build-inputs
17160 "share/unicode/emoji")))
17161 (substitute* "spec/emoji_test_txt_spec.rb"
17162 (("\\_\\_dir\\_\\_\\, \"data/emoji\\-test\\.txt")
17163 (string-append "\"" emoji "/emoji-test.txt"))))
17164 ;; Disable failing test (likely fails due to expecting
17165 ;; unicode-emoji v17.0 spec, but guix currently providing v12.0)
17166 (substitute* "Rakefile"
17167 (("sh \"ruby spec.*")
17168 (string-append
17169 "sh \"ruby spec/unicode_emoji_spec.rb -v --show-skips\""
17170 "\n"
17171 ;; Disable tests
17172 "sh \"ruby spec/emoji_test_txt_spec.rb -v --show-skips" " "
17173 "-e '/REGEX_INCLUDE_MQE.*" ;; Regex continues
17174 "(0153|1115|1129|1841|1855|1966|1980|2001|2015)/'\""))))))))
17175 (native-inputs (list unicode-emoji))
17176 (home-page "https://github.com/janlelis/unicode-emoji")
17177 (synopsis "Provides Unicode Emoji data and regexes")
17178 (description
17179 "Provides Unicode Emoji data and regexes, incorporating the latest Unicode
17180and Emoji standards. Includes a categorized list of recommended Emoji.")
17181 (license license:expat)))
17182
17183(define-public ruby-unicode-scripts
17184 (package
17185 (name "ruby-unicode-scripts")
17186 (version "1.11.0")
17187 (source (origin
17188 (method url-fetch)
17189 (uri (rubygems-uri "unicode-scripts" version))
17190 (sha256
17191 (base32
17192 "0r3d7qms3syx1ijn027vj4fycy5dzh8bwl99i8ykrgyadx01569d"))))
17193 (build-system ruby-build-system)
17194 (arguments (list #:test-target "spec"))
17195 (home-page "https://github.com/janlelis/unicode-scripts")
17196 (synopsis "Unicode script classification library")
17197 (description "This gem provides a simple interface for classifying Ruby
17198strings using the Unicode @code{Script} and @code{Script_Extensions}
17199properties.")
17200 (license license:expat)))
17201
17202(define-public ruby-citeproc
17203 (package
17204 (name "ruby-citeproc")
17205 (version "1.0.10")
17206 (source (origin
17207 (method url-fetch)
17208 (uri (rubygems-uri "citeproc" version))
17209 (sha256
17210 (base32
17211 "13vl5sjmksk5a8kjcqnjxh7kn9gn1n4f9p1rvqfgsfhs54p0m6l2"))))
17212 (build-system ruby-build-system)
17213 (propagated-inputs
17214 (list ruby-namae))
17215 (arguments
17216 (list #:tests? #f)) ;; tests have a cyclic dependency
17217 (home-page "https://github.com/inukshuk/citeproc")
17218 (synopsis "Interface for Ruby citation processors")
17219 (description
17220 "CiteProc is a citation processor interface and citation data API based
17221on the @acronym{CSL, Citation Style Language} specifications. To actually
17222process citations, a dedicated processor engine is required: a pure Ruby
17223engine is available in the @code{citeproc-ruby} gem.")
17224 (license (list license:agpl3+ license:bsd-2))))
17225
17226(define-public ruby-ed25519
17227 (package
17228 (name "ruby-ed25519")
17229 (version "1.3.0")
17230 (source (origin
17231 (method git-fetch)
17232 (uri (git-reference
17233 (url "https://github.com/RubyCrypto/ed25519")
17234 (commit (string-append "v" version))))
17235 (file-name (git-file-name name version))
17236 (sha256
17237 (base32
17238 "1jm5w2dyhyrndcx0d02v0gjbzl1abhbx2wkp3gxzwcndghmkz98r"))))
17239 (build-system ruby-build-system)
17240 (arguments
17241 (list
17242 #:test-target "spec"
17243 #:phases
17244 #~(modify-phases %standard-phases
17245 (add-before 'build 'compile
17246 (lambda _
17247 (invoke "rake" "compile")))
17248 (add-after 'unpack 'remove-unnecessary-dependencies
17249 (lambda _
17250 ;; Coveralls relates to a network service, and RuboCop to code
17251 ;; linting and both are unnecessary to run the tests
17252 (substitute* "Gemfile"
17253 ((".*coveralls.*")
17254 "\n")
17255 ((".*rubocop.*")
17256 "\n"))
17257 (substitute* "spec/spec_helper.rb"
17258 (("require \"coveralls\"")
17259 "")
17260 (("Coveralls.wear!")
17261 ""))
17262 (substitute* "Rakefile"
17263 (("require \"rubocop/rake_task\"")
17264 "")
17265 (("RuboCop::RakeTask.new")
17266 "")))))))
17267 (native-inputs (list ruby-rake-compiler ruby-rspec))
17268 (synopsis
17269 "Ruby binding to the Ed25519 elliptic curve public-key signature system")
17270 (description
17271 "This package provides a Ruby binding to the Ed25519 elliptic curve
17272public-key signature system described in
17273@url{https://www.ietf.org/rfc/rfc8032.txt, RFC 8032}.")
17274 (home-page "https://github.com/RubyCrypto/ed25519")
17275 (license license:expat)))
17276
17277(define-public ruby-edtf
17278 (package
17279 (name "ruby-edtf")
17280 (version "3.1.0")
17281 (source (origin
17282 (method git-fetch)
17283 (uri (git-reference
17284 (url "https://github.com/inukshuk/edtf-ruby")
17285 (commit (string-append "v" version))))
17286 (sha256
17287 (base32
17288 "18j8xq8zmrn41cs2gpd1i87agi9905asvnjqndky2cqb5zg3q14g"))
17289 (snippet
17290 ;; remove generated file
17291 #~(delete-file "lib/edtf/parser.rb"))
17292 (file-name (git-file-name name version))))
17293 (build-system ruby-build-system)
17294 (propagated-inputs
17295 (list ruby-activesupport))
17296 (native-inputs
17297 (list ruby-cucumber
17298 ruby-rspec))
17299 (arguments
17300 (list
17301 #:phases
17302 #~(modify-phases %standard-phases
17303 (add-after 'extract-gemspec 'avoid-bundler
17304 (lambda args
17305 (substitute* "Rakefile"
17306 (("require 'bundler" orig)
17307 (string-append "# " orig " # patched for Guix"))
17308 (("bundle exec racc")
17309 "racc")
17310 (("Cucumber::Rake::Task\\.new[(]:cucumber[)]" orig)
17311 (string-append orig " do |c|\n"
17312 " c.bundler = false # patched for Guix\n"
17313 "end"))
17314 (("Bundler\\.setup" orig)
17315 (string-append "true # " orig " # patched for Guix")))))
17316 (add-after 'avoid-bundler 'patch-cucumber-options
17317 (lambda args
17318 (substitute* "cucumber.yml"
17319 ;; this option is not supported, at least in our configuration
17320 ((" --publish-quiet")
17321 ""))))
17322 (add-before 'build 'compile
17323 (lambda args
17324 (invoke "rake" "racc")))
17325 (replace 'check
17326 (lambda* (#:key tests? #:allow-other-keys)
17327 (when tests?
17328 (invoke "rake")))))))
17329 (home-page "https://github.com/inukshuk/edtf-ruby")
17330 (synopsis "Ruby implementation of Extended Date/Time Format")
17331 (description
17332 "EDTF-Ruby provides a parser and an API for the @acronym{EDTF, Extended
17333Date/Time Format} standard, implemented as an extension to Ruby's @code{Date}
17334class.")
17335 (license license:bsd-2)))
17336
17337(define-public ruby-gli
17338 (package
17339 (name "ruby-gli")
17340 (version "2.21.0")
17341 (source (origin
17342 (method git-fetch)
17343 (uri (git-reference
17344 (url "https://github.com/davetron5000/gli")
17345 (commit (string-append "v" version))))
17346 (sha256
17347 (base32
17348 "09b1r9hlx4dy2yq036nk7hc2nbswhia6q3na9v11z94yibc8mgja"))
17349 (file-name (git-file-name name version))))
17350 (build-system ruby-build-system)
17351 (native-inputs
17352 (list ruby-minitest
17353 ruby-rainbow
17354 ruby-rdoc
17355 ruby-sdoc))
17356 (arguments
17357 (list
17358 #:phases
17359 #~(modify-phases %standard-phases
17360 (add-after 'extract-gemspec 'patch-gemspec-version
17361 (lambda args
17362 (substitute* "gli.gemspec"
17363 ;; this trick fails in our build environment
17364 (("require File\\.join[(]\\[" orig)
17365 (string-append "# patched for Guix # " orig))
17366 (("s\\.version = GLI::VERSION")
17367 #$(string-append "s.version = '"
17368 (package-version this-package)
17369 "' # patched for Guix")))))
17370 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17371 (lambda args
17372 (substitute* "gli.gemspec"
17373 (("`git ls-files -- [{]test,spec,features[}]/\\*`")
17374 "`find {test,spec,features} -type f | sort`"))))
17375 (add-after 'replace-another-git-ls-files 'fix-rubyopt
17376 (lambda args
17377 (substitute* "Rakefile"
17378 (("ENV\\[\"RUBYOPT\"]")
17379 "(ENV['RUBYOPT'] || '')")))))))
17380 (home-page "https://davetron5000.github.io/gli/")
17381 (synopsis "Git-Like Interface command-line parser")
17382 (description
17383 "GLI allows you to create command-line applications in Ruby with Git-Like
17384Interfaces: that is, they take subcommands in the style of @command{git} and
17385@command{gem}. GLI uses a simple domain-specific language, but retains all
17386the power of the built-in @code{OptionParser}.")
17387 (license license:asl2.0)))
17388
17389(define-public ruby-anystyle-data
17390 (package
17391 (name "ruby-anystyle-data")
17392 (version "1.3.0")
17393 (source (origin
17394 (method git-fetch)
17395 (uri (git-reference
17396 (url "https://github.com/inukshuk/anystyle-data")
17397 (commit (string-append "v" version))))
17398 (sha256
17399 (base32
17400 "1jh880310m3gjdrk4m8rwwnsf0824zkf26clpr8p64sac2fyy907"))
17401 (snippet
17402 ;; remove pre-built file
17403 #~(delete-file "lib/anystyle/data/dict.txt.gz"))
17404 (patches
17405 (search-patches "ruby-anystyle-data-immutable-install.patch"))
17406 (file-name (git-file-name name version))))
17407 (build-system ruby-build-system)
17408 (arguments
17409 (list
17410 #:tests? #f ;; there are none
17411 #:modules
17412 `((guix build ruby-build-system)
17413 (guix build utils)
17414 (srfi srfi-26))
17415 #:phases
17416 #~(modify-phases %standard-phases
17417 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17418 (lambda args
17419 (substitute* "anystyle-data.gemspec"
17420 (("`git ls-files lib README\\.md LICENSE`\\.split[(][^)]*[)]")
17421 (string-append
17422 "["
17423 (string-join
17424 (map (cut string-append "\"" <> "\"")
17425 `("README.md"
17426 "LICENSE"
17427 "lib/anystyle/data.rb"
17428 "lib/anystyle/data/dict.txt.gz"
17429 "lib/anystyle/data/setup.rb"
17430 "lib/anystyle/data/version.rb"))
17431 ", ")
17432 "]")))))
17433 (add-before 'build 'compile-dict
17434 (lambda args
17435 (invoke "rake" "compile"))))))
17436 (home-page "https://anystyle.io")
17437 (synopsis "AnyStyle parser dictionary data")
17438 (description
17439 "This gem provides parser dictionary data for AnyStyle.")
17440 (license license:bsd-2)))
17441
17442(define-public ruby-anystyle
17443 (package
17444 (name "ruby-anystyle")
17445 (version "1.4.2")
17446 (source (origin
17447 (method git-fetch)
17448 (uri (git-reference
17449 (url "https://github.com/inukshuk/anystyle")
17450 (commit (string-append "v" version))))
17451 (sha256
17452 (base32
17453 "0xhy7wj8v7iahikck6vxbdpncaz5w2gb11b32kmvg5ckgi2kz23p"))
17454 (snippet
17455 ;; There is an optional dependency on
17456 ;; <https://github.com/feedbackmine/language_detector>, which
17457 ;; seems like it was intended to be free software, but
17458 ;; doesn't have a clear license statement. Maybe someone can
17459 ;; do more sleuthing, or else find a replacement? See also
17460 ;; <https://github.com/inukshuk/anystyle/issues/186>. For
17461 ;; now, patch it out, but leave a pointer to follow up.
17462 #~(begin
17463 (use-modules (guix build utils))
17464 (substitute* "Gemfile"
17465 (("gem 'language_detector', github: '[^']*'" orig)
17466 (string-append "# " orig " # unclear license")))
17467 (substitute* "spec/anystyle/parser_spec.rb"
17468 (("language: 'en'," orig)
17469 (string-append "# " orig " # no lanugage_detector")))))
17470 (patches
17471 (search-patches
17472 "ruby-anystyle-fix-dictionary-populate.patch"))
17473 (file-name (git-file-name name version))))
17474 (build-system ruby-build-system)
17475 (propagated-inputs
17476 (list ruby-anystyle-data
17477 ruby-bibtex-ruby
17478 ruby-namae
17479 ruby-wapiti))
17480 (native-inputs
17481 (list ruby-byebug
17482 ruby-citeproc
17483 ruby-edtf
17484 ruby-gdbm
17485 ruby-rspec
17486 ruby-unicode-scripts))
17487 (arguments
17488 (list
17489 #:test-target "spec"
17490 #:phases
17491 #~(modify-phases %standard-phases
17492 (add-after 'extract-gemspec 'avoid-bundler
17493 (lambda args
17494 (substitute* "Rakefile"
17495 (("require 'bundler" orig)
17496 (string-append "# " orig " # patched for Guix"))
17497 (("Bundler\\.setup" orig)
17498 (string-append "true # " orig " # patched for Guix")))))
17499 (add-after 'replace-git-ls-files 'replace-another-git-ls-files
17500 (lambda args
17501 (substitute* "anystyle.gemspec"
17502 (("`git ls-files spec`")
17503 "`find spec -type f | sort`"))))
17504 (add-after 'wrap 'populate-dictionaries
17505 (lambda args
17506 ;; We must initialize these files here, or they will never be
17507 ;; usable with the default settings. A more flexible approach
17508 ;; might use something like `Gem.find_files()` or
17509 ;; XDG_DATA_DIRS.
17510 (with-output-to-file "initialize-dictionaries.rb"
17511 (lambda ()
17512 (display "\
17513require 'anystyle/dictionary' # must come before 'anystyle/data'
17514require 'anystyle/data'
17515[:marshal, :gdbm].each do |adapter|
17516 AnyStyle::Dictionary.create({adapter: adapter}).open().close()
17517end
17518")))
17519 (let* ((old-gems (getenv "GEM_PATH"))
17520 (new-gems (string-append #$output
17521 "/lib/ruby/vendor_ruby:"
17522 old-gems)))
17523 (dynamic-wind
17524 (lambda ()
17525 (setenv "GEM_PATH" new-gems))
17526 (lambda ()
17527 (invoke "ruby" "initialize-dictionaries.rb"))
17528 (lambda ()
17529 (setenv "GEM_PATH" old-gems)))))))))
17530 (home-page "https://anystyle.io")
17531 (synopsis "Fast and smart citation reference parsing (Ruby library)")
17532 (description
17533 "AnyStyle is a very fast and smart parser for academic reference lists
17534and bibliographies. AnyStyle uses powerful machine learning heuristics based
17535on Conditional Random Fields and aims to make it easy to train the model with
17536data that is relevant to your parsing needs.
17537
17538This package provides the Ruby module @code{AnyStyle}. AnyStyle can also be
17539used via the @command{anystyle} command-line utility or a web application,
17540though the later has not yet been packaged for Guix.")
17541 (license license:bsd-2)))
17542
17543(define-public anystyle
17544 (package
17545 (name "anystyle")
17546 (version "1.4.5")
17547 (source (origin
17548 (method git-fetch)
17549 (uri (git-reference
17550 (url "https://github.com/inukshuk/anystyle-cli")
17551 (commit (string-append "v" version))))
17552 (sha256
17553 (base32
17554 "10jx830mx9vh7rsz87ndvz8w5b5azd9s231vwyb0dqxs921v6qwy"))
17555 (file-name (git-file-name name version))))
17556 (build-system ruby-build-system)
17557 (propagated-inputs
17558 (list ruby-anystyle
17559 ruby-bibtex-ruby
17560 ruby-gli))
17561 (native-inputs
17562 (list ruby-gdbm
17563 txt2man))
17564 (arguments
17565 (list
17566 #:modules
17567 `((guix build ruby-build-system)
17568 (ice-9 popen)
17569 (srfi srfi-1)
17570 (guix build utils))
17571 #:phases
17572 #~(modify-phases %standard-phases
17573 (add-after 'extract-gemspec 'less-strict-dependencies
17574 (lambda args
17575 (substitute* "anystyle-cli.gemspec"
17576 (("'bibtex-ruby', '[^']*'")
17577 "'bibtex-ruby'"))))
17578 (add-before 'build 'change-default-dictionary-adapter
17579 (lambda args
17580 ;; Since we always have gdbm available, using it will give a
17581 ;; faster startup time, which is particularly worth-while for
17582 ;; a command-line tool.
17583 (substitute* "bin/anystyle"
17584 (("default_value: 'ruby',")
17585 "default_value: 'gdbm', # patched for Guix"))))
17586 (replace 'check
17587 (lambda* (#:key tests? #:allow-other-keys)
17588 ;; There are no tests, but let's use this opportunity to do a
17589 ;; basic test of our own that things run ok. It works especially
17590 ;; well to test this here since we know the 'ruby-anystile'
17591 ;; package is in its final, immutable installed form.
17592 (when tests?
17593 (let ((common
17594 `("require 'anystyle'"
17595 ,(string-append
17596 "pp AnyStyle.parse 'Derrida, J. (1967). L’écriture"
17597 " et la différence (1 éd.). Paris: Éditions du"
17598 " Seuil.'"))))
17599 (for-each
17600 (lambda (lines)
17601 (apply invoke "ruby"
17602 (fold-right (lambda (line lst)
17603 (cons* "-e" line lst))
17604 '()
17605 lines)))
17606 `(,common
17607 ("require 'anystyle/dictionary'"
17608 "AnyStyle::Dictionary.defaults[:adapter] = :gdbm"
17609 ,@common)))))))
17610 (add-after 'wrap 'check-cli
17611 (lambda* (#:key tests? outputs #:allow-other-keys)
17612 (when tests?
17613 (with-output-to-file "check-cli.in"
17614 (lambda ()
17615 (for-each
17616 display
17617 '("Derrida, J. (1967). L’écriture et la différence "
17618 "(1 éd.). Paris: Éditions du Seuil.\n"))))
17619 (invoke (search-input-file outputs "/bin/anystyle")
17620 "parse"
17621 "check-cli.in"))))
17622 (add-after 'wrap 'generate-man-page
17623 ;; generating a man page also tests that the command actually runs
17624 (lambda args
17625 (define (run-with-output-file file command . args)
17626 (format (current-output-port)
17627 "running: ~s\nwith output to: ~s\n"
17628 (cons command args)
17629 file)
17630 (unless (zero?
17631 (with-output-to-file file
17632 (lambda ()
17633 (status:exit-val
17634 (close-pipe
17635 (apply open-pipe* OPEN_WRITE command args))))))
17636 (error "command failed")))
17637 (let ((anystyle (string-append #$output "/bin/anystyle")))
17638 (run-with-output-file "intro.txt"
17639 anystyle "--help")
17640 (for-each (lambda (cmd)
17641 (let ((file (string-append cmd ".txt")))
17642 (run-with-output-file file
17643 anystyle cmd "--help")
17644 ;; indent headings to create subsections
17645 (substitute* file
17646 (("^[A-Z]" orig)
17647 (string-append " " orig)))
17648 ;; generate a section heading
17649 (call-with-output-file
17650 (string-append "section-" file)
17651 (lambda (out)
17652 (format out "\n\n~a COMMAND\n\n"
17653 (string-upcase cmd))))))
17654 '("check" "find" "parse" "train"))
17655 (substitute* `("intro.txt"
17656 "check.txt" "find.txt" "parse.txt" "train.txt")
17657 ;; format "tag list" for txt2man"
17658 ((" - ")
17659 " ")
17660 ;; restore formatting of the "name" sections
17661 (("(anystyle|check|find|parse|train) ([A-Z])" _ cmd post)
17662 (string-append cmd " - " post)))
17663 (run-with-output-file "anystyle.txt"
17664 "cat"
17665 "intro.txt"
17666 "section-check.txt" "check.txt"
17667 "section-find.txt" "find.txt"
17668 "section-parse.txt" "parse.txt"
17669 "section-train.txt" "train.txt")
17670 (run-with-output-file
17671 "anystyle.1"
17672 "txt2man"
17673 "-v" "General Commands Manual" "-t" "anystyle" "-s" "1"
17674 "-r" #$(string-append "anystyle-cli "
17675 (package-version this-package))
17676 "-B" "check" "-B" "find" "-B" "parse" "-B" "train"
17677 "anystyle.txt")
17678 (install-file "anystyle.1"
17679 (string-append #$output "/share/man/man1"))))))))
17680 (home-page "https://anystyle.io")
17681 (synopsis "Fast and smart citation reference parsing")
17682 (description
17683 "AnyStyle is a very fast and smart parser for academic reference lists
17684and bibliographies. AnyStyle uses powerful machine learning heuristics based
17685on Conditional Random Fields and aims to make it easy to train the model with
17686data that is relevant to your parsing needs.
17687
17688This package provides the @command{anystyle} command-line utility. AnyStyle
17689can also be used as a Ruby library or as a web application, though the later
17690has not yet been packaged for Guix.")
17691 (license license:bsd-2)
17692 (properties `((upstream-name . "anystyle-cli")))))
17693
17694(define-public ruby-google-protobuf
17695 (package
17696 (name "ruby-google-protobuf")
17697 (version "4.35.1")
17698 (source (origin
17699 (method url-fetch)
17700 (uri (rubygems-uri "google-protobuf" version))
17701 (sha256
17702 (base32
17703 "09ipzsijxkrgwnyic0l4yhnazw46ca7ll0adza6za66r649lg9m3"))))
17704 (build-system ruby-build-system)
17705 (arguments
17706 (list #:tests? #f)) ; There are no tests.
17707 (native-inputs (list ruby-rake))
17708 (synopsis "Protocol Buffers are Google's data interchange format")
17709 (description "This library contains the Ruby extension that implements
17710Protocol Buffers functionality in Ruby.
17711
17712The Ruby extension makes use of generated Ruby code that defines message and
17713enum types in a Ruby DSL. You may write definitions in this DSL directly, but
17714we recommend using protoc's Ruby generation support with @code{.proto} files.
17715The build process in this directory only installs the extension; you need to
17716install @code{protoc} (in package ruby-grpc-tools) as well to have Ruby code
17717generation functionality.")
17718 (home-page "https://protobuf.dev")
17719 (license license:bsd-3)))
17720
17721(define-public ruby-googleapis-common-protos-types
17722 (package
17723 (name "ruby-googleapis-common-protos-types")
17724 (version "1.13.0")
17725 (source (origin
17726 (method url-fetch)
17727 (uri (rubygems-uri "googleapis-common-protos-types" version))
17728 (sha256
17729 (base32
17730 "1zrxnv9s2q39f2nh32x7nbfi8lpwzmmn3ji4adglg8dlfr1xrz16"))))
17731 (build-system ruby-build-system)
17732 (arguments
17733 `(#:tests? #f)) ;; has no tests
17734 (propagated-inputs (list ruby-google-protobuf))
17735 (synopsis "Common protocol buffer types used by Google APIs")
17736 (description "Common protocol buffer types used by Google APIs")
17737 (home-page "https://github.com/googleapis/common-protos-ruby")
17738 (license license:asl2.0)))
17739
17740(define-public ruby-grpc
17741 (package
17742 (name "ruby-grpc")
17743 (version "1.74.1")
17744 (source (origin
17745 (method url-fetch)
17746 (uri (rubygems-uri "grpc" version))
17747 (sha256
17748 (base32
17749 "12qy6yga90hs2pdzkxwm80d38dbmjdxmf2szqwb40ky1jr4klfp7"))))
17750 (build-system ruby-build-system)
17751 (arguments
17752 `(#:tests? #f)) ;; has no tests
17753 ;; TODO remove third-party sources (zlib, upb, utf8-range, re2, c-ares,
17754 ;; boringssl-with-bazel, address_sorting, abseil-cpp), see Makefile
17755 (propagated-inputs (list ruby-google-protobuf
17756 ruby-googleapis-common-protos-types))
17757 (synopsis "GRPC system in Ruby")
17758 (description "GRPC is a high performance, open-source universal RPC
17759framework. This package provides a ruby interface for it.")
17760 (home-page "https://github.com/grpc/grpc/tree/master/src/ruby")
17761 (license license:asl2.0)))
17762
17763;;;
17764;;; Avoid adding new packages to the end of this file. To reduce the chances
17765;;; of a merge conflict, place them above by existing packages with similar
17766;;; functionality or similar names.
17767;;;