gnu: emacs-libmpdel: Update to 1.2.0.
[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>
e4fb673a 10;;; Copyright © 2017, 2018, 2019, 2020, 2021 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>
a8cdfd53 23;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
49994222 24;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
b7e76699 25;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
40afc2f4 26;;; Copyright © 2020 Holgr Peters <holger.peters@posteo.de>
0af8398b 27;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
c7358514 28;;; Copyright © 2021 EuAndreh <eu@euandre.org>
6ef8c59a
PP
29;;;
30;;; This file is part of GNU Guix.
31;;;
32;;; GNU Guix is free software; you can redistribute it and/or modify it
33;;; under the terms of the GNU General Public License as published by
34;;; the Free Software Foundation; either version 3 of the License, or (at
35;;; your option) any later version.
36;;;
37;;; GNU Guix is distributed in the hope that it will be useful, but
38;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40;;; GNU General Public License for more details.
41;;;
42;;; You should have received a copy of the GNU General Public License
43;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44
45(define-module (gnu packages ruby)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (gnu packages)
1db791d5 48 #:use-module (gnu packages base)
933dad91 49 #:use-module (gnu packages bison)
24be6751 50 #:use-module (gnu packages c)
15b16c2c 51 #:use-module (gnu packages check)
6ef8c59a 52 #:use-module (gnu packages compression)
2a9ce5cb 53 #:use-module (gnu packages crypto)
0af8398b 54 #:use-module (gnu packages curl)
4a9e0585 55 #:use-module (gnu packages databases)
255d1bbe 56 #:use-module (gnu packages dbm)
c41fba01 57 #:use-module (gnu packages rails)
6ef8c59a 58 #:use-module (gnu packages readline)
6ef8c59a 59 #:use-module (gnu packages autotools)
c84dd8d4 60 #:use-module (gnu packages haskell-xyz)
ad79eb55 61 #:use-module (gnu packages java)
6ef8c59a 62 #:use-module (gnu packages libffi)
f3d7bb93 63 #:use-module (gnu packages libidn)
c41fba01
CB
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages lsof)
34138e42 66 #:use-module (gnu packages maths)
0c8eedc1 67 #:use-module (gnu packages ncurses)
fe5dd5f4 68 #:use-module (gnu packages networking)
3ca43524 69 #:use-module (gnu packages node)
dff5392f 70 #:use-module (gnu packages protobuf)
ac09beba 71 #:use-module (gnu packages python)
44d10b1f 72 #:use-module (gnu packages python-xyz)
763624f5 73 #:use-module (gnu packages ragel)
30f08487 74 #:use-module (gnu packages rsync)
cd0322a3 75 #:use-module (gnu packages sqlite)
cc2b77df 76 #:use-module (gnu packages tls)
66e20863 77 #:use-module (gnu packages version-control)
6ef8c59a
PP
78 #:use-module (guix packages)
79 #:use-module (guix download)
bda0c139 80 #:use-module (guix git-download)
6ef8c59a 81 #:use-module (guix utils)
acf735f2 82 #:use-module (guix build-system gnu)
e920bfca 83 #:use-module (gnu packages xml)
c2c4e5b2 84 #:use-module (gnu packages web)
15b16c2c
CB
85 #:use-module (guix build-system ruby)
86 #:use-module ((srfi srfi-1) #:select (alist-delete)))
6ef8c59a 87
9622928d
MC
88(define %prawn-project-licenses
89 ;; This set of licenses applies to most (all?) components of the Prawn
90 ;; project (it is triple licensed).
91 (list license:ruby
92 license:gpl2+
93 license:gpl3+))
94
6ef8c59a
PP
95(define-public ruby
96 (package
97 (name "ruby")
4914c157 98 (version "2.6.5")
6ef8c59a
PP
99 (source
100 (origin
101 (method url-fetch)
6becfdff
MW
102 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
103 (version-major+minor version)
12d39eb5 104 "/ruby-" version ".tar.xz"))
6ef8c59a
PP
105 (sha256
106 (base32
4914c157 107 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
65e84e31
BW
108 (modules '((guix build utils)))
109 (snippet `(begin
110 ;; Remove bundled libffi
c033c195 111 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
65e84e31 112 #t))))
6ef8c59a
PP
113 (build-system gnu-build-system)
114 (arguments
115 `(#:test-target "test"
fd248cb8 116 #:configure-flags '("--enable-shared") ; dynamic linking
6ef8c59a 117 #:phases
9656b8be 118 (modify-phases %standard-phases
65e84e31 119 (add-before 'configure 'replace-bin-sh-and-remove-libffi
9656b8be
BW
120 (lambda _
121 (substitute* '("Makefile.in"
122 "ext/pty/pty.c"
123 "io.c"
124 "lib/mkmf.rb"
125 "process.c"
126 "test/rubygems/test_gem_ext_configure_builder.rb"
127 "test/rdoc/test_rdoc_parser.rb"
128 "test/ruby/test_rubyoptions.rb"
129 "test/ruby/test_process.rb"
130 "test/ruby/test_system.rb"
131 "tool/rbinstall.rb")
132 (("/bin/sh") (which "sh")))
133 #t)))))
6ef8c59a
PP
134 (inputs
135 `(("readline" ,readline)
6ef8c59a
PP
136 ("openssl" ,openssl)
137 ("libffi" ,libffi)
4914c157
CB
138 ("gdbm" ,gdbm)))
139 (propagated-inputs
140 `(("zlib" ,zlib)))
6ef8c59a
PP
141 (native-search-paths
142 (list (search-path-specification
143 (variable "GEM_PATH")
3cb3fa67 144 (files (list (string-append "lib/ruby/vendor_ruby"))))))
6becfdff 145 (synopsis "Programming language interpreter")
6ef8c59a
PP
146 (description "Ruby is a dynamic object-oriented programming language with
147a focus on simplicity and productivity.")
bf3be6a5 148 (home-page "https://www.ruby-lang.org")
6ef8c59a
PP
149 (license license:ruby)))
150
1cc7d340
RP
151(define-public ruby-2.7
152 (package
153 (inherit ruby)
763e6133 154 (version "2.7.2")
1cc7d340
RP
155 (source
156 (origin
157 (method url-fetch)
763e6133 158 (uri (string-append "https://cache.ruby-lang.org/pub/ruby/"
1cc7d340
RP
159 (version-major+minor version)
160 "/ruby-" version ".tar.gz"))
161 (sha256
162 (base32
763e6133 163 "1m63461mxi3fg4y3bspbgmb0ckbbb1ldgf9xi0piwkpfsk80cmvf"))
1cc7d340
RP
164 (modules '((guix build utils)))
165 (snippet `(begin
166 ;; Remove bundled libffi
167 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
168 #t))))
169 (arguments
170 `(#:test-target "test"
171 #:configure-flags '("--enable-shared") ; dynamic linking
172 #:phases
173 (modify-phases %standard-phases
174 (add-before 'configure 'replace-bin-sh-and-remove-libffi
175 (lambda _
176 (substitute* '("configure.ac"
177 "template/Makefile.in"
178 "lib/rubygems/installer.rb"
179 "ext/pty/pty.c"
180 "io.c"
181 "lib/mkmf.rb"
182 "process.c"
183 "test/rubygems/test_gem_ext_configure_builder.rb"
184 "test/rdoc/test_rdoc_parser.rb"
185 "test/ruby/test_rubyoptions.rb"
186 "test/ruby/test_process.rb"
187 "test/ruby/test_system.rb"
188 "tool/rbinstall.rb")
189 (("/bin/sh") (which "sh")))
190 #t)))))
191 (native-inputs
192 `(("autoconf" ,autoconf)))))
193
03c51c04
RP
194(define-public ruby-3.0
195 (package
196 (inherit ruby-2.7)
197 (version "3.0.0")
198 (source
199 (origin
200 (method url-fetch)
201 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
202 (version-major+minor version)
203 "/ruby-" version ".tar.xz"))
204 (sha256
205 (base32
206 "1cbcixwnr0y8q0lg67wjgplp06kjd6p6hjjh680csv3v0bpsxgv8"))))))
207
227fab3e
CB
208(define-public ruby-2.5
209 (package
210 (inherit ruby)
a09ff632 211 (version "2.5.8")
227fab3e
CB
212 (source
213 (origin
214 (method url-fetch)
215 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
216 (version-major+minor version)
217 "/ruby-" version ".tar.xz"))
218 (sha256
219 (base32
a09ff632 220 "0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
227fab3e
CB
221 (modules '((guix build utils)))
222 (snippet `(begin
223 ;; Remove bundled libffi
224 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
225 #t))))))
226
93cae02f
CB
227(define-public ruby-2.4
228 (package
229 (inherit ruby)
dfe211f9 230 (version "2.4.10")
93cae02f
CB
231 (source
232 (origin
233 (method url-fetch)
234 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
235 (version-major+minor version)
236 "/ruby-" version ".tar.xz"))
237 (sha256
238 (base32
dfe211f9 239 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
93cae02f
CB
240 (modules '((guix build utils)))
241 (snippet `(begin
242 ;; Remove bundled libffi
243 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
244 #t))))))
245
933dad91
RW
246(define-public mruby
247 (package
248 (name "mruby")
2d1a621b 249 (version "2.1.2")
933dad91
RW
250 (source
251 (origin
252 (method git-fetch)
253 (uri (git-reference
b0e7b699 254 (url "https://github.com/mruby/mruby")
933dad91
RW
255 (commit version)))
256 (file-name (git-file-name name version))
257 (sha256
258 (base32
2d1a621b 259 "0fhfv8pi7i8jn2vgk2n2rjnbnfa12nhj514v8i4k353n7q4pmkh3"))))
933dad91
RW
260 (build-system gnu-build-system)
261 (arguments
262 `(#:test-target "test"
263 #:phases
264 (modify-phases %standard-phases
265 (delete 'configure)
266 (add-after 'unpack 'enable-verbose-tests
267 (lambda _
268 (substitute* "Makefile"
269 (("ruby ./minirake" m)
270 (string-append m " --verbose")))
271 #t))
272 (add-after 'unpack 'disable-broken-tests
273 (lambda _
274 (substitute* "mrbgems/mruby-io/test/io.rb"
275 (("assert\\('IO.popen.+$" m)
276 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
277 (("assert\\('IO#isatty.+$" m)
278 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
279 ;; This one is really weird. The *expected* output is all wrong.
280 (("assert\\('`cmd`.*" m)
281 (string-append m "skip \"Disable for Guix\"\n"))
282 (("echo foo")
283 (string-append (which "echo") " foo")))
284 #t))
285 ;; There is no install target
286 (replace 'install
287 (lambda* (#:key outputs #:allow-other-keys)
288 (let* ((out (assoc-ref outputs "out"))
289 (bin (string-append out "/bin"))
290 (lib (string-append out "/lib")))
291 (mkdir-p bin)
292 (copy-recursively "build/host/bin" bin)
293 (mkdir-p lib)
294 (copy-recursively "build/host/lib" lib))
295 #t)))))
296 (native-inputs
297 `(("ruby" ,ruby)
298 ("bison" ,bison)))
299 (home-page "https://github.com/mruby/mruby")
300 (synopsis "Lightweight Ruby")
301 (description "mruby is the lightweight implementation of the Ruby
302language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
303embedded within your application.")
304 (license license:expat)))
305
34372d39
RW
306(define-public ruby-commander
307 (package
308 (name "ruby-commander")
309 (version "4.4.7")
310 (source
311 (origin
312 (method url-fetch)
313 (uri (rubygems-uri "commander" version))
314 (sha256
315 (base32
316 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
317 (build-system ruby-build-system)
318 (arguments
319 `(#:test-target "spec"
320 #:phases
321 (modify-phases %standard-phases
322 ;; Don't run or require rubocop, the code linting tool, as this is a
323 ;; bit unnecessary.
324 (add-after 'unpack 'dont-run-rubocop
325 (lambda _
326 (substitute* "Rakefile"
327 ((".*rubocop.*") "")
328 ((".*RuboCop.*") ""))
329 #t)))))
330 (propagated-inputs
331 `(("ruby-highline" ,ruby-highline)))
332 (native-inputs
333 `(("bundler" ,bundler)
334 ("ruby-rspec-core" ,ruby-rspec-core)
335 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
336 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
337 ("ruby-simplecov" ,ruby-simplecov)))
338 (home-page "https://github.com/commander-rb/commander")
339 (synopsis "Library for building Ruby command-line executables")
340 (description
341 "Commander aims to be a complete solution for Ruby command-line
342executables. Commander bridges the gap between other terminal related
343libraries (OptionParser, HighLine), while providing many new features, and an
344elegant API.")
345 (license license:expat)))
346
823ed097
CB
347(define-public ruby-highline
348 (package
349 (name "ruby-highline")
6742c6f6 350 (version "2.0.1")
823ed097
CB
351 (source
352 (origin
353 (method url-fetch)
354 (uri (rubygems-uri "highline" version))
355 (sha256
356 (base32
6742c6f6 357 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
823ed097
CB
358 (build-system ruby-build-system)
359 (arguments
360 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
361 (native-inputs
362 `(("bundler" ,bundler)
363 ("ruby-code-statistics" ,ruby-code-statistics)))
364 (synopsis
365 "HighLine helps you build command-line interfaces")
366 (description
367 "HighLine provides a high-level IO library that provides validation,
368type conversion, and more for command-line interfaces. HighLine also includes
369a menu system for providing multiple options to the user.")
370 (home-page "https://github.com/JEG2/highline")
371 (license (list license:gpl2 license:ruby))))
372
bda0c139
DT
373(define-public ruby-hoe
374 (package
375 (name "ruby-hoe")
d0d2dd24 376 (version "3.21.0")
bda0c139 377 (source (origin
e83c6d00
DT
378 (method url-fetch)
379 (uri (rubygems-uri "hoe" version))
bda0c139
DT
380 (sha256
381 (base32
d0d2dd24 382 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
bda0c139 383 (build-system ruby-build-system)
d0d2dd24
CB
384 (arguments
385 '(#:phases
386 (modify-phases %standard-phases
387 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
388 ;; variable is set, so unset it for the duration of the tests.
389 ;;
390 ;; TestHoe#test_possibly_better
391 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
392 ;; Expected: 2019-11-12 00:00:00 UTC
393 ;; Actual: 1970-01-01 00:00:00 UTC
394 (add-before 'check 'unset-SOURCE-DATE-EPOCH
395 (lambda _
396 (unsetenv "SOURCE_DATE_EPOCH")
397 #t))
398 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
399 (lambda _
400 (setenv "SOURCE_DATE_EPOCH" "1")
401 #t)))))
bda0c139
DT
402 (synopsis "Ruby project management helper")
403 (description
404 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
405maintain, and release projects and includes a dynamic plug-in system allowing
406for easy extensibility. Hoe ships with plug-ins for all the usual project
407tasks including rdoc generation, testing, packaging, deployment, and
408announcement.")
2f3800e5 409 (home-page "https://www.zenspider.com/projects/hoe.html")
bda0c139
DT
410 (license license:expat)))
411
022170dc
PP
412(define-public ruby-rake-compiler
413 (package
414 (name "ruby-rake-compiler")
7ac6bd00 415 (version "1.1.0")
022170dc
PP
416 (source (origin
417 (method url-fetch)
e83c6d00 418 (uri (rubygems-uri "rake-compiler" version))
022170dc
PP
419 (sha256
420 (base32
7ac6bd00 421 "0l4hg21v0phfrfsc2hilgmwvn2imxr0byqh8dv16bya1s5d3km0q"))))
022170dc
PP
422 (build-system ruby-build-system)
423 (arguments
e83c6d00 424 '(#:tests? #f)) ; needs cucumber
022170dc 425 (synopsis "Building and packaging helper for Ruby native extensions")
e881752c 426 (description "Rake-compiler provides a framework for building and
022170dc
PP
427packaging native C and Java extensions in Ruby.")
428 (home-page "https://github.com/rake-compiler/rake-compiler")
429 (license license:expat)))
430
30f08487
RW
431(define-public ruby-rsync
432 (package
433 (name "ruby-rsync")
434 (version "1.0.9")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (rubygems-uri "rsync" version))
439 (sha256
440 (base32
441 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
442 (build-system ruby-build-system)
443 (arguments
444 '(#:test-target "spec"
445 #:phases
446 (modify-phases %standard-phases
447 (add-after 'unpack 'remove-coveralls-requirement
448 (lambda _
449 (substitute* "spec/spec_helper.rb"
450 (("require 'coveralls'") "")
451 (("Coveralls.wear!") ""))
452 #t)))))
453 (native-inputs
454 `(("bundler" ,bundler)
455 ("rsync" ,rsync)
456 ("ruby-rspec-core" ,ruby-rspec-core)
457 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
458 ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
459 (home-page "https://github.com/jbussdieker/ruby-rsync")
460 (synopsis "Ruby wrapper around rsync")
461 (description
462 "Ruby Rsync is a Ruby library that can synchronize files between remote
463hosts by wrapping the @file{rsync} binary.")
464 (license license:expat)))
465
acf735f2
DT
466(define-public ruby-i18n
467 (package
468 (name "ruby-i18n")
92dddf6b 469 (version "1.7.0")
acf735f2
DT
470 (source (origin
471 (method url-fetch)
e83c6d00 472 (uri (rubygems-uri "i18n" version))
acf735f2
DT
473 (sha256
474 (base32
92dddf6b 475 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
acf735f2
DT
476 (build-system ruby-build-system)
477 (arguments
0bfdfd37 478 '(#:tests? #f)) ; no tests
cbb50182 479 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
acf735f2
DT
480 (synopsis "Internationalization library for Ruby")
481 (description "Ruby i18n is an internationalization and localization
482solution for Ruby programs. It features translation and localization,
483interpolation of values to translations, pluralization, customizable
484transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
485translation data, custom key/scope separator, custom exception handlers, and
486an extensible architecture with a swappable backend.")
92dddf6b 487 (home-page "https://github.com/ruby-i18n/i18n")
acf735f2 488 (license license:expat)))
eb0c2dd6 489
62b138ca
CB
490(define-public ruby-iruby
491 (package
492 (name "ruby-iruby")
493 (version "0.3")
494 (source
495 (origin
496 (method url-fetch)
497 (uri (rubygems-uri "iruby" version))
498 (sha256
499 (base32
500 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
501 (build-system ruby-build-system)
502 (arguments
503 ;; TODO: Tests currently fail.
504 ;;
505 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
506 ;;
507 ;; 1) Failure:
508 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
509 ;; In [ expected
510 ;;
511 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
512 '(#:tests? #f
513 #:phases
514 (modify-phases %standard-phases
515 (add-after 'unpack 'patch-ipython
516 (lambda* (#:key inputs #:allow-other-keys)
517 (substitute* "lib/iruby/command.rb"
518 (("version = `")
519 (string-append
520 "version = `"
521 (assoc-ref inputs "python-ipython")
522 "/bin/"))
523 (("Kernel\\.exec\\('")
524 (string-append
525 "Kernel.exec('"
526 (assoc-ref inputs "python-ipython")
527 "/bin/")))
528 #t)))))
529 (inputs
530 `(("python-ipython" ,python-ipython)))
531 (propagated-inputs
532 `(("ruby-bond" ,ruby-bond)
533 ("ruby-data_uri" ,ruby-data_uri)
534 ("ruby-mimemagic" ,ruby-mimemagic)
535 ("ruby-multi-json" ,ruby-multi-json)
536 ("ruby-cztop" ,ruby-cztop)
537 ;; Optional inputs
538 ("ruby-pry" ,ruby-pry)))
539 (synopsis "Ruby kernel for Jupyter/IPython")
540 (description
541 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
542notebook).")
543 (home-page "https://github.com/SciRuby/iruby")
544 (license license:expat)))
545
eb0c2dd6
DT
546;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
547;; dependencies use RSpec for their test suites! To avoid these circular
548;; dependencies, we disable tests for all of the RSpec-related packages.
87688ff3 549(define-public ruby-rspec-support
eb0c2dd6
DT
550 (package
551 (name "ruby-rspec-support")
bee67d18 552 (version "3.8.0")
eb0c2dd6
DT
553 (source (origin
554 (method url-fetch)
e83c6d00 555 (uri (rubygems-uri "rspec-support" version))
eb0c2dd6
DT
556 (sha256
557 (base32
bee67d18 558 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
eb0c2dd6
DT
559 (build-system ruby-build-system)
560 (arguments
561 '(#:tests? #f)) ; avoid dependency cycles
562 (synopsis "RSpec support library")
563 (description "Support utilities for RSpec gems.")
564 (home-page "https://github.com/rspec/rspec-support")
565 (license license:expat)))
566
567(define-public ruby-rspec-core
568 (package
569 (name "ruby-rspec-core")
bee67d18 570 (version "3.8.0")
eb0c2dd6
DT
571 (source (origin
572 (method url-fetch)
e83c6d00 573 (uri (rubygems-uri "rspec-core" version))
eb0c2dd6
DT
574 (sha256
575 (base32
bee67d18 576 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
eb0c2dd6
DT
577 (build-system ruby-build-system)
578 (arguments
579 '(#:tests? #f)) ; avoid dependency cycles
580 (propagated-inputs
581 `(("ruby-rspec-support" ,ruby-rspec-support)))
582 (synopsis "RSpec core library")
583 (description "Rspec-core provides the RSpec test runner and example
584groups.")
585 (home-page "https://github.com/rspec/rspec-core")
586 (license license:expat)))
e6962009 587
64c318f2
BW
588(define-public ruby-rspec-core-2
589 (package (inherit ruby-rspec-core)
590 (version "2.14.8")
591 (source (origin
592 (method url-fetch)
593 (uri (rubygems-uri "rspec-core" version))
594 (sha256
595 (base32
596 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
597 (propagated-inputs `())))
598
20c05ea9 599(define-public ruby-diff-lcs
e6962009
DT
600 (package
601 (name "ruby-diff-lcs")
e2fcef39 602 (version "1.3")
e6962009
DT
603 (source (origin
604 (method url-fetch)
e83c6d00 605 (uri (rubygems-uri "diff-lcs" version))
e6962009
DT
606 (sha256
607 (base32
e2fcef39 608 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
e6962009
DT
609 (build-system ruby-build-system)
610 (arguments
611 '(#:tests? #f)) ; avoid dependency cycles
612 (synopsis "Compute the difference between two Enumerable sequences")
613 (description "Diff::LCS computes the difference between two Enumerable
614sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
615It includes utilities to create a simple HTML diff output format and a
616standard diff-like tool.")
617 (home-page "https://github.com/halostatue/diff-lcs")
618 (license license:expat)))
619
620(define-public ruby-rspec-expectations
621 (package
622 (name "ruby-rspec-expectations")
bee67d18 623 (version "3.8.2")
e6962009
DT
624 (source (origin
625 (method url-fetch)
e83c6d00 626 (uri (rubygems-uri "rspec-expectations" version))
e6962009
DT
627 (sha256
628 (base32
bee67d18 629 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
e6962009
DT
630 (build-system ruby-build-system)
631 (arguments
632 '(#:tests? #f)) ; avoid dependency cycles
633 (propagated-inputs
634 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 635 ("ruby-diff-lcs" ,ruby-diff-lcs)))
e881752c 636 (synopsis "RSpec expectations library")
e6962009
DT
637 (description "Rspec-expectations provides a simple API to express expected
638outcomes of a code example.")
639 (home-page "https://github.com/rspec/rspec-expectations")
640 (license license:expat)))
4f2a0cac 641
fb157f25
BW
642(define-public ruby-rspec-expectations-2
643 (package (inherit ruby-rspec-expectations)
644 (version "2.14.5")
645 (source (origin
646 (method url-fetch)
647 (uri (rubygems-uri "rspec-expectations" version))
648 (sha256
649 (base32
650 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
651 (propagated-inputs
652 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
653
818b402c
MC
654(define-public ruby-sorcerer
655 (package
656 (name "ruby-sorcerer")
657 (version "2.0.1")
658 (source
659 (origin
660 (method url-fetch)
661 (uri (rubygems-uri "sorcerer" version))
662 (sha256
663 (base32
664 "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
665 (build-system ruby-build-system)
666 (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
667 (description "Sorcerer generates Ruby code from a Ripper-like abstract
668syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
7230f6d5
TGR
669snippets of Ruby code, expressible in a single line. Longer examples may be
670re-sourced, but they will be rendered in a single-line format.")
818b402c
MC
671 (home-page "https://github.com/rspec-given/sorcerer")
672 (license license:expat)))
673
906b9a14
MC
674(define-public ruby-given-core
675 (package
676 (name "ruby-given-core")
677 (version "3.8.0")
678 (source
679 (origin
680 (method url-fetch)
681 (uri (rubygems-uri "given_core" version))
682 (sha256
683 (base32
684 "1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
685 (build-system ruby-build-system)
686 (arguments '(#:tests? #f)) ;no test suite for the core package
687 (propagated-inputs
688 `(("ruby-sorcerer" ,ruby-sorcerer)))
689 (synopsis "Core abstractions used by rspec-given and minitest-given")
690 (description "Given_core is the basic functionality behind rspec-given and
691minitest-given, extensions that allow the use of Given/When/Then terminology
692when defining specifications.")
693 (home-page "https://github.com/rspec-given/rspec-given")
694 (license license:expat)))
695
9c171558
MC
696(define-public ruby-rspec-given
697 (package
698 (name "ruby-rspec-given")
699 (version "3.8.0")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (rubygems-uri "rspec-given" version))
704 (sha256
705 (base32
706 "1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
707 (build-system ruby-build-system)
708 (arguments
709 `(#:test-target "rs"
710 #:phases
711 (modify-phases %standard-phases
712 (add-after 'unpack 'fix-rakefile
713 (lambda _
714 (substitute* '("Rakefile" "rakelib/gemspec.rake")
715 (("require '\\./lib/given/.*") "")
716 (("Given::VERSION") (format #f "~s" ,version))
717 ;; Fix the error: "cannot load such file -- example_helper"
718 (("sh \"rspec")
719 "sh \"rspec -Ilib:examples"))
720 #t))
721 (add-after 'extract-gemspec 'delete-failing-tests
722 ;; See: https://github.com/jimweirich/rspec-given/issues/57.
723 (lambda _
724 (substitute* ".gemspec"
725 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
726 "")
727 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
728 ""))
729 (delete-file "spec/lib/given/natural_assertion_spec.rb")
730 (delete-file "examples/integration/failing_messages_spec.rb")
731 #t)))))
732 (native-inputs
733 `(("ruby-rspec" ,ruby-rspec)
734 ("ruby-minitest" ,ruby-minitest)))
735 (propagated-inputs
736 `(("ruby-given-core" ,ruby-given-core)
737 ("ruby-rspec" ,ruby-rspec)))
738 (synopsis "Given/When/Then for RSpec and Minitest")
739 (description "Given is an RSpec extension that allows the use of
740Given/When/Then terminology when defining specifications, in a way similar to
741the Cucumber Gherkin language.")
742 (home-page "https://github.com/rspec-given/rspec-given")
743 (license license:expat)))
744
999ffb26
DM
745(define-public ruby-rspec-its
746 (package
747 (name "ruby-rspec-its")
b2244c68 748 (version "1.3.0")
999ffb26
DM
749 (source
750 (origin
3306f02a
CB
751 (method git-fetch)
752 (uri (git-reference
b0e7b699 753 (url "https://github.com/rspec/rspec-its")
3306f02a
CB
754 (commit (string-append "v" version))))
755 (file-name (git-file-name name version))
999ffb26
DM
756 (sha256
757 (base32
b2244c68 758 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
999ffb26
DM
759 (build-system ruby-build-system)
760 (arguments
3306f02a
CB
761 `(#:test-target "spec"
762 #:phases
763 (modify-phases %standard-phases
764 (add-after 'unpack 'dont-install-gems-from-gemfile
765 (lambda _
766 (substitute* "Gemfile"
767 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
768 ""))
769 #t))
7c8eb479 770 (add-before 'build 'loosen-ffi-requirement
b2244c68 771 (lambda _
7c8eb479 772 ;; Accept any version of ruby-ffi.
b2244c68 773 (substitute* "Gemfile"
7c8eb479
MB
774 ((" gem 'ffi', '~> 1\\.9\\.25'")
775 " gem 'ffi'"))
b2244c68 776 #t))
3306f02a
CB
777 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
778 (lambda _
779 (substitute* "rspec-its.gemspec"
780 (("rake.*") "rake'\n")
b2244c68
BH
781 (("spec.add_development_dependency 'cucumber'.*")
782 "spec.add_development_dependency 'cucumber'\n")
3306f02a 783 (("bundler.*") "bundler'\n")
b2244c68 784 (("\"aruba.*") "'aruba'\n"))
3306f02a 785 #t)))))
999ffb26
DM
786 (propagated-inputs
787 `(("ruby-rspec-core" ,ruby-rspec-core)
788 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
3306f02a
CB
789 (native-inputs
790 `(("bundler" ,bundler)
791 ("ruby-cucumber" ,ruby-cucumber)
b2244c68 792 ("ruby-ffi" ,ruby-ffi)
3306f02a
CB
793 ("ruby-aruba" ,ruby-aruba)))
794 (synopsis "RSpec extension that provides the @code{its} method")
795 (description
796 "RSpec::Its provides the its method as a short-hand to specify the expected
797value of an attribute. For example, one can use @code{its(:size)\\{should
798eq(1)\\}}.")
999ffb26
DM
799 (home-page "https://github.com/rspec/rspec-its")
800 (license license:expat)))
801
d7bd7016
MC
802;;; This variant is used to break a cycle with ruby-protobuf.
803(define-public ruby-rspec-its-minimal
804 (hidden-package
805 (package
806 (inherit ruby-rspec-its)
807 (arguments
808 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
809 ((#:tests? _ #f) #f)))
810 (native-inputs '()))))
811
4f2a0cac
DT
812(define-public ruby-rspec-mocks
813 (package
814 (name "ruby-rspec-mocks")
bee67d18 815 (version "3.8.0")
4f2a0cac
DT
816 (source (origin
817 (method url-fetch)
e83c6d00 818 (uri (rubygems-uri "rspec-mocks" version))
4f2a0cac
DT
819 (sha256
820 (base32
bee67d18 821 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
4f2a0cac
DT
822 (build-system ruby-build-system)
823 (arguments
824 '(#:tests? #f)) ; avoid dependency cycles
825 (propagated-inputs
826 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 827 ("ruby-diff-lcs" ,ruby-diff-lcs)))
4f2a0cac
DT
828 (synopsis "RSpec stubbing and mocking library")
829 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
830support for stubbing and mocking.")
831 (home-page "https://github.com/rspec/rspec-mocks")
832 (license license:expat)))
d4fde1f2 833
6da9adeb
BW
834(define-public ruby-rspec-mocks-2
835 (package (inherit ruby-rspec-mocks)
836 (version "2.14.6")
837 (source (origin
838 (method url-fetch)
839 (uri (rubygems-uri "rspec-mocks" version))
840 (sha256
841 (base32
842 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
843 (propagated-inputs
844 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
845
198bc648
CB
846(define-public ruby-rspec-rerun
847 (package
848 (name "ruby-rspec-rerun")
849 (version "1.1.0")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (rubygems-uri "rspec-rerun" version))
854 (sha256
855 (base32
856 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
857 (build-system ruby-build-system)
858 (arguments
859 '(;; No included tests
860 #:tests? #f))
861 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
862 (synopsis "Track failed RSpec tests to re-run them")
863 (description
864 "This package provides an automated way to track, and then re-run failed
865RSpec tests.")
866 (home-page "https://github.com/dblock/rspec-rerun")
867 (license license:expat)))
868
9c4cb1ef
CD
869(define-public ruby-rspec-wait
870 (package
871 (name "ruby-rspec-wait")
872 (version "0.0.9")
873 (source
874 (origin
875 (method url-fetch)
876 (uri (rubygems-uri "rspec-wait" version))
877 (sha256
878 (base32
879 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
880 (build-system ruby-build-system)
881 (arguments
882 '(#:phases
883 (modify-phases %standard-phases
884 (replace 'check
885 (lambda _
886 (invoke "rake" "spec"))))))
887 (native-inputs
888 `(("bundler" ,bundler)))
889 (propagated-inputs
890 `(("ruby-rspec" ,ruby-rspec)))
891 (home-page "https://github.com/laserlemon/rspec-wait")
892 (synopsis "Wait for conditions in RSpec")
893 (description
894 "RSpec::Wait strives to make it easier to test asynchronous or slow
895interactions.")
896 (license license:expat)))
897
d4fde1f2
DT
898(define-public ruby-rspec
899 (package
900 (name "ruby-rspec")
bee67d18 901 (version "3.8.0")
d4fde1f2
DT
902 (source (origin
903 (method url-fetch)
e83c6d00 904 (uri (rubygems-uri "rspec" version))
d4fde1f2
DT
905 (sha256
906 (base32
bee67d18 907 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
d4fde1f2
DT
908 (build-system ruby-build-system)
909 (arguments
910 '(#:tests? #f)) ; avoid dependency cycles
911 (propagated-inputs
912 `(("ruby-rspec-core" ,ruby-rspec-core)
913 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
914 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
915 (synopsis "Behavior-driven development framework for Ruby")
916 (description "RSpec is a behavior-driven development (BDD) framework for
917Ruby. This meta-package includes the RSpec test runner, along with the
918expectations and mocks frameworks.")
35739712 919 (home-page "https://rspec.info/")
d4fde1f2 920 (license license:expat)))
2cbc105b 921
5ac984b3
BW
922(define-public ruby-rspec-2
923 (package (inherit ruby-rspec)
924 (version "2.14.1")
925 (source (origin
926 (method url-fetch)
927 (uri (rubygems-uri "rspec" version))
928 (sha256
929 (base32
930 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
931 (propagated-inputs
932 `(("ruby-rspec-core" ,ruby-rspec-core-2)
933 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
934 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
935
2cbc105b
DT
936;; Bundler is yet another source of circular dependencies, so we must disable
937;; its test suite as well.
938(define-public bundler
939 (package
940 (name "bundler")
cbee8e31 941 (version "2.1.4")
2cbc105b
DT
942 (source (origin
943 (method url-fetch)
e83c6d00 944 (uri (rubygems-uri "bundler" version))
2cbc105b
DT
945 (sha256
946 (base32
cbee8e31 947 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
2cbc105b
DT
948 (build-system ruby-build-system)
949 (arguments
950 '(#:tests? #f)) ; avoid dependency cycles
951 (synopsis "Ruby gem bundler")
952 (description "Bundler automatically downloads and installs a list of gems
953specified in a \"Gemfile\", as well as their dependencies.")
2f3800e5 954 (home-page "https://bundler.io/")
2cbc105b 955 (license license:expat)))
98b87b82 956
cf36174f
RW
957(define-public ruby-builder
958 (package
959 (name "ruby-builder")
42b48db2 960 (version "3.2.3")
cf36174f
RW
961 (source (origin
962 (method url-fetch)
963 (uri (rubygems-uri "builder" version))
964 (sha256
965 (base32
42b48db2 966 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
cf36174f
RW
967 (build-system ruby-build-system)
968 (arguments
969 `(#:phases
970 (modify-phases %standard-phases
971 (add-after 'unpack 'do-not-use-rvm
972 (lambda _
973 (substitute* "rakelib/tags.rake"
974 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
975 #t)))))
976 (synopsis "Ruby library to create structured data")
977 (description "Builder provides a number of builder objects that make it
978easy to create structured data. Currently the following builder objects are
979supported: XML Markup and XML Events.")
980 (home-page "https://github.com/jimweirich/builder")
981 (license license:expat)))
982
566f71f8
CB
983(define-public ruby-bump
984 (package
985 (name "ruby-bump")
986 (version "0.7.0")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (rubygems-uri "bump" version))
991 (sha256
992 (base32
993 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
994 (build-system ruby-build-system)
995 (arguments
996 '(;; No included tests
997 #:tests? #f))
998 (synopsis "Tool for working with Rubygems")
999 (description
1000 "Bump provides commands to manage Rubygem versioning, updating to the
1001next patch version for example.")
1002 (home-page "https://github.com/gregorym/bump")
1003 (license license:expat)))
1004
ad79eb55
RW
1005(define-public ruby-rjb
1006 (package
1007 (name "ruby-rjb")
aeb4e61e 1008 (version "1.5.5")
ad79eb55
RW
1009 (source (origin
1010 (method url-fetch)
1011 (uri (rubygems-uri "rjb" version))
1012 (sha256
1013 (base32
aeb4e61e 1014 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
ad79eb55
RW
1015 (build-system ruby-build-system)
1016 (arguments
1017 `(#:tests? #f ; no rakefile
1018 #:phases
1019 (modify-phases %standard-phases
1020 (add-before 'build 'set-java-home
1021 (lambda* (#:key inputs #:allow-other-keys)
1022 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1023 #t)))))
1024 (native-inputs
d2540f80 1025 `(("jdk" ,icedtea "jdk")))
ad79eb55
RW
1026 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1027 (description "RJB is a bridge program that connects Ruby and Java via the
1028Java Native Interface.")
2f3800e5 1029 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
ad79eb55
RW
1030 (license license:lgpl2.1+)))
1031
f9ae2c06
PP
1032(define-public ruby-log4r
1033 (package
1034 (name "ruby-log4r")
1035 (version "1.1.10")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (rubygems-uri "log4r" version))
1040 (sha256
1041 (base32
1042 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1043 (build-system ruby-build-system)
1044 (arguments
1045 '(#:tests? #f)) ; no Rakefile in gem
1046 (synopsis "Flexible logging library for Ruby")
1047 (description "Comprehensive and flexible logging library written
1048in Ruby for use in Ruby programs. It features a hierarchical logging
1049system of any number of levels, custom level names, logger
1050inheritance, multiple output destinations per log event, execution
1051tracing, custom formatting, thread safteyness, XML and YAML
1052configuration, and more.")
1053 (home-page "http://log4r.rubyforge.org/")
1054 (license license:bsd-3)))
1055
71a03c29
RW
1056(define-public ruby-atoulme-antwrap
1057 (package
1058 (name "ruby-atoulme-antwrap")
1059 (version "0.7.5")
1060 (source (origin
1061 (method url-fetch)
1062 (uri (rubygems-uri "atoulme-Antwrap" version))
1063 (sha256
1064 (base32
1065 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1066 (build-system ruby-build-system)
1067 ;; Test data required for most of the tests are not included.
1068 (arguments `(#:tests? #f))
1069 (native-inputs
1070 `(("ruby-hoe" ,ruby-hoe)))
1071 (inputs
1072 `(("ruby-rjb" ,ruby-rjb)))
1073 (synopsis "Ruby wrapper for the Ant build tool")
1074 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1075tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1076script.")
1077 (home-page "http://rubyforge.org/projects/antwrap/")
1078 (license license:expat)))
1079
fe1ddad5
RW
1080(define-public ruby-atoulme-saikuro
1081 (package
1082 (name "ruby-atoulme-saikuro")
1083 (version "1.2.1")
1084 (source (origin
1085 (method url-fetch)
1086 (uri (rubygems-uri "atoulme-Saikuro" version))
1087 (sha256
1088 (base32
1089 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1090 (build-system ruby-build-system)
1091 ;; FIXME: There are no unit tests. The tests are demonstrations of the
1092 ;; "saikuro" tool.
1093 (arguments `(#:tests? #f))
1094 (synopsis "Cyclomatic complexity analyzer")
1095 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1096given Ruby source code Saikuro will generate a report listing the cyclomatic
1097complexity of each method found. In addition, Saikuro counts the number of
1098lines per method and can generate a listing of the number of tokens on each
1099line of code.")
1100 (home-page "http://www.github.com/atoulme/Saikuro")
1101 ;; File headers contain the BSD-3 license and the README.rdoc says that
1102 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1103 ;; of the Expat license.
1104 (license license:bsd-3)))
1105
ff350f98
GL
1106(define-public ruby-awesome-print
1107 (package
1108 (name "ruby-awesome-print")
1109 (version "1.8.0")
1110 (source
1111 (origin
1112 (method url-fetch)
1113 (uri (rubygems-uri "awesome_print" version))
1114 (sha256
1115 (base32
1116 "14arh1ixfsd6j5md0agyzvksm5svfkvchb90fp32nn7y3avcmc2h"))))
1117 (build-system ruby-build-system)
1118 (arguments
1119 `(#:phases
1120 (modify-phases %standard-phases
1121 (replace 'check
1122 (lambda _
1123 ;; Remove failing test.
1124 (for-each delete-file
1125 '("spec/ext/nokogiri_spec.rb"
1126 "spec/colors_spec.rb"
1127 "spec/formats_spec.rb"
1128 "spec/methods_spec.rb"
1129 "spec/misc_spec.rb"
1130 "spec/objects_spec.rb"))
1131 (invoke "rspec" "-c" "spec"))))))
1132 (native-inputs
1133 `(("ruby-nokogiri" ,ruby-nokogiri)
1134 ("ruby-rspec" ,ruby-rspec)
1135 ("ruby-simplecov" ,ruby-simplecov)))
1136 (synopsis "Pretty print Ruby objects to visualize their structure")
1137 (description
1138 "Ruby dubugging companion: pretty print Ruby objects to visualize their
1139structure. Supports custom object formatting via plugins.")
1140 (home-page "https://github.com/awesome-print/awesome_print")
1141 (license license:expat)))
1142
c84dd8d4
MC
1143(define-public ruby-pandoc-ruby
1144 (package
1145 (name "ruby-pandoc-ruby")
1146 (version "2.1.4")
1147 (source
1148 (origin
1149 (method git-fetch) ;the gem lacks many test files
1150 (uri (git-reference
b0e7b699 1151 (url "https://github.com/xwmx/pandoc-ruby")
c84dd8d4
MC
1152 (commit version)))
1153 (file-name (git-file-name name version))
1154 (sha256
1155 (base32
1156 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1157 (build-system ruby-build-system)
1158 (arguments
1159 `(#:phases
1160 (modify-phases %standard-phases
1161 (add-after 'unpack 'disable-failing-tests
1162 ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
1163 ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
1164 (lambda _
1165 (substitute* "test/test_conversions.rb"
1166 (("next if from == to.*" all)
1167 (string-append
1168 all
1169 " next if ['plain', 'beamer'].include? to\n")))
1170 #t))
1171 (add-after 'unpack 'patch-pandoc-path
1172 (lambda* (#:key inputs #:allow-other-keys)
8cc8e584 1173 (let ((pandoc (string-append (assoc-ref inputs "pandoc")
c84dd8d4
MC
1174 "/bin/pandoc")))
1175 (substitute* "lib/pandoc-ruby.rb"
1176 (("@@pandoc_path = 'pandoc'")
1177 (format #f "@@pandoc_path = '~a'" pandoc)))
1178 (substitute* "test/test_pandoc_ruby.rb"
1179 (("('|\")pandoc" _ quote)
1180 (string-append quote pandoc))
1181 (("\\^pandoc")
1182 ".*pandoc"))
1183 #t)))
1184 (add-after 'extract-gemspec 'remove-Gemfile.lock
1185 (lambda _
1186 (delete-file "Gemfile.lock")
1187 (substitute* "pandoc-ruby.gemspec"
1188 (("Gemfile\\.lock") ""))
1189 #t)))))
1190 (native-inputs
1191 `(("ruby-mocha" ,ruby-mocha)))
1192 (inputs
8cc8e584 1193 `(("pandoc" ,pandoc)))
c84dd8d4
MC
1194 (synopsis "Ruby wrapper for Pandoc")
1195 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1196command line tools for converting one markup format to another. Pandoc can
1197convert documents from a variety of formats including markdown,
1198reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1199variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1200ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1201markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1202more.")
1203 (home-page "https://github.com/xwmx/pandoc-ruby")
1204 (license license:expat)))
1205
0af8398b
GL
1206(define-public ruby-patron
1207 (package
1208 (name "ruby-patron")
1209 (version "0.13.3")
1210 (source
1211 (origin
1212 (method url-fetch)
1213 (uri (rubygems-uri "patron" version))
1214 (sha256
1215 (base32
1216 "0523gddx88zql2mq6655k60gy2ac8vybpzkcf90lmd9nx7wl3fi9"))))
1217 (build-system ruby-build-system)
1218 (inputs
1219 `(("curl" ,curl)))
1220 (arguments
1221 `(#:tests? #f)) ; no included tests
1222 (synopsis "Ruby HTTP client library based on @code{libcurl}")
1223 (description
1224 "Patron is a Ruby HTTP client library based on @code{libcurl}. It does
1225not try to expose the full power (read complexity) of @code{libcurl} but
1226instead tries to provide a sane API while taking advantage of @code{libcurl}
1227under the hood.")
1228 (home-page "https://github.com/toland/patron")
1229 (license license:expat)))
1230
fef0564c
MC
1231(define-public ruby-slim
1232 (package
1233 (name "ruby-slim")
1234 (version "4.1.0")
1235 (source
1236 (origin
1237 (method url-fetch)
1238 (uri (rubygems-uri "slim" version))
1239 (sha256
1240 (base32
1241 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1242 (build-system ruby-build-system)
1243 (arguments
1244 `(#:phases
1245 (modify-phases %standard-phases
1246 ;; See: https://github.com/slim-template/slim/issues/857 and
1247 ;; https://github.com/slim-template/slim/issues/858.
1248 (add-after 'unpack 'skip-broken-tests
1249 (lambda _
1250 (substitute* "test/core/test_embedded_engines.rb"
1251 (("def test_render_with_markdown")
1252 "def skipped_test_render_with_markdown"))
1253 (substitute* "test/translator/test_translator.rb"
1254 (("raise (\"Missing test for.*)" _ tail)
1255 (string-append "print " tail)))
1256 #t))
1257 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1258 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1259 (add-after 'unpack 'prevent-bundler-interference
1260 (lambda _
1261 (substitute* "Rakefile"
1262 (("require 'bundler/setup'") "nil")
1263 (("Bundler::GemHelper\\.install_tasks") "nil"))
1264 #t)))))
1265 (native-inputs
1266 `(("ruby-rack-test" ,ruby-rack-test)
1267 ("ruby-sinatra" ,ruby-sinatra)))
1268 (propagated-inputs
1269 `(("ruby-temple" ,ruby-temple)
1270 ("ruby-tilt" ,ruby-tilt)))
1271 (synopsis "Minimalist template language for Ruby")
1272 (description "Slim is a template language for Ruby that aims to reduce the
1273syntax to the minimum while remaining clear.")
1274 (home-page "http://slim-lang.com/")
1275 (license license:expat)))
1276
34138e42
BW
1277(define-public ruby-asciidoctor
1278 (package
751bf33d 1279 (name "ruby-asciidoctor")
5df1126c 1280 (version "2.0.10")
751bf33d
MC
1281 (source
1282 (origin
5df1126c
MC
1283 (method git-fetch) ;the gem release lacks a Rakefile
1284 (uri (git-reference
b0e7b699 1285 (url "https://github.com/asciidoctor/asciidoctor")
5df1126c
MC
1286 (commit (string-append "v" version))))
1287 (file-name (git-file-name name version))
751bf33d 1288 (sha256
34138e42 1289 (base32
5df1126c 1290 "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
751bf33d
MC
1291 (build-system ruby-build-system)
1292 (arguments
1293 `(#:test-target "test:all"
1294 #:phases
1295 (modify-phases %standard-phases
5df1126c 1296 (replace 'replace-git-ls-files
751bf33d 1297 (lambda _
5df1126c
MC
1298 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1299 ;; git ls-files output is merged in ruby-build-system.
1300 (substitute* "asciidoctor.gemspec"
1301 (("`git ls-files -z`")
1302 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1303 #t))
1304 (add-after 'extract-gemspec 'strip-version-requirements
1305 (lambda _
1306 (delete-file "Gemfile")
1307 (substitute* "asciidoctor.gemspec"
1308 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1309 (string-append stripped "\n")))
751bf33d
MC
1310 #t)))))
1311 (native-inputs
5df1126c
MC
1312 `(("ruby-erubis" ,ruby-erubis)
1313 ("ruby-minitest" ,ruby-minitest)
751bf33d
MC
1314 ("ruby-nokogiri" ,ruby-nokogiri)
1315 ("ruby-asciimath" ,ruby-asciimath)
5df1126c
MC
1316 ("ruby-coderay" ,ruby-coderay)
1317 ("ruby-cucumber" ,ruby-cucumber)
1318 ("ruby-haml" ,ruby-haml)
1319 ("ruby-rouge" ,ruby-rouge)
1320 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
1321 ("ruby-simplecov" ,ruby-simplecov)
1322 ("ruby-slim" ,ruby-slim)
1323 ("ruby-tilt" ,ruby-tilt)))
751bf33d
MC
1324 (synopsis "Converter from AsciiDoc content to other formats")
1325 (description "Asciidoctor is a text processor and publishing toolchain for
1326converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1327formats.")
1328 (home-page "https://asciidoctor.org")
1329 (license license:expat)))
34138e42 1330
15b188c3
MC
1331(define-public ruby-prawn-icon
1332 (package
1333 (name "ruby-prawn-icon")
1334 (version "2.5.0")
1335 (source
1336 (origin
1337 (method url-fetch)
1338 (uri (rubygems-uri "prawn-icon" version))
1339 (sha256
1340 (base32
1341 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1342 (build-system ruby-build-system)
1343 (arguments
1344 `(#:test-target "spec"
1345 #:phases (modify-phases %standard-phases
1346 (add-after 'unpack 'remove-unnecessary-dependencies
1347 (lambda _
1348 (substitute* '("Rakefile" "spec/spec_helper.rb")
1349 ((".*[Bb]undler.*") "")
1350 (("^require 'rubocop.*") "")
1351 (("^RuboCop.*") ""))
1352 #t)))))
1353 (native-inputs
1354 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1355 ("ruby-pdf-reader" ,ruby-pdf-reader)
1356 ("ruby-rspec" ,ruby-rspec)
1357 ("ruby-simplecov" ,ruby-simplecov)))
1358 (propagated-inputs
1359 `(("ruby-prawn" ,ruby-prawn)))
1360 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1361 (description "@code{Prawn::Icon} provides various icon fonts including
1362FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1363toolkit.")
1364 (home-page "https://github.com/jessedoyle/prawn-icon/")
1365 (license %prawn-project-licenses)))
1366
2d877f6e
MC
1367(define-public ruby-css-parser
1368 (package
1369 (name "ruby-css-parser")
1370 (version "1.7.1")
1371 (source
1372 (origin
1373 (method url-fetch)
1374 (uri (rubygems-uri "css_parser" version))
1375 (sha256
1376 (base32
1377 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1378 (build-system ruby-build-system)
1379 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1380 (propagated-inputs
1381 `(("ruby-addressable" ,ruby-addressable)))
1382 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1383 (description "This package allows loading, parsing and cascading Cascading
1384Style Sheets (CSS) rule sets in Ruby.")
1385 (home-page "https://github.com/premailer/css_parser")
1386 (license license:expat)))
1387
95692655
MC
1388(define-public ruby-prawn-svg
1389 (package
1390 (name "ruby-prawn-svg")
1391 (version "0.30.0")
1392 (source
1393 (origin
1394 (method url-fetch)
1395 (uri (rubygems-uri "prawn-svg" version))
1396 (sha256
1397 (base32
1398 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1399 (build-system ruby-build-system)
1400 (arguments
1401 `(#:phases (modify-phases %standard-phases
1402 (add-after 'unpack 'do-not-use-bundler
1403 (lambda _
1404 (substitute* "spec/spec_helper.rb"
1405 ((".*[Bb]undler.*") ""))
1406 #t))
1407 (replace 'check
1408 (lambda* (#:key tests? #:allow-other-keys)
1409 (when tests?
1410 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1411 #t)))))
1412 (native-inputs
1413 `(("ruby-rspec" ,ruby-rspec)))
1414 (propagated-inputs
1415 `(("ruby-css-parser" ,ruby-css-parser)
1416 ("ruby-prawn" ,ruby-prawn)))
1417 (synopsis "SVG renderer for the Prawn PDF library")
1418 (description "This library allows rendering Scalable Vector Graphics (SVG)
1419graphics directly into a Portable Document Format (PDF) document using the
1420Prawn module.")
1421 (home-page "https://github.com/mogest/prawn-svg")
1422 (license license:expat)))
1423
ce52f2b1
MC
1424(define-public ruby-prawn-templates
1425 (package
1426 (name "ruby-prawn-templates")
1427 (version "0.1.2")
1428 (source
1429 (origin
1430 (method git-fetch)
1431 (uri (git-reference
8ed4c468 1432 (url "https://github.com/prawnpdf/prawn-templates")
ce52f2b1
MC
1433 (commit version)))
1434 (file-name (git-file-name name version))
1435 (sha256
1436 (base32
1437 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1438 (build-system ruby-build-system)
1439 (arguments
1440 `(#:phases (modify-phases %standard-phases
1441 (add-after 'unpack 'do-not-use-bundler
1442 (lambda _
1443 (substitute* "spec/spec_helper.rb"
1444 ((".*[Bb]undler.*") ""))
1445 #t))
1446 (replace 'check
1447 (lambda* (#:key tests? #:allow-other-keys)
1448 (when tests?
1449 (invoke "rspec"))
1450 #t)))))
1451 (native-inputs
1452 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1453 ("ruby-rspec" ,ruby-rspec)))
1454 (propagated-inputs
1455 `(("ruby-pdf-reader" ,ruby-pdf-reader)
1456 ("ruby-prawn" ,ruby-prawn)))
1457 (synopsis "Prawn extension to include or combine PDF documents")
1458 (description "This @strong{unmaintained} package provides a Prawn
1459extension that allows including other Portable Document Format (PDF) documents
1460as background or combining several PDF documents into one. This functionality
1461used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1462of its many longstanding issues.")
1463 (home-page "https://github.com/prawnpdf/prawn-templates")
1464 (license %prawn-project-licenses)))
1465
f949b60e
MC
1466(define-public ruby-polyglot
1467 (package
1468 (name "ruby-polyglot")
1469 (version "0.3.5")
1470 (source
1471 (origin
1472 (method url-fetch)
1473 (uri (rubygems-uri "polyglot" version))
1474 (sha256
1475 (base32
1476 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1477 (build-system ruby-build-system)
1478 (arguments `(#:tests? #f)) ;no test suite
1479 (synopsis "Augment @code{require} to load non-Ruby file types")
1480 (description "The Polyglot library allows a Ruby module to register a
1481loader for the file type associated with a filename extension, and it augments
1482@code{require} to find and load matching files.")
1483 (home-page "https://github.com/cjheath/polyglot")
1484 (license license:expat)))
1485
1f183ca0
MC
1486(define-public ruby-treetop
1487 (package
1488 (name "ruby-treetop")
1489 (version "1.6.10")
1490 (source
1491 (origin
1492 (method git-fetch) ;no test suite in distributed gem
1493 (uri (git-reference
8ed4c468 1494 (url "https://github.com/cjheath/treetop")
1f183ca0
MC
1495 (commit (string-append "v" version))))
1496 (file-name (git-file-name name version))
1497 (sha256
1498 (base32
1499 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1500 (build-system ruby-build-system)
1501 (arguments
1502 `(#:test-target "spec"
1503 #:phases
1504 (modify-phases %standard-phases
1505 (replace 'replace-git-ls-files
1506 (lambda _
1507 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1508 ;; git ls-files output is merged in ruby-build-system.
1509 (substitute* "treetop.gemspec"
1510 (("`git ls-files -z`")
1511 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1512 #t)))))
1513 (native-inputs
1514 `(("ruby-activesupport" ,ruby-activesupport)
1515 ("ruby-rr" ,ruby-rr)
1516 ("ruby-rspec" ,ruby-rspec)))
1517 (propagated-inputs
1518 `(("ruby-polyglot" ,ruby-polyglot)))
1519 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1520 (description "This package provides a Ruby-based Parsing Expression
1521Grammar (PEG) parser generator Domain Specific Language (DSL).")
1522 (home-page "https://github.com/cjheath/treetop")
1523 (license license:expat)))
1524
b47c85a5
GL
1525(define-public ruby-typhoeus
1526 (package
1527 (name "ruby-typhoeus")
1528 (version "1.4.0")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (rubygems-uri "typhoeus" version))
1533 (sha256
1534 (base32
1535 "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"))))
1536 (build-system ruby-build-system)
1537 (arguments
1538 `(#:tests? #f)) ; no included tests
1539 (propagated-inputs
1540 `(("ruby-ethon" ,ruby-ethon)))
1541 (synopsis "@code{libcurl} wrapper in Ruby")
1542 (description
1543 "Like a modern code version of the mythical beast with 100 serpent heads,
1544Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling
1545logic.")
1546 (home-page "https://github.com/typhoeus/typhoeus")
1547 (license license:expat)))
1548
66861792
MC
1549(define-public ruby-rubocop-performance
1550 (package
1551 (name "ruby-rubocop-performance")
1552 (version "1.7.1")
1553 (source
1554 (origin
1555 (method url-fetch)
1556 (uri (rubygems-uri "rubocop-performance" version))
1557 (sha256
1558 (base32
1559 "04r8d4x62ygv17spvz9yyfxbmbf8qxwhijs0xycfvzr0q4pyg9sw"))))
1560 (build-system ruby-build-system)
1561 (arguments
1562 `(#:tests? #f)) ;no test suite in the distributed gem
1563 (propagated-inputs
1564 `(("ruby-rubocop" ,ruby-rubocop)))
1565 (synopsis "Performance optimizations checkers for Ruby code")
1566 (description "This package provides a collection of RuboCop cops to check
1567for performance optimizations in Ruby code.")
1568 (home-page "https://docs.rubocop.org/rubocop-performance/")
1569 (license license:expat)))
1570
c7ab342a
MC
1571(define-public ruby-gimme
1572 (let ((revision "1")
1573 (commit "4e71f0236f1271871916dd403261d26533db34c0"))
1574 (package
1575 (name "ruby-gimme")
1576 (version (git-version "0.5.0" revision commit))
1577 (source
1578 (origin
1579 (method git-fetch)
1580 (uri (git-reference
8ed4c468 1581 (url "https://github.com/searls/gimme")
c7ab342a
MC
1582 (commit commit)))
1583 (file-name (git-file-name name version))
1584 (sha256
1585 (base32
1586 "0hrd32ygvf3i7h47ak8f623cz8ns9q7g60nnnvvlnywbggjaz3h6"))))
1587 (build-system ruby-build-system)
1588 (native-inputs
1589 `(("ruby-coveralls" ,ruby-coveralls)
1590 ("ruby-cucumber" ,ruby-cucumber)
1591 ("ruby-pry" ,ruby-pry)
1592 ("ruby-simplecov" ,ruby-simplecov)
1593 ("ruby-rspec-given" ,ruby-rspec-given)))
1594 (arguments
1595 `(;; The cucumber task fails with error: "index 3 out of matches
1596 ;; (IndexError)", apparently due to our newer Cucumber version.
1597 ;; TODO: Try the "default" task with a future release.
1598 #:test-target "spec"
1599 #:phases
1600 (modify-phases %standard-phases
1601 (add-after 'extract-gemspec 'prepare-for-tests
1602 (lambda _
1603 ;; Delete failing tests (possibly due to our newer rspec
1604 ;; version).
1605 (delete-file "spec/gimme/gives_class_methods_spec.rb")
1606 (delete-file "spec/gimme/rspec_adapter_spec.rb")
1607 (delete-file "spec/gimme/verifies_class_methods_spec.rb")
1608 ;; Fix duplicate version requirements and de-register files.
1609 (delete-file "Gemfile")
1610 (delete-file "Gemfile.lock")
1611 (substitute* "gimme.gemspec"
1612 ((".*\"Gemfile\".*") "")
1613 ((".*\"Gemfile\\.lock\",.*") "")
1614 ((".*(rspec|cucumber).*\">= 0\".*") "")
1615 (("\"spec/gimme/gives_class_methods_spec.rb\",") "")
1616 (("\"spec/gimme/rspec_adapter_spec.rb\",") "")
1617 (("\"spec/gimme/verifies_class_methods_spec.rb\",") "")
1618 ;; All of these gems relate to development, and are
1619 ;; unnecessary when running the tests.
1620 ((".*(add|gem).*guard-.*") "")
1621 ((".*(add|gem).*jeweler.*") "")
1622 ((".*(add|gem).*pry.*") "")
1623 ((".*(add|gem).*growl.*") "")
1624 ((".*(add|gem).*rb-fsevent.*") ""))
1625 #t)))))
1626 (synopsis "Lightweight test double library for Ruby")
1627 (description "Gimme is a very lightweight test double library for Ruby,
1628based on Mockito (a mocking framework for Java). It is an opinionated (but
1629not noisy) means to facilitate test-driving by enabling the authors to specify
1630only what they care about.")
1631 (home-page "https://github.com/searls/gimme")
1632 (license license:expat))))
1633
97295c2a
MC
1634(define-public ruby-standard
1635 (package
1636 (name "ruby-standard")
1637 (version "0.4.7")
1638 (source
1639 (origin
1640 (method git-fetch) ;no test suite in distributed gem
1641 (uri (git-reference
8ed4c468 1642 (url "https://github.com/testdouble/standard")
97295c2a
MC
1643 (commit (string-append "v" version))))
1644 (file-name (git-file-name name version))
1645 (sha256
1646 (base32
1647 "0ylx0lm2pbbgr5h7fban592w96bl3wxmvfcpcdfrhkxnpg5kiwgv"))))
1648 (build-system ruby-build-system)
1649 (arguments
1650 ;; TODO: the tests are currently broken due to using a newer Rubocop.
1651 `(#:tests? #f
1652 #:phases
1653 (modify-phases %standard-phases
1654 (add-after 'unpack 'relax-version-requiremens
1655 (lambda _
1656 (delete-file "Gemfile")
1657 (delete-file "Gemfile.lock")
1658 #t))
1659 (replace 'replace-git-ls-files
1660 (lambda _
1661 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1662 ;; git ls-files output is merged in ruby-build-system.
1663 (substitute* "standard.gemspec"
1664 (("`git ls-files -z`")
1665 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1666|sort -z|cut -zc3-`"))
1667 #t)))))
1668 (native-inputs
1669 `(("ruby-gimme" ,ruby-gimme)
1670 ("ruby-pry" ,ruby-pry)
1671 ("ruby-simplecov" ,ruby-simplecov)))
1672 (propagated-inputs
1673 `(("ruby-rubocop" ,ruby-rubocop)
1674 ("ruby-rubocop-performance" ,ruby-rubocop-performance)))
1675 (synopsis "Ruby Style Guide, with linter & automatic code fixer")
1676 (description "Standard is a port of StandardJS. Like StandardJS, it aims
1677to save time in the following ways:
1678@itemize
1679@item No configuration.
1680@item Automatically format code.
1681@item Catch style issues and programmer errors early.
1682@end itemize")
1683 (home-page "https://github.com/testdouble/standard")
1684 (license license:expat)))
1685
db9f951b 1686(define-public ruby-chunky-png
4c91f184
MC
1687 (package
1688 (name "ruby-chunky-png")
d065517b 1689 (version "1.3.14")
4c91f184
MC
1690 (source
1691 (origin
1692 (method git-fetch)
1693 (uri (git-reference
8ed4c468 1694 (url "https://github.com/wvanbergen/chunky_png")
4c91f184
MC
1695 (commit (string-append "v" version))))
1696 (file-name (git-file-name name version))
1697 (sha256
d065517b 1698 (base32 "1m7y11ix38h5a2pj5v81qdmvqh980ql9hp62hk2dxwkwsa4nh22h"))))
4c91f184
MC
1699 (build-system ruby-build-system)
1700 (arguments
1701 `(#:test-target "spec"
1702 #:phases
1703 (modify-phases %standard-phases
1704 (add-after 'unpack 'disable-bundler
1705 (lambda _
1706 (substitute* (find-files "." "\\.rb$")
1707 (("require.*bundler/setup.*") ""))
1708 #t))
1709 (replace 'replace-git-ls-files
1710 (lambda _
1711 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1712 ;; git ls-files output is merged in ruby-build-system.
1713 (substitute* "chunky_png.gemspec"
1714 (("`git ls-files`")
1715 "`find . -type f -not -regex '.*\\.gem$' |sort |cut -c3-`"))
1716 #t)))))
1717 (native-inputs
1718 `(("bundler" ,bundler)
1719 ("ruby-rspec" ,ruby-rspec)
1720 ("ruby-standard" ,ruby-standard)
1721 ("ruby-yard" ,ruby-yard)))
1722 (synopsis "Ruby library to handle PNG images")
1723 (description "ChunkyPNG is a pure Ruby library that can read and write
db9f951b
MC
1724Portable Network Graphics (PNG) images without depending on an external image
1725library. It tries to be memory efficient and reasonably fast. It has
1726features such as:
1727@itemize
1728@item
1729Decoding support for any image that the PNG standard allows. This includes all
1730standard color modes, all bit depths, all transparency, and interlacing and
1731filtering options.
1732@item
1733Encoding support for images of all color modes (true color, grayscale, and
1734indexed) and transparency for all these color modes. The best color mode is
1735chosen automatically, based on the amount of used colors.
1736@item Read/write access to the image's pixels.
1737@item Read/write access to all image metadata that is stored in chunks.
1738@item
1739Memory efficiency: @code{fixnum} are used, i.e. 4 or 8 bytes of memory per
1740pixel, depending on the hardware).
1741@item
1742Performance: ChunkyPNG is reasonably fast for Ruby standards, by only using
1743integer math and a highly optimized saving routine.
1744@item Interoperability with RMagick.
ed02857b
TGR
1745@end itemize
1746
1747ChunkyPNG is vulnerable to decompression bombs and can run out of memory when
1748loading a specifically crafted PNG file. This is hard to fix in pure Ruby.
1749Deal with untrusted images in a separate process, e.g., by using @code{fork}
1750or a background processing library.")
4c91f184
MC
1751 (home-page "https://github.com/wvanbergen/chunky_png/wiki")
1752 (license license:expat)))
db9f951b 1753
f421785b
MC
1754(define-public ruby-text-hyphen
1755 (package
1756 (name "ruby-text-hyphen")
1757 (version "1.4.1")
1758 (source
1759 (origin
1760 (method url-fetch)
1761 (uri (rubygems-uri "text-hyphen" version))
1762 (sha256
1763 (base32
1764 "1gj4awvs9ryf960m0iawg43jyjmfwcqgfwrbcfp890a57b9ag7q1"))))
1765 (build-system ruby-build-system)
1766 (native-inputs
1767 `(("ruby-hoe" ,ruby-hoe)))
1768 (synopsis "Ruby library to hyphenate words in various languages")
1769 (description "Text::Hyphen is a Ruby library to hyphenate words in various
1770languages using Ruby-fied versions of TeX hyphenation patterns. It will
1771properly hyphenate various words according to the rules of the language the
1772word is written in. The algorithm is based on that of the TeX typesetting
1773system by Donald E. Knuth.")
1774 (home-page "https://github.com/halostatue/text-hyphen")
1775 ;; The whole is licensed under the Expat license, but parts use various
1776 ;; versions of the LaTeX Project Public License.
1777 (license license:expat)))
1778
7d94616d
MC
1779(define-public ruby-open-uri-cached
1780 (package
1781 (name "ruby-open-uri-cached")
1782 (version "0.0.5")
1783 (source
1784 (origin
1785 (method url-fetch)
1786 (uri (rubygems-uri "open-uri-cached" version))
1787 (sha256
1788 (base32
1789 "13xy2vhrgz9mdxhklw5fszhamsdxh8ysf3l40g92hqm4hm288wap"))))
1790 (build-system ruby-build-system)
1791 (arguments
1792 `(#:tests? #f)) ;no test suite
1793 (synopsis "OpenURI with transparent disk caching")
1794 (description "OpenURI with transparent disk caching, which is
1795useful to avoid making excessive queries, for example when scraping
1796web pages.")
1797 (home-page "https://github.com/tigris/open-uri-cached")
1798 (license license:expat)))
1799
9c5a7d00
MC
1800(define-public ruby-asciidoctor-pdf
1801 ;; Use the latest commit, as the last tag doesn't build with the
1802 ;; latest Ruby dependencies in Guix.
1803 (let ((revision "1")
1804 (commit "d257440df895d1595a3825ef58b32e4b290ba1c3"))
1805 (package
1806 (name "ruby-asciidoctor-pdf")
1807 (version (git-version "1.5.3" revision commit))
1808 (source
1809 (origin
1810 (method git-fetch) ;no test suite in the distributed gem
1811 (uri (git-reference
8ed4c468 1812 (url "https://github.com/asciidoctor/asciidoctor-pdf")
9c5a7d00
MC
1813 (commit commit)))
1814 (file-name (git-file-name name version))
1815 (sha256
1816 (base32
1817 "1563d11ghzsrsg4inwfwj6b9hb5sk5b429f49fwq5qg3sq76kgjj"))))
1818 (build-system ruby-build-system)
1819 (arguments
1820 `(#:test-target "spec"
1821 #:phases
1822 (modify-phases %standard-phases
1823 (add-after 'unpack 'remove-failing-tests
1824 ;; Two tests module fail for unknown reasons, *only* when
1825 ;; ran in the build container (see:
1826 ;; https://github.com/asciidoctor/asciidoctor-pdf/issues/1725#issuecomment-658777965).
1827 (lambda _
1828 (delete-file "spec/audio_spec.rb")
1829 (delete-file "spec/video_spec.rb")
1830 #t))
1831 (add-after 'extract-gemspec 'strip-version-requirements
1832 (lambda _
1833 (substitute* "asciidoctor-pdf.gemspec"
1834 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1835 (string-append stripped "\n")))
1836 #t))
1837 (replace 'replace-git-ls-files
1838 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1839 ;; git ls-files output is merged in ruby-build-system.
1840 (lambda _
1841 (substitute* "asciidoctor-pdf.gemspec"
1842 (("`git ls-files -z`")
1843 "`find . -type f -not -regex '.*\\.gem$' -print0 \
1844|sort -z|cut -zc3-`"))
1845 #t))
1846 ;; The tests rely on the Gem being installed, so move the check phase
1847 ;; after the install phase.
1848 (delete 'check)
1849 (add-after 'install 'check
1850 (lambda* (#:key outputs tests? #:allow-other-keys)
1851 (let ((new-gem (string-append (assoc-ref outputs "out")
1852 "/lib/ruby/vendor_ruby")))
1853 (setenv "GEM_PATH"
1854 (string-append (getenv "GEM_PATH") ":" new-gem))
1855 (when tests?
1856 (invoke "rspec" "-t" "~visual" "-t" "~cli" "-t" "~network"))
1857 #t))))))
1858 (native-inputs
1859 `(("ruby-chunky-png" ,ruby-chunky-png)
1860 ("ruby-coderay" ,ruby-coderay)
1861 ("ruby-pdf-inspector" ,ruby-pdf-inspector)
1862 ("ruby-rouge" ,ruby-rouge)
1863 ("ruby-rspec" ,ruby-rspec)))
1864 (propagated-inputs
1865 `(("ruby-asciidoctor" ,ruby-asciidoctor)
1866 ("ruby-concurrent-ruby" ,ruby-concurrent)
1867 ("ruby-open-uri-cached" ,ruby-open-uri-cached)
1868 ("ruby-prawn" ,ruby-prawn)
1869 ("ruby-prawn-icon" ,ruby-prawn-icon)
1870 ("ruby-prawn-svg" ,ruby-prawn-svg)
1871 ("ruby-prawn-table" ,ruby-prawn-table)
1872 ("ruby-prawn-templates" ,ruby-prawn-templates)
1873 ("ruby-safe-yaml" ,ruby-safe-yaml)
1874 ("ruby-text-hyphen" ,ruby-text-hyphen)
1875 ("ruby-thread-safe" ,ruby-thread-safe)
1876 ("ruby-treetop" ,ruby-treetop)
1877 ("ruby-ttfunk" ,ruby-ttfunk)))
1878 (synopsis"AsciiDoc to Portable Document Format (PDF)} converter")
1879 (description "Asciidoctor PDF is an extension for Asciidoctor that
1880converts AsciiDoc documents to Portable Document Format (PDF) using the Prawn
1881PDF library. It has features such as:
1882@itemize
1883@item Direct AsciiDoc to PDF conversion
1884@item Configuration-driven theme (style and layout)
1885@item Scalable Vector Graphics (SVG) support
1886@item PDF document outline (i.e., bookmarks)
1887@item Table of contents page(s)
1888@item Document metadata (title, authors, subject, keywords, etc.)
1889@item Internal cross reference links
1890@item Syntax highlighting with Rouge, Pygments, or CodeRay
1891@item Page numbering
1892@item Customizable running content (header and footer)
1893@item
1894“Keep together” blocks (i.e., page breaks avoided in certain block content)
1895@item Orphaned section titles avoided
1896@item Autofit verbatim blocks (as permitted by base_font_size_min setting)
1897@item Table border settings honored
1898@item Font-based icons
1899@item Custom TrueType (TTF) fonts
1900@item Double-sided printing mode (margins alternate on recto and verso pages)
1901@end itemize")
1902 (home-page "https://asciidoctor.org/docs/asciidoctor-pdf")
1903 (license license:expat))))
1904
d5840f77
CB
1905(define-public ruby-ast
1906 (package
1907 (name "ruby-ast")
308104f8 1908 (version "2.4.1")
d5840f77
CB
1909 (source
1910 (origin
308104f8
MC
1911 (method git-fetch) ;no test included in gem from v2.4.1
1912 (uri (git-reference
1913 (url "https://github.com/whitequark/ast")
1914 (commit (string-append "v" version))))
1915 (file-name (git-file-name name version))
d5840f77
CB
1916 (sha256
1917 (base32
308104f8 1918 "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
d5840f77
CB
1919 (build-system ruby-build-system)
1920 (arguments
1921 '(#:phases
1922 (modify-phases %standard-phases
1923 (add-after 'unpack 'remove-coveralls-requirement
1924 (lambda _
1925 (substitute* "test/helper.rb"
1926 (("require 'coveralls'") "")
1927 (("Coveralls::SimpleCov::Formatter") ""))
1928 #t))
1929 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1930 (lambda _
1931 (substitute* "ast.gemspec"
1932 ((".*coveralls.*") "\n")
1933 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1934 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1935 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1936 #t)))))
1937 (native-inputs
1938 `(("bundler" ,bundler)
1939 ("ruby-simplecov" ,ruby-simplecov)
1940 ("ruby-json-pure" ,ruby-json-pure)
1941 ("ruby-mime-times" ,ruby-mime-types)
1942 ("ruby-yard" ,ruby-yard)
1943 ("ruby-kramdown" ,ruby-kramdown)
1944 ("ruby-rest-client" ,ruby-rest-client)
1945 ("ruby-bacon" ,ruby-bacon)
1946 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1947 ("ruby-racc" ,ruby-racc)))
1948 (synopsis "Library for working with Abstract Syntax Trees")
1949 (description
1950 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1951It does this through immutable data structures.")
1952 (home-page "https://whitequark.github.io/ast/")
1953 (license license:expat)))
1954
b88502c9
BW
1955(define-public ruby-sporkmonger-rack-mount
1956 ;; Testing the addressable gem requires a newer commit than that released, so
1957 ;; use an up to date version.
1958 (let ((revision "1")
1959 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1960 (package
1961 (name "ruby-sporkmonger-rack-mount")
1962 (version (git-version "0.8.3" revision commit))
1963 (source (origin
1964 (method git-fetch)
1965 (uri (git-reference
b0e7b699 1966 (url "https://github.com/sporkmonger/rack-mount")
b88502c9
BW
1967 (commit commit)))
1968 (file-name (git-file-name name version))
1969 (sha256
1970 (base32
1971 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1972 (build-system ruby-build-system)
1973 (arguments
1974 ;; Tests currently fail so disable them.
1975 ;; https://github.com/sporkmonger/rack-mount/pull/1
1976 `(#:tests? #f))
1977 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1978 (synopsis "Stackable dynamic tree based Rack router")
1979 (description
1980 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1981continue trying routes if the response returns pass. This allows multiple
1982routes to be nested or stacked on top of each other.")
1983 (home-page "https://github.com/sporkmonger/rack-mount")
1984 (license license:expat))))
1985
2f9e0b68
RW
1986(define-public ruby-ci-reporter
1987 (package
1988 (name "ruby-ci-reporter")
1989 (version "2.0.0")
1990 (source (origin
1991 (method url-fetch)
1992 (uri (rubygems-uri "ci_reporter" version))
1993 (sha256
1994 (base32
1995 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1996 (build-system ruby-build-system)
1997 (arguments
1998 `(#:test-target "rspec"))
1999 (propagated-inputs
2000 `(("ruby-builder" ,ruby-builder)))
2001 (native-inputs
2002 `(("bundler" ,bundler)
2003 ("ruby-rspec" ,ruby-rspec)))
2004 (synopsis "Generate XML reports of runs test")
2005 (description
2006 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
2007you to generate XML reports of your test runs. The resulting files can be
2008read by a continuous integration system that understands Ant's JUnit report
2009format.")
2010 (home-page "https://github.com/nicksieger/ci_reporter")
2011 (license license:expat)))
2012
2ed201c1
CB
2013(define-public ruby-contracts
2014 (package
2015 (name "ruby-contracts")
2016 (version "0.16.0")
2017 (source
2018 (origin
2019 (method url-fetch)
2020 (uri (rubygems-uri "contracts" version))
2021 (sha256
2022 (base32
2023 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
2024 (build-system ruby-build-system)
2025 (arguments
2026 '(#:test-target "spec"
2027 #:phases
2028 (modify-phases %standard-phases
2029 ;; Don't run or require rubocop, the code linting tool, as this is a
2030 ;; bit unnecessary.
2031 (add-after 'unpack 'dont-run-rubocop
2032 (lambda _
2033 (substitute* "Rakefile"
2034 ((".*rubocop.*") "")
2035 ((".*RuboCop.*") ""))
2036 #t)))))
2037 (native-inputs
2038 `(("ruby-rspec" ,ruby-rspec)))
2039 (synopsis "Method contracts for Ruby")
2040 (description
2041 "This library provides contracts for Ruby. A contract describes the
2042correct inputs and output for a method, and will raise an error if a incorrect
2043value is found.")
2044 (home-page "https://github.com/egonSchiele/contracts.ruby")
2045 (license license:bsd-2)))
2046
6f8bf0eb
CB
2047(define-public ruby-crack
2048 (package
2049 (name "ruby-crack")
2050 (version "0.4.3")
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (rubygems-uri "crack" version))
2055 (sha256
2056 (base32
2057 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
2058 (build-system ruby-build-system)
2059 (arguments
2060 `(#:phases
2061 (modify-phases %standard-phases
2062 (replace 'check
2063 (lambda* (#:key tests? #:allow-other-keys)
2064 (when tests?
2065 (for-each (lambda (file)
2066 (display file)(display "\n")
2067 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
2068 (find-files "test" ".*rb$")))
2069 #t)))))
2070 (propagated-inputs
2071 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
2072 (synopsis "Simple JSON and XML parsing for Ruby")
2073 (description
2074 "@code{crack} provides really simple JSON and XML parsing, extracted from
2075code in Merb and Rails.")
2076 (home-page "https://github.com/jnunemaker/crack")
2077 (license license:expat)))
2078
bef3506e
CB
2079(define-public ruby-cliver
2080 (package
2081 (name "ruby-cliver")
2082 (version "0.3.2")
2083 (source
2084 (origin
2085 (method url-fetch)
2086 (uri (rubygems-uri "cliver" version))
2087 (sha256
2088 (base32
2089 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
2090 (build-system ruby-build-system)
2091 (arguments
2092 '(#:phases
2093 (modify-phases %standard-phases
2094 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
2095 ;; would be nice, but the tests look to be incompatible:
2096 ;;
2097 ;; NoMethodError: undefined method `last_comment'
2098 (replace 'check
2099 (lambda* (#:key tests? #:allow-other-keys)
2100 (when tests?
2101 (invoke "rspec"))
2102 #t)))))
2103 (native-inputs
2104 `(("bundler" ,bundler)
2105 ("ruby-rspec" ,ruby-rspec-2)))
2106 (synopsis "Assertions for command-line dependencies in Ruby")
2107 (description
2108 "@code{cliver} provides a way to detect missing command-line
2109dependencies, including versions.")
2110 (home-page "https://github.com/yaauie/cliver")
2111 (license license:expat)))
2112
fe5dd5f4
CB
2113(define-public ruby-czmq-ffi-gen
2114 (package
2115 (name "ruby-czmq-ffi-gen")
2116 (version "0.13.0")
2117 (source
2118 (origin
2119 (method url-fetch)
2120 (uri (rubygems-uri "czmq-ffi-gen" version))
2121 (sha256
2122 (base32
2123 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
2124 (build-system ruby-build-system)
2125 (arguments
2126 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
2127 #:phases
2128 (modify-phases %standard-phases
2129 (add-after 'unpack 'patch-lib_dirs
2130 (lambda* (#:key inputs #:allow-other-keys)
2131 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
2132 (("lib\\_dirs = \\[.*\\]")
2133 (string-append "lib_dirs = ['"
2134 (assoc-ref inputs "czmq") "/lib"
2135 "']")))
2136 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
2137 (("lib\\_dirs = \\[.*\\]")
2138 (string-append "lib_dirs = ['"
2139 (assoc-ref inputs "zeromq") "/lib"
2140 "']"))))))))
2141 (inputs
2142 `(("zeromq" ,zeromq)
2143 ("czmq" ,czmq)))
2144 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
2145 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
2146 (description
2147 "These Ruby bindings are not intended to be directly used, but rather
2148used by higher level bindings like those provided by CZTop.")
2149 (home-page
2150 "https://github.com/paddor/czmq-ffi-gen")
2151 (license license:isc)))
2152
d0afff26
CB
2153(define-public ruby-cztop
2154 (package
2155 (name "ruby-cztop")
2156 (version "0.12.2")
2157 (source
2158 (origin
2159 (method url-fetch)
2160 (uri (rubygems-uri "cztop" version))
2161 (sha256
2162 (base32
2163 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
2164 (build-system ruby-build-system)
2165 (arguments
2166 '(#:test-target "spec"
2167 #:phases
2168 (modify-phases %standard-phases
2169 (add-after 'unpack 'patch-lib_paths
2170 (lambda* (#:key inputs #:allow-other-keys)
2171 (substitute* "lib/cztop/poller/zmq.rb"
2172 (("lib\\_paths = \\[.*\\]")
2173 (string-append "lib_paths = ['"
2174 (assoc-ref inputs "zeromq") "/lib"
2175 "']"))))))))
2176 (native-inputs
2177 `(("bundler" ,bundler)
2178 ("ruby-rspec" ,ruby-rspec)))
2179 (inputs
2180 `(("zeromq" ,zeromq)))
2181 (propagated-inputs
2182 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
2183 (synopsis "CZMQ Ruby bindings")
2184 (description
2185 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
2186CZMQ. The focus of of CZTop is on being easy to use and providing first class
2187support for security mechanisms.")
2188 (home-page "https://github.com/paddor/cztop")
2189 (license license:isc)))
2190
b004fb6a
RW
2191(define-public ruby-saikuro-treemap
2192 (package
2193 (name "ruby-saikuro-treemap")
2194 (version "0.2.0")
2195 (source (origin
2196 (method url-fetch)
2197 (uri (rubygems-uri "saikuro_treemap" version))
2198 (sha256
2199 (base32
2200 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
2201 (build-system ruby-build-system)
2202 ;; Some of the tests fail because the generated JSON has keys in a
2203 ;; different order. This is a problem with the test suite rather than any
2204 ;; of the involved libraries.
2205 (arguments `(#:tests? #f))
2206 (propagated-inputs
2207 `(("ruby-json-pure" ,ruby-json-pure)
2208 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
2209 (synopsis "Generate complexity treemap based on saikuro analysis")
2210 (description
2211 "This gem generates a treemap showing the complexity of Ruby code on
2212which it is run. It uses Saikuro under the covers to analyze Ruby code
2213complexity.")
7bf837fd 2214 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
b004fb6a
RW
2215 (license license:expat)))
2216
92b37500
CB
2217(define-public ruby-oauth2
2218 (package
2219 (name "ruby-oauth2")
5dd10be5 2220 (version "1.4.2")
92b37500
CB
2221 (source
2222 (origin
2223 (method url-fetch)
2224 (uri (rubygems-uri "oauth2" version))
2225 (sha256
5dd10be5 2226 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
92b37500
CB
2227 (build-system ruby-build-system)
2228 (arguments
5dd10be5 2229 '(#:tests? #f)) ; no included tests
92b37500
CB
2230 (propagated-inputs
2231 `(("ruby-faraday" ,ruby-faraday)
2232 ("ruby-jwt" ,ruby-jwt)
2233 ("ruby-multi-json" ,ruby-multi-json)
2234 ("ruby-multi-xml" ,ruby-multi-xml)
2235 ("ruby-rack" ,ruby-rack)))
2236 (synopsis "Ruby wrapper for the OAuth 2.0")
2237 (description
2238 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
2239with a similar style to the original OAuth spec.")
2240 (home-page "https://github.com/oauth-xx/oauth2")
2241 (license license:expat)))
2242
29dc4823
CB
2243(define-public ruby-omniauth
2244 (package
2245 (name "ruby-omniauth")
a7b7817d 2246 (version "1.9.1")
29dc4823
CB
2247 (source
2248 (origin
2249 (method url-fetch)
2250 (uri (rubygems-uri "omniauth" version))
2251 (sha256
a7b7817d 2252 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
29dc4823
CB
2253 (build-system ruby-build-system)
2254 (arguments
2255 '(#:tests? #f)) ; No included tests
2256 (propagated-inputs
2257 `(("ruby-hashie" ,ruby-hashie)
2258 ("ruby-rack" ,ruby-rack)))
2259 (synopsis "Generalized Rack framework for multiple-provider authentication")
2260 (description
2261 "This package provides a generalized Rack framework for multiple-provider
2262authentication.")
2263 (home-page "https://github.com/omniauth/omniauth")
2264 (license license:expat)))
2265
d6084cdb
CB
2266(define-public ruby-omniauth-oauth2
2267 (package
2268 (name "ruby-omniauth-oauth2")
2269 (version "1.6.0")
2270 (source
2271 (origin
2272 (method url-fetch)
2273 (uri (rubygems-uri "omniauth-oauth2" version))
2274 (sha256
2275 (base32
2276 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
2277 (build-system ruby-build-system)
2278 (arguments
2279 '(#:phases
2280 (modify-phases %standard-phases
2281 (add-after 'unpack 'remove-unnecessary-dependencies
2282 (lambda _
2283 ;; The coveralls gem submits coverage information to an online
2284 ;; service, and is unnecessary when running the tests
2285 (substitute* "Gemfile"
2286 ((".*coveralls\"") ""))
2287 (substitute* "spec/helper.rb"
2288 (("require \"coveralls\"") "")
2289 (("Coveralls::SimpleCov::Formatter") ""))
2290 #t)))))
2291 (propagated-inputs
2292 `(("ruby-oauth2" ,ruby-oauth2)
2293 ("ruby-omniauth" ,ruby-omniauth)))
2294 (native-inputs
2295 `(("bundler" ,bundler)
2296 ("ruby-rspec" ,ruby-rspec)
2297 ("ruby-simplecov" ,ruby-simplecov)
2298 ("ruby-rack-test" ,ruby-rack-test)
2299 ("ruby-webmock" ,ruby-webmock-2)))
2300 (synopsis "Abstract OAuth2 strategy for OmniAuth")
2301 (description
2302 "This library provides a generic OAuth2 strategy for OmniAuth. It
2303doesn't provide a way to gather user information, so should be used as a
2304building block for authentication strategies.")
2305 (home-page "https://github.com/omniauth/omniauth-oauth2")
2306 (license license:expat)))
2307
433e3154
CB
2308(define-public ruby-open4
2309 (package
2310 (name "ruby-open4")
2311 (version "1.3.4")
2312 (source
2313 (origin
2314 (method url-fetch)
2315 (uri (rubygems-uri "open4" version))
2316 (sha256
2317 (base32
2318 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
2319 (build-system ruby-build-system)
2320 (arguments
2321 '(#:phases
2322 (modify-phases %standard-phases
2323 (add-after 'unpack 'patch
2324 (lambda _
2325 (substitute* "rakefile"
2326 ;; Update the Rakefile so it works
2327 (("-rubygems") "-rrubygems")
2328 (("Config") "RbConfig"))
2329 #t))
2330 (add-before 'check 'set-LIB
2331 (lambda _
2332 ;; This is used in the rakefile when running the tests
2333 (setenv "LIB" "open4")
2334 #t)))))
2335 (synopsis "Open child processes from Ruby and manage them easily")
2336 (description
2337 "@code{Open4} is a Ruby library to run child processes and manage their
2338input and output.")
2339 (home-page "https://github.com/ahoward/open4")
2340 (license license:ruby)))
2341
cef87ed6
CB
2342(define-public ruby-options
2343 (package
2344 (name "ruby-options")
2345 (version "2.3.2")
2346 (source
2347 (origin
2348 (method url-fetch)
2349 (uri (rubygems-uri "options" version))
2350 (sha256
2351 (base32
2352 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
2353 (build-system ruby-build-system)
2354 (arguments
2355 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
2356 #:phases
2357 (modify-phases %standard-phases
2358 (add-before 'check 'set-LIB
2359 (lambda _
2360 ;; This is used in the Rakefile, and setting it avoids an issue
2361 ;; with running the tests.
fe27238c
CB
2362 (setenv "LIB" "options")
2363 #t)))))
cef87ed6
CB
2364 (synopsis "Ruby library to parse options from *args cleanly")
2365 (description
2366 "The @code{options} library helps with parsing keyword options in Ruby
2367functions.")
2368 (home-page "https://github.com/ahoward/options")
2369 (license license:ruby)))
2370
d15dbe83
CB
2371(define-public ruby-erubi
2372 (package
2373 (name "ruby-erubi")
2374 (version "1.8.0")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (rubygems-uri "erubi" version))
2379 (sha256
2380 (base32
2381 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
2382 (build-system ruby-build-system)
2383 (synopsis "ERB template engine for Ruby")
2384 (description
2385 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
2386Erubis")
2387 (home-page "https://github.com/jeremyevans/erubi")
2388 (license license:expat)))
2389
d64ebebd
BW
2390(define-public ruby-erubis
2391 (package
2392 (name "ruby-erubis")
2393 (version "2.7.0")
2394 (source
2395 (origin
2396 (method url-fetch)
2397 (uri (rubygems-uri "erubis" version))
2398 (sha256
2399 (base32
2400 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
2401 (build-system ruby-build-system)
2402 (arguments
2403 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
2404 (synopsis "Implementation of embedded Ruby (eRuby)")
2405 (description
2406 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
2407features such as multi-language support, auto escaping, auto trimming spaces
2408around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
2409support.")
2410 (home-page "http://www.kuwata-lab.com/erubis/")
2411 (license license:expat)))
2412
45270b18
GL
2413(define-public ruby-ethon
2414 (package
2415 (name "ruby-ethon")
2416 (version "0.12.0")
2417 (source
2418 (origin
2419 (method url-fetch)
2420 (uri (rubygems-uri "ethon" version))
2421 (sha256
2422 (base32
2423 "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
2424 (build-system ruby-build-system)
2425 (arguments
2426 `(#:tests? #f)) ; no included tests
2427 (inputs
2428 `(("curl" ,curl)))
2429 (propagated-inputs
2430 `(("ruby-ffi" ,ruby-ffi)))
2431 (synopsis "Very lightweight @code{libcurl} wrapper")
2432 (description
2433 "Ethon is a very basic @code{libcurl} wrapper using ffi.")
2434 (home-page "https://github.com/typhoeus/ethon")
2435 (license license:expat)))
2436
3ca43524
CB
2437(define-public ruby-execjs
2438 (package
2439 (name "ruby-execjs")
2440 (version "2.7.0")
2441 (source
2442 (origin
2443 ;; fetch from github as the gem does not contain testing code
2444 (method git-fetch)
2445 (uri (git-reference
b0e7b699 2446 (url "https://github.com/rails/execjs")
3ca43524
CB
2447 (commit (string-append "v" version))))
2448 (file-name (git-file-name name version))
2449 (sha256
2450 (base32
2451 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
2452 (build-system ruby-build-system)
2453 (native-inputs
2454 `(("bundler" ,bundler)
2455 ;; The test suite tests all the available backends. Currenly, this just
2456 ;; means the node backend.
2457 ;;
2458 ;; PASSED: test:node
2459 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
2460 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
2461 ("node" ,node)))
2462 (synopsis "Run JavaScript code from Ruby")
2463 (description
2464 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2465runtime to evaluate your JavaScript program, then returns the result to you as
2466a Ruby object.")
2467 (home-page "https://github.com/rails/execjs")
2468 (license license:expat)))
2469
6623a151
MB
2470(define-public ruby-fakefs
2471 (package
2472 (name "ruby-fakefs")
2473 (version "1.2.2")
2474 (home-page "https://github.com/fakefs/fakefs")
2475 (source (origin
2476 ;; The Rubygems release does not contain tests.
2477 (method git-fetch)
2478 (uri (git-reference
2479 (url home-page)
2480 (commit (string-append "v" version))))
2481 (file-name (git-file-name name version))
2482 (sha256
2483 (base32
2484 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2485 (build-system ruby-build-system)
2486 (arguments
2487 '(#:phases (modify-phases %standard-phases
2488 (replace 'replace-git-ls-files
2489 (lambda _
2490 (substitute* "fakefs.gemspec"
2491 (("`git ls-files lib README.md LICENSE`")
2492 "`find lib README.md LICENSE -type f | sort`"))
2493 #t))
2494 (add-before 'check 'remove-version-constraints
2495 (lambda _
2496 ;; Drop hard version requirements for test dependencies.
2497 (substitute* "fakefs.gemspec"
2498 (("(.*add_development_dependency .*), .*" _ dep)
2499 (string-append dep "\n")))
a011f67b 2500 #t)))))
6623a151
MB
2501 (native-inputs
2502 `(("ruby-bump" ,ruby-bump)
2503 ("ruby-maxitest" ,ruby-maxitest)
2504 ("ruby-rubocop" ,ruby-rubocop)
2505 ("ruby-rspec" ,ruby-rspec)))
2506 (synopsis "Fake file system for Ruby")
2507 (description
2508 "This package provides a fake file system for use in test suites. It
2509avoids the need for manually creating temporary directories, or dealing
2510with platform intricacies in @code{File} and @code{FileUtils}.")
2511 (license license:expat)))
2512
cc53e630
RW
2513(define-public ruby-orderedhash
2514 (package
2515 (name "ruby-orderedhash")
2516 (version "0.0.6")
2517 (source (origin
2518 (method url-fetch)
2519 (uri (rubygems-uri "orderedhash" version))
2520 (sha256
2521 (base32
2522 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2523 (build-system ruby-build-system)
2524 (arguments
2525 '(#:tests? #f)) ; no test suite
2526 (synopsis "Ruby library providing an order-preserving hash")
2527 (description "Orderedhash is a Ruby library providing a hash
2528implementation that preserves the order of items and features some array-like
2529extensions.")
2530 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2531 (license license:public-domain)))
2532
28c5d42d
PP
2533(define-public ruby-libxml
2534 (package
2535 (name "ruby-libxml")
acbc5062 2536 (version "3.0.0")
28c5d42d
PP
2537 (source
2538 (origin
2539 (method url-fetch)
2540 (uri (rubygems-uri "libxml-ruby" version))
2541 (sha256
2542 (base32
acbc5062 2543 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
28c5d42d
PP
2544 (build-system ruby-build-system)
2545 (inputs
2546 `(("zlib" ,zlib)
2547 ("libxml2" ,libxml2)))
2548 (arguments
2549 '(#:tests? #f ; test suite hangs for unknown reason
2550 #:gem-flags
5b98944d
CB
2551 (list "--no-document" ; TODO: Re-enable when documentation
2552 ; generation works
2553 "--"
28c5d42d
PP
2554 (string-append "--with-xml2-include="
2555 (assoc-ref %build-inputs "libxml2")
2556 "/include/libxml2" ))))
2557 (synopsis "Ruby bindings for GNOME Libxml2")
2558 (description "The Libxml-Ruby project provides Ruby language bindings for
2559the GNOME Libxml2 XML toolkit.")
2f3800e5 2560 (home-page "https://xml4r.github.com/libxml-ruby")
28c5d42d
PP
2561 (license license:expat)))
2562
b3222518
CB
2563(define-public ruby-lino
2564 (package
2565 (name "ruby-lino")
2566 (version "1.1.0")
2567 (source
2568 (origin
2569 (method url-fetch)
2570 (uri (rubygems-uri "lino" version))
2571 (sha256
2572 (base32
2573 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2574 (build-system ruby-build-system)
2575 (arguments
2576 '(#:tests? #f)) ; No included tests
2577 (propagated-inputs
2578 `(("ruby-hamster" ,ruby-hamster)
2579 ("ruby-open4" ,ruby-open4)))
2580 (synopsis "Build and execute commands in Ruby")
2581 (description
2582 "@code{Lino} provides an interface to run external commands. It provides
2583an interface to add options as well as managing the standard input, output and
2584error streams.")
2585 (home-page "https://github.com/tobyclemson/lino")
2586 (license license:expat)))
2587
8b9bde07
RW
2588(define-public ruby-xml-simple
2589 (package
2590 (name "ruby-xml-simple")
2591 (version "1.1.5")
2592 (source (origin
2593 (method url-fetch)
2594 (uri (rubygems-uri "xml-simple" version))
2595 (sha256
2596 (base32
2597 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2598 (build-system ruby-build-system)
2599 (arguments
2600 '(#:tests? #f)) ; no test suite
2601 (synopsis "Simple Ruby library for XML processing")
2602 (description "This library provides a simple API for XML processing in
2603Ruby.")
2604 (home-page "https://github.com/maik/xml-simple")
2605 (license license:ruby)))
2606
2cb3ab48
RW
2607(define-public ruby-thor
2608 (package
2609 (name "ruby-thor")
bb719d6a 2610 (version "1.0.1")
2cb3ab48 2611 (source (origin
bb719d6a
MB
2612 ;; Pull from git because the gem has no tests.
2613 (method git-fetch)
2614 (uri (git-reference
2615 (url "https://github.com/erikhuda/thor")
2616 (commit (string-append "v" version))))
2617 (file-name (git-file-name name version))
2cb3ab48
RW
2618 (sha256
2619 (base32
bb719d6a 2620 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2cb3ab48
RW
2621 (build-system ruby-build-system)
2622 (arguments
bb719d6a
MB
2623 '(#:phases (modify-phases %standard-phases
2624 (add-after 'unpack 'fix-readline-tests
2625 (lambda _
2626 ;; Ensure Readline is initialized before running the
2627 ;; test to avoid a type clash with the mock ::Readline.
2628 ;; See <https://github.com/erikhuda/thor/pull/717>.
2629 (substitute* "spec/line_editor/readline_spec.rb"
2630 (("unless defined\\? ::Readline" all)
2631 (string-append "Thor::LineEditor::Readline.available?\n"
2632 all)))
2633 #t))
2634 (add-after 'unpack 'remove-coveralls-dependency
2635 (lambda _
2636 ;; Do not hook the test suite into the online
2637 ;; coveralls service.
2638 (substitute* "Gemfile"
2639 ((".*coveralls.*") ""))
2640 (substitute* "spec/helper.rb"
2641 (("require \"coveralls\"") "")
2642 (("Coveralls::SimpleCov::Formatter") "")
2643 ;; Also drop the WebMock dependency which is only
2644 ;; present to allow a coveralls.io connection, and
2645 ;; would otherwise introduce a circular dependency.
2646 (("require \"webmock/rspec\"") "")
2647 (("WebMock\\.disable_net_connect.*") ""))
2648 #t))
2649 (add-after 'unpack 'disable-network-tests
2650 (lambda _
2651 ;; These tests attempt to look up example.com.
2652 (substitute* "spec/actions/file_manipulation_spec.rb"
2653 (("it \"accepts (https?) remote sources" _ proto)
2654 (string-append "xit \"accepts " proto " remote sources")))
2655 #t))
2656 (add-after 'unpack 'disable-quality-tests
2657 (lambda _
2658 ;; These tests attempt to check the git repository for
2659 ;; tabs vs spaces, double vs single quotes, etc, and
2660 ;; depend on the git checkout.
2661 (delete-file "spec/quality_spec.rb")
2662 #t))
2663 (add-before 'check 'make-files-writable
2664 (lambda _
2665 ;; The tests needs rw access to the test suite.
2666 (for-each make-file-writable (find-files "spec"))
2667 #t))
2668 (replace 'check
2669 (lambda _
2670 (invoke "rspec" "spec"))))))
2cb3ab48 2671 (native-inputs
bb719d6a
MB
2672 `(("ruby-rspec" ,ruby-rspec)
2673 ("ruby-simplecov" ,ruby-simplecov)))
2cb3ab48
RW
2674 (synopsis "Ruby toolkit for building command-line interfaces")
2675 (description "Thor is a toolkit for building powerful command-line
2676interfaces.")
2677 (home-page "http://whatisthor.com/")
2678 (license license:expat)))
2679
ec79018e
RW
2680(define-public ruby-lumberjack
2681 (package
2682 (name "ruby-lumberjack")
41700efa 2683 (version "1.0.13")
ec79018e
RW
2684 (source (origin
2685 (method url-fetch)
2686 (uri (rubygems-uri "lumberjack" version))
2687 (sha256
2688 (base32
41700efa 2689 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
ec79018e
RW
2690 (build-system ruby-build-system)
2691 (native-inputs
8be62d3f
BW
2692 `(("ruby-rspec" ,ruby-rspec)
2693 ("ruby-timecop" ,ruby-timecop)))
ec79018e
RW
2694 (synopsis "Logging utility library for Ruby")
2695 (description "Lumberjack is a simple logging utility that can be a drop in
2696replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2697for automatically rolling log files even with multiple processes writing the
2698same log file.")
7bf837fd 2699 (home-page "https://github.com/bdurand/lumberjack")
ec79018e
RW
2700 (license license:expat)))
2701
2a9ce5cb
CB
2702(define-public ruby-rbnacl
2703 (package
2704 (name "ruby-rbnacl")
2705 (version "6.0.1")
2706 (source
2707 (origin
2708 (method url-fetch)
2709 (uri (rubygems-uri "rbnacl" version))
2710 (sha256
2711 (base32
2712 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2713 (build-system ruby-build-system)
2714 (arguments
2715 `(#:phases
2716 (modify-phases %standard-phases
2717 (add-after 'unpack 'remove-unnecessary-dependencies
2718 (lambda _
2719 ;; Coveralls relates to a network service, and Rubocop to code
2720 ;; linting and both are unnecessary to run the tests
2721 (substitute* "Gemfile"
2722 ((".*rubocop.*") "\n")
2723 ((".*guard-rspec.*") "\n")
2724 ((".*coveralls.*") "\n"))
2725 (substitute* "spec/spec_helper.rb"
2726 (("require \"coveralls\"") "")
2727 (("Coveralls.wear!") ""))
2728 #t))
2729 (add-after 'unpack 'use-libsodium-from-store
2730 (lambda* (#:key inputs #:allow-other-keys)
2731 (substitute* '("lib/rbnacl/init.rb"
2732 "lib/rbnacl/sodium.rb")
2733 (("ffi_lib \\[.+\\]")
2734 (string-append "ffi_lib [\""
2735 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2736 "\"]")))
2737 #t))
2738 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2739 (replace 'check
2740 (lambda* (#:key tests? #:allow-other-keys)
2741 (when tests?
2742 (invoke "rspec"))
2743 #t)))))
2744 (propagated-inputs
2745 `(("ruby-ffi" ,ruby-ffi)))
2746 (inputs
2747 `(("libsodium" ,libsodium)))
2748 (native-inputs
2749 `(("bundler" ,bundler)
2750 ("ruby-rspec" ,ruby-rspec)))
2751 (synopsis "Ruby FFI binding to libsodium")
2752 (description
2753 "This package provides Ruby FFI bindings to the Networking and
2754Cryptography (NaCl) library, also known as libsodium. This provides a
2755high-level toolkit for building cryptographic systems and protocols.")
2756 (home-page "https://github.com/crypto-rb/rbnacl")
2757 (license license:expat)))
2758
70b4cf38
RW
2759(define-public ruby-nenv
2760 (package
2761 (name "ruby-nenv")
12313cd0 2762 (version "0.3.0")
70b4cf38
RW
2763 (source (origin
2764 (method url-fetch)
2765 (uri (rubygems-uri "nenv" version))
2766 (sha256
2767 (base32
12313cd0 2768 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
70b4cf38
RW
2769 (build-system ruby-build-system)
2770 (arguments
2771 `(#:tests? #f)) ; no tests included
2772 (native-inputs
2773 `(("ruby-rspec" ,ruby-rspec)
2774 ("bundler" ,bundler)))
2775 (synopsis "Ruby interface for modifying the environment")
2776 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2777and inspect the environment.")
2778 (home-page "https://github.com/e2/nenv")
2779 (license license:expat)))
2780
af59d4b4
MB
2781(define-public ruby-ptools
2782 (package
2783 (name "ruby-ptools")
2784 (version "1.3.5")
2785 (source (origin
2786 (method url-fetch)
2787 (uri (rubygems-uri "ptools" version))
2788 (sha256
2789 (base32
2790 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2791 (build-system ruby-build-system)
2792 (arguments
2793 '(#:phases (modify-phases %standard-phases
2794 (add-after 'unpack 'patch-/bin/ls
2795 (lambda _
2796 (substitute* "test/test_binary.rb"
2797 (("/bin/ls")
2798 (which "ls")))
2799 #t))
2800 (add-before 'install 'create-gem
2801 (lambda _
2802 ;; Do not attempt to sign the gem.
2803 (substitute* "Rakefile"
2804 (("spec\\.signing_key = .*")
2805 ""))
2806 (invoke "rake" "gem:create"))))))
2807 (synopsis "Extra methods for Ruby's @code{File} class")
2808 (description
2809 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2810class with many additional methods modelled after common POSIX tools, such as
2811@code{File.which} for finding executables, @code{File.tail} to print the last
2812lines of a file, @code{File.wc} to count words, and so on.")
2813 (home-page "https://github.com/djberg96/ptools")
2814 (license license:artistic2.0)))
2815
8d9e9f28
RW
2816(define-public ruby-permutation
2817 (package
2818 (name "ruby-permutation")
2819 (version "0.1.8")
2820 (source (origin
2821 (method url-fetch)
2822 (uri (rubygems-uri "permutation" version))
2823 (sha256
2824 (base32
2825 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2826 (build-system ruby-build-system)
2827 (arguments
2828 `(#:phases
2829 (modify-phases %standard-phases
2830 (add-after 'unpack 'fix-rakefile
2831 (lambda _
2832 (substitute* "Rakefile"
2833 (("require 'rake/gempackagetask'")
2834 "require 'rubygems/package_task'")
2835 (("include Config") ""))
2836 #t))
2837 (replace 'check
2838 (lambda _
9923d5a4 2839 (invoke "ruby" "-Ilib" "test/test.rb"))))))
8d9e9f28
RW
2840 (synopsis "Library to perform operations with sequence permutations")
2841 (description "This package provides a Ruby library to perform different
2842operations with permutations of sequences, such as strings and arrays.")
2f3800e5 2843 (home-page "https://flori.github.io/permutation")
8d9e9f28
RW
2844 (license license:gpl2))) ; GPL 2 only
2845
c5d14d42
RW
2846(define-public ruby-shellany
2847 (package
2848 (name "ruby-shellany")
2849 (version "0.0.1")
2850 (source (origin
2851 (method url-fetch)
2852 (uri (rubygems-uri "shellany" version))
2853 (sha256
2854 (base32
2855 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2856 (build-system ruby-build-system)
2857 (arguments
2858 `(#:test-target "default"
2859 #:phases
2860 (modify-phases %standard-phases
2861 (add-after 'unpack 'fix-version-test
2862 (lambda _
2863 (substitute* "spec/shellany_spec.rb"
2864 (("^RSpec") "require \"shellany\"\nRSpec"))
2865 #t)))))
2866 (native-inputs
2867 `(("ruby-rspec" ,ruby-rspec)
2868 ("ruby-nenv" ,ruby-nenv)
2869 ("bundler" ,bundler)))
2870 (synopsis "Capture command output")
2871 (description "Shellany is a Ruby library providing functions to capture
2872the output produced by running shell commands.")
2873 (home-page "https://rubygems.org/gems/shellany")
2874 (license license:expat)))
2875
d152162f
RW
2876(define-public ruby-notiffany
2877 (package
2878 (name "ruby-notiffany")
8c1e4a4f 2879 (version "0.1.3")
d152162f
RW
2880 (source (origin
2881 (method url-fetch)
2882 (uri (rubygems-uri "notiffany" version))
2883 (sha256
2884 (base32
8c1e4a4f 2885 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
d152162f
RW
2886 (build-system ruby-build-system)
2887 ;; Tests are not included in the gem.
2888 (arguments `(#:tests? #f))
2889 (propagated-inputs
2890 `(("ruby-shellany" ,ruby-shellany)
2891 ("ruby-nenv" ,ruby-nenv)))
2892 (native-inputs
2893 `(("bundler" ,bundler)))
01eb17de
VC
2894 (synopsis "Wrapper library for notification libraries")
2895 (description "Notiffany is a Ruby wrapper library for notification
d152162f
RW
2896libraries such as Libnotify.")
2897 (home-page "https://github.com/guard/notiffany")
2898 (license license:expat)))
2899
96bf7521
MB
2900(define-public ruby-forking-test-runner
2901 (package
2902 (name "ruby-forking-test-runner")
2903 (version "1.6.0")
2904 (home-page "https://github.com/grosser/forking_test_runner")
2905 (source (origin
2906 (method git-fetch)
2907 (uri (git-reference (url home-page)
2908 (commit (string-append "v" version))))
2909 (file-name (git-file-name name version))
2910 (sha256
2911 (base32
2912 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2913 (build-system ruby-build-system)
2914 (arguments
2915 '(#:test-target "spec"
2916 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2917 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2918 #:tests? #f
2919 #:phases (modify-phases %standard-phases
2920 (replace 'replace-git-ls-files
2921 (lambda _
2922 (substitute* "forking_test_runner.gemspec"
2923 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2924 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2925 #t))
2926 (add-before 'check 'remove-version-constraints
2927 (lambda _
2928 ;; Ignore hard coded version constraints for the tests.
2929 (delete-file "Gemfile.lock")
2930 #t))
2931 (add-before 'check 'set-HOME
2932 (lambda _
2933 ;; Many tests invoke Bundler, and fails when Bundler
2934 ;; warns that /homeless-shelter does not exist.
2935 (setenv "HOME" "/tmp")
2936 #t)))))
2937 (native-inputs
2938 `(("ruby-activerecord" ,ruby-activerecord)
2939 ("ruby-bump" ,ruby-bump)
2940 ("ruby-rspec" ,ruby-rspec)
2941 ("ruby-sqlite3" ,ruby-sqlite3)
2942 ("ruby-wwtd" ,ruby-wwtd)))
2943 (propagated-inputs
2944 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2945 (synopsis "Run every test in a fork")
2946 (description
2947 "This package is a wrapper around @code{parallel_tests} that runs every
2948test in a fork to avoid pollution and get clean output per test.")
2949 (license license:expat)))
2950
8528365b
RW
2951(define-public ruby-formatador
2952 (package
2953 (name "ruby-formatador")
2954 (version "0.2.5")
2955 (source (origin
2956 (method url-fetch)
2957 (uri (rubygems-uri "formatador" version))
2958 (sha256
2959 (base32
2960 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2961 (build-system ruby-build-system)
2962 ;; Circular dependency: Tests require ruby-shindo, which requires
2963 ;; ruby-formatador at runtime.
2964 (arguments `(#:tests? #f))
2965 (synopsis "Ruby library to format text on stdout")
2966 (description "Formatador is a Ruby library to format text printed to the
2967standard output stream.")
7bf837fd 2968 (home-page "https://github.com/geemus/formatador")
8528365b
RW
2969 (license license:expat)))
2970
5437c741
CB
2971(define-public ruby-fuubar
2972 (package
2973 (name "ruby-fuubar")
2974 (version "2.3.2")
2975 (source
2976 (origin
2977 ;; Fetch from the git repository, as the gem package doesn't include
2978 ;; the tests.
2979 (method git-fetch)
2980 (uri (git-reference
b0e7b699 2981 (url "https://github.com/thekompanee/fuubar")
5437c741
CB
2982 (commit (string-append "releases/v" version))))
2983 (file-name (git-file-name name version))
2984 (sha256
2985 (base32
2986 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2987 (build-system ruby-build-system)
2988 (arguments
2989 '(;; TODO: Some tests fail, unsure why.
2990 ;; 21 examples, 7 failures
2991 #:tests? #f
2992 #:phases
2993 (modify-phases %standard-phases
2994 (add-before 'build 'delete-certificate
2995 (lambda _
2996 ;; Remove 's.cert_chain' as we do not build with a private key
2997 (substitute* "fuubar.gemspec"
2998 ((".*cert_chain.*") "")
2999 ((".*signing_key.*") ""))
3000 #t))
3001 (replace 'check
3002 (lambda* (#:key tests? #:allow-other-keys)
3003 (when tests?
3004 (invoke "rspec"))
3005 #t)))))
3006 (native-inputs
3007 `(("bundler" ,bundler)))
3008 (propagated-inputs
3009 `(("ruby-rspec-core" ,ruby-rspec-core)
3010 ("ruby-progressbar" ,ruby-progressbar)))
3011 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
3012 (description
3013 "Fuubar is an RSpec formatter that uses a progress bar instead of a
3014string of letters and dots as feedback. It also stops on the first test
3015failure.")
3016 (home-page "https://github.com/thekompanee/fuubar")
3017 (license license:expat)))
3018
8ea991e3
CB
3019(define-public ruby-haml
3020 (package
3021 (name "ruby-haml")
3022 (version "5.0.4")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (rubygems-uri "haml" version))
3027 (sha256
3028 (base32
3029 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
3030 (build-system ruby-build-system)
3031 (arguments
3032 '(#:tests? #f)) ; No included tests
3033 (propagated-inputs
3034 `(("ruby-tilt" ,ruby-tilt)
3035 ("ruby-temple" ,ruby-temple)))
3036 (synopsis "Haml is a Ruby library to generate HTML documents")
3037 (description
3038 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
3039HTML or XML that is designed to express the structure of documents using
3040indentation rather than closing tags. It was originally envisioned as a
3041plugin for Ruby on Rails, but it can function as a stand-alone templating
3042engine.")
3043 (home-page "http://haml.info/")
3044 (license license:expat)))
3045
353b7eb8
CB
3046(define-public ruby-hamster
3047 (package
3048 (name "ruby-hamster")
3049 (version "3.0.0")
3050 (source
3051 (origin
3052 (method url-fetch)
3053 (uri (rubygems-uri "hamster" version))
3054 (sha256
3055 (base32
3056 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
3057 (build-system ruby-build-system)
3058 (arguments
3059 '(#:phases
3060 (modify-phases %standard-phases
3061 (add-after 'unpack 'remove-unnecessary-dependencies
3062 (lambda _
3063 ;; pry is a debugging tool, and is unnecessary when running the
3064 ;; tests
3065 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
3066 (("require 'pry'") ""))
3067 (substitute* "spec/spec_helper.rb"
3068 (("require \"pry\"") "")
3069 ;; CodeClimate is an online service, and is unnecessary for
3070 ;; running the tests
3071 (("require \"codeclimate-test-reporter\"") "")
3072 (("CodeClimate.*\n") ""))
3073 #t))
3074 ;; No Rakefile is included, so run rspec directly.
3075 (replace 'check
3076 (lambda* (#:key tests? #:allow-other-keys)
3077 (when tests?
3078 (invoke "rspec"))
3079 #t)))))
3080 (propagated-inputs
3081 `(("ruby-concurrent" ,ruby-concurrent)))
3082 (native-inputs
3083 `(("ruby-rspec" ,ruby-rspec)))
3084 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
3085 (description
3086 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
3087@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
3088immutable queue or stack).")
3089 (home-page "https://github.com/hamstergem/hamster")
3090 (license license:expat)))
3091
21781436
CB
3092(define-public ruby-hashdiff
3093 (package
3094 (name "ruby-hashdiff")
3095 (version "0.3.8")
3096 (source
3097 (origin
3098 (method url-fetch)
3099 (uri (rubygems-uri "hashdiff" version))
3100 (sha256
3101 (base32
3102 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
3103 (build-system ruby-build-system)
3104 (arguments
3105 '(#:phases
3106 (modify-phases %standard-phases
3107 ;; Run tests directly via rspec to avoid Rake issue:
3108 ;; NoMethodError: undefined method `last_comment'
3109 (replace 'check
3110 (lambda* (#:key tests? #:allow-other-keys)
3111 (when tests?
3112 (invoke "rspec"))
3113 #t)))))
3114 (native-inputs
3115 `(("bundler" ,bundler)
3116 ("ruby-rspec" ,ruby-rspec-2)))
3117 (synopsis "HashDiff computes the smallest difference between two hashes")
3118 (description
3119 "HashDiff is a Ruby library to compute the smallest difference between
3120two hashes.")
3121 (home-page "https://github.com/liufengyun/hashdiff")
3122 (license license:expat)))
3123
3cc8e029
MB
3124(define-public ruby-hydra
3125 ;; No releases yet.
3126 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
3127 (revision "0"))
3128 (package
3129 (name "ruby-hydra")
3130 (version (git-version "0.0" revision commit))
3131 (home-page "https://github.com/hyphenation/hydra")
3132 (source (origin
3133 (method git-fetch)
3134 (uri (git-reference (url home-page) (commit commit)))
3135 (file-name (git-file-name name version))
3136 (sha256
3137 (base32
3138 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
3139 (build-system ruby-build-system)
3140 (arguments
3141 '(#:phases (modify-phases %standard-phases
3142 (add-after 'unpack 'make-files-writable
3143 (lambda _
3144 (for-each make-file-writable (find-files "."))
3145 #t))
3146 (replace 'check
3147 (lambda _
3148 (invoke "rspec"))))))
3149 (native-inputs
3150 `(("ruby-rspec" ,ruby-rspec)))
3151 (propagated-inputs
3152 `(("ruby-byebug" ,ruby-byebug)))
3153 (synopsis "Ruby hyphenation patterns")
3154 (description
3155 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
3156 (license license:expat))))
3157
7ac4610f
RW
3158(define-public ruby-shindo
3159 (package
3160 (name "ruby-shindo")
3161 (version "0.3.8")
3162 (source (origin
3163 (method url-fetch)
3164 (uri (rubygems-uri "shindo" version))
3165 (sha256
3166 (base32
3167 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
3168 (build-system ruby-build-system)
3169 (arguments
3170 `(#:test-target "shindo_tests"
3171 #:phases
3172 (modify-phases %standard-phases
3173 (add-after 'unpack 'fix-tests
0b060e34
CB
3174 (lambda _
3175 (substitute* "tests/tests_helper.rb"
3176 (("-rubygems") ""))
3177 (substitute* "Rakefile"
3178 (("system \"shindo") "system \"./bin/shindo")
3179 ;; This test doesn't work, so we disable it.
3180 (("fail \"The build_error test should fail") "#")
3181 ((" -rubygems") ""))
3182 #t)))))
7ac4610f
RW
3183 (propagated-inputs
3184 `(("ruby-formatador" ,ruby-formatador)))
3185 (synopsis "Simple depth first Ruby testing")
3186 (description "Shindo is a simple depth first testing library for Ruby.")
3187 (home-page "https://github.com/geemus/shindo")
3188 (license license:expat)))
3189
f13636f2
RW
3190(define-public ruby-rubygems-tasks
3191 (package
3192 (name "ruby-rubygems-tasks")
f0f5f2d3 3193 (version "0.2.5")
f13636f2
RW
3194 (source (origin
3195 (method url-fetch)
3196 (uri (rubygems-uri "rubygems-tasks" version))
3197 (sha256
3198 (base32
f0f5f2d3 3199 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
f13636f2
RW
3200 (build-system ruby-build-system)
3201 ;; Tests need Internet access.
3202 (arguments `(#:tests? #f))
3203 (native-inputs
3204 `(("ruby-rspec" ,ruby-rspec)
3205 ("ruby-yard" ,ruby-yard)))
3206 (synopsis "Rake tasks for managing and releasing Ruby Gems")
3207 (description "Rubygems-task provides Rake tasks for managing and releasing
3208Ruby Gems.")
3209 (home-page "https://github.com/postmodern/rubygems-tasks")
3210 (license license:expat)))
3211
cb6bc5df
CB
3212(define-public ruby-rubyzip
3213 (package
3214 (name "ruby-rubyzip")
3215 (version "1.2.1")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (rubygems-uri "rubyzip" version))
3220 (sha256
3221 (base32
3222 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
3223 (build-system ruby-build-system)
3224 (arguments
3225 '(#:phases
3226 (modify-phases %standard-phases
3227 (add-before 'check 'patch-tests
3228 (lambda* (#:key inputs #:allow-other-keys)
3229 (substitute* "test/gentestfiles.rb"
3230 (("/usr/bin/zip")
3231 (string-append
3232 (assoc-ref inputs "zip") "/bin/zip")))
3233 (substitute* "test/input_stream_test.rb"
3234 (("/usr/bin/env ruby") (which "ruby")))
3235 #t)))))
3236 (native-inputs
3237 `(("bundler" ,bundler)
3238 ("ruby-simplecov" ,ruby-simplecov)
3239 ("zip" ,zip)
3240 ("unzip" ,unzip)))
3241 (synopsis "Ruby module is for reading and writing zip files")
3242 (description
3243 "The rubyzip module provides ways to read from and create zip files.")
702a1012 3244 (home-page "https://github.com/rubyzip/rubyzip")
cb6bc5df
CB
3245 (license license:bsd-2)))
3246
58b59742
RW
3247(define-public ruby-simplecov-html
3248 (package
3249 (name "ruby-simplecov-html")
53fd476f 3250 (version "0.10.2")
58b59742
RW
3251 (source (origin
3252 (method url-fetch)
3253 (uri (rubygems-uri "simplecov-html" version))
3254 (sha256
3255 (base32
53fd476f 3256 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
58b59742 3257 (build-system ruby-build-system)
8b749cf3 3258 (arguments `(#:tests? #f)) ; there are no tests
58b59742
RW
3259 (native-inputs
3260 `(("bundler" ,bundler)))
3261 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
3262 (description "This package provides the default HTML formatter for
3263the SimpleCov code coverage tool for Ruby version 1.9 and above.")
3264 (home-page "https://github.com/colszowka/simplecov-html")
3265 (license license:expat)))
3266
a84fa2ad
RW
3267(define-public ruby-simplecov
3268 (package
3269 (name "ruby-simplecov")
d432682b 3270 (version "0.17.1")
a84fa2ad
RW
3271 (source (origin
3272 (method url-fetch)
3273 (uri (rubygems-uri "simplecov" version))
3274 (sha256
3275 (base32
d432682b 3276 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
a84fa2ad
RW
3277 (build-system ruby-build-system)
3278 ;; Simplecov depends on rubocop for code style checking at build time.
3279 ;; Rubocop needs simplecov at build time.
3280 (arguments `(#:tests? #f))
3281 (propagated-inputs
3282 `(("ruby-json" ,ruby-json)
3283 ("ruby-docile" ,ruby-docile)
3284 ("ruby-simplecov-html" ,ruby-simplecov-html)))
3285 (native-inputs
3286 `(("bundler" ,bundler)))
3287 (synopsis "Code coverage framework for Ruby")
3288 (description "SimpleCov is a code coverage framework for Ruby with a
3289powerful configuration library and automatic merging of coverage across test
3290suites.")
7bf837fd 3291 (home-page "https://github.com/colszowka/simplecov")
a84fa2ad
RW
3292 (license license:expat)))
3293
98b87b82
DT
3294(define-public ruby-useragent
3295 (package
3296 (name "ruby-useragent")
959d908d 3297 (version "0.16.10")
98b87b82
DT
3298 (source (origin
3299 (method url-fetch)
e83c6d00 3300 (uri (rubygems-uri "useragent" version))
98b87b82
DT
3301 (sha256
3302 (base32
959d908d 3303 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
98b87b82
DT
3304 (build-system ruby-build-system)
3305 (arguments
e83c6d00 3306 '(#:tests? #f)) ; no test suite
98b87b82
DT
3307 (synopsis "HTTP user agent parser for Ruby")
3308 (description "UserAgent is a Ruby library that parses and compares HTTP
3309User Agents.")
3310 (home-page "https://github.com/gshutler/useragent")
3311 (license license:expat)))
96086cc5 3312
f7e9b2f3
CB
3313(define-public ruby-backports
3314 (package
3315 (name "ruby-backports")
3316 (version "3.11.4")
3317 (source
3318 (origin
3319 (method url-fetch)
3320 (uri (rubygems-uri "backports" version))
3321 (sha256
3322 (base32
3323 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
3324 (build-system ruby-build-system)
3325 (arguments
3326 '(;; TODO: This should be default, but there is one test failure
3327 #:test-target "all_spec"))
3328 (native-inputs
3329 `(("ruby-mspec" ,ruby-mspec)
3330 ("ruby-activesupport" ,ruby-activesupport)))
3331 (synopsis "Backports of the features in newer Ruby versions")
3332 (description
3333 "Backports enables more compatibility across Ruby versions by providing
3334backports of some features.")
3335 (home-page "https://github.com/marcandre/backports")
3336 (license license:expat)))
3337
96086cc5
DT
3338(define-public ruby-bacon
3339 (package
3340 (name "ruby-bacon")
e83c6d00 3341 (version "1.2.0")
96086cc5
DT
3342 (source (origin
3343 (method url-fetch)
e83c6d00 3344 (uri (rubygems-uri "bacon" version))
96086cc5
DT
3345 (sha256
3346 (base32
e83c6d00 3347 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
96086cc5 3348 (build-system ruby-build-system)
96086cc5
DT
3349 (synopsis "Small RSpec clone")
3350 (description "Bacon is a small RSpec clone providing all essential
3351features.")
3352 (home-page "https://github.com/chneukirchen/bacon")
3353 (license license:expat)))
de59d316 3354
a8d2bf3c
CB
3355(define-public ruby-bacon-bits
3356 (package
3357 (name "ruby-bacon-bits")
3358 (version "0.1.0")
3359 (source
3360 (origin
3361 (method url-fetch)
3362 (uri (rubygems-uri "bacon-bits" version))
3363 (sha256
3364 (base32
3365 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
3366 (build-system ruby-build-system)
3367 (arguments
3368 ;; No tests
3369 '(#:tests? #f))
3370 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
3371 (synopsis "Extensions to Bacon, for disabling tests, before and after
3372blocks and more")
3373 (description
3374 "This extends the bacon testing framework with useful extensions to
3375disable tests, have before and after blocks that run once and more.")
3376 (home-page "https://github.com/cldwalker/bacon-bits")
3377 (license license:expat)))
3378
65f65889
CB
3379(define-public ruby-bacon-colored-output
3380 (package
3381 (name "ruby-bacon-colored-output")
3382 (version "1.1.1")
3383 (source
3384 (origin
3385 (method url-fetch)
3386 (uri (rubygems-uri "bacon-colored_output" version))
3387 (sha256
3388 (base32
3389 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
3390 (build-system ruby-build-system)
3391 (arguments
3392 '(;; No included tests
3393 #:tests? #f))
3394 (propagated-inputs
3395 `(("ruby-bacon" ,ruby-bacon)))
3396 (synopsis "Colored output for Bacon test framework")
3397 (description
3398 "This package adds color through ANSI escape codes to Bacon test
3399output.")
3400 (home-page "https://github.com/whitequark/bacon-colored_output")
3401 (license license:expat)))
3402
e259bdf0
DT
3403(define-public ruby-connection-pool
3404 (package
3405 (name "ruby-connection-pool")
58021db4 3406 (version "2.2.2")
e259bdf0
DT
3407 (source (origin
3408 (method url-fetch)
e83c6d00 3409 (uri (rubygems-uri "connection_pool" version))
e259bdf0
DT
3410 (sha256
3411 (base32
58021db4 3412 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
e259bdf0
DT
3413 (build-system ruby-build-system)
3414 (native-inputs
3415 `(("bundler" ,bundler)))
3416 (synopsis "Generic connection pool for Ruby")
3417 (description "Connection_pool provides a generic connection pooling
3418interface for Ruby programs.")
3419 (home-page "https://github.com/mperham/connection_pool")
3420 (license license:expat)))
4c0aeb44 3421
4a98314d
MB
3422(define-public ruby-fast-gettext
3423 (package
3424 (name "ruby-fast-gettext")
c3beb7ce 3425 (version "2.0.3")
4a98314d
MB
3426 (home-page "https://github.com/grosser/fast_gettext")
3427 (source (origin
3428 (method git-fetch)
3429 (uri (git-reference (url home-page)
3430 (commit (string-append "v" version))))
3431 (file-name (git-file-name name version))
3432 (sha256
3433 (base32
c3beb7ce 3434 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
4a98314d
MB
3435 (build-system ruby-build-system)
3436 (arguments
3437 '(#:test-target "spec"
3438 #:phases (modify-phases %standard-phases
3439 (add-before 'check 'remove-version-constraints
3440 (lambda _
3441 (delete-file "Gemfile.lock")
3442 #t))
3443 (add-before 'check 'remove-activerecord-test
3444 (lambda _
3445 ;; FIXME: This test fails because ActiveRecord depends on
3446 ;; a different version of ruby-sqlite than the currently
3447 ;; available one.
3448 (delete-file
3449 "spec/fast_gettext/translation_repository/db_spec.rb")
3450 #t))
3451 (add-before 'check 'disable-i18n-test
3452 (lambda _
3453 ;; XXX: This test checks i18n intricasies with Rails 3 and
3454 ;; automatically disables itself for Rails 4.0, but does
3455 ;; not know about newer versions as it has not been updated
3456 ;; since 2014. Disable for later versions of Rails too.
3457 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
3458 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
3459 "ActiveRecord::VERSION::MINOR == 0"))
3460 "ActiveRecord::VERSION::MAJOR >= 4"))
3461 #t)))))
3462 (native-inputs
3463 `(;; For tests.
3464 ("ruby-activerecord" ,ruby-activerecord)
3465 ("ruby-activesupport" ,ruby-activesupport)
3466 ("ruby-bump" ,ruby-bump)
3467 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
3468 ("ruby-i18n" ,ruby-i18n)
3469 ("ruby-rubocop" ,ruby-rubocop)
3470 ("ruby-rspec" ,ruby-rspec)
3471 ("ruby-single-cov" ,ruby-single-cov)
3472 ("ruby-sqlite3" ,ruby-sqlite3)
3473 ("ruby-wwtd" ,ruby-wwtd)))
3474 (synopsis "Fast implementation of @code{GetText}")
3475 (description
3476 "This package provides an alternative implementation of the Ruby
3477@code{GetText} library that is approximately 12x faster yet thread safe.")
3478 ;; Some parts are covered by the Ruby license, see file headers.
3479 (license (list license:expat license:ruby))))
3480
4c0aeb44
DT
3481(define-public ruby-net-http-persistent
3482 (package
3483 (name "ruby-net-http-persistent")
185ea446 3484 (version "3.0.0")
4c0aeb44
DT
3485 (source (origin
3486 (method url-fetch)
e83c6d00 3487 (uri (rubygems-uri "net-http-persistent" version))
4c0aeb44
DT
3488 (sha256
3489 (base32
185ea446 3490 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
4c0aeb44 3491 (build-system ruby-build-system)
4c0aeb44
DT
3492 (native-inputs
3493 `(("ruby-connection-pool" ,ruby-connection-pool)
3494 ("ruby-hoe" ,ruby-hoe)))
3495 (synopsis "Persistent HTTP connection manager")
3496 (description "Net::HTTP::Persistent manages persistent HTTP connections
3497using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3498 (home-page "https://github.com/drbrain/net-http-persistent")
3499 (license license:expat)))
afbbdf77 3500
f88bacaf
RW
3501(define-public ruby-power-assert
3502 (package
3503 (name "ruby-power-assert")
6754323b 3504 (version "1.1.5")
f88bacaf
RW
3505 (source (origin
3506 (method url-fetch)
3507 (uri (rubygems-uri "power_assert" version))
3508 (sha256
3509 (base32
6754323b 3510 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
f88bacaf 3511 (build-system ruby-build-system)
6754323b
CB
3512 (arguments
3513 '(#:tests? #f)) ; No included tests
f88bacaf
RW
3514 (native-inputs
3515 `(("bundler" ,bundler)))
3516 (synopsis "Assert library with descriptive assertion messages")
3517 (description "Power-assert is an assertion library providing descriptive
3518assertion messages for tests.")
3519 (home-page "https://github.com/k-tsj/power_assert")
3520 (license (list license:bsd-2 license:ruby))))
3521
e42e3bfa
CB
3522(define-public ruby-powerpack
3523 (package
3524 (name "ruby-powerpack")
3525 (version "0.1.2")
3526 (source
3527 (origin
3528 (method url-fetch)
3529 (uri (rubygems-uri "powerpack" version))
3530 (sha256
3531 (base32
3532 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3533 (build-system ruby-build-system)
3534 (arguments
3535 '(#:test-target "spec"))
3536 (native-inputs
3537 `(("bundler" ,bundler)
3538 ("ruby-rspec" ,ruby-rspec)
3539 ("ruby-yard" ,ruby-yard)))
3540 (synopsis "Useful extensions to core Ruby classes")
3541 (description
3542 "This package provides a few useful extensions to core Ruby classes,
3543including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3544@code{String}.")
3545 (home-page "https://github.com/bbatsov/powerpack")
3546 (license license:expat)))
3547
347eb21e
RW
3548(define-public ruby-locale
3549 (package
3550 (name "ruby-locale")
3551 (version "2.1.2")
3552 (source (origin
3553 (method url-fetch)
3554 (uri (rubygems-uri "locale" version))
3555 (sha256
3556 (base32
3557 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3558 (build-system ruby-build-system)
3559 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3560 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3561 ;; dependency cycle we disable tests.
3562 (arguments `(#:tests? #f))
3563 (native-inputs
3564 `(("bundler" ,bundler)
3565 ("ruby-yard" ,ruby-yard)))
3566 (synopsis "Ruby library providing basic localization APIs")
3567 (description
3568 "Ruby-Locale is the pure ruby library which provides basic APIs for
3569localization.")
3570 (home-page "https://github.com/ruby-gettext/locale")
3571 (license (list license:lgpl3+ license:ruby))))
3572
09e2b0af
CB
3573(define-public ruby-temple
3574 (package
3575 (name "ruby-temple")
b1c79cab 3576 (version "0.8.2")
09e2b0af
CB
3577 (source
3578 (origin
3579 (method url-fetch)
3580 (uri (rubygems-uri "temple" version))
3581 (sha256
3582 (base32
b1c79cab 3583 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
09e2b0af
CB
3584 (build-system ruby-build-system)
3585 (native-inputs
3586 `(("ruby-tilt" ,ruby-tilt)
3587 ("ruby-bacon" ,ruby-bacon)
3588 ("ruby-erubis" ,ruby-erubis)))
3589 (synopsis "Template compilation framework in Ruby")
3590 (description
3591 "Temple is an abstraction and framework for compiling templates to pure
3592Ruby.")
3593 (home-page "https://github.com/judofyr/temple")
3594 (license license:expat)))
3595
e2333ea3
RW
3596(define-public ruby-text
3597 (package
3598 (name "ruby-text")
3599 (version "1.3.1")
3600 (source (origin
3601 (method url-fetch)
3602 (uri (rubygems-uri "text" version))
3603 (sha256
3604 (base32
3605 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3606 (build-system ruby-build-system)
3607 (synopsis "Collection of text algorithms for Ruby")
3608 (description
3609 "This package provides a collection of text algorithms: Levenshtein,
3610Soundex, Metaphone, Double Metaphone, Porter Stemming.")
7bf837fd 3611 (home-page "https://github.com/threedaymonk/text")
e2333ea3
RW
3612 (license license:expat)))
3613
c1f52261
RW
3614(define-public ruby-gettext
3615 (package
3616 (name "ruby-gettext")
3617 (version "3.1.7")
3618 (source (origin
3619 (method url-fetch)
3620 (uri (rubygems-uri "gettext" version))
3621 (sha256
3622 (base32
3623 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3624 (build-system ruby-build-system)
3625 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3626 ;; which needs ruby-gettext. To break the dependency cycle we disable
3627 ;; tests.
3628 (arguments `(#:tests? #f))
3629 (propagated-inputs
3630 `(("ruby-locale" ,ruby-locale)
3631 ("ruby-text" ,ruby-text)))
3632 (native-inputs
3633 `(("bundler" ,bundler)
3634 ("ruby-yard" ,ruby-yard)))
3635 (synopsis "GNU gettext-like program for Ruby")
3636 (description
3637 "Gettext is a GNU gettext-like program for Ruby. The catalog
3638file (po-file) used is the same as that used by GNU gettext, allowing you to
3639use GNU gettext tools for maintenance.")
2f3800e5 3640 (home-page "https://ruby-gettext.github.com/")
c1f52261
RW
3641 (license (list license:lgpl3+ license:ruby))))
3642
cc5aeb8c
RW
3643(define-public ruby-packnga
3644 (package
3645 (name "ruby-packnga")
1d60c436 3646 (version "1.0.4")
cc5aeb8c
RW
3647 (source (origin
3648 (method url-fetch)
3649 (uri (rubygems-uri "packnga" version))
3650 (sha256
3651 (base32
1d60c436 3652 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
cc5aeb8c
RW
3653 (build-system ruby-build-system)
3654 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3655 ;; To break the dependency cycle we disable tests.
3656 (arguments `(#:tests? #f))
3657 (propagated-inputs
3658 `(("ruby-gettext" ,ruby-gettext)
3659 ("ruby-yard" ,ruby-yard)))
3660 (native-inputs
3661 `(("bundler" ,bundler)))
3662 (synopsis "Utility library to package internationalized libraries")
3663 (description
3664 "Packnga is a library to translate to many languages using YARD.")
3665 (home-page "http://ranguba.org/packnga/")
3666 (license license:lgpl2.0+)))
3667
93dc8684
CB
3668(define-public ruby-test-construct
3669 (package
3670 (name "ruby-test-construct")
3671 (version "2.0.1")
3672 (source
3673 (origin
3674 (method url-fetch)
3675 (uri (rubygems-uri "test_construct" version))
3676 (sha256
3677 (base32
3678 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3679 (build-system ruby-build-system)
3680 (native-inputs
3681 `(("bundler" ,bundler)
3682 ("ruby-mocha" ,ruby-mocha)
3683 ("ruby-rspec" ,ruby-rspec)))
3684 (synopsis "Creates temporary files and directories for testing")
3685 (description
3686 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3687temporary files and directories during tests.")
3688 (home-page "https://github.com/bhb/test_construct")
3689 (license license:expat)))
3690
3383f5bd
RW
3691(define-public ruby-test-unit
3692 (package
3693 (name "ruby-test-unit")
d74d96e4 3694 (version "3.2.5")
3383f5bd
RW
3695 (source (origin
3696 (method url-fetch)
3697 (uri (rubygems-uri "test-unit" version))
3698 (sha256
3699 (base32
d74d96e4 3700 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3383f5bd
RW
3701 (build-system ruby-build-system)
3702 (propagated-inputs
3703 `(("ruby-power-assert" ,ruby-power-assert)))
3704 (native-inputs
3705 `(("bundler" ,bundler)
3706 ("ruby-packnga" ,ruby-packnga)
3707 ("ruby-yard" ,ruby-yard)))
3708 (synopsis "Unit testing framework for Ruby")
3709 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3710on xUnit principles. These were originally designed by Kent Beck, creator of
3711extreme programming software development methodology, for Smalltalk's SUnit.
3712It allows writing tests, checking results and automated testing in Ruby.")
2f3800e5 3713 (home-page "https://test-unit.github.io/")
3383f5bd
RW
3714 (license (list license:psfl license:ruby))))
3715
76b732fb
CB
3716(define-public ruby-markaby
3717 (package
3718 (name "ruby-markaby")
3719 (version "0.9.0")
3720 (source
3721 (origin
3722 (method url-fetch)
3723 (uri (rubygems-uri "markaby" version))
3724 (sha256
3725 (base32
3726 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3727 (build-system ruby-build-system)
3728 (arguments
3729 '(#:phases
3730 (modify-phases %standard-phases
3731 ;; Run rspec manually without using the Rakefile, as the versions of
3732 ;; Rake and RSpec 2 are incompatible:
3733 ;;
3734 ;; NoMethodError: undefined method `last_comment'
3735 (replace 'check
3736 (lambda* (#:key tests? #:allow-other-keys)
3737 (when tests?
3738 (invoke "rspec"))
3739 #t)))))
3740 (propagated-inputs
3741 `(("ruby-builder" ,ruby-builder)))
3742 (native-inputs
3743 `(("bundler" ,bundler)
3744 ("ruby-rspec" ,ruby-rspec-2)))
3745 (synopsis "Write HTML pages in pure Ruby")
3746 (description
3747 "Markaby allows writing HTML packages in pure Ruby. This is similar to
e54af322 3748the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
76b732fb 3749mixture of HTML and additional ERB syntax.")
41181b76 3750 (home-page "https://markaby.github.io/")
76b732fb
CB
3751 (license license:expat)))
3752
b9511aa9
CB
3753(define-public ruby-maruku
3754 (package
3755 (name "ruby-maruku")
3756 (version "0.7.3")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 (uri (rubygems-uri "maruku" version))
3761 (sha256
3762 (base32
3763 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3764 (build-system ruby-build-system)
3765 (arguments
3766 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3767 #:tests? #f
3768 #:phases
3769 (modify-phases %standard-phases
3770 (replace 'check
3771 (lambda* (#:key tests? #:allow-other-keys)
3772 (when tests?
3773 (invoke "rspec"))
3774 #t)))))
3775 (native-inputs
3776 `(("ruby-rspec" ,ruby-rspec)
3777 ("ruby-simplecov" ,ruby-simplecov)
3778 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3779 (synopsis "Markdown interpreter in Ruby")
3780 (description
3781 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3782HTML, and PDF through LaTeX.")
3783 (home-page "https://github.com/bhollis/maruku")
3784 (license license:expat)))
3785
25d6d49b
RW
3786(define-public ruby-metaclass
3787 (package
3788 (name "ruby-metaclass")
3789 (version "0.0.4")
3790 (source (origin
3791 (method url-fetch)
3792 (uri (rubygems-uri "metaclass" version))
3793 (sha256
3794 (base32
3795 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3796 (build-system ruby-build-system)
3797 (arguments
3798 `(#:phases
3799 (modify-phases %standard-phases
3800 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 3801 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3802 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3803 (substitute* "Rakefile"
3804 (("t\\.libs << \"test\"" line)
3805 (string-append line "; t.libs << \""
3cb3fa67 3806 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3807 "/gems/test-unit-"
3808 ,(package-version ruby-test-unit)
3809 "/lib\""))))
3810 #t)))))
25d6d49b
RW
3811 (native-inputs
3812 `(("bundler" ,bundler)
3813 ("ruby-test-unit" ,ruby-test-unit)))
3814 (synopsis "Ruby library adding metaclass method to all objects")
3815 (description
3816 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3817objects.")
7bf837fd 3818 (home-page "https://github.com/floehopper/metaclass")
25d6d49b
RW
3819 (license license:expat)))
3820
fae1c866
MB
3821(define-public ruby-mkmf-lite
3822 (package
3823 (name "ruby-mkmf-lite")
3824 (version "0.3.2")
3825 (source (origin
3826 (method url-fetch)
3827 (uri (rubygems-uri "mkmf-lite" version))
3828 (sha256
3829 (base32
3830 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3831 (build-system ruby-build-system)
3832 (propagated-inputs
3833 `(("ruby-ptools" ,ruby-ptools)))
3834 (synopsis "Lightweight alternative to @code{mkmf}")
3835 (description
3836 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3837for use as a library. It does not create packages, builds, or log files of
3838any kind. Instead, it provides mixin methods that you can use in FFI or tests
3839to check for the presence of header files, constants, and so on.")
3840 (home-page "https://github.com/djberg96/mkmf-lite")
3841 (license license:asl2.0)))
3842
1d1d20b0
CB
3843(define-public ruby-mspec
3844 (package
3845 (name "ruby-mspec")
3846 (version "1.9.1")
3847 (source
3848 (origin
3849 (method url-fetch)
3850 (uri (rubygems-uri "mspec" version))
3851 (sha256
3852 (base32
3853 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3854 (build-system ruby-build-system)
3855 (arguments
3856 '(;; TODO: 3 test failures
3857 ;; ./spec/mocks/mock_spec.rb:82
3858 ;; ./spec/utils/name_map_spec.rb:151
3859 ;; ./spec/utils/name_map_spec.rb:155
3860 #:tests? #f
3861 #:phases
3862 (modify-phases %standard-phases
3863 (add-after 'extract-gemspec 'change-dependency-constraints
3864 (lambda _
3865 (substitute* "mspec.gemspec"
3866 (("rake.*") "rake>)\n")
3867 (("rspec.*") "rspec>)\n"))
3868 #t))
3869 (replace 'check
3870 (lambda* (#:key tests? #:allow-other-keys)
3871 (when tests?
3872 (invoke "rspec" "spec"))
3873 #t)))))
3874 (native-inputs
3875 `(("bundler" ,bundler)
3876 ("ruby-rake" ,ruby-rake)
3877 ("ruby-rspec" ,ruby-rspec)))
3878 (synopsis "MSpec is a specialized framework for RubySpec")
3879 (description
3880 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3881for basic features. MSpec contains additional features that assist in writing
3882specs for Ruby implementations in ruby/spec.")
3883 (home-page "http://rubyspec.org")
3884 (license license:expat)))
3885
b8aecc31
CB
3886(define-public ruby-mysql2
3887 (package
3888 (name "ruby-mysql2")
3889 (version "0.5.2")
3890 (source
3891 (origin
3892 (method git-fetch)
3893 (uri (git-reference
b0e7b699 3894 (url "https://github.com/brianmario/mysql2")
b8aecc31
CB
3895 (commit version)))
3896 (file-name (git-file-name name version))
3897 (sha256
3898 (base32
3899 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3900 (build-system ruby-build-system)
3901 (arguments
3902 '(;; TODO: Tests require a running MySQL/MariaDB service
3903 #:tests? #f
3904 #:phases
3905 (modify-phases %standard-phases
3906 (replace 'replace-git-ls-files
3907 (lambda _
3908 (substitute* "mysql2.gemspec"
3909 (("git ls-files .*`") "find . -type f |sort`"))
3910 #t))
3911 (add-before 'install 'set-MAKEFLAGS
3912 (lambda* (#:key outputs #:allow-other-keys)
3913 (setenv "MAKEFLAGS"
3914 (string-append
3915 "V=1 "
3916 "prefix=" (assoc-ref outputs "out")))
3917 #t))
3918 ;; Move the 'check phase to after 'install, as then you can test
3919 ;; using the installed mysql2 gem in the store.
3920 (delete 'check)
3921 (add-after 'install 'check
3922 (lambda* (#:key outputs tests? #:allow-other-keys)
3923 (setenv "GEM_PATH"
3924 (string-append
3925 (getenv "GEM_PATH")
3926 ":"
3927 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3928 (when tests?
3929 (invoke "rspec"))
3930 #t)))))
3931 (inputs
997abda9 3932 `(("mariadb-dev" ,mariadb "dev")
b8aecc31
CB
3933 ("zlib" ,zlib)))
3934 (native-inputs
3935 `(("ruby-rspec" ,ruby-rspec)
3936 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3937 (synopsis "MySQL library for Ruby, binding to libmysql")
3938 (description
3939 "This package provides a simple, fast MySQL library for Ruby, binding to
3940libmysql.")
3941 (home-page "https://github.com/brianmario/mysql2")
3942 (license license:expat)))
3943
21f7b7bd
RW
3944(define-public ruby-blankslate
3945 (package
3946 (name "ruby-blankslate")
3947 (version "3.1.3")
3948 (source (origin
3949 (method url-fetch)
3950 (uri (rubygems-uri "blankslate" version))
3951 (sha256
3952 (base32
3953 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3954 (build-system ruby-build-system)
3955 (arguments
3956 `(#:phases
3957 (modify-phases %standard-phases
3958 (replace 'check
9923d5a4 3959 (lambda _ (invoke "rspec" "spec/"))))))
21f7b7bd
RW
3960 (native-inputs
3961 `(("bundler" ,bundler)
3962 ("ruby-rspec" ,ruby-rspec)))
3963 (synopsis "Abstract base class with no predefined methods")
3964 (description
3965 "BlankSlate provides an abstract base class with no predefined
3966methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3967as a base class when writing classes that depend upon
3968@code{method_missing} (e.g. dynamic proxies).")
7bf837fd 3969 (home-page "https://github.com/masover/blankslate")
21f7b7bd
RW
3970 (license license:expat)))
3971
afdb437c
CB
3972(define-public ruby-bond
3973 (package
3974 (name "ruby-bond")
3975 (version "0.5.1")
3976 (source
3977 (origin
3978 (method url-fetch)
3979 (uri (rubygems-uri "bond" version))
3980 (sha256
3981 (base32
3982 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3983 (build-system ruby-build-system)
18a29cb3
MC
3984 (arguments
3985 ;; The test suite fails (see:
3986 ;; https://github.com/cldwalker/bond/issues/46).
3987 `(#:tests? #f))
afdb437c
CB
3988 (native-inputs
3989 `(("ruby-bacon" ,ruby-bacon)
3990 ("ruby-bacon-bits" ,ruby-bacon-bits)
3991 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3992 (synopsis "Bond can provide custom autocompletion for arguments, methods
3993and more")
3994 (description
3995 "Bond can autocomplete argument(s) to methods, uniquely completing per
3996module, per method and per argument. Bond provides a configuration system and
3997a DSL for creating custom completions and completion rules. Bond can also
3998load completions that ship with gems. Bond is able to offer more than irb's
3999completion since it uses the full line of input when completing as opposed to
4000irb's last-word approach.")
4001 (home-page "http://tagaholic.me/bond/")
4002 (license license:expat)))
4003
f3d7bb93
CB
4004(define-public ruby-idn-ruby
4005 (package
4006 (name "ruby-idn-ruby")
4007 (version "0.1.0")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (rubygems-uri "idn-ruby" version))
4012 (sha256
4013 (base32
4014 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
4015 (build-system ruby-build-system)
4016 (arguments
4017 '(#:phases
4018 (modify-phases %standard-phases
4019 (delete 'check)
4020 (add-after 'install 'check
4021 (lambda* (#:key tests? outputs #:allow-other-keys)
4022 (when tests?
4023 (let* ((gem-file (cadr (find-files "." "\\.gem")))
4024 (name-and-version (basename gem-file ".gem")))
4025 (apply invoke
4026 "ruby" "--verbose"
4027 (string-append "-I"
4028 (assoc-ref outputs "out")
4029 "/lib/ruby/vendor_ruby/gems/"
4030 name-and-version
4031 "/lib")
4032 (find-files "./test" ".*\\.rb"))))
4033 #t)))))
4034 (inputs
4035 `(("libidn" ,libidn)))
4036 (synopsis "Ruby Bindings for the GNU LibIDN library")
4037 (description
4038 "Ruby Bindings for the GNU LibIDN library, an implementation of the
4039Stringprep, Punycode and IDNA specifications. These are used to encode and
4040decode internationalized domain + names according to the IDNA2003
4041specifications.
4042
4043Included are the most important parts of the Stringprep, Punycode and IDNA
4044APIs like performing Stringprep processings, encoding to and decoding from
4045Punycode strings and converting entire domain names to and from the ACE
4046encoded form.")
4047 (home-page "https://github.com/deepfryed/idn-ruby")
4048 (license license:asl2.0)))
4049
4016ba3f
RW
4050(define-public ruby-instantiator
4051 (package
4052 (name "ruby-instantiator")
688c9076 4053 (version "0.0.7")
4016ba3f
RW
4054 (source (origin
4055 (method url-fetch)
4056 (uri (rubygems-uri "instantiator" version))
4057 (sha256
4058 (base32
688c9076 4059 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
4016ba3f
RW
4060 (build-system ruby-build-system)
4061 (arguments
4062 `(#:phases
4063 (modify-phases %standard-phases
4064 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 4065 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 4066 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
4067 (substitute* "Rakefile"
4068 (("t\\.libs << \"test\"" line)
4069 (string-append line "; t.libs << \""
3cb3fa67 4070 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
4071 "/gems/test-unit-"
4072 ,(package-version ruby-test-unit)
4073 "/lib\""))))
4074 #t)))))
4016ba3f
RW
4075 (propagated-inputs
4076 `(("ruby-blankslate" ,ruby-blankslate)))
4077 (native-inputs
4078 `(("bundler" ,bundler)
4079 ("ruby-test-unit" ,ruby-test-unit)))
4080 (synopsis "Instantiate an arbitrary Ruby class")
4081 (description
4082 "Instantiator lets you instantiate an arbitrary Ruby class without
4083knowing anything about the constructor.")
4084 (home-page "https://github.com/floehopper/instantiator")
4085 (license license:expat)))
4086
97aee8d3
RW
4087(define-public ruby-introspection
4088 (package
4089 (name "ruby-introspection")
98ff58a5 4090 (version "0.0.4")
97aee8d3
RW
4091 (source (origin
4092 (method url-fetch)
4093 (uri (rubygems-uri "introspection" version))
4094 (sha256
4095 (base32
98ff58a5 4096 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
97aee8d3
RW
4097 (build-system ruby-build-system)
4098 (arguments
4099 `(#:phases
4100 (modify-phases %standard-phases
4101 (add-after 'unpack 'add-test-unit-to-search-path
4102 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 4103 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
4104 (substitute* "Rakefile"
4105 (("t\\.libs << \"test\"" line)
4106 (string-append line "; t.libs << \""
3cb3fa67 4107 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
4108 "/gems/test-unit-"
4109 ,(package-version ruby-test-unit)
4110 "/lib\""))))
97aee8d3
RW
4111 #t)))))
4112 (propagated-inputs
4113 `(("ruby-instantiator" ,ruby-instantiator)
4114 ("ruby-metaclass" ,ruby-metaclass)))
4115 (native-inputs
4116 `(("bundler" ,bundler)
4117 ("ruby-blankslate" ,ruby-blankslate)
4118 ("ruby-test-unit" ,ruby-test-unit)))
4119 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
4120 (description
4121 "Introspection provides tools to inspect the hierarchy of method
4122definitions on a Ruby object.")
4123 (home-page "https://github.com/floehopper/introspection")
4124 (license license:expat)))
4125
d93062fd
RW
4126(define-public ruby-redcarpet
4127 (package
4128 (name "ruby-redcarpet")
ba4084bb 4129 (version "3.5.0")
d93062fd
RW
4130 (source (origin
4131 (method url-fetch)
4132 (uri (rubygems-uri "redcarpet" version))
4133 (sha256
4134 (base32
ba4084bb 4135 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
d93062fd
RW
4136 (build-system ruby-build-system)
4137 (arguments
4138 `(#:phases
4139 (modify-phases %standard-phases
4140 ;; The gem archive does not include the conformance tests.
4141 (add-after 'unpack 'disable-conformance-tests
4142 (lambda _
4143 (substitute* "Rakefile"
4144 (("task :test => %w\\[test:unit test:conformance\\]")
4145 "task :test => %w[test:unit]"))
4146 #t)))))
4147 (native-inputs
4148 `(("bundler" ,bundler)
4149 ("ruby-test-unit" ,ruby-test-unit)
4150 ("ruby-rake-compiler" ,ruby-rake-compiler)))
4151 (synopsis "Extensible Markdown to (X)HTML converter")
4152 (description
4153 "Redcarpet is an extensible Ruby library for Markdown processing and
4154conversion to (X)HTML.")
7bf837fd 4155 (home-page "https://github.com/vmg/redcarpet")
d93062fd
RW
4156 (license license:expat)))
4157
09924294
CB
4158(define-public ruby-rerun
4159 (package
4160 (name "ruby-rerun")
4161 (version "0.13.0")
4162 (source
4163 (origin
4164 (method url-fetch)
4165 (uri (rubygems-uri "rerun" version))
4166 (sha256
4167 (base32
4168 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
4169 (build-system ruby-build-system)
4170 (arguments
4171 '(#:tests? #f)) ; No included tests
4172 (propagated-inputs
4173 `(("ruby-listen" ,ruby-listen)))
4174 (synopsis "Run a process, and restart when some monitored files change")
4175 (description
52beae7b 4176 "Rerun is a tool to launch programs, then monitor the file system, and
09924294
CB
4177restart the program when any of the monitored files change. It's written in
4178Ruby, but can be used for all programs.")
4179 (home-page "https://github.com/alexch/rerun/")
4180 (license license:expat)))
4181
8d85543b
MB
4182(define-public ruby-maxitest
4183 (package
4184 (name "ruby-maxitest")
4185 (version "3.6.0")
4186 (home-page "https://github.com/grosser/maxitest")
4187 (source (origin
4188 ;; Pull from git because the gem does not contain tests.
4189 (method git-fetch)
4190 (uri (git-reference
4191 (url home-page)
4192 (commit (string-append "v" version))))
4193 (file-name (git-file-name name version))
4194 (sha256
4195 (base32
4196 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
4197 (build-system ruby-build-system)
4198 (arguments
4199 '(#:test-target "default"
4200 #:phases (modify-phases %standard-phases
4201 (replace 'replace-git-ls-files
4202 (lambda _
4203 (substitute* "maxitest.gemspec"
4204 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
4205 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
4206 #t))
4207 (add-before 'check 'remove-version-constraints
4208 (lambda _
4209 ;; Don't use specific versions of dependencies, instead
4210 ;; take whatever is available in Guix.
4211 (delete-file "Gemfile.lock")
4212 #t))
4213 (add-before 'check 'add-mtest-on-PATH
4214 (lambda _
4215 ;; Tests use 'mtest' which is not automatically added on
4216 ;; PATH.
4217 (setenv "PATH" (string-append (getcwd) "/bin:"
4218 (getenv "PATH")))
4219 #t)))))
4220 (native-inputs
4221 `(("ps" ,procps)
4222 ("ruby-bump" ,ruby-bump)
4223 ("ruby-byebug" ,ruby-byebug)
4224 ("ruby-rspec" ,ruby-rspec)
4225 ("ruby-wwtd" ,ruby-wwtd)))
4226 (propagated-inputs
4227 `(("ruby-minitest" ,ruby-minitest)))
4228 (synopsis "Minitest with extra features")
4229 (description
4230 "Maxitest is a wrapper around Minitest with extra functionality such
4231as timeouts, an @command{mtest} executable that can run tests by line
4232number, support for interrupted tests, better backtraces, and more.")
4233 (license license:expat)))
4234
4f2a52ae
RW
4235(define-public ruby-mocha
4236 (package
4237 (name "ruby-mocha")
2fc3cc24 4238 (version "1.11.2")
4f2a52ae
RW
4239 (source (origin
4240 (method url-fetch)
4241 (uri (rubygems-uri "mocha" version))
4242 (sha256
4243 (base32
2fc3cc24 4244 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4f2a52ae
RW
4245 (build-system ruby-build-system)
4246 (arguments
4247 `(#:phases
4248 (modify-phases %standard-phases
2fc3cc24
MB
4249 (add-before 'check 'remove-rubocop-dependency
4250 (lambda _
4251 ;; Disable dependency on Rubocop, which is just a linter,
4252 ;; and would introduce a circular dependency.
4253 (substitute* "mocha.gemspec"
4254 ((".*rubocop.*")
4255 "true\n"))
4256 #t)))))
4f2a52ae 4257 (native-inputs
2fc3cc24 4258 `(("ruby-introspection" ,ruby-introspection)))
4f2a52ae
RW
4259 (synopsis "Mocking and stubbing library for Ruby")
4260 (description
4261 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
4262allows mocking and stubbing of methods on real (non-mock) classes.")
4263 (home-page "http://gofreerange.com/mocha/docs")
e3febab5
MB
4264 ;; Mocha can be used with either license at the users choice.
4265 (license (list license:expat license:ruby))))
4f2a52ae 4266
cf646acf
CB
4267(define-public ruby-mocha-on-bacon
4268 (package
4269 (name "ruby-mocha-on-bacon")
4270 (version "0.2.3")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (rubygems-uri "mocha-on-bacon" version))
4275 (sha256
4276 (base32
4277 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
4278 (build-system ruby-build-system)
4279 (arguments
4280 ;; rubygems.org release missing tests
4281 '(#:tests? #f))
4282 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
4283 (synopsis "Mocha adapter for Bacon")
4284 (description
4285 "This package provides a Mocha adapter for Bacon, allowing you to use the
4286Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
4287 (home-page
4288 "https://github.com/alloy/mocha-on-bacon")
4289 (license license:expat)))
4290
2c84ba7e
RW
4291(define-public ruby-net-ssh
4292 (package
4293 (name "ruby-net-ssh")
5803f872 4294 (version "4.2.0")
2c84ba7e
RW
4295 (source (origin
4296 (method url-fetch)
4297 (uri (rubygems-uri "net-ssh" version))
4298 (sha256
4299 (base32
5803f872 4300 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
2c84ba7e
RW
4301 (build-system ruby-build-system)
4302 (native-inputs
a7938625
MB
4303 `(("bundler" ,bundler)
4304 ("ruby-mocha" ,ruby-mocha)
2c84ba7e
RW
4305 ("ruby-test-unit" ,ruby-test-unit)))
4306 (synopsis "Ruby implementation of the SSH2 client protocol")
4307 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
4308client protocol. It allows you to write programs that invoke and interact
4309with processes on remote servers, via SSH2.")
4310 (home-page "https://github.com/net-ssh/net-ssh")
4311 (license license:expat)))
4312
d38755cb
DM
4313(define-public ruby-net-scp
4314 (package
4315 (name "ruby-net-scp")
4316 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
4317 (version "1.2.2.rc2")
4318 (source
4319 (origin
e405f996
TGR
4320 (method git-fetch)
4321 (uri (git-reference
b0e7b699 4322 (url "https://github.com/net-ssh/net-scp")
e405f996
TGR
4323 (commit (string-append "v" version))))
4324 (file-name (git-file-name name version))
d38755cb 4325 (sha256
e405f996 4326 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
d38755cb
DM
4327 (build-system ruby-build-system)
4328 (native-inputs
4329 `(("bundler" ,bundler)
4330 ("ruby-test-unit" ,ruby-test-unit)
4331 ("ruby-mocha" ,ruby-mocha)))
4332 (propagated-inputs
4333 `(("ruby-net-ssh" ,ruby-net-ssh)))
4334 (synopsis "Pure-Ruby SCP client library")
4335 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
4336client protocol.")
4337 (home-page "https://github.com/net-ssh/net-scp")
4338 (license license:expat)))
4339
2206e948
DT
4340(define-public ruby-minitest
4341 (package
4342 (name "ruby-minitest")
88a105c1 4343 (version "5.11.3")
2206e948 4344 (source (origin
e83c6d00
DT
4345 (method url-fetch)
4346 (uri (rubygems-uri "minitest" version))
2206e948
DT
4347 (sha256
4348 (base32
88a105c1 4349 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
2206e948 4350 (build-system ruby-build-system)
2206e948
DT
4351 (native-inputs
4352 `(("ruby-hoe" ,ruby-hoe)))
4353 (synopsis "Small test suite library for Ruby")
4354 (description "Minitest provides a complete suite of Ruby testing
4355facilities supporting TDD, BDD, mocking, and benchmarking.")
4356 (home-page "https://github.com/seattlerb/minitest")
4357 (license license:expat)))
4358
1db6e09f
RW
4359;; This is the last release of Minitest 4, which is used by some packages.
4360(define-public ruby-minitest-4
4361 (package (inherit ruby-minitest)
4362 (version "4.7.5")
4363 (source (origin
4364 (method url-fetch)
4365 (uri (rubygems-uri "minitest" version))
4366 (sha256
4367 (base32
4368 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
4369 (arguments
4370 `(#:phases
4371 (modify-phases %standard-phases
4372 (add-after 'unpack 'remove-unsupported-method
4373 (lambda _
4374 (substitute* "Rakefile"
4375 (("self\\.rubyforge_name = .*") ""))
9a7017eb
BW
4376 #t))
4377 (add-after 'build 'exclude-failing-tests
4378 (lambda _
4379 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
4380 ;; Fixnum.
4381 (delete-file "test/minitest/test_minitest_spec.rb")
4382 #t)))))))
1db6e09f 4383
450a3f7f
CB
4384(define-public ruby-minitest-around
4385 (package
4386 (name "ruby-minitest-around")
4387 (version "0.5.0")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (rubygems-uri "minitest-around" version))
4392 (sha256
4393 (base32
4394 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
4395 (build-system ruby-build-system)
4396 (arguments
4397 '(#:phases
4398 (modify-phases %standard-phases
4399 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
4400 (lambda _
4401 (substitute* "minitest-around.gemspec"
4402 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
4403 #t)))))
4404 (propagated-inputs
4405 `(("ruby-minitest" ,ruby-minitest)))
4406 (native-inputs
4407 `(("bundler" ,bundler)
4408 ("ruby-cucumber" ,ruby-cucumber)
4409 ("ruby-bump" ,ruby-bump)
4410 ("ruby-test-construct" ,ruby-test-construct)))
4411 (synopsis "Run code around tests in Minitest")
4412 (description
4413 "This library provides a way to run code around tests in Minitest,
4414written using either the unit test or spec style.")
4415 (home-page "https://github.com/splattael/minitest-around")
4416 (license license:expat)))
4417
35130835
DT
4418(define-public ruby-minitest-sprint
4419 (package
4420 (name "ruby-minitest-sprint")
4421 (version "1.1.0")
4422 (source (origin
e83c6d00
DT
4423 (method url-fetch)
4424 (uri (rubygems-uri "minitest-sprint" version))
35130835
DT
4425 (sha256
4426 (base32
e83c6d00 4427 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
35130835 4428 (build-system ruby-build-system)
35130835
DT
4429 (native-inputs
4430 `(("ruby-hoe" ,ruby-hoe)
4431 ("ruby-minitest" ,ruby-minitest)))
4432 (synopsis "Fast test suite runner for minitest")
4433 (description "Minitest-sprint is a test runner for minitest that makes it
4434easier to re-run individual failing tests.")
4435 (home-page "https://github.com/seattlerb/minitest-sprint")
4436 (license license:expat)))
4437
0808e361
DT
4438(define-public ruby-minitest-bacon
4439 (package
4440 (name "ruby-minitest-bacon")
6f9652b0 4441 (version "1.0.3")
0808e361 4442 (source (origin
e83c6d00
DT
4443 (method url-fetch)
4444 (uri (rubygems-uri "minitest-bacon" version))
0808e361
DT
4445 (sha256
4446 (base32
6f9652b0 4447 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
0808e361 4448 (build-system ruby-build-system)
0808e361
DT
4449 (native-inputs
4450 `(("ruby-hoe" ,ruby-hoe)))
4451 (inputs
4452 `(("ruby-minitest" ,ruby-minitest)))
4453 (synopsis "Bacon compatibility library for minitest")
4454 (description "Minitest-bacon extends minitest with bacon-like
4455functionality, making it easier to migrate test suites from bacon to minitest.")
4456 (home-page "https://github.com/seattlerb/minitest-bacon")
4457 (license license:expat)))
4458
39dc0eb5
BW
4459(define-public ruby-minitest-focus
4460 (package
4461 (name "ruby-minitest-focus")
4462 (version "1.1.2")
4463 (source
4464 (origin
4465 (method url-fetch)
4466 (uri (rubygems-uri "minitest-focus" version))
4467 (sha256
4468 (base32
4469 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4470 (build-system ruby-build-system)
4471 (propagated-inputs
4472 `(("ruby-minitest" ,ruby-minitest)))
4473 (native-inputs
4474 `(("ruby-hoe" ,ruby-hoe)))
4475 (synopsis "Allows a few specific tests to be focused on")
4476 (description
4477 "@code{minitest-focus} gives the ability focus on a few tests with ease
4478without having to use command-line arguments. It introduces a @code{focus}
4479class method for use in testing classes, specifying that the next defined test
4480is to be run.")
4481 (home-page "https://github.com/seattlerb/minitest-focus")
4482 (license license:expat)))
4483
99fc5cd5
BW
4484(define-public ruby-minitest-pretty-diff
4485 ;; Use git reference because gem is out of date and does not contain testing
4486 ;; script. There are no releases on GitHub.
4487 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4488 (package
4489 (name "ruby-minitest-pretty-diff")
4490 (version (string-append "0.1-1." (string-take commit 8)))
4491 (source (origin
4492 (method git-fetch)
4493 (uri (git-reference
b0e7b699 4494 (url "https://github.com/adammck/minitest-pretty_diff")
99fc5cd5
BW
4495 (commit commit)))
4496 (file-name (string-append name "-" version "-checkout"))
4497 (sha256
4498 (base32
4499 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4500 (build-system ruby-build-system)
4501 (arguments
4502 `(#:phases
4503 (modify-phases %standard-phases
4504 (replace 'check
4505 (lambda _
9923d5a4 4506 (invoke "script/test"))))))
99fc5cd5
BW
4507 (native-inputs
4508 `(("bundler" ,bundler)
4509 ("ruby-turn" ,ruby-turn)))
4510 (synopsis "Pretty-print hashes and arrays in MiniTest")
4511 (description
4512 "@code{minitest-pretty_diff} monkey-patches
4513@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4514diffing them. This makes it easier to spot differences between nested
4515structures when tests fail.")
4516 (home-page "https://github.com/adammck/minitest-pretty_diff")
4517 (license license:expat))))
4518
685d0d2f
BW
4519(define-public ruby-minitest-moar
4520 (package
4521 (name "ruby-minitest-moar")
4522 (version "0.0.4")
4523 (source
4524 (origin
4525 (method url-fetch)
4526 (uri (rubygems-uri "minitest-moar" version))
4527 (sha256
4528 (base32
4529 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4530 (build-system ruby-build-system)
4531 (arguments
4532 `(#:phases
4533 (modify-phases %standard-phases
4534 (add-before 'check 'clean-dependencies
4535 (lambda _
4536 ;; Remove all gems defined in the Gemfile because these are not
4537 ;; truly needed.
4538 (substitute* "Gemfile"
4539 (("gem .*") ""))
4540 ;; Remove byebug as not needed to run tests.
4541 (substitute* "test/test_helper.rb"
4542 (("require 'byebug'") ""))
4543 #t)))))
4544 (native-inputs
4545 `(("bundler" ,bundler)
4546 ("ruby-minitest" ,ruby-minitest)))
4547 (synopsis "Extra features and changes to MiniTest")
4548 (description "@code{MiniTest Moar} add some additional features and
4549changes some default behaviours in MiniTest. For instance, Moar replaces the
4550MiniTest @code{Object#stub} with a global @code{stub} method.")
4551 (home-page "https://github.com/dockyard/minitest-moar")
4552 (license license:expat)))
4553
e07ef1d6
BW
4554(define-public ruby-minitest-bonus-assertions
4555 (package
4556 (name "ruby-minitest-bonus-assertions")
c9e261b7 4557 (version "3.0")
e07ef1d6
BW
4558 (source
4559 (origin
4560 (method url-fetch)
4561 (uri (rubygems-uri "minitest-bonus-assertions" version))
4562 (sha256
4563 (base32
c9e261b7 4564 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
e07ef1d6
BW
4565 (build-system ruby-build-system)
4566 (arguments
4567 `(#:phases
4568 (modify-phases %standard-phases
4569 (add-before 'check 'clean-dependencies
4570 (lambda _
4571 ;; Remove unneeded require statement that would entail another
4572 ;; dependency.
4573 (substitute* "test/minitest_config.rb"
4574 (("require 'minitest/bisect'") ""))
4575 #t)))))
4576 (native-inputs
4577 `(("ruby-hoe" ,ruby-hoe)
4578 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4579 ("ruby-minitest-focus" ,ruby-minitest-focus)
4580 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4581 (synopsis "Bonus assertions for @code{Minitest}")
4582 (description
4583 "Minitest bonus assertions provides extra MiniTest assertions. For
4584instance, it provides @code{assert_true}, @code{assert_false} and
4585@code{assert_set_equal}.")
4586 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4587 (license license:expat)))
4588
e2c9a9cc
CB
4589(define-public ruby-minitest-reporters
4590 (package
4591 (name "ruby-minitest-reporters")
4592 (version "1.3.6")
4593 (source
4594 (origin
4595 (method url-fetch)
4596 (uri (rubygems-uri "minitest-reporters" version))
4597 (sha256
4598 (base32
4599 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4600 (build-system ruby-build-system)
4601 (arguments
4602 '(#:phases
4603 (modify-phases %standard-phases
4604 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4605 ;; including it as an input can lead to circular dependencies.
4606 (add-after 'unpack 'remove-rubocop-from-Rakefile
4607 (lambda _
4608 (substitute* "Rakefile"
4609 (("require 'rubocop/rake\\_task'") "")
4610 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4611 #t))
4612 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4613 (lambda _
4614 (substitute* "minitest-reporters.gemspec"
4615 ((".*%q<rubocop>.*") "\n"))
4616 #t)))))
4617 (propagated-inputs
4618 `(("ruby-ansi" ,ruby-ansi)
4619 ("ruby-builder" ,ruby-builder)
4620 ("ruby-minitest" ,ruby-minitest)
4621 ("ruby-progressbar" ,ruby-progressbar)))
4622 (native-inputs
4623 `(("bundler" ,bundler)
4624 ("ruby-maruku" ,ruby-maruku)))
4625 (synopsis "Enhanced reporting for Minitest tests")
4626 (description
4627 "@code{minitest/reporters} provides a custom Minitest runner to improve
4628how the test state is reported. A number of different reporters are
4629available, including a spec reporter, progress bar reporter, a HTML
4630reporter.")
4631 (home-page "https://github.com/kern/minitest-reporters")
4632 (license license:expat)))
4633
e582fa93
BW
4634(define-public ruby-minitest-rg
4635 (package
4636 (name "ruby-minitest-rg")
4637 (version "5.2.0")
4638 (source
4639 (origin
4640 (method url-fetch)
4641 (uri (rubygems-uri "minitest-rg" version))
4642 (sha256
4643 (base32
4644 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4645 (build-system ruby-build-system)
4646 (arguments
4647 ;; Some tests fail even outside Guix, so disable tests.
4648 ;; https://github.com/blowmage/minitest-rg/issues/12
4649 ;; https://github.com/blowmage/minitest-rg/pull/13
4650 `(#:tests? #f))
4651 (propagated-inputs
4652 `(("ruby-minitest" ,ruby-minitest)))
4653 (synopsis "Coloured output for Minitest")
4654 (description
4655 "@code{minitest-rg} changes the colour of the output from Minitest.")
8e486e80 4656 (home-page "https://blowmage.com/minitest-rg/")
e582fa93
BW
4657 (license license:expat)))
4658
ff9d33a9
CB
4659(define-public ruby-minitest-global-expectations
4660 (package
4661 (name "ruby-minitest-global-expectations")
4662 (version "1.0.1")
4663 (source
4664 (origin
4665 (method url-fetch)
4666 (uri (rubygems-uri "minitest-global_expectations"
4667 version))
4668 (sha256
4669 (base32
4670 "1pp3k2608spj4kvqy2y16hs18an917g6vwgvphrfhjviac83090x"))))
4671 (build-system ruby-build-system)
4672 (propagated-inputs
4673 `(("ruby-minitest" ,ruby-minitest)))
4674 (synopsis "Adjust minitest behaviour for calling expectation methods")
4675 (description
4676 "Minitest-global_expectations allows continued use of expectation methods
4677on all objects. Calling expectation methods on all objects was deprecated in
4678minitest 5.12, and is planned to be removed from minitest 6.")
4679 (home-page "https://github.com/jeremyevans/minitest-global_expectations")
4680 (license license:expat)))
4681
2a96dbe6
BW
4682(define-public ruby-minitest-hooks
4683 (package
4684 (name "ruby-minitest-hooks")
eaaf8b12 4685 (version "1.4.2")
2a96dbe6
BW
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (rubygems-uri "minitest-hooks" version))
4690 (sha256
4691 (base32
eaaf8b12 4692 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
2a96dbe6
BW
4693 (build-system ruby-build-system)
4694 (arguments
4695 '(#:test-target "spec"))
4696 (native-inputs
4697 `(("ruby-sequel" ,ruby-sequel)
4698 ("ruby-sqlite3" ,ruby-sqlite3)))
4699 (synopsis "Hooks for the minitest framework")
4700 (description
4701 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4702@code{around_all} hooks for Minitest. This allows, for instance, running each
4703suite of specs inside a database transaction, running each spec inside its own
4704savepoint inside that transaction. This can significantly speed up testing
4705for specs that share expensive database setup code.")
7bf837fd 4706 (home-page "https://github.com/jeremyevans/minitest-hooks")
2a96dbe6
BW
4707 (license license:expat)))
4708
afbbdf77
DT
4709(define-public ruby-daemons
4710 (package
4711 (name "ruby-daemons")
f03153db 4712 (version "1.2.5")
afbbdf77
DT
4713 (source (origin
4714 (method url-fetch)
e83c6d00 4715 (uri (rubygems-uri "daemons" version))
afbbdf77
DT
4716 (sha256
4717 (base32
f03153db 4718 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
afbbdf77
DT
4719 (build-system ruby-build-system)
4720 (arguments
4721 `(#:tests? #f)) ; no test suite
4722 (synopsis "Daemonize Ruby programs")
4723 (description "Daemons provides a way to wrap existing Ruby scripts to be
4724run as a daemon and to be controlled by simple start/stop/restart commands.")
4725 (home-page "https://github.com/thuehlinger/daemons")
4726 (license license:expat)))
b03eb6ac
CB
4727
4728(define-public ruby-data_uri
4729 (package
4730 (name "ruby-data_uri")
4731 (version "0.1.0")
4732 (source
4733 (origin
4734 (method url-fetch)
4735 (uri (rubygems-uri "data_uri" version))
4736 (sha256
4737 (base32
4738 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4739 (build-system ruby-build-system)
4740 (synopsis "URI class for parsing data URIs")
4741 (description
4742 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4743embedded inside a URI. The URI::Data class provides support for parsing these
4744URIs using the normal URI.parse method.")
4745 (home-page "https://github.com/dball/data_uri")
4746 (license license:expat)))
66e20863 4747
72c785f9
MB
4748(define-public ruby-deep-merge
4749 (package
4750 (name "ruby-deep-merge")
4751 (version "1.2.1")
4752 (home-page "https://github.com/danielsdeleo/deep_merge")
4753 ;; The Rubygem source does not contain the gemspec required for tests.
4754 (source (origin
4755 (method git-fetch)
4756 (uri (git-reference (url home-page) (commit version)))
4757 (file-name (git-file-name name version))
4758 (sha256
4759 (base32
4760 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4761 (build-system ruby-build-system)
4762 (native-inputs
4763 `(("ruby-minitest" ,ruby-minitest)))
4764 (synopsis "Recursively merge hashes")
4765 (description
4766 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4767you to merge elements inside a hash together recursively.")
4768 (license license:expat)))
4769
66e20863
DT
4770(define-public ruby-git
4771 (package
4772 (name "ruby-git")
ceaff59e 4773 (version "1.3.0")
66e20863
DT
4774 (source (origin
4775 (method url-fetch)
e83c6d00 4776 (uri (rubygems-uri "git" version))
66e20863
DT
4777 (sha256
4778 (base32
ceaff59e 4779 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
66e20863
DT
4780 (build-system ruby-build-system)
4781 (arguments
e83c6d00
DT
4782 `(#:tests? #f ; no tests
4783 #:phases (modify-phases %standard-phases
4784 (add-after 'install 'patch-git-binary
4785 (lambda* (#:key inputs outputs #:allow-other-keys)
66e20863
DT
4786 ;; Make the default git binary an absolute path to the
4787 ;; store.
e83c6d00
DT
4788 (let ((git (string-append (assoc-ref inputs "git")
4789 "/bin/git"))
3cb3fa67
CB
4790 (config (string-append
4791 (assoc-ref outputs "out")
4792 "/lib/ruby/vendor_ruby/gems/git-"
4793 ,version "/lib/git/config.rb")))
e83c6d00 4794 (substitute* (list config)
66e20863
DT
4795 (("'git'")
4796 (string-append "'" git "'")))
e83c6d00 4797 #t))))))
66e20863
DT
4798 (inputs
4799 `(("git" ,git)))
4800 (synopsis "Ruby wrappers for Git")
4801 (description "Ruby/Git is a Ruby library that can be used to create, read
4802and manipulate Git repositories by wrapping system calls to the git binary.")
4803 (home-page "https://github.com/schacon/ruby-git")
4804 (license license:expat)))
71d3e2c2 4805
95598153
MB
4806(define-public ruby-hocon
4807 (package
4808 (name "ruby-hocon")
fd13ec5f 4809 (version "1.3.1")
95598153
MB
4810 (home-page "https://github.com/puppetlabs/ruby-hocon")
4811 (source (origin
4812 (method git-fetch)
4813 (uri (git-reference (url home-page) (commit version)))
4814 (file-name (git-file-name name version))
4815 (sha256
4816 (base32
fd13ec5f 4817 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
95598153
MB
4818 (build-system ruby-build-system)
4819 (arguments
4820 '(#:phases (modify-phases %standard-phases
4821 (replace 'check
4822 (lambda* (#:key tests? #:allow-other-keys)
4823 (if tests?
4824 (invoke "rspec")
4825 (format #t "test suite not run~%"))
4826 #t)))))
4827 (native-inputs
4828 `(("bundler" ,bundler)
4829 ("ruby-rspec" ,ruby-rspec)))
4830 (synopsis "HOCON config library")
4831 (description
4832 "This package provides Ruby support for the @acronym{HOCON,
4833Human-Optimized Config Object Notation} configuration file format. It
4834supports parsing and modifying HOCON and JSON files, and rendering parsed
4835objects back to a @code{String}.")
4836 (license license:asl2.0)))
4837
71d3e2c2
DT
4838(define-public ruby-slop
4839 (package
4840 (name "ruby-slop")
d14e5eaa 4841 (version "4.5.0")
71d3e2c2
DT
4842 (source (origin
4843 (method url-fetch)
e83c6d00 4844 (uri (rubygems-uri "slop" version))
71d3e2c2
DT
4845 (sha256
4846 (base32
d14e5eaa 4847 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
71d3e2c2
DT
4848 (build-system ruby-build-system)
4849 (native-inputs
4850 `(("ruby-minitest" ,ruby-minitest)))
4851 (synopsis "Ruby command line option parser")
4852 (description "Slop provides a Ruby domain specific language for gathering
4853options and parsing command line flags.")
4854 (home-page "https://github.com/leejarvis/slop")
4855 (license license:expat)))
e778a549 4856
5337f8b9
DT
4857(define-public ruby-slop-3
4858 (package (inherit ruby-slop)
4859 (version "3.6.0")
4860 (source (origin
4861 (method url-fetch)
4862 (uri (rubygems-uri "slop" version))
4863 (sha256
4864 (base32
4865 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4866
ca914b5b
CB
4867(define-public ruby-multi-xml
4868 (package
4869 (name "ruby-multi-xml")
4870 (version "0.6.0")
4871 (source
4872 (origin
4873 (method url-fetch)
4874 (uri (rubygems-uri "multi_xml" version))
4875 (sha256
4876 (base32
4877 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4878 (build-system ruby-build-system)
4879 (arguments
4880 '(#:tests? #f)) ; No included tests
4881 (synopsis "Swappable XML backends for Ruby")
4882 (description
4883 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4884Nokogiri, Ox, or REXML.")
4885 (home-page "https://github.com/sferik/multi_xml")
4886 (license license:expat)))
4887
e778a549
DT
4888(define-public ruby-multipart-post
4889 (package
4890 (name "ruby-multipart-post")
4891 (version "2.0.0")
4892 (source (origin
4893 (method url-fetch)
e83c6d00 4894 (uri (rubygems-uri "multipart-post" version))
e778a549
DT
4895 (sha256
4896 (base32
e83c6d00 4897 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
e778a549
DT
4898 (build-system ruby-build-system)
4899 (native-inputs
4900 `(("bundler" ,bundler)))
4901 (synopsis "Multipart POST library for Ruby")
4902 (description "Multipart-Post Adds multipart POST capability to Ruby's
4903net/http library.")
4904 (home-page "https://github.com/nicksieger/multipart-post")
4905 (license license:expat)))
f8da3af0 4906
9a97e7ce
CB
4907(define-public ruby-multi-json
4908 (package
4909 (name "ruby-multi-json")
1b6f5475 4910 (version "1.13.1")
9a97e7ce
CB
4911 (source
4912 (origin
b872b47b 4913 (method git-fetch)
1b6f5475
BW
4914 ;; Tests are not distributed at rubygems.org so download from GitHub
4915 ;; instead.
b872b47b
EF
4916 (uri (git-reference
4917 (url "https://github.com/intridea/multi_json")
4918 (commit (string-append "v" version))))
4919 (file-name (git-file-name name version))
9a97e7ce
CB
4920 (sha256
4921 (base32
b872b47b 4922 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
9a97e7ce
CB
4923 (build-system ruby-build-system)
4924 (arguments
1b6f5475
BW
4925 `(#:phases
4926 (modify-phases %standard-phases
4927 (add-after 'unpack 'remove-signing-key-reference
4928 (lambda _
4929 (substitute* "multi_json.gemspec"
4930 ((".*spec.signing_key.*") ""))
4931 #t)))))
4932 (native-inputs
4933 `(("bundler" ,bundler)
4934 ("ruby-rspec" ,ruby-rspec)
4935 ("ruby-yard" ,ruby-yard)
4936 ("ruby-json-pure" ,ruby-json-pure)
4937 ("ruby-oj" ,ruby-oj)
4938 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
9a97e7ce
CB
4939 (synopsis "Common interface to multiple JSON libraries for Ruby")
4940 (description
4941 "This package provides a common interface to multiple JSON libraries,
4942including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4943NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
1b6f5475 4944 (home-page "https://github.com/intridea/multi_json")
9a97e7ce
CB
4945 (license license:expat)))
4946
5edef88b
BW
4947(define-public ruby-multi-test
4948 (package
4949 (name "ruby-multi-test")
4950 (version "0.1.2")
4951 (source
4952 (origin
4953 (method url-fetch)
4954 (uri (rubygems-uri "multi_test" version))
4955 (sha256
4956 (base32
4957 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4958 (build-system ruby-build-system)
4959 (arguments
4960 '(;; Tests require different sets of specific gem versions to be available,
4961 ;; and there is no gemfile that specifies the newest versions of
4962 ;; dependencies to be tested.
4963 #:tests? #f))
4964 (synopsis
4965 "Interface to testing libraries loaded into a running Ruby process")
4966 (description
4967 "@code{multi_test} provides a uniform interface onto whatever testing
4968libraries that have been loaded into a running Ruby process to help control
4969rogue test/unit/autorun requires.")
4970 (home-page "https://github.com/cucumber/multi_test")
9a97e7ce
CB
4971 (license license:expat)))
4972
f8da3af0
DT
4973(define-public ruby-arel
4974 (package
4975 (name "ruby-arel")
aecd533d 4976 (version "9.0.0")
f8da3af0
DT
4977 (source (origin
4978 (method url-fetch)
4979 (uri (rubygems-uri "arel" version))
4980 (sha256
4981 (base32
aecd533d 4982 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
f8da3af0
DT
4983 (build-system ruby-build-system)
4984 (arguments '(#:tests? #f)) ; no tests
4985 (home-page "https://github.com/rails/arel")
4986 (synopsis "SQL AST manager for Ruby")
6f23e2fb
TGR
4987 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4988Ruby. It simplifies the generation of complex SQL queries and adapts to
4989various relational database implementations.")
f8da3af0 4990 (license license:expat)))
616eaead 4991
554bf4f6
CB
4992(define-public ruby-marcel
4993 (package
4994 (name "ruby-marcel")
4995 (version "0.3.3")
4996 (source
4997 (origin
4998 (method url-fetch)
4999 (uri (rubygems-uri "marcel" version))
5000 (sha256
5001 (base32
5002 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
5003 (build-system ruby-build-system)
5004 (arguments
5005 '(;; No included tests
5006 #:tests? #f))
5007 (propagated-inputs
5008 `(("ruby-mimemagic" ,ruby-mimemagic)))
5009 (synopsis "MIME type detection using magic numbers, filenames and extensions")
5010 (description
5011 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
5012Extensions} type detection using magic numbers, filenames, and extensions")
5013 (home-page "https://github.com/basecamp/marcel")
5014 (license license:expat)))
5015
616eaead 5016(define-public ruby-minitar
bfaf8efd
BW
5017 ;; We package from the GitHub source to fix the security issue reported at
5018 ;; https://github.com/halostatue/minitar/issues/16.
5019 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
5020 (package
5021 (name "ruby-minitar")
5022 (version (string-append "0.5.4-1." (string-take commit 8)))
5023 (source
5024 (origin
5025 (method git-fetch)
5026 (uri (git-reference
b0e7b699 5027 (url "https://github.com/halostatue/minitar")
bfaf8efd
BW
5028 (commit commit)))
5029 (file-name (string-append name "-" version "-checkout"))
5030 (sha256
5031 (base32
5032 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
5033 (build-system ruby-build-system)
5034 (arguments
5035 '(#:tests? #f)) ; missing a gemspec
5036 (synopsis "Ruby library and utility for handling tar archives")
5037 (description
5038 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
616eaead 5039that provides the ability to deal with POSIX tar archive files.")
bfaf8efd
BW
5040 (home-page "http://www.github.com/atoulme/minitar")
5041 (license (list license:gpl2+ license:ruby)))))
bea1c0e2
DT
5042
5043(define-public ruby-mini-portile
5044 (package
5045 (name "ruby-mini-portile")
5046 (version "0.6.2")
5047 (source
5048 (origin
5049 (method url-fetch)
5050 (uri (rubygems-uri "mini_portile" version))
5051 (sha256
5052 (base32
5053 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
5054 (build-system ruby-build-system)
5055 (arguments
5056 '(#:tests? #f)) ; tests require network access
5057 (synopsis "Ports system for Ruby developers")
5058 (description "Mini-portile is a port/recipe system for Ruby developers.
5059It provides a standard way to compile against specific versions of libraries
5060to reproduce user environments.")
7bf837fd 5061 (home-page "https://github.com/flavorjones/mini_portile")
bea1c0e2 5062 (license license:expat)))
e920bfca 5063
d000fc92
BW
5064(define-public ruby-mini-portile-2
5065 (package (inherit ruby-mini-portile)
a88ac044 5066 (version "2.4.0")
d000fc92
BW
5067 (source (origin
5068 (method url-fetch)
5069 (uri (rubygems-uri "mini_portile2" version))
5070 (sha256
5071 (base32
a88ac044 5072 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
d000fc92 5073
e920bfca
DT
5074(define-public ruby-nokogiri
5075 (package
5076 (name "ruby-nokogiri")
62cc7344 5077 (version "1.10.9")
e920bfca
DT
5078 (source (origin
5079 (method url-fetch)
5080 (uri (rubygems-uri "nokogiri" version))
5081 (sha256
5082 (base32
62cc7344 5083 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
e920bfca
DT
5084 (build-system ruby-build-system)
5085 (arguments
5086 ;; Tests fail because Nokogiri can only test with an installed extension,
5087 ;; and also because many test framework dependencies are missing.
7b01f250 5088 `(#:tests? #f
e920bfca
DT
5089 #:gem-flags (list "--" "--use-system-libraries"
5090 (string-append "--with-xml2-include="
5091 (assoc-ref %build-inputs "libxml2")
5e7f1b0b
BW
5092 "/include/libxml2" ))
5093 #:phases
5094 (modify-phases %standard-phases
7b01f250
BW
5095 (add-before 'build 'patch-extconf
5096 ;; 'pkg-config' is not included in the GEM_PATH during
5097 ;; installation, so we add it directly to the load path.
5098 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 5099 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
7b01f250
BW
5100 (substitute* "ext/nokogiri/extconf.rb"
5101 (("gem 'pkg-config'.*")
5102 (string-append "$:.unshift '"
3cb3fa67 5103 pkg-config "/lib/ruby/vendor_ruby"
7b01f250
BW
5104 "/gems/pkg-config-"
5105 ,(package-version ruby-pkg-config)
5106 "/lib'\n"))))
5e7f1b0b 5107 #t)))))
e920bfca 5108 (native-inputs
7b01f250 5109 `(("ruby-hoe" ,ruby-hoe)))
e920bfca
DT
5110 (inputs
5111 `(("zlib" ,zlib)
5112 ("libxml2" ,libxml2)
5113 ("libxslt" ,libxslt)))
5114 (propagated-inputs
7b01f250
BW
5115 `(("ruby-mini-portile" ,ruby-mini-portile-2)
5116 ("ruby-pkg-config" ,ruby-pkg-config)))
e920bfca
DT
5117 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
5118 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
5119both CSS3 selector and XPath 1.0 support.")
5120 (home-page "http://www.nokogiri.org/")
5121 (license license:expat)))
30b0b725
DT
5122
5123(define-public ruby-method-source
5124 (package
5125 (name "ruby-method-source")
ec08f469 5126 (version "1.0.0")
30b0b725
DT
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (rubygems-uri "method_source" version))
5131 (sha256
5132 (base32
ec08f469 5133 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
30b0b725 5134 (build-system ruby-build-system)
c8355037 5135 (arguments
b52bf667
CB
5136 `(#:test-target "spec"
5137 #:phases
5138 (modify-phases %standard-phases
5139 (add-after 'unpack 'remove-git-ls-files
5140 (lambda* (#:key outputs #:allow-other-keys)
5141 (substitute* "Rakefile"
5142 (("git ls-files") "find . -type f"))
5143 #t)))))
30b0b725 5144 (native-inputs
b52bf667 5145 `(("ruby-rspec" ,ruby-rspec)))
30b0b725
DT
5146 (synopsis "Retrieve the source code for Ruby methods")
5147 (description "Method_source retrieves the source code for Ruby methods.
5148Additionally, it can extract source code from Proc and Lambda objects or just
5149extract comments.")
5150 (home-page "https://github.com/banister/method_source")
5151 (license license:expat)))
2e3fdea4
DT
5152
5153(define-public ruby-coderay
5154 (package
5155 (name "ruby-coderay")
5cf0997a 5156 (version "1.1.2")
2e3fdea4
DT
5157 (source
5158 (origin
5159 (method url-fetch)
5160 (uri (rubygems-uri "coderay" version))
5161 (sha256
5162 (base32
5cf0997a 5163 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
2e3fdea4
DT
5164 (build-system ruby-build-system)
5165 (arguments
5166 '(#:tests? #f)) ; missing test files
5167 (synopsis "Ruby syntax highlighting library")
5168 (description "Coderay is a Ruby library that provides syntax highlighting
5169for select languages.")
5170 (home-page "http://coderay.rubychan.de")
5171 (license license:expat)))
96e76083 5172
f9083965
MC
5173(define-public ruby-cuke-modeler
5174 (package
5175 (name "ruby-cuke-modeler")
5176 (version "3.1.0")
5177 (source
5178 (origin
5179 (method url-fetch)
5180 (uri (rubygems-uri "cuke_modeler" version))
5181 (sha256
5182 (base32
5183 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
5184 (build-system ruby-build-system)
5185 (arguments `(#:tests? #f)) ;no test suite in gem
5186 (propagated-inputs
5187 `(("ruby-gherkin" ,ruby-gherkin)))
5188 (synopsis "Gherkin test suite analysis tool")
5189 (description "CukeModeler facilitates modeling a test suite that is
5190written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
5191providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
5192the @code{cucumber-gherkin} generates when parsing features, as well as
5193providing models for feature files and directories in order to be able to have
5194a fully traversable model tree of a test suite's structure. These models can
5195then be analyzed or manipulated more easily than the underlying AST layer.")
5196 (home-page "https://github.com/enkessler/cuke_modeler")
5197 (license license:expat)))
5198
2156cc9c
MB
5199(define-public ruby-parallel-tests
5200 (package
5201 (name "ruby-parallel-tests")
8a01e2fa 5202 (version "3.0.0")
2156cc9c
MB
5203 (home-page "https://github.com/grosser/parallel_tests")
5204 (source (origin
5205 (method git-fetch)
5206 (uri (git-reference
5207 (url home-page)
5208 (commit (string-append "v" version))))
5209 (file-name (string-append name version))
5210 (sha256
5211 (base32
8a01e2fa 5212 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
2156cc9c
MB
5213 (build-system ruby-build-system)
5214 (arguments
5215 '(#:test-target "default"
5216 #:phases (modify-phases %standard-phases
5217 (add-after 'patch-source-shebangs 'patch-shell-invokations
5218 (lambda _
5219 (substitute* '("lib/parallel_tests/tasks.rb"
5220 "spec/parallel_tests/tasks_spec.rb")
5221 (("/bin/sh") (which "sh"))
5222 (("/bin/bash") (which "bash")))
5223 #t))
5224 (add-before 'check 'remove-version-constraints
5225 (lambda _
5226 ;; Remove hard coded version constraints, instead just
5227 ;; use whatever versions are available in Guix.
5228 (delete-file "Gemfile.lock")
5229 (substitute* "Gemfile"
5230 (("'minitest',.*")
5231 "'minitest'\n")
5232 (("'cucumber',.*")
5233 "'cucumber'\n"))
5234 #t))
5235 (add-before 'check 'disable-rails-test
5236 (lambda _
5237 ;; XXX: This test attempts to download and run the test
5238 ;; suites of multiple Rails versions(!) directly.
5239 (delete-file "spec/rails_spec.rb")
5240 #t))
5241 (add-before 'check 'set-HOME
5242 (lambda _
5243 ;; Some tests check the output of Bundler, and fail when
5244 ;; Bundler warns that /homeless-shelter does not exist.
5245 (setenv "HOME" "/tmp")
5246 #t)))))
5247 (native-inputs
5248 `(("ruby-bump" ,ruby-bump)
5249 ("ruby-cucumber" ,ruby-cucumber)
8a01e2fa 5250 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
2156cc9c
MB
5251 ("ruby-minitest" ,ruby-minitest)
5252 ("ruby-rake" ,ruby-rake)
5253 ("ruby-rspec" ,ruby-rspec)
5254 ("ruby-spinach" ,ruby-spinach)))
5255 (propagated-inputs
5256 `(("ruby-parallel" ,ruby-parallel)))
5257 (synopsis "Run tests in parallel")
5258 (description
5259 "This package can speed up @code{Test::Unit}, @code{RSpec},
5260@code{Cucumber}, and @code{Spinach} tests by running them concurrently
5261across multiple CPU cores.")
5262 (license license:expat)))
5263
54993457
CB
5264(define-public ruby-parser
5265 (package
5266 (name "ruby-parser")
6dfe26bf 5267 (version "2.7.2.0")
54993457
CB
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (rubygems-uri "parser" version))
5272 (sha256
5273 (base32
6dfe26bf 5274 "1f7gmm60yla325wlnd3qkxs59qm2y0aan8ljpg6k18rwzrrfil6z"))))
54993457 5275 (build-system ruby-build-system)
6dfe26bf
TOF
5276 (arguments
5277 '(#:tests? #f)) ; tests not included in gem
54993457
CB
5278 (native-inputs
5279 `(("bundler" ,bundler)
5280 ("ruby-cliver" ,ruby-cliver)
5281 ("ruby-simplecov" ,ruby-simplecov)
5282 ("ruby-racc" ,ruby-racc)))
5283 (inputs
5284 `(("ragel" ,ragel)))
5285 (propagated-inputs
5286 `(("ruby-ast" ,ruby-ast)))
5287 (synopsis "Ruby parser written in pure Ruby")
5288 (description
5289 "This package provides a Ruby parser written in pure Ruby.")
5290 (home-page "https://github.com/whitequark/parser")
5291 (license license:expat)))
5292
a8cdfd53
MC
5293(define-public ruby-sexp-processor
5294 (package
5295 (name "ruby-sexp-processor")
5296 (version "4.15.0")
5297 (source
5298 (origin
5299 (method url-fetch)
5300 (uri (rubygems-uri "sexp_processor" version))
5301 (sha256
5302 (base32
5303 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
5304 (build-system ruby-build-system)
5305 (native-inputs
5306 ;; TODO: Add ruby-minitest-proveit once available.
5307 `(("hoe" ,ruby-hoe)))
5308 (synopsis "ParseTree fork which includes generic S-exp processing tools")
5309 (description "The sexp_processor package is derived from ParseTree, but
5310contrary to ParseTree, it includes all the generic S-exp processing tools.
5311Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
5312@code{Environment}")
5313 (home-page "https://github.com/seattlerb/sexp_processor")
5314 (license license:expat)))
5315
24be6751
MC
5316(define-public ruby-ruby-parser
5317 (package
5318 (name "ruby-ruby-parser")
5319 (version "3.14.2")
5320 (source
5321 (origin
5322 (method url-fetch)
5323 (uri (rubygems-uri "ruby_parser" version))
5324 (sha256
5325 (base32
5326 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
5327 (build-system ruby-build-system)
5328 (native-inputs
5329 `(("hoe" ,ruby-hoe)
5330 ("racc" ,ruby-racc)
5331 ("unifdef" ,unifdef)))
5332 (propagated-inputs
5333 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
5334 (home-page "https://github.com/seattlerb/ruby_parser/")
5335 (synopsis "Ruby parser written in pure Ruby")
5336 (description "The ruby_parser (RP) package provides a Ruby parser written
5337in pure Ruby. It outputs S-expressions which can be manipulated and converted
5338back to Ruby via the @code{ruby2ruby} library.")
5339 (license license:expat)))
5340
16f423cb
CB
5341(define-public ruby-prawn-manual-builder
5342 (package
5343 (name "ruby-prawn-manual-builder")
1d4f0019 5344 (version "0.3.1")
16f423cb
CB
5345 (source
5346 (origin
5347 (method url-fetch)
5348 (uri (rubygems-uri "prawn-manual_builder" version))
5349 (sha256
1d4f0019 5350 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
16f423cb
CB
5351 (build-system ruby-build-system)
5352 (arguments
1d4f0019 5353 '(#:tests? #f ; no included tests
16f423cb
CB
5354 #:phases
5355 (modify-phases %standard-phases
5356 (add-after 'extract-gemspec 'patch-gemspec
5357 (lambda _
5358 (substitute* ".gemspec"
5359 ;; Loosen the requirement for pdf-inspector
5360 (("~> 1\\.0\\.7") ">= 0")))))))
5361 (propagated-inputs
5362 `(("ruby-coderay" ,ruby-coderay)))
5363 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
5364 (description
5365 "This package provides a tool for writing manuals for Prawn and Prawn
5366accessories")
5367 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
cc10ca33 5368 (license %prawn-project-licenses)))
16f423cb 5369
268643b9
CB
5370(define-public ruby-progress_bar
5371 (package
5372 (name "ruby-progress_bar")
5373 (version "1.1.0")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (rubygems-uri "progress_bar" version))
5378 (sha256
5379 (base32
5380 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
5381 (build-system ruby-build-system)
5382 (arguments
5383 '(#:test-target "spec"))
5384 (propagated-inputs
5385 `(("ruby-highline" ,ruby-highline)
5386 ("ruby-options" ,ruby-options)))
5387 (native-inputs
5388 `(("bundler" ,bundler)
5389 ("ruby-rspec" ,ruby-rspec)
5390 ("ruby-timecop" ,ruby-timecop)))
5391 (synopsis
5392 "Ruby library for displaying progress bars")
5393 (description
5394 "ProgressBar is a simple library for displaying progress bars. The
5395maximum value is configurable, and additional information can be displayed
5396like the percentage completion, estimated time remaining, elapsed time and
5397rate.")
5398 (home-page "https://github.com/paul/progress_bar")
5399 (license license:wtfpl2)))
5400
95f85d44
CB
5401(define-public ruby-dep
5402 (package
5403 (name "ruby-dep")
5404 (version "1.5.0")
5405 (source
5406 (origin
5407 (method url-fetch)
5408 (uri (rubygems-uri "ruby_dep" version))
5409 (sha256
5410 (base32
5411 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
5412 (build-system ruby-build-system)
5413 (arguments
5414 '(#:tests? #f)) ; No included tests
5415 (synopsis "Creates a version constraint of supported Rubies")
5416 (description
5417 "This package helps create a version constraint of supported Rubies,
5418suitable for a gemspec file.")
5419 (home-page "https://github.com/e2/ruby_dep")
5420 (license license:expat)))
5421
158a9253
CB
5422(define-public ruby-progressbar
5423 (package
5424 (name "ruby-progressbar")
2d2a2363 5425 (version "1.10.1")
158a9253
CB
5426 (source
5427 (origin
5428 (method url-fetch)
5429 (uri (rubygems-uri "ruby-progressbar" version))
5430 (sha256
2d2a2363 5431 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
158a9253
CB
5432 (build-system ruby-build-system)
5433 (arguments
5434 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
5435 #:tests? #f))
5436 (synopsis "Text progress bar library for Ruby")
5437 (description
5438 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
5439The output can be customized with a formatting system.")
5440 (home-page "https://github.com/jfelchner/ruby-progressbar")
5441 (license license:expat)))
5442
96e76083
DT
5443(define-public ruby-pry
5444 (package
5445 (name "ruby-pry")
a0d93c17 5446 (version "0.13.1")
96e76083
DT
5447 (source
5448 (origin
5449 (method url-fetch)
5450 (uri (rubygems-uri "pry" version))
5451 (sha256
5452 (base32
a0d93c17 5453 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
96e76083
DT
5454 (build-system ruby-build-system)
5455 (arguments
5456 '(#:tests? #f)) ; no tests
5457 (propagated-inputs
5458 `(("ruby-coderay" ,ruby-coderay)
1960d4fd 5459 ("ruby-method-source" ,ruby-method-source)))
96e76083
DT
5460 (synopsis "Ruby REPL")
5461 (description "Pry is an IRB alternative and runtime developer console for
5462Ruby. It features syntax highlighting, a plugin architecture, runtime
5463invocation, and source and documentation browsing.")
a0d93c17 5464 (home-page "https://cobaltbluemedia.com/pryrepl/")
96e76083 5465 (license license:expat)))
1415792a 5466
def7908a
MB
5467(define-public ruby-single-cov
5468 (package
5469 (name "ruby-single-cov")
5470 (version "1.3.2")
5471 (home-page "https://github.com/grosser/single_cov")
5472 (source (origin
5473 (method git-fetch)
5474 (uri (git-reference (url home-page)
5475 (commit (string-append "v" version))))
5476 (file-name (git-file-name name version))
5477 (sha256
5478 (base32
5479 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
5480 (build-system ruby-build-system)
5481 (arguments
5482 '(#:test-target "default"
5483 #:phases (modify-phases %standard-phases
5484 (replace 'replace-git-ls-files
5485 (lambda _
5486 (substitute* "single_cov.gemspec"
5487 (("`git ls-files lib/ bin/ MIT-LICENSE`")
5488 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
5489 #t))
5490 (add-before 'check 'remove-version-constraints
5491 (lambda _
5492 (delete-file "Gemfile.lock")
5493 #t))
5494 (add-before 'check 'make-files-writable
5495 (lambda _
5496 ;; Tests need to create local directories and open files
5497 ;; with write permissions.
5498 (for-each make-file-writable
5499 (find-files "specs" #:directories? #t))
5500 #t))
5501 (add-before 'check 'disable-failing-test
5502 (lambda _
5503 ;; XXX: This test copies assets from minitest, but can
5504 ;; not cope with the files being read-only. Just skip
5505 ;; it for now.
5506 (substitute* "specs/single_cov_spec.rb"
5507 (("it \"complains when coverage is bad\"")
5508 "xit \"complains when coverage is bad\""))
5509 #t)))))
5510 (native-inputs
5511 `(("ruby-bump" ,ruby-bump)
5512 ("ruby-minitest" ,ruby-minitest)
5513 ("ruby-rspec" ,ruby-rspec)
5514 ("ruby-simplecov" ,ruby-simplecov)))
5515 (synopsis "Code coverage reporting tool")
5516 (description
5517 "This package provides actionable code coverage reports for Ruby
5518projects. It has very little overhead and can be easily integrated with
5519development tools to catch coverage problems early.")
5520 (license license:expat)))
5521
051deeb7
RW
5522(define-public ruby-guard
5523 (package
5524 (name "ruby-guard")
5525 (version "2.13.0")
5526 (source (origin
3c6128f6 5527 (method git-fetch)
051deeb7
RW
5528 ;; The gem does not include a Rakefile, nor does it contain a
5529 ;; gemspec file, nor does it come with the tests. This is why
5530 ;; we fetch the tarball from Github.
3c6128f6
EF
5531 (uri (git-reference
5532 (url "https://github.com/guard/guard")
5533 (commit (string-append "v" version))))
5534 (file-name (git-file-name name version))
051deeb7
RW
5535 (sha256
5536 (base32
3c6128f6 5537 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
051deeb7
RW
5538 (build-system ruby-build-system)
5539 (arguments
5540 `(#:tests? #f ; tests require cucumber
5541 #:phases
5542 (modify-phases %standard-phases
5543 (add-after 'unpack 'remove-git-ls-files
5544 (lambda* (#:key outputs #:allow-other-keys)
5545 (substitute* "guard.gemspec"
5546 (("git ls-files -z") "find . -type f -print0"))
5547 #t))
5548 (replace 'build
5549 (lambda _
9923d5a4 5550 (invoke "gem" "build" "guard.gemspec"))))))
051deeb7
RW
5551 (propagated-inputs
5552 `(("ruby-formatador" ,ruby-formatador)
5553 ("ruby-listen" ,ruby-listen)
5554 ("ruby-lumberjack" ,ruby-lumberjack)
5555 ("ruby-nenv" ,ruby-nenv)
5556 ("ruby-notiffany" ,ruby-notiffany)
5557 ("ruby-pry" ,ruby-pry)
5558 ("ruby-shellany" ,ruby-shellany)
5559 ("ruby-thor" ,ruby-thor)))
5560 (native-inputs
5561 `(("bundler" ,bundler)
5562 ("ruby-rspec" ,ruby-rspec)))
5563 (synopsis "Tool to handle events on file system modifications")
5564 (description
5565 "Guard is a command line tool to easily handle events on file system
5566modifications. Guard automates various tasks by running custom rules whenever
5567file or directories are modified.")
3c6128f6 5568 (home-page "https://guardgem.org/")
051deeb7
RW
5569 (license license:expat)))
5570
c09bc60d
MB
5571(define-public ruby-spinach
5572 (package
5573 (name "ruby-spinach")
5574 (version "0.11.0")
702a1012 5575 (home-page "https://github.com/codegram/spinach")
c09bc60d
MB
5576 (source (origin
5577 (method url-fetch)
5578 (uri (rubygems-uri "spinach" version))
5579 (sha256
5580 (base32
5581 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5582 (build-system ruby-build-system)
5583 (arguments
5584 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5585 ;; which in turn depends on many other unpackaged gems. Enable once
5586 ;; capybara is available.
5587 '(#:tests? #f))
5588 (propagated-inputs
5589 `(("ruby-colorize" ,ruby-colorize)
5590 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5591 ("ruby-json" ,ruby-json)))
5592 (synopsis "Gherkin-based BDD framework")
5593 (description
5594 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5595framework that leverages the expressive @code{Gherkin} language to help you
5596define executable specifications of your code.")
5597 (license license:expat)))
5598
bcbb3cc9
CB
5599(define-public ruby-tilt
5600 (package
5601 (name "ruby-tilt")
c3f15f54 5602 (version "2.0.10")
bcbb3cc9
CB
5603 (source
5604 (origin
c3f15f54
MC
5605 (method git-fetch) ;the distributed gem lacks tests
5606 (uri (git-reference
b0e7b699 5607 (url "https://github.com/rtomayko/tilt")
c3f15f54
MC
5608 (commit (string-append "v" version))))
5609 (file-name (git-file-name name version))
bcbb3cc9
CB
5610 (sha256
5611 (base32
c3f15f54 5612 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
bcbb3cc9
CB
5613 (build-system ruby-build-system)
5614 (arguments
5615 '(#:phases
5616 (modify-phases %standard-phases
5617 (add-after 'unpack 'remove-some-dependencies
5618 (lambda _
5619 (substitute* "Gemfile"
5620 ;; TODO ronn is used for generating the manual
5621 (("gem 'ronn'.*") "\n")
5622 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5623 ;; pass it in as a native-input
5624 (("gem 'haml'.*") "\n")
5625 ;; TODO Not all of these gems are packaged for Guix yet:
5626 ;; less, coffee-script, livescript, babel-transpiler,
5627 ;; typescript-node
5628 (("if can_execjs") "if false")
5629 ;; Disable the secondary group to reduce the number of
5630 ;; dependencies. None of the normal approaches work, so patch
5631 ;; the Gemfile instead.
5632 (("group :secondary") "[].each"))
5633 #t)))))
cfa4a318
MC
5634 (propagated-inputs
5635 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5636 ("ruby-sassc" ,ruby-sassc)))
bcbb3cc9
CB
5637 (native-inputs
5638 `(("bundler" ,bundler)
5639 ("ruby-yard" ,ruby-yard)
5640 ("ruby-builder" ,ruby-builder)
5641 ("ruby-erubis" ,ruby-erubis)
cfa4a318 5642 ("ruby-markaby" ,ruby-markaby)))
bcbb3cc9
CB
5643 (synopsis "Generic interface to multiple Ruby template engines")
5644 (description
5645 "Tilt is a thin interface over a number of different Ruby template
5646engines in an attempt to make their usage as generic as possible.")
5647 (home-page "https://github.com/rtomayko/tilt/")
5648 (license license:expat)))
5649
1415792a
DT
5650(define-public ruby-thread-safe
5651 (package
5652 (name "ruby-thread-safe")
313dd5dd 5653 (version "0.3.6")
1415792a
DT
5654 (source
5655 (origin
5656 (method url-fetch)
5657 (uri (rubygems-uri "thread_safe" version))
5658 (sha256
5659 (base32
313dd5dd 5660 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
1415792a
DT
5661 (build-system ruby-build-system)
5662 (arguments
5663 '(#:tests? #f)) ; needs simplecov, among others
5664 (synopsis "Thread-safe utilities for Ruby")
5665 (description "The thread_safe library provides thread-safe collections and
5666utilities for Ruby.")
5667 (home-page "https://github.com/ruby-concurrency/thread_safe")
5668 (license license:asl2.0)))
08a1b701
DT
5669
5670(define-public ruby-tzinfo
5671 (package
5672 (name "ruby-tzinfo")
4237af85 5673 (version "1.2.4")
08a1b701
DT
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (rubygems-uri "tzinfo" version))
5678 (sha256
5679 (base32
4237af85 5680 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
08a1b701 5681 (build-system ruby-build-system)
740fea08
CB
5682 (arguments
5683 '(#:phases
5684 (modify-phases %standard-phases
5685 (add-after 'unpack 'skip-safe-tests
5686 (lambda _
5687 (substitute* "test/test_utils.rb"
5688 (("def safe_test\\(options = \\{\\}\\)")
5689 "def safe_test(options = {})
5690 skip('The Guix build environment has an unsafe load path')"))
5691 #t)))))
08a1b701
DT
5692 (propagated-inputs
5693 `(("ruby-thread-safe" ,ruby-thread-safe)))
5694 (synopsis "Time zone library for Ruby")
5695 (description "TZInfo is a Ruby library that provides daylight savings
5696aware transformations between times in different time zones.")
2f3800e5 5697 (home-page "https://tzinfo.github.io")
1e12924a
BW
5698 (license license:expat)))
5699
5700(define-public ruby-tzinfo-data
5701 (package
5702 (name "ruby-tzinfo-data")
92513191 5703 (version "1.2017.3")
1e12924a
BW
5704 (source
5705 (origin
bb1e7ed0 5706 (method git-fetch)
1e12924a
BW
5707 ;; Download from GitHub because the rubygems version does not contain
5708 ;; Rakefile or tests.
bb1e7ed0
EF
5709 (uri (git-reference
5710 (url "https://github.com/tzinfo/tzinfo-data")
5711 (commit (string-append "v" version))))
5712 (file-name (git-file-name name version))
1e12924a
BW
5713 (sha256
5714 (base32
bb1e7ed0 5715 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
1e12924a
BW
5716 ;; Remove the known test failure.
5717 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5718 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5719 (patches (search-patches
5720 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5721 (build-system ruby-build-system)
5722 (propagated-inputs
5723 `(("ruby-tzinfo" ,ruby-tzinfo)))
5724 (synopsis "Data from the IANA Time Zone database")
5725 (description
5726 "This library provides @code{TZInfo::Data}, which contains data from the
5727IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
2f3800e5 5728 (home-page "https://tzinfo.github.io")
08a1b701 5729 (license license:expat)))
c99e2247 5730
48e6851f
RW
5731(define-public ruby-rb-inotify
5732 (package
5733 (name "ruby-rb-inotify")
32bbfea8 5734 (version "0.9.10")
48e6851f
RW
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (rubygems-uri "rb-inotify" version))
5739 (sha256
5740 (base32
32bbfea8 5741 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
48e6851f
RW
5742 (build-system ruby-build-system)
5743 (arguments
5744 '(#:tests? #f ; there are no tests
5745 #:phases
5746 (modify-phases %standard-phases
5747 ;; Building the gemspec with rake is not working here since it is
5748 ;; generated with Jeweler. It is also unnecessary because the
5749 ;; existing gemspec does not use any development tools to generate a
5750 ;; list of files.
5751 (replace 'build
5752 (lambda _
9923d5a4 5753 (invoke "gem" "build" "rb-inotify.gemspec"))))))
48e6851f
RW
5754 (propagated-inputs
5755 `(("ruby-ffi" ,ruby-ffi)))
5756 (native-inputs
5757 `(("ruby-yard" ,ruby-yard)))
5758 (synopsis "Ruby wrapper for Linux's inotify")
5759 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5760kernel subsystem for monitoring changes to files and directories.")
5761 (home-page "https://github.com/nex3/rb-inotify")
5762 (license license:expat)))
5763
a75bdfce
RW
5764(define-public ruby-pry-editline
5765 (package
5766 (name "ruby-pry-editline")
5767 (version "1.1.2")
5768 (source (origin
5769 (method url-fetch)
5770 (uri (rubygems-uri "pry-editline" version))
5771 (sha256
5772 (base32
5773 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5774 (build-system ruby-build-system)
5775 (arguments `(#:tests? #f)) ; no tests included
5776 (native-inputs
5777 `(("bundler" ,bundler)))
5778 (synopsis "Open the current REPL line in an editor")
5779 (description
5780 "This gem provides a plugin for the Ruby REPL to enable opening the
5781current line in an external editor.")
5782 (home-page "https://github.com/tpope/pry-editline")
5783 (license license:expat)))
5784
d3b20a02
RW
5785(define-public ruby-sdoc
5786 (package
5787 (name "ruby-sdoc")
6700dc33 5788 (version "1.1.0")
d3b20a02
RW
5789 (source (origin
5790 (method url-fetch)
5791 (uri (rubygems-uri "sdoc" version))
5792 (sha256
5793 (base32
6700dc33 5794 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
d3b20a02
RW
5795 (build-system ruby-build-system)
5796 (arguments
5797 `(#:phases
5798 (modify-phases %standard-phases
fc29d5e6 5799 (add-before 'check 'set-rubylib-and-patch-gemfile
d3b20a02 5800 (lambda _
fdf3a68d 5801 (setenv "RUBYLIB" "lib")
fc29d5e6
BW
5802 (substitute* "sdoc.gemspec"
5803 (("s.add_runtime_dependency.*") "\n")
5804 (("s.add_dependency.*") "\n"))
5805 (substitute* "Gemfile"
5806 (("gem \"rake\".*")
5807 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
d3b20a02
RW
5808 #t)))))
5809 (propagated-inputs
5810 `(("ruby-json" ,ruby-json)))
5811 (native-inputs
5812 `(("bundler" ,bundler)
fdf3a68d
BW
5813 ("ruby-minitest" ,ruby-minitest)
5814 ("ruby-hoe" ,ruby-hoe)))
d3b20a02
RW
5815 (synopsis "Generate searchable RDoc documentation")
5816 (description
5817 "SDoc is an RDoc documentation generator to build searchable HTML
5818documentation for Ruby code.")
7bf837fd 5819 (home-page "https://github.com/voloko/sdoc")
d3b20a02
RW
5820 (license license:expat)))
5821
70b002aa
RW
5822(define-public ruby-tins
5823 (package
5824 (name "ruby-tins")
fbefd6ff 5825 (version "1.15.0")
70b002aa
RW
5826 (source (origin
5827 (method url-fetch)
5828 (uri (rubygems-uri "tins" version))
5829 (sha256
5830 (base32
fbefd6ff 5831 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
70b002aa
RW
5832 (build-system ruby-build-system)
5833 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5834 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5835 ;; the gemspec.
5836 (arguments
5837 `(#:tests? #f ; there are no tests
5838 #:phases
5839 (modify-phases %standard-phases
5840 (replace 'build
5841 (lambda _
5842 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5843 ;; causes an error.
5844 (substitute* "tins.gemspec"
5845 (("\"lib/spruz\", ") ""))
9923d5a4 5846 (invoke "gem" "build" "tins.gemspec"))))))
70b002aa
RW
5847 (synopsis "Assorted tools for Ruby")
5848 (description "Tins is a Ruby library providing assorted tools.")
5849 (home-page "https://github.com/flori/tins")
5850 (license license:expat)))
5851
bc8277e4
RW
5852(define-public ruby-gem-hadar
5853 (package
5854 (name "ruby-gem-hadar")
e4fb673a 5855 (version "1.11.0")
bc8277e4
RW
5856 (source (origin
5857 (method url-fetch)
5858 (uri (rubygems-uri "gem_hadar" version))
5859 (sha256
5860 (base32
e4fb673a 5861 "160abb3l4n3gkhd86f22n981bhqxkbf5ym6fhsk796pix6696pd5"))))
bc8277e4
RW
5862 (build-system ruby-build-system)
5863 ;; This gem needs itself at development time. We disable rebuilding of the
5864 ;; gemspec to avoid this loop.
5865 (arguments
5866 `(#:tests? #f ; there are no tests
5867 #:phases
5868 (modify-phases %standard-phases
5869 (replace 'build
5870 (lambda _
9923d5a4 5871 (invoke "gem" "build" "gem_hadar.gemspec"))))))
bc8277e4
RW
5872 (propagated-inputs
5873 `(("git" ,git)
5874 ("ruby-tins" ,ruby-tins)
3fd577e3 5875 ("ruby-yard" ,ruby-yard)))
bc8277e4
RW
5876 (synopsis "Library for the development of Ruby gems")
5877 (description
5878 "This library contains some useful functionality to support the
5879development of Ruby gems.")
5880 (home-page "https://github.com/flori/gem_hadar")
5881 (license license:expat)))
5882
d8cafe29
RW
5883(define-public ruby-minitest-tu-shim
5884 (package
5885 (name "ruby-minitest-tu-shim")
5886 (version "1.3.3")
5887 (source (origin
5888 (method url-fetch)
5889 (uri (rubygems-uri "minitest_tu_shim" version))
5890 (sha256
5891 (base32
5892 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5893 (build-system ruby-build-system)
5894 (arguments
5895 `(#:phases
5896 (modify-phases %standard-phases
5897 (add-after 'unpack 'fix-test-include-path
5898 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 5899 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
761e7042
BW
5900 (substitute* "Rakefile"
5901 (("Hoe\\.add_include_dirs .*")
5902 (string-append "Hoe.add_include_dirs \""
3cb3fa67 5903 minitest "/lib/ruby/vendor_ruby"
761e7042
BW
5904 "/gems/minitest-"
5905 ,(package-version ruby-minitest-4)
5906 "/lib" "\""))))
5907 #t))
d8cafe29
RW
5908 (add-before 'check 'fix-test-assumptions
5909 (lambda _
5910 ;; The test output includes the file name, so a couple of tests
5911 ;; fail. Changing the regular expressions slightly fixes this
5912 ;; problem.
5913 (substitute* "test/test_mini_test.rb"
5914 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5915 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5916 (("gsub\\(/.*, 'FILE:LINE'\\)")
5917 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5918 #t)))))
5919 (propagated-inputs
5920 `(("ruby-minitest-4" ,ruby-minitest-4)))
5921 (native-inputs
5922 `(("ruby-hoe" ,ruby-hoe)))
5923 (synopsis "Adapter library between minitest and test/unit")
5924 (description
5925 "This library bridges the gap between the small and fast minitest and
5926Ruby's large and slower test/unit.")
5927 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5928 (license license:expat)))
5929
fd83a212
RW
5930(define-public ruby-term-ansicolor
5931 (package
5932 (name "ruby-term-ansicolor")
f3a6311a 5933 (version "1.6.0")
fd83a212
RW
5934 (source (origin
5935 (method url-fetch)
5936 (uri (rubygems-uri "term-ansicolor" version))
5937 (sha256
5938 (base32
f3a6311a 5939 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
fd83a212
RW
5940 (build-system ruby-build-system)
5941 ;; Rebuilding the gemspec seems to require git, even though this is not a
5942 ;; git repository, so we just build the gem from the existing gemspec.
5943 (arguments
5944 `(#:phases
5945 (modify-phases %standard-phases
39ecb977
CB
5946 (add-after 'unpack 'fix-test
5947 (lambda -
5948 (substitute* "tests/hsl_triple_test.rb"
5949 (("0\\\\\\.0%")
5950 "0\\.?0?%"))))
fd83a212
RW
5951 (replace 'build
5952 (lambda _
9923d5a4 5953 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
fd83a212
RW
5954 (propagated-inputs
5955 `(("ruby-tins" ,ruby-tins)))
5956 (native-inputs
5957 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5958 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5959 (synopsis "Ruby library to control the attributes of terminal output")
5960 (description
5961 "This Ruby library uses ANSI escape sequences to control the attributes
5962of terminal output.")
2f3800e5 5963 (home-page "https://flori.github.io/term-ansicolor/")
fd83a212
RW
5964 ;; There is no mention of the "or later" clause.
5965 (license license:gpl2)))
5966
a714c30f
CB
5967(define-public ruby-terraform
5968 (package
5969 (name "ruby-terraform")
5970 (version "0.22.0")
5971 (source
5972 (origin
5973 (method url-fetch)
5974 (uri (rubygems-uri "ruby-terraform" version))
5975 (sha256
5976 (base32
5977 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5978 (build-system ruby-build-system)
5979 (arguments
5980 '(#:tests? #f)) ; No included tests
5981 (propagated-inputs
5982 `(("ruby-lino" ,ruby-lino)))
5983 (synopsis "Ruby wrapper around the Terraform command line interface")
5984 (description
5985 "This package provides a Ruby wrapper around the Terraform command line
5986interface so that Terraform can be more easily invoked from Ruby code.")
5987 (home-page "https://github.com/infrablocks/ruby_terraform")
5988 (license license:expat)))
5989
6e376ca4
RW
5990(define-public ruby-pstree
5991 (package
5992 (name "ruby-pstree")
5993 (version "0.1.0")
5994 (source (origin
5995 (method url-fetch)
5996 (uri (rubygems-uri "pstree" version))
5997 (sha256
5998 (base32
5999 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
6000 (build-system ruby-build-system)
6001 (native-inputs
6002 `(("ruby-gem-hadar" ,ruby-gem-hadar)
6003 ("bundler" ,bundler)))
6004 (synopsis "Create a process tree data structure")
6005 (description
6006 "This library uses the output of the @code{ps} command to create a
6007process tree data structure for the current host.")
2f3800e5 6008 (home-page "https://github.com/flori/pstree")
6e376ca4
RW
6009 ;; There is no mention of the "or later" clause.
6010 (license license:gpl2)))
6011
53239b5f
RW
6012(define-public ruby-utils
6013 (package
6014 (name "ruby-utils")
cd698b6e 6015 (version "0.9.0")
53239b5f
RW
6016 (source (origin
6017 (method url-fetch)
6018 (uri (rubygems-uri "utils" version))
6019 (sha256
6020 (base32
cd698b6e 6021 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
53239b5f
RW
6022 (build-system ruby-build-system)
6023 (propagated-inputs
6024 `(("ruby-tins" ,ruby-tins)
6025 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
6026 ("ruby-pstree" ,ruby-pstree)
6027 ("ruby-pry-editline" ,ruby-pry-editline)))
6028 (native-inputs
6029 `(("ruby-gem-hadar" ,ruby-gem-hadar)
6030 ("bundler" ,bundler)))
6031 (synopsis "Command line tools for working with Ruby")
6032 (description
6033 "This package provides assorted command line tools that may be useful
6034when working with Ruby code.")
6035 (home-page "https://github.com/flori/utils")
6036 ;; There is no mention of the "or later" clause.
6037 (license license:gpl2)))
6038
433f10b5
CB
6039(define-public ruby-jaro-winkler
6040 (package
6041 (name "ruby-jaro-winkler")
37b23e44 6042 (version "1.5.4")
433f10b5
CB
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (rubygems-uri "jaro_winkler" version))
6047 (sha256
37b23e44 6048 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
433f10b5
CB
6049 (build-system ruby-build-system)
6050 (arguments
37b23e44 6051 '(#:tests? #f)) ; no included tests
433f10b5
CB
6052 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
6053 (description
6054 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
6055algorithm. It is written as a C extension and will fallback to a pure Ruby
6056implementation on platforms where this is unsupported.")
6057 (home-page "https://github.com/tonytonyjan/jaro_winkler")
6058 (license license:expat)))
6059
c99e2247
DT
6060(define-public ruby-json
6061 (package
6062 (name "ruby-json")
a281acce 6063 (version "2.1.0")
c99e2247
DT
6064 (source
6065 (origin
6066 (method url-fetch)
6067 (uri (rubygems-uri "json" version))
6068 (sha256
6069 (base32
a281acce 6070 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
c99e2247
DT
6071 (build-system ruby-build-system)
6072 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
6073 (synopsis "JSON library for Ruby")
6074 (description "This Ruby library provides a JSON implementation written as
6075a native C extension.")
6076 (home-page "http://json-jruby.rubyforge.org/")
6077 (license (list license:ruby license:gpl2)))) ; GPL2 only
5ff89a1b 6078
763624f5
RW
6079(define-public ruby-json-pure
6080 (package
6081 (name "ruby-json-pure")
1c65d99f 6082 (version "2.2.0")
763624f5
RW
6083 (source (origin
6084 (method url-fetch)
6085 (uri (rubygems-uri "json_pure" version))
6086 (sha256
6087 (base32
1c65d99f 6088 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
763624f5
RW
6089 (build-system ruby-build-system)
6090 (arguments
ac01cb07 6091 `(#:phases
763624f5 6092 (modify-phases %standard-phases
ac01cb07 6093 (add-after 'unpack 'fix-rakefile
763624f5 6094 (lambda _
ac01cb07
BW
6095 (substitute* "Rakefile"
6096 ;; Since this is not a git repository, do not call 'git'.
6097 (("`git ls-files`") "`find . -type f |sort`")
6098 ;; Loosen dependency constraint.
6099 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
6100 #t))
6101 (add-after 'replace-git-ls-files 'regenerate-gemspec
6102 (lambda _
6103 ;; Regenerate gemspec so loosened dependency constraints are
6104 ;; propagated.
17cfb7ae
CB
6105 (invoke "rake" "gemspec")))
6106 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
6107 (lambda _
6108 ;; This gemspec doesn't look to be generated by the above
6109 ;; command, so patch it separately.
6110 (substitute* "json-java.gemspec"
6111 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
6112 "%q<test-unit>.freeze, [\">= 2.0\"]"))
6113 #t)))))
763624f5 6114 (native-inputs
ac01cb07 6115 `(("bundler" ,bundler)
0c9f73cd
TGR
6116 ("ragel" ,ragel)
6117 ("ruby-simplecov" ,ruby-simplecov)
6118 ("ruby-test-unit" ,ruby-test-unit)))
763624f5
RW
6119 (synopsis "JSON implementation in pure Ruby")
6120 (description
6121 "This package provides a JSON implementation written in pure Ruby.")
1c65d99f 6122 (home-page "https://flori.github.com/json/")
763624f5
RW
6123 (license license:ruby)))
6124
2a8581ac
CB
6125(define-public ruby-jwt
6126 (package
6127 (name "ruby-jwt")
6128 (version "2.1.0")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (rubygems-uri "jwt" version))
6133 (sha256
6134 (base32
6135 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
6136 (build-system ruby-build-system)
6137 (arguments
6138 '(#:test-target "test"
6139 #:phases
6140 (modify-phases %standard-phases
6141 (add-after 'unpack 'remove-unnecessary-dependencies
6142 (lambda _
6143 (substitute* "spec/spec_helper.rb"
6144 (("require 'simplecov.*") "\n")
6145 ;; Use [].each to disable running the SimpleCov configuration
6146 ;; block
6147 (("SimpleCov\\.configure") "[].each")
6148 (("require 'codeclimate-test-reporter'") "")
6149 (("require 'codacy-coverage'") "")
6150 (("Codacy::Reporter\\.start") ""))
6151 #t)))))
6152 (native-inputs
6153 `(("bundler" ,bundler)
6154 ("ruby-rspec" ,ruby-rspec)
6155 ("ruby-rbnacl" ,ruby-rbnacl)))
6156 (synopsis "Ruby implementation of the JSON Web Token standard")
6157 (description
6158 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
6159@acronym{JWT, JSON Web Token} standard.")
6160 (home-page "https://github.com/jwt/ruby-jwt")
6161 (license license:expat)))
6162
16b324cd
RW
6163;; Even though this package only provides bindings for a Mac OSX API it is
6164;; required by "ruby-listen" at runtime.
6165(define-public ruby-rb-fsevent
6166 (package
6167 (name "ruby-rb-fsevent")
b0ef15ed 6168 (version "0.10.3")
16b324cd
RW
6169 (source (origin
6170 (method url-fetch)
6171 (uri (rubygems-uri "rb-fsevent" version))
6172 (sha256
6173 (base32
b0ef15ed 6174 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
16b324cd
RW
6175 (build-system ruby-build-system)
6176 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
6177 ;; "listen", which needs "rb-fsevent" at runtime.
6178 (arguments `(#:tests? #f))
6179 (synopsis "FSEvents API with signals catching")
6180 (description
6181 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
6182 (home-page "https://rubygems.org/gems/rb-fsevent")
6183 (license license:expat)))
6184
b86be2ad
RW
6185(define-public ruby-listen
6186 (package
6187 (name "ruby-listen")
12341d34 6188 (version "3.2.0")
b86be2ad
RW
6189 (source
6190 (origin
35602819
CB
6191 ;; The gem does not include a Rakefile, so fetch from the Git
6192 ;; repository.
6193 (method git-fetch)
6194 (uri (git-reference
b0e7b699 6195 (url "https://github.com/guard/listen")
35602819
CB
6196 (commit (string-append "v" version))))
6197 (file-name (git-file-name name version))
b86be2ad
RW
6198 (sha256
6199 (base32
12341d34 6200 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
b86be2ad 6201 (build-system ruby-build-system)
35602819
CB
6202 (arguments
6203 `(#:test-target "spec"
6204 #:phases
6205 (modify-phases %standard-phases
6206 (add-after 'unpack 'fix-files-in-gemspec
6207 (lambda _
6208 (substitute* "listen.gemspec"
6209 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
6210 #t))
6211 (add-before 'check 'remove-unnecessary-dependencies'
6212 (lambda _
6213 (substitute* "Rakefile"
6214 ;; Rubocop is for code linting, and is unnecessary for running
6215 ;; the tests.
6216 ((".*rubocop.*") ""))
6217 #t)))))
6218 (native-inputs
6219 `(("bundler" ,bundler)
6220 ("ruby-rspec" ,ruby-rspec)))
6221 (inputs
6222 `(;; ruby-thor is used for the command line interface, and is referenced
6223 ;; in the wrapper, and therefore just needs to be an input.
6224 ("ruby-thor" ,ruby-thor)))
b86be2ad 6225 (propagated-inputs
35602819
CB
6226 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
6227 ("ruby-rb-inotify" ,ruby-rb-inotify)
6228 ("ruby-dep" ,ruby-dep)))
b86be2ad
RW
6229 (synopsis "Listen to file modifications")
6230 (description "The Listen gem listens to file modifications and notifies
6231you about the changes.")
6232 (home-page "https://github.com/guard/listen")
6233 (license license:expat)))
6234
8d3c5ff6
CB
6235(define-public ruby-loofah
6236 (package
6237 (name "ruby-loofah")
6238 (version "2.2.3")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (rubygems-uri "loofah" version))
6243 (sha256
6244 (base32
6245 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
6246 (build-system ruby-build-system)
6247 (arguments
6248 '(#:phases
6249 (modify-phases %standard-phases
6250 (add-after 'unpack 'remove-unnecessary-dependencies
6251 (lambda _
6252 ;; concourse is a development tool which is unused, so remove it
6253 ;; so it's not required.
6254 (substitute* "Gemfile"
6255 ((".*\"concourse\".*") "\n"))
6256 (substitute* "Rakefile"
6257 (("require 'concourse'") "")
6258 (("Concourse\\.new.*") "\n"))
6259 #t)))))
6260 (native-inputs
6261 `(("ruby-hoe" ,ruby-hoe)
6262 ("ruby-rr" ,ruby-rr)))
6263 (propagated-inputs
6264 `(("ruby-nokogiri" ,ruby-nokogiri)
6265 ("ruby-crass" ,ruby-crass)))
6266 (synopsis "Ruby library for manipulating and transforming HTML/XML")
6267 (description
6268 "Loofah is a general library for manipulating and transforming HTML/XML
6269documents and fragments. It's built on top of Nokogiri and libxml2.")
6270 (home-page "https://github.com/flavorjones/loofah")
6271 (license license:expat)))
6272
5ff89a1b
DT
6273(define-public ruby-activesupport
6274 (package
6275 (name "ruby-activesupport")
bcf1fe5b 6276 (version "5.2.2.1")
5ff89a1b
DT
6277 (source
6278 (origin
6279 (method url-fetch)
6280 (uri (rubygems-uri "activesupport" version))
6281 (sha256
6282 (base32
bcf1fe5b 6283 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
5ff89a1b
DT
6284 (build-system ruby-build-system)
6285 (arguments
2af45e50
BW
6286 `(#:phases
6287 (modify-phases %standard-phases
6288 (replace 'check
6289 (lambda _
9923d5a4
TGR
6290 ;; There are no tests, instead attempt to load the library.
6291 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
5ff89a1b 6292 (propagated-inputs
2af45e50
BW
6293 `(("ruby-concurrent" ,ruby-concurrent)
6294 ("ruby-i18n" ,ruby-i18n)
5ff89a1b 6295 ("ruby-minitest" ,ruby-minitest)
606ee9a1
BW
6296 ("ruby-tzinfo" ,ruby-tzinfo)
6297 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
5ff89a1b
DT
6298 (synopsis "Ruby on Rails utility library")
6299 (description "ActiveSupport is a toolkit of support libraries and Ruby
6300core extensions extracted from the Rails framework. It includes support for
6301multibyte strings, internationalization, time zones, and testing.")
6302 (home-page "http://www.rubyonrails.org")
6303 (license license:expat)))
f847ad7b 6304
3996f0aa
RW
6305(define-public ruby-crass
6306 (package
6307 (name "ruby-crass")
a84a185a
MB
6308 (version "1.0.6")
6309 (home-page "https://github.com/rgrove/crass")
3996f0aa 6310 (source (origin
a84a185a
MB
6311 ;; The gem does not contain tests, so pull from git.
6312 (method git-fetch)
6313 (uri (git-reference
6314 (url home-page)
6315 (commit (string-append "v" version))))
6316 (file-name (git-file-name name version))
3996f0aa
RW
6317 (sha256
6318 (base32
a84a185a 6319 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
3996f0aa 6320 (build-system ruby-build-system)
3996f0aa
RW
6321 (synopsis "Pure Ruby CSS parser")
6322 (description
6323 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
3996f0aa
RW
6324 (license license:expat)))
6325
c2c4e5b2 6326(define-public ruby-nokogumbo
2e366b0a
MB
6327 (package
6328 (name "ruby-nokogumbo")
6329 (version "2.0.2")
6330 (source (origin
6331 ;; We use the git reference, because there's no Rakefile in the
6332 ;; published gem and the tarball on Github is outdated.
6333 (method git-fetch)
6334 (uri (git-reference
b0e7b699 6335 (url "https://github.com/rubys/nokogumbo")
2e366b0a
MB
6336 (commit (string-append "v" version))))
6337 (file-name (string-append name "-" version "-checkout"))
6338 (sha256
6339 (base32
6340 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
6341 (build-system ruby-build-system)
6342 (native-inputs
6343 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
6344 (inputs
6345 `(("gumbo-parser" ,gumbo-parser)))
6346 (propagated-inputs
6347 `(("ruby-nokogiri" ,ruby-nokogiri)))
6348 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
6349 (description
6350 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
c2c4e5b2 6351access the result as a Nokogiri parsed document.")
2e366b0a
MB
6352 (home-page "https://github.com/rubys/nokogumbo/")
6353 (license license:asl2.0)))
c2c4e5b2 6354
d56ff88b
RW
6355(define-public ruby-sanitize
6356 (package
6357 (name "ruby-sanitize")
f362b53c
MB
6358 (version "5.1.0")
6359 (home-page "https://github.com/rgrove/sanitize")
d56ff88b 6360 (source (origin
f362b53c 6361 (method git-fetch)
d56ff88b 6362 ;; The gem does not include the Rakefile, so we download the
f362b53c
MB
6363 ;; source from Github.
6364 (uri (git-reference
6365 (url home-page)
6366 (commit (string-append "v" version))))
6367 (file-name (git-file-name name version))
6368 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
d56ff88b
RW
6369 (sha256
6370 (base32
f362b53c 6371 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
d56ff88b
RW
6372 (build-system ruby-build-system)
6373 (propagated-inputs
6374 `(("ruby-crass" ,ruby-crass)
6375 ("ruby-nokogiri" ,ruby-nokogiri)
6376 ("ruby-nokogumbo" ,ruby-nokogumbo)))
6377 (native-inputs
f362b53c 6378 `(("ruby-minitest" ,ruby-minitest)))
d56ff88b
RW
6379 (synopsis "Whitelist-based HTML and CSS sanitizer")
6380 (description
6381 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
6382acceptable elements, attributes, and CSS properties, Sanitize will remove all
6383unacceptable HTML and/or CSS from a string.")
d56ff88b
RW
6384 (license license:expat)))
6385
ed4b6b18
BW
6386(define-public ruby-oj
6387 (package
6388 (name "ruby-oj")
93dfdec5 6389 (version "3.10.1")
ed4b6b18
BW
6390 (source
6391 (origin
b09ef660 6392 (method git-fetch)
ed4b6b18
BW
6393 ;; Version on rubygems.org does not contain Rakefile, so download from
6394 ;; GitHub instead.
b09ef660
EF
6395 (uri (git-reference
6396 (url "https://github.com/ohler55/oj")
6397 (commit (string-append "v" version))))
6398 (file-name (git-file-name name version))
ed4b6b18
BW
6399 (sha256
6400 (base32
93dfdec5 6401 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
ed4b6b18
BW
6402 (build-system ruby-build-system)
6403 (arguments
6404 '(#:test-target "test_all"
6405 #:phases
6406 (modify-phases %standard-phases
6407 (add-before 'check 'disable-bundler
6408 (lambda _
6409 (substitute* "Rakefile"
6410 (("Bundler\\.with_clean_env") "1.times")
6411 (("bundle exec ") "")))))))
6412 (native-inputs
6413 `(("bundler" ,bundler)
6414 ("ruby-rspec" ,ruby-rspec)
6415 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6416 (synopsis "JSON parser for Ruby optimized for speed")
6417 (description
6418 "Oj is a JSON parser and generator for Ruby, where the encoding and
6419decoding of JSON is implemented as a C extension to Ruby.")
b09ef660 6420 (home-page "http://www.ohler.com/oj/")
ed4b6b18
BW
6421 (license (list license:expat ; Ruby code
6422 license:bsd-3)))) ; extension code
6423
f847ad7b
DT
6424(define-public ruby-ox
6425 (package
6426 (name "ruby-ox")
263c0dbf 6427 (version "2.6.0")
f847ad7b
DT
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (rubygems-uri "ox" version))
6432 (sha256
6433 (base32
263c0dbf 6434 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
f847ad7b
DT
6435 (build-system ruby-build-system)
6436 (arguments
6437 '(#:tests? #f)) ; no tests
6438 (synopsis "Optimized XML library for Ruby")
6439 (description
6440 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
6441written as a native C extension. It was designed to be an alternative to
6442Nokogiri and other Ruby XML parsers for generic XML parsing and as an
6443alternative to Marshal for Object serialization. ")
6444 (home-page "http://www.ohler.com/ox")
6445 (license license:expat)))
4a9e0585 6446
0c4e7625
RW
6447(define-public ruby-redcloth
6448 (package
6449 (name "ruby-redcloth")
2a91494e 6450 (version "4.3.2")
0c4e7625
RW
6451 (source (origin
6452 (method url-fetch)
6453 (uri (rubygems-uri "RedCloth" version))
6454 (sha256
6455 (base32
2a91494e 6456 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
0c4e7625
RW
6457 (build-system ruby-build-system)
6458 (arguments
6459 `(#:tests? #f ; no tests
6460 #:phases
6461 (modify-phases %standard-phases
6462 ;; Redcloth has complicated rake tasks to build various versions for
6463 ;; multiple targets using RVM. We don't want this so we just use the
6464 ;; existing gemspec.
6465 (replace 'build
6466 (lambda _
9923d5a4 6467 (invoke "gem" "build" "redcloth.gemspec"))))))
0c4e7625
RW
6468 (native-inputs
6469 `(("bundler" ,bundler)
6470 ("ruby-diff-lcs" ,ruby-diff-lcs)
6471 ("ruby-rspec-2" ,ruby-rspec-2)))
6472 (synopsis "Textile markup language parser for Ruby")
6473 (description
6474 "RedCloth is a Ruby parser for the Textile markup language.")
6475 (home-page "http://redcloth.org")
6476 (license license:expat)))
6477
4a9e0585
DT
6478(define-public ruby-pg
6479 (package
6480 (name "ruby-pg")
ab40e861 6481 (version "1.2.3")
4a9e0585
DT
6482 (source
6483 (origin
6484 (method url-fetch)
6485 (uri (rubygems-uri "pg" version))
6486 (sha256
6487 (base32
ab40e861 6488 "13mfrysrdrh8cka1d96zm0lnfs59i5x2g6ps49r2kz5p3q81xrzj"))))
4a9e0585
DT
6489 (build-system ruby-build-system)
6490 (arguments
6491 '(#:test-target "spec"))
6492 (native-inputs
6493 `(("ruby-rake-compiler" ,ruby-rake-compiler)
6494 ("ruby-hoe" ,ruby-hoe)
6495 ("ruby-rspec" ,ruby-rspec)))
6496 (inputs
ffc4869e 6497 `(("postgresql" ,postgresql)))
4a9e0585
DT
6498 (synopsis "Ruby interface to PostgreSQL")
6499 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
4db80f8b 6500with PostgreSQL 9.0 and later.")
4a9e0585
DT
6501 (home-page "https://bitbucket.org/ged/ruby-pg")
6502 (license license:ruby)))
468e5657
DT
6503
6504(define-public ruby-byebug
6505 (package
6506 (name "ruby-byebug")
d5489a61 6507 (version "9.0.6")
468e5657
DT
6508 (source
6509 (origin
6510 (method url-fetch)
6511 (uri (rubygems-uri "byebug" version))
6512 (sha256
6513 (base32
d5489a61 6514 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
468e5657
DT
6515 (build-system ruby-build-system)
6516 (arguments
6517 '(#:tests? #f)) ; no tests
6518 (synopsis "Debugger for Ruby 2")
6519 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6520TracePoint C API for execution control and the Debug Inspector C API for call
6521stack navigation. The core component provides support that front-ends can
6522build on. It provides breakpoint handling and bindings for stack frames among
6523other things and it comes with a command line interface.")
7bf837fd 6524 (home-page "https://github.com/deivid-rodriguez/byebug")
468e5657 6525 (license license:bsd-2)))
64b6ccc3 6526
7aa00628
MC
6527;;; TODO: Make it the default byebug in core-updates.
6528(define-public ruby-byebug-11
6529 (package
6530 (inherit ruby-byebug)
6531 (name "ruby-byebug")
6532 (version "11.1.3")
6533 (source
6534 (origin
6535 (method git-fetch)
6536 (uri (git-reference
b0e7b699 6537 (url "https://github.com/deivid-rodriguez/byebug")
7aa00628
MC
6538 (commit (string-append "v" version))))
6539 (file-name (git-file-name name version))
6540 (sha256
6541 (base32
6542 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6543 (modules '((guix build utils)))
6544 (snippet
6545 '(begin
6546 ;; Remove wrappers that try to setup a bundle environment.
6547 (with-directory-excursion "bin"
6548 (for-each delete-file '("bundle" "rake" "rubocop"))
6549 ;; ruby-minitest doesn't come with a launcher, so fix the one
6550 ;; provided.
6551 (substitute* "minitest"
6552 (("load File\\.expand_path\\(\"bundle\".*") "")
6553 (("require \"bundler/setup\".*") "")))
6554 #t))))
6555 (arguments
6556 `(#:tests? #t
6557 #:phases
6558 (modify-phases %standard-phases
6559 (add-after 'unpack 'skip-tmp-path-sensitive-test
6560 (lambda _
6561 (substitute* "test/commands/where_test.rb"
6562 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6563 "unless true\n"))
6564 #t))
6565 (add-before 'build 'compile
6566 (lambda _
6567 (invoke "rake" "compile")))
6568 (add-before 'check 'set-home
6569 (lambda _
6570 (setenv "HOME" (getcwd))
6571 #t)))))
6572 (native-inputs
6573 `(("bundler" ,bundler)
6574 ("ruby-chandler" ,ruby-chandler)
6575 ("ruby-minitest" ,ruby-minitest)
6576 ("ruby-pry" ,ruby-pry)
6577 ("ruby-rake-compiler" ,ruby-rake-compiler)
6578 ("ruby-rubocop" ,ruby-rubocop)
6579 ("ruby-yard" ,ruby-yard)))))
6580
5799bc2b
RW
6581(define-public ruby-netrc
6582 (package
6583 (name "ruby-netrc")
6584 (version "0.11.0")
6585 (source (origin
6586 (method url-fetch)
6587 (uri (rubygems-uri "netrc" version))
6588 (sha256
6589 (base32
6590 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6591 (build-system ruby-build-system)
6592 (arguments
6593 `(#:phases
6594 (modify-phases %standard-phases
6595 (replace 'check
6596 ;; There is no Rakefile and minitest can only run one file at once,
6597 ;; so we have to iterate over all test files.
6598 (lambda _
b23c1f50
MW
6599 (for-each (lambda (file)
6600 (invoke "ruby" "-Itest" file))
6601 (find-files "./test" "test_.*\\.rb"))
6602 #t)))))
5799bc2b
RW
6603 (native-inputs
6604 `(("ruby-minitest" ,ruby-minitest)))
6605 (synopsis "Library to read and update netrc files")
6606 (description
6607 "This library can read and update netrc files, preserving formatting
6608including comments and whitespace.")
6609 (home-page "https://github.com/geemus/netrc")
6610 (license license:expat)))
6611
3a6989ce
RW
6612(define-public ruby-unf-ext
6613 (package
6614 (name "ruby-unf-ext")
14db8f19 6615 (version "0.0.7.6")
3a6989ce
RW
6616 (source (origin
6617 (method url-fetch)
6618 (uri (rubygems-uri "unf_ext" version))
6619 (sha256
6620 (base32
14db8f19 6621 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
3a6989ce 6622 (build-system ruby-build-system)
b809cc9a
RW
6623 (arguments
6624 `(#:phases
6625 (modify-phases %standard-phases
6626 (add-after 'build 'build-ext
14db8f19
MB
6627 (lambda _ (invoke "rake" "compile:unf_ext")))
6628 (add-before 'check 'lose-rake-compiler-dock-dependency
6629 (lambda _
6630 ;; rake-compiler-dock is listed in the gemspec, but only
6631 ;; required when cross-compiling.
6632 (substitute* "unf_ext.gemspec"
6633 ((".*rake-compiler-dock.*") ""))
6634 #t)))))
3a6989ce
RW
6635 (native-inputs
6636 `(("bundler" ,bundler)
6637 ("ruby-rake-compiler" ,ruby-rake-compiler)
6638 ("ruby-test-unit" ,ruby-test-unit)))
6639 (synopsis "Unicode normalization form support library")
6640 (description
6641 "This package provides unicode normalization form support for Ruby.")
6642 (home-page "https://github.com/knu/ruby-unf_ext")
6643 (license license:expat)))
6644
2632a067 6645(define-public ruby-tdiff
5071f17b
BW
6646 ;; Use a newer than released snapshot so that rspec-2 is not required.
6647 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6648 (package
6649 (name "ruby-tdiff")
6650 (version (string-append "0.3.3-1." (string-take commit 8)))
6651 (source (origin
6652 (method git-fetch)
6653 (uri (git-reference
b0e7b699 6654 (url "https://github.com/postmodern/tdiff")
5071f17b
BW
6655 (commit commit)))
6656 (file-name (string-append name "-" version "-checkout"))
6657 (sha256
6658 (base32
6659 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6660 (build-system ruby-build-system)
6661 (native-inputs
6662 `(("ruby-rspec" ,ruby-rspec)
6663 ("ruby-yard" ,ruby-yard)
6664 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6665 (synopsis "Calculate the differences between two tree-like structures")
6666 (description
6667 "This library provides functions to calculate the differences between two
2632a067 6668tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
5071f17b
BW
6669 (home-page "https://github.com/postmodern/tdiff")
6670 (license license:expat))))
2632a067 6671
f60f5002 6672(define-public ruby-nokogiri-diff
5b0c223a
BW
6673 ;; Use a newer than released snapshot so that rspec-2 is not required.
6674 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6675 (package
6676 (name "ruby-nokogiri-diff")
6677 (version (string-append "0.2.0-1." (string-take commit 8)))
6678 (source (origin
6679 (method git-fetch)
6680 (uri (git-reference
b0e7b699 6681 (url "https://github.com/postmodern/nokogiri-diff")
5b0c223a
BW
6682 (commit commit)))
6683 (file-name (string-append name "-" version "-checkout"))
6684 (sha256
6685 (base32
6686 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6687 (build-system ruby-build-system)
6688 (propagated-inputs
6689 `(("ruby-tdiff" ,ruby-tdiff)
6690 ("ruby-nokogiri" ,ruby-nokogiri)))
6691 (native-inputs
6692 `(("ruby-rspec" ,ruby-rspec)
6693 ("ruby-yard" ,ruby-yard)
6694 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6695 (synopsis "Calculate the differences between two XML/HTML documents")
6696 (description
6697 "@code{Nokogiri::Diff} adds the ability to calculate the
f60f5002 6698differences (added or removed nodes) between two XML/HTML documents.")
5b0c223a
BW
6699 (home-page "https://github.com/postmodern/nokogiri-diff")
6700 (license license:expat))))
f60f5002 6701
6dc21310
CB
6702(define-public ruby-racc
6703 (package
6704 (name "ruby-racc")
6705 (version "1.4.14")
6706 (source
6707 (origin
6708 (method url-fetch)
6709 (uri (rubygems-uri "racc" version))
6710 (sha256
6711 (base32
6712 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6713 (build-system ruby-build-system)
6714 (native-inputs
6715 `(("ruby-hoe" ,ruby-hoe)
6716 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6717 (synopsis "LALR(1) parser generator for Ruby")
6718 (description
6719 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6720generates Ruby program.")
6721 (home-page "http://i.loveruby.net/en/projects/racc/")
6722 (license (list
6723 ;; Generally licensed under the LGPL2.1, and some files also
6724 ;; available under the same license as Ruby.
6725 license:lgpl2.1
6726 license:ruby))))
6727
64b6ccc3
DT
6728(define-public ruby-rack
6729 (package
6730 (name "ruby-rack")
288d2480 6731 (version "2.0.6")
64b6ccc3
DT
6732 (source
6733 (origin
83870c32 6734 (method git-fetch)
1db791d5 6735 ;; Download from GitHub so that the patch can be applied.
83870c32
EF
6736 (uri (git-reference
6737 (url "https://github.com/rack/rack")
6738 (commit version)))
6739 (file-name (git-file-name name version))
64b6ccc3
DT
6740 (sha256
6741 (base32
83870c32 6742 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
1db791d5
BW
6743 ;; Ignore test which fails inside the build environment but works
6744 ;; outside.
6745 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
64b6ccc3
DT
6746 (build-system ruby-build-system)
6747 (arguments
6748 '(#:phases
6749 (modify-phases %standard-phases
6750 (add-before 'check 'fix-tests
6751 (lambda _
6752 ;; A few of the tests use the length of a file on disk for
6753 ;; Content-Length and Content-Range headers. However, this file
6754 ;; has a shebang in it which an earlier phase patches, growing
6755 ;; the file size from 193 to 239 bytes when the store prefix is
6756 ;; "/gnu/store".
6757 (let ((size-diff (- (string-length (which "ruby"))
6758 (string-length "/usr/bin/env ruby"))))
6759 (substitute* '("test/spec_file.rb")
6760 (("193")
6761 (number->string (+ 193 size-diff)))
6762 (("bytes(.)22-33" all delimiter)
6763 (string-append "bytes"
6764 delimiter
6765 (number->string (+ 22 size-diff))
6766 "-"
6767 (number->string (+ 33 size-diff))))))
83870c32
EF
6768 #t))
6769 (add-before 'reset-gzip-timestamps 'make-files-writable
6770 (lambda* (#:key outputs #:allow-other-keys)
6771 ;; Make sure .gz files are writable so that the
6772 ;; 'reset-gzip-timestamps' phase can do its work.
6773 (let ((out (assoc-ref outputs "out")))
6774 (for-each make-file-writable
6775 (find-files out "\\.gz$"))
6776 #t))))))
64b6ccc3 6777 (native-inputs
1db791d5
BW
6778 `(("ruby-minitest" ,ruby-minitest)
6779 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6780 ("which" ,which)))
6781 (propagated-inputs
6782 `(("ruby-concurrent" ,ruby-concurrent)))
64b6ccc3
DT
6783 (synopsis "Unified web application interface for Ruby")
6784 (description "Rack provides a minimal, modular and adaptable interface for
6785developing web applications in Ruby. By wrapping HTTP requests and responses,
6786it unifies the API for web servers, web frameworks, and software in between
6787into a single method call.")
2f3800e5 6788 (home-page "https://rack.github.io/")
64b6ccc3 6789 (license license:expat)))
62e4cc5a 6790
20a0f804
BW
6791(define-public ruby-rack-test
6792 (package
6793 (name "ruby-rack-test")
6794 (version "0.8.3")
6795 (source
6796 (origin
6797 (method url-fetch)
6798 (uri (rubygems-uri "rack-test" version))
6799 (sha256
6800 (base32
6801 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6802 (build-system ruby-build-system)
6803 (arguments
6804 ;; Disable tests because of circular dependencies: requires sinatra,
6805 ;; which requires rack-protection, which requires rack-test. Instead
6806 ;; simply require the library.
6807 `(#:phases
6808 (modify-phases %standard-phases
6809 (replace 'check
6810 (lambda _
6811 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6812 (propagated-inputs
6813 `(("ruby-rack" ,ruby-rack)))
6814 (synopsis "Testing API for Rack applications")
6815 (description
6816 "Rack::Test is a small, simple testing API for Rack applications. It can
6817be used on its own or as a reusable starting point for Web frameworks and
6818testing libraries to build on.")
6819 (home-page "https://github.com/rack-test/rack-test")
6820 (license license:expat)))
6821
a0a7e690
BW
6822(define-public ruby-rack-protection
6823 (package
6824 (name "ruby-rack-protection")
3355e49c 6825 (version "2.0.5")
a0a7e690
BW
6826 (source
6827 (origin
6828 (method url-fetch)
6829 (uri (rubygems-uri "rack-protection" version))
6830 (sha256
6831 (base32
3355e49c 6832 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
a0a7e690
BW
6833 (build-system ruby-build-system)
6834 (arguments
fafeeaa2 6835 '(;; Tests missing from the gem.
a0a7e690
BW
6836 #:tests? #f))
6837 (propagated-inputs
6838 `(("ruby-rack" ,ruby-rack)))
6839 (native-inputs
6840 `(("bundler" ,bundler)
6841 ("ruby-rspec" ,ruby-rspec-2)
6842 ("ruby-rack-test" ,ruby-rack-test)))
6843 (synopsis "Rack middleware that protects against typical web attacks")
6844 (description "Rack middleware that can be used to protect against typical
6845web attacks. It can protect all Rack apps, including Rails. For instance, it
6846protects against cross site request forgery, cross site scripting,
6847clickjacking, directory traversal, session hijacking and IP spoofing.")
6848 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6849 (license license:expat)))
6850
6edabcb2
CB
6851(define-public ruby-rainbow
6852 (package
6853 (name "ruby-rainbow")
6854 (version "3.0.0")
6855 (source
6856 (origin
6857 (method url-fetch)
6858 (uri (rubygems-uri "rainbow" version))
6859 (sha256
6860 (base32
6861 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6862 (build-system ruby-build-system)
6863 (arguments
6864 '(#:phases
6865 (modify-phases %standard-phases
6866 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6867 ;; the Rakefile.
6868 (replace 'check
6869 (lambda* (#:key tests? #:allow-other-keys)
6870 (when tests?
6871 (invoke "rspec"))
6872 #t)))))
6873 (native-inputs
6874 `(("bundler" ,bundler)
6875 ("ruby-rspec" ,ruby-rspec)))
6876 (synopsis "Colorize printed text on ANSI terminals")
6877 (description
6878 "@code{rainbow} provides a string presenter object to colorize strings by
6879wrapping them in ANSI escape codes.")
6880 (home-page "https://github.com/sickill/rainbow")
79193b20
CB
6881 (license license:expat)))
6882
6188d643
CB
6883(define-public ruby-rr
6884 (package
6885 (name "ruby-rr")
6886 (version "1.2.1")
6887 (source
6888 (origin
6889 (method url-fetch)
6890 (uri (rubygems-uri "rr" version))
6891 (sha256
6892 (base32
6893 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6894 (build-system ruby-build-system)
6895 (arguments
6896 '(#:tests? #f)) ; test files not included
6897 (native-inputs
6898 `(("bundler" ,bundler)
6899 ("ruby-rspec" ,ruby-rspec)))
6900 (synopsis "Ruby test double framework")
6901 (description
6902 "RR is a test double framework that features a rich selection of double
6903techniques and a terse syntax.")
6904 (home-page "https://rr.github.io/rr/")
6905 (license license:expat)))
6906
79193b20
CB
6907(define-public ruby-rest-client
6908 (package
6909 (name "ruby-rest-client")
6910 (version "2.0.2")
6911 (source
6912 (origin
6913 (method url-fetch)
6914 (uri (rubygems-uri "rest-client" version))
6915 (sha256
6916 (base32
6917 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6918 (build-system ruby-build-system)
6919 (arguments
6920 '(#:phases
6921 (modify-phases %standard-phases
6922 (add-before 'check 'remove-unnecessary-development-dependencies
6923 (lambda _
6924 (substitute* "rest-client.gemspec"
6925 ;; Remove rubocop as it's unused. Rubocop also indirectly
6926 ;; depends on this package through ruby-parser and ruby-ast so
6927 ;; this avoids a dependency loop.
6928 ((".*rubocop.*") "\n")
6929 ;; Remove pry as it's unused, it's a debugging tool
6930 ((".*pry.*") "\n")
6931 ;; Remove an unnecessarily strict rdoc dependency
6932 ((".*rdoc.*") "\n"))
6933 #t))
6934 (add-before 'check 'delete-network-dependent-tests
6935 (lambda _
6936 (delete-file "spec/integration/request_spec.rb")
6937 (delete-file "spec/integration/httpbin_spec.rb")
6938 #t)))))
6939 (propagated-inputs
6940 `(("ruby-http-cookie" ,ruby-http-cookie)
6941 ("ruby-mime-types" ,ruby-mime-types)
6942 ("ruby-netrc" ,ruby-netrc)))
6943 (native-inputs
6944 `(("bundler" ,bundler)
eea094cc
TGR
6945 ("ruby-webmock" ,ruby-webmock-2)
6946 ("ruby-rspec" ,ruby-rspec)))
79193b20
CB
6947 (synopsis "Simple HTTP and REST client for Ruby")
6948 (description
6949 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6950inspired by the Sinatra microframework style of specifying actions:
6951@code{get}, @code{put}, @code{post}, @code{delete}.")
6952 (home-page "https://github.com/rest-client/rest-client")
6edabcb2
CB
6953 (license license:expat)))
6954
5c4c28f8
MC
6955(define-public ruby-rubocop-ast
6956 (package
6957 (name "ruby-rubocop-ast")
d0af85b1 6958 (version "0.3.0")
5c4c28f8
MC
6959 (source
6960 (origin
6961 (method git-fetch) ;no test suite in distributed gem
6962 (uri (git-reference
8ed4c468 6963 (url "https://github.com/rubocop-hq/rubocop-ast")
5c4c28f8
MC
6964 (commit (string-append "v" version))))
6965 (file-name (git-file-name name version))
6966 (sha256
6967 (base32
d0af85b1 6968 "1ycf6qcj8nbzk2js72priim4642lkn56w5kbny1nlryjkckxgm04"))))
5c4c28f8
MC
6969 (build-system ruby-build-system)
6970 (arguments
6971 `(#:test-target "spec"
6972 #:phases (modify-phases %standard-phases
6973 (add-after 'unpack 'disable-bundler
6974 (lambda _
6975 (substitute* "Rakefile"
6976 (("Bundler\\.setup.*") "nil\n"))
6977 #t))
6978 (replace 'replace-git-ls-files
6979 (lambda _
6980 (substitute* "rubocop-ast.gemspec"
6981 (("`git ls-files(.*)`" _ files)
6982 (format #f "`find ~a -type f| sort`" files)))
6983 #t)))))
6984 (native-inputs
6985 `(("ruby-bump" ,ruby-bump)
6986 ("ruby-rspec" ,ruby-rspec)))
6987 (propagated-inputs
6988 `(("ruby-parser" ,ruby-parser)))
6989 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6990 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6991by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6992@itemize
6993@item @code{RuboCop::AST::Node}
6994@item @code{RuboCop::AST::NodePattern}
6995@end itemize")
6996 (home-page "https://rubocop.org/")
6997 (license license:expat)))
6998
e098bdae
MC
6999(define-public ruby-rexml
7000 (package
7001 (name "ruby-rexml")
7002 (version "3.2.4")
7003 (source
7004 (origin
7005 (method git-fetch) ;no tests in distributed gem
7006 (uri (git-reference
8ed4c468 7007 (url "https://github.com/ruby/rexml")
e098bdae
MC
7008 (commit (string-append "v" version))))
7009 (file-name (git-file-name name version))
7010 (sha256
7011 (base32
7012 "0rhjjbkaq2f2cs8hyr2i4yjqpcyl8m0wmr2cypa401m3fvz4221i"))))
7013 (build-system ruby-build-system)
7014 (synopsis "XML toolkit for Ruby")
7015 (description "Inspired by Electric XML library for Java, REXML aims to be
7016easy-to-use API, small and fast. It supports both tree and stream document
7017parsing.")
7018 (home-page "https://github.com/ruby/rexml")
7019 (license license:bsd-2)))
7020
93ec41c6
MC
7021(define-public ruby-character-set
7022 (package
7023 (name "ruby-character-set")
7024 (version "1.4.0")
7025 (source
7026 (origin
7027 (method url-fetch)
7028 (uri (rubygems-uri "character_set" version))
7029 (sha256
7030 (base32
7031 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
7032 (build-system ruby-build-system)
7033 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
7034 (synopsis "Ruby library to manipulate Unicode")
7035 (description "CharacterSet is a C-extended Ruby library to work with sets
7036of Unicode code points. It can read and write these sets in various formats
7037and implements the @code{stdlib} @code{Set} interface for them. It also
7038offers an alternate paradigm of @code{String} processing which grants much
7039better performance than @code{Regexp} and @code{String} methods from the
7040@code{stdlib} where applicable. Many parts can be used independently, e.g.:
7041@itemize
7042@item @code{CharacterSet::Character}
7043@item @code{CharacterSet::Parser}
7044@item @code{CharacterSet::Writer}
7045@item @code{RangeCompressor}
7046@end itemize")
7047 (home-page "https://github.com/jaynetics/character_set")
7048 (license license:expat)))
7049
ac75f1df
MC
7050(define-public ruby-range-compressor
7051 (package
7052 (name "ruby-range-compressor")
7053 (version "1.0.0")
7054 (source
7055 (origin
7056 (method git-fetch)
7057 (uri (git-reference
8ed4c468 7058 (url "https://github.com/janosch-x/range_compressor")
ac75f1df
MC
7059 (commit (string-append "v" version))))
7060 (file-name (git-file-name name version))
7061 (sha256
7062 (base32
7063 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
7064 (build-system ruby-build-system)
7065 (arguments
7066 `(#:test-target "spec"
7067 #:phases (modify-phases %standard-phases
7068 (add-after 'extract-gemspec 'strip-version-requirements
7069 (lambda _
7070 (substitute* "range_compressor.gemspec"
7071 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7072 (string-append stripped "\n")))
7073 #t)))))
7074 (native-inputs
7075 `(("ruby-rspec" ,ruby-rspec)))
7076 (synopsis "Simple arrays of objects to arrays of ranges compressor")
7077 (description "RangeCompresses is a tiny library that allows compressing
7078arrays of objects into arrays of ranges. For example, it can turn the
7079following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
7080 (home-page "https://github.com/janosch-x/range_compressor")
7081 (license license:expat)))
7082
8aba0333
MC
7083(define-public ruby-regexp-property-values
7084 (package
7085 (name "ruby-regexp-property-values")
7086 (version "1.0.0")
7087 (source
7088 (origin
7089 (method git-fetch)
7090 (uri (git-reference ;no test suite in distributed gem
8ed4c468 7091 (url "https://github.com/jaynetics/regexp_property_values")
8aba0333
MC
7092 (commit (string-append "v" version))))
7093 (file-name (git-file-name name version))
7094 (sha256
7095 (base32
7096 "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
7097 (build-system ruby-build-system)
7098 (arguments
7099 '(#:test-target "default"))
7100 (native-inputs
7101 `(("ruby-character-set" ,ruby-character-set)
7102 ("ruby-rake-compiler" ,ruby-rake-compiler)
7103 ("ruby-range-compressor" ,ruby-range-compressor)
7104 ("ruby-rspec" ,ruby-rspec)))
7105 (synopsis "Inspect Ruby's regex engine property values")
7106 (description "This small library lets you see which property values are
7107supported by the regular expression engine of the Ruby version you are running
7108and can directly read out their code point ranges. In other words, it
7109determines all supported values for @code{\\p{value}} expressions and what
7110they match.")
7111 (home-page "https://github.com/jaynetics/regexp_property_values")
7112 (license license:expat)))
7113
b6f2a8d1
MC
7114(define-public ruby-regexp-parser
7115 (package
7116 (name "ruby-regexp-parser")
86d635b8 7117 (version "2.0.0")
b6f2a8d1
MC
7118 (source
7119 (origin
7120 (method git-fetch) ;bin/test missing from gem
7121 (uri (git-reference
8ed4c468 7122 (url "https://github.com/ammar/regexp_parser")
b6f2a8d1
MC
7123 (commit (string-append "v" version))))
7124 (file-name (git-file-name name version))
7125 (sha256
7126 (base32
86d635b8 7127 "09ddxdwlml30q6j4rqf06bbjj1mwx00rs0bksnyblhv85anrqz3k"))))
b6f2a8d1
MC
7128 (build-system ruby-build-system)
7129 (arguments
7130 '(#:test-target "default"
7131 #:phases (modify-phases %standard-phases
7132 (add-before 'build 'compile-scanner.rb
7133 (lambda _
7134 (invoke "rake" "build")
7135 ;; XXX: This is needed otherwise the install
7136 ;; phase fails to delete the installed cached
7137 ;; gem file.
7138 (delete-file-recursively "pkg")
7139 #t)))))
7140 (native-inputs
7141 `(("ragel" ,ragel)
7142 ("ruby-regexp-property-values" ,ruby-regexp-property-values)
7143 ("ruby-rspec" ,ruby-rspec)))
7144 (synopsis "A regular expression parser library for Ruby ")
7145 (description "A Ruby gem for tokenizing, parsing, and transforming regular
7146expressions. It comprises the following components:
7147@itemize
7148@item A scanner/tokenizer based on Ragel,
7149@item A lexer that produces a stream of token objects,
7150@item A parser that produces a tree of Expression objects.
7151@end itemize")
7152 (home-page "https://github.com/ammar/regexp_parser")
7153 (license license:expat)))
7154
12ed6da4
MC
7155(define-public ruby-test-queue
7156 (package
7157 (name "ruby-test-queue")
7158 (version "0.4.2")
7159 (source
7160 (origin
7161 (method url-fetch)
7162 (uri (rubygems-uri "test-queue" version))
7163 (sha256
7164 (base32
7165 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
7166 (build-system ruby-build-system)
7167 (arguments
7168 '(#:phases
7169 (modify-phases %standard-phases
7170 (replace 'check
7171 (lambda* (#:key tests? #:allow-other-keys)
7172 (when tests?
7173 (invoke "rspec"))
7174 #t)))))
7175 (native-inputs
7176 `(("ruby-rspec" ,ruby-rspec)))
7177 (synopsis "Minitest/RSpec parallel test runner for CI environments")
7178 (description "The test-queue module is a parallel test runner,
7179built using a centralized queue to ensure optimal distribution of
7180tests between workers. It is specifically optimized for Continuous
7181Integration (CI) environments: build statistics from each run are
7182stored locally and used to sort the queue at the beginning of the next
7183run.")
7184 (home-page "https://github.com/tmm1/test-queue")
7185 (license license:expat)))
7186
5d8fe6de
CB
7187(define-public ruby-rubocop
7188 (package
7189 (name "ruby-rubocop")
c164c402 7190 (version "0.88.0")
5d8fe6de
CB
7191 (source
7192 (origin
c164c402
MC
7193 (method git-fetch) ;no tests in distributed gem
7194 (uri (git-reference
8ed4c468 7195 (url "https://github.com/rubocop-hq/rubocop")
c164c402
MC
7196 (commit (string-append "v" version))))
7197 (file-name (git-file-name name version))
5d8fe6de
CB
7198 (sha256
7199 (base32
c164c402
MC
7200 "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
7201 (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
5d8fe6de
CB
7202 (build-system ruby-build-system)
7203 (arguments
c164c402
MC
7204 '(#:test-target "default"
7205 #:phases
7206 (modify-phases %standard-phases
7207 (add-after 'unpack 'remove-problematic-tests
7208 ;; These tests depend on Rubocop extensions, which cannot be
7209 ;; included as they cause a dependency cycle with Rubocop itself.
7210 (lambda _
7211 (delete-file "spec/rubocop/config_loader_spec.rb")
7212 (substitute* "Gemfile"
7213 ((".*'rubocop-performance'.*") "")
7214 ((".*'rubocop-rspec'.*") ""))
7215 ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
7216 ;; errors.
7217 (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
7218 (("# (rubocop:(enable|disable) RSpec.*)" _ what)
7219 (string-append "# Disabled: " what)))
7220 #t))
7221 (add-after 'unpack 'disable-bundler
7222 (lambda _
7223 (substitute* "Rakefile"
7224 (("Bundler\\.setup.*") "nil\n"))
7225 #t))
7226 (replace 'replace-git-ls-files
7227 (lambda _
7228 (substitute* "rubocop.gemspec"
7229 (("`git ls-files(.*)`" _ files)
7230 (format #f "`find ~a -type f| sort`" files)))
7231 #t))
7232 (add-before 'check 'set-home
7233 (lambda _
7234 (setenv "HOME" (getcwd))
7235 #t))
7236 (add-before 'check 'make-adoc-files-writable
7237 (lambda _
7238 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
7239 "\\.adoc$")))
7240 (for-each make-file-writable adoc-files))
7241 #t)))))
7242 (native-inputs
7243 `(("ruby-bump" ,ruby-bump)
7244 ("ruby-pry" ,ruby-pry)
7245 ("ruby-rspec" ,ruby-rspec)
7246 ("ruby-test-queue" ,ruby-test-queue)
7247 ("ruby-webmock" ,ruby-webmock-2)
7248 ("ruby-yard" ,ruby-yard)))
5d8fe6de 7249 (propagated-inputs
c164c402
MC
7250 `(("ruby-parallel" ,ruby-parallel)
7251 ("ruby-parser" ,ruby-parser)
5d8fe6de 7252 ("ruby-rainbow" ,ruby-rainbow)
c164c402
MC
7253 ("ruby-regexp-parser" ,ruby-regexp-parser)
7254 ("ruby-rexml" ,ruby-rexml)
7255 ("ruby-rubocop-ast" ,ruby-rubocop-ast)
5d8fe6de 7256 ("ruby-progressbar" ,ruby-progressbar)
5d8fe6de
CB
7257 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
7258 (synopsis "Ruby code style checking tool")
7259 (description
7260 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
7261the community-driven Ruby Style Guide.")
7262 (home-page "https://github.com/rubocop-hq/rubocop")
7263 (license license:expat)))
7264
6ef85256
BW
7265(define-public ruby-contest
7266 (package
7267 (name "ruby-contest")
7268 (version "0.1.3")
7269 (source
7270 (origin
7271 (method url-fetch)
7272 (uri (rubygems-uri "contest" version))
7273 (sha256
7274 (base32
7275 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
7276 (build-system ruby-build-system)
7277 (synopsis "Write declarative tests using nested contexts")
7278 (description
7279 "Contest allows writing declarative @code{Test::Unit} tests using nested
7280contexts without performance penalties.")
7281 (home-page "https://github.com/citrusbyte/contest")
7282 (license license:expat)))
7283
c4550f75
BW
7284(define-public ruby-creole
7285 (package
7286 (name "ruby-creole")
7287 (version "0.5.0")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (rubygems-uri "creole" version))
7292 (sha256
7293 (base32
7294 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
7295 (build-system ruby-build-system)
7296 (native-inputs
7297 `(("ruby-bacon" ,ruby-bacon)))
7298 (synopsis "Creole markup language converter")
7299 (description
7300 "Creole is a lightweight markup language and this library for converting
7301creole to @code{HTML}.")
7302 (home-page "https://github.com/minad/creole")
7303 (license license:ruby)))
7304
6aaa815e
PP
7305(define-public ruby-docile
7306 (package
7307 (name "ruby-docile")
7308 (version "1.1.5")
7309 (source
7310 (origin
7311 (method url-fetch)
7312 (uri (rubygems-uri "docile" version))
7313 (sha256
7314 (base32
7315 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
7316 (build-system ruby-build-system)
7317 (arguments
7318 '(#:tests? #f)) ; needs github-markup, among others
7319 (synopsis "Ruby EDSL helper library")
7320 (description "Docile is a Ruby library that provides an interface for
7321creating embedded domain specific languages (EDSLs) that manipulate existing
7322Ruby classes.")
7323 (home-page "https://ms-ati.github.io/docile/")
7324 (license license:expat)))
7325
fab8fed3
MC
7326(define-public ruby-middleware
7327 (package
7328 (name "ruby-middleware")
7329 (version "0.1.0")
7330 (source
7331 (origin
7332 (method url-fetch)
7333 (uri (rubygems-uri "middleware" version))
7334 (sha256
7335 (base32
7336 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
7337 (build-system ruby-build-system)
7338 (arguments '(#:tests? #f)) ;no test suite
7339 (synopsis "Implementation of a middleware abstraction for Ruby")
7340 (description "Middleware is a generalized implementation of a middleware
7341abstraction for Ruby.")
7342 (home-page "https://github.com/mitchellh/middleware")
7343 (license license:expat)))
7344
1d537c71
MC
7345(define-public ruby-benchmark-ips
7346 (package
7347 (name "ruby-benchmark-ips")
7348 (version "2.8.2")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (rubygems-uri "benchmark-ips" version))
7353 (sha256
7354 (base32
7355 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
7356 (build-system ruby-build-system)
7357 (native-inputs
7358 `(("ruby-hoe" ,ruby-hoe)))
7359 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
7360 (description "Benchmark-ips enhances the Ruby Benchmark module with the
7361iterations per second count. For short snippets of code, it can automatically
7362figure out how many times to run the code to get interesting data.")
7363 (home-page "https://github.com/evanphx/benchmark-ips")
7364 (license license:expat)))
7365
fc5d1c5a
MC
7366(define-public ruby-ffi-rzmq-core
7367 (package
7368 (name "ruby-ffi-rzmq-core")
7369 (version "1.0.7")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (rubygems-uri "ffi-rzmq-core" version))
7374 (sha256
7375 (base32
7376 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
7377 (build-system ruby-build-system)
7378 (arguments
7379 `(#:phases
7380 (modify-phases %standard-phases
7381 (add-after 'unpack 'patch-libzmq-search-path
7382 (lambda* (#:key inputs #:allow-other-keys)
7383 (let ((zeromq (assoc-ref inputs "zeromq")))
7384 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
7385 (("/usr/local/lib")
7386 (string-append zeromq "/lib")))
7387 #t)))
7388 (replace 'check
7389 (lambda _
7390 (invoke "rspec"))))))
7391 (native-inputs
7392 `(("ruby-rspec" ,ruby-rspec)))
7393 (inputs
7394 `(("zeromq" ,zeromq)))
7395 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7396 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
7397 (description "This library only provides the FFI wrapper for the ZeroMQ
7398networking library. It can be used to implement a Ruby API for the ZeroMQ
7399library.")
7400 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
7401 (license license:expat)))
7402
7a503516
MC
7403(define-public ruby-ffi-rzmq
7404 (package
7405 (name "ruby-ffi-rzmq")
7406 (version "2.0.7")
7407 (source
7408 (origin
7409 (method url-fetch)
7410 (uri (rubygems-uri "ffi-rzmq" version))
7411 (sha256
7412 (base32
7413 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
7414 (build-system ruby-build-system)
7415 (arguments '(#:tests? #t
7416 #:phases (modify-phases %standard-phases
7417 (replace 'check
7418 (lambda _
7419 (invoke "rspec"))))))
7420 (native-inputs
7421 `(("ruby-rspec" ,ruby-rspec)))
7422 (propagated-inputs
7423 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
7424 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
7425 (description "This library provides a high-level API that wraps the ZeroMQ
7426networking library using the Ruby foreign function interface (FFI). It is a
7427pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
7428for FFI.")
7429 (home-page "https://github.com/chuckremes/ffi-rzmq")
7430 (license license:expat)))
7431
03a0f98a
MC
7432(define-public ruby-sawyer
7433 (package
7434 (name "ruby-sawyer")
7435 (version "0.8.2")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (rubygems-uri "sawyer" version))
7440 (sha256
7441 (base32
7442 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
7443 (build-system ruby-build-system)
7444 (propagated-inputs
7445 `(("ruby-addressable" ,ruby-addressable)
7446 ("ruby-faraday" ,ruby-faraday)))
7447 (synopsis "Experimental hypermedia agent for Ruby")
7448 (description "Sawyer is an experimental hypermedia agent for Ruby built on
7449top of Faraday.")
7450 (home-page "https://github.com/lostisland/sawyer")
7451 (license license:expat)))
7452
aa3c76b1
MC
7453(define-public ruby-octokit
7454 (package
7455 (name "ruby-octokit")
7456 (version "4.18.0")
7457 (source
7458 (origin
7459 (method url-fetch)
7460 (uri (rubygems-uri "octokit" version))
7461 (sha256
7462 (base32
7463 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
7464 (build-system ruby-build-system)
7465 (arguments '(#:tests? #f)) ;no test suite in the gem release
7466 (propagated-inputs
7467 `(("ruby-faraday" ,ruby-faraday)
7468 ("ruby-sawyer" ,ruby-sawyer)))
7469 (synopsis "Ruby toolkit for the GitHub API")
7470 (description "Octokit wraps the GitHub API in a flat API client that
7471follows Ruby conventions and requires little knowledge of REST.")
7472 (home-page "https://github.com/octokit/octokit.rb")
7473 (license license:expat)))
7474
1157d2f8
MC
7475(define-public ruby-chandler
7476 (package
7477 (name "ruby-chandler")
7478 (version "0.9.0")
7479 (source
7480 (origin
7481 (method url-fetch)
7482 (uri (rubygems-uri "chandler" version))
7483 (sha256
7484 (base32
7485 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
7486 (build-system ruby-build-system)
7487 (native-inputs
7488 `(("ruby-rubocop" ,ruby-rubocop)))
7489 (propagated-inputs
7490 `(("ruby-netrc" ,ruby-netrc)
7491 ("ruby-octokit" ,ruby-octokit)))
7492 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
7493 (description "Chandler syncs a project's CHANGELOG file entries to
7494GitHub's release notes to remove the need of manually entering release
7495notes.")
7496 (home-page "https://github.com/mattbrictson/chandler")
7497 (license license:expat)))
7498
acb28876
MC
7499(define-public ruby-pry-byebug
7500 (package
7501 (name "ruby-pry-byebug")
7502 (version "3.9.0")
7503 (source
7504 (origin
7505 (method git-fetch)
7506 (uri (git-reference
b0e7b699 7507 (url "https://github.com/deivid-rodriguez/pry-byebug")
acb28876
MC
7508 (commit (string-append "v" version))))
7509 (file-name (git-file-name name version))
7510 (sha256
7511 (base32
7512 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7513 (build-system ruby-build-system)
7514 (arguments
7515 `(#:phases (modify-phases %standard-phases
7516 (add-before 'check 'set-home
7517 (lambda _
7518 (setenv "HOME" (getcwd))
7519 #t)))))
7520 (native-inputs
7521 `(("ruby-chandler" ,ruby-chandler)
7522 ("ruby-rubocop" ,ruby-rubocop)
7523 ("ruby-simplecov" ,ruby-simplecov)))
7524 (propagated-inputs
7525 `(("ruby-byebug" ,ruby-byebug-11)
7526 ("ruby-pry" ,ruby-pry)))
7527 (synopsis "Step-by-step debugging and stack navigation in Pry")
7528 (description "This package adds step-by-step debugging and stack
7529navigation capabilities to @code{pry}, using @code{byebug}.")
7530 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7531 (license license:expat)))
7532
4d31fe6b
MC
7533(define-public ruby-binding-of-caller
7534 (package
7535 (name "ruby-binding-of-caller")
7536 (version "0.8.0")
7537 (source
7538 (origin
7539 (method url-fetch)
7540 (uri (rubygems-uri "binding_of_caller" version))
7541 (sha256
7542 (base32
7543 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7544 (build-system ruby-build-system)
7545 ;; Attempting to run the test suite fails with a rake deprecation error
7546 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7547 (arguments '(#:tests? #f))
7548 (propagated-inputs
7549 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
7550 (synopsis "Retrieve the binding of a method's caller")
7551 (description "The @code{binding_of_caller} module provides the
7552@code{Binding#of_caller} method. It allows accessing bindings from upper
7553frames in the call stack and can evaluate code in that context.")
7554 (home-page "https://github.com/banister/binding_of_caller")
7555 (license license:expat)))
7556
f4699abc
MC
7557(define-public ruby-pry-stack-explorer
7558 (package
7559 (name "ruby-pry-stack-explorer")
7560 (version "0.5.1")
7561 (source
7562 (origin
7563 (method url-fetch)
7564 (uri (rubygems-uri "pry-stack_explorer" version))
7565 (sha256
7566 (base32
7567 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7568 (build-system ruby-build-system)
7569 (arguments '(#:tests? #f)) ;no test suite in gem release
7570 (propagated-inputs
7571 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
7572 ("ruby-pry" ,ruby-pry)))
7573 (synopsis "Call-stack navigation plugin for the Pry REPL")
7574 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7575add support to navigate the call-stack.")
7576 (home-page "https://github.com/pry/pry-stack_explorer")
7577 (license license:expat)))
7578
1f014c97
MC
7579(define-public ruby-varint
7580 (package
7581 (name "ruby-varint")
7582 (version "0.1.1")
7583 (source
7584 (origin
7585 (method url-fetch)
7586 (uri (rubygems-uri "varint" version))
7587 (sha256
7588 (base32
7589 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7590 (build-system ruby-build-system)
7591 (arguments '(#:tests? #f)) ;no test suite
7592 (synopsis "Variable length integers (varint) C extension for Ruby")
7593 (description "This package provides a small C extension to speed up
7594variable length integers (varint) in Ruby Protocol Buffers.")
7595 (home-page "https://github.com/liquidm/varint")
7596 (license license:bsd-3)))
7597
1b214174
MC
7598(define-public ruby-ruby-prof
7599 (package
7600 (name "ruby-ruby-prof")
7601 (version "1.4.1")
7602 (source
7603 (origin
7604 (method url-fetch)
7605 (uri (rubygems-uri "ruby-prof" version))
7606 (sha256
7607 (base32
7608 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
7609 (build-system ruby-build-system)
7610 (arguments
7611 `(#:phases
7612 (modify-phases %standard-phases
7613 (add-after 'unpack 'patch-rakefile
7614 ;; This fixes the following error: "NameError: uninitialized
7615 ;; constant Bundler::GemHelper" (see:
7616 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7617 (lambda _
7618 (substitute* "Rakefile"
7619 ((".*require \"bundler/setup\".*" all)
7620 (string-append all " require 'bundler/gem_tasks'\n")))
7621 #t))
661ad8d7
MC
7622 ;; The LineNumbersTest test fails non-deterministically (see:
7623 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7624 (add-after 'extract-gemspec 'delete-flaky-test
7625 (lambda _
7626 (delete-file "test/line_number_test.rb")
7627 (substitute* "ruby-prof.gemspec"
7628 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7629 #t))
1b214174
MC
7630 (add-before 'check 'compile
7631 (lambda _
7632 (invoke "rake" "compile"))))))
7633 (native-inputs
7634 `(("bundler" ,bundler)
7635 ("ruby-minitest" ,ruby-minitest)
7636 ("ruby-rake-compiler" ,ruby-rake-compiler)
7637 ("ruby-rdoc" ,ruby-rdoc)))
7638 (synopsis "Fast code profiler for Ruby")
7639 (description "RubyProf is a fast code profiler for Ruby. Its features
7640include:
7641@table @asis
7642@item Speed
7643Being a C extension, it is many times faster than the standard Ruby profiler.
7644@item Measurement Modes
7645It can measure program wall time, process time, object allocations and memory
7646usage.
7647@item Reports
7648A variety of text and cross-referenced HTML reports can be generated.
7649@item Threads
7650Profiling multiple threads simultaneously is supported.
7651@end table")
7652 (home-page "https://github.com/ruby-prof/ruby-prof")
7653 (license license:bsd-2)))
7654
dff5392f
MC
7655(define-public ruby-cucumber-messages
7656 (package
7657 (name "ruby-cucumber-messages")
7658 (version "12.2.0")
7659 (source (origin
7660 (method git-fetch)
7661 (uri (git-reference
b0e7b699 7662 (url "https://github.com/cucumber/messages-ruby")
dff5392f
MC
7663 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7664 (file-name (git-file-name name version))
7665 (sha256
7666 (base32
7667 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7668 (build-system ruby-build-system)
7669 (arguments
7670 `(#:phases (modify-phases %standard-phases
7671 (add-after 'unpack 'patch-protobuf.rb
7672 (lambda _
7673 (substitute* "rake/protobuf.rb"
7674 (("load 'protobuf/tasks/compile.rake'")
7675 "require 'protobuf/tasks'"))
7676 #t))
7677 (add-before 'build 'compile
7678 (lambda _
7679 (substitute* "Makefile"
7680 (("bundle exec ") "")
7681 (("include default.mk.*" all)
7682 (string-append "#" all)))
7683 (invoke "make")))
7684 (replace 'check
7685 (lambda _
7686 (invoke "rspec"))))))
7687 (propagated-inputs
7688 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7689 (native-inputs
7690 `(("ruby-rspec" ,ruby-rspec)))
7691 (home-page "https://github.com/cucumber/messages-ruby")
7692 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7693 (description "Cucumber Messages for Ruby is a library which allows
7694serialization and deserialization of the protocol buffer messages used in
7695Cucumber.")
7696 (license license:expat)))
7697
44514637 7698(define-public ruby-gherkin
62e4cc5a 7699 (package
44514637 7700 (name "ruby-gherkin")
cfef316f
MC
7701 (version "14.0.1")
7702 (source (origin
7703 (method git-fetch)
7704 (uri (git-reference
7705 (url "https://github.com/cucumber/gherkin-ruby")
7706 (commit (string-append "v" version))))
7707 (file-name (git-file-name name version))
7708 (sha256
7709 (base32
7710 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
62e4cc5a
PP
7711 (build-system ruby-build-system)
7712 (native-inputs
cfef316f
MC
7713 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7714 ("ruby-rspec" ,ruby-rspec)))
62e4cc5a 7715 (arguments
cfef316f 7716 `(#:test-target "spec"))
62e4cc5a 7717 (synopsis "Gherkin parser for Ruby")
44514637 7718 (description "Gherkin is a parser and compiler for the Gherkin language.
aada5f6f
CB
7719It is intended be used by all Cucumber implementations to parse
7720@file{.feature} files.")
cfef316f 7721 (home-page "https://github.com/cucumber/gherkin-ruby")
62e4cc5a 7722 (license license:expat)))
cd89fecb 7723
8f85018d
MB
7724(define-public ruby-gherkin-ruby
7725 (package
7726 (name "ruby-gherkin-ruby")
7727 (version "0.3.2")
702a1012 7728 (home-page "https://github.com/codegram/gherkin-ruby")
8f85018d
MB
7729 (source (origin
7730 (method url-fetch)
7731 (uri (rubygems-uri "gherkin-ruby" version))
7732 (sha256
7733 (base32
7734 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7735 (build-system ruby-build-system)
7736 (synopsis "Pure Ruby Gherkin parser")
7737 (description
7738 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7739200 lines of code.")
7740 ;; XXX: No license information anywhere but Readme.md.
7741 (license license:expat)))
7742
15b16c2c
CB
7743(define-public ruby-aruba
7744 (package
7745 (name "ruby-aruba")
cf7201c4 7746 (version "0.14.14")
15b16c2c
CB
7747 (source
7748 (origin
7749 (method url-fetch)
7750 (uri (rubygems-uri "aruba" version))
7751 (sha256
7752 (base32
cf7201c4 7753 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
15b16c2c
CB
7754 (build-system ruby-build-system)
7755 (arguments
7756 '(#:test-target "spec"
7757 #:phases
7758 (modify-phases %standard-phases
7759 (add-after 'unpack 'patch
7760 (lambda _
7761 (substitute* "spec/aruba/api_spec.rb"
7762 ;; This resolves some errors in the specs
7763 ;;
7764 ;; undefined method `parse' for Time:Class
7765 (("require 'spec_helper'")
7766 "require 'spec_helper'\nrequire 'time'"))
7767 ;; Avoid shebang issues in this spec file
7768 (substitute* "spec/aruba/matchers/command_spec.rb"
7769 (("/usr/bin/env bash")
7770 (which "bash")))
7771 #t))
7772 (add-before 'check 'remove-unnecessary-dependencies
7773 (lambda _
7774 (substitute* "Gemfile"
7775 ((".*byebug.*") "\n")
7776 ((".*pry.*") "\n")
7777 ((".*yaml.*") "\n")
7778 ((".*bcat.*") "\n")
7779 ((".*kramdown.*") "\n")
7780 ((".*rubocop.*") "\n")
7781 ((".*cucumber-pro.*") "\n")
7782 ((".*cucumber.*") "\n")
7783 ((".*license_finder.*") "\n")
7784 ((".*rake.*") "gem 'rake'\n")
15b16c2c 7785 ((".*relish.*") "\n"))
15b16c2c
CB
7786 (substitute* "aruba.gemspec"
7787 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7788 "spec.add_runtime_dependency 'cucumber'"))
7789 #t))
7790 (add-before 'check 'set-home
7791 (lambda _ (setenv "HOME" "/tmp") #t)))))
7792 (native-inputs
7793 `(("bundler" ,bundler)
7794 ("ruby-rspec" ,ruby-rspec)
cf7201c4
CB
7795 ("ruby-fuubar" ,ruby-fuubar)
7796 ("ruby-simplecov" ,ruby-simplecov)))
15b16c2c
CB
7797 (propagated-inputs
7798 `(("ruby-childprocess" ,ruby-childprocess)
7799 ("ruby-contracts" ,ruby-contracts)
7800 ("ruby-cucumber" ,ruby-cucumber)
7801 ("ruby-ffi" ,ruby-ffi)
7802 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
7803 ("ruby-thor" ,ruby-thor)
7804 ("ruby-yard" ,ruby-yard)))
7805 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7806 (description
7807 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7808command-line applications. It supports applications written in any
7809language.")
7810 (home-page "https://github.com/cucumber/aruba")
7811 (license license:expat)))
7812
7813;; A version of ruby-aruba without tests run so that circular dependencies can
7814;; be avoided.
7815(define ruby-aruba-without-tests
7816 (package
7817 (inherit ruby-aruba)
7818 (arguments '(#:tests? #f))
7819 (propagated-inputs
7820 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7821 ,@(alist-delete "ruby-cucumber"
7822 (package-propagated-inputs ruby-aruba))))
7823 (native-inputs '())))
7824
fd6577b4
MC
7825(define-public ruby-sys-uname
7826 (package
7827 (name "ruby-sys-uname")
7828 (version "1.2.1")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (rubygems-uri "sys-uname" version))
7833 (sha256
7834 (base32
7835 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7836 (build-system ruby-build-system)
7837 (arguments
7838 `(#:test-target "spec"))
7839 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7840 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
7841 (synopsis "Ruby interface for gathering system information")
7842 (description "The sys-uname library provides an interface for gathering
7843information about your current platform. It allows retrieving information
7844such as the OS name, OS version, system name, etc.")
7845 (home-page "https://github.com/djberg96/sys-uname")
7846 (license license:asl2.0)))
7847
ac3ec612
MC
7848(define-public ruby-cucumber-create-meta
7849 (package
7850 (name "ruby-cucumber-create-meta")
7851 (version "1.0.0")
7852 (source
7853 (origin
7854 (method url-fetch)
7855 (uri (rubygems-uri "cucumber-create-meta" version))
7856 (sha256
7857 (base32
7858 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7859 (build-system ruby-build-system)
7860 (arguments
7861 `(#:phases (modify-phases %standard-phases
7862 (add-after 'extract-gemspec 'relax-version-requirements
7863 (lambda _
7864 (substitute* ".gemspec"
7865 ((" 12\\.2")
7866 " 12.1"))
7867 #t))
7868 (replace 'check
7869 (lambda _
7870 (invoke "rspec"))))))
7871 (native-inputs
7872 `(("ruby-rspec" ,ruby-rspec)))
7873 (propagated-inputs
7874 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7875 ("ruby-sys-uname" ,ruby-sys-uname)))
7876 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7877 (description "The @code{createMeta} utility function allows generating
7878system-specific @code{Meta} messages for Cucumber Ruby.")
7879 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7880 (license license:expat)))
7881
f3574624
MC
7882(define-public ruby-cucumber-html-formatter
7883 (package
7884 (name "ruby-cucumber-html-formatter")
7885 (version "7.0.0")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 (uri (rubygems-uri "cucumber-html-formatter" version))
7890 (sha256
7891 (base32
7892 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7893 (build-system ruby-build-system)
7894 (arguments
7895 `(#:phases (modify-phases %standard-phases
7896 (replace 'check
7897 (lambda _
7898 (invoke "rspec"))))))
7899 (native-inputs
7900 `(("ruby-rspec" ,ruby-rspec)))
7901 (propagated-inputs
7902 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7903 (synopsis "HTML formatter for Cucumber")
7904 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7905runs. It is built on top of cucumber-react and works with any Cucumber
7906implementation with a protocol buffer formatter that outputs Cucumber
7907messages.")
7908 (home-page "https://github.com/cucumber/cucumber/tree/\
7909master/html-formatter/ruby")
7910 (license license:expat)))
7911
15b16c2c
CB
7912(define-public ruby-cucumber
7913 (package
7914 (name "ruby-cucumber")
92ebbaad 7915 (version "4.1.0")
15b16c2c
CB
7916 (source
7917 (origin
7918 (method git-fetch)
7919 (uri (git-reference
b0e7b699 7920 (url "https://github.com/cucumber/cucumber-ruby")
15b16c2c
CB
7921 (commit (string-append "v" version))))
7922 (file-name (git-file-name name version))
7923 (sha256
7924 (base32
92ebbaad 7925 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
15b16c2c
CB
7926 (build-system ruby-build-system)
7927 (arguments
fa8e4dbf 7928 '(#:test-target "default"
15b16c2c
CB
7929 #:phases
7930 (modify-phases %standard-phases
fa8e4dbf
MC
7931 (add-after 'unpack 'disable-rubocop
7932 ;; Rubocop lint check fails with our more recent version.
7933 (lambda _
7934 (substitute* "Rakefile"
7935 (("spec cucumber rubocop")
7936 "spec cucumber"))
7937 #t))
92ebbaad 7938 (add-after 'extract-gemspec 'strip-version-requirements
15b16c2c 7939 (lambda _
fa8e4dbf 7940 (delete-file "Gemfile") ;do not use Bundler
92ebbaad
MC
7941 (substitute* "cucumber.gemspec"
7942 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7943 (string-append stripped "\n")))
fa8e4dbf
MC
7944 #t))
7945 (add-before 'check 'set-home
7946 (lambda _
7947 (setenv "HOME" (getcwd))
15b16c2c
CB
7948 #t)))))
7949 (propagated-inputs
7950 `(("ruby-builder" ,ruby-builder)
7951 ("ruby-cucumber-core" ,ruby-cucumber-core)
92ebbaad
MC
7952 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7953 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7954 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
15b16c2c 7955 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
15b16c2c
CB
7956 ("ruby-diff-lcs" ,ruby-diff-lcs)
7957 ("ruby-gherkin" ,ruby-gherkin)
7958 ("ruby-multi-json" ,ruby-multi-json)
7959 ("ruby-multi-test" ,ruby-multi-test)))
7960 (native-inputs
92ebbaad 7961 `(;; Use a untested version of aruba, to avoid a circular dependency, as
15b16c2c 7962 ;; ruby-aruba depends on ruby-cucumber.
1628d57b 7963 ("ruby-aruba" ,ruby-aruba-without-tests)
15b16c2c
CB
7964 ("ruby-rspec" ,ruby-rspec)
7965 ("ruby-pry" ,ruby-pry)
92ebbaad
MC
7966 ("ruby-nokogiri" ,ruby-nokogiri)
7967 ("ruby-rubocop" ,ruby-rubocop)))
15b16c2c 7968 (synopsis "Describe automated tests in plain language")
92ebbaad
MC
7969 (description "Cucumber is a tool for running automated tests written in
7970plain language. It's designed to support a Behaviour Driven Development (BDD)
15b16c2c
CB
7971software development workflow.")
7972 (home-page "https://cucumber.io/")
7973 (license license:expat)))
7974
7975(define ruby-cucumber-without-tests
7976 (package (inherit ruby-cucumber)
7977 (arguments
7978 '(#:tests? #f))
7979 (native-inputs
7980 '())))
7981
f048ef52
MC
7982(define-public ruby-coveralls
7983 (package
7984 (name "ruby-coveralls")
7985 (version "0.8.23")
7986 (source
7987 (origin
7988 (method url-fetch)
7989 (uri (rubygems-uri "coveralls" version))
7990 (sha256
7991 (base32
7992 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7993 (build-system ruby-build-system)
7994 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
fe9993b1
MC
7995 ;; because of its nonfree, Hippocratic-derived license.
7996 (arguments
7997 `(#:tests? #f
7998 #:phases (modify-phases %standard-phases
7999 (add-after 'extract-gemspec 'strip-version-requirements
8000 ;; Keeping strict version requirements can cause problems
8001 ;; to users of the library, such as: Gem::ConflictError:
8002 ;; Unable to activate coveralls-0.8.23, because
8003 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
8004 (lambda _
8005 (substitute* "coveralls-ruby.gemspec"
8006 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
8007 (string-append stripped ")\n")))
8008 #t)))))
f048ef52
MC
8009 (propagated-inputs
8010 `(("ruby-json" ,ruby-json)
8011 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
8012 ("ruby-thor" ,ruby-thor)
8013 ("ruby-tins" ,ruby-tins)))
8014 (synopsis "Ruby implementation of the Coveralls API")
8015 (description "This package provides a Ruby implementation of the Coveralls
8016API.")
8017 (home-page "https://coveralls.io")
8018 (license license:expat)))
f2a1b7fa
MC
8019
8020(define-public ruby-unindent
8021 (package
8022 (name "ruby-unindent")
8023 (version "1.0")
8024 (source
8025 (origin
8026 (method url-fetch)
8027 (uri (rubygems-uri "unindent" version))
8028 (sha256
8029 (base32
8030 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
8031 (build-system ruby-build-system)
8032 (synopsis "Ruby method to unindent strings")
8033 (description "This module provides a @code{String#unindent} Ruby method to
8034unindent strings, which can be useful to unindent multiline strings embedded
8035in already-indented code.")
8036 (home-page "https://github.com/mynyml/unindent")
8037 (license license:expat)))
f048ef52 8038
cd89fecb
PP
8039(define-public ruby-cucumber-core
8040 (package
8041 (name "ruby-cucumber-core")
95a5d992 8042 (version "7.1.0")
cd89fecb
PP
8043 (source
8044 (origin
95a5d992
MC
8045 (method git-fetch)
8046 (uri (git-reference
b0e7b699 8047 (url "https://github.com/cucumber/cucumber-ruby-core")
95a5d992
MC
8048 (commit (string-append "v" version))))
8049 (file-name (git-file-name name version))
cd89fecb
PP
8050 (sha256
8051 (base32
95a5d992 8052 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
cd89fecb 8053 (build-system ruby-build-system)
95a5d992
MC
8054 (arguments
8055 `(#:test-target "spec"
8056 #:phases
8057 (modify-phases %standard-phases
8058 (add-after 'extract-gemspec 'relax-version-requirements
8059 (lambda _
8060 (substitute* "cucumber-core.gemspec"
8061 (("'cucumber-tag-expressions',.*")
8062 "'cucumber-tag-expressions', '>=2.0.0'\n"))
8063 #t)))))
8064 (native-inputs
8065 `(("ruby-rspec" ,ruby-rspec)
8066 ("ruby-coveralls" ,ruby-coveralls)
8067 ("ruby-rubocop" ,ruby-rubocop)
8068 ("ruby-simplecov" ,ruby-simplecov)
8069 ("ruby-unindent" ,ruby-unindent)))
cd89fecb 8070 (propagated-inputs
95a5d992 8071 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
5cd047e8
CB
8072 ("ruby-gherkin" ,ruby-gherkin)
8073 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
cd89fecb
PP
8074 (synopsis "Core library for the Cucumber BDD app")
8075 (description "Cucumber is a tool for running automated tests
8076written in plain language. Because they're written in plain language,
8077they can be read by anyone on your team. Because they can be read by
8078anyone, you can use them to help improve communication, collaboration
8079and trust on your team.")
8080 (home-page "https://cucumber.io/")
8081 (license license:expat)))
212d563d 8082
fb1a8954
CB
8083(define-public ruby-cucumber-expressions
8084 (package
8085 (name "ruby-cucumber-expressions")
4ada4a42 8086 (version "10.2.0")
fb1a8954
CB
8087 (source
8088 (origin
4ada4a42
MC
8089 (method git-fetch)
8090 (uri (git-reference
b0e7b699 8091 (url "https://github.com/cucumber/cucumber-expressions-ruby")
4ada4a42
MC
8092 (commit (string-append "v" version))))
8093 (file-name (git-file-name name version))
fb1a8954
CB
8094 (sha256
8095 (base32
4ada4a42 8096 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
fb1a8954
CB
8097 (build-system ruby-build-system)
8098 (arguments
8099 '(#:test-target "spec"))
8100 (native-inputs
4ada4a42 8101 `(("ruby-rspec" ,ruby-rspec)
fb1a8954
CB
8102 ("ruby-simplecov" ,ruby-simplecov)))
8103 (synopsis "Simpler alternative to Regular Expressions")
8104 (description "Cucumber Expressions offer similar functionality to Regular
8105Expressions, with a syntax that is easier to read and write. Cucumber
8106Expressions are extensible with parameter types.")
8107 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
8108 (license license:expat)))
8109
ce872770
CB
8110(define-public ruby-cucumber-wire
8111 (package
8112 (name "ruby-cucumber-wire")
6516827e 8113 (version "3.1.0")
ce872770
CB
8114 (source
8115 (origin
8116 (method url-fetch)
8117 (uri (rubygems-uri "cucumber-wire" version))
8118 (sha256
8119 (base32
6516827e 8120 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
ce872770
CB
8121 (build-system ruby-build-system)
8122 (arguments
6516827e 8123 '(#:tests? #f ;tests use cucumber, causing a cycle
ce872770
CB
8124 #:phases
8125 (modify-phases %standard-phases
6516827e 8126 (add-after 'extract-gemspec 'relax-version-requirements
ce872770 8127 (lambda _
6516827e
MC
8128 (substitute* ".gemspec"
8129 ((" 10\\.1") " 10.2"))
ce872770 8130 #t)))))
6516827e
MC
8131 (propagated-inputs
8132 `(("ruby-cucumber-core" ,ruby-cucumber-core)
8133 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
8134 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
ce872770 8135 (synopsis "Cucumber wire protocol plugin")
6516827e
MC
8136 (description "Cucumber's wire protocol allows step definitions to be
8137implemented and invoked on any platform.")
ce872770
CB
8138 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
8139 (license license:expat)))
8140
0ce8f344
CB
8141(define-public ruby-cucumber-tag-expressions
8142 (package
8143 (name "ruby-cucumber-tag-expressions")
0d2c45ce 8144 (version "3.0.0")
0ce8f344
CB
8145 (source
8146 (origin
0d2c45ce
MC
8147 (method git-fetch)
8148 (uri (git-reference
b0e7b699 8149 (url "https://github.com/cucumber/tag-expressions-ruby")
0d2c45ce
MC
8150 (commit (string-append "v" version))))
8151 (file-name (git-file-name name version))
0ce8f344
CB
8152 (sha256
8153 (base32
0d2c45ce 8154 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
0ce8f344
CB
8155 (build-system ruby-build-system)
8156 (arguments
0d2c45ce 8157 `(#:test-target "spec"))
0ce8f344
CB
8158 (native-inputs
8159 `(("ruby-rspec" ,ruby-rspec)))
8160 (synopsis "Cucumber tag expressions for Ruby")
0d2c45ce
MC
8161 (description "Cucumber tag expression parser for Ruby. A tag expression
8162is an infix boolean expression used by Cucumber.")
0ce8f344
CB
8163 (home-page "https://github.com/cucumber/tag-expressions-ruby")
8164 (license license:expat)))
8165
73a5aff7
CB
8166(define-public ruby-bindex
8167 (package
8168 (name "ruby-bindex")
8169 (version "0.5.0")
8170 (source
8171 (origin
8172 (method url-fetch)
8173 (uri (rubygems-uri "bindex" version))
8174 (sha256
8175 (base32
8176 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
8177 (build-system ruby-build-system)
8178 (arguments
8179 '(#:test-target "default"))
8180 (native-inputs
8181 `(("bundler" ,bundler)
8182 ("ruby-rake-compiler" ,ruby-rake-compiler)))
8183 (synopsis "Provides access for bindings relating to Ruby exceptions")
8184 (description
8185 "@code{bindex} provides a way to access the bindings that relate to
8186exceptions in Ruby, providing more information about the context in which the
8187exception occurred.")
8188 (home-page "https://github.com/gsamokovarov/bindex")
8189 (license license:expat)))
8190
212d563d
PP
8191(define-public ruby-bio-logger
8192 (package
8193 (name "ruby-bio-logger")
8194 (version "1.0.1")
8195 (source
8196 (origin
8197 (method url-fetch)
8198 (uri (rubygems-uri "bio-logger" version))
8199 (sha256
8200 (base32
8201 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
8202 (build-system ruby-build-system)
8203 (arguments
8204 `(#:tests? #f)) ; rake errors, missing shoulda
8205 (propagated-inputs
8206 `(("ruby-log4r" ,ruby-log4r)))
8207 (synopsis "Log4r wrapper for Ruby")
8208 (description "Bio-logger is a wrapper around Log4r adding extra logging
8209features such as filtering and fine grained logging.")
8210 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
8211 (license license:expat)))
07f61cb2 8212
2db0f9c8
BW
8213(define-public ruby-yajl-ruby
8214 (package
8215 (name "ruby-yajl-ruby")
8216 (version "1.4.1")
8217 (source
8218 (origin
8219 (method url-fetch)
8220 (uri (rubygems-uri "yajl-ruby" version))
8221 (sha256
8222 (base32
8223 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
8224 (build-system ruby-build-system)
8225 (arguments
8226 '(#:test-target "spec"
8227 #:phases
8228 (modify-phases %standard-phases
8229 (add-before 'check 'patch-test-to-update-load-path
8230 (lambda _
8231 (substitute* "spec/parsing/large_number_spec.rb"
8232 (("require \"yajl\"")
8233 "$LOAD_PATH << 'lib'; require 'yajl'"))
8234 #t)))))
8235 (native-inputs
8236 `(("ruby-rake-compiler" ,ruby-rake-compiler)
8237 ("ruby-rspec" ,ruby-rspec)))
8238 (synopsis "Streaming JSON parsing and encoding library for Ruby")
8239 (description
8240 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
8241is compatible with the JSON gem, so yajl-ruby can act as a drop in
8242replacement.
8243
8244A modified copy of yajl is used, and included in the package.")
8245 (home-page "https://github.com/brianmario/yajl-ruby")
8246 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
8247 license:bsd-3)))) ; Included, modified copy of yajl
8248
07f61cb2 8249(define-public ruby-yard
6499893e
BW
8250 (package
8251 (name "ruby-yard")
7eb8ff0b 8252 (version "0.9.25")
6499893e
BW
8253 (source
8254 (origin
f3fd70c0 8255 (method git-fetch)
6499893e 8256 ;; Tests do not pass if we build from the distributed gem.
f3fd70c0 8257 (uri (git-reference
65a61239
MC
8258 (url "https://github.com/lsegal/yard")
8259 (commit (string-append "v" version))))
f3fd70c0 8260 (file-name (git-file-name name version))
6499893e
BW
8261 (sha256
8262 (base32
7eb8ff0b 8263 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
6499893e
BW
8264 (build-system ruby-build-system)
8265 (arguments
65a61239
MC
8266 ;; Note: Tests are willfully disabled to alleviate dependency cycle
8267 ;; problems.
479c0324
MC
8268 `(#:tests? #f
8269 #:phases (modify-phases %standard-phases
8270 (add-after 'unpack 'do-not-set-date-in-gemspec
8271 ;; Fix a reproducibility issue (see:
8272 ;; https://github.com/lsegal/yard/issues/1343).
8273 (lambda _
8274 (substitute* "yard.gemspec"
8275 ((".*s\\.date.*") ""))
8276 #t)))))
6499893e 8277 (synopsis "Documentation generation tool for Ruby")
65a61239
MC
8278 (description "YARD is a documentation generation tool for the Ruby
8279programming language. It enables the user to generate consistent, usable
8280documentation that can be exported to a number of formats very easily, and
8281also supports extending for custom Ruby constructs such as custom class level
8282definitions.")
2f3800e5 8283 (home-page "https://yardoc.org")
6499893e 8284 (license license:expat)))
2cbcd23a 8285
df32ab11
MC
8286(define-public ruby-yard-with-tests
8287 (package
8288 (inherit ruby-yard)
8289 (name "ruby-yard-with-tests")
8290 (arguments
8291 (substitute-keyword-arguments (package-arguments ruby-yard)
8292 ((#:tests? _ #t) #t)
8293 ((#:test-target _ "default") "default")
8294 ((#:phases phases '%standard-phases)
8295 `(modify-phases ,phases
8296 (add-before 'check 'prepare-for-tests
8297 (lambda* (#:key tests? #:allow-other-keys)
8298 (when tests?
8299 (substitute* "Rakefile"
8300 ((".*[Ss]amus.*") ""))
8301 ;; Delete the Gemfile to avoid errors relating to it.
8302 (delete-file "Gemfile")
8303 ;; $HOME needs to be set to somewhere writeable for tests to
8304 ;; run.
8305 (setenv "HOME" "/tmp"))
8306 #t))))))
8307 (native-inputs
8308 `(("ruby-rspec" ,ruby-rspec)
8309 ("ruby-rack" ,ruby-rack)
8310 ("ruby-redcloth" ,ruby-redcloth)
8311 ("ruby-asciidoc" ,ruby-asciidoctor)))))
8312
908df675
MC
8313(define-public ruby-spectroscope
8314 (package
8315 (name "ruby-spectroscope")
8316 (version "0.1.0")
8317 (source
8318 (origin
8319 (method url-fetch)
8320 (uri (rubygems-uri "spectroscope" version))
8321 (sha256
8322 (base32
8323 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
8324 (build-system ruby-build-system)
8325 (arguments
8326 `(#:phases
8327 (modify-phases %standard-phases
8328 (replace 'check
8329 (lambda _
8330 (with-output-to-file ".test"
8331 (lambda _
8332 (display
8333 "\
8334require 'ae/should'
8335require 'rspec'
8336
8337include RSpec
8338
8339Test.run :default do |run|
8340 run.files << 'spec/*_spec.rb'
8341end")))
8342 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
8343 (native-inputs
8344 `(("ruby-ae" ,ruby-ae)
8345 ("ruby-rspec" ,ruby-rspec)))
8346 (propagated-inputs
8347 `(("ruby-rubytest" ,ruby-rubytest)))
8348 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
8349 (description "Spectroscope is a Behavior-Driven Development (BDD)
8350framework built on RubyTest, designed to emulate RSpec in most respects. It
8351is assertion framework independent so any number of assertion systems can be
8352used, such as Assay or AE.")
8353 (home-page "http://rubyworks.github.com/spectroscope/")
8354 (license license:bsd-2)))
8355
24ffd91b
MC
8356(define-public ruby-tomparse
8357 (package
8358 (name "ruby-tomparse")
8359 (version "0.4.2")
8360 (source
8361 (origin
8362 (method url-fetch)
8363 (uri (rubygems-uri "tomparse" version))
8364 (sha256
8365 (base32
8366 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
8367 (build-system ruby-build-system)
8368 ;; TODO: Tests require citron and rulebow, not yet packaged.
8369 (arguments '(#:tests? #f))
8370 (synopsis "TomDoc parser for Ruby")
8371 (description "TomParse is a TomDoc parser for Ruby. It takes a code
8372comment as input and parses it into a convenient object-oriented structure in
8373accordance with the TomDoc standard. See
8374@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
8375TomDoc format.")
8376 (home-page "http://rubyworks.github.com/tomparse/")
8377 (license license:bsd-2)))
8378
257dee50
MC
8379(define-public ruby-yard-tomdoc
8380 (package
8381 (name "ruby-yard-tomdoc")
8382 (version "0.7.1")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (rubygems-uri "yard-tomdoc" version))
8387 (sha256
8388 (base32
8389 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
8390 (build-system ruby-build-system)
8391 (arguments
8392 `(#:phases (modify-phases %standard-phases
8393 (replace 'check
8394 (lambda _
8395 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
8396 (native-inputs
8397 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8398 ("ruby-spectroscope" ,ruby-spectroscope)
8399 ("ruby-ae" ,ruby-ae)))
8400 (propagated-inputs
8401 `(("ruby-tomparse" ,ruby-tomparse)
8402 ("ruby-yard" ,ruby-yard)))
8403 (synopsis "TomDoc syntax for YARD")
8404 (description "This module adds support for the TomDoc documentation format
8405to YARD, a documentation generation tool for Ruby.")
8406 (home-page "http://rubyworks.github.com/yard-tomdoc/")
8407 (license license:expat)))
8408
ad686ef3
RW
8409(define-public ruby-clap
8410 (package
8411 (name "ruby-clap")
8412 (version "1.0.0")
8413 (source (origin
8414 (method url-fetch)
8415 (uri (rubygems-uri "clap" version))
8416 (sha256
8417 (base32
8418 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
8419 (build-system ruby-build-system)
8420 ;; Clap needs cutest for running tests, but cutest needs clap.
8421 (arguments `(#:tests? #f))
8422 (synopsis "Command line argument parsing for simple applications")
8423 (description
8424 "Clap provides command line argument parsing features. It covers the
8425simple case of executing code based on the flags or parameters passed.")
8426 (home-page "https://github.com/djanowski/cutest")
0c80451e
RW
8427 (license license:expat)))
8428
8429(define-public ruby-cutest
8430 (package
8431 (name "ruby-cutest")
8432 (version "1.2.2")
8433 (source (origin
8434 (method url-fetch)
8435 (uri (rubygems-uri "cutest" version))
8436 (sha256
8437 (base32
8438 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
8439 (build-system ruby-build-system)
8440 (propagated-inputs
8441 `(("ruby-clap" ,ruby-clap)))
8442 (synopsis "Run tests in separate processes")
8443 (description
8444 "Cutest runs tests in separate processes to avoid shared state.")
8445 (home-page "https://github.com/djanowski/cutest")
ad686ef3
RW
8446 (license license:expat)))
8447
ac09beba
RW
8448(define-public ruby-pygmentize
8449 (package
8450 (name "ruby-pygmentize")
8451 (version "0.0.3")
8452 (source (origin
8453 (method url-fetch)
8454 (uri (rubygems-uri "pygmentize" version))
8455 (sha256
8456 (base32
8457 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
8458 (build-system ruby-build-system)
8459 (arguments
8460 `(#:phases
8461 (modify-phases %standard-phases
8462 (add-after 'unpack 'fix-pygmentize-path
8463 (lambda _
8464 (substitute* "lib/pygmentize.rb"
8465 (("\"/usr/bin/env python.*")
8466 (string-append "\"" (which "pygmentize") "\"\n")))
8467 #t))
8468 (add-after 'build 'do-not-use-vendor-directory
8469 (lambda _
8470 ;; Remove bundled pygments sources
8471 ;; FIXME: ruby-build-system does not support snippets.
8472 (delete-file-recursively "vendor")
8473 (substitute* "pygmentize.gemspec"
8474 (("\"vendor/\\*\\*/\\*\",") ""))
8475 #t)))))
8476 (inputs
8477 `(("pygments" ,python-pygments)))
8478 (native-inputs
8479 `(("ruby-cutest" ,ruby-cutest)
8480 ("ruby-nokogiri" ,ruby-nokogiri)))
8481 (synopsis "Thin Ruby wrapper around pygmentize")
8482 (description
8483 "Pygmentize provides a simple way to call pygmentize from within a Ruby
8484application.")
8485 (home-page "https://github.com/djanowski/pygmentize")
8486 (license license:expat)))
8487
2cbcd23a
DT
8488(define-public ruby-eventmachine
8489 (package
8490 (name "ruby-eventmachine")
c207fa5e 8491 (version "1.2.7")
2cbcd23a
DT
8492 (source
8493 (origin
8494 (method url-fetch)
8495 (uri (rubygems-uri "eventmachine" version))
8496 (sha256
8497 (base32
c207fa5e 8498 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
2cbcd23a
DT
8499 (build-system ruby-build-system)
8500 (arguments
c5d269fb 8501 '(#:tests? #f)) ; test suite tries to connect to google.com
2cbcd23a
DT
8502 (native-inputs
8503 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
8504 (synopsis "Single-threaded network event framework for Ruby")
8505 (description
8506 "EventMachine implements a single-threaded engine for arbitrary network
8507communications. EventMachine wraps all interactions with sockets, allowing
8508programs to concentrate on the implementation of network protocols. It can be
8509used to create both network servers and clients.")
24a26227
TGR
8510 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8511 (home-page "https://github.com/eventmachine/eventmachine")
2cbcd23a 8512 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
7d3a1a2d 8513
e218b0c8
BW
8514(define-public ruby-ruby-engine
8515 (package
8516 (name "ruby-ruby-engine")
77d098bf 8517 (version "2.0.0")
e218b0c8
BW
8518 (source
8519 (origin
8520 (method url-fetch)
8521 (uri (rubygems-uri "ruby_engine" version))
8522 (sha256
8523 (base32
77d098bf 8524 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
e218b0c8
BW
8525 (build-system ruby-build-system)
8526 (arguments
8527 `(#:phases
8528 (modify-phases %standard-phases
77d098bf 8529 (add-after 'extract-gemspec 'clean-up
e218b0c8
BW
8530 (lambda _
8531 (delete-file "Gemfile.lock")
8532 (substitute* "ruby_engine.gemspec"
8533 ;; Remove unnecessary imports that would entail further
8534 ;; dependencies.
8535 ((".*<rdoc.*") "")
8536 ((".*<rubygems-tasks.*") "")
8537 ;; Remove extraneous .gem file
77d098bf
MC
8538 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8539 (("\"Gemfile.lock\".freeze, ") "")
e218b0c8 8540 ;; Soften rake dependency
77d098bf 8541 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
e218b0c8
BW
8542 "%q<rake>.freeze, [\">= 10.0\"]")
8543 ;; Soften the rspec dependency
77d098bf 8544 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
e218b0c8
BW
8545 "%q<rspec>.freeze, [\">= 2.4\"]"))
8546 (substitute* "Rakefile"
8547 (("require 'rubygems/tasks'") "")
8548 (("Gem::Tasks.new") ""))
8549 ;; Remove extraneous .gem file that otherwise gets installed.
77d098bf 8550 (delete-file-recursively "pkg")
e218b0c8
BW
8551 #t)))))
8552 (native-inputs
8553 `(("bundler" ,bundler)
8554 ("ruby-rake" ,ruby-rake)
8555 ("ruby-rspec" ,ruby-rspec)))
8556 (synopsis "Simplifies checking for Ruby implementation")
8557 (description
8558 "@code{ruby_engine} provides an RubyEngine class that can be used to
8559check which implementation of Ruby is in use. It can provide the interpreter
8560name and provides query methods such as @{RubyEngine.mri?}.")
8561 (home-page "https://github.com/janlelis/ruby_engine")
8562 (license license:expat)))
8563
8092e333
BW
8564(define-public ruby-turn
8565 (package
8566 (name "ruby-turn")
8567 (version "0.9.7")
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (rubygems-uri "turn" version))
8572 (sha256
8573 (base32
8574 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8575 (build-system ruby-build-system)
8576 (arguments
8577 `(#:phases
8578 (modify-phases %standard-phases
8579 ;; Tests fail because turn changes its environment so can no longer
8580 ;; find test/unit. Instead simply test if the executable runs
8581 ;; without issue.
8582 (replace 'check
8583 (lambda _
9923d5a4 8584 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8092e333
BW
8585 (propagated-inputs
8586 `(("ruby-ansi" ,ruby-ansi)
8587 ("ruby-minitest" ,ruby-minitest-4)))
8588 (synopsis "Alternate set of alternative runners for MiniTest")
8589 (description
8590 "TURN provides a set of alternative runners for MiniTest which are both
8591colorful and informative. TURN displays each test on a separate line with
8592failures being displayed immediately instead of at the end of the tests. Note
8593that TURN is no longer being maintained.")
f433b662 8594 (home-page "https://rubygems.org/gems/turn")
8092e333
BW
8595 (license license:expat)))
8596
8279b1d3
CB
8597(define-public ruby-mimemagic
8598 (package
8599 (name "ruby-mimemagic")
60bc8952 8600 (version "0.3.3")
8279b1d3
CB
8601 (source
8602 (origin
8603 (method url-fetch)
8604 (uri (rubygems-uri "mimemagic" version))
8605 (sha256
60bc8952 8606 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8279b1d3
CB
8607 (build-system ruby-build-system)
8608 (arguments
8609 '(#:phases
8610 (modify-phases %standard-phases
8611 ;; This phase breaks the tests, as it patches some of the test data.
8612 (delete 'patch-source-shebangs))))
8613 (native-inputs
8614 `(("ruby-bacon" ,ruby-bacon)))
8615 (synopsis "Ruby library for MIME detection by extension or content")
8616 (description
8617 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8618extension or content, using the freedesktop.org.xml shared-mime-info
8619database.")
8620 (home-page "https://github.com/minad/mimemagic")
8621 (license license:expat)))
8622
32d1c06f
BW
8623(define-public ruby-mime-types-data
8624 (package
8625 (name "ruby-mime-types-data")
f49511db 8626 (version "3.2016.0521")
32d1c06f
BW
8627 (source
8628 (origin
8629 (method url-fetch)
8630 (uri (rubygems-uri "mime-types-data" version))
8631 (sha256
8632 (base32
f49511db 8633 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
32d1c06f
BW
8634 (build-system ruby-build-system)
8635 (native-inputs
8636 `(("ruby-hoe" ,ruby-hoe)))
8637 (synopsis "Registry for information about MIME media type definitions")
8638 (description
8639 "@code{mime-types-data} provides a registry for information about
8640Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8641be used with the Ruby mime-types library or other software to determine
8642defined filename extensions for MIME types, or to use filename extensions to
8643look up the likely MIME type definitions.")
8644 (home-page "https://github.com/mime-types/mime-types-data/")
8645 (license license:expat)))
8646
d39b606c
BW
8647(define-public ruby-mime-types
8648 (package
8649 (name "ruby-mime-types")
803bcc81 8650 (version "3.1")
d39b606c
BW
8651 (source
8652 (origin
8653 (method url-fetch)
8654 (uri (rubygems-uri "mime-types" version))
8655 (sha256
8656 (base32
803bcc81 8657 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
d39b606c
BW
8658 (build-system ruby-build-system)
8659 (propagated-inputs
8660 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
8661 (native-inputs
8662 `(("ruby-hoe" ,ruby-hoe)
8663 ("ruby-fivemat" ,ruby-fivemat)
8664 ("ruby-minitest-focus" ,ruby-minitest-focus)
8665 ("ruby-minitest-rg" ,ruby-minitest-rg)
803bcc81
BW
8666 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
8667 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
d39b606c
BW
8668 (synopsis "Library and registry for MIME content type definitions")
8669 (description "The mime-types library provides a library and registry for
8670information about Multipurpose Internet Mail Extensions (MIME) content type
8671definitions. It can be used to determine defined filename extensions for MIME
8672types, or to use filename extensions to look up the likely MIME type
8673definitions.")
8674 (home-page "https://github.com/mime-types/ruby-mime-types")
8675 (license license:expat)))
8676
eb5e0bd9
BW
8677(define-public ruby-fivemat
8678 (package
8679 (name "ruby-fivemat")
c664ebcc 8680 (version "1.3.7")
eb5e0bd9
BW
8681 (source
8682 (origin
8683 (method url-fetch)
8684 (uri (rubygems-uri "fivemat" version))
8685 (sha256
8686 (base32
c664ebcc 8687 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
eb5e0bd9
BW
8688 (build-system ruby-build-system)
8689 (arguments
8690 `(#:tests? #f)) ; no tests
8691 (synopsis "Each test file given its own line of dots")
8692 (description
8693 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8694its own line of dots during testing. It aims to provide test output that is
8695neither too verbose nor too minimal.")
8696 (home-page "https://github.com/tpope/fivemat")
8697 (license license:expat)))
8698
4fea500b
BW
8699(define-public ruby-sqlite3
8700 (package
8701 (name "ruby-sqlite3")
e7cdba61 8702 (version "1.4.2")
4fea500b
BW
8703 (source
8704 (origin
8705 (method url-fetch)
8706 (uri (rubygems-uri "sqlite3" version))
8707 (sha256
8708 (base32
e7cdba61 8709 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
4fea500b
BW
8710 (build-system ruby-build-system)
8711 (arguments
8712 `(#:phases
8713 (modify-phases %standard-phases
8714 (add-before 'check 'add-gemtest-file
8715 ;; This file exists in the repository but is not distributed.
9923d5a4 8716 (lambda _ (invoke "touch" ".gemtest"))))))
4fea500b
BW
8717 (inputs
8718 `(("sqlite" ,sqlite)))
8719 (native-inputs
8720 `(("ruby-hoe" ,ruby-hoe)
8721 ("ruby-rake-compiler" ,ruby-rake-compiler)
8722 ("ruby-mini-portile" ,ruby-mini-portile)))
8723 (synopsis "Interface with SQLite3 databases")
8724 (description
8725 "This module allows Ruby programs to interface with the SQLite3 database
8726engine.")
8727 (home-page
8728 "https://github.com/sparklemotion/sqlite3-ruby")
8729 (license license:bsd-3)))
8730
4dfa39cc
BW
8731(define-public ruby-shoulda-context
8732 (package
8733 (name "ruby-shoulda-context")
e7d1d472 8734 (version "1.2.2")
4dfa39cc
BW
8735 (source
8736 (origin
8737 (method url-fetch)
8738 (uri (rubygems-uri "shoulda-context" version))
8739 (sha256
8740 (base32
e7d1d472 8741 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
4dfa39cc
BW
8742 (build-system ruby-build-system)
8743 (arguments
8744 `(#:phases
8745 (modify-phases %standard-phases
8746 (replace 'check
8747 (lambda _
8748 ;; Do not run tests to avoid circular dependence with rails.
8749 ;; Instead just import the library to test.
9923d5a4 8750 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
4dfa39cc
BW
8751 (synopsis "Test::Unit context framework extracted from Shoulda")
8752 (description
8753 "@code{shoulda-context} is the context framework extracted from Shoulda.
8754Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8755context, setup, and should blocks combine to produce natural test method
8756names.")
8757 (home-page "https://github.com/thoughtbot/shoulda-context")
8758 (license license:expat)))
8759
e4fea008
BW
8760(define-public ruby-shoulda-matchers
8761 (package
8762 (name "ruby-shoulda-matchers")
d1c1f368 8763 (version "3.1.2")
e4fea008
BW
8764 (source
8765 (origin
8766 (method url-fetch)
8767 (uri (rubygems-uri "shoulda-matchers" version))
8768 (sha256
8769 (base32
d1c1f368 8770 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
e4fea008
BW
8771 (build-system ruby-build-system)
8772 (arguments
8773 `(#:phases
8774 (modify-phases %standard-phases
e4fea008
BW
8775 (replace 'check
8776 (lambda _
8777 ;; Do not run tests to avoid circular dependence with rails. Instead
8778 ;; just import the library to test.
9923d5a4 8779 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
e4fea008
BW
8780 (propagated-inputs
8781 `(("ruby-activesupport" ,ruby-activesupport)))
8782 (synopsis "Collection of testing matchers extracted from Shoulda")
8783 (description
8784 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8785test common Rails functionality. These tests would otherwise be much longer,
8786more complex, and error-prone.")
8787 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8788 (license license:expat)))
8789
3885c58b
BW
8790(define-public ruby-shoulda-matchers-2
8791 (package
8792 (inherit ruby-shoulda-matchers)
8793 (version "2.8.0")
8794 (source (origin
8795 (method url-fetch)
8796 (uri (rubygems-uri "shoulda-matchers" version))
8797 (sha256
8798 (base32
8799 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8800
6f390716
BW
8801(define-public ruby-shoulda
8802 (package
8803 (name "ruby-shoulda")
8804 (version "3.5.0")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (rubygems-uri "shoulda" version))
8809 (sha256
8810 (base32
8811 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8812 (build-system ruby-build-system)
8813 (arguments
8814 `(#:phases
8815 (modify-phases %standard-phases
8816 (replace 'check
8817 ;; Don't run tests to avoid circular dependence with rails. Instead
8818 ;; just import the library to test.
9923d5a4 8819 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
6f390716
BW
8820 (propagated-inputs
8821 `(("ruby-shoulda-context" ,ruby-shoulda-context)
8822 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
8823 (synopsis "Context framework and matchers for testing")
8824 (description
8825 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8826@code{shoulda-matchers} providing tools for writing tests.")
8827 (home-page "https://github.com/thoughtbot/shoulda")
8828 (license license:expat)))
8829
3b44bcdf
BW
8830(define-public ruby-unf
8831 (package
8832 (name "ruby-unf")
8833 (version "0.1.4")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (rubygems-uri "unf" version))
8838 (sha256
8839 (base32
8840 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8841 (build-system ruby-build-system)
8842 (arguments
8843 `(#:phases
8844 (modify-phases %standard-phases
8845 (add-before 'check 'add-dependency-to-bundler
8846 (lambda _
8847 ;; test-unit is required but not provided by the bundler
8848 ;; environment. This is fixed in the upstream repository but fix
8849 ;; has not been released.
8850 (substitute* "Gemfile"
8851 (("^gemspec") "gem 'test-unit'\ngemspec"))
8852 #t)))))
8853 (propagated-inputs
8854 `(("ruby-unf-ext" ,ruby-unf-ext)))
8855 (native-inputs
8856 `(("ruby-shoulda" ,ruby-shoulda)
8857 ("bundler" ,bundler)
8858 ("ruby-test-unit" ,ruby-test-unit)))
8859 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8860 (description
8861 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8862support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8863@code{java.text.Normalizer} on JRuby.")
8864 (home-page "https://github.com/knu/ruby-unf")
8865 (license license:bsd-2)))
8866
e32c99d2
CB
8867(define-public ruby-warden
8868 (package
8869 (name "ruby-warden")
8870 (version "1.2.8")
8871 (source
8872 (origin
8873 (method url-fetch)
8874 (uri (rubygems-uri "warden" version))
8875 (sha256
8876 (base32
8877 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8878 (build-system ruby-build-system)
8879 (arguments
8880 '(#:tests? #f)) ; No included tests
8881 (propagated-inputs
8882 `(("ruby-rack" ,ruby-rack)))
8883 (synopsis "Rack middleware providing authentication")
8884 (description
8885 "Warden is a Rack-based middleware that provides a mechanism for
8886authentication in Ruby web applications.")
8887 (home-page "https://github.com/wardencommunity/warden")
8888 (license license:expat)))
8889
e42eecdb
CB
8890(define-public ruby-warden-oauth2
8891 (package
8892 (name "ruby-warden-oauth2")
8893 (version "0.0.1")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (rubygems-uri "warden-oauth2" version))
8898 (sha256
8899 (base32
8900 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8901 (build-system ruby-build-system)
8902 (arguments
8903 '(#:test-target "spec"
8904 #:phases
8905 (modify-phases %standard-phases
8906 (add-after 'unpack 'remove-unnecessary-dependencies
8907 (lambda _
8908 (substitute* "Gemfile"
8909 ;; All of these gems relate to development, and are unnecessary
8910 ;; when running the tests
8911 (("gem 'guard-bundler'") "")
8912 (("gem 'guard'") "")
8913 (("gem 'guard-rspec'") "")
8914 (("gem 'rb-fsevent'") "")
8915 (("gem 'pry'") "")
8916 (("gem 'growl'") ""))
8917 #t))
8918 ;; The test suite doesn't work with rspec@2, and this is incompatible
8919 ;; with the current version of Rake, so invoke Rspec directly
8920 (replace 'check
8921 (lambda* (#:key tests? #:allow-other-keys)
8922 (when tests?
8923 (invoke "bundle" "exec" "rspec"))
8924 #t)))))
8925 (propagated-inputs
8926 `(("ruby-warden" ,ruby-warden)))
8927 (native-inputs
8928 `(("bundler" ,bundler)
8929 ("ruby-rspec" ,ruby-rspec-2)
8930 ("ruby-rack-test" ,ruby-rack-test)))
8931 (synopsis "OAuth 2.0 strategies for Warden")
8932 (description
8933 "This library extends Warden to support OAuth 2.0 authorized API
8934requests.")
8935 (home-page "https://github.com/opperator/warden-oauth2")
8936 (license license:expat)))
8937
8c7ae384
CB
8938(define-public ruby-webmock-2
8939 (package
8940 (name "ruby-webmock")
8941 (version "2.3.2")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (rubygems-uri "webmock" version))
8946 (sha256
8947 (base32
8948 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8949 (build-system ruby-build-system)
8950 (native-inputs
8951 `(("bundler" ,bundler)
8952 ("ruby-rspec" ,ruby-rspec)))
8953 (propagated-inputs
8954 `(("ruby-addressable" ,ruby-addressable)
8955 ("ruby-crack" ,ruby-crack)
8956 ("ruby-hashdiff" ,ruby-hashdiff)))
8957 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8958 (description
8959 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8960requests. This is useful when testing software.")
8961 (home-page "https://github.com/bblimke/webmock")
8962 (license license:expat)))
8963
d8c189ed
CB
8964(define-public ruby-unicode-display-width
8965 (package
8966 (name "ruby-unicode-display-width")
216ccced 8967 (version "1.6.0")
d8c189ed
CB
8968 (source
8969 (origin
8970 (method url-fetch)
8971 (uri (rubygems-uri "unicode-display_width" version))
8972 (sha256
8973 (base32
216ccced 8974 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
d8c189ed
CB
8975 (build-system ruby-build-system)
8976 (arguments
8977 '(;; Test data not included.
8978 #:tests? #f))
8979 (synopsis "Determine the monospace display width of Ruby strings")
8980 (description
8981 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8982display width of strings in Ruby.")
8983 (home-page "https://github.com/janlelis/unicode-display_width")
8984 (license license:expat)))
8985
6120589f
CB
8986;; There is another gem called 'ruby-version' so we use an underscore in this
8987;; name
8988(define-public ruby_version
8989 (package
8990 (name "ruby_version")
1097fdbe 8991 (version "1.0.2")
6120589f
CB
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (rubygems-uri "ruby_version" version))
8996 (sha256
8997 (base32
1097fdbe 8998 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
6120589f
CB
8999 (build-system ruby-build-system)
9000 (arguments
1097fdbe 9001 `(#:phases
6120589f
CB
9002 (modify-phases %standard-phases
9003 (add-before 'check 'fix-dependencies
9004 (lambda _
9005 ;; Remove the Gemfile.lock, as we want to use Guix packages at
9006 ;; whatever versions.
9007 (delete-file "Gemfile.lock")
1097fdbe
MC
9008 ;; Remove the included gem files as they unnecessary.
9009 (delete-file-recursively "pkg/")
9010 ;; Accept any version of rake, rdoc and rspec
6120589f 9011 (substitute* "ruby_version.gemspec"
6120589f 9012 (("%q<rake.*") "%q<rake>)\n")
1097fdbe 9013 (("%q<rdoc.*") "%q<rdoc>)\n")
6120589f 9014 (("%q<rspec.*") "%q<rspec>)\n"))
1097fdbe 9015 ;; Do not use bundler.
6120589f 9016 (substitute* "Rakefile"
1097fdbe 9017 (("Bundler\\.setup.*") "nil\n"))
6120589f
CB
9018 #t)))))
9019 (native-inputs
1097fdbe
MC
9020 `(("ruby-rdoc" ,ruby-rdoc)
9021 ("ruby-rspec" ,ruby-rspec)
1628d57b 9022 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6120589f 9023 (synopsis "Ruby library to help check the Ruby version")
1097fdbe 9024 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
6120589f
CB
9025checking for the right Ruby version in software.")
9026 (home-page "https://github.com/janlelis/ruby_version")
9027 (license license:expat)))
9028
a229acff
CB
9029(define-public ruby-websocket-driver
9030 (package
9031 (name "ruby-websocket-driver")
9d1cf6d4 9032 (version "0.7.1")
a229acff
CB
9033 (source
9034 (origin
9035 (method url-fetch)
9036 (uri (rubygems-uri "websocket-driver" version))
9037 (sha256
9d1cf6d4 9038 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
a229acff
CB
9039 (build-system ruby-build-system)
9040 (arguments
9d1cf6d4 9041 '(#:tests? #f)) ; no included tests
a229acff
CB
9042 (propagated-inputs
9043 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
9044 (synopsis "WebSocket protocol handler with pluggable I/O")
9045 (description
9046 "@code{websocket-driver} provides a complete implementation of the
9047WebSocket protocols that can be hooked up to any TCP library")
9048 (home-page "https://github.com/faye/websocket-driver-ruby")
9049 (license license:expat)))
9050
52b015a9
CB
9051(define-public ruby-websocket-extensions
9052 (package
9053 (name "ruby-websocket-extensions")
9054 (version "0.1.3")
9055 (source
9056 (origin
9057 (method url-fetch)
9058 (uri (rubygems-uri "websocket-extensions" version))
9059 (sha256
9060 (base32
9061 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
9062 (build-system ruby-build-system)
9063 (arguments
9064 '(;; No included tests
9065 #:tests? #f))
9066 (synopsis "Generic extension manager for WebSocket connections")
9067 (description
9068 "@code{websocket-extensions} provides a container for registering
9069extension plugins.")
9070 (home-page "https://github.com/faye/websocket-extensions-ruby")
9071 (license license:expat)))
9072
5799aadd
BW
9073(define-public ruby-domain-name
9074 (package
9075 (name "ruby-domain-name")
cce2988d 9076 (version "0.5.20190701")
5799aadd
BW
9077 (source
9078 (origin
9079 (method url-fetch)
9080 (uri (rubygems-uri "domain_name" version))
9081 (sha256
cce2988d 9082 (base32 "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0"))))
5799aadd
BW
9083 (build-system ruby-build-system)
9084 (arguments
9085 `(#:phases
9086 (modify-phases %standard-phases
9087 (add-before 'check 'fix-versions
9088 (lambda _
9089 ;; Fix NameError that appears to already be fixed upstream.
9090 (substitute* "Rakefile"
9091 (("DomainName::VERSION")
9092 "Bundler::GemHelper.gemspec.version"))
9093 ;; Loosen unnecessarily strict test-unit version specification.
9094 (substitute* "domain_name.gemspec"
71596c3c 9095 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
5799aadd
BW
9096 #t)))))
9097 (propagated-inputs
9098 `(("ruby-unf" ,ruby-unf)))
9099 (native-inputs
9100 `(("ruby-shoulda" ,ruby-shoulda)
9101 ("bundler" ,bundler)
9102 ("ruby-test-unit" ,ruby-test-unit)))
9103 (synopsis "Domain name manipulation library")
9104 (description
9105 "@code{domain_name} is a Domain name manipulation library. It parses a
9106domain name ready for extracting the registered domain and TLD (Top Level
9107Domain). It can also be used for cookie domain validation based on the Public
9108Suffix List.")
9109 (home-page "https://github.com/knu/ruby-domain_name")
9110 (license license:bsd-2)))
9111
d114ceeb
BW
9112(define-public ruby-http-cookie
9113 (package
9114 (name "ruby-http-cookie")
2a2eb07d 9115 (version "1.0.3")
d114ceeb
BW
9116 (source
9117 (origin
9118 (method url-fetch)
9119 (uri (rubygems-uri "http-cookie" version))
9120 (sha256
9121 (base32
2a2eb07d 9122 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
d114ceeb
BW
9123 (build-system ruby-build-system)
9124 (arguments
9125 `(#:phases
9126 (modify-phases %standard-phases
9127 (add-before 'check 'add-dependency-to-bundler
9128 (lambda _
9129 ;; Fix NameError
9130 (substitute* "Rakefile"
9131 (("HTTP::Cookie::VERSION")
9132 "Bundler::GemHelper.gemspec.version"))
9133 #t)))))
9134 (propagated-inputs
9135 `(("ruby-domain-name" ,ruby-domain-name)))
9136 (native-inputs
9137 `(("rubysimplecov" ,ruby-simplecov)
9138 ("bundler" ,bundler)
9139 ("ruby-sqlite3" ,ruby-sqlite3)
9140 ("ruby-test-unit" ,ruby-test-unit)))
9141 (synopsis "Handle HTTP Cookies based on RFC 6265")
9142 (description
9143 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
9144RFC 6265. It has been designed with security, standards compliance and
9145compatibility in mind, to behave just the same as today's major web browsers.
9146It has built-in support for the legacy @code{cookies.txt} and
9147@code{cookies.sqlite} formats of Mozilla Firefox.")
9148 (home-page "https://github.com/sparklemotion/http-cookie")
9149 (license license:expat)))
9150
1c8e6fd3
CB
9151(define-public ruby-httpclient
9152 (package
9153 (name "ruby-httpclient")
9154 (version "2.8.3")
9155 (source
9156 (origin
9157 (method url-fetch)
9158 (uri (rubygems-uri "httpclient" version))
9159 (sha256
9160 (base32
9161 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
9162 (build-system ruby-build-system)
9163 (arguments
9164 '(;; TODO: Some tests currently fail
9165 ;; ------
9166 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
9167 ;; 2 omissions, 0 notifications
9168 ;; 91.866% passed
9169 ;; ------
9170 ;; 6.49 tests/s, 22.41 assertions/s
9171 #:tests? #f
9172 #:phases
9173 (modify-phases %standard-phases
9174 (replace 'check
9175 (lambda* (#:key tests? #:allow-other-keys)
9176 (if tests?
9923d5a4
TGR
9177 (invoke "ruby"
9178 "-Ilib"
9179 "test/runner.rb")
0076f5a9 9180 #t))))))
1c8e6fd3
CB
9181 (native-inputs
9182 `(("ruby-rack" ,ruby-rack)))
9183 (synopsis
9184 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
9185 (description
9186 "The @code{httpclient} ruby library provides functionality related to
9187HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
9188Cookie, multithreading and authentication (digest, NTLM) support.
9189
9190Also provided is a @command{httpclient} command, which can perform HTTP
9191requests either using arguments or with an interactive prompt.")
9192 (home-page "https://github.com/nahi/httpclient")
9193 (license license:ruby)))
9194
7d3a1a2d
BW
9195(define-public ruby-ansi
9196 (package
9197 (name "ruby-ansi")
9198 (version "1.5.0")
9199 (source
9200 (origin
3d30c332 9201 (method git-fetch)
7d3a1a2d 9202 ;; Fetch from GitHub as the gem does not contain testing code.
3d30c332
EF
9203 (uri (git-reference
9204 (url "https://github.com/rubyworks/ansi")
9205 (commit version)))
9206 (file-name (git-file-name name version))
7d3a1a2d
BW
9207 (sha256
9208 (base32
3d30c332 9209 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
7d3a1a2d
BW
9210 (build-system ruby-build-system)
9211 (arguments
9212 `(#:phases
9213 (modify-phases %standard-phases
9214 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
9215 ;; cycle ansi, qed, ansi. Instead simply test that the library can
9216 ;; be require'd.
9217 (replace 'check
9218 (lambda _
9923d5a4 9219 (invoke "ruby" "-Ilib" "-r" "ansi")))
0899352f
MB
9220 (add-before 'validate-runpath 'replace-broken-symlink
9221 (lambda* (#:key outputs #:allow-other-keys)
9222 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
9223 (file (string-append
9224 out "/lib/ruby/vendor_ruby/gems/ansi-"
9225 ,version "/lib/ansi.yml")))
0899352f
MB
9226 ;; XXX: This symlink is broken since ruby 2.4.
9227 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9228 (delete-file file)
9229 (symlink "../.index" file)
9230 #t))))))
7d3a1a2d
BW
9231 (synopsis "ANSI escape code related libraries")
9232 (description
9233 "This package is a collection of ANSI escape code related libraries
9234enabling ANSI colorization and stylization of console output. Included in the
9235library are the @code{Code} module, which defines ANSI codes as constants and
9236methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
9237@code{ProgressBar}, and a @code{String} subclass. The library also includes a
9238@code{Terminal} module which provides information about the current output
9239device.")
3d30c332 9240 (home-page "https://rubyworks.github.io/ansi/")
7d3a1a2d 9241 (license license:bsd-2)))
7c033c46
BW
9242
9243(define-public ruby-systemu
9244 (package
9245 (name "ruby-systemu")
9246 (version "2.6.5")
9247 (source
9248 (origin
9249 (method url-fetch)
9250 (uri (rubygems-uri "systemu" version))
9251 (sha256
9252 (base32
9253 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
9254 (build-system ruby-build-system)
9255 (arguments
9256 `(#:phases
9257 (modify-phases %standard-phases
9258 (add-before 'check 'set-version
9259 (lambda _
9260 (setenv "VERSION" ,version)
9261 #t)))))
9262 (synopsis "Capture of stdout/stderr and handling of child processes")
9263 (description
9264 "Systemu can be used on any platform to return status, stdout, and stderr
9265of any command. Unlike other methods like @code{open3} and @code{popen4}
9266there is no danger of full pipes or threading issues hanging your process or
9267subprocess.")
9268 (home-page "https://github.com/ahoward/systemu")
9269 (license license:ruby)))
3d84a99e
BW
9270
9271(define-public ruby-bio-commandeer
9272 (package
9273 (name "ruby-bio-commandeer")
37b08547 9274 (version "0.4.0")
3d84a99e
BW
9275 (source
9276 (origin
9277 (method url-fetch)
9278 (uri (rubygems-uri "bio-commandeer" version))
9279 (sha256
9280 (base32
37b08547 9281 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
3d84a99e
BW
9282 (build-system ruby-build-system)
9283 (arguments
9284 `(#:phases
9285 (modify-phases %standard-phases
9286 (replace 'check
9287 ;; Run test without calling 'rake' so that jeweler is
9288 ;; not required as an input.
9289 (lambda _
9923d5a4 9290 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
3d84a99e
BW
9291 (propagated-inputs
9292 `(("ruby-bio-logger" ,ruby-bio-logger)
9293 ("ruby-systemu" ,ruby-systemu)))
9294 (native-inputs
9295 `(("bundler" ,bundler)
9296 ("ruby-rspec" ,ruby-rspec)))
9297 (synopsis "Simplified running of shell commands from within Ruby")
9298 (description
9299 "Bio-commandeer provides an opinionated method of running shell commands
9300from within Ruby. The advantage of bio-commandeer over other methods of
9301running external commands is that when something goes wrong, messages printed
9302to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
9303detail to ease debugging.")
7bf837fd 9304 (home-page "https://github.com/wwood/bioruby-commandeer")
3d84a99e 9305 (license license:expat)))
7c8131c7
BW
9306
9307(define-public ruby-rubytest
9308 (package
9309 (name "ruby-rubytest")
9310 (version "0.8.1")
9311 (source
9312 (origin
9313 (method url-fetch)
9314 (uri (rubygems-uri "rubytest" version))
9315 (sha256
9316 (base32
9317 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
9318 (build-system ruby-build-system)
9319 (arguments
9320 ;; Disable regular testing to break the cycle rubytest, qed, brass,
9321 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
9322 ;; simply test that the library can be require'd.
9323 `(#:phases
9324 (modify-phases %standard-phases
9325 (replace 'check
9326 (lambda _
9923d5a4 9327 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
7c8131c7
BW
9328 (propagated-inputs
9329 `(("ruby-ansi" ,ruby-ansi)))
9330 (synopsis "Universal test harness for Ruby")
9331 (description
9332 "Rubytest is a testing meta-framework for Ruby. It can handle any
9333compliant test framework and can run tests from multiple frameworks in a
9334single pass.")
2f3800e5 9335 (home-page "https://rubyworks.github.io/rubytest")
7c8131c7 9336 (license license:bsd-2)))
90fcedf2
BW
9337
9338(define-public ruby-brass
9339 (package
9340 (name "ruby-brass")
9341 (version "1.2.1")
9342 (source
9343 (origin
9344 (method url-fetch)
9345 (uri (rubygems-uri "brass" version))
9346 (sha256
9347 (base32
9348 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
9349 (build-system ruby-build-system)
9350 (arguments
9351 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
9352 ;; Instead simply test that the library can be require'd.
9353 `(#:phases
9354 (modify-phases %standard-phases
9355 (replace 'check
9356 (lambda _
9923d5a4 9357 (invoke "ruby" "-Ilib" "-r" "brass"))))))
90fcedf2
BW
9358 (synopsis "Basic foundational assertions framework")
9359 (description
9360 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
9361foundational assertions framework for other assertion and test frameworks to
9362make use of.")
2f3800e5 9363 (home-page "https://rubyworks.github.io/brass")
90fcedf2 9364 (license license:bsd-2)))
120fc74b
BW
9365
9366(define-public ruby-qed
9367 (package
9368 (name "ruby-qed")
9369 (version "2.9.2")
9370 (source
9371 (origin
9372 (method url-fetch)
9373 (uri (rubygems-uri "qed" version))
9374 (sha256
9375 (base32
9376 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
9377 (build-system ruby-build-system)
9378 (arguments
9379 ;; Disable testing to break the cycle qed, ansi, qed, among others.
9380 ;; Instead simply test that the executable runs using --copyright.
9381 `(#:phases
9382 (modify-phases %standard-phases
9383 (replace 'check
9384 (lambda _
9923d5a4 9385 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
120fc74b
BW
9386 (propagated-inputs
9387 `(("ruby-ansi" ,ruby-ansi)
9388 ("ruby-brass" ,ruby-brass)))
9389 (synopsis "Test framework utilizing literate programming techniques")
9390 (description
9391 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
9392@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
9393Development} (BDD) utilizing Literate Programming techniques. QED sits
9394somewhere between lower-level testing tools like @code{Test::Unit} and
9395requirement specifications systems like Cucumber.")
2f3800e5 9396 (home-page "https://rubyworks.github.io/qed")
120fc74b 9397 (license license:bsd-2)))
9273ee8f 9398
dbbe88d3
CB
9399(define-public ruby-que
9400 (package
9401 (name "ruby-que")
9402 (version "1.0.0.beta3")
9403 (source
9404 (origin
9405 (method url-fetch)
9406 (uri (rubygems-uri "que" version))
9407 (sha256
9408 (base32
9409 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
9410 (build-system ruby-build-system)
9411 (arguments
9412 '(#:tests? #f)) ; No included tests
9413 (synopsis "Job queue using PostgreSQL written in Ruby")
9414 (description
9415 "This package provides a job queue that uses PostgreSQL for storing jobs
9416and locking between worker processes.")
9417 (home-page "https://github.com/chanks/que")
9418 (license license:expat)))
9419
9273ee8f
BW
9420(define-public ruby-ae
9421 (package
9422 (name "ruby-ae")
9423 (version "1.8.2")
9424 (source
9425 (origin
11d1b318 9426 (method git-fetch)
9273ee8f 9427 ;; Fetch from github so tests are included.
11d1b318
EF
9428 (uri (git-reference
9429 (url "https://github.com/rubyworks/ae")
9430 (commit version)))
9431 (file-name (git-file-name name version))
9273ee8f
BW
9432 (sha256
9433 (base32
11d1b318 9434 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9273ee8f
BW
9435 (build-system ruby-build-system)
9436 (arguments
9437 `(#:phases
9438 (modify-phases %standard-phases
9439 (replace 'check
9923d5a4 9440 (lambda _ (invoke "qed")))
de6f6efd
MB
9441 (add-before 'validate-runpath 'replace-broken-symlink
9442 (lambda* (#:key outputs #:allow-other-keys)
9443 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
9444 (file (string-append
9445 out "/lib/ruby/vendor_ruby/gems/ae-"
9446 ,version "/lib/ae.yml")))
de6f6efd
MB
9447 ;; XXX: This symlink is broken since ruby 2.4.
9448 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
9449 (delete-file file)
9450 (symlink "../.index" file)
9451 #t))))))
9273ee8f
BW
9452 (propagated-inputs
9453 `(("ruby-ansi" ,ruby-ansi)))
9454 (native-inputs
9455 `(("ruby-qed" ,ruby-qed)))
9456 (synopsis "Assertions library")
9457 (description
9458 "Assertive Expressive (AE) is an assertions library specifically designed
9459for reuse by other test frameworks.")
11d1b318 9460 (home-page "https://rubyworks.github.io/ae/")
9273ee8f 9461 (license license:bsd-2)))
78bb471f
BW
9462
9463(define-public ruby-lemon
9464 (package
9465 (name "ruby-lemon")
9466 (version "0.9.1")
9467 (source
9468 (origin
9469 (method url-fetch)
9470 (uri (rubygems-uri "lemon" version))
9471 (sha256
9472 (base32
9473 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
9474 (build-system ruby-build-system)
9475 (arguments
9476 `(#:phases
9477 (modify-phases %standard-phases
9923d5a4 9478 (replace 'check (lambda _ (invoke "qed"))))))
78bb471f
BW
9479 (propagated-inputs
9480 `(("ruby-ae" ,ruby-ae)
9481 ("ruby-ansi" ,ruby-ansi)
9482 ("ruby-rubytest" ,ruby-rubytest)))
9483 (native-inputs
9484 `(("ruby-qed" ,ruby-qed)))
9485 (synopsis "Test framework correlating code structure and test unit")
9486 (description
9487 "Lemon is a unit testing framework that enforces highly formal
9488case-to-class and unit-to-method test construction. This enforcement can help
9489focus concern on individual units of behavior.")
2f3800e5 9490 (home-page "https://rubyworks.github.io/lemon")
78bb471f 9491 (license license:bsd-2)))
0832804e
BW
9492
9493(define-public ruby-rubytest-cli
9494 (package
9495 (name "ruby-rubytest-cli")
9496 (version "0.2.0")
9497 (source
9498 (origin
9499 (method url-fetch)
9500 (uri (rubygems-uri "rubytest-cli" version))
9501 (sha256
9502 (base32
9503 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
9504 (build-system ruby-build-system)
9505 (arguments
9506 `(#:tests? #f)) ; no tests
9507 (propagated-inputs
9508 `(("ruby-ansi" ,ruby-ansi)
9509 ("ruby-rubytest" ,ruby-rubytest)))
9510 (synopsis "Command-line interface for rubytest")
9511 (description
9512 "Rubytest CLI is a command-line interface for running tests for
9513Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
2f3800e5 9514 (home-page "https://rubyworks.github.io/rubytest-cli")
0832804e 9515 (license license:bsd-2)))
72ccbfe3
BW
9516
9517(define-public ruby-hashery
9518 (package
9519 (name "ruby-hashery")
cba96208 9520 (version "2.1.2")
72ccbfe3
BW
9521 (source
9522 (origin
9523 (method url-fetch)
9524 (uri (rubygems-uri "hashery" version))
9525 (sha256
9526 (base32
cba96208 9527 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
72ccbfe3
BW
9528 (build-system ruby-build-system)
9529 (arguments
9530 `(#:phases
9531 (modify-phases %standard-phases
9532 (replace 'check
9533 (lambda _
9923d5a4
TGR
9534 (invoke "qed")
9535 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
72ccbfe3
BW
9536 (native-inputs
9537 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
9538 ("ruby-qed" ,ruby-qed)
9539 ("ruby-lemon" ,ruby-lemon)))
9540 (synopsis "Hash-like classes with extra features")
9541 (description
9542 "The Hashery is a tight collection of @code{Hash}-like classes.
9543Included are the auto-sorting @code{Dictionary} class, the efficient
9544@code{LRUHash}, the flexible @code{OpenHash} and the convenient
9545@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9546defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9547standard @code{Hash} making it possible to subclass and augment to fit any
9548specific use case.")
2f3800e5 9549 (home-page "https://rubyworks.github.io/hashery")
72ccbfe3 9550 (license license:bsd-2)))
1f1d71e0
BW
9551
9552(define-public ruby-rc4
9553 (package
9554 (name "ruby-rc4")
9555 (version "0.1.5")
9556 (source
9557 (origin
9558 (method url-fetch)
9559 (uri (rubygems-uri "ruby-rc4" version))
9560 (sha256
9561 (base32
9562 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9563 (build-system ruby-build-system)
9564 (arguments
9565 `(#:phases
9566 (modify-phases %standard-phases
9567 (replace 'check
9568 (lambda _
9923d5a4 9569 (invoke "rspec" "spec/rc4_spec.rb"))))))
1f1d71e0
BW
9570 (native-inputs
9571 `(("ruby-rspec" ,ruby-rspec-2)))
9572 (synopsis "Implementation of the RC4 algorithm")
9573 (description
9574 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9575 (home-page "https://github.com/caiges/Ruby-RC4")
9576 (license license:expat)))
f3e085a8
BW
9577
9578(define-public ruby-afm
9579 (package
9580 (name "ruby-afm")
9581 (version "0.2.2")
9582 (source
9583 (origin
9584 (method url-fetch)
9585 (uri (rubygems-uri "afm" version))
9586 (sha256
9587 (base32
9588 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9589 (build-system ruby-build-system)
9590 (native-inputs
9591 `(("bundler" ,bundler)))
9592 (synopsis "Read Adobe Font Metrics (afm) files")
9593 (description
9594 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9595files and use the data therein.")
7bf837fd 9596 (home-page "https://github.com/halfbyte/afm")
f3e085a8 9597 (license license:expat)))
acb6be42
BW
9598
9599(define-public ruby-ascii85
9600 (package
9601 (name "ruby-ascii85")
5854082a 9602 (version "1.0.3")
acb6be42
BW
9603 (source
9604 (origin
9605 (method url-fetch)
9606 (uri (rubygems-uri "Ascii85" version))
9607 (sha256
9608 (base32
5854082a 9609 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
acb6be42
BW
9610 (build-system ruby-build-system)
9611 (native-inputs
9612 `(("bundler" ,bundler)))
9613 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9614 (description
9615 "This library provides methods to encode and decode Ascii85
9616binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9617@dfn{Portable Document Format} (PDF) file formats.")
9618 (home-page "https://github.com/datawraith/ascii85gem")
9619 (license license:expat)))
edf8caae
BW
9620
9621(define-public ruby-ttfunk
9622 (package
9623 (name "ruby-ttfunk")
4179ed93 9624 (version "1.6.2.1")
edf8caae
BW
9625 (source
9626 (origin
4e110825 9627 (method git-fetch)
edf8caae 9628 ;; fetch from github as the gem does not contain testing code
4e110825
EF
9629 (uri (git-reference
9630 (url "https://github.com/prawnpdf/ttfunk")
9631 (commit version)))
9632 (file-name (git-file-name name version))
edf8caae
BW
9633 (sha256
9634 (base32
4179ed93 9635 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
edf8caae
BW
9636 (build-system ruby-build-system)
9637 (arguments
9638 `(#:test-target "spec"
9639 #:phases
9640 (modify-phases %standard-phases
afb7a3e8
JL
9641 (add-before 'build 'remove-ssh
9642 (lambda _
9643 ;; remove dependency on an ssh key pair that doesn't exist
9644 (substitute* "ttfunk.gemspec"
9645 (("spec.signing_key.*") ""))
9646 #t))
edf8caae
BW
9647 (add-before 'check 'remove-rubocop
9648 (lambda _
9649 ;; remove rubocop as a dependency as not needed for testing
9650 (substitute* "ttfunk.gemspec"
9651 (("spec.add_development_dependency\\('rubocop'.*") ""))
9652 (substitute* "Rakefile"
9653 (("require 'rubocop/rake_task'") "")
afb7a3e8 9654 (("RuboCop::RakeTask.new") ""))
edf8caae
BW
9655 #t)))))
9656 (native-inputs
9657 `(("ruby-rspec" ,ruby-rspec)
afb7a3e8 9658 ("ruby-yard" ,ruby-yard)
edf8caae
BW
9659 ("bundler" ,bundler)))
9660 (synopsis "Font metrics parser for the Prawn PDF generator")
9661 (description
9662 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9663part of the Prawn PDF generator.")
9664 (home-page "https://github.com/prawnpdf/ttfunk")
9665 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9666 ;; for details."
4179ed93 9667 (license %prawn-project-licenses)))
cbdd428c 9668
9270298f
BW
9669(define-public ruby-puma
9670 (package
9671 (name "ruby-puma")
63755fcd 9672 (version "3.9.1")
9270298f
BW
9673 (source
9674 (origin
a6cffe6e 9675 (method git-fetch)
9270298f 9676 ;; Fetch from GitHub because distributed gem does not contain tests.
a6cffe6e
EF
9677 (uri (git-reference
9678 (url "https://github.com/puma/puma")
9679 (commit (string-append "v" version))))
9680 (file-name (git-file-name name version))
9270298f
BW
9681 (sha256
9682 (base32
a6cffe6e 9683 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9270298f
BW
9684 (build-system ruby-build-system)
9685 (arguments
63755fcd
BW
9686 `(#:tests? #f ; Tests require an out-dated version of minitest.
9687 #:phases
9270298f
BW
9688 (modify-phases %standard-phases
9689 (add-before 'build 'fix-gemspec
9690 (lambda _
9691 (substitute* "puma.gemspec"
9692 (("git ls-files") "find * |sort"))
9693 #t)))))
9270298f
BW
9694 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9695 (description
9696 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9697for Ruby/Rack applications. Puma is intended for use in both development and
9698production environments. In order to get the best throughput, it is highly
9699recommended that you use a Ruby implementation with real threads like Rubinius
9700or JRuby.")
a6cffe6e 9701 (home-page "https://puma.io/")
9270298f
BW
9702 (license license:expat)))
9703
b0813490
BW
9704(define-public ruby-hoe-git
9705 (package
9706 (name "ruby-hoe-git")
9707 (version "1.6.0")
9708 (source
9709 (origin
9710 (method url-fetch)
9711 (uri (rubygems-uri "hoe-git" version))
9712 (sha256
9713 (base32
9714 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9715 (build-system ruby-build-system)
9716 (propagated-inputs
07095a30 9717 `(("ruby-hoe" ,ruby-hoe)))
b0813490
BW
9718 (synopsis "Hoe plugins for tighter Git integration")
9719 (description
9720 "This package provides a set of Hoe plugins for tighter Git integration.
9721It provides tasks to automate release tagging and pushing and changelog
9722generation.")
7bf837fd 9723 (home-page "https://github.com/jbarnette/hoe-git")
b0813490
BW
9724 (license license:expat)))
9725
cbdd428c
BW
9726(define-public ruby-sequel
9727 (package
9728 (name "ruby-sequel")
65a7f09c 9729 (version "4.49.0")
cbdd428c
BW
9730 (source
9731 (origin
9732 (method url-fetch)
9733 (uri (rubygems-uri "sequel" version))
9734 (sha256
9735 (base32
65a7f09c 9736 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
cbdd428c
BW
9737 (build-system ruby-build-system)
9738 (arguments
9739 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9740 (synopsis "Database toolkit for Ruby")
9741 (description "Sequel provides thread safety, connection pooling and a
9742concise DSL for constructing SQL queries and table schemas. It includes a
9743comprehensive ORM layer for mapping records to Ruby objects and handling
9744associated records.")
e2b70d90 9745 (home-page "https://sequel.jeremyevans.net")
cbdd428c 9746 (license license:expat)))
3cc78097
BW
9747
9748(define-public ruby-timecop
9749 (package
9750 (name "ruby-timecop")
3d4a5eb5 9751 (version "0.9.1")
3cc78097
BW
9752 (source
9753 (origin
9754 (method url-fetch)
9755 (uri (rubygems-uri "timecop" version))
9756 (sha256
9757 (base32
3d4a5eb5 9758 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
3cc78097
BW
9759 (build-system ruby-build-system)
9760 (arguments
9761 `(#:phases
9762 (modify-phases %standard-phases
9763 (add-before 'check 'set-check-rubylib
9764 (lambda _
9765 ;; Set RUBYLIB so timecop tests finds its own lib.
9766 (setenv "RUBYLIB" "lib")
9767 #t)))))
9768 (native-inputs
9769 `(("bundler" ,bundler)
9770 ("ruby-minitest-rg" ,ruby-minitest-rg)
9771 ("ruby-mocha" ,ruby-mocha)
9772 ("ruby-activesupport" ,ruby-activesupport)))
66e07664 9773 (synopsis "Test mocks for time-dependent functions")
3cc78097
BW
9774 (description
9775 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9776making it easier to test time-dependent code. It provides a unified method to
9777mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9778call.")
9779 (home-page "https://github.com/travisjeffery/timecop")
9780 (license license:expat)))
9781
dae620b8
BW
9782(define-public ruby-concurrent
9783 (package
9784 (name "ruby-concurrent")
1007640a 9785 (version "1.1.5")
dae620b8
BW
9786 (source
9787 (origin
8fcba3be 9788 (method git-fetch)
dae620b8
BW
9789 ;; Download from GitHub because the rubygems version does not contain
9790 ;; Rakefile.
8fcba3be
MB
9791 (uri (git-reference
9792 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9793 (commit (string-append "v" version))))
9794 (file-name (git-file-name name version))
dae620b8
BW
9795 (sha256
9796 (base32
1007640a 9797 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
dae620b8
BW
9798 (build-system ruby-build-system)
9799 (arguments
1007640a 9800 `(#:test-target "ci"
dae620b8
BW
9801 #:phases
9802 (modify-phases %standard-phases
520e89eb 9803 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
dae620b8
BW
9804 (lambda _
9805 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9806 ;; correct one.
9807 (delete-file "concurrent-ruby-edge.gemspec")
9808 (delete-file "concurrent-ruby-ext.gemspec")
9809 #t))
1007640a 9810 (replace 'replace-git-ls-files
520e89eb 9811 (lambda _
1007640a
MB
9812 ;; XXX: The default substitution made by this phase is not fully
9813 ;; compatible with "git ls-files". The latter produces file names
9814 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9815 ;; which gives "./lib/foo". That difference in turn breaks the
9816 ;; comparison against a glob pattern in this script.
9817 (substitute* "concurrent-ruby.gemspec"
9818 (("git ls-files") "find * -type f | sort"))
9819 #t))
9820 (add-before 'build 'remove-jar-from-gemspec
520e89eb 9821 (lambda _
1007640a
MB
9822 ;; The gemspec wants to include a JAR file that we do not build
9823 ;; nor need.
9824 (substitute* "concurrent-ruby.gemspec"
9825 (("'lib/concurrent/concurrent_ruby.jar'")
9826 ""))
9827 #t))
9828 (add-before 'build 'remove-rake_compiler_dock-dependency
9829 (lambda _
9830 ;; This library is only used when building for non-MRI targets.
9831 (substitute* "Rakefile"
9832 (("require 'rake_compiler_dock'")
9833 ""))
520e89eb 9834 #t))
9019b37f
BW
9835 (add-before 'check 'remove-timecop-dependency
9836 ;; Remove timecop-dependent tests as having timecop as a depedency
9837 ;; causes circular depedencies.
9838 (lambda _
9839 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9840 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9841 #t)))))
dae620b8
BW
9842 (native-inputs
9843 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9019b37f 9844 ("ruby-rspec" ,ruby-rspec)))
dae620b8
BW
9845 (synopsis "Concurrency tools for Ruby")
9846 (description
9847 "This library provides modern concurrency tools including agents,
9848futures, promises, thread pools, actors, supervisors, and more. It is
9849inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9850patterns.")
9851 (home-page "http://www.concurrent-ruby.com")
9852 (license license:expat)))
2de61e34
BW
9853
9854(define-public ruby-pkg-config
9855 (package
9856 (name "ruby-pkg-config")
884a80dd 9857 (version "1.2.5")
2de61e34
BW
9858 (source
9859 (origin
9860 (method url-fetch)
9861 (uri (rubygems-uri "pkg-config" version))
9862 (sha256
9863 (base32
884a80dd 9864 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
2de61e34
BW
9865 (build-system ruby-build-system)
9866 (arguments
9867 ;; Tests require extra files not included in the gem.
9868 `(#:tests? #f))
9869 (synopsis "Detect libraries for compiling Ruby native extensions")
9870 (description
9871 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9872libraries for compiling Ruby native extensions.")
9873 (home-page "https://github.com/ruby-gnome2/pkg-config")
9874 (license license:lgpl2.0+)))
6689c636
MFM
9875
9876(define-public ruby-net-http-digest-auth
9877 (package
9878 (name "ruby-net-http-digest-auth")
ba074a85 9879 (version "1.4.1")
6689c636
MFM
9880 (source
9881 (origin
9882 (method url-fetch)
9883 (uri (rubygems-uri "net-http-digest_auth" version))
9884 (sha256
9885 (base32
ba074a85 9886 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
6689c636
MFM
9887 (build-system ruby-build-system)
9888 (native-inputs
9889 `(("ruby-hoe" ,ruby-hoe)))
9890 (synopsis "RFC 2617 HTTP digest authentication library")
9891 (description
9892 "This library implements HTTP's digest authentication scheme based on
9893RFC 2617. This enables the use of the digest authentication scheme instead
9894of the more insecure basic authentication scheme.")
7bf837fd 9895 (home-page "https://github.com/drbrain/net-http-digest_auth")
6689c636 9896 (license license:expat)))
06116573 9897
9898(define-public ruby-mail
9899 (package
9900 (name "ruby-mail")
04de0cb5 9901 (version "2.6.6")
06116573 9902 (source
9903 (origin
9904 (method url-fetch)
9905 (uri (rubygems-uri "mail" version))
9906 (sha256
9907 (base32
04de0cb5 9908 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
06116573 9909 (build-system ruby-build-system)
9910 (propagated-inputs
9911 `(("ruby-mime-types" ,ruby-mime-types)))
9912 (arguments
9913 ;; Tests require extra gems not included in the Gemfile.
9914 ;; XXX: Try enabling this for the next version with mini_mime.
9915 `(#:tests? #f))
9916 (synopsis "Mail library for Ruby")
9917 (description
9918 "Mail is an internet library for Ruby that is designed to handle email
9919generation, parsing and sending. The purpose of this library is to provide
9920a single point of access to handle all email functions, including sending
9921and receiving emails. All network type actions are done through proxy
9922methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9923
9924Mail has been designed with a very simple object oriented system that
9925really opens up the email messages you are parsing, if you know what you
9926are doing, you can fiddle with every last bit of your email directly.")
9927 (home-page "https://github.com/mikel/mail")
9928 (license license:expat)))
9b4c8e1b 9929
4d372cb9
CB
9930(define-public ruby-mathn
9931 (package
9932 (name "ruby-mathn")
9933 (version "0.1.0")
9934 (source
9935 (origin
9936 (method url-fetch)
9937 (uri (rubygems-uri "mathn" version))
9938 (sha256
9939 (base32
9940 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9941 (build-system ruby-build-system)
9942 (native-inputs
9943 `(("bundler" ,bundler)
9944 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9945 (synopsis "Extends math operations for increased precision")
9946 (description
9947 "This gem makes mathematical operations more precise in Ruby and
9948integrates other mathematical standard libraries. Prior to Ruby 2.5,
9949@code{mathn} was part of the Ruby standard library.")
9950 (home-page "https://github.com/ruby/mathn")
9951 (license license:bsd-2)))
9952
9b4c8e1b
BW
9953(define-public ruby-code-statistics
9954 (package
9955 (name "ruby-code-statistics")
9956 (version "0.2.13")
9957 (source
9958 (origin
9959 (method url-fetch)
9960 (uri (rubygems-uri "code_statistics" version))
9961 (sha256
9962 (base32
9963 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9964 (build-system ruby-build-system)
9965 (arguments
9966 `(#:tests? #f)) ; Not all test code is included in gem.
9967 (synopsis "Port of the rails 'rake stats' method")
9968 (description
9969 "This gem is a port of the rails 'rake stats' method so it can be made
9970more robust and work for non rails projects.")
702a1012 9971 (home-page "https://github.com/danmayer/code_statistics")
9b4c8e1b 9972 (license license:expat)))
f90c25c1
CL
9973
9974(define-public ruby-rubypants
9975 (package
9976 (name "ruby-rubypants")
9977 (version "0.6.0")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (rubygems-uri "rubypants" version))
9981 (sha256
9982 (base32
9983 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9984 (build-system ruby-build-system)
9985 (arguments
9986 '(#:tests? #f)) ; need Codecov
9987 (synopsis "Port of the smart-quotes library SmartyPants")
9988 (description
9989 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9990original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9991and BBEdit that easily translates plain ASCII punctuation characters into
9992smart typographic punctuation HTML entities.")
9993 (home-page "https://github.com/jmcnevin/rubypants")
9994 (license license:bsd-2)))
beb34835
CL
9995
9996(define-public ruby-org-ruby
9997 (package
9998 (name "ruby-org-ruby")
9999 (version "0.9.12")
10000 (source (origin
10001 (method url-fetch)
10002 (uri (rubygems-uri "org-ruby" version))
10003 (sha256
10004 (base32
10005 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
10006 (build-system ruby-build-system)
10007 (arguments
10008 '(#:tests? #f)) ; no rakefile
10009 (propagated-inputs
10010 `(("ruby-rubypants" ,ruby-rubypants)))
10011 (synopsis "Org-mode parser written in Ruby")
10012 (description
10013 "Org-ruby is an org-mode parser written in Ruby. The most significant
10014thing this library does today is convert org-mode files to HTML or Textile or
10015Markdown.")
10016 (home-page "https://github.com/wallyqs/org-ruby")
10017 (license license:expat)))
670ee20a
BW
10018
10019(define-public ruby-rake
10020 (package
10021 (name "ruby-rake")
c997403a 10022 (version "13.0.1")
670ee20a
BW
10023 (source
10024 (origin
10025 (method url-fetch)
10026 (uri (rubygems-uri "rake" version))
10027 (sha256
10028 (base32
c997403a 10029 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
670ee20a
BW
10030 (build-system ruby-build-system)
10031 (native-inputs
10032 `(("bundler" ,bundler)))
10033 (synopsis "Rake is a Make-like program implemented in Ruby")
10034 (description
10035 "Rake is a Make-like program where tasks and dependencies are specified
10036in standard Ruby syntax.")
10037 (home-page "https://github.com/ruby/rake")
10038 (license license:expat)))
45498f51 10039
51420124 10040(define-public ruby-childprocess
45498f51
DM
10041 (package
10042 (name "ruby-childprocess")
459e4a1a 10043 (version "3.0.0")
45498f51
DM
10044 (source
10045 (origin
10046 (method url-fetch)
10047 (uri (rubygems-uri "childprocess" version))
10048 (sha256
10049 (base32
459e4a1a 10050 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
45498f51
DM
10051 (build-system ruby-build-system)
10052 (arguments
10053 `(#:tests? #f))
10054 (native-inputs
10055 `(("bundler" ,bundler)
10056 ("ruby-rspec" ,ruby-rspec)))
10057 (propagated-inputs
10058 `(("ruby-ffi" ,ruby-ffi)))
10059 (synopsis "Control external programs running in the background, in Ruby")
10060 (description "@code{childprocess} provides a gem to control external
10061programs running in the background, in Ruby.")
459e4a1a 10062 (home-page "https://github.com/enkessler/childprocess")
45498f51 10063 (license license:expat)))
1f10e28d 10064
0d16905b
JL
10065(define-public ruby-public-suffix
10066 (package
10067 (name "ruby-public-suffix")
70e4fcfe 10068 (version "4.0.5")
0d16905b
JL
10069 (source (origin
10070 (method url-fetch)
10071 (uri (rubygems-uri "public_suffix" version))
10072 (sha256
10073 (base32
70e4fcfe 10074 "0vywld400fzi17cszwrchrzcqys4qm6sshbv73wy5mwcixmrgg7g"))))
0d16905b
JL
10075 (build-system ruby-build-system)
10076 (arguments
1f4fc125
CB
10077 '(#:phases
10078 (modify-phases %standard-phases
10079 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
10080 ;; including it as an input can lead to circular dependencies.
10081 (add-after 'unpack 'remove-rubocop-from-Rakefile
10082 (lambda _
10083 (substitute* "Rakefile"
10084 (("require \"rubocop/rake\\_task\"") "")
10085 (("RuboCop::RakeTask\\.new") ""))
10086 #t)))))
10087 (native-inputs
10088 `(("bundler" ,bundler)
10089 ("ruby-yard" ,ruby-yard)
10090 ("ruby-mocha" ,ruby-mocha)
10091 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
0d16905b
JL
10092 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
10093 (synopsis "Domain name parser")
10094 (description "The gem @code{public_suffix} is a domain name parser,
10095written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
10096is one under which Internet users can (or historically could) directly
10097register names. Some examples of public suffixes are @code{.com},
10098@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
10099all known public suffixes.")
10100 (license license:expat)))
6f2c4efb
JL
10101
10102(define-public ruby-addressable
10103 (package
10104 (name "ruby-addressable")
91f7ee87 10105 (version "2.7.0")
6f2c4efb
JL
10106 (source (origin
10107 (method url-fetch)
10108 (uri (rubygems-uri "addressable" version))
10109 (sha256
10110 (base32
91f7ee87 10111 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
6f2c4efb 10112 (build-system ruby-build-system)
0a794b30
CB
10113 (arguments
10114 '(#:test-target "spec"
10115 #:phases
10116 (modify-phases %standard-phases
10117 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
10118 (lambda _
10119 (substitute* "Gemfile"
10120 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
10121 ((".*launchy.*") "")
10122 ((".*rake.*") "gem 'rake'\n")
10123 ((".*redcarpet.*") ""))
10124 #t))
10125 (add-before 'check 'delete-network-dependent-test
10126 (lambda _
10127 (delete-file "spec/addressable/net_http_compat_spec.rb")
10128 #t)))))
10129 (native-inputs
10130 `(("ruby-rspec" ,ruby-rspec)
10131 ("bundler" ,bundler)
10132 ("ruby-idn-ruby" ,ruby-idn-ruby)
10133 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
1628d57b 10134 ("ruby-rspec-its" ,ruby-rspec-its-minimal)
0a794b30
CB
10135 ("ruby-yard" ,ruby-yard)
10136 ("ruby-simplecov" ,ruby-simplecov)))
6f2c4efb
JL
10137 (propagated-inputs
10138 `(("ruby-public-suffix" ,ruby-public-suffix)))
6f2c4efb
JL
10139 (home-page "https://github.com/sporkmonger/addressable")
10140 (synopsis "Alternative URI implementation")
10141 (description "Addressable is a replacement for the URI implementation that
10142is part of Ruby's standard library. It more closely conforms to RFC 3986,
10143RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
10144 (license license:asl2.0)))
9c7f15c0 10145
305e9b33
MB
10146(define-public ruby-colorize
10147 (package
10148 (name "ruby-colorize")
10149 (version "0.8.1")
10150 (source (origin
10151 (method url-fetch)
10152 (uri (rubygems-uri "colorize" version))
10153 (sha256
10154 (base32
10155 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
10156 (build-system ruby-build-system)
10157 (arguments
10158 '(#:phases (modify-phases %standard-phases
10159 (add-before 'check 'remove-codeclimate-dependency
10160 (lambda _
10161 (substitute* "test/test_colorize.rb"
10162 ;; Do not hook the tests into the online CodeClimate
10163 ;; service which is unnecessary for these tests.
10164 (("require 'codeclimate-test-reporter'")
10165 "")
10166 (("CodeClimate.*") ""))
10167 #t)))))
10168 (synopsis "Add color effects to the @code{String} class")
10169 (description
10170 "This package extends the @code{String} class and adds a
10171@code{ColorizedString} with methods to set text color, background color,
10172and text effects.")
702a1012 10173 (home-page "https://github.com/fazibear/colorize")
305e9b33
MB
10174 (license license:gpl2+)))
10175
9c7f15c0
JL
10176(define-public ruby-colorator
10177 (package
10178 (name "ruby-colorator")
10179 (version "1.1.0")
10180 (source (origin
10181 (method url-fetch)
10182 (uri (rubygems-uri "colorator" version))
10183 (sha256
10184 (base32
10185 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
10186 (build-system ruby-build-system)
10187 (arguments
10188 ;; No test target
10189 `(#:tests? #f))
10190 (home-page "http://octopress.org/colorator/")
10191 (synopsis "Terminal color library")
10192 (description "Colorator is a Ruby gem that helps you colorize your text
10193for the terminal.")
10194 (license license:expat)))
78b9c291
JL
10195
10196(define-public ruby-command-line-reporter
10197 (package
10198 (name "ruby-command-line-reporter")
b448e408 10199 (version "4.0.1")
78b9c291
JL
10200 (source (origin
10201 (method url-fetch)
10202 (uri (rubygems-uri "command_line_reporter" version))
10203 (sha256
10204 (base32
b448e408 10205 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
78b9c291
JL
10206 (build-system ruby-build-system)
10207 (arguments
10208 ;; No Rakefile
10209 `(#:tests? #f
10210 #:phases
10211 (modify-phases %standard-phases
10212 (add-before 'build 'fix-dependencies
10213 (lambda _
10214 (substitute* ".gemspec"
10215 ;; colored is unmaintained
10216 (("colored") "colorator")
10217 ;; colorator version
10218 (("= 1.2") "= 1.1"))
10219 #t)))))
10220 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
10221 (home-page "https://github.com/wbailey/command_line_reporter")
10222 (synopsis "Report production while executing Ruby scripts")
10223 (description "This gem provides a DSL that makes it easy to write reports
10224of various types in ruby. It eliminates the need to litter your source with
10225puts statements, instead providing a more readable, expressive interface to
10226your application.")
10227 (license license:asl2.0)))
f22c0387
JL
10228
10229(define-public ruby-command-line-reporter-3
10230 (package
10231 (inherit ruby-command-line-reporter)
10232 (version "3.3.6")
10233 (source (origin
10234 (method url-fetch)
10235 (uri (rubygems-uri "command_line_reporter" version))
10236 (sha256
10237 (base32
10238 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
6bba8ecf 10239
439d47cd
MC
10240(define-public ruby-kpeg
10241 (package
10242 (name "ruby-kpeg")
10243 (version "1.1.0")
10244 (source
10245 (origin
10246 (method url-fetch)
10247 (uri (rubygems-uri "kpeg" version))
10248 (sha256
10249 (base32
10250 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
10251 (build-system ruby-build-system)
10252 (native-inputs
10253 `(("ruby-hoe" ,ruby-hoe)))
10254 (synopsis "PEG library for Ruby")
10255 (description "KPeg is a simple PEG library for Ruby. It provides an API as
10256well as native grammar to build the grammar. KPeg supports direct left
10257recursion of rules via the
10258@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
10259technique.")
10260 (home-page "https://github.com/evanphx/kpeg")
10261 (license license:expat)))
10262
6bba8ecf
JL
10263(define-public ruby-rdoc
10264 (package
10265 (name "ruby-rdoc")
9304f989 10266 (version "6.2.0")
6bba8ecf 10267 (source
9304f989
MC
10268 (origin
10269 (method git-fetch)
10270 (uri (git-reference
b0e7b699 10271 (url "https://github.com/ruby/rdoc")
9304f989
MC
10272 (commit (string-append "v" version))))
10273 (file-name (git-file-name name version))
10274 (sha256
10275 (base32
10276 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
6bba8ecf 10277 (build-system ruby-build-system)
9304f989
MC
10278 (arguments
10279 `(#:phases
10280 (modify-phases %standard-phases
10281 (add-after 'unpack 'patch-gemspec
10282 ;; TODO: Remove after next release is tagged.
10283 (lambda _
10284 (substitute* "rdoc.gemspec"
10285 (("\"lib/rdoc/generator/template/darkfish/js/\
10286jquery\\.js\", ") ""))
10287 #t))
10288 (add-before 'build 'generate
10289 ;; 'gem build' doesn't honor Rakefile dependencies (see:
10290 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
10291 (lambda _
10292 (invoke "rake" "generate"))))))
6bba8ecf 10293 (native-inputs
9304f989
MC
10294 `(("bundler" ,bundler)
10295 ("ruby-kpeg" ,ruby-kpeg)
10296 ("ruby-racc" ,ruby-racc)
10297 ("ruby-rubocop" ,ruby-rubocop)))
6bba8ecf
JL
10298 (home-page "https://ruby.github.io/rdoc/")
10299 (synopsis "HTML and command-line documentation utility")
10300 (description "RDoc produces HTML and command-line documentation for Ruby
10301projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
10302documentation from the command-line.")
10303 (license license:gpl2+)))
18077ffc
JL
10304
10305(define-public ruby-sass-listen
10306 (package
10307 (name "ruby-sass-listen")
10308 (version "4.0.0")
10309 (source (origin
10310 (method url-fetch)
10311 (uri (rubygems-uri "sass-listen" version))
10312 (sha256
10313 (base32
10314 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
10315 (build-system ruby-build-system)
10316 (arguments
10317 ;; No test target
10318 `(#:tests? #f))
10319 (propagated-inputs
10320 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
10321 ("ruby-rb-inotify" ,ruby-rb-inotify)))
10322 (home-page "https://github.com/sass/listen")
10323 (synopsis "File modification notification library")
10324 (description "The Listen gem listens to file modifications and notifies you
10325about the changes.")
10326 (license license:expat)))
0c8eedc1
JL
10327
10328(define-public ruby-terminfo
10329 (package
10330 (name "ruby-terminfo")
10331 (version "0.1.1")
10332 (source
10333 (origin
10334 (method url-fetch)
10335 (uri (rubygems-uri "ruby-terminfo" version))
10336 (sha256
10337 (base32
10338 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
10339 (build-system ruby-build-system)
10340 (arguments
10341 `(#:test-target "test"
10342 ;; Rakefile requires old packages and would need modification to
10343 ;; work with current software.
10344 #:tests? #f))
10345 (inputs
10346 `(("ncurses" ,ncurses)))
10347 (native-inputs
10348 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
10349 ("ruby-rdoc" ,ruby-rdoc)))
10350 (home-page "http://www.a-k-r.org/ruby-terminfo/")
10351 (synopsis "Terminfo binding for Ruby")
10352 (description "Ruby-terminfo provides terminfo binding for Ruby.")
10353 (license license:bsd-3)))
ddc3a667
JL
10354
10355(define-public ruby-diffy
10356 (package
10357 (name "ruby-diffy")
10358 (version "3.2.1")
10359 (source
10360 (origin
10361 (method url-fetch)
10362 (uri (rubygems-uri "diffy" version))
10363 (sha256
10364 (base32
10365 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
10366 (build-system ruby-build-system)
10367 (arguments
10368 ;; No tests
10369 `(#:tests? #f))
10370 (native-inputs
10371 `(("ruby-rspec" ,ruby-rspec)))
10372 (home-page "https://github.com/samg/diffy")
10373 (synopsis "Convenient diffing in ruby")
10374 (description "Diffy provides a convenient way to generate a diff from two
10375strings or files.")
10376 (license license:expat)))
6456beef
JL
10377
10378(define-public ruby-sass-spec
10379 (package
10380 (name "ruby-sass-spec")
10381 (version "3.5.4")
11df8321
TGR
10382 (source
10383 (origin
10384 (method git-fetch)
10385 (uri (git-reference
b0e7b699 10386 (url "https://github.com/sass/sass-spec")
11df8321
TGR
10387 (commit (string-append "v" version))))
10388 (file-name (git-file-name name version))
10389 (sha256
10390 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
6456beef
JL
10391 (build-system ruby-build-system)
10392 (propagated-inputs
10393 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
10394 ("ruby-diffy" ,ruby-diffy)
10395 ("ruby-terminfo" ,ruby-terminfo)))
10396 (arguments
2c7cb711
CB
10397 `(;; This package contains tests for a sass implementation, and the to
10398 ;; avoid any circular dependencies, the tests are not run here
10399 #:tests? #f
10400 #:phases
10401 (modify-phases %standard-phases
10402 (add-after 'unpack 'patch-test
10403 (lambda _
10404 (delete-file "spec/values/colors/alpha_hex-3.5/error")
10405 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
10406 (("string") "color")))))))
6456beef
JL
10407 (home-page "https://github.com/sass/sass-spec")
10408 (synopsis "Test suite for Sass")
10409 (description "Sass Spec is a test suite for Sass. Test cases are all in
10410the @file{spec} directory.")
10411 (license license:expat)))
f00f4492
JL
10412
10413(define-public ruby-sass
10414 (package
10415 (name "ruby-sass")
11ff2adc 10416 (version "3.6.0")
f00f4492
JL
10417 (source (origin
10418 (method url-fetch)
10419 (uri (rubygems-uri "sass" version))
10420 (sha256
10421 (base32
11ff2adc 10422 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
f00f4492
JL
10423 (build-system ruby-build-system)
10424 (propagated-inputs
10425 `(("ruby-sass-listen" ,ruby-sass-listen)))
10426 (native-inputs
11ff2adc
CB
10427 `(("ruby-sass-spec" ,ruby-sass-spec)
10428 ("ruby-mathn" ,ruby-mathn)))
3497086b 10429 (home-page "https://sass-lang.com/")
f00f4492
JL
10430 (synopsis "CSS extension language")
10431 (description "Sass is a CSS extension language. It extends CSS with
10432features that don't exist yet like variables, nesting, mixins and inheritance.")
10433 (license license:expat)))
5e242cb4 10434
9efc888d
CB
10435(define-public ruby-sassc
10436 (package
10437 (name "ruby-sassc")
c7358514 10438 (version "2.4.0")
9efc888d
CB
10439 (source
10440 (origin
10441 (method url-fetch)
10442 (uri (rubygems-uri "sassc" version))
10443 (sha256
10444 (base32
c7358514 10445 "0gpqv48xhl8mb8qqhcifcp0pixn206a7imc07g48armklfqa4q2c"))))
9efc888d
CB
10446 (build-system ruby-build-system)
10447 (arguments
3e776b44
CB
10448 '(#:modules ((guix build ruby-build-system)
10449 (guix build utils)
10450 (ice-9 textual-ports))
10451 #:phases
9efc888d
CB
10452 (modify-phases %standard-phases
10453 ;; TODO: This would be better as a snippet, but the ruby-build-system
10454 ;; doesn't seem to support that
10455 (add-after 'unpack 'remove-libsass
10456 (lambda _
10457 (delete-file-recursively "ext")
3e776b44
CB
10458 (with-atomic-file-replacement "sassc.gemspec"
10459 (lambda (in out)
10460 (let* ((gemspec (get-string-all in))
10461 (index (string-contains gemspec "libsass_dir")))
10462 (display (string-append
10463 (string-take gemspec index)
10464 "\nend\n")
10465 out))))
9efc888d
CB
10466 #t))
10467 (add-after 'unpack 'dont-check-the-libsass-version
10468 (lambda _
10469 (substitute* "test/native_test.rb"
10470 (("assert_equal.*Native\\.version") ""))
10471 #t))
10472 (add-after 'unpack 'remove-git-from-gemspec
10473 (lambda _
10474 (substitute* "sassc.gemspec"
3e776b44 10475 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
9efc888d
CB
10476 #t))
10477 (add-after 'unpack 'remove-extensions-from-gemspec
10478 (lambda _
10479 (substitute* "sassc.gemspec"
3e776b44 10480 (("\\[\"ext/extconf.rb\"\\]") "[]"))
9efc888d
CB
10481 #t))
10482 (add-after 'unpack 'fix-Rakefile
10483 (lambda _
10484 (substitute* "Rakefile"
3e776b44 10485 (("test: 'compile:libsass'") ":test"))
9efc888d
CB
10486 #t))
10487 (add-after 'unpack 'remove-unnecessary-dependencies
10488 (lambda _
10489 (substitute* "test/test_helper.rb"
10490 (("require \"pry\"") ""))
10491 #t))
10492 (add-before 'build 'patch-native.rb
10493 (lambda* (#:key inputs #:allow-other-keys)
10494 (substitute* "lib/sassc/native.rb"
10495 ((".*gem_root = spec.gem_dir") "")
10496 (("ffi_lib .*\n")
10497 (string-append
10498 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
10499 #t))
10500 ;; The gemspec still references the libsass files, so just keep the
10501 ;; one in the gem.
10502 (delete 'extract-gemspec))))
10503 (propagated-inputs
10504 `(("ruby-ffi" ,ruby-ffi)
10505 ("ruby-rake" ,ruby-rake)))
10506 (inputs
10507 `(("libsass" ,libsass)))
10508 (native-inputs
10509 `(("bundler" ,bundler)
3e776b44 10510 ("ruby-rake-compiler" ,ruby-rake-compiler)
9efc888d
CB
10511 ("ruby-minitest-around" ,ruby-minitest-around)
10512 ("ruby-test-construct" ,ruby-test-construct)))
10513 (synopsis "Use libsss from Ruby")
10514 (description
10515 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10516bindings to the libsass library. This enables rendering
10517@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10518 (home-page "https://github.com/sass/sassc-ruby")
10519 (license license:expat)))
10520
5e242cb4
JL
10521(define-public ruby-jekyll-sass-converter
10522 (package
10523 (name "ruby-jekyll-sass-converter")
d603db90 10524 (version "2.1.0")
5e242cb4
JL
10525 (source (origin
10526 (method url-fetch)
10527 (uri (rubygems-uri "jekyll-sass-converter" version))
10528 (sha256
10529 (base32
d603db90 10530 "04ncr44wrilz26ayqwlg7379yjnkb29mvx4j04i62b7czmdrc9dv"))))
5e242cb4
JL
10531 (build-system ruby-build-system)
10532 (propagated-inputs
10533 `(("ruby-sass" ,ruby-sass)))
10534 (arguments
10535 ;; No rakefile
10536 `(#:tests? #f))
10537 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10538 (synopsis "Sass converter for Jekyll")
10539 (description "This gem provide built-in support for the Sass converter
10540in Jekyll.")
10541 (license license:expat)))
ceac6f6f
JL
10542
10543(define-public ruby-jekyll-watch
10544 (package
10545 (name "ruby-jekyll-watch")
6cbba8a3 10546 (version "2.1.2")
ceac6f6f
JL
10547 (source (origin
10548 (method url-fetch)
10549 (uri (rubygems-uri "jekyll-watch" version))
10550 (sha256
10551 (base32
6cbba8a3 10552 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
ceac6f6f
JL
10553 (build-system ruby-build-system)
10554 (propagated-inputs
6cbba8a3 10555 `(("ruby-listen" ,ruby-listen)))
ceac6f6f
JL
10556 (arguments
10557 ;; No rakefile
10558 `(#:tests? #f))
10559 (home-page "https://github.com/jekyll/jekyll-watch")
10560 (synopsis "Jekyll auto-rebuild support")
10561 (description "This gems add the @code{--watch} switch to the jekyll CLI
10562interface. It allows Jekyll to rebuild your site when a file changes.")
10563 (license license:expat)))
3224a5a8
JL
10564
10565(define-public ruby-parallel
10566 (package
10567 (name "ruby-parallel")
c41fba01
CB
10568 (version "1.13.0")
10569 (source
10570 (origin
10571 (method git-fetch)
10572 (uri (git-reference
b0e7b699 10573 (url "https://github.com/grosser/parallel")
c41fba01
CB
10574 (commit (string-append "v" version))))
10575 (file-name (git-file-name name version))
10576 (sha256
10577 (base32
10578 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
3224a5a8 10579 (build-system ruby-build-system)
c41fba01
CB
10580 (arguments
10581 `(;; TODO 3 test failures
10582 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10583 ;; open unnecessary pipes
10584 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10585 ;; SQLite in processes
10586 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10587 ;; SQLite in threads
10588 #:tests? #f
10589 #:test-target "rspec-rerun:spec"
10590 #:phases
10591 (modify-phases %standard-phases
10592 (add-after 'unpack 'patch-Gemfile
10593 (lambda _
10594 (substitute* "Gemfile"
10595 (("gem 'rspec-legacy_formatters'") "")
10596 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10597 (add-before 'check 'delete-Gemfile.lock
10598 (lambda _
10599 ;; Bundler isn't being used for fetching dependendencies, so
10600 ;; delete the Gemfile.lock
10601 (delete-file "Gemfile.lock")
10602 #t))
10603 (add-before 'build 'patch-gemspec
10604 (lambda _
10605 (substitute* "parallel.gemspec"
10606 (("git ls-files") "find"))
10607 #t)))))
10608 (native-inputs
10609 `(("ruby-rspec" ,ruby-rspec)
10610 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
10611 ("bundler" ,bundler)
10612 ("ruby-activerecord" ,ruby-activerecord)
10613 ("ruby-progressbar" ,ruby-progressbar)
10614 ("ruby-bump" ,ruby-bump)
10615 ("procps" ,procps)
10616 ("lsof" ,lsof)
10617 ("ruby-mysql2" ,ruby-mysql2)
10618 ("ruby-sqlite3" ,ruby-sqlite3)
10619 ("ruby-i18n" ,ruby-i18n)))
3224a5a8
JL
10620 (home-page "https://github.com/grosser/parallel")
10621 (synopsis "Parallel processing in Ruby")
10622 (description "Parallel allows you to run any code in parallel Processes
10623(to use all CPUs) or Threads(to speedup blocking operations). It is best
10624suited for map-reduce or e.g. parallel downloads/uploads.")
10625 (license license:expat)))
83d9f672
JL
10626
10627(define-public ruby-cane
10628 (package
10629 (name "ruby-cane")
10630 (version "3.0.0")
10631 (source (origin
10632 (method url-fetch)
10633 (uri (rubygems-uri "cane" version))
10634 (sha256
10635 (base32
10636 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10637 (build-system ruby-build-system)
10638 (arguments `(#:tests? #f)); No rakefile
10639 (home-page "https://github.com/square/cane")
10640 (propagated-inputs
10641 `(("ruby-parallel" ,ruby-parallel)))
10642 (synopsis "Code quality threshold checking")
10643 (description "Cane fails your build if code quality thresholds are not met.")
10644 (license license:asl2.0)))
00d71efc
JL
10645
10646(define-public ruby-morecane
10647 (package
10648 (name "ruby-morecane")
10649 (version "0.2.0")
10650 (source (origin
10651 (method url-fetch)
10652 (uri (rubygems-uri "morecane" version))
10653 (sha256
10654 (base32
10655 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10656 (build-system ruby-build-system)
10657 (home-page "https://github.com/yob/morecane")
10658 (arguments `(#:tests? #f)); No rakefile
10659 (propagated-inputs
10660 `(("ruby-parallel" ,ruby-parallel)))
10661 (synopsis "Extra checks for cane")
10662 (description "The cane gem provides a great framework for running quality
10663checks over your ruby project as part of continuous integration build. It
10664comes with a few checks out of the box, but also provides an API for loading
10665custom checks. This gem provides a set of additional checks.")
10666 (license license:expat)))
abbe629c
JL
10667
10668(define-public ruby-pdf-reader
10669 (package
10670 (name "ruby-pdf-reader")
b377dd95 10671 (version "2.4.0")
abbe629c 10672 (source (origin
34796d7a
MC
10673 (method git-fetch) ;no test in distributed gem archive
10674 (uri (git-reference
8ed4c468 10675 (url "https://github.com/yob/pdf-reader")
34796d7a
MC
10676 (commit (string-append "v" version))))
10677 (file-name (git-file-name name version))
abbe629c
JL
10678 (sha256
10679 (base32
34796d7a 10680 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
abbe629c 10681 (build-system ruby-build-system)
34796d7a
MC
10682 (arguments `(#:test-target "spec"
10683 #:phases (modify-phases %standard-phases
10684 (add-after 'unpack 'do-not-use-bundler
10685 (lambda _
10686 (substitute* "spec/spec_helper.rb"
10687 ((".*[Bb]undler.*") ""))
10688 #t)))))
abbe629c 10689 (native-inputs
34796d7a 10690 `(("ruby-rspec" ,ruby-rspec)
abbe629c
JL
10691 ("ruby-cane" ,ruby-cane)
10692 ("ruby-morecane" ,ruby-morecane)))
10693 (propagated-inputs
10694 `(("ruby-afm" ,ruby-afm)
10695 ("ruby-ascii85" ,ruby-ascii85)
10696 ("ruby-hashery" ,ruby-hashery)
10697 ("ruby-rc4" ,ruby-rc4)
10698 ("ruby-ttfunk" ,ruby-ttfunk)))
10699 (home-page "https://github.com/yob/pdf-reader")
10700 (synopsis "PDF parser in Ruby")
10701 (description "The PDF::Reader library implements a PDF parser conforming as
10702much as possible to the PDF specification from Adobe. It provides programmatic
10703access to the contents of a PDF file with a high degree of flexibility.")
10704 (license license:gpl3+)))
461fb859
JL
10705
10706(define-public ruby-pdf-inspector
ed2f26f8
MC
10707 (let ((revision "1")
10708 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10709 (package
10710 (name "ruby-pdf-inspector")
10711 (version (git-version "1.3.0" revision commit))
10712 (source (origin
10713 (method git-fetch)
10714 (uri (git-reference
8ed4c468 10715 (url "https://github.com/prawnpdf/pdf-inspector")
ed2f26f8
MC
10716 (commit commit)))
10717 (file-name (git-file-name name version))
10718 (sha256
10719 (base32
10720 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10721 (build-system ruby-build-system)
10722 (arguments
10723 `(#:test-target "spec"
10724 #:phases (modify-phases %standard-phases
10725 (add-before 'build 'drop-signing-key-requirement
10726 (lambda _
10727 (substitute* "pdf-inspector.gemspec"
10728 (("spec.signing_key =.*")
10729 "spec.signing_key = nil"))
10730 #t))
10731 (replace 'check
10732 (lambda _
10733 (substitute* "pdf-inspector.gemspec"
10734 ((".*rubocop.*") "")
10735 ((".*yard.*") ""))
10736 (invoke "rspec"))))))
10737 (native-inputs
10738 `(("ruby-rspec" ,ruby-rspec)))
10739 (propagated-inputs
10740 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
10741 (home-page "https://github.com/prawnpdf/pdf-inspector")
10742 (synopsis "Analysis classes for inspecting PDF output")
10743 (description "This library provides a number of PDF::Reader based tools for
461fb859
JL
10744use in testing PDF output. Presently, the primary purpose of this tool is to
10745support the tests found in Prawn, a pure Ruby PDF generation library.")
ed2f26f8 10746 (license %prawn-project-licenses))))
770e3b53
JL
10747
10748(define-public ruby-pdf-core
10749 (package
10750 (name "ruby-pdf-core")
10751 (version "0.8.1")
10752 (source (origin
10753 (method url-fetch)
10754 (uri (rubygems-uri "pdf-core" version))
10755 (sha256
10756 (base32
10757 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10758 (build-system ruby-build-system)
10759 (arguments
10760 ; No test target
10761 `(#:tests? #f))
10762 (home-page "https://github.com/prawnpdf/pdf-core")
10763 (synopsis "Low level PDF features for Prawn")
10764 (description "This is an experimental gem that extracts low-level PDF
10765functionality from Prawn.")
10766 (license license:gpl3+)))
37fbced7 10767
7ad8dd08 10768(define-public ruby-prawn
e6c7a601
MC
10769 ;; There hasn't been a new release since 2017/03/17.
10770 (let ((revision "1")
10771 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10772 (package
10773 (name "ruby-prawn")
10774 (version (git-version "2.2.2" revision commit))
10775 (source (origin
10776 (method git-fetch)
10777 (uri (git-reference
8ed4c468 10778 (url "https://github.com/prawnpdf/prawn")
e6c7a601
MC
10779 (commit commit)))
10780 (file-name (git-file-name name version))
10781 (sha256
10782 (base32
10783 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10784 (build-system ruby-build-system)
10785 (arguments
10786 `(#:phases
10787 (modify-phases %standard-phases
10788 (add-before 'build 'drop-signing-key-requirement
10789 (lambda _
10790 (substitute* "prawn.gemspec"
10791 (("spec.signing_key =.*")
10792 "spec.signing_key = nil"))
10793 #t))
10794 (replace 'check
10795 (lambda* (#:key tests? #:allow-other-keys)
10796 (when tests?
10797 ;; The Prawn manual test fails (see:
10798 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10799 ;; it.
10800 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10801 #t)))))
10802 (propagated-inputs
10803 `(("ruby-pdf-core" ,ruby-pdf-core)
10804 ("ruby-ttfunk" ,ruby-ttfunk)))
10805 (native-inputs
10806 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
10807 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10808 ("ruby-rspec" ,ruby-rspec)
10809 ("ruby-simplecov" ,ruby-simplecov)
10810 ("ruby-yard" ,ruby-yard)))
10811 (home-page "https://prawnpdf.org/api-docs/2.0/")
10812 (synopsis "PDF generation for Ruby")
10813 (description "Prawn is a pure Ruby PDF generation library.")
10814 (license %prawn-project-licenses))))
197ca8ec
JL
10815
10816(define-public ruby-prawn-table
10817 (package
10818 (name "ruby-prawn-table")
10819 (version "0.2.2")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (rubygems-uri "prawn-table" version))
10823 (sha256
10824 (base32
10825 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10826 (build-system ruby-build-system)
197ca8ec 10827 (propagated-inputs
0927b039
CB
10828 `(("ruby-prawn" ,ruby-prawn)
10829 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
10830 (native-inputs
10831 `(("bundler" ,bundler)
10832 ("ruby-yard" ,ruby-yard)
10833 ("ruby-mocha" ,ruby-mocha)
10834 ("ruby-coderay" ,ruby-coderay)
10835 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10836 ("ruby-simplecov" ,ruby-simplecov)
10837 ("ruby-rspec-2" ,ruby-rspec-2)))
10838 (arguments
10839 '(;; TODO: 1 test fails
10840 ;; Failure/Error: pdf.page_count.should == 1
10841 ;; expected: 1
10842 ;; got: 2 (using ==)
10843 ;; # ./spec/table_spec.rb:1308
10844 ;;
10845 ;; 225 examples, 1 failure
10846 #:tests? #f
10847 #:phases
10848 (modify-phases %standard-phases
10849 (add-before 'check 'patch-gemspec
10850 (lambda _
10851 (substitute* "prawn-table.gemspec"
10852 ;; Loosen the requirement for pdf-inspector
10853 (("~> 1\\.1\\.0") ">= 0")
10854 ;; Loosen the requirement for pdf-reader
10855 (("~> 1\\.2") ">= 0"))))
10856 (replace 'check
10857 (lambda* (#:key tests? #:allow-other-keys)
10858 (when tests?
10859 (invoke "rspec"))
10860 #t)))))
197ca8ec
JL
10861 (home-page "https://github.com/prawnpdf/prawn-table")
10862 (synopsis "Tables support for Prawn")
10863 (description "This gem provides tables support for Prawn.")
10864 (license license:gpl3+)))
03127069
JL
10865
10866(define-public ruby-kramdown
10867 (package
10868 (name "ruby-kramdown")
2b5b7809 10869 (version "2.3.0")
03127069
JL
10870 (source (origin
10871 (method url-fetch)
10872 (uri (rubygems-uri "kramdown" version))
10873 (sha256
10874 (base32
2b5b7809 10875 "1vmw752c26ny2jwl0npn0gbyqwgz4hdmlpxnsld9qi9xhk5b1qh7"))))
03127069
JL
10876 (build-system ruby-build-system)
10877 (arguments `(#:tests? #f)); FIXME: some test failures
10878 (native-inputs
10879 `(("ruby-prawn" ,ruby-prawn)
10880 ("ruby-prawn-table" ,ruby-prawn-table)))
10881 (home-page "https://kramdown.gettalong.org/")
10882 (synopsis "Markdown parsing and converting library")
10883 (description "Kramdown is a library for parsing and converting a superset
10884of Markdown. It is completely written in Ruby, supports standard Markdown
10885(with some minor modifications) and various extensions that have been made
10886popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10887 (license license:expat)))
fa0063bc 10888
e1cab74a
MR
10889(define-public ruby-kramdown-parser-gfm
10890 (package
10891 (name "ruby-kramdown-parser-gfm")
10892 (version "1.1.0")
10893 (source
10894 (origin
10895 (method url-fetch)
10896 (uri (rubygems-uri "kramdown-parser-gfm" version))
10897 (sha256
10898 (base32 "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"))))
10899 (build-system ruby-build-system)
10900 (arguments
10901 `(#:tests? #f)) ;no rakefile
10902 (propagated-inputs
10903 `(("ruby-kramdown" ,ruby-kramdown)))
10904 (synopsis "Kramdown parser for the GFM dialect of Markdown")
10905 (description
10906 "This is a parser for kramdown that converts Markdown documents in the
10907GFM dialect to HTML.")
10908 (home-page "https://github.com/kramdown/parser-gfm")
10909 (license license:expat)))
10910
fa0063bc
JL
10911(define-public ruby-http-parser.rb
10912 (package
10913 (name "ruby-http-parser.rb")
10914 (version "0.6.0")
10915 (source
10916 (origin
10917 (method url-fetch)
10918 (uri (rubygems-uri "http_parser.rb" version))
10919 (sha256
10920 (base32
10921 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10922 (build-system ruby-build-system)
10923 (arguments
10924 ;; No tests
10925 `(#:tests? #f))
10926 (native-inputs
10927 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10928 ("ruby-rspec" ,ruby-rspec)))
10929 (home-page "https://github.com/tmm1/http_parser.rb")
10930 (synopsis "HTTP parser un Ruby")
10931 (description "This gem is a simple callback-based HTTP request/response
10932parser for writing http servers, clients and proxies.")
10933 (license license:expat)))
5e2f74bd
JL
10934
10935(define-public ruby-em-websocket
10936 (package
10937 (name "ruby-em-websocket")
10938 (version "0.5.1")
10939 (source
10940 (origin
10941 (method url-fetch)
10942 (uri (rubygems-uri "em-websocket" version))
10943 (sha256
10944 (base32
10945 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10946 (build-system ruby-build-system)
10947 (arguments
10948 ;; No tests
10949 `(#:tests? #f))
10950 (propagated-inputs
10951 `(("ruby-eventmachine" ,ruby-eventmachine)
10952 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10953 (native-inputs
10954 `(("bundler" ,bundler)
10955 ("ruby-rspec" ,ruby-rspec)))
10956 (home-page "https://github.com/igrigorik/em-websocket")
10957 (synopsis "EventMachine based WebSocket server")
10958 (description "Em-websocket is an EventMachine based WebSocket server
10959implementation.")
10960 (license license:expat)))
4ce0414b
JL
10961
10962(define-public ruby-rouge
10963 (package
10964 (name "ruby-rouge")
22d6b534 10965 (version "3.21.0")
4ce0414b
JL
10966 (source (origin
10967 (method url-fetch)
10968 (uri (rubygems-uri "rouge" version))
10969 (sha256
10970 (base32
22d6b534 10971 "1agrrmj88k9jkk36ra1ml2c1jffpp595pkxmcla74ac9ia09vn3s"))))
4ce0414b
JL
10972 (build-system ruby-build-system)
10973 (arguments `(#:tests? #f)); No rakefile
10974 (home-page "http://rouge.jneen.net/")
10975 (synopsis "Code highlighter")
10976 (description "Rouge is a code highlighter written in Ruby. It supports more
10977than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10978is compatible with stylesheets designed for pygments.")
10979 (license (list
10980 ;; rouge is licensed under expat
10981 license:expat
10982 ;; pygments is licensed under bsd-2
10983 license:bsd-2))))
2c5028bd 10984
2e072e37
JL
10985(define-public ruby-hashie
10986 (package
10987 (name "ruby-hashie")
10988 (version "3.6.0")
10989 (source (origin
10990 (method url-fetch)
10991 (uri (rubygems-uri "hashie" version))
10992 (sha256
10993 (base32
10994 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10995 (build-system ruby-build-system)
10996 (native-inputs
10997 `(("bundler" ,bundler)))
10998 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10999 (home-page "https://github.com/intridea/hashie")
11000 (synopsis "Extensions to Ruby Hashes")
11001 (description "Hashie is a collection of classes and mixins that make Ruby
11002hashes more powerful.")
11003 (license license:expat)))
73bfc125
JL
11004
11005(define-public ruby-heredoc-unindent
11006 (package
11007 (name "ruby-heredoc-unindent")
11008 (version "1.2.0")
11009 (source (origin
11010 (method url-fetch)
11011 (uri (rubygems-uri "heredoc_unindent" version))
11012 (sha256
11013 (base32
11014 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
11015 (build-system ruby-build-system)
11016 (native-inputs
11017 `(("ruby-hoe" ,ruby-hoe)))
11018 (home-page "https://github.com/adrianomitre/heredoc_unindent")
11019 (synopsis "Heredoc indentation cleaner")
11020 (description "This gem removes common margin from indented strings, such
11021as the ones produced by indented heredocs. In other words, it strips out
4f66ae28 11022leading whitespace chars at the beginning of each line, but only as much as
73bfc125
JL
11023the line with the smallest margin.
11024
11025It is acknowledged that many strings defined by heredocs are just code and
11026fact is that most parsers are insensitive to indentation. If, however, the
11027strings are to be used otherwise, be it for printing or testing, the extra
11028indentation will probably be an issue and hence this gem.")
11029 (license license:expat)))
f8ae2ee5
JL
11030
11031(define-public ruby-safe-yaml
11032 (package
11033 (name "ruby-safe-yaml")
7fa83fa8 11034 (version "1.0.5")
28cf8dab
CB
11035 (source
11036 (origin
28cf8dab
CB
11037 (method git-fetch)
11038 (uri (git-reference
b0e7b699 11039 (url "https://github.com/dtao/safe_yaml")
28cf8dab
CB
11040 (commit version)))
11041 (file-name (git-file-name name version))
11042 (sha256
11043 (base32
7fa83fa8 11044 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
f8ae2ee5
JL
11045 (build-system ruby-build-system)
11046 (native-inputs
11047 `(("ruby-rspec" ,ruby-rspec)
11048 ("ruby-hashie" ,ruby-hashie)
11049 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
28cf8dab
CB
11050 (arguments
11051 '(#:test-target "spec"
11052 #:phases
11053 (modify-phases %standard-phases
11054 (add-before 'check 'set-TZ
11055 (lambda _
11056 ;; This test is dependent on the timezone
11057 ;; spec/transform/to_date_spec.rb:35
11058 ;; # SafeYAML::Transform::ToDate converts times to the local
11059 ;; timezone
11060 (setenv "TZ" "UTC-11")
11061 #t)))))
f8ae2ee5
JL
11062 (home-page "https://github.com/dtao/safe_yaml")
11063 (synopsis "YAML parser")
11064 (description "The SafeYAML gem provides an alternative implementation of
11065YAML.load suitable for accepting user input in Ruby applications.")
11066 (license license:expat)))
f1ec4d76
JL
11067
11068(define-public ruby-mercenary
11069 (package
11070 (name "ruby-mercenary")
8367ab5d 11071 (version "0.4.0")
f1ec4d76
JL
11072 (source (origin
11073 (method url-fetch)
11074 (uri (rubygems-uri "mercenary" version))
11075 (sha256
11076 (base32
8367ab5d 11077 "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj"))))
f1ec4d76
JL
11078 (build-system ruby-build-system)
11079 (arguments `(#:test-target "spec"))
11080 (native-inputs
11081 `(("bundler" ,bundler)))
11082 (home-page "https://github.com/jekyll/mercenary")
11083 (synopsis "Command-line apps library in Ruby")
11084 (description "Mercenary is a lightweight and flexible library for writing
11085command-line apps in Ruby.")
11086 (license license:expat)))
a13d451e
JL
11087
11088(define-public ruby-liquid
11089 (package
11090 (name "ruby-liquid")
11091 (version "4.0.0")
11092 (source (origin
11093 (method url-fetch)
11094 (uri (rubygems-uri "liquid" version))
11095 (sha256
11096 (base32
11097 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
11098 (build-system ruby-build-system)
11099 (arguments `(#:tests? #f)); No rakefile
11100 (home-page "https://shopify.github.io/liquid/")
11101 (synopsis "Template language")
11102 (description "Liquid is a template language written in Ruby. It is used
11103to load dynamic content on storefronts.")
11104 (license license:expat)))
49395112
JL
11105
11106(define-public ruby-forwardable-extended
11107 (package
11108 (name "ruby-forwardable-extended")
11109 (version "2.6.0")
11110 (source (origin
11111 (method url-fetch)
11112 (uri (rubygems-uri "forwardable-extended" version))
11113 (sha256
11114 (base32
11115 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
11116 (build-system ruby-build-system)
11117 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
11118 (home-page "https://github.com/envygeeks/forwardable-extended")
11119 (synopsis "Delegation to hashes and instance variables in Forwardable")
11120 (description "Forwardable Extended provides more @code{Forwardable}
11121methods for your source as @code{Forwardable::Extended}.")
11122 (license license:expat)))
37296113
JL
11123
11124(define-public ruby-pathutil
11125 (package
11126 (name "ruby-pathutil")
feaaa603 11127 (version "0.16.2")
37296113
JL
11128 (source (origin
11129 (method url-fetch)
11130 (uri (rubygems-uri "pathutil" version))
11131 (sha256
11132 (base32
feaaa603 11133 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
37296113
JL
11134 (build-system ruby-build-system)
11135 (propagated-inputs
11136 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
11137 (native-inputs
11138 `(("bundler" ,bundler)
11139 ("ruby-rspec" ,ruby-rspec)))
11140 ;; Fails with: cannot load such file --
11141 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
11142 (arguments `(#:tests? #f))
11143 (home-page "https://github.com/envygeeks/pathutil")
11144 (synopsis "Extended implementation of Pathname")
11145 (description "Pathutil tries to be a faster pure Ruby implementation of
11146Pathname.")
11147 (license license:expat)))
49e1dde5 11148
d4be9f84
E
11149(define-public ruby-terminal-table
11150 (package
11151 (name "ruby-terminal-table")
11152 (version "2.0.0")
11153 (source
11154 (origin
11155 (method url-fetch)
11156 (uri (rubygems-uri "terminal-table" version))
11157 (sha256
11158 (base32
11159 "18rbrh464ysqbdv53iwj0r8frshn65566kyj044cp3x9c2754jwh"))))
11160 (arguments
11161 '(#:phases
11162 (modify-phases %standard-phases
11163 (add-before 'check 'remove-gemfile-lock
11164 (lambda _
11165 (delete-file "Gemfile.lock")))
11166 (add-before 'check 'remove-unnecessary-dependencies
11167 (lambda _
11168 (substitute* "terminal-table.gemspec"
11169 (("s.add_runtime_dependency.*") "\n")
11170 (("s.add_development_dependency.*") "\n"))
11171 (substitute* "Gemfile"
11172 ((".*tins.*") "\n"))))
11173 (replace 'check
11174 (lambda* (#:key tests? #:allow-other-keys)
11175 (when tests?
11176 (invoke "rspec")))))))
11177 (build-system ruby-build-system)
11178 (propagated-inputs
11179 `(("ruby-unicode-display-width" ,ruby-unicode-display-width)))
11180 (native-inputs
11181 `(("ruby-rspec" ,ruby-rspec)))
11182 (home-page "https://github.com/tj/terminal-table")
11183 (synopsis "Simple, feature rich ASCII table generation library")
11184 (description
11185 "Terminal Table is a fast and simple, yet feature rich
11186table generator written in Ruby. It supports ASCII and
11187Unicode formatted tables.")
11188 (license license:expat)))
11189
49e1dde5
JL
11190(define-public jekyll
11191 (package
11192 (name "jekyll")
53e2d815 11193 (version "4.2.0")
49e1dde5
JL
11194 (source (origin
11195 (method url-fetch)
11196 (uri (rubygems-uri "jekyll" version))
11197 (sha256
11198 (base32
53e2d815 11199 "0cqkh78jw8scrajyx5nla0vwm9fvp2qql3kdcvvplcq9mazy8snq"))))
49e1dde5
JL
11200 (build-system ruby-build-system)
11201 (arguments
fcf82fd3 11202 ;; No rakefile, but a test subdirectory.
49e1dde5
JL
11203 `(#:tests? #f
11204 #:phases
11205 (modify-phases %standard-phases
11206 (add-before 'build 'fix-i18n
11207 (lambda _
11208 (substitute* ".gemspec"
b7e76699
MR
11209 (("~> 0.7") ">= 0.7")
11210 (("~> 1.14") ">= 1.14"))
49e1dde5
JL
11211 #t)))))
11212 (propagated-inputs
11213 `(("ruby-addressable" ,ruby-addressable)
11214 ("ruby-colorator" ,ruby-colorator)
11215 ("ruby-em-websocket" ,ruby-em-websocket)
11216 ("ruby-i18n" ,ruby-i18n)
11217 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
11218 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
7df90fd5 11219 ("ruby-kramdown" ,ruby-kramdown-parser-gfm)
49e1dde5
JL
11220 ("ruby-liquid" ,ruby-liquid)
11221 ("ruby-mercenary" ,ruby-mercenary)
11222 ("ruby-pathutil" ,ruby-pathutil)
53e2d815
E
11223 ("ruby-rouge" ,ruby-rouge)
11224 ("ruby-safe-yaml" ,ruby-safe-yaml)
11225 ("ruby-sassc" ,ruby-sassc)
11226 ("ruby-terminal-table" ,ruby-terminal-table)))
49e1dde5
JL
11227 (home-page "https://jekyllrb.com/")
11228 (synopsis "Static site generator")
11229 (description "Jekyll is a simple, blog aware, static site generator.")
11230 (license license:expat)))
37a0f470
JL
11231
11232(define-public ruby-jekyll-paginate-v2
11233 (package
11234 (name "ruby-jekyll-paginate-v2")
ed9142a6 11235 (version "3.0.0")
37a0f470
JL
11236 (source (origin
11237 (method url-fetch)
11238 (uri (rubygems-uri "jekyll-paginate-v2" version))
11239 (sha256
11240 (base32
ed9142a6 11241 "1qzlqhpiqz28624fp0ak76hfy7908w6kpx62v7z43aiwjv0yc6q0"))))
37a0f470
JL
11242 (build-system ruby-build-system)
11243 (propagated-inputs
11244 `(("jekyll" ,jekyll)))
11245 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
11246 (synopsis "Pagination Generator for Jekyll 3")
11247 (description "The Pagination Generator forms the core of the pagination
11248logic in Jekyll. It calculates and generates the pagination pages.")
11249 (license license:expat)))
909eae21
CB
11250
11251(define-public ruby-faraday
11252 (package
11253 (name "ruby-faraday")
11254 (version "0.15.4")
11255 (source
11256 (origin
11257 (method url-fetch)
11258 (uri (rubygems-uri "faraday" version))
11259 (sha256
11260 (base32
11261 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
11262 (build-system ruby-build-system)
11263 (arguments
11264 '(#:tests? #f))
11265 (propagated-inputs
11266 `(("ruby-multipart-post" ,ruby-multipart-post)))
11267 (synopsis "Ruby HTTP/REST API client library")
11268 (description
11269 "Faraday is a HTTP/REST API client library which provides a common
11270interface over different adapters.")
11271 (home-page "https://github.com/lostisland/faraday")
11272 (license license:expat)))
a058cbfd
CB
11273
11274(define-public ruby-nio4r
11275 (package
11276 (name "ruby-nio4r")
7923b9bf 11277 (version "2.5.2")
a058cbfd
CB
11278 (source
11279 (origin
11280 (method url-fetch)
11281 (uri (rubygems-uri "nio4r" version))
11282 (sha256
11283 (base32
7923b9bf 11284 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
a058cbfd
CB
11285 (build-system ruby-build-system)
11286 (arguments
11287 '(#:phases
11288 (modify-phases %standard-phases
11289 (add-after 'unpack 'remove-unnecessary-dependencies
11290 (lambda _
11291 (substitute* "spec/spec_helper.rb"
11292 ;; Coveralls is for uploading test coverage information to an
11293 ;; online service, and thus unnecessary for building the Guix
11294 ;; package
11295 (("require \"coveralls\"") "")
11296 (("Coveralls\\.wear!") "")
11297 ;; Remove rspec/retry as we are not retrying the tests
11298 (("require \"rspec/retry\"") "")
11299 (("config\\.display_try_failure_messages = true") "")
11300 (("config\\.verbose_retry = true") ""))
11301 #t))
11302 (add-before 'check 'compile
11303 (lambda _
11304 (invoke "rake" "compile")
11305 #t))
11306 (replace 'check
11307 (lambda* (#:key tests? #:allow-other-keys)
11308 (when tests?
11309 (invoke "rspec"))
11310 #t)))))
11311 (native-inputs
11312 `(("bundler" ,bundler)
11313 ("ruby-rake-compiler" ,ruby-rake-compiler)
11314 ("ruby-rspec" ,ruby-rspec)
11315 ("ruby-rubocop" ,ruby-rubocop)))
11316 (synopsis "New I/O for Ruby")
11317 (description
11318 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
11319for scalable network clients and servers.")
11320 (home-page "https://github.com/socketry/nio4r")
11321 (license license:expat)))
f9da1ada
CB
11322
11323(define-public ruby-globalid
11324 (package
11325 (name "ruby-globalid")
11326 (version "0.4.2")
11327 (source
11328 (origin
11329 (method url-fetch)
11330 (uri (rubygems-uri "globalid" version))
11331 (sha256
11332 (base32
11333 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
11334 (build-system ruby-build-system)
11335 (arguments
11336 '(;; No included tests
11337 #:tests? #f))
11338 (propagated-inputs
11339 `(("ruby-activesupport" ,ruby-activesupport)))
11340 (synopsis "Generate URIs idenfitying model instances in Ruby")
11341 (description
11342 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
11343uniquely identify it.")
11344 (home-page "https://rubyonrails.org/")
11345 (license license:expat)))
15606d98
CB
11346
11347(define-public ruby-sprockets
11348 (package
11349 (name "ruby-sprockets")
11350 (version "3.7.2")
11351 (source
11352 (origin
11353 (method url-fetch)
11354 (uri (rubygems-uri "sprockets" version))
11355 (sha256
11356 (base32
11357 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
11358 (build-system ruby-build-system)
11359 (arguments
11360 '(;; No included tests
11361 #:tests? #f))
11362 (propagated-inputs
11363 `(("ruby-concurrent" ,ruby-concurrent)
11364 ("ruby-rack" ,ruby-rack)))
11365 (synopsis "Sprockets is a Rack-based asset packaging system")
11366 (description
11367 "Sprockets is a Rack-based asset packaging system that concatenates and
11368serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
11369 (home-page "https://github.com/rails/sprockets")
11370 (license license:expat)))
acb9e3d8 11371
49994222
NG
11372(define-public ruby-mustache
11373 (package
11374 (name "ruby-mustache")
11375 (version "1.1.1")
11376 (source
11377 (origin
11378 (method url-fetch)
11379 (uri (rubygems-uri "mustache" version))
11380 (sha256
11381 (base32 "1l0p4wx15mi3wnamfv92ipkia4nsx8qi132c6g51jfdma3fiz2ch"))))
11382 (build-system ruby-build-system)
11383 (native-inputs
11384 `(("ruby-simplecov" ,ruby-simplecov)))
11385 (synopsis "framework-agnostic way to render logic-free views")
11386 (description
11387 "Mustache is a framework-agnostic way to render logic-free views.
11388Think of Mustache as a replacement for your views. Instead of views
11389consisting of ERB or HAML with random helpers and arbitrary logic,
11390your views are broken into two parts: a Ruby class and an HTML
11391template.")
11392 (home-page "https://github.com/mustache/mustache")
11393 (license license:expat)))
11394
acb9e3d8
PN
11395(define-public ruby-mustermann
11396 (package
11397 (name "ruby-mustermann")
11398 (version "1.0.3")
11399 (source
11400 (origin
11401 (method url-fetch)
11402 (uri (rubygems-uri "mustermann" version))
11403 (sha256
11404 (base32
11405 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
11406 (build-system ruby-build-system)
11407 (arguments
11408 ;; No tests.
11409 '(#:tests? #f))
11410 (synopsis "Library implementing patterns that behave like regular expressions")
11411 (description "Given a string pattern, Mustermann will turn it into an
11412object that behaves like a regular expression and has comparable performance
11413characteristics.")
11414 (home-page "https://github.com/sinatra/mustermann")
11415 (license license:expat)))
3bb094e2 11416
9539d6bd
GL
11417(define-public ruby-html-proofer
11418 (package
11419 (name "ruby-html-proofer")
11420 (version "3.18.5")
11421 (source
11422 (origin
11423 (method git-fetch)
11424 (uri (git-reference
11425 (url "https://github.com/gjtorikian/html-proofer")
11426 (commit (string-append "v" version))))
11427 (file-name (git-file-name name version))
11428 (sha256
11429 (base32
11430 "1pxb0fajb3l3lm7sqj548qwl7vx6sx3jy7n4cns9d4lqx7s9r9xb"))))
11431 (build-system ruby-build-system)
11432 (arguments
11433 `(;; FIXME: Tests depend on rubocop-standard.
11434 #:tests? #f))
11435 (native-inputs
11436 `(("ruby-awesome-print" ,ruby-awesome-print)
11437 ("ruby-redcarpet" ,ruby-redcarpet)
11438 ("ruby-rspec" ,ruby-rspec)
11439 ("ruby-rubocop" ,ruby-rubocop)
11440 ("ruby-rubocop-performance" ,ruby-rubocop-performance)
11441 ("ruby-pry-byebug" ,ruby-pry-byebug)))
11442 (propagated-inputs
11443 `(("ruby-addressable" ,ruby-addressable)
11444 ("ruby-mercenary" ,ruby-mercenary)
11445 ("ruby-nokogumbo" ,ruby-nokogumbo)
11446 ("ruby-parallel" ,ruby-parallel)
11447 ("ruby-rainbow" ,ruby-rainbow)
11448 ("ruby-typhoeus" ,ruby-typhoeus)
11449 ("ruby-yell" ,ruby-yell)))
11450 (synopsis "Test your rendered HTML files to make sure they're accurate")
11451 (description
11452 "HTMLProofer is a set of tests to validate your HTML output. These
11453tests check if your image references are legitimate, if they have alt tags,
11454if your internal links are working, and so on. It's intended to be an
11455all-in-one checker for your output.")
11456 (home-page "https://github.com/gjtorikian/html-proofer")
11457 (license license:expat)))
11458
7bddb6aa
BL
11459(define-public ruby-htmlentities
11460 (package
11461 (name "ruby-htmlentities")
11462 (version "4.3.4")
11463 (source
11464 (origin
11465 (method url-fetch)
11466 (uri (rubygems-uri "htmlentities" version))
11467 (sha256
11468 (base32
11469 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
11470 (build-system ruby-build-system)
11471 (arguments
11472 `(#:phases
11473 (modify-phases %standard-phases
11474 (replace 'check
11475 (lambda _
11476 (map (lambda (file)
11477 (invoke "ruby" "-Itest" file))
11478 (find-files "./test" ".*_test\\.rb")))))))
11479 (synopsis "Encode and decode (X)HTML entities")
11480 (description
11481 "This package provides a module for encoding and decoding (X)HTML
11482entities.")
11483 (home-page "https://github.com/threedaymonk/htmlentities")
11484 (license license:expat)))
11485
3bb094e2
PN
11486(define-public ruby-sinatra
11487 (package
11488 (name "ruby-sinatra")
7af92924 11489 (version "2.0.8.1")
3bb094e2
PN
11490 (source
11491 (origin
11492 (method url-fetch)
11493 (uri (rubygems-uri "sinatra" version))
11494 (sha256
11495 (base32
7af92924 11496 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
3bb094e2 11497 (build-system ruby-build-system)
7af92924
MC
11498 (arguments
11499 `(#:phases
11500 (modify-phases %standard-phases
11501 ;; See: https://github.com/sinatra/sinatra/issues/1578.
11502 (add-after 'extract-gemspec 'fix-slow-doc-generation
11503 (lambda _
11504 (substitute* "sinatra.gemspec"
11505 (("\"README.rdoc\"\\.freeze," all)
11506 (string-append all " \"--exclude=.*\\.md\".freeze,")))
11507 #t)))))
3bb094e2
PN
11508 (propagated-inputs
11509 `(("ruby-mustermann" ,ruby-mustermann)
11510 ("ruby-rack" ,ruby-rack)
11511 ("ruby-rack-protection" ,ruby-rack-protection)
11512 ("ruby-tilt" ,ruby-tilt)))
11513 (synopsis "DSL for quick web applications creation in Ruby")
11514 (description
11515 "Sinatra is a DSL for quickly creating web applications in Ruby with
11516minimal effort.")
11517 (home-page "http://sinatrarb.com/")
11518 (license license:expat)))
6e87695b
PN
11519
11520(define-public ruby-thin
11521 (package
11522 (name "ruby-thin")
11523 (version "1.7.2")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 (uri (rubygems-uri "thin" version))
11528 (sha256
11529 (base32
11530 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
11531 (build-system ruby-build-system)
11532 (arguments
11533 ;; No tests.
11534 '(#:tests? #f))
11535 (propagated-inputs
11536 `(("ruby-daemons" ,ruby-daemons)
11537 ("ruby-eventmachine" ,ruby-eventmachine)
11538 ("ruby-rack" ,ruby-rack)))
11539 (synopsis "Thin and fast web server for Ruby")
11540 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
11541@itemize
11542@item the Mongrel parser,
11543@item Event Machine, a network I/O library with high scalability, performance
11544and stability,
11545@item Rack, a minimal interface between webservers and Ruby frameworks.
11546@end itemize\n")
60783303 11547 (home-page "https://github.com/macournoyer/thin")
6e87695b 11548 (license license:ruby)))
be6016db
PN
11549
11550(define-public ruby-skinny
11551 (package
11552 (name "ruby-skinny")
11553 (version "0.2.4")
11554 (source
11555 (origin
11556 (method url-fetch)
11557 (uri (rubygems-uri "skinny" version))
11558 (sha256
11559 (base32
11560 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
11561 (build-system ruby-build-system)
11562 (arguments
11563 '(#:tests? #f ; No included tests
11564 #:phases
11565 (modify-phases %standard-phases
11566 (add-before 'build 'patch-gemspec
11567 (lambda _
11568 (substitute* ".gemspec"
11569 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
11570 "<eventmachine>, [\">= 1.0.0\"")
11571 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
11572 #t)))))
11573 (propagated-inputs
11574 `(("ruby-eventmachine" ,ruby-eventmachine)
11575 ("ruby-thin" ,ruby-thin)))
11576 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
11577 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
11578the Thin library.")
11579 (home-page "https://github.com/sj26/skinny")
11580 (license license:expat)))
df747c8d 11581
9c566d1b
MB
11582(define-public ruby-sys-filesystem
11583 (package
11584 (name "ruby-sys-filesystem")
11585 (version "1.3.4")
11586 (source (origin
11587 (method url-fetch)
11588 (uri (rubygems-uri "sys-filesystem" version))
11589 (sha256
11590 (base32
11591 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
11592 (build-system ruby-build-system)
11593 (arguments
11594 '(#:phases (modify-phases %standard-phases
11595 (add-before 'check 'set-HOME
11596 (lambda _
11597 ;; Some tests attempt to stat $HOME. Let them.
11598 (setenv "HOME" "/tmp")
11599 #t)))))
11600 (propagated-inputs
11601 `(("ruby-ffi" ,ruby-ffi)))
11602 (native-inputs
11603 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
11604 (synopsis "Gather file system information")
11605 (description
11606 "The @code{sys-filesystem} library provides a cross-platform interface
11607for gathering file system information, such as disk space and mount points.")
11608 (home-page "https://github.com/djberg96/sys-filesystem")
11609 (license license:asl2.0)))
11610
df747c8d
PN
11611(define-public mailcatcher
11612 (package
11613 (name "mailcatcher")
11614 (version "0.7.1")
11615 (source
11616 (origin
11617 (method url-fetch)
11618 (uri (rubygems-uri "mailcatcher" version))
11619 (sha256
11620 (base32
11621 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
11622 (build-system ruby-build-system)
11623 (arguments
11624 ;; Tests require web/assets which is not included in the output. We
11625 ;; might be able to fix this by adding the Git repository to the GEM_PATH
11626 ;; of the tests. See ruby-mysql2.
11627 '(#:tests? #f
11628 #:phases
11629 (modify-phases %standard-phases
11630 (add-before 'build 'patch-gemspec
11631 (lambda _
11632 (substitute* ".gemspec"
11633 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11634 "<eventmachine>, [\">= 1.0.9.1")
11635 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11636 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11637 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11638 #t))
11639 (add-before 'build 'loosen-dependency-contraint
11640 (lambda _
11641 (substitute* "lib/mail_catcher.rb"
11642 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11643 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11644 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11645 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11646 #t)))))
11647 (inputs
11648 `(("ruby-eventmachine" ,ruby-eventmachine)
11649 ("ruby-mail" ,ruby-mail)
11650 ("ruby-rack" ,ruby-rack)
11651 ("ruby-sinatra" ,ruby-sinatra)
11652 ("ruby-skinny" ,ruby-skinny)
11653 ("ruby-sqlite3" ,ruby-sqlite3)
11654 ("ruby-thin" ,ruby-thin)))
11655 (synopsis "SMTP server which catches messages to display them a browser")
11656 (description
11657 "MailCatcher runs a super simple SMTP server which catches any message
11658sent to it to display in a web interface. Run mailcatcher, set your favourite
11659app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11660then check out http://127.0.0.1:1080 to see the mail.")
11661 (home-page "https://mailcatcher.me")
11662 (license license:expat)))
fc4f7c45
MK
11663
11664(define-public ruby-backport
11665 (package
11666 (name "ruby-backport")
b62863b8 11667 (version "1.1.2")
fc4f7c45
MK
11668 (source
11669 (origin
b62863b8 11670 ;; The gem does not include test code, so fetch from the Git repository.
fc4f7c45
MK
11671 (method git-fetch)
11672 (uri (git-reference
b0e7b699 11673 (url "https://github.com/castwide/backport")
fc4f7c45
MK
11674 (commit (string-append "v" version))))
11675 (file-name (git-file-name name version))
11676 (sha256
b62863b8 11677 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
fc4f7c45
MK
11678 (build-system ruby-build-system)
11679 (arguments
11680 `(#:test-target "spec"))
11681 (native-inputs
11682 `(("bundler" ,bundler)
11683 ("ruby-rspec" ,ruby-rspec)))
11684 (inputs
11685 `(("ruby-simplecov" ,ruby-simplecov)))
11686 (synopsis "Pure Ruby library for event-driven IO")
11687 (description
11688 "This package provides a pure Ruby library for event-driven IO.")
11689 (home-page "https://github.com/castwide/backport")
11690 (license license:expat)))
369faa59
JL
11691
11692(define-public ruby-json-schema
11693 (package
11694 (name "ruby-json-schema")
11695 (version "2.8.1")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (rubygems-uri "json-schema" version))
11700 (sha256
11701 (base32
11702 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11703 (build-system ruby-build-system)
11704 (arguments
11705 `(#:tests? #f ; no tests
11706 #:phases
11707 (modify-phases %standard-phases
11708 (replace 'build
11709 (lambda _
11710 (invoke "gem" "build" ".gemspec"))))))
11711 (propagated-inputs
11712 `(("ruby-addressable" ,ruby-addressable)))
11713 (synopsis "Ruby JSON Schema Validator")
11714 (description "This library provides Ruby with an interface for validating
11715JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11716support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11717is also included.")
11718 (home-page "https://github.com/ruby-json-schema/json-schema")
11719 (license license:expat)))
44881cad
JL
11720
11721(define-public swagger-diff
11722 (package
11723 (name "swagger-diff")
11724 (version "1.1.2")
11725 (source
11726 (origin
11727 (method url-fetch)
11728 (uri (rubygems-uri "swagger-diff" version))
11729 (sha256
11730 (base32
11731 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11732 (build-system ruby-build-system)
11733 (arguments
11734 `(#:test-target "spec"
11735 #:phases
11736 (modify-phases %standard-phases
11737 ;; Don't run or require rubocop, the code linting tool, as this is a
11738 ;; bit unnecessary.
11739 (add-after 'unpack 'dont-run-rubocop
11740 (lambda _
11741 (substitute* "Rakefile"
11742 ((".*rubocop.*") "")
11743 ((".*RuboCop.*") ""))
11744 #t)))))
11745 (propagated-inputs
11746 `(("ruby-json-schema" ,ruby-json-schema)))
11747 (native-inputs
11748 `(("bundler" ,bundler)
11749 ("ruby-rspec-core" ,ruby-rspec-core)
11750 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
11751 (synopsis
11752 "Compare Open API Initiative specification files")
11753 (description
11754 "Swagger::Diff is a utility for comparing two different Open API
11755Initiative (OAI) specifications (formerly known as Swagger specifications).
11756It is intended to determine whether a newer API specification is
11757backwards-compatible with an older API specification.")
11758 (home-page "https://github.com/civisanalytics/swagger-diff")
11759 (license license:bsd-3)))
9e065a8a
BL
11760
11761(define-public ruby-reverse-markdown
11762 (package
11763 (name "ruby-reverse-markdown")
11764 (version "1.1.0")
11765 (source
11766 (origin
11767 (method url-fetch)
11768 (uri (rubygems-uri "reverse_markdown" version))
11769 (sha256
11770 (base32
11771 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11772 (build-system ruby-build-system)
11773 (propagated-inputs
11774 `(("ruby-nokogiri" ,ruby-nokogiri)))
11775 (native-inputs
11776 `(("bundler" ,bundler)
11777 ("ruby-rspec" ,ruby-rspec)
11778 ("ruby-kramdown" ,ruby-kramdown)
11779 ("ruby-simplecov" ,ruby-simplecov)))
11780 (arguments
11781 `(#:phases
11782 (modify-phases %standard-phases
11783 (replace 'check
11784 (lambda* (#:key tests? #:allow-other-keys)
11785 (when tests?
11786 (invoke "rspec"))
11787 #t)))))
11788 (synopsis "Convert HTML into Markdown")
11789 (description
11790 "This Ruby module allows you to map simple HTML back into
11791Markdown---e.g., if you want to import existing HTML data in your
11792application.")
11793 (home-page "https://github.com/xijo/reverse_markdown")
11794 (license license:wtfpl2)))
11795
a9e2de7e
BL
11796(define-public ruby-solargraph
11797 (package
11798 (name "ruby-solargraph")
11799 (version "0.36.0")
11800 (source
11801 (origin
11802 (method url-fetch)
11803 (uri (rubygems-uri "solargraph" version))
11804 (sha256
11805 (base32
11806 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
11807 (build-system ruby-build-system)
11808 (propagated-inputs
11809 `(("ruby-backport" ,ruby-backport)
11810 ("bundler" ,bundler)
11811 ("ruby-htmlentities" ,ruby-htmlentities)
11812 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
11813 ("ruby-maruku" ,ruby-maruku)
11814 ("ruby-nokogiri" ,ruby-nokogiri)
11815 ("ruby-parser" ,ruby-parser)
11816 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
11817 ("ruby-rubocop" ,ruby-rubocop)
11818 ("ruby-thor" ,ruby-thor)
11819 ("ruby-tilt" ,ruby-tilt)
11820 ("ruby-yard" ,ruby-yard)))
11821 (native-inputs
11822 `(("ruby-rspec" ,ruby-rspec)
11823 ("ruby-pry" ,ruby-pry)
11824 ("ruby-simplecov" ,ruby-simplecov)
11825 ("ruby-webmock" ,ruby-webmock-2)))
11826 ;; FIXME: can't figure out how to run the tests properly:
11827
11828 ;; An error occurred while loading spec_helper.
11829 ;; Failure/Error: return gem_original_require(path)
11830 ;; LoadError:
11831 ;; cannot load such file -- spec_helper
11832 (arguments
11833 '(#:tests? #f
11834 #:phases
11835 (modify-phases %standard-phases
11836 (replace 'check
11837 (lambda* (#:key tests? #:allow-other-keys)
11838 (when tests?
11839 (invoke "rspec"))
11840 #t)))))
11841 (synopsis
11842 "IDE tools for code completion, inline documentation, and static analysis")
11843 (description
11844 "Solargraph provides a comprehensive suite of tools for Ruby
11845programming: intellisense, diagnostics, inline documentation, and type
11846checking.")
11847 (home-page "https://solargraph.org/")
11848 (license license:expat)))
0c558aa9
DNB
11849
11850(define-public ruby-wayback-machine-downloader
11851 (package
11852 (name "ruby-wayback-machine-downloader")
11853 (version "2.2.1")
11854 (source
11855 (origin
11856 (method url-fetch)
11857 (uri (rubygems-uri
11858 "wayback_machine_downloader"
11859 version))
11860 (sha256
11861 (base32
11862 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11863 (build-system ruby-build-system)
11864 (arguments
11865 '(#:tests? #f)) ; no tests
11866 (synopsis "Download archived websites from the Wayback Machine")
11867 (description
11868 "Wayback Machine Downloader is a command line tool for downloading
11869websites from the Internet Archive's Wayback Machine (archive.org).
11870It allows fine grained control over what to download by specifying
11871which snapshots to consider and what files to include.")
11872 (home-page
11873 "https://github.com/hartator/wayback-machine-downloader")
11874 (license license:expat)))
e6483f8c
MB
11875
11876(define-public ruby-wwtd
11877 (package
11878 (name "ruby-wwtd")
11879 (version "1.4.1")
702a1012 11880 (home-page "https://github.com/grosser/wwtd")
e6483f8c
MB
11881 (source (origin
11882 (method git-fetch)
11883 (uri (git-reference
11884 (url home-page)
11885 (commit (string-append "v" version))))
11886 (file-name (git-file-name name version))
11887 (sha256
11888 (base32
11889 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11890 (modules '((guix build utils)))
11891 (snippet
11892 '(begin
11893 ;; Remove bundled library.
11894 (delete-file "spec/rake-12.3.0.gem")
11895 #t))))
11896 (build-system ruby-build-system)
11897 (arguments
11898 '(;; XXX: Tests need multiple versions of ruby, wants to run
11899 ;; `bundle install`, etc.
11900 #:tests? #f
11901 #:phases (modify-phases %standard-phases
11902 (replace 'replace-git-ls-files
11903 (lambda _
11904 (substitute* "wwtd.gemspec"
11905 (("git ls-files lib/ bin/`")
11906 "find lib/ bin/ -type f |sort`"))
11907 #t))
11908 (add-before 'check 'remove-version-constraints
11909 (lambda _
11910 (delete-file "Gemfile.lock")
11911 #t))
11912 (replace 'check
11913 (lambda* (#:key tests? #:allow-other-keys)
11914 (if tests?
11915 (invoke "rspec" "spec/")
11916 (format #t "test suite not run~%"))
11917 #t)))))
11918 (native-inputs
11919 `(("ruby-bump" ,ruby-bump)
11920 ("ruby-rspec" ,ruby-rspec)))
11921 (synopsis "Run @file{.travis.yml} files locally")
11922 (description
11923 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
11924defined in @file{.travis.yml} on your local machine, using @code{rvm},
11925@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
11926 (license license:expat)))
40afc2f4
HP
11927
11928(define-public ruby-rugged
11929 (package
11930 (name "ruby-rugged")
11931 (version "1.1.0")
11932 (home-page "https://www.rubydoc.info/gems/rugged")
11933 (source
11934 (origin
11935 (method url-fetch)
11936 (uri (rubygems-uri "rugged" version))
11937 (sha256
11938 (base32 "04aq913plcxjw71l5r62qgz3bx3466p0wvgyfqahg5n3nybmcwqy"))))
11939 (build-system ruby-build-system)
11940 (arguments
11941 `(#:tests? #f
11942 #:gem-flags (list "--" "--use-system-libraries")))
11943 (inputs
11944 `(("libgit2" ,libgit2)))
11945 (native-inputs
11946 `(("ruby-minitest" ,ruby-minitest)
11947 ("ruby-pry" ,ruby-pry)
11948 ("ruby-rake-compiler" ,ruby-rake-compiler)))
11949 (synopsis "Ruby bindings to the libgit2 linkable C Git library")
11950 (description "Rugged is a library for accessing libgit2 in Ruby. It gives
11951you the speed and portability of libgit2 with the beauty of the Ruby
11952language.")
11953 (license license:expat)))
dbe02ce5
GL
11954
11955(define-public ruby-yell
11956 (package
11957 (name "ruby-yell")
11958 (version "2.2.2")
11959 (source
11960 (origin
11961 (method url-fetch)
11962 (uri (rubygems-uri "yell" version))
11963 (sha256
11964 (base32
11965 "1g16kcdhdfvczn7x81jiq6afg3bdxmb73skqjyjlkp5nqcy6y5hx"))))
11966 (build-system ruby-build-system)
11967 (arguments
11968 `(#:phases
11969 (modify-phases %standard-phases
11970 (replace 'check
11971 (lambda _
11972 (invoke "rake" "examples")))))) ; there is no test target.
11973 (synopsis
11974 "Extensible logging library for Ruby")
11975 (description
11976 "Yell is a comprehensive logging replacement for Ruby. It defines
11977multiple adapters, various log level combinations and message formatting
11978options.")
11979 (home-page "https://github.com/rudionrails/yell")
11980 (license license:expat)))