gnu: Add ruby-rubocop-performance.
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
CommitLineData
6ef8c59a 1;;; GNU Guix --- Functional package management for GNU
37ab3aba 2;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
402b03e6 3;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
f586c877 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
37ab3aba 5;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
6742c6f6 6;;; Copyright © 2015, 2019 Ricardo Wurmus <rekado@elephly.net>
cba53c60 7;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
3c986a7d 8;;; Copyright © 2017 Nikita <nikita@n0.is>
3cc8e029 9;;; Copyright © 2017, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
b872b47b 10;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
a7b7817d 11;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6a9d2266 12;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
433e3154 13;;; Copyright © 2017, 2018, 2019 Christopher Baines <mail@cbaines.net>
4db80f8b 14;;; Copyright © 2018 Vasile Dumitrascu <va511e@yahoo.com>
8ef06557 15;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
3355e49c 16;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
fc4f7c45 17;;; Copyright © 2019 Mikhail Kirillov <w96k.ru@gmail.com>
369faa59 18;;; Copyright © 2019 Jelle Licht <jlicht@fsfe.org>
9e065a8a 19;;; Copyright © 2019 Brian Leung <bkleung89@gmail.com>
9c4cb1ef 20;;; Copyright © 2019 Collin J. Doering <collin@rekahsoft.ca>
0c558aa9 21;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
fd248cb8 22;;; Copyright © 2019 Brett Gilio <brettg@posteo.de>
a8cdfd53 23;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
6ef8c59a
PP
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages ruby)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (gnu packages)
1db791d5 43 #:use-module (gnu packages base)
933dad91 44 #:use-module (gnu packages bison)
24be6751 45 #:use-module (gnu packages c)
15b16c2c 46 #:use-module (gnu packages check)
6ef8c59a 47 #:use-module (gnu packages compression)
2a9ce5cb 48 #:use-module (gnu packages crypto)
4a9e0585 49 #:use-module (gnu packages databases)
255d1bbe 50 #:use-module (gnu packages dbm)
c41fba01 51 #:use-module (gnu packages rails)
6ef8c59a 52 #:use-module (gnu packages readline)
6ef8c59a 53 #:use-module (gnu packages autotools)
c84dd8d4 54 #:use-module (gnu packages haskell-xyz)
ad79eb55 55 #:use-module (gnu packages java)
6ef8c59a 56 #:use-module (gnu packages libffi)
f3d7bb93 57 #:use-module (gnu packages libidn)
c41fba01
CB
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages lsof)
34138e42 60 #:use-module (gnu packages maths)
0c8eedc1 61 #:use-module (gnu packages ncurses)
fe5dd5f4 62 #:use-module (gnu packages networking)
3ca43524 63 #:use-module (gnu packages node)
dff5392f 64 #:use-module (gnu packages protobuf)
ac09beba 65 #:use-module (gnu packages python)
44d10b1f 66 #:use-module (gnu packages python-xyz)
763624f5 67 #:use-module (gnu packages ragel)
30f08487 68 #:use-module (gnu packages rsync)
cd0322a3 69 #:use-module (gnu packages sqlite)
cc2b77df 70 #:use-module (gnu packages tls)
66e20863 71 #:use-module (gnu packages version-control)
6ef8c59a
PP
72 #:use-module (guix packages)
73 #:use-module (guix download)
bda0c139 74 #:use-module (guix git-download)
6ef8c59a 75 #:use-module (guix utils)
acf735f2 76 #:use-module (guix build-system gnu)
e920bfca 77 #:use-module (gnu packages xml)
c2c4e5b2 78 #:use-module (gnu packages web)
15b16c2c
CB
79 #:use-module (guix build-system ruby)
80 #:use-module ((srfi srfi-1) #:select (alist-delete)))
6ef8c59a 81
9622928d
MC
82(define %prawn-project-licenses
83 ;; This set of licenses applies to most (all?) components of the Prawn
84 ;; project (it is triple licensed).
85 (list license:ruby
86 license:gpl2+
87 license:gpl3+))
88
6ef8c59a
PP
89(define-public ruby
90 (package
91 (name "ruby")
4914c157 92 (version "2.6.5")
6ef8c59a
PP
93 (source
94 (origin
95 (method url-fetch)
6becfdff
MW
96 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
97 (version-major+minor version)
12d39eb5 98 "/ruby-" version ".tar.xz"))
6ef8c59a
PP
99 (sha256
100 (base32
4914c157 101 "0qhsw2mr04f3lqinkh557msr35pb5rdaqy4vdxcj91flgxqxmmnm"))
65e84e31
BW
102 (modules '((guix build utils)))
103 (snippet `(begin
104 ;; Remove bundled libffi
c033c195 105 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
65e84e31 106 #t))))
6ef8c59a
PP
107 (build-system gnu-build-system)
108 (arguments
109 `(#:test-target "test"
fd248cb8 110 #:configure-flags '("--enable-shared") ; dynamic linking
6ef8c59a 111 #:phases
9656b8be 112 (modify-phases %standard-phases
65e84e31 113 (add-before 'configure 'replace-bin-sh-and-remove-libffi
9656b8be
BW
114 (lambda _
115 (substitute* '("Makefile.in"
116 "ext/pty/pty.c"
117 "io.c"
118 "lib/mkmf.rb"
119 "process.c"
120 "test/rubygems/test_gem_ext_configure_builder.rb"
121 "test/rdoc/test_rdoc_parser.rb"
122 "test/ruby/test_rubyoptions.rb"
123 "test/ruby/test_process.rb"
124 "test/ruby/test_system.rb"
125 "tool/rbinstall.rb")
126 (("/bin/sh") (which "sh")))
127 #t)))))
6ef8c59a
PP
128 (inputs
129 `(("readline" ,readline)
6ef8c59a
PP
130 ("openssl" ,openssl)
131 ("libffi" ,libffi)
4914c157
CB
132 ("gdbm" ,gdbm)))
133 (propagated-inputs
134 `(("zlib" ,zlib)))
6ef8c59a
PP
135 (native-search-paths
136 (list (search-path-specification
137 (variable "GEM_PATH")
3cb3fa67 138 (files (list (string-append "lib/ruby/vendor_ruby"))))))
6becfdff 139 (synopsis "Programming language interpreter")
6ef8c59a
PP
140 (description "Ruby is a dynamic object-oriented programming language with
141a focus on simplicity and productivity.")
bf3be6a5 142 (home-page "https://www.ruby-lang.org")
6ef8c59a
PP
143 (license license:ruby)))
144
1cc7d340
RP
145(define-public ruby-2.7
146 (package
147 (inherit ruby)
148 (version "2.7.1")
149 (source
150 (origin
151 (method url-fetch)
152 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
153 (version-major+minor version)
154 "/ruby-" version ".tar.gz"))
155 (sha256
156 (base32
157 "0674x98f542y02r7n2yv2qhmh97blqhi2mvh2dn5f000vlxlh66l"))
158 (modules '((guix build utils)))
159 (snippet `(begin
160 ;; Remove bundled libffi
161 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
162 #t))))
163 (arguments
164 `(#:test-target "test"
165 #:configure-flags '("--enable-shared") ; dynamic linking
166 #:phases
167 (modify-phases %standard-phases
168 (add-before 'configure 'replace-bin-sh-and-remove-libffi
169 (lambda _
170 (substitute* '("configure.ac"
171 "template/Makefile.in"
172 "lib/rubygems/installer.rb"
173 "ext/pty/pty.c"
174 "io.c"
175 "lib/mkmf.rb"
176 "process.c"
177 "test/rubygems/test_gem_ext_configure_builder.rb"
178 "test/rdoc/test_rdoc_parser.rb"
179 "test/ruby/test_rubyoptions.rb"
180 "test/ruby/test_process.rb"
181 "test/ruby/test_system.rb"
182 "tool/rbinstall.rb")
183 (("/bin/sh") (which "sh")))
184 #t)))))
185 (native-inputs
186 `(("autoconf" ,autoconf)))))
187
227fab3e
CB
188(define-public ruby-2.5
189 (package
190 (inherit ruby)
a09ff632 191 (version "2.5.8")
227fab3e
CB
192 (source
193 (origin
194 (method url-fetch)
195 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
196 (version-major+minor version)
197 "/ruby-" version ".tar.xz"))
198 (sha256
199 (base32
a09ff632 200 "0vad5ah1lrdhxsyqr5iqc8c7r7qczpmm76cz8rsf4crimpzv5483"))
227fab3e
CB
201 (modules '((guix build utils)))
202 (snippet `(begin
203 ;; Remove bundled libffi
204 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
205 #t))))))
206
93cae02f
CB
207(define-public ruby-2.4
208 (package
209 (inherit ruby)
dfe211f9 210 (version "2.4.10")
93cae02f
CB
211 (source
212 (origin
213 (method url-fetch)
214 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
215 (version-major+minor version)
216 "/ruby-" version ".tar.xz"))
217 (sha256
218 (base32
dfe211f9 219 "1prhqlgik1zmw9lakl6hkriqslspw48pvhxff17h7ns42p8qwrnm"))
93cae02f
CB
220 (modules '((guix build utils)))
221 (snippet `(begin
222 ;; Remove bundled libffi
223 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
224 #t))))))
225
933dad91
RW
226(define-public mruby
227 (package
228 (name "mruby")
229 (version "2.0.0")
230 (source
231 (origin
232 (method git-fetch)
233 (uri (git-reference
b0e7b699 234 (url "https://github.com/mruby/mruby")
933dad91
RW
235 (commit version)))
236 (file-name (git-file-name name version))
237 (sha256
238 (base32
239 "1r6w1asjshff43ymdwa6xmrkggza99mi2kw88k7ic6ag2j81hcj5"))))
240 (build-system gnu-build-system)
241 (arguments
242 `(#:test-target "test"
243 #:phases
244 (modify-phases %standard-phases
245 (delete 'configure)
246 (add-after 'unpack 'enable-verbose-tests
247 (lambda _
248 (substitute* "Makefile"
249 (("ruby ./minirake" m)
250 (string-append m " --verbose")))
251 #t))
252 (add-after 'unpack 'disable-broken-tests
253 (lambda _
254 (substitute* "mrbgems/mruby-io/test/io.rb"
255 (("assert\\('IO.popen.+$" m)
256 (string-append m "skip \"Hangs in the Guix build environment\"\n"))
257 (("assert\\('IO#isatty.+$" m)
258 (string-append m "skip \"Disable for Guix; there is no /dev/tty\"\n"))
259 ;; This one is really weird. The *expected* output is all wrong.
260 (("assert\\('`cmd`.*" m)
261 (string-append m "skip \"Disable for Guix\"\n"))
262 (("echo foo")
263 (string-append (which "echo") " foo")))
264 #t))
265 ;; There is no install target
266 (replace 'install
267 (lambda* (#:key outputs #:allow-other-keys)
268 (let* ((out (assoc-ref outputs "out"))
269 (bin (string-append out "/bin"))
270 (lib (string-append out "/lib")))
271 (mkdir-p bin)
272 (copy-recursively "build/host/bin" bin)
273 (mkdir-p lib)
274 (copy-recursively "build/host/lib" lib))
275 #t)))))
276 (native-inputs
277 `(("ruby" ,ruby)
278 ("bison" ,bison)))
279 (home-page "https://github.com/mruby/mruby")
280 (synopsis "Lightweight Ruby")
281 (description "mruby is the lightweight implementation of the Ruby
282language. Its syntax is Ruby 1.9 compatible. mruby can be linked and
283embedded within your application.")
284 (license license:expat)))
285
34372d39
RW
286(define-public ruby-commander
287 (package
288 (name "ruby-commander")
289 (version "4.4.7")
290 (source
291 (origin
292 (method url-fetch)
293 (uri (rubygems-uri "commander" version))
294 (sha256
295 (base32
296 "1pxakz596fjqak3cdbha6iva1dlqis86i3kjrgg6lf3sp8i5vhwg"))))
297 (build-system ruby-build-system)
298 (arguments
299 `(#:test-target "spec"
300 #:phases
301 (modify-phases %standard-phases
302 ;; Don't run or require rubocop, the code linting tool, as this is a
303 ;; bit unnecessary.
304 (add-after 'unpack 'dont-run-rubocop
305 (lambda _
306 (substitute* "Rakefile"
307 ((".*rubocop.*") "")
308 ((".*RuboCop.*") ""))
309 #t)))))
310 (propagated-inputs
311 `(("ruby-highline" ,ruby-highline)))
312 (native-inputs
313 `(("bundler" ,bundler)
314 ("ruby-rspec-core" ,ruby-rspec-core)
315 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
316 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
317 ("ruby-simplecov" ,ruby-simplecov)))
318 (home-page "https://github.com/commander-rb/commander")
319 (synopsis "Library for building Ruby command-line executables")
320 (description
321 "Commander aims to be a complete solution for Ruby command-line
322executables. Commander bridges the gap between other terminal related
323libraries (OptionParser, HighLine), while providing many new features, and an
324elegant API.")
325 (license license:expat)))
326
823ed097
CB
327(define-public ruby-highline
328 (package
329 (name "ruby-highline")
6742c6f6 330 (version "2.0.1")
823ed097
CB
331 (source
332 (origin
333 (method url-fetch)
334 (uri (rubygems-uri "highline" version))
335 (sha256
336 (base32
6742c6f6 337 "0gr6pckj2jayxw1gdgh9193j5jag5zrrqqlrnl4jvcwpyd3sn2zc"))))
823ed097
CB
338 (build-system ruby-build-system)
339 (arguments
340 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
341 (native-inputs
342 `(("bundler" ,bundler)
343 ("ruby-code-statistics" ,ruby-code-statistics)))
344 (synopsis
345 "HighLine helps you build command-line interfaces")
346 (description
347 "HighLine provides a high-level IO library that provides validation,
348type conversion, and more for command-line interfaces. HighLine also includes
349a menu system for providing multiple options to the user.")
350 (home-page "https://github.com/JEG2/highline")
351 (license (list license:gpl2 license:ruby))))
352
bda0c139
DT
353(define-public ruby-hoe
354 (package
355 (name "ruby-hoe")
d0d2dd24 356 (version "3.21.0")
bda0c139 357 (source (origin
e83c6d00
DT
358 (method url-fetch)
359 (uri (rubygems-uri "hoe" version))
bda0c139
DT
360 (sha256
361 (base32
d0d2dd24 362 "0qid0n56mgsjvq5ksxajv0gb92akky8imwgvw22ajms5g4fd6nf4"))))
bda0c139 363 (build-system ruby-build-system)
d0d2dd24
CB
364 (arguments
365 '(#:phases
366 (modify-phases %standard-phases
367 ;; One of the tests fails if the SOURCE_DATE_EPOCH environment
368 ;; variable is set, so unset it for the duration of the tests.
369 ;;
370 ;; TestHoe#test_possibly_better
371 ;; [/tmp/guix-build-ruby-hoe-3.20.0.drv-0/gem/test/test_hoe.rb:250]:
372 ;; Expected: 2019-11-12 00:00:00 UTC
373 ;; Actual: 1970-01-01 00:00:00 UTC
374 (add-before 'check 'unset-SOURCE-DATE-EPOCH
375 (lambda _
376 (unsetenv "SOURCE_DATE_EPOCH")
377 #t))
378 (add-after 'check 'set-SOURCE-DATE-EPOCH-again
379 (lambda _
380 (setenv "SOURCE_DATE_EPOCH" "1")
381 #t)))))
bda0c139
DT
382 (synopsis "Ruby project management helper")
383 (description
384 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
385maintain, and release projects and includes a dynamic plug-in system allowing
386for easy extensibility. Hoe ships with plug-ins for all the usual project
387tasks including rdoc generation, testing, packaging, deployment, and
388announcement.")
2f3800e5 389 (home-page "https://www.zenspider.com/projects/hoe.html")
bda0c139
DT
390 (license license:expat)))
391
022170dc
PP
392(define-public ruby-rake-compiler
393 (package
394 (name "ruby-rake-compiler")
7ac6bd00 395 (version "1.1.0")
022170dc
PP
396 (source (origin
397 (method url-fetch)
e83c6d00 398 (uri (rubygems-uri "rake-compiler" version))
022170dc
PP
399 (sha256
400 (base32
7ac6bd00 401 "0l4hg21v0phfrfsc2hilgmwvn2imxr0byqh8dv16bya1s5d3km0q"))))
022170dc
PP
402 (build-system ruby-build-system)
403 (arguments
e83c6d00 404 '(#:tests? #f)) ; needs cucumber
022170dc 405 (synopsis "Building and packaging helper for Ruby native extensions")
e881752c 406 (description "Rake-compiler provides a framework for building and
022170dc
PP
407packaging native C and Java extensions in Ruby.")
408 (home-page "https://github.com/rake-compiler/rake-compiler")
409 (license license:expat)))
410
30f08487
RW
411(define-public ruby-rsync
412 (package
413 (name "ruby-rsync")
414 (version "1.0.9")
415 (source
416 (origin
417 (method url-fetch)
418 (uri (rubygems-uri "rsync" version))
419 (sha256
420 (base32
421 "0p8b27q1gvxilqfq2528xpwglzcm2myikkjxpqk7mwbwg9r6knxv"))))
422 (build-system ruby-build-system)
423 (arguments
424 '(#:test-target "spec"
425 #:phases
426 (modify-phases %standard-phases
427 (add-after 'unpack 'remove-coveralls-requirement
428 (lambda _
429 (substitute* "spec/spec_helper.rb"
430 (("require 'coveralls'") "")
431 (("Coveralls.wear!") ""))
432 #t)))))
433 (native-inputs
434 `(("bundler" ,bundler)
435 ("rsync" ,rsync)
436 ("ruby-rspec-core" ,ruby-rspec-core)
437 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
438 ("ruby-rspec-mocks" ,ruby-rspec-mocks)))
439 (home-page "https://github.com/jbussdieker/ruby-rsync")
440 (synopsis "Ruby wrapper around rsync")
441 (description
442 "Ruby Rsync is a Ruby library that can synchronize files between remote
443hosts by wrapping the @file{rsync} binary.")
444 (license license:expat)))
445
acf735f2
DT
446(define-public ruby-i18n
447 (package
448 (name "ruby-i18n")
92dddf6b 449 (version "1.7.0")
acf735f2
DT
450 (source (origin
451 (method url-fetch)
e83c6d00 452 (uri (rubygems-uri "i18n" version))
acf735f2
DT
453 (sha256
454 (base32
92dddf6b 455 "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
acf735f2
DT
456 (build-system ruby-build-system)
457 (arguments
0bfdfd37 458 '(#:tests? #f)) ; no tests
cbb50182 459 (propagated-inputs `(("concurrent-ruby" ,ruby-concurrent)))
acf735f2
DT
460 (synopsis "Internationalization library for Ruby")
461 (description "Ruby i18n is an internationalization and localization
462solution for Ruby programs. It features translation and localization,
463interpolation of values to translations, pluralization, customizable
464transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
465translation data, custom key/scope separator, custom exception handlers, and
466an extensible architecture with a swappable backend.")
92dddf6b 467 (home-page "https://github.com/ruby-i18n/i18n")
acf735f2 468 (license license:expat)))
eb0c2dd6 469
62b138ca
CB
470(define-public ruby-iruby
471 (package
472 (name "ruby-iruby")
473 (version "0.3")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (rubygems-uri "iruby" version))
478 (sha256
479 (base32
480 "1wdf2c0x8y6cya0n3y0p3p7b1sxkb2fdavdn2k58rf4rs37s7rzn"))))
481 (build-system ruby-build-system)
482 (arguments
483 ;; TODO: Tests currently fail.
484 ;;
485 ;; Finished in 1.764405s, 1.1335 runs/s, 5.1009 assertions/s.
486 ;;
487 ;; 1) Failure:
488 ;; IntegrationTest#test_interaction [/tmp/guix-build-ruby-iruby-0.3.drv-0/gem/test/integration_test.rb:25]:
489 ;; In [ expected
490 ;;
491 ;; 2 runs, 9 assertions, 1 failures, 0 errors, 0 skips
492 '(#:tests? #f
493 #:phases
494 (modify-phases %standard-phases
495 (add-after 'unpack 'patch-ipython
496 (lambda* (#:key inputs #:allow-other-keys)
497 (substitute* "lib/iruby/command.rb"
498 (("version = `")
499 (string-append
500 "version = `"
501 (assoc-ref inputs "python-ipython")
502 "/bin/"))
503 (("Kernel\\.exec\\('")
504 (string-append
505 "Kernel.exec('"
506 (assoc-ref inputs "python-ipython")
507 "/bin/")))
508 #t)))))
509 (inputs
510 `(("python-ipython" ,python-ipython)))
511 (propagated-inputs
512 `(("ruby-bond" ,ruby-bond)
513 ("ruby-data_uri" ,ruby-data_uri)
514 ("ruby-mimemagic" ,ruby-mimemagic)
515 ("ruby-multi-json" ,ruby-multi-json)
516 ("ruby-cztop" ,ruby-cztop)
517 ;; Optional inputs
518 ("ruby-pry" ,ruby-pry)))
519 (synopsis "Ruby kernel for Jupyter/IPython")
520 (description
521 "This package provides a Ruby kernel for Jupyter/IPython frontends (e.g.
522notebook).")
523 (home-page "https://github.com/SciRuby/iruby")
524 (license license:expat)))
525
eb0c2dd6
DT
526;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
527;; dependencies use RSpec for their test suites! To avoid these circular
528;; dependencies, we disable tests for all of the RSpec-related packages.
87688ff3 529(define-public ruby-rspec-support
eb0c2dd6
DT
530 (package
531 (name "ruby-rspec-support")
bee67d18 532 (version "3.8.0")
eb0c2dd6
DT
533 (source (origin
534 (method url-fetch)
e83c6d00 535 (uri (rubygems-uri "rspec-support" version))
eb0c2dd6
DT
536 (sha256
537 (base32
bee67d18 538 "0p3m7drixrlhvj2zpc38b11x145bvm311x6f33jjcxmvcm0wq609"))))
eb0c2dd6
DT
539 (build-system ruby-build-system)
540 (arguments
541 '(#:tests? #f)) ; avoid dependency cycles
542 (synopsis "RSpec support library")
543 (description "Support utilities for RSpec gems.")
544 (home-page "https://github.com/rspec/rspec-support")
545 (license license:expat)))
546
547(define-public ruby-rspec-core
548 (package
549 (name "ruby-rspec-core")
bee67d18 550 (version "3.8.0")
eb0c2dd6
DT
551 (source (origin
552 (method url-fetch)
e83c6d00 553 (uri (rubygems-uri "rspec-core" version))
eb0c2dd6
DT
554 (sha256
555 (base32
bee67d18 556 "1p1s5bnbqp3sxk67y0fh0x884jjym527r0vgmhbm81w7aq6b7l4p"))))
eb0c2dd6
DT
557 (build-system ruby-build-system)
558 (arguments
559 '(#:tests? #f)) ; avoid dependency cycles
560 (propagated-inputs
561 `(("ruby-rspec-support" ,ruby-rspec-support)))
562 (synopsis "RSpec core library")
563 (description "Rspec-core provides the RSpec test runner and example
564groups.")
565 (home-page "https://github.com/rspec/rspec-core")
566 (license license:expat)))
e6962009 567
64c318f2
BW
568(define-public ruby-rspec-core-2
569 (package (inherit ruby-rspec-core)
570 (version "2.14.8")
571 (source (origin
572 (method url-fetch)
573 (uri (rubygems-uri "rspec-core" version))
574 (sha256
575 (base32
576 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
577 (propagated-inputs `())))
578
20c05ea9 579(define-public ruby-diff-lcs
e6962009
DT
580 (package
581 (name "ruby-diff-lcs")
e2fcef39 582 (version "1.3")
e6962009
DT
583 (source (origin
584 (method url-fetch)
e83c6d00 585 (uri (rubygems-uri "diff-lcs" version))
e6962009
DT
586 (sha256
587 (base32
e2fcef39 588 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
e6962009
DT
589 (build-system ruby-build-system)
590 (arguments
591 '(#:tests? #f)) ; avoid dependency cycles
592 (synopsis "Compute the difference between two Enumerable sequences")
593 (description "Diff::LCS computes the difference between two Enumerable
594sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
595It includes utilities to create a simple HTML diff output format and a
596standard diff-like tool.")
597 (home-page "https://github.com/halostatue/diff-lcs")
598 (license license:expat)))
599
600(define-public ruby-rspec-expectations
601 (package
602 (name "ruby-rspec-expectations")
bee67d18 603 (version "3.8.2")
e6962009
DT
604 (source (origin
605 (method url-fetch)
e83c6d00 606 (uri (rubygems-uri "rspec-expectations" version))
e6962009
DT
607 (sha256
608 (base32
bee67d18 609 "18l21hy1zdc2pgc2yb17k3n2al1khpfr0z6pijlm852iz6vj0dkm"))))
e6962009
DT
610 (build-system ruby-build-system)
611 (arguments
612 '(#:tests? #f)) ; avoid dependency cycles
613 (propagated-inputs
614 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 615 ("ruby-diff-lcs" ,ruby-diff-lcs)))
e881752c 616 (synopsis "RSpec expectations library")
e6962009
DT
617 (description "Rspec-expectations provides a simple API to express expected
618outcomes of a code example.")
619 (home-page "https://github.com/rspec/rspec-expectations")
620 (license license:expat)))
4f2a0cac 621
fb157f25
BW
622(define-public ruby-rspec-expectations-2
623 (package (inherit ruby-rspec-expectations)
624 (version "2.14.5")
625 (source (origin
626 (method url-fetch)
627 (uri (rubygems-uri "rspec-expectations" version))
628 (sha256
629 (base32
630 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
631 (propagated-inputs
632 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
633
818b402c
MC
634(define-public ruby-sorcerer
635 (package
636 (name "ruby-sorcerer")
637 (version "2.0.1")
638 (source
639 (origin
640 (method url-fetch)
641 (uri (rubygems-uri "sorcerer" version))
642 (sha256
643 (base32
644 "0d32ha9pp9slpmsm027pkdpbr9vc5jn2m8rl6hwwx6a87m8cr58h"))))
645 (build-system ruby-build-system)
646 (synopsis "Ripper-style abstract syntax tree to Ruby source generator")
647 (description "Sorcerer generates Ruby code from a Ripper-like abstract
648syntax tree (i.e. S-Expressions). Sorcerer is targeted mainly at small
649snippets of Ruby code, expressable in a single line. Longer examples may be
650re-sourced, but they will be rendered in a single line format.")
651 (home-page "https://github.com/rspec-given/sorcerer")
652 (license license:expat)))
653
906b9a14
MC
654(define-public ruby-given-core
655 (package
656 (name "ruby-given-core")
657 (version "3.8.0")
658 (source
659 (origin
660 (method url-fetch)
661 (uri (rubygems-uri "given_core" version))
662 (sha256
663 (base32
664 "1lzyqllbbv6as3qgwz2007mvy7wy247bgkch9adnmh1zfa73bkrg"))))
665 (build-system ruby-build-system)
666 (arguments '(#:tests? #f)) ;no test suite for the core package
667 (propagated-inputs
668 `(("ruby-sorcerer" ,ruby-sorcerer)))
669 (synopsis "Core abstractions used by rspec-given and minitest-given")
670 (description "Given_core is the basic functionality behind rspec-given and
671minitest-given, extensions that allow the use of Given/When/Then terminology
672when defining specifications.")
673 (home-page "https://github.com/rspec-given/rspec-given")
674 (license license:expat)))
675
9c171558
MC
676(define-public ruby-rspec-given
677 (package
678 (name "ruby-rspec-given")
679 (version "3.8.0")
680 (source
681 (origin
682 (method url-fetch)
683 (uri (rubygems-uri "rspec-given" version))
684 (sha256
685 (base32
686 "1783bazja10kbha8hk15khvybsq88siyax02cpkk688604h54nji"))))
687 (build-system ruby-build-system)
688 (arguments
689 `(#:test-target "rs"
690 #:phases
691 (modify-phases %standard-phases
692 (add-after 'unpack 'fix-rakefile
693 (lambda _
694 (substitute* '("Rakefile" "rakelib/gemspec.rake")
695 (("require '\\./lib/given/.*") "")
696 (("Given::VERSION") (format #f "~s" ,version))
697 ;; Fix the error: "cannot load such file -- example_helper"
698 (("sh \"rspec")
699 "sh \"rspec -Ilib:examples"))
700 #t))
701 (add-after 'extract-gemspec 'delete-failing-tests
702 ;; See: https://github.com/jimweirich/rspec-given/issues/57.
703 (lambda _
704 (substitute* ".gemspec"
705 (("\"spec/lib/given/natural_assertion_spec.rb\".freeze, ")
706 "")
707 (("\"examples/integration/failing_messages_spec.rb\".freeze, ")
708 ""))
709 (delete-file "spec/lib/given/natural_assertion_spec.rb")
710 (delete-file "examples/integration/failing_messages_spec.rb")
711 #t)))))
712 (native-inputs
713 `(("ruby-rspec" ,ruby-rspec)
714 ("ruby-minitest" ,ruby-minitest)))
715 (propagated-inputs
716 `(("ruby-given-core" ,ruby-given-core)
717 ("ruby-rspec" ,ruby-rspec)))
718 (synopsis "Given/When/Then for RSpec and Minitest")
719 (description "Given is an RSpec extension that allows the use of
720Given/When/Then terminology when defining specifications, in a way similar to
721the Cucumber Gherkin language.")
722 (home-page "https://github.com/rspec-given/rspec-given")
723 (license license:expat)))
724
999ffb26
DM
725(define-public ruby-rspec-its
726 (package
727 (name "ruby-rspec-its")
b2244c68 728 (version "1.3.0")
999ffb26
DM
729 (source
730 (origin
3306f02a
CB
731 (method git-fetch)
732 (uri (git-reference
b0e7b699 733 (url "https://github.com/rspec/rspec-its")
3306f02a
CB
734 (commit (string-append "v" version))))
735 (file-name (git-file-name name version))
999ffb26
DM
736 (sha256
737 (base32
b2244c68 738 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
999ffb26
DM
739 (build-system ruby-build-system)
740 (arguments
3306f02a
CB
741 `(#:test-target "spec"
742 #:phases
743 (modify-phases %standard-phases
744 (add-after 'unpack 'dont-install-gems-from-gemfile
745 (lambda _
746 (substitute* "Gemfile"
747 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
748 ""))
749 #t))
7c8eb479 750 (add-before 'build 'loosen-ffi-requirement
b2244c68 751 (lambda _
7c8eb479 752 ;; Accept any version of ruby-ffi.
b2244c68 753 (substitute* "Gemfile"
7c8eb479
MB
754 ((" gem 'ffi', '~> 1\\.9\\.25'")
755 " gem 'ffi'"))
b2244c68 756 #t))
3306f02a
CB
757 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
758 (lambda _
759 (substitute* "rspec-its.gemspec"
760 (("rake.*") "rake'\n")
b2244c68
BH
761 (("spec.add_development_dependency 'cucumber'.*")
762 "spec.add_development_dependency 'cucumber'\n")
3306f02a 763 (("bundler.*") "bundler'\n")
b2244c68 764 (("\"aruba.*") "'aruba'\n"))
3306f02a 765 #t)))))
999ffb26
DM
766 (propagated-inputs
767 `(("ruby-rspec-core" ,ruby-rspec-core)
768 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
3306f02a
CB
769 (native-inputs
770 `(("bundler" ,bundler)
771 ("ruby-cucumber" ,ruby-cucumber)
b2244c68 772 ("ruby-ffi" ,ruby-ffi)
3306f02a
CB
773 ("ruby-aruba" ,ruby-aruba)))
774 (synopsis "RSpec extension that provides the @code{its} method")
775 (description
776 "RSpec::Its provides the its method as a short-hand to specify the expected
777value of an attribute. For example, one can use @code{its(:size)\\{should
778eq(1)\\}}.")
999ffb26
DM
779 (home-page "https://github.com/rspec/rspec-its")
780 (license license:expat)))
781
d7bd7016
MC
782;;; This variant is used to break a cycle with ruby-protobuf.
783(define-public ruby-rspec-its-minimal
784 (hidden-package
785 (package
786 (inherit ruby-rspec-its)
787 (arguments
788 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
789 ((#:tests? _ #f) #f)))
790 (native-inputs '()))))
791
4f2a0cac
DT
792(define-public ruby-rspec-mocks
793 (package
794 (name "ruby-rspec-mocks")
bee67d18 795 (version "3.8.0")
4f2a0cac
DT
796 (source (origin
797 (method url-fetch)
e83c6d00 798 (uri (rubygems-uri "rspec-mocks" version))
4f2a0cac
DT
799 (sha256
800 (base32
bee67d18 801 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
4f2a0cac
DT
802 (build-system ruby-build-system)
803 (arguments
804 '(#:tests? #f)) ; avoid dependency cycles
805 (propagated-inputs
806 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 807 ("ruby-diff-lcs" ,ruby-diff-lcs)))
4f2a0cac
DT
808 (synopsis "RSpec stubbing and mocking library")
809 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
810support for stubbing and mocking.")
811 (home-page "https://github.com/rspec/rspec-mocks")
812 (license license:expat)))
d4fde1f2 813
6da9adeb
BW
814(define-public ruby-rspec-mocks-2
815 (package (inherit ruby-rspec-mocks)
816 (version "2.14.6")
817 (source (origin
818 (method url-fetch)
819 (uri (rubygems-uri "rspec-mocks" version))
820 (sha256
821 (base32
822 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
823 (propagated-inputs
824 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
825
198bc648
CB
826(define-public ruby-rspec-rerun
827 (package
828 (name "ruby-rspec-rerun")
829 (version "1.1.0")
830 (source
831 (origin
832 (method url-fetch)
833 (uri (rubygems-uri "rspec-rerun" version))
834 (sha256
835 (base32
836 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
837 (build-system ruby-build-system)
838 (arguments
839 '(;; No included tests
840 #:tests? #f))
841 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
842 (synopsis "Track failed RSpec tests to re-run them")
843 (description
844 "This package provides an automated way to track, and then re-run failed
845RSpec tests.")
846 (home-page "https://github.com/dblock/rspec-rerun")
847 (license license:expat)))
848
9c4cb1ef
CD
849(define-public ruby-rspec-wait
850 (package
851 (name "ruby-rspec-wait")
852 (version "0.0.9")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (rubygems-uri "rspec-wait" version))
857 (sha256
858 (base32
859 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
860 (build-system ruby-build-system)
861 (arguments
862 '(#:phases
863 (modify-phases %standard-phases
864 (replace 'check
865 (lambda _
866 (invoke "rake" "spec"))))))
867 (native-inputs
868 `(("bundler" ,bundler)))
869 (propagated-inputs
870 `(("ruby-rspec" ,ruby-rspec)))
871 (home-page "https://github.com/laserlemon/rspec-wait")
872 (synopsis "Wait for conditions in RSpec")
873 (description
874 "RSpec::Wait strives to make it easier to test asynchronous or slow
875interactions.")
876 (license license:expat)))
877
d4fde1f2
DT
878(define-public ruby-rspec
879 (package
880 (name "ruby-rspec")
bee67d18 881 (version "3.8.0")
d4fde1f2
DT
882 (source (origin
883 (method url-fetch)
e83c6d00 884 (uri (rubygems-uri "rspec" version))
d4fde1f2
DT
885 (sha256
886 (base32
bee67d18 887 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
d4fde1f2
DT
888 (build-system ruby-build-system)
889 (arguments
890 '(#:tests? #f)) ; avoid dependency cycles
891 (propagated-inputs
892 `(("ruby-rspec-core" ,ruby-rspec-core)
893 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
894 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
895 (synopsis "Behavior-driven development framework for Ruby")
896 (description "RSpec is a behavior-driven development (BDD) framework for
897Ruby. This meta-package includes the RSpec test runner, along with the
898expectations and mocks frameworks.")
35739712 899 (home-page "https://rspec.info/")
d4fde1f2 900 (license license:expat)))
2cbc105b 901
5ac984b3
BW
902(define-public ruby-rspec-2
903 (package (inherit ruby-rspec)
904 (version "2.14.1")
905 (source (origin
906 (method url-fetch)
907 (uri (rubygems-uri "rspec" version))
908 (sha256
909 (base32
910 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
911 (propagated-inputs
912 `(("ruby-rspec-core" ,ruby-rspec-core-2)
913 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
914 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
915
2cbc105b
DT
916;; Bundler is yet another source of circular dependencies, so we must disable
917;; its test suite as well.
918(define-public bundler
919 (package
920 (name "bundler")
cbee8e31 921 (version "2.1.4")
2cbc105b
DT
922 (source (origin
923 (method url-fetch)
e83c6d00 924 (uri (rubygems-uri "bundler" version))
2cbc105b
DT
925 (sha256
926 (base32
cbee8e31 927 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
2cbc105b
DT
928 (build-system ruby-build-system)
929 (arguments
930 '(#:tests? #f)) ; avoid dependency cycles
931 (synopsis "Ruby gem bundler")
932 (description "Bundler automatically downloads and installs a list of gems
933specified in a \"Gemfile\", as well as their dependencies.")
2f3800e5 934 (home-page "https://bundler.io/")
2cbc105b 935 (license license:expat)))
98b87b82 936
cf36174f
RW
937(define-public ruby-builder
938 (package
939 (name "ruby-builder")
42b48db2 940 (version "3.2.3")
cf36174f
RW
941 (source (origin
942 (method url-fetch)
943 (uri (rubygems-uri "builder" version))
944 (sha256
945 (base32
42b48db2 946 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
cf36174f
RW
947 (build-system ruby-build-system)
948 (arguments
949 `(#:phases
950 (modify-phases %standard-phases
951 (add-after 'unpack 'do-not-use-rvm
952 (lambda _
953 (substitute* "rakelib/tags.rake"
954 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
955 #t)))))
956 (synopsis "Ruby library to create structured data")
957 (description "Builder provides a number of builder objects that make it
958easy to create structured data. Currently the following builder objects are
959supported: XML Markup and XML Events.")
960 (home-page "https://github.com/jimweirich/builder")
961 (license license:expat)))
962
566f71f8
CB
963(define-public ruby-bump
964 (package
965 (name "ruby-bump")
966 (version "0.7.0")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (rubygems-uri "bump" version))
971 (sha256
972 (base32
973 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
974 (build-system ruby-build-system)
975 (arguments
976 '(;; No included tests
977 #:tests? #f))
978 (synopsis "Tool for working with Rubygems")
979 (description
980 "Bump provides commands to manage Rubygem versioning, updating to the
981next patch version for example.")
982 (home-page "https://github.com/gregorym/bump")
983 (license license:expat)))
984
ad79eb55
RW
985(define-public ruby-rjb
986 (package
987 (name "ruby-rjb")
aeb4e61e 988 (version "1.5.5")
ad79eb55
RW
989 (source (origin
990 (method url-fetch)
991 (uri (rubygems-uri "rjb" version))
992 (sha256
993 (base32
aeb4e61e 994 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
ad79eb55
RW
995 (build-system ruby-build-system)
996 (arguments
997 `(#:tests? #f ; no rakefile
998 #:phases
999 (modify-phases %standard-phases
1000 (add-before 'build 'set-java-home
1001 (lambda* (#:key inputs #:allow-other-keys)
1002 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1003 #t)))))
1004 (native-inputs
d2540f80 1005 `(("jdk" ,icedtea "jdk")))
ad79eb55
RW
1006 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
1007 (description "RJB is a bridge program that connects Ruby and Java via the
1008Java Native Interface.")
2f3800e5 1009 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
ad79eb55
RW
1010 (license license:lgpl2.1+)))
1011
f9ae2c06
PP
1012(define-public ruby-log4r
1013 (package
1014 (name "ruby-log4r")
1015 (version "1.1.10")
1016 (source
1017 (origin
1018 (method url-fetch)
1019 (uri (rubygems-uri "log4r" version))
1020 (sha256
1021 (base32
1022 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
1023 (build-system ruby-build-system)
1024 (arguments
1025 '(#:tests? #f)) ; no Rakefile in gem
1026 (synopsis "Flexible logging library for Ruby")
1027 (description "Comprehensive and flexible logging library written
1028in Ruby for use in Ruby programs. It features a hierarchical logging
1029system of any number of levels, custom level names, logger
1030inheritance, multiple output destinations per log event, execution
1031tracing, custom formatting, thread safteyness, XML and YAML
1032configuration, and more.")
1033 (home-page "http://log4r.rubyforge.org/")
1034 (license license:bsd-3)))
1035
71a03c29
RW
1036(define-public ruby-atoulme-antwrap
1037 (package
1038 (name "ruby-atoulme-antwrap")
1039 (version "0.7.5")
1040 (source (origin
1041 (method url-fetch)
1042 (uri (rubygems-uri "atoulme-Antwrap" version))
1043 (sha256
1044 (base32
1045 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
1046 (build-system ruby-build-system)
1047 ;; Test data required for most of the tests are not included.
1048 (arguments `(#:tests? #f))
1049 (native-inputs
1050 `(("ruby-hoe" ,ruby-hoe)))
1051 (inputs
1052 `(("ruby-rjb" ,ruby-rjb)))
1053 (synopsis "Ruby wrapper for the Ant build tool")
1054 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1055tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1056script.")
1057 (home-page "http://rubyforge.org/projects/antwrap/")
1058 (license license:expat)))
1059
fe1ddad5
RW
1060(define-public ruby-atoulme-saikuro
1061 (package
1062 (name "ruby-atoulme-saikuro")
1063 (version "1.2.1")
1064 (source (origin
1065 (method url-fetch)
1066 (uri (rubygems-uri "atoulme-Saikuro" version))
1067 (sha256
1068 (base32
1069 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1070 (build-system ruby-build-system)
1071 ;; FIXME: There are no unit tests. The tests are demonstrations of the
1072 ;; "saikuro" tool.
1073 (arguments `(#:tests? #f))
1074 (synopsis "Cyclomatic complexity analyzer")
1075 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1076given Ruby source code Saikuro will generate a report listing the cyclomatic
1077complexity of each method found. In addition, Saikuro counts the number of
1078lines per method and can generate a listing of the number of tokens on each
1079line of code.")
1080 (home-page "http://www.github.com/atoulme/Saikuro")
1081 ;; File headers contain the BSD-3 license and the README.rdoc says that
1082 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1083 ;; of the Expat license.
1084 (license license:bsd-3)))
1085
c84dd8d4
MC
1086(define-public ruby-pandoc-ruby
1087 (package
1088 (name "ruby-pandoc-ruby")
1089 (version "2.1.4")
1090 (source
1091 (origin
1092 (method git-fetch) ;the gem lacks many test files
1093 (uri (git-reference
b0e7b699 1094 (url "https://github.com/xwmx/pandoc-ruby")
c84dd8d4
MC
1095 (commit version)))
1096 (file-name (git-file-name name version))
1097 (sha256
1098 (base32
1099 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1100 (build-system ruby-build-system)
1101 (arguments
1102 `(#:phases
1103 (modify-phases %standard-phases
1104 (add-after 'unpack 'disable-failing-tests
1105 ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
1106 ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
1107 (lambda _
1108 (substitute* "test/test_conversions.rb"
1109 (("next if from == to.*" all)
1110 (string-append
1111 all
1112 " next if ['plain', 'beamer'].include? to\n")))
1113 #t))
1114 (add-after 'unpack 'patch-pandoc-path
1115 (lambda* (#:key inputs #:allow-other-keys)
1116 (let ((pandoc (string-append (assoc-ref inputs "ghc-pandoc")
1117 "/bin/pandoc")))
1118 (substitute* "lib/pandoc-ruby.rb"
1119 (("@@pandoc_path = 'pandoc'")
1120 (format #f "@@pandoc_path = '~a'" pandoc)))
1121 (substitute* "test/test_pandoc_ruby.rb"
1122 (("('|\")pandoc" _ quote)
1123 (string-append quote pandoc))
1124 (("\\^pandoc")
1125 ".*pandoc"))
1126 #t)))
1127 (add-after 'extract-gemspec 'remove-Gemfile.lock
1128 (lambda _
1129 (delete-file "Gemfile.lock")
1130 (substitute* "pandoc-ruby.gemspec"
1131 (("Gemfile\\.lock") ""))
1132 #t)))))
1133 (native-inputs
1134 `(("ruby-mocha" ,ruby-mocha)))
1135 (inputs
1136 `(("ghc-pandoc" ,ghc-pandoc)))
1137 (synopsis "Ruby wrapper for Pandoc")
1138 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1139command line tools for converting one markup format to another. Pandoc can
1140convert documents from a variety of formats including markdown,
1141reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1142variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1143ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1144markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1145more.")
1146 (home-page "https://github.com/xwmx/pandoc-ruby")
1147 (license license:expat)))
1148
fef0564c
MC
1149(define-public ruby-slim
1150 (package
1151 (name "ruby-slim")
1152 (version "4.1.0")
1153 (source
1154 (origin
1155 (method url-fetch)
1156 (uri (rubygems-uri "slim" version))
1157 (sha256
1158 (base32
1159 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1160 (build-system ruby-build-system)
1161 (arguments
1162 `(#:phases
1163 (modify-phases %standard-phases
1164 ;; See: https://github.com/slim-template/slim/issues/857 and
1165 ;; https://github.com/slim-template/slim/issues/858.
1166 (add-after 'unpack 'skip-broken-tests
1167 (lambda _
1168 (substitute* "test/core/test_embedded_engines.rb"
1169 (("def test_render_with_markdown")
1170 "def skipped_test_render_with_markdown"))
1171 (substitute* "test/translator/test_translator.rb"
1172 (("raise (\"Missing test for.*)" _ tail)
1173 (string-append "print " tail)))
1174 #t))
1175 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1176 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1177 (add-after 'unpack 'prevent-bundler-interference
1178 (lambda _
1179 (substitute* "Rakefile"
1180 (("require 'bundler/setup'") "nil")
1181 (("Bundler::GemHelper\\.install_tasks") "nil"))
1182 #t)))))
1183 (native-inputs
1184 `(("ruby-rack-test" ,ruby-rack-test)
1185 ("ruby-sinatra" ,ruby-sinatra)))
1186 (propagated-inputs
1187 `(("ruby-temple" ,ruby-temple)
1188 ("ruby-tilt" ,ruby-tilt)))
1189 (synopsis "Minimalist template language for Ruby")
1190 (description "Slim is a template language for Ruby that aims to reduce the
1191syntax to the minimum while remaining clear.")
1192 (home-page "http://slim-lang.com/")
1193 (license license:expat)))
1194
34138e42
BW
1195(define-public ruby-asciidoctor
1196 (package
751bf33d 1197 (name "ruby-asciidoctor")
5df1126c 1198 (version "2.0.10")
751bf33d
MC
1199 (source
1200 (origin
5df1126c
MC
1201 (method git-fetch) ;the gem release lacks a Rakefile
1202 (uri (git-reference
b0e7b699 1203 (url "https://github.com/asciidoctor/asciidoctor")
5df1126c
MC
1204 (commit (string-append "v" version))))
1205 (file-name (git-file-name name version))
751bf33d 1206 (sha256
34138e42 1207 (base32
5df1126c 1208 "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
751bf33d
MC
1209 (build-system ruby-build-system)
1210 (arguments
1211 `(#:test-target "test:all"
1212 #:phases
1213 (modify-phases %standard-phases
5df1126c 1214 (replace 'replace-git-ls-files
751bf33d 1215 (lambda _
5df1126c
MC
1216 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1217 ;; git ls-files output is merged in ruby-build-system.
1218 (substitute* "asciidoctor.gemspec"
1219 (("`git ls-files -z`")
1220 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1221 #t))
1222 (add-after 'extract-gemspec 'strip-version-requirements
1223 (lambda _
1224 (delete-file "Gemfile")
1225 (substitute* "asciidoctor.gemspec"
1226 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1227 (string-append stripped "\n")))
751bf33d
MC
1228 #t)))))
1229 (native-inputs
5df1126c
MC
1230 `(("ruby-erubis" ,ruby-erubis)
1231 ("ruby-minitest" ,ruby-minitest)
751bf33d
MC
1232 ("ruby-nokogiri" ,ruby-nokogiri)
1233 ("ruby-asciimath" ,ruby-asciimath)
5df1126c
MC
1234 ("ruby-coderay" ,ruby-coderay)
1235 ("ruby-cucumber" ,ruby-cucumber)
1236 ("ruby-haml" ,ruby-haml)
1237 ("ruby-rouge" ,ruby-rouge)
1238 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
1239 ("ruby-simplecov" ,ruby-simplecov)
1240 ("ruby-slim" ,ruby-slim)
1241 ("ruby-tilt" ,ruby-tilt)))
751bf33d
MC
1242 (synopsis "Converter from AsciiDoc content to other formats")
1243 (description "Asciidoctor is a text processor and publishing toolchain for
1244converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1245formats.")
1246 (home-page "https://asciidoctor.org")
1247 (license license:expat)))
34138e42 1248
15b188c3
MC
1249(define-public ruby-prawn-icon
1250 (package
1251 (name "ruby-prawn-icon")
1252 (version "2.5.0")
1253 (source
1254 (origin
1255 (method url-fetch)
1256 (uri (rubygems-uri "prawn-icon" version))
1257 (sha256
1258 (base32
1259 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1260 (build-system ruby-build-system)
1261 (arguments
1262 `(#:test-target "spec"
1263 #:phases (modify-phases %standard-phases
1264 (add-after 'unpack 'remove-unnecessary-dependencies
1265 (lambda _
1266 (substitute* '("Rakefile" "spec/spec_helper.rb")
1267 ((".*[Bb]undler.*") "")
1268 (("^require 'rubocop.*") "")
1269 (("^RuboCop.*") ""))
1270 #t)))))
1271 (native-inputs
1272 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1273 ("ruby-pdf-reader" ,ruby-pdf-reader)
1274 ("ruby-rspec" ,ruby-rspec)
1275 ("ruby-simplecov" ,ruby-simplecov)))
1276 (propagated-inputs
1277 `(("ruby-prawn" ,ruby-prawn)))
1278 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1279 (description "@code{Prawn::Icon} provides various icon fonts including
1280FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1281toolkit.")
1282 (home-page "https://github.com/jessedoyle/prawn-icon/")
1283 (license %prawn-project-licenses)))
1284
2d877f6e
MC
1285(define-public ruby-css-parser
1286 (package
1287 (name "ruby-css-parser")
1288 (version "1.7.1")
1289 (source
1290 (origin
1291 (method url-fetch)
1292 (uri (rubygems-uri "css_parser" version))
1293 (sha256
1294 (base32
1295 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1296 (build-system ruby-build-system)
1297 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1298 (propagated-inputs
1299 `(("ruby-addressable" ,ruby-addressable)))
1300 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1301 (description "This package allows loading, parsing and cascading Cascading
1302Style Sheets (CSS) rule sets in Ruby.")
1303 (home-page "https://github.com/premailer/css_parser")
1304 (license license:expat)))
1305
95692655
MC
1306(define-public ruby-prawn-svg
1307 (package
1308 (name "ruby-prawn-svg")
1309 (version "0.30.0")
1310 (source
1311 (origin
1312 (method url-fetch)
1313 (uri (rubygems-uri "prawn-svg" version))
1314 (sha256
1315 (base32
1316 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1317 (build-system ruby-build-system)
1318 (arguments
1319 `(#:phases (modify-phases %standard-phases
1320 (add-after 'unpack 'do-not-use-bundler
1321 (lambda _
1322 (substitute* "spec/spec_helper.rb"
1323 ((".*[Bb]undler.*") ""))
1324 #t))
1325 (replace 'check
1326 (lambda* (#:key tests? #:allow-other-keys)
1327 (when tests?
1328 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1329 #t)))))
1330 (native-inputs
1331 `(("ruby-rspec" ,ruby-rspec)))
1332 (propagated-inputs
1333 `(("ruby-css-parser" ,ruby-css-parser)
1334 ("ruby-prawn" ,ruby-prawn)))
1335 (synopsis "SVG renderer for the Prawn PDF library")
1336 (description "This library allows rendering Scalable Vector Graphics (SVG)
1337graphics directly into a Portable Document Format (PDF) document using the
1338Prawn module.")
1339 (home-page "https://github.com/mogest/prawn-svg")
1340 (license license:expat)))
1341
ce52f2b1
MC
1342(define-public ruby-prawn-templates
1343 (package
1344 (name "ruby-prawn-templates")
1345 (version "0.1.2")
1346 (source
1347 (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/prawnpdf/prawn-templates.git")
1351 (commit version)))
1352 (file-name (git-file-name name version))
1353 (sha256
1354 (base32
1355 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1356 (build-system ruby-build-system)
1357 (arguments
1358 `(#:phases (modify-phases %standard-phases
1359 (add-after 'unpack 'do-not-use-bundler
1360 (lambda _
1361 (substitute* "spec/spec_helper.rb"
1362 ((".*[Bb]undler.*") ""))
1363 #t))
1364 (replace 'check
1365 (lambda* (#:key tests? #:allow-other-keys)
1366 (when tests?
1367 (invoke "rspec"))
1368 #t)))))
1369 (native-inputs
1370 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1371 ("ruby-rspec" ,ruby-rspec)))
1372 (propagated-inputs
1373 `(("ruby-pdf-reader" ,ruby-pdf-reader)
1374 ("ruby-prawn" ,ruby-prawn)))
1375 (synopsis "Prawn extension to include or combine PDF documents")
1376 (description "This @strong{unmaintained} package provides a Prawn
1377extension that allows including other Portable Document Format (PDF) documents
1378as background or combining several PDF documents into one. This functionality
1379used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1380of its many longstanding issues.")
1381 (home-page "https://github.com/prawnpdf/prawn-templates")
1382 (license %prawn-project-licenses)))
1383
f949b60e
MC
1384(define-public ruby-polyglot
1385 (package
1386 (name "ruby-polyglot")
1387 (version "0.3.5")
1388 (source
1389 (origin
1390 (method url-fetch)
1391 (uri (rubygems-uri "polyglot" version))
1392 (sha256
1393 (base32
1394 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1395 (build-system ruby-build-system)
1396 (arguments `(#:tests? #f)) ;no test suite
1397 (synopsis "Augment @code{require} to load non-Ruby file types")
1398 (description "The Polyglot library allows a Ruby module to register a
1399loader for the file type associated with a filename extension, and it augments
1400@code{require} to find and load matching files.")
1401 (home-page "https://github.com/cjheath/polyglot")
1402 (license license:expat)))
1403
1f183ca0
MC
1404(define-public ruby-treetop
1405 (package
1406 (name "ruby-treetop")
1407 (version "1.6.10")
1408 (source
1409 (origin
1410 (method git-fetch) ;no test suite in distributed gem
1411 (uri (git-reference
1412 (url "https://github.com/cjheath/treetop.git")
1413 (commit (string-append "v" version))))
1414 (file-name (git-file-name name version))
1415 (sha256
1416 (base32
1417 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1418 (build-system ruby-build-system)
1419 (arguments
1420 `(#:test-target "spec"
1421 #:phases
1422 (modify-phases %standard-phases
1423 (replace 'replace-git-ls-files
1424 (lambda _
1425 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1426 ;; git ls-files output is merged in ruby-build-system.
1427 (substitute* "treetop.gemspec"
1428 (("`git ls-files -z`")
1429 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1430 #t)))))
1431 (native-inputs
1432 `(("ruby-activesupport" ,ruby-activesupport)
1433 ("ruby-rr" ,ruby-rr)
1434 ("ruby-rspec" ,ruby-rspec)))
1435 (propagated-inputs
1436 `(("ruby-polyglot" ,ruby-polyglot)))
1437 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1438 (description "This package provides a Ruby-based Parsing Expression
1439Grammar (PEG) parser generator Domain Specific Language (DSL).")
1440 (home-page "https://github.com/cjheath/treetop")
1441 (license license:expat)))
1442
66861792
MC
1443(define-public ruby-rubocop-performance
1444 (package
1445 (name "ruby-rubocop-performance")
1446 (version "1.7.1")
1447 (source
1448 (origin
1449 (method url-fetch)
1450 (uri (rubygems-uri "rubocop-performance" version))
1451 (sha256
1452 (base32
1453 "04r8d4x62ygv17spvz9yyfxbmbf8qxwhijs0xycfvzr0q4pyg9sw"))))
1454 (build-system ruby-build-system)
1455 (arguments
1456 `(#:tests? #f)) ;no test suite in the distributed gem
1457 (propagated-inputs
1458 `(("ruby-rubocop" ,ruby-rubocop)))
1459 (synopsis "Performance optimizations checkers for Ruby code")
1460 (description "This package provides a collection of RuboCop cops to check
1461for performance optimizations in Ruby code.")
1462 (home-page "https://docs.rubocop.org/rubocop-performance/")
1463 (license license:expat)))
1464
d5840f77
CB
1465(define-public ruby-ast
1466 (package
1467 (name "ruby-ast")
308104f8 1468 (version "2.4.1")
d5840f77
CB
1469 (source
1470 (origin
308104f8
MC
1471 (method git-fetch) ;no test included in gem from v2.4.1
1472 (uri (git-reference
1473 (url "https://github.com/whitequark/ast")
1474 (commit (string-append "v" version))))
1475 (file-name (git-file-name name version))
d5840f77
CB
1476 (sha256
1477 (base32
308104f8 1478 "0k8vya256chimy473g818gim06m5rjgh6mz5sc5g8xz3csh3rysi"))))
d5840f77
CB
1479 (build-system ruby-build-system)
1480 (arguments
1481 '(#:phases
1482 (modify-phases %standard-phases
1483 (add-after 'unpack 'remove-coveralls-requirement
1484 (lambda _
1485 (substitute* "test/helper.rb"
1486 (("require 'coveralls'") "")
1487 (("Coveralls::SimpleCov::Formatter") ""))
1488 #t))
1489 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1490 (lambda _
1491 (substitute* "ast.gemspec"
1492 ((".*coveralls.*") "\n")
1493 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1494 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1495 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1496 #t)))))
1497 (native-inputs
1498 `(("bundler" ,bundler)
1499 ("ruby-simplecov" ,ruby-simplecov)
1500 ("ruby-json-pure" ,ruby-json-pure)
1501 ("ruby-mime-times" ,ruby-mime-types)
1502 ("ruby-yard" ,ruby-yard)
1503 ("ruby-kramdown" ,ruby-kramdown)
1504 ("ruby-rest-client" ,ruby-rest-client)
1505 ("ruby-bacon" ,ruby-bacon)
1506 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1507 ("ruby-racc" ,ruby-racc)))
1508 (synopsis "Library for working with Abstract Syntax Trees")
1509 (description
1510 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1511It does this through immutable data structures.")
1512 (home-page "https://whitequark.github.io/ast/")
1513 (license license:expat)))
1514
b88502c9
BW
1515(define-public ruby-sporkmonger-rack-mount
1516 ;; Testing the addressable gem requires a newer commit than that released, so
1517 ;; use an up to date version.
1518 (let ((revision "1")
1519 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1520 (package
1521 (name "ruby-sporkmonger-rack-mount")
1522 (version (git-version "0.8.3" revision commit))
1523 (source (origin
1524 (method git-fetch)
1525 (uri (git-reference
b0e7b699 1526 (url "https://github.com/sporkmonger/rack-mount")
b88502c9
BW
1527 (commit commit)))
1528 (file-name (git-file-name name version))
1529 (sha256
1530 (base32
1531 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1532 (build-system ruby-build-system)
1533 (arguments
1534 ;; Tests currently fail so disable them.
1535 ;; https://github.com/sporkmonger/rack-mount/pull/1
1536 `(#:tests? #f))
1537 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1538 (synopsis "Stackable dynamic tree based Rack router")
1539 (description
1540 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1541continue trying routes if the response returns pass. This allows multiple
1542routes to be nested or stacked on top of each other.")
1543 (home-page "https://github.com/sporkmonger/rack-mount")
1544 (license license:expat))))
1545
2f9e0b68
RW
1546(define-public ruby-ci-reporter
1547 (package
1548 (name "ruby-ci-reporter")
1549 (version "2.0.0")
1550 (source (origin
1551 (method url-fetch)
1552 (uri (rubygems-uri "ci_reporter" version))
1553 (sha256
1554 (base32
1555 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1556 (build-system ruby-build-system)
1557 (arguments
1558 `(#:test-target "rspec"))
1559 (propagated-inputs
1560 `(("ruby-builder" ,ruby-builder)))
1561 (native-inputs
1562 `(("bundler" ,bundler)
1563 ("ruby-rspec" ,ruby-rspec)))
1564 (synopsis "Generate XML reports of runs test")
1565 (description
1566 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1567you to generate XML reports of your test runs. The resulting files can be
1568read by a continuous integration system that understands Ant's JUnit report
1569format.")
1570 (home-page "https://github.com/nicksieger/ci_reporter")
1571 (license license:expat)))
1572
2ed201c1
CB
1573(define-public ruby-contracts
1574 (package
1575 (name "ruby-contracts")
1576 (version "0.16.0")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (rubygems-uri "contracts" version))
1581 (sha256
1582 (base32
1583 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1584 (build-system ruby-build-system)
1585 (arguments
1586 '(#:test-target "spec"
1587 #:phases
1588 (modify-phases %standard-phases
1589 ;; Don't run or require rubocop, the code linting tool, as this is a
1590 ;; bit unnecessary.
1591 (add-after 'unpack 'dont-run-rubocop
1592 (lambda _
1593 (substitute* "Rakefile"
1594 ((".*rubocop.*") "")
1595 ((".*RuboCop.*") ""))
1596 #t)))))
1597 (native-inputs
1598 `(("ruby-rspec" ,ruby-rspec)))
1599 (synopsis "Method contracts for Ruby")
1600 (description
1601 "This library provides contracts for Ruby. A contract describes the
1602correct inputs and output for a method, and will raise an error if a incorrect
1603value is found.")
1604 (home-page "https://github.com/egonSchiele/contracts.ruby")
1605 (license license:bsd-2)))
1606
6f8bf0eb
CB
1607(define-public ruby-crack
1608 (package
1609 (name "ruby-crack")
1610 (version "0.4.3")
1611 (source
1612 (origin
1613 (method url-fetch)
1614 (uri (rubygems-uri "crack" version))
1615 (sha256
1616 (base32
1617 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1618 (build-system ruby-build-system)
1619 (arguments
1620 `(#:phases
1621 (modify-phases %standard-phases
1622 (replace 'check
1623 (lambda* (#:key tests? #:allow-other-keys)
1624 (when tests?
1625 (for-each (lambda (file)
1626 (display file)(display "\n")
1627 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1628 (find-files "test" ".*rb$")))
1629 #t)))))
1630 (propagated-inputs
1631 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1632 (synopsis "Simple JSON and XML parsing for Ruby")
1633 (description
1634 "@code{crack} provides really simple JSON and XML parsing, extracted from
1635code in Merb and Rails.")
1636 (home-page "https://github.com/jnunemaker/crack")
1637 (license license:expat)))
1638
bef3506e
CB
1639(define-public ruby-cliver
1640 (package
1641 (name "ruby-cliver")
1642 (version "0.3.2")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (rubygems-uri "cliver" version))
1647 (sha256
1648 (base32
1649 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1650 (build-system ruby-build-system)
1651 (arguments
1652 '(#:phases
1653 (modify-phases %standard-phases
1654 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1655 ;; would be nice, but the tests look to be incompatible:
1656 ;;
1657 ;; NoMethodError: undefined method `last_comment'
1658 (replace 'check
1659 (lambda* (#:key tests? #:allow-other-keys)
1660 (when tests?
1661 (invoke "rspec"))
1662 #t)))))
1663 (native-inputs
1664 `(("bundler" ,bundler)
1665 ("ruby-rspec" ,ruby-rspec-2)))
1666 (synopsis "Assertions for command-line dependencies in Ruby")
1667 (description
1668 "@code{cliver} provides a way to detect missing command-line
1669dependencies, including versions.")
1670 (home-page "https://github.com/yaauie/cliver")
1671 (license license:expat)))
1672
fe5dd5f4
CB
1673(define-public ruby-czmq-ffi-gen
1674 (package
1675 (name "ruby-czmq-ffi-gen")
1676 (version "0.13.0")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (rubygems-uri "czmq-ffi-gen" version))
1681 (sha256
1682 (base32
1683 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
1684 (build-system ruby-build-system)
1685 (arguments
1686 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
1687 #:phases
1688 (modify-phases %standard-phases
1689 (add-after 'unpack 'patch-lib_dirs
1690 (lambda* (#:key inputs #:allow-other-keys)
1691 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
1692 (("lib\\_dirs = \\[.*\\]")
1693 (string-append "lib_dirs = ['"
1694 (assoc-ref inputs "czmq") "/lib"
1695 "']")))
1696 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
1697 (("lib\\_dirs = \\[.*\\]")
1698 (string-append "lib_dirs = ['"
1699 (assoc-ref inputs "zeromq") "/lib"
1700 "']"))))))))
1701 (inputs
1702 `(("zeromq" ,zeromq)
1703 ("czmq" ,czmq)))
1704 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
1705 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
1706 (description
1707 "These Ruby bindings are not intended to be directly used, but rather
1708used by higher level bindings like those provided by CZTop.")
1709 (home-page
1710 "https://github.com/paddor/czmq-ffi-gen")
1711 (license license:isc)))
1712
d0afff26
CB
1713(define-public ruby-cztop
1714 (package
1715 (name "ruby-cztop")
1716 (version "0.12.2")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (rubygems-uri "cztop" version))
1721 (sha256
1722 (base32
1723 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
1724 (build-system ruby-build-system)
1725 (arguments
1726 '(#:test-target "spec"
1727 #:phases
1728 (modify-phases %standard-phases
1729 (add-after 'unpack 'patch-lib_paths
1730 (lambda* (#:key inputs #:allow-other-keys)
1731 (substitute* "lib/cztop/poller/zmq.rb"
1732 (("lib\\_paths = \\[.*\\]")
1733 (string-append "lib_paths = ['"
1734 (assoc-ref inputs "zeromq") "/lib"
1735 "']"))))))))
1736 (native-inputs
1737 `(("bundler" ,bundler)
1738 ("ruby-rspec" ,ruby-rspec)))
1739 (inputs
1740 `(("zeromq" ,zeromq)))
1741 (propagated-inputs
1742 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
1743 (synopsis "CZMQ Ruby bindings")
1744 (description
1745 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
1746CZMQ. The focus of of CZTop is on being easy to use and providing first class
1747support for security mechanisms.")
1748 (home-page "https://github.com/paddor/cztop")
1749 (license license:isc)))
1750
b004fb6a
RW
1751(define-public ruby-saikuro-treemap
1752 (package
1753 (name "ruby-saikuro-treemap")
1754 (version "0.2.0")
1755 (source (origin
1756 (method url-fetch)
1757 (uri (rubygems-uri "saikuro_treemap" version))
1758 (sha256
1759 (base32
1760 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
1761 (build-system ruby-build-system)
1762 ;; Some of the tests fail because the generated JSON has keys in a
1763 ;; different order. This is a problem with the test suite rather than any
1764 ;; of the involved libraries.
1765 (arguments `(#:tests? #f))
1766 (propagated-inputs
1767 `(("ruby-json-pure" ,ruby-json-pure)
1768 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
1769 (synopsis "Generate complexity treemap based on saikuro analysis")
1770 (description
1771 "This gem generates a treemap showing the complexity of Ruby code on
1772which it is run. It uses Saikuro under the covers to analyze Ruby code
1773complexity.")
7bf837fd 1774 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
b004fb6a
RW
1775 (license license:expat)))
1776
92b37500
CB
1777(define-public ruby-oauth2
1778 (package
1779 (name "ruby-oauth2")
5dd10be5 1780 (version "1.4.2")
92b37500
CB
1781 (source
1782 (origin
1783 (method url-fetch)
1784 (uri (rubygems-uri "oauth2" version))
1785 (sha256
5dd10be5 1786 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
92b37500
CB
1787 (build-system ruby-build-system)
1788 (arguments
5dd10be5 1789 '(#:tests? #f)) ; no included tests
92b37500
CB
1790 (propagated-inputs
1791 `(("ruby-faraday" ,ruby-faraday)
1792 ("ruby-jwt" ,ruby-jwt)
1793 ("ruby-multi-json" ,ruby-multi-json)
1794 ("ruby-multi-xml" ,ruby-multi-xml)
1795 ("ruby-rack" ,ruby-rack)))
1796 (synopsis "Ruby wrapper for the OAuth 2.0")
1797 (description
1798 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
1799with a similar style to the original OAuth spec.")
1800 (home-page "https://github.com/oauth-xx/oauth2")
1801 (license license:expat)))
1802
29dc4823
CB
1803(define-public ruby-omniauth
1804 (package
1805 (name "ruby-omniauth")
a7b7817d 1806 (version "1.9.1")
29dc4823
CB
1807 (source
1808 (origin
1809 (method url-fetch)
1810 (uri (rubygems-uri "omniauth" version))
1811 (sha256
a7b7817d 1812 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
29dc4823
CB
1813 (build-system ruby-build-system)
1814 (arguments
1815 '(#:tests? #f)) ; No included tests
1816 (propagated-inputs
1817 `(("ruby-hashie" ,ruby-hashie)
1818 ("ruby-rack" ,ruby-rack)))
1819 (synopsis "Generalized Rack framework for multiple-provider authentication")
1820 (description
1821 "This package provides a generalized Rack framework for multiple-provider
1822authentication.")
1823 (home-page "https://github.com/omniauth/omniauth")
1824 (license license:expat)))
1825
d6084cdb
CB
1826(define-public ruby-omniauth-oauth2
1827 (package
1828 (name "ruby-omniauth-oauth2")
1829 (version "1.6.0")
1830 (source
1831 (origin
1832 (method url-fetch)
1833 (uri (rubygems-uri "omniauth-oauth2" version))
1834 (sha256
1835 (base32
1836 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
1837 (build-system ruby-build-system)
1838 (arguments
1839 '(#:phases
1840 (modify-phases %standard-phases
1841 (add-after 'unpack 'remove-unnecessary-dependencies
1842 (lambda _
1843 ;; The coveralls gem submits coverage information to an online
1844 ;; service, and is unnecessary when running the tests
1845 (substitute* "Gemfile"
1846 ((".*coveralls\"") ""))
1847 (substitute* "spec/helper.rb"
1848 (("require \"coveralls\"") "")
1849 (("Coveralls::SimpleCov::Formatter") ""))
1850 #t)))))
1851 (propagated-inputs
1852 `(("ruby-oauth2" ,ruby-oauth2)
1853 ("ruby-omniauth" ,ruby-omniauth)))
1854 (native-inputs
1855 `(("bundler" ,bundler)
1856 ("ruby-rspec" ,ruby-rspec)
1857 ("ruby-simplecov" ,ruby-simplecov)
1858 ("ruby-rack-test" ,ruby-rack-test)
1859 ("ruby-webmock" ,ruby-webmock-2)))
1860 (synopsis "Abstract OAuth2 strategy for OmniAuth")
1861 (description
1862 "This library provides a generic OAuth2 strategy for OmniAuth. It
1863doesn't provide a way to gather user information, so should be used as a
1864building block for authentication strategies.")
1865 (home-page "https://github.com/omniauth/omniauth-oauth2")
1866 (license license:expat)))
1867
433e3154
CB
1868(define-public ruby-open4
1869 (package
1870 (name "ruby-open4")
1871 (version "1.3.4")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (rubygems-uri "open4" version))
1876 (sha256
1877 (base32
1878 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
1879 (build-system ruby-build-system)
1880 (arguments
1881 '(#:phases
1882 (modify-phases %standard-phases
1883 (add-after 'unpack 'patch
1884 (lambda _
1885 (substitute* "rakefile"
1886 ;; Update the Rakefile so it works
1887 (("-rubygems") "-rrubygems")
1888 (("Config") "RbConfig"))
1889 #t))
1890 (add-before 'check 'set-LIB
1891 (lambda _
1892 ;; This is used in the rakefile when running the tests
1893 (setenv "LIB" "open4")
1894 #t)))))
1895 (synopsis "Open child processes from Ruby and manage them easily")
1896 (description
1897 "@code{Open4} is a Ruby library to run child processes and manage their
1898input and output.")
1899 (home-page "https://github.com/ahoward/open4")
1900 (license license:ruby)))
1901
cef87ed6
CB
1902(define-public ruby-options
1903 (package
1904 (name "ruby-options")
1905 (version "2.3.2")
1906 (source
1907 (origin
1908 (method url-fetch)
1909 (uri (rubygems-uri "options" version))
1910 (sha256
1911 (base32
1912 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
1913 (build-system ruby-build-system)
1914 (arguments
1915 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
1916 #:phases
1917 (modify-phases %standard-phases
1918 (add-before 'check 'set-LIB
1919 (lambda _
1920 ;; This is used in the Rakefile, and setting it avoids an issue
1921 ;; with running the tests.
fe27238c
CB
1922 (setenv "LIB" "options")
1923 #t)))))
cef87ed6
CB
1924 (synopsis "Ruby library to parse options from *args cleanly")
1925 (description
1926 "The @code{options} library helps with parsing keyword options in Ruby
1927functions.")
1928 (home-page "https://github.com/ahoward/options")
1929 (license license:ruby)))
1930
d15dbe83
CB
1931(define-public ruby-erubi
1932 (package
1933 (name "ruby-erubi")
1934 (version "1.8.0")
1935 (source
1936 (origin
1937 (method url-fetch)
1938 (uri (rubygems-uri "erubi" version))
1939 (sha256
1940 (base32
1941 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
1942 (build-system ruby-build-system)
1943 (synopsis "ERB template engine for Ruby")
1944 (description
1945 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
1946Erubis")
1947 (home-page "https://github.com/jeremyevans/erubi")
1948 (license license:expat)))
1949
d64ebebd
BW
1950(define-public ruby-erubis
1951 (package
1952 (name "ruby-erubis")
1953 (version "2.7.0")
1954 (source
1955 (origin
1956 (method url-fetch)
1957 (uri (rubygems-uri "erubis" version))
1958 (sha256
1959 (base32
1960 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
1961 (build-system ruby-build-system)
1962 (arguments
1963 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
1964 (synopsis "Implementation of embedded Ruby (eRuby)")
1965 (description
1966 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
1967features such as multi-language support, auto escaping, auto trimming spaces
1968around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
1969support.")
1970 (home-page "http://www.kuwata-lab.com/erubis/")
1971 (license license:expat)))
1972
3ca43524
CB
1973(define-public ruby-execjs
1974 (package
1975 (name "ruby-execjs")
1976 (version "2.7.0")
1977 (source
1978 (origin
1979 ;; fetch from github as the gem does not contain testing code
1980 (method git-fetch)
1981 (uri (git-reference
b0e7b699 1982 (url "https://github.com/rails/execjs")
3ca43524
CB
1983 (commit (string-append "v" version))))
1984 (file-name (git-file-name name version))
1985 (sha256
1986 (base32
1987 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
1988 (build-system ruby-build-system)
1989 (native-inputs
1990 `(("bundler" ,bundler)
1991 ;; The test suite tests all the available backends. Currenly, this just
1992 ;; means the node backend.
1993 ;;
1994 ;; PASSED: test:node
1995 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
1996 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
1997 ("node" ,node)))
1998 (synopsis "Run JavaScript code from Ruby")
1999 (description
2000 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
2001runtime to evaluate your JavaScript program, then returns the result to you as
2002a Ruby object.")
2003 (home-page "https://github.com/rails/execjs")
2004 (license license:expat)))
2005
6623a151
MB
2006(define-public ruby-fakefs
2007 (package
2008 (name "ruby-fakefs")
2009 (version "1.2.2")
2010 (home-page "https://github.com/fakefs/fakefs")
2011 (source (origin
2012 ;; The Rubygems release does not contain tests.
2013 (method git-fetch)
2014 (uri (git-reference
2015 (url home-page)
2016 (commit (string-append "v" version))))
2017 (file-name (git-file-name name version))
2018 (sha256
2019 (base32
2020 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
2021 (build-system ruby-build-system)
2022 (arguments
2023 '(#:phases (modify-phases %standard-phases
2024 (replace 'replace-git-ls-files
2025 (lambda _
2026 (substitute* "fakefs.gemspec"
2027 (("`git ls-files lib README.md LICENSE`")
2028 "`find lib README.md LICENSE -type f | sort`"))
2029 #t))
2030 (add-before 'check 'remove-version-constraints
2031 (lambda _
2032 ;; Drop hard version requirements for test dependencies.
2033 (substitute* "fakefs.gemspec"
2034 (("(.*add_development_dependency .*), .*" _ dep)
2035 (string-append dep "\n")))
a011f67b 2036 #t)))))
6623a151
MB
2037 (native-inputs
2038 `(("ruby-bump" ,ruby-bump)
2039 ("ruby-maxitest" ,ruby-maxitest)
2040 ("ruby-rubocop" ,ruby-rubocop)
2041 ("ruby-rspec" ,ruby-rspec)))
2042 (synopsis "Fake file system for Ruby")
2043 (description
2044 "This package provides a fake file system for use in test suites. It
2045avoids the need for manually creating temporary directories, or dealing
2046with platform intricacies in @code{File} and @code{FileUtils}.")
2047 (license license:expat)))
2048
cc53e630
RW
2049(define-public ruby-orderedhash
2050 (package
2051 (name "ruby-orderedhash")
2052 (version "0.0.6")
2053 (source (origin
2054 (method url-fetch)
2055 (uri (rubygems-uri "orderedhash" version))
2056 (sha256
2057 (base32
2058 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
2059 (build-system ruby-build-system)
2060 (arguments
2061 '(#:tests? #f)) ; no test suite
2062 (synopsis "Ruby library providing an order-preserving hash")
2063 (description "Orderedhash is a Ruby library providing a hash
2064implementation that preserves the order of items and features some array-like
2065extensions.")
2066 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
2067 (license license:public-domain)))
2068
28c5d42d
PP
2069(define-public ruby-libxml
2070 (package
2071 (name "ruby-libxml")
acbc5062 2072 (version "3.0.0")
28c5d42d
PP
2073 (source
2074 (origin
2075 (method url-fetch)
2076 (uri (rubygems-uri "libxml-ruby" version))
2077 (sha256
2078 (base32
acbc5062 2079 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
28c5d42d
PP
2080 (build-system ruby-build-system)
2081 (inputs
2082 `(("zlib" ,zlib)
2083 ("libxml2" ,libxml2)))
2084 (arguments
2085 '(#:tests? #f ; test suite hangs for unknown reason
2086 #:gem-flags
2087 (list "--"
2088 (string-append "--with-xml2-include="
2089 (assoc-ref %build-inputs "libxml2")
2090 "/include/libxml2" ))))
2091 (synopsis "Ruby bindings for GNOME Libxml2")
2092 (description "The Libxml-Ruby project provides Ruby language bindings for
2093the GNOME Libxml2 XML toolkit.")
2f3800e5 2094 (home-page "https://xml4r.github.com/libxml-ruby")
28c5d42d
PP
2095 (license license:expat)))
2096
b3222518
CB
2097(define-public ruby-lino
2098 (package
2099 (name "ruby-lino")
2100 (version "1.1.0")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (rubygems-uri "lino" version))
2105 (sha256
2106 (base32
2107 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2108 (build-system ruby-build-system)
2109 (arguments
2110 '(#:tests? #f)) ; No included tests
2111 (propagated-inputs
2112 `(("ruby-hamster" ,ruby-hamster)
2113 ("ruby-open4" ,ruby-open4)))
2114 (synopsis "Build and execute commands in Ruby")
2115 (description
2116 "@code{Lino} provides an interface to run external commands. It provides
2117an interface to add options as well as managing the standard input, output and
2118error streams.")
2119 (home-page "https://github.com/tobyclemson/lino")
2120 (license license:expat)))
2121
8b9bde07
RW
2122(define-public ruby-xml-simple
2123 (package
2124 (name "ruby-xml-simple")
2125 (version "1.1.5")
2126 (source (origin
2127 (method url-fetch)
2128 (uri (rubygems-uri "xml-simple" version))
2129 (sha256
2130 (base32
2131 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2132 (build-system ruby-build-system)
2133 (arguments
2134 '(#:tests? #f)) ; no test suite
2135 (synopsis "Simple Ruby library for XML processing")
2136 (description "This library provides a simple API for XML processing in
2137Ruby.")
2138 (home-page "https://github.com/maik/xml-simple")
2139 (license license:ruby)))
2140
2cb3ab48
RW
2141(define-public ruby-thor
2142 (package
2143 (name "ruby-thor")
bb719d6a 2144 (version "1.0.1")
2cb3ab48 2145 (source (origin
bb719d6a
MB
2146 ;; Pull from git because the gem has no tests.
2147 (method git-fetch)
2148 (uri (git-reference
2149 (url "https://github.com/erikhuda/thor")
2150 (commit (string-append "v" version))))
2151 (file-name (git-file-name name version))
2cb3ab48
RW
2152 (sha256
2153 (base32
bb719d6a 2154 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2cb3ab48
RW
2155 (build-system ruby-build-system)
2156 (arguments
bb719d6a
MB
2157 '(#:phases (modify-phases %standard-phases
2158 (add-after 'unpack 'fix-readline-tests
2159 (lambda _
2160 ;; Ensure Readline is initialized before running the
2161 ;; test to avoid a type clash with the mock ::Readline.
2162 ;; See <https://github.com/erikhuda/thor/pull/717>.
2163 (substitute* "spec/line_editor/readline_spec.rb"
2164 (("unless defined\\? ::Readline" all)
2165 (string-append "Thor::LineEditor::Readline.available?\n"
2166 all)))
2167 #t))
2168 (add-after 'unpack 'remove-coveralls-dependency
2169 (lambda _
2170 ;; Do not hook the test suite into the online
2171 ;; coveralls service.
2172 (substitute* "Gemfile"
2173 ((".*coveralls.*") ""))
2174 (substitute* "spec/helper.rb"
2175 (("require \"coveralls\"") "")
2176 (("Coveralls::SimpleCov::Formatter") "")
2177 ;; Also drop the WebMock dependency which is only
2178 ;; present to allow a coveralls.io connection, and
2179 ;; would otherwise introduce a circular dependency.
2180 (("require \"webmock/rspec\"") "")
2181 (("WebMock\\.disable_net_connect.*") ""))
2182 #t))
2183 (add-after 'unpack 'disable-network-tests
2184 (lambda _
2185 ;; These tests attempt to look up example.com.
2186 (substitute* "spec/actions/file_manipulation_spec.rb"
2187 (("it \"accepts (https?) remote sources" _ proto)
2188 (string-append "xit \"accepts " proto " remote sources")))
2189 #t))
2190 (add-after 'unpack 'disable-quality-tests
2191 (lambda _
2192 ;; These tests attempt to check the git repository for
2193 ;; tabs vs spaces, double vs single quotes, etc, and
2194 ;; depend on the git checkout.
2195 (delete-file "spec/quality_spec.rb")
2196 #t))
2197 (add-before 'check 'make-files-writable
2198 (lambda _
2199 ;; The tests needs rw access to the test suite.
2200 (for-each make-file-writable (find-files "spec"))
2201 #t))
2202 (replace 'check
2203 (lambda _
2204 (invoke "rspec" "spec"))))))
2cb3ab48 2205 (native-inputs
bb719d6a
MB
2206 `(("ruby-rspec" ,ruby-rspec)
2207 ("ruby-simplecov" ,ruby-simplecov)))
2cb3ab48
RW
2208 (synopsis "Ruby toolkit for building command-line interfaces")
2209 (description "Thor is a toolkit for building powerful command-line
2210interfaces.")
2211 (home-page "http://whatisthor.com/")
2212 (license license:expat)))
2213
ec79018e
RW
2214(define-public ruby-lumberjack
2215 (package
2216 (name "ruby-lumberjack")
41700efa 2217 (version "1.0.13")
ec79018e
RW
2218 (source (origin
2219 (method url-fetch)
2220 (uri (rubygems-uri "lumberjack" version))
2221 (sha256
2222 (base32
41700efa 2223 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
ec79018e
RW
2224 (build-system ruby-build-system)
2225 (native-inputs
8be62d3f
BW
2226 `(("ruby-rspec" ,ruby-rspec)
2227 ("ruby-timecop" ,ruby-timecop)))
ec79018e
RW
2228 (synopsis "Logging utility library for Ruby")
2229 (description "Lumberjack is a simple logging utility that can be a drop in
2230replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2231for automatically rolling log files even with multiple processes writing the
2232same log file.")
7bf837fd 2233 (home-page "https://github.com/bdurand/lumberjack")
ec79018e
RW
2234 (license license:expat)))
2235
2a9ce5cb
CB
2236(define-public ruby-rbnacl
2237 (package
2238 (name "ruby-rbnacl")
2239 (version "6.0.1")
2240 (source
2241 (origin
2242 (method url-fetch)
2243 (uri (rubygems-uri "rbnacl" version))
2244 (sha256
2245 (base32
2246 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2247 (build-system ruby-build-system)
2248 (arguments
2249 `(#:phases
2250 (modify-phases %standard-phases
2251 (add-after 'unpack 'remove-unnecessary-dependencies
2252 (lambda _
2253 ;; Coveralls relates to a network service, and Rubocop to code
2254 ;; linting and both are unnecessary to run the tests
2255 (substitute* "Gemfile"
2256 ((".*rubocop.*") "\n")
2257 ((".*guard-rspec.*") "\n")
2258 ((".*coveralls.*") "\n"))
2259 (substitute* "spec/spec_helper.rb"
2260 (("require \"coveralls\"") "")
2261 (("Coveralls.wear!") ""))
2262 #t))
2263 (add-after 'unpack 'use-libsodium-from-store
2264 (lambda* (#:key inputs #:allow-other-keys)
2265 (substitute* '("lib/rbnacl/init.rb"
2266 "lib/rbnacl/sodium.rb")
2267 (("ffi_lib \\[.+\\]")
2268 (string-append "ffi_lib [\""
2269 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2270 "\"]")))
2271 #t))
2272 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2273 (replace 'check
2274 (lambda* (#:key tests? #:allow-other-keys)
2275 (when tests?
2276 (invoke "rspec"))
2277 #t)))))
2278 (propagated-inputs
2279 `(("ruby-ffi" ,ruby-ffi)))
2280 (inputs
2281 `(("libsodium" ,libsodium)))
2282 (native-inputs
2283 `(("bundler" ,bundler)
2284 ("ruby-rspec" ,ruby-rspec)))
2285 (synopsis "Ruby FFI binding to libsodium")
2286 (description
2287 "This package provides Ruby FFI bindings to the Networking and
2288Cryptography (NaCl) library, also known as libsodium. This provides a
2289high-level toolkit for building cryptographic systems and protocols.")
2290 (home-page "https://github.com/crypto-rb/rbnacl")
2291 (license license:expat)))
2292
70b4cf38
RW
2293(define-public ruby-nenv
2294 (package
2295 (name "ruby-nenv")
12313cd0 2296 (version "0.3.0")
70b4cf38
RW
2297 (source (origin
2298 (method url-fetch)
2299 (uri (rubygems-uri "nenv" version))
2300 (sha256
2301 (base32
12313cd0 2302 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
70b4cf38
RW
2303 (build-system ruby-build-system)
2304 (arguments
2305 `(#:tests? #f)) ; no tests included
2306 (native-inputs
2307 `(("ruby-rspec" ,ruby-rspec)
2308 ("bundler" ,bundler)))
2309 (synopsis "Ruby interface for modifying the environment")
2310 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2311and inspect the environment.")
2312 (home-page "https://github.com/e2/nenv")
2313 (license license:expat)))
2314
af59d4b4
MB
2315(define-public ruby-ptools
2316 (package
2317 (name "ruby-ptools")
2318 (version "1.3.5")
2319 (source (origin
2320 (method url-fetch)
2321 (uri (rubygems-uri "ptools" version))
2322 (sha256
2323 (base32
2324 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2325 (build-system ruby-build-system)
2326 (arguments
2327 '(#:phases (modify-phases %standard-phases
2328 (add-after 'unpack 'patch-/bin/ls
2329 (lambda _
2330 (substitute* "test/test_binary.rb"
2331 (("/bin/ls")
2332 (which "ls")))
2333 #t))
2334 (add-before 'install 'create-gem
2335 (lambda _
2336 ;; Do not attempt to sign the gem.
2337 (substitute* "Rakefile"
2338 (("spec\\.signing_key = .*")
2339 ""))
2340 (invoke "rake" "gem:create"))))))
2341 (synopsis "Extra methods for Ruby's @code{File} class")
2342 (description
2343 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2344class with many additional methods modelled after common POSIX tools, such as
2345@code{File.which} for finding executables, @code{File.tail} to print the last
2346lines of a file, @code{File.wc} to count words, and so on.")
2347 (home-page "https://github.com/djberg96/ptools")
2348 (license license:artistic2.0)))
2349
8d9e9f28
RW
2350(define-public ruby-permutation
2351 (package
2352 (name "ruby-permutation")
2353 (version "0.1.8")
2354 (source (origin
2355 (method url-fetch)
2356 (uri (rubygems-uri "permutation" version))
2357 (sha256
2358 (base32
2359 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2360 (build-system ruby-build-system)
2361 (arguments
2362 `(#:phases
2363 (modify-phases %standard-phases
2364 (add-after 'unpack 'fix-rakefile
2365 (lambda _
2366 (substitute* "Rakefile"
2367 (("require 'rake/gempackagetask'")
2368 "require 'rubygems/package_task'")
2369 (("include Config") ""))
2370 #t))
2371 (replace 'check
2372 (lambda _
9923d5a4 2373 (invoke "ruby" "-Ilib" "test/test.rb"))))))
8d9e9f28
RW
2374 (synopsis "Library to perform operations with sequence permutations")
2375 (description "This package provides a Ruby library to perform different
2376operations with permutations of sequences, such as strings and arrays.")
2f3800e5 2377 (home-page "https://flori.github.io/permutation")
8d9e9f28
RW
2378 (license license:gpl2))) ; GPL 2 only
2379
c5d14d42
RW
2380(define-public ruby-shellany
2381 (package
2382 (name "ruby-shellany")
2383 (version "0.0.1")
2384 (source (origin
2385 (method url-fetch)
2386 (uri (rubygems-uri "shellany" version))
2387 (sha256
2388 (base32
2389 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2390 (build-system ruby-build-system)
2391 (arguments
2392 `(#:test-target "default"
2393 #:phases
2394 (modify-phases %standard-phases
2395 (add-after 'unpack 'fix-version-test
2396 (lambda _
2397 (substitute* "spec/shellany_spec.rb"
2398 (("^RSpec") "require \"shellany\"\nRSpec"))
2399 #t)))))
2400 (native-inputs
2401 `(("ruby-rspec" ,ruby-rspec)
2402 ("ruby-nenv" ,ruby-nenv)
2403 ("bundler" ,bundler)))
2404 (synopsis "Capture command output")
2405 (description "Shellany is a Ruby library providing functions to capture
2406the output produced by running shell commands.")
2407 (home-page "https://rubygems.org/gems/shellany")
2408 (license license:expat)))
2409
d152162f
RW
2410(define-public ruby-notiffany
2411 (package
2412 (name "ruby-notiffany")
8c1e4a4f 2413 (version "0.1.3")
d152162f
RW
2414 (source (origin
2415 (method url-fetch)
2416 (uri (rubygems-uri "notiffany" version))
2417 (sha256
2418 (base32
8c1e4a4f 2419 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
d152162f
RW
2420 (build-system ruby-build-system)
2421 ;; Tests are not included in the gem.
2422 (arguments `(#:tests? #f))
2423 (propagated-inputs
2424 `(("ruby-shellany" ,ruby-shellany)
2425 ("ruby-nenv" ,ruby-nenv)))
2426 (native-inputs
2427 `(("bundler" ,bundler)))
01eb17de
VC
2428 (synopsis "Wrapper library for notification libraries")
2429 (description "Notiffany is a Ruby wrapper library for notification
d152162f
RW
2430libraries such as Libnotify.")
2431 (home-page "https://github.com/guard/notiffany")
2432 (license license:expat)))
2433
96bf7521
MB
2434(define-public ruby-forking-test-runner
2435 (package
2436 (name "ruby-forking-test-runner")
2437 (version "1.6.0")
2438 (home-page "https://github.com/grosser/forking_test_runner")
2439 (source (origin
2440 (method git-fetch)
2441 (uri (git-reference (url home-page)
2442 (commit (string-append "v" version))))
2443 (file-name (git-file-name name version))
2444 (sha256
2445 (base32
2446 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2447 (build-system ruby-build-system)
2448 (arguments
2449 '(#:test-target "spec"
2450 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2451 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2452 #:tests? #f
2453 #:phases (modify-phases %standard-phases
2454 (replace 'replace-git-ls-files
2455 (lambda _
2456 (substitute* "forking_test_runner.gemspec"
2457 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2458 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2459 #t))
2460 (add-before 'check 'remove-version-constraints
2461 (lambda _
2462 ;; Ignore hard coded version constraints for the tests.
2463 (delete-file "Gemfile.lock")
2464 #t))
2465 (add-before 'check 'set-HOME
2466 (lambda _
2467 ;; Many tests invoke Bundler, and fails when Bundler
2468 ;; warns that /homeless-shelter does not exist.
2469 (setenv "HOME" "/tmp")
2470 #t)))))
2471 (native-inputs
2472 `(("ruby-activerecord" ,ruby-activerecord)
2473 ("ruby-bump" ,ruby-bump)
2474 ("ruby-rspec" ,ruby-rspec)
2475 ("ruby-sqlite3" ,ruby-sqlite3)
2476 ("ruby-wwtd" ,ruby-wwtd)))
2477 (propagated-inputs
2478 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2479 (synopsis "Run every test in a fork")
2480 (description
2481 "This package is a wrapper around @code{parallel_tests} that runs every
2482test in a fork to avoid pollution and get clean output per test.")
2483 (license license:expat)))
2484
8528365b
RW
2485(define-public ruby-formatador
2486 (package
2487 (name "ruby-formatador")
2488 (version "0.2.5")
2489 (source (origin
2490 (method url-fetch)
2491 (uri (rubygems-uri "formatador" version))
2492 (sha256
2493 (base32
2494 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2495 (build-system ruby-build-system)
2496 ;; Circular dependency: Tests require ruby-shindo, which requires
2497 ;; ruby-formatador at runtime.
2498 (arguments `(#:tests? #f))
2499 (synopsis "Ruby library to format text on stdout")
2500 (description "Formatador is a Ruby library to format text printed to the
2501standard output stream.")
7bf837fd 2502 (home-page "https://github.com/geemus/formatador")
8528365b
RW
2503 (license license:expat)))
2504
5437c741
CB
2505(define-public ruby-fuubar
2506 (package
2507 (name "ruby-fuubar")
2508 (version "2.3.2")
2509 (source
2510 (origin
2511 ;; Fetch from the git repository, as the gem package doesn't include
2512 ;; the tests.
2513 (method git-fetch)
2514 (uri (git-reference
b0e7b699 2515 (url "https://github.com/thekompanee/fuubar")
5437c741
CB
2516 (commit (string-append "releases/v" version))))
2517 (file-name (git-file-name name version))
2518 (sha256
2519 (base32
2520 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2521 (build-system ruby-build-system)
2522 (arguments
2523 '(;; TODO: Some tests fail, unsure why.
2524 ;; 21 examples, 7 failures
2525 #:tests? #f
2526 #:phases
2527 (modify-phases %standard-phases
2528 (add-before 'build 'delete-certificate
2529 (lambda _
2530 ;; Remove 's.cert_chain' as we do not build with a private key
2531 (substitute* "fuubar.gemspec"
2532 ((".*cert_chain.*") "")
2533 ((".*signing_key.*") ""))
2534 #t))
2535 (replace 'check
2536 (lambda* (#:key tests? #:allow-other-keys)
2537 (when tests?
2538 (invoke "rspec"))
2539 #t)))))
2540 (native-inputs
2541 `(("bundler" ,bundler)))
2542 (propagated-inputs
2543 `(("ruby-rspec-core" ,ruby-rspec-core)
2544 ("ruby-progressbar" ,ruby-progressbar)))
2545 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2546 (description
2547 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2548string of letters and dots as feedback. It also stops on the first test
2549failure.")
2550 (home-page "https://github.com/thekompanee/fuubar")
2551 (license license:expat)))
2552
8ea991e3
CB
2553(define-public ruby-haml
2554 (package
2555 (name "ruby-haml")
2556 (version "5.0.4")
2557 (source
2558 (origin
2559 (method url-fetch)
2560 (uri (rubygems-uri "haml" version))
2561 (sha256
2562 (base32
2563 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2564 (build-system ruby-build-system)
2565 (arguments
2566 '(#:tests? #f)) ; No included tests
2567 (propagated-inputs
2568 `(("ruby-tilt" ,ruby-tilt)
2569 ("ruby-temple" ,ruby-temple)))
2570 (synopsis "Haml is a Ruby library to generate HTML documents")
2571 (description
2572 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2573HTML or XML that is designed to express the structure of documents using
2574indentation rather than closing tags. It was originally envisioned as a
2575plugin for Ruby on Rails, but it can function as a stand-alone templating
2576engine.")
2577 (home-page "http://haml.info/")
2578 (license license:expat)))
2579
353b7eb8
CB
2580(define-public ruby-hamster
2581 (package
2582 (name "ruby-hamster")
2583 (version "3.0.0")
2584 (source
2585 (origin
2586 (method url-fetch)
2587 (uri (rubygems-uri "hamster" version))
2588 (sha256
2589 (base32
2590 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2591 (build-system ruby-build-system)
2592 (arguments
2593 '(#:phases
2594 (modify-phases %standard-phases
2595 (add-after 'unpack 'remove-unnecessary-dependencies
2596 (lambda _
2597 ;; pry is a debugging tool, and is unnecessary when running the
2598 ;; tests
2599 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2600 (("require 'pry'") ""))
2601 (substitute* "spec/spec_helper.rb"
2602 (("require \"pry\"") "")
2603 ;; CodeClimate is an online service, and is unnecessary for
2604 ;; running the tests
2605 (("require \"codeclimate-test-reporter\"") "")
2606 (("CodeClimate.*\n") ""))
2607 #t))
2608 ;; No Rakefile is included, so run rspec directly.
2609 (replace 'check
2610 (lambda* (#:key tests? #:allow-other-keys)
2611 (when tests?
2612 (invoke "rspec"))
2613 #t)))))
2614 (propagated-inputs
2615 `(("ruby-concurrent" ,ruby-concurrent)))
2616 (native-inputs
2617 `(("ruby-rspec" ,ruby-rspec)))
2618 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2619 (description
2620 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2621@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2622immutable queue or stack).")
2623 (home-page "https://github.com/hamstergem/hamster")
2624 (license license:expat)))
2625
21781436
CB
2626(define-public ruby-hashdiff
2627 (package
2628 (name "ruby-hashdiff")
2629 (version "0.3.8")
2630 (source
2631 (origin
2632 (method url-fetch)
2633 (uri (rubygems-uri "hashdiff" version))
2634 (sha256
2635 (base32
2636 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2637 (build-system ruby-build-system)
2638 (arguments
2639 '(#:phases
2640 (modify-phases %standard-phases
2641 ;; Run tests directly via rspec to avoid Rake issue:
2642 ;; NoMethodError: undefined method `last_comment'
2643 (replace 'check
2644 (lambda* (#:key tests? #:allow-other-keys)
2645 (when tests?
2646 (invoke "rspec"))
2647 #t)))))
2648 (native-inputs
2649 `(("bundler" ,bundler)
2650 ("ruby-rspec" ,ruby-rspec-2)))
2651 (synopsis "HashDiff computes the smallest difference between two hashes")
2652 (description
2653 "HashDiff is a Ruby library to compute the smallest difference between
2654two hashes.")
2655 (home-page "https://github.com/liufengyun/hashdiff")
2656 (license license:expat)))
2657
3cc8e029
MB
2658(define-public ruby-hydra
2659 ;; No releases yet.
2660 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2661 (revision "0"))
2662 (package
2663 (name "ruby-hydra")
2664 (version (git-version "0.0" revision commit))
2665 (home-page "https://github.com/hyphenation/hydra")
2666 (source (origin
2667 (method git-fetch)
2668 (uri (git-reference (url home-page) (commit commit)))
2669 (file-name (git-file-name name version))
2670 (sha256
2671 (base32
2672 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
2673 (build-system ruby-build-system)
2674 (arguments
2675 '(#:phases (modify-phases %standard-phases
2676 (add-after 'unpack 'make-files-writable
2677 (lambda _
2678 (for-each make-file-writable (find-files "."))
2679 #t))
2680 (replace 'check
2681 (lambda _
2682 (invoke "rspec"))))))
2683 (native-inputs
2684 `(("ruby-rspec" ,ruby-rspec)))
2685 (propagated-inputs
2686 `(("ruby-byebug" ,ruby-byebug)))
2687 (synopsis "Ruby hyphenation patterns")
2688 (description
2689 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
2690 (license license:expat))))
2691
7ac4610f
RW
2692(define-public ruby-shindo
2693 (package
2694 (name "ruby-shindo")
2695 (version "0.3.8")
2696 (source (origin
2697 (method url-fetch)
2698 (uri (rubygems-uri "shindo" version))
2699 (sha256
2700 (base32
2701 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
2702 (build-system ruby-build-system)
2703 (arguments
2704 `(#:test-target "shindo_tests"
2705 #:phases
2706 (modify-phases %standard-phases
2707 (add-after 'unpack 'fix-tests
0b060e34
CB
2708 (lambda _
2709 (substitute* "tests/tests_helper.rb"
2710 (("-rubygems") ""))
2711 (substitute* "Rakefile"
2712 (("system \"shindo") "system \"./bin/shindo")
2713 ;; This test doesn't work, so we disable it.
2714 (("fail \"The build_error test should fail") "#")
2715 ((" -rubygems") ""))
2716 #t)))))
7ac4610f
RW
2717 (propagated-inputs
2718 `(("ruby-formatador" ,ruby-formatador)))
2719 (synopsis "Simple depth first Ruby testing")
2720 (description "Shindo is a simple depth first testing library for Ruby.")
2721 (home-page "https://github.com/geemus/shindo")
2722 (license license:expat)))
2723
f13636f2
RW
2724(define-public ruby-rubygems-tasks
2725 (package
2726 (name "ruby-rubygems-tasks")
f0f5f2d3 2727 (version "0.2.5")
f13636f2
RW
2728 (source (origin
2729 (method url-fetch)
2730 (uri (rubygems-uri "rubygems-tasks" version))
2731 (sha256
2732 (base32
f0f5f2d3 2733 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
f13636f2
RW
2734 (build-system ruby-build-system)
2735 ;; Tests need Internet access.
2736 (arguments `(#:tests? #f))
2737 (native-inputs
2738 `(("ruby-rspec" ,ruby-rspec)
2739 ("ruby-yard" ,ruby-yard)))
2740 (synopsis "Rake tasks for managing and releasing Ruby Gems")
2741 (description "Rubygems-task provides Rake tasks for managing and releasing
2742Ruby Gems.")
2743 (home-page "https://github.com/postmodern/rubygems-tasks")
2744 (license license:expat)))
2745
cb6bc5df
CB
2746(define-public ruby-rubyzip
2747 (package
2748 (name "ruby-rubyzip")
2749 (version "1.2.1")
2750 (source
2751 (origin
2752 (method url-fetch)
2753 (uri (rubygems-uri "rubyzip" version))
2754 (sha256
2755 (base32
2756 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
2757 (build-system ruby-build-system)
2758 (arguments
2759 '(#:phases
2760 (modify-phases %standard-phases
2761 (add-before 'check 'patch-tests
2762 (lambda* (#:key inputs #:allow-other-keys)
2763 (substitute* "test/gentestfiles.rb"
2764 (("/usr/bin/zip")
2765 (string-append
2766 (assoc-ref inputs "zip") "/bin/zip")))
2767 (substitute* "test/input_stream_test.rb"
2768 (("/usr/bin/env ruby") (which "ruby")))
2769 #t)))))
2770 (native-inputs
2771 `(("bundler" ,bundler)
2772 ("ruby-simplecov" ,ruby-simplecov)
2773 ("zip" ,zip)
2774 ("unzip" ,unzip)))
2775 (synopsis "Ruby module is for reading and writing zip files")
2776 (description
2777 "The rubyzip module provides ways to read from and create zip files.")
702a1012 2778 (home-page "https://github.com/rubyzip/rubyzip")
cb6bc5df
CB
2779 (license license:bsd-2)))
2780
58b59742
RW
2781(define-public ruby-simplecov-html
2782 (package
2783 (name "ruby-simplecov-html")
53fd476f 2784 (version "0.10.2")
58b59742
RW
2785 (source (origin
2786 (method url-fetch)
2787 (uri (rubygems-uri "simplecov-html" version))
2788 (sha256
2789 (base32
53fd476f 2790 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
58b59742 2791 (build-system ruby-build-system)
8b749cf3 2792 (arguments `(#:tests? #f)) ; there are no tests
58b59742
RW
2793 (native-inputs
2794 `(("bundler" ,bundler)))
2795 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
2796 (description "This package provides the default HTML formatter for
2797the SimpleCov code coverage tool for Ruby version 1.9 and above.")
2798 (home-page "https://github.com/colszowka/simplecov-html")
2799 (license license:expat)))
2800
a84fa2ad
RW
2801(define-public ruby-simplecov
2802 (package
2803 (name "ruby-simplecov")
d432682b 2804 (version "0.17.1")
a84fa2ad
RW
2805 (source (origin
2806 (method url-fetch)
2807 (uri (rubygems-uri "simplecov" version))
2808 (sha256
2809 (base32
d432682b 2810 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
a84fa2ad
RW
2811 (build-system ruby-build-system)
2812 ;; Simplecov depends on rubocop for code style checking at build time.
2813 ;; Rubocop needs simplecov at build time.
2814 (arguments `(#:tests? #f))
2815 (propagated-inputs
2816 `(("ruby-json" ,ruby-json)
2817 ("ruby-docile" ,ruby-docile)
2818 ("ruby-simplecov-html" ,ruby-simplecov-html)))
2819 (native-inputs
2820 `(("bundler" ,bundler)))
2821 (synopsis "Code coverage framework for Ruby")
2822 (description "SimpleCov is a code coverage framework for Ruby with a
2823powerful configuration library and automatic merging of coverage across test
2824suites.")
7bf837fd 2825 (home-page "https://github.com/colszowka/simplecov")
a84fa2ad
RW
2826 (license license:expat)))
2827
98b87b82
DT
2828(define-public ruby-useragent
2829 (package
2830 (name "ruby-useragent")
959d908d 2831 (version "0.16.10")
98b87b82
DT
2832 (source (origin
2833 (method url-fetch)
e83c6d00 2834 (uri (rubygems-uri "useragent" version))
98b87b82
DT
2835 (sha256
2836 (base32
959d908d 2837 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
98b87b82
DT
2838 (build-system ruby-build-system)
2839 (arguments
e83c6d00 2840 '(#:tests? #f)) ; no test suite
98b87b82
DT
2841 (synopsis "HTTP user agent parser for Ruby")
2842 (description "UserAgent is a Ruby library that parses and compares HTTP
2843User Agents.")
2844 (home-page "https://github.com/gshutler/useragent")
2845 (license license:expat)))
96086cc5 2846
f7e9b2f3
CB
2847(define-public ruby-backports
2848 (package
2849 (name "ruby-backports")
2850 (version "3.11.4")
2851 (source
2852 (origin
2853 (method url-fetch)
2854 (uri (rubygems-uri "backports" version))
2855 (sha256
2856 (base32
2857 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
2858 (build-system ruby-build-system)
2859 (arguments
2860 '(;; TODO: This should be default, but there is one test failure
2861 #:test-target "all_spec"))
2862 (native-inputs
2863 `(("ruby-mspec" ,ruby-mspec)
2864 ("ruby-activesupport" ,ruby-activesupport)))
2865 (synopsis "Backports of the features in newer Ruby versions")
2866 (description
2867 "Backports enables more compatibility across Ruby versions by providing
2868backports of some features.")
2869 (home-page "https://github.com/marcandre/backports")
2870 (license license:expat)))
2871
96086cc5
DT
2872(define-public ruby-bacon
2873 (package
2874 (name "ruby-bacon")
e83c6d00 2875 (version "1.2.0")
96086cc5
DT
2876 (source (origin
2877 (method url-fetch)
e83c6d00 2878 (uri (rubygems-uri "bacon" version))
96086cc5
DT
2879 (sha256
2880 (base32
e83c6d00 2881 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
96086cc5 2882 (build-system ruby-build-system)
96086cc5
DT
2883 (synopsis "Small RSpec clone")
2884 (description "Bacon is a small RSpec clone providing all essential
2885features.")
2886 (home-page "https://github.com/chneukirchen/bacon")
2887 (license license:expat)))
de59d316 2888
a8d2bf3c
CB
2889(define-public ruby-bacon-bits
2890 (package
2891 (name "ruby-bacon-bits")
2892 (version "0.1.0")
2893 (source
2894 (origin
2895 (method url-fetch)
2896 (uri (rubygems-uri "bacon-bits" version))
2897 (sha256
2898 (base32
2899 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
2900 (build-system ruby-build-system)
2901 (arguments
2902 ;; No tests
2903 '(#:tests? #f))
2904 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
2905 (synopsis "Extensions to Bacon, for disabling tests, before and after
2906blocks and more")
2907 (description
2908 "This extends the bacon testing framework with useful extensions to
2909disable tests, have before and after blocks that run once and more.")
2910 (home-page "https://github.com/cldwalker/bacon-bits")
2911 (license license:expat)))
2912
65f65889
CB
2913(define-public ruby-bacon-colored-output
2914 (package
2915 (name "ruby-bacon-colored-output")
2916 (version "1.1.1")
2917 (source
2918 (origin
2919 (method url-fetch)
2920 (uri (rubygems-uri "bacon-colored_output" version))
2921 (sha256
2922 (base32
2923 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
2924 (build-system ruby-build-system)
2925 (arguments
2926 '(;; No included tests
2927 #:tests? #f))
2928 (propagated-inputs
2929 `(("ruby-bacon" ,ruby-bacon)))
2930 (synopsis "Colored output for Bacon test framework")
2931 (description
2932 "This package adds color through ANSI escape codes to Bacon test
2933output.")
2934 (home-page "https://github.com/whitequark/bacon-colored_output")
2935 (license license:expat)))
2936
e259bdf0
DT
2937(define-public ruby-connection-pool
2938 (package
2939 (name "ruby-connection-pool")
58021db4 2940 (version "2.2.2")
e259bdf0
DT
2941 (source (origin
2942 (method url-fetch)
e83c6d00 2943 (uri (rubygems-uri "connection_pool" version))
e259bdf0
DT
2944 (sha256
2945 (base32
58021db4 2946 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
e259bdf0
DT
2947 (build-system ruby-build-system)
2948 (native-inputs
2949 `(("bundler" ,bundler)))
2950 (synopsis "Generic connection pool for Ruby")
2951 (description "Connection_pool provides a generic connection pooling
2952interface for Ruby programs.")
2953 (home-page "https://github.com/mperham/connection_pool")
2954 (license license:expat)))
4c0aeb44 2955
4a98314d
MB
2956(define-public ruby-fast-gettext
2957 (package
2958 (name "ruby-fast-gettext")
c3beb7ce 2959 (version "2.0.3")
4a98314d
MB
2960 (home-page "https://github.com/grosser/fast_gettext")
2961 (source (origin
2962 (method git-fetch)
2963 (uri (git-reference (url home-page)
2964 (commit (string-append "v" version))))
2965 (file-name (git-file-name name version))
2966 (sha256
2967 (base32
c3beb7ce 2968 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
4a98314d
MB
2969 (build-system ruby-build-system)
2970 (arguments
2971 '(#:test-target "spec"
2972 #:phases (modify-phases %standard-phases
2973 (add-before 'check 'remove-version-constraints
2974 (lambda _
2975 (delete-file "Gemfile.lock")
2976 #t))
2977 (add-before 'check 'remove-activerecord-test
2978 (lambda _
2979 ;; FIXME: This test fails because ActiveRecord depends on
2980 ;; a different version of ruby-sqlite than the currently
2981 ;; available one.
2982 (delete-file
2983 "spec/fast_gettext/translation_repository/db_spec.rb")
2984 #t))
2985 (add-before 'check 'disable-i18n-test
2986 (lambda _
2987 ;; XXX: This test checks i18n intricasies with Rails 3 and
2988 ;; automatically disables itself for Rails 4.0, but does
2989 ;; not know about newer versions as it has not been updated
2990 ;; since 2014. Disable for later versions of Rails too.
2991 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
2992 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
2993 "ActiveRecord::VERSION::MINOR == 0"))
2994 "ActiveRecord::VERSION::MAJOR >= 4"))
2995 #t)))))
2996 (native-inputs
2997 `(;; For tests.
2998 ("ruby-activerecord" ,ruby-activerecord)
2999 ("ruby-activesupport" ,ruby-activesupport)
3000 ("ruby-bump" ,ruby-bump)
3001 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
3002 ("ruby-i18n" ,ruby-i18n)
3003 ("ruby-rubocop" ,ruby-rubocop)
3004 ("ruby-rspec" ,ruby-rspec)
3005 ("ruby-single-cov" ,ruby-single-cov)
3006 ("ruby-sqlite3" ,ruby-sqlite3)
3007 ("ruby-wwtd" ,ruby-wwtd)))
3008 (synopsis "Fast implementation of @code{GetText}")
3009 (description
3010 "This package provides an alternative implementation of the Ruby
3011@code{GetText} library that is approximately 12x faster yet thread safe.")
3012 ;; Some parts are covered by the Ruby license, see file headers.
3013 (license (list license:expat license:ruby))))
3014
4c0aeb44
DT
3015(define-public ruby-net-http-persistent
3016 (package
3017 (name "ruby-net-http-persistent")
185ea446 3018 (version "3.0.0")
4c0aeb44
DT
3019 (source (origin
3020 (method url-fetch)
e83c6d00 3021 (uri (rubygems-uri "net-http-persistent" version))
4c0aeb44
DT
3022 (sha256
3023 (base32
185ea446 3024 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
4c0aeb44 3025 (build-system ruby-build-system)
4c0aeb44
DT
3026 (native-inputs
3027 `(("ruby-connection-pool" ,ruby-connection-pool)
3028 ("ruby-hoe" ,ruby-hoe)))
3029 (synopsis "Persistent HTTP connection manager")
3030 (description "Net::HTTP::Persistent manages persistent HTTP connections
3031using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
3032 (home-page "https://github.com/drbrain/net-http-persistent")
3033 (license license:expat)))
afbbdf77 3034
f88bacaf
RW
3035(define-public ruby-power-assert
3036 (package
3037 (name "ruby-power-assert")
6754323b 3038 (version "1.1.5")
f88bacaf
RW
3039 (source (origin
3040 (method url-fetch)
3041 (uri (rubygems-uri "power_assert" version))
3042 (sha256
3043 (base32
6754323b 3044 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
f88bacaf 3045 (build-system ruby-build-system)
6754323b
CB
3046 (arguments
3047 '(#:tests? #f)) ; No included tests
f88bacaf
RW
3048 (native-inputs
3049 `(("bundler" ,bundler)))
3050 (synopsis "Assert library with descriptive assertion messages")
3051 (description "Power-assert is an assertion library providing descriptive
3052assertion messages for tests.")
3053 (home-page "https://github.com/k-tsj/power_assert")
3054 (license (list license:bsd-2 license:ruby))))
3055
e42e3bfa
CB
3056(define-public ruby-powerpack
3057 (package
3058 (name "ruby-powerpack")
3059 (version "0.1.2")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (rubygems-uri "powerpack" version))
3064 (sha256
3065 (base32
3066 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
3067 (build-system ruby-build-system)
3068 (arguments
3069 '(#:test-target "spec"))
3070 (native-inputs
3071 `(("bundler" ,bundler)
3072 ("ruby-rspec" ,ruby-rspec)
3073 ("ruby-yard" ,ruby-yard)))
3074 (synopsis "Useful extensions to core Ruby classes")
3075 (description
3076 "This package provides a few useful extensions to core Ruby classes,
3077including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3078@code{String}.")
3079 (home-page "https://github.com/bbatsov/powerpack")
3080 (license license:expat)))
3081
347eb21e
RW
3082(define-public ruby-locale
3083 (package
3084 (name "ruby-locale")
3085 (version "2.1.2")
3086 (source (origin
3087 (method url-fetch)
3088 (uri (rubygems-uri "locale" version))
3089 (sha256
3090 (base32
3091 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3092 (build-system ruby-build-system)
3093 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3094 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3095 ;; dependency cycle we disable tests.
3096 (arguments `(#:tests? #f))
3097 (native-inputs
3098 `(("bundler" ,bundler)
3099 ("ruby-yard" ,ruby-yard)))
3100 (synopsis "Ruby library providing basic localization APIs")
3101 (description
3102 "Ruby-Locale is the pure ruby library which provides basic APIs for
3103localization.")
3104 (home-page "https://github.com/ruby-gettext/locale")
3105 (license (list license:lgpl3+ license:ruby))))
3106
09e2b0af
CB
3107(define-public ruby-temple
3108 (package
3109 (name "ruby-temple")
b1c79cab 3110 (version "0.8.2")
09e2b0af
CB
3111 (source
3112 (origin
3113 (method url-fetch)
3114 (uri (rubygems-uri "temple" version))
3115 (sha256
3116 (base32
b1c79cab 3117 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
09e2b0af
CB
3118 (build-system ruby-build-system)
3119 (native-inputs
3120 `(("ruby-tilt" ,ruby-tilt)
3121 ("ruby-bacon" ,ruby-bacon)
3122 ("ruby-erubis" ,ruby-erubis)))
3123 (synopsis "Template compilation framework in Ruby")
3124 (description
3125 "Temple is an abstraction and framework for compiling templates to pure
3126Ruby.")
3127 (home-page "https://github.com/judofyr/temple")
3128 (license license:expat)))
3129
e2333ea3
RW
3130(define-public ruby-text
3131 (package
3132 (name "ruby-text")
3133 (version "1.3.1")
3134 (source (origin
3135 (method url-fetch)
3136 (uri (rubygems-uri "text" version))
3137 (sha256
3138 (base32
3139 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3140 (build-system ruby-build-system)
3141 (synopsis "Collection of text algorithms for Ruby")
3142 (description
3143 "This package provides a collection of text algorithms: Levenshtein,
3144Soundex, Metaphone, Double Metaphone, Porter Stemming.")
7bf837fd 3145 (home-page "https://github.com/threedaymonk/text")
e2333ea3
RW
3146 (license license:expat)))
3147
c1f52261
RW
3148(define-public ruby-gettext
3149 (package
3150 (name "ruby-gettext")
3151 (version "3.1.7")
3152 (source (origin
3153 (method url-fetch)
3154 (uri (rubygems-uri "gettext" version))
3155 (sha256
3156 (base32
3157 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3158 (build-system ruby-build-system)
3159 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3160 ;; which needs ruby-gettext. To break the dependency cycle we disable
3161 ;; tests.
3162 (arguments `(#:tests? #f))
3163 (propagated-inputs
3164 `(("ruby-locale" ,ruby-locale)
3165 ("ruby-text" ,ruby-text)))
3166 (native-inputs
3167 `(("bundler" ,bundler)
3168 ("ruby-yard" ,ruby-yard)))
3169 (synopsis "GNU gettext-like program for Ruby")
3170 (description
3171 "Gettext is a GNU gettext-like program for Ruby. The catalog
3172file (po-file) used is the same as that used by GNU gettext, allowing you to
3173use GNU gettext tools for maintenance.")
2f3800e5 3174 (home-page "https://ruby-gettext.github.com/")
c1f52261
RW
3175 (license (list license:lgpl3+ license:ruby))))
3176
cc5aeb8c
RW
3177(define-public ruby-packnga
3178 (package
3179 (name "ruby-packnga")
1d60c436 3180 (version "1.0.4")
cc5aeb8c
RW
3181 (source (origin
3182 (method url-fetch)
3183 (uri (rubygems-uri "packnga" version))
3184 (sha256
3185 (base32
1d60c436 3186 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
cc5aeb8c
RW
3187 (build-system ruby-build-system)
3188 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3189 ;; To break the dependency cycle we disable tests.
3190 (arguments `(#:tests? #f))
3191 (propagated-inputs
3192 `(("ruby-gettext" ,ruby-gettext)
3193 ("ruby-yard" ,ruby-yard)))
3194 (native-inputs
3195 `(("bundler" ,bundler)))
3196 (synopsis "Utility library to package internationalized libraries")
3197 (description
3198 "Packnga is a library to translate to many languages using YARD.")
3199 (home-page "http://ranguba.org/packnga/")
3200 (license license:lgpl2.0+)))
3201
93dc8684
CB
3202(define-public ruby-test-construct
3203 (package
3204 (name "ruby-test-construct")
3205 (version "2.0.1")
3206 (source
3207 (origin
3208 (method url-fetch)
3209 (uri (rubygems-uri "test_construct" version))
3210 (sha256
3211 (base32
3212 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3213 (build-system ruby-build-system)
3214 (native-inputs
3215 `(("bundler" ,bundler)
3216 ("ruby-mocha" ,ruby-mocha)
3217 ("ruby-rspec" ,ruby-rspec)))
3218 (synopsis "Creates temporary files and directories for testing")
3219 (description
3220 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3221temporary files and directories during tests.")
3222 (home-page "https://github.com/bhb/test_construct")
3223 (license license:expat)))
3224
3383f5bd
RW
3225(define-public ruby-test-unit
3226 (package
3227 (name "ruby-test-unit")
d74d96e4 3228 (version "3.2.5")
3383f5bd
RW
3229 (source (origin
3230 (method url-fetch)
3231 (uri (rubygems-uri "test-unit" version))
3232 (sha256
3233 (base32
d74d96e4 3234 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3383f5bd
RW
3235 (build-system ruby-build-system)
3236 (propagated-inputs
3237 `(("ruby-power-assert" ,ruby-power-assert)))
3238 (native-inputs
3239 `(("bundler" ,bundler)
3240 ("ruby-packnga" ,ruby-packnga)
3241 ("ruby-yard" ,ruby-yard)))
3242 (synopsis "Unit testing framework for Ruby")
3243 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3244on xUnit principles. These were originally designed by Kent Beck, creator of
3245extreme programming software development methodology, for Smalltalk's SUnit.
3246It allows writing tests, checking results and automated testing in Ruby.")
2f3800e5 3247 (home-page "https://test-unit.github.io/")
3383f5bd
RW
3248 (license (list license:psfl license:ruby))))
3249
76b732fb
CB
3250(define-public ruby-markaby
3251 (package
3252 (name "ruby-markaby")
3253 (version "0.9.0")
3254 (source
3255 (origin
3256 (method url-fetch)
3257 (uri (rubygems-uri "markaby" version))
3258 (sha256
3259 (base32
3260 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3261 (build-system ruby-build-system)
3262 (arguments
3263 '(#:phases
3264 (modify-phases %standard-phases
3265 ;; Run rspec manually without using the Rakefile, as the versions of
3266 ;; Rake and RSpec 2 are incompatible:
3267 ;;
3268 ;; NoMethodError: undefined method `last_comment'
3269 (replace 'check
3270 (lambda* (#:key tests? #:allow-other-keys)
3271 (when tests?
3272 (invoke "rspec"))
3273 #t)))))
3274 (propagated-inputs
3275 `(("ruby-builder" ,ruby-builder)))
3276 (native-inputs
3277 `(("bundler" ,bundler)
3278 ("ruby-rspec" ,ruby-rspec-2)))
3279 (synopsis "Write HTML pages in pure Ruby")
3280 (description
3281 "Markaby allows writing HTML packages in pure Ruby. This is similar to
e54af322 3282the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
76b732fb 3283mixture of HTML and additional ERB syntax.")
41181b76 3284 (home-page "https://markaby.github.io/")
76b732fb
CB
3285 (license license:expat)))
3286
b9511aa9
CB
3287(define-public ruby-maruku
3288 (package
3289 (name "ruby-maruku")
3290 (version "0.7.3")
3291 (source
3292 (origin
3293 (method url-fetch)
3294 (uri (rubygems-uri "maruku" version))
3295 (sha256
3296 (base32
3297 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3298 (build-system ruby-build-system)
3299 (arguments
3300 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3301 #:tests? #f
3302 #:phases
3303 (modify-phases %standard-phases
3304 (replace 'check
3305 (lambda* (#:key tests? #:allow-other-keys)
3306 (when tests?
3307 (invoke "rspec"))
3308 #t)))))
3309 (native-inputs
3310 `(("ruby-rspec" ,ruby-rspec)
3311 ("ruby-simplecov" ,ruby-simplecov)
3312 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3313 (synopsis "Markdown interpreter in Ruby")
3314 (description
3315 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3316HTML, and PDF through LaTeX.")
3317 (home-page "https://github.com/bhollis/maruku")
3318 (license license:expat)))
3319
25d6d49b
RW
3320(define-public ruby-metaclass
3321 (package
3322 (name "ruby-metaclass")
3323 (version "0.0.4")
3324 (source (origin
3325 (method url-fetch)
3326 (uri (rubygems-uri "metaclass" version))
3327 (sha256
3328 (base32
3329 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3330 (build-system ruby-build-system)
3331 (arguments
3332 `(#:phases
3333 (modify-phases %standard-phases
3334 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 3335 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3336 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3337 (substitute* "Rakefile"
3338 (("t\\.libs << \"test\"" line)
3339 (string-append line "; t.libs << \""
3cb3fa67 3340 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3341 "/gems/test-unit-"
3342 ,(package-version ruby-test-unit)
3343 "/lib\""))))
3344 #t)))))
25d6d49b
RW
3345 (native-inputs
3346 `(("bundler" ,bundler)
3347 ("ruby-test-unit" ,ruby-test-unit)))
3348 (synopsis "Ruby library adding metaclass method to all objects")
3349 (description
3350 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3351objects.")
7bf837fd 3352 (home-page "https://github.com/floehopper/metaclass")
25d6d49b
RW
3353 (license license:expat)))
3354
fae1c866
MB
3355(define-public ruby-mkmf-lite
3356 (package
3357 (name "ruby-mkmf-lite")
3358 (version "0.3.2")
3359 (source (origin
3360 (method url-fetch)
3361 (uri (rubygems-uri "mkmf-lite" version))
3362 (sha256
3363 (base32
3364 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3365 (build-system ruby-build-system)
3366 (propagated-inputs
3367 `(("ruby-ptools" ,ruby-ptools)))
3368 (synopsis "Lightweight alternative to @code{mkmf}")
3369 (description
3370 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3371for use as a library. It does not create packages, builds, or log files of
3372any kind. Instead, it provides mixin methods that you can use in FFI or tests
3373to check for the presence of header files, constants, and so on.")
3374 (home-page "https://github.com/djberg96/mkmf-lite")
3375 (license license:asl2.0)))
3376
1d1d20b0
CB
3377(define-public ruby-mspec
3378 (package
3379 (name "ruby-mspec")
3380 (version "1.9.1")
3381 (source
3382 (origin
3383 (method url-fetch)
3384 (uri (rubygems-uri "mspec" version))
3385 (sha256
3386 (base32
3387 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3388 (build-system ruby-build-system)
3389 (arguments
3390 '(;; TODO: 3 test failures
3391 ;; ./spec/mocks/mock_spec.rb:82
3392 ;; ./spec/utils/name_map_spec.rb:151
3393 ;; ./spec/utils/name_map_spec.rb:155
3394 #:tests? #f
3395 #:phases
3396 (modify-phases %standard-phases
3397 (add-after 'extract-gemspec 'change-dependency-constraints
3398 (lambda _
3399 (substitute* "mspec.gemspec"
3400 (("rake.*") "rake>)\n")
3401 (("rspec.*") "rspec>)\n"))
3402 #t))
3403 (replace 'check
3404 (lambda* (#:key tests? #:allow-other-keys)
3405 (when tests?
3406 (invoke "rspec" "spec"))
3407 #t)))))
3408 (native-inputs
3409 `(("bundler" ,bundler)
3410 ("ruby-rake" ,ruby-rake)
3411 ("ruby-rspec" ,ruby-rspec)))
3412 (synopsis "MSpec is a specialized framework for RubySpec")
3413 (description
3414 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3415for basic features. MSpec contains additional features that assist in writing
3416specs for Ruby implementations in ruby/spec.")
3417 (home-page "http://rubyspec.org")
3418 (license license:expat)))
3419
b8aecc31
CB
3420(define-public ruby-mysql2
3421 (package
3422 (name "ruby-mysql2")
3423 (version "0.5.2")
3424 (source
3425 (origin
3426 (method git-fetch)
3427 (uri (git-reference
b0e7b699 3428 (url "https://github.com/brianmario/mysql2")
b8aecc31
CB
3429 (commit version)))
3430 (file-name (git-file-name name version))
3431 (sha256
3432 (base32
3433 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3434 (build-system ruby-build-system)
3435 (arguments
3436 '(;; TODO: Tests require a running MySQL/MariaDB service
3437 #:tests? #f
3438 #:phases
3439 (modify-phases %standard-phases
3440 (replace 'replace-git-ls-files
3441 (lambda _
3442 (substitute* "mysql2.gemspec"
3443 (("git ls-files .*`") "find . -type f |sort`"))
3444 #t))
3445 (add-before 'install 'set-MAKEFLAGS
3446 (lambda* (#:key outputs #:allow-other-keys)
3447 (setenv "MAKEFLAGS"
3448 (string-append
3449 "V=1 "
3450 "prefix=" (assoc-ref outputs "out")))
3451 #t))
3452 ;; Move the 'check phase to after 'install, as then you can test
3453 ;; using the installed mysql2 gem in the store.
3454 (delete 'check)
3455 (add-after 'install 'check
3456 (lambda* (#:key outputs tests? #:allow-other-keys)
3457 (setenv "GEM_PATH"
3458 (string-append
3459 (getenv "GEM_PATH")
3460 ":"
3461 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3462 (when tests?
3463 (invoke "rspec"))
3464 #t)))))
3465 (inputs
2b8491fb
JL
3466 `(("mariadb" ,mariadb "lib")
3467 ("mariadb-dev" ,mariadb "dev")
b8aecc31
CB
3468 ("zlib" ,zlib)))
3469 (native-inputs
3470 `(("ruby-rspec" ,ruby-rspec)
3471 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3472 (synopsis "MySQL library for Ruby, binding to libmysql")
3473 (description
3474 "This package provides a simple, fast MySQL library for Ruby, binding to
3475libmysql.")
3476 (home-page "https://github.com/brianmario/mysql2")
3477 (license license:expat)))
3478
21f7b7bd
RW
3479(define-public ruby-blankslate
3480 (package
3481 (name "ruby-blankslate")
3482 (version "3.1.3")
3483 (source (origin
3484 (method url-fetch)
3485 (uri (rubygems-uri "blankslate" version))
3486 (sha256
3487 (base32
3488 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3489 (build-system ruby-build-system)
3490 (arguments
3491 `(#:phases
3492 (modify-phases %standard-phases
3493 (replace 'check
9923d5a4 3494 (lambda _ (invoke "rspec" "spec/"))))))
21f7b7bd
RW
3495 (native-inputs
3496 `(("bundler" ,bundler)
3497 ("ruby-rspec" ,ruby-rspec)))
3498 (synopsis "Abstract base class with no predefined methods")
3499 (description
3500 "BlankSlate provides an abstract base class with no predefined
3501methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3502as a base class when writing classes that depend upon
3503@code{method_missing} (e.g. dynamic proxies).")
7bf837fd 3504 (home-page "https://github.com/masover/blankslate")
21f7b7bd
RW
3505 (license license:expat)))
3506
afdb437c
CB
3507(define-public ruby-bond
3508 (package
3509 (name "ruby-bond")
3510 (version "0.5.1")
3511 (source
3512 (origin
3513 (method url-fetch)
3514 (uri (rubygems-uri "bond" version))
3515 (sha256
3516 (base32
3517 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3518 (build-system ruby-build-system)
3519 (native-inputs
3520 `(("ruby-bacon" ,ruby-bacon)
3521 ("ruby-bacon-bits" ,ruby-bacon-bits)
3522 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3523 (synopsis "Bond can provide custom autocompletion for arguments, methods
3524and more")
3525 (description
3526 "Bond can autocomplete argument(s) to methods, uniquely completing per
3527module, per method and per argument. Bond provides a configuration system and
3528a DSL for creating custom completions and completion rules. Bond can also
3529load completions that ship with gems. Bond is able to offer more than irb's
3530completion since it uses the full line of input when completing as opposed to
3531irb's last-word approach.")
3532 (home-page "http://tagaholic.me/bond/")
3533 (license license:expat)))
3534
f3d7bb93
CB
3535(define-public ruby-idn-ruby
3536 (package
3537 (name "ruby-idn-ruby")
3538 (version "0.1.0")
3539 (source
3540 (origin
3541 (method url-fetch)
3542 (uri (rubygems-uri "idn-ruby" version))
3543 (sha256
3544 (base32
3545 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3546 (build-system ruby-build-system)
3547 (arguments
3548 '(#:phases
3549 (modify-phases %standard-phases
3550 (delete 'check)
3551 (add-after 'install 'check
3552 (lambda* (#:key tests? outputs #:allow-other-keys)
3553 (when tests?
3554 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3555 (name-and-version (basename gem-file ".gem")))
3556 (apply invoke
3557 "ruby" "--verbose"
3558 (string-append "-I"
3559 (assoc-ref outputs "out")
3560 "/lib/ruby/vendor_ruby/gems/"
3561 name-and-version
3562 "/lib")
3563 (find-files "./test" ".*\\.rb"))))
3564 #t)))))
3565 (inputs
3566 `(("libidn" ,libidn)))
3567 (synopsis "Ruby Bindings for the GNU LibIDN library")
3568 (description
3569 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3570Stringprep, Punycode and IDNA specifications. These are used to encode and
3571decode internationalized domain + names according to the IDNA2003
3572specifications.
3573
3574Included are the most important parts of the Stringprep, Punycode and IDNA
3575APIs like performing Stringprep processings, encoding to and decoding from
3576Punycode strings and converting entire domain names to and from the ACE
3577encoded form.")
3578 (home-page "https://github.com/deepfryed/idn-ruby")
3579 (license license:asl2.0)))
3580
4016ba3f
RW
3581(define-public ruby-instantiator
3582 (package
3583 (name "ruby-instantiator")
688c9076 3584 (version "0.0.7")
4016ba3f
RW
3585 (source (origin
3586 (method url-fetch)
3587 (uri (rubygems-uri "instantiator" version))
3588 (sha256
3589 (base32
688c9076 3590 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
4016ba3f
RW
3591 (build-system ruby-build-system)
3592 (arguments
3593 `(#:phases
3594 (modify-phases %standard-phases
3595 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 3596 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3597 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3598 (substitute* "Rakefile"
3599 (("t\\.libs << \"test\"" line)
3600 (string-append line "; t.libs << \""
3cb3fa67 3601 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3602 "/gems/test-unit-"
3603 ,(package-version ruby-test-unit)
3604 "/lib\""))))
3605 #t)))))
4016ba3f
RW
3606 (propagated-inputs
3607 `(("ruby-blankslate" ,ruby-blankslate)))
3608 (native-inputs
3609 `(("bundler" ,bundler)
3610 ("ruby-test-unit" ,ruby-test-unit)))
3611 (synopsis "Instantiate an arbitrary Ruby class")
3612 (description
3613 "Instantiator lets you instantiate an arbitrary Ruby class without
3614knowing anything about the constructor.")
3615 (home-page "https://github.com/floehopper/instantiator")
3616 (license license:expat)))
3617
97aee8d3
RW
3618(define-public ruby-introspection
3619 (package
3620 (name "ruby-introspection")
98ff58a5 3621 (version "0.0.4")
97aee8d3
RW
3622 (source (origin
3623 (method url-fetch)
3624 (uri (rubygems-uri "introspection" version))
3625 (sha256
3626 (base32
98ff58a5 3627 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
97aee8d3
RW
3628 (build-system ruby-build-system)
3629 (arguments
3630 `(#:phases
3631 (modify-phases %standard-phases
3632 (add-after 'unpack 'add-test-unit-to-search-path
3633 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3634 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3635 (substitute* "Rakefile"
3636 (("t\\.libs << \"test\"" line)
3637 (string-append line "; t.libs << \""
3cb3fa67 3638 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3639 "/gems/test-unit-"
3640 ,(package-version ruby-test-unit)
3641 "/lib\""))))
97aee8d3
RW
3642 #t)))))
3643 (propagated-inputs
3644 `(("ruby-instantiator" ,ruby-instantiator)
3645 ("ruby-metaclass" ,ruby-metaclass)))
3646 (native-inputs
3647 `(("bundler" ,bundler)
3648 ("ruby-blankslate" ,ruby-blankslate)
3649 ("ruby-test-unit" ,ruby-test-unit)))
3650 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3651 (description
3652 "Introspection provides tools to inspect the hierarchy of method
3653definitions on a Ruby object.")
3654 (home-page "https://github.com/floehopper/introspection")
3655 (license license:expat)))
3656
d93062fd
RW
3657(define-public ruby-redcarpet
3658 (package
3659 (name "ruby-redcarpet")
ba4084bb 3660 (version "3.5.0")
d93062fd
RW
3661 (source (origin
3662 (method url-fetch)
3663 (uri (rubygems-uri "redcarpet" version))
3664 (sha256
3665 (base32
ba4084bb 3666 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
d93062fd
RW
3667 (build-system ruby-build-system)
3668 (arguments
3669 `(#:phases
3670 (modify-phases %standard-phases
3671 ;; The gem archive does not include the conformance tests.
3672 (add-after 'unpack 'disable-conformance-tests
3673 (lambda _
3674 (substitute* "Rakefile"
3675 (("task :test => %w\\[test:unit test:conformance\\]")
3676 "task :test => %w[test:unit]"))
3677 #t)))))
3678 (native-inputs
3679 `(("bundler" ,bundler)
3680 ("ruby-test-unit" ,ruby-test-unit)
3681 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3682 (synopsis "Extensible Markdown to (X)HTML converter")
3683 (description
3684 "Redcarpet is an extensible Ruby library for Markdown processing and
3685conversion to (X)HTML.")
7bf837fd 3686 (home-page "https://github.com/vmg/redcarpet")
d93062fd
RW
3687 (license license:expat)))
3688
09924294
CB
3689(define-public ruby-rerun
3690 (package
3691 (name "ruby-rerun")
3692 (version "0.13.0")
3693 (source
3694 (origin
3695 (method url-fetch)
3696 (uri (rubygems-uri "rerun" version))
3697 (sha256
3698 (base32
3699 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
3700 (build-system ruby-build-system)
3701 (arguments
3702 '(#:tests? #f)) ; No included tests
3703 (propagated-inputs
3704 `(("ruby-listen" ,ruby-listen)))
3705 (synopsis "Run a process, and restart when some monitored files change")
3706 (description
52beae7b 3707 "Rerun is a tool to launch programs, then monitor the file system, and
09924294
CB
3708restart the program when any of the monitored files change. It's written in
3709Ruby, but can be used for all programs.")
3710 (home-page "https://github.com/alexch/rerun/")
3711 (license license:expat)))
3712
8d85543b
MB
3713(define-public ruby-maxitest
3714 (package
3715 (name "ruby-maxitest")
3716 (version "3.6.0")
3717 (home-page "https://github.com/grosser/maxitest")
3718 (source (origin
3719 ;; Pull from git because the gem does not contain tests.
3720 (method git-fetch)
3721 (uri (git-reference
3722 (url home-page)
3723 (commit (string-append "v" version))))
3724 (file-name (git-file-name name version))
3725 (sha256
3726 (base32
3727 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
3728 (build-system ruby-build-system)
3729 (arguments
3730 '(#:test-target "default"
3731 #:phases (modify-phases %standard-phases
3732 (replace 'replace-git-ls-files
3733 (lambda _
3734 (substitute* "maxitest.gemspec"
3735 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
3736 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
3737 #t))
3738 (add-before 'check 'remove-version-constraints
3739 (lambda _
3740 ;; Don't use specific versions of dependencies, instead
3741 ;; take whatever is available in Guix.
3742 (delete-file "Gemfile.lock")
3743 #t))
3744 (add-before 'check 'add-mtest-on-PATH
3745 (lambda _
3746 ;; Tests use 'mtest' which is not automatically added on
3747 ;; PATH.
3748 (setenv "PATH" (string-append (getcwd) "/bin:"
3749 (getenv "PATH")))
3750 #t)))))
3751 (native-inputs
3752 `(("ps" ,procps)
3753 ("ruby-bump" ,ruby-bump)
3754 ("ruby-byebug" ,ruby-byebug)
3755 ("ruby-rspec" ,ruby-rspec)
3756 ("ruby-wwtd" ,ruby-wwtd)))
3757 (propagated-inputs
3758 `(("ruby-minitest" ,ruby-minitest)))
3759 (synopsis "Minitest with extra features")
3760 (description
3761 "Maxitest is a wrapper around Minitest with extra functionality such
3762as timeouts, an @command{mtest} executable that can run tests by line
3763number, support for interrupted tests, better backtraces, and more.")
3764 (license license:expat)))
3765
4f2a52ae
RW
3766(define-public ruby-mocha
3767 (package
3768 (name "ruby-mocha")
2fc3cc24 3769 (version "1.11.2")
4f2a52ae
RW
3770 (source (origin
3771 (method url-fetch)
3772 (uri (rubygems-uri "mocha" version))
3773 (sha256
3774 (base32
2fc3cc24 3775 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4f2a52ae
RW
3776 (build-system ruby-build-system)
3777 (arguments
3778 `(#:phases
3779 (modify-phases %standard-phases
2fc3cc24
MB
3780 (add-before 'check 'remove-rubocop-dependency
3781 (lambda _
3782 ;; Disable dependency on Rubocop, which is just a linter,
3783 ;; and would introduce a circular dependency.
3784 (substitute* "mocha.gemspec"
3785 ((".*rubocop.*")
3786 "true\n"))
3787 #t)))))
4f2a52ae 3788 (native-inputs
2fc3cc24 3789 `(("ruby-introspection" ,ruby-introspection)))
4f2a52ae
RW
3790 (synopsis "Mocking and stubbing library for Ruby")
3791 (description
3792 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
3793allows mocking and stubbing of methods on real (non-mock) classes.")
3794 (home-page "http://gofreerange.com/mocha/docs")
e3febab5
MB
3795 ;; Mocha can be used with either license at the users choice.
3796 (license (list license:expat license:ruby))))
4f2a52ae 3797
cf646acf
CB
3798(define-public ruby-mocha-on-bacon
3799 (package
3800 (name "ruby-mocha-on-bacon")
3801 (version "0.2.3")
3802 (source
3803 (origin
3804 (method url-fetch)
3805 (uri (rubygems-uri "mocha-on-bacon" version))
3806 (sha256
3807 (base32
3808 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
3809 (build-system ruby-build-system)
3810 (arguments
3811 ;; rubygems.org release missing tests
3812 '(#:tests? #f))
3813 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
3814 (synopsis "Mocha adapter for Bacon")
3815 (description
3816 "This package provides a Mocha adapter for Bacon, allowing you to use the
3817Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
3818 (home-page
3819 "https://github.com/alloy/mocha-on-bacon")
3820 (license license:expat)))
3821
2c84ba7e
RW
3822(define-public ruby-net-ssh
3823 (package
3824 (name "ruby-net-ssh")
5803f872 3825 (version "4.2.0")
2c84ba7e
RW
3826 (source (origin
3827 (method url-fetch)
3828 (uri (rubygems-uri "net-ssh" version))
3829 (sha256
3830 (base32
5803f872 3831 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
2c84ba7e
RW
3832 (build-system ruby-build-system)
3833 (native-inputs
a7938625
MB
3834 `(("bundler" ,bundler)
3835 ("ruby-mocha" ,ruby-mocha)
2c84ba7e
RW
3836 ("ruby-test-unit" ,ruby-test-unit)))
3837 (synopsis "Ruby implementation of the SSH2 client protocol")
3838 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
3839client protocol. It allows you to write programs that invoke and interact
3840with processes on remote servers, via SSH2.")
3841 (home-page "https://github.com/net-ssh/net-ssh")
3842 (license license:expat)))
3843
d38755cb
DM
3844(define-public ruby-net-scp
3845 (package
3846 (name "ruby-net-scp")
3847 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
3848 (version "1.2.2.rc2")
3849 (source
3850 (origin
e405f996
TGR
3851 (method git-fetch)
3852 (uri (git-reference
b0e7b699 3853 (url "https://github.com/net-ssh/net-scp")
e405f996
TGR
3854 (commit (string-append "v" version))))
3855 (file-name (git-file-name name version))
d38755cb 3856 (sha256
e405f996 3857 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
d38755cb
DM
3858 (build-system ruby-build-system)
3859 (native-inputs
3860 `(("bundler" ,bundler)
3861 ("ruby-test-unit" ,ruby-test-unit)
3862 ("ruby-mocha" ,ruby-mocha)))
3863 (propagated-inputs
3864 `(("ruby-net-ssh" ,ruby-net-ssh)))
3865 (synopsis "Pure-Ruby SCP client library")
3866 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
3867client protocol.")
3868 (home-page "https://github.com/net-ssh/net-scp")
3869 (license license:expat)))
3870
2206e948
DT
3871(define-public ruby-minitest
3872 (package
3873 (name "ruby-minitest")
88a105c1 3874 (version "5.11.3")
2206e948 3875 (source (origin
e83c6d00
DT
3876 (method url-fetch)
3877 (uri (rubygems-uri "minitest" version))
2206e948
DT
3878 (sha256
3879 (base32
88a105c1 3880 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
2206e948 3881 (build-system ruby-build-system)
2206e948
DT
3882 (native-inputs
3883 `(("ruby-hoe" ,ruby-hoe)))
3884 (synopsis "Small test suite library for Ruby")
3885 (description "Minitest provides a complete suite of Ruby testing
3886facilities supporting TDD, BDD, mocking, and benchmarking.")
3887 (home-page "https://github.com/seattlerb/minitest")
3888 (license license:expat)))
3889
1db6e09f
RW
3890;; This is the last release of Minitest 4, which is used by some packages.
3891(define-public ruby-minitest-4
3892 (package (inherit ruby-minitest)
3893 (version "4.7.5")
3894 (source (origin
3895 (method url-fetch)
3896 (uri (rubygems-uri "minitest" version))
3897 (sha256
3898 (base32
3899 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
3900 (arguments
3901 `(#:phases
3902 (modify-phases %standard-phases
3903 (add-after 'unpack 'remove-unsupported-method
3904 (lambda _
3905 (substitute* "Rakefile"
3906 (("self\\.rubyforge_name = .*") ""))
9a7017eb
BW
3907 #t))
3908 (add-after 'build 'exclude-failing-tests
3909 (lambda _
3910 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
3911 ;; Fixnum.
3912 (delete-file "test/minitest/test_minitest_spec.rb")
3913 #t)))))))
1db6e09f 3914
450a3f7f
CB
3915(define-public ruby-minitest-around
3916 (package
3917 (name "ruby-minitest-around")
3918 (version "0.5.0")
3919 (source
3920 (origin
3921 (method url-fetch)
3922 (uri (rubygems-uri "minitest-around" version))
3923 (sha256
3924 (base32
3925 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
3926 (build-system ruby-build-system)
3927 (arguments
3928 '(#:phases
3929 (modify-phases %standard-phases
3930 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
3931 (lambda _
3932 (substitute* "minitest-around.gemspec"
3933 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
3934 #t)))))
3935 (propagated-inputs
3936 `(("ruby-minitest" ,ruby-minitest)))
3937 (native-inputs
3938 `(("bundler" ,bundler)
3939 ("ruby-cucumber" ,ruby-cucumber)
3940 ("ruby-bump" ,ruby-bump)
3941 ("ruby-test-construct" ,ruby-test-construct)))
3942 (synopsis "Run code around tests in Minitest")
3943 (description
3944 "This library provides a way to run code around tests in Minitest,
3945written using either the unit test or spec style.")
3946 (home-page "https://github.com/splattael/minitest-around")
3947 (license license:expat)))
3948
35130835
DT
3949(define-public ruby-minitest-sprint
3950 (package
3951 (name "ruby-minitest-sprint")
3952 (version "1.1.0")
3953 (source (origin
e83c6d00
DT
3954 (method url-fetch)
3955 (uri (rubygems-uri "minitest-sprint" version))
35130835
DT
3956 (sha256
3957 (base32
e83c6d00 3958 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
35130835 3959 (build-system ruby-build-system)
35130835
DT
3960 (native-inputs
3961 `(("ruby-hoe" ,ruby-hoe)
3962 ("ruby-minitest" ,ruby-minitest)))
3963 (synopsis "Fast test suite runner for minitest")
3964 (description "Minitest-sprint is a test runner for minitest that makes it
3965easier to re-run individual failing tests.")
3966 (home-page "https://github.com/seattlerb/minitest-sprint")
3967 (license license:expat)))
3968
0808e361
DT
3969(define-public ruby-minitest-bacon
3970 (package
3971 (name "ruby-minitest-bacon")
6f9652b0 3972 (version "1.0.3")
0808e361 3973 (source (origin
e83c6d00
DT
3974 (method url-fetch)
3975 (uri (rubygems-uri "minitest-bacon" version))
0808e361
DT
3976 (sha256
3977 (base32
6f9652b0 3978 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
0808e361 3979 (build-system ruby-build-system)
0808e361
DT
3980 (native-inputs
3981 `(("ruby-hoe" ,ruby-hoe)))
3982 (inputs
3983 `(("ruby-minitest" ,ruby-minitest)))
3984 (synopsis "Bacon compatibility library for minitest")
3985 (description "Minitest-bacon extends minitest with bacon-like
3986functionality, making it easier to migrate test suites from bacon to minitest.")
3987 (home-page "https://github.com/seattlerb/minitest-bacon")
3988 (license license:expat)))
3989
39dc0eb5
BW
3990(define-public ruby-minitest-focus
3991 (package
3992 (name "ruby-minitest-focus")
3993 (version "1.1.2")
3994 (source
3995 (origin
3996 (method url-fetch)
3997 (uri (rubygems-uri "minitest-focus" version))
3998 (sha256
3999 (base32
4000 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
4001 (build-system ruby-build-system)
4002 (propagated-inputs
4003 `(("ruby-minitest" ,ruby-minitest)))
4004 (native-inputs
4005 `(("ruby-hoe" ,ruby-hoe)))
4006 (synopsis "Allows a few specific tests to be focused on")
4007 (description
4008 "@code{minitest-focus} gives the ability focus on a few tests with ease
4009without having to use command-line arguments. It introduces a @code{focus}
4010class method for use in testing classes, specifying that the next defined test
4011is to be run.")
4012 (home-page "https://github.com/seattlerb/minitest-focus")
4013 (license license:expat)))
4014
99fc5cd5
BW
4015(define-public ruby-minitest-pretty-diff
4016 ;; Use git reference because gem is out of date and does not contain testing
4017 ;; script. There are no releases on GitHub.
4018 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
4019 (package
4020 (name "ruby-minitest-pretty-diff")
4021 (version (string-append "0.1-1." (string-take commit 8)))
4022 (source (origin
4023 (method git-fetch)
4024 (uri (git-reference
b0e7b699 4025 (url "https://github.com/adammck/minitest-pretty_diff")
99fc5cd5
BW
4026 (commit commit)))
4027 (file-name (string-append name "-" version "-checkout"))
4028 (sha256
4029 (base32
4030 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
4031 (build-system ruby-build-system)
4032 (arguments
4033 `(#:phases
4034 (modify-phases %standard-phases
4035 (replace 'check
4036 (lambda _
9923d5a4 4037 (invoke "script/test"))))))
99fc5cd5
BW
4038 (native-inputs
4039 `(("bundler" ,bundler)
4040 ("ruby-turn" ,ruby-turn)))
4041 (synopsis "Pretty-print hashes and arrays in MiniTest")
4042 (description
4043 "@code{minitest-pretty_diff} monkey-patches
4044@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
4045diffing them. This makes it easier to spot differences between nested
4046structures when tests fail.")
4047 (home-page "https://github.com/adammck/minitest-pretty_diff")
4048 (license license:expat))))
4049
685d0d2f
BW
4050(define-public ruby-minitest-moar
4051 (package
4052 (name "ruby-minitest-moar")
4053 (version "0.0.4")
4054 (source
4055 (origin
4056 (method url-fetch)
4057 (uri (rubygems-uri "minitest-moar" version))
4058 (sha256
4059 (base32
4060 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
4061 (build-system ruby-build-system)
4062 (arguments
4063 `(#:phases
4064 (modify-phases %standard-phases
4065 (add-before 'check 'clean-dependencies
4066 (lambda _
4067 ;; Remove all gems defined in the Gemfile because these are not
4068 ;; truly needed.
4069 (substitute* "Gemfile"
4070 (("gem .*") ""))
4071 ;; Remove byebug as not needed to run tests.
4072 (substitute* "test/test_helper.rb"
4073 (("require 'byebug'") ""))
4074 #t)))))
4075 (native-inputs
4076 `(("bundler" ,bundler)
4077 ("ruby-minitest" ,ruby-minitest)))
4078 (synopsis "Extra features and changes to MiniTest")
4079 (description "@code{MiniTest Moar} add some additional features and
4080changes some default behaviours in MiniTest. For instance, Moar replaces the
4081MiniTest @code{Object#stub} with a global @code{stub} method.")
4082 (home-page "https://github.com/dockyard/minitest-moar")
4083 (license license:expat)))
4084
e07ef1d6
BW
4085(define-public ruby-minitest-bonus-assertions
4086 (package
4087 (name "ruby-minitest-bonus-assertions")
c9e261b7 4088 (version "3.0")
e07ef1d6
BW
4089 (source
4090 (origin
4091 (method url-fetch)
4092 (uri (rubygems-uri "minitest-bonus-assertions" version))
4093 (sha256
4094 (base32
c9e261b7 4095 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
e07ef1d6
BW
4096 (build-system ruby-build-system)
4097 (arguments
4098 `(#:phases
4099 (modify-phases %standard-phases
4100 (add-before 'check 'clean-dependencies
4101 (lambda _
4102 ;; Remove unneeded require statement that would entail another
4103 ;; dependency.
4104 (substitute* "test/minitest_config.rb"
4105 (("require 'minitest/bisect'") ""))
4106 #t)))))
4107 (native-inputs
4108 `(("ruby-hoe" ,ruby-hoe)
4109 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4110 ("ruby-minitest-focus" ,ruby-minitest-focus)
4111 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4112 (synopsis "Bonus assertions for @code{Minitest}")
4113 (description
4114 "Minitest bonus assertions provides extra MiniTest assertions. For
4115instance, it provides @code{assert_true}, @code{assert_false} and
4116@code{assert_set_equal}.")
4117 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4118 (license license:expat)))
4119
e2c9a9cc
CB
4120(define-public ruby-minitest-reporters
4121 (package
4122 (name "ruby-minitest-reporters")
4123 (version "1.3.6")
4124 (source
4125 (origin
4126 (method url-fetch)
4127 (uri (rubygems-uri "minitest-reporters" version))
4128 (sha256
4129 (base32
4130 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4131 (build-system ruby-build-system)
4132 (arguments
4133 '(#:phases
4134 (modify-phases %standard-phases
4135 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4136 ;; including it as an input can lead to circular dependencies.
4137 (add-after 'unpack 'remove-rubocop-from-Rakefile
4138 (lambda _
4139 (substitute* "Rakefile"
4140 (("require 'rubocop/rake\\_task'") "")
4141 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4142 #t))
4143 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4144 (lambda _
4145 (substitute* "minitest-reporters.gemspec"
4146 ((".*%q<rubocop>.*") "\n"))
4147 #t)))))
4148 (propagated-inputs
4149 `(("ruby-ansi" ,ruby-ansi)
4150 ("ruby-builder" ,ruby-builder)
4151 ("ruby-minitest" ,ruby-minitest)
4152 ("ruby-progressbar" ,ruby-progressbar)))
4153 (native-inputs
4154 `(("bundler" ,bundler)
4155 ("ruby-maruku" ,ruby-maruku)))
4156 (synopsis "Enhanced reporting for Minitest tests")
4157 (description
4158 "@code{minitest/reporters} provides a custom Minitest runner to improve
4159how the test state is reported. A number of different reporters are
4160available, including a spec reporter, progress bar reporter, a HTML
4161reporter.")
4162 (home-page "https://github.com/kern/minitest-reporters")
4163 (license license:expat)))
4164
e582fa93
BW
4165(define-public ruby-minitest-rg
4166 (package
4167 (name "ruby-minitest-rg")
4168 (version "5.2.0")
4169 (source
4170 (origin
4171 (method url-fetch)
4172 (uri (rubygems-uri "minitest-rg" version))
4173 (sha256
4174 (base32
4175 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4176 (build-system ruby-build-system)
4177 (arguments
4178 ;; Some tests fail even outside Guix, so disable tests.
4179 ;; https://github.com/blowmage/minitest-rg/issues/12
4180 ;; https://github.com/blowmage/minitest-rg/pull/13
4181 `(#:tests? #f))
4182 (propagated-inputs
4183 `(("ruby-minitest" ,ruby-minitest)))
4184 (synopsis "Coloured output for Minitest")
4185 (description
4186 "@code{minitest-rg} changes the colour of the output from Minitest.")
8e486e80 4187 (home-page "https://blowmage.com/minitest-rg/")
e582fa93
BW
4188 (license license:expat)))
4189
2a96dbe6
BW
4190(define-public ruby-minitest-hooks
4191 (package
4192 (name "ruby-minitest-hooks")
eaaf8b12 4193 (version "1.4.2")
2a96dbe6
BW
4194 (source
4195 (origin
4196 (method url-fetch)
4197 (uri (rubygems-uri "minitest-hooks" version))
4198 (sha256
4199 (base32
eaaf8b12 4200 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
2a96dbe6
BW
4201 (build-system ruby-build-system)
4202 (arguments
4203 '(#:test-target "spec"))
4204 (native-inputs
4205 `(("ruby-sequel" ,ruby-sequel)
4206 ("ruby-sqlite3" ,ruby-sqlite3)))
4207 (synopsis "Hooks for the minitest framework")
4208 (description
4209 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4210@code{around_all} hooks for Minitest. This allows, for instance, running each
4211suite of specs inside a database transaction, running each spec inside its own
4212savepoint inside that transaction. This can significantly speed up testing
4213for specs that share expensive database setup code.")
7bf837fd 4214 (home-page "https://github.com/jeremyevans/minitest-hooks")
2a96dbe6
BW
4215 (license license:expat)))
4216
afbbdf77
DT
4217(define-public ruby-daemons
4218 (package
4219 (name "ruby-daemons")
f03153db 4220 (version "1.2.5")
afbbdf77
DT
4221 (source (origin
4222 (method url-fetch)
e83c6d00 4223 (uri (rubygems-uri "daemons" version))
afbbdf77
DT
4224 (sha256
4225 (base32
f03153db 4226 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
afbbdf77
DT
4227 (build-system ruby-build-system)
4228 (arguments
4229 `(#:tests? #f)) ; no test suite
4230 (synopsis "Daemonize Ruby programs")
4231 (description "Daemons provides a way to wrap existing Ruby scripts to be
4232run as a daemon and to be controlled by simple start/stop/restart commands.")
4233 (home-page "https://github.com/thuehlinger/daemons")
4234 (license license:expat)))
b03eb6ac
CB
4235
4236(define-public ruby-data_uri
4237 (package
4238 (name "ruby-data_uri")
4239 (version "0.1.0")
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (rubygems-uri "data_uri" version))
4244 (sha256
4245 (base32
4246 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4247 (build-system ruby-build-system)
4248 (synopsis "URI class for parsing data URIs")
4249 (description
4250 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4251embedded inside a URI. The URI::Data class provides support for parsing these
4252URIs using the normal URI.parse method.")
4253 (home-page "https://github.com/dball/data_uri")
4254 (license license:expat)))
66e20863 4255
72c785f9
MB
4256(define-public ruby-deep-merge
4257 (package
4258 (name "ruby-deep-merge")
4259 (version "1.2.1")
4260 (home-page "https://github.com/danielsdeleo/deep_merge")
4261 ;; The Rubygem source does not contain the gemspec required for tests.
4262 (source (origin
4263 (method git-fetch)
4264 (uri (git-reference (url home-page) (commit version)))
4265 (file-name (git-file-name name version))
4266 (sha256
4267 (base32
4268 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4269 (build-system ruby-build-system)
4270 (native-inputs
4271 `(("ruby-minitest" ,ruby-minitest)))
4272 (synopsis "Recursively merge hashes")
4273 (description
4274 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4275you to merge elements inside a hash together recursively.")
4276 (license license:expat)))
4277
66e20863
DT
4278(define-public ruby-git
4279 (package
4280 (name "ruby-git")
ceaff59e 4281 (version "1.3.0")
66e20863
DT
4282 (source (origin
4283 (method url-fetch)
e83c6d00 4284 (uri (rubygems-uri "git" version))
66e20863
DT
4285 (sha256
4286 (base32
ceaff59e 4287 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
66e20863
DT
4288 (build-system ruby-build-system)
4289 (arguments
e83c6d00
DT
4290 `(#:tests? #f ; no tests
4291 #:phases (modify-phases %standard-phases
4292 (add-after 'install 'patch-git-binary
4293 (lambda* (#:key inputs outputs #:allow-other-keys)
66e20863
DT
4294 ;; Make the default git binary an absolute path to the
4295 ;; store.
e83c6d00
DT
4296 (let ((git (string-append (assoc-ref inputs "git")
4297 "/bin/git"))
3cb3fa67
CB
4298 (config (string-append
4299 (assoc-ref outputs "out")
4300 "/lib/ruby/vendor_ruby/gems/git-"
4301 ,version "/lib/git/config.rb")))
e83c6d00 4302 (substitute* (list config)
66e20863
DT
4303 (("'git'")
4304 (string-append "'" git "'")))
e83c6d00 4305 #t))))))
66e20863
DT
4306 (inputs
4307 `(("git" ,git)))
4308 (synopsis "Ruby wrappers for Git")
4309 (description "Ruby/Git is a Ruby library that can be used to create, read
4310and manipulate Git repositories by wrapping system calls to the git binary.")
4311 (home-page "https://github.com/schacon/ruby-git")
4312 (license license:expat)))
71d3e2c2 4313
95598153
MB
4314(define-public ruby-hocon
4315 (package
4316 (name "ruby-hocon")
fd13ec5f 4317 (version "1.3.1")
95598153
MB
4318 (home-page "https://github.com/puppetlabs/ruby-hocon")
4319 (source (origin
4320 (method git-fetch)
4321 (uri (git-reference (url home-page) (commit version)))
4322 (file-name (git-file-name name version))
4323 (sha256
4324 (base32
fd13ec5f 4325 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
95598153
MB
4326 (build-system ruby-build-system)
4327 (arguments
4328 '(#:phases (modify-phases %standard-phases
4329 (replace 'check
4330 (lambda* (#:key tests? #:allow-other-keys)
4331 (if tests?
4332 (invoke "rspec")
4333 (format #t "test suite not run~%"))
4334 #t)))))
4335 (native-inputs
4336 `(("bundler" ,bundler)
4337 ("ruby-rspec" ,ruby-rspec)))
4338 (synopsis "HOCON config library")
4339 (description
4340 "This package provides Ruby support for the @acronym{HOCON,
4341Human-Optimized Config Object Notation} configuration file format. It
4342supports parsing and modifying HOCON and JSON files, and rendering parsed
4343objects back to a @code{String}.")
4344 (license license:asl2.0)))
4345
71d3e2c2
DT
4346(define-public ruby-slop
4347 (package
4348 (name "ruby-slop")
d14e5eaa 4349 (version "4.5.0")
71d3e2c2
DT
4350 (source (origin
4351 (method url-fetch)
e83c6d00 4352 (uri (rubygems-uri "slop" version))
71d3e2c2
DT
4353 (sha256
4354 (base32
d14e5eaa 4355 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
71d3e2c2
DT
4356 (build-system ruby-build-system)
4357 (native-inputs
4358 `(("ruby-minitest" ,ruby-minitest)))
4359 (synopsis "Ruby command line option parser")
4360 (description "Slop provides a Ruby domain specific language for gathering
4361options and parsing command line flags.")
4362 (home-page "https://github.com/leejarvis/slop")
4363 (license license:expat)))
e778a549 4364
5337f8b9
DT
4365(define-public ruby-slop-3
4366 (package (inherit ruby-slop)
4367 (version "3.6.0")
4368 (source (origin
4369 (method url-fetch)
4370 (uri (rubygems-uri "slop" version))
4371 (sha256
4372 (base32
4373 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4374
ca914b5b
CB
4375(define-public ruby-multi-xml
4376 (package
4377 (name "ruby-multi-xml")
4378 (version "0.6.0")
4379 (source
4380 (origin
4381 (method url-fetch)
4382 (uri (rubygems-uri "multi_xml" version))
4383 (sha256
4384 (base32
4385 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4386 (build-system ruby-build-system)
4387 (arguments
4388 '(#:tests? #f)) ; No included tests
4389 (synopsis "Swappable XML backends for Ruby")
4390 (description
4391 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4392Nokogiri, Ox, or REXML.")
4393 (home-page "https://github.com/sferik/multi_xml")
4394 (license license:expat)))
4395
e778a549
DT
4396(define-public ruby-multipart-post
4397 (package
4398 (name "ruby-multipart-post")
4399 (version "2.0.0")
4400 (source (origin
4401 (method url-fetch)
e83c6d00 4402 (uri (rubygems-uri "multipart-post" version))
e778a549
DT
4403 (sha256
4404 (base32
e83c6d00 4405 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
e778a549
DT
4406 (build-system ruby-build-system)
4407 (native-inputs
4408 `(("bundler" ,bundler)))
4409 (synopsis "Multipart POST library for Ruby")
4410 (description "Multipart-Post Adds multipart POST capability to Ruby's
4411net/http library.")
4412 (home-page "https://github.com/nicksieger/multipart-post")
4413 (license license:expat)))
f8da3af0 4414
9a97e7ce
CB
4415(define-public ruby-multi-json
4416 (package
4417 (name "ruby-multi-json")
1b6f5475 4418 (version "1.13.1")
9a97e7ce
CB
4419 (source
4420 (origin
b872b47b 4421 (method git-fetch)
1b6f5475
BW
4422 ;; Tests are not distributed at rubygems.org so download from GitHub
4423 ;; instead.
b872b47b
EF
4424 (uri (git-reference
4425 (url "https://github.com/intridea/multi_json")
4426 (commit (string-append "v" version))))
4427 (file-name (git-file-name name version))
9a97e7ce
CB
4428 (sha256
4429 (base32
b872b47b 4430 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
9a97e7ce
CB
4431 (build-system ruby-build-system)
4432 (arguments
1b6f5475
BW
4433 `(#:phases
4434 (modify-phases %standard-phases
4435 (add-after 'unpack 'remove-signing-key-reference
4436 (lambda _
4437 (substitute* "multi_json.gemspec"
4438 ((".*spec.signing_key.*") ""))
4439 #t)))))
4440 (native-inputs
4441 `(("bundler" ,bundler)
4442 ("ruby-rspec" ,ruby-rspec)
4443 ("ruby-yard" ,ruby-yard)
4444 ("ruby-json-pure" ,ruby-json-pure)
4445 ("ruby-oj" ,ruby-oj)
4446 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
9a97e7ce
CB
4447 (synopsis "Common interface to multiple JSON libraries for Ruby")
4448 (description
4449 "This package provides a common interface to multiple JSON libraries,
4450including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4451NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
1b6f5475 4452 (home-page "https://github.com/intridea/multi_json")
9a97e7ce
CB
4453 (license license:expat)))
4454
5edef88b
BW
4455(define-public ruby-multi-test
4456 (package
4457 (name "ruby-multi-test")
4458 (version "0.1.2")
4459 (source
4460 (origin
4461 (method url-fetch)
4462 (uri (rubygems-uri "multi_test" version))
4463 (sha256
4464 (base32
4465 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4466 (build-system ruby-build-system)
4467 (arguments
4468 '(;; Tests require different sets of specific gem versions to be available,
4469 ;; and there is no gemfile that specifies the newest versions of
4470 ;; dependencies to be tested.
4471 #:tests? #f))
4472 (synopsis
4473 "Interface to testing libraries loaded into a running Ruby process")
4474 (description
4475 "@code{multi_test} provides a uniform interface onto whatever testing
4476libraries that have been loaded into a running Ruby process to help control
4477rogue test/unit/autorun requires.")
4478 (home-page "https://github.com/cucumber/multi_test")
9a97e7ce
CB
4479 (license license:expat)))
4480
f8da3af0
DT
4481(define-public ruby-arel
4482 (package
4483 (name "ruby-arel")
aecd533d 4484 (version "9.0.0")
f8da3af0
DT
4485 (source (origin
4486 (method url-fetch)
4487 (uri (rubygems-uri "arel" version))
4488 (sha256
4489 (base32
aecd533d 4490 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
f8da3af0
DT
4491 (build-system ruby-build-system)
4492 (arguments '(#:tests? #f)) ; no tests
4493 (home-page "https://github.com/rails/arel")
4494 (synopsis "SQL AST manager for Ruby")
6f23e2fb
TGR
4495 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4496Ruby. It simplifies the generation of complex SQL queries and adapts to
4497various relational database implementations.")
f8da3af0 4498 (license license:expat)))
616eaead 4499
554bf4f6
CB
4500(define-public ruby-marcel
4501 (package
4502 (name "ruby-marcel")
4503 (version "0.3.3")
4504 (source
4505 (origin
4506 (method url-fetch)
4507 (uri (rubygems-uri "marcel" version))
4508 (sha256
4509 (base32
4510 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4511 (build-system ruby-build-system)
4512 (arguments
4513 '(;; No included tests
4514 #:tests? #f))
4515 (propagated-inputs
4516 `(("ruby-mimemagic" ,ruby-mimemagic)))
4517 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4518 (description
4519 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4520Extensions} type detection using magic numbers, filenames, and extensions")
4521 (home-page "https://github.com/basecamp/marcel")
4522 (license license:expat)))
4523
616eaead 4524(define-public ruby-minitar
bfaf8efd
BW
4525 ;; We package from the GitHub source to fix the security issue reported at
4526 ;; https://github.com/halostatue/minitar/issues/16.
4527 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4528 (package
4529 (name "ruby-minitar")
4530 (version (string-append "0.5.4-1." (string-take commit 8)))
4531 (source
4532 (origin
4533 (method git-fetch)
4534 (uri (git-reference
b0e7b699 4535 (url "https://github.com/halostatue/minitar")
bfaf8efd
BW
4536 (commit commit)))
4537 (file-name (string-append name "-" version "-checkout"))
4538 (sha256
4539 (base32
4540 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4541 (build-system ruby-build-system)
4542 (arguments
4543 '(#:tests? #f)) ; missing a gemspec
4544 (synopsis "Ruby library and utility for handling tar archives")
4545 (description
4546 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
616eaead 4547that provides the ability to deal with POSIX tar archive files.")
bfaf8efd
BW
4548 (home-page "http://www.github.com/atoulme/minitar")
4549 (license (list license:gpl2+ license:ruby)))))
bea1c0e2
DT
4550
4551(define-public ruby-mini-portile
4552 (package
4553 (name "ruby-mini-portile")
4554 (version "0.6.2")
4555 (source
4556 (origin
4557 (method url-fetch)
4558 (uri (rubygems-uri "mini_portile" version))
4559 (sha256
4560 (base32
4561 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4562 (build-system ruby-build-system)
4563 (arguments
4564 '(#:tests? #f)) ; tests require network access
4565 (synopsis "Ports system for Ruby developers")
4566 (description "Mini-portile is a port/recipe system for Ruby developers.
4567It provides a standard way to compile against specific versions of libraries
4568to reproduce user environments.")
7bf837fd 4569 (home-page "https://github.com/flavorjones/mini_portile")
bea1c0e2 4570 (license license:expat)))
e920bfca 4571
d000fc92
BW
4572(define-public ruby-mini-portile-2
4573 (package (inherit ruby-mini-portile)
a88ac044 4574 (version "2.4.0")
d000fc92
BW
4575 (source (origin
4576 (method url-fetch)
4577 (uri (rubygems-uri "mini_portile2" version))
4578 (sha256
4579 (base32
a88ac044 4580 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
d000fc92 4581
e920bfca
DT
4582(define-public ruby-nokogiri
4583 (package
4584 (name "ruby-nokogiri")
62cc7344 4585 (version "1.10.9")
e920bfca
DT
4586 (source (origin
4587 (method url-fetch)
4588 (uri (rubygems-uri "nokogiri" version))
4589 (sha256
4590 (base32
62cc7344 4591 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
e920bfca
DT
4592 (build-system ruby-build-system)
4593 (arguments
4594 ;; Tests fail because Nokogiri can only test with an installed extension,
4595 ;; and also because many test framework dependencies are missing.
7b01f250 4596 `(#:tests? #f
e920bfca
DT
4597 #:gem-flags (list "--" "--use-system-libraries"
4598 (string-append "--with-xml2-include="
4599 (assoc-ref %build-inputs "libxml2")
5e7f1b0b
BW
4600 "/include/libxml2" ))
4601 #:phases
4602 (modify-phases %standard-phases
7b01f250
BW
4603 (add-before 'build 'patch-extconf
4604 ;; 'pkg-config' is not included in the GEM_PATH during
4605 ;; installation, so we add it directly to the load path.
4606 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 4607 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
7b01f250
BW
4608 (substitute* "ext/nokogiri/extconf.rb"
4609 (("gem 'pkg-config'.*")
4610 (string-append "$:.unshift '"
3cb3fa67 4611 pkg-config "/lib/ruby/vendor_ruby"
7b01f250
BW
4612 "/gems/pkg-config-"
4613 ,(package-version ruby-pkg-config)
4614 "/lib'\n"))))
5e7f1b0b 4615 #t)))))
e920bfca 4616 (native-inputs
7b01f250 4617 `(("ruby-hoe" ,ruby-hoe)))
e920bfca
DT
4618 (inputs
4619 `(("zlib" ,zlib)
4620 ("libxml2" ,libxml2)
4621 ("libxslt" ,libxslt)))
4622 (propagated-inputs
7b01f250
BW
4623 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4624 ("ruby-pkg-config" ,ruby-pkg-config)))
e920bfca
DT
4625 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4626 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4627both CSS3 selector and XPath 1.0 support.")
4628 (home-page "http://www.nokogiri.org/")
4629 (license license:expat)))
30b0b725
DT
4630
4631(define-public ruby-method-source
4632 (package
4633 (name "ruby-method-source")
ec08f469 4634 (version "1.0.0")
30b0b725
DT
4635 (source
4636 (origin
4637 (method url-fetch)
4638 (uri (rubygems-uri "method_source" version))
4639 (sha256
4640 (base32
ec08f469 4641 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
30b0b725 4642 (build-system ruby-build-system)
c8355037
BW
4643 (arguments
4644 `(#:test-target "spec"))
30b0b725 4645 (native-inputs
c8355037 4646 `(("ruby-rspec" ,ruby-rspec)
30b0b725
DT
4647 ("git" ,git)))
4648 (synopsis "Retrieve the source code for Ruby methods")
4649 (description "Method_source retrieves the source code for Ruby methods.
4650Additionally, it can extract source code from Proc and Lambda objects or just
4651extract comments.")
4652 (home-page "https://github.com/banister/method_source")
4653 (license license:expat)))
2e3fdea4
DT
4654
4655(define-public ruby-coderay
4656 (package
4657 (name "ruby-coderay")
5cf0997a 4658 (version "1.1.2")
2e3fdea4
DT
4659 (source
4660 (origin
4661 (method url-fetch)
4662 (uri (rubygems-uri "coderay" version))
4663 (sha256
4664 (base32
5cf0997a 4665 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
2e3fdea4
DT
4666 (build-system ruby-build-system)
4667 (arguments
4668 '(#:tests? #f)) ; missing test files
4669 (synopsis "Ruby syntax highlighting library")
4670 (description "Coderay is a Ruby library that provides syntax highlighting
4671for select languages.")
4672 (home-page "http://coderay.rubychan.de")
4673 (license license:expat)))
96e76083 4674
f9083965
MC
4675(define-public ruby-cuke-modeler
4676 (package
4677 (name "ruby-cuke-modeler")
4678 (version "3.1.0")
4679 (source
4680 (origin
4681 (method url-fetch)
4682 (uri (rubygems-uri "cuke_modeler" version))
4683 (sha256
4684 (base32
4685 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
4686 (build-system ruby-build-system)
4687 (arguments `(#:tests? #f)) ;no test suite in gem
4688 (propagated-inputs
4689 `(("ruby-gherkin" ,ruby-gherkin)))
4690 (synopsis "Gherkin test suite analysis tool")
4691 (description "CukeModeler facilitates modeling a test suite that is
4692written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
4693providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
4694the @code{cucumber-gherkin} generates when parsing features, as well as
4695providing models for feature files and directories in order to be able to have
4696a fully traversable model tree of a test suite's structure. These models can
4697then be analyzed or manipulated more easily than the underlying AST layer.")
4698 (home-page "https://github.com/enkessler/cuke_modeler")
4699 (license license:expat)))
4700
2156cc9c
MB
4701(define-public ruby-parallel-tests
4702 (package
4703 (name "ruby-parallel-tests")
8a01e2fa 4704 (version "3.0.0")
2156cc9c
MB
4705 (home-page "https://github.com/grosser/parallel_tests")
4706 (source (origin
4707 (method git-fetch)
4708 (uri (git-reference
4709 (url home-page)
4710 (commit (string-append "v" version))))
4711 (file-name (string-append name version))
4712 (sha256
4713 (base32
8a01e2fa 4714 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
2156cc9c
MB
4715 (build-system ruby-build-system)
4716 (arguments
4717 '(#:test-target "default"
4718 #:phases (modify-phases %standard-phases
4719 (add-after 'patch-source-shebangs 'patch-shell-invokations
4720 (lambda _
4721 (substitute* '("lib/parallel_tests/tasks.rb"
4722 "spec/parallel_tests/tasks_spec.rb")
4723 (("/bin/sh") (which "sh"))
4724 (("/bin/bash") (which "bash")))
4725 #t))
4726 (add-before 'check 'remove-version-constraints
4727 (lambda _
4728 ;; Remove hard coded version constraints, instead just
4729 ;; use whatever versions are available in Guix.
4730 (delete-file "Gemfile.lock")
4731 (substitute* "Gemfile"
4732 (("'minitest',.*")
4733 "'minitest'\n")
4734 (("'cucumber',.*")
4735 "'cucumber'\n"))
4736 #t))
4737 (add-before 'check 'disable-rails-test
4738 (lambda _
4739 ;; XXX: This test attempts to download and run the test
4740 ;; suites of multiple Rails versions(!) directly.
4741 (delete-file "spec/rails_spec.rb")
4742 #t))
4743 (add-before 'check 'set-HOME
4744 (lambda _
4745 ;; Some tests check the output of Bundler, and fail when
4746 ;; Bundler warns that /homeless-shelter does not exist.
4747 (setenv "HOME" "/tmp")
4748 #t)))))
4749 (native-inputs
4750 `(("ruby-bump" ,ruby-bump)
4751 ("ruby-cucumber" ,ruby-cucumber)
8a01e2fa 4752 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
2156cc9c
MB
4753 ("ruby-minitest" ,ruby-minitest)
4754 ("ruby-rake" ,ruby-rake)
4755 ("ruby-rspec" ,ruby-rspec)
4756 ("ruby-spinach" ,ruby-spinach)))
4757 (propagated-inputs
4758 `(("ruby-parallel" ,ruby-parallel)))
4759 (synopsis "Run tests in parallel")
4760 (description
4761 "This package can speed up @code{Test::Unit}, @code{RSpec},
4762@code{Cucumber}, and @code{Spinach} tests by running them concurrently
4763across multiple CPU cores.")
4764 (license license:expat)))
4765
54993457
CB
4766(define-public ruby-parser
4767 (package
4768 (name "ruby-parser")
9fc61da9 4769 (version "2.7.1.4")
54993457
CB
4770 (source
4771 (origin
4772 (method url-fetch)
4773 (uri (rubygems-uri "parser" version))
4774 (sha256
4775 (base32
9fc61da9 4776 "1030znhvhkfn39svwbj6qn4xb6hgl94gnvg57k4d3r76f9bryqmn"))))
54993457
CB
4777 (build-system ruby-build-system)
4778 (native-inputs
4779 `(("bundler" ,bundler)
4780 ("ruby-cliver" ,ruby-cliver)
4781 ("ruby-simplecov" ,ruby-simplecov)
4782 ("ruby-racc" ,ruby-racc)))
4783 (inputs
4784 `(("ragel" ,ragel)))
4785 (propagated-inputs
4786 `(("ruby-ast" ,ruby-ast)))
4787 (synopsis "Ruby parser written in pure Ruby")
4788 (description
4789 "This package provides a Ruby parser written in pure Ruby.")
4790 (home-page "https://github.com/whitequark/parser")
4791 (license license:expat)))
4792
a8cdfd53
MC
4793(define-public ruby-sexp-processor
4794 (package
4795 (name "ruby-sexp-processor")
4796 (version "4.15.0")
4797 (source
4798 (origin
4799 (method url-fetch)
4800 (uri (rubygems-uri "sexp_processor" version))
4801 (sha256
4802 (base32
4803 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
4804 (build-system ruby-build-system)
4805 (native-inputs
4806 ;; TODO: Add ruby-minitest-proveit once available.
4807 `(("hoe" ,ruby-hoe)))
4808 (synopsis "ParseTree fork which includes generic S-exp processing tools")
4809 (description "The sexp_processor package is derived from ParseTree, but
4810contrary to ParseTree, it includes all the generic S-exp processing tools.
4811Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
4812@code{Environment}")
4813 (home-page "https://github.com/seattlerb/sexp_processor")
4814 (license license:expat)))
4815
24be6751
MC
4816(define-public ruby-ruby-parser
4817 (package
4818 (name "ruby-ruby-parser")
4819 (version "3.14.2")
4820 (source
4821 (origin
4822 (method url-fetch)
4823 (uri (rubygems-uri "ruby_parser" version))
4824 (sha256
4825 (base32
4826 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
4827 (build-system ruby-build-system)
4828 (native-inputs
4829 `(("hoe" ,ruby-hoe)
4830 ("racc" ,ruby-racc)
4831 ("unifdef" ,unifdef)))
4832 (propagated-inputs
4833 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
4834 (home-page "https://github.com/seattlerb/ruby_parser/")
4835 (synopsis "Ruby parser written in pure Ruby")
4836 (description "The ruby_parser (RP) package provides a Ruby parser written
4837in pure Ruby. It outputs S-expressions which can be manipulated and converted
4838back to Ruby via the @code{ruby2ruby} library.")
4839 (license license:expat)))
4840
16f423cb
CB
4841(define-public ruby-prawn-manual-builder
4842 (package
4843 (name "ruby-prawn-manual-builder")
1d4f0019 4844 (version "0.3.1")
16f423cb
CB
4845 (source
4846 (origin
4847 (method url-fetch)
4848 (uri (rubygems-uri "prawn-manual_builder" version))
4849 (sha256
1d4f0019 4850 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
16f423cb
CB
4851 (build-system ruby-build-system)
4852 (arguments
1d4f0019 4853 '(#:tests? #f ; no included tests
16f423cb
CB
4854 #:phases
4855 (modify-phases %standard-phases
4856 (add-after 'extract-gemspec 'patch-gemspec
4857 (lambda _
4858 (substitute* ".gemspec"
4859 ;; Loosen the requirement for pdf-inspector
4860 (("~> 1\\.0\\.7") ">= 0")))))))
4861 (propagated-inputs
4862 `(("ruby-coderay" ,ruby-coderay)))
4863 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
4864 (description
4865 "This package provides a tool for writing manuals for Prawn and Prawn
4866accessories")
4867 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
cc10ca33 4868 (license %prawn-project-licenses)))
16f423cb 4869
268643b9
CB
4870(define-public ruby-progress_bar
4871 (package
4872 (name "ruby-progress_bar")
4873 (version "1.1.0")
4874 (source
4875 (origin
4876 (method url-fetch)
4877 (uri (rubygems-uri "progress_bar" version))
4878 (sha256
4879 (base32
4880 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
4881 (build-system ruby-build-system)
4882 (arguments
4883 '(#:test-target "spec"))
4884 (propagated-inputs
4885 `(("ruby-highline" ,ruby-highline)
4886 ("ruby-options" ,ruby-options)))
4887 (native-inputs
4888 `(("bundler" ,bundler)
4889 ("ruby-rspec" ,ruby-rspec)
4890 ("ruby-timecop" ,ruby-timecop)))
4891 (synopsis
4892 "Ruby library for displaying progress bars")
4893 (description
4894 "ProgressBar is a simple library for displaying progress bars. The
4895maximum value is configurable, and additional information can be displayed
4896like the percentage completion, estimated time remaining, elapsed time and
4897rate.")
4898 (home-page "https://github.com/paul/progress_bar")
4899 (license license:wtfpl2)))
4900
95f85d44
CB
4901(define-public ruby-dep
4902 (package
4903 (name "ruby-dep")
4904 (version "1.5.0")
4905 (source
4906 (origin
4907 (method url-fetch)
4908 (uri (rubygems-uri "ruby_dep" version))
4909 (sha256
4910 (base32
4911 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
4912 (build-system ruby-build-system)
4913 (arguments
4914 '(#:tests? #f)) ; No included tests
4915 (synopsis "Creates a version constraint of supported Rubies")
4916 (description
4917 "This package helps create a version constraint of supported Rubies,
4918suitable for a gemspec file.")
4919 (home-page "https://github.com/e2/ruby_dep")
4920 (license license:expat)))
4921
158a9253
CB
4922(define-public ruby-progressbar
4923 (package
4924 (name "ruby-progressbar")
2d2a2363 4925 (version "1.10.1")
158a9253
CB
4926 (source
4927 (origin
4928 (method url-fetch)
4929 (uri (rubygems-uri "ruby-progressbar" version))
4930 (sha256
2d2a2363 4931 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
158a9253
CB
4932 (build-system ruby-build-system)
4933 (arguments
4934 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
4935 #:tests? #f))
4936 (synopsis "Text progress bar library for Ruby")
4937 (description
4938 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
4939The output can be customized with a formatting system.")
4940 (home-page "https://github.com/jfelchner/ruby-progressbar")
4941 (license license:expat)))
4942
96e76083
DT
4943(define-public ruby-pry
4944 (package
4945 (name "ruby-pry")
a0d93c17 4946 (version "0.13.1")
96e76083
DT
4947 (source
4948 (origin
4949 (method url-fetch)
4950 (uri (rubygems-uri "pry" version))
4951 (sha256
4952 (base32
a0d93c17 4953 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
96e76083
DT
4954 (build-system ruby-build-system)
4955 (arguments
4956 '(#:tests? #f)) ; no tests
4957 (propagated-inputs
4958 `(("ruby-coderay" ,ruby-coderay)
1960d4fd 4959 ("ruby-method-source" ,ruby-method-source)))
96e76083
DT
4960 (synopsis "Ruby REPL")
4961 (description "Pry is an IRB alternative and runtime developer console for
4962Ruby. It features syntax highlighting, a plugin architecture, runtime
4963invocation, and source and documentation browsing.")
a0d93c17 4964 (home-page "https://cobaltbluemedia.com/pryrepl/")
96e76083 4965 (license license:expat)))
1415792a 4966
def7908a
MB
4967(define-public ruby-single-cov
4968 (package
4969 (name "ruby-single-cov")
4970 (version "1.3.2")
4971 (home-page "https://github.com/grosser/single_cov")
4972 (source (origin
4973 (method git-fetch)
4974 (uri (git-reference (url home-page)
4975 (commit (string-append "v" version))))
4976 (file-name (git-file-name name version))
4977 (sha256
4978 (base32
4979 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
4980 (build-system ruby-build-system)
4981 (arguments
4982 '(#:test-target "default"
4983 #:phases (modify-phases %standard-phases
4984 (replace 'replace-git-ls-files
4985 (lambda _
4986 (substitute* "single_cov.gemspec"
4987 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4988 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
4989 #t))
4990 (add-before 'check 'remove-version-constraints
4991 (lambda _
4992 (delete-file "Gemfile.lock")
4993 #t))
4994 (add-before 'check 'make-files-writable
4995 (lambda _
4996 ;; Tests need to create local directories and open files
4997 ;; with write permissions.
4998 (for-each make-file-writable
4999 (find-files "specs" #:directories? #t))
5000 #t))
5001 (add-before 'check 'disable-failing-test
5002 (lambda _
5003 ;; XXX: This test copies assets from minitest, but can
5004 ;; not cope with the files being read-only. Just skip
5005 ;; it for now.
5006 (substitute* "specs/single_cov_spec.rb"
5007 (("it \"complains when coverage is bad\"")
5008 "xit \"complains when coverage is bad\""))
5009 #t)))))
5010 (native-inputs
5011 `(("ruby-bump" ,ruby-bump)
5012 ("ruby-minitest" ,ruby-minitest)
5013 ("ruby-rspec" ,ruby-rspec)
5014 ("ruby-simplecov" ,ruby-simplecov)))
5015 (synopsis "Code coverage reporting tool")
5016 (description
5017 "This package provides actionable code coverage reports for Ruby
5018projects. It has very little overhead and can be easily integrated with
5019development tools to catch coverage problems early.")
5020 (license license:expat)))
5021
051deeb7
RW
5022(define-public ruby-guard
5023 (package
5024 (name "ruby-guard")
5025 (version "2.13.0")
5026 (source (origin
3c6128f6 5027 (method git-fetch)
051deeb7
RW
5028 ;; The gem does not include a Rakefile, nor does it contain a
5029 ;; gemspec file, nor does it come with the tests. This is why
5030 ;; we fetch the tarball from Github.
3c6128f6
EF
5031 (uri (git-reference
5032 (url "https://github.com/guard/guard")
5033 (commit (string-append "v" version))))
5034 (file-name (git-file-name name version))
051deeb7
RW
5035 (sha256
5036 (base32
3c6128f6 5037 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
051deeb7
RW
5038 (build-system ruby-build-system)
5039 (arguments
5040 `(#:tests? #f ; tests require cucumber
5041 #:phases
5042 (modify-phases %standard-phases
5043 (add-after 'unpack 'remove-git-ls-files
5044 (lambda* (#:key outputs #:allow-other-keys)
5045 (substitute* "guard.gemspec"
5046 (("git ls-files -z") "find . -type f -print0"))
5047 #t))
5048 (replace 'build
5049 (lambda _
9923d5a4 5050 (invoke "gem" "build" "guard.gemspec"))))))
051deeb7
RW
5051 (propagated-inputs
5052 `(("ruby-formatador" ,ruby-formatador)
5053 ("ruby-listen" ,ruby-listen)
5054 ("ruby-lumberjack" ,ruby-lumberjack)
5055 ("ruby-nenv" ,ruby-nenv)
5056 ("ruby-notiffany" ,ruby-notiffany)
5057 ("ruby-pry" ,ruby-pry)
5058 ("ruby-shellany" ,ruby-shellany)
5059 ("ruby-thor" ,ruby-thor)))
5060 (native-inputs
5061 `(("bundler" ,bundler)
5062 ("ruby-rspec" ,ruby-rspec)))
5063 (synopsis "Tool to handle events on file system modifications")
5064 (description
5065 "Guard is a command line tool to easily handle events on file system
5066modifications. Guard automates various tasks by running custom rules whenever
5067file or directories are modified.")
3c6128f6 5068 (home-page "https://guardgem.org/")
051deeb7
RW
5069 (license license:expat)))
5070
c09bc60d
MB
5071(define-public ruby-spinach
5072 (package
5073 (name "ruby-spinach")
5074 (version "0.11.0")
702a1012 5075 (home-page "https://github.com/codegram/spinach")
c09bc60d
MB
5076 (source (origin
5077 (method url-fetch)
5078 (uri (rubygems-uri "spinach" version))
5079 (sha256
5080 (base32
5081 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5082 (build-system ruby-build-system)
5083 (arguments
5084 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5085 ;; which in turn depends on many other unpackaged gems. Enable once
5086 ;; capybara is available.
5087 '(#:tests? #f))
5088 (propagated-inputs
5089 `(("ruby-colorize" ,ruby-colorize)
5090 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5091 ("ruby-json" ,ruby-json)))
5092 (synopsis "Gherkin-based BDD framework")
5093 (description
5094 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5095framework that leverages the expressive @code{Gherkin} language to help you
5096define executable specifications of your code.")
5097 (license license:expat)))
5098
bcbb3cc9
CB
5099(define-public ruby-tilt
5100 (package
5101 (name "ruby-tilt")
c3f15f54 5102 (version "2.0.10")
bcbb3cc9
CB
5103 (source
5104 (origin
c3f15f54
MC
5105 (method git-fetch) ;the distributed gem lacks tests
5106 (uri (git-reference
b0e7b699 5107 (url "https://github.com/rtomayko/tilt")
c3f15f54
MC
5108 (commit (string-append "v" version))))
5109 (file-name (git-file-name name version))
bcbb3cc9
CB
5110 (sha256
5111 (base32
c3f15f54 5112 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
bcbb3cc9
CB
5113 (build-system ruby-build-system)
5114 (arguments
5115 '(#:phases
5116 (modify-phases %standard-phases
5117 (add-after 'unpack 'remove-some-dependencies
5118 (lambda _
5119 (substitute* "Gemfile"
5120 ;; TODO ronn is used for generating the manual
5121 (("gem 'ronn'.*") "\n")
5122 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5123 ;; pass it in as a native-input
5124 (("gem 'haml'.*") "\n")
5125 ;; TODO Not all of these gems are packaged for Guix yet:
5126 ;; less, coffee-script, livescript, babel-transpiler,
5127 ;; typescript-node
5128 (("if can_execjs") "if false")
5129 ;; Disable the secondary group to reduce the number of
5130 ;; dependencies. None of the normal approaches work, so patch
5131 ;; the Gemfile instead.
5132 (("group :secondary") "[].each"))
5133 #t)))))
cfa4a318
MC
5134 (propagated-inputs
5135 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5136 ("ruby-sassc" ,ruby-sassc)))
bcbb3cc9
CB
5137 (native-inputs
5138 `(("bundler" ,bundler)
5139 ("ruby-yard" ,ruby-yard)
5140 ("ruby-builder" ,ruby-builder)
5141 ("ruby-erubis" ,ruby-erubis)
cfa4a318 5142 ("ruby-markaby" ,ruby-markaby)))
bcbb3cc9
CB
5143 (synopsis "Generic interface to multiple Ruby template engines")
5144 (description
5145 "Tilt is a thin interface over a number of different Ruby template
5146engines in an attempt to make their usage as generic as possible.")
5147 (home-page "https://github.com/rtomayko/tilt/")
5148 (license license:expat)))
5149
1415792a
DT
5150(define-public ruby-thread-safe
5151 (package
5152 (name "ruby-thread-safe")
313dd5dd 5153 (version "0.3.6")
1415792a
DT
5154 (source
5155 (origin
5156 (method url-fetch)
5157 (uri (rubygems-uri "thread_safe" version))
5158 (sha256
5159 (base32
313dd5dd 5160 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
1415792a
DT
5161 (build-system ruby-build-system)
5162 (arguments
5163 '(#:tests? #f)) ; needs simplecov, among others
5164 (synopsis "Thread-safe utilities for Ruby")
5165 (description "The thread_safe library provides thread-safe collections and
5166utilities for Ruby.")
5167 (home-page "https://github.com/ruby-concurrency/thread_safe")
5168 (license license:asl2.0)))
08a1b701
DT
5169
5170(define-public ruby-tzinfo
5171 (package
5172 (name "ruby-tzinfo")
4237af85 5173 (version "1.2.4")
08a1b701
DT
5174 (source
5175 (origin
5176 (method url-fetch)
5177 (uri (rubygems-uri "tzinfo" version))
5178 (sha256
5179 (base32
4237af85 5180 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
08a1b701 5181 (build-system ruby-build-system)
740fea08
CB
5182 (arguments
5183 '(#:phases
5184 (modify-phases %standard-phases
5185 (add-after 'unpack 'skip-safe-tests
5186 (lambda _
5187 (substitute* "test/test_utils.rb"
5188 (("def safe_test\\(options = \\{\\}\\)")
5189 "def safe_test(options = {})
5190 skip('The Guix build environment has an unsafe load path')"))
5191 #t)))))
08a1b701
DT
5192 (propagated-inputs
5193 `(("ruby-thread-safe" ,ruby-thread-safe)))
5194 (synopsis "Time zone library for Ruby")
5195 (description "TZInfo is a Ruby library that provides daylight savings
5196aware transformations between times in different time zones.")
2f3800e5 5197 (home-page "https://tzinfo.github.io")
1e12924a
BW
5198 (license license:expat)))
5199
5200(define-public ruby-tzinfo-data
5201 (package
5202 (name "ruby-tzinfo-data")
92513191 5203 (version "1.2017.3")
1e12924a
BW
5204 (source
5205 (origin
bb1e7ed0 5206 (method git-fetch)
1e12924a
BW
5207 ;; Download from GitHub because the rubygems version does not contain
5208 ;; Rakefile or tests.
bb1e7ed0
EF
5209 (uri (git-reference
5210 (url "https://github.com/tzinfo/tzinfo-data")
5211 (commit (string-append "v" version))))
5212 (file-name (git-file-name name version))
1e12924a
BW
5213 (sha256
5214 (base32
bb1e7ed0 5215 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
1e12924a
BW
5216 ;; Remove the known test failure.
5217 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5218 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5219 (patches (search-patches
5220 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5221 (build-system ruby-build-system)
5222 (propagated-inputs
5223 `(("ruby-tzinfo" ,ruby-tzinfo)))
5224 (synopsis "Data from the IANA Time Zone database")
5225 (description
5226 "This library provides @code{TZInfo::Data}, which contains data from the
5227IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
2f3800e5 5228 (home-page "https://tzinfo.github.io")
08a1b701 5229 (license license:expat)))
c99e2247 5230
48e6851f
RW
5231(define-public ruby-rb-inotify
5232 (package
5233 (name "ruby-rb-inotify")
32bbfea8 5234 (version "0.9.10")
48e6851f
RW
5235 (source
5236 (origin
5237 (method url-fetch)
5238 (uri (rubygems-uri "rb-inotify" version))
5239 (sha256
5240 (base32
32bbfea8 5241 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
48e6851f
RW
5242 (build-system ruby-build-system)
5243 (arguments
5244 '(#:tests? #f ; there are no tests
5245 #:phases
5246 (modify-phases %standard-phases
5247 ;; Building the gemspec with rake is not working here since it is
5248 ;; generated with Jeweler. It is also unnecessary because the
5249 ;; existing gemspec does not use any development tools to generate a
5250 ;; list of files.
5251 (replace 'build
5252 (lambda _
9923d5a4 5253 (invoke "gem" "build" "rb-inotify.gemspec"))))))
48e6851f
RW
5254 (propagated-inputs
5255 `(("ruby-ffi" ,ruby-ffi)))
5256 (native-inputs
5257 `(("ruby-yard" ,ruby-yard)))
5258 (synopsis "Ruby wrapper for Linux's inotify")
5259 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5260kernel subsystem for monitoring changes to files and directories.")
5261 (home-page "https://github.com/nex3/rb-inotify")
5262 (license license:expat)))
5263
a75bdfce
RW
5264(define-public ruby-pry-editline
5265 (package
5266 (name "ruby-pry-editline")
5267 (version "1.1.2")
5268 (source (origin
5269 (method url-fetch)
5270 (uri (rubygems-uri "pry-editline" version))
5271 (sha256
5272 (base32
5273 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5274 (build-system ruby-build-system)
5275 (arguments `(#:tests? #f)) ; no tests included
5276 (native-inputs
5277 `(("bundler" ,bundler)))
5278 (synopsis "Open the current REPL line in an editor")
5279 (description
5280 "This gem provides a plugin for the Ruby REPL to enable opening the
5281current line in an external editor.")
5282 (home-page "https://github.com/tpope/pry-editline")
5283 (license license:expat)))
5284
d3b20a02
RW
5285(define-public ruby-sdoc
5286 (package
5287 (name "ruby-sdoc")
6700dc33 5288 (version "1.1.0")
d3b20a02
RW
5289 (source (origin
5290 (method url-fetch)
5291 (uri (rubygems-uri "sdoc" version))
5292 (sha256
5293 (base32
6700dc33 5294 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
d3b20a02
RW
5295 (build-system ruby-build-system)
5296 (arguments
5297 `(#:phases
5298 (modify-phases %standard-phases
fc29d5e6 5299 (add-before 'check 'set-rubylib-and-patch-gemfile
d3b20a02 5300 (lambda _
fdf3a68d 5301 (setenv "RUBYLIB" "lib")
fc29d5e6
BW
5302 (substitute* "sdoc.gemspec"
5303 (("s.add_runtime_dependency.*") "\n")
5304 (("s.add_dependency.*") "\n"))
5305 (substitute* "Gemfile"
5306 (("gem \"rake\".*")
5307 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
d3b20a02
RW
5308 #t)))))
5309 (propagated-inputs
5310 `(("ruby-json" ,ruby-json)))
5311 (native-inputs
5312 `(("bundler" ,bundler)
fdf3a68d
BW
5313 ("ruby-minitest" ,ruby-minitest)
5314 ("ruby-hoe" ,ruby-hoe)))
d3b20a02
RW
5315 (synopsis "Generate searchable RDoc documentation")
5316 (description
5317 "SDoc is an RDoc documentation generator to build searchable HTML
5318documentation for Ruby code.")
7bf837fd 5319 (home-page "https://github.com/voloko/sdoc")
d3b20a02
RW
5320 (license license:expat)))
5321
70b002aa
RW
5322(define-public ruby-tins
5323 (package
5324 (name "ruby-tins")
fbefd6ff 5325 (version "1.15.0")
70b002aa
RW
5326 (source (origin
5327 (method url-fetch)
5328 (uri (rubygems-uri "tins" version))
5329 (sha256
5330 (base32
fbefd6ff 5331 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
70b002aa
RW
5332 (build-system ruby-build-system)
5333 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5334 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5335 ;; the gemspec.
5336 (arguments
5337 `(#:tests? #f ; there are no tests
5338 #:phases
5339 (modify-phases %standard-phases
5340 (replace 'build
5341 (lambda _
5342 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5343 ;; causes an error.
5344 (substitute* "tins.gemspec"
5345 (("\"lib/spruz\", ") ""))
9923d5a4 5346 (invoke "gem" "build" "tins.gemspec"))))))
70b002aa
RW
5347 (synopsis "Assorted tools for Ruby")
5348 (description "Tins is a Ruby library providing assorted tools.")
5349 (home-page "https://github.com/flori/tins")
5350 (license license:expat)))
5351
bc8277e4
RW
5352(define-public ruby-gem-hadar
5353 (package
5354 (name "ruby-gem-hadar")
3fd577e3 5355 (version "1.9.1")
bc8277e4
RW
5356 (source (origin
5357 (method url-fetch)
5358 (uri (rubygems-uri "gem_hadar" version))
5359 (sha256
5360 (base32
3fd577e3 5361 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
bc8277e4
RW
5362 (build-system ruby-build-system)
5363 ;; This gem needs itself at development time. We disable rebuilding of the
5364 ;; gemspec to avoid this loop.
5365 (arguments
5366 `(#:tests? #f ; there are no tests
5367 #:phases
5368 (modify-phases %standard-phases
5369 (replace 'build
5370 (lambda _
9923d5a4 5371 (invoke "gem" "build" "gem_hadar.gemspec"))))))
bc8277e4
RW
5372 (propagated-inputs
5373 `(("git" ,git)
5374 ("ruby-tins" ,ruby-tins)
3fd577e3 5375 ("ruby-yard" ,ruby-yard)))
bc8277e4
RW
5376 (synopsis "Library for the development of Ruby gems")
5377 (description
5378 "This library contains some useful functionality to support the
5379development of Ruby gems.")
5380 (home-page "https://github.com/flori/gem_hadar")
5381 (license license:expat)))
5382
d8cafe29
RW
5383(define-public ruby-minitest-tu-shim
5384 (package
5385 (name "ruby-minitest-tu-shim")
5386 (version "1.3.3")
5387 (source (origin
5388 (method url-fetch)
5389 (uri (rubygems-uri "minitest_tu_shim" version))
5390 (sha256
5391 (base32
5392 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5393 (build-system ruby-build-system)
5394 (arguments
5395 `(#:phases
5396 (modify-phases %standard-phases
5397 (add-after 'unpack 'fix-test-include-path
5398 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 5399 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
761e7042
BW
5400 (substitute* "Rakefile"
5401 (("Hoe\\.add_include_dirs .*")
5402 (string-append "Hoe.add_include_dirs \""
3cb3fa67 5403 minitest "/lib/ruby/vendor_ruby"
761e7042
BW
5404 "/gems/minitest-"
5405 ,(package-version ruby-minitest-4)
5406 "/lib" "\""))))
5407 #t))
d8cafe29
RW
5408 (add-before 'check 'fix-test-assumptions
5409 (lambda _
5410 ;; The test output includes the file name, so a couple of tests
5411 ;; fail. Changing the regular expressions slightly fixes this
5412 ;; problem.
5413 (substitute* "test/test_mini_test.rb"
5414 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5415 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5416 (("gsub\\(/.*, 'FILE:LINE'\\)")
5417 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5418 #t)))))
5419 (propagated-inputs
5420 `(("ruby-minitest-4" ,ruby-minitest-4)))
5421 (native-inputs
5422 `(("ruby-hoe" ,ruby-hoe)))
5423 (synopsis "Adapter library between minitest and test/unit")
5424 (description
5425 "This library bridges the gap between the small and fast minitest and
5426Ruby's large and slower test/unit.")
5427 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5428 (license license:expat)))
5429
fd83a212
RW
5430(define-public ruby-term-ansicolor
5431 (package
5432 (name "ruby-term-ansicolor")
f3a6311a 5433 (version "1.6.0")
fd83a212
RW
5434 (source (origin
5435 (method url-fetch)
5436 (uri (rubygems-uri "term-ansicolor" version))
5437 (sha256
5438 (base32
f3a6311a 5439 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
fd83a212
RW
5440 (build-system ruby-build-system)
5441 ;; Rebuilding the gemspec seems to require git, even though this is not a
5442 ;; git repository, so we just build the gem from the existing gemspec.
5443 (arguments
5444 `(#:phases
5445 (modify-phases %standard-phases
39ecb977
CB
5446 (add-after 'unpack 'fix-test
5447 (lambda -
5448 (substitute* "tests/hsl_triple_test.rb"
5449 (("0\\\\\\.0%")
5450 "0\\.?0?%"))))
fd83a212
RW
5451 (replace 'build
5452 (lambda _
9923d5a4 5453 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
fd83a212
RW
5454 (propagated-inputs
5455 `(("ruby-tins" ,ruby-tins)))
5456 (native-inputs
5457 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5458 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5459 (synopsis "Ruby library to control the attributes of terminal output")
5460 (description
5461 "This Ruby library uses ANSI escape sequences to control the attributes
5462of terminal output.")
2f3800e5 5463 (home-page "https://flori.github.io/term-ansicolor/")
fd83a212
RW
5464 ;; There is no mention of the "or later" clause.
5465 (license license:gpl2)))
5466
a714c30f
CB
5467(define-public ruby-terraform
5468 (package
5469 (name "ruby-terraform")
5470 (version "0.22.0")
5471 (source
5472 (origin
5473 (method url-fetch)
5474 (uri (rubygems-uri "ruby-terraform" version))
5475 (sha256
5476 (base32
5477 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5478 (build-system ruby-build-system)
5479 (arguments
5480 '(#:tests? #f)) ; No included tests
5481 (propagated-inputs
5482 `(("ruby-lino" ,ruby-lino)))
5483 (synopsis "Ruby wrapper around the Terraform command line interface")
5484 (description
5485 "This package provides a Ruby wrapper around the Terraform command line
5486interface so that Terraform can be more easily invoked from Ruby code.")
5487 (home-page "https://github.com/infrablocks/ruby_terraform")
5488 (license license:expat)))
5489
6e376ca4
RW
5490(define-public ruby-pstree
5491 (package
5492 (name "ruby-pstree")
5493 (version "0.1.0")
5494 (source (origin
5495 (method url-fetch)
5496 (uri (rubygems-uri "pstree" version))
5497 (sha256
5498 (base32
5499 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5500 (build-system ruby-build-system)
5501 (native-inputs
5502 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5503 ("bundler" ,bundler)))
5504 (synopsis "Create a process tree data structure")
5505 (description
5506 "This library uses the output of the @code{ps} command to create a
5507process tree data structure for the current host.")
2f3800e5 5508 (home-page "https://github.com/flori/pstree")
6e376ca4
RW
5509 ;; There is no mention of the "or later" clause.
5510 (license license:gpl2)))
5511
53239b5f
RW
5512(define-public ruby-utils
5513 (package
5514 (name "ruby-utils")
cd698b6e 5515 (version "0.9.0")
53239b5f
RW
5516 (source (origin
5517 (method url-fetch)
5518 (uri (rubygems-uri "utils" version))
5519 (sha256
5520 (base32
cd698b6e 5521 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
53239b5f
RW
5522 (build-system ruby-build-system)
5523 (propagated-inputs
5524 `(("ruby-tins" ,ruby-tins)
5525 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5526 ("ruby-pstree" ,ruby-pstree)
5527 ("ruby-pry-editline" ,ruby-pry-editline)))
5528 (native-inputs
5529 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5530 ("bundler" ,bundler)))
5531 (synopsis "Command line tools for working with Ruby")
5532 (description
5533 "This package provides assorted command line tools that may be useful
5534when working with Ruby code.")
5535 (home-page "https://github.com/flori/utils")
5536 ;; There is no mention of the "or later" clause.
5537 (license license:gpl2)))
5538
433f10b5
CB
5539(define-public ruby-jaro-winkler
5540 (package
5541 (name "ruby-jaro-winkler")
37b23e44 5542 (version "1.5.4")
433f10b5
CB
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (rubygems-uri "jaro_winkler" version))
5547 (sha256
37b23e44 5548 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
433f10b5
CB
5549 (build-system ruby-build-system)
5550 (arguments
37b23e44 5551 '(#:tests? #f)) ; no included tests
433f10b5
CB
5552 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5553 (description
5554 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5555algorithm. It is written as a C extension and will fallback to a pure Ruby
5556implementation on platforms where this is unsupported.")
5557 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5558 (license license:expat)))
5559
c99e2247
DT
5560(define-public ruby-json
5561 (package
5562 (name "ruby-json")
a281acce 5563 (version "2.1.0")
c99e2247
DT
5564 (source
5565 (origin
5566 (method url-fetch)
5567 (uri (rubygems-uri "json" version))
5568 (sha256
5569 (base32
a281acce 5570 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
c99e2247
DT
5571 (build-system ruby-build-system)
5572 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5573 (synopsis "JSON library for Ruby")
5574 (description "This Ruby library provides a JSON implementation written as
5575a native C extension.")
5576 (home-page "http://json-jruby.rubyforge.org/")
5577 (license (list license:ruby license:gpl2)))) ; GPL2 only
5ff89a1b 5578
763624f5
RW
5579(define-public ruby-json-pure
5580 (package
5581 (name "ruby-json-pure")
1c65d99f 5582 (version "2.2.0")
763624f5
RW
5583 (source (origin
5584 (method url-fetch)
5585 (uri (rubygems-uri "json_pure" version))
5586 (sha256
5587 (base32
1c65d99f 5588 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
763624f5
RW
5589 (build-system ruby-build-system)
5590 (arguments
ac01cb07 5591 `(#:phases
763624f5 5592 (modify-phases %standard-phases
ac01cb07 5593 (add-after 'unpack 'fix-rakefile
763624f5 5594 (lambda _
ac01cb07
BW
5595 (substitute* "Rakefile"
5596 ;; Since this is not a git repository, do not call 'git'.
5597 (("`git ls-files`") "`find . -type f |sort`")
5598 ;; Loosen dependency constraint.
5599 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5600 #t))
5601 (add-after 'replace-git-ls-files 'regenerate-gemspec
5602 (lambda _
5603 ;; Regenerate gemspec so loosened dependency constraints are
5604 ;; propagated.
17cfb7ae
CB
5605 (invoke "rake" "gemspec")))
5606 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5607 (lambda _
5608 ;; This gemspec doesn't look to be generated by the above
5609 ;; command, so patch it separately.
5610 (substitute* "json-java.gemspec"
5611 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5612 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5613 #t)))))
763624f5 5614 (native-inputs
ac01cb07 5615 `(("bundler" ,bundler)
0c9f73cd
TGR
5616 ("ragel" ,ragel)
5617 ("ruby-simplecov" ,ruby-simplecov)
5618 ("ruby-test-unit" ,ruby-test-unit)))
763624f5
RW
5619 (synopsis "JSON implementation in pure Ruby")
5620 (description
5621 "This package provides a JSON implementation written in pure Ruby.")
1c65d99f 5622 (home-page "https://flori.github.com/json/")
763624f5
RW
5623 (license license:ruby)))
5624
2a8581ac
CB
5625(define-public ruby-jwt
5626 (package
5627 (name "ruby-jwt")
5628 (version "2.1.0")
5629 (source
5630 (origin
5631 (method url-fetch)
5632 (uri (rubygems-uri "jwt" version))
5633 (sha256
5634 (base32
5635 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
5636 (build-system ruby-build-system)
5637 (arguments
5638 '(#:test-target "test"
5639 #:phases
5640 (modify-phases %standard-phases
5641 (add-after 'unpack 'remove-unnecessary-dependencies
5642 (lambda _
5643 (substitute* "spec/spec_helper.rb"
5644 (("require 'simplecov.*") "\n")
5645 ;; Use [].each to disable running the SimpleCov configuration
5646 ;; block
5647 (("SimpleCov\\.configure") "[].each")
5648 (("require 'codeclimate-test-reporter'") "")
5649 (("require 'codacy-coverage'") "")
5650 (("Codacy::Reporter\\.start") ""))
5651 #t)))))
5652 (native-inputs
5653 `(("bundler" ,bundler)
5654 ("ruby-rspec" ,ruby-rspec)
5655 ("ruby-rbnacl" ,ruby-rbnacl)))
5656 (synopsis "Ruby implementation of the JSON Web Token standard")
5657 (description
5658 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
5659@acronym{JWT, JSON Web Token} standard.")
5660 (home-page "https://github.com/jwt/ruby-jwt")
5661 (license license:expat)))
5662
16b324cd
RW
5663;; Even though this package only provides bindings for a Mac OSX API it is
5664;; required by "ruby-listen" at runtime.
5665(define-public ruby-rb-fsevent
5666 (package
5667 (name "ruby-rb-fsevent")
b0ef15ed 5668 (version "0.10.3")
16b324cd
RW
5669 (source (origin
5670 (method url-fetch)
5671 (uri (rubygems-uri "rb-fsevent" version))
5672 (sha256
5673 (base32
b0ef15ed 5674 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
16b324cd
RW
5675 (build-system ruby-build-system)
5676 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
5677 ;; "listen", which needs "rb-fsevent" at runtime.
5678 (arguments `(#:tests? #f))
5679 (synopsis "FSEvents API with signals catching")
5680 (description
5681 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
5682 (home-page "https://rubygems.org/gems/rb-fsevent")
5683 (license license:expat)))
5684
b86be2ad
RW
5685(define-public ruby-listen
5686 (package
5687 (name "ruby-listen")
12341d34 5688 (version "3.2.0")
b86be2ad
RW
5689 (source
5690 (origin
35602819
CB
5691 ;; The gem does not include a Rakefile, so fetch from the Git
5692 ;; repository.
5693 (method git-fetch)
5694 (uri (git-reference
b0e7b699 5695 (url "https://github.com/guard/listen")
35602819
CB
5696 (commit (string-append "v" version))))
5697 (file-name (git-file-name name version))
b86be2ad
RW
5698 (sha256
5699 (base32
12341d34 5700 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
b86be2ad 5701 (build-system ruby-build-system)
35602819
CB
5702 (arguments
5703 `(#:test-target "spec"
5704 #:phases
5705 (modify-phases %standard-phases
5706 (add-after 'unpack 'fix-files-in-gemspec
5707 (lambda _
5708 (substitute* "listen.gemspec"
5709 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
5710 #t))
5711 (add-before 'check 'remove-unnecessary-dependencies'
5712 (lambda _
5713 (substitute* "Rakefile"
5714 ;; Rubocop is for code linting, and is unnecessary for running
5715 ;; the tests.
5716 ((".*rubocop.*") ""))
5717 #t)))))
5718 (native-inputs
5719 `(("bundler" ,bundler)
5720 ("ruby-rspec" ,ruby-rspec)))
5721 (inputs
5722 `(;; ruby-thor is used for the command line interface, and is referenced
5723 ;; in the wrapper, and therefore just needs to be an input.
5724 ("ruby-thor" ,ruby-thor)))
b86be2ad 5725 (propagated-inputs
35602819
CB
5726 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
5727 ("ruby-rb-inotify" ,ruby-rb-inotify)
5728 ("ruby-dep" ,ruby-dep)))
b86be2ad
RW
5729 (synopsis "Listen to file modifications")
5730 (description "The Listen gem listens to file modifications and notifies
5731you about the changes.")
5732 (home-page "https://github.com/guard/listen")
5733 (license license:expat)))
5734
8d3c5ff6
CB
5735(define-public ruby-loofah
5736 (package
5737 (name "ruby-loofah")
5738 (version "2.2.3")
5739 (source
5740 (origin
5741 (method url-fetch)
5742 (uri (rubygems-uri "loofah" version))
5743 (sha256
5744 (base32
5745 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
5746 (build-system ruby-build-system)
5747 (arguments
5748 '(#:phases
5749 (modify-phases %standard-phases
5750 (add-after 'unpack 'remove-unnecessary-dependencies
5751 (lambda _
5752 ;; concourse is a development tool which is unused, so remove it
5753 ;; so it's not required.
5754 (substitute* "Gemfile"
5755 ((".*\"concourse\".*") "\n"))
5756 (substitute* "Rakefile"
5757 (("require 'concourse'") "")
5758 (("Concourse\\.new.*") "\n"))
5759 #t)))))
5760 (native-inputs
5761 `(("ruby-hoe" ,ruby-hoe)
5762 ("ruby-rr" ,ruby-rr)))
5763 (propagated-inputs
5764 `(("ruby-nokogiri" ,ruby-nokogiri)
5765 ("ruby-crass" ,ruby-crass)))
5766 (synopsis "Ruby library for manipulating and transforming HTML/XML")
5767 (description
5768 "Loofah is a general library for manipulating and transforming HTML/XML
5769documents and fragments. It's built on top of Nokogiri and libxml2.")
5770 (home-page "https://github.com/flavorjones/loofah")
5771 (license license:expat)))
5772
5ff89a1b
DT
5773(define-public ruby-activesupport
5774 (package
5775 (name "ruby-activesupport")
bcf1fe5b 5776 (version "5.2.2.1")
5ff89a1b
DT
5777 (source
5778 (origin
5779 (method url-fetch)
5780 (uri (rubygems-uri "activesupport" version))
5781 (sha256
5782 (base32
bcf1fe5b 5783 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
5ff89a1b
DT
5784 (build-system ruby-build-system)
5785 (arguments
2af45e50
BW
5786 `(#:phases
5787 (modify-phases %standard-phases
5788 (replace 'check
5789 (lambda _
9923d5a4
TGR
5790 ;; There are no tests, instead attempt to load the library.
5791 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
5ff89a1b 5792 (propagated-inputs
2af45e50
BW
5793 `(("ruby-concurrent" ,ruby-concurrent)
5794 ("ruby-i18n" ,ruby-i18n)
5ff89a1b 5795 ("ruby-minitest" ,ruby-minitest)
606ee9a1
BW
5796 ("ruby-tzinfo" ,ruby-tzinfo)
5797 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
5ff89a1b
DT
5798 (synopsis "Ruby on Rails utility library")
5799 (description "ActiveSupport is a toolkit of support libraries and Ruby
5800core extensions extracted from the Rails framework. It includes support for
5801multibyte strings, internationalization, time zones, and testing.")
5802 (home-page "http://www.rubyonrails.org")
5803 (license license:expat)))
f847ad7b 5804
3996f0aa
RW
5805(define-public ruby-crass
5806 (package
5807 (name "ruby-crass")
a84a185a
MB
5808 (version "1.0.6")
5809 (home-page "https://github.com/rgrove/crass")
3996f0aa 5810 (source (origin
a84a185a
MB
5811 ;; The gem does not contain tests, so pull from git.
5812 (method git-fetch)
5813 (uri (git-reference
5814 (url home-page)
5815 (commit (string-append "v" version))))
5816 (file-name (git-file-name name version))
3996f0aa
RW
5817 (sha256
5818 (base32
a84a185a 5819 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
3996f0aa 5820 (build-system ruby-build-system)
3996f0aa
RW
5821 (synopsis "Pure Ruby CSS parser")
5822 (description
5823 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
3996f0aa
RW
5824 (license license:expat)))
5825
c2c4e5b2 5826(define-public ruby-nokogumbo
2e366b0a
MB
5827 (package
5828 (name "ruby-nokogumbo")
5829 (version "2.0.2")
5830 (source (origin
5831 ;; We use the git reference, because there's no Rakefile in the
5832 ;; published gem and the tarball on Github is outdated.
5833 (method git-fetch)
5834 (uri (git-reference
b0e7b699 5835 (url "https://github.com/rubys/nokogumbo")
2e366b0a
MB
5836 (commit (string-append "v" version))))
5837 (file-name (string-append name "-" version "-checkout"))
5838 (sha256
5839 (base32
5840 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
5841 (build-system ruby-build-system)
5842 (native-inputs
5843 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
5844 (inputs
5845 `(("gumbo-parser" ,gumbo-parser)))
5846 (propagated-inputs
5847 `(("ruby-nokogiri" ,ruby-nokogiri)))
5848 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
5849 (description
5850 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
c2c4e5b2 5851access the result as a Nokogiri parsed document.")
2e366b0a
MB
5852 (home-page "https://github.com/rubys/nokogumbo/")
5853 (license license:asl2.0)))
c2c4e5b2 5854
d56ff88b
RW
5855(define-public ruby-sanitize
5856 (package
5857 (name "ruby-sanitize")
f362b53c
MB
5858 (version "5.1.0")
5859 (home-page "https://github.com/rgrove/sanitize")
d56ff88b 5860 (source (origin
f362b53c 5861 (method git-fetch)
d56ff88b 5862 ;; The gem does not include the Rakefile, so we download the
f362b53c
MB
5863 ;; source from Github.
5864 (uri (git-reference
5865 (url home-page)
5866 (commit (string-append "v" version))))
5867 (file-name (git-file-name name version))
5868 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
d56ff88b
RW
5869 (sha256
5870 (base32
f362b53c 5871 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
d56ff88b
RW
5872 (build-system ruby-build-system)
5873 (propagated-inputs
5874 `(("ruby-crass" ,ruby-crass)
5875 ("ruby-nokogiri" ,ruby-nokogiri)
5876 ("ruby-nokogumbo" ,ruby-nokogumbo)))
5877 (native-inputs
f362b53c 5878 `(("ruby-minitest" ,ruby-minitest)))
d56ff88b
RW
5879 (synopsis "Whitelist-based HTML and CSS sanitizer")
5880 (description
5881 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
5882acceptable elements, attributes, and CSS properties, Sanitize will remove all
5883unacceptable HTML and/or CSS from a string.")
d56ff88b
RW
5884 (license license:expat)))
5885
ed4b6b18
BW
5886(define-public ruby-oj
5887 (package
5888 (name "ruby-oj")
93dfdec5 5889 (version "3.10.1")
ed4b6b18
BW
5890 (source
5891 (origin
b09ef660 5892 (method git-fetch)
ed4b6b18
BW
5893 ;; Version on rubygems.org does not contain Rakefile, so download from
5894 ;; GitHub instead.
b09ef660
EF
5895 (uri (git-reference
5896 (url "https://github.com/ohler55/oj")
5897 (commit (string-append "v" version))))
5898 (file-name (git-file-name name version))
ed4b6b18
BW
5899 (sha256
5900 (base32
93dfdec5 5901 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
ed4b6b18
BW
5902 (build-system ruby-build-system)
5903 (arguments
5904 '(#:test-target "test_all"
5905 #:phases
5906 (modify-phases %standard-phases
5907 (add-before 'check 'disable-bundler
5908 (lambda _
5909 (substitute* "Rakefile"
5910 (("Bundler\\.with_clean_env") "1.times")
5911 (("bundle exec ") "")))))))
5912 (native-inputs
5913 `(("bundler" ,bundler)
5914 ("ruby-rspec" ,ruby-rspec)
5915 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5916 (synopsis "JSON parser for Ruby optimized for speed")
5917 (description
5918 "Oj is a JSON parser and generator for Ruby, where the encoding and
5919decoding of JSON is implemented as a C extension to Ruby.")
b09ef660 5920 (home-page "http://www.ohler.com/oj/")
ed4b6b18
BW
5921 (license (list license:expat ; Ruby code
5922 license:bsd-3)))) ; extension code
5923
f847ad7b
DT
5924(define-public ruby-ox
5925 (package
5926 (name "ruby-ox")
263c0dbf 5927 (version "2.6.0")
f847ad7b
DT
5928 (source
5929 (origin
5930 (method url-fetch)
5931 (uri (rubygems-uri "ox" version))
5932 (sha256
5933 (base32
263c0dbf 5934 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
f847ad7b
DT
5935 (build-system ruby-build-system)
5936 (arguments
5937 '(#:tests? #f)) ; no tests
5938 (synopsis "Optimized XML library for Ruby")
5939 (description
5940 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
5941written as a native C extension. It was designed to be an alternative to
5942Nokogiri and other Ruby XML parsers for generic XML parsing and as an
5943alternative to Marshal for Object serialization. ")
5944 (home-page "http://www.ohler.com/ox")
5945 (license license:expat)))
4a9e0585 5946
0c4e7625
RW
5947(define-public ruby-redcloth
5948 (package
5949 (name "ruby-redcloth")
2a91494e 5950 (version "4.3.2")
0c4e7625
RW
5951 (source (origin
5952 (method url-fetch)
5953 (uri (rubygems-uri "RedCloth" version))
5954 (sha256
5955 (base32
2a91494e 5956 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
0c4e7625
RW
5957 (build-system ruby-build-system)
5958 (arguments
5959 `(#:tests? #f ; no tests
5960 #:phases
5961 (modify-phases %standard-phases
5962 ;; Redcloth has complicated rake tasks to build various versions for
5963 ;; multiple targets using RVM. We don't want this so we just use the
5964 ;; existing gemspec.
5965 (replace 'build
5966 (lambda _
9923d5a4 5967 (invoke "gem" "build" "redcloth.gemspec"))))))
0c4e7625
RW
5968 (native-inputs
5969 `(("bundler" ,bundler)
5970 ("ruby-diff-lcs" ,ruby-diff-lcs)
5971 ("ruby-rspec-2" ,ruby-rspec-2)))
5972 (synopsis "Textile markup language parser for Ruby")
5973 (description
5974 "RedCloth is a Ruby parser for the Textile markup language.")
5975 (home-page "http://redcloth.org")
5976 (license license:expat)))
5977
4a9e0585
DT
5978(define-public ruby-pg
5979 (package
5980 (name "ruby-pg")
ffc4869e 5981 (version "1.1.4")
4a9e0585
DT
5982 (source
5983 (origin
5984 (method url-fetch)
5985 (uri (rubygems-uri "pg" version))
5986 (sha256
5987 (base32
ffc4869e 5988 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
4a9e0585
DT
5989 (build-system ruby-build-system)
5990 (arguments
5991 '(#:test-target "spec"))
5992 (native-inputs
5993 `(("ruby-rake-compiler" ,ruby-rake-compiler)
5994 ("ruby-hoe" ,ruby-hoe)
5995 ("ruby-rspec" ,ruby-rspec)))
5996 (inputs
ffc4869e 5997 `(("postgresql" ,postgresql)))
4a9e0585
DT
5998 (synopsis "Ruby interface to PostgreSQL")
5999 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
4db80f8b 6000with PostgreSQL 9.0 and later.")
4a9e0585
DT
6001 (home-page "https://bitbucket.org/ged/ruby-pg")
6002 (license license:ruby)))
468e5657
DT
6003
6004(define-public ruby-byebug
6005 (package
6006 (name "ruby-byebug")
d5489a61 6007 (version "9.0.6")
468e5657
DT
6008 (source
6009 (origin
6010 (method url-fetch)
6011 (uri (rubygems-uri "byebug" version))
6012 (sha256
6013 (base32
d5489a61 6014 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
468e5657
DT
6015 (build-system ruby-build-system)
6016 (arguments
6017 '(#:tests? #f)) ; no tests
6018 (synopsis "Debugger for Ruby 2")
6019 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
6020TracePoint C API for execution control and the Debug Inspector C API for call
6021stack navigation. The core component provides support that front-ends can
6022build on. It provides breakpoint handling and bindings for stack frames among
6023other things and it comes with a command line interface.")
7bf837fd 6024 (home-page "https://github.com/deivid-rodriguez/byebug")
468e5657 6025 (license license:bsd-2)))
64b6ccc3 6026
7aa00628
MC
6027;;; TODO: Make it the default byebug in core-updates.
6028(define-public ruby-byebug-11
6029 (package
6030 (inherit ruby-byebug)
6031 (name "ruby-byebug")
6032 (version "11.1.3")
6033 (source
6034 (origin
6035 (method git-fetch)
6036 (uri (git-reference
b0e7b699 6037 (url "https://github.com/deivid-rodriguez/byebug")
7aa00628
MC
6038 (commit (string-append "v" version))))
6039 (file-name (git-file-name name version))
6040 (sha256
6041 (base32
6042 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
6043 (modules '((guix build utils)))
6044 (snippet
6045 '(begin
6046 ;; Remove wrappers that try to setup a bundle environment.
6047 (with-directory-excursion "bin"
6048 (for-each delete-file '("bundle" "rake" "rubocop"))
6049 ;; ruby-minitest doesn't come with a launcher, so fix the one
6050 ;; provided.
6051 (substitute* "minitest"
6052 (("load File\\.expand_path\\(\"bundle\".*") "")
6053 (("require \"bundler/setup\".*") "")))
6054 #t))))
6055 (arguments
6056 `(#:tests? #t
6057 #:phases
6058 (modify-phases %standard-phases
6059 (add-after 'unpack 'skip-tmp-path-sensitive-test
6060 (lambda _
6061 (substitute* "test/commands/where_test.rb"
6062 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
6063 "unless true\n"))
6064 #t))
6065 (add-before 'build 'compile
6066 (lambda _
6067 (invoke "rake" "compile")))
6068 (add-before 'check 'set-home
6069 (lambda _
6070 (setenv "HOME" (getcwd))
6071 #t)))))
6072 (native-inputs
6073 `(("bundler" ,bundler)
6074 ("ruby-chandler" ,ruby-chandler)
6075 ("ruby-minitest" ,ruby-minitest)
6076 ("ruby-pry" ,ruby-pry)
6077 ("ruby-rake-compiler" ,ruby-rake-compiler)
6078 ("ruby-rubocop" ,ruby-rubocop)
6079 ("ruby-yard" ,ruby-yard)))))
6080
5799bc2b
RW
6081(define-public ruby-netrc
6082 (package
6083 (name "ruby-netrc")
6084 (version "0.11.0")
6085 (source (origin
6086 (method url-fetch)
6087 (uri (rubygems-uri "netrc" version))
6088 (sha256
6089 (base32
6090 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6091 (build-system ruby-build-system)
6092 (arguments
6093 `(#:phases
6094 (modify-phases %standard-phases
6095 (replace 'check
6096 ;; There is no Rakefile and minitest can only run one file at once,
6097 ;; so we have to iterate over all test files.
6098 (lambda _
9923d5a4
TGR
6099 (map (lambda (file)
6100 (invoke "ruby" "-Itest" file))
6101 (find-files "./test" "test_.*\\.rb")))))))
5799bc2b
RW
6102 (native-inputs
6103 `(("ruby-minitest" ,ruby-minitest)))
6104 (synopsis "Library to read and update netrc files")
6105 (description
6106 "This library can read and update netrc files, preserving formatting
6107including comments and whitespace.")
6108 (home-page "https://github.com/geemus/netrc")
6109 (license license:expat)))
6110
3a6989ce
RW
6111(define-public ruby-unf-ext
6112 (package
6113 (name "ruby-unf-ext")
14db8f19 6114 (version "0.0.7.6")
3a6989ce
RW
6115 (source (origin
6116 (method url-fetch)
6117 (uri (rubygems-uri "unf_ext" version))
6118 (sha256
6119 (base32
14db8f19 6120 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
3a6989ce 6121 (build-system ruby-build-system)
b809cc9a
RW
6122 (arguments
6123 `(#:phases
6124 (modify-phases %standard-phases
6125 (add-after 'build 'build-ext
14db8f19
MB
6126 (lambda _ (invoke "rake" "compile:unf_ext")))
6127 (add-before 'check 'lose-rake-compiler-dock-dependency
6128 (lambda _
6129 ;; rake-compiler-dock is listed in the gemspec, but only
6130 ;; required when cross-compiling.
6131 (substitute* "unf_ext.gemspec"
6132 ((".*rake-compiler-dock.*") ""))
6133 #t)))))
3a6989ce
RW
6134 (native-inputs
6135 `(("bundler" ,bundler)
6136 ("ruby-rake-compiler" ,ruby-rake-compiler)
6137 ("ruby-test-unit" ,ruby-test-unit)))
6138 (synopsis "Unicode normalization form support library")
6139 (description
6140 "This package provides unicode normalization form support for Ruby.")
6141 (home-page "https://github.com/knu/ruby-unf_ext")
6142 (license license:expat)))
6143
2632a067 6144(define-public ruby-tdiff
5071f17b
BW
6145 ;; Use a newer than released snapshot so that rspec-2 is not required.
6146 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6147 (package
6148 (name "ruby-tdiff")
6149 (version (string-append "0.3.3-1." (string-take commit 8)))
6150 (source (origin
6151 (method git-fetch)
6152 (uri (git-reference
b0e7b699 6153 (url "https://github.com/postmodern/tdiff")
5071f17b
BW
6154 (commit commit)))
6155 (file-name (string-append name "-" version "-checkout"))
6156 (sha256
6157 (base32
6158 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6159 (build-system ruby-build-system)
6160 (native-inputs
6161 `(("ruby-rspec" ,ruby-rspec)
6162 ("ruby-yard" ,ruby-yard)
6163 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6164 (synopsis "Calculate the differences between two tree-like structures")
6165 (description
6166 "This library provides functions to calculate the differences between two
2632a067 6167tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
5071f17b
BW
6168 (home-page "https://github.com/postmodern/tdiff")
6169 (license license:expat))))
2632a067 6170
f60f5002 6171(define-public ruby-nokogiri-diff
5b0c223a
BW
6172 ;; Use a newer than released snapshot so that rspec-2 is not required.
6173 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6174 (package
6175 (name "ruby-nokogiri-diff")
6176 (version (string-append "0.2.0-1." (string-take commit 8)))
6177 (source (origin
6178 (method git-fetch)
6179 (uri (git-reference
b0e7b699 6180 (url "https://github.com/postmodern/nokogiri-diff")
5b0c223a
BW
6181 (commit commit)))
6182 (file-name (string-append name "-" version "-checkout"))
6183 (sha256
6184 (base32
6185 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6186 (build-system ruby-build-system)
6187 (propagated-inputs
6188 `(("ruby-tdiff" ,ruby-tdiff)
6189 ("ruby-nokogiri" ,ruby-nokogiri)))
6190 (native-inputs
6191 `(("ruby-rspec" ,ruby-rspec)
6192 ("ruby-yard" ,ruby-yard)
6193 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6194 (synopsis "Calculate the differences between two XML/HTML documents")
6195 (description
6196 "@code{Nokogiri::Diff} adds the ability to calculate the
f60f5002 6197differences (added or removed nodes) between two XML/HTML documents.")
5b0c223a
BW
6198 (home-page "https://github.com/postmodern/nokogiri-diff")
6199 (license license:expat))))
f60f5002 6200
6dc21310
CB
6201(define-public ruby-racc
6202 (package
6203 (name "ruby-racc")
6204 (version "1.4.14")
6205 (source
6206 (origin
6207 (method url-fetch)
6208 (uri (rubygems-uri "racc" version))
6209 (sha256
6210 (base32
6211 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6212 (build-system ruby-build-system)
6213 (native-inputs
6214 `(("ruby-hoe" ,ruby-hoe)
6215 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6216 (synopsis "LALR(1) parser generator for Ruby")
6217 (description
6218 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6219generates Ruby program.")
6220 (home-page "http://i.loveruby.net/en/projects/racc/")
6221 (license (list
6222 ;; Generally licensed under the LGPL2.1, and some files also
6223 ;; available under the same license as Ruby.
6224 license:lgpl2.1
6225 license:ruby))))
6226
64b6ccc3
DT
6227(define-public ruby-rack
6228 (package
6229 (name "ruby-rack")
288d2480 6230 (version "2.0.6")
64b6ccc3
DT
6231 (source
6232 (origin
83870c32 6233 (method git-fetch)
1db791d5 6234 ;; Download from GitHub so that the patch can be applied.
83870c32
EF
6235 (uri (git-reference
6236 (url "https://github.com/rack/rack")
6237 (commit version)))
6238 (file-name (git-file-name name version))
64b6ccc3
DT
6239 (sha256
6240 (base32
83870c32 6241 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
1db791d5
BW
6242 ;; Ignore test which fails inside the build environment but works
6243 ;; outside.
6244 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
64b6ccc3
DT
6245 (build-system ruby-build-system)
6246 (arguments
6247 '(#:phases
6248 (modify-phases %standard-phases
6249 (add-before 'check 'fix-tests
6250 (lambda _
6251 ;; A few of the tests use the length of a file on disk for
6252 ;; Content-Length and Content-Range headers. However, this file
6253 ;; has a shebang in it which an earlier phase patches, growing
6254 ;; the file size from 193 to 239 bytes when the store prefix is
6255 ;; "/gnu/store".
6256 (let ((size-diff (- (string-length (which "ruby"))
6257 (string-length "/usr/bin/env ruby"))))
6258 (substitute* '("test/spec_file.rb")
6259 (("193")
6260 (number->string (+ 193 size-diff)))
6261 (("bytes(.)22-33" all delimiter)
6262 (string-append "bytes"
6263 delimiter
6264 (number->string (+ 22 size-diff))
6265 "-"
6266 (number->string (+ 33 size-diff))))))
83870c32
EF
6267 #t))
6268 (add-before 'reset-gzip-timestamps 'make-files-writable
6269 (lambda* (#:key outputs #:allow-other-keys)
6270 ;; Make sure .gz files are writable so that the
6271 ;; 'reset-gzip-timestamps' phase can do its work.
6272 (let ((out (assoc-ref outputs "out")))
6273 (for-each make-file-writable
6274 (find-files out "\\.gz$"))
6275 #t))))))
64b6ccc3 6276 (native-inputs
1db791d5
BW
6277 `(("ruby-minitest" ,ruby-minitest)
6278 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6279 ("which" ,which)))
6280 (propagated-inputs
6281 `(("ruby-concurrent" ,ruby-concurrent)))
64b6ccc3
DT
6282 (synopsis "Unified web application interface for Ruby")
6283 (description "Rack provides a minimal, modular and adaptable interface for
6284developing web applications in Ruby. By wrapping HTTP requests and responses,
6285it unifies the API for web servers, web frameworks, and software in between
6286into a single method call.")
2f3800e5 6287 (home-page "https://rack.github.io/")
64b6ccc3 6288 (license license:expat)))
62e4cc5a 6289
20a0f804
BW
6290(define-public ruby-rack-test
6291 (package
6292 (name "ruby-rack-test")
6293 (version "0.8.3")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (rubygems-uri "rack-test" version))
6298 (sha256
6299 (base32
6300 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6301 (build-system ruby-build-system)
6302 (arguments
6303 ;; Disable tests because of circular dependencies: requires sinatra,
6304 ;; which requires rack-protection, which requires rack-test. Instead
6305 ;; simply require the library.
6306 `(#:phases
6307 (modify-phases %standard-phases
6308 (replace 'check
6309 (lambda _
6310 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6311 (propagated-inputs
6312 `(("ruby-rack" ,ruby-rack)))
6313 (synopsis "Testing API for Rack applications")
6314 (description
6315 "Rack::Test is a small, simple testing API for Rack applications. It can
6316be used on its own or as a reusable starting point for Web frameworks and
6317testing libraries to build on.")
6318 (home-page "https://github.com/rack-test/rack-test")
6319 (license license:expat)))
6320
a0a7e690
BW
6321(define-public ruby-rack-protection
6322 (package
6323 (name "ruby-rack-protection")
3355e49c 6324 (version "2.0.5")
a0a7e690
BW
6325 (source
6326 (origin
6327 (method url-fetch)
6328 (uri (rubygems-uri "rack-protection" version))
6329 (sha256
6330 (base32
3355e49c 6331 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
a0a7e690
BW
6332 (build-system ruby-build-system)
6333 (arguments
fafeeaa2 6334 '(;; Tests missing from the gem.
a0a7e690
BW
6335 #:tests? #f))
6336 (propagated-inputs
6337 `(("ruby-rack" ,ruby-rack)))
6338 (native-inputs
6339 `(("bundler" ,bundler)
6340 ("ruby-rspec" ,ruby-rspec-2)
6341 ("ruby-rack-test" ,ruby-rack-test)))
6342 (synopsis "Rack middleware that protects against typical web attacks")
6343 (description "Rack middleware that can be used to protect against typical
6344web attacks. It can protect all Rack apps, including Rails. For instance, it
6345protects against cross site request forgery, cross site scripting,
6346clickjacking, directory traversal, session hijacking and IP spoofing.")
6347 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6348 (license license:expat)))
6349
6edabcb2
CB
6350(define-public ruby-rainbow
6351 (package
6352 (name "ruby-rainbow")
6353 (version "3.0.0")
6354 (source
6355 (origin
6356 (method url-fetch)
6357 (uri (rubygems-uri "rainbow" version))
6358 (sha256
6359 (base32
6360 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6361 (build-system ruby-build-system)
6362 (arguments
6363 '(#:phases
6364 (modify-phases %standard-phases
6365 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6366 ;; the Rakefile.
6367 (replace 'check
6368 (lambda* (#:key tests? #:allow-other-keys)
6369 (when tests?
6370 (invoke "rspec"))
6371 #t)))))
6372 (native-inputs
6373 `(("bundler" ,bundler)
6374 ("ruby-rspec" ,ruby-rspec)))
6375 (synopsis "Colorize printed text on ANSI terminals")
6376 (description
6377 "@code{rainbow} provides a string presenter object to colorize strings by
6378wrapping them in ANSI escape codes.")
6379 (home-page "https://github.com/sickill/rainbow")
79193b20
CB
6380 (license license:expat)))
6381
6188d643
CB
6382(define-public ruby-rr
6383 (package
6384 (name "ruby-rr")
6385 (version "1.2.1")
6386 (source
6387 (origin
6388 (method url-fetch)
6389 (uri (rubygems-uri "rr" version))
6390 (sha256
6391 (base32
6392 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6393 (build-system ruby-build-system)
6394 (arguments
6395 '(#:tests? #f)) ; test files not included
6396 (native-inputs
6397 `(("bundler" ,bundler)
6398 ("ruby-rspec" ,ruby-rspec)))
6399 (synopsis "Ruby test double framework")
6400 (description
6401 "RR is a test double framework that features a rich selection of double
6402techniques and a terse syntax.")
6403 (home-page "https://rr.github.io/rr/")
6404 (license license:expat)))
6405
79193b20
CB
6406(define-public ruby-rest-client
6407 (package
6408 (name "ruby-rest-client")
6409 (version "2.0.2")
6410 (source
6411 (origin
6412 (method url-fetch)
6413 (uri (rubygems-uri "rest-client" version))
6414 (sha256
6415 (base32
6416 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6417 (build-system ruby-build-system)
6418 (arguments
6419 '(#:phases
6420 (modify-phases %standard-phases
6421 (add-before 'check 'remove-unnecessary-development-dependencies
6422 (lambda _
6423 (substitute* "rest-client.gemspec"
6424 ;; Remove rubocop as it's unused. Rubocop also indirectly
6425 ;; depends on this package through ruby-parser and ruby-ast so
6426 ;; this avoids a dependency loop.
6427 ((".*rubocop.*") "\n")
6428 ;; Remove pry as it's unused, it's a debugging tool
6429 ((".*pry.*") "\n")
6430 ;; Remove an unnecessarily strict rdoc dependency
6431 ((".*rdoc.*") "\n"))
6432 #t))
6433 (add-before 'check 'delete-network-dependent-tests
6434 (lambda _
6435 (delete-file "spec/integration/request_spec.rb")
6436 (delete-file "spec/integration/httpbin_spec.rb")
6437 #t)))))
6438 (propagated-inputs
6439 `(("ruby-http-cookie" ,ruby-http-cookie)
6440 ("ruby-mime-types" ,ruby-mime-types)
6441 ("ruby-netrc" ,ruby-netrc)))
6442 (native-inputs
6443 `(("bundler" ,bundler)
eea094cc
TGR
6444 ("ruby-webmock" ,ruby-webmock-2)
6445 ("ruby-rspec" ,ruby-rspec)))
79193b20
CB
6446 (synopsis "Simple HTTP and REST client for Ruby")
6447 (description
6448 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6449inspired by the Sinatra microframework style of specifying actions:
6450@code{get}, @code{put}, @code{post}, @code{delete}.")
6451 (home-page "https://github.com/rest-client/rest-client")
6edabcb2
CB
6452 (license license:expat)))
6453
5c4c28f8
MC
6454(define-public ruby-rubocop-ast
6455 (package
6456 (name "ruby-rubocop-ast")
6457 (version "0.1.0")
6458 (source
6459 (origin
6460 (method git-fetch) ;no test suite in distributed gem
6461 (uri (git-reference
6462 (url "https://github.com/rubocop-hq/rubocop-ast.git")
6463 (commit (string-append "v" version))))
6464 (file-name (git-file-name name version))
6465 (sha256
6466 (base32
6467 "0nz25z5b76xkgb9sh370hni3l946j07fr05cdwkdj9x7ibgsb6nj"))))
6468 (build-system ruby-build-system)
6469 (arguments
6470 `(#:test-target "spec"
6471 #:phases (modify-phases %standard-phases
6472 (add-after 'unpack 'disable-bundler
6473 (lambda _
6474 (substitute* "Rakefile"
6475 (("Bundler\\.setup.*") "nil\n"))
6476 #t))
6477 (replace 'replace-git-ls-files
6478 (lambda _
6479 (substitute* "rubocop-ast.gemspec"
6480 (("`git ls-files(.*)`" _ files)
6481 (format #f "`find ~a -type f| sort`" files)))
6482 #t)))))
6483 (native-inputs
6484 `(("ruby-bump" ,ruby-bump)
6485 ("ruby-rspec" ,ruby-rspec)))
6486 (propagated-inputs
6487 `(("ruby-parser" ,ruby-parser)))
6488 (synopsis "RuboCop's AST extensions and NodePattern functionality")
6489 (description "Rubocop::AST extends @code{ruby-parser} with classes used
6490by RuboCop to deal with Ruby's Abstract Syntax Tree (AST), in particular:
6491@itemize
6492@item @code{RuboCop::AST::Node}
6493@item @code{RuboCop::AST::NodePattern}
6494@end itemize")
6495 (home-page "https://rubocop.org/")
6496 (license license:expat)))
6497
e098bdae
MC
6498(define-public ruby-rexml
6499 (package
6500 (name "ruby-rexml")
6501 (version "3.2.4")
6502 (source
6503 (origin
6504 (method git-fetch) ;no tests in distributed gem
6505 (uri (git-reference
6506 (url "https://github.com/ruby/rexml.git")
6507 (commit (string-append "v" version))))
6508 (file-name (git-file-name name version))
6509 (sha256
6510 (base32
6511 "0rhjjbkaq2f2cs8hyr2i4yjqpcyl8m0wmr2cypa401m3fvz4221i"))))
6512 (build-system ruby-build-system)
6513 (synopsis "XML toolkit for Ruby")
6514 (description "Inspired by Electric XML library for Java, REXML aims to be
6515easy-to-use API, small and fast. It supports both tree and stream document
6516parsing.")
6517 (home-page "https://github.com/ruby/rexml")
6518 (license license:bsd-2)))
6519
93ec41c6
MC
6520(define-public ruby-character-set
6521 (package
6522 (name "ruby-character-set")
6523 (version "1.4.0")
6524 (source
6525 (origin
6526 (method url-fetch)
6527 (uri (rubygems-uri "character_set" version))
6528 (sha256
6529 (base32
6530 "0affq9n77vwy897ri2zhmfinfagf37hcwwimrccy1bcxan9mj3h3"))))
6531 (build-system ruby-build-system)
6532 (arguments '(#:tests? #f)) ;avoid a cycle with ruby-regexp-parser
6533 (synopsis "Ruby library to manipulate Unicode")
6534 (description "CharacterSet is a C-extended Ruby library to work with sets
6535of Unicode code points. It can read and write these sets in various formats
6536and implements the @code{stdlib} @code{Set} interface for them. It also
6537offers an alternate paradigm of @code{String} processing which grants much
6538better performance than @code{Regexp} and @code{String} methods from the
6539@code{stdlib} where applicable. Many parts can be used independently, e.g.:
6540@itemize
6541@item @code{CharacterSet::Character}
6542@item @code{CharacterSet::Parser}
6543@item @code{CharacterSet::Writer}
6544@item @code{RangeCompressor}
6545@end itemize")
6546 (home-page "https://github.com/jaynetics/character_set")
6547 (license license:expat)))
6548
ac75f1df
MC
6549(define-public ruby-range-compressor
6550 (package
6551 (name "ruby-range-compressor")
6552 (version "1.0.0")
6553 (source
6554 (origin
6555 (method git-fetch)
6556 (uri (git-reference
6557 (url "https://github.com/janosch-x/range_compressor.git")
6558 (commit (string-append "v" version))))
6559 (file-name (git-file-name name version))
6560 (sha256
6561 (base32
6562 "0y8slri2msyyg2szgwgriqd6qw9hkxycssdrcl5lk2dbcq5zvn54"))))
6563 (build-system ruby-build-system)
6564 (arguments
6565 `(#:test-target "spec"
6566 #:phases (modify-phases %standard-phases
6567 (add-after 'extract-gemspec 'strip-version-requirements
6568 (lambda _
6569 (substitute* "range_compressor.gemspec"
6570 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
6571 (string-append stripped "\n")))
6572 #t)))))
6573 (native-inputs
6574 `(("ruby-rspec" ,ruby-rspec)))
6575 (synopsis "Simple arrays of objects to arrays of ranges compressor")
6576 (description "RangeCompresses is a tiny library that allows compressing
6577arrays of objects into arrays of ranges. For example, it can turn the
6578following: @code{[1, 2, 3, 4, 6, 8, 9, 10]} into @code{[1..4, 6..6, 8..10]}.")
6579 (home-page "https://github.com/janosch-x/range_compressor")
6580 (license license:expat)))
6581
8aba0333
MC
6582(define-public ruby-regexp-property-values
6583 (package
6584 (name "ruby-regexp-property-values")
6585 (version "1.0.0")
6586 (source
6587 (origin
6588 (method git-fetch)
6589 (uri (git-reference ;no test suite in distributed gem
6590 (url "https://github.com/jaynetics/regexp_property_values.git")
6591 (commit (string-append "v" version))))
6592 (file-name (git-file-name name version))
6593 (sha256
6594 (base32
6595 "0l3fjmscg1wxn7kc6bl022cc6k5d91pwb7daq1b5w36kvsx52w1j"))))
6596 (build-system ruby-build-system)
6597 (arguments
6598 '(#:test-target "default"))
6599 (native-inputs
6600 `(("ruby-character-set" ,ruby-character-set)
6601 ("ruby-rake-compiler" ,ruby-rake-compiler)
6602 ("ruby-range-compressor" ,ruby-range-compressor)
6603 ("ruby-rspec" ,ruby-rspec)))
6604 (synopsis "Inspect Ruby's regex engine property values")
6605 (description "This small library lets you see which property values are
6606supported by the regular expression engine of the Ruby version you are running
6607and can directly read out their code point ranges. In other words, it
6608determines all supported values for @code{\\p{value}} expressions and what
6609they match.")
6610 (home-page "https://github.com/jaynetics/regexp_property_values")
6611 (license license:expat)))
6612
b6f2a8d1
MC
6613(define-public ruby-regexp-parser
6614 (package
6615 (name "ruby-regexp-parser")
6616 (version "1.7.1")
6617 (source
6618 (origin
6619 (method git-fetch) ;bin/test missing from gem
6620 (uri (git-reference
6621 (url "https://github.com/ammar/regexp_parser.git")
6622 (commit (string-append "v" version))))
6623 (file-name (git-file-name name version))
6624 (sha256
6625 (base32
6626 "0dk9d4vpw31cc06s29fqyr1kq0kipym1mydifkcrnppvpl3pd53r"))))
6627 (build-system ruby-build-system)
6628 (arguments
6629 '(#:test-target "default"
6630 #:phases (modify-phases %standard-phases
6631 (add-before 'build 'compile-scanner.rb
6632 (lambda _
6633 (invoke "rake" "build")
6634 ;; XXX: This is needed otherwise the install
6635 ;; phase fails to delete the installed cached
6636 ;; gem file.
6637 (delete-file-recursively "pkg")
6638 #t)))))
6639 (native-inputs
6640 `(("ragel" ,ragel)
6641 ("ruby-regexp-property-values" ,ruby-regexp-property-values)
6642 ("ruby-rspec" ,ruby-rspec)))
6643 (synopsis "A regular expression parser library for Ruby ")
6644 (description "A Ruby gem for tokenizing, parsing, and transforming regular
6645expressions. It comprises the following components:
6646@itemize
6647@item A scanner/tokenizer based on Ragel,
6648@item A lexer that produces a stream of token objects,
6649@item A parser that produces a tree of Expression objects.
6650@end itemize")
6651 (home-page "https://github.com/ammar/regexp_parser")
6652 (license license:expat)))
6653
12ed6da4
MC
6654(define-public ruby-test-queue
6655 (package
6656 (name "ruby-test-queue")
6657 (version "0.4.2")
6658 (source
6659 (origin
6660 (method url-fetch)
6661 (uri (rubygems-uri "test-queue" version))
6662 (sha256
6663 (base32
6664 "0hvm3n1qrqxqilhqk4rjivw3gcrd08zz1i6am9qzg1ppjxv6f36f"))))
6665 (build-system ruby-build-system)
6666 (arguments
6667 '(#:phases
6668 (modify-phases %standard-phases
6669 (replace 'check
6670 (lambda* (#:key tests? #:allow-other-keys)
6671 (when tests?
6672 (invoke "rspec"))
6673 #t)))))
6674 (native-inputs
6675 `(("ruby-rspec" ,ruby-rspec)))
6676 (synopsis "Minitest/RSpec parallel test runner for CI environments")
6677 (description "The test-queue module is a parallel test runner,
6678built using a centralized queue to ensure optimal distribution of
6679tests between workers. It is specifically optimized for Continuous
6680Integration (CI) environments: build statistics from each run are
6681stored locally and used to sort the queue at the beginning of the next
6682run.")
6683 (home-page "https://github.com/tmm1/test-queue")
6684 (license license:expat)))
6685
5d8fe6de
CB
6686(define-public ruby-rubocop
6687 (package
6688 (name "ruby-rubocop")
c164c402 6689 (version "0.88.0")
5d8fe6de
CB
6690 (source
6691 (origin
c164c402
MC
6692 (method git-fetch) ;no tests in distributed gem
6693 (uri (git-reference
6694 (url "https://github.com/rubocop-hq/rubocop.git")
6695 (commit (string-append "v" version))))
6696 (file-name (git-file-name name version))
5d8fe6de
CB
6697 (sha256
6698 (base32
c164c402
MC
6699 "1d06893jp8pd85fvgp5d16vqcf31bafi430v4f4y746ihyvhzz5r"))
6700 (patches (search-patches "ruby-rubocop-break-dependency-cycle.patch"))))
5d8fe6de
CB
6701 (build-system ruby-build-system)
6702 (arguments
c164c402
MC
6703 '(#:test-target "default"
6704 #:phases
6705 (modify-phases %standard-phases
6706 (add-after 'unpack 'remove-problematic-tests
6707 ;; These tests depend on Rubocop extensions, which cannot be
6708 ;; included as they cause a dependency cycle with Rubocop itself.
6709 (lambda _
6710 (delete-file "spec/rubocop/config_loader_spec.rb")
6711 (substitute* "Gemfile"
6712 ((".*'rubocop-performance'.*") "")
6713 ((".*'rubocop-rspec'.*") ""))
6714 ;; Prevent "Unnecessary disabling of RSpec/* (unknown cop)"
6715 ;; errors.
6716 (substitute* (find-files "spec/rubocop/cop/" "_spec\\.rb$")
6717 (("# (rubocop:(enable|disable) RSpec.*)" _ what)
6718 (string-append "# Disabled: " what)))
6719 #t))
6720 (add-after 'unpack 'disable-bundler
6721 (lambda _
6722 (substitute* "Rakefile"
6723 (("Bundler\\.setup.*") "nil\n"))
6724 #t))
6725 (replace 'replace-git-ls-files
6726 (lambda _
6727 (substitute* "rubocop.gemspec"
6728 (("`git ls-files(.*)`" _ files)
6729 (format #f "`find ~a -type f| sort`" files)))
6730 #t))
6731 (add-before 'check 'set-home
6732 (lambda _
6733 (setenv "HOME" (getcwd))
6734 #t))
6735 (add-before 'check 'make-adoc-files-writable
6736 (lambda _
6737 (let ((adoc-files (find-files "docs/modules/ROOT/pages"
6738 "\\.adoc$")))
6739 (for-each make-file-writable adoc-files))
6740 #t)))))
6741 (native-inputs
6742 `(("ruby-bump" ,ruby-bump)
6743 ("ruby-pry" ,ruby-pry)
6744 ("ruby-rspec" ,ruby-rspec)
6745 ("ruby-test-queue" ,ruby-test-queue)
6746 ("ruby-webmock" ,ruby-webmock-2)
6747 ("ruby-yard" ,ruby-yard)))
5d8fe6de 6748 (propagated-inputs
c164c402
MC
6749 `(("ruby-parallel" ,ruby-parallel)
6750 ("ruby-parser" ,ruby-parser)
5d8fe6de 6751 ("ruby-rainbow" ,ruby-rainbow)
c164c402
MC
6752 ("ruby-regexp-parser" ,ruby-regexp-parser)
6753 ("ruby-rexml" ,ruby-rexml)
6754 ("ruby-rubocop-ast" ,ruby-rubocop-ast)
5d8fe6de 6755 ("ruby-progressbar" ,ruby-progressbar)
5d8fe6de
CB
6756 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
6757 (synopsis "Ruby code style checking tool")
6758 (description
6759 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
6760the community-driven Ruby Style Guide.")
6761 (home-page "https://github.com/rubocop-hq/rubocop")
6762 (license license:expat)))
6763
6ef85256
BW
6764(define-public ruby-contest
6765 (package
6766 (name "ruby-contest")
6767 (version "0.1.3")
6768 (source
6769 (origin
6770 (method url-fetch)
6771 (uri (rubygems-uri "contest" version))
6772 (sha256
6773 (base32
6774 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
6775 (build-system ruby-build-system)
6776 (synopsis "Write declarative tests using nested contexts")
6777 (description
6778 "Contest allows writing declarative @code{Test::Unit} tests using nested
6779contexts without performance penalties.")
6780 (home-page "https://github.com/citrusbyte/contest")
6781 (license license:expat)))
6782
c4550f75
BW
6783(define-public ruby-creole
6784 (package
6785 (name "ruby-creole")
6786 (version "0.5.0")
6787 (source
6788 (origin
6789 (method url-fetch)
6790 (uri (rubygems-uri "creole" version))
6791 (sha256
6792 (base32
6793 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
6794 (build-system ruby-build-system)
6795 (native-inputs
6796 `(("ruby-bacon" ,ruby-bacon)))
6797 (synopsis "Creole markup language converter")
6798 (description
6799 "Creole is a lightweight markup language and this library for converting
6800creole to @code{HTML}.")
6801 (home-page "https://github.com/minad/creole")
6802 (license license:ruby)))
6803
6aaa815e
PP
6804(define-public ruby-docile
6805 (package
6806 (name "ruby-docile")
6807 (version "1.1.5")
6808 (source
6809 (origin
6810 (method url-fetch)
6811 (uri (rubygems-uri "docile" version))
6812 (sha256
6813 (base32
6814 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
6815 (build-system ruby-build-system)
6816 (arguments
6817 '(#:tests? #f)) ; needs github-markup, among others
6818 (synopsis "Ruby EDSL helper library")
6819 (description "Docile is a Ruby library that provides an interface for
6820creating embedded domain specific languages (EDSLs) that manipulate existing
6821Ruby classes.")
6822 (home-page "https://ms-ati.github.io/docile/")
6823 (license license:expat)))
6824
fab8fed3
MC
6825(define-public ruby-middleware
6826 (package
6827 (name "ruby-middleware")
6828 (version "0.1.0")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (rubygems-uri "middleware" version))
6833 (sha256
6834 (base32
6835 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
6836 (build-system ruby-build-system)
6837 (arguments '(#:tests? #f)) ;no test suite
6838 (synopsis "Implementation of a middleware abstraction for Ruby")
6839 (description "Middleware is a generalized implementation of a middleware
6840abstraction for Ruby.")
6841 (home-page "https://github.com/mitchellh/middleware")
6842 (license license:expat)))
6843
1d537c71
MC
6844(define-public ruby-benchmark-ips
6845 (package
6846 (name "ruby-benchmark-ips")
6847 (version "2.8.2")
6848 (source
6849 (origin
6850 (method url-fetch)
6851 (uri (rubygems-uri "benchmark-ips" version))
6852 (sha256
6853 (base32
6854 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
6855 (build-system ruby-build-system)
6856 (native-inputs
6857 `(("ruby-hoe" ,ruby-hoe)))
6858 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
6859 (description "Benchmark-ips enhances the Ruby Benchmark module with the
6860iterations per second count. For short snippets of code, it can automatically
6861figure out how many times to run the code to get interesting data.")
6862 (home-page "https://github.com/evanphx/benchmark-ips")
6863 (license license:expat)))
6864
fc5d1c5a
MC
6865(define-public ruby-ffi-rzmq-core
6866 (package
6867 (name "ruby-ffi-rzmq-core")
6868 (version "1.0.7")
6869 (source
6870 (origin
6871 (method url-fetch)
6872 (uri (rubygems-uri "ffi-rzmq-core" version))
6873 (sha256
6874 (base32
6875 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
6876 (build-system ruby-build-system)
6877 (arguments
6878 `(#:phases
6879 (modify-phases %standard-phases
6880 (add-after 'unpack 'patch-libzmq-search-path
6881 (lambda* (#:key inputs #:allow-other-keys)
6882 (let ((zeromq (assoc-ref inputs "zeromq")))
6883 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
6884 (("/usr/local/lib")
6885 (string-append zeromq "/lib")))
6886 #t)))
6887 (replace 'check
6888 (lambda _
6889 (invoke "rspec"))))))
6890 (native-inputs
6891 `(("ruby-rspec" ,ruby-rspec)))
6892 (inputs
6893 `(("zeromq" ,zeromq)))
6894 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
6895 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
6896 (description "This library only provides the FFI wrapper for the ZeroMQ
6897networking library. It can be used to implement a Ruby API for the ZeroMQ
6898library.")
6899 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
6900 (license license:expat)))
6901
7a503516
MC
6902(define-public ruby-ffi-rzmq
6903 (package
6904 (name "ruby-ffi-rzmq")
6905 (version "2.0.7")
6906 (source
6907 (origin
6908 (method url-fetch)
6909 (uri (rubygems-uri "ffi-rzmq" version))
6910 (sha256
6911 (base32
6912 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
6913 (build-system ruby-build-system)
6914 (arguments '(#:tests? #t
6915 #:phases (modify-phases %standard-phases
6916 (replace 'check
6917 (lambda _
6918 (invoke "rspec"))))))
6919 (native-inputs
6920 `(("ruby-rspec" ,ruby-rspec)))
6921 (propagated-inputs
6922 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
6923 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
6924 (description "This library provides a high-level API that wraps the ZeroMQ
6925networking library using the Ruby foreign function interface (FFI). It is a
6926pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
6927for FFI.")
6928 (home-page "https://github.com/chuckremes/ffi-rzmq")
6929 (license license:expat)))
6930
03a0f98a
MC
6931(define-public ruby-sawyer
6932 (package
6933 (name "ruby-sawyer")
6934 (version "0.8.2")
6935 (source
6936 (origin
6937 (method url-fetch)
6938 (uri (rubygems-uri "sawyer" version))
6939 (sha256
6940 (base32
6941 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
6942 (build-system ruby-build-system)
6943 (propagated-inputs
6944 `(("ruby-addressable" ,ruby-addressable)
6945 ("ruby-faraday" ,ruby-faraday)))
6946 (synopsis "Experimental hypermedia agent for Ruby")
6947 (description "Sawyer is an experimental hypermedia agent for Ruby built on
6948top of Faraday.")
6949 (home-page "https://github.com/lostisland/sawyer")
6950 (license license:expat)))
6951
aa3c76b1
MC
6952(define-public ruby-octokit
6953 (package
6954 (name "ruby-octokit")
6955 (version "4.18.0")
6956 (source
6957 (origin
6958 (method url-fetch)
6959 (uri (rubygems-uri "octokit" version))
6960 (sha256
6961 (base32
6962 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
6963 (build-system ruby-build-system)
6964 (arguments '(#:tests? #f)) ;no test suite in the gem release
6965 (propagated-inputs
6966 `(("ruby-faraday" ,ruby-faraday)
6967 ("ruby-sawyer" ,ruby-sawyer)))
6968 (synopsis "Ruby toolkit for the GitHub API")
6969 (description "Octokit wraps the GitHub API in a flat API client that
6970follows Ruby conventions and requires little knowledge of REST.")
6971 (home-page "https://github.com/octokit/octokit.rb")
6972 (license license:expat)))
6973
1157d2f8
MC
6974(define-public ruby-chandler
6975 (package
6976 (name "ruby-chandler")
6977 (version "0.9.0")
6978 (source
6979 (origin
6980 (method url-fetch)
6981 (uri (rubygems-uri "chandler" version))
6982 (sha256
6983 (base32
6984 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
6985 (build-system ruby-build-system)
6986 (native-inputs
6987 `(("ruby-rubocop" ,ruby-rubocop)))
6988 (propagated-inputs
6989 `(("ruby-netrc" ,ruby-netrc)
6990 ("ruby-octokit" ,ruby-octokit)))
6991 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
6992 (description "Chandler syncs a project's CHANGELOG file entries to
6993GitHub's release notes to remove the need of manually entering release
6994notes.")
6995 (home-page "https://github.com/mattbrictson/chandler")
6996 (license license:expat)))
6997
acb28876
MC
6998(define-public ruby-pry-byebug
6999 (package
7000 (name "ruby-pry-byebug")
7001 (version "3.9.0")
7002 (source
7003 (origin
7004 (method git-fetch)
7005 (uri (git-reference
b0e7b699 7006 (url "https://github.com/deivid-rodriguez/pry-byebug")
acb28876
MC
7007 (commit (string-append "v" version))))
7008 (file-name (git-file-name name version))
7009 (sha256
7010 (base32
7011 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
7012 (build-system ruby-build-system)
7013 (arguments
7014 `(#:phases (modify-phases %standard-phases
7015 (add-before 'check 'set-home
7016 (lambda _
7017 (setenv "HOME" (getcwd))
7018 #t)))))
7019 (native-inputs
7020 `(("ruby-chandler" ,ruby-chandler)
7021 ("ruby-rubocop" ,ruby-rubocop)
7022 ("ruby-simplecov" ,ruby-simplecov)))
7023 (propagated-inputs
7024 `(("ruby-byebug" ,ruby-byebug-11)
7025 ("ruby-pry" ,ruby-pry)))
7026 (synopsis "Step-by-step debugging and stack navigation in Pry")
7027 (description "This package adds step-by-step debugging and stack
7028navigation capabilities to @code{pry}, using @code{byebug}.")
7029 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
7030 (license license:expat)))
7031
4d31fe6b
MC
7032(define-public ruby-binding-of-caller
7033 (package
7034 (name "ruby-binding-of-caller")
7035 (version "0.8.0")
7036 (source
7037 (origin
7038 (method url-fetch)
7039 (uri (rubygems-uri "binding_of_caller" version))
7040 (sha256
7041 (base32
7042 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
7043 (build-system ruby-build-system)
7044 ;; Attempting to run the test suite fails with a rake deprecation error
7045 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
7046 (arguments '(#:tests? #f))
7047 (propagated-inputs
7048 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
7049 (synopsis "Retrieve the binding of a method's caller")
7050 (description "The @code{binding_of_caller} module provides the
7051@code{Binding#of_caller} method. It allows accessing bindings from upper
7052frames in the call stack and can evaluate code in that context.")
7053 (home-page "https://github.com/banister/binding_of_caller")
7054 (license license:expat)))
7055
f4699abc
MC
7056(define-public ruby-pry-stack-explorer
7057 (package
7058 (name "ruby-pry-stack-explorer")
7059 (version "0.5.1")
7060 (source
7061 (origin
7062 (method url-fetch)
7063 (uri (rubygems-uri "pry-stack_explorer" version))
7064 (sha256
7065 (base32
7066 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
7067 (build-system ruby-build-system)
7068 (arguments '(#:tests? #f)) ;no test suite in gem release
7069 (propagated-inputs
7070 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
7071 ("ruby-pry" ,ruby-pry)))
7072 (synopsis "Call-stack navigation plugin for the Pry REPL")
7073 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
7074add support to navigate the call-stack.")
7075 (home-page "https://github.com/pry/pry-stack_explorer")
7076 (license license:expat)))
7077
1f014c97
MC
7078(define-public ruby-varint
7079 (package
7080 (name "ruby-varint")
7081 (version "0.1.1")
7082 (source
7083 (origin
7084 (method url-fetch)
7085 (uri (rubygems-uri "varint" version))
7086 (sha256
7087 (base32
7088 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
7089 (build-system ruby-build-system)
7090 (arguments '(#:tests? #f)) ;no test suite
7091 (synopsis "Variable length integers (varint) C extension for Ruby")
7092 (description "This package provides a small C extension to speed up
7093variable length integers (varint) in Ruby Protocol Buffers.")
7094 (home-page "https://github.com/liquidm/varint")
7095 (license license:bsd-3)))
7096
1b214174
MC
7097(define-public ruby-ruby-prof
7098 (package
7099 (name "ruby-ruby-prof")
7100 (version "1.4.1")
7101 (source
7102 (origin
7103 (method url-fetch)
7104 (uri (rubygems-uri "ruby-prof" version))
7105 (sha256
7106 (base32
7107 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
7108 (build-system ruby-build-system)
7109 (arguments
7110 `(#:phases
7111 (modify-phases %standard-phases
7112 (add-after 'unpack 'patch-rakefile
7113 ;; This fixes the following error: "NameError: uninitialized
7114 ;; constant Bundler::GemHelper" (see:
7115 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
7116 (lambda _
7117 (substitute* "Rakefile"
7118 ((".*require \"bundler/setup\".*" all)
7119 (string-append all " require 'bundler/gem_tasks'\n")))
7120 #t))
661ad8d7
MC
7121 ;; The LineNumbersTest test fails non-deterministically (see:
7122 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
7123 (add-after 'extract-gemspec 'delete-flaky-test
7124 (lambda _
7125 (delete-file "test/line_number_test.rb")
7126 (substitute* "ruby-prof.gemspec"
7127 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
7128 #t))
1b214174
MC
7129 (add-before 'check 'compile
7130 (lambda _
7131 (invoke "rake" "compile"))))))
7132 (native-inputs
7133 `(("bundler" ,bundler)
7134 ("ruby-minitest" ,ruby-minitest)
7135 ("ruby-rake-compiler" ,ruby-rake-compiler)
7136 ("ruby-rdoc" ,ruby-rdoc)))
7137 (synopsis "Fast code profiler for Ruby")
7138 (description "RubyProf is a fast code profiler for Ruby. Its features
7139include:
7140@table @asis
7141@item Speed
7142Being a C extension, it is many times faster than the standard Ruby profiler.
7143@item Measurement Modes
7144It can measure program wall time, process time, object allocations and memory
7145usage.
7146@item Reports
7147A variety of text and cross-referenced HTML reports can be generated.
7148@item Threads
7149Profiling multiple threads simultaneously is supported.
7150@end table")
7151 (home-page "https://github.com/ruby-prof/ruby-prof")
7152 (license license:bsd-2)))
7153
dff5392f
MC
7154(define-public ruby-cucumber-messages
7155 (package
7156 (name "ruby-cucumber-messages")
7157 (version "12.2.0")
7158 (source (origin
7159 (method git-fetch)
7160 (uri (git-reference
b0e7b699 7161 (url "https://github.com/cucumber/messages-ruby")
dff5392f
MC
7162 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
7163 (file-name (git-file-name name version))
7164 (sha256
7165 (base32
7166 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
7167 (build-system ruby-build-system)
7168 (arguments
7169 `(#:phases (modify-phases %standard-phases
7170 (add-after 'unpack 'patch-protobuf.rb
7171 (lambda _
7172 (substitute* "rake/protobuf.rb"
7173 (("load 'protobuf/tasks/compile.rake'")
7174 "require 'protobuf/tasks'"))
7175 #t))
7176 (add-before 'build 'compile
7177 (lambda _
7178 (substitute* "Makefile"
7179 (("bundle exec ") "")
7180 (("include default.mk.*" all)
7181 (string-append "#" all)))
7182 (invoke "make")))
7183 (replace 'check
7184 (lambda _
7185 (invoke "rspec"))))))
7186 (propagated-inputs
7187 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
7188 (native-inputs
7189 `(("ruby-rspec" ,ruby-rspec)))
7190 (home-page "https://github.com/cucumber/messages-ruby")
7191 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
7192 (description "Cucumber Messages for Ruby is a library which allows
7193serialization and deserialization of the protocol buffer messages used in
7194Cucumber.")
7195 (license license:expat)))
7196
44514637 7197(define-public ruby-gherkin
62e4cc5a 7198 (package
44514637 7199 (name "ruby-gherkin")
cfef316f
MC
7200 (version "14.0.1")
7201 (source (origin
7202 (method git-fetch)
7203 (uri (git-reference
7204 (url "https://github.com/cucumber/gherkin-ruby")
7205 (commit (string-append "v" version))))
7206 (file-name (git-file-name name version))
7207 (sha256
7208 (base32
7209 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
62e4cc5a
PP
7210 (build-system ruby-build-system)
7211 (native-inputs
cfef316f
MC
7212 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7213 ("ruby-rspec" ,ruby-rspec)))
62e4cc5a 7214 (arguments
cfef316f 7215 `(#:test-target "spec"))
62e4cc5a 7216 (synopsis "Gherkin parser for Ruby")
44514637 7217 (description "Gherkin is a parser and compiler for the Gherkin language.
aada5f6f
CB
7218It is intended be used by all Cucumber implementations to parse
7219@file{.feature} files.")
cfef316f 7220 (home-page "https://github.com/cucumber/gherkin-ruby")
62e4cc5a 7221 (license license:expat)))
cd89fecb 7222
8f85018d
MB
7223(define-public ruby-gherkin-ruby
7224 (package
7225 (name "ruby-gherkin-ruby")
7226 (version "0.3.2")
702a1012 7227 (home-page "https://github.com/codegram/gherkin-ruby")
8f85018d
MB
7228 (source (origin
7229 (method url-fetch)
7230 (uri (rubygems-uri "gherkin-ruby" version))
7231 (sha256
7232 (base32
7233 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
7234 (build-system ruby-build-system)
7235 (synopsis "Pure Ruby Gherkin parser")
7236 (description
7237 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
7238200 lines of code.")
7239 ;; XXX: No license information anywhere but Readme.md.
7240 (license license:expat)))
7241
15b16c2c
CB
7242(define-public ruby-aruba
7243 (package
7244 (name "ruby-aruba")
cf7201c4 7245 (version "0.14.14")
15b16c2c
CB
7246 (source
7247 (origin
7248 (method url-fetch)
7249 (uri (rubygems-uri "aruba" version))
7250 (sha256
7251 (base32
cf7201c4 7252 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
15b16c2c
CB
7253 (build-system ruby-build-system)
7254 (arguments
7255 '(#:test-target "spec"
7256 #:phases
7257 (modify-phases %standard-phases
7258 (add-after 'unpack 'patch
7259 (lambda _
7260 (substitute* "spec/aruba/api_spec.rb"
7261 ;; This resolves some errors in the specs
7262 ;;
7263 ;; undefined method `parse' for Time:Class
7264 (("require 'spec_helper'")
7265 "require 'spec_helper'\nrequire 'time'"))
7266 ;; Avoid shebang issues in this spec file
7267 (substitute* "spec/aruba/matchers/command_spec.rb"
7268 (("/usr/bin/env bash")
7269 (which "bash")))
7270 #t))
7271 (add-before 'check 'remove-unnecessary-dependencies
7272 (lambda _
7273 (substitute* "Gemfile"
7274 ((".*byebug.*") "\n")
7275 ((".*pry.*") "\n")
7276 ((".*yaml.*") "\n")
7277 ((".*bcat.*") "\n")
7278 ((".*kramdown.*") "\n")
7279 ((".*rubocop.*") "\n")
7280 ((".*cucumber-pro.*") "\n")
7281 ((".*cucumber.*") "\n")
7282 ((".*license_finder.*") "\n")
7283 ((".*rake.*") "gem 'rake'\n")
15b16c2c 7284 ((".*relish.*") "\n"))
15b16c2c
CB
7285 (substitute* "aruba.gemspec"
7286 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
7287 "spec.add_runtime_dependency 'cucumber'"))
7288 #t))
7289 (add-before 'check 'set-home
7290 (lambda _ (setenv "HOME" "/tmp") #t)))))
7291 (native-inputs
7292 `(("bundler" ,bundler)
7293 ("ruby-rspec" ,ruby-rspec)
cf7201c4
CB
7294 ("ruby-fuubar" ,ruby-fuubar)
7295 ("ruby-simplecov" ,ruby-simplecov)))
15b16c2c
CB
7296 (propagated-inputs
7297 `(("ruby-childprocess" ,ruby-childprocess)
7298 ("ruby-contracts" ,ruby-contracts)
7299 ("ruby-cucumber" ,ruby-cucumber)
7300 ("ruby-ffi" ,ruby-ffi)
7301 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
7302 ("ruby-thor" ,ruby-thor)
7303 ("ruby-yard" ,ruby-yard)))
7304 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
7305 (description
7306 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
7307command-line applications. It supports applications written in any
7308language.")
7309 (home-page "https://github.com/cucumber/aruba")
7310 (license license:expat)))
7311
7312;; A version of ruby-aruba without tests run so that circular dependencies can
7313;; be avoided.
7314(define ruby-aruba-without-tests
7315 (package
7316 (inherit ruby-aruba)
7317 (arguments '(#:tests? #f))
7318 (propagated-inputs
7319 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
7320 ,@(alist-delete "ruby-cucumber"
7321 (package-propagated-inputs ruby-aruba))))
7322 (native-inputs '())))
7323
fd6577b4
MC
7324(define-public ruby-sys-uname
7325 (package
7326 (name "ruby-sys-uname")
7327 (version "1.2.1")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (rubygems-uri "sys-uname" version))
7332 (sha256
7333 (base32
7334 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
7335 (build-system ruby-build-system)
7336 (arguments
7337 `(#:test-target "spec"))
7338 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
7339 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
7340 (synopsis "Ruby interface for gathering system information")
7341 (description "The sys-uname library provides an interface for gathering
7342information about your current platform. It allows retrieving information
7343such as the OS name, OS version, system name, etc.")
7344 (home-page "https://github.com/djberg96/sys-uname")
7345 (license license:asl2.0)))
7346
ac3ec612
MC
7347(define-public ruby-cucumber-create-meta
7348 (package
7349 (name "ruby-cucumber-create-meta")
7350 (version "1.0.0")
7351 (source
7352 (origin
7353 (method url-fetch)
7354 (uri (rubygems-uri "cucumber-create-meta" version))
7355 (sha256
7356 (base32
7357 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7358 (build-system ruby-build-system)
7359 (arguments
7360 `(#:phases (modify-phases %standard-phases
7361 (add-after 'extract-gemspec 'relax-version-requirements
7362 (lambda _
7363 (substitute* ".gemspec"
7364 ((" 12\\.2")
7365 " 12.1"))
7366 #t))
7367 (replace 'check
7368 (lambda _
7369 (invoke "rspec"))))))
7370 (native-inputs
7371 `(("ruby-rspec" ,ruby-rspec)))
7372 (propagated-inputs
7373 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7374 ("ruby-sys-uname" ,ruby-sys-uname)))
7375 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7376 (description "The @code{createMeta} utility function allows generating
7377system-specific @code{Meta} messages for Cucumber Ruby.")
7378 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7379 (license license:expat)))
7380
f3574624
MC
7381(define-public ruby-cucumber-html-formatter
7382 (package
7383 (name "ruby-cucumber-html-formatter")
7384 (version "7.0.0")
7385 (source
7386 (origin
7387 (method url-fetch)
7388 (uri (rubygems-uri "cucumber-html-formatter" version))
7389 (sha256
7390 (base32
7391 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7392 (build-system ruby-build-system)
7393 (arguments
7394 `(#:phases (modify-phases %standard-phases
7395 (replace 'check
7396 (lambda _
7397 (invoke "rspec"))))))
7398 (native-inputs
7399 `(("ruby-rspec" ,ruby-rspec)))
7400 (propagated-inputs
7401 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7402 (synopsis "HTML formatter for Cucumber")
7403 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7404runs. It is built on top of cucumber-react and works with any Cucumber
7405implementation with a protocol buffer formatter that outputs Cucumber
7406messages.")
7407 (home-page "https://github.com/cucumber/cucumber/tree/\
7408master/html-formatter/ruby")
7409 (license license:expat)))
7410
15b16c2c
CB
7411(define-public ruby-cucumber
7412 (package
7413 (name "ruby-cucumber")
92ebbaad 7414 (version "4.1.0")
15b16c2c
CB
7415 (source
7416 (origin
7417 (method git-fetch)
7418 (uri (git-reference
b0e7b699 7419 (url "https://github.com/cucumber/cucumber-ruby")
15b16c2c
CB
7420 (commit (string-append "v" version))))
7421 (file-name (git-file-name name version))
7422 (sha256
7423 (base32
92ebbaad 7424 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
15b16c2c
CB
7425 (build-system ruby-build-system)
7426 (arguments
fa8e4dbf 7427 '(#:test-target "default"
15b16c2c
CB
7428 #:phases
7429 (modify-phases %standard-phases
fa8e4dbf
MC
7430 (add-after 'unpack 'disable-rubocop
7431 ;; Rubocop lint check fails with our more recent version.
7432 (lambda _
7433 (substitute* "Rakefile"
7434 (("spec cucumber rubocop")
7435 "spec cucumber"))
7436 #t))
92ebbaad 7437 (add-after 'extract-gemspec 'strip-version-requirements
15b16c2c 7438 (lambda _
fa8e4dbf 7439 (delete-file "Gemfile") ;do not use Bundler
92ebbaad
MC
7440 (substitute* "cucumber.gemspec"
7441 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7442 (string-append stripped "\n")))
fa8e4dbf
MC
7443 #t))
7444 (add-before 'check 'set-home
7445 (lambda _
7446 (setenv "HOME" (getcwd))
15b16c2c
CB
7447 #t)))))
7448 (propagated-inputs
7449 `(("ruby-builder" ,ruby-builder)
7450 ("ruby-cucumber-core" ,ruby-cucumber-core)
92ebbaad
MC
7451 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7452 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7453 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
15b16c2c 7454 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
15b16c2c
CB
7455 ("ruby-diff-lcs" ,ruby-diff-lcs)
7456 ("ruby-gherkin" ,ruby-gherkin)
7457 ("ruby-multi-json" ,ruby-multi-json)
7458 ("ruby-multi-test" ,ruby-multi-test)))
7459 (native-inputs
92ebbaad 7460 `(;; Use a untested version of aruba, to avoid a circular dependency, as
15b16c2c
CB
7461 ;; ruby-aruba depends on ruby-cucumber.
7462 ("ruby-aruba", ruby-aruba-without-tests)
7463 ("ruby-rspec" ,ruby-rspec)
7464 ("ruby-pry" ,ruby-pry)
92ebbaad
MC
7465 ("ruby-nokogiri" ,ruby-nokogiri)
7466 ("ruby-rubocop" ,ruby-rubocop)))
15b16c2c 7467 (synopsis "Describe automated tests in plain language")
92ebbaad
MC
7468 (description "Cucumber is a tool for running automated tests written in
7469plain language. It's designed to support a Behaviour Driven Development (BDD)
15b16c2c
CB
7470software development workflow.")
7471 (home-page "https://cucumber.io/")
7472 (license license:expat)))
7473
7474(define ruby-cucumber-without-tests
7475 (package (inherit ruby-cucumber)
7476 (arguments
7477 '(#:tests? #f))
7478 (native-inputs
7479 '())))
7480
f048ef52
MC
7481(define-public ruby-coveralls
7482 (package
7483 (name "ruby-coveralls")
7484 (version "0.8.23")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (rubygems-uri "coveralls" version))
7489 (sha256
7490 (base32
7491 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7492 (build-system ruby-build-system)
7493 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
fe9993b1
MC
7494 ;; because of its nonfree, Hippocratic-derived license.
7495 (arguments
7496 `(#:tests? #f
7497 #:phases (modify-phases %standard-phases
7498 (add-after 'extract-gemspec 'strip-version-requirements
7499 ;; Keeping strict version requirements can cause problems
7500 ;; to users of the library, such as: Gem::ConflictError:
7501 ;; Unable to activate coveralls-0.8.23, because
7502 ;; simplecov-0.17.1 conflicts with simplecov (~> 0.16.1).
7503 (lambda _
7504 (substitute* "coveralls-ruby.gemspec"
7505 (("(.*add_.*dependency\\([^,]+), .*" _ stripped)
7506 (string-append stripped ")\n")))
7507 #t)))))
f048ef52
MC
7508 (propagated-inputs
7509 `(("ruby-json" ,ruby-json)
7510 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
7511 ("ruby-thor" ,ruby-thor)
7512 ("ruby-tins" ,ruby-tins)))
7513 (synopsis "Ruby implementation of the Coveralls API")
7514 (description "This package provides a Ruby implementation of the Coveralls
7515API.")
7516 (home-page "https://coveralls.io")
7517 (license license:expat)))
f2a1b7fa
MC
7518
7519(define-public ruby-unindent
7520 (package
7521 (name "ruby-unindent")
7522 (version "1.0")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (rubygems-uri "unindent" version))
7527 (sha256
7528 (base32
7529 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
7530 (build-system ruby-build-system)
7531 (synopsis "Ruby method to unindent strings")
7532 (description "This module provides a @code{String#unindent} Ruby method to
7533unindent strings, which can be useful to unindent multiline strings embedded
7534in already-indented code.")
7535 (home-page "https://github.com/mynyml/unindent")
7536 (license license:expat)))
f048ef52 7537
cd89fecb
PP
7538(define-public ruby-cucumber-core
7539 (package
7540 (name "ruby-cucumber-core")
95a5d992 7541 (version "7.1.0")
cd89fecb
PP
7542 (source
7543 (origin
95a5d992
MC
7544 (method git-fetch)
7545 (uri (git-reference
b0e7b699 7546 (url "https://github.com/cucumber/cucumber-ruby-core")
95a5d992
MC
7547 (commit (string-append "v" version))))
7548 (file-name (git-file-name name version))
cd89fecb
PP
7549 (sha256
7550 (base32
95a5d992 7551 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
cd89fecb 7552 (build-system ruby-build-system)
95a5d992
MC
7553 (arguments
7554 `(#:test-target "spec"
7555 #:phases
7556 (modify-phases %standard-phases
7557 (add-after 'extract-gemspec 'relax-version-requirements
7558 (lambda _
7559 (substitute* "cucumber-core.gemspec"
7560 (("'cucumber-tag-expressions',.*")
7561 "'cucumber-tag-expressions', '>=2.0.0'\n"))
7562 #t)))))
7563 (native-inputs
7564 `(("ruby-rspec" ,ruby-rspec)
7565 ("ruby-coveralls" ,ruby-coveralls)
7566 ("ruby-rubocop" ,ruby-rubocop)
7567 ("ruby-simplecov" ,ruby-simplecov)
7568 ("ruby-unindent" ,ruby-unindent)))
cd89fecb 7569 (propagated-inputs
95a5d992 7570 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
5cd047e8
CB
7571 ("ruby-gherkin" ,ruby-gherkin)
7572 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
cd89fecb
PP
7573 (synopsis "Core library for the Cucumber BDD app")
7574 (description "Cucumber is a tool for running automated tests
7575written in plain language. Because they're written in plain language,
7576they can be read by anyone on your team. Because they can be read by
7577anyone, you can use them to help improve communication, collaboration
7578and trust on your team.")
7579 (home-page "https://cucumber.io/")
7580 (license license:expat)))
212d563d 7581
fb1a8954
CB
7582(define-public ruby-cucumber-expressions
7583 (package
7584 (name "ruby-cucumber-expressions")
4ada4a42 7585 (version "10.2.0")
fb1a8954
CB
7586 (source
7587 (origin
4ada4a42
MC
7588 (method git-fetch)
7589 (uri (git-reference
b0e7b699 7590 (url "https://github.com/cucumber/cucumber-expressions-ruby")
4ada4a42
MC
7591 (commit (string-append "v" version))))
7592 (file-name (git-file-name name version))
fb1a8954
CB
7593 (sha256
7594 (base32
4ada4a42 7595 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
fb1a8954
CB
7596 (build-system ruby-build-system)
7597 (arguments
7598 '(#:test-target "spec"))
7599 (native-inputs
4ada4a42 7600 `(("ruby-rspec" ,ruby-rspec)
fb1a8954
CB
7601 ("ruby-simplecov" ,ruby-simplecov)))
7602 (synopsis "Simpler alternative to Regular Expressions")
7603 (description "Cucumber Expressions offer similar functionality to Regular
7604Expressions, with a syntax that is easier to read and write. Cucumber
7605Expressions are extensible with parameter types.")
7606 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
7607 (license license:expat)))
7608
ce872770
CB
7609(define-public ruby-cucumber-wire
7610 (package
7611 (name "ruby-cucumber-wire")
6516827e 7612 (version "3.1.0")
ce872770
CB
7613 (source
7614 (origin
7615 (method url-fetch)
7616 (uri (rubygems-uri "cucumber-wire" version))
7617 (sha256
7618 (base32
6516827e 7619 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
ce872770
CB
7620 (build-system ruby-build-system)
7621 (arguments
6516827e 7622 '(#:tests? #f ;tests use cucumber, causing a cycle
ce872770
CB
7623 #:phases
7624 (modify-phases %standard-phases
6516827e 7625 (add-after 'extract-gemspec 'relax-version-requirements
ce872770 7626 (lambda _
6516827e
MC
7627 (substitute* ".gemspec"
7628 ((" 10\\.1") " 10.2"))
ce872770 7629 #t)))))
6516827e
MC
7630 (propagated-inputs
7631 `(("ruby-cucumber-core" ,ruby-cucumber-core)
7632 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
7633 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
ce872770 7634 (synopsis "Cucumber wire protocol plugin")
6516827e
MC
7635 (description "Cucumber's wire protocol allows step definitions to be
7636implemented and invoked on any platform.")
ce872770
CB
7637 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
7638 (license license:expat)))
7639
0ce8f344
CB
7640(define-public ruby-cucumber-tag-expressions
7641 (package
7642 (name "ruby-cucumber-tag-expressions")
0d2c45ce 7643 (version "3.0.0")
0ce8f344
CB
7644 (source
7645 (origin
0d2c45ce
MC
7646 (method git-fetch)
7647 (uri (git-reference
b0e7b699 7648 (url "https://github.com/cucumber/tag-expressions-ruby")
0d2c45ce
MC
7649 (commit (string-append "v" version))))
7650 (file-name (git-file-name name version))
0ce8f344
CB
7651 (sha256
7652 (base32
0d2c45ce 7653 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
0ce8f344
CB
7654 (build-system ruby-build-system)
7655 (arguments
0d2c45ce 7656 `(#:test-target "spec"))
0ce8f344
CB
7657 (native-inputs
7658 `(("ruby-rspec" ,ruby-rspec)))
7659 (synopsis "Cucumber tag expressions for Ruby")
0d2c45ce
MC
7660 (description "Cucumber tag expression parser for Ruby. A tag expression
7661is an infix boolean expression used by Cucumber.")
0ce8f344
CB
7662 (home-page "https://github.com/cucumber/tag-expressions-ruby")
7663 (license license:expat)))
7664
73a5aff7
CB
7665(define-public ruby-bindex
7666 (package
7667 (name "ruby-bindex")
7668 (version "0.5.0")
7669 (source
7670 (origin
7671 (method url-fetch)
7672 (uri (rubygems-uri "bindex" version))
7673 (sha256
7674 (base32
7675 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
7676 (build-system ruby-build-system)
7677 (arguments
7678 '(#:test-target "default"))
7679 (native-inputs
7680 `(("bundler" ,bundler)
7681 ("ruby-rake-compiler" ,ruby-rake-compiler)))
7682 (synopsis "Provides access for bindings relating to Ruby exceptions")
7683 (description
7684 "@code{bindex} provides a way to access the bindings that relate to
7685exceptions in Ruby, providing more information about the context in which the
7686exception occurred.")
7687 (home-page "https://github.com/gsamokovarov/bindex")
7688 (license license:expat)))
7689
212d563d
PP
7690(define-public ruby-bio-logger
7691 (package
7692 (name "ruby-bio-logger")
7693 (version "1.0.1")
7694 (source
7695 (origin
7696 (method url-fetch)
7697 (uri (rubygems-uri "bio-logger" version))
7698 (sha256
7699 (base32
7700 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
7701 (build-system ruby-build-system)
7702 (arguments
7703 `(#:tests? #f)) ; rake errors, missing shoulda
7704 (propagated-inputs
7705 `(("ruby-log4r" ,ruby-log4r)))
7706 (synopsis "Log4r wrapper for Ruby")
7707 (description "Bio-logger is a wrapper around Log4r adding extra logging
7708features such as filtering and fine grained logging.")
7709 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
7710 (license license:expat)))
07f61cb2 7711
2db0f9c8
BW
7712(define-public ruby-yajl-ruby
7713 (package
7714 (name "ruby-yajl-ruby")
7715 (version "1.4.1")
7716 (source
7717 (origin
7718 (method url-fetch)
7719 (uri (rubygems-uri "yajl-ruby" version))
7720 (sha256
7721 (base32
7722 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
7723 (build-system ruby-build-system)
7724 (arguments
7725 '(#:test-target "spec"
7726 #:phases
7727 (modify-phases %standard-phases
7728 (add-before 'check 'patch-test-to-update-load-path
7729 (lambda _
7730 (substitute* "spec/parsing/large_number_spec.rb"
7731 (("require \"yajl\"")
7732 "$LOAD_PATH << 'lib'; require 'yajl'"))
7733 #t)))))
7734 (native-inputs
7735 `(("ruby-rake-compiler" ,ruby-rake-compiler)
7736 ("ruby-rspec" ,ruby-rspec)))
7737 (synopsis "Streaming JSON parsing and encoding library for Ruby")
7738 (description
7739 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
7740is compatible with the JSON gem, so yajl-ruby can act as a drop in
7741replacement.
7742
7743A modified copy of yajl is used, and included in the package.")
7744 (home-page "https://github.com/brianmario/yajl-ruby")
7745 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
7746 license:bsd-3)))) ; Included, modified copy of yajl
7747
07f61cb2 7748(define-public ruby-yard
6499893e
BW
7749 (package
7750 (name "ruby-yard")
7eb8ff0b 7751 (version "0.9.25")
6499893e
BW
7752 (source
7753 (origin
f3fd70c0 7754 (method git-fetch)
6499893e 7755 ;; Tests do not pass if we build from the distributed gem.
f3fd70c0 7756 (uri (git-reference
65a61239
MC
7757 (url "https://github.com/lsegal/yard")
7758 (commit (string-append "v" version))))
f3fd70c0 7759 (file-name (git-file-name name version))
6499893e
BW
7760 (sha256
7761 (base32
7eb8ff0b 7762 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
6499893e
BW
7763 (build-system ruby-build-system)
7764 (arguments
65a61239
MC
7765 ;; Note: Tests are willfully disabled to alleviate dependency cycle
7766 ;; problems.
7767 `(#:tests? #f))
6499893e 7768 (synopsis "Documentation generation tool for Ruby")
65a61239
MC
7769 (description "YARD is a documentation generation tool for the Ruby
7770programming language. It enables the user to generate consistent, usable
7771documentation that can be exported to a number of formats very easily, and
7772also supports extending for custom Ruby constructs such as custom class level
7773definitions.")
2f3800e5 7774 (home-page "https://yardoc.org")
6499893e 7775 (license license:expat)))
2cbcd23a 7776
df32ab11
MC
7777(define-public ruby-yard-with-tests
7778 (package
7779 (inherit ruby-yard)
7780 (name "ruby-yard-with-tests")
7781 (arguments
7782 (substitute-keyword-arguments (package-arguments ruby-yard)
7783 ((#:tests? _ #t) #t)
7784 ((#:test-target _ "default") "default")
7785 ((#:phases phases '%standard-phases)
7786 `(modify-phases ,phases
7787 (add-before 'check 'prepare-for-tests
7788 (lambda* (#:key tests? #:allow-other-keys)
7789 (when tests?
7790 (substitute* "Rakefile"
7791 ((".*[Ss]amus.*") ""))
7792 ;; Delete the Gemfile to avoid errors relating to it.
7793 (delete-file "Gemfile")
7794 ;; $HOME needs to be set to somewhere writeable for tests to
7795 ;; run.
7796 (setenv "HOME" "/tmp"))
7797 #t))))))
7798 (native-inputs
7799 `(("ruby-rspec" ,ruby-rspec)
7800 ("ruby-rack" ,ruby-rack)
7801 ("ruby-redcloth" ,ruby-redcloth)
7802 ("ruby-asciidoc" ,ruby-asciidoctor)))))
7803
908df675
MC
7804(define-public ruby-spectroscope
7805 (package
7806 (name "ruby-spectroscope")
7807 (version "0.1.0")
7808 (source
7809 (origin
7810 (method url-fetch)
7811 (uri (rubygems-uri "spectroscope" version))
7812 (sha256
7813 (base32
7814 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
7815 (build-system ruby-build-system)
7816 (arguments
7817 `(#:phases
7818 (modify-phases %standard-phases
7819 (replace 'check
7820 (lambda _
7821 (with-output-to-file ".test"
7822 (lambda _
7823 (display
7824 "\
7825require 'ae/should'
7826require 'rspec'
7827
7828include RSpec
7829
7830Test.run :default do |run|
7831 run.files << 'spec/*_spec.rb'
7832end")))
7833 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
7834 (native-inputs
7835 `(("ruby-ae" ,ruby-ae)
7836 ("ruby-rspec" ,ruby-rspec)))
7837 (propagated-inputs
7838 `(("ruby-rubytest" ,ruby-rubytest)))
7839 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
7840 (description "Spectroscope is a Behavior-Driven Development (BDD)
7841framework built on RubyTest, designed to emulate RSpec in most respects. It
7842is assertion framework independent so any number of assertion systems can be
7843used, such as Assay or AE.")
7844 (home-page "http://rubyworks.github.com/spectroscope/")
7845 (license license:bsd-2)))
7846
24ffd91b
MC
7847(define-public ruby-tomparse
7848 (package
7849 (name "ruby-tomparse")
7850 (version "0.4.2")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (rubygems-uri "tomparse" version))
7855 (sha256
7856 (base32
7857 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
7858 (build-system ruby-build-system)
7859 ;; TODO: Tests require citron and rulebow, not yet packaged.
7860 (arguments '(#:tests? #f))
7861 (synopsis "TomDoc parser for Ruby")
7862 (description "TomParse is a TomDoc parser for Ruby. It takes a code
7863comment as input and parses it into a convenient object-oriented structure in
7864accordance with the TomDoc standard. See
7865@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
7866TomDoc format.")
7867 (home-page "http://rubyworks.github.com/tomparse/")
7868 (license license:bsd-2)))
7869
257dee50
MC
7870(define-public ruby-yard-tomdoc
7871 (package
7872 (name "ruby-yard-tomdoc")
7873 (version "0.7.1")
7874 (source
7875 (origin
7876 (method url-fetch)
7877 (uri (rubygems-uri "yard-tomdoc" version))
7878 (sha256
7879 (base32
7880 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
7881 (build-system ruby-build-system)
7882 (arguments
7883 `(#:phases (modify-phases %standard-phases
7884 (replace 'check
7885 (lambda _
7886 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
7887 (native-inputs
7888 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
7889 ("ruby-spectroscope" ,ruby-spectroscope)
7890 ("ruby-ae" ,ruby-ae)))
7891 (propagated-inputs
7892 `(("ruby-tomparse" ,ruby-tomparse)
7893 ("ruby-yard" ,ruby-yard)))
7894 (synopsis "TomDoc syntax for YARD")
7895 (description "This module adds support for the TomDoc documentation format
7896to YARD, a documentation generation tool for Ruby.")
7897 (home-page "http://rubyworks.github.com/yard-tomdoc/")
7898 (license license:expat)))
7899
ad686ef3
RW
7900(define-public ruby-clap
7901 (package
7902 (name "ruby-clap")
7903 (version "1.0.0")
7904 (source (origin
7905 (method url-fetch)
7906 (uri (rubygems-uri "clap" version))
7907 (sha256
7908 (base32
7909 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
7910 (build-system ruby-build-system)
7911 ;; Clap needs cutest for running tests, but cutest needs clap.
7912 (arguments `(#:tests? #f))
7913 (synopsis "Command line argument parsing for simple applications")
7914 (description
7915 "Clap provides command line argument parsing features. It covers the
7916simple case of executing code based on the flags or parameters passed.")
7917 (home-page "https://github.com/djanowski/cutest")
0c80451e
RW
7918 (license license:expat)))
7919
7920(define-public ruby-cutest
7921 (package
7922 (name "ruby-cutest")
7923 (version "1.2.2")
7924 (source (origin
7925 (method url-fetch)
7926 (uri (rubygems-uri "cutest" version))
7927 (sha256
7928 (base32
7929 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
7930 (build-system ruby-build-system)
7931 (propagated-inputs
7932 `(("ruby-clap" ,ruby-clap)))
7933 (synopsis "Run tests in separate processes")
7934 (description
7935 "Cutest runs tests in separate processes to avoid shared state.")
7936 (home-page "https://github.com/djanowski/cutest")
ad686ef3
RW
7937 (license license:expat)))
7938
ac09beba
RW
7939(define-public ruby-pygmentize
7940 (package
7941 (name "ruby-pygmentize")
7942 (version "0.0.3")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (rubygems-uri "pygmentize" version))
7946 (sha256
7947 (base32
7948 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
7949 (build-system ruby-build-system)
7950 (arguments
7951 `(#:phases
7952 (modify-phases %standard-phases
7953 (add-after 'unpack 'fix-pygmentize-path
7954 (lambda _
7955 (substitute* "lib/pygmentize.rb"
7956 (("\"/usr/bin/env python.*")
7957 (string-append "\"" (which "pygmentize") "\"\n")))
7958 #t))
7959 (add-after 'build 'do-not-use-vendor-directory
7960 (lambda _
7961 ;; Remove bundled pygments sources
7962 ;; FIXME: ruby-build-system does not support snippets.
7963 (delete-file-recursively "vendor")
7964 (substitute* "pygmentize.gemspec"
7965 (("\"vendor/\\*\\*/\\*\",") ""))
7966 #t)))))
7967 (inputs
7968 `(("pygments" ,python-pygments)))
7969 (native-inputs
7970 `(("ruby-cutest" ,ruby-cutest)
7971 ("ruby-nokogiri" ,ruby-nokogiri)))
7972 (synopsis "Thin Ruby wrapper around pygmentize")
7973 (description
7974 "Pygmentize provides a simple way to call pygmentize from within a Ruby
7975application.")
7976 (home-page "https://github.com/djanowski/pygmentize")
7977 (license license:expat)))
7978
2cbcd23a
DT
7979(define-public ruby-eventmachine
7980 (package
7981 (name "ruby-eventmachine")
c207fa5e 7982 (version "1.2.7")
2cbcd23a
DT
7983 (source
7984 (origin
7985 (method url-fetch)
7986 (uri (rubygems-uri "eventmachine" version))
7987 (sha256
7988 (base32
c207fa5e 7989 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
2cbcd23a
DT
7990 (build-system ruby-build-system)
7991 (arguments
c5d269fb 7992 '(#:tests? #f)) ; test suite tries to connect to google.com
2cbcd23a
DT
7993 (native-inputs
7994 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
7995 (synopsis "Single-threaded network event framework for Ruby")
7996 (description
7997 "EventMachine implements a single-threaded engine for arbitrary network
7998communications. EventMachine wraps all interactions with sockets, allowing
7999programs to concentrate on the implementation of network protocols. It can be
8000used to create both network servers and clients.")
24a26227
TGR
8001 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
8002 (home-page "https://github.com/eventmachine/eventmachine")
2cbcd23a 8003 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
7d3a1a2d 8004
e218b0c8
BW
8005(define-public ruby-ruby-engine
8006 (package
8007 (name "ruby-ruby-engine")
77d098bf 8008 (version "2.0.0")
e218b0c8
BW
8009 (source
8010 (origin
8011 (method url-fetch)
8012 (uri (rubygems-uri "ruby_engine" version))
8013 (sha256
8014 (base32
77d098bf 8015 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
e218b0c8
BW
8016 (build-system ruby-build-system)
8017 (arguments
8018 `(#:phases
8019 (modify-phases %standard-phases
77d098bf 8020 (add-after 'extract-gemspec 'clean-up
e218b0c8
BW
8021 (lambda _
8022 (delete-file "Gemfile.lock")
8023 (substitute* "ruby_engine.gemspec"
8024 ;; Remove unnecessary imports that would entail further
8025 ;; dependencies.
8026 ((".*<rdoc.*") "")
8027 ((".*<rubygems-tasks.*") "")
8028 ;; Remove extraneous .gem file
77d098bf
MC
8029 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
8030 (("\"Gemfile.lock\".freeze, ") "")
e218b0c8 8031 ;; Soften rake dependency
77d098bf 8032 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
e218b0c8
BW
8033 "%q<rake>.freeze, [\">= 10.0\"]")
8034 ;; Soften the rspec dependency
77d098bf 8035 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
e218b0c8
BW
8036 "%q<rspec>.freeze, [\">= 2.4\"]"))
8037 (substitute* "Rakefile"
8038 (("require 'rubygems/tasks'") "")
8039 (("Gem::Tasks.new") ""))
8040 ;; Remove extraneous .gem file that otherwise gets installed.
77d098bf 8041 (delete-file-recursively "pkg")
e218b0c8
BW
8042 #t)))))
8043 (native-inputs
8044 `(("bundler" ,bundler)
8045 ("ruby-rake" ,ruby-rake)
8046 ("ruby-rspec" ,ruby-rspec)))
8047 (synopsis "Simplifies checking for Ruby implementation")
8048 (description
8049 "@code{ruby_engine} provides an RubyEngine class that can be used to
8050check which implementation of Ruby is in use. It can provide the interpreter
8051name and provides query methods such as @{RubyEngine.mri?}.")
8052 (home-page "https://github.com/janlelis/ruby_engine")
8053 (license license:expat)))
8054
8092e333
BW
8055(define-public ruby-turn
8056 (package
8057 (name "ruby-turn")
8058 (version "0.9.7")
8059 (source
8060 (origin
8061 (method url-fetch)
8062 (uri (rubygems-uri "turn" version))
8063 (sha256
8064 (base32
8065 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
8066 (build-system ruby-build-system)
8067 (arguments
8068 `(#:phases
8069 (modify-phases %standard-phases
8070 ;; Tests fail because turn changes its environment so can no longer
8071 ;; find test/unit. Instead simply test if the executable runs
8072 ;; without issue.
8073 (replace 'check
8074 (lambda _
9923d5a4 8075 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8092e333
BW
8076 (propagated-inputs
8077 `(("ruby-ansi" ,ruby-ansi)
8078 ("ruby-minitest" ,ruby-minitest-4)))
8079 (synopsis "Alternate set of alternative runners for MiniTest")
8080 (description
8081 "TURN provides a set of alternative runners for MiniTest which are both
8082colorful and informative. TURN displays each test on a separate line with
8083failures being displayed immediately instead of at the end of the tests. Note
8084that TURN is no longer being maintained.")
f433b662 8085 (home-page "https://rubygems.org/gems/turn")
8092e333
BW
8086 (license license:expat)))
8087
8279b1d3
CB
8088(define-public ruby-mimemagic
8089 (package
8090 (name "ruby-mimemagic")
60bc8952 8091 (version "0.3.3")
8279b1d3
CB
8092 (source
8093 (origin
8094 (method url-fetch)
8095 (uri (rubygems-uri "mimemagic" version))
8096 (sha256
60bc8952 8097 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8279b1d3
CB
8098 (build-system ruby-build-system)
8099 (arguments
8100 '(#:phases
8101 (modify-phases %standard-phases
8102 ;; This phase breaks the tests, as it patches some of the test data.
8103 (delete 'patch-source-shebangs))))
8104 (native-inputs
8105 `(("ruby-bacon" ,ruby-bacon)))
8106 (synopsis "Ruby library for MIME detection by extension or content")
8107 (description
8108 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
8109extension or content, using the freedesktop.org.xml shared-mime-info
8110database.")
8111 (home-page "https://github.com/minad/mimemagic")
8112 (license license:expat)))
8113
32d1c06f
BW
8114(define-public ruby-mime-types-data
8115 (package
8116 (name "ruby-mime-types-data")
f49511db 8117 (version "3.2016.0521")
32d1c06f
BW
8118 (source
8119 (origin
8120 (method url-fetch)
8121 (uri (rubygems-uri "mime-types-data" version))
8122 (sha256
8123 (base32
f49511db 8124 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
32d1c06f
BW
8125 (build-system ruby-build-system)
8126 (native-inputs
8127 `(("ruby-hoe" ,ruby-hoe)))
8128 (synopsis "Registry for information about MIME media type definitions")
8129 (description
8130 "@code{mime-types-data} provides a registry for information about
8131Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
8132be used with the Ruby mime-types library or other software to determine
8133defined filename extensions for MIME types, or to use filename extensions to
8134look up the likely MIME type definitions.")
8135 (home-page "https://github.com/mime-types/mime-types-data/")
8136 (license license:expat)))
8137
d39b606c
BW
8138(define-public ruby-mime-types
8139 (package
8140 (name "ruby-mime-types")
803bcc81 8141 (version "3.1")
d39b606c
BW
8142 (source
8143 (origin
8144 (method url-fetch)
8145 (uri (rubygems-uri "mime-types" version))
8146 (sha256
8147 (base32
803bcc81 8148 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
d39b606c
BW
8149 (build-system ruby-build-system)
8150 (propagated-inputs
8151 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
8152 (native-inputs
8153 `(("ruby-hoe" ,ruby-hoe)
8154 ("ruby-fivemat" ,ruby-fivemat)
8155 ("ruby-minitest-focus" ,ruby-minitest-focus)
8156 ("ruby-minitest-rg" ,ruby-minitest-rg)
803bcc81
BW
8157 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
8158 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
d39b606c
BW
8159 (synopsis "Library and registry for MIME content type definitions")
8160 (description "The mime-types library provides a library and registry for
8161information about Multipurpose Internet Mail Extensions (MIME) content type
8162definitions. It can be used to determine defined filename extensions for MIME
8163types, or to use filename extensions to look up the likely MIME type
8164definitions.")
8165 (home-page "https://github.com/mime-types/ruby-mime-types")
8166 (license license:expat)))
8167
eb5e0bd9
BW
8168(define-public ruby-fivemat
8169 (package
8170 (name "ruby-fivemat")
c664ebcc 8171 (version "1.3.7")
eb5e0bd9
BW
8172 (source
8173 (origin
8174 (method url-fetch)
8175 (uri (rubygems-uri "fivemat" version))
8176 (sha256
8177 (base32
c664ebcc 8178 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
eb5e0bd9
BW
8179 (build-system ruby-build-system)
8180 (arguments
8181 `(#:tests? #f)) ; no tests
8182 (synopsis "Each test file given its own line of dots")
8183 (description
8184 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
8185its own line of dots during testing. It aims to provide test output that is
8186neither too verbose nor too minimal.")
8187 (home-page "https://github.com/tpope/fivemat")
8188 (license license:expat)))
8189
4fea500b
BW
8190(define-public ruby-sqlite3
8191 (package
8192 (name "ruby-sqlite3")
e7cdba61 8193 (version "1.4.2")
4fea500b
BW
8194 (source
8195 (origin
8196 (method url-fetch)
8197 (uri (rubygems-uri "sqlite3" version))
8198 (sha256
8199 (base32
e7cdba61 8200 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
4fea500b
BW
8201 (build-system ruby-build-system)
8202 (arguments
8203 `(#:phases
8204 (modify-phases %standard-phases
8205 (add-before 'check 'add-gemtest-file
8206 ;; This file exists in the repository but is not distributed.
9923d5a4 8207 (lambda _ (invoke "touch" ".gemtest"))))))
4fea500b
BW
8208 (inputs
8209 `(("sqlite" ,sqlite)))
8210 (native-inputs
8211 `(("ruby-hoe" ,ruby-hoe)
8212 ("ruby-rake-compiler" ,ruby-rake-compiler)
8213 ("ruby-mini-portile" ,ruby-mini-portile)))
8214 (synopsis "Interface with SQLite3 databases")
8215 (description
8216 "This module allows Ruby programs to interface with the SQLite3 database
8217engine.")
8218 (home-page
8219 "https://github.com/sparklemotion/sqlite3-ruby")
8220 (license license:bsd-3)))
8221
4dfa39cc
BW
8222(define-public ruby-shoulda-context
8223 (package
8224 (name "ruby-shoulda-context")
e7d1d472 8225 (version "1.2.2")
4dfa39cc
BW
8226 (source
8227 (origin
8228 (method url-fetch)
8229 (uri (rubygems-uri "shoulda-context" version))
8230 (sha256
8231 (base32
e7d1d472 8232 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
4dfa39cc
BW
8233 (build-system ruby-build-system)
8234 (arguments
8235 `(#:phases
8236 (modify-phases %standard-phases
8237 (replace 'check
8238 (lambda _
8239 ;; Do not run tests to avoid circular dependence with rails.
8240 ;; Instead just import the library to test.
9923d5a4 8241 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
4dfa39cc
BW
8242 (synopsis "Test::Unit context framework extracted from Shoulda")
8243 (description
8244 "@code{shoulda-context} is the context framework extracted from Shoulda.
8245Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
8246context, setup, and should blocks combine to produce natural test method
8247names.")
8248 (home-page "https://github.com/thoughtbot/shoulda-context")
8249 (license license:expat)))
8250
e4fea008
BW
8251(define-public ruby-shoulda-matchers
8252 (package
8253 (name "ruby-shoulda-matchers")
d1c1f368 8254 (version "3.1.2")
e4fea008
BW
8255 (source
8256 (origin
8257 (method url-fetch)
8258 (uri (rubygems-uri "shoulda-matchers" version))
8259 (sha256
8260 (base32
d1c1f368 8261 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
e4fea008
BW
8262 (build-system ruby-build-system)
8263 (arguments
8264 `(#:phases
8265 (modify-phases %standard-phases
e4fea008
BW
8266 (replace 'check
8267 (lambda _
8268 ;; Do not run tests to avoid circular dependence with rails. Instead
8269 ;; just import the library to test.
9923d5a4 8270 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
e4fea008
BW
8271 (propagated-inputs
8272 `(("ruby-activesupport" ,ruby-activesupport)))
8273 (synopsis "Collection of testing matchers extracted from Shoulda")
8274 (description
8275 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
8276test common Rails functionality. These tests would otherwise be much longer,
8277more complex, and error-prone.")
8278 (home-page "https://github.com/thoughtbot/shoulda-matchers")
8279 (license license:expat)))
8280
3885c58b
BW
8281(define-public ruby-shoulda-matchers-2
8282 (package
8283 (inherit ruby-shoulda-matchers)
8284 (version "2.8.0")
8285 (source (origin
8286 (method url-fetch)
8287 (uri (rubygems-uri "shoulda-matchers" version))
8288 (sha256
8289 (base32
8290 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
8291
6f390716
BW
8292(define-public ruby-shoulda
8293 (package
8294 (name "ruby-shoulda")
8295 (version "3.5.0")
8296 (source
8297 (origin
8298 (method url-fetch)
8299 (uri (rubygems-uri "shoulda" version))
8300 (sha256
8301 (base32
8302 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
8303 (build-system ruby-build-system)
8304 (arguments
8305 `(#:phases
8306 (modify-phases %standard-phases
8307 (replace 'check
8308 ;; Don't run tests to avoid circular dependence with rails. Instead
8309 ;; just import the library to test.
9923d5a4 8310 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
6f390716
BW
8311 (propagated-inputs
8312 `(("ruby-shoulda-context" ,ruby-shoulda-context)
8313 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
8314 (synopsis "Context framework and matchers for testing")
8315 (description
8316 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
8317@code{shoulda-matchers} providing tools for writing tests.")
8318 (home-page "https://github.com/thoughtbot/shoulda")
8319 (license license:expat)))
8320
3b44bcdf
BW
8321(define-public ruby-unf
8322 (package
8323 (name "ruby-unf")
8324 (version "0.1.4")
8325 (source
8326 (origin
8327 (method url-fetch)
8328 (uri (rubygems-uri "unf" version))
8329 (sha256
8330 (base32
8331 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
8332 (build-system ruby-build-system)
8333 (arguments
8334 `(#:phases
8335 (modify-phases %standard-phases
8336 (add-before 'check 'add-dependency-to-bundler
8337 (lambda _
8338 ;; test-unit is required but not provided by the bundler
8339 ;; environment. This is fixed in the upstream repository but fix
8340 ;; has not been released.
8341 (substitute* "Gemfile"
8342 (("^gemspec") "gem 'test-unit'\ngemspec"))
8343 #t)))))
8344 (propagated-inputs
8345 `(("ruby-unf-ext" ,ruby-unf-ext)))
8346 (native-inputs
8347 `(("ruby-shoulda" ,ruby-shoulda)
8348 ("bundler" ,bundler)
8349 ("ruby-test-unit" ,ruby-test-unit)))
8350 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
8351 (description
8352 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
8353support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
8354@code{java.text.Normalizer} on JRuby.")
8355 (home-page "https://github.com/knu/ruby-unf")
8356 (license license:bsd-2)))
8357
e32c99d2
CB
8358(define-public ruby-warden
8359 (package
8360 (name "ruby-warden")
8361 (version "1.2.8")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (rubygems-uri "warden" version))
8366 (sha256
8367 (base32
8368 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8369 (build-system ruby-build-system)
8370 (arguments
8371 '(#:tests? #f)) ; No included tests
8372 (propagated-inputs
8373 `(("ruby-rack" ,ruby-rack)))
8374 (synopsis "Rack middleware providing authentication")
8375 (description
8376 "Warden is a Rack-based middleware that provides a mechanism for
8377authentication in Ruby web applications.")
8378 (home-page "https://github.com/wardencommunity/warden")
8379 (license license:expat)))
8380
e42eecdb
CB
8381(define-public ruby-warden-oauth2
8382 (package
8383 (name "ruby-warden-oauth2")
8384 (version "0.0.1")
8385 (source
8386 (origin
8387 (method url-fetch)
8388 (uri (rubygems-uri "warden-oauth2" version))
8389 (sha256
8390 (base32
8391 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8392 (build-system ruby-build-system)
8393 (arguments
8394 '(#:test-target "spec"
8395 #:phases
8396 (modify-phases %standard-phases
8397 (add-after 'unpack 'remove-unnecessary-dependencies
8398 (lambda _
8399 (substitute* "Gemfile"
8400 ;; All of these gems relate to development, and are unnecessary
8401 ;; when running the tests
8402 (("gem 'guard-bundler'") "")
8403 (("gem 'guard'") "")
8404 (("gem 'guard-rspec'") "")
8405 (("gem 'rb-fsevent'") "")
8406 (("gem 'pry'") "")
8407 (("gem 'growl'") ""))
8408 #t))
8409 ;; The test suite doesn't work with rspec@2, and this is incompatible
8410 ;; with the current version of Rake, so invoke Rspec directly
8411 (replace 'check
8412 (lambda* (#:key tests? #:allow-other-keys)
8413 (when tests?
8414 (invoke "bundle" "exec" "rspec"))
8415 #t)))))
8416 (propagated-inputs
8417 `(("ruby-warden" ,ruby-warden)))
8418 (native-inputs
8419 `(("bundler" ,bundler)
8420 ("ruby-rspec" ,ruby-rspec-2)
8421 ("ruby-rack-test" ,ruby-rack-test)))
8422 (synopsis "OAuth 2.0 strategies for Warden")
8423 (description
8424 "This library extends Warden to support OAuth 2.0 authorized API
8425requests.")
8426 (home-page "https://github.com/opperator/warden-oauth2")
8427 (license license:expat)))
8428
8c7ae384
CB
8429(define-public ruby-webmock-2
8430 (package
8431 (name "ruby-webmock")
8432 (version "2.3.2")
8433 (source
8434 (origin
8435 (method url-fetch)
8436 (uri (rubygems-uri "webmock" version))
8437 (sha256
8438 (base32
8439 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8440 (build-system ruby-build-system)
8441 (native-inputs
8442 `(("bundler" ,bundler)
8443 ("ruby-rspec" ,ruby-rspec)))
8444 (propagated-inputs
8445 `(("ruby-addressable" ,ruby-addressable)
8446 ("ruby-crack" ,ruby-crack)
8447 ("ruby-hashdiff" ,ruby-hashdiff)))
8448 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8449 (description
8450 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8451requests. This is useful when testing software.")
8452 (home-page "https://github.com/bblimke/webmock")
8453 (license license:expat)))
8454
d8c189ed
CB
8455(define-public ruby-unicode-display-width
8456 (package
8457 (name "ruby-unicode-display-width")
216ccced 8458 (version "1.6.0")
d8c189ed
CB
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (rubygems-uri "unicode-display_width" version))
8463 (sha256
8464 (base32
216ccced 8465 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
d8c189ed
CB
8466 (build-system ruby-build-system)
8467 (arguments
8468 '(;; Test data not included.
8469 #:tests? #f))
8470 (synopsis "Determine the monospace display width of Ruby strings")
8471 (description
8472 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8473display width of strings in Ruby.")
8474 (home-page "https://github.com/janlelis/unicode-display_width")
8475 (license license:expat)))
8476
6120589f
CB
8477;; There is another gem called 'ruby-version' so we use an underscore in this
8478;; name
8479(define-public ruby_version
8480 (package
8481 (name "ruby_version")
1097fdbe 8482 (version "1.0.2")
6120589f
CB
8483 (source
8484 (origin
8485 (method url-fetch)
8486 (uri (rubygems-uri "ruby_version" version))
8487 (sha256
8488 (base32
1097fdbe 8489 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
6120589f
CB
8490 (build-system ruby-build-system)
8491 (arguments
1097fdbe 8492 `(#:phases
6120589f
CB
8493 (modify-phases %standard-phases
8494 (add-before 'check 'fix-dependencies
8495 (lambda _
8496 ;; Remove the Gemfile.lock, as we want to use Guix packages at
8497 ;; whatever versions.
8498 (delete-file "Gemfile.lock")
1097fdbe
MC
8499 ;; Remove the included gem files as they unnecessary.
8500 (delete-file-recursively "pkg/")
8501 ;; Accept any version of rake, rdoc and rspec
6120589f 8502 (substitute* "ruby_version.gemspec"
6120589f 8503 (("%q<rake.*") "%q<rake>)\n")
1097fdbe 8504 (("%q<rdoc.*") "%q<rdoc>)\n")
6120589f 8505 (("%q<rspec.*") "%q<rspec>)\n"))
1097fdbe 8506 ;; Do not use bundler.
6120589f 8507 (substitute* "Rakefile"
1097fdbe 8508 (("Bundler\\.setup.*") "nil\n"))
6120589f
CB
8509 #t)))))
8510 (native-inputs
1097fdbe
MC
8511 `(("ruby-rdoc" ,ruby-rdoc)
8512 ("ruby-rspec" ,ruby-rspec)
8513 ("ruby-rubygems-tasks", ruby-rubygems-tasks)))
6120589f 8514 (synopsis "Ruby library to help check the Ruby version")
1097fdbe 8515 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
6120589f
CB
8516checking for the right Ruby version in software.")
8517 (home-page "https://github.com/janlelis/ruby_version")
8518 (license license:expat)))
8519
a229acff
CB
8520(define-public ruby-websocket-driver
8521 (package
8522 (name "ruby-websocket-driver")
9d1cf6d4 8523 (version "0.7.1")
a229acff
CB
8524 (source
8525 (origin
8526 (method url-fetch)
8527 (uri (rubygems-uri "websocket-driver" version))
8528 (sha256
9d1cf6d4 8529 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
a229acff
CB
8530 (build-system ruby-build-system)
8531 (arguments
9d1cf6d4 8532 '(#:tests? #f)) ; no included tests
a229acff
CB
8533 (propagated-inputs
8534 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
8535 (synopsis "WebSocket protocol handler with pluggable I/O")
8536 (description
8537 "@code{websocket-driver} provides a complete implementation of the
8538WebSocket protocols that can be hooked up to any TCP library")
8539 (home-page "https://github.com/faye/websocket-driver-ruby")
8540 (license license:expat)))
8541
52b015a9
CB
8542(define-public ruby-websocket-extensions
8543 (package
8544 (name "ruby-websocket-extensions")
8545 (version "0.1.3")
8546 (source
8547 (origin
8548 (method url-fetch)
8549 (uri (rubygems-uri "websocket-extensions" version))
8550 (sha256
8551 (base32
8552 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
8553 (build-system ruby-build-system)
8554 (arguments
8555 '(;; No included tests
8556 #:tests? #f))
8557 (synopsis "Generic extension manager for WebSocket connections")
8558 (description
8559 "@code{websocket-extensions} provides a container for registering
8560extension plugins.")
8561 (home-page "https://github.com/faye/websocket-extensions-ruby")
8562 (license license:expat)))
8563
5799aadd
BW
8564(define-public ruby-domain-name
8565 (package
8566 (name "ruby-domain-name")
222999c9 8567 (version "0.5.20180417")
5799aadd
BW
8568 (source
8569 (origin
8570 (method url-fetch)
8571 (uri (rubygems-uri "domain_name" version))
8572 (sha256
8573 (base32
222999c9 8574 "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"))))
5799aadd
BW
8575 (build-system ruby-build-system)
8576 (arguments
8577 `(#:phases
8578 (modify-phases %standard-phases
8579 (add-before 'check 'fix-versions
8580 (lambda _
8581 ;; Fix NameError that appears to already be fixed upstream.
8582 (substitute* "Rakefile"
8583 (("DomainName::VERSION")
8584 "Bundler::GemHelper.gemspec.version"))
8585 ;; Loosen unnecessarily strict test-unit version specification.
8586 (substitute* "domain_name.gemspec"
71596c3c 8587 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
5799aadd
BW
8588 #t)))))
8589 (propagated-inputs
8590 `(("ruby-unf" ,ruby-unf)))
8591 (native-inputs
8592 `(("ruby-shoulda" ,ruby-shoulda)
8593 ("bundler" ,bundler)
8594 ("ruby-test-unit" ,ruby-test-unit)))
8595 (synopsis "Domain name manipulation library")
8596 (description
8597 "@code{domain_name} is a Domain name manipulation library. It parses a
8598domain name ready for extracting the registered domain and TLD (Top Level
8599Domain). It can also be used for cookie domain validation based on the Public
8600Suffix List.")
8601 (home-page "https://github.com/knu/ruby-domain_name")
8602 (license license:bsd-2)))
8603
d114ceeb
BW
8604(define-public ruby-http-cookie
8605 (package
8606 (name "ruby-http-cookie")
2a2eb07d 8607 (version "1.0.3")
d114ceeb
BW
8608 (source
8609 (origin
8610 (method url-fetch)
8611 (uri (rubygems-uri "http-cookie" version))
8612 (sha256
8613 (base32
2a2eb07d 8614 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
d114ceeb
BW
8615 (build-system ruby-build-system)
8616 (arguments
8617 `(#:phases
8618 (modify-phases %standard-phases
8619 (add-before 'check 'add-dependency-to-bundler
8620 (lambda _
8621 ;; Fix NameError
8622 (substitute* "Rakefile"
8623 (("HTTP::Cookie::VERSION")
8624 "Bundler::GemHelper.gemspec.version"))
8625 #t)))))
8626 (propagated-inputs
8627 `(("ruby-domain-name" ,ruby-domain-name)))
8628 (native-inputs
8629 `(("rubysimplecov" ,ruby-simplecov)
8630 ("bundler" ,bundler)
8631 ("ruby-sqlite3" ,ruby-sqlite3)
8632 ("ruby-test-unit" ,ruby-test-unit)))
8633 (synopsis "Handle HTTP Cookies based on RFC 6265")
8634 (description
8635 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
8636RFC 6265. It has been designed with security, standards compliance and
8637compatibility in mind, to behave just the same as today's major web browsers.
8638It has built-in support for the legacy @code{cookies.txt} and
8639@code{cookies.sqlite} formats of Mozilla Firefox.")
8640 (home-page "https://github.com/sparklemotion/http-cookie")
8641 (license license:expat)))
8642
1c8e6fd3
CB
8643(define-public ruby-httpclient
8644 (package
8645 (name "ruby-httpclient")
8646 (version "2.8.3")
8647 (source
8648 (origin
8649 (method url-fetch)
8650 (uri (rubygems-uri "httpclient" version))
8651 (sha256
8652 (base32
8653 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
8654 (build-system ruby-build-system)
8655 (arguments
8656 '(;; TODO: Some tests currently fail
8657 ;; ------
8658 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
8659 ;; 2 omissions, 0 notifications
8660 ;; 91.866% passed
8661 ;; ------
8662 ;; 6.49 tests/s, 22.41 assertions/s
8663 #:tests? #f
8664 #:phases
8665 (modify-phases %standard-phases
8666 (replace 'check
8667 (lambda* (#:key tests? #:allow-other-keys)
8668 (if tests?
9923d5a4
TGR
8669 (invoke "ruby"
8670 "-Ilib"
8671 "test/runner.rb")
0076f5a9 8672 #t))))))
1c8e6fd3
CB
8673 (native-inputs
8674 `(("ruby-rack" ,ruby-rack)))
8675 (synopsis
8676 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
8677 (description
8678 "The @code{httpclient} ruby library provides functionality related to
8679HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
8680Cookie, multithreading and authentication (digest, NTLM) support.
8681
8682Also provided is a @command{httpclient} command, which can perform HTTP
8683requests either using arguments or with an interactive prompt.")
8684 (home-page "https://github.com/nahi/httpclient")
8685 (license license:ruby)))
8686
7d3a1a2d
BW
8687(define-public ruby-ansi
8688 (package
8689 (name "ruby-ansi")
8690 (version "1.5.0")
8691 (source
8692 (origin
3d30c332 8693 (method git-fetch)
7d3a1a2d 8694 ;; Fetch from GitHub as the gem does not contain testing code.
3d30c332
EF
8695 (uri (git-reference
8696 (url "https://github.com/rubyworks/ansi")
8697 (commit version)))
8698 (file-name (git-file-name name version))
7d3a1a2d
BW
8699 (sha256
8700 (base32
3d30c332 8701 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
7d3a1a2d
BW
8702 (build-system ruby-build-system)
8703 (arguments
8704 `(#:phases
8705 (modify-phases %standard-phases
8706 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
8707 ;; cycle ansi, qed, ansi. Instead simply test that the library can
8708 ;; be require'd.
8709 (replace 'check
8710 (lambda _
9923d5a4 8711 (invoke "ruby" "-Ilib" "-r" "ansi")))
0899352f
MB
8712 (add-before 'validate-runpath 'replace-broken-symlink
8713 (lambda* (#:key outputs #:allow-other-keys)
8714 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
8715 (file (string-append
8716 out "/lib/ruby/vendor_ruby/gems/ansi-"
8717 ,version "/lib/ansi.yml")))
0899352f
MB
8718 ;; XXX: This symlink is broken since ruby 2.4.
8719 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
8720 (delete-file file)
8721 (symlink "../.index" file)
8722 #t))))))
7d3a1a2d
BW
8723 (synopsis "ANSI escape code related libraries")
8724 (description
8725 "This package is a collection of ANSI escape code related libraries
8726enabling ANSI colorization and stylization of console output. Included in the
8727library are the @code{Code} module, which defines ANSI codes as constants and
8728methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
8729@code{ProgressBar}, and a @code{String} subclass. The library also includes a
8730@code{Terminal} module which provides information about the current output
8731device.")
3d30c332 8732 (home-page "https://rubyworks.github.io/ansi/")
7d3a1a2d 8733 (license license:bsd-2)))
7c033c46
BW
8734
8735(define-public ruby-systemu
8736 (package
8737 (name "ruby-systemu")
8738 (version "2.6.5")
8739 (source
8740 (origin
8741 (method url-fetch)
8742 (uri (rubygems-uri "systemu" version))
8743 (sha256
8744 (base32
8745 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
8746 (build-system ruby-build-system)
8747 (arguments
8748 `(#:phases
8749 (modify-phases %standard-phases
8750 (add-before 'check 'set-version
8751 (lambda _
8752 (setenv "VERSION" ,version)
8753 #t)))))
8754 (synopsis "Capture of stdout/stderr and handling of child processes")
8755 (description
8756 "Systemu can be used on any platform to return status, stdout, and stderr
8757of any command. Unlike other methods like @code{open3} and @code{popen4}
8758there is no danger of full pipes or threading issues hanging your process or
8759subprocess.")
8760 (home-page "https://github.com/ahoward/systemu")
8761 (license license:ruby)))
3d84a99e
BW
8762
8763(define-public ruby-bio-commandeer
8764 (package
8765 (name "ruby-bio-commandeer")
37b08547 8766 (version "0.4.0")
3d84a99e
BW
8767 (source
8768 (origin
8769 (method url-fetch)
8770 (uri (rubygems-uri "bio-commandeer" version))
8771 (sha256
8772 (base32
37b08547 8773 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
3d84a99e
BW
8774 (build-system ruby-build-system)
8775 (arguments
8776 `(#:phases
8777 (modify-phases %standard-phases
8778 (replace 'check
8779 ;; Run test without calling 'rake' so that jeweler is
8780 ;; not required as an input.
8781 (lambda _
9923d5a4 8782 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
3d84a99e
BW
8783 (propagated-inputs
8784 `(("ruby-bio-logger" ,ruby-bio-logger)
8785 ("ruby-systemu" ,ruby-systemu)))
8786 (native-inputs
8787 `(("bundler" ,bundler)
8788 ("ruby-rspec" ,ruby-rspec)))
8789 (synopsis "Simplified running of shell commands from within Ruby")
8790 (description
8791 "Bio-commandeer provides an opinionated method of running shell commands
8792from within Ruby. The advantage of bio-commandeer over other methods of
8793running external commands is that when something goes wrong, messages printed
8794to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
8795detail to ease debugging.")
7bf837fd 8796 (home-page "https://github.com/wwood/bioruby-commandeer")
3d84a99e 8797 (license license:expat)))
7c8131c7
BW
8798
8799(define-public ruby-rubytest
8800 (package
8801 (name "ruby-rubytest")
8802 (version "0.8.1")
8803 (source
8804 (origin
8805 (method url-fetch)
8806 (uri (rubygems-uri "rubytest" version))
8807 (sha256
8808 (base32
8809 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
8810 (build-system ruby-build-system)
8811 (arguments
8812 ;; Disable regular testing to break the cycle rubytest, qed, brass,
8813 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
8814 ;; simply test that the library can be require'd.
8815 `(#:phases
8816 (modify-phases %standard-phases
8817 (replace 'check
8818 (lambda _
9923d5a4 8819 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
7c8131c7
BW
8820 (propagated-inputs
8821 `(("ruby-ansi" ,ruby-ansi)))
8822 (synopsis "Universal test harness for Ruby")
8823 (description
8824 "Rubytest is a testing meta-framework for Ruby. It can handle any
8825compliant test framework and can run tests from multiple frameworks in a
8826single pass.")
2f3800e5 8827 (home-page "https://rubyworks.github.io/rubytest")
7c8131c7 8828 (license license:bsd-2)))
90fcedf2
BW
8829
8830(define-public ruby-brass
8831 (package
8832 (name "ruby-brass")
8833 (version "1.2.1")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (rubygems-uri "brass" version))
8838 (sha256
8839 (base32
8840 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
8841 (build-system ruby-build-system)
8842 (arguments
8843 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
8844 ;; Instead simply test that the library can be require'd.
8845 `(#:phases
8846 (modify-phases %standard-phases
8847 (replace 'check
8848 (lambda _
9923d5a4 8849 (invoke "ruby" "-Ilib" "-r" "brass"))))))
90fcedf2
BW
8850 (synopsis "Basic foundational assertions framework")
8851 (description
8852 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
8853foundational assertions framework for other assertion and test frameworks to
8854make use of.")
2f3800e5 8855 (home-page "https://rubyworks.github.io/brass")
90fcedf2 8856 (license license:bsd-2)))
120fc74b
BW
8857
8858(define-public ruby-qed
8859 (package
8860 (name "ruby-qed")
8861 (version "2.9.2")
8862 (source
8863 (origin
8864 (method url-fetch)
8865 (uri (rubygems-uri "qed" version))
8866 (sha256
8867 (base32
8868 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
8869 (build-system ruby-build-system)
8870 (arguments
8871 ;; Disable testing to break the cycle qed, ansi, qed, among others.
8872 ;; Instead simply test that the executable runs using --copyright.
8873 `(#:phases
8874 (modify-phases %standard-phases
8875 (replace 'check
8876 (lambda _
9923d5a4 8877 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
120fc74b
BW
8878 (propagated-inputs
8879 `(("ruby-ansi" ,ruby-ansi)
8880 ("ruby-brass" ,ruby-brass)))
8881 (synopsis "Test framework utilizing literate programming techniques")
8882 (description
8883 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
8884@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
8885Development} (BDD) utilizing Literate Programming techniques. QED sits
8886somewhere between lower-level testing tools like @code{Test::Unit} and
8887requirement specifications systems like Cucumber.")
2f3800e5 8888 (home-page "https://rubyworks.github.io/qed")
120fc74b 8889 (license license:bsd-2)))
9273ee8f 8890
dbbe88d3
CB
8891(define-public ruby-que
8892 (package
8893 (name "ruby-que")
8894 (version "1.0.0.beta3")
8895 (source
8896 (origin
8897 (method url-fetch)
8898 (uri (rubygems-uri "que" version))
8899 (sha256
8900 (base32
8901 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
8902 (build-system ruby-build-system)
8903 (arguments
8904 '(#:tests? #f)) ; No included tests
8905 (synopsis "Job queue using PostgreSQL written in Ruby")
8906 (description
8907 "This package provides a job queue that uses PostgreSQL for storing jobs
8908and locking between worker processes.")
8909 (home-page "https://github.com/chanks/que")
8910 (license license:expat)))
8911
9273ee8f
BW
8912(define-public ruby-ae
8913 (package
8914 (name "ruby-ae")
8915 (version "1.8.2")
8916 (source
8917 (origin
11d1b318 8918 (method git-fetch)
9273ee8f 8919 ;; Fetch from github so tests are included.
11d1b318
EF
8920 (uri (git-reference
8921 (url "https://github.com/rubyworks/ae")
8922 (commit version)))
8923 (file-name (git-file-name name version))
9273ee8f
BW
8924 (sha256
8925 (base32
11d1b318 8926 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9273ee8f
BW
8927 (build-system ruby-build-system)
8928 (arguments
8929 `(#:phases
8930 (modify-phases %standard-phases
8931 (replace 'check
9923d5a4 8932 (lambda _ (invoke "qed")))
de6f6efd
MB
8933 (add-before 'validate-runpath 'replace-broken-symlink
8934 (lambda* (#:key outputs #:allow-other-keys)
8935 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
8936 (file (string-append
8937 out "/lib/ruby/vendor_ruby/gems/ae-"
8938 ,version "/lib/ae.yml")))
de6f6efd
MB
8939 ;; XXX: This symlink is broken since ruby 2.4.
8940 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
8941 (delete-file file)
8942 (symlink "../.index" file)
8943 #t))))))
9273ee8f
BW
8944 (propagated-inputs
8945 `(("ruby-ansi" ,ruby-ansi)))
8946 (native-inputs
8947 `(("ruby-qed" ,ruby-qed)))
8948 (synopsis "Assertions library")
8949 (description
8950 "Assertive Expressive (AE) is an assertions library specifically designed
8951for reuse by other test frameworks.")
11d1b318 8952 (home-page "https://rubyworks.github.io/ae/")
9273ee8f 8953 (license license:bsd-2)))
78bb471f
BW
8954
8955(define-public ruby-lemon
8956 (package
8957 (name "ruby-lemon")
8958 (version "0.9.1")
8959 (source
8960 (origin
8961 (method url-fetch)
8962 (uri (rubygems-uri "lemon" version))
8963 (sha256
8964 (base32
8965 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
8966 (build-system ruby-build-system)
8967 (arguments
8968 `(#:phases
8969 (modify-phases %standard-phases
9923d5a4 8970 (replace 'check (lambda _ (invoke "qed"))))))
78bb471f
BW
8971 (propagated-inputs
8972 `(("ruby-ae" ,ruby-ae)
8973 ("ruby-ansi" ,ruby-ansi)
8974 ("ruby-rubytest" ,ruby-rubytest)))
8975 (native-inputs
8976 `(("ruby-qed" ,ruby-qed)))
8977 (synopsis "Test framework correlating code structure and test unit")
8978 (description
8979 "Lemon is a unit testing framework that enforces highly formal
8980case-to-class and unit-to-method test construction. This enforcement can help
8981focus concern on individual units of behavior.")
2f3800e5 8982 (home-page "https://rubyworks.github.io/lemon")
78bb471f 8983 (license license:bsd-2)))
0832804e
BW
8984
8985(define-public ruby-rubytest-cli
8986 (package
8987 (name "ruby-rubytest-cli")
8988 (version "0.2.0")
8989 (source
8990 (origin
8991 (method url-fetch)
8992 (uri (rubygems-uri "rubytest-cli" version))
8993 (sha256
8994 (base32
8995 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
8996 (build-system ruby-build-system)
8997 (arguments
8998 `(#:tests? #f)) ; no tests
8999 (propagated-inputs
9000 `(("ruby-ansi" ,ruby-ansi)
9001 ("ruby-rubytest" ,ruby-rubytest)))
9002 (synopsis "Command-line interface for rubytest")
9003 (description
9004 "Rubytest CLI is a command-line interface for running tests for
9005Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
2f3800e5 9006 (home-page "https://rubyworks.github.io/rubytest-cli")
0832804e 9007 (license license:bsd-2)))
72ccbfe3
BW
9008
9009(define-public ruby-hashery
9010 (package
9011 (name "ruby-hashery")
cba96208 9012 (version "2.1.2")
72ccbfe3
BW
9013 (source
9014 (origin
9015 (method url-fetch)
9016 (uri (rubygems-uri "hashery" version))
9017 (sha256
9018 (base32
cba96208 9019 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
72ccbfe3
BW
9020 (build-system ruby-build-system)
9021 (arguments
9022 `(#:phases
9023 (modify-phases %standard-phases
9024 (replace 'check
9025 (lambda _
9923d5a4
TGR
9026 (invoke "qed")
9027 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
72ccbfe3
BW
9028 (native-inputs
9029 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
9030 ("ruby-qed" ,ruby-qed)
9031 ("ruby-lemon" ,ruby-lemon)))
9032 (synopsis "Hash-like classes with extra features")
9033 (description
9034 "The Hashery is a tight collection of @code{Hash}-like classes.
9035Included are the auto-sorting @code{Dictionary} class, the efficient
9036@code{LRUHash}, the flexible @code{OpenHash} and the convenient
9037@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
9038defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
9039standard @code{Hash} making it possible to subclass and augment to fit any
9040specific use case.")
2f3800e5 9041 (home-page "https://rubyworks.github.io/hashery")
72ccbfe3 9042 (license license:bsd-2)))
1f1d71e0
BW
9043
9044(define-public ruby-rc4
9045 (package
9046 (name "ruby-rc4")
9047 (version "0.1.5")
9048 (source
9049 (origin
9050 (method url-fetch)
9051 (uri (rubygems-uri "ruby-rc4" version))
9052 (sha256
9053 (base32
9054 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
9055 (build-system ruby-build-system)
9056 (arguments
9057 `(#:phases
9058 (modify-phases %standard-phases
9059 (replace 'check
9060 (lambda _
9923d5a4 9061 (invoke "rspec" "spec/rc4_spec.rb"))))))
1f1d71e0
BW
9062 (native-inputs
9063 `(("ruby-rspec" ,ruby-rspec-2)))
9064 (synopsis "Implementation of the RC4 algorithm")
9065 (description
9066 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
9067 (home-page "https://github.com/caiges/Ruby-RC4")
9068 (license license:expat)))
f3e085a8
BW
9069
9070(define-public ruby-afm
9071 (package
9072 (name "ruby-afm")
9073 (version "0.2.2")
9074 (source
9075 (origin
9076 (method url-fetch)
9077 (uri (rubygems-uri "afm" version))
9078 (sha256
9079 (base32
9080 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
9081 (build-system ruby-build-system)
9082 (native-inputs
9083 `(("bundler" ,bundler)))
9084 (synopsis "Read Adobe Font Metrics (afm) files")
9085 (description
9086 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
9087files and use the data therein.")
7bf837fd 9088 (home-page "https://github.com/halfbyte/afm")
f3e085a8 9089 (license license:expat)))
acb6be42
BW
9090
9091(define-public ruby-ascii85
9092 (package
9093 (name "ruby-ascii85")
5854082a 9094 (version "1.0.3")
acb6be42
BW
9095 (source
9096 (origin
9097 (method url-fetch)
9098 (uri (rubygems-uri "Ascii85" version))
9099 (sha256
9100 (base32
5854082a 9101 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
acb6be42
BW
9102 (build-system ruby-build-system)
9103 (native-inputs
9104 `(("bundler" ,bundler)))
9105 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
9106 (description
9107 "This library provides methods to encode and decode Ascii85
9108binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
9109@dfn{Portable Document Format} (PDF) file formats.")
9110 (home-page "https://github.com/datawraith/ascii85gem")
9111 (license license:expat)))
edf8caae
BW
9112
9113(define-public ruby-ttfunk
9114 (package
9115 (name "ruby-ttfunk")
4179ed93 9116 (version "1.6.2.1")
edf8caae
BW
9117 (source
9118 (origin
4e110825 9119 (method git-fetch)
edf8caae 9120 ;; fetch from github as the gem does not contain testing code
4e110825
EF
9121 (uri (git-reference
9122 (url "https://github.com/prawnpdf/ttfunk")
9123 (commit version)))
9124 (file-name (git-file-name name version))
edf8caae
BW
9125 (sha256
9126 (base32
4179ed93 9127 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
edf8caae
BW
9128 (build-system ruby-build-system)
9129 (arguments
9130 `(#:test-target "spec"
9131 #:phases
9132 (modify-phases %standard-phases
afb7a3e8
JL
9133 (add-before 'build 'remove-ssh
9134 (lambda _
9135 ;; remove dependency on an ssh key pair that doesn't exist
9136 (substitute* "ttfunk.gemspec"
9137 (("spec.signing_key.*") ""))
9138 #t))
edf8caae
BW
9139 (add-before 'check 'remove-rubocop
9140 (lambda _
9141 ;; remove rubocop as a dependency as not needed for testing
9142 (substitute* "ttfunk.gemspec"
9143 (("spec.add_development_dependency\\('rubocop'.*") ""))
9144 (substitute* "Rakefile"
9145 (("require 'rubocop/rake_task'") "")
afb7a3e8 9146 (("RuboCop::RakeTask.new") ""))
edf8caae
BW
9147 #t)))))
9148 (native-inputs
9149 `(("ruby-rspec" ,ruby-rspec)
afb7a3e8 9150 ("ruby-yard" ,ruby-yard)
edf8caae
BW
9151 ("bundler" ,bundler)))
9152 (synopsis "Font metrics parser for the Prawn PDF generator")
9153 (description
9154 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
9155part of the Prawn PDF generator.")
9156 (home-page "https://github.com/prawnpdf/ttfunk")
9157 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
9158 ;; for details."
4179ed93 9159 (license %prawn-project-licenses)))
cbdd428c 9160
9270298f
BW
9161(define-public ruby-puma
9162 (package
9163 (name "ruby-puma")
63755fcd 9164 (version "3.9.1")
9270298f
BW
9165 (source
9166 (origin
a6cffe6e 9167 (method git-fetch)
9270298f 9168 ;; Fetch from GitHub because distributed gem does not contain tests.
a6cffe6e
EF
9169 (uri (git-reference
9170 (url "https://github.com/puma/puma")
9171 (commit (string-append "v" version))))
9172 (file-name (git-file-name name version))
9270298f
BW
9173 (sha256
9174 (base32
a6cffe6e 9175 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9270298f
BW
9176 (build-system ruby-build-system)
9177 (arguments
63755fcd
BW
9178 `(#:tests? #f ; Tests require an out-dated version of minitest.
9179 #:phases
9270298f
BW
9180 (modify-phases %standard-phases
9181 (add-before 'build 'fix-gemspec
9182 (lambda _
9183 (substitute* "puma.gemspec"
9184 (("git ls-files") "find * |sort"))
9185 #t)))))
9270298f
BW
9186 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
9187 (description
9188 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
9189for Ruby/Rack applications. Puma is intended for use in both development and
9190production environments. In order to get the best throughput, it is highly
9191recommended that you use a Ruby implementation with real threads like Rubinius
9192or JRuby.")
a6cffe6e 9193 (home-page "https://puma.io/")
9270298f
BW
9194 (license license:expat)))
9195
b0813490
BW
9196(define-public ruby-hoe-git
9197 (package
9198 (name "ruby-hoe-git")
9199 (version "1.6.0")
9200 (source
9201 (origin
9202 (method url-fetch)
9203 (uri (rubygems-uri "hoe-git" version))
9204 (sha256
9205 (base32
9206 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
9207 (build-system ruby-build-system)
9208 (propagated-inputs
9209 `(("ruby-hoe" ,ruby-hoe)
9210 ("git" ,git)))
9211 (synopsis "Hoe plugins for tighter Git integration")
9212 (description
9213 "This package provides a set of Hoe plugins for tighter Git integration.
9214It provides tasks to automate release tagging and pushing and changelog
9215generation.")
7bf837fd 9216 (home-page "https://github.com/jbarnette/hoe-git")
b0813490
BW
9217 (license license:expat)))
9218
cbdd428c
BW
9219(define-public ruby-sequel
9220 (package
9221 (name "ruby-sequel")
65a7f09c 9222 (version "4.49.0")
cbdd428c
BW
9223 (source
9224 (origin
9225 (method url-fetch)
9226 (uri (rubygems-uri "sequel" version))
9227 (sha256
9228 (base32
65a7f09c 9229 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
cbdd428c
BW
9230 (build-system ruby-build-system)
9231 (arguments
9232 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
9233 (synopsis "Database toolkit for Ruby")
9234 (description "Sequel provides thread safety, connection pooling and a
9235concise DSL for constructing SQL queries and table schemas. It includes a
9236comprehensive ORM layer for mapping records to Ruby objects and handling
9237associated records.")
e2b70d90 9238 (home-page "https://sequel.jeremyevans.net")
cbdd428c 9239 (license license:expat)))
3cc78097
BW
9240
9241(define-public ruby-timecop
9242 (package
9243 (name "ruby-timecop")
3d4a5eb5 9244 (version "0.9.1")
3cc78097
BW
9245 (source
9246 (origin
9247 (method url-fetch)
9248 (uri (rubygems-uri "timecop" version))
9249 (sha256
9250 (base32
3d4a5eb5 9251 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
3cc78097
BW
9252 (build-system ruby-build-system)
9253 (arguments
9254 `(#:phases
9255 (modify-phases %standard-phases
9256 (add-before 'check 'set-check-rubylib
9257 (lambda _
9258 ;; Set RUBYLIB so timecop tests finds its own lib.
9259 (setenv "RUBYLIB" "lib")
9260 #t)))))
9261 (native-inputs
9262 `(("bundler" ,bundler)
9263 ("ruby-minitest-rg" ,ruby-minitest-rg)
9264 ("ruby-mocha" ,ruby-mocha)
9265 ("ruby-activesupport" ,ruby-activesupport)))
66e07664 9266 (synopsis "Test mocks for time-dependent functions")
3cc78097
BW
9267 (description
9268 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
9269making it easier to test time-dependent code. It provides a unified method to
9270mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
9271call.")
9272 (home-page "https://github.com/travisjeffery/timecop")
9273 (license license:expat)))
9274
dae620b8
BW
9275(define-public ruby-concurrent
9276 (package
9277 (name "ruby-concurrent")
1007640a 9278 (version "1.1.5")
dae620b8
BW
9279 (source
9280 (origin
8fcba3be 9281 (method git-fetch)
dae620b8
BW
9282 ;; Download from GitHub because the rubygems version does not contain
9283 ;; Rakefile.
8fcba3be
MB
9284 (uri (git-reference
9285 (url "https://github.com/ruby-concurrency/concurrent-ruby")
9286 (commit (string-append "v" version))))
9287 (file-name (git-file-name name version))
dae620b8
BW
9288 (sha256
9289 (base32
1007640a 9290 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
dae620b8
BW
9291 (build-system ruby-build-system)
9292 (arguments
1007640a 9293 `(#:test-target "ci"
dae620b8
BW
9294 #:phases
9295 (modify-phases %standard-phases
520e89eb 9296 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
dae620b8
BW
9297 (lambda _
9298 ;; Delete extra gemspec files so 'first-gemspec' chooses the
9299 ;; correct one.
9300 (delete-file "concurrent-ruby-edge.gemspec")
9301 (delete-file "concurrent-ruby-ext.gemspec")
9302 #t))
1007640a 9303 (replace 'replace-git-ls-files
520e89eb 9304 (lambda _
1007640a
MB
9305 ;; XXX: The default substitution made by this phase is not fully
9306 ;; compatible with "git ls-files". The latter produces file names
9307 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
9308 ;; which gives "./lib/foo". That difference in turn breaks the
9309 ;; comparison against a glob pattern in this script.
9310 (substitute* "concurrent-ruby.gemspec"
9311 (("git ls-files") "find * -type f | sort"))
9312 #t))
9313 (add-before 'build 'remove-jar-from-gemspec
520e89eb 9314 (lambda _
1007640a
MB
9315 ;; The gemspec wants to include a JAR file that we do not build
9316 ;; nor need.
9317 (substitute* "concurrent-ruby.gemspec"
9318 (("'lib/concurrent/concurrent_ruby.jar'")
9319 ""))
9320 #t))
9321 (add-before 'build 'remove-rake_compiler_dock-dependency
9322 (lambda _
9323 ;; This library is only used when building for non-MRI targets.
9324 (substitute* "Rakefile"
9325 (("require 'rake_compiler_dock'")
9326 ""))
520e89eb 9327 #t))
9019b37f
BW
9328 (add-before 'check 'remove-timecop-dependency
9329 ;; Remove timecop-dependent tests as having timecop as a depedency
9330 ;; causes circular depedencies.
9331 (lambda _
9332 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
9333 (delete-file "spec/concurrent/scheduled_task_spec.rb")
9334 #t)))))
dae620b8
BW
9335 (native-inputs
9336 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9019b37f 9337 ("ruby-rspec" ,ruby-rspec)))
dae620b8
BW
9338 (synopsis "Concurrency tools for Ruby")
9339 (description
9340 "This library provides modern concurrency tools including agents,
9341futures, promises, thread pools, actors, supervisors, and more. It is
9342inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
9343patterns.")
9344 (home-page "http://www.concurrent-ruby.com")
9345 (license license:expat)))
2de61e34
BW
9346
9347(define-public ruby-pkg-config
9348 (package
9349 (name "ruby-pkg-config")
884a80dd 9350 (version "1.2.5")
2de61e34
BW
9351 (source
9352 (origin
9353 (method url-fetch)
9354 (uri (rubygems-uri "pkg-config" version))
9355 (sha256
9356 (base32
884a80dd 9357 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
2de61e34
BW
9358 (build-system ruby-build-system)
9359 (arguments
9360 ;; Tests require extra files not included in the gem.
9361 `(#:tests? #f))
9362 (synopsis "Detect libraries for compiling Ruby native extensions")
9363 (description
9364 "@code{pkg-config} can be used in your extconf.rb to properly detect need
9365libraries for compiling Ruby native extensions.")
9366 (home-page "https://github.com/ruby-gnome2/pkg-config")
9367 (license license:lgpl2.0+)))
6689c636
MFM
9368
9369(define-public ruby-net-http-digest-auth
9370 (package
9371 (name "ruby-net-http-digest-auth")
ba074a85 9372 (version "1.4.1")
6689c636
MFM
9373 (source
9374 (origin
9375 (method url-fetch)
9376 (uri (rubygems-uri "net-http-digest_auth" version))
9377 (sha256
9378 (base32
ba074a85 9379 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
6689c636
MFM
9380 (build-system ruby-build-system)
9381 (native-inputs
9382 `(("ruby-hoe" ,ruby-hoe)))
9383 (synopsis "RFC 2617 HTTP digest authentication library")
9384 (description
9385 "This library implements HTTP's digest authentication scheme based on
9386RFC 2617. This enables the use of the digest authentication scheme instead
9387of the more insecure basic authentication scheme.")
7bf837fd 9388 (home-page "https://github.com/drbrain/net-http-digest_auth")
6689c636 9389 (license license:expat)))
06116573 9390
9391(define-public ruby-mail
9392 (package
9393 (name "ruby-mail")
04de0cb5 9394 (version "2.6.6")
06116573 9395 (source
9396 (origin
9397 (method url-fetch)
9398 (uri (rubygems-uri "mail" version))
9399 (sha256
9400 (base32
04de0cb5 9401 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
06116573 9402 (build-system ruby-build-system)
9403 (propagated-inputs
9404 `(("ruby-mime-types" ,ruby-mime-types)))
9405 (arguments
9406 ;; Tests require extra gems not included in the Gemfile.
9407 ;; XXX: Try enabling this for the next version with mini_mime.
9408 `(#:tests? #f))
9409 (synopsis "Mail library for Ruby")
9410 (description
9411 "Mail is an internet library for Ruby that is designed to handle email
9412generation, parsing and sending. The purpose of this library is to provide
9413a single point of access to handle all email functions, including sending
9414and receiving emails. All network type actions are done through proxy
9415methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9416
9417Mail has been designed with a very simple object oriented system that
9418really opens up the email messages you are parsing, if you know what you
9419are doing, you can fiddle with every last bit of your email directly.")
9420 (home-page "https://github.com/mikel/mail")
9421 (license license:expat)))
9b4c8e1b 9422
4d372cb9
CB
9423(define-public ruby-mathn
9424 (package
9425 (name "ruby-mathn")
9426 (version "0.1.0")
9427 (source
9428 (origin
9429 (method url-fetch)
9430 (uri (rubygems-uri "mathn" version))
9431 (sha256
9432 (base32
9433 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9434 (build-system ruby-build-system)
9435 (native-inputs
9436 `(("bundler" ,bundler)
9437 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9438 (synopsis "Extends math operations for increased precision")
9439 (description
9440 "This gem makes mathematical operations more precise in Ruby and
9441integrates other mathematical standard libraries. Prior to Ruby 2.5,
9442@code{mathn} was part of the Ruby standard library.")
9443 (home-page "https://github.com/ruby/mathn")
9444 (license license:bsd-2)))
9445
9b4c8e1b
BW
9446(define-public ruby-code-statistics
9447 (package
9448 (name "ruby-code-statistics")
9449 (version "0.2.13")
9450 (source
9451 (origin
9452 (method url-fetch)
9453 (uri (rubygems-uri "code_statistics" version))
9454 (sha256
9455 (base32
9456 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9457 (build-system ruby-build-system)
9458 (arguments
9459 `(#:tests? #f)) ; Not all test code is included in gem.
9460 (synopsis "Port of the rails 'rake stats' method")
9461 (description
9462 "This gem is a port of the rails 'rake stats' method so it can be made
9463more robust and work for non rails projects.")
702a1012 9464 (home-page "https://github.com/danmayer/code_statistics")
9b4c8e1b 9465 (license license:expat)))
f90c25c1
CL
9466
9467(define-public ruby-rubypants
9468 (package
9469 (name "ruby-rubypants")
9470 (version "0.6.0")
9471 (source (origin
9472 (method url-fetch)
9473 (uri (rubygems-uri "rubypants" version))
9474 (sha256
9475 (base32
9476 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9477 (build-system ruby-build-system)
9478 (arguments
9479 '(#:tests? #f)) ; need Codecov
9480 (synopsis "Port of the smart-quotes library SmartyPants")
9481 (description
9482 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9483original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9484and BBEdit that easily translates plain ASCII punctuation characters into
9485smart typographic punctuation HTML entities.")
9486 (home-page "https://github.com/jmcnevin/rubypants")
9487 (license license:bsd-2)))
beb34835
CL
9488
9489(define-public ruby-org-ruby
9490 (package
9491 (name "ruby-org-ruby")
9492 (version "0.9.12")
9493 (source (origin
9494 (method url-fetch)
9495 (uri (rubygems-uri "org-ruby" version))
9496 (sha256
9497 (base32
9498 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
9499 (build-system ruby-build-system)
9500 (arguments
9501 '(#:tests? #f)) ; no rakefile
9502 (propagated-inputs
9503 `(("ruby-rubypants" ,ruby-rubypants)))
9504 (synopsis "Org-mode parser written in Ruby")
9505 (description
9506 "Org-ruby is an org-mode parser written in Ruby. The most significant
9507thing this library does today is convert org-mode files to HTML or Textile or
9508Markdown.")
9509 (home-page "https://github.com/wallyqs/org-ruby")
9510 (license license:expat)))
670ee20a
BW
9511
9512(define-public ruby-rake
9513 (package
9514 (name "ruby-rake")
c997403a 9515 (version "13.0.1")
670ee20a
BW
9516 (source
9517 (origin
9518 (method url-fetch)
9519 (uri (rubygems-uri "rake" version))
9520 (sha256
9521 (base32
c997403a 9522 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
670ee20a
BW
9523 (build-system ruby-build-system)
9524 (native-inputs
9525 `(("bundler" ,bundler)))
9526 (synopsis "Rake is a Make-like program implemented in Ruby")
9527 (description
9528 "Rake is a Make-like program where tasks and dependencies are specified
9529in standard Ruby syntax.")
9530 (home-page "https://github.com/ruby/rake")
9531 (license license:expat)))
45498f51 9532
51420124 9533(define-public ruby-childprocess
45498f51
DM
9534 (package
9535 (name "ruby-childprocess")
459e4a1a 9536 (version "3.0.0")
45498f51
DM
9537 (source
9538 (origin
9539 (method url-fetch)
9540 (uri (rubygems-uri "childprocess" version))
9541 (sha256
9542 (base32
459e4a1a 9543 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
45498f51
DM
9544 (build-system ruby-build-system)
9545 (arguments
9546 `(#:tests? #f))
9547 (native-inputs
9548 `(("bundler" ,bundler)
9549 ("ruby-rspec" ,ruby-rspec)))
9550 (propagated-inputs
9551 `(("ruby-ffi" ,ruby-ffi)))
9552 (synopsis "Control external programs running in the background, in Ruby")
9553 (description "@code{childprocess} provides a gem to control external
9554programs running in the background, in Ruby.")
459e4a1a 9555 (home-page "https://github.com/enkessler/childprocess")
45498f51 9556 (license license:expat)))
1f10e28d 9557
0d16905b
JL
9558(define-public ruby-public-suffix
9559 (package
9560 (name "ruby-public-suffix")
9de12df7 9561 (version "4.0.1")
0d16905b
JL
9562 (source (origin
9563 (method url-fetch)
9564 (uri (rubygems-uri "public_suffix" version))
9565 (sha256
9566 (base32
9de12df7 9567 "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"))))
0d16905b
JL
9568 (build-system ruby-build-system)
9569 (arguments
1f4fc125
CB
9570 '(#:phases
9571 (modify-phases %standard-phases
9572 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
9573 ;; including it as an input can lead to circular dependencies.
9574 (add-after 'unpack 'remove-rubocop-from-Rakefile
9575 (lambda _
9576 (substitute* "Rakefile"
9577 (("require \"rubocop/rake\\_task\"") "")
9578 (("RuboCop::RakeTask\\.new") ""))
9579 #t)))))
9580 (native-inputs
9581 `(("bundler" ,bundler)
9582 ("ruby-yard" ,ruby-yard)
9583 ("ruby-mocha" ,ruby-mocha)
9584 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
0d16905b
JL
9585 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
9586 (synopsis "Domain name parser")
9587 (description "The gem @code{public_suffix} is a domain name parser,
9588written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
9589is one under which Internet users can (or historically could) directly
9590register names. Some examples of public suffixes are @code{.com},
9591@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
9592all known public suffixes.")
9593 (license license:expat)))
6f2c4efb
JL
9594
9595(define-public ruby-addressable
9596 (package
9597 (name "ruby-addressable")
91f7ee87 9598 (version "2.7.0")
6f2c4efb
JL
9599 (source (origin
9600 (method url-fetch)
9601 (uri (rubygems-uri "addressable" version))
9602 (sha256
9603 (base32
91f7ee87 9604 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
6f2c4efb 9605 (build-system ruby-build-system)
0a794b30
CB
9606 (arguments
9607 '(#:test-target "spec"
9608 #:phases
9609 (modify-phases %standard-phases
9610 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
9611 (lambda _
9612 (substitute* "Gemfile"
9613 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
9614 ((".*launchy.*") "")
9615 ((".*rake.*") "gem 'rake'\n")
9616 ((".*redcarpet.*") ""))
9617 #t))
9618 (add-before 'check 'delete-network-dependent-test
9619 (lambda _
9620 (delete-file "spec/addressable/net_http_compat_spec.rb")
9621 #t)))))
9622 (native-inputs
9623 `(("ruby-rspec" ,ruby-rspec)
9624 ("bundler" ,bundler)
9625 ("ruby-idn-ruby" ,ruby-idn-ruby)
9626 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
d7bd7016 9627 ("ruby-rspec-its", ruby-rspec-its-minimal)
0a794b30
CB
9628 ("ruby-yard" ,ruby-yard)
9629 ("ruby-simplecov" ,ruby-simplecov)))
6f2c4efb
JL
9630 (propagated-inputs
9631 `(("ruby-public-suffix" ,ruby-public-suffix)))
6f2c4efb
JL
9632 (home-page "https://github.com/sporkmonger/addressable")
9633 (synopsis "Alternative URI implementation")
9634 (description "Addressable is a replacement for the URI implementation that
9635is part of Ruby's standard library. It more closely conforms to RFC 3986,
9636RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
9637 (license license:asl2.0)))
9c7f15c0 9638
305e9b33
MB
9639(define-public ruby-colorize
9640 (package
9641 (name "ruby-colorize")
9642 (version "0.8.1")
9643 (source (origin
9644 (method url-fetch)
9645 (uri (rubygems-uri "colorize" version))
9646 (sha256
9647 (base32
9648 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
9649 (build-system ruby-build-system)
9650 (arguments
9651 '(#:phases (modify-phases %standard-phases
9652 (add-before 'check 'remove-codeclimate-dependency
9653 (lambda _
9654 (substitute* "test/test_colorize.rb"
9655 ;; Do not hook the tests into the online CodeClimate
9656 ;; service which is unnecessary for these tests.
9657 (("require 'codeclimate-test-reporter'")
9658 "")
9659 (("CodeClimate.*") ""))
9660 #t)))))
9661 (synopsis "Add color effects to the @code{String} class")
9662 (description
9663 "This package extends the @code{String} class and adds a
9664@code{ColorizedString} with methods to set text color, background color,
9665and text effects.")
702a1012 9666 (home-page "https://github.com/fazibear/colorize")
305e9b33
MB
9667 (license license:gpl2+)))
9668
9c7f15c0
JL
9669(define-public ruby-colorator
9670 (package
9671 (name "ruby-colorator")
9672 (version "1.1.0")
9673 (source (origin
9674 (method url-fetch)
9675 (uri (rubygems-uri "colorator" version))
9676 (sha256
9677 (base32
9678 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
9679 (build-system ruby-build-system)
9680 (arguments
9681 ;; No test target
9682 `(#:tests? #f))
9683 (home-page "http://octopress.org/colorator/")
9684 (synopsis "Terminal color library")
9685 (description "Colorator is a Ruby gem that helps you colorize your text
9686for the terminal.")
9687 (license license:expat)))
78b9c291
JL
9688
9689(define-public ruby-command-line-reporter
9690 (package
9691 (name "ruby-command-line-reporter")
b448e408 9692 (version "4.0.1")
78b9c291
JL
9693 (source (origin
9694 (method url-fetch)
9695 (uri (rubygems-uri "command_line_reporter" version))
9696 (sha256
9697 (base32
b448e408 9698 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
78b9c291
JL
9699 (build-system ruby-build-system)
9700 (arguments
9701 ;; No Rakefile
9702 `(#:tests? #f
9703 #:phases
9704 (modify-phases %standard-phases
9705 (add-before 'build 'fix-dependencies
9706 (lambda _
9707 (substitute* ".gemspec"
9708 ;; colored is unmaintained
9709 (("colored") "colorator")
9710 ;; colorator version
9711 (("= 1.2") "= 1.1"))
9712 #t)))))
9713 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
9714 (home-page "https://github.com/wbailey/command_line_reporter")
9715 (synopsis "Report production while executing Ruby scripts")
9716 (description "This gem provides a DSL that makes it easy to write reports
9717of various types in ruby. It eliminates the need to litter your source with
9718puts statements, instead providing a more readable, expressive interface to
9719your application.")
9720 (license license:asl2.0)))
f22c0387
JL
9721
9722(define-public ruby-command-line-reporter-3
9723 (package
9724 (inherit ruby-command-line-reporter)
9725 (version "3.3.6")
9726 (source (origin
9727 (method url-fetch)
9728 (uri (rubygems-uri "command_line_reporter" version))
9729 (sha256
9730 (base32
9731 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
6bba8ecf 9732
439d47cd
MC
9733(define-public ruby-kpeg
9734 (package
9735 (name "ruby-kpeg")
9736 (version "1.1.0")
9737 (source
9738 (origin
9739 (method url-fetch)
9740 (uri (rubygems-uri "kpeg" version))
9741 (sha256
9742 (base32
9743 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
9744 (build-system ruby-build-system)
9745 (native-inputs
9746 `(("ruby-hoe" ,ruby-hoe)))
9747 (synopsis "PEG library for Ruby")
9748 (description "KPeg is a simple PEG library for Ruby. It provides an API as
9749well as native grammar to build the grammar. KPeg supports direct left
9750recursion of rules via the
9751@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
9752technique.")
9753 (home-page "https://github.com/evanphx/kpeg")
9754 (license license:expat)))
9755
6bba8ecf
JL
9756(define-public ruby-rdoc
9757 (package
9758 (name "ruby-rdoc")
9304f989 9759 (version "6.2.0")
6bba8ecf 9760 (source
9304f989
MC
9761 (origin
9762 (method git-fetch)
9763 (uri (git-reference
b0e7b699 9764 (url "https://github.com/ruby/rdoc")
9304f989
MC
9765 (commit (string-append "v" version))))
9766 (file-name (git-file-name name version))
9767 (sha256
9768 (base32
9769 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
6bba8ecf 9770 (build-system ruby-build-system)
9304f989
MC
9771 (arguments
9772 `(#:phases
9773 (modify-phases %standard-phases
9774 (add-after 'unpack 'patch-gemspec
9775 ;; TODO: Remove after next release is tagged.
9776 (lambda _
9777 (substitute* "rdoc.gemspec"
9778 (("\"lib/rdoc/generator/template/darkfish/js/\
9779jquery\\.js\", ") ""))
9780 #t))
9781 (add-before 'build 'generate
9782 ;; 'gem build' doesn't honor Rakefile dependencies (see:
9783 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
9784 (lambda _
9785 (invoke "rake" "generate"))))))
6bba8ecf 9786 (native-inputs
9304f989
MC
9787 `(("bundler" ,bundler)
9788 ("ruby-kpeg" ,ruby-kpeg)
9789 ("ruby-racc" ,ruby-racc)
9790 ("ruby-rubocop" ,ruby-rubocop)))
6bba8ecf
JL
9791 (home-page "https://ruby.github.io/rdoc/")
9792 (synopsis "HTML and command-line documentation utility")
9793 (description "RDoc produces HTML and command-line documentation for Ruby
9794projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
9795documentation from the command-line.")
9796 (license license:gpl2+)))
18077ffc
JL
9797
9798(define-public ruby-sass-listen
9799 (package
9800 (name "ruby-sass-listen")
9801 (version "4.0.0")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (rubygems-uri "sass-listen" version))
9805 (sha256
9806 (base32
9807 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
9808 (build-system ruby-build-system)
9809 (arguments
9810 ;; No test target
9811 `(#:tests? #f))
9812 (propagated-inputs
9813 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
9814 ("ruby-rb-inotify" ,ruby-rb-inotify)))
9815 (home-page "https://github.com/sass/listen")
9816 (synopsis "File modification notification library")
9817 (description "The Listen gem listens to file modifications and notifies you
9818about the changes.")
9819 (license license:expat)))
0c8eedc1
JL
9820
9821(define-public ruby-terminfo
9822 (package
9823 (name "ruby-terminfo")
9824 (version "0.1.1")
9825 (source
9826 (origin
9827 (method url-fetch)
9828 (uri (rubygems-uri "ruby-terminfo" version))
9829 (sha256
9830 (base32
9831 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
9832 (build-system ruby-build-system)
9833 (arguments
9834 `(#:test-target "test"
9835 ;; Rakefile requires old packages and would need modification to
9836 ;; work with current software.
9837 #:tests? #f))
9838 (inputs
9839 `(("ncurses" ,ncurses)))
9840 (native-inputs
9841 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
9842 ("ruby-rdoc" ,ruby-rdoc)))
9843 (home-page "http://www.a-k-r.org/ruby-terminfo/")
9844 (synopsis "Terminfo binding for Ruby")
9845 (description "Ruby-terminfo provides terminfo binding for Ruby.")
9846 (license license:bsd-3)))
ddc3a667
JL
9847
9848(define-public ruby-diffy
9849 (package
9850 (name "ruby-diffy")
9851 (version "3.2.1")
9852 (source
9853 (origin
9854 (method url-fetch)
9855 (uri (rubygems-uri "diffy" version))
9856 (sha256
9857 (base32
9858 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
9859 (build-system ruby-build-system)
9860 (arguments
9861 ;; No tests
9862 `(#:tests? #f))
9863 (native-inputs
9864 `(("ruby-rspec" ,ruby-rspec)))
9865 (home-page "https://github.com/samg/diffy")
9866 (synopsis "Convenient diffing in ruby")
9867 (description "Diffy provides a convenient way to generate a diff from two
9868strings or files.")
9869 (license license:expat)))
6456beef
JL
9870
9871(define-public ruby-sass-spec
9872 (package
9873 (name "ruby-sass-spec")
9874 (version "3.5.4")
11df8321
TGR
9875 (source
9876 (origin
9877 (method git-fetch)
9878 (uri (git-reference
b0e7b699 9879 (url "https://github.com/sass/sass-spec")
11df8321
TGR
9880 (commit (string-append "v" version))))
9881 (file-name (git-file-name name version))
9882 (sha256
9883 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
6456beef
JL
9884 (build-system ruby-build-system)
9885 (propagated-inputs
9886 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
9887 ("ruby-diffy" ,ruby-diffy)
9888 ("ruby-terminfo" ,ruby-terminfo)))
9889 (arguments
2c7cb711
CB
9890 `(;; This package contains tests for a sass implementation, and the to
9891 ;; avoid any circular dependencies, the tests are not run here
9892 #:tests? #f
9893 #:phases
9894 (modify-phases %standard-phases
9895 (add-after 'unpack 'patch-test
9896 (lambda _
9897 (delete-file "spec/values/colors/alpha_hex-3.5/error")
9898 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
9899 (("string") "color")))))))
6456beef
JL
9900 (home-page "https://github.com/sass/sass-spec")
9901 (synopsis "Test suite for Sass")
9902 (description "Sass Spec is a test suite for Sass. Test cases are all in
9903the @file{spec} directory.")
9904 (license license:expat)))
f00f4492
JL
9905
9906(define-public ruby-sass
9907 (package
9908 (name "ruby-sass")
11ff2adc 9909 (version "3.6.0")
f00f4492
JL
9910 (source (origin
9911 (method url-fetch)
9912 (uri (rubygems-uri "sass" version))
9913 (sha256
9914 (base32
11ff2adc 9915 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
f00f4492
JL
9916 (build-system ruby-build-system)
9917 (propagated-inputs
9918 `(("ruby-sass-listen" ,ruby-sass-listen)))
9919 (native-inputs
11ff2adc
CB
9920 `(("ruby-sass-spec" ,ruby-sass-spec)
9921 ("ruby-mathn" ,ruby-mathn)))
3497086b 9922 (home-page "https://sass-lang.com/")
f00f4492
JL
9923 (synopsis "CSS extension language")
9924 (description "Sass is a CSS extension language. It extends CSS with
9925features that don't exist yet like variables, nesting, mixins and inheritance.")
9926 (license license:expat)))
5e242cb4 9927
9efc888d
CB
9928(define-public ruby-sassc
9929 (package
9930 (name "ruby-sassc")
3e776b44 9931 (version "2.2.1")
9efc888d
CB
9932 (source
9933 (origin
9934 (method url-fetch)
9935 (uri (rubygems-uri "sassc" version))
9936 (sha256
9937 (base32
3e776b44 9938 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
9efc888d
CB
9939 (build-system ruby-build-system)
9940 (arguments
3e776b44
CB
9941 '(#:modules ((guix build ruby-build-system)
9942 (guix build utils)
9943 (ice-9 textual-ports))
9944 #:phases
9efc888d
CB
9945 (modify-phases %standard-phases
9946 ;; TODO: This would be better as a snippet, but the ruby-build-system
9947 ;; doesn't seem to support that
9948 (add-after 'unpack 'remove-libsass
9949 (lambda _
9950 (delete-file-recursively "ext")
3e776b44
CB
9951 (with-atomic-file-replacement "sassc.gemspec"
9952 (lambda (in out)
9953 (let* ((gemspec (get-string-all in))
9954 (index (string-contains gemspec "libsass_dir")))
9955 (display (string-append
9956 (string-take gemspec index)
9957 "\nend\n")
9958 out))))
9efc888d
CB
9959 #t))
9960 (add-after 'unpack 'dont-check-the-libsass-version
9961 (lambda _
9962 (substitute* "test/native_test.rb"
9963 (("assert_equal.*Native\\.version") ""))
9964 #t))
9965 (add-after 'unpack 'remove-git-from-gemspec
9966 (lambda _
9967 (substitute* "sassc.gemspec"
3e776b44 9968 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
9efc888d
CB
9969 #t))
9970 (add-after 'unpack 'remove-extensions-from-gemspec
9971 (lambda _
9972 (substitute* "sassc.gemspec"
3e776b44 9973 (("\\[\"ext/extconf.rb\"\\]") "[]"))
9efc888d
CB
9974 #t))
9975 (add-after 'unpack 'fix-Rakefile
9976 (lambda _
9977 (substitute* "Rakefile"
3e776b44 9978 (("test: 'compile:libsass'") ":test"))
9efc888d
CB
9979 #t))
9980 (add-after 'unpack 'remove-unnecessary-dependencies
9981 (lambda _
9982 (substitute* "test/test_helper.rb"
9983 (("require \"pry\"") ""))
9984 #t))
9985 (add-before 'build 'patch-native.rb
9986 (lambda* (#:key inputs #:allow-other-keys)
9987 (substitute* "lib/sassc/native.rb"
9988 ((".*gem_root = spec.gem_dir") "")
9989 (("ffi_lib .*\n")
9990 (string-append
9991 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
9992 #t))
9993 ;; The gemspec still references the libsass files, so just keep the
9994 ;; one in the gem.
9995 (delete 'extract-gemspec))))
9996 (propagated-inputs
9997 `(("ruby-ffi" ,ruby-ffi)
9998 ("ruby-rake" ,ruby-rake)))
9999 (inputs
10000 `(("libsass" ,libsass)))
10001 (native-inputs
10002 `(("bundler" ,bundler)
3e776b44 10003 ("ruby-rake-compiler" ,ruby-rake-compiler)
9efc888d
CB
10004 ("ruby-minitest-around" ,ruby-minitest-around)
10005 ("ruby-test-construct" ,ruby-test-construct)))
10006 (synopsis "Use libsss from Ruby")
10007 (description
10008 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
10009bindings to the libsass library. This enables rendering
10010@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
10011 (home-page "https://github.com/sass/sassc-ruby")
10012 (license license:expat)))
10013
5e242cb4
JL
10014(define-public ruby-jekyll-sass-converter
10015 (package
10016 (name "ruby-jekyll-sass-converter")
10017 (version "1.5.2")
10018 (source (origin
10019 (method url-fetch)
10020 (uri (rubygems-uri "jekyll-sass-converter" version))
10021 (sha256
10022 (base32
10023 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
10024 (build-system ruby-build-system)
10025 (propagated-inputs
10026 `(("ruby-sass" ,ruby-sass)))
10027 (arguments
10028 ;; No rakefile
10029 `(#:tests? #f))
10030 (home-page "https://github.com/jekyll/jekyll-sass-converter")
10031 (synopsis "Sass converter for Jekyll")
10032 (description "This gem provide built-in support for the Sass converter
10033in Jekyll.")
10034 (license license:expat)))
ceac6f6f
JL
10035
10036(define-public ruby-jekyll-watch
10037 (package
10038 (name "ruby-jekyll-watch")
6cbba8a3 10039 (version "2.1.2")
ceac6f6f
JL
10040 (source (origin
10041 (method url-fetch)
10042 (uri (rubygems-uri "jekyll-watch" version))
10043 (sha256
10044 (base32
6cbba8a3 10045 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
ceac6f6f
JL
10046 (build-system ruby-build-system)
10047 (propagated-inputs
6cbba8a3 10048 `(("ruby-listen" ,ruby-listen)))
ceac6f6f
JL
10049 (arguments
10050 ;; No rakefile
10051 `(#:tests? #f))
10052 (home-page "https://github.com/jekyll/jekyll-watch")
10053 (synopsis "Jekyll auto-rebuild support")
10054 (description "This gems add the @code{--watch} switch to the jekyll CLI
10055interface. It allows Jekyll to rebuild your site when a file changes.")
10056 (license license:expat)))
3224a5a8
JL
10057
10058(define-public ruby-parallel
10059 (package
10060 (name "ruby-parallel")
c41fba01
CB
10061 (version "1.13.0")
10062 (source
10063 (origin
10064 (method git-fetch)
10065 (uri (git-reference
b0e7b699 10066 (url "https://github.com/grosser/parallel")
c41fba01
CB
10067 (commit (string-append "v" version))))
10068 (file-name (git-file-name name version))
10069 (sha256
10070 (base32
10071 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
3224a5a8 10072 (build-system ruby-build-system)
c41fba01
CB
10073 (arguments
10074 `(;; TODO 3 test failures
10075 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
10076 ;; open unnecessary pipes
10077 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
10078 ;; SQLite in processes
10079 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
10080 ;; SQLite in threads
10081 #:tests? #f
10082 #:test-target "rspec-rerun:spec"
10083 #:phases
10084 (modify-phases %standard-phases
10085 (add-after 'unpack 'patch-Gemfile
10086 (lambda _
10087 (substitute* "Gemfile"
10088 (("gem 'rspec-legacy_formatters'") "")
10089 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
10090 (add-before 'check 'delete-Gemfile.lock
10091 (lambda _
10092 ;; Bundler isn't being used for fetching dependendencies, so
10093 ;; delete the Gemfile.lock
10094 (delete-file "Gemfile.lock")
10095 #t))
10096 (add-before 'build 'patch-gemspec
10097 (lambda _
10098 (substitute* "parallel.gemspec"
10099 (("git ls-files") "find"))
10100 #t)))))
10101 (native-inputs
10102 `(("ruby-rspec" ,ruby-rspec)
10103 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
10104 ("bundler" ,bundler)
10105 ("ruby-activerecord" ,ruby-activerecord)
10106 ("ruby-progressbar" ,ruby-progressbar)
10107 ("ruby-bump" ,ruby-bump)
10108 ("procps" ,procps)
10109 ("lsof" ,lsof)
10110 ("ruby-mysql2" ,ruby-mysql2)
10111 ("ruby-sqlite3" ,ruby-sqlite3)
10112 ("ruby-i18n" ,ruby-i18n)))
3224a5a8
JL
10113 (home-page "https://github.com/grosser/parallel")
10114 (synopsis "Parallel processing in Ruby")
10115 (description "Parallel allows you to run any code in parallel Processes
10116(to use all CPUs) or Threads(to speedup blocking operations). It is best
10117suited for map-reduce or e.g. parallel downloads/uploads.")
10118 (license license:expat)))
83d9f672
JL
10119
10120(define-public ruby-cane
10121 (package
10122 (name "ruby-cane")
10123 (version "3.0.0")
10124 (source (origin
10125 (method url-fetch)
10126 (uri (rubygems-uri "cane" version))
10127 (sha256
10128 (base32
10129 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
10130 (build-system ruby-build-system)
10131 (arguments `(#:tests? #f)); No rakefile
10132 (home-page "https://github.com/square/cane")
10133 (propagated-inputs
10134 `(("ruby-parallel" ,ruby-parallel)))
10135 (synopsis "Code quality threshold checking")
10136 (description "Cane fails your build if code quality thresholds are not met.")
10137 (license license:asl2.0)))
00d71efc
JL
10138
10139(define-public ruby-morecane
10140 (package
10141 (name "ruby-morecane")
10142 (version "0.2.0")
10143 (source (origin
10144 (method url-fetch)
10145 (uri (rubygems-uri "morecane" version))
10146 (sha256
10147 (base32
10148 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
10149 (build-system ruby-build-system)
10150 (home-page "https://github.com/yob/morecane")
10151 (arguments `(#:tests? #f)); No rakefile
10152 (propagated-inputs
10153 `(("ruby-parallel" ,ruby-parallel)))
10154 (synopsis "Extra checks for cane")
10155 (description "The cane gem provides a great framework for running quality
10156checks over your ruby project as part of continuous integration build. It
10157comes with a few checks out of the box, but also provides an API for loading
10158custom checks. This gem provides a set of additional checks.")
10159 (license license:expat)))
abbe629c
JL
10160
10161(define-public ruby-pdf-reader
10162 (package
10163 (name "ruby-pdf-reader")
b377dd95 10164 (version "2.4.0")
abbe629c 10165 (source (origin
34796d7a
MC
10166 (method git-fetch) ;no test in distributed gem archive
10167 (uri (git-reference
10168 (url "https://github.com/yob/pdf-reader.git")
10169 (commit (string-append "v" version))))
10170 (file-name (git-file-name name version))
abbe629c
JL
10171 (sha256
10172 (base32
34796d7a 10173 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
abbe629c 10174 (build-system ruby-build-system)
34796d7a
MC
10175 (arguments `(#:test-target "spec"
10176 #:phases (modify-phases %standard-phases
10177 (add-after 'unpack 'do-not-use-bundler
10178 (lambda _
10179 (substitute* "spec/spec_helper.rb"
10180 ((".*[Bb]undler.*") ""))
10181 #t)))))
abbe629c 10182 (native-inputs
34796d7a 10183 `(("ruby-rspec" ,ruby-rspec)
abbe629c
JL
10184 ("ruby-cane" ,ruby-cane)
10185 ("ruby-morecane" ,ruby-morecane)))
10186 (propagated-inputs
10187 `(("ruby-afm" ,ruby-afm)
10188 ("ruby-ascii85" ,ruby-ascii85)
10189 ("ruby-hashery" ,ruby-hashery)
10190 ("ruby-rc4" ,ruby-rc4)
10191 ("ruby-ttfunk" ,ruby-ttfunk)))
10192 (home-page "https://github.com/yob/pdf-reader")
10193 (synopsis "PDF parser in Ruby")
10194 (description "The PDF::Reader library implements a PDF parser conforming as
10195much as possible to the PDF specification from Adobe. It provides programmatic
10196access to the contents of a PDF file with a high degree of flexibility.")
10197 (license license:gpl3+)))
461fb859
JL
10198
10199(define-public ruby-pdf-inspector
ed2f26f8
MC
10200 (let ((revision "1")
10201 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
10202 (package
10203 (name "ruby-pdf-inspector")
10204 (version (git-version "1.3.0" revision commit))
10205 (source (origin
10206 (method git-fetch)
10207 (uri (git-reference
10208 (url "https://github.com/prawnpdf/pdf-inspector.git")
10209 (commit commit)))
10210 (file-name (git-file-name name version))
10211 (sha256
10212 (base32
10213 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
10214 (build-system ruby-build-system)
10215 (arguments
10216 `(#:test-target "spec"
10217 #:phases (modify-phases %standard-phases
10218 (add-before 'build 'drop-signing-key-requirement
10219 (lambda _
10220 (substitute* "pdf-inspector.gemspec"
10221 (("spec.signing_key =.*")
10222 "spec.signing_key = nil"))
10223 #t))
10224 (replace 'check
10225 (lambda _
10226 (substitute* "pdf-inspector.gemspec"
10227 ((".*rubocop.*") "")
10228 ((".*yard.*") ""))
10229 (invoke "rspec"))))))
10230 (native-inputs
10231 `(("ruby-rspec" ,ruby-rspec)))
10232 (propagated-inputs
10233 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
10234 (home-page "https://github.com/prawnpdf/pdf-inspector")
10235 (synopsis "Analysis classes for inspecting PDF output")
10236 (description "This library provides a number of PDF::Reader based tools for
461fb859
JL
10237use in testing PDF output. Presently, the primary purpose of this tool is to
10238support the tests found in Prawn, a pure Ruby PDF generation library.")
ed2f26f8 10239 (license %prawn-project-licenses))))
770e3b53
JL
10240
10241(define-public ruby-pdf-core
10242 (package
10243 (name "ruby-pdf-core")
10244 (version "0.8.1")
10245 (source (origin
10246 (method url-fetch)
10247 (uri (rubygems-uri "pdf-core" version))
10248 (sha256
10249 (base32
10250 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
10251 (build-system ruby-build-system)
10252 (arguments
10253 ; No test target
10254 `(#:tests? #f))
10255 (home-page "https://github.com/prawnpdf/pdf-core")
10256 (synopsis "Low level PDF features for Prawn")
10257 (description "This is an experimental gem that extracts low-level PDF
10258functionality from Prawn.")
10259 (license license:gpl3+)))
37fbced7 10260
7ad8dd08 10261(define-public ruby-prawn
e6c7a601
MC
10262 ;; There hasn't been a new release since 2017/03/17.
10263 (let ((revision "1")
10264 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
10265 (package
10266 (name "ruby-prawn")
10267 (version (git-version "2.2.2" revision commit))
10268 (source (origin
10269 (method git-fetch)
10270 (uri (git-reference
10271 (url "https://github.com/prawnpdf/prawn.git")
10272 (commit commit)))
10273 (file-name (git-file-name name version))
10274 (sha256
10275 (base32
10276 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
10277 (build-system ruby-build-system)
10278 (arguments
10279 `(#:phases
10280 (modify-phases %standard-phases
10281 (add-before 'build 'drop-signing-key-requirement
10282 (lambda _
10283 (substitute* "prawn.gemspec"
10284 (("spec.signing_key =.*")
10285 "spec.signing_key = nil"))
10286 #t))
10287 (replace 'check
10288 (lambda* (#:key tests? #:allow-other-keys)
10289 (when tests?
10290 ;; The Prawn manual test fails (see:
10291 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
10292 ;; it.
10293 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
10294 #t)))))
10295 (propagated-inputs
10296 `(("ruby-pdf-core" ,ruby-pdf-core)
10297 ("ruby-ttfunk" ,ruby-ttfunk)))
10298 (native-inputs
10299 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
10300 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10301 ("ruby-rspec" ,ruby-rspec)
10302 ("ruby-simplecov" ,ruby-simplecov)
10303 ("ruby-yard" ,ruby-yard)))
10304 (home-page "https://prawnpdf.org/api-docs/2.0/")
10305 (synopsis "PDF generation for Ruby")
10306 (description "Prawn is a pure Ruby PDF generation library.")
10307 (license %prawn-project-licenses))))
197ca8ec
JL
10308
10309(define-public ruby-prawn-table
10310 (package
10311 (name "ruby-prawn-table")
10312 (version "0.2.2")
10313 (source (origin
10314 (method url-fetch)
10315 (uri (rubygems-uri "prawn-table" version))
10316 (sha256
10317 (base32
10318 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
10319 (build-system ruby-build-system)
197ca8ec 10320 (propagated-inputs
0927b039
CB
10321 `(("ruby-prawn" ,ruby-prawn)
10322 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
10323 (native-inputs
10324 `(("bundler" ,bundler)
10325 ("ruby-yard" ,ruby-yard)
10326 ("ruby-mocha" ,ruby-mocha)
10327 ("ruby-coderay" ,ruby-coderay)
10328 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
10329 ("ruby-simplecov" ,ruby-simplecov)
10330 ("ruby-rspec-2" ,ruby-rspec-2)))
10331 (arguments
10332 '(;; TODO: 1 test fails
10333 ;; Failure/Error: pdf.page_count.should == 1
10334 ;; expected: 1
10335 ;; got: 2 (using ==)
10336 ;; # ./spec/table_spec.rb:1308
10337 ;;
10338 ;; 225 examples, 1 failure
10339 #:tests? #f
10340 #:phases
10341 (modify-phases %standard-phases
10342 (add-before 'check 'patch-gemspec
10343 (lambda _
10344 (substitute* "prawn-table.gemspec"
10345 ;; Loosen the requirement for pdf-inspector
10346 (("~> 1\\.1\\.0") ">= 0")
10347 ;; Loosen the requirement for pdf-reader
10348 (("~> 1\\.2") ">= 0"))))
10349 (replace 'check
10350 (lambda* (#:key tests? #:allow-other-keys)
10351 (when tests?
10352 (invoke "rspec"))
10353 #t)))))
197ca8ec
JL
10354 (home-page "https://github.com/prawnpdf/prawn-table")
10355 (synopsis "Tables support for Prawn")
10356 (description "This gem provides tables support for Prawn.")
10357 (license license:gpl3+)))
03127069
JL
10358
10359(define-public ruby-kramdown
10360 (package
10361 (name "ruby-kramdown")
10362 (version "1.17.0")
10363 (source (origin
10364 (method url-fetch)
10365 (uri (rubygems-uri "kramdown" version))
10366 (sha256
10367 (base32
10368 "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq"))))
10369 (build-system ruby-build-system)
10370 (arguments `(#:tests? #f)); FIXME: some test failures
10371 (native-inputs
10372 `(("ruby-prawn" ,ruby-prawn)
10373 ("ruby-prawn-table" ,ruby-prawn-table)))
10374 (home-page "https://kramdown.gettalong.org/")
10375 (synopsis "Markdown parsing and converting library")
10376 (description "Kramdown is a library for parsing and converting a superset
10377of Markdown. It is completely written in Ruby, supports standard Markdown
10378(with some minor modifications) and various extensions that have been made
10379popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10380 (license license:expat)))
fa0063bc
JL
10381
10382(define-public ruby-http-parser.rb
10383 (package
10384 (name "ruby-http-parser.rb")
10385 (version "0.6.0")
10386 (source
10387 (origin
10388 (method url-fetch)
10389 (uri (rubygems-uri "http_parser.rb" version))
10390 (sha256
10391 (base32
10392 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10393 (build-system ruby-build-system)
10394 (arguments
10395 ;; No tests
10396 `(#:tests? #f))
10397 (native-inputs
10398 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10399 ("ruby-rspec" ,ruby-rspec)))
10400 (home-page "https://github.com/tmm1/http_parser.rb")
10401 (synopsis "HTTP parser un Ruby")
10402 (description "This gem is a simple callback-based HTTP request/response
10403parser for writing http servers, clients and proxies.")
10404 (license license:expat)))
5e2f74bd
JL
10405
10406(define-public ruby-em-websocket
10407 (package
10408 (name "ruby-em-websocket")
10409 (version "0.5.1")
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (rubygems-uri "em-websocket" version))
10414 (sha256
10415 (base32
10416 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10417 (build-system ruby-build-system)
10418 (arguments
10419 ;; No tests
10420 `(#:tests? #f))
10421 (propagated-inputs
10422 `(("ruby-eventmachine" ,ruby-eventmachine)
10423 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10424 (native-inputs
10425 `(("bundler" ,bundler)
10426 ("ruby-rspec" ,ruby-rspec)))
10427 (home-page "https://github.com/igrigorik/em-websocket")
10428 (synopsis "EventMachine based WebSocket server")
10429 (description "Em-websocket is an EventMachine based WebSocket server
10430implementation.")
10431 (license license:expat)))
4ce0414b
JL
10432
10433(define-public ruby-rouge
10434 (package
10435 (name "ruby-rouge")
55cc5ef8 10436 (version "3.13.0")
4ce0414b
JL
10437 (source (origin
10438 (method url-fetch)
10439 (uri (rubygems-uri "rouge" version))
10440 (sha256
10441 (base32
55cc5ef8 10442 "1y90nx9ph9adnrpcsvs2adca2l3dyz8am2d2kzxkwd3a086ji7aw"))))
4ce0414b
JL
10443 (build-system ruby-build-system)
10444 (arguments `(#:tests? #f)); No rakefile
10445 (home-page "http://rouge.jneen.net/")
10446 (synopsis "Code highlighter")
10447 (description "Rouge is a code highlighter written in Ruby. It supports more
10448than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10449is compatible with stylesheets designed for pygments.")
10450 (license (list
10451 ;; rouge is licensed under expat
10452 license:expat
10453 ;; pygments is licensed under bsd-2
10454 license:bsd-2))))
2c5028bd
JL
10455
10456(define-public ruby-rouge-2
10457 (package
10458 (inherit ruby-rouge)
10459 (version "2.2.1")
10460 (source (origin
10461 (method url-fetch)
10462 (uri (rubygems-uri "rouge" version))
10463 (sha256
10464 (base32
10465 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
2e072e37
JL
10466
10467(define-public ruby-hashie
10468 (package
10469 (name "ruby-hashie")
10470 (version "3.6.0")
10471 (source (origin
10472 (method url-fetch)
10473 (uri (rubygems-uri "hashie" version))
10474 (sha256
10475 (base32
10476 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10477 (build-system ruby-build-system)
10478 (native-inputs
10479 `(("bundler" ,bundler)))
10480 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10481 (home-page "https://github.com/intridea/hashie")
10482 (synopsis "Extensions to Ruby Hashes")
10483 (description "Hashie is a collection of classes and mixins that make Ruby
10484hashes more powerful.")
10485 (license license:expat)))
73bfc125
JL
10486
10487(define-public ruby-heredoc-unindent
10488 (package
10489 (name "ruby-heredoc-unindent")
10490 (version "1.2.0")
10491 (source (origin
10492 (method url-fetch)
10493 (uri (rubygems-uri "heredoc_unindent" version))
10494 (sha256
10495 (base32
10496 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
10497 (build-system ruby-build-system)
10498 (native-inputs
10499 `(("ruby-hoe" ,ruby-hoe)))
10500 (home-page "https://github.com/adrianomitre/heredoc_unindent")
10501 (synopsis "Heredoc indentation cleaner")
10502 (description "This gem removes common margin from indented strings, such
10503as the ones produced by indented heredocs. In other words, it strips out
4f66ae28 10504leading whitespace chars at the beginning of each line, but only as much as
73bfc125
JL
10505the line with the smallest margin.
10506
10507It is acknowledged that many strings defined by heredocs are just code and
10508fact is that most parsers are insensitive to indentation. If, however, the
10509strings are to be used otherwise, be it for printing or testing, the extra
10510indentation will probably be an issue and hence this gem.")
10511 (license license:expat)))
f8ae2ee5
JL
10512
10513(define-public ruby-safe-yaml
10514 (package
10515 (name "ruby-safe-yaml")
7fa83fa8 10516 (version "1.0.5")
28cf8dab
CB
10517 (source
10518 (origin
28cf8dab
CB
10519 (method git-fetch)
10520 (uri (git-reference
b0e7b699 10521 (url "https://github.com/dtao/safe_yaml")
28cf8dab
CB
10522 (commit version)))
10523 (file-name (git-file-name name version))
10524 (sha256
10525 (base32
7fa83fa8 10526 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
f8ae2ee5
JL
10527 (build-system ruby-build-system)
10528 (native-inputs
10529 `(("ruby-rspec" ,ruby-rspec)
10530 ("ruby-hashie" ,ruby-hashie)
10531 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
28cf8dab
CB
10532 (arguments
10533 '(#:test-target "spec"
10534 #:phases
10535 (modify-phases %standard-phases
10536 (add-before 'check 'set-TZ
10537 (lambda _
10538 ;; This test is dependent on the timezone
10539 ;; spec/transform/to_date_spec.rb:35
10540 ;; # SafeYAML::Transform::ToDate converts times to the local
10541 ;; timezone
10542 (setenv "TZ" "UTC-11")
10543 #t)))))
f8ae2ee5
JL
10544 (home-page "https://github.com/dtao/safe_yaml")
10545 (synopsis "YAML parser")
10546 (description "The SafeYAML gem provides an alternative implementation of
10547YAML.load suitable for accepting user input in Ruby applications.")
10548 (license license:expat)))
f1ec4d76
JL
10549
10550(define-public ruby-mercenary
10551 (package
10552 (name "ruby-mercenary")
10553 (version "0.3.6")
10554 (source (origin
10555 (method url-fetch)
10556 (uri (rubygems-uri "mercenary" version))
10557 (sha256
10558 (base32
10559 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
10560 (build-system ruby-build-system)
10561 (arguments `(#:test-target "spec"))
10562 (native-inputs
10563 `(("bundler" ,bundler)))
10564 (home-page "https://github.com/jekyll/mercenary")
10565 (synopsis "Command-line apps library in Ruby")
10566 (description "Mercenary is a lightweight and flexible library for writing
10567command-line apps in Ruby.")
10568 (license license:expat)))
a13d451e
JL
10569
10570(define-public ruby-liquid
10571 (package
10572 (name "ruby-liquid")
10573 (version "4.0.0")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (rubygems-uri "liquid" version))
10577 (sha256
10578 (base32
10579 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
10580 (build-system ruby-build-system)
10581 (arguments `(#:tests? #f)); No rakefile
10582 (home-page "https://shopify.github.io/liquid/")
10583 (synopsis "Template language")
10584 (description "Liquid is a template language written in Ruby. It is used
10585to load dynamic content on storefronts.")
10586 (license license:expat)))
49395112
JL
10587
10588(define-public ruby-forwardable-extended
10589 (package
10590 (name "ruby-forwardable-extended")
10591 (version "2.6.0")
10592 (source (origin
10593 (method url-fetch)
10594 (uri (rubygems-uri "forwardable-extended" version))
10595 (sha256
10596 (base32
10597 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
10598 (build-system ruby-build-system)
10599 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
10600 (home-page "https://github.com/envygeeks/forwardable-extended")
10601 (synopsis "Delegation to hashes and instance variables in Forwardable")
10602 (description "Forwardable Extended provides more @code{Forwardable}
10603methods for your source as @code{Forwardable::Extended}.")
10604 (license license:expat)))
37296113
JL
10605
10606(define-public ruby-pathutil
10607 (package
10608 (name "ruby-pathutil")
feaaa603 10609 (version "0.16.2")
37296113
JL
10610 (source (origin
10611 (method url-fetch)
10612 (uri (rubygems-uri "pathutil" version))
10613 (sha256
10614 (base32
feaaa603 10615 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
37296113
JL
10616 (build-system ruby-build-system)
10617 (propagated-inputs
10618 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
10619 (native-inputs
10620 `(("bundler" ,bundler)
10621 ("ruby-rspec" ,ruby-rspec)))
10622 ;; Fails with: cannot load such file --
10623 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
10624 (arguments `(#:tests? #f))
10625 (home-page "https://github.com/envygeeks/pathutil")
10626 (synopsis "Extended implementation of Pathname")
10627 (description "Pathutil tries to be a faster pure Ruby implementation of
10628Pathname.")
10629 (license license:expat)))
49e1dde5
JL
10630
10631(define-public jekyll
10632 (package
10633 (name "jekyll")
fcf82fd3 10634 (version "3.8.6")
49e1dde5
JL
10635 (source (origin
10636 (method url-fetch)
10637 (uri (rubygems-uri "jekyll" version))
10638 (sha256
10639 (base32
fcf82fd3 10640 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
49e1dde5
JL
10641 (build-system ruby-build-system)
10642 (arguments
fcf82fd3 10643 ;; No rakefile, but a test subdirectory.
49e1dde5
JL
10644 `(#:tests? #f
10645 #:phases
10646 (modify-phases %standard-phases
10647 (add-before 'build 'fix-i18n
10648 (lambda _
10649 (substitute* ".gemspec"
10650 (("~> 0.7") ">= 0.7"))
10651 #t)))))
10652 (propagated-inputs
10653 `(("ruby-addressable" ,ruby-addressable)
10654 ("ruby-colorator" ,ruby-colorator)
10655 ("ruby-em-websocket" ,ruby-em-websocket)
10656 ("ruby-i18n" ,ruby-i18n)
10657 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
10658 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
10659 ("ruby-kramdown" ,ruby-kramdown)
10660 ("ruby-liquid" ,ruby-liquid)
10661 ("ruby-mercenary" ,ruby-mercenary)
10662 ("ruby-pathutil" ,ruby-pathutil)
10663 ("ruby-rouge" ,ruby-rouge-2)
10664 ("ruby-safe-yaml" ,ruby-safe-yaml)))
10665 (home-page "https://jekyllrb.com/")
10666 (synopsis "Static site generator")
10667 (description "Jekyll is a simple, blog aware, static site generator.")
10668 (license license:expat)))
37a0f470
JL
10669
10670(define-public ruby-jekyll-paginate-v2
10671 (package
10672 (name "ruby-jekyll-paginate-v2")
10673 (version "2.0.0")
10674 (source (origin
10675 (method url-fetch)
10676 (uri (rubygems-uri "jekyll-paginate-v2" version))
10677 (sha256
10678 (base32
10679 "154bfpyml6abxww9868hhyfvxasl8qhsc5zy2q30c7dxaj0igdib"))))
10680 (build-system ruby-build-system)
10681 (propagated-inputs
10682 `(("jekyll" ,jekyll)))
10683 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
10684 (synopsis "Pagination Generator for Jekyll 3")
10685 (description "The Pagination Generator forms the core of the pagination
10686logic in Jekyll. It calculates and generates the pagination pages.")
10687 (license license:expat)))
909eae21
CB
10688
10689(define-public ruby-faraday
10690 (package
10691 (name "ruby-faraday")
10692 (version "0.15.4")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (rubygems-uri "faraday" version))
10697 (sha256
10698 (base32
10699 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
10700 (build-system ruby-build-system)
10701 (arguments
10702 '(#:tests? #f))
10703 (propagated-inputs
10704 `(("ruby-multipart-post" ,ruby-multipart-post)))
10705 (synopsis "Ruby HTTP/REST API client library")
10706 (description
10707 "Faraday is a HTTP/REST API client library which provides a common
10708interface over different adapters.")
10709 (home-page "https://github.com/lostisland/faraday")
10710 (license license:expat)))
a058cbfd
CB
10711
10712(define-public ruby-nio4r
10713 (package
10714 (name "ruby-nio4r")
7923b9bf 10715 (version "2.5.2")
a058cbfd
CB
10716 (source
10717 (origin
10718 (method url-fetch)
10719 (uri (rubygems-uri "nio4r" version))
10720 (sha256
10721 (base32
7923b9bf 10722 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
a058cbfd
CB
10723 (build-system ruby-build-system)
10724 (arguments
10725 '(#:phases
10726 (modify-phases %standard-phases
10727 (add-after 'unpack 'remove-unnecessary-dependencies
10728 (lambda _
10729 (substitute* "spec/spec_helper.rb"
10730 ;; Coveralls is for uploading test coverage information to an
10731 ;; online service, and thus unnecessary for building the Guix
10732 ;; package
10733 (("require \"coveralls\"") "")
10734 (("Coveralls\\.wear!") "")
10735 ;; Remove rspec/retry as we are not retrying the tests
10736 (("require \"rspec/retry\"") "")
10737 (("config\\.display_try_failure_messages = true") "")
10738 (("config\\.verbose_retry = true") ""))
10739 #t))
10740 (add-before 'check 'compile
10741 (lambda _
10742 (invoke "rake" "compile")
10743 #t))
10744 (replace 'check
10745 (lambda* (#:key tests? #:allow-other-keys)
10746 (when tests?
10747 (invoke "rspec"))
10748 #t)))))
10749 (native-inputs
10750 `(("bundler" ,bundler)
10751 ("ruby-rake-compiler" ,ruby-rake-compiler)
10752 ("ruby-rspec" ,ruby-rspec)
10753 ("ruby-rubocop" ,ruby-rubocop)))
10754 (synopsis "New I/O for Ruby")
10755 (description
10756 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
10757for scalable network clients and servers.")
10758 (home-page "https://github.com/socketry/nio4r")
10759 (license license:expat)))
f9da1ada
CB
10760
10761(define-public ruby-globalid
10762 (package
10763 (name "ruby-globalid")
10764 (version "0.4.2")
10765 (source
10766 (origin
10767 (method url-fetch)
10768 (uri (rubygems-uri "globalid" version))
10769 (sha256
10770 (base32
10771 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
10772 (build-system ruby-build-system)
10773 (arguments
10774 '(;; No included tests
10775 #:tests? #f))
10776 (propagated-inputs
10777 `(("ruby-activesupport" ,ruby-activesupport)))
10778 (synopsis "Generate URIs idenfitying model instances in Ruby")
10779 (description
10780 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
10781uniquely identify it.")
10782 (home-page "https://rubyonrails.org/")
10783 (license license:expat)))
15606d98
CB
10784
10785(define-public ruby-sprockets
10786 (package
10787 (name "ruby-sprockets")
10788 (version "3.7.2")
10789 (source
10790 (origin
10791 (method url-fetch)
10792 (uri (rubygems-uri "sprockets" version))
10793 (sha256
10794 (base32
10795 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
10796 (build-system ruby-build-system)
10797 (arguments
10798 '(;; No included tests
10799 #:tests? #f))
10800 (propagated-inputs
10801 `(("ruby-concurrent" ,ruby-concurrent)
10802 ("ruby-rack" ,ruby-rack)))
10803 (synopsis "Sprockets is a Rack-based asset packaging system")
10804 (description
10805 "Sprockets is a Rack-based asset packaging system that concatenates and
10806serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
10807 (home-page "https://github.com/rails/sprockets")
10808 (license license:expat)))
acb9e3d8
PN
10809
10810(define-public ruby-mustermann
10811 (package
10812 (name "ruby-mustermann")
10813 (version "1.0.3")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (rubygems-uri "mustermann" version))
10818 (sha256
10819 (base32
10820 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
10821 (build-system ruby-build-system)
10822 (arguments
10823 ;; No tests.
10824 '(#:tests? #f))
10825 (synopsis "Library implementing patterns that behave like regular expressions")
10826 (description "Given a string pattern, Mustermann will turn it into an
10827object that behaves like a regular expression and has comparable performance
10828characteristics.")
10829 (home-page "https://github.com/sinatra/mustermann")
10830 (license license:expat)))
3bb094e2 10831
7bddb6aa
BL
10832(define-public ruby-htmlentities
10833 (package
10834 (name "ruby-htmlentities")
10835 (version "4.3.4")
10836 (source
10837 (origin
10838 (method url-fetch)
10839 (uri (rubygems-uri "htmlentities" version))
10840 (sha256
10841 (base32
10842 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
10843 (build-system ruby-build-system)
10844 (arguments
10845 `(#:phases
10846 (modify-phases %standard-phases
10847 (replace 'check
10848 (lambda _
10849 (map (lambda (file)
10850 (invoke "ruby" "-Itest" file))
10851 (find-files "./test" ".*_test\\.rb")))))))
10852 (synopsis "Encode and decode (X)HTML entities")
10853 (description
10854 "This package provides a module for encoding and decoding (X)HTML
10855entities.")
10856 (home-page "https://github.com/threedaymonk/htmlentities")
10857 (license license:expat)))
10858
3bb094e2
PN
10859(define-public ruby-sinatra
10860 (package
10861 (name "ruby-sinatra")
7af92924 10862 (version "2.0.8.1")
3bb094e2
PN
10863 (source
10864 (origin
10865 (method url-fetch)
10866 (uri (rubygems-uri "sinatra" version))
10867 (sha256
10868 (base32
7af92924 10869 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
3bb094e2 10870 (build-system ruby-build-system)
7af92924
MC
10871 (arguments
10872 `(#:phases
10873 (modify-phases %standard-phases
10874 ;; See: https://github.com/sinatra/sinatra/issues/1578.
10875 (add-after 'extract-gemspec 'fix-slow-doc-generation
10876 (lambda _
10877 (substitute* "sinatra.gemspec"
10878 (("\"README.rdoc\"\\.freeze," all)
10879 (string-append all " \"--exclude=.*\\.md\".freeze,")))
10880 #t)))))
3bb094e2
PN
10881 (propagated-inputs
10882 `(("ruby-mustermann" ,ruby-mustermann)
10883 ("ruby-rack" ,ruby-rack)
10884 ("ruby-rack-protection" ,ruby-rack-protection)
10885 ("ruby-tilt" ,ruby-tilt)))
10886 (synopsis "DSL for quick web applications creation in Ruby")
10887 (description
10888 "Sinatra is a DSL for quickly creating web applications in Ruby with
10889minimal effort.")
10890 (home-page "http://sinatrarb.com/")
10891 (license license:expat)))
6e87695b
PN
10892
10893(define-public ruby-thin
10894 (package
10895 (name "ruby-thin")
10896 (version "1.7.2")
10897 (source
10898 (origin
10899 (method url-fetch)
10900 (uri (rubygems-uri "thin" version))
10901 (sha256
10902 (base32
10903 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
10904 (build-system ruby-build-system)
10905 (arguments
10906 ;; No tests.
10907 '(#:tests? #f))
10908 (propagated-inputs
10909 `(("ruby-daemons" ,ruby-daemons)
10910 ("ruby-eventmachine" ,ruby-eventmachine)
10911 ("ruby-rack" ,ruby-rack)))
10912 (synopsis "Thin and fast web server for Ruby")
10913 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
10914@itemize
10915@item the Mongrel parser,
10916@item Event Machine, a network I/O library with high scalability, performance
10917and stability,
10918@item Rack, a minimal interface between webservers and Ruby frameworks.
10919@end itemize\n")
60783303 10920 (home-page "https://github.com/macournoyer/thin")
6e87695b 10921 (license license:ruby)))
be6016db
PN
10922
10923(define-public ruby-skinny
10924 (package
10925 (name "ruby-skinny")
10926 (version "0.2.4")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (rubygems-uri "skinny" version))
10931 (sha256
10932 (base32
10933 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
10934 (build-system ruby-build-system)
10935 (arguments
10936 '(#:tests? #f ; No included tests
10937 #:phases
10938 (modify-phases %standard-phases
10939 (add-before 'build 'patch-gemspec
10940 (lambda _
10941 (substitute* ".gemspec"
10942 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
10943 "<eventmachine>, [\">= 1.0.0\"")
10944 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
10945 #t)))))
10946 (propagated-inputs
10947 `(("ruby-eventmachine" ,ruby-eventmachine)
10948 ("ruby-thin" ,ruby-thin)))
10949 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
10950 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
10951the Thin library.")
10952 (home-page "https://github.com/sj26/skinny")
10953 (license license:expat)))
df747c8d 10954
9c566d1b
MB
10955(define-public ruby-sys-filesystem
10956 (package
10957 (name "ruby-sys-filesystem")
10958 (version "1.3.4")
10959 (source (origin
10960 (method url-fetch)
10961 (uri (rubygems-uri "sys-filesystem" version))
10962 (sha256
10963 (base32
10964 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
10965 (build-system ruby-build-system)
10966 (arguments
10967 '(#:phases (modify-phases %standard-phases
10968 (add-before 'check 'set-HOME
10969 (lambda _
10970 ;; Some tests attempt to stat $HOME. Let them.
10971 (setenv "HOME" "/tmp")
10972 #t)))))
10973 (propagated-inputs
10974 `(("ruby-ffi" ,ruby-ffi)))
10975 (native-inputs
10976 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
10977 (synopsis "Gather file system information")
10978 (description
10979 "The @code{sys-filesystem} library provides a cross-platform interface
10980for gathering file system information, such as disk space and mount points.")
10981 (home-page "https://github.com/djberg96/sys-filesystem")
10982 (license license:asl2.0)))
10983
df747c8d
PN
10984(define-public mailcatcher
10985 (package
10986 (name "mailcatcher")
10987 (version "0.7.1")
10988 (source
10989 (origin
10990 (method url-fetch)
10991 (uri (rubygems-uri "mailcatcher" version))
10992 (sha256
10993 (base32
10994 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
10995 (build-system ruby-build-system)
10996 (arguments
10997 ;; Tests require web/assets which is not included in the output. We
10998 ;; might be able to fix this by adding the Git repository to the GEM_PATH
10999 ;; of the tests. See ruby-mysql2.
11000 '(#:tests? #f
11001 #:phases
11002 (modify-phases %standard-phases
11003 (add-before 'build 'patch-gemspec
11004 (lambda _
11005 (substitute* ".gemspec"
11006 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
11007 "<eventmachine>, [\">= 1.0.9.1")
11008 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
11009 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
11010 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
11011 #t))
11012 (add-before 'build 'loosen-dependency-contraint
11013 (lambda _
11014 (substitute* "lib/mail_catcher.rb"
11015 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
11016 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
11017 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
11018 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
11019 #t)))))
11020 (inputs
11021 `(("ruby-eventmachine" ,ruby-eventmachine)
11022 ("ruby-mail" ,ruby-mail)
11023 ("ruby-rack" ,ruby-rack)
11024 ("ruby-sinatra" ,ruby-sinatra)
11025 ("ruby-skinny" ,ruby-skinny)
11026 ("ruby-sqlite3" ,ruby-sqlite3)
11027 ("ruby-thin" ,ruby-thin)))
11028 (synopsis "SMTP server which catches messages to display them a browser")
11029 (description
11030 "MailCatcher runs a super simple SMTP server which catches any message
11031sent to it to display in a web interface. Run mailcatcher, set your favourite
11032app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
11033then check out http://127.0.0.1:1080 to see the mail.")
11034 (home-page "https://mailcatcher.me")
11035 (license license:expat)))
fc4f7c45
MK
11036
11037(define-public ruby-backport
11038 (package
11039 (name "ruby-backport")
b62863b8 11040 (version "1.1.2")
fc4f7c45
MK
11041 (source
11042 (origin
b62863b8 11043 ;; The gem does not include test code, so fetch from the Git repository.
fc4f7c45
MK
11044 (method git-fetch)
11045 (uri (git-reference
b0e7b699 11046 (url "https://github.com/castwide/backport")
fc4f7c45
MK
11047 (commit (string-append "v" version))))
11048 (file-name (git-file-name name version))
11049 (sha256
b62863b8 11050 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
fc4f7c45
MK
11051 (build-system ruby-build-system)
11052 (arguments
11053 `(#:test-target "spec"))
11054 (native-inputs
11055 `(("bundler" ,bundler)
11056 ("ruby-rspec" ,ruby-rspec)))
11057 (inputs
11058 `(("ruby-simplecov" ,ruby-simplecov)))
11059 (synopsis "Pure Ruby library for event-driven IO")
11060 (description
11061 "This package provides a pure Ruby library for event-driven IO.")
11062 (home-page "https://github.com/castwide/backport")
11063 (license license:expat)))
369faa59
JL
11064
11065(define-public ruby-json-schema
11066 (package
11067 (name "ruby-json-schema")
11068 (version "2.8.1")
11069 (source
11070 (origin
11071 (method url-fetch)
11072 (uri (rubygems-uri "json-schema" version))
11073 (sha256
11074 (base32
11075 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
11076 (build-system ruby-build-system)
11077 (arguments
11078 `(#:tests? #f ; no tests
11079 #:phases
11080 (modify-phases %standard-phases
11081 (replace 'build
11082 (lambda _
11083 (invoke "gem" "build" ".gemspec"))))))
11084 (propagated-inputs
11085 `(("ruby-addressable" ,ruby-addressable)))
11086 (synopsis "Ruby JSON Schema Validator")
11087 (description "This library provides Ruby with an interface for validating
11088JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
11089support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
11090is also included.")
11091 (home-page "https://github.com/ruby-json-schema/json-schema")
11092 (license license:expat)))
44881cad
JL
11093
11094(define-public swagger-diff
11095 (package
11096 (name "swagger-diff")
11097 (version "1.1.2")
11098 (source
11099 (origin
11100 (method url-fetch)
11101 (uri (rubygems-uri "swagger-diff" version))
11102 (sha256
11103 (base32
11104 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
11105 (build-system ruby-build-system)
11106 (arguments
11107 `(#:test-target "spec"
11108 #:phases
11109 (modify-phases %standard-phases
11110 ;; Don't run or require rubocop, the code linting tool, as this is a
11111 ;; bit unnecessary.
11112 (add-after 'unpack 'dont-run-rubocop
11113 (lambda _
11114 (substitute* "Rakefile"
11115 ((".*rubocop.*") "")
11116 ((".*RuboCop.*") ""))
11117 #t)))))
11118 (propagated-inputs
11119 `(("ruby-json-schema" ,ruby-json-schema)))
11120 (native-inputs
11121 `(("bundler" ,bundler)
11122 ("ruby-rspec-core" ,ruby-rspec-core)
11123 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
11124 (synopsis
11125 "Compare Open API Initiative specification files")
11126 (description
11127 "Swagger::Diff is a utility for comparing two different Open API
11128Initiative (OAI) specifications (formerly known as Swagger specifications).
11129It is intended to determine whether a newer API specification is
11130backwards-compatible with an older API specification.")
11131 (home-page "https://github.com/civisanalytics/swagger-diff")
11132 (license license:bsd-3)))
9e065a8a
BL
11133
11134(define-public ruby-reverse-markdown
11135 (package
11136 (name "ruby-reverse-markdown")
11137 (version "1.1.0")
11138 (source
11139 (origin
11140 (method url-fetch)
11141 (uri (rubygems-uri "reverse_markdown" version))
11142 (sha256
11143 (base32
11144 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
11145 (build-system ruby-build-system)
11146 (propagated-inputs
11147 `(("ruby-nokogiri" ,ruby-nokogiri)))
11148 (native-inputs
11149 `(("bundler" ,bundler)
11150 ("ruby-rspec" ,ruby-rspec)
11151 ("ruby-kramdown" ,ruby-kramdown)
11152 ("ruby-simplecov" ,ruby-simplecov)))
11153 (arguments
11154 `(#:phases
11155 (modify-phases %standard-phases
11156 (replace 'check
11157 (lambda* (#:key tests? #:allow-other-keys)
11158 (when tests?
11159 (invoke "rspec"))
11160 #t)))))
11161 (synopsis "Convert HTML into Markdown")
11162 (description
11163 "This Ruby module allows you to map simple HTML back into
11164Markdown---e.g., if you want to import existing HTML data in your
11165application.")
11166 (home-page "https://github.com/xijo/reverse_markdown")
11167 (license license:wtfpl2)))
11168
a9e2de7e
BL
11169(define-public ruby-solargraph
11170 (package
11171 (name "ruby-solargraph")
11172 (version "0.36.0")
11173 (source
11174 (origin
11175 (method url-fetch)
11176 (uri (rubygems-uri "solargraph" version))
11177 (sha256
11178 (base32
11179 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
11180 (build-system ruby-build-system)
11181 (propagated-inputs
11182 `(("ruby-backport" ,ruby-backport)
11183 ("bundler" ,bundler)
11184 ("ruby-htmlentities" ,ruby-htmlentities)
11185 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
11186 ("ruby-maruku" ,ruby-maruku)
11187 ("ruby-nokogiri" ,ruby-nokogiri)
11188 ("ruby-parser" ,ruby-parser)
11189 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
11190 ("ruby-rubocop" ,ruby-rubocop)
11191 ("ruby-thor" ,ruby-thor)
11192 ("ruby-tilt" ,ruby-tilt)
11193 ("ruby-yard" ,ruby-yard)))
11194 (native-inputs
11195 `(("ruby-rspec" ,ruby-rspec)
11196 ("ruby-pry" ,ruby-pry)
11197 ("ruby-simplecov" ,ruby-simplecov)
11198 ("ruby-webmock" ,ruby-webmock-2)))
11199 ;; FIXME: can't figure out how to run the tests properly:
11200
11201 ;; An error occurred while loading spec_helper.
11202 ;; Failure/Error: return gem_original_require(path)
11203 ;; LoadError:
11204 ;; cannot load such file -- spec_helper
11205 (arguments
11206 '(#:tests? #f
11207 #:phases
11208 (modify-phases %standard-phases
11209 (replace 'check
11210 (lambda* (#:key tests? #:allow-other-keys)
11211 (when tests?
11212 (invoke "rspec"))
11213 #t)))))
11214 (synopsis
11215 "IDE tools for code completion, inline documentation, and static analysis")
11216 (description
11217 "Solargraph provides a comprehensive suite of tools for Ruby
11218programming: intellisense, diagnostics, inline documentation, and type
11219checking.")
11220 (home-page "https://solargraph.org/")
11221 (license license:expat)))
0c558aa9
DNB
11222
11223(define-public ruby-wayback-machine-downloader
11224 (package
11225 (name "ruby-wayback-machine-downloader")
11226 (version "2.2.1")
11227 (source
11228 (origin
11229 (method url-fetch)
11230 (uri (rubygems-uri
11231 "wayback_machine_downloader"
11232 version))
11233 (sha256
11234 (base32
11235 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
11236 (build-system ruby-build-system)
11237 (arguments
11238 '(#:tests? #f)) ; no tests
11239 (synopsis "Download archived websites from the Wayback Machine")
11240 (description
11241 "Wayback Machine Downloader is a command line tool for downloading
11242websites from the Internet Archive's Wayback Machine (archive.org).
11243It allows fine grained control over what to download by specifying
11244which snapshots to consider and what files to include.")
11245 (home-page
11246 "https://github.com/hartator/wayback-machine-downloader")
11247 (license license:expat)))
e6483f8c
MB
11248
11249(define-public ruby-wwtd
11250 (package
11251 (name "ruby-wwtd")
11252 (version "1.4.1")
702a1012 11253 (home-page "https://github.com/grosser/wwtd")
e6483f8c
MB
11254 (source (origin
11255 (method git-fetch)
11256 (uri (git-reference
11257 (url home-page)
11258 (commit (string-append "v" version))))
11259 (file-name (git-file-name name version))
11260 (sha256
11261 (base32
11262 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
11263 (modules '((guix build utils)))
11264 (snippet
11265 '(begin
11266 ;; Remove bundled library.
11267 (delete-file "spec/rake-12.3.0.gem")
11268 #t))))
11269 (build-system ruby-build-system)
11270 (arguments
11271 '(;; XXX: Tests need multiple versions of ruby, wants to run
11272 ;; `bundle install`, etc.
11273 #:tests? #f
11274 #:phases (modify-phases %standard-phases
11275 (replace 'replace-git-ls-files
11276 (lambda _
11277 (substitute* "wwtd.gemspec"
11278 (("git ls-files lib/ bin/`")
11279 "find lib/ bin/ -type f |sort`"))
11280 #t))
11281 (add-before 'check 'remove-version-constraints
11282 (lambda _
11283 (delete-file "Gemfile.lock")
11284 #t))
11285 (replace 'check
11286 (lambda* (#:key tests? #:allow-other-keys)
11287 (if tests?
11288 (invoke "rspec" "spec/")
11289 (format #t "test suite not run~%"))
11290 #t)))))
11291 (native-inputs
11292 `(("ruby-bump" ,ruby-bump)
11293 ("ruby-rspec" ,ruby-rspec)))
11294 (synopsis "Run @file{.travis.yml} files locally")
11295 (description
11296 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
11297defined in @file{.travis.yml} on your local machine, using @code{rvm},
11298@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
11299 (license license:expat)))