gnu: Add ruby-wwtd.
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
CommitLineData
6ef8c59a 1;;; GNU Guix --- Functional package management for GNU
37ab3aba 2;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
402b03e6 3;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
f586c877 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
37ab3aba 5;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
6742c6f6 6;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
cba53c60 7;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
3c986a7d 8;;; Copyright © 2017 Nikita <nikita@n0.is>
3cc8e029 9;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
b872b47b 10;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
a7b7817d 11;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6a9d2266 12;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
433e3154 13;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
4db80f8b 14;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
8ef06557 15;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
3355e49c 16;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
fc4f7c45 17;;; Copyright © 2019 Mikhail Kirillov <w96k.ru@gmail.com>
369faa59 18;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
9e065a8a 19;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
9c4cb1ef 20;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
0c558aa9 21;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
fd248cb8 22;;; Copyright © 2019 Brett Gilio <brettg@posteo.de>
6ef8c59a
PP
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages ruby)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (gnu packages)
1db791d5 42 #:use-module (gnu packages base)
933dad91 43 #:use-module (gnu packages bison)
15b16c2c 44 #:use-module (gnu packages check)
6ef8c59a 45 #:use-module (gnu packages compression)
2a9ce5cb 46 #:use-module (gnu packages crypto)
4a9e0585 47 #:use-module (gnu packages databases)
255d1bbe 48 #:use-module (gnu packages dbm)
c41fba01 49 #:use-module (gnu packages rails)
6ef8c59a 50 #:use-module (gnu packages readline)
6ef8c59a 51 #:use-module (gnu packages autotools)
ad79eb55 52 #:use-module (gnu packages java)
6ef8c59a 53 #:use-module (gnu packages libffi)
f3d7bb93 54 #:use-module (gnu packages libidn)
c41fba01
CB
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages lsof)
34138e42 57 #:use-module (gnu packages maths)
0c8eedc1 58 #:use-module (gnu packages ncurses)
fe5dd5f4 59 #:use-module (gnu packages networking)
3ca43524 60 #:use-module (gnu packages node)
ac09beba 61 #:use-module (gnu packages python)
44d10b1f 62 #:use-module (gnu packages python-xyz)
763624f5 63 #:use-module (gnu packages ragel)
30f08487 64 #:use-module (gnu packages rsync)
cd0322a3 65 #:use-module (gnu packages sqlite)
cc2b77df 66 #:use-module (gnu packages tls)
66e20863 67 #:use-module (gnu packages version-control)
6ef8c59a
PP
68 #:use-module (guix packages)
69 #:use-module (guix download)
bda0c139 70 #:use-module (guix git-download)
6ef8c59a 71 #:use-module (guix utils)
acf735f2 72 #:use-module (guix build-system gnu)
e920bfca 73 #:use-module (gnu packages xml)
c2c4e5b2 74 #:use-module (gnu packages web)
15b16c2c
CB
75 #:use-module (guix build-system ruby)
76 #:use-module ((srfi srfi-1) #:select (alist-delete)))
6ef8c59a
PP
77
78(define-public ruby
79 (package
80 (name "ruby")
4914c157 81 (version "2.6.5")
6ef8c59a
PP
82 (source
83 (origin
84 (method url-fetch)
6becfdff
MW
85 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
86 (version-major+minor version)
12d39eb5 87 "/ruby-" version ".tar.xz"))
6ef8c59a
PP
88 (sha256
89 (base32
4914c157 90 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
65e84e31
BW
91 (modules '((guix build utils)))
92 (snippet `(begin
93 ;; Remove bundled libffi
c033c195 94 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
65e84e31 95 #t))))
6ef8c59a
PP
96 (build-system gnu-build-system)
97 (arguments
98 `(#:test-target "test"
fd248cb8 99 #:configure-flags '("--enable-shared") ; dynamic linking
6ef8c59a 100 #:phases
9656b8be 101 (modify-phases %standard-phases
65e84e31 102 (add-before 'configure 'replace-bin-sh-and-remove-libffi
9656b8be
BW
103 (lambda _
104 (substitute* '("Makefile.in"
105 "ext/pty/pty.c"
106 "io.c"
107 "lib/mkmf.rb"
108 "process.c"
109 "test/rubygems/test_gem_ext_configure_builder.rb"
110 "test/rdoc/test_rdoc_parser.rb"
111 "test/ruby/test_rubyoptions.rb"
112 "test/ruby/test_process.rb"
113 "test/ruby/test_system.rb"
114 "tool/rbinstall.rb")
115 (("/bin/sh") (which "sh")))
116 #t)))))
6ef8c59a
PP
117 (inputs
118 `(("readline" ,readline)
6ef8c59a
PP
119 ("openssl" ,openssl)
120 ("libffi" ,libffi)
4914c157
CB
121 ("gdbm" ,gdbm)))
122 (propagated-inputs
123 `(("zlib" ,zlib)))
6ef8c59a
PP
124 (native-search-paths
125 (list (search-path-specification
126 (variable "GEM_PATH")
3cb3fa67 127 (files (list (string-append "lib/ruby/vendor_ruby"))))))
6becfdff 128 (synopsis "Programming language interpreter")
6ef8c59a
PP
129 (description "Ruby is a dynamic object-oriented programming language with
130a focus on simplicity and productivity.")
bf3be6a5 131 (home-page "https://www.ruby-lang.org")
6ef8c59a
PP
132 (license license:ruby)))
133
1cc7d340
RP
134(define-public ruby-2.7
135 (package
136 (inherit ruby)
137 (version "2.7.1")
138 (source
139 (origin
140 (method url-fetch)
141 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
142 (version-major+minor version)
143 "/ruby-" version ".tar.gz"))
144 (sha256
145 (base32
146 "0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
147 (modules '((guix build utils)))
148 (snippet `(begin
149 ;; Remove bundled libffi
150 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
151 #t))))
152 (arguments
153 `(#:test-target "test"
154 #:configure-flags '("--enable-shared") ; dynamic linking
155 #:phases
156 (modify-phases %standard-phases
157 (add-before 'configure 'replace-bin-sh-and-remove-libffi
158 (lambda _
159 (substitute* '("configure.ac"
160 "template/Makefile.in"
161 "lib/rubygems/installer.rb"
162 "ext/pty/pty.c"
163 "io.c"
164 "lib/mkmf.rb"
165 "process.c"
166 "test/rubygems/test_gem_ext_configure_builder.rb"
167 "test/rdoc/test_rdoc_parser.rb"
168 "test/ruby/test_rubyoptions.rb"
169 "test/ruby/test_process.rb"
170 "test/ruby/test_system.rb"
171 "tool/rbinstall.rb")
172 (("/bin/sh") (which "sh")))
173 #t)))))
174 (native-inputs
175 `(("autoconf" ,autoconf)))))
176
227fab3e
CB
177(define-public ruby-2.5
178 (package
179 (inherit ruby)
a09ff632 180 (version "2.5.8")
227fab3e
CB
181 (source
182 (origin
183 (method url-fetch)
184 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
185 (version-major+minor version)
186 "/ruby-" version ".tar.xz"))
187 (sha256
188 (base32
a09ff632 189 "0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
227fab3e
CB
190 (modules '((guix build utils)))
191 (snippet `(begin
192 ;; Remove bundled libffi
193 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
194 #t))))))
195
93cae02f
CB
196(define-public ruby-2.4
197 (package
198 (inherit ruby)
dfe211f9 199 (version "2.4.10")
93cae02f
CB
200 (source
201 (origin
202 (method url-fetch)
203 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
204 (version-major+minor version)
205 "/ruby-" version ".tar.xz"))
206 (sha256
207 (base32
dfe211f9 208 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
93cae02f
CB
209 (modules '((guix build utils)))
210 (snippet `(begin
211 ;; Remove bundled libffi
212 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
213 #t))))))
214
933dad91
RW
215(define-public mruby
216 (package
217 (name "mruby")
218 (version "2.0.0")
219 (source
220 (origin
221 (method git-fetch)
222 (uri (git-reference
223 (url "https://github.com/mruby/mruby.git")
224 (commit version)))
225 (file-name (git-file-name name version))
226 (sha256
227 (base32
228 "1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"))))
229 (build-system gnu-build-system)
230 (arguments
231 `(#:test-target "test"
232 #:phases
233 (modify-phases %standard-phases
234 (delete 'configure)
235 (add-after 'unpack 'enable-verbose-tests
236 (lambda _
237 (substitute* "Makefile"
238 (("ruby ./minirake" m)
239 (string-append m " --verbose")))
240 #t))
241 (add-after 'unpack 'disable-broken-tests
242 (lambda _
243 (substitute* "mrbgems/mruby-io/test/io.rb"
244 (("assert\\('IO.popen.+$" m)
245 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
246 (("assert\\('IO#isatty.+$" m)
247 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
248 ;; This one is really weird. The *expected* output is all wrong.
249 (("assert\\('`cmd`.*" m)
250 (string-append m "skip \"Disable for Guix\"\n"))
251 (("echo foo")
252 (string-append (which "echo") " foo")))
253 #t))
254 ;; There is no install target
255 (replace 'install
256 (lambda* (#:key outputs #:allow-other-keys)
257 (let* ((out (assoc-ref outputs "out"))
258 (bin (string-append out "/bin"))
259 (lib (string-append out "/lib")))
260 (mkdir-p bin)
261 (copy-recursively "build/host/bin" bin)
262 (mkdir-p lib)
263 (copy-recursively "build/host/lib" lib))
264 #t)))))
265 (native-inputs
266 `(("ruby" ,ruby)
267 ("bison" ,bison)))
268 (home-page "https://github.com/mruby/mruby")
269 (synopsis "Lightweight Ruby")
270 (description "mruby is the lightweight implementation of the Ruby
271language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
272embedded within your application.")
273 (license license:expat)))
274
34372d39
RW
275(define-public ruby-commander
276 (package
277 (name "ruby-commander")
278 (version "4.4.7")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (rubygems-uri "commander" version))
283 (sha256
284 (base32
285 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
286 (build-system ruby-build-system)
287 (arguments
288 `(#:test-target "spec"
289 #:phases
290 (modify-phases %standard-phases
291 ;; Don't run or require rubocop, the code linting tool, as this is a
292 ;; bit unnecessary.
293 (add-after 'unpack 'dont-run-rubocop
294 (lambda _
295 (substitute* "Rakefile"
296 ((".*rubocop.*") "")
297 ((".*RuboCop.*") ""))
298 #t)))))
299 (propagated-inputs
300 `(("ruby-highline" ,ruby-highline)))
301 (native-inputs
302 `(("bundler" ,bundler)
303 ("ruby-rspec-core" ,ruby-rspec-core)
304 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
305 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
306 ("ruby-simplecov" ,ruby-simplecov)))
307 (home-page "https://github.com/commander-rb/commander")
308 (synopsis "Library for building Ruby command-line executables")
309 (description
310 "Commander aims to be a complete solution for Ruby command-line
311executables. Commander bridges the gap between other terminal related
312libraries (OptionParser, HighLine), while providing many new features, and an
313elegant API.")
314 (license license:expat)))
315
823ed097
CB
316(define-public ruby-highline
317 (package
318 (name "ruby-highline")
6742c6f6 319 (version "2.0.1")
823ed097
CB
320 (source
321 (origin
322 (method url-fetch)
323 (uri (rubygems-uri "highline" version))
324 (sha256
325 (base32
6742c6f6 326 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
823ed097
CB
327 (build-system ruby-build-system)
328 (arguments
329 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
330 (native-inputs
331 `(("bundler" ,bundler)
332 ("ruby-code-statistics" ,ruby-code-statistics)))
333 (synopsis
334 "HighLine helps you build command-line interfaces")
335 (description
336 "HighLine provides a high-level IO library that provides validation,
337type conversion, and more for command-line interfaces. HighLine also includes
338a menu system for providing multiple options to the user.")
339 (home-page "https://github.com/JEG2/highline")
340 (license (list license:gpl2 license:ruby))))
341
bda0c139
DT
342(define-public ruby-hoe
343 (package
344 (name "ruby-hoe")
d0d2dd24 345 (version "3.21.0")
bda0c139 346 (source (origin
e83c6d00
DT
347 (method url-fetch)
348 (uri (rubygems-uri "hoe" version))
bda0c139
DT
349 (sha256
350 (base32
d0d2dd24 351 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
bda0c139 352 (build-system ruby-build-system)
d0d2dd24
CB
353 (arguments
354 '(#:phases
355 (modify-phases %standard-phases
356 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
357 ;; variable is set, so unset it for the duration of the tests.
358 ;;
359 ;; TestHoe#test_possibly_better
360 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
361 ;; Expected: 2019-11-12 00:00:00 UTC
362 ;; Actual: 1970-01-01 00:00:00 UTC
363 (add-before 'check 'unset-SOURCE-DATE-EPOCH
364 (lambda _
365 (unsetenv "SOURCE_DATE_EPOCH")
366 #t))
367 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
368 (lambda _
369 (setenv "SOURCE_DATE_EPOCH" "1")
370 #t)))))
bda0c139
DT
371 (synopsis "Ruby project management helper")
372 (description
373 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
374maintain, and release projects and includes a dynamic plug-in system allowing
375for easy extensibility. Hoe ships with plug-ins for all the usual project
376tasks including rdoc generation, testing, packaging, deployment, and
377announcement.")
2f3800e5 378 (home-page "https://www.zenspider.com/projects/hoe.html")
bda0c139
DT
379 (license license:expat)))
380
022170dc
PP
381(define-public ruby-rake-compiler
382 (package
383 (name "ruby-rake-compiler")
0cd7b816 384 (version "1.0.4")
022170dc
PP
385 (source (origin
386 (method url-fetch)
e83c6d00 387 (uri (rubygems-uri "rake-compiler" version))
022170dc
PP
388 (sha256
389 (base32
0cd7b816 390 "1xpdi4w8zaklk1i9ps8g3k0icw3v5fcks092l84w28rgrpx82qip"))))
022170dc
PP
391 (build-system ruby-build-system)
392 (arguments
e83c6d00 393 '(#:tests? #f)) ; needs cucumber
022170dc 394 (synopsis "Building and packaging helper for Ruby native extensions")
e881752c 395 (description "Rake-compiler provides a framework for building and
022170dc
PP
396packaging native C and Java extensions in Ruby.")
397 (home-page "https://github.com/rake-compiler/rake-compiler")
398 (license license:expat)))
399
30f08487
RW
400(define-public ruby-rsync
401 (package
402 (name "ruby-rsync")
403 (version "1.0.9")
404 (source
405 (origin
406 (method url-fetch)
407 (uri (rubygems-uri "rsync" version))
408 (sha256
409 (base32
410 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
411 (build-system ruby-build-system)
412 (arguments
413 '(#:test-target "spec"
414 #:phases
415 (modify-phases %standard-phases
416 (add-after 'unpack 'remove-coveralls-requirement
417 (lambda _
418 (substitute* "spec/spec_helper.rb"
419 (("require 'coveralls'") "")
420 (("Coveralls.wear!") ""))
421 #t)))))
422 (native-inputs
423 `(("bundler" ,bundler)
424 ("rsync" ,rsync)
425 ("ruby-rspec-core" ,ruby-rspec-core)
426 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
427 ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
428 (home-page "https://github.com/jbussdieker/ruby-rsync")
429 (synopsis "Ruby wrapper around rsync")
430 (description
431 "Ruby Rsync is a Ruby library that can synchronize files between remote
432hosts by wrapping the @file{rsync} binary.")
433 (license license:expat)))
434
acf735f2
DT
435(define-public ruby-i18n
436 (package
437 (name "ruby-i18n")
92dddf6b 438 (version "1.7.0")
acf735f2
DT
439 (source (origin
440 (method url-fetch)
e83c6d00 441 (uri (rubygems-uri "i18n" version))
acf735f2
DT
442 (sha256
443 (base32
92dddf6b 444 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
acf735f2
DT
445 (build-system ruby-build-system)
446 (arguments
0bfdfd37 447 '(#:tests? #f)) ; no tests
cbb50182 448 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
acf735f2
DT
449 (synopsis "Internationalization library for Ruby")
450 (description "Ruby i18n is an internationalization and localization
451solution for Ruby programs. It features translation and localization,
452interpolation of values to translations, pluralization, customizable
453transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
454translation data, custom key/scope separator, custom exception handlers, and
455an extensible architecture with a swappable backend.")
92dddf6b 456 (home-page "https://github.com/ruby-i18n/i18n")
acf735f2 457 (license license:expat)))
eb0c2dd6 458
62b138ca
CB
459(define-public ruby-iruby
460 (package
461 (name "ruby-iruby")
462 (version "0.3")
463 (source
464 (origin
465 (method url-fetch)
466 (uri (rubygems-uri "iruby" version))
467 (sha256
468 (base32
469 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
470 (build-system ruby-build-system)
471 (arguments
472 ;; TODO: Tests currently fail.
473 ;;
474 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
475 ;;
476 ;; 1) Failure:
477 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
478 ;; In [ expected
479 ;;
480 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
481 '(#:tests? #f
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'patch-ipython
485 (lambda* (#:key inputs #:allow-other-keys)
486 (substitute* "lib/iruby/command.rb"
487 (("version = `")
488 (string-append
489 "version = `"
490 (assoc-ref inputs "python-ipython")
491 "/bin/"))
492 (("Kernel\\.exec\\('")
493 (string-append
494 "Kernel.exec('"
495 (assoc-ref inputs "python-ipython")
496 "/bin/")))
497 #t)))))
498 (inputs
499 `(("python-ipython" ,python-ipython)))
500 (propagated-inputs
501 `(("ruby-bond" ,ruby-bond)
502 ("ruby-data_uri" ,ruby-data_uri)
503 ("ruby-mimemagic" ,ruby-mimemagic)
504 ("ruby-multi-json" ,ruby-multi-json)
505 ("ruby-cztop" ,ruby-cztop)
506 ;; Optional inputs
507 ("ruby-pry" ,ruby-pry)))
508 (synopsis "Ruby kernel for Jupyter/IPython")
509 (description
510 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
511notebook).")
512 (home-page "https://github.com/SciRuby/iruby")
513 (license license:expat)))
514
eb0c2dd6
DT
515;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
516;; dependencies use RSpec for their test suites! To avoid these circular
517;; dependencies, we disable tests for all of the RSpec-related packages.
87688ff3 518(define-public ruby-rspec-support
eb0c2dd6
DT
519 (package
520 (name "ruby-rspec-support")
bee67d18 521 (version "3.8.0")
eb0c2dd6
DT
522 (source (origin
523 (method url-fetch)
e83c6d00 524 (uri (rubygems-uri "rspec-support" version))
eb0c2dd6
DT
525 (sha256
526 (base32
bee67d18 527 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
eb0c2dd6
DT
528 (build-system ruby-build-system)
529 (arguments
530 '(#:tests? #f)) ; avoid dependency cycles
531 (synopsis "RSpec support library")
532 (description "Support utilities for RSpec gems.")
533 (home-page "https://github.com/rspec/rspec-support")
534 (license license:expat)))
535
536(define-public ruby-rspec-core
537 (package
538 (name "ruby-rspec-core")
bee67d18 539 (version "3.8.0")
eb0c2dd6
DT
540 (source (origin
541 (method url-fetch)
e83c6d00 542 (uri (rubygems-uri "rspec-core" version))
eb0c2dd6
DT
543 (sha256
544 (base32
bee67d18 545 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
eb0c2dd6
DT
546 (build-system ruby-build-system)
547 (arguments
548 '(#:tests? #f)) ; avoid dependency cycles
549 (propagated-inputs
550 `(("ruby-rspec-support" ,ruby-rspec-support)))
551 (synopsis "RSpec core library")
552 (description "Rspec-core provides the RSpec test runner and example
553groups.")
554 (home-page "https://github.com/rspec/rspec-core")
555 (license license:expat)))
e6962009 556
64c318f2
BW
557(define-public ruby-rspec-core-2
558 (package (inherit ruby-rspec-core)
559 (version "2.14.8")
560 (source (origin
561 (method url-fetch)
562 (uri (rubygems-uri "rspec-core" version))
563 (sha256
564 (base32
565 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
566 (propagated-inputs `())))
567
20c05ea9 568(define-public ruby-diff-lcs
e6962009
DT
569 (package
570 (name "ruby-diff-lcs")
e2fcef39 571 (version "1.3")
e6962009
DT
572 (source (origin
573 (method url-fetch)
e83c6d00 574 (uri (rubygems-uri "diff-lcs" version))
e6962009
DT
575 (sha256
576 (base32
e2fcef39 577 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
e6962009
DT
578 (build-system ruby-build-system)
579 (arguments
580 '(#:tests? #f)) ; avoid dependency cycles
581 (synopsis "Compute the difference between two Enumerable sequences")
582 (description "Diff::LCS computes the difference between two Enumerable
583sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
584It includes utilities to create a simple HTML diff output format and a
585standard diff-like tool.")
586 (home-page "https://github.com/halostatue/diff-lcs")
587 (license license:expat)))
588
589(define-public ruby-rspec-expectations
590 (package
591 (name "ruby-rspec-expectations")
bee67d18 592 (version "3.8.2")
e6962009
DT
593 (source (origin
594 (method url-fetch)
e83c6d00 595 (uri (rubygems-uri "rspec-expectations" version))
e6962009
DT
596 (sha256
597 (base32
bee67d18 598 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
e6962009
DT
599 (build-system ruby-build-system)
600 (arguments
601 '(#:tests? #f)) ; avoid dependency cycles
602 (propagated-inputs
603 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 604 ("ruby-diff-lcs" ,ruby-diff-lcs)))
e881752c 605 (synopsis "RSpec expectations library")
e6962009
DT
606 (description "Rspec-expectations provides a simple API to express expected
607outcomes of a code example.")
608 (home-page "https://github.com/rspec/rspec-expectations")
609 (license license:expat)))
4f2a0cac 610
fb157f25
BW
611(define-public ruby-rspec-expectations-2
612 (package (inherit ruby-rspec-expectations)
613 (version "2.14.5")
614 (source (origin
615 (method url-fetch)
616 (uri (rubygems-uri "rspec-expectations" version))
617 (sha256
618 (base32
619 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
620 (propagated-inputs
621 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
622
999ffb26
DM
623(define-public ruby-rspec-its
624 (package
625 (name "ruby-rspec-its")
b2244c68 626 (version "1.3.0")
999ffb26
DM
627 (source
628 (origin
3306f02a
CB
629 (method git-fetch)
630 (uri (git-reference
631 (url "https://github.com/rspec/rspec-its.git")
632 (commit (string-append "v" version))))
633 (file-name (git-file-name name version))
999ffb26
DM
634 (sha256
635 (base32
b2244c68 636 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
999ffb26
DM
637 (build-system ruby-build-system)
638 (arguments
3306f02a
CB
639 `(#:test-target "spec"
640 #:phases
641 (modify-phases %standard-phases
642 (add-after 'unpack 'dont-install-gems-from-gemfile
643 (lambda _
644 (substitute* "Gemfile"
645 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
646 ""))
647 #t))
b2244c68
BH
648 (add-before 'build 'update-ffi-in-gemfile
649 (lambda _
650 (substitute* "Gemfile"
651 ((" gem 'ffi', '~> 1.9.25'") " gem 'ffi', '~> 1.10.0'"))
652 #t))
3306f02a
CB
653 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
654 (lambda _
655 (substitute* "rspec-its.gemspec"
656 (("rake.*") "rake'\n")
b2244c68
BH
657 (("spec.add_development_dependency 'cucumber'.*")
658 "spec.add_development_dependency 'cucumber'\n")
3306f02a 659 (("bundler.*") "bundler'\n")
b2244c68 660 (("\"aruba.*") "'aruba'\n"))
3306f02a 661 #t)))))
999ffb26
DM
662 (propagated-inputs
663 `(("ruby-rspec-core" ,ruby-rspec-core)
664 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
3306f02a
CB
665 (native-inputs
666 `(("bundler" ,bundler)
667 ("ruby-cucumber" ,ruby-cucumber)
b2244c68 668 ("ruby-ffi" ,ruby-ffi)
3306f02a
CB
669 ("ruby-aruba" ,ruby-aruba)))
670 (synopsis "RSpec extension that provides the @code{its} method")
671 (description
672 "RSpec::Its provides the its method as a short-hand to specify the expected
673value of an attribute. For example, one can use @code{its(:size)\\{should
674eq(1)\\}}.")
999ffb26
DM
675 (home-page "https://github.com/rspec/rspec-its")
676 (license license:expat)))
677
4f2a0cac
DT
678(define-public ruby-rspec-mocks
679 (package
680 (name "ruby-rspec-mocks")
bee67d18 681 (version "3.8.0")
4f2a0cac
DT
682 (source (origin
683 (method url-fetch)
e83c6d00 684 (uri (rubygems-uri "rspec-mocks" version))
4f2a0cac
DT
685 (sha256
686 (base32
bee67d18 687 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
4f2a0cac
DT
688 (build-system ruby-build-system)
689 (arguments
690 '(#:tests? #f)) ; avoid dependency cycles
691 (propagated-inputs
692 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 693 ("ruby-diff-lcs" ,ruby-diff-lcs)))
4f2a0cac
DT
694 (synopsis "RSpec stubbing and mocking library")
695 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
696support for stubbing and mocking.")
697 (home-page "https://github.com/rspec/rspec-mocks")
698 (license license:expat)))
d4fde1f2 699
6da9adeb
BW
700(define-public ruby-rspec-mocks-2
701 (package (inherit ruby-rspec-mocks)
702 (version "2.14.6")
703 (source (origin
704 (method url-fetch)
705 (uri (rubygems-uri "rspec-mocks" version))
706 (sha256
707 (base32
708 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
709 (propagated-inputs
710 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
711
198bc648
CB
712(define-public ruby-rspec-rerun
713 (package
714 (name "ruby-rspec-rerun")
715 (version "1.1.0")
716 (source
717 (origin
718 (method url-fetch)
719 (uri (rubygems-uri "rspec-rerun" version))
720 (sha256
721 (base32
722 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
723 (build-system ruby-build-system)
724 (arguments
725 '(;; No included tests
726 #:tests? #f))
727 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
728 (synopsis "Track failed RSpec tests to re-run them")
729 (description
730 "This package provides an automated way to track, and then re-run failed
731RSpec tests.")
732 (home-page "https://github.com/dblock/rspec-rerun")
733 (license license:expat)))
734
9c4cb1ef
CD
735(define-public ruby-rspec-wait
736 (package
737 (name "ruby-rspec-wait")
738 (version "0.0.9")
739 (source
740 (origin
741 (method url-fetch)
742 (uri (rubygems-uri "rspec-wait" version))
743 (sha256
744 (base32
745 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
746 (build-system ruby-build-system)
747 (arguments
748 '(#:phases
749 (modify-phases %standard-phases
750 (replace 'check
751 (lambda _
752 (invoke "rake" "spec"))))))
753 (native-inputs
754 `(("bundler" ,bundler)))
755 (propagated-inputs
756 `(("ruby-rspec" ,ruby-rspec)))
757 (home-page "https://github.com/laserlemon/rspec-wait")
758 (synopsis "Wait for conditions in RSpec")
759 (description
760 "RSpec::Wait strives to make it easier to test asynchronous or slow
761interactions.")
762 (license license:expat)))
763
d4fde1f2
DT
764(define-public ruby-rspec
765 (package
766 (name "ruby-rspec")
bee67d18 767 (version "3.8.0")
d4fde1f2
DT
768 (source (origin
769 (method url-fetch)
e83c6d00 770 (uri (rubygems-uri "rspec" version))
d4fde1f2
DT
771 (sha256
772 (base32
bee67d18 773 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
d4fde1f2
DT
774 (build-system ruby-build-system)
775 (arguments
776 '(#:tests? #f)) ; avoid dependency cycles
777 (propagated-inputs
778 `(("ruby-rspec-core" ,ruby-rspec-core)
779 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
780 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
781 (synopsis "Behavior-driven development framework for Ruby")
782 (description "RSpec is a behavior-driven development (BDD) framework for
783Ruby. This meta-package includes the RSpec test runner, along with the
784expectations and mocks frameworks.")
35739712 785 (home-page "https://rspec.info/")
d4fde1f2 786 (license license:expat)))
2cbc105b 787
5ac984b3
BW
788(define-public ruby-rspec-2
789 (package (inherit ruby-rspec)
790 (version "2.14.1")
791 (source (origin
792 (method url-fetch)
793 (uri (rubygems-uri "rspec" version))
794 (sha256
795 (base32
796 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
797 (propagated-inputs
798 `(("ruby-rspec-core" ,ruby-rspec-core-2)
799 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
800 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
801
2cbc105b
DT
802;; Bundler is yet another source of circular dependencies, so we must disable
803;; its test suite as well.
804(define-public bundler
805 (package
806 (name "bundler")
4fdd4d33 807 (version "1.17.3")
2cbc105b
DT
808 (source (origin
809 (method url-fetch)
e83c6d00 810 (uri (rubygems-uri "bundler" version))
2cbc105b
DT
811 (sha256
812 (base32
4fdd4d33 813 "0ln3gnk7cls81gwsbxvrmlidsfd78s6b2hzlm4d4a9wbaidzfjxw"))))
2cbc105b
DT
814 (build-system ruby-build-system)
815 (arguments
816 '(#:tests? #f)) ; avoid dependency cycles
817 (synopsis "Ruby gem bundler")
818 (description "Bundler automatically downloads and installs a list of gems
819specified in a \"Gemfile\", as well as their dependencies.")
2f3800e5 820 (home-page "https://bundler.io/")
2cbc105b 821 (license license:expat)))
98b87b82 822
cf36174f
RW
823(define-public ruby-builder
824 (package
825 (name "ruby-builder")
42b48db2 826 (version "3.2.3")
cf36174f
RW
827 (source (origin
828 (method url-fetch)
829 (uri (rubygems-uri "builder" version))
830 (sha256
831 (base32
42b48db2 832 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
cf36174f
RW
833 (build-system ruby-build-system)
834 (arguments
835 `(#:phases
836 (modify-phases %standard-phases
837 (add-after 'unpack 'do-not-use-rvm
838 (lambda _
839 (substitute* "rakelib/tags.rake"
840 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
841 #t)))))
842 (synopsis "Ruby library to create structured data")
843 (description "Builder provides a number of builder objects that make it
844easy to create structured data. Currently the following builder objects are
845supported: XML Markup and XML Events.")
846 (home-page "https://github.com/jimweirich/builder")
847 (license license:expat)))
848
566f71f8
CB
849(define-public ruby-bump
850 (package
851 (name "ruby-bump")
852 (version "0.7.0")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (rubygems-uri "bump" version))
857 (sha256
858 (base32
859 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
860 (build-system ruby-build-system)
861 (arguments
862 '(;; No included tests
863 #:tests? #f))
864 (synopsis "Tool for working with Rubygems")
865 (description
866 "Bump provides commands to manage Rubygem versioning, updating to the
867next patch version for example.")
868 (home-page "https://github.com/gregorym/bump")
869 (license license:expat)))
870
ad79eb55
RW
871(define-public ruby-rjb
872 (package
873 (name "ruby-rjb")
aeb4e61e 874 (version "1.5.5")
ad79eb55
RW
875 (source (origin
876 (method url-fetch)
877 (uri (rubygems-uri "rjb" version))
878 (sha256
879 (base32
aeb4e61e 880 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
ad79eb55
RW
881 (build-system ruby-build-system)
882 (arguments
883 `(#:tests? #f ; no rakefile
884 #:phases
885 (modify-phases %standard-phases
886 (add-before 'build 'set-java-home
887 (lambda* (#:key inputs #:allow-other-keys)
888 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
889 #t)))))
890 (native-inputs
d2540f80 891 `(("jdk" ,icedtea "jdk")))
ad79eb55
RW
892 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
893 (description "RJB is a bridge program that connects Ruby and Java via the
894Java Native Interface.")
2f3800e5 895 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
ad79eb55
RW
896 (license license:lgpl2.1+)))
897
f9ae2c06
PP
898(define-public ruby-log4r
899 (package
900 (name "ruby-log4r")
901 (version "1.1.10")
902 (source
903 (origin
904 (method url-fetch)
905 (uri (rubygems-uri "log4r" version))
906 (sha256
907 (base32
908 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
909 (build-system ruby-build-system)
910 (arguments
911 '(#:tests? #f)) ; no Rakefile in gem
912 (synopsis "Flexible logging library for Ruby")
913 (description "Comprehensive and flexible logging library written
914in Ruby for use in Ruby programs. It features a hierarchical logging
915system of any number of levels, custom level names, logger
916inheritance, multiple output destinations per log event, execution
917tracing, custom formatting, thread safteyness, XML and YAML
918configuration, and more.")
919 (home-page "http://log4r.rubyforge.org/")
920 (license license:bsd-3)))
921
71a03c29
RW
922(define-public ruby-atoulme-antwrap
923 (package
924 (name "ruby-atoulme-antwrap")
925 (version "0.7.5")
926 (source (origin
927 (method url-fetch)
928 (uri (rubygems-uri "atoulme-Antwrap" version))
929 (sha256
930 (base32
931 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
932 (build-system ruby-build-system)
933 ;; Test data required for most of the tests are not included.
934 (arguments `(#:tests? #f))
935 (native-inputs
936 `(("ruby-hoe" ,ruby-hoe)))
937 (inputs
938 `(("ruby-rjb" ,ruby-rjb)))
939 (synopsis "Ruby wrapper for the Ant build tool")
940 (description "Antwrap is a Ruby module that wraps the Apache Ant build
941tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
942script.")
943 (home-page "http://rubyforge.org/projects/antwrap/")
944 (license license:expat)))
945
fe1ddad5
RW
946(define-public ruby-atoulme-saikuro
947 (package
948 (name "ruby-atoulme-saikuro")
949 (version "1.2.1")
950 (source (origin
951 (method url-fetch)
952 (uri (rubygems-uri "atoulme-Saikuro" version))
953 (sha256
954 (base32
955 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
956 (build-system ruby-build-system)
957 ;; FIXME: There are no unit tests. The tests are demonstrations of the
958 ;; "saikuro" tool.
959 (arguments `(#:tests? #f))
960 (synopsis "Cyclomatic complexity analyzer")
961 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
962given Ruby source code Saikuro will generate a report listing the cyclomatic
963complexity of each method found. In addition, Saikuro counts the number of
964lines per method and can generate a listing of the number of tokens on each
965line of code.")
966 (home-page "http://www.github.com/atoulme/Saikuro")
967 ;; File headers contain the BSD-3 license and the README.rdoc says that
968 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
969 ;; of the Expat license.
970 (license license:bsd-3)))
971
34138e42
BW
972(define-public ruby-asciidoctor
973 (package
974 (name "ruby-asciidoctor")
9933a8e7 975 (version "1.5.7.1")
34138e42
BW
976 (source
977 (origin
978 (method url-fetch)
979 (uri (rubygems-uri "asciidoctor" version))
980 (sha256
981 (base32
9933a8e7 982 "0v52bzc72cvg7zfgq27pa4mgyf29dx9m20fghrw1xmvwgd519n1w"))))
34138e42
BW
983 (build-system ruby-build-system)
984 (arguments
985 `(#:test-target "test:all"
986 #:phases
987 (modify-phases %standard-phases
988 (add-before 'check 'remove-circular-tests
989 (lambda _
990 ;; Remove tests that require circular dependencies to load or pass.
991 (delete-file "test/invoker_test.rb")
992 (delete-file "test/converter_test.rb")
993 (delete-file "test/options_test.rb")
994 #t)))))
995 (native-inputs
996 `(("ruby-minitest" ,ruby-minitest)
997 ("ruby-nokogiri" ,ruby-nokogiri)
998 ("ruby-asciimath" ,ruby-asciimath)
999 ("ruby-coderay" ,ruby-coderay)))
1000 (synopsis "Converter from AsciiDoc content to other formats")
1001 (description
1002 "Asciidoctor is a text processor and publishing toolchain for converting
20860819 1003AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other formats.")
bba082a1 1004 (home-page "https://asciidoctor.org")
34138e42
BW
1005 (license license:expat)))
1006
d5840f77
CB
1007(define-public ruby-ast
1008 (package
1009 (name "ruby-ast")
1010 (version "2.4.0")
1011 (source
1012 (origin
1013 (method url-fetch)
1014 (uri (rubygems-uri "ast" version))
1015 (sha256
1016 (base32
1017 "184ssy3w93nkajlz2c70ifm79jp3j737294kbc5fjw69v1w0n9x7"))))
1018 (build-system ruby-build-system)
1019 (arguments
1020 '(#:phases
1021 (modify-phases %standard-phases
1022 (add-after 'unpack 'remove-coveralls-requirement
1023 (lambda _
1024 (substitute* "test/helper.rb"
1025 (("require 'coveralls'") "")
1026 (("Coveralls::SimpleCov::Formatter") ""))
1027 #t))
1028 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1029 (lambda _
1030 (substitute* "ast.gemspec"
1031 ((".*coveralls.*") "\n")
1032 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1033 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1034 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1035 #t)))))
1036 (native-inputs
1037 `(("bundler" ,bundler)
1038 ("ruby-simplecov" ,ruby-simplecov)
1039 ("ruby-json-pure" ,ruby-json-pure)
1040 ("ruby-mime-times" ,ruby-mime-types)
1041 ("ruby-yard" ,ruby-yard)
1042 ("ruby-kramdown" ,ruby-kramdown)
1043 ("ruby-rest-client" ,ruby-rest-client)
1044 ("ruby-bacon" ,ruby-bacon)
1045 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1046 ("ruby-racc" ,ruby-racc)))
1047 (synopsis "Library for working with Abstract Syntax Trees")
1048 (description
1049 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1050It does this through immutable data structures.")
1051 (home-page "https://whitequark.github.io/ast/")
1052 (license license:expat)))
1053
b88502c9
BW
1054(define-public ruby-sporkmonger-rack-mount
1055 ;; Testing the addressable gem requires a newer commit than that released, so
1056 ;; use an up to date version.
1057 (let ((revision "1")
1058 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1059 (package
1060 (name "ruby-sporkmonger-rack-mount")
1061 (version (git-version "0.8.3" revision commit))
1062 (source (origin
1063 (method git-fetch)
1064 (uri (git-reference
1065 (url "https://github.com/sporkmonger/rack-mount.git")
1066 (commit commit)))
1067 (file-name (git-file-name name version))
1068 (sha256
1069 (base32
1070 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1071 (build-system ruby-build-system)
1072 (arguments
1073 ;; Tests currently fail so disable them.
1074 ;; https://github.com/sporkmonger/rack-mount/pull/1
1075 `(#:tests? #f))
1076 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1077 (synopsis "Stackable dynamic tree based Rack router")
1078 (description
1079 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1080continue trying routes if the response returns pass. This allows multiple
1081routes to be nested or stacked on top of each other.")
1082 (home-page "https://github.com/sporkmonger/rack-mount")
1083 (license license:expat))))
1084
2f9e0b68
RW
1085(define-public ruby-ci-reporter
1086 (package
1087 (name "ruby-ci-reporter")
1088 (version "2.0.0")
1089 (source (origin
1090 (method url-fetch)
1091 (uri (rubygems-uri "ci_reporter" version))
1092 (sha256
1093 (base32
1094 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1095 (build-system ruby-build-system)
1096 (arguments
1097 `(#:test-target "rspec"))
1098 (propagated-inputs
1099 `(("ruby-builder" ,ruby-builder)))
1100 (native-inputs
1101 `(("bundler" ,bundler)
1102 ("ruby-rspec" ,ruby-rspec)))
1103 (synopsis "Generate XML reports of runs test")
1104 (description
1105 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1106you to generate XML reports of your test runs. The resulting files can be
1107read by a continuous integration system that understands Ant's JUnit report
1108format.")
1109 (home-page "https://github.com/nicksieger/ci_reporter")
1110 (license license:expat)))
1111
2ed201c1
CB
1112(define-public ruby-contracts
1113 (package
1114 (name "ruby-contracts")
1115 (version "0.16.0")
1116 (source
1117 (origin
1118 (method url-fetch)
1119 (uri (rubygems-uri "contracts" version))
1120 (sha256
1121 (base32
1122 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1123 (build-system ruby-build-system)
1124 (arguments
1125 '(#:test-target "spec"
1126 #:phases
1127 (modify-phases %standard-phases
1128 ;; Don't run or require rubocop, the code linting tool, as this is a
1129 ;; bit unnecessary.
1130 (add-after 'unpack 'dont-run-rubocop
1131 (lambda _
1132 (substitute* "Rakefile"
1133 ((".*rubocop.*") "")
1134 ((".*RuboCop.*") ""))
1135 #t)))))
1136 (native-inputs
1137 `(("ruby-rspec" ,ruby-rspec)))
1138 (synopsis "Method contracts for Ruby")
1139 (description
1140 "This library provides contracts for Ruby. A contract describes the
1141correct inputs and output for a method, and will raise an error if a incorrect
1142value is found.")
1143 (home-page "https://github.com/egonSchiele/contracts.ruby")
1144 (license license:bsd-2)))
1145
6f8bf0eb
CB
1146(define-public ruby-crack
1147 (package
1148 (name "ruby-crack")
1149 (version "0.4.3")
1150 (source
1151 (origin
1152 (method url-fetch)
1153 (uri (rubygems-uri "crack" version))
1154 (sha256
1155 (base32
1156 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1157 (build-system ruby-build-system)
1158 (arguments
1159 `(#:phases
1160 (modify-phases %standard-phases
1161 (replace 'check
1162 (lambda* (#:key tests? #:allow-other-keys)
1163 (when tests?
1164 (for-each (lambda (file)
1165 (display file)(display "\n")
1166 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1167 (find-files "test" ".*rb$")))
1168 #t)))))
1169 (propagated-inputs
1170 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1171 (synopsis "Simple JSON and XML parsing for Ruby")
1172 (description
1173 "@code{crack} provides really simple JSON and XML parsing, extracted from
1174code in Merb and Rails.")
1175 (home-page "https://github.com/jnunemaker/crack")
1176 (license license:expat)))
1177
bef3506e
CB
1178(define-public ruby-cliver
1179 (package
1180 (name "ruby-cliver")
1181 (version "0.3.2")
1182 (source
1183 (origin
1184 (method url-fetch)
1185 (uri (rubygems-uri "cliver" version))
1186 (sha256
1187 (base32
1188 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1189 (build-system ruby-build-system)
1190 (arguments
1191 '(#:phases
1192 (modify-phases %standard-phases
1193 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1194 ;; would be nice, but the tests look to be incompatible:
1195 ;;
1196 ;; NoMethodError: undefined method `last_comment'
1197 (replace 'check
1198 (lambda* (#:key tests? #:allow-other-keys)
1199 (when tests?
1200 (invoke "rspec"))
1201 #t)))))
1202 (native-inputs
1203 `(("bundler" ,bundler)
1204 ("ruby-rspec" ,ruby-rspec-2)))
1205 (synopsis "Assertions for command-line dependencies in Ruby")
1206 (description
1207 "@code{cliver} provides a way to detect missing command-line
1208dependencies, including versions.")
1209 (home-page "https://github.com/yaauie/cliver")
1210 (license license:expat)))
1211
fe5dd5f4
CB
1212(define-public ruby-czmq-ffi-gen
1213 (package
1214 (name "ruby-czmq-ffi-gen")
1215 (version "0.13.0")
1216 (source
1217 (origin
1218 (method url-fetch)
1219 (uri (rubygems-uri "czmq-ffi-gen" version))
1220 (sha256
1221 (base32
1222 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
1223 (build-system ruby-build-system)
1224 (arguments
1225 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
1226 #:phases
1227 (modify-phases %standard-phases
1228 (add-after 'unpack 'patch-lib_dirs
1229 (lambda* (#:key inputs #:allow-other-keys)
1230 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
1231 (("lib\\_dirs = \\[.*\\]")
1232 (string-append "lib_dirs = ['"
1233 (assoc-ref inputs "czmq") "/lib"
1234 "']")))
1235 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
1236 (("lib\\_dirs = \\[.*\\]")
1237 (string-append "lib_dirs = ['"
1238 (assoc-ref inputs "zeromq") "/lib"
1239 "']"))))))))
1240 (inputs
1241 `(("zeromq" ,zeromq)
1242 ("czmq" ,czmq)))
1243 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
1244 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
1245 (description
1246 "These Ruby bindings are not intended to be directly used, but rather
1247used by higher level bindings like those provided by CZTop.")
1248 (home-page
1249 "https://github.com/paddor/czmq-ffi-gen")
1250 (license license:isc)))
1251
d0afff26
CB
1252(define-public ruby-cztop
1253 (package
1254 (name "ruby-cztop")
1255 (version "0.12.2")
1256 (source
1257 (origin
1258 (method url-fetch)
1259 (uri (rubygems-uri "cztop" version))
1260 (sha256
1261 (base32
1262 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
1263 (build-system ruby-build-system)
1264 (arguments
1265 '(#:test-target "spec"
1266 #:phases
1267 (modify-phases %standard-phases
1268 (add-after 'unpack 'patch-lib_paths
1269 (lambda* (#:key inputs #:allow-other-keys)
1270 (substitute* "lib/cztop/poller/zmq.rb"
1271 (("lib\\_paths = \\[.*\\]")
1272 (string-append "lib_paths = ['"
1273 (assoc-ref inputs "zeromq") "/lib"
1274 "']"))))))))
1275 (native-inputs
1276 `(("bundler" ,bundler)
1277 ("ruby-rspec" ,ruby-rspec)))
1278 (inputs
1279 `(("zeromq" ,zeromq)))
1280 (propagated-inputs
1281 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
1282 (synopsis "CZMQ Ruby bindings")
1283 (description
1284 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
1285CZMQ. The focus of of CZTop is on being easy to use and providing first class
1286support for security mechanisms.")
1287 (home-page "https://github.com/paddor/cztop")
1288 (license license:isc)))
1289
b004fb6a
RW
1290(define-public ruby-saikuro-treemap
1291 (package
1292 (name "ruby-saikuro-treemap")
1293 (version "0.2.0")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (rubygems-uri "saikuro_treemap" version))
1297 (sha256
1298 (base32
1299 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
1300 (build-system ruby-build-system)
1301 ;; Some of the tests fail because the generated JSON has keys in a
1302 ;; different order. This is a problem with the test suite rather than any
1303 ;; of the involved libraries.
1304 (arguments `(#:tests? #f))
1305 (propagated-inputs
1306 `(("ruby-json-pure" ,ruby-json-pure)
1307 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
1308 (synopsis "Generate complexity treemap based on saikuro analysis")
1309 (description
1310 "This gem generates a treemap showing the complexity of Ruby code on
1311which it is run. It uses Saikuro under the covers to analyze Ruby code
1312complexity.")
7bf837fd 1313 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
b004fb6a
RW
1314 (license license:expat)))
1315
92b37500
CB
1316(define-public ruby-oauth2
1317 (package
1318 (name "ruby-oauth2")
5dd10be5 1319 (version "1.4.2")
92b37500
CB
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (rubygems-uri "oauth2" version))
1324 (sha256
5dd10be5 1325 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
92b37500
CB
1326 (build-system ruby-build-system)
1327 (arguments
5dd10be5 1328 '(#:tests? #f)) ; no included tests
92b37500
CB
1329 (propagated-inputs
1330 `(("ruby-faraday" ,ruby-faraday)
1331 ("ruby-jwt" ,ruby-jwt)
1332 ("ruby-multi-json" ,ruby-multi-json)
1333 ("ruby-multi-xml" ,ruby-multi-xml)
1334 ("ruby-rack" ,ruby-rack)))
1335 (synopsis "Ruby wrapper for the OAuth 2.0")
1336 (description
1337 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
1338with a similar style to the original OAuth spec.")
1339 (home-page "https://github.com/oauth-xx/oauth2")
1340 (license license:expat)))
1341
29dc4823
CB
1342(define-public ruby-omniauth
1343 (package
1344 (name "ruby-omniauth")
a7b7817d 1345 (version "1.9.1")
29dc4823
CB
1346 (source
1347 (origin
1348 (method url-fetch)
1349 (uri (rubygems-uri "omniauth" version))
1350 (sha256
a7b7817d 1351 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
29dc4823
CB
1352 (build-system ruby-build-system)
1353 (arguments
1354 '(#:tests? #f)) ; No included tests
1355 (propagated-inputs
1356 `(("ruby-hashie" ,ruby-hashie)
1357 ("ruby-rack" ,ruby-rack)))
1358 (synopsis "Generalized Rack framework for multiple-provider authentication")
1359 (description
1360 "This package provides a generalized Rack framework for multiple-provider
1361authentication.")
1362 (home-page "https://github.com/omniauth/omniauth")
1363 (license license:expat)))
1364
d6084cdb
CB
1365(define-public ruby-omniauth-oauth2
1366 (package
1367 (name "ruby-omniauth-oauth2")
1368 (version "1.6.0")
1369 (source
1370 (origin
1371 (method url-fetch)
1372 (uri (rubygems-uri "omniauth-oauth2" version))
1373 (sha256
1374 (base32
1375 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
1376 (build-system ruby-build-system)
1377 (arguments
1378 '(#:phases
1379 (modify-phases %standard-phases
1380 (add-after 'unpack 'remove-unnecessary-dependencies
1381 (lambda _
1382 ;; The coveralls gem submits coverage information to an online
1383 ;; service, and is unnecessary when running the tests
1384 (substitute* "Gemfile"
1385 ((".*coveralls\"") ""))
1386 (substitute* "spec/helper.rb"
1387 (("require \"coveralls\"") "")
1388 (("Coveralls::SimpleCov::Formatter") ""))
1389 #t)))))
1390 (propagated-inputs
1391 `(("ruby-oauth2" ,ruby-oauth2)
1392 ("ruby-omniauth" ,ruby-omniauth)))
1393 (native-inputs
1394 `(("bundler" ,bundler)
1395 ("ruby-rspec" ,ruby-rspec)
1396 ("ruby-simplecov" ,ruby-simplecov)
1397 ("ruby-rack-test" ,ruby-rack-test)
1398 ("ruby-webmock" ,ruby-webmock-2)))
1399 (synopsis "Abstract OAuth2 strategy for OmniAuth")
1400 (description
1401 "This library provides a generic OAuth2 strategy for OmniAuth. It
1402doesn't provide a way to gather user information, so should be used as a
1403building block for authentication strategies.")
1404 (home-page "https://github.com/omniauth/omniauth-oauth2")
1405 (license license:expat)))
1406
433e3154
CB
1407(define-public ruby-open4
1408 (package
1409 (name "ruby-open4")
1410 (version "1.3.4")
1411 (source
1412 (origin
1413 (method url-fetch)
1414 (uri (rubygems-uri "open4" version))
1415 (sha256
1416 (base32
1417 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
1418 (build-system ruby-build-system)
1419 (arguments
1420 '(#:phases
1421 (modify-phases %standard-phases
1422 (add-after 'unpack 'patch
1423 (lambda _
1424 (substitute* "rakefile"
1425 ;; Update the Rakefile so it works
1426 (("-rubygems") "-rrubygems")
1427 (("Config") "RbConfig"))
1428 #t))
1429 (add-before 'check 'set-LIB
1430 (lambda _
1431 ;; This is used in the rakefile when running the tests
1432 (setenv "LIB" "open4")
1433 #t)))))
1434 (synopsis "Open child processes from Ruby and manage them easily")
1435 (description
1436 "@code{Open4} is a Ruby library to run child processes and manage their
1437input and output.")
1438 (home-page "https://github.com/ahoward/open4")
1439 (license license:ruby)))
1440
cef87ed6
CB
1441(define-public ruby-options
1442 (package
1443 (name "ruby-options")
1444 (version "2.3.2")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (rubygems-uri "options" version))
1449 (sha256
1450 (base32
1451 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
1452 (build-system ruby-build-system)
1453 (arguments
1454 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
1455 #:phases
1456 (modify-phases %standard-phases
1457 (add-before 'check 'set-LIB
1458 (lambda _
1459 ;; This is used in the Rakefile, and setting it avoids an issue
1460 ;; with running the tests.
fe27238c
CB
1461 (setenv "LIB" "options")
1462 #t)))))
cef87ed6
CB
1463 (synopsis "Ruby library to parse options from *args cleanly")
1464 (description
1465 "The @code{options} library helps with parsing keyword options in Ruby
1466functions.")
1467 (home-page "https://github.com/ahoward/options")
1468 (license license:ruby)))
1469
d15dbe83
CB
1470(define-public ruby-erubi
1471 (package
1472 (name "ruby-erubi")
1473 (version "1.8.0")
1474 (source
1475 (origin
1476 (method url-fetch)
1477 (uri (rubygems-uri "erubi" version))
1478 (sha256
1479 (base32
1480 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
1481 (build-system ruby-build-system)
1482 (synopsis "ERB template engine for Ruby")
1483 (description
1484 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
1485Erubis")
1486 (home-page "https://github.com/jeremyevans/erubi")
1487 (license license:expat)))
1488
d64ebebd
BW
1489(define-public ruby-erubis
1490 (package
1491 (name "ruby-erubis")
1492 (version "2.7.0")
1493 (source
1494 (origin
1495 (method url-fetch)
1496 (uri (rubygems-uri "erubis" version))
1497 (sha256
1498 (base32
1499 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
1500 (build-system ruby-build-system)
1501 (arguments
1502 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
1503 (synopsis "Implementation of embedded Ruby (eRuby)")
1504 (description
1505 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
1506features such as multi-language support, auto escaping, auto trimming spaces
1507around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
1508support.")
1509 (home-page "http://www.kuwata-lab.com/erubis/")
1510 (license license:expat)))
1511
3ca43524
CB
1512(define-public ruby-execjs
1513 (package
1514 (name "ruby-execjs")
1515 (version "2.7.0")
1516 (source
1517 (origin
1518 ;; fetch from github as the gem does not contain testing code
1519 (method git-fetch)
1520 (uri (git-reference
1521 (url "https://github.com/rails/execjs.git")
1522 (commit (string-append "v" version))))
1523 (file-name (git-file-name name version))
1524 (sha256
1525 (base32
1526 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
1527 (build-system ruby-build-system)
1528 (native-inputs
1529 `(("bundler" ,bundler)
1530 ;; The test suite tests all the available backends. Currenly, this just
1531 ;; means the node backend.
1532 ;;
1533 ;; PASSED: test:node
1534 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
1535 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
1536 ("node" ,node)))
1537 (synopsis "Run JavaScript code from Ruby")
1538 (description
1539 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
1540runtime to evaluate your JavaScript program, then returns the result to you as
1541a Ruby object.")
1542 (home-page "https://github.com/rails/execjs")
1543 (license license:expat)))
1544
cc53e630
RW
1545(define-public ruby-orderedhash
1546 (package
1547 (name "ruby-orderedhash")
1548 (version "0.0.6")
1549 (source (origin
1550 (method url-fetch)
1551 (uri (rubygems-uri "orderedhash" version))
1552 (sha256
1553 (base32
1554 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
1555 (build-system ruby-build-system)
1556 (arguments
1557 '(#:tests? #f)) ; no test suite
1558 (synopsis "Ruby library providing an order-preserving hash")
1559 (description "Orderedhash is a Ruby library providing a hash
1560implementation that preserves the order of items and features some array-like
1561extensions.")
1562 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
1563 (license license:public-domain)))
1564
28c5d42d
PP
1565(define-public ruby-libxml
1566 (package
1567 (name "ruby-libxml")
acbc5062 1568 (version "3.0.0")
28c5d42d
PP
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (rubygems-uri "libxml-ruby" version))
1573 (sha256
1574 (base32
acbc5062 1575 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
28c5d42d
PP
1576 (build-system ruby-build-system)
1577 (inputs
1578 `(("zlib" ,zlib)
1579 ("libxml2" ,libxml2)))
1580 (arguments
1581 '(#:tests? #f ; test suite hangs for unknown reason
1582 #:gem-flags
1583 (list "--"
1584 (string-append "--with-xml2-include="
1585 (assoc-ref %build-inputs "libxml2")
1586 "/include/libxml2" ))))
1587 (synopsis "Ruby bindings for GNOME Libxml2")
1588 (description "The Libxml-Ruby project provides Ruby language bindings for
1589the GNOME Libxml2 XML toolkit.")
2f3800e5 1590 (home-page "https://xml4r.github.com/libxml-ruby")
28c5d42d
PP
1591 (license license:expat)))
1592
b3222518
CB
1593(define-public ruby-lino
1594 (package
1595 (name "ruby-lino")
1596 (version "1.1.0")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (rubygems-uri "lino" version))
1601 (sha256
1602 (base32
1603 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
1604 (build-system ruby-build-system)
1605 (arguments
1606 '(#:tests? #f)) ; No included tests
1607 (propagated-inputs
1608 `(("ruby-hamster" ,ruby-hamster)
1609 ("ruby-open4" ,ruby-open4)))
1610 (synopsis "Build and execute commands in Ruby")
1611 (description
1612 "@code{Lino} provides an interface to run external commands. It provides
1613an interface to add options as well as managing the standard input, output and
1614error streams.")
1615 (home-page "https://github.com/tobyclemson/lino")
1616 (license license:expat)))
1617
8b9bde07
RW
1618(define-public ruby-xml-simple
1619 (package
1620 (name "ruby-xml-simple")
1621 (version "1.1.5")
1622 (source (origin
1623 (method url-fetch)
1624 (uri (rubygems-uri "xml-simple" version))
1625 (sha256
1626 (base32
1627 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
1628 (build-system ruby-build-system)
1629 (arguments
1630 '(#:tests? #f)) ; no test suite
1631 (synopsis "Simple Ruby library for XML processing")
1632 (description "This library provides a simple API for XML processing in
1633Ruby.")
1634 (home-page "https://github.com/maik/xml-simple")
1635 (license license:ruby)))
1636
2cb3ab48
RW
1637(define-public ruby-thor
1638 (package
1639 (name "ruby-thor")
2e8cd862 1640 (version "0.19.4")
2cb3ab48
RW
1641 (source (origin
1642 (method url-fetch)
1643 (uri (rubygems-uri "thor" version))
1644 (sha256
1645 (base32
2e8cd862 1646 "01n5dv9kql60m6a00zc0r66jvaxx98qhdny3klyj0p3w34pad2ns"))))
2cb3ab48
RW
1647 (build-system ruby-build-system)
1648 (arguments
1649 '(#:tests? #f)) ; no test suite
1650 (native-inputs
1651 `(("bundler" ,bundler)))
1652 (synopsis "Ruby toolkit for building command-line interfaces")
1653 (description "Thor is a toolkit for building powerful command-line
1654interfaces.")
1655 (home-page "http://whatisthor.com/")
1656 (license license:expat)))
1657
ec79018e
RW
1658(define-public ruby-lumberjack
1659 (package
1660 (name "ruby-lumberjack")
41700efa 1661 (version "1.0.13")
ec79018e
RW
1662 (source (origin
1663 (method url-fetch)
1664 (uri (rubygems-uri "lumberjack" version))
1665 (sha256
1666 (base32
41700efa 1667 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
ec79018e
RW
1668 (build-system ruby-build-system)
1669 (native-inputs
8be62d3f
BW
1670 `(("ruby-rspec" ,ruby-rspec)
1671 ("ruby-timecop" ,ruby-timecop)))
ec79018e
RW
1672 (synopsis "Logging utility library for Ruby")
1673 (description "Lumberjack is a simple logging utility that can be a drop in
1674replacement for Logger or ActiveSupport::BufferedLogger. It provides support
1675for automatically rolling log files even with multiple processes writing the
1676same log file.")
7bf837fd 1677 (home-page "https://github.com/bdurand/lumberjack")
ec79018e
RW
1678 (license license:expat)))
1679
2a9ce5cb
CB
1680(define-public ruby-rbnacl
1681 (package
1682 (name "ruby-rbnacl")
1683 (version "6.0.1")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (rubygems-uri "rbnacl" version))
1688 (sha256
1689 (base32
1690 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
1691 (build-system ruby-build-system)
1692 (arguments
1693 `(#:phases
1694 (modify-phases %standard-phases
1695 (add-after 'unpack 'remove-unnecessary-dependencies
1696 (lambda _
1697 ;; Coveralls relates to a network service, and Rubocop to code
1698 ;; linting and both are unnecessary to run the tests
1699 (substitute* "Gemfile"
1700 ((".*rubocop.*") "\n")
1701 ((".*guard-rspec.*") "\n")
1702 ((".*coveralls.*") "\n"))
1703 (substitute* "spec/spec_helper.rb"
1704 (("require \"coveralls\"") "")
1705 (("Coveralls.wear!") ""))
1706 #t))
1707 (add-after 'unpack 'use-libsodium-from-store
1708 (lambda* (#:key inputs #:allow-other-keys)
1709 (substitute* '("lib/rbnacl/init.rb"
1710 "lib/rbnacl/sodium.rb")
1711 (("ffi_lib \\[.+\\]")
1712 (string-append "ffi_lib [\""
1713 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
1714 "\"]")))
1715 #t))
1716 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
1717 (replace 'check
1718 (lambda* (#:key tests? #:allow-other-keys)
1719 (when tests?
1720 (invoke "rspec"))
1721 #t)))))
1722 (propagated-inputs
1723 `(("ruby-ffi" ,ruby-ffi)))
1724 (inputs
1725 `(("libsodium" ,libsodium)))
1726 (native-inputs
1727 `(("bundler" ,bundler)
1728 ("ruby-rspec" ,ruby-rspec)))
1729 (synopsis "Ruby FFI binding to libsodium")
1730 (description
1731 "This package provides Ruby FFI bindings to the Networking and
1732Cryptography (NaCl) library, also known as libsodium. This provides a
1733high-level toolkit for building cryptographic systems and protocols.")
1734 (home-page "https://github.com/crypto-rb/rbnacl")
1735 (license license:expat)))
1736
70b4cf38
RW
1737(define-public ruby-nenv
1738 (package
1739 (name "ruby-nenv")
12313cd0 1740 (version "0.3.0")
70b4cf38
RW
1741 (source (origin
1742 (method url-fetch)
1743 (uri (rubygems-uri "nenv" version))
1744 (sha256
1745 (base32
12313cd0 1746 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
70b4cf38
RW
1747 (build-system ruby-build-system)
1748 (arguments
1749 `(#:tests? #f)) ; no tests included
1750 (native-inputs
1751 `(("ruby-rspec" ,ruby-rspec)
1752 ("bundler" ,bundler)))
1753 (synopsis "Ruby interface for modifying the environment")
1754 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
1755and inspect the environment.")
1756 (home-page "https://github.com/e2/nenv")
1757 (license license:expat)))
1758
8d9e9f28
RW
1759(define-public ruby-permutation
1760 (package
1761 (name "ruby-permutation")
1762 (version "0.1.8")
1763 (source (origin
1764 (method url-fetch)
1765 (uri (rubygems-uri "permutation" version))
1766 (sha256
1767 (base32
1768 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
1769 (build-system ruby-build-system)
1770 (arguments
1771 `(#:phases
1772 (modify-phases %standard-phases
1773 (add-after 'unpack 'fix-rakefile
1774 (lambda _
1775 (substitute* "Rakefile"
1776 (("require 'rake/gempackagetask'")
1777 "require 'rubygems/package_task'")
1778 (("include Config") ""))
1779 #t))
1780 (replace 'check
1781 (lambda _
9923d5a4 1782 (invoke "ruby" "-Ilib" "test/test.rb"))))))
8d9e9f28
RW
1783 (synopsis "Library to perform operations with sequence permutations")
1784 (description "This package provides a Ruby library to perform different
1785operations with permutations of sequences, such as strings and arrays.")
2f3800e5 1786 (home-page "https://flori.github.io/permutation")
8d9e9f28
RW
1787 (license license:gpl2))) ; GPL 2 only
1788
c5d14d42
RW
1789(define-public ruby-shellany
1790 (package
1791 (name "ruby-shellany")
1792 (version "0.0.1")
1793 (source (origin
1794 (method url-fetch)
1795 (uri (rubygems-uri "shellany" version))
1796 (sha256
1797 (base32
1798 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
1799 (build-system ruby-build-system)
1800 (arguments
1801 `(#:test-target "default"
1802 #:phases
1803 (modify-phases %standard-phases
1804 (add-after 'unpack 'fix-version-test
1805 (lambda _
1806 (substitute* "spec/shellany_spec.rb"
1807 (("^RSpec") "require \"shellany\"\nRSpec"))
1808 #t)))))
1809 (native-inputs
1810 `(("ruby-rspec" ,ruby-rspec)
1811 ("ruby-nenv" ,ruby-nenv)
1812 ("bundler" ,bundler)))
1813 (synopsis "Capture command output")
1814 (description "Shellany is a Ruby library providing functions to capture
1815the output produced by running shell commands.")
1816 (home-page "https://rubygems.org/gems/shellany")
1817 (license license:expat)))
1818
d152162f
RW
1819(define-public ruby-notiffany
1820 (package
1821 (name "ruby-notiffany")
8c1e4a4f 1822 (version "0.1.3")
d152162f
RW
1823 (source (origin
1824 (method url-fetch)
1825 (uri (rubygems-uri "notiffany" version))
1826 (sha256
1827 (base32
8c1e4a4f 1828 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
d152162f
RW
1829 (build-system ruby-build-system)
1830 ;; Tests are not included in the gem.
1831 (arguments `(#:tests? #f))
1832 (propagated-inputs
1833 `(("ruby-shellany" ,ruby-shellany)
1834 ("ruby-nenv" ,ruby-nenv)))
1835 (native-inputs
1836 `(("bundler" ,bundler)))
01eb17de
VC
1837 (synopsis "Wrapper library for notification libraries")
1838 (description "Notiffany is a Ruby wrapper library for notification
d152162f
RW
1839libraries such as Libnotify.")
1840 (home-page "https://github.com/guard/notiffany")
1841 (license license:expat)))
1842
8528365b
RW
1843(define-public ruby-formatador
1844 (package
1845 (name "ruby-formatador")
1846 (version "0.2.5")
1847 (source (origin
1848 (method url-fetch)
1849 (uri (rubygems-uri "formatador" version))
1850 (sha256
1851 (base32
1852 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
1853 (build-system ruby-build-system)
1854 ;; Circular dependency: Tests require ruby-shindo, which requires
1855 ;; ruby-formatador at runtime.
1856 (arguments `(#:tests? #f))
1857 (synopsis "Ruby library to format text on stdout")
1858 (description "Formatador is a Ruby library to format text printed to the
1859standard output stream.")
7bf837fd 1860 (home-page "https://github.com/geemus/formatador")
8528365b
RW
1861 (license license:expat)))
1862
5437c741
CB
1863(define-public ruby-fuubar
1864 (package
1865 (name "ruby-fuubar")
1866 (version "2.3.2")
1867 (source
1868 (origin
1869 ;; Fetch from the git repository, as the gem package doesn't include
1870 ;; the tests.
1871 (method git-fetch)
1872 (uri (git-reference
1873 (url "https://github.com/thekompanee/fuubar.git")
1874 (commit (string-append "releases/v" version))))
1875 (file-name (git-file-name name version))
1876 (sha256
1877 (base32
1878 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
1879 (build-system ruby-build-system)
1880 (arguments
1881 '(;; TODO: Some tests fail, unsure why.
1882 ;; 21 examples, 7 failures
1883 #:tests? #f
1884 #:phases
1885 (modify-phases %standard-phases
1886 (add-before 'build 'delete-certificate
1887 (lambda _
1888 ;; Remove 's.cert_chain' as we do not build with a private key
1889 (substitute* "fuubar.gemspec"
1890 ((".*cert_chain.*") "")
1891 ((".*signing_key.*") ""))
1892 #t))
1893 (replace 'check
1894 (lambda* (#:key tests? #:allow-other-keys)
1895 (when tests?
1896 (invoke "rspec"))
1897 #t)))))
1898 (native-inputs
1899 `(("bundler" ,bundler)))
1900 (propagated-inputs
1901 `(("ruby-rspec-core" ,ruby-rspec-core)
1902 ("ruby-progressbar" ,ruby-progressbar)))
1903 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
1904 (description
1905 "Fuubar is an RSpec formatter that uses a progress bar instead of a
1906string of letters and dots as feedback. It also stops on the first test
1907failure.")
1908 (home-page "https://github.com/thekompanee/fuubar")
1909 (license license:expat)))
1910
8ea991e3
CB
1911(define-public ruby-haml
1912 (package
1913 (name "ruby-haml")
1914 (version "5.0.4")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (rubygems-uri "haml" version))
1919 (sha256
1920 (base32
1921 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
1922 (build-system ruby-build-system)
1923 (arguments
1924 '(#:tests? #f)) ; No included tests
1925 (propagated-inputs
1926 `(("ruby-tilt" ,ruby-tilt)
1927 ("ruby-temple" ,ruby-temple)))
1928 (synopsis "Haml is a Ruby library to generate HTML documents")
1929 (description
1930 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
1931HTML or XML that is designed to express the structure of documents using
1932indentation rather than closing tags. It was originally envisioned as a
1933plugin for Ruby on Rails, but it can function as a stand-alone templating
1934engine.")
1935 (home-page "http://haml.info/")
1936 (license license:expat)))
1937
353b7eb8
CB
1938(define-public ruby-hamster
1939 (package
1940 (name "ruby-hamster")
1941 (version "3.0.0")
1942 (source
1943 (origin
1944 (method url-fetch)
1945 (uri (rubygems-uri "hamster" version))
1946 (sha256
1947 (base32
1948 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
1949 (build-system ruby-build-system)
1950 (arguments
1951 '(#:phases
1952 (modify-phases %standard-phases
1953 (add-after 'unpack 'remove-unnecessary-dependencies
1954 (lambda _
1955 ;; pry is a debugging tool, and is unnecessary when running the
1956 ;; tests
1957 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
1958 (("require 'pry'") ""))
1959 (substitute* "spec/spec_helper.rb"
1960 (("require \"pry\"") "")
1961 ;; CodeClimate is an online service, and is unnecessary for
1962 ;; running the tests
1963 (("require \"codeclimate-test-reporter\"") "")
1964 (("CodeClimate.*\n") ""))
1965 #t))
1966 ;; No Rakefile is included, so run rspec directly.
1967 (replace 'check
1968 (lambda* (#:key tests? #:allow-other-keys)
1969 (when tests?
1970 (invoke "rspec"))
1971 #t)))))
1972 (propagated-inputs
1973 `(("ruby-concurrent" ,ruby-concurrent)))
1974 (native-inputs
1975 `(("ruby-rspec" ,ruby-rspec)))
1976 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
1977 (description
1978 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
1979@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
1980immutable queue or stack).")
1981 (home-page "https://github.com/hamstergem/hamster")
1982 (license license:expat)))
1983
21781436
CB
1984(define-public ruby-hashdiff
1985 (package
1986 (name "ruby-hashdiff")
1987 (version "0.3.8")
1988 (source
1989 (origin
1990 (method url-fetch)
1991 (uri (rubygems-uri "hashdiff" version))
1992 (sha256
1993 (base32
1994 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
1995 (build-system ruby-build-system)
1996 (arguments
1997 '(#:phases
1998 (modify-phases %standard-phases
1999 ;; Run tests directly via rspec to avoid Rake issue:
2000 ;; NoMethodError: undefined method `last_comment'
2001 (replace 'check
2002 (lambda* (#:key tests? #:allow-other-keys)
2003 (when tests?
2004 (invoke "rspec"))
2005 #t)))))
2006 (native-inputs
2007 `(("bundler" ,bundler)
2008 ("ruby-rspec" ,ruby-rspec-2)))
2009 (synopsis "HashDiff computes the smallest difference between two hashes")
2010 (description
2011 "HashDiff is a Ruby library to compute the smallest difference between
2012two hashes.")
2013 (home-page "https://github.com/liufengyun/hashdiff")
2014 (license license:expat)))
2015
3cc8e029
MB
2016(define-public ruby-hydra
2017 ;; No releases yet.
2018 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2019 (revision "0"))
2020 (package
2021 (name "ruby-hydra")
2022 (version (git-version "0.0" revision commit))
2023 (home-page "https://github.com/hyphenation/hydra")
2024 (source (origin
2025 (method git-fetch)
2026 (uri (git-reference (url home-page) (commit commit)))
2027 (file-name (git-file-name name version))
2028 (sha256
2029 (base32
2030 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
2031 (build-system ruby-build-system)
2032 (arguments
2033 '(#:phases (modify-phases %standard-phases
2034 (add-after 'unpack 'make-files-writable
2035 (lambda _
2036 (for-each make-file-writable (find-files "."))
2037 #t))
2038 (replace 'check
2039 (lambda _
2040 (invoke "rspec"))))))
2041 (native-inputs
2042 `(("ruby-rspec" ,ruby-rspec)))
2043 (propagated-inputs
2044 `(("ruby-byebug" ,ruby-byebug)))
2045 (synopsis "Ruby hyphenation patterns")
2046 (description
2047 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
2048 (license license:expat))))
2049
7ac4610f
RW
2050(define-public ruby-shindo
2051 (package
2052 (name "ruby-shindo")
2053 (version "0.3.8")
2054 (source (origin
2055 (method url-fetch)
2056 (uri (rubygems-uri "shindo" version))
2057 (sha256
2058 (base32
2059 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
2060 (build-system ruby-build-system)
2061 (arguments
2062 `(#:test-target "shindo_tests"
2063 #:phases
2064 (modify-phases %standard-phases
2065 (add-after 'unpack 'fix-tests
0b060e34
CB
2066 (lambda _
2067 (substitute* "tests/tests_helper.rb"
2068 (("-rubygems") ""))
2069 (substitute* "Rakefile"
2070 (("system \"shindo") "system \"./bin/shindo")
2071 ;; This test doesn't work, so we disable it.
2072 (("fail \"The build_error test should fail") "#")
2073 ((" -rubygems") ""))
2074 #t)))))
7ac4610f
RW
2075 (propagated-inputs
2076 `(("ruby-formatador" ,ruby-formatador)))
2077 (synopsis "Simple depth first Ruby testing")
2078 (description "Shindo is a simple depth first testing library for Ruby.")
2079 (home-page "https://github.com/geemus/shindo")
2080 (license license:expat)))
2081
f13636f2
RW
2082(define-public ruby-rubygems-tasks
2083 (package
2084 (name "ruby-rubygems-tasks")
2085 (version "0.2.4")
2086 (source (origin
2087 (method url-fetch)
2088 (uri (rubygems-uri "rubygems-tasks" version))
2089 (sha256
2090 (base32
2091 "16cp45qlbcglnqdm4f1vj3diywdz4v024saqpgrz6palf0wmgz2j"))))
2092 (build-system ruby-build-system)
2093 ;; Tests need Internet access.
2094 (arguments `(#:tests? #f))
2095 (native-inputs
2096 `(("ruby-rspec" ,ruby-rspec)
2097 ("ruby-yard" ,ruby-yard)))
2098 (synopsis "Rake tasks for managing and releasing Ruby Gems")
2099 (description "Rubygems-task provides Rake tasks for managing and releasing
2100Ruby Gems.")
2101 (home-page "https://github.com/postmodern/rubygems-tasks")
2102 (license license:expat)))
2103
cb6bc5df
CB
2104(define-public ruby-rubyzip
2105 (package
2106 (name "ruby-rubyzip")
2107 (version "1.2.1")
2108 (source
2109 (origin
2110 (method url-fetch)
2111 (uri (rubygems-uri "rubyzip" version))
2112 (sha256
2113 (base32
2114 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
2115 (build-system ruby-build-system)
2116 (arguments
2117 '(#:phases
2118 (modify-phases %standard-phases
2119 (add-before 'check 'patch-tests
2120 (lambda* (#:key inputs #:allow-other-keys)
2121 (substitute* "test/gentestfiles.rb"
2122 (("/usr/bin/zip")
2123 (string-append
2124 (assoc-ref inputs "zip") "/bin/zip")))
2125 (substitute* "test/input_stream_test.rb"
2126 (("/usr/bin/env ruby") (which "ruby")))
2127 #t)))))
2128 (native-inputs
2129 `(("bundler" ,bundler)
2130 ("ruby-simplecov" ,ruby-simplecov)
2131 ("zip" ,zip)
2132 ("unzip" ,unzip)))
2133 (synopsis "Ruby module is for reading and writing zip files")
2134 (description
2135 "The rubyzip module provides ways to read from and create zip files.")
2136 (home-page "http://github.com/rubyzip/rubyzip")
2137 (license license:bsd-2)))
2138
58b59742
RW
2139(define-public ruby-simplecov-html
2140 (package
2141 (name "ruby-simplecov-html")
53fd476f 2142 (version "0.10.2")
58b59742
RW
2143 (source (origin
2144 (method url-fetch)
2145 (uri (rubygems-uri "simplecov-html" version))
2146 (sha256
2147 (base32
53fd476f 2148 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
58b59742 2149 (build-system ruby-build-system)
8b749cf3 2150 (arguments `(#:tests? #f)) ; there are no tests
58b59742
RW
2151 (native-inputs
2152 `(("bundler" ,bundler)))
2153 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
2154 (description "This package provides the default HTML formatter for
2155the SimpleCov code coverage tool for Ruby version 1.9 and above.")
2156 (home-page "https://github.com/colszowka/simplecov-html")
2157 (license license:expat)))
2158
a84fa2ad
RW
2159(define-public ruby-simplecov
2160 (package
2161 (name "ruby-simplecov")
d432682b 2162 (version "0.17.1")
a84fa2ad
RW
2163 (source (origin
2164 (method url-fetch)
2165 (uri (rubygems-uri "simplecov" version))
2166 (sha256
2167 (base32
d432682b 2168 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
a84fa2ad
RW
2169 (build-system ruby-build-system)
2170 ;; Simplecov depends on rubocop for code style checking at build time.
2171 ;; Rubocop needs simplecov at build time.
2172 (arguments `(#:tests? #f))
2173 (propagated-inputs
2174 `(("ruby-json" ,ruby-json)
2175 ("ruby-docile" ,ruby-docile)
2176 ("ruby-simplecov-html" ,ruby-simplecov-html)))
2177 (native-inputs
2178 `(("bundler" ,bundler)))
2179 (synopsis "Code coverage framework for Ruby")
2180 (description "SimpleCov is a code coverage framework for Ruby with a
2181powerful configuration library and automatic merging of coverage across test
2182suites.")
7bf837fd 2183 (home-page "https://github.com/colszowka/simplecov")
a84fa2ad
RW
2184 (license license:expat)))
2185
98b87b82
DT
2186(define-public ruby-useragent
2187 (package
2188 (name "ruby-useragent")
959d908d 2189 (version "0.16.10")
98b87b82
DT
2190 (source (origin
2191 (method url-fetch)
e83c6d00 2192 (uri (rubygems-uri "useragent" version))
98b87b82
DT
2193 (sha256
2194 (base32
959d908d 2195 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
98b87b82
DT
2196 (build-system ruby-build-system)
2197 (arguments
e83c6d00 2198 '(#:tests? #f)) ; no test suite
98b87b82
DT
2199 (synopsis "HTTP user agent parser for Ruby")
2200 (description "UserAgent is a Ruby library that parses and compares HTTP
2201User Agents.")
2202 (home-page "https://github.com/gshutler/useragent")
2203 (license license:expat)))
96086cc5 2204
f7e9b2f3
CB
2205(define-public ruby-backports
2206 (package
2207 (name "ruby-backports")
2208 (version "3.11.4")
2209 (source
2210 (origin
2211 (method url-fetch)
2212 (uri (rubygems-uri "backports" version))
2213 (sha256
2214 (base32
2215 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
2216 (build-system ruby-build-system)
2217 (arguments
2218 '(;; TODO: This should be default, but there is one test failure
2219 #:test-target "all_spec"))
2220 (native-inputs
2221 `(("ruby-mspec" ,ruby-mspec)
2222 ("ruby-activesupport" ,ruby-activesupport)))
2223 (synopsis "Backports of the features in newer Ruby versions")
2224 (description
2225 "Backports enables more compatibility across Ruby versions by providing
2226backports of some features.")
2227 (home-page "https://github.com/marcandre/backports")
2228 (license license:expat)))
2229
96086cc5
DT
2230(define-public ruby-bacon
2231 (package
2232 (name "ruby-bacon")
e83c6d00 2233 (version "1.2.0")
96086cc5
DT
2234 (source (origin
2235 (method url-fetch)
e83c6d00 2236 (uri (rubygems-uri "bacon" version))
96086cc5
DT
2237 (sha256
2238 (base32
e83c6d00 2239 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
96086cc5 2240 (build-system ruby-build-system)
96086cc5
DT
2241 (synopsis "Small RSpec clone")
2242 (description "Bacon is a small RSpec clone providing all essential
2243features.")
2244 (home-page "https://github.com/chneukirchen/bacon")
2245 (license license:expat)))
de59d316 2246
a8d2bf3c
CB
2247(define-public ruby-bacon-bits
2248 (package
2249 (name "ruby-bacon-bits")
2250 (version "0.1.0")
2251 (source
2252 (origin
2253 (method url-fetch)
2254 (uri (rubygems-uri "bacon-bits" version))
2255 (sha256
2256 (base32
2257 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
2258 (build-system ruby-build-system)
2259 (arguments
2260 ;; No tests
2261 '(#:tests? #f))
2262 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
2263 (synopsis "Extensions to Bacon, for disabling tests, before and after
2264blocks and more")
2265 (description
2266 "This extends the bacon testing framework with useful extensions to
2267disable tests, have before and after blocks that run once and more.")
2268 (home-page "https://github.com/cldwalker/bacon-bits")
2269 (license license:expat)))
2270
65f65889
CB
2271(define-public ruby-bacon-colored-output
2272 (package
2273 (name "ruby-bacon-colored-output")
2274 (version "1.1.1")
2275 (source
2276 (origin
2277 (method url-fetch)
2278 (uri (rubygems-uri "bacon-colored_output" version))
2279 (sha256
2280 (base32
2281 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
2282 (build-system ruby-build-system)
2283 (arguments
2284 '(;; No included tests
2285 #:tests? #f))
2286 (propagated-inputs
2287 `(("ruby-bacon" ,ruby-bacon)))
2288 (synopsis "Colored output for Bacon test framework")
2289 (description
2290 "This package adds color through ANSI escape codes to Bacon test
2291output.")
2292 (home-page "https://github.com/whitequark/bacon-colored_output")
2293 (license license:expat)))
2294
e259bdf0
DT
2295(define-public ruby-connection-pool
2296 (package
2297 (name "ruby-connection-pool")
58021db4 2298 (version "2.2.2")
e259bdf0
DT
2299 (source (origin
2300 (method url-fetch)
e83c6d00 2301 (uri (rubygems-uri "connection_pool" version))
e259bdf0
DT
2302 (sha256
2303 (base32
58021db4 2304 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
e259bdf0
DT
2305 (build-system ruby-build-system)
2306 (native-inputs
2307 `(("bundler" ,bundler)))
2308 (synopsis "Generic connection pool for Ruby")
2309 (description "Connection_pool provides a generic connection pooling
2310interface for Ruby programs.")
2311 (home-page "https://github.com/mperham/connection_pool")
2312 (license license:expat)))
4c0aeb44
DT
2313
2314(define-public ruby-net-http-persistent
2315 (package
2316 (name "ruby-net-http-persistent")
185ea446 2317 (version "3.0.0")
4c0aeb44
DT
2318 (source (origin
2319 (method url-fetch)
e83c6d00 2320 (uri (rubygems-uri "net-http-persistent" version))
4c0aeb44
DT
2321 (sha256
2322 (base32
185ea446 2323 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
4c0aeb44 2324 (build-system ruby-build-system)
4c0aeb44
DT
2325 (native-inputs
2326 `(("ruby-connection-pool" ,ruby-connection-pool)
2327 ("ruby-hoe" ,ruby-hoe)))
2328 (synopsis "Persistent HTTP connection manager")
2329 (description "Net::HTTP::Persistent manages persistent HTTP connections
2330using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
2331 (home-page "https://github.com/drbrain/net-http-persistent")
2332 (license license:expat)))
afbbdf77 2333
f88bacaf
RW
2334(define-public ruby-power-assert
2335 (package
2336 (name "ruby-power-assert")
6754323b 2337 (version "1.1.5")
f88bacaf
RW
2338 (source (origin
2339 (method url-fetch)
2340 (uri (rubygems-uri "power_assert" version))
2341 (sha256
2342 (base32
6754323b 2343 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
f88bacaf 2344 (build-system ruby-build-system)
6754323b
CB
2345 (arguments
2346 '(#:tests? #f)) ; No included tests
f88bacaf
RW
2347 (native-inputs
2348 `(("bundler" ,bundler)))
2349 (synopsis "Assert library with descriptive assertion messages")
2350 (description "Power-assert is an assertion library providing descriptive
2351assertion messages for tests.")
2352 (home-page "https://github.com/k-tsj/power_assert")
2353 (license (list license:bsd-2 license:ruby))))
2354
e42e3bfa
CB
2355(define-public ruby-powerpack
2356 (package
2357 (name "ruby-powerpack")
2358 (version "0.1.2")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (rubygems-uri "powerpack" version))
2363 (sha256
2364 (base32
2365 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
2366 (build-system ruby-build-system)
2367 (arguments
2368 '(#:test-target "spec"))
2369 (native-inputs
2370 `(("bundler" ,bundler)
2371 ("ruby-rspec" ,ruby-rspec)
2372 ("ruby-yard" ,ruby-yard)))
2373 (synopsis "Useful extensions to core Ruby classes")
2374 (description
2375 "This package provides a few useful extensions to core Ruby classes,
2376including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
2377@code{String}.")
2378 (home-page "https://github.com/bbatsov/powerpack")
2379 (license license:expat)))
2380
347eb21e
RW
2381(define-public ruby-locale
2382 (package
2383 (name "ruby-locale")
2384 (version "2.1.2")
2385 (source (origin
2386 (method url-fetch)
2387 (uri (rubygems-uri "locale" version))
2388 (sha256
2389 (base32
2390 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
2391 (build-system ruby-build-system)
2392 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
2393 ;; which needs ruby-gettext, which needs ruby-locale. To break the
2394 ;; dependency cycle we disable tests.
2395 (arguments `(#:tests? #f))
2396 (native-inputs
2397 `(("bundler" ,bundler)
2398 ("ruby-yard" ,ruby-yard)))
2399 (synopsis "Ruby library providing basic localization APIs")
2400 (description
2401 "Ruby-Locale is the pure ruby library which provides basic APIs for
2402localization.")
2403 (home-page "https://github.com/ruby-gettext/locale")
2404 (license (list license:lgpl3+ license:ruby))))
2405
09e2b0af
CB
2406(define-public ruby-temple
2407 (package
2408 (name "ruby-temple")
2409 (version "0.8.1")
2410 (source
2411 (origin
2412 (method url-fetch)
2413 (uri (rubygems-uri "temple" version))
2414 (sha256
2415 (base32
2416 "158d7ygbwcifqnvrph219p7m78yjdjazhykv5darbkms7bxm5y09"))))
2417 (build-system ruby-build-system)
2418 (native-inputs
2419 `(("ruby-tilt" ,ruby-tilt)
2420 ("ruby-bacon" ,ruby-bacon)
2421 ("ruby-erubis" ,ruby-erubis)))
2422 (synopsis "Template compilation framework in Ruby")
2423 (description
2424 "Temple is an abstraction and framework for compiling templates to pure
2425Ruby.")
2426 (home-page "https://github.com/judofyr/temple")
2427 (license license:expat)))
2428
e2333ea3
RW
2429(define-public ruby-text
2430 (package
2431 (name "ruby-text")
2432 (version "1.3.1")
2433 (source (origin
2434 (method url-fetch)
2435 (uri (rubygems-uri "text" version))
2436 (sha256
2437 (base32
2438 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
2439 (build-system ruby-build-system)
2440 (synopsis "Collection of text algorithms for Ruby")
2441 (description
2442 "This package provides a collection of text algorithms: Levenshtein,
2443Soundex, Metaphone, Double Metaphone, Porter Stemming.")
7bf837fd 2444 (home-page "https://github.com/threedaymonk/text")
e2333ea3
RW
2445 (license license:expat)))
2446
c1f52261
RW
2447(define-public ruby-gettext
2448 (package
2449 (name "ruby-gettext")
2450 (version "3.1.7")
2451 (source (origin
2452 (method url-fetch)
2453 (uri (rubygems-uri "gettext" version))
2454 (sha256
2455 (base32
2456 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
2457 (build-system ruby-build-system)
2458 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
2459 ;; which needs ruby-gettext. To break the dependency cycle we disable
2460 ;; tests.
2461 (arguments `(#:tests? #f))
2462 (propagated-inputs
2463 `(("ruby-locale" ,ruby-locale)
2464 ("ruby-text" ,ruby-text)))
2465 (native-inputs
2466 `(("bundler" ,bundler)
2467 ("ruby-yard" ,ruby-yard)))
2468 (synopsis "GNU gettext-like program for Ruby")
2469 (description
2470 "Gettext is a GNU gettext-like program for Ruby. The catalog
2471file (po-file) used is the same as that used by GNU gettext, allowing you to
2472use GNU gettext tools for maintenance.")
2f3800e5 2473 (home-page "https://ruby-gettext.github.com/")
c1f52261
RW
2474 (license (list license:lgpl3+ license:ruby))))
2475
cc5aeb8c
RW
2476(define-public ruby-packnga
2477 (package
2478 (name "ruby-packnga")
1d60c436 2479 (version "1.0.4")
cc5aeb8c
RW
2480 (source (origin
2481 (method url-fetch)
2482 (uri (rubygems-uri "packnga" version))
2483 (sha256
2484 (base32
1d60c436 2485 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
cc5aeb8c
RW
2486 (build-system ruby-build-system)
2487 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
2488 ;; To break the dependency cycle we disable tests.
2489 (arguments `(#:tests? #f))
2490 (propagated-inputs
2491 `(("ruby-gettext" ,ruby-gettext)
2492 ("ruby-yard" ,ruby-yard)))
2493 (native-inputs
2494 `(("bundler" ,bundler)))
2495 (synopsis "Utility library to package internationalized libraries")
2496 (description
2497 "Packnga is a library to translate to many languages using YARD.")
2498 (home-page "http://ranguba.org/packnga/")
2499 (license license:lgpl2.0+)))
2500
93dc8684
CB
2501(define-public ruby-test-construct
2502 (package
2503 (name "ruby-test-construct")
2504 (version "2.0.1")
2505 (source
2506 (origin
2507 (method url-fetch)
2508 (uri (rubygems-uri "test_construct" version))
2509 (sha256
2510 (base32
2511 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
2512 (build-system ruby-build-system)
2513 (native-inputs
2514 `(("bundler" ,bundler)
2515 ("ruby-mocha" ,ruby-mocha)
2516 ("ruby-rspec" ,ruby-rspec)))
2517 (synopsis "Creates temporary files and directories for testing")
2518 (description
2519 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
2520temporary files and directories during tests.")
2521 (home-page "https://github.com/bhb/test_construct")
2522 (license license:expat)))
2523
3383f5bd
RW
2524(define-public ruby-test-unit
2525 (package
2526 (name "ruby-test-unit")
d74d96e4 2527 (version "3.2.5")
3383f5bd
RW
2528 (source (origin
2529 (method url-fetch)
2530 (uri (rubygems-uri "test-unit" version))
2531 (sha256
2532 (base32
d74d96e4 2533 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3383f5bd
RW
2534 (build-system ruby-build-system)
2535 (propagated-inputs
2536 `(("ruby-power-assert" ,ruby-power-assert)))
2537 (native-inputs
2538 `(("bundler" ,bundler)
2539 ("ruby-packnga" ,ruby-packnga)
2540 ("ruby-yard" ,ruby-yard)))
2541 (synopsis "Unit testing framework for Ruby")
2542 (description "@code{Test::Unit} is unit testing framework for Ruby, based
2543on xUnit principles. These were originally designed by Kent Beck, creator of
2544extreme programming software development methodology, for Smalltalk's SUnit.
2545It allows writing tests, checking results and automated testing in Ruby.")
2f3800e5 2546 (home-page "https://test-unit.github.io/")
3383f5bd
RW
2547 (license (list license:psfl license:ruby))))
2548
76b732fb
CB
2549(define-public ruby-markaby
2550 (package
2551 (name "ruby-markaby")
2552 (version "0.9.0")
2553 (source
2554 (origin
2555 (method url-fetch)
2556 (uri (rubygems-uri "markaby" version))
2557 (sha256
2558 (base32
2559 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
2560 (build-system ruby-build-system)
2561 (arguments
2562 '(#:phases
2563 (modify-phases %standard-phases
2564 ;; Run rspec manually without using the Rakefile, as the versions of
2565 ;; Rake and RSpec 2 are incompatible:
2566 ;;
2567 ;; NoMethodError: undefined method `last_comment'
2568 (replace 'check
2569 (lambda* (#:key tests? #:allow-other-keys)
2570 (when tests?
2571 (invoke "rspec"))
2572 #t)))))
2573 (propagated-inputs
2574 `(("ruby-builder" ,ruby-builder)))
2575 (native-inputs
2576 `(("bundler" ,bundler)
2577 ("ruby-rspec" ,ruby-rspec-2)))
2578 (synopsis "Write HTML pages in pure Ruby")
2579 (description
2580 "Markaby allows writing HTML packages in pure Ruby. This is similar to
e54af322 2581the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
76b732fb 2582mixture of HTML and additional ERB syntax.")
41181b76 2583 (home-page "https://markaby.github.io/")
76b732fb
CB
2584 (license license:expat)))
2585
b9511aa9
CB
2586(define-public ruby-maruku
2587 (package
2588 (name "ruby-maruku")
2589 (version "0.7.3")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (rubygems-uri "maruku" version))
2594 (sha256
2595 (base32
2596 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
2597 (build-system ruby-build-system)
2598 (arguments
2599 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
2600 #:tests? #f
2601 #:phases
2602 (modify-phases %standard-phases
2603 (replace 'check
2604 (lambda* (#:key tests? #:allow-other-keys)
2605 (when tests?
2606 (invoke "rspec"))
2607 #t)))))
2608 (native-inputs
2609 `(("ruby-rspec" ,ruby-rspec)
2610 ("ruby-simplecov" ,ruby-simplecov)
2611 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
2612 (synopsis "Markdown interpreter in Ruby")
2613 (description
2614 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
2615HTML, and PDF through LaTeX.")
2616 (home-page "https://github.com/bhollis/maruku")
2617 (license license:expat)))
2618
25d6d49b
RW
2619(define-public ruby-metaclass
2620 (package
2621 (name "ruby-metaclass")
2622 (version "0.0.4")
2623 (source (origin
2624 (method url-fetch)
2625 (uri (rubygems-uri "metaclass" version))
2626 (sha256
2627 (base32
2628 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
2629 (build-system ruby-build-system)
2630 (arguments
2631 `(#:phases
2632 (modify-phases %standard-phases
2633 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 2634 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 2635 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
2636 (substitute* "Rakefile"
2637 (("t\\.libs << \"test\"" line)
2638 (string-append line "; t.libs << \""
3cb3fa67 2639 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
2640 "/gems/test-unit-"
2641 ,(package-version ruby-test-unit)
2642 "/lib\""))))
2643 #t)))))
25d6d49b
RW
2644 (native-inputs
2645 `(("bundler" ,bundler)
2646 ("ruby-test-unit" ,ruby-test-unit)))
2647 (synopsis "Ruby library adding metaclass method to all objects")
2648 (description
2649 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
2650objects.")
7bf837fd 2651 (home-page "https://github.com/floehopper/metaclass")
25d6d49b
RW
2652 (license license:expat)))
2653
1d1d20b0
CB
2654(define-public ruby-mspec
2655 (package
2656 (name "ruby-mspec")
2657 (version "1.9.1")
2658 (source
2659 (origin
2660 (method url-fetch)
2661 (uri (rubygems-uri "mspec" version))
2662 (sha256
2663 (base32
2664 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
2665 (build-system ruby-build-system)
2666 (arguments
2667 '(;; TODO: 3 test failures
2668 ;; ./spec/mocks/mock_spec.rb:82
2669 ;; ./spec/utils/name_map_spec.rb:151
2670 ;; ./spec/utils/name_map_spec.rb:155
2671 #:tests? #f
2672 #:phases
2673 (modify-phases %standard-phases
2674 (add-after 'extract-gemspec 'change-dependency-constraints
2675 (lambda _
2676 (substitute* "mspec.gemspec"
2677 (("rake.*") "rake>)\n")
2678 (("rspec.*") "rspec>)\n"))
2679 #t))
2680 (replace 'check
2681 (lambda* (#:key tests? #:allow-other-keys)
2682 (when tests?
2683 (invoke "rspec" "spec"))
2684 #t)))))
2685 (native-inputs
2686 `(("bundler" ,bundler)
2687 ("ruby-rake" ,ruby-rake)
2688 ("ruby-rspec" ,ruby-rspec)))
2689 (synopsis "MSpec is a specialized framework for RubySpec")
2690 (description
2691 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
2692for basic features. MSpec contains additional features that assist in writing
2693specs for Ruby implementations in ruby/spec.")
2694 (home-page "http://rubyspec.org")
2695 (license license:expat)))
2696
b8aecc31
CB
2697(define-public ruby-mysql2
2698 (package
2699 (name "ruby-mysql2")
2700 (version "0.5.2")
2701 (source
2702 (origin
2703 (method git-fetch)
2704 (uri (git-reference
2705 (url "https://github.com/brianmario/mysql2.git")
2706 (commit version)))
2707 (file-name (git-file-name name version))
2708 (sha256
2709 (base32
2710 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
2711 (build-system ruby-build-system)
2712 (arguments
2713 '(;; TODO: Tests require a running MySQL/MariaDB service
2714 #:tests? #f
2715 #:phases
2716 (modify-phases %standard-phases
2717 (replace 'replace-git-ls-files
2718 (lambda _
2719 (substitute* "mysql2.gemspec"
2720 (("git ls-files .*`") "find . -type f |sort`"))
2721 #t))
2722 (add-before 'install 'set-MAKEFLAGS
2723 (lambda* (#:key outputs #:allow-other-keys)
2724 (setenv "MAKEFLAGS"
2725 (string-append
2726 "V=1 "
2727 "prefix=" (assoc-ref outputs "out")))
2728 #t))
2729 ;; Move the 'check phase to after 'install, as then you can test
2730 ;; using the installed mysql2 gem in the store.
2731 (delete 'check)
2732 (add-after 'install 'check
2733 (lambda* (#:key outputs tests? #:allow-other-keys)
2734 (setenv "GEM_PATH"
2735 (string-append
2736 (getenv "GEM_PATH")
2737 ":"
2738 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
2739 (when tests?
2740 (invoke "rspec"))
2741 #t)))))
2742 (inputs
2b8491fb
JL
2743 `(("mariadb" ,mariadb "lib")
2744 ("mariadb-dev" ,mariadb "dev")
b8aecc31
CB
2745 ("zlib" ,zlib)))
2746 (native-inputs
2747 `(("ruby-rspec" ,ruby-rspec)
2748 ("ruby-rake-compiler" ,ruby-rake-compiler)))
2749 (synopsis "MySQL library for Ruby, binding to libmysql")
2750 (description
2751 "This package provides a simple, fast MySQL library for Ruby, binding to
2752libmysql.")
2753 (home-page "https://github.com/brianmario/mysql2")
2754 (license license:expat)))
2755
21f7b7bd
RW
2756(define-public ruby-blankslate
2757 (package
2758 (name "ruby-blankslate")
2759 (version "3.1.3")
2760 (source (origin
2761 (method url-fetch)
2762 (uri (rubygems-uri "blankslate" version))
2763 (sha256
2764 (base32
2765 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
2766 (build-system ruby-build-system)
2767 (arguments
2768 `(#:phases
2769 (modify-phases %standard-phases
2770 (replace 'check
9923d5a4 2771 (lambda _ (invoke "rspec" "spec/"))))))
21f7b7bd
RW
2772 (native-inputs
2773 `(("bundler" ,bundler)
2774 ("ruby-rspec" ,ruby-rspec)))
2775 (synopsis "Abstract base class with no predefined methods")
2776 (description
2777 "BlankSlate provides an abstract base class with no predefined
2778methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
2779as a base class when writing classes that depend upon
2780@code{method_missing} (e.g. dynamic proxies).")
7bf837fd 2781 (home-page "https://github.com/masover/blankslate")
21f7b7bd
RW
2782 (license license:expat)))
2783
afdb437c
CB
2784(define-public ruby-bond
2785 (package
2786 (name "ruby-bond")
2787 (version "0.5.1")
2788 (source
2789 (origin
2790 (method url-fetch)
2791 (uri (rubygems-uri "bond" version))
2792 (sha256
2793 (base32
2794 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
2795 (build-system ruby-build-system)
2796 (native-inputs
2797 `(("ruby-bacon" ,ruby-bacon)
2798 ("ruby-bacon-bits" ,ruby-bacon-bits)
2799 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
2800 (synopsis "Bond can provide custom autocompletion for arguments, methods
2801and more")
2802 (description
2803 "Bond can autocomplete argument(s) to methods, uniquely completing per
2804module, per method and per argument. Bond provides a configuration system and
2805a DSL for creating custom completions and completion rules. Bond can also
2806load completions that ship with gems. Bond is able to offer more than irb's
2807completion since it uses the full line of input when completing as opposed to
2808irb's last-word approach.")
2809 (home-page "http://tagaholic.me/bond/")
2810 (license license:expat)))
2811
f3d7bb93
CB
2812(define-public ruby-idn-ruby
2813 (package
2814 (name "ruby-idn-ruby")
2815 (version "0.1.0")
2816 (source
2817 (origin
2818 (method url-fetch)
2819 (uri (rubygems-uri "idn-ruby" version))
2820 (sha256
2821 (base32
2822 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
2823 (build-system ruby-build-system)
2824 (arguments
2825 '(#:phases
2826 (modify-phases %standard-phases
2827 (delete 'check)
2828 (add-after 'install 'check
2829 (lambda* (#:key tests? outputs #:allow-other-keys)
2830 (when tests?
2831 (let* ((gem-file (cadr (find-files "." "\\.gem")))
2832 (name-and-version (basename gem-file ".gem")))
2833 (apply invoke
2834 "ruby" "--verbose"
2835 (string-append "-I"
2836 (assoc-ref outputs "out")
2837 "/lib/ruby/vendor_ruby/gems/"
2838 name-and-version
2839 "/lib")
2840 (find-files "./test" ".*\\.rb"))))
2841 #t)))))
2842 (inputs
2843 `(("libidn" ,libidn)))
2844 (synopsis "Ruby Bindings for the GNU LibIDN library")
2845 (description
2846 "Ruby Bindings for the GNU LibIDN library, an implementation of the
2847Stringprep, Punycode and IDNA specifications. These are used to encode and
2848decode internationalized domain + names according to the IDNA2003
2849specifications.
2850
2851Included are the most important parts of the Stringprep, Punycode and IDNA
2852APIs like performing Stringprep processings, encoding to and decoding from
2853Punycode strings and converting entire domain names to and from the ACE
2854encoded form.")
2855 (home-page "https://github.com/deepfryed/idn-ruby")
2856 (license license:asl2.0)))
2857
4016ba3f
RW
2858(define-public ruby-instantiator
2859 (package
2860 (name "ruby-instantiator")
688c9076 2861 (version "0.0.7")
4016ba3f
RW
2862 (source (origin
2863 (method url-fetch)
2864 (uri (rubygems-uri "instantiator" version))
2865 (sha256
2866 (base32
688c9076 2867 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
4016ba3f
RW
2868 (build-system ruby-build-system)
2869 (arguments
2870 `(#:phases
2871 (modify-phases %standard-phases
2872 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 2873 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 2874 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
2875 (substitute* "Rakefile"
2876 (("t\\.libs << \"test\"" line)
2877 (string-append line "; t.libs << \""
3cb3fa67 2878 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
2879 "/gems/test-unit-"
2880 ,(package-version ruby-test-unit)
2881 "/lib\""))))
2882 #t)))))
4016ba3f
RW
2883 (propagated-inputs
2884 `(("ruby-blankslate" ,ruby-blankslate)))
2885 (native-inputs
2886 `(("bundler" ,bundler)
2887 ("ruby-test-unit" ,ruby-test-unit)))
2888 (synopsis "Instantiate an arbitrary Ruby class")
2889 (description
2890 "Instantiator lets you instantiate an arbitrary Ruby class without
2891knowing anything about the constructor.")
2892 (home-page "https://github.com/floehopper/instantiator")
2893 (license license:expat)))
2894
97aee8d3
RW
2895(define-public ruby-introspection
2896 (package
2897 (name "ruby-introspection")
98ff58a5 2898 (version "0.0.4")
97aee8d3
RW
2899 (source (origin
2900 (method url-fetch)
2901 (uri (rubygems-uri "introspection" version))
2902 (sha256
2903 (base32
98ff58a5 2904 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
97aee8d3
RW
2905 (build-system ruby-build-system)
2906 (arguments
2907 `(#:phases
2908 (modify-phases %standard-phases
2909 (add-after 'unpack 'add-test-unit-to-search-path
2910 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 2911 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
2912 (substitute* "Rakefile"
2913 (("t\\.libs << \"test\"" line)
2914 (string-append line "; t.libs << \""
3cb3fa67 2915 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
2916 "/gems/test-unit-"
2917 ,(package-version ruby-test-unit)
2918 "/lib\""))))
97aee8d3
RW
2919 #t)))))
2920 (propagated-inputs
2921 `(("ruby-instantiator" ,ruby-instantiator)
2922 ("ruby-metaclass" ,ruby-metaclass)))
2923 (native-inputs
2924 `(("bundler" ,bundler)
2925 ("ruby-blankslate" ,ruby-blankslate)
2926 ("ruby-test-unit" ,ruby-test-unit)))
2927 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
2928 (description
2929 "Introspection provides tools to inspect the hierarchy of method
2930definitions on a Ruby object.")
2931 (home-page "https://github.com/floehopper/introspection")
2932 (license license:expat)))
2933
d93062fd
RW
2934(define-public ruby-redcarpet
2935 (package
2936 (name "ruby-redcarpet")
ba4084bb 2937 (version "3.5.0")
d93062fd
RW
2938 (source (origin
2939 (method url-fetch)
2940 (uri (rubygems-uri "redcarpet" version))
2941 (sha256
2942 (base32
ba4084bb 2943 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
d93062fd
RW
2944 (build-system ruby-build-system)
2945 (arguments
2946 `(#:phases
2947 (modify-phases %standard-phases
2948 ;; The gem archive does not include the conformance tests.
2949 (add-after 'unpack 'disable-conformance-tests
2950 (lambda _
2951 (substitute* "Rakefile"
2952 (("task :test => %w\\[test:unit test:conformance\\]")
2953 "task :test => %w[test:unit]"))
2954 #t)))))
2955 (native-inputs
2956 `(("bundler" ,bundler)
2957 ("ruby-test-unit" ,ruby-test-unit)
2958 ("ruby-rake-compiler" ,ruby-rake-compiler)))
2959 (synopsis "Extensible Markdown to (X)HTML converter")
2960 (description
2961 "Redcarpet is an extensible Ruby library for Markdown processing and
2962conversion to (X)HTML.")
7bf837fd 2963 (home-page "https://github.com/vmg/redcarpet")
d93062fd
RW
2964 (license license:expat)))
2965
09924294
CB
2966(define-public ruby-rerun
2967 (package
2968 (name "ruby-rerun")
2969 (version "0.13.0")
2970 (source
2971 (origin
2972 (method url-fetch)
2973 (uri (rubygems-uri "rerun" version))
2974 (sha256
2975 (base32
2976 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
2977 (build-system ruby-build-system)
2978 (arguments
2979 '(#:tests? #f)) ; No included tests
2980 (propagated-inputs
2981 `(("ruby-listen" ,ruby-listen)))
2982 (synopsis "Run a process, and restart when some monitored files change")
2983 (description
52beae7b 2984 "Rerun is a tool to launch programs, then monitor the file system, and
09924294
CB
2985restart the program when any of the monitored files change. It's written in
2986Ruby, but can be used for all programs.")
2987 (home-page "https://github.com/alexch/rerun/")
2988 (license license:expat)))
2989
4f2a52ae
RW
2990(define-public ruby-mocha
2991 (package
2992 (name "ruby-mocha")
2993 (version "1.1.0")
2994 (source (origin
2995 (method url-fetch)
2996 (uri (rubygems-uri "mocha" version))
2997 (sha256
2998 (base32
2999 "107nmnngbv8lq2g7hbjpn5kplb4v2c8gs9lxrg6vs8gdbddkilzi"))))
3000 (build-system ruby-build-system)
3001 (arguments
3002 `(#:phases
3003 (modify-phases %standard-phases
3004 (add-after 'unpack 'add-test-unit-to-search-path
3005 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3006 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3007 (substitute* "Rakefile"
3008 (("t\\.libs << 'test'" line)
3009 (string-append line "; t.libs << \""
3cb3fa67 3010 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3011 "/gems/test-unit-"
3012 ,(package-version ruby-test-unit)
3013 "/lib\""))))
4f2a52ae
RW
3014 #t))
3015 (add-before 'check 'use-latest-redcarpet
3016 (lambda _
3017 (substitute* "mocha.gemspec"
71596c3c
BW
3018 (("<redcarpet>.freeze, \\[\"~> 1\"\\]")
3019 "<redcarpet>.freeze, [\">= 3\"]"))
4f2a52ae
RW
3020 #t))
3021 (add-before 'check 'hardcode-version
3022 (lambda _
3023 ;; Mocha is undefined at build time
3024 (substitute* "Rakefile"
3025 (("#\\{Mocha::VERSION\\}") ,version))
3026 #t))
3027 (add-before 'check 'remove-failing-test
3028 ;; FIXME: This test fails for reasons unrelated to Guix packaging.
3029 (lambda _
3030 (delete-file "test/acceptance/stubbing_nil_test.rb")
3031 #t)))))
3032 (propagated-inputs
3033 `(("ruby-metaclass" ,ruby-metaclass)))
3034 (native-inputs
3035 `(("bundler" ,bundler)
3036 ("ruby-yard" ,ruby-yard)
3037 ("ruby-introspection" ,ruby-introspection)
3038 ("ruby-test-unit" ,ruby-test-unit)
3039 ("ruby-redcarpet" ,ruby-redcarpet)))
3040 (synopsis "Mocking and stubbing library for Ruby")
3041 (description
3042 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
3043allows mocking and stubbing of methods on real (non-mock) classes.")
3044 (home-page "http://gofreerange.com/mocha/docs")
3045 (license license:expat)))
3046
cf646acf
CB
3047(define-public ruby-mocha-on-bacon
3048 (package
3049 (name "ruby-mocha-on-bacon")
3050 (version "0.2.3")
3051 (source
3052 (origin
3053 (method url-fetch)
3054 (uri (rubygems-uri "mocha-on-bacon" version))
3055 (sha256
3056 (base32
3057 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
3058 (build-system ruby-build-system)
3059 (arguments
3060 ;; rubygems.org release missing tests
3061 '(#:tests? #f))
3062 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
3063 (synopsis "Mocha adapter for Bacon")
3064 (description
3065 "This package provides a Mocha adapter for Bacon, allowing you to use the
3066Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
3067 (home-page
3068 "https://github.com/alloy/mocha-on-bacon")
3069 (license license:expat)))
3070
2c84ba7e
RW
3071(define-public ruby-net-ssh
3072 (package
3073 (name "ruby-net-ssh")
5803f872 3074 (version "4.2.0")
2c84ba7e
RW
3075 (source (origin
3076 (method url-fetch)
3077 (uri (rubygems-uri "net-ssh" version))
3078 (sha256
3079 (base32
5803f872 3080 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
2c84ba7e
RW
3081 (build-system ruby-build-system)
3082 (native-inputs
a7938625
MB
3083 `(("bundler" ,bundler)
3084 ("ruby-mocha" ,ruby-mocha)
2c84ba7e
RW
3085 ("ruby-test-unit" ,ruby-test-unit)))
3086 (synopsis "Ruby implementation of the SSH2 client protocol")
3087 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
3088client protocol. It allows you to write programs that invoke and interact
3089with processes on remote servers, via SSH2.")
3090 (home-page "https://github.com/net-ssh/net-ssh")
3091 (license license:expat)))
3092
d38755cb
DM
3093(define-public ruby-net-scp
3094 (package
3095 (name "ruby-net-scp")
3096 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
3097 (version "1.2.2.rc2")
3098 (source
3099 (origin
e405f996
TGR
3100 (method git-fetch)
3101 (uri (git-reference
3102 (url "https://github.com/net-ssh/net-scp.git")
3103 (commit (string-append "v" version))))
3104 (file-name (git-file-name name version))
d38755cb 3105 (sha256
e405f996 3106 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
d38755cb
DM
3107 (build-system ruby-build-system)
3108 (native-inputs
3109 `(("bundler" ,bundler)
3110 ("ruby-test-unit" ,ruby-test-unit)
3111 ("ruby-mocha" ,ruby-mocha)))
3112 (propagated-inputs
3113 `(("ruby-net-ssh" ,ruby-net-ssh)))
3114 (synopsis "Pure-Ruby SCP client library")
3115 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
3116client protocol.")
3117 (home-page "https://github.com/net-ssh/net-scp")
3118 (license license:expat)))
3119
2206e948
DT
3120(define-public ruby-minitest
3121 (package
3122 (name "ruby-minitest")
88a105c1 3123 (version "5.11.3")
2206e948 3124 (source (origin
e83c6d00
DT
3125 (method url-fetch)
3126 (uri (rubygems-uri "minitest" version))
2206e948
DT
3127 (sha256
3128 (base32
88a105c1 3129 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
2206e948 3130 (build-system ruby-build-system)
2206e948
DT
3131 (native-inputs
3132 `(("ruby-hoe" ,ruby-hoe)))
3133 (synopsis "Small test suite library for Ruby")
3134 (description "Minitest provides a complete suite of Ruby testing
3135facilities supporting TDD, BDD, mocking, and benchmarking.")
3136 (home-page "https://github.com/seattlerb/minitest")
3137 (license license:expat)))
3138
1db6e09f
RW
3139;; This is the last release of Minitest 4, which is used by some packages.
3140(define-public ruby-minitest-4
3141 (package (inherit ruby-minitest)
3142 (version "4.7.5")
3143 (source (origin
3144 (method url-fetch)
3145 (uri (rubygems-uri "minitest" version))
3146 (sha256
3147 (base32
3148 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
3149 (arguments
3150 `(#:phases
3151 (modify-phases %standard-phases
3152 (add-after 'unpack 'remove-unsupported-method
3153 (lambda _
3154 (substitute* "Rakefile"
3155 (("self\\.rubyforge_name = .*") ""))
9a7017eb
BW
3156 #t))
3157 (add-after 'build 'exclude-failing-tests
3158 (lambda _
3159 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
3160 ;; Fixnum.
3161 (delete-file "test/minitest/test_minitest_spec.rb")
3162 #t)))))))
1db6e09f 3163
450a3f7f
CB
3164(define-public ruby-minitest-around
3165 (package
3166 (name "ruby-minitest-around")
3167 (version "0.5.0")
3168 (source
3169 (origin
3170 (method url-fetch)
3171 (uri (rubygems-uri "minitest-around" version))
3172 (sha256
3173 (base32
3174 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
3175 (build-system ruby-build-system)
3176 (arguments
3177 '(#:phases
3178 (modify-phases %standard-phases
3179 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
3180 (lambda _
3181 (substitute* "minitest-around.gemspec"
3182 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
3183 #t)))))
3184 (propagated-inputs
3185 `(("ruby-minitest" ,ruby-minitest)))
3186 (native-inputs
3187 `(("bundler" ,bundler)
3188 ("ruby-cucumber" ,ruby-cucumber)
3189 ("ruby-bump" ,ruby-bump)
3190 ("ruby-test-construct" ,ruby-test-construct)))
3191 (synopsis "Run code around tests in Minitest")
3192 (description
3193 "This library provides a way to run code around tests in Minitest,
3194written using either the unit test or spec style.")
3195 (home-page "https://github.com/splattael/minitest-around")
3196 (license license:expat)))
3197
35130835
DT
3198(define-public ruby-minitest-sprint
3199 (package
3200 (name "ruby-minitest-sprint")
3201 (version "1.1.0")
3202 (source (origin
e83c6d00
DT
3203 (method url-fetch)
3204 (uri (rubygems-uri "minitest-sprint" version))
35130835
DT
3205 (sha256
3206 (base32
e83c6d00 3207 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
35130835 3208 (build-system ruby-build-system)
35130835
DT
3209 (native-inputs
3210 `(("ruby-hoe" ,ruby-hoe)
3211 ("ruby-minitest" ,ruby-minitest)))
3212 (synopsis "Fast test suite runner for minitest")
3213 (description "Minitest-sprint is a test runner for minitest that makes it
3214easier to re-run individual failing tests.")
3215 (home-page "https://github.com/seattlerb/minitest-sprint")
3216 (license license:expat)))
3217
0808e361
DT
3218(define-public ruby-minitest-bacon
3219 (package
3220 (name "ruby-minitest-bacon")
6f9652b0 3221 (version "1.0.3")
0808e361 3222 (source (origin
e83c6d00
DT
3223 (method url-fetch)
3224 (uri (rubygems-uri "minitest-bacon" version))
0808e361
DT
3225 (sha256
3226 (base32
6f9652b0 3227 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
0808e361 3228 (build-system ruby-build-system)
0808e361
DT
3229 (native-inputs
3230 `(("ruby-hoe" ,ruby-hoe)))
3231 (inputs
3232 `(("ruby-minitest" ,ruby-minitest)))
3233 (synopsis "Bacon compatibility library for minitest")
3234 (description "Minitest-bacon extends minitest with bacon-like
3235functionality, making it easier to migrate test suites from bacon to minitest.")
3236 (home-page "https://github.com/seattlerb/minitest-bacon")
3237 (license license:expat)))
3238
39dc0eb5
BW
3239(define-public ruby-minitest-focus
3240 (package
3241 (name "ruby-minitest-focus")
3242 (version "1.1.2")
3243 (source
3244 (origin
3245 (method url-fetch)
3246 (uri (rubygems-uri "minitest-focus" version))
3247 (sha256
3248 (base32
3249 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
3250 (build-system ruby-build-system)
3251 (propagated-inputs
3252 `(("ruby-minitest" ,ruby-minitest)))
3253 (native-inputs
3254 `(("ruby-hoe" ,ruby-hoe)))
3255 (synopsis "Allows a few specific tests to be focused on")
3256 (description
3257 "@code{minitest-focus} gives the ability focus on a few tests with ease
3258without having to use command-line arguments. It introduces a @code{focus}
3259class method for use in testing classes, specifying that the next defined test
3260is to be run.")
3261 (home-page "https://github.com/seattlerb/minitest-focus")
3262 (license license:expat)))
3263
99fc5cd5
BW
3264(define-public ruby-minitest-pretty-diff
3265 ;; Use git reference because gem is out of date and does not contain testing
3266 ;; script. There are no releases on GitHub.
3267 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
3268 (package
3269 (name "ruby-minitest-pretty-diff")
3270 (version (string-append "0.1-1." (string-take commit 8)))
3271 (source (origin
3272 (method git-fetch)
3273 (uri (git-reference
3274 (url "https://github.com/adammck/minitest-pretty_diff.git")
3275 (commit commit)))
3276 (file-name (string-append name "-" version "-checkout"))
3277 (sha256
3278 (base32
3279 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
3280 (build-system ruby-build-system)
3281 (arguments
3282 `(#:phases
3283 (modify-phases %standard-phases
3284 (replace 'check
3285 (lambda _
9923d5a4 3286 (invoke "script/test"))))))
99fc5cd5
BW
3287 (native-inputs
3288 `(("bundler" ,bundler)
3289 ("ruby-turn" ,ruby-turn)))
3290 (synopsis "Pretty-print hashes and arrays in MiniTest")
3291 (description
3292 "@code{minitest-pretty_diff} monkey-patches
3293@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
3294diffing them. This makes it easier to spot differences between nested
3295structures when tests fail.")
3296 (home-page "https://github.com/adammck/minitest-pretty_diff")
3297 (license license:expat))))
3298
685d0d2f
BW
3299(define-public ruby-minitest-moar
3300 (package
3301 (name "ruby-minitest-moar")
3302 (version "0.0.4")
3303 (source
3304 (origin
3305 (method url-fetch)
3306 (uri (rubygems-uri "minitest-moar" version))
3307 (sha256
3308 (base32
3309 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
3310 (build-system ruby-build-system)
3311 (arguments
3312 `(#:phases
3313 (modify-phases %standard-phases
3314 (add-before 'check 'clean-dependencies
3315 (lambda _
3316 ;; Remove all gems defined in the Gemfile because these are not
3317 ;; truly needed.
3318 (substitute* "Gemfile"
3319 (("gem .*") ""))
3320 ;; Remove byebug as not needed to run tests.
3321 (substitute* "test/test_helper.rb"
3322 (("require 'byebug'") ""))
3323 #t)))))
3324 (native-inputs
3325 `(("bundler" ,bundler)
3326 ("ruby-minitest" ,ruby-minitest)))
3327 (synopsis "Extra features and changes to MiniTest")
3328 (description "@code{MiniTest Moar} add some additional features and
3329changes some default behaviours in MiniTest. For instance, Moar replaces the
3330MiniTest @code{Object#stub} with a global @code{stub} method.")
3331 (home-page "https://github.com/dockyard/minitest-moar")
3332 (license license:expat)))
3333
e07ef1d6
BW
3334(define-public ruby-minitest-bonus-assertions
3335 (package
3336 (name "ruby-minitest-bonus-assertions")
c9e261b7 3337 (version "3.0")
e07ef1d6
BW
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (rubygems-uri "minitest-bonus-assertions" version))
3342 (sha256
3343 (base32
c9e261b7 3344 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
e07ef1d6
BW
3345 (build-system ruby-build-system)
3346 (arguments
3347 `(#:phases
3348 (modify-phases %standard-phases
3349 (add-before 'check 'clean-dependencies
3350 (lambda _
3351 ;; Remove unneeded require statement that would entail another
3352 ;; dependency.
3353 (substitute* "test/minitest_config.rb"
3354 (("require 'minitest/bisect'") ""))
3355 #t)))))
3356 (native-inputs
3357 `(("ruby-hoe" ,ruby-hoe)
3358 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
3359 ("ruby-minitest-focus" ,ruby-minitest-focus)
3360 ("ruby-minitest-moar" ,ruby-minitest-moar)))
3361 (synopsis "Bonus assertions for @code{Minitest}")
3362 (description
3363 "Minitest bonus assertions provides extra MiniTest assertions. For
3364instance, it provides @code{assert_true}, @code{assert_false} and
3365@code{assert_set_equal}.")
3366 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
3367 (license license:expat)))
3368
e2c9a9cc
CB
3369(define-public ruby-minitest-reporters
3370 (package
3371 (name "ruby-minitest-reporters")
3372 (version "1.3.6")
3373 (source
3374 (origin
3375 (method url-fetch)
3376 (uri (rubygems-uri "minitest-reporters" version))
3377 (sha256
3378 (base32
3379 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
3380 (build-system ruby-build-system)
3381 (arguments
3382 '(#:phases
3383 (modify-phases %standard-phases
3384 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
3385 ;; including it as an input can lead to circular dependencies.
3386 (add-after 'unpack 'remove-rubocop-from-Rakefile
3387 (lambda _
3388 (substitute* "Rakefile"
3389 (("require 'rubocop/rake\\_task'") "")
3390 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
3391 #t))
3392 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
3393 (lambda _
3394 (substitute* "minitest-reporters.gemspec"
3395 ((".*%q<rubocop>.*") "\n"))
3396 #t)))))
3397 (propagated-inputs
3398 `(("ruby-ansi" ,ruby-ansi)
3399 ("ruby-builder" ,ruby-builder)
3400 ("ruby-minitest" ,ruby-minitest)
3401 ("ruby-progressbar" ,ruby-progressbar)))
3402 (native-inputs
3403 `(("bundler" ,bundler)
3404 ("ruby-maruku" ,ruby-maruku)))
3405 (synopsis "Enhanced reporting for Minitest tests")
3406 (description
3407 "@code{minitest/reporters} provides a custom Minitest runner to improve
3408how the test state is reported. A number of different reporters are
3409available, including a spec reporter, progress bar reporter, a HTML
3410reporter.")
3411 (home-page "https://github.com/kern/minitest-reporters")
3412 (license license:expat)))
3413
e582fa93
BW
3414(define-public ruby-minitest-rg
3415 (package
3416 (name "ruby-minitest-rg")
3417 (version "5.2.0")
3418 (source
3419 (origin
3420 (method url-fetch)
3421 (uri (rubygems-uri "minitest-rg" version))
3422 (sha256
3423 (base32
3424 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
3425 (build-system ruby-build-system)
3426 (arguments
3427 ;; Some tests fail even outside Guix, so disable tests.
3428 ;; https://github.com/blowmage/minitest-rg/issues/12
3429 ;; https://github.com/blowmage/minitest-rg/pull/13
3430 `(#:tests? #f))
3431 (propagated-inputs
3432 `(("ruby-minitest" ,ruby-minitest)))
3433 (synopsis "Coloured output for Minitest")
3434 (description
3435 "@code{minitest-rg} changes the colour of the output from Minitest.")
8e486e80 3436 (home-page "https://blowmage.com/minitest-rg/")
e582fa93
BW
3437 (license license:expat)))
3438
2a96dbe6
BW
3439(define-public ruby-minitest-hooks
3440 (package
3441 (name "ruby-minitest-hooks")
eaaf8b12 3442 (version "1.4.2")
2a96dbe6
BW
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (rubygems-uri "minitest-hooks" version))
3447 (sha256
3448 (base32
eaaf8b12 3449 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
2a96dbe6
BW
3450 (build-system ruby-build-system)
3451 (arguments
3452 '(#:test-target "spec"))
3453 (native-inputs
3454 `(("ruby-sequel" ,ruby-sequel)
3455 ("ruby-sqlite3" ,ruby-sqlite3)))
3456 (synopsis "Hooks for the minitest framework")
3457 (description
3458 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
3459@code{around_all} hooks for Minitest. This allows, for instance, running each
3460suite of specs inside a database transaction, running each spec inside its own
3461savepoint inside that transaction. This can significantly speed up testing
3462for specs that share expensive database setup code.")
7bf837fd 3463 (home-page "https://github.com/jeremyevans/minitest-hooks")
2a96dbe6
BW
3464 (license license:expat)))
3465
afbbdf77
DT
3466(define-public ruby-daemons
3467 (package
3468 (name "ruby-daemons")
f03153db 3469 (version "1.2.5")
afbbdf77
DT
3470 (source (origin
3471 (method url-fetch)
e83c6d00 3472 (uri (rubygems-uri "daemons" version))
afbbdf77
DT
3473 (sha256
3474 (base32
f03153db 3475 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
afbbdf77
DT
3476 (build-system ruby-build-system)
3477 (arguments
3478 `(#:tests? #f)) ; no test suite
3479 (synopsis "Daemonize Ruby programs")
3480 (description "Daemons provides a way to wrap existing Ruby scripts to be
3481run as a daemon and to be controlled by simple start/stop/restart commands.")
3482 (home-page "https://github.com/thuehlinger/daemons")
3483 (license license:expat)))
b03eb6ac
CB
3484
3485(define-public ruby-data_uri
3486 (package
3487 (name "ruby-data_uri")
3488 (version "0.1.0")
3489 (source
3490 (origin
3491 (method url-fetch)
3492 (uri (rubygems-uri "data_uri" version))
3493 (sha256
3494 (base32
3495 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
3496 (build-system ruby-build-system)
3497 (synopsis "URI class for parsing data URIs")
3498 (description
3499 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
3500embedded inside a URI. The URI::Data class provides support for parsing these
3501URIs using the normal URI.parse method.")
3502 (home-page "https://github.com/dball/data_uri")
3503 (license license:expat)))
66e20863 3504
72c785f9
MB
3505(define-public ruby-deep-merge
3506 (package
3507 (name "ruby-deep-merge")
3508 (version "1.2.1")
3509 (home-page "https://github.com/danielsdeleo/deep_merge")
3510 ;; The Rubygem source does not contain the gemspec required for tests.
3511 (source (origin
3512 (method git-fetch)
3513 (uri (git-reference (url home-page) (commit version)))
3514 (file-name (git-file-name name version))
3515 (sha256
3516 (base32
3517 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
3518 (build-system ruby-build-system)
3519 (native-inputs
3520 `(("ruby-minitest" ,ruby-minitest)))
3521 (synopsis "Recursively merge hashes")
3522 (description
3523 "Deep Merge is a set of utility functions for @code{Hash}. It permits
3524you to merge elements inside a hash together recursively.")
3525 (license license:expat)))
3526
66e20863
DT
3527(define-public ruby-git
3528 (package
3529 (name "ruby-git")
ceaff59e 3530 (version "1.3.0")
66e20863
DT
3531 (source (origin
3532 (method url-fetch)
e83c6d00 3533 (uri (rubygems-uri "git" version))
66e20863
DT
3534 (sha256
3535 (base32
ceaff59e 3536 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
66e20863
DT
3537 (build-system ruby-build-system)
3538 (arguments
e83c6d00
DT
3539 `(#:tests? #f ; no tests
3540 #:phases (modify-phases %standard-phases
3541 (add-after 'install 'patch-git-binary
3542 (lambda* (#:key inputs outputs #:allow-other-keys)
66e20863
DT
3543 ;; Make the default git binary an absolute path to the
3544 ;; store.
e83c6d00
DT
3545 (let ((git (string-append (assoc-ref inputs "git")
3546 "/bin/git"))
3cb3fa67
CB
3547 (config (string-append
3548 (assoc-ref outputs "out")
3549 "/lib/ruby/vendor_ruby/gems/git-"
3550 ,version "/lib/git/config.rb")))
e83c6d00 3551 (substitute* (list config)
66e20863
DT
3552 (("'git'")
3553 (string-append "'" git "'")))
e83c6d00 3554 #t))))))
66e20863
DT
3555 (inputs
3556 `(("git" ,git)))
3557 (synopsis "Ruby wrappers for Git")
3558 (description "Ruby/Git is a Ruby library that can be used to create, read
3559and manipulate Git repositories by wrapping system calls to the git binary.")
3560 (home-page "https://github.com/schacon/ruby-git")
3561 (license license:expat)))
71d3e2c2 3562
95598153
MB
3563(define-public ruby-hocon
3564 (package
3565 (name "ruby-hocon")
3566 (version "1.3.0")
3567 (home-page "https://github.com/puppetlabs/ruby-hocon")
3568 (source (origin
3569 (method git-fetch)
3570 (uri (git-reference (url home-page) (commit version)))
3571 (file-name (git-file-name name version))
3572 (sha256
3573 (base32
3574 "1wz4cswjg3gs1y1bar7j4j88wjimfa9zhvy51jyi177i5dzax416"))))
3575 (build-system ruby-build-system)
3576 (arguments
3577 '(#:phases (modify-phases %standard-phases
3578 (replace 'check
3579 (lambda* (#:key tests? #:allow-other-keys)
3580 (if tests?
3581 (invoke "rspec")
3582 (format #t "test suite not run~%"))
3583 #t)))))
3584 (native-inputs
3585 `(("bundler" ,bundler)
3586 ("ruby-rspec" ,ruby-rspec)))
3587 (synopsis "HOCON config library")
3588 (description
3589 "This package provides Ruby support for the @acronym{HOCON,
3590Human-Optimized Config Object Notation} configuration file format. It
3591supports parsing and modifying HOCON and JSON files, and rendering parsed
3592objects back to a @code{String}.")
3593 (license license:asl2.0)))
3594
71d3e2c2
DT
3595(define-public ruby-slop
3596 (package
3597 (name "ruby-slop")
d14e5eaa 3598 (version "4.5.0")
71d3e2c2
DT
3599 (source (origin
3600 (method url-fetch)
e83c6d00 3601 (uri (rubygems-uri "slop" version))
71d3e2c2
DT
3602 (sha256
3603 (base32
d14e5eaa 3604 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
71d3e2c2
DT
3605 (build-system ruby-build-system)
3606 (native-inputs
3607 `(("ruby-minitest" ,ruby-minitest)))
3608 (synopsis "Ruby command line option parser")
3609 (description "Slop provides a Ruby domain specific language for gathering
3610options and parsing command line flags.")
3611 (home-page "https://github.com/leejarvis/slop")
3612 (license license:expat)))
e778a549 3613
5337f8b9
DT
3614(define-public ruby-slop-3
3615 (package (inherit ruby-slop)
3616 (version "3.6.0")
3617 (source (origin
3618 (method url-fetch)
3619 (uri (rubygems-uri "slop" version))
3620 (sha256
3621 (base32
3622 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
3623
ca914b5b
CB
3624(define-public ruby-multi-xml
3625 (package
3626 (name "ruby-multi-xml")
3627 (version "0.6.0")
3628 (source
3629 (origin
3630 (method url-fetch)
3631 (uri (rubygems-uri "multi_xml" version))
3632 (sha256
3633 (base32
3634 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
3635 (build-system ruby-build-system)
3636 (arguments
3637 '(#:tests? #f)) ; No included tests
3638 (synopsis "Swappable XML backends for Ruby")
3639 (description
3640 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
3641Nokogiri, Ox, or REXML.")
3642 (home-page "https://github.com/sferik/multi_xml")
3643 (license license:expat)))
3644
e778a549
DT
3645(define-public ruby-multipart-post
3646 (package
3647 (name "ruby-multipart-post")
3648 (version "2.0.0")
3649 (source (origin
3650 (method url-fetch)
e83c6d00 3651 (uri (rubygems-uri "multipart-post" version))
e778a549
DT
3652 (sha256
3653 (base32
e83c6d00 3654 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
e778a549
DT
3655 (build-system ruby-build-system)
3656 (native-inputs
3657 `(("bundler" ,bundler)))
3658 (synopsis "Multipart POST library for Ruby")
3659 (description "Multipart-Post Adds multipart POST capability to Ruby's
3660net/http library.")
3661 (home-page "https://github.com/nicksieger/multipart-post")
3662 (license license:expat)))
f8da3af0 3663
9a97e7ce
CB
3664(define-public ruby-multi-json
3665 (package
3666 (name "ruby-multi-json")
1b6f5475 3667 (version "1.13.1")
9a97e7ce
CB
3668 (source
3669 (origin
b872b47b 3670 (method git-fetch)
1b6f5475
BW
3671 ;; Tests are not distributed at rubygems.org so download from GitHub
3672 ;; instead.
b872b47b
EF
3673 (uri (git-reference
3674 (url "https://github.com/intridea/multi_json")
3675 (commit (string-append "v" version))))
3676 (file-name (git-file-name name version))
9a97e7ce
CB
3677 (sha256
3678 (base32
b872b47b 3679 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
9a97e7ce
CB
3680 (build-system ruby-build-system)
3681 (arguments
1b6f5475
BW
3682 `(#:phases
3683 (modify-phases %standard-phases
3684 (add-after 'unpack 'remove-signing-key-reference
3685 (lambda _
3686 (substitute* "multi_json.gemspec"
3687 ((".*spec.signing_key.*") ""))
3688 #t)))))
3689 (native-inputs
3690 `(("bundler" ,bundler)
3691 ("ruby-rspec" ,ruby-rspec)
3692 ("ruby-yard" ,ruby-yard)
3693 ("ruby-json-pure" ,ruby-json-pure)
3694 ("ruby-oj" ,ruby-oj)
3695 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
9a97e7ce
CB
3696 (synopsis "Common interface to multiple JSON libraries for Ruby")
3697 (description
3698 "This package provides a common interface to multiple JSON libraries,
3699including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
3700NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
1b6f5475 3701 (home-page "https://github.com/intridea/multi_json")
9a97e7ce
CB
3702 (license license:expat)))
3703
5edef88b
BW
3704(define-public ruby-multi-test
3705 (package
3706 (name "ruby-multi-test")
3707 (version "0.1.2")
3708 (source
3709 (origin
3710 (method url-fetch)
3711 (uri (rubygems-uri "multi_test" version))
3712 (sha256
3713 (base32
3714 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
3715 (build-system ruby-build-system)
3716 (arguments
3717 '(;; Tests require different sets of specific gem versions to be available,
3718 ;; and there is no gemfile that specifies the newest versions of
3719 ;; dependencies to be tested.
3720 #:tests? #f))
3721 (synopsis
3722 "Interface to testing libraries loaded into a running Ruby process")
3723 (description
3724 "@code{multi_test} provides a uniform interface onto whatever testing
3725libraries that have been loaded into a running Ruby process to help control
3726rogue test/unit/autorun requires.")
3727 (home-page "https://github.com/cucumber/multi_test")
9a97e7ce
CB
3728 (license license:expat)))
3729
f8da3af0
DT
3730(define-public ruby-arel
3731 (package
3732 (name "ruby-arel")
aecd533d 3733 (version "9.0.0")
f8da3af0
DT
3734 (source (origin
3735 (method url-fetch)
3736 (uri (rubygems-uri "arel" version))
3737 (sha256
3738 (base32
aecd533d 3739 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
f8da3af0
DT
3740 (build-system ruby-build-system)
3741 (arguments '(#:tests? #f)) ; no tests
3742 (home-page "https://github.com/rails/arel")
3743 (synopsis "SQL AST manager for Ruby")
6f23e2fb
TGR
3744 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
3745Ruby. It simplifies the generation of complex SQL queries and adapts to
3746various relational database implementations.")
f8da3af0 3747 (license license:expat)))
616eaead 3748
554bf4f6
CB
3749(define-public ruby-marcel
3750 (package
3751 (name "ruby-marcel")
3752 (version "0.3.3")
3753 (source
3754 (origin
3755 (method url-fetch)
3756 (uri (rubygems-uri "marcel" version))
3757 (sha256
3758 (base32
3759 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
3760 (build-system ruby-build-system)
3761 (arguments
3762 '(;; No included tests
3763 #:tests? #f))
3764 (propagated-inputs
3765 `(("ruby-mimemagic" ,ruby-mimemagic)))
3766 (synopsis "MIME type detection using magic numbers, filenames and extensions")
3767 (description
3768 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
3769Extensions} type detection using magic numbers, filenames, and extensions")
3770 (home-page "https://github.com/basecamp/marcel")
3771 (license license:expat)))
3772
616eaead 3773(define-public ruby-minitar
bfaf8efd
BW
3774 ;; We package from the GitHub source to fix the security issue reported at
3775 ;; https://github.com/halostatue/minitar/issues/16.
3776 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
3777 (package
3778 (name "ruby-minitar")
3779 (version (string-append "0.5.4-1." (string-take commit 8)))
3780 (source
3781 (origin
3782 (method git-fetch)
3783 (uri (git-reference
3784 (url "https://github.com/halostatue/minitar.git")
3785 (commit commit)))
3786 (file-name (string-append name "-" version "-checkout"))
3787 (sha256
3788 (base32
3789 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
3790 (build-system ruby-build-system)
3791 (arguments
3792 '(#:tests? #f)) ; missing a gemspec
3793 (synopsis "Ruby library and utility for handling tar archives")
3794 (description
3795 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
616eaead 3796that provides the ability to deal with POSIX tar archive files.")
bfaf8efd
BW
3797 (home-page "http://www.github.com/atoulme/minitar")
3798 (license (list license:gpl2+ license:ruby)))))
bea1c0e2
DT
3799
3800(define-public ruby-mini-portile
3801 (package
3802 (name "ruby-mini-portile")
3803 (version "0.6.2")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (rubygems-uri "mini_portile" version))
3808 (sha256
3809 (base32
3810 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
3811 (build-system ruby-build-system)
3812 (arguments
3813 '(#:tests? #f)) ; tests require network access
3814 (synopsis "Ports system for Ruby developers")
3815 (description "Mini-portile is a port/recipe system for Ruby developers.
3816It provides a standard way to compile against specific versions of libraries
3817to reproduce user environments.")
7bf837fd 3818 (home-page "https://github.com/flavorjones/mini_portile")
bea1c0e2 3819 (license license:expat)))
e920bfca 3820
d000fc92
BW
3821(define-public ruby-mini-portile-2
3822 (package (inherit ruby-mini-portile)
a88ac044 3823 (version "2.4.0")
d000fc92
BW
3824 (source (origin
3825 (method url-fetch)
3826 (uri (rubygems-uri "mini_portile2" version))
3827 (sha256
3828 (base32
a88ac044 3829 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
d000fc92 3830
e920bfca
DT
3831(define-public ruby-nokogiri
3832 (package
3833 (name "ruby-nokogiri")
36ccf59e 3834 (version "1.10.5")
e920bfca
DT
3835 (source (origin
3836 (method url-fetch)
3837 (uri (rubygems-uri "nokogiri" version))
3838 (sha256
3839 (base32
36ccf59e 3840 "185g3dwba73jqxjr94bd2zk6fil6n9hmcfnfyzh3p1w47vm296r7"))))
e920bfca
DT
3841 (build-system ruby-build-system)
3842 (arguments
3843 ;; Tests fail because Nokogiri can only test with an installed extension,
3844 ;; and also because many test framework dependencies are missing.
7b01f250 3845 `(#:tests? #f
e920bfca
DT
3846 #:gem-flags (list "--" "--use-system-libraries"
3847 (string-append "--with-xml2-include="
3848 (assoc-ref %build-inputs "libxml2")
5e7f1b0b
BW
3849 "/include/libxml2" ))
3850 #:phases
3851 (modify-phases %standard-phases
7b01f250
BW
3852 (add-before 'build 'patch-extconf
3853 ;; 'pkg-config' is not included in the GEM_PATH during
3854 ;; installation, so we add it directly to the load path.
3855 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3856 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
7b01f250
BW
3857 (substitute* "ext/nokogiri/extconf.rb"
3858 (("gem 'pkg-config'.*")
3859 (string-append "$:.unshift '"
3cb3fa67 3860 pkg-config "/lib/ruby/vendor_ruby"
7b01f250
BW
3861 "/gems/pkg-config-"
3862 ,(package-version ruby-pkg-config)
3863 "/lib'\n"))))
5e7f1b0b 3864 #t)))))
e920bfca 3865 (native-inputs
7b01f250 3866 `(("ruby-hoe" ,ruby-hoe)))
e920bfca
DT
3867 (inputs
3868 `(("zlib" ,zlib)
3869 ("libxml2" ,libxml2)
3870 ("libxslt" ,libxslt)))
3871 (propagated-inputs
7b01f250
BW
3872 `(("ruby-mini-portile" ,ruby-mini-portile-2)
3873 ("ruby-pkg-config" ,ruby-pkg-config)))
e920bfca
DT
3874 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
3875 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
3876both CSS3 selector and XPath 1.0 support.")
3877 (home-page "http://www.nokogiri.org/")
3878 (license license:expat)))
30b0b725
DT
3879
3880(define-public ruby-method-source
3881 (package
3882 (name "ruby-method-source")
c8355037 3883 (version "0.9.0")
30b0b725
DT
3884 (source
3885 (origin
3886 (method url-fetch)
3887 (uri (rubygems-uri "method_source" version))
3888 (sha256
3889 (base32
c8355037 3890 "0xqj21j3vfq4ldia6i2akhn2qd84m0iqcnsl49kfpq3xk6x0dzgn"))))
30b0b725 3891 (build-system ruby-build-system)
c8355037
BW
3892 (arguments
3893 `(#:test-target "spec"))
30b0b725 3894 (native-inputs
c8355037 3895 `(("ruby-rspec" ,ruby-rspec)
30b0b725
DT
3896 ("git" ,git)))
3897 (synopsis "Retrieve the source code for Ruby methods")
3898 (description "Method_source retrieves the source code for Ruby methods.
3899Additionally, it can extract source code from Proc and Lambda objects or just
3900extract comments.")
3901 (home-page "https://github.com/banister/method_source")
3902 (license license:expat)))
2e3fdea4
DT
3903
3904(define-public ruby-coderay
3905 (package
3906 (name "ruby-coderay")
5cf0997a 3907 (version "1.1.2")
2e3fdea4
DT
3908 (source
3909 (origin
3910 (method url-fetch)
3911 (uri (rubygems-uri "coderay" version))
3912 (sha256
3913 (base32
5cf0997a 3914 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
2e3fdea4
DT
3915 (build-system ruby-build-system)
3916 (arguments
3917 '(#:tests? #f)) ; missing test files
3918 (synopsis "Ruby syntax highlighting library")
3919 (description "Coderay is a Ruby library that provides syntax highlighting
3920for select languages.")
3921 (home-page "http://coderay.rubychan.de")
3922 (license license:expat)))
96e76083 3923
54993457
CB
3924(define-public ruby-parser
3925 (package
3926 (name "ruby-parser")
3927 (version "2.6.0.0")
3928 (source
3929 (origin
3930 (method url-fetch)
3931 (uri (rubygems-uri "parser" version))
3932 (sha256
3933 (base32
3934 "1hhz2k5417vr2k1llwqgjdnmyrhlpqicy0y2arr6r1gp04fg9wlm"))))
3935 (build-system ruby-build-system)
3936 (native-inputs
3937 `(("bundler" ,bundler)
3938 ("ruby-cliver" ,ruby-cliver)
3939 ("ruby-simplecov" ,ruby-simplecov)
3940 ("ruby-racc" ,ruby-racc)))
3941 (inputs
3942 `(("ragel" ,ragel)))
3943 (propagated-inputs
3944 `(("ruby-ast" ,ruby-ast)))
3945 (synopsis "Ruby parser written in pure Ruby")
3946 (description
3947 "This package provides a Ruby parser written in pure Ruby.")
3948 (home-page "https://github.com/whitequark/parser")
3949 (license license:expat)))
3950
16f423cb
CB
3951(define-public ruby-prawn-manual-builder
3952 (package
3953 (name "ruby-prawn-manual-builder")
1d4f0019 3954 (version "0.3.1")
16f423cb
CB
3955 (source
3956 (origin
3957 (method url-fetch)
3958 (uri (rubygems-uri "prawn-manual_builder" version))
3959 (sha256
1d4f0019 3960 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
16f423cb
CB
3961 (build-system ruby-build-system)
3962 (arguments
1d4f0019 3963 '(#:tests? #f ; no included tests
16f423cb
CB
3964 #:phases
3965 (modify-phases %standard-phases
3966 (add-after 'extract-gemspec 'patch-gemspec
3967 (lambda _
3968 (substitute* ".gemspec"
3969 ;; Loosen the requirement for pdf-inspector
3970 (("~> 1\\.0\\.7") ">= 0")))))))
3971 (propagated-inputs
3972 `(("ruby-coderay" ,ruby-coderay)))
3973 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
3974 (description
3975 "This package provides a tool for writing manuals for Prawn and Prawn
3976accessories")
3977 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
3978 (license (list
3979 ;; GPLv2 or GPLv3 or custom license described in LICENSE file
3980 license:gpl2
3981 license:gpl3))))
3982
268643b9
CB
3983(define-public ruby-progress_bar
3984 (package
3985 (name "ruby-progress_bar")
3986 (version "1.1.0")
3987 (source
3988 (origin
3989 (method url-fetch)
3990 (uri (rubygems-uri "progress_bar" version))
3991 (sha256
3992 (base32
3993 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
3994 (build-system ruby-build-system)
3995 (arguments
3996 '(#:test-target "spec"))
3997 (propagated-inputs
3998 `(("ruby-highline" ,ruby-highline)
3999 ("ruby-options" ,ruby-options)))
4000 (native-inputs
4001 `(("bundler" ,bundler)
4002 ("ruby-rspec" ,ruby-rspec)
4003 ("ruby-timecop" ,ruby-timecop)))
4004 (synopsis
4005 "Ruby library for displaying progress bars")
4006 (description
4007 "ProgressBar is a simple library for displaying progress bars. The
4008maximum value is configurable, and additional information can be displayed
4009like the percentage completion, estimated time remaining, elapsed time and
4010rate.")
4011 (home-page "https://github.com/paul/progress_bar")
4012 (license license:wtfpl2)))
4013
95f85d44
CB
4014(define-public ruby-dep
4015 (package
4016 (name "ruby-dep")
4017 (version "1.5.0")
4018 (source
4019 (origin
4020 (method url-fetch)
4021 (uri (rubygems-uri "ruby_dep" version))
4022 (sha256
4023 (base32
4024 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
4025 (build-system ruby-build-system)
4026 (arguments
4027 '(#:tests? #f)) ; No included tests
4028 (synopsis "Creates a version constraint of supported Rubies")
4029 (description
4030 "This package helps create a version constraint of supported Rubies,
4031suitable for a gemspec file.")
4032 (home-page "https://github.com/e2/ruby_dep")
4033 (license license:expat)))
4034
158a9253
CB
4035(define-public ruby-progressbar
4036 (package
4037 (name "ruby-progressbar")
2d2a2363 4038 (version "1.10.1")
158a9253
CB
4039 (source
4040 (origin
4041 (method url-fetch)
4042 (uri (rubygems-uri "ruby-progressbar" version))
4043 (sha256
2d2a2363 4044 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
158a9253
CB
4045 (build-system ruby-build-system)
4046 (arguments
4047 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
4048 #:tests? #f))
4049 (synopsis "Text progress bar library for Ruby")
4050 (description
4051 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
4052The output can be customized with a formatting system.")
4053 (home-page "https://github.com/jfelchner/ruby-progressbar")
4054 (license license:expat)))
4055
96e76083
DT
4056(define-public ruby-pry
4057 (package
4058 (name "ruby-pry")
1bf02b20 4059 (version "0.11.3")
96e76083
DT
4060 (source
4061 (origin
4062 (method url-fetch)
4063 (uri (rubygems-uri "pry" version))
4064 (sha256
4065 (base32
1bf02b20 4066 "1mh312k3y94sj0pi160wpia0ps8f4kmzvm505i6bvwynfdh7v30g"))))
96e76083
DT
4067 (build-system ruby-build-system)
4068 (arguments
4069 '(#:tests? #f)) ; no tests
4070 (propagated-inputs
4071 `(("ruby-coderay" ,ruby-coderay)
1960d4fd 4072 ("ruby-method-source" ,ruby-method-source)))
96e76083
DT
4073 (synopsis "Ruby REPL")
4074 (description "Pry is an IRB alternative and runtime developer console for
4075Ruby. It features syntax highlighting, a plugin architecture, runtime
4076invocation, and source and documentation browsing.")
2f3800e5 4077 (home-page "https://pryrepl.org")
96e76083 4078 (license license:expat)))
1415792a 4079
051deeb7
RW
4080(define-public ruby-guard
4081 (package
4082 (name "ruby-guard")
4083 (version "2.13.0")
4084 (source (origin
3c6128f6 4085 (method git-fetch)
051deeb7
RW
4086 ;; The gem does not include a Rakefile, nor does it contain a
4087 ;; gemspec file, nor does it come with the tests. This is why
4088 ;; we fetch the tarball from Github.
3c6128f6
EF
4089 (uri (git-reference
4090 (url "https://github.com/guard/guard")
4091 (commit (string-append "v" version))))
4092 (file-name (git-file-name name version))
051deeb7
RW
4093 (sha256
4094 (base32
3c6128f6 4095 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
051deeb7
RW
4096 (build-system ruby-build-system)
4097 (arguments
4098 `(#:tests? #f ; tests require cucumber
4099 #:phases
4100 (modify-phases %standard-phases
4101 (add-after 'unpack 'remove-git-ls-files
4102 (lambda* (#:key outputs #:allow-other-keys)
4103 (substitute* "guard.gemspec"
4104 (("git ls-files -z") "find . -type f -print0"))
4105 #t))
4106 (replace 'build
4107 (lambda _
9923d5a4 4108 (invoke "gem" "build" "guard.gemspec"))))))
051deeb7
RW
4109 (propagated-inputs
4110 `(("ruby-formatador" ,ruby-formatador)
4111 ("ruby-listen" ,ruby-listen)
4112 ("ruby-lumberjack" ,ruby-lumberjack)
4113 ("ruby-nenv" ,ruby-nenv)
4114 ("ruby-notiffany" ,ruby-notiffany)
4115 ("ruby-pry" ,ruby-pry)
4116 ("ruby-shellany" ,ruby-shellany)
4117 ("ruby-thor" ,ruby-thor)))
4118 (native-inputs
4119 `(("bundler" ,bundler)
4120 ("ruby-rspec" ,ruby-rspec)))
4121 (synopsis "Tool to handle events on file system modifications")
4122 (description
4123 "Guard is a command line tool to easily handle events on file system
4124modifications. Guard automates various tasks by running custom rules whenever
4125file or directories are modified.")
3c6128f6 4126 (home-page "https://guardgem.org/")
051deeb7
RW
4127 (license license:expat)))
4128
bcbb3cc9
CB
4129(define-public ruby-tilt
4130 (package
4131 (name "ruby-tilt")
4132 (version "2.0.9")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (rubygems-uri "tilt" version))
4137 (sha256
4138 (base32
4139 "0ca4k0clwf0rkvy7726x4nxpjxkpv67w043i39saxgldxd97zmwz"))))
4140 (build-system ruby-build-system)
4141 (arguments
4142 '(#:phases
4143 (modify-phases %standard-phases
4144 (add-after 'unpack 'remove-some-dependencies
4145 (lambda _
4146 (substitute* "Gemfile"
4147 ;; TODO ronn is used for generating the manual
4148 (("gem 'ronn'.*") "\n")
4149 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
4150 ;; pass it in as a native-input
4151 (("gem 'haml'.*") "\n")
4152 ;; TODO Not all of these gems are packaged for Guix yet:
4153 ;; less, coffee-script, livescript, babel-transpiler,
4154 ;; typescript-node
4155 (("if can_execjs") "if false")
4156 ;; Disable the secondary group to reduce the number of
4157 ;; dependencies. None of the normal approaches work, so patch
4158 ;; the Gemfile instead.
4159 (("group :secondary") "[].each"))
4160 #t)))))
4161 (native-inputs
4162 `(("bundler" ,bundler)
4163 ("ruby-yard" ,ruby-yard)
4164 ("ruby-builder" ,ruby-builder)
4165 ("ruby-erubis" ,ruby-erubis)
4166 ("ruby-markaby" ,ruby-markaby)
4167 ("ruby-sassc" ,ruby-sassc)))
4168 (synopsis "Generic interface to multiple Ruby template engines")
4169 (description
4170 "Tilt is a thin interface over a number of different Ruby template
4171engines in an attempt to make their usage as generic as possible.")
4172 (home-page "https://github.com/rtomayko/tilt/")
4173 (license license:expat)))
4174
1415792a
DT
4175(define-public ruby-thread-safe
4176 (package
4177 (name "ruby-thread-safe")
313dd5dd 4178 (version "0.3.6")
1415792a
DT
4179 (source
4180 (origin
4181 (method url-fetch)
4182 (uri (rubygems-uri "thread_safe" version))
4183 (sha256
4184 (base32
313dd5dd 4185 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
1415792a
DT
4186 (build-system ruby-build-system)
4187 (arguments
4188 '(#:tests? #f)) ; needs simplecov, among others
4189 (synopsis "Thread-safe utilities for Ruby")
4190 (description "The thread_safe library provides thread-safe collections and
4191utilities for Ruby.")
4192 (home-page "https://github.com/ruby-concurrency/thread_safe")
4193 (license license:asl2.0)))
08a1b701
DT
4194
4195(define-public ruby-tzinfo
4196 (package
4197 (name "ruby-tzinfo")
4237af85 4198 (version "1.2.4")
08a1b701
DT
4199 (source
4200 (origin
4201 (method url-fetch)
4202 (uri (rubygems-uri "tzinfo" version))
4203 (sha256
4204 (base32
4237af85 4205 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
08a1b701 4206 (build-system ruby-build-system)
740fea08
CB
4207 (arguments
4208 '(#:phases
4209 (modify-phases %standard-phases
4210 (add-after 'unpack 'skip-safe-tests
4211 (lambda _
4212 (substitute* "test/test_utils.rb"
4213 (("def safe_test\\(options = \\{\\}\\)")
4214 "def safe_test(options = {})
4215 skip('The Guix build environment has an unsafe load path')"))
4216 #t)))))
08a1b701
DT
4217 (propagated-inputs
4218 `(("ruby-thread-safe" ,ruby-thread-safe)))
4219 (synopsis "Time zone library for Ruby")
4220 (description "TZInfo is a Ruby library that provides daylight savings
4221aware transformations between times in different time zones.")
2f3800e5 4222 (home-page "https://tzinfo.github.io")
1e12924a
BW
4223 (license license:expat)))
4224
4225(define-public ruby-tzinfo-data
4226 (package
4227 (name "ruby-tzinfo-data")
92513191 4228 (version "1.2017.3")
1e12924a
BW
4229 (source
4230 (origin
bb1e7ed0 4231 (method git-fetch)
1e12924a
BW
4232 ;; Download from GitHub because the rubygems version does not contain
4233 ;; Rakefile or tests.
bb1e7ed0
EF
4234 (uri (git-reference
4235 (url "https://github.com/tzinfo/tzinfo-data")
4236 (commit (string-append "v" version))))
4237 (file-name (git-file-name name version))
1e12924a
BW
4238 (sha256
4239 (base32
bb1e7ed0 4240 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
1e12924a
BW
4241 ;; Remove the known test failure.
4242 ;; https://github.com/tzinfo/tzinfo-data/issues/10
4243 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
4244 (patches (search-patches
4245 "ruby-tzinfo-data-ignore-broken-test.patch"))))
4246 (build-system ruby-build-system)
4247 (propagated-inputs
4248 `(("ruby-tzinfo" ,ruby-tzinfo)))
4249 (synopsis "Data from the IANA Time Zone database")
4250 (description
4251 "This library provides @code{TZInfo::Data}, which contains data from the
4252IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
2f3800e5 4253 (home-page "https://tzinfo.github.io")
08a1b701 4254 (license license:expat)))
c99e2247 4255
48e6851f
RW
4256(define-public ruby-rb-inotify
4257 (package
4258 (name "ruby-rb-inotify")
32bbfea8 4259 (version "0.9.10")
48e6851f
RW
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (rubygems-uri "rb-inotify" version))
4264 (sha256
4265 (base32
32bbfea8 4266 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
48e6851f
RW
4267 (build-system ruby-build-system)
4268 (arguments
4269 '(#:tests? #f ; there are no tests
4270 #:phases
4271 (modify-phases %standard-phases
4272 ;; Building the gemspec with rake is not working here since it is
4273 ;; generated with Jeweler. It is also unnecessary because the
4274 ;; existing gemspec does not use any development tools to generate a
4275 ;; list of files.
4276 (replace 'build
4277 (lambda _
9923d5a4 4278 (invoke "gem" "build" "rb-inotify.gemspec"))))))
48e6851f
RW
4279 (propagated-inputs
4280 `(("ruby-ffi" ,ruby-ffi)))
4281 (native-inputs
4282 `(("ruby-yard" ,ruby-yard)))
4283 (synopsis "Ruby wrapper for Linux's inotify")
4284 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
4285kernel subsystem for monitoring changes to files and directories.")
4286 (home-page "https://github.com/nex3/rb-inotify")
4287 (license license:expat)))
4288
a75bdfce
RW
4289(define-public ruby-pry-editline
4290 (package
4291 (name "ruby-pry-editline")
4292 (version "1.1.2")
4293 (source (origin
4294 (method url-fetch)
4295 (uri (rubygems-uri "pry-editline" version))
4296 (sha256
4297 (base32
4298 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
4299 (build-system ruby-build-system)
4300 (arguments `(#:tests? #f)) ; no tests included
4301 (native-inputs
4302 `(("bundler" ,bundler)))
4303 (synopsis "Open the current REPL line in an editor")
4304 (description
4305 "This gem provides a plugin for the Ruby REPL to enable opening the
4306current line in an external editor.")
4307 (home-page "https://github.com/tpope/pry-editline")
4308 (license license:expat)))
4309
d3b20a02
RW
4310(define-public ruby-sdoc
4311 (package
4312 (name "ruby-sdoc")
fdf3a68d 4313 (version "0.4.2")
d3b20a02
RW
4314 (source (origin
4315 (method url-fetch)
4316 (uri (rubygems-uri "sdoc" version))
4317 (sha256
4318 (base32
fdf3a68d 4319 "0qhvy10vnmrqcgh8494m13kd5ag9c3sczzhfasv8j0294ylk679n"))))
d3b20a02
RW
4320 (build-system ruby-build-system)
4321 (arguments
4322 `(#:phases
4323 (modify-phases %standard-phases
fc29d5e6 4324 (add-before 'check 'set-rubylib-and-patch-gemfile
d3b20a02 4325 (lambda _
fdf3a68d 4326 (setenv "RUBYLIB" "lib")
fc29d5e6
BW
4327 (substitute* "sdoc.gemspec"
4328 (("s.add_runtime_dependency.*") "\n")
4329 (("s.add_dependency.*") "\n"))
4330 (substitute* "Gemfile"
4331 (("gem \"rake\".*")
4332 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
d3b20a02
RW
4333 #t)))))
4334 (propagated-inputs
4335 `(("ruby-json" ,ruby-json)))
4336 (native-inputs
4337 `(("bundler" ,bundler)
fdf3a68d
BW
4338 ("ruby-minitest" ,ruby-minitest)
4339 ("ruby-hoe" ,ruby-hoe)))
d3b20a02
RW
4340 (synopsis "Generate searchable RDoc documentation")
4341 (description
4342 "SDoc is an RDoc documentation generator to build searchable HTML
4343documentation for Ruby code.")
7bf837fd 4344 (home-page "https://github.com/voloko/sdoc")
d3b20a02
RW
4345 (license license:expat)))
4346
70b002aa
RW
4347(define-public ruby-tins
4348 (package
4349 (name "ruby-tins")
fbefd6ff 4350 (version "1.15.0")
70b002aa
RW
4351 (source (origin
4352 (method url-fetch)
4353 (uri (rubygems-uri "tins" version))
4354 (sha256
4355 (base32
fbefd6ff 4356 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
70b002aa
RW
4357 (build-system ruby-build-system)
4358 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
4359 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
4360 ;; the gemspec.
4361 (arguments
4362 `(#:tests? #f ; there are no tests
4363 #:phases
4364 (modify-phases %standard-phases
4365 (replace 'build
4366 (lambda _
4367 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
4368 ;; causes an error.
4369 (substitute* "tins.gemspec"
4370 (("\"lib/spruz\", ") ""))
9923d5a4 4371 (invoke "gem" "build" "tins.gemspec"))))))
70b002aa
RW
4372 (synopsis "Assorted tools for Ruby")
4373 (description "Tins is a Ruby library providing assorted tools.")
4374 (home-page "https://github.com/flori/tins")
4375 (license license:expat)))
4376
bc8277e4
RW
4377(define-public ruby-gem-hadar
4378 (package
4379 (name "ruby-gem-hadar")
3fd577e3 4380 (version "1.9.1")
bc8277e4
RW
4381 (source (origin
4382 (method url-fetch)
4383 (uri (rubygems-uri "gem_hadar" version))
4384 (sha256
4385 (base32
3fd577e3 4386 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
bc8277e4
RW
4387 (build-system ruby-build-system)
4388 ;; This gem needs itself at development time. We disable rebuilding of the
4389 ;; gemspec to avoid this loop.
4390 (arguments
4391 `(#:tests? #f ; there are no tests
4392 #:phases
4393 (modify-phases %standard-phases
4394 (replace 'build
4395 (lambda _
9923d5a4 4396 (invoke "gem" "build" "gem_hadar.gemspec"))))))
bc8277e4
RW
4397 (propagated-inputs
4398 `(("git" ,git)
4399 ("ruby-tins" ,ruby-tins)
3fd577e3 4400 ("ruby-yard" ,ruby-yard)))
bc8277e4
RW
4401 (synopsis "Library for the development of Ruby gems")
4402 (description
4403 "This library contains some useful functionality to support the
4404development of Ruby gems.")
4405 (home-page "https://github.com/flori/gem_hadar")
4406 (license license:expat)))
4407
d8cafe29
RW
4408(define-public ruby-minitest-tu-shim
4409 (package
4410 (name "ruby-minitest-tu-shim")
4411 (version "1.3.3")
4412 (source (origin
4413 (method url-fetch)
4414 (uri (rubygems-uri "minitest_tu_shim" version))
4415 (sha256
4416 (base32
4417 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
4418 (build-system ruby-build-system)
4419 (arguments
4420 `(#:phases
4421 (modify-phases %standard-phases
4422 (add-after 'unpack 'fix-test-include-path
4423 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 4424 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
761e7042
BW
4425 (substitute* "Rakefile"
4426 (("Hoe\\.add_include_dirs .*")
4427 (string-append "Hoe.add_include_dirs \""
3cb3fa67 4428 minitest "/lib/ruby/vendor_ruby"
761e7042
BW
4429 "/gems/minitest-"
4430 ,(package-version ruby-minitest-4)
4431 "/lib" "\""))))
4432 #t))
d8cafe29
RW
4433 (add-before 'check 'fix-test-assumptions
4434 (lambda _
4435 ;; The test output includes the file name, so a couple of tests
4436 ;; fail. Changing the regular expressions slightly fixes this
4437 ;; problem.
4438 (substitute* "test/test_mini_test.rb"
4439 (("output.sub!\\(.*, 'FILE:LINE'\\)")
4440 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
4441 (("gsub\\(/.*, 'FILE:LINE'\\)")
4442 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
4443 #t)))))
4444 (propagated-inputs
4445 `(("ruby-minitest-4" ,ruby-minitest-4)))
4446 (native-inputs
4447 `(("ruby-hoe" ,ruby-hoe)))
4448 (synopsis "Adapter library between minitest and test/unit")
4449 (description
4450 "This library bridges the gap between the small and fast minitest and
4451Ruby's large and slower test/unit.")
4452 (home-page "https://rubygems.org/gems/minitest_tu_shim")
4453 (license license:expat)))
4454
fd83a212
RW
4455(define-public ruby-term-ansicolor
4456 (package
4457 (name "ruby-term-ansicolor")
f3a6311a 4458 (version "1.6.0")
fd83a212
RW
4459 (source (origin
4460 (method url-fetch)
4461 (uri (rubygems-uri "term-ansicolor" version))
4462 (sha256
4463 (base32
f3a6311a 4464 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
fd83a212
RW
4465 (build-system ruby-build-system)
4466 ;; Rebuilding the gemspec seems to require git, even though this is not a
4467 ;; git repository, so we just build the gem from the existing gemspec.
4468 (arguments
4469 `(#:phases
4470 (modify-phases %standard-phases
39ecb977
CB
4471 (add-after 'unpack 'fix-test
4472 (lambda -
4473 (substitute* "tests/hsl_triple_test.rb"
4474 (("0\\\\\\.0%")
4475 "0\\.?0?%"))))
fd83a212
RW
4476 (replace 'build
4477 (lambda _
9923d5a4 4478 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
fd83a212
RW
4479 (propagated-inputs
4480 `(("ruby-tins" ,ruby-tins)))
4481 (native-inputs
4482 `(("ruby-gem-hadar" ,ruby-gem-hadar)
4483 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
4484 (synopsis "Ruby library to control the attributes of terminal output")
4485 (description
4486 "This Ruby library uses ANSI escape sequences to control the attributes
4487of terminal output.")
2f3800e5 4488 (home-page "https://flori.github.io/term-ansicolor/")
fd83a212
RW
4489 ;; There is no mention of the "or later" clause.
4490 (license license:gpl2)))
4491
a714c30f
CB
4492(define-public ruby-terraform
4493 (package
4494 (name "ruby-terraform")
4495 (version "0.22.0")
4496 (source
4497 (origin
4498 (method url-fetch)
4499 (uri (rubygems-uri "ruby-terraform" version))
4500 (sha256
4501 (base32
4502 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
4503 (build-system ruby-build-system)
4504 (arguments
4505 '(#:tests? #f)) ; No included tests
4506 (propagated-inputs
4507 `(("ruby-lino" ,ruby-lino)))
4508 (synopsis "Ruby wrapper around the Terraform command line interface")
4509 (description
4510 "This package provides a Ruby wrapper around the Terraform command line
4511interface so that Terraform can be more easily invoked from Ruby code.")
4512 (home-page "https://github.com/infrablocks/ruby_terraform")
4513 (license license:expat)))
4514
6e376ca4
RW
4515(define-public ruby-pstree
4516 (package
4517 (name "ruby-pstree")
4518 (version "0.1.0")
4519 (source (origin
4520 (method url-fetch)
4521 (uri (rubygems-uri "pstree" version))
4522 (sha256
4523 (base32
4524 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
4525 (build-system ruby-build-system)
4526 (native-inputs
4527 `(("ruby-gem-hadar" ,ruby-gem-hadar)
4528 ("bundler" ,bundler)))
4529 (synopsis "Create a process tree data structure")
4530 (description
4531 "This library uses the output of the @code{ps} command to create a
4532process tree data structure for the current host.")
2f3800e5 4533 (home-page "https://github.com/flori/pstree")
6e376ca4
RW
4534 ;; There is no mention of the "or later" clause.
4535 (license license:gpl2)))
4536
53239b5f
RW
4537(define-public ruby-utils
4538 (package
4539 (name "ruby-utils")
cd698b6e 4540 (version "0.9.0")
53239b5f
RW
4541 (source (origin
4542 (method url-fetch)
4543 (uri (rubygems-uri "utils" version))
4544 (sha256
4545 (base32
cd698b6e 4546 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
53239b5f
RW
4547 (build-system ruby-build-system)
4548 (propagated-inputs
4549 `(("ruby-tins" ,ruby-tins)
4550 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
4551 ("ruby-pstree" ,ruby-pstree)
4552 ("ruby-pry-editline" ,ruby-pry-editline)))
4553 (native-inputs
4554 `(("ruby-gem-hadar" ,ruby-gem-hadar)
4555 ("bundler" ,bundler)))
4556 (synopsis "Command line tools for working with Ruby")
4557 (description
4558 "This package provides assorted command line tools that may be useful
4559when working with Ruby code.")
4560 (home-page "https://github.com/flori/utils")
4561 ;; There is no mention of the "or later" clause.
4562 (license license:gpl2)))
4563
433f10b5
CB
4564(define-public ruby-jaro-winkler
4565 (package
4566 (name "ruby-jaro-winkler")
37b23e44 4567 (version "1.5.4")
433f10b5
CB
4568 (source
4569 (origin
4570 (method url-fetch)
4571 (uri (rubygems-uri "jaro_winkler" version))
4572 (sha256
37b23e44 4573 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
433f10b5
CB
4574 (build-system ruby-build-system)
4575 (arguments
37b23e44 4576 '(#:tests? #f)) ; no included tests
433f10b5
CB
4577 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
4578 (description
4579 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
4580algorithm. It is written as a C extension and will fallback to a pure Ruby
4581implementation on platforms where this is unsupported.")
4582 (home-page "https://github.com/tonytonyjan/jaro_winkler")
4583 (license license:expat)))
4584
c99e2247
DT
4585(define-public ruby-json
4586 (package
4587 (name "ruby-json")
a281acce 4588 (version "2.1.0")
c99e2247
DT
4589 (source
4590 (origin
4591 (method url-fetch)
4592 (uri (rubygems-uri "json" version))
4593 (sha256
4594 (base32
a281acce 4595 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
c99e2247
DT
4596 (build-system ruby-build-system)
4597 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
4598 (synopsis "JSON library for Ruby")
4599 (description "This Ruby library provides a JSON implementation written as
4600a native C extension.")
4601 (home-page "http://json-jruby.rubyforge.org/")
4602 (license (list license:ruby license:gpl2)))) ; GPL2 only
5ff89a1b 4603
763624f5
RW
4604(define-public ruby-json-pure
4605 (package
4606 (name "ruby-json-pure")
1c65d99f 4607 (version "2.2.0")
763624f5
RW
4608 (source (origin
4609 (method url-fetch)
4610 (uri (rubygems-uri "json_pure" version))
4611 (sha256
4612 (base32
1c65d99f 4613 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
763624f5
RW
4614 (build-system ruby-build-system)
4615 (arguments
ac01cb07 4616 `(#:phases
763624f5 4617 (modify-phases %standard-phases
ac01cb07 4618 (add-after 'unpack 'fix-rakefile
763624f5 4619 (lambda _
ac01cb07
BW
4620 (substitute* "Rakefile"
4621 ;; Since this is not a git repository, do not call 'git'.
4622 (("`git ls-files`") "`find . -type f |sort`")
4623 ;; Loosen dependency constraint.
4624 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
4625 #t))
4626 (add-after 'replace-git-ls-files 'regenerate-gemspec
4627 (lambda _
4628 ;; Regenerate gemspec so loosened dependency constraints are
4629 ;; propagated.
17cfb7ae
CB
4630 (invoke "rake" "gemspec")))
4631 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
4632 (lambda _
4633 ;; This gemspec doesn't look to be generated by the above
4634 ;; command, so patch it separately.
4635 (substitute* "json-java.gemspec"
4636 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
4637 "%q<test-unit>.freeze, [\">= 2.0\"]"))
4638 #t)))))
763624f5 4639 (native-inputs
ac01cb07 4640 `(("bundler" ,bundler)
0c9f73cd
TGR
4641 ("ragel" ,ragel)
4642 ("ruby-simplecov" ,ruby-simplecov)
4643 ("ruby-test-unit" ,ruby-test-unit)))
763624f5
RW
4644 (synopsis "JSON implementation in pure Ruby")
4645 (description
4646 "This package provides a JSON implementation written in pure Ruby.")
1c65d99f 4647 (home-page "https://flori.github.com/json/")
763624f5
RW
4648 (license license:ruby)))
4649
2a8581ac
CB
4650(define-public ruby-jwt
4651 (package
4652 (name "ruby-jwt")
4653 (version "2.1.0")
4654 (source
4655 (origin
4656 (method url-fetch)
4657 (uri (rubygems-uri "jwt" version))
4658 (sha256
4659 (base32
4660 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
4661 (build-system ruby-build-system)
4662 (arguments
4663 '(#:test-target "test"
4664 #:phases
4665 (modify-phases %standard-phases
4666 (add-after 'unpack 'remove-unnecessary-dependencies
4667 (lambda _
4668 (substitute* "spec/spec_helper.rb"
4669 (("require 'simplecov.*") "\n")
4670 ;; Use [].each to disable running the SimpleCov configuration
4671 ;; block
4672 (("SimpleCov\\.configure") "[].each")
4673 (("require 'codeclimate-test-reporter'") "")
4674 (("require 'codacy-coverage'") "")
4675 (("Codacy::Reporter\\.start") ""))
4676 #t)))))
4677 (native-inputs
4678 `(("bundler" ,bundler)
4679 ("ruby-rspec" ,ruby-rspec)
4680 ("ruby-rbnacl" ,ruby-rbnacl)))
4681 (synopsis "Ruby implementation of the JSON Web Token standard")
4682 (description
4683 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
4684@acronym{JWT, JSON Web Token} standard.")
4685 (home-page "https://github.com/jwt/ruby-jwt")
4686 (license license:expat)))
4687
16b324cd
RW
4688;; Even though this package only provides bindings for a Mac OSX API it is
4689;; required by "ruby-listen" at runtime.
4690(define-public ruby-rb-fsevent
4691 (package
4692 (name "ruby-rb-fsevent")
b0ef15ed 4693 (version "0.10.3")
16b324cd
RW
4694 (source (origin
4695 (method url-fetch)
4696 (uri (rubygems-uri "rb-fsevent" version))
4697 (sha256
4698 (base32
b0ef15ed 4699 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
16b324cd
RW
4700 (build-system ruby-build-system)
4701 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
4702 ;; "listen", which needs "rb-fsevent" at runtime.
4703 (arguments `(#:tests? #f))
4704 (synopsis "FSEvents API with signals catching")
4705 (description
4706 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
4707 (home-page "https://rubygems.org/gems/rb-fsevent")
4708 (license license:expat)))
4709
b86be2ad
RW
4710(define-public ruby-listen
4711 (package
4712 (name "ruby-listen")
12341d34 4713 (version "3.2.0")
b86be2ad
RW
4714 (source
4715 (origin
35602819
CB
4716 ;; The gem does not include a Rakefile, so fetch from the Git
4717 ;; repository.
4718 (method git-fetch)
4719 (uri (git-reference
4720 (url "https://github.com/guard/listen.git")
4721 (commit (string-append "v" version))))
4722 (file-name (git-file-name name version))
b86be2ad
RW
4723 (sha256
4724 (base32
12341d34 4725 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
b86be2ad 4726 (build-system ruby-build-system)
35602819
CB
4727 (arguments
4728 `(#:test-target "spec"
4729 #:phases
4730 (modify-phases %standard-phases
4731 (add-after 'unpack 'fix-files-in-gemspec
4732 (lambda _
4733 (substitute* "listen.gemspec"
4734 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
4735 #t))
4736 (add-before 'check 'remove-unnecessary-dependencies'
4737 (lambda _
4738 (substitute* "Rakefile"
4739 ;; Rubocop is for code linting, and is unnecessary for running
4740 ;; the tests.
4741 ((".*rubocop.*") ""))
4742 #t)))))
4743 (native-inputs
4744 `(("bundler" ,bundler)
4745 ("ruby-rspec" ,ruby-rspec)))
4746 (inputs
4747 `(;; ruby-thor is used for the command line interface, and is referenced
4748 ;; in the wrapper, and therefore just needs to be an input.
4749 ("ruby-thor" ,ruby-thor)))
b86be2ad 4750 (propagated-inputs
35602819
CB
4751 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
4752 ("ruby-rb-inotify" ,ruby-rb-inotify)
4753 ("ruby-dep" ,ruby-dep)))
b86be2ad
RW
4754 (synopsis "Listen to file modifications")
4755 (description "The Listen gem listens to file modifications and notifies
4756you about the changes.")
4757 (home-page "https://github.com/guard/listen")
4758 (license license:expat)))
4759
8d3c5ff6
CB
4760(define-public ruby-loofah
4761 (package
4762 (name "ruby-loofah")
4763 (version "2.2.3")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri (rubygems-uri "loofah" version))
4768 (sha256
4769 (base32
4770 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
4771 (build-system ruby-build-system)
4772 (arguments
4773 '(#:phases
4774 (modify-phases %standard-phases
4775 (add-after 'unpack 'remove-unnecessary-dependencies
4776 (lambda _
4777 ;; concourse is a development tool which is unused, so remove it
4778 ;; so it's not required.
4779 (substitute* "Gemfile"
4780 ((".*\"concourse\".*") "\n"))
4781 (substitute* "Rakefile"
4782 (("require 'concourse'") "")
4783 (("Concourse\\.new.*") "\n"))
4784 #t)))))
4785 (native-inputs
4786 `(("ruby-hoe" ,ruby-hoe)
4787 ("ruby-rr" ,ruby-rr)))
4788 (propagated-inputs
4789 `(("ruby-nokogiri" ,ruby-nokogiri)
4790 ("ruby-crass" ,ruby-crass)))
4791 (synopsis "Ruby library for manipulating and transforming HTML/XML")
4792 (description
4793 "Loofah is a general library for manipulating and transforming HTML/XML
4794documents and fragments. It's built on top of Nokogiri and libxml2.")
4795 (home-page "https://github.com/flavorjones/loofah")
4796 (license license:expat)))
4797
5ff89a1b
DT
4798(define-public ruby-activesupport
4799 (package
4800 (name "ruby-activesupport")
bcf1fe5b 4801 (version "5.2.2.1")
5ff89a1b
DT
4802 (source
4803 (origin
4804 (method url-fetch)
4805 (uri (rubygems-uri "activesupport" version))
4806 (sha256
4807 (base32
bcf1fe5b 4808 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
5ff89a1b
DT
4809 (build-system ruby-build-system)
4810 (arguments
2af45e50
BW
4811 `(#:phases
4812 (modify-phases %standard-phases
4813 (replace 'check
4814 (lambda _
9923d5a4
TGR
4815 ;; There are no tests, instead attempt to load the library.
4816 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
5ff89a1b 4817 (propagated-inputs
2af45e50
BW
4818 `(("ruby-concurrent" ,ruby-concurrent)
4819 ("ruby-i18n" ,ruby-i18n)
5ff89a1b 4820 ("ruby-minitest" ,ruby-minitest)
606ee9a1
BW
4821 ("ruby-tzinfo" ,ruby-tzinfo)
4822 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
5ff89a1b
DT
4823 (synopsis "Ruby on Rails utility library")
4824 (description "ActiveSupport is a toolkit of support libraries and Ruby
4825core extensions extracted from the Rails framework. It includes support for
4826multibyte strings, internationalization, time zones, and testing.")
4827 (home-page "http://www.rubyonrails.org")
4828 (license license:expat)))
f847ad7b 4829
3996f0aa
RW
4830(define-public ruby-crass
4831 (package
4832 (name "ruby-crass")
a0e0f9d7 4833 (version "1.0.4")
3996f0aa
RW
4834 (source (origin
4835 (method url-fetch)
4836 (uri (rubygems-uri "crass" version))
4837 (sha256
4838 (base32
a0e0f9d7 4839 "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"))))
3996f0aa
RW
4840 (build-system ruby-build-system)
4841 (native-inputs
4842 `(("bundler" ,bundler)
4843 ("ruby-minitest" ,ruby-minitest)))
4844 (synopsis "Pure Ruby CSS parser")
4845 (description
4846 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
4847 (home-page "https://github.com/rgrove/crass/")
4848 (license license:expat)))
4849
c2c4e5b2 4850(define-public ruby-nokogumbo
f1ae7c62
BW
4851 (let ((commit "fb51ff299a1c34346837580b6d1d9a60fadf5dbd"))
4852 (package
4853 (name "ruby-nokogumbo")
4854 (version (string-append "1.4.7-1." (string-take commit 8)))
4855 (source (origin
4856 ;; We use the git reference, because there's no Rakefile in the
4857 ;; published gem and the tarball on Github is outdated.
4858 (method git-fetch)
4859 (uri (git-reference
4860 (url "https://github.com/rubys/nokogumbo.git")
4861 (commit "d56f954d20a")))
4862 (file-name (string-append name "-" version "-checkout"))
4863 (sha256
4864 (base32
4865 "0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
4866 (build-system ruby-build-system)
4867 (arguments
4868 `(#:modules ((guix build ruby-build-system)
4869 (guix build utils)
4870 (ice-9 rdelim))
4871 #:phases
4872 (modify-phases %standard-phases
5c31e981 4873 (add-after 'unpack 'build-gemspec
f1ae7c62
BW
4874 (lambda _
4875 (substitute* "Rakefile"
4876 ;; Build Makefile even without a copy of gumbo-parser sources
4877 (("'gumbo-parser/src',") "")
4878 ;; We don't bundle gumbo-parser sources
4879 (("'gumbo-parser/src/\\*',") "")
4880 (("'gumbo-parser/visualc/include/\\*',") "")
4881 ;; The definition of SOURCES will be cut in gemspec, and
4882 ;; "FileList" will be undefined.
4883 (("SOURCES \\+ FileList\\[")
4884 "['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', "))
4885
4886 ;; Copy the Rakefile and cut out the gemspec.
4887 (copy-file "Rakefile" ".gemspec")
4888 (with-atomic-file-replacement ".gemspec"
4889 (lambda (in out)
4890 (let loop ((line (read-line in 'concat))
4891 (skipping? #t))
4892 (if (eof-object? line)
4893 #t
4894 (let ((skip-next? (if skipping?
4895 (not (string-prefix? "SPEC =" line))
4896 (string-prefix? "end" line))))
4897 (when (or (not skipping?)
4898 (and skipping? (not skip-next?)))
4899 (format #t "~a" line)
4900 (display line out))
4901 (loop (read-line in 'concat) skip-next?))))))
4902 #t)))))
4903 (inputs
4904 `(("gumbo-parser" ,gumbo-parser)))
4905 (propagated-inputs
4906 `(("ruby-nokogiri" ,ruby-nokogiri)))
4907 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
4908 (description
4909 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
c2c4e5b2 4910access the result as a Nokogiri parsed document.")
f1ae7c62
BW
4911 (home-page "https://github.com/rubys/nokogumbo/")
4912 (license license:asl2.0))))
c2c4e5b2 4913
d56ff88b
RW
4914(define-public ruby-sanitize
4915 (package
4916 (name "ruby-sanitize")
f812145e 4917 (version "4.6.3")
d56ff88b
RW
4918 (source (origin
4919 (method url-fetch)
4920 ;; The gem does not include the Rakefile, so we download the
4921 ;; release tarball from Github.
4922 (uri (string-append "https://github.com/rgrove/"
4923 "sanitize/archive/v" version ".tar.gz"))
4924 (file-name (string-append name "-" version ".tar.gz"))
4925 (sha256
4926 (base32
f812145e 4927 "1fmqppwif3cm8h79006jfzkdnlxxzlry9kzk03psk0d5xpg55ycc"))))
d56ff88b
RW
4928 (build-system ruby-build-system)
4929 (propagated-inputs
4930 `(("ruby-crass" ,ruby-crass)
4931 ("ruby-nokogiri" ,ruby-nokogiri)
4932 ("ruby-nokogumbo" ,ruby-nokogumbo)))
4933 (native-inputs
4934 `(("bundler" ,bundler)
4935 ("ruby-minitest" ,ruby-minitest)
4936 ("ruby-redcarpet" ,ruby-redcarpet)
4937 ("ruby-yard" ,ruby-yard)))
4938 (synopsis "Whitelist-based HTML and CSS sanitizer")
4939 (description
4940 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
4941acceptable elements, attributes, and CSS properties, Sanitize will remove all
4942unacceptable HTML and/or CSS from a string.")
4943 (home-page "https://github.com/rgrove/sanitize/")
4944 (license license:expat)))
4945
ed4b6b18
BW
4946(define-public ruby-oj
4947 (package
4948 (name "ruby-oj")
93dfdec5 4949 (version "3.10.1")
ed4b6b18
BW
4950 (source
4951 (origin
b09ef660 4952 (method git-fetch)
ed4b6b18
BW
4953 ;; Version on rubygems.org does not contain Rakefile, so download from
4954 ;; GitHub instead.
b09ef660
EF
4955 (uri (git-reference
4956 (url "https://github.com/ohler55/oj")
4957 (commit (string-append "v" version))))
4958 (file-name (git-file-name name version))
ed4b6b18
BW
4959 (sha256
4960 (base32
93dfdec5 4961 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
ed4b6b18
BW
4962 (build-system ruby-build-system)
4963 (arguments
4964 '(#:test-target "test_all"
4965 #:phases
4966 (modify-phases %standard-phases
4967 (add-before 'check 'disable-bundler
4968 (lambda _
4969 (substitute* "Rakefile"
4970 (("Bundler\\.with_clean_env") "1.times")
4971 (("bundle exec ") "")))))))
4972 (native-inputs
4973 `(("bundler" ,bundler)
4974 ("ruby-rspec" ,ruby-rspec)
4975 ("ruby-rake-compiler" ,ruby-rake-compiler)))
4976 (synopsis "JSON parser for Ruby optimized for speed")
4977 (description
4978 "Oj is a JSON parser and generator for Ruby, where the encoding and
4979decoding of JSON is implemented as a C extension to Ruby.")
b09ef660 4980 (home-page "http://www.ohler.com/oj/")
ed4b6b18
BW
4981 (license (list license:expat ; Ruby code
4982 license:bsd-3)))) ; extension code
4983
f847ad7b
DT
4984(define-public ruby-ox
4985 (package
4986 (name "ruby-ox")
263c0dbf 4987 (version "2.6.0")
f847ad7b
DT
4988 (source
4989 (origin
4990 (method url-fetch)
4991 (uri (rubygems-uri "ox" version))
4992 (sha256
4993 (base32
263c0dbf 4994 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
f847ad7b
DT
4995 (build-system ruby-build-system)
4996 (arguments
4997 '(#:tests? #f)) ; no tests
4998 (synopsis "Optimized XML library for Ruby")
4999 (description
5000 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
5001written as a native C extension. It was designed to be an alternative to
5002Nokogiri and other Ruby XML parsers for generic XML parsing and as an
5003alternative to Marshal for Object serialization. ")
5004 (home-page "http://www.ohler.com/ox")
5005 (license license:expat)))
4a9e0585 5006
0c4e7625
RW
5007(define-public ruby-redcloth
5008 (package
5009 (name "ruby-redcloth")
2a91494e 5010 (version "4.3.2")
0c4e7625
RW
5011 (source (origin
5012 (method url-fetch)
5013 (uri (rubygems-uri "RedCloth" version))
5014 (sha256
5015 (base32
2a91494e 5016 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
0c4e7625
RW
5017 (build-system ruby-build-system)
5018 (arguments
5019 `(#:tests? #f ; no tests
5020 #:phases
5021 (modify-phases %standard-phases
5022 ;; Redcloth has complicated rake tasks to build various versions for
5023 ;; multiple targets using RVM. We don't want this so we just use the
5024 ;; existing gemspec.
5025 (replace 'build
5026 (lambda _
9923d5a4 5027 (invoke "gem" "build" "redcloth.gemspec"))))))
0c4e7625
RW
5028 (native-inputs
5029 `(("bundler" ,bundler)
5030 ("ruby-diff-lcs" ,ruby-diff-lcs)
5031 ("ruby-rspec-2" ,ruby-rspec-2)))
5032 (synopsis "Textile markup language parser for Ruby")
5033 (description
5034 "RedCloth is a Ruby parser for the Textile markup language.")
5035 (home-page "http://redcloth.org")
5036 (license license:expat)))
5037
4a9e0585
DT
5038(define-public ruby-pg
5039 (package
5040 (name "ruby-pg")
ffc4869e 5041 (version "1.1.4")
4a9e0585
DT
5042 (source
5043 (origin
5044 (method url-fetch)
5045 (uri (rubygems-uri "pg" version))
5046 (sha256
5047 (base32
ffc4869e 5048 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
4a9e0585
DT
5049 (build-system ruby-build-system)
5050 (arguments
5051 '(#:test-target "spec"))
5052 (native-inputs
5053 `(("ruby-rake-compiler" ,ruby-rake-compiler)
5054 ("ruby-hoe" ,ruby-hoe)
5055 ("ruby-rspec" ,ruby-rspec)))
5056 (inputs
ffc4869e 5057 `(("postgresql" ,postgresql)))
4a9e0585
DT
5058 (synopsis "Ruby interface to PostgreSQL")
5059 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
4db80f8b 5060with PostgreSQL 9.0 and later.")
4a9e0585
DT
5061 (home-page "https://bitbucket.org/ged/ruby-pg")
5062 (license license:ruby)))
468e5657
DT
5063
5064(define-public ruby-byebug
5065 (package
5066 (name "ruby-byebug")
d5489a61 5067 (version "9.0.6")
468e5657
DT
5068 (source
5069 (origin
5070 (method url-fetch)
5071 (uri (rubygems-uri "byebug" version))
5072 (sha256
5073 (base32
d5489a61 5074 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
468e5657
DT
5075 (build-system ruby-build-system)
5076 (arguments
5077 '(#:tests? #f)) ; no tests
5078 (synopsis "Debugger for Ruby 2")
5079 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
5080TracePoint C API for execution control and the Debug Inspector C API for call
5081stack navigation. The core component provides support that front-ends can
5082build on. It provides breakpoint handling and bindings for stack frames among
5083other things and it comes with a command line interface.")
7bf837fd 5084 (home-page "https://github.com/deivid-rodriguez/byebug")
468e5657 5085 (license license:bsd-2)))
64b6ccc3 5086
5799bc2b
RW
5087(define-public ruby-netrc
5088 (package
5089 (name "ruby-netrc")
5090 (version "0.11.0")
5091 (source (origin
5092 (method url-fetch)
5093 (uri (rubygems-uri "netrc" version))
5094 (sha256
5095 (base32
5096 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
5097 (build-system ruby-build-system)
5098 (arguments
5099 `(#:phases
5100 (modify-phases %standard-phases
5101 (replace 'check
5102 ;; There is no Rakefile and minitest can only run one file at once,
5103 ;; so we have to iterate over all test files.
5104 (lambda _
9923d5a4
TGR
5105 (map (lambda (file)
5106 (invoke "ruby" "-Itest" file))
5107 (find-files "./test" "test_.*\\.rb")))))))
5799bc2b
RW
5108 (native-inputs
5109 `(("ruby-minitest" ,ruby-minitest)))
5110 (synopsis "Library to read and update netrc files")
5111 (description
5112 "This library can read and update netrc files, preserving formatting
5113including comments and whitespace.")
5114 (home-page "https://github.com/geemus/netrc")
5115 (license license:expat)))
5116
3a6989ce
RW
5117(define-public ruby-unf-ext
5118 (package
5119 (name "ruby-unf-ext")
14db8f19 5120 (version "0.0.7.6")
3a6989ce
RW
5121 (source (origin
5122 (method url-fetch)
5123 (uri (rubygems-uri "unf_ext" version))
5124 (sha256
5125 (base32
14db8f19 5126 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
3a6989ce 5127 (build-system ruby-build-system)
b809cc9a
RW
5128 (arguments
5129 `(#:phases
5130 (modify-phases %standard-phases
5131 (add-after 'build 'build-ext
14db8f19
MB
5132 (lambda _ (invoke "rake" "compile:unf_ext")))
5133 (add-before 'check 'lose-rake-compiler-dock-dependency
5134 (lambda _
5135 ;; rake-compiler-dock is listed in the gemspec, but only
5136 ;; required when cross-compiling.
5137 (substitute* "unf_ext.gemspec"
5138 ((".*rake-compiler-dock.*") ""))
5139 #t)))))
3a6989ce
RW
5140 (native-inputs
5141 `(("bundler" ,bundler)
5142 ("ruby-rake-compiler" ,ruby-rake-compiler)
5143 ("ruby-test-unit" ,ruby-test-unit)))
5144 (synopsis "Unicode normalization form support library")
5145 (description
5146 "This package provides unicode normalization form support for Ruby.")
5147 (home-page "https://github.com/knu/ruby-unf_ext")
5148 (license license:expat)))
5149
2632a067 5150(define-public ruby-tdiff
5071f17b
BW
5151 ;; Use a newer than released snapshot so that rspec-2 is not required.
5152 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
5153 (package
5154 (name "ruby-tdiff")
5155 (version (string-append "0.3.3-1." (string-take commit 8)))
5156 (source (origin
5157 (method git-fetch)
5158 (uri (git-reference
5159 (url "https://github.com/postmodern/tdiff.git")
5160 (commit commit)))
5161 (file-name (string-append name "-" version "-checkout"))
5162 (sha256
5163 (base32
5164 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
5165 (build-system ruby-build-system)
5166 (native-inputs
5167 `(("ruby-rspec" ,ruby-rspec)
5168 ("ruby-yard" ,ruby-yard)
5169 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
5170 (synopsis "Calculate the differences between two tree-like structures")
5171 (description
5172 "This library provides functions to calculate the differences between two
2632a067 5173tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
5071f17b
BW
5174 (home-page "https://github.com/postmodern/tdiff")
5175 (license license:expat))))
2632a067 5176
f60f5002 5177(define-public ruby-nokogiri-diff
5b0c223a
BW
5178 ;; Use a newer than released snapshot so that rspec-2 is not required.
5179 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
5180 (package
5181 (name "ruby-nokogiri-diff")
5182 (version (string-append "0.2.0-1." (string-take commit 8)))
5183 (source (origin
5184 (method git-fetch)
5185 (uri (git-reference
5186 (url "https://github.com/postmodern/nokogiri-diff.git")
5187 (commit commit)))
5188 (file-name (string-append name "-" version "-checkout"))
5189 (sha256
5190 (base32
5191 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
5192 (build-system ruby-build-system)
5193 (propagated-inputs
5194 `(("ruby-tdiff" ,ruby-tdiff)
5195 ("ruby-nokogiri" ,ruby-nokogiri)))
5196 (native-inputs
5197 `(("ruby-rspec" ,ruby-rspec)
5198 ("ruby-yard" ,ruby-yard)
5199 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
5200 (synopsis "Calculate the differences between two XML/HTML documents")
5201 (description
5202 "@code{Nokogiri::Diff} adds the ability to calculate the
f60f5002 5203differences (added or removed nodes) between two XML/HTML documents.")
5b0c223a
BW
5204 (home-page "https://github.com/postmodern/nokogiri-diff")
5205 (license license:expat))))
f60f5002 5206
6dc21310
CB
5207(define-public ruby-racc
5208 (package
5209 (name "ruby-racc")
5210 (version "1.4.14")
5211 (source
5212 (origin
5213 (method url-fetch)
5214 (uri (rubygems-uri "racc" version))
5215 (sha256
5216 (base32
5217 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
5218 (build-system ruby-build-system)
5219 (native-inputs
5220 `(("ruby-hoe" ,ruby-hoe)
5221 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5222 (synopsis "LALR(1) parser generator for Ruby")
5223 (description
5224 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
5225generates Ruby program.")
5226 (home-page "http://i.loveruby.net/en/projects/racc/")
5227 (license (list
5228 ;; Generally licensed under the LGPL2.1, and some files also
5229 ;; available under the same license as Ruby.
5230 license:lgpl2.1
5231 license:ruby))))
5232
64b6ccc3
DT
5233(define-public ruby-rack
5234 (package
5235 (name "ruby-rack")
288d2480 5236 (version "2.0.6")
64b6ccc3
DT
5237 (source
5238 (origin
83870c32 5239 (method git-fetch)
1db791d5 5240 ;; Download from GitHub so that the patch can be applied.
83870c32
EF
5241 (uri (git-reference
5242 (url "https://github.com/rack/rack")
5243 (commit version)))
5244 (file-name (git-file-name name version))
64b6ccc3
DT
5245 (sha256
5246 (base32
83870c32 5247 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
1db791d5
BW
5248 ;; Ignore test which fails inside the build environment but works
5249 ;; outside.
5250 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
64b6ccc3
DT
5251 (build-system ruby-build-system)
5252 (arguments
5253 '(#:phases
5254 (modify-phases %standard-phases
5255 (add-before 'check 'fix-tests
5256 (lambda _
5257 ;; A few of the tests use the length of a file on disk for
5258 ;; Content-Length and Content-Range headers. However, this file
5259 ;; has a shebang in it which an earlier phase patches, growing
5260 ;; the file size from 193 to 239 bytes when the store prefix is
5261 ;; "/gnu/store".
5262 (let ((size-diff (- (string-length (which "ruby"))
5263 (string-length "/usr/bin/env ruby"))))
5264 (substitute* '("test/spec_file.rb")
5265 (("193")
5266 (number->string (+ 193 size-diff)))
5267 (("bytes(.)22-33" all delimiter)
5268 (string-append "bytes"
5269 delimiter
5270 (number->string (+ 22 size-diff))
5271 "-"
5272 (number->string (+ 33 size-diff))))))
83870c32
EF
5273 #t))
5274 (add-before 'reset-gzip-timestamps 'make-files-writable
5275 (lambda* (#:key outputs #:allow-other-keys)
5276 ;; Make sure .gz files are writable so that the
5277 ;; 'reset-gzip-timestamps' phase can do its work.
5278 (let ((out (assoc-ref outputs "out")))
5279 (for-each make-file-writable
5280 (find-files out "\\.gz$"))
5281 #t))))))
64b6ccc3 5282 (native-inputs
1db791d5
BW
5283 `(("ruby-minitest" ,ruby-minitest)
5284 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
5285 ("which" ,which)))
5286 (propagated-inputs
5287 `(("ruby-concurrent" ,ruby-concurrent)))
64b6ccc3
DT
5288 (synopsis "Unified web application interface for Ruby")
5289 (description "Rack provides a minimal, modular and adaptable interface for
5290developing web applications in Ruby. By wrapping HTTP requests and responses,
5291it unifies the API for web servers, web frameworks, and software in between
5292into a single method call.")
2f3800e5 5293 (home-page "https://rack.github.io/")
64b6ccc3 5294 (license license:expat)))
62e4cc5a 5295
20a0f804
BW
5296(define-public ruby-rack-test
5297 (package
5298 (name "ruby-rack-test")
5299 (version "0.8.3")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (rubygems-uri "rack-test" version))
5304 (sha256
5305 (base32
5306 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
5307 (build-system ruby-build-system)
5308 (arguments
5309 ;; Disable tests because of circular dependencies: requires sinatra,
5310 ;; which requires rack-protection, which requires rack-test. Instead
5311 ;; simply require the library.
5312 `(#:phases
5313 (modify-phases %standard-phases
5314 (replace 'check
5315 (lambda _
5316 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
5317 (propagated-inputs
5318 `(("ruby-rack" ,ruby-rack)))
5319 (synopsis "Testing API for Rack applications")
5320 (description
5321 "Rack::Test is a small, simple testing API for Rack applications. It can
5322be used on its own or as a reusable starting point for Web frameworks and
5323testing libraries to build on.")
5324 (home-page "https://github.com/rack-test/rack-test")
5325 (license license:expat)))
5326
a0a7e690
BW
5327(define-public ruby-rack-protection
5328 (package
5329 (name "ruby-rack-protection")
3355e49c 5330 (version "2.0.5")
a0a7e690
BW
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (rubygems-uri "rack-protection" version))
5335 (sha256
5336 (base32
3355e49c 5337 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
a0a7e690
BW
5338 (build-system ruby-build-system)
5339 (arguments
fafeeaa2 5340 '(;; Tests missing from the gem.
a0a7e690
BW
5341 #:tests? #f))
5342 (propagated-inputs
5343 `(("ruby-rack" ,ruby-rack)))
5344 (native-inputs
5345 `(("bundler" ,bundler)
5346 ("ruby-rspec" ,ruby-rspec-2)
5347 ("ruby-rack-test" ,ruby-rack-test)))
5348 (synopsis "Rack middleware that protects against typical web attacks")
5349 (description "Rack middleware that can be used to protect against typical
5350web attacks. It can protect all Rack apps, including Rails. For instance, it
5351protects against cross site request forgery, cross site scripting,
5352clickjacking, directory traversal, session hijacking and IP spoofing.")
5353 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
5354 (license license:expat)))
5355
6edabcb2
CB
5356(define-public ruby-rainbow
5357 (package
5358 (name "ruby-rainbow")
5359 (version "3.0.0")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (rubygems-uri "rainbow" version))
5364 (sha256
5365 (base32
5366 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
5367 (build-system ruby-build-system)
5368 (arguments
5369 '(#:phases
5370 (modify-phases %standard-phases
5371 ;; Run rspec directly, to avoid requiring Rubocop which is used from
5372 ;; the Rakefile.
5373 (replace 'check
5374 (lambda* (#:key tests? #:allow-other-keys)
5375 (when tests?
5376 (invoke "rspec"))
5377 #t)))))
5378 (native-inputs
5379 `(("bundler" ,bundler)
5380 ("ruby-rspec" ,ruby-rspec)))
5381 (synopsis "Colorize printed text on ANSI terminals")
5382 (description
5383 "@code{rainbow} provides a string presenter object to colorize strings by
5384wrapping them in ANSI escape codes.")
5385 (home-page "https://github.com/sickill/rainbow")
79193b20
CB
5386 (license license:expat)))
5387
6188d643
CB
5388(define-public ruby-rr
5389 (package
5390 (name "ruby-rr")
5391 (version "1.2.1")
5392 (source
5393 (origin
5394 (method url-fetch)
5395 (uri (rubygems-uri "rr" version))
5396 (sha256
5397 (base32
5398 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
5399 (build-system ruby-build-system)
5400 (arguments
5401 '(#:tests? #f)) ; test files not included
5402 (native-inputs
5403 `(("bundler" ,bundler)
5404 ("ruby-rspec" ,ruby-rspec)))
5405 (synopsis "Ruby test double framework")
5406 (description
5407 "RR is a test double framework that features a rich selection of double
5408techniques and a terse syntax.")
5409 (home-page "https://rr.github.io/rr/")
5410 (license license:expat)))
5411
79193b20
CB
5412(define-public ruby-rest-client
5413 (package
5414 (name "ruby-rest-client")
5415 (version "2.0.2")
5416 (source
5417 (origin
5418 (method url-fetch)
5419 (uri (rubygems-uri "rest-client" version))
5420 (sha256
5421 (base32
5422 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
5423 (build-system ruby-build-system)
5424 (arguments
5425 '(#:phases
5426 (modify-phases %standard-phases
5427 (add-before 'check 'remove-unnecessary-development-dependencies
5428 (lambda _
5429 (substitute* "rest-client.gemspec"
5430 ;; Remove rubocop as it's unused. Rubocop also indirectly
5431 ;; depends on this package through ruby-parser and ruby-ast so
5432 ;; this avoids a dependency loop.
5433 ((".*rubocop.*") "\n")
5434 ;; Remove pry as it's unused, it's a debugging tool
5435 ((".*pry.*") "\n")
5436 ;; Remove an unnecessarily strict rdoc dependency
5437 ((".*rdoc.*") "\n"))
5438 #t))
5439 (add-before 'check 'delete-network-dependent-tests
5440 (lambda _
5441 (delete-file "spec/integration/request_spec.rb")
5442 (delete-file "spec/integration/httpbin_spec.rb")
5443 #t)))))
5444 (propagated-inputs
5445 `(("ruby-http-cookie" ,ruby-http-cookie)
5446 ("ruby-mime-types" ,ruby-mime-types)
5447 ("ruby-netrc" ,ruby-netrc)))
5448 (native-inputs
5449 `(("bundler" ,bundler)
eea094cc
TGR
5450 ("ruby-webmock" ,ruby-webmock-2)
5451 ("ruby-rspec" ,ruby-rspec)))
79193b20
CB
5452 (synopsis "Simple HTTP and REST client for Ruby")
5453 (description
5454 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
5455inspired by the Sinatra microframework style of specifying actions:
5456@code{get}, @code{put}, @code{post}, @code{delete}.")
5457 (home-page "https://github.com/rest-client/rest-client")
6edabcb2
CB
5458 (license license:expat)))
5459
5d8fe6de
CB
5460(define-public ruby-rubocop
5461 (package
5462 (name "ruby-rubocop")
865ba3f4 5463 (version "0.77.0")
5d8fe6de
CB
5464 (source
5465 (origin
5466 (method url-fetch)
5467 (uri (rubygems-uri "rubocop" version))
5468 (sha256
5469 (base32
865ba3f4 5470 "0m88b1bgbhmmbdnz2xv6n0il0j4q5qm9jbc0vf1zsaxmxqp06nx9"))))
5d8fe6de
CB
5471 (build-system ruby-build-system)
5472 (arguments
5473 '(;; No included tests
5474 #:tests? #f))
5475 (propagated-inputs
5476 `(("ruby-parser" ,ruby-parser)
5477 ("ruby-powerpack" ,ruby-powerpack)
5478 ("ruby-rainbow" ,ruby-rainbow)
5479 ("ruby-progressbar" ,ruby-progressbar)
5480 ("ruby-parallel" ,ruby-parallel)
5481 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
5482 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
5483 (synopsis "Ruby code style checking tool")
5484 (description
5485 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
5486the community-driven Ruby Style Guide.")
5487 (home-page "https://github.com/rubocop-hq/rubocop")
5488 (license license:expat)))
5489
6ef85256
BW
5490(define-public ruby-contest
5491 (package
5492 (name "ruby-contest")
5493 (version "0.1.3")
5494 (source
5495 (origin
5496 (method url-fetch)
5497 (uri (rubygems-uri "contest" version))
5498 (sha256
5499 (base32
5500 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
5501 (build-system ruby-build-system)
5502 (synopsis "Write declarative tests using nested contexts")
5503 (description
5504 "Contest allows writing declarative @code{Test::Unit} tests using nested
5505contexts without performance penalties.")
5506 (home-page "https://github.com/citrusbyte/contest")
5507 (license license:expat)))
5508
c4550f75
BW
5509(define-public ruby-creole
5510 (package
5511 (name "ruby-creole")
5512 (version "0.5.0")
5513 (source
5514 (origin
5515 (method url-fetch)
5516 (uri (rubygems-uri "creole" version))
5517 (sha256
5518 (base32
5519 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
5520 (build-system ruby-build-system)
5521 (native-inputs
5522 `(("ruby-bacon" ,ruby-bacon)))
5523 (synopsis "Creole markup language converter")
5524 (description
5525 "Creole is a lightweight markup language and this library for converting
5526creole to @code{HTML}.")
5527 (home-page "https://github.com/minad/creole")
5528 (license license:ruby)))
5529
6aaa815e
PP
5530(define-public ruby-docile
5531 (package
5532 (name "ruby-docile")
5533 (version "1.1.5")
5534 (source
5535 (origin
5536 (method url-fetch)
5537 (uri (rubygems-uri "docile" version))
5538 (sha256
5539 (base32
5540 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
5541 (build-system ruby-build-system)
5542 (arguments
5543 '(#:tests? #f)) ; needs github-markup, among others
5544 (synopsis "Ruby EDSL helper library")
5545 (description "Docile is a Ruby library that provides an interface for
5546creating embedded domain specific languages (EDSLs) that manipulate existing
5547Ruby classes.")
5548 (home-page "https://ms-ati.github.io/docile/")
5549 (license license:expat)))
5550
44514637 5551(define-public ruby-gherkin
62e4cc5a 5552 (package
44514637 5553 (name "ruby-gherkin")
aada5f6f 5554 (version "5.1.0")
62e4cc5a
PP
5555 (source
5556 (origin
5557 (method url-fetch)
44514637 5558 (uri (rubygems-uri "gherkin" version))
62e4cc5a
PP
5559 (sha256
5560 (base32
aada5f6f 5561 "1cgcdchwwdm10rsk44frjwqd4ihprhxjbm799nscqy2q1raqfj5s"))))
62e4cc5a
PP
5562 (build-system ruby-build-system)
5563 (native-inputs
5564 `(("bundler" ,bundler)))
5565 (arguments
5566 '(#:tests? #f)) ; needs simplecov, among others
5567 (synopsis "Gherkin parser for Ruby")
44514637 5568 (description "Gherkin is a parser and compiler for the Gherkin language.
aada5f6f
CB
5569It is intended be used by all Cucumber implementations to parse
5570@file{.feature} files.")
5571 (home-page "https://github.com/cucumber-attic/gherkin")
62e4cc5a 5572 (license license:expat)))
cd89fecb 5573
15b16c2c
CB
5574(define-public ruby-aruba
5575 (package
5576 (name "ruby-aruba")
cf7201c4 5577 (version "0.14.14")
15b16c2c
CB
5578 (source
5579 (origin
5580 (method url-fetch)
5581 (uri (rubygems-uri "aruba" version))
5582 (sha256
5583 (base32
cf7201c4 5584 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
15b16c2c
CB
5585 (build-system ruby-build-system)
5586 (arguments
5587 '(#:test-target "spec"
5588 #:phases
5589 (modify-phases %standard-phases
5590 (add-after 'unpack 'patch
5591 (lambda _
5592 (substitute* "spec/aruba/api_spec.rb"
5593 ;; This resolves some errors in the specs
5594 ;;
5595 ;; undefined method `parse' for Time:Class
5596 (("require 'spec_helper'")
5597 "require 'spec_helper'\nrequire 'time'"))
5598 ;; Avoid shebang issues in this spec file
5599 (substitute* "spec/aruba/matchers/command_spec.rb"
5600 (("/usr/bin/env bash")
5601 (which "bash")))
5602 #t))
5603 (add-before 'check 'remove-unnecessary-dependencies
5604 (lambda _
5605 (substitute* "Gemfile"
5606 ((".*byebug.*") "\n")
5607 ((".*pry.*") "\n")
5608 ((".*yaml.*") "\n")
5609 ((".*bcat.*") "\n")
5610 ((".*kramdown.*") "\n")
5611 ((".*rubocop.*") "\n")
5612 ((".*cucumber-pro.*") "\n")
5613 ((".*cucumber.*") "\n")
5614 ((".*license_finder.*") "\n")
5615 ((".*rake.*") "gem 'rake'\n")
15b16c2c 5616 ((".*relish.*") "\n"))
15b16c2c
CB
5617 (substitute* "aruba.gemspec"
5618 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
5619 "spec.add_runtime_dependency 'cucumber'"))
5620 #t))
5621 (add-before 'check 'set-home
5622 (lambda _ (setenv "HOME" "/tmp") #t)))))
5623 (native-inputs
5624 `(("bundler" ,bundler)
5625 ("ruby-rspec" ,ruby-rspec)
cf7201c4
CB
5626 ("ruby-fuubar" ,ruby-fuubar)
5627 ("ruby-simplecov" ,ruby-simplecov)))
15b16c2c
CB
5628 (propagated-inputs
5629 `(("ruby-childprocess" ,ruby-childprocess)
5630 ("ruby-contracts" ,ruby-contracts)
5631 ("ruby-cucumber" ,ruby-cucumber)
5632 ("ruby-ffi" ,ruby-ffi)
5633 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
5634 ("ruby-thor" ,ruby-thor)
5635 ("ruby-yard" ,ruby-yard)))
5636 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
5637 (description
5638 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
5639command-line applications. It supports applications written in any
5640language.")
5641 (home-page "https://github.com/cucumber/aruba")
5642 (license license:expat)))
5643
5644;; A version of ruby-aruba without tests run so that circular dependencies can
5645;; be avoided.
5646(define ruby-aruba-without-tests
5647 (package
5648 (inherit ruby-aruba)
5649 (arguments '(#:tests? #f))
5650 (propagated-inputs
5651 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
5652 ,@(alist-delete "ruby-cucumber"
5653 (package-propagated-inputs ruby-aruba))))
5654 (native-inputs '())))
5655
5656(define-public ruby-cucumber
5657 (package
5658 (name "ruby-cucumber")
5659 (version "3.1.2")
5660 (source
5661 (origin
5662 (method git-fetch)
5663 (uri (git-reference
5664 (url "https://github.com/cucumber/cucumber-ruby.git")
5665 (commit (string-append "v" version))))
5666 (file-name (git-file-name name version))
5667 (sha256
5668 (base32
5669 "0764wp2cjg60qa3l69q1dxda5g06a01n5w92szqbf89d2hgl47n3"))))
5670 (build-system ruby-build-system)
5671 (arguments
5672 '(#:test-target "spec"
5673 #:phases
5674 (modify-phases %standard-phases
5675 ;; Don't run or require rubocop, the code linting tool, as this is a
5676 ;; bit unnecessary.
5677 (add-after 'unpack 'dont-run-rubocop
5678 (lambda _
5679 (substitute* "Rakefile"
5680 ((".*rubocop/rake\\_task.*") "")
5681 ((".*RuboCop.*") ""))
5682 #t)))))
5683 (propagated-inputs
5684 `(("ruby-builder" ,ruby-builder)
5685 ("ruby-cucumber-core" ,ruby-cucumber-core)
5686 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
5687 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
5688 ("ruby-diff-lcs" ,ruby-diff-lcs)
5689 ("ruby-gherkin" ,ruby-gherkin)
5690 ("ruby-multi-json" ,ruby-multi-json)
5691 ("ruby-multi-test" ,ruby-multi-test)))
5692 (native-inputs
5693 `(("bundler" ,bundler)
5694 ;; Use a untested version of aruba, to avoid a circular dependency, as
5695 ;; ruby-aruba depends on ruby-cucumber.
5696 ("ruby-aruba", ruby-aruba-without-tests)
5697 ("ruby-rspec" ,ruby-rspec)
5698 ("ruby-pry" ,ruby-pry)
5699 ("ruby-nokogiri" ,ruby-nokogiri)))
5700 (synopsis "Describe automated tests in plain language")
5701 (description
5702 "Cucumber is a tool for running automated tests written in plain
5703language. It's designed to support a Behaviour Driven Development (BDD)
5704software development workflow.")
5705 (home-page "https://cucumber.io/")
5706 (license license:expat)))
5707
5708(define ruby-cucumber-without-tests
5709 (package (inherit ruby-cucumber)
5710 (arguments
5711 '(#:tests? #f))
5712 (native-inputs
5713 '())))
5714
cd89fecb
PP
5715(define-public ruby-cucumber-core
5716 (package
5717 (name "ruby-cucumber-core")
5cd047e8
CB
5718 ;; Stick to major version 3, until version 4 of Cucumber is released.
5719 (version "3.2.1")
cd89fecb
PP
5720 (source
5721 (origin
5722 (method url-fetch)
5723 (uri (rubygems-uri "cucumber-core" version))
5724 (sha256
5725 (base32
5cd047e8 5726 "1iavlh8hqj9lwljbpkw06259gdicbr1bdb6pbj5yy3n8szgr8k3c"))))
cd89fecb
PP
5727 (build-system ruby-build-system)
5728 (propagated-inputs
5cd047e8
CB
5729 `(("ruby-backports" ,ruby-backports)
5730 ("ruby-gherkin" ,ruby-gherkin)
5731 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
cd89fecb
PP
5732 (native-inputs
5733 `(("bundler" ,bundler)))
5734 (arguments
5735 '(#:tests? #f)) ; needs simplecov, among others
5736 (synopsis "Core library for the Cucumber BDD app")
5737 (description "Cucumber is a tool for running automated tests
5738written in plain language. Because they're written in plain language,
5739they can be read by anyone on your team. Because they can be read by
5740anyone, you can use them to help improve communication, collaboration
5741and trust on your team.")
5742 (home-page "https://cucumber.io/")
5743 (license license:expat)))
212d563d 5744
fb1a8954
CB
5745(define-public ruby-cucumber-expressions
5746 (package
5747 (name "ruby-cucumber-expressions")
5748 (version "6.0.1")
5749 (source
5750 (origin
5751 (method url-fetch)
5752 (uri (rubygems-uri "cucumber-expressions" version))
5753 (sha256
5754 (base32
5755 "0zwmv6hznyz9vk81f5dhwcr9jhxx2vmbk8yyazayvllvhy0fkpdw"))))
5756 (build-system ruby-build-system)
5757 (arguments
5758 '(#:test-target "spec"))
5759 (native-inputs
5760 `(("bundler" ,bundler)
5761 ("ruby-rspec" ,ruby-rspec)
5762 ("ruby-simplecov" ,ruby-simplecov)))
5763 (synopsis "Simpler alternative to Regular Expressions")
5764 (description "Cucumber Expressions offer similar functionality to Regular
5765Expressions, with a syntax that is easier to read and write. Cucumber
5766Expressions are extensible with parameter types.")
5767 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
5768 (license license:expat)))
5769
ce872770
CB
5770(define-public ruby-cucumber-wire
5771 (package
5772 (name "ruby-cucumber-wire")
5773 ;; Package version 0.0.1 initially, as this is what's needed by Cucumber
5774 ;; 3, and Cucumber 4 hasn't been released yet.
5775 (version "0.0.1")
5776 (source
5777 (origin
5778 (method url-fetch)
5779 (uri (rubygems-uri "cucumber-wire" version))
5780 (sha256
5781 (base32
5782 "09ymvqb0sbw2if1nxg8rcj33sf0va88ancq5nmp8g01dfwzwma2f"))))
5783 (build-system ruby-build-system)
5784 (arguments
5785 '(;; TODO: Currently, the tests can't be run as cucumber is required,
5786 ;; which would lead to a circular dependency.
5787 #:tests? #f
5788 #:test-target "default"
5789 #:phases
5790 (modify-phases %standard-phases
5791 (add-before 'check 'set-CUCUMBER_USE_RELEASED_GEMS
5792 (lambda _
5793 (setenv "CUCUMBER_USE_RELEASED_GEMS" "true")
5794 #t)))))
5795 (native-inputs
5796 `(("bundler" ,bundler)
5797 ("ruby-rspec" ,ruby-rspec)))
5798 (synopsis "Cucumber wire protocol plugin")
5799 (description
5800 "Cucumber's wire protocol allows step definitions to be implemented and
5801invoked on any platform.")
5802 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
5803 (license license:expat)))
5804
0ce8f344
CB
5805(define-public ruby-cucumber-tag-expressions
5806 (package
5807 (name "ruby-cucumber-tag-expressions")
5808 (version "1.1.1")
5809 (source
5810 (origin
5811 (method url-fetch)
5812 (uri (rubygems-uri "cucumber-tag_expressions" version))
5813 (sha256
5814 (base32
5815 "0cvmbljybws0qzjs1l67fvr9gqr005l8jk1ni5gcsis9pfmqh3vc"))))
5816 (build-system ruby-build-system)
5817 (arguments
5818 '(#:phases
5819 (modify-phases %standard-phases
5820 (replace 'check
5821 (lambda _
5822 (invoke "rspec")
5823 #t)))))
5824 (native-inputs
5825 `(("ruby-rspec" ,ruby-rspec)))
5826 (synopsis "Cucumber tag expressions for Ruby")
5827 (description
5828 "Cucumber tag expression parser for Ruby. A tag expression is an infix
5829boolean expression used by Cucumber.")
5830 (home-page "https://github.com/cucumber/tag-expressions-ruby")
5831 (license license:expat)))
5832
73a5aff7
CB
5833(define-public ruby-bindex
5834 (package
5835 (name "ruby-bindex")
5836 (version "0.5.0")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (rubygems-uri "bindex" version))
5841 (sha256
5842 (base32
5843 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
5844 (build-system ruby-build-system)
5845 (arguments
5846 '(#:test-target "default"))
5847 (native-inputs
5848 `(("bundler" ,bundler)
5849 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5850 (synopsis "Provides access for bindings relating to Ruby exceptions")
5851 (description
5852 "@code{bindex} provides a way to access the bindings that relate to
5853exceptions in Ruby, providing more information about the context in which the
5854exception occurred.")
5855 (home-page "https://github.com/gsamokovarov/bindex")
5856 (license license:expat)))
5857
212d563d
PP
5858(define-public ruby-bio-logger
5859 (package
5860 (name "ruby-bio-logger")
5861 (version "1.0.1")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (rubygems-uri "bio-logger" version))
5866 (sha256
5867 (base32
5868 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
5869 (build-system ruby-build-system)
5870 (arguments
5871 `(#:tests? #f)) ; rake errors, missing shoulda
5872 (propagated-inputs
5873 `(("ruby-log4r" ,ruby-log4r)))
5874 (synopsis "Log4r wrapper for Ruby")
5875 (description "Bio-logger is a wrapper around Log4r adding extra logging
5876features such as filtering and fine grained logging.")
5877 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
5878 (license license:expat)))
07f61cb2 5879
2db0f9c8
BW
5880(define-public ruby-yajl-ruby
5881 (package
5882 (name "ruby-yajl-ruby")
5883 (version "1.4.1")
5884 (source
5885 (origin
5886 (method url-fetch)
5887 (uri (rubygems-uri "yajl-ruby" version))
5888 (sha256
5889 (base32
5890 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
5891 (build-system ruby-build-system)
5892 (arguments
5893 '(#:test-target "spec"
5894 #:phases
5895 (modify-phases %standard-phases
5896 (add-before 'check 'patch-test-to-update-load-path
5897 (lambda _
5898 (substitute* "spec/parsing/large_number_spec.rb"
5899 (("require \"yajl\"")
5900 "$LOAD_PATH << 'lib'; require 'yajl'"))
5901 #t)))))
5902 (native-inputs
5903 `(("ruby-rake-compiler" ,ruby-rake-compiler)
5904 ("ruby-rspec" ,ruby-rspec)))
5905 (synopsis "Streaming JSON parsing and encoding library for Ruby")
5906 (description
5907 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
5908is compatible with the JSON gem, so yajl-ruby can act as a drop in
5909replacement.
5910
5911A modified copy of yajl is used, and included in the package.")
5912 (home-page "https://github.com/brianmario/yajl-ruby")
5913 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
5914 license:bsd-3)))) ; Included, modified copy of yajl
5915
07f61cb2 5916(define-public ruby-yard
6499893e
BW
5917 (package
5918 (name "ruby-yard")
f321380f 5919 (version "0.9.20")
6499893e
BW
5920 (source
5921 (origin
f3fd70c0 5922 (method git-fetch)
6499893e 5923 ;; Tests do not pass if we build from the distributed gem.
f3fd70c0
EF
5924 (uri (git-reference
5925 (url "https://github.com/lsegal/yard")
5926 (commit (string-append "v" version))))
5927 (file-name (git-file-name name version))
6499893e
BW
5928 (sha256
5929 (base32
f321380f 5930 "1v48zz8hzazrg79jksj9siys21d2axvzijvkxw2j42zh86syi1wi"))))
6499893e
BW
5931 (build-system ruby-build-system)
5932 (arguments
5933 `(#:phases
5934 (modify-phases %standard-phases
5935 (replace 'check
5936 (lambda _
f321380f
CB
5937 ;; Delete the Gemfile to avoid errors relating to it
5938 (delete-file "Gemfile")
6499893e
BW
5939 ;; $HOME needs to be set to somewhere writeable for tests to run
5940 (setenv "HOME" "/tmp")
5941 ;; Run tests without using 'rake' to avoid dependencies.
9923d5a4 5942 (invoke "rspec"))))))
6499893e
BW
5943 (native-inputs
5944 `(("ruby-rspec" ,ruby-rspec)
f321380f
CB
5945 ("ruby-rack" ,ruby-rack)
5946 ("ruby-redcloth" ,ruby-redcloth)
5947 ("ruby-asciidoc" ,ruby-asciidoctor)))
6499893e
BW
5948 (synopsis "Documentation generation tool for Ruby")
5949 (description
5950 "YARD is a documentation generation tool for the Ruby programming
07f61cb2
BW
5951language. It enables the user to generate consistent, usable documentation
5952that can be exported to a number of formats very easily, and also supports
5953extending for custom Ruby constructs such as custom class level definitions.")
2f3800e5 5954 (home-page "https://yardoc.org")
6499893e 5955 (license license:expat)))
2cbcd23a 5956
ad686ef3
RW
5957(define-public ruby-clap
5958 (package
5959 (name "ruby-clap")
5960 (version "1.0.0")
5961 (source (origin
5962 (method url-fetch)
5963 (uri (rubygems-uri "clap" version))
5964 (sha256
5965 (base32
5966 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
5967 (build-system ruby-build-system)
5968 ;; Clap needs cutest for running tests, but cutest needs clap.
5969 (arguments `(#:tests? #f))
5970 (synopsis "Command line argument parsing for simple applications")
5971 (description
5972 "Clap provides command line argument parsing features. It covers the
5973simple case of executing code based on the flags or parameters passed.")
5974 (home-page "https://github.com/djanowski/cutest")
0c80451e
RW
5975 (license license:expat)))
5976
5977(define-public ruby-cutest
5978 (package
5979 (name "ruby-cutest")
5980 (version "1.2.2")
5981 (source (origin
5982 (method url-fetch)
5983 (uri (rubygems-uri "cutest" version))
5984 (sha256
5985 (base32
5986 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
5987 (build-system ruby-build-system)
5988 (propagated-inputs
5989 `(("ruby-clap" ,ruby-clap)))
5990 (synopsis "Run tests in separate processes")
5991 (description
5992 "Cutest runs tests in separate processes to avoid shared state.")
5993 (home-page "https://github.com/djanowski/cutest")
ad686ef3
RW
5994 (license license:expat)))
5995
ac09beba
RW
5996(define-public ruby-pygmentize
5997 (package
5998 (name "ruby-pygmentize")
5999 (version "0.0.3")
6000 (source (origin
6001 (method url-fetch)
6002 (uri (rubygems-uri "pygmentize" version))
6003 (sha256
6004 (base32
6005 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
6006 (build-system ruby-build-system)
6007 (arguments
6008 `(#:phases
6009 (modify-phases %standard-phases
6010 (add-after 'unpack 'fix-pygmentize-path
6011 (lambda _
6012 (substitute* "lib/pygmentize.rb"
6013 (("\"/usr/bin/env python.*")
6014 (string-append "\"" (which "pygmentize") "\"\n")))
6015 #t))
6016 (add-after 'build 'do-not-use-vendor-directory
6017 (lambda _
6018 ;; Remove bundled pygments sources
6019 ;; FIXME: ruby-build-system does not support snippets.
6020 (delete-file-recursively "vendor")
6021 (substitute* "pygmentize.gemspec"
6022 (("\"vendor/\\*\\*/\\*\",") ""))
6023 #t)))))
6024 (inputs
6025 `(("pygments" ,python-pygments)))
6026 (native-inputs
6027 `(("ruby-cutest" ,ruby-cutest)
6028 ("ruby-nokogiri" ,ruby-nokogiri)))
6029 (synopsis "Thin Ruby wrapper around pygmentize")
6030 (description
6031 "Pygmentize provides a simple way to call pygmentize from within a Ruby
6032application.")
6033 (home-page "https://github.com/djanowski/pygmentize")
6034 (license license:expat)))
6035
2cbcd23a
DT
6036(define-public ruby-eventmachine
6037 (package
6038 (name "ruby-eventmachine")
c207fa5e 6039 (version "1.2.7")
2cbcd23a
DT
6040 (source
6041 (origin
6042 (method url-fetch)
6043 (uri (rubygems-uri "eventmachine" version))
6044 (sha256
6045 (base32
c207fa5e 6046 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
2cbcd23a
DT
6047 (build-system ruby-build-system)
6048 (arguments
c5d269fb 6049 '(#:tests? #f)) ; test suite tries to connect to google.com
2cbcd23a
DT
6050 (native-inputs
6051 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
6052 (synopsis "Single-threaded network event framework for Ruby")
6053 (description
6054 "EventMachine implements a single-threaded engine for arbitrary network
6055communications. EventMachine wraps all interactions with sockets, allowing
6056programs to concentrate on the implementation of network protocols. It can be
6057used to create both network servers and clients.")
24a26227
TGR
6058 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
6059 (home-page "https://github.com/eventmachine/eventmachine")
2cbcd23a 6060 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
7d3a1a2d 6061
e218b0c8
BW
6062(define-public ruby-ruby-engine
6063 (package
6064 (name "ruby-ruby-engine")
6065 (version "1.0.1")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (rubygems-uri "ruby_engine" version))
6070 (sha256
6071 (base32
6072 "1d0sd4q50zkcqhr395wj1wpn2ql52r0fpwhzjfvi1bljml7k546v"))))
6073 (build-system ruby-build-system)
6074 (arguments
6075 `(#:phases
6076 (modify-phases %standard-phases
6077 (add-before 'check 'clean-up
6078 (lambda _
6079 (delete-file "Gemfile.lock")
6080 (substitute* "ruby_engine.gemspec"
6081 ;; Remove unnecessary imports that would entail further
6082 ;; dependencies.
6083 ((".*<rdoc.*") "")
6084 ((".*<rubygems-tasks.*") "")
6085 ;; Remove extraneous .gem file
6086 (("\\\"pkg/ruby_engine-1.0.0.gem\\\",") "")
6087 ;; Soften rake dependency
6088 (("%q<rake>.freeze, \\[\\\"~> 10.0\\\"\\]")
6089 "%q<rake>.freeze, [\">= 10.0\"]")
6090 ;; Soften the rspec dependency
6091 (("%q<rspec>.freeze, \\[\\\"~> 2.4\\\"\\]")
6092 "%q<rspec>.freeze, [\">= 2.4\"]"))
6093 (substitute* "Rakefile"
6094 (("require 'rubygems/tasks'") "")
6095 (("Gem::Tasks.new") ""))
6096 ;; Remove extraneous .gem file that otherwise gets installed.
6097 (delete-file "pkg/ruby_engine-1.0.0.gem")
6098 #t)))))
6099 (native-inputs
6100 `(("bundler" ,bundler)
6101 ("ruby-rake" ,ruby-rake)
6102 ("ruby-rspec" ,ruby-rspec)))
6103 (synopsis "Simplifies checking for Ruby implementation")
6104 (description
6105 "@code{ruby_engine} provides an RubyEngine class that can be used to
6106check which implementation of Ruby is in use. It can provide the interpreter
6107name and provides query methods such as @{RubyEngine.mri?}.")
6108 (home-page "https://github.com/janlelis/ruby_engine")
6109 (license license:expat)))
6110
8092e333
BW
6111(define-public ruby-turn
6112 (package
6113 (name "ruby-turn")
6114 (version "0.9.7")
6115 (source
6116 (origin
6117 (method url-fetch)
6118 (uri (rubygems-uri "turn" version))
6119 (sha256
6120 (base32
6121 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
6122 (build-system ruby-build-system)
6123 (arguments
6124 `(#:phases
6125 (modify-phases %standard-phases
6126 ;; Tests fail because turn changes its environment so can no longer
6127 ;; find test/unit. Instead simply test if the executable runs
6128 ;; without issue.
6129 (replace 'check
6130 (lambda _
9923d5a4 6131 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8092e333
BW
6132 (propagated-inputs
6133 `(("ruby-ansi" ,ruby-ansi)
6134 ("ruby-minitest" ,ruby-minitest-4)))
6135 (synopsis "Alternate set of alternative runners for MiniTest")
6136 (description
6137 "TURN provides a set of alternative runners for MiniTest which are both
6138colorful and informative. TURN displays each test on a separate line with
6139failures being displayed immediately instead of at the end of the tests. Note
6140that TURN is no longer being maintained.")
f433b662 6141 (home-page "https://rubygems.org/gems/turn")
8092e333
BW
6142 (license license:expat)))
6143
8279b1d3
CB
6144(define-public ruby-mimemagic
6145 (package
6146 (name "ruby-mimemagic")
60bc8952 6147 (version "0.3.3")
8279b1d3
CB
6148 (source
6149 (origin
6150 (method url-fetch)
6151 (uri (rubygems-uri "mimemagic" version))
6152 (sha256
60bc8952 6153 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8279b1d3
CB
6154 (build-system ruby-build-system)
6155 (arguments
6156 '(#:phases
6157 (modify-phases %standard-phases
6158 ;; This phase breaks the tests, as it patches some of the test data.
6159 (delete 'patch-source-shebangs))))
6160 (native-inputs
6161 `(("ruby-bacon" ,ruby-bacon)))
6162 (synopsis "Ruby library for MIME detection by extension or content")
6163 (description
6164 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
6165extension or content, using the freedesktop.org.xml shared-mime-info
6166database.")
6167 (home-page "https://github.com/minad/mimemagic")
6168 (license license:expat)))
6169
32d1c06f
BW
6170(define-public ruby-mime-types-data
6171 (package
6172 (name "ruby-mime-types-data")
f49511db 6173 (version "3.2016.0521")
32d1c06f
BW
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (rubygems-uri "mime-types-data" version))
6178 (sha256
6179 (base32
f49511db 6180 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
32d1c06f
BW
6181 (build-system ruby-build-system)
6182 (native-inputs
6183 `(("ruby-hoe" ,ruby-hoe)))
6184 (synopsis "Registry for information about MIME media type definitions")
6185 (description
6186 "@code{mime-types-data} provides a registry for information about
6187Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
6188be used with the Ruby mime-types library or other software to determine
6189defined filename extensions for MIME types, or to use filename extensions to
6190look up the likely MIME type definitions.")
6191 (home-page "https://github.com/mime-types/mime-types-data/")
6192 (license license:expat)))
6193
d39b606c
BW
6194(define-public ruby-mime-types
6195 (package
6196 (name "ruby-mime-types")
803bcc81 6197 (version "3.1")
d39b606c
BW
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (rubygems-uri "mime-types" version))
6202 (sha256
6203 (base32
803bcc81 6204 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
d39b606c
BW
6205 (build-system ruby-build-system)
6206 (propagated-inputs
6207 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
6208 (native-inputs
6209 `(("ruby-hoe" ,ruby-hoe)
6210 ("ruby-fivemat" ,ruby-fivemat)
6211 ("ruby-minitest-focus" ,ruby-minitest-focus)
6212 ("ruby-minitest-rg" ,ruby-minitest-rg)
803bcc81
BW
6213 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
6214 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
d39b606c
BW
6215 (synopsis "Library and registry for MIME content type definitions")
6216 (description "The mime-types library provides a library and registry for
6217information about Multipurpose Internet Mail Extensions (MIME) content type
6218definitions. It can be used to determine defined filename extensions for MIME
6219types, or to use filename extensions to look up the likely MIME type
6220definitions.")
6221 (home-page "https://github.com/mime-types/ruby-mime-types")
6222 (license license:expat)))
6223
eb5e0bd9
BW
6224(define-public ruby-fivemat
6225 (package
6226 (name "ruby-fivemat")
c664ebcc 6227 (version "1.3.7")
eb5e0bd9
BW
6228 (source
6229 (origin
6230 (method url-fetch)
6231 (uri (rubygems-uri "fivemat" version))
6232 (sha256
6233 (base32
c664ebcc 6234 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
eb5e0bd9
BW
6235 (build-system ruby-build-system)
6236 (arguments
6237 `(#:tests? #f)) ; no tests
6238 (synopsis "Each test file given its own line of dots")
6239 (description
6240 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
6241its own line of dots during testing. It aims to provide test output that is
6242neither too verbose nor too minimal.")
6243 (home-page "https://github.com/tpope/fivemat")
6244 (license license:expat)))
6245
4fea500b
BW
6246(define-public ruby-sqlite3
6247 (package
6248 (name "ruby-sqlite3")
e7cdba61 6249 (version "1.4.2")
4fea500b
BW
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (rubygems-uri "sqlite3" version))
6254 (sha256
6255 (base32
e7cdba61 6256 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
4fea500b
BW
6257 (build-system ruby-build-system)
6258 (arguments
6259 `(#:phases
6260 (modify-phases %standard-phases
6261 (add-before 'check 'add-gemtest-file
6262 ;; This file exists in the repository but is not distributed.
9923d5a4 6263 (lambda _ (invoke "touch" ".gemtest"))))))
4fea500b
BW
6264 (inputs
6265 `(("sqlite" ,sqlite)))
6266 (native-inputs
6267 `(("ruby-hoe" ,ruby-hoe)
6268 ("ruby-rake-compiler" ,ruby-rake-compiler)
6269 ("ruby-mini-portile" ,ruby-mini-portile)))
6270 (synopsis "Interface with SQLite3 databases")
6271 (description
6272 "This module allows Ruby programs to interface with the SQLite3 database
6273engine.")
6274 (home-page
6275 "https://github.com/sparklemotion/sqlite3-ruby")
6276 (license license:bsd-3)))
6277
4dfa39cc
BW
6278(define-public ruby-shoulda-context
6279 (package
6280 (name "ruby-shoulda-context")
e7d1d472 6281 (version "1.2.2")
4dfa39cc
BW
6282 (source
6283 (origin
6284 (method url-fetch)
6285 (uri (rubygems-uri "shoulda-context" version))
6286 (sha256
6287 (base32
e7d1d472 6288 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
4dfa39cc
BW
6289 (build-system ruby-build-system)
6290 (arguments
6291 `(#:phases
6292 (modify-phases %standard-phases
6293 (replace 'check
6294 (lambda _
6295 ;; Do not run tests to avoid circular dependence with rails.
6296 ;; Instead just import the library to test.
9923d5a4 6297 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
4dfa39cc
BW
6298 (synopsis "Test::Unit context framework extracted from Shoulda")
6299 (description
6300 "@code{shoulda-context} is the context framework extracted from Shoulda.
6301Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
6302context, setup, and should blocks combine to produce natural test method
6303names.")
6304 (home-page "https://github.com/thoughtbot/shoulda-context")
6305 (license license:expat)))
6306
e4fea008
BW
6307(define-public ruby-shoulda-matchers
6308 (package
6309 (name "ruby-shoulda-matchers")
d1c1f368 6310 (version "3.1.2")
e4fea008
BW
6311 (source
6312 (origin
6313 (method url-fetch)
6314 (uri (rubygems-uri "shoulda-matchers" version))
6315 (sha256
6316 (base32
d1c1f368 6317 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
e4fea008
BW
6318 (build-system ruby-build-system)
6319 (arguments
6320 `(#:phases
6321 (modify-phases %standard-phases
e4fea008
BW
6322 (replace 'check
6323 (lambda _
6324 ;; Do not run tests to avoid circular dependence with rails. Instead
6325 ;; just import the library to test.
9923d5a4 6326 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
e4fea008
BW
6327 (propagated-inputs
6328 `(("ruby-activesupport" ,ruby-activesupport)))
6329 (synopsis "Collection of testing matchers extracted from Shoulda")
6330 (description
6331 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
6332test common Rails functionality. These tests would otherwise be much longer,
6333more complex, and error-prone.")
6334 (home-page "https://github.com/thoughtbot/shoulda-matchers")
6335 (license license:expat)))
6336
3885c58b
BW
6337(define-public ruby-shoulda-matchers-2
6338 (package
6339 (inherit ruby-shoulda-matchers)
6340 (version "2.8.0")
6341 (source (origin
6342 (method url-fetch)
6343 (uri (rubygems-uri "shoulda-matchers" version))
6344 (sha256
6345 (base32
6346 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
6347
6f390716
BW
6348(define-public ruby-shoulda
6349 (package
6350 (name "ruby-shoulda")
6351 (version "3.5.0")
6352 (source
6353 (origin
6354 (method url-fetch)
6355 (uri (rubygems-uri "shoulda" version))
6356 (sha256
6357 (base32
6358 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
6359 (build-system ruby-build-system)
6360 (arguments
6361 `(#:phases
6362 (modify-phases %standard-phases
6363 (replace 'check
6364 ;; Don't run tests to avoid circular dependence with rails. Instead
6365 ;; just import the library to test.
9923d5a4 6366 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
6f390716
BW
6367 (propagated-inputs
6368 `(("ruby-shoulda-context" ,ruby-shoulda-context)
6369 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
6370 (synopsis "Context framework and matchers for testing")
6371 (description
6372 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
6373@code{shoulda-matchers} providing tools for writing tests.")
6374 (home-page "https://github.com/thoughtbot/shoulda")
6375 (license license:expat)))
6376
3b44bcdf
BW
6377(define-public ruby-unf
6378 (package
6379 (name "ruby-unf")
6380 (version "0.1.4")
6381 (source
6382 (origin
6383 (method url-fetch)
6384 (uri (rubygems-uri "unf" version))
6385 (sha256
6386 (base32
6387 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
6388 (build-system ruby-build-system)
6389 (arguments
6390 `(#:phases
6391 (modify-phases %standard-phases
6392 (add-before 'check 'add-dependency-to-bundler
6393 (lambda _
6394 ;; test-unit is required but not provided by the bundler
6395 ;; environment. This is fixed in the upstream repository but fix
6396 ;; has not been released.
6397 (substitute* "Gemfile"
6398 (("^gemspec") "gem 'test-unit'\ngemspec"))
6399 #t)))))
6400 (propagated-inputs
6401 `(("ruby-unf-ext" ,ruby-unf-ext)))
6402 (native-inputs
6403 `(("ruby-shoulda" ,ruby-shoulda)
6404 ("bundler" ,bundler)
6405 ("ruby-test-unit" ,ruby-test-unit)))
6406 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
6407 (description
6408 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
6409support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
6410@code{java.text.Normalizer} on JRuby.")
6411 (home-page "https://github.com/knu/ruby-unf")
6412 (license license:bsd-2)))
6413
e32c99d2
CB
6414(define-public ruby-warden
6415 (package
6416 (name "ruby-warden")
6417 (version "1.2.8")
6418 (source
6419 (origin
6420 (method url-fetch)
6421 (uri (rubygems-uri "warden" version))
6422 (sha256
6423 (base32
6424 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
6425 (build-system ruby-build-system)
6426 (arguments
6427 '(#:tests? #f)) ; No included tests
6428 (propagated-inputs
6429 `(("ruby-rack" ,ruby-rack)))
6430 (synopsis "Rack middleware providing authentication")
6431 (description
6432 "Warden is a Rack-based middleware that provides a mechanism for
6433authentication in Ruby web applications.")
6434 (home-page "https://github.com/wardencommunity/warden")
6435 (license license:expat)))
6436
e42eecdb
CB
6437(define-public ruby-warden-oauth2
6438 (package
6439 (name "ruby-warden-oauth2")
6440 (version "0.0.1")
6441 (source
6442 (origin
6443 (method url-fetch)
6444 (uri (rubygems-uri "warden-oauth2" version))
6445 (sha256
6446 (base32
6447 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
6448 (build-system ruby-build-system)
6449 (arguments
6450 '(#:test-target "spec"
6451 #:phases
6452 (modify-phases %standard-phases
6453 (add-after 'unpack 'remove-unnecessary-dependencies
6454 (lambda _
6455 (substitute* "Gemfile"
6456 ;; All of these gems relate to development, and are unnecessary
6457 ;; when running the tests
6458 (("gem 'guard-bundler'") "")
6459 (("gem 'guard'") "")
6460 (("gem 'guard-rspec'") "")
6461 (("gem 'rb-fsevent'") "")
6462 (("gem 'pry'") "")
6463 (("gem 'growl'") ""))
6464 #t))
6465 ;; The test suite doesn't work with rspec@2, and this is incompatible
6466 ;; with the current version of Rake, so invoke Rspec directly
6467 (replace 'check
6468 (lambda* (#:key tests? #:allow-other-keys)
6469 (when tests?
6470 (invoke "bundle" "exec" "rspec"))
6471 #t)))))
6472 (propagated-inputs
6473 `(("ruby-warden" ,ruby-warden)))
6474 (native-inputs
6475 `(("bundler" ,bundler)
6476 ("ruby-rspec" ,ruby-rspec-2)
6477 ("ruby-rack-test" ,ruby-rack-test)))
6478 (synopsis "OAuth 2.0 strategies for Warden")
6479 (description
6480 "This library extends Warden to support OAuth 2.0 authorized API
6481requests.")
6482 (home-page "https://github.com/opperator/warden-oauth2")
6483 (license license:expat)))
6484
8c7ae384
CB
6485(define-public ruby-webmock-2
6486 (package
6487 (name "ruby-webmock")
6488 (version "2.3.2")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (rubygems-uri "webmock" version))
6493 (sha256
6494 (base32
6495 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
6496 (build-system ruby-build-system)
6497 (native-inputs
6498 `(("bundler" ,bundler)
6499 ("ruby-rspec" ,ruby-rspec)))
6500 (propagated-inputs
6501 `(("ruby-addressable" ,ruby-addressable)
6502 ("ruby-crack" ,ruby-crack)
6503 ("ruby-hashdiff" ,ruby-hashdiff)))
6504 (synopsis "Allows stubbing and setting expectations on HTTP requests")
6505 (description
6506 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
6507requests. This is useful when testing software.")
6508 (home-page "https://github.com/bblimke/webmock")
6509 (license license:expat)))
6510
d8c189ed
CB
6511(define-public ruby-unicode-display-width
6512 (package
6513 (name "ruby-unicode-display-width")
216ccced 6514 (version "1.6.0")
d8c189ed
CB
6515 (source
6516 (origin
6517 (method url-fetch)
6518 (uri (rubygems-uri "unicode-display_width" version))
6519 (sha256
6520 (base32
216ccced 6521 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
d8c189ed
CB
6522 (build-system ruby-build-system)
6523 (arguments
6524 '(;; Test data not included.
6525 #:tests? #f))
6526 (synopsis "Determine the monospace display width of Ruby strings")
6527 (description
6528 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
6529display width of strings in Ruby.")
6530 (home-page "https://github.com/janlelis/unicode-display_width")
6531 (license license:expat)))
6532
6120589f
CB
6533;; There is another gem called 'ruby-version' so we use an underscore in this
6534;; name
6535(define-public ruby_version
6536 (package
6537 (name "ruby_version")
6538 (version "1.0.1")
6539 (source
6540 (origin
6541 (method url-fetch)
6542 (uri (rubygems-uri "ruby_version" version))
6543 (sha256
6544 (base32
6545 "0854i1bjy56176anr05l5m0vc81nl53c7fyfg7sljj62m1d64dgj"))))
6546 (build-system ruby-build-system)
6547 (arguments
6548 '(#:phases
6549 (modify-phases %standard-phases
6550 (add-before 'check 'fix-dependencies
6551 (lambda _
6552 ;; Remove the Gemfile.lock, as we want to use Guix packages at
6553 ;; whatever versions.
6554 (delete-file "Gemfile.lock")
6555 ;; Remove the incldued gem file as it's unnecessary.
6556 (delete-file "pkg/ruby_version-1.0.0.gem")
6557 (substitute* "ruby_version.gemspec"
6558 ;; Don't require rdoc and rubygems-tasks as they're unnecessary
6559 ((".*rdoc.*") "\n")
6560 ((".*rubygems-tasks.*") "\n")
6561 ;; Accept any version of rake and rspec
6562 (("%q<rake.*") "%q<rake>)\n")
6563 (("%q<rspec.*") "%q<rspec>)\n"))
6564 ;; Remove the use of rubygems-tasks from the Rakefile, as it's
6565 ;; unnecessary.
6566 (substitute* "Rakefile"
6567 (("^require 'rubygems/tasks'") "")
6568 (("Gem::Tasks.new") ""))
6569 #t)))))
6570 (native-inputs
6571 `(("bundler" ,bundler)
6572 ("ruby-rspec" ,ruby-rspec)))
6573 (synopsis "Ruby library to help check the Ruby version")
6574 (description
6575 "@code{ruby_version} provides a @code{RubyVersion} module to simplify
6576checking for the right Ruby version in software.")
6577 (home-page "https://github.com/janlelis/ruby_version")
6578 (license license:expat)))
6579
a229acff
CB
6580(define-public ruby-websocket-driver
6581 (package
6582 (name "ruby-websocket-driver")
9d1cf6d4 6583 (version "0.7.1")
a229acff
CB
6584 (source
6585 (origin
6586 (method url-fetch)
6587 (uri (rubygems-uri "websocket-driver" version))
6588 (sha256
9d1cf6d4 6589 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
a229acff
CB
6590 (build-system ruby-build-system)
6591 (arguments
9d1cf6d4 6592 '(#:tests? #f)) ; no included tests
a229acff
CB
6593 (propagated-inputs
6594 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
6595 (synopsis "WebSocket protocol handler with pluggable I/O")
6596 (description
6597 "@code{websocket-driver} provides a complete implementation of the
6598WebSocket protocols that can be hooked up to any TCP library")
6599 (home-page "https://github.com/faye/websocket-driver-ruby")
6600 (license license:expat)))
6601
52b015a9
CB
6602(define-public ruby-websocket-extensions
6603 (package
6604 (name "ruby-websocket-extensions")
6605 (version "0.1.3")
6606 (source
6607 (origin
6608 (method url-fetch)
6609 (uri (rubygems-uri "websocket-extensions" version))
6610 (sha256
6611 (base32
6612 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
6613 (build-system ruby-build-system)
6614 (arguments
6615 '(;; No included tests
6616 #:tests? #f))
6617 (synopsis "Generic extension manager for WebSocket connections")
6618 (description
6619 "@code{websocket-extensions} provides a container for registering
6620extension plugins.")
6621 (home-page "https://github.com/faye/websocket-extensions-ruby")
6622 (license license:expat)))
6623
5799aadd
BW
6624(define-public ruby-domain-name
6625 (package
6626 (name "ruby-domain-name")
222999c9 6627 (version "0.5.20180417")
5799aadd
BW
6628 (source
6629 (origin
6630 (method url-fetch)
6631 (uri (rubygems-uri "domain_name" version))
6632 (sha256
6633 (base32
222999c9 6634 "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"))))
5799aadd
BW
6635 (build-system ruby-build-system)
6636 (arguments
6637 `(#:phases
6638 (modify-phases %standard-phases
6639 (add-before 'check 'fix-versions
6640 (lambda _
6641 ;; Fix NameError that appears to already be fixed upstream.
6642 (substitute* "Rakefile"
6643 (("DomainName::VERSION")
6644 "Bundler::GemHelper.gemspec.version"))
6645 ;; Loosen unnecessarily strict test-unit version specification.
6646 (substitute* "domain_name.gemspec"
71596c3c 6647 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
5799aadd
BW
6648 #t)))))
6649 (propagated-inputs
6650 `(("ruby-unf" ,ruby-unf)))
6651 (native-inputs
6652 `(("ruby-shoulda" ,ruby-shoulda)
6653 ("bundler" ,bundler)
6654 ("ruby-test-unit" ,ruby-test-unit)))
6655 (synopsis "Domain name manipulation library")
6656 (description
6657 "@code{domain_name} is a Domain name manipulation library. It parses a
6658domain name ready for extracting the registered domain and TLD (Top Level
6659Domain). It can also be used for cookie domain validation based on the Public
6660Suffix List.")
6661 (home-page "https://github.com/knu/ruby-domain_name")
6662 (license license:bsd-2)))
6663
d114ceeb
BW
6664(define-public ruby-http-cookie
6665 (package
6666 (name "ruby-http-cookie")
2a2eb07d 6667 (version "1.0.3")
d114ceeb
BW
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (rubygems-uri "http-cookie" version))
6672 (sha256
6673 (base32
2a2eb07d 6674 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
d114ceeb
BW
6675 (build-system ruby-build-system)
6676 (arguments
6677 `(#:phases
6678 (modify-phases %standard-phases
6679 (add-before 'check 'add-dependency-to-bundler
6680 (lambda _
6681 ;; Fix NameError
6682 (substitute* "Rakefile"
6683 (("HTTP::Cookie::VERSION")
6684 "Bundler::GemHelper.gemspec.version"))
6685 #t)))))
6686 (propagated-inputs
6687 `(("ruby-domain-name" ,ruby-domain-name)))
6688 (native-inputs
6689 `(("rubysimplecov" ,ruby-simplecov)
6690 ("bundler" ,bundler)
6691 ("ruby-sqlite3" ,ruby-sqlite3)
6692 ("ruby-test-unit" ,ruby-test-unit)))
6693 (synopsis "Handle HTTP Cookies based on RFC 6265")
6694 (description
6695 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
6696RFC 6265. It has been designed with security, standards compliance and
6697compatibility in mind, to behave just the same as today's major web browsers.
6698It has built-in support for the legacy @code{cookies.txt} and
6699@code{cookies.sqlite} formats of Mozilla Firefox.")
6700 (home-page "https://github.com/sparklemotion/http-cookie")
6701 (license license:expat)))
6702
1c8e6fd3
CB
6703(define-public ruby-httpclient
6704 (package
6705 (name "ruby-httpclient")
6706 (version "2.8.3")
6707 (source
6708 (origin
6709 (method url-fetch)
6710 (uri (rubygems-uri "httpclient" version))
6711 (sha256
6712 (base32
6713 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
6714 (build-system ruby-build-system)
6715 (arguments
6716 '(;; TODO: Some tests currently fail
6717 ;; ------
6718 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
6719 ;; 2 omissions, 0 notifications
6720 ;; 91.866% passed
6721 ;; ------
6722 ;; 6.49 tests/s, 22.41 assertions/s
6723 #:tests? #f
6724 #:phases
6725 (modify-phases %standard-phases
6726 (replace 'check
6727 (lambda* (#:key tests? #:allow-other-keys)
6728 (if tests?
9923d5a4
TGR
6729 (invoke "ruby"
6730 "-Ilib"
6731 "test/runner.rb")
0076f5a9 6732 #t))))))
1c8e6fd3
CB
6733 (native-inputs
6734 `(("ruby-rack" ,ruby-rack)))
6735 (synopsis
6736 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
6737 (description
6738 "The @code{httpclient} ruby library provides functionality related to
6739HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
6740Cookie, multithreading and authentication (digest, NTLM) support.
6741
6742Also provided is a @command{httpclient} command, which can perform HTTP
6743requests either using arguments or with an interactive prompt.")
6744 (home-page "https://github.com/nahi/httpclient")
6745 (license license:ruby)))
6746
7d3a1a2d
BW
6747(define-public ruby-ansi
6748 (package
6749 (name "ruby-ansi")
6750 (version "1.5.0")
6751 (source
6752 (origin
3d30c332 6753 (method git-fetch)
7d3a1a2d 6754 ;; Fetch from GitHub as the gem does not contain testing code.
3d30c332
EF
6755 (uri (git-reference
6756 (url "https://github.com/rubyworks/ansi")
6757 (commit version)))
6758 (file-name (git-file-name name version))
7d3a1a2d
BW
6759 (sha256
6760 (base32
3d30c332 6761 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
7d3a1a2d
BW
6762 (build-system ruby-build-system)
6763 (arguments
6764 `(#:phases
6765 (modify-phases %standard-phases
6766 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
6767 ;; cycle ansi, qed, ansi. Instead simply test that the library can
6768 ;; be require'd.
6769 (replace 'check
6770 (lambda _
9923d5a4 6771 (invoke "ruby" "-Ilib" "-r" "ansi")))
0899352f
MB
6772 (add-before 'validate-runpath 'replace-broken-symlink
6773 (lambda* (#:key outputs #:allow-other-keys)
6774 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
6775 (file (string-append
6776 out "/lib/ruby/vendor_ruby/gems/ansi-"
6777 ,version "/lib/ansi.yml")))
0899352f
MB
6778 ;; XXX: This symlink is broken since ruby 2.4.
6779 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
6780 (delete-file file)
6781 (symlink "../.index" file)
6782 #t))))))
7d3a1a2d
BW
6783 (synopsis "ANSI escape code related libraries")
6784 (description
6785 "This package is a collection of ANSI escape code related libraries
6786enabling ANSI colorization and stylization of console output. Included in the
6787library are the @code{Code} module, which defines ANSI codes as constants and
6788methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
6789@code{ProgressBar}, and a @code{String} subclass. The library also includes a
6790@code{Terminal} module which provides information about the current output
6791device.")
3d30c332 6792 (home-page "https://rubyworks.github.io/ansi/")
7d3a1a2d 6793 (license license:bsd-2)))
7c033c46
BW
6794
6795(define-public ruby-systemu
6796 (package
6797 (name "ruby-systemu")
6798 (version "2.6.5")
6799 (source
6800 (origin
6801 (method url-fetch)
6802 (uri (rubygems-uri "systemu" version))
6803 (sha256
6804 (base32
6805 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
6806 (build-system ruby-build-system)
6807 (arguments
6808 `(#:phases
6809 (modify-phases %standard-phases
6810 (add-before 'check 'set-version
6811 (lambda _
6812 (setenv "VERSION" ,version)
6813 #t)))))
6814 (synopsis "Capture of stdout/stderr and handling of child processes")
6815 (description
6816 "Systemu can be used on any platform to return status, stdout, and stderr
6817of any command. Unlike other methods like @code{open3} and @code{popen4}
6818there is no danger of full pipes or threading issues hanging your process or
6819subprocess.")
6820 (home-page "https://github.com/ahoward/systemu")
6821 (license license:ruby)))
3d84a99e
BW
6822
6823(define-public ruby-bio-commandeer
6824 (package
6825 (name "ruby-bio-commandeer")
37b08547 6826 (version "0.4.0")
3d84a99e
BW
6827 (source
6828 (origin
6829 (method url-fetch)
6830 (uri (rubygems-uri "bio-commandeer" version))
6831 (sha256
6832 (base32
37b08547 6833 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
3d84a99e
BW
6834 (build-system ruby-build-system)
6835 (arguments
6836 `(#:phases
6837 (modify-phases %standard-phases
6838 (replace 'check
6839 ;; Run test without calling 'rake' so that jeweler is
6840 ;; not required as an input.
6841 (lambda _
9923d5a4 6842 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
3d84a99e
BW
6843 (propagated-inputs
6844 `(("ruby-bio-logger" ,ruby-bio-logger)
6845 ("ruby-systemu" ,ruby-systemu)))
6846 (native-inputs
6847 `(("bundler" ,bundler)
6848 ("ruby-rspec" ,ruby-rspec)))
6849 (synopsis "Simplified running of shell commands from within Ruby")
6850 (description
6851 "Bio-commandeer provides an opinionated method of running shell commands
6852from within Ruby. The advantage of bio-commandeer over other methods of
6853running external commands is that when something goes wrong, messages printed
6854to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
6855detail to ease debugging.")
7bf837fd 6856 (home-page "https://github.com/wwood/bioruby-commandeer")
3d84a99e 6857 (license license:expat)))
7c8131c7
BW
6858
6859(define-public ruby-rubytest
6860 (package
6861 (name "ruby-rubytest")
6862 (version "0.8.1")
6863 (source
6864 (origin
6865 (method url-fetch)
6866 (uri (rubygems-uri "rubytest" version))
6867 (sha256
6868 (base32
6869 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
6870 (build-system ruby-build-system)
6871 (arguments
6872 ;; Disable regular testing to break the cycle rubytest, qed, brass,
6873 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
6874 ;; simply test that the library can be require'd.
6875 `(#:phases
6876 (modify-phases %standard-phases
6877 (replace 'check
6878 (lambda _
9923d5a4 6879 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
7c8131c7
BW
6880 (propagated-inputs
6881 `(("ruby-ansi" ,ruby-ansi)))
6882 (synopsis "Universal test harness for Ruby")
6883 (description
6884 "Rubytest is a testing meta-framework for Ruby. It can handle any
6885compliant test framework and can run tests from multiple frameworks in a
6886single pass.")
2f3800e5 6887 (home-page "https://rubyworks.github.io/rubytest")
7c8131c7 6888 (license license:bsd-2)))
90fcedf2
BW
6889
6890(define-public ruby-brass
6891 (package
6892 (name "ruby-brass")
6893 (version "1.2.1")
6894 (source
6895 (origin
6896 (method url-fetch)
6897 (uri (rubygems-uri "brass" version))
6898 (sha256
6899 (base32
6900 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
6901 (build-system ruby-build-system)
6902 (arguments
6903 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
6904 ;; Instead simply test that the library can be require'd.
6905 `(#:phases
6906 (modify-phases %standard-phases
6907 (replace 'check
6908 (lambda _
9923d5a4 6909 (invoke "ruby" "-Ilib" "-r" "brass"))))))
90fcedf2
BW
6910 (synopsis "Basic foundational assertions framework")
6911 (description
6912 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
6913foundational assertions framework for other assertion and test frameworks to
6914make use of.")
2f3800e5 6915 (home-page "https://rubyworks.github.io/brass")
90fcedf2 6916 (license license:bsd-2)))
120fc74b
BW
6917
6918(define-public ruby-qed
6919 (package
6920 (name "ruby-qed")
6921 (version "2.9.2")
6922 (source
6923 (origin
6924 (method url-fetch)
6925 (uri (rubygems-uri "qed" version))
6926 (sha256
6927 (base32
6928 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
6929 (build-system ruby-build-system)
6930 (arguments
6931 ;; Disable testing to break the cycle qed, ansi, qed, among others.
6932 ;; Instead simply test that the executable runs using --copyright.
6933 `(#:phases
6934 (modify-phases %standard-phases
6935 (replace 'check
6936 (lambda _
9923d5a4 6937 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
120fc74b
BW
6938 (propagated-inputs
6939 `(("ruby-ansi" ,ruby-ansi)
6940 ("ruby-brass" ,ruby-brass)))
6941 (synopsis "Test framework utilizing literate programming techniques")
6942 (description
6943 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
6944@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
6945Development} (BDD) utilizing Literate Programming techniques. QED sits
6946somewhere between lower-level testing tools like @code{Test::Unit} and
6947requirement specifications systems like Cucumber.")
2f3800e5 6948 (home-page "https://rubyworks.github.io/qed")
120fc74b 6949 (license license:bsd-2)))
9273ee8f 6950
dbbe88d3
CB
6951(define-public ruby-que
6952 (package
6953 (name "ruby-que")
6954 (version "1.0.0.beta3")
6955 (source
6956 (origin
6957 (method url-fetch)
6958 (uri (rubygems-uri "que" version))
6959 (sha256
6960 (base32
6961 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
6962 (build-system ruby-build-system)
6963 (arguments
6964 '(#:tests? #f)) ; No included tests
6965 (synopsis "Job queue using PostgreSQL written in Ruby")
6966 (description
6967 "This package provides a job queue that uses PostgreSQL for storing jobs
6968and locking between worker processes.")
6969 (home-page "https://github.com/chanks/que")
6970 (license license:expat)))
6971
9273ee8f
BW
6972(define-public ruby-ae
6973 (package
6974 (name "ruby-ae")
6975 (version "1.8.2")
6976 (source
6977 (origin
11d1b318 6978 (method git-fetch)
9273ee8f 6979 ;; Fetch from github so tests are included.
11d1b318
EF
6980 (uri (git-reference
6981 (url "https://github.com/rubyworks/ae")
6982 (commit version)))
6983 (file-name (git-file-name name version))
9273ee8f
BW
6984 (sha256
6985 (base32
11d1b318 6986 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9273ee8f
BW
6987 (build-system ruby-build-system)
6988 (arguments
6989 `(#:phases
6990 (modify-phases %standard-phases
6991 (replace 'check
9923d5a4 6992 (lambda _ (invoke "qed")))
de6f6efd
MB
6993 (add-before 'validate-runpath 'replace-broken-symlink
6994 (lambda* (#:key outputs #:allow-other-keys)
6995 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
6996 (file (string-append
6997 out "/lib/ruby/vendor_ruby/gems/ae-"
6998 ,version "/lib/ae.yml")))
de6f6efd
MB
6999 ;; XXX: This symlink is broken since ruby 2.4.
7000 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
7001 (delete-file file)
7002 (symlink "../.index" file)
7003 #t))))))
9273ee8f
BW
7004 (propagated-inputs
7005 `(("ruby-ansi" ,ruby-ansi)))
7006 (native-inputs
7007 `(("ruby-qed" ,ruby-qed)))
7008 (synopsis "Assertions library")
7009 (description
7010 "Assertive Expressive (AE) is an assertions library specifically designed
7011for reuse by other test frameworks.")
11d1b318 7012 (home-page "https://rubyworks.github.io/ae/")
9273ee8f 7013 (license license:bsd-2)))
78bb471f
BW
7014
7015(define-public ruby-lemon
7016 (package
7017 (name "ruby-lemon")
7018 (version "0.9.1")
7019 (source
7020 (origin
7021 (method url-fetch)
7022 (uri (rubygems-uri "lemon" version))
7023 (sha256
7024 (base32
7025 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
7026 (build-system ruby-build-system)
7027 (arguments
7028 `(#:phases
7029 (modify-phases %standard-phases
9923d5a4 7030 (replace 'check (lambda _ (invoke "qed"))))))
78bb471f
BW
7031 (propagated-inputs
7032 `(("ruby-ae" ,ruby-ae)
7033 ("ruby-ansi" ,ruby-ansi)
7034 ("ruby-rubytest" ,ruby-rubytest)))
7035 (native-inputs
7036 `(("ruby-qed" ,ruby-qed)))
7037 (synopsis "Test framework correlating code structure and test unit")
7038 (description
7039 "Lemon is a unit testing framework that enforces highly formal
7040case-to-class and unit-to-method test construction. This enforcement can help
7041focus concern on individual units of behavior.")
2f3800e5 7042 (home-page "https://rubyworks.github.io/lemon")
78bb471f 7043 (license license:bsd-2)))
0832804e
BW
7044
7045(define-public ruby-rubytest-cli
7046 (package
7047 (name "ruby-rubytest-cli")
7048 (version "0.2.0")
7049 (source
7050 (origin
7051 (method url-fetch)
7052 (uri (rubygems-uri "rubytest-cli" version))
7053 (sha256
7054 (base32
7055 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
7056 (build-system ruby-build-system)
7057 (arguments
7058 `(#:tests? #f)) ; no tests
7059 (propagated-inputs
7060 `(("ruby-ansi" ,ruby-ansi)
7061 ("ruby-rubytest" ,ruby-rubytest)))
7062 (synopsis "Command-line interface for rubytest")
7063 (description
7064 "Rubytest CLI is a command-line interface for running tests for
7065Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
2f3800e5 7066 (home-page "https://rubyworks.github.io/rubytest-cli")
0832804e 7067 (license license:bsd-2)))
72ccbfe3
BW
7068
7069(define-public ruby-hashery
7070 (package
7071 (name "ruby-hashery")
cba96208 7072 (version "2.1.2")
72ccbfe3
BW
7073 (source
7074 (origin
7075 (method url-fetch)
7076 (uri (rubygems-uri "hashery" version))
7077 (sha256
7078 (base32
cba96208 7079 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
72ccbfe3
BW
7080 (build-system ruby-build-system)
7081 (arguments
7082 `(#:phases
7083 (modify-phases %standard-phases
7084 (replace 'check
7085 (lambda _
9923d5a4
TGR
7086 (invoke "qed")
7087 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
72ccbfe3
BW
7088 (native-inputs
7089 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
7090 ("ruby-qed" ,ruby-qed)
7091 ("ruby-lemon" ,ruby-lemon)))
7092 (synopsis "Hash-like classes with extra features")
7093 (description
7094 "The Hashery is a tight collection of @code{Hash}-like classes.
7095Included are the auto-sorting @code{Dictionary} class, the efficient
7096@code{LRUHash}, the flexible @code{OpenHash} and the convenient
7097@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
7098defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
7099standard @code{Hash} making it possible to subclass and augment to fit any
7100specific use case.")
2f3800e5 7101 (home-page "https://rubyworks.github.io/hashery")
72ccbfe3 7102 (license license:bsd-2)))
1f1d71e0
BW
7103
7104(define-public ruby-rc4
7105 (package
7106 (name "ruby-rc4")
7107 (version "0.1.5")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (rubygems-uri "ruby-rc4" version))
7112 (sha256
7113 (base32
7114 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
7115 (build-system ruby-build-system)
7116 (arguments
7117 `(#:phases
7118 (modify-phases %standard-phases
7119 (replace 'check
7120 (lambda _
9923d5a4 7121 (invoke "rspec" "spec/rc4_spec.rb"))))))
1f1d71e0
BW
7122 (native-inputs
7123 `(("ruby-rspec" ,ruby-rspec-2)))
7124 (synopsis "Implementation of the RC4 algorithm")
7125 (description
7126 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
7127 (home-page "https://github.com/caiges/Ruby-RC4")
7128 (license license:expat)))
f3e085a8
BW
7129
7130(define-public ruby-afm
7131 (package
7132 (name "ruby-afm")
7133 (version "0.2.2")
7134 (source
7135 (origin
7136 (method url-fetch)
7137 (uri (rubygems-uri "afm" version))
7138 (sha256
7139 (base32
7140 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
7141 (build-system ruby-build-system)
7142 (native-inputs
7143 `(("bundler" ,bundler)))
7144 (synopsis "Read Adobe Font Metrics (afm) files")
7145 (description
7146 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
7147files and use the data therein.")
7bf837fd 7148 (home-page "https://github.com/halfbyte/afm")
f3e085a8 7149 (license license:expat)))
acb6be42
BW
7150
7151(define-public ruby-ascii85
7152 (package
7153 (name "ruby-ascii85")
5854082a 7154 (version "1.0.3")
acb6be42
BW
7155 (source
7156 (origin
7157 (method url-fetch)
7158 (uri (rubygems-uri "Ascii85" version))
7159 (sha256
7160 (base32
5854082a 7161 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
acb6be42
BW
7162 (build-system ruby-build-system)
7163 (native-inputs
7164 `(("bundler" ,bundler)))
7165 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
7166 (description
7167 "This library provides methods to encode and decode Ascii85
7168binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
7169@dfn{Portable Document Format} (PDF) file formats.")
7170 (home-page "https://github.com/datawraith/ascii85gem")
7171 (license license:expat)))
edf8caae
BW
7172
7173(define-public ruby-ttfunk
7174 (package
7175 (name "ruby-ttfunk")
afb7a3e8 7176 (version "1.5.1")
edf8caae
BW
7177 (source
7178 (origin
4e110825 7179 (method git-fetch)
edf8caae 7180 ;; fetch from github as the gem does not contain testing code
4e110825
EF
7181 (uri (git-reference
7182 (url "https://github.com/prawnpdf/ttfunk")
7183 (commit version)))
7184 (file-name (git-file-name name version))
edf8caae
BW
7185 (sha256
7186 (base32
4e110825 7187 "0dx9891zcli0sjrslmsvrwalv86hbjbqlmbrcasnjr069v05h9v9"))))
edf8caae
BW
7188 (build-system ruby-build-system)
7189 (arguments
7190 `(#:test-target "spec"
7191 #:phases
7192 (modify-phases %standard-phases
afb7a3e8
JL
7193 (add-before 'build 'remove-ssh
7194 (lambda _
7195 ;; remove dependency on an ssh key pair that doesn't exist
7196 (substitute* "ttfunk.gemspec"
7197 (("spec.signing_key.*") ""))
7198 #t))
edf8caae
BW
7199 (add-before 'check 'remove-rubocop
7200 (lambda _
7201 ;; remove rubocop as a dependency as not needed for testing
7202 (substitute* "ttfunk.gemspec"
7203 (("spec.add_development_dependency\\('rubocop'.*") ""))
7204 (substitute* "Rakefile"
7205 (("require 'rubocop/rake_task'") "")
afb7a3e8 7206 (("RuboCop::RakeTask.new") ""))
edf8caae
BW
7207 #t)))))
7208 (native-inputs
7209 `(("ruby-rspec" ,ruby-rspec)
afb7a3e8 7210 ("ruby-yard" ,ruby-yard)
edf8caae
BW
7211 ("bundler" ,bundler)))
7212 (synopsis "Font metrics parser for the Prawn PDF generator")
7213 (description
7214 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
7215part of the Prawn PDF generator.")
7216 (home-page "https://github.com/prawnpdf/ttfunk")
7217 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
7218 ;; for details."
7219 (license (list license:gpl2 license:gpl3 license:ruby))))
cbdd428c 7220
9270298f
BW
7221(define-public ruby-puma
7222 (package
7223 (name "ruby-puma")
63755fcd 7224 (version "3.9.1")
9270298f
BW
7225 (source
7226 (origin
a6cffe6e 7227 (method git-fetch)
9270298f 7228 ;; Fetch from GitHub because distributed gem does not contain tests.
a6cffe6e
EF
7229 (uri (git-reference
7230 (url "https://github.com/puma/puma")
7231 (commit (string-append "v" version))))
7232 (file-name (git-file-name name version))
9270298f
BW
7233 (sha256
7234 (base32
a6cffe6e 7235 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9270298f
BW
7236 (build-system ruby-build-system)
7237 (arguments
63755fcd
BW
7238 `(#:tests? #f ; Tests require an out-dated version of minitest.
7239 #:phases
9270298f
BW
7240 (modify-phases %standard-phases
7241 (add-before 'build 'fix-gemspec
7242 (lambda _
7243 (substitute* "puma.gemspec"
7244 (("git ls-files") "find * |sort"))
7245 #t)))))
9270298f
BW
7246 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
7247 (description
7248 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
7249for Ruby/Rack applications. Puma is intended for use in both development and
7250production environments. In order to get the best throughput, it is highly
7251recommended that you use a Ruby implementation with real threads like Rubinius
7252or JRuby.")
a6cffe6e 7253 (home-page "https://puma.io/")
9270298f
BW
7254 (license license:expat)))
7255
b0813490
BW
7256(define-public ruby-hoe-git
7257 (package
7258 (name "ruby-hoe-git")
7259 (version "1.6.0")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (rubygems-uri "hoe-git" version))
7264 (sha256
7265 (base32
7266 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
7267 (build-system ruby-build-system)
7268 (propagated-inputs
7269 `(("ruby-hoe" ,ruby-hoe)
7270 ("git" ,git)))
7271 (synopsis "Hoe plugins for tighter Git integration")
7272 (description
7273 "This package provides a set of Hoe plugins for tighter Git integration.
7274It provides tasks to automate release tagging and pushing and changelog
7275generation.")
7bf837fd 7276 (home-page "https://github.com/jbarnette/hoe-git")
b0813490
BW
7277 (license license:expat)))
7278
cbdd428c
BW
7279(define-public ruby-sequel
7280 (package
7281 (name "ruby-sequel")
65a7f09c 7282 (version "4.49.0")
cbdd428c
BW
7283 (source
7284 (origin
7285 (method url-fetch)
7286 (uri (rubygems-uri "sequel" version))
7287 (sha256
7288 (base32
65a7f09c 7289 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
cbdd428c
BW
7290 (build-system ruby-build-system)
7291 (arguments
7292 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
7293 (synopsis "Database toolkit for Ruby")
7294 (description "Sequel provides thread safety, connection pooling and a
7295concise DSL for constructing SQL queries and table schemas. It includes a
7296comprehensive ORM layer for mapping records to Ruby objects and handling
7297associated records.")
e2b70d90 7298 (home-page "https://sequel.jeremyevans.net")
cbdd428c 7299 (license license:expat)))
3cc78097
BW
7300
7301(define-public ruby-timecop
7302 (package
7303 (name "ruby-timecop")
3d4a5eb5 7304 (version "0.9.1")
3cc78097
BW
7305 (source
7306 (origin
7307 (method url-fetch)
7308 (uri (rubygems-uri "timecop" version))
7309 (sha256
7310 (base32
3d4a5eb5 7311 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
3cc78097
BW
7312 (build-system ruby-build-system)
7313 (arguments
7314 `(#:phases
7315 (modify-phases %standard-phases
7316 (add-before 'check 'set-check-rubylib
7317 (lambda _
7318 ;; Set RUBYLIB so timecop tests finds its own lib.
7319 (setenv "RUBYLIB" "lib")
7320 #t)))))
7321 (native-inputs
7322 `(("bundler" ,bundler)
7323 ("ruby-minitest-rg" ,ruby-minitest-rg)
7324 ("ruby-mocha" ,ruby-mocha)
7325 ("ruby-activesupport" ,ruby-activesupport)))
66e07664 7326 (synopsis "Test mocks for time-dependent functions")
3cc78097
BW
7327 (description
7328 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
7329making it easier to test time-dependent code. It provides a unified method to
7330mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
7331call.")
7332 (home-page "https://github.com/travisjeffery/timecop")
7333 (license license:expat)))
7334
dae620b8
BW
7335(define-public ruby-concurrent
7336 (package
7337 (name "ruby-concurrent")
1007640a 7338 (version "1.1.5")
dae620b8
BW
7339 (source
7340 (origin
8fcba3be 7341 (method git-fetch)
dae620b8
BW
7342 ;; Download from GitHub because the rubygems version does not contain
7343 ;; Rakefile.
8fcba3be
MB
7344 (uri (git-reference
7345 (url "https://github.com/ruby-concurrency/concurrent-ruby")
7346 (commit (string-append "v" version))))
7347 (file-name (git-file-name name version))
dae620b8
BW
7348 (sha256
7349 (base32
1007640a 7350 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
dae620b8
BW
7351 (build-system ruby-build-system)
7352 (arguments
1007640a 7353 `(#:test-target "ci"
dae620b8
BW
7354 #:phases
7355 (modify-phases %standard-phases
520e89eb 7356 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
dae620b8
BW
7357 (lambda _
7358 ;; Delete extra gemspec files so 'first-gemspec' chooses the
7359 ;; correct one.
7360 (delete-file "concurrent-ruby-edge.gemspec")
7361 (delete-file "concurrent-ruby-ext.gemspec")
7362 #t))
1007640a 7363 (replace 'replace-git-ls-files
520e89eb 7364 (lambda _
1007640a
MB
7365 ;; XXX: The default substitution made by this phase is not fully
7366 ;; compatible with "git ls-files". The latter produces file names
7367 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
7368 ;; which gives "./lib/foo". That difference in turn breaks the
7369 ;; comparison against a glob pattern in this script.
7370 (substitute* "concurrent-ruby.gemspec"
7371 (("git ls-files") "find * -type f | sort"))
7372 #t))
7373 (add-before 'build 'remove-jar-from-gemspec
520e89eb 7374 (lambda _
1007640a
MB
7375 ;; The gemspec wants to include a JAR file that we do not build
7376 ;; nor need.
7377 (substitute* "concurrent-ruby.gemspec"
7378 (("'lib/concurrent/concurrent_ruby.jar'")
7379 ""))
7380 #t))
7381 (add-before 'build 'remove-rake_compiler_dock-dependency
7382 (lambda _
7383 ;; This library is only used when building for non-MRI targets.
7384 (substitute* "Rakefile"
7385 (("require 'rake_compiler_dock'")
7386 ""))
520e89eb 7387 #t))
9019b37f
BW
7388 (add-before 'check 'remove-timecop-dependency
7389 ;; Remove timecop-dependent tests as having timecop as a depedency
7390 ;; causes circular depedencies.
7391 (lambda _
7392 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
7393 (delete-file "spec/concurrent/scheduled_task_spec.rb")
7394 #t)))))
dae620b8
BW
7395 (native-inputs
7396 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9019b37f 7397 ("ruby-rspec" ,ruby-rspec)))
dae620b8
BW
7398 (synopsis "Concurrency tools for Ruby")
7399 (description
7400 "This library provides modern concurrency tools including agents,
7401futures, promises, thread pools, actors, supervisors, and more. It is
7402inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
7403patterns.")
7404 (home-page "http://www.concurrent-ruby.com")
7405 (license license:expat)))
2de61e34
BW
7406
7407(define-public ruby-pkg-config
7408 (package
7409 (name "ruby-pkg-config")
884a80dd 7410 (version "1.2.5")
2de61e34
BW
7411 (source
7412 (origin
7413 (method url-fetch)
7414 (uri (rubygems-uri "pkg-config" version))
7415 (sha256
7416 (base32
884a80dd 7417 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
2de61e34
BW
7418 (build-system ruby-build-system)
7419 (arguments
7420 ;; Tests require extra files not included in the gem.
7421 `(#:tests? #f))
7422 (synopsis "Detect libraries for compiling Ruby native extensions")
7423 (description
7424 "@code{pkg-config} can be used in your extconf.rb to properly detect need
7425libraries for compiling Ruby native extensions.")
7426 (home-page "https://github.com/ruby-gnome2/pkg-config")
7427 (license license:lgpl2.0+)))
6689c636
MFM
7428
7429(define-public ruby-net-http-digest-auth
7430 (package
7431 (name "ruby-net-http-digest-auth")
ba074a85 7432 (version "1.4.1")
6689c636
MFM
7433 (source
7434 (origin
7435 (method url-fetch)
7436 (uri (rubygems-uri "net-http-digest_auth" version))
7437 (sha256
7438 (base32
ba074a85 7439 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
6689c636
MFM
7440 (build-system ruby-build-system)
7441 (native-inputs
7442 `(("ruby-hoe" ,ruby-hoe)))
7443 (synopsis "RFC 2617 HTTP digest authentication library")
7444 (description
7445 "This library implements HTTP's digest authentication scheme based on
7446RFC 2617. This enables the use of the digest authentication scheme instead
7447of the more insecure basic authentication scheme.")
7bf837fd 7448 (home-page "https://github.com/drbrain/net-http-digest_auth")
6689c636 7449 (license license:expat)))
06116573 7450
7451(define-public ruby-mail
7452 (package
7453 (name "ruby-mail")
04de0cb5 7454 (version "2.6.6")
06116573 7455 (source
7456 (origin
7457 (method url-fetch)
7458 (uri (rubygems-uri "mail" version))
7459 (sha256
7460 (base32
04de0cb5 7461 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
06116573 7462 (build-system ruby-build-system)
7463 (propagated-inputs
7464 `(("ruby-mime-types" ,ruby-mime-types)))
7465 (arguments
7466 ;; Tests require extra gems not included in the Gemfile.
7467 ;; XXX: Try enabling this for the next version with mini_mime.
7468 `(#:tests? #f))
7469 (synopsis "Mail library for Ruby")
7470 (description
7471 "Mail is an internet library for Ruby that is designed to handle email
7472generation, parsing and sending. The purpose of this library is to provide
7473a single point of access to handle all email functions, including sending
7474and receiving emails. All network type actions are done through proxy
7475methods to @code{Net::SMTP}, @code{Net::POP3} etc.
7476
7477Mail has been designed with a very simple object oriented system that
7478really opens up the email messages you are parsing, if you know what you
7479are doing, you can fiddle with every last bit of your email directly.")
7480 (home-page "https://github.com/mikel/mail")
7481 (license license:expat)))
9b4c8e1b 7482
4d372cb9
CB
7483(define-public ruby-mathn
7484 (package
7485 (name "ruby-mathn")
7486 (version "0.1.0")
7487 (source
7488 (origin
7489 (method url-fetch)
7490 (uri (rubygems-uri "mathn" version))
7491 (sha256
7492 (base32
7493 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
7494 (build-system ruby-build-system)
7495 (native-inputs
7496 `(("bundler" ,bundler)
7497 ("ruby-rake-compiler" ,ruby-rake-compiler)))
7498 (synopsis "Extends math operations for increased precision")
7499 (description
7500 "This gem makes mathematical operations more precise in Ruby and
7501integrates other mathematical standard libraries. Prior to Ruby 2.5,
7502@code{mathn} was part of the Ruby standard library.")
7503 (home-page "https://github.com/ruby/mathn")
7504 (license license:bsd-2)))
7505
9b4c8e1b
BW
7506(define-public ruby-code-statistics
7507 (package
7508 (name "ruby-code-statistics")
7509 (version "0.2.13")
7510 (source
7511 (origin
7512 (method url-fetch)
7513 (uri (rubygems-uri "code_statistics" version))
7514 (sha256
7515 (base32
7516 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
7517 (build-system ruby-build-system)
7518 (arguments
7519 `(#:tests? #f)) ; Not all test code is included in gem.
7520 (synopsis "Port of the rails 'rake stats' method")
7521 (description
7522 "This gem is a port of the rails 'rake stats' method so it can be made
7523more robust and work for non rails projects.")
7524 (home-page "http://github.com/danmayer/code_statistics")
7525 (license license:expat)))
f90c25c1
CL
7526
7527(define-public ruby-rubypants
7528 (package
7529 (name "ruby-rubypants")
7530 (version "0.6.0")
7531 (source (origin
7532 (method url-fetch)
7533 (uri (rubygems-uri "rubypants" version))
7534 (sha256
7535 (base32
7536 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
7537 (build-system ruby-build-system)
7538 (arguments
7539 '(#:tests? #f)) ; need Codecov
7540 (synopsis "Port of the smart-quotes library SmartyPants")
7541 (description
7542 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
7543original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
7544and BBEdit that easily translates plain ASCII punctuation characters into
7545smart typographic punctuation HTML entities.")
7546 (home-page "https://github.com/jmcnevin/rubypants")
7547 (license license:bsd-2)))
beb34835
CL
7548
7549(define-public ruby-org-ruby
7550 (package
7551 (name "ruby-org-ruby")
7552 (version "0.9.12")
7553 (source (origin
7554 (method url-fetch)
7555 (uri (rubygems-uri "org-ruby" version))
7556 (sha256
7557 (base32
7558 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
7559 (build-system ruby-build-system)
7560 (arguments
7561 '(#:tests? #f)) ; no rakefile
7562 (propagated-inputs
7563 `(("ruby-rubypants" ,ruby-rubypants)))
7564 (synopsis "Org-mode parser written in Ruby")
7565 (description
7566 "Org-ruby is an org-mode parser written in Ruby. The most significant
7567thing this library does today is convert org-mode files to HTML or Textile or
7568Markdown.")
7569 (home-page "https://github.com/wallyqs/org-ruby")
7570 (license license:expat)))
670ee20a
BW
7571
7572(define-public ruby-rake
7573 (package
7574 (name "ruby-rake")
d6fb32b8 7575 (version "12.3.1")
670ee20a
BW
7576 (source
7577 (origin
7578 (method url-fetch)
7579 (uri (rubygems-uri "rake" version))
7580 (sha256
7581 (base32
d6fb32b8 7582 "1idi53jay34ba9j68c3mfr9wwkg3cd9qh0fn9cg42hv72c6q8dyg"))))
670ee20a
BW
7583 (build-system ruby-build-system)
7584 (native-inputs
7585 `(("bundler" ,bundler)))
7586 (synopsis "Rake is a Make-like program implemented in Ruby")
7587 (description
7588 "Rake is a Make-like program where tasks and dependencies are specified
7589in standard Ruby syntax.")
7590 (home-page "https://github.com/ruby/rake")
7591 (license license:expat)))
45498f51 7592
51420124 7593(define-public ruby-childprocess
45498f51
DM
7594 (package
7595 (name "ruby-childprocess")
459e4a1a 7596 (version "3.0.0")
45498f51
DM
7597 (source
7598 (origin
7599 (method url-fetch)
7600 (uri (rubygems-uri "childprocess" version))
7601 (sha256
7602 (base32
459e4a1a 7603 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
45498f51
DM
7604 (build-system ruby-build-system)
7605 (arguments
7606 `(#:tests? #f))
7607 (native-inputs
7608 `(("bundler" ,bundler)
7609 ("ruby-rspec" ,ruby-rspec)))
7610 (propagated-inputs
7611 `(("ruby-ffi" ,ruby-ffi)))
7612 (synopsis "Control external programs running in the background, in Ruby")
7613 (description "@code{childprocess} provides a gem to control external
7614programs running in the background, in Ruby.")
459e4a1a 7615 (home-page "https://github.com/enkessler/childprocess")
45498f51 7616 (license license:expat)))
1f10e28d 7617
0d16905b
JL
7618(define-public ruby-public-suffix
7619 (package
7620 (name "ruby-public-suffix")
9de12df7 7621 (version "4.0.1")
0d16905b
JL
7622 (source (origin
7623 (method url-fetch)
7624 (uri (rubygems-uri "public_suffix" version))
7625 (sha256
7626 (base32
9de12df7 7627 "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"))))
0d16905b
JL
7628 (build-system ruby-build-system)
7629 (arguments
1f4fc125
CB
7630 '(#:phases
7631 (modify-phases %standard-phases
7632 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
7633 ;; including it as an input can lead to circular dependencies.
7634 (add-after 'unpack 'remove-rubocop-from-Rakefile
7635 (lambda _
7636 (substitute* "Rakefile"
7637 (("require \"rubocop/rake\\_task\"") "")
7638 (("RuboCop::RakeTask\\.new") ""))
7639 #t)))))
7640 (native-inputs
7641 `(("bundler" ,bundler)
7642 ("ruby-yard" ,ruby-yard)
7643 ("ruby-mocha" ,ruby-mocha)
7644 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
0d16905b
JL
7645 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
7646 (synopsis "Domain name parser")
7647 (description "The gem @code{public_suffix} is a domain name parser,
7648written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
7649is one under which Internet users can (or historically could) directly
7650register names. Some examples of public suffixes are @code{.com},
7651@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
7652all known public suffixes.")
7653 (license license:expat)))
6f2c4efb
JL
7654
7655(define-public ruby-addressable
7656 (package
7657 (name "ruby-addressable")
91f7ee87 7658 (version "2.7.0")
6f2c4efb
JL
7659 (source (origin
7660 (method url-fetch)
7661 (uri (rubygems-uri "addressable" version))
7662 (sha256
7663 (base32
91f7ee87 7664 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
6f2c4efb 7665 (build-system ruby-build-system)
0a794b30
CB
7666 (arguments
7667 '(#:test-target "spec"
7668 #:phases
7669 (modify-phases %standard-phases
7670 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
7671 (lambda _
7672 (substitute* "Gemfile"
7673 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
7674 ((".*launchy.*") "")
7675 ((".*rake.*") "gem 'rake'\n")
7676 ((".*redcarpet.*") ""))
7677 #t))
7678 (add-before 'check 'delete-network-dependent-test
7679 (lambda _
7680 (delete-file "spec/addressable/net_http_compat_spec.rb")
7681 #t)))))
7682 (native-inputs
7683 `(("ruby-rspec" ,ruby-rspec)
7684 ("bundler" ,bundler)
7685 ("ruby-idn-ruby" ,ruby-idn-ruby)
7686 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
7687 ("ruby-rspec-its", ruby-rspec-its)
7688 ("ruby-yard" ,ruby-yard)
7689 ("ruby-simplecov" ,ruby-simplecov)))
6f2c4efb
JL
7690 (propagated-inputs
7691 `(("ruby-public-suffix" ,ruby-public-suffix)))
6f2c4efb
JL
7692 (home-page "https://github.com/sporkmonger/addressable")
7693 (synopsis "Alternative URI implementation")
7694 (description "Addressable is a replacement for the URI implementation that
7695is part of Ruby's standard library. It more closely conforms to RFC 3986,
7696RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
7697 (license license:asl2.0)))
9c7f15c0
JL
7698
7699(define-public ruby-colorator
7700 (package
7701 (name "ruby-colorator")
7702 (version "1.1.0")
7703 (source (origin
7704 (method url-fetch)
7705 (uri (rubygems-uri "colorator" version))
7706 (sha256
7707 (base32
7708 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
7709 (build-system ruby-build-system)
7710 (arguments
7711 ;; No test target
7712 `(#:tests? #f))
7713 (home-page "http://octopress.org/colorator/")
7714 (synopsis "Terminal color library")
7715 (description "Colorator is a Ruby gem that helps you colorize your text
7716for the terminal.")
7717 (license license:expat)))
78b9c291
JL
7718
7719(define-public ruby-command-line-reporter
7720 (package
7721 (name "ruby-command-line-reporter")
b448e408 7722 (version "4.0.1")
78b9c291
JL
7723 (source (origin
7724 (method url-fetch)
7725 (uri (rubygems-uri "command_line_reporter" version))
7726 (sha256
7727 (base32
b448e408 7728 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
78b9c291
JL
7729 (build-system ruby-build-system)
7730 (arguments
7731 ;; No Rakefile
7732 `(#:tests? #f
7733 #:phases
7734 (modify-phases %standard-phases
7735 (add-before 'build 'fix-dependencies
7736 (lambda _
7737 (substitute* ".gemspec"
7738 ;; colored is unmaintained
7739 (("colored") "colorator")
7740 ;; colorator version
7741 (("= 1.2") "= 1.1"))
7742 #t)))))
7743 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
7744 (home-page "https://github.com/wbailey/command_line_reporter")
7745 (synopsis "Report production while executing Ruby scripts")
7746 (description "This gem provides a DSL that makes it easy to write reports
7747of various types in ruby. It eliminates the need to litter your source with
7748puts statements, instead providing a more readable, expressive interface to
7749your application.")
7750 (license license:asl2.0)))
f22c0387
JL
7751
7752(define-public ruby-command-line-reporter-3
7753 (package
7754 (inherit ruby-command-line-reporter)
7755 (version "3.3.6")
7756 (source (origin
7757 (method url-fetch)
7758 (uri (rubygems-uri "command_line_reporter" version))
7759 (sha256
7760 (base32
7761 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
6bba8ecf
JL
7762
7763(define-public ruby-rdoc
7764 (package
7765 (name "ruby-rdoc")
7766 (version "6.0.4")
7767 (source
7768 (origin
7769 (method url-fetch)
7770 (uri (rubygems-uri "rdoc" version))
7771 (sha256
7772 (base32
7773 "0anv42cqcdc6g4n386mrva7mgav5i0c2ry3yzvzzc6z6hymkmcr7"))))
7774 (build-system ruby-build-system)
7775 (native-inputs
7776 `(("bundler" ,bundler)))
7777 (home-page "https://ruby.github.io/rdoc/")
7778 (synopsis "HTML and command-line documentation utility")
7779 (description "RDoc produces HTML and command-line documentation for Ruby
7780projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
7781documentation from the command-line.")
7782 (license license:gpl2+)))
18077ffc
JL
7783
7784(define-public ruby-sass-listen
7785 (package
7786 (name "ruby-sass-listen")
7787 (version "4.0.0")
7788 (source (origin
7789 (method url-fetch)
7790 (uri (rubygems-uri "sass-listen" version))
7791 (sha256
7792 (base32
7793 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
7794 (build-system ruby-build-system)
7795 (arguments
7796 ;; No test target
7797 `(#:tests? #f))
7798 (propagated-inputs
7799 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
7800 ("ruby-rb-inotify" ,ruby-rb-inotify)))
7801 (home-page "https://github.com/sass/listen")
7802 (synopsis "File modification notification library")
7803 (description "The Listen gem listens to file modifications and notifies you
7804about the changes.")
7805 (license license:expat)))
0c8eedc1
JL
7806
7807(define-public ruby-terminfo
7808 (package
7809 (name "ruby-terminfo")
7810 (version "0.1.1")
7811 (source
7812 (origin
7813 (method url-fetch)
7814 (uri (rubygems-uri "ruby-terminfo" version))
7815 (sha256
7816 (base32
7817 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
7818 (build-system ruby-build-system)
7819 (arguments
7820 `(#:test-target "test"
7821 ;; Rakefile requires old packages and would need modification to
7822 ;; work with current software.
7823 #:tests? #f))
7824 (inputs
7825 `(("ncurses" ,ncurses)))
7826 (native-inputs
7827 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
7828 ("ruby-rdoc" ,ruby-rdoc)))
7829 (home-page "http://www.a-k-r.org/ruby-terminfo/")
7830 (synopsis "Terminfo binding for Ruby")
7831 (description "Ruby-terminfo provides terminfo binding for Ruby.")
7832 (license license:bsd-3)))
ddc3a667
JL
7833
7834(define-public ruby-diffy
7835 (package
7836 (name "ruby-diffy")
7837 (version "3.2.1")
7838 (source
7839 (origin
7840 (method url-fetch)
7841 (uri (rubygems-uri "diffy" version))
7842 (sha256
7843 (base32
7844 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
7845 (build-system ruby-build-system)
7846 (arguments
7847 ;; No tests
7848 `(#:tests? #f))
7849 (native-inputs
7850 `(("ruby-rspec" ,ruby-rspec)))
7851 (home-page "https://github.com/samg/diffy")
7852 (synopsis "Convenient diffing in ruby")
7853 (description "Diffy provides a convenient way to generate a diff from two
7854strings or files.")
7855 (license license:expat)))
6456beef
JL
7856
7857(define-public ruby-sass-spec
7858 (package
7859 (name "ruby-sass-spec")
7860 (version "3.5.4")
11df8321
TGR
7861 (source
7862 (origin
7863 (method git-fetch)
7864 (uri (git-reference
7865 (url "https://github.com/sass/sass-spec.git")
7866 (commit (string-append "v" version))))
7867 (file-name (git-file-name name version))
7868 (sha256
7869 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
6456beef
JL
7870 (build-system ruby-build-system)
7871 (propagated-inputs
7872 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
7873 ("ruby-diffy" ,ruby-diffy)
7874 ("ruby-terminfo" ,ruby-terminfo)))
7875 (arguments
2c7cb711
CB
7876 `(;; This package contains tests for a sass implementation, and the to
7877 ;; avoid any circular dependencies, the tests are not run here
7878 #:tests? #f
7879 #:phases
7880 (modify-phases %standard-phases
7881 (add-after 'unpack 'patch-test
7882 (lambda _
7883 (delete-file "spec/values/colors/alpha_hex-3.5/error")
7884 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
7885 (("string") "color")))))))
6456beef
JL
7886 (home-page "https://github.com/sass/sass-spec")
7887 (synopsis "Test suite for Sass")
7888 (description "Sass Spec is a test suite for Sass. Test cases are all in
7889the @file{spec} directory.")
7890 (license license:expat)))
f00f4492
JL
7891
7892(define-public ruby-sass
7893 (package
7894 (name "ruby-sass")
11ff2adc 7895 (version "3.6.0")
f00f4492
JL
7896 (source (origin
7897 (method url-fetch)
7898 (uri (rubygems-uri "sass" version))
7899 (sha256
7900 (base32
11ff2adc 7901 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
f00f4492
JL
7902 (build-system ruby-build-system)
7903 (propagated-inputs
7904 `(("ruby-sass-listen" ,ruby-sass-listen)))
7905 (native-inputs
11ff2adc
CB
7906 `(("ruby-sass-spec" ,ruby-sass-spec)
7907 ("ruby-mathn" ,ruby-mathn)))
3497086b 7908 (home-page "https://sass-lang.com/")
f00f4492
JL
7909 (synopsis "CSS extension language")
7910 (description "Sass is a CSS extension language. It extends CSS with
7911features that don't exist yet like variables, nesting, mixins and inheritance.")
7912 (license license:expat)))
5e242cb4 7913
9efc888d
CB
7914(define-public ruby-sassc
7915 (package
7916 (name "ruby-sassc")
3e776b44 7917 (version "2.2.1")
9efc888d
CB
7918 (source
7919 (origin
7920 (method url-fetch)
7921 (uri (rubygems-uri "sassc" version))
7922 (sha256
7923 (base32
3e776b44 7924 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
9efc888d
CB
7925 (build-system ruby-build-system)
7926 (arguments
3e776b44
CB
7927 '(#:modules ((guix build ruby-build-system)
7928 (guix build utils)
7929 (ice-9 textual-ports))
7930 #:phases
9efc888d
CB
7931 (modify-phases %standard-phases
7932 ;; TODO: This would be better as a snippet, but the ruby-build-system
7933 ;; doesn't seem to support that
7934 (add-after 'unpack 'remove-libsass
7935 (lambda _
7936 (delete-file-recursively "ext")
3e776b44
CB
7937 (with-atomic-file-replacement "sassc.gemspec"
7938 (lambda (in out)
7939 (let* ((gemspec (get-string-all in))
7940 (index (string-contains gemspec "libsass_dir")))
7941 (display (string-append
7942 (string-take gemspec index)
7943 "\nend\n")
7944 out))))
9efc888d
CB
7945 #t))
7946 (add-after 'unpack 'dont-check-the-libsass-version
7947 (lambda _
7948 (substitute* "test/native_test.rb"
7949 (("assert_equal.*Native\\.version") ""))
7950 #t))
7951 (add-after 'unpack 'remove-git-from-gemspec
7952 (lambda _
7953 (substitute* "sassc.gemspec"
3e776b44 7954 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
9efc888d
CB
7955 #t))
7956 (add-after 'unpack 'remove-extensions-from-gemspec
7957 (lambda _
7958 (substitute* "sassc.gemspec"
3e776b44 7959 (("\\[\"ext/extconf.rb\"\\]") "[]"))
9efc888d
CB
7960 #t))
7961 (add-after 'unpack 'fix-Rakefile
7962 (lambda _
7963 (substitute* "Rakefile"
3e776b44 7964 (("test: 'compile:libsass'") ":test"))
9efc888d
CB
7965 #t))
7966 (add-after 'unpack 'remove-unnecessary-dependencies
7967 (lambda _
7968 (substitute* "test/test_helper.rb"
7969 (("require \"pry\"") ""))
7970 #t))
7971 (add-before 'build 'patch-native.rb
7972 (lambda* (#:key inputs #:allow-other-keys)
7973 (substitute* "lib/sassc/native.rb"
7974 ((".*gem_root = spec.gem_dir") "")
7975 (("ffi_lib .*\n")
7976 (string-append
7977 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
7978 #t))
7979 ;; The gemspec still references the libsass files, so just keep the
7980 ;; one in the gem.
7981 (delete 'extract-gemspec))))
7982 (propagated-inputs
7983 `(("ruby-ffi" ,ruby-ffi)
7984 ("ruby-rake" ,ruby-rake)))
7985 (inputs
7986 `(("libsass" ,libsass)))
7987 (native-inputs
7988 `(("bundler" ,bundler)
3e776b44 7989 ("ruby-rake-compiler" ,ruby-rake-compiler)
9efc888d
CB
7990 ("ruby-minitest-around" ,ruby-minitest-around)
7991 ("ruby-test-construct" ,ruby-test-construct)))
7992 (synopsis "Use libsss from Ruby")
7993 (description
7994 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
7995bindings to the libsass library. This enables rendering
7996@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
7997 (home-page "https://github.com/sass/sassc-ruby")
7998 (license license:expat)))
7999
5e242cb4
JL
8000(define-public ruby-jekyll-sass-converter
8001 (package
8002 (name "ruby-jekyll-sass-converter")
8003 (version "1.5.2")
8004 (source (origin
8005 (method url-fetch)
8006 (uri (rubygems-uri "jekyll-sass-converter" version))
8007 (sha256
8008 (base32
8009 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
8010 (build-system ruby-build-system)
8011 (propagated-inputs
8012 `(("ruby-sass" ,ruby-sass)))
8013 (arguments
8014 ;; No rakefile
8015 `(#:tests? #f))
8016 (home-page "https://github.com/jekyll/jekyll-sass-converter")
8017 (synopsis "Sass converter for Jekyll")
8018 (description "This gem provide built-in support for the Sass converter
8019in Jekyll.")
8020 (license license:expat)))
ceac6f6f
JL
8021
8022(define-public ruby-jekyll-watch
8023 (package
8024 (name "ruby-jekyll-watch")
6cbba8a3 8025 (version "2.1.2")
ceac6f6f
JL
8026 (source (origin
8027 (method url-fetch)
8028 (uri (rubygems-uri "jekyll-watch" version))
8029 (sha256
8030 (base32
6cbba8a3 8031 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
ceac6f6f
JL
8032 (build-system ruby-build-system)
8033 (propagated-inputs
6cbba8a3 8034 `(("ruby-listen" ,ruby-listen)))
ceac6f6f
JL
8035 (arguments
8036 ;; No rakefile
8037 `(#:tests? #f))
8038 (home-page "https://github.com/jekyll/jekyll-watch")
8039 (synopsis "Jekyll auto-rebuild support")
8040 (description "This gems add the @code{--watch} switch to the jekyll CLI
8041interface. It allows Jekyll to rebuild your site when a file changes.")
8042 (license license:expat)))
3224a5a8
JL
8043
8044(define-public ruby-parallel
8045 (package
8046 (name "ruby-parallel")
c41fba01
CB
8047 (version "1.13.0")
8048 (source
8049 (origin
8050 (method git-fetch)
8051 (uri (git-reference
8052 (url "https://github.com/grosser/parallel.git")
8053 (commit (string-append "v" version))))
8054 (file-name (git-file-name name version))
8055 (sha256
8056 (base32
8057 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
3224a5a8 8058 (build-system ruby-build-system)
c41fba01
CB
8059 (arguments
8060 `(;; TODO 3 test failures
8061 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
8062 ;; open unnecessary pipes
8063 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
8064 ;; SQLite in processes
8065 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
8066 ;; SQLite in threads
8067 #:tests? #f
8068 #:test-target "rspec-rerun:spec"
8069 #:phases
8070 (modify-phases %standard-phases
8071 (add-after 'unpack 'patch-Gemfile
8072 (lambda _
8073 (substitute* "Gemfile"
8074 (("gem 'rspec-legacy_formatters'") "")
8075 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
8076 (add-before 'check 'delete-Gemfile.lock
8077 (lambda _
8078 ;; Bundler isn't being used for fetching dependendencies, so
8079 ;; delete the Gemfile.lock
8080 (delete-file "Gemfile.lock")
8081 #t))
8082 (add-before 'build 'patch-gemspec
8083 (lambda _
8084 (substitute* "parallel.gemspec"
8085 (("git ls-files") "find"))
8086 #t)))))
8087 (native-inputs
8088 `(("ruby-rspec" ,ruby-rspec)
8089 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
8090 ("bundler" ,bundler)
8091 ("ruby-activerecord" ,ruby-activerecord)
8092 ("ruby-progressbar" ,ruby-progressbar)
8093 ("ruby-bump" ,ruby-bump)
8094 ("procps" ,procps)
8095 ("lsof" ,lsof)
8096 ("ruby-mysql2" ,ruby-mysql2)
8097 ("ruby-sqlite3" ,ruby-sqlite3)
8098 ("ruby-i18n" ,ruby-i18n)))
3224a5a8
JL
8099 (home-page "https://github.com/grosser/parallel")
8100 (synopsis "Parallel processing in Ruby")
8101 (description "Parallel allows you to run any code in parallel Processes
8102(to use all CPUs) or Threads(to speedup blocking operations). It is best
8103suited for map-reduce or e.g. parallel downloads/uploads.")
8104 (license license:expat)))
83d9f672
JL
8105
8106(define-public ruby-cane
8107 (package
8108 (name "ruby-cane")
8109 (version "3.0.0")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (rubygems-uri "cane" version))
8113 (sha256
8114 (base32
8115 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
8116 (build-system ruby-build-system)
8117 (arguments `(#:tests? #f)); No rakefile
8118 (home-page "https://github.com/square/cane")
8119 (propagated-inputs
8120 `(("ruby-parallel" ,ruby-parallel)))
8121 (synopsis "Code quality threshold checking")
8122 (description "Cane fails your build if code quality thresholds are not met.")
8123 (license license:asl2.0)))
00d71efc
JL
8124
8125(define-public ruby-morecane
8126 (package
8127 (name "ruby-morecane")
8128 (version "0.2.0")
8129 (source (origin
8130 (method url-fetch)
8131 (uri (rubygems-uri "morecane" version))
8132 (sha256
8133 (base32
8134 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
8135 (build-system ruby-build-system)
8136 (home-page "https://github.com/yob/morecane")
8137 (arguments `(#:tests? #f)); No rakefile
8138 (propagated-inputs
8139 `(("ruby-parallel" ,ruby-parallel)))
8140 (synopsis "Extra checks for cane")
8141 (description "The cane gem provides a great framework for running quality
8142checks over your ruby project as part of continuous integration build. It
8143comes with a few checks out of the box, but also provides an API for loading
8144custom checks. This gem provides a set of additional checks.")
8145 (license license:expat)))
abbe629c
JL
8146
8147(define-public ruby-pdf-reader
8148 (package
8149 (name "ruby-pdf-reader")
8150 (version "2.1.0")
8151 (source (origin
8152 (method url-fetch)
8153 (uri (rubygems-uri "pdf-reader" version))
8154 (sha256
8155 (base32
8156 "1b3ig4wpcgdbqa7yw0ahwbmikkkywn2a22bfmrknl5ls7g066x45"))))
8157 (build-system ruby-build-system)
8158 (arguments `(#:test-target "spec"))
8159 (native-inputs
8160 `(("bundler" ,bundler)
8161 ("ruby-rspec" ,ruby-rspec)
8162 ("ruby-cane" ,ruby-cane)
8163 ("ruby-morecane" ,ruby-morecane)))
8164 (propagated-inputs
8165 `(("ruby-afm" ,ruby-afm)
8166 ("ruby-ascii85" ,ruby-ascii85)
8167 ("ruby-hashery" ,ruby-hashery)
8168 ("ruby-rc4" ,ruby-rc4)
8169 ("ruby-ttfunk" ,ruby-ttfunk)))
8170 (home-page "https://github.com/yob/pdf-reader")
8171 (synopsis "PDF parser in Ruby")
8172 (description "The PDF::Reader library implements a PDF parser conforming as
8173much as possible to the PDF specification from Adobe. It provides programmatic
8174access to the contents of a PDF file with a high degree of flexibility.")
8175 (license license:gpl3+)))
461fb859
JL
8176
8177(define-public ruby-pdf-inspector
8178 (package
8179 (name "ruby-pdf-inspector")
8180 (version "1.3.0")
8181 (source (origin
8182 (method url-fetch)
8183 (uri (rubygems-uri "pdf-inspector" version))
8184 (sha256
8185 (base32
8186 "1g853az4xzgqxr5xiwhb76g4sqmjg4s79mm35mp676zjsrwpa47w"))))
8187 (build-system ruby-build-system)
8188 (propagated-inputs
8189 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
8190 (arguments `(#:tests? #f)); No rakefile
8191 (home-page "https://github.com/prawnpdf/pdf-inspector")
8192 (synopsis "Analysis classes for inspecting PDF output")
8193 (description "This library provides a number of PDF::Reader based tools for
8194use in testing PDF output. Presently, the primary purpose of this tool is to
8195support the tests found in Prawn, a pure Ruby PDF generation library.")
8196 (license license:gpl3+)))
770e3b53
JL
8197
8198(define-public ruby-pdf-core
8199 (package
8200 (name "ruby-pdf-core")
8201 (version "0.8.1")
8202 (source (origin
8203 (method url-fetch)
8204 (uri (rubygems-uri "pdf-core" version))
8205 (sha256
8206 (base32
8207 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
8208 (build-system ruby-build-system)
8209 (arguments
8210 ; No test target
8211 `(#:tests? #f))
8212 (home-page "https://github.com/prawnpdf/pdf-core")
8213 (synopsis "Low level PDF features for Prawn")
8214 (description "This is an experimental gem that extracts low-level PDF
8215functionality from Prawn.")
8216 (license license:gpl3+)))
37fbced7 8217
7ad8dd08
JL
8218(define-public ruby-prawn
8219 (package
8220 (name "ruby-prawn")
8221 (version "2.2.2")
8222 (source (origin
8223 (method url-fetch)
8224 (uri (rubygems-uri "prawn" version))
8225 (sha256
8226 (base32
8227 "1qdjf1v6sfl44g3rqxlg8k4jrzkwaxgvh2l4xws97a8f3xv4na4m"))))
8228 (build-system ruby-build-system)
8229 (arguments
8230 ; No tests
8231 `(#:tests? #f
8232 #:phases
8233 (modify-phases %standard-phases
8234 (add-before 'build 'fix-dependencies
8235 (lambda _
8236 (substitute* "prawn.gemspec"
8237 (("~> 0.7.0") "~> 0.7"))
8238 #t)))))
8239 (propagated-inputs
8240 `(("ruby-pdf-core" ,ruby-pdf-core)
8241 ("ruby-ttfunk" ,ruby-ttfunk)))
8242 (native-inputs
8243 `(("bundler" ,bundler)
8244 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
8245 ("ruby-rspec" ,ruby-rspec)
8246 ("ruby-simplecov" ,ruby-simplecov)
8247 ("ruby-yard" ,ruby-yard)))
8248 (home-page "http://prawnpdf.org/api-docs/2.0/")
8249 (synopsis "PDF generation for Ruby")
8250 (description "Prawn is a pure Ruby PDF generation library.")
8251 (license license:gpl3+)))
197ca8ec
JL
8252
8253(define-public ruby-prawn-table
8254 (package
8255 (name "ruby-prawn-table")
8256 (version "0.2.2")
8257 (source (origin
8258 (method url-fetch)
8259 (uri (rubygems-uri "prawn-table" version))
8260 (sha256
8261 (base32
8262 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
8263 (build-system ruby-build-system)
197ca8ec 8264 (propagated-inputs
0927b039
CB
8265 `(("ruby-prawn" ,ruby-prawn)
8266 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
8267 (native-inputs
8268 `(("bundler" ,bundler)
8269 ("ruby-yard" ,ruby-yard)
8270 ("ruby-mocha" ,ruby-mocha)
8271 ("ruby-coderay" ,ruby-coderay)
8272 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
8273 ("ruby-simplecov" ,ruby-simplecov)
8274 ("ruby-rspec-2" ,ruby-rspec-2)))
8275 (arguments
8276 '(;; TODO: 1 test fails
8277 ;; Failure/Error: pdf.page_count.should == 1
8278 ;; expected: 1
8279 ;; got: 2 (using ==)
8280 ;; # ./spec/table_spec.rb:1308
8281 ;;
8282 ;; 225 examples, 1 failure
8283 #:tests? #f
8284 #:phases
8285 (modify-phases %standard-phases
8286 (add-before 'check 'patch-gemspec
8287 (lambda _
8288 (substitute* "prawn-table.gemspec"
8289 ;; Loosen the requirement for pdf-inspector
8290 (("~> 1\\.1\\.0") ">= 0")
8291 ;; Loosen the requirement for pdf-reader
8292 (("~> 1\\.2") ">= 0"))))
8293 (replace 'check
8294 (lambda* (#:key tests? #:allow-other-keys)
8295 (when tests?
8296 (invoke "rspec"))
8297 #t)))))
197ca8ec
JL
8298 (home-page "https://github.com/prawnpdf/prawn-table")
8299 (synopsis "Tables support for Prawn")
8300 (description "This gem provides tables support for Prawn.")
8301 (license license:gpl3+)))
03127069
JL
8302
8303(define-public ruby-kramdown
8304 (package
8305 (name "ruby-kramdown")
8306 (version "1.17.0")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (rubygems-uri "kramdown" version))
8310 (sha256
8311 (base32
8312 "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq"))))
8313 (build-system ruby-build-system)
8314 (arguments `(#:tests? #f)); FIXME: some test failures
8315 (native-inputs
8316 `(("ruby-prawn" ,ruby-prawn)
8317 ("ruby-prawn-table" ,ruby-prawn-table)))
8318 (home-page "https://kramdown.gettalong.org/")
8319 (synopsis "Markdown parsing and converting library")
8320 (description "Kramdown is a library for parsing and converting a superset
8321of Markdown. It is completely written in Ruby, supports standard Markdown
8322(with some minor modifications) and various extensions that have been made
8323popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
8324 (license license:expat)))
fa0063bc
JL
8325
8326(define-public ruby-http-parser.rb
8327 (package
8328 (name "ruby-http-parser.rb")
8329 (version "0.6.0")
8330 (source
8331 (origin
8332 (method url-fetch)
8333 (uri (rubygems-uri "http_parser.rb" version))
8334 (sha256
8335 (base32
8336 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
8337 (build-system ruby-build-system)
8338 (arguments
8339 ;; No tests
8340 `(#:tests? #f))
8341 (native-inputs
8342 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8343 ("ruby-rspec" ,ruby-rspec)))
8344 (home-page "https://github.com/tmm1/http_parser.rb")
8345 (synopsis "HTTP parser un Ruby")
8346 (description "This gem is a simple callback-based HTTP request/response
8347parser for writing http servers, clients and proxies.")
8348 (license license:expat)))
5e2f74bd
JL
8349
8350(define-public ruby-em-websocket
8351 (package
8352 (name "ruby-em-websocket")
8353 (version "0.5.1")
8354 (source
8355 (origin
8356 (method url-fetch)
8357 (uri (rubygems-uri "em-websocket" version))
8358 (sha256
8359 (base32
8360 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
8361 (build-system ruby-build-system)
8362 (arguments
8363 ;; No tests
8364 `(#:tests? #f))
8365 (propagated-inputs
8366 `(("ruby-eventmachine" ,ruby-eventmachine)
8367 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
8368 (native-inputs
8369 `(("bundler" ,bundler)
8370 ("ruby-rspec" ,ruby-rspec)))
8371 (home-page "https://github.com/igrigorik/em-websocket")
8372 (synopsis "EventMachine based WebSocket server")
8373 (description "Em-websocket is an EventMachine based WebSocket server
8374implementation.")
8375 (license license:expat)))
4ce0414b
JL
8376
8377(define-public ruby-rouge
8378 (package
8379 (name "ruby-rouge")
55cc5ef8 8380 (version "3.13.0")
4ce0414b
JL
8381 (source (origin
8382 (method url-fetch)
8383 (uri (rubygems-uri "rouge" version))
8384 (sha256
8385 (base32
55cc5ef8 8386 "1y90nx9ph9adnrpcsvs2adca2l3dyz8am2d2kzxkwd3a086ji7aw"))))
4ce0414b
JL
8387 (build-system ruby-build-system)
8388 (arguments `(#:tests? #f)); No rakefile
8389 (home-page "http://rouge.jneen.net/")
8390 (synopsis "Code highlighter")
8391 (description "Rouge is a code highlighter written in Ruby. It supports more
8392than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
8393is compatible with stylesheets designed for pygments.")
8394 (license (list
8395 ;; rouge is licensed under expat
8396 license:expat
8397 ;; pygments is licensed under bsd-2
8398 license:bsd-2))))
2c5028bd
JL
8399
8400(define-public ruby-rouge-2
8401 (package
8402 (inherit ruby-rouge)
8403 (version "2.2.1")
8404 (source (origin
8405 (method url-fetch)
8406 (uri (rubygems-uri "rouge" version))
8407 (sha256
8408 (base32
8409 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
2e072e37
JL
8410
8411(define-public ruby-hashie
8412 (package
8413 (name "ruby-hashie")
8414 (version "3.6.0")
8415 (source (origin
8416 (method url-fetch)
8417 (uri (rubygems-uri "hashie" version))
8418 (sha256
8419 (base32
8420 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
8421 (build-system ruby-build-system)
8422 (native-inputs
8423 `(("bundler" ,bundler)))
8424 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
8425 (home-page "https://github.com/intridea/hashie")
8426 (synopsis "Extensions to Ruby Hashes")
8427 (description "Hashie is a collection of classes and mixins that make Ruby
8428hashes more powerful.")
8429 (license license:expat)))
73bfc125
JL
8430
8431(define-public ruby-heredoc-unindent
8432 (package
8433 (name "ruby-heredoc-unindent")
8434 (version "1.2.0")
8435 (source (origin
8436 (method url-fetch)
8437 (uri (rubygems-uri "heredoc_unindent" version))
8438 (sha256
8439 (base32
8440 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
8441 (build-system ruby-build-system)
8442 (native-inputs
8443 `(("ruby-hoe" ,ruby-hoe)))
8444 (home-page "https://github.com/adrianomitre/heredoc_unindent")
8445 (synopsis "Heredoc indentation cleaner")
8446 (description "This gem removes common margin from indented strings, such
8447as the ones produced by indented heredocs. In other words, it strips out
4f66ae28 8448leading whitespace chars at the beginning of each line, but only as much as
73bfc125
JL
8449the line with the smallest margin.
8450
8451It is acknowledged that many strings defined by heredocs are just code and
8452fact is that most parsers are insensitive to indentation. If, however, the
8453strings are to be used otherwise, be it for printing or testing, the extra
8454indentation will probably be an issue and hence this gem.")
8455 (license license:expat)))
f8ae2ee5
JL
8456
8457(define-public ruby-safe-yaml
8458 (package
8459 (name "ruby-safe-yaml")
7fa83fa8 8460 (version "1.0.5")
28cf8dab
CB
8461 (source
8462 (origin
28cf8dab
CB
8463 (method git-fetch)
8464 (uri (git-reference
8465 (url "https://github.com/dtao/safe_yaml.git")
8466 (commit version)))
8467 (file-name (git-file-name name version))
8468 (sha256
8469 (base32
7fa83fa8 8470 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
f8ae2ee5
JL
8471 (build-system ruby-build-system)
8472 (native-inputs
8473 `(("ruby-rspec" ,ruby-rspec)
8474 ("ruby-hashie" ,ruby-hashie)
8475 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
28cf8dab
CB
8476 (arguments
8477 '(#:test-target "spec"
8478 #:phases
8479 (modify-phases %standard-phases
8480 (add-before 'check 'set-TZ
8481 (lambda _
8482 ;; This test is dependent on the timezone
8483 ;; spec/transform/to_date_spec.rb:35
8484 ;; # SafeYAML::Transform::ToDate converts times to the local
8485 ;; timezone
8486 (setenv "TZ" "UTC-11")
8487 #t)))))
f8ae2ee5
JL
8488 (home-page "https://github.com/dtao/safe_yaml")
8489 (synopsis "YAML parser")
8490 (description "The SafeYAML gem provides an alternative implementation of
8491YAML.load suitable for accepting user input in Ruby applications.")
8492 (license license:expat)))
f1ec4d76
JL
8493
8494(define-public ruby-mercenary
8495 (package
8496 (name "ruby-mercenary")
8497 (version "0.3.6")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (rubygems-uri "mercenary" version))
8501 (sha256
8502 (base32
8503 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
8504 (build-system ruby-build-system)
8505 (arguments `(#:test-target "spec"))
8506 (native-inputs
8507 `(("bundler" ,bundler)))
8508 (home-page "https://github.com/jekyll/mercenary")
8509 (synopsis "Command-line apps library in Ruby")
8510 (description "Mercenary is a lightweight and flexible library for writing
8511command-line apps in Ruby.")
8512 (license license:expat)))
a13d451e
JL
8513
8514(define-public ruby-liquid
8515 (package
8516 (name "ruby-liquid")
8517 (version "4.0.0")
8518 (source (origin
8519 (method url-fetch)
8520 (uri (rubygems-uri "liquid" version))
8521 (sha256
8522 (base32
8523 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
8524 (build-system ruby-build-system)
8525 (arguments `(#:tests? #f)); No rakefile
8526 (home-page "https://shopify.github.io/liquid/")
8527 (synopsis "Template language")
8528 (description "Liquid is a template language written in Ruby. It is used
8529to load dynamic content on storefronts.")
8530 (license license:expat)))
49395112
JL
8531
8532(define-public ruby-forwardable-extended
8533 (package
8534 (name "ruby-forwardable-extended")
8535 (version "2.6.0")
8536 (source (origin
8537 (method url-fetch)
8538 (uri (rubygems-uri "forwardable-extended" version))
8539 (sha256
8540 (base32
8541 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
8542 (build-system ruby-build-system)
8543 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
8544 (home-page "https://github.com/envygeeks/forwardable-extended")
8545 (synopsis "Delegation to hashes and instance variables in Forwardable")
8546 (description "Forwardable Extended provides more @code{Forwardable}
8547methods for your source as @code{Forwardable::Extended}.")
8548 (license license:expat)))
37296113
JL
8549
8550(define-public ruby-pathutil
8551 (package
8552 (name "ruby-pathutil")
feaaa603 8553 (version "0.16.2")
37296113
JL
8554 (source (origin
8555 (method url-fetch)
8556 (uri (rubygems-uri "pathutil" version))
8557 (sha256
8558 (base32
feaaa603 8559 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
37296113
JL
8560 (build-system ruby-build-system)
8561 (propagated-inputs
8562 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
8563 (native-inputs
8564 `(("bundler" ,bundler)
8565 ("ruby-rspec" ,ruby-rspec)))
8566 ;; Fails with: cannot load such file --
8567 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
8568 (arguments `(#:tests? #f))
8569 (home-page "https://github.com/envygeeks/pathutil")
8570 (synopsis "Extended implementation of Pathname")
8571 (description "Pathutil tries to be a faster pure Ruby implementation of
8572Pathname.")
8573 (license license:expat)))
49e1dde5
JL
8574
8575(define-public jekyll
8576 (package
8577 (name "jekyll")
fcf82fd3 8578 (version "3.8.6")
49e1dde5
JL
8579 (source (origin
8580 (method url-fetch)
8581 (uri (rubygems-uri "jekyll" version))
8582 (sha256
8583 (base32
fcf82fd3 8584 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
49e1dde5
JL
8585 (build-system ruby-build-system)
8586 (arguments
fcf82fd3 8587 ;; No rakefile, but a test subdirectory.
49e1dde5
JL
8588 `(#:tests? #f
8589 #:phases
8590 (modify-phases %standard-phases
8591 (add-before 'build 'fix-i18n
8592 (lambda _
8593 (substitute* ".gemspec"
8594 (("~> 0.7") ">= 0.7"))
8595 #t)))))
8596 (propagated-inputs
8597 `(("ruby-addressable" ,ruby-addressable)
8598 ("ruby-colorator" ,ruby-colorator)
8599 ("ruby-em-websocket" ,ruby-em-websocket)
8600 ("ruby-i18n" ,ruby-i18n)
8601 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
8602 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
8603 ("ruby-kramdown" ,ruby-kramdown)
8604 ("ruby-liquid" ,ruby-liquid)
8605 ("ruby-mercenary" ,ruby-mercenary)
8606 ("ruby-pathutil" ,ruby-pathutil)
8607 ("ruby-rouge" ,ruby-rouge-2)
8608 ("ruby-safe-yaml" ,ruby-safe-yaml)))
8609 (home-page "https://jekyllrb.com/")
8610 (synopsis "Static site generator")
8611 (description "Jekyll is a simple, blog aware, static site generator.")
8612 (license license:expat)))
37a0f470
JL
8613
8614(define-public ruby-jekyll-paginate-v2
8615 (package
8616 (name "ruby-jekyll-paginate-v2")
8617 (version "2.0.0")
8618 (source (origin
8619 (method url-fetch)
8620 (uri (rubygems-uri "jekyll-paginate-v2" version))
8621 (sha256
8622 (base32
8623 "154bfpyml6abxww9868hhyfvxasl8qhsc5zy2q30c7dxaj0igdib"))))
8624 (build-system ruby-build-system)
8625 (propagated-inputs
8626 `(("jekyll" ,jekyll)))
8627 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
8628 (synopsis "Pagination Generator for Jekyll 3")
8629 (description "The Pagination Generator forms the core of the pagination
8630logic in Jekyll. It calculates and generates the pagination pages.")
8631 (license license:expat)))
909eae21
CB
8632
8633(define-public ruby-faraday
8634 (package
8635 (name "ruby-faraday")
8636 (version "0.15.4")
8637 (source
8638 (origin
8639 (method url-fetch)
8640 (uri (rubygems-uri "faraday" version))
8641 (sha256
8642 (base32
8643 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
8644 (build-system ruby-build-system)
8645 (arguments
8646 '(#:tests? #f))
8647 (propagated-inputs
8648 `(("ruby-multipart-post" ,ruby-multipart-post)))
8649 (synopsis "Ruby HTTP/REST API client library")
8650 (description
8651 "Faraday is a HTTP/REST API client library which provides a common
8652interface over different adapters.")
8653 (home-page "https://github.com/lostisland/faraday")
8654 (license license:expat)))
a058cbfd
CB
8655
8656(define-public ruby-nio4r
8657 (package
8658 (name "ruby-nio4r")
7923b9bf 8659 (version "2.5.2")
a058cbfd
CB
8660 (source
8661 (origin
8662 (method url-fetch)
8663 (uri (rubygems-uri "nio4r" version))
8664 (sha256
8665 (base32
7923b9bf 8666 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
a058cbfd
CB
8667 (build-system ruby-build-system)
8668 (arguments
8669 '(#:phases
8670 (modify-phases %standard-phases
8671 (add-after 'unpack 'remove-unnecessary-dependencies
8672 (lambda _
8673 (substitute* "spec/spec_helper.rb"
8674 ;; Coveralls is for uploading test coverage information to an
8675 ;; online service, and thus unnecessary for building the Guix
8676 ;; package
8677 (("require \"coveralls\"") "")
8678 (("Coveralls\\.wear!") "")
8679 ;; Remove rspec/retry as we are not retrying the tests
8680 (("require \"rspec/retry\"") "")
8681 (("config\\.display_try_failure_messages = true") "")
8682 (("config\\.verbose_retry = true") ""))
8683 #t))
8684 (add-before 'check 'compile
8685 (lambda _
8686 (invoke "rake" "compile")
8687 #t))
8688 (replace 'check
8689 (lambda* (#:key tests? #:allow-other-keys)
8690 (when tests?
8691 (invoke "rspec"))
8692 #t)))))
8693 (native-inputs
8694 `(("bundler" ,bundler)
8695 ("ruby-rake-compiler" ,ruby-rake-compiler)
8696 ("ruby-rspec" ,ruby-rspec)
8697 ("ruby-rubocop" ,ruby-rubocop)))
8698 (synopsis "New I/O for Ruby")
8699 (description
8700 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
8701for scalable network clients and servers.")
8702 (home-page "https://github.com/socketry/nio4r")
8703 (license license:expat)))
f9da1ada
CB
8704
8705(define-public ruby-globalid
8706 (package
8707 (name "ruby-globalid")
8708 (version "0.4.2")
8709 (source
8710 (origin
8711 (method url-fetch)
8712 (uri (rubygems-uri "globalid" version))
8713 (sha256
8714 (base32
8715 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
8716 (build-system ruby-build-system)
8717 (arguments
8718 '(;; No included tests
8719 #:tests? #f))
8720 (propagated-inputs
8721 `(("ruby-activesupport" ,ruby-activesupport)))
8722 (synopsis "Generate URIs idenfitying model instances in Ruby")
8723 (description
8724 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
8725uniquely identify it.")
8726 (home-page "https://rubyonrails.org/")
8727 (license license:expat)))
15606d98
CB
8728
8729(define-public ruby-sprockets
8730 (package
8731 (name "ruby-sprockets")
8732 (version "3.7.2")
8733 (source
8734 (origin
8735 (method url-fetch)
8736 (uri (rubygems-uri "sprockets" version))
8737 (sha256
8738 (base32
8739 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
8740 (build-system ruby-build-system)
8741 (arguments
8742 '(;; No included tests
8743 #:tests? #f))
8744 (propagated-inputs
8745 `(("ruby-concurrent" ,ruby-concurrent)
8746 ("ruby-rack" ,ruby-rack)))
8747 (synopsis "Sprockets is a Rack-based asset packaging system")
8748 (description
8749 "Sprockets is a Rack-based asset packaging system that concatenates and
8750serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
8751 (home-page "https://github.com/rails/sprockets")
8752 (license license:expat)))
acb9e3d8
PN
8753
8754(define-public ruby-mustermann
8755 (package
8756 (name "ruby-mustermann")
8757 (version "1.0.3")
8758 (source
8759 (origin
8760 (method url-fetch)
8761 (uri (rubygems-uri "mustermann" version))
8762 (sha256
8763 (base32
8764 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
8765 (build-system ruby-build-system)
8766 (arguments
8767 ;; No tests.
8768 '(#:tests? #f))
8769 (synopsis "Library implementing patterns that behave like regular expressions")
8770 (description "Given a string pattern, Mustermann will turn it into an
8771object that behaves like a regular expression and has comparable performance
8772characteristics.")
8773 (home-page "https://github.com/sinatra/mustermann")
8774 (license license:expat)))
3bb094e2 8775
7bddb6aa
BL
8776(define-public ruby-htmlentities
8777 (package
8778 (name "ruby-htmlentities")
8779 (version "4.3.4")
8780 (source
8781 (origin
8782 (method url-fetch)
8783 (uri (rubygems-uri "htmlentities" version))
8784 (sha256
8785 (base32
8786 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
8787 (build-system ruby-build-system)
8788 (arguments
8789 `(#:phases
8790 (modify-phases %standard-phases
8791 (replace 'check
8792 (lambda _
8793 (map (lambda (file)
8794 (invoke "ruby" "-Itest" file))
8795 (find-files "./test" ".*_test\\.rb")))))))
8796 (synopsis "Encode and decode (X)HTML entities")
8797 (description
8798 "This package provides a module for encoding and decoding (X)HTML
8799entities.")
8800 (home-page "https://github.com/threedaymonk/htmlentities")
8801 (license license:expat)))
8802
3bb094e2
PN
8803(define-public ruby-sinatra
8804 (package
8805 (name "ruby-sinatra")
8806 (version "2.0.5")
8807 (source
8808 (origin
8809 (method url-fetch)
8810 (uri (rubygems-uri "sinatra" version))
8811 (sha256
8812 (base32
8813 "1gasgn5f15myv08k10i16p326pchxjsy37pgqfw0xm66kcc5d7ry"))))
8814 (build-system ruby-build-system)
8815 (propagated-inputs
8816 `(("ruby-mustermann" ,ruby-mustermann)
8817 ("ruby-rack" ,ruby-rack)
8818 ("ruby-rack-protection" ,ruby-rack-protection)
8819 ("ruby-tilt" ,ruby-tilt)))
8820 (synopsis "DSL for quick web applications creation in Ruby")
8821 (description
8822 "Sinatra is a DSL for quickly creating web applications in Ruby with
8823minimal effort.")
8824 (home-page "http://sinatrarb.com/")
8825 (license license:expat)))
6e87695b
PN
8826
8827(define-public ruby-thin
8828 (package
8829 (name "ruby-thin")
8830 (version "1.7.2")
8831 (source
8832 (origin
8833 (method url-fetch)
8834 (uri (rubygems-uri "thin" version))
8835 (sha256
8836 (base32
8837 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
8838 (build-system ruby-build-system)
8839 (arguments
8840 ;; No tests.
8841 '(#:tests? #f))
8842 (propagated-inputs
8843 `(("ruby-daemons" ,ruby-daemons)
8844 ("ruby-eventmachine" ,ruby-eventmachine)
8845 ("ruby-rack" ,ruby-rack)))
8846 (synopsis "Thin and fast web server for Ruby")
8847 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
8848@itemize
8849@item the Mongrel parser,
8850@item Event Machine, a network I/O library with high scalability, performance
8851and stability,
8852@item Rack, a minimal interface between webservers and Ruby frameworks.
8853@end itemize\n")
60783303 8854 (home-page "https://github.com/macournoyer/thin")
6e87695b 8855 (license license:ruby)))
be6016db
PN
8856
8857(define-public ruby-skinny
8858 (package
8859 (name "ruby-skinny")
8860 (version "0.2.4")
8861 (source
8862 (origin
8863 (method url-fetch)
8864 (uri (rubygems-uri "skinny" version))
8865 (sha256
8866 (base32
8867 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
8868 (build-system ruby-build-system)
8869 (arguments
8870 '(#:tests? #f ; No included tests
8871 #:phases
8872 (modify-phases %standard-phases
8873 (add-before 'build 'patch-gemspec
8874 (lambda _
8875 (substitute* ".gemspec"
8876 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
8877 "<eventmachine>, [\">= 1.0.0\"")
8878 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
8879 #t)))))
8880 (propagated-inputs
8881 `(("ruby-eventmachine" ,ruby-eventmachine)
8882 ("ruby-thin" ,ruby-thin)))
8883 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
8884 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
8885the Thin library.")
8886 (home-page "https://github.com/sj26/skinny")
8887 (license license:expat)))
df747c8d
PN
8888
8889(define-public mailcatcher
8890 (package
8891 (name "mailcatcher")
8892 (version "0.7.1")
8893 (source
8894 (origin
8895 (method url-fetch)
8896 (uri (rubygems-uri "mailcatcher" version))
8897 (sha256
8898 (base32
8899 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
8900 (build-system ruby-build-system)
8901 (arguments
8902 ;; Tests require web/assets which is not included in the output. We
8903 ;; might be able to fix this by adding the Git repository to the GEM_PATH
8904 ;; of the tests. See ruby-mysql2.
8905 '(#:tests? #f
8906 #:phases
8907 (modify-phases %standard-phases
8908 (add-before 'build 'patch-gemspec
8909 (lambda _
8910 (substitute* ".gemspec"
8911 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
8912 "<eventmachine>, [\">= 1.0.9.1")
8913 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
8914 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
8915 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
8916 #t))
8917 (add-before 'build 'loosen-dependency-contraint
8918 (lambda _
8919 (substitute* "lib/mail_catcher.rb"
8920 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
8921 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
8922 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
8923 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
8924 #t)))))
8925 (inputs
8926 `(("ruby-eventmachine" ,ruby-eventmachine)
8927 ("ruby-mail" ,ruby-mail)
8928 ("ruby-rack" ,ruby-rack)
8929 ("ruby-sinatra" ,ruby-sinatra)
8930 ("ruby-skinny" ,ruby-skinny)
8931 ("ruby-sqlite3" ,ruby-sqlite3)
8932 ("ruby-thin" ,ruby-thin)))
8933 (synopsis "SMTP server which catches messages to display them a browser")
8934 (description
8935 "MailCatcher runs a super simple SMTP server which catches any message
8936sent to it to display in a web interface. Run mailcatcher, set your favourite
8937app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
8938then check out http://127.0.0.1:1080 to see the mail.")
8939 (home-page "https://mailcatcher.me")
8940 (license license:expat)))
fc4f7c45
MK
8941
8942(define-public ruby-backport
8943 (package
8944 (name "ruby-backport")
b62863b8 8945 (version "1.1.2")
fc4f7c45
MK
8946 (source
8947 (origin
b62863b8 8948 ;; The gem does not include test code, so fetch from the Git repository.
fc4f7c45
MK
8949 (method git-fetch)
8950 (uri (git-reference
8951 (url "https://github.com/castwide/backport.git")
8952 (commit (string-append "v" version))))
8953 (file-name (git-file-name name version))
8954 (sha256
b62863b8 8955 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
fc4f7c45
MK
8956 (build-system ruby-build-system)
8957 (arguments
8958 `(#:test-target "spec"))
8959 (native-inputs
8960 `(("bundler" ,bundler)
8961 ("ruby-rspec" ,ruby-rspec)))
8962 (inputs
8963 `(("ruby-simplecov" ,ruby-simplecov)))
8964 (synopsis "Pure Ruby library for event-driven IO")
8965 (description
8966 "This package provides a pure Ruby library for event-driven IO.")
8967 (home-page "https://github.com/castwide/backport")
8968 (license license:expat)))
369faa59
JL
8969
8970(define-public ruby-json-schema
8971 (package
8972 (name "ruby-json-schema")
8973 (version "2.8.1")
8974 (source
8975 (origin
8976 (method url-fetch)
8977 (uri (rubygems-uri "json-schema" version))
8978 (sha256
8979 (base32
8980 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
8981 (build-system ruby-build-system)
8982 (arguments
8983 `(#:tests? #f ; no tests
8984 #:phases
8985 (modify-phases %standard-phases
8986 (replace 'build
8987 (lambda _
8988 (invoke "gem" "build" ".gemspec"))))))
8989 (propagated-inputs
8990 `(("ruby-addressable" ,ruby-addressable)))
8991 (synopsis "Ruby JSON Schema Validator")
8992 (description "This library provides Ruby with an interface for validating
8993JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
8994support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
8995is also included.")
8996 (home-page "https://github.com/ruby-json-schema/json-schema")
8997 (license license:expat)))
44881cad
JL
8998
8999(define-public swagger-diff
9000 (package
9001 (name "swagger-diff")
9002 (version "1.1.2")
9003 (source
9004 (origin
9005 (method url-fetch)
9006 (uri (rubygems-uri "swagger-diff" version))
9007 (sha256
9008 (base32
9009 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
9010 (build-system ruby-build-system)
9011 (arguments
9012 `(#:test-target "spec"
9013 #:phases
9014 (modify-phases %standard-phases
9015 ;; Don't run or require rubocop, the code linting tool, as this is a
9016 ;; bit unnecessary.
9017 (add-after 'unpack 'dont-run-rubocop
9018 (lambda _
9019 (substitute* "Rakefile"
9020 ((".*rubocop.*") "")
9021 ((".*RuboCop.*") ""))
9022 #t)))))
9023 (propagated-inputs
9024 `(("ruby-json-schema" ,ruby-json-schema)))
9025 (native-inputs
9026 `(("bundler" ,bundler)
9027 ("ruby-rspec-core" ,ruby-rspec-core)
9028 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
9029 (synopsis
9030 "Compare Open API Initiative specification files")
9031 (description
9032 "Swagger::Diff is a utility for comparing two different Open API
9033Initiative (OAI) specifications (formerly known as Swagger specifications).
9034It is intended to determine whether a newer API specification is
9035backwards-compatible with an older API specification.")
9036 (home-page "https://github.com/civisanalytics/swagger-diff")
9037 (license license:bsd-3)))
9e065a8a
BL
9038
9039(define-public ruby-reverse-markdown
9040 (package
9041 (name "ruby-reverse-markdown")
9042 (version "1.1.0")
9043 (source
9044 (origin
9045 (method url-fetch)
9046 (uri (rubygems-uri "reverse_markdown" version))
9047 (sha256
9048 (base32
9049 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
9050 (build-system ruby-build-system)
9051 (propagated-inputs
9052 `(("ruby-nokogiri" ,ruby-nokogiri)))
9053 (native-inputs
9054 `(("bundler" ,bundler)
9055 ("ruby-rspec" ,ruby-rspec)
9056 ("ruby-kramdown" ,ruby-kramdown)
9057 ("ruby-simplecov" ,ruby-simplecov)))
9058 (arguments
9059 `(#:phases
9060 (modify-phases %standard-phases
9061 (replace 'check
9062 (lambda* (#:key tests? #:allow-other-keys)
9063 (when tests?
9064 (invoke "rspec"))
9065 #t)))))
9066 (synopsis "Convert HTML into Markdown")
9067 (description
9068 "This Ruby module allows you to map simple HTML back into
9069Markdown---e.g., if you want to import existing HTML data in your
9070application.")
9071 (home-page "https://github.com/xijo/reverse_markdown")
9072 (license license:wtfpl2)))
9073
a9e2de7e
BL
9074(define-public ruby-solargraph
9075 (package
9076 (name "ruby-solargraph")
9077 (version "0.36.0")
9078 (source
9079 (origin
9080 (method url-fetch)
9081 (uri (rubygems-uri "solargraph" version))
9082 (sha256
9083 (base32
9084 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
9085 (build-system ruby-build-system)
9086 (propagated-inputs
9087 `(("ruby-backport" ,ruby-backport)
9088 ("bundler" ,bundler)
9089 ("ruby-htmlentities" ,ruby-htmlentities)
9090 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
9091 ("ruby-maruku" ,ruby-maruku)
9092 ("ruby-nokogiri" ,ruby-nokogiri)
9093 ("ruby-parser" ,ruby-parser)
9094 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
9095 ("ruby-rubocop" ,ruby-rubocop)
9096 ("ruby-thor" ,ruby-thor)
9097 ("ruby-tilt" ,ruby-tilt)
9098 ("ruby-yard" ,ruby-yard)))
9099 (native-inputs
9100 `(("ruby-rspec" ,ruby-rspec)
9101 ("ruby-pry" ,ruby-pry)
9102 ("ruby-simplecov" ,ruby-simplecov)
9103 ("ruby-webmock" ,ruby-webmock-2)))
9104 ;; FIXME: can't figure out how to run the tests properly:
9105
9106 ;; An error occurred while loading spec_helper.
9107 ;; Failure/Error: return gem_original_require(path)
9108 ;; LoadError:
9109 ;; cannot load such file -- spec_helper
9110 (arguments
9111 '(#:tests? #f
9112 #:phases
9113 (modify-phases %standard-phases
9114 (replace 'check
9115 (lambda* (#:key tests? #:allow-other-keys)
9116 (when tests?
9117 (invoke "rspec"))
9118 #t)))))
9119 (synopsis
9120 "IDE tools for code completion, inline documentation, and static analysis")
9121 (description
9122 "Solargraph provides a comprehensive suite of tools for Ruby
9123programming: intellisense, diagnostics, inline documentation, and type
9124checking.")
9125 (home-page "https://solargraph.org/")
9126 (license license:expat)))
0c558aa9
DNB
9127
9128(define-public ruby-wayback-machine-downloader
9129 (package
9130 (name "ruby-wayback-machine-downloader")
9131 (version "2.2.1")
9132 (source
9133 (origin
9134 (method url-fetch)
9135 (uri (rubygems-uri
9136 "wayback_machine_downloader"
9137 version))
9138 (sha256
9139 (base32
9140 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
9141 (build-system ruby-build-system)
9142 (arguments
9143 '(#:tests? #f)) ; no tests
9144 (synopsis "Download archived websites from the Wayback Machine")
9145 (description
9146 "Wayback Machine Downloader is a command line tool for downloading
9147websites from the Internet Archive's Wayback Machine (archive.org).
9148It allows fine grained control over what to download by specifying
9149which snapshots to consider and what files to include.")
9150 (home-page
9151 "https://github.com/hartator/wayback-machine-downloader")
9152 (license license:expat)))
e6483f8c
MB
9153
9154(define-public ruby-wwtd
9155 (package
9156 (name "ruby-wwtd")
9157 (version "1.4.1")
9158 (home-page "http://github.com/grosser/wwtd")
9159 (source (origin
9160 (method git-fetch)
9161 (uri (git-reference
9162 (url home-page)
9163 (commit (string-append "v" version))))
9164 (file-name (git-file-name name version))
9165 (sha256
9166 (base32
9167 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
9168 (modules '((guix build utils)))
9169 (snippet
9170 '(begin
9171 ;; Remove bundled library.
9172 (delete-file "spec/rake-12.3.0.gem")
9173 #t))))
9174 (build-system ruby-build-system)
9175 (arguments
9176 '(;; XXX: Tests need multiple versions of ruby, wants to run
9177 ;; `bundle install`, etc.
9178 #:tests? #f
9179 #:phases (modify-phases %standard-phases
9180 (replace 'replace-git-ls-files
9181 (lambda _
9182 (substitute* "wwtd.gemspec"
9183 (("git ls-files lib/ bin/`")
9184 "find lib/ bin/ -type f |sort`"))
9185 #t))
9186 (add-before 'check 'remove-version-constraints
9187 (lambda _
9188 (delete-file "Gemfile.lock")
9189 #t))
9190 (replace 'check
9191 (lambda* (#:key tests? #:allow-other-keys)
9192 (if tests?
9193 (invoke "rspec" "spec/")
9194 (format #t "test suite not run~%"))
9195 #t)))))
9196 (native-inputs
9197 `(("ruby-bump" ,ruby-bump)
9198 ("ruby-rspec" ,ruby-rspec)))
9199 (synopsis "Run @file{.travis.yml} files locally")
9200 (description
9201 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
9202defined in @file{.travis.yml} on your local machine, using @code{rvm},
9203@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
9204 (license license:expat)))