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