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