gnu: Add ruby-given-core.
[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
999ffb26
DM
676(define-public ruby-rspec-its
677 (package
678 (name "ruby-rspec-its")
b2244c68 679 (version "1.3.0")
999ffb26
DM
680 (source
681 (origin
3306f02a
CB
682 (method git-fetch)
683 (uri (git-reference
b0e7b699 684 (url "https://github.com/rspec/rspec-its")
3306f02a
CB
685 (commit (string-append "v" version))))
686 (file-name (git-file-name name version))
999ffb26
DM
687 (sha256
688 (base32
b2244c68 689 "02mlsc9d4d1cjj5vahi8v3q8hyn9fyiv8nnlidhgfh186qp20g1p"))))
999ffb26
DM
690 (build-system ruby-build-system)
691 (arguments
3306f02a
CB
692 `(#:test-target "spec"
693 #:phases
694 (modify-phases %standard-phases
695 (add-after 'unpack 'dont-install-gems-from-gemfile
696 (lambda _
697 (substitute* "Gemfile"
698 (("rspec rspec-core rspec-expectations rspec-mocks rspec-support")
699 ""))
700 #t))
7c8eb479 701 (add-before 'build 'loosen-ffi-requirement
b2244c68 702 (lambda _
7c8eb479 703 ;; Accept any version of ruby-ffi.
b2244c68 704 (substitute* "Gemfile"
7c8eb479
MB
705 ((" gem 'ffi', '~> 1\\.9\\.25'")
706 " gem 'ffi'"))
b2244c68 707 #t))
3306f02a
CB
708 (add-before 'build 'remove-unnecessary-dependency-versions-from-gemfile
709 (lambda _
710 (substitute* "rspec-its.gemspec"
711 (("rake.*") "rake'\n")
b2244c68
BH
712 (("spec.add_development_dependency 'cucumber'.*")
713 "spec.add_development_dependency 'cucumber'\n")
3306f02a 714 (("bundler.*") "bundler'\n")
b2244c68 715 (("\"aruba.*") "'aruba'\n"))
3306f02a 716 #t)))))
999ffb26
DM
717 (propagated-inputs
718 `(("ruby-rspec-core" ,ruby-rspec-core)
719 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
3306f02a
CB
720 (native-inputs
721 `(("bundler" ,bundler)
722 ("ruby-cucumber" ,ruby-cucumber)
b2244c68 723 ("ruby-ffi" ,ruby-ffi)
3306f02a
CB
724 ("ruby-aruba" ,ruby-aruba)))
725 (synopsis "RSpec extension that provides the @code{its} method")
726 (description
727 "RSpec::Its provides the its method as a short-hand to specify the expected
728value of an attribute. For example, one can use @code{its(:size)\\{should
729eq(1)\\}}.")
999ffb26
DM
730 (home-page "https://github.com/rspec/rspec-its")
731 (license license:expat)))
732
d7bd7016
MC
733;;; This variant is used to break a cycle with ruby-protobuf.
734(define-public ruby-rspec-its-minimal
735 (hidden-package
736 (package
737 (inherit ruby-rspec-its)
738 (arguments
739 (substitute-keyword-arguments (package-arguments ruby-rspec-its)
740 ((#:tests? _ #f) #f)))
741 (native-inputs '()))))
742
4f2a0cac
DT
743(define-public ruby-rspec-mocks
744 (package
745 (name "ruby-rspec-mocks")
bee67d18 746 (version "3.8.0")
4f2a0cac
DT
747 (source (origin
748 (method url-fetch)
e83c6d00 749 (uri (rubygems-uri "rspec-mocks" version))
4f2a0cac
DT
750 (sha256
751 (base32
bee67d18 752 "06y508cjqycb4yfhxmb3nxn0v9xqf17qbd46l1dh4xhncinr4fyp"))))
4f2a0cac
DT
753 (build-system ruby-build-system)
754 (arguments
755 '(#:tests? #f)) ; avoid dependency cycles
756 (propagated-inputs
757 `(("ruby-rspec-support" ,ruby-rspec-support)
20c05ea9 758 ("ruby-diff-lcs" ,ruby-diff-lcs)))
4f2a0cac
DT
759 (synopsis "RSpec stubbing and mocking library")
760 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
761support for stubbing and mocking.")
762 (home-page "https://github.com/rspec/rspec-mocks")
763 (license license:expat)))
d4fde1f2 764
6da9adeb
BW
765(define-public ruby-rspec-mocks-2
766 (package (inherit ruby-rspec-mocks)
767 (version "2.14.6")
768 (source (origin
769 (method url-fetch)
770 (uri (rubygems-uri "rspec-mocks" version))
771 (sha256
772 (base32
773 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
774 (propagated-inputs
775 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
776
198bc648
CB
777(define-public ruby-rspec-rerun
778 (package
779 (name "ruby-rspec-rerun")
780 (version "1.1.0")
781 (source
782 (origin
783 (method url-fetch)
784 (uri (rubygems-uri "rspec-rerun" version))
785 (sha256
786 (base32
787 "1gy7znkcaqhpccfnk2nvaqbsvgxy3q57cmjwkl9fi1zabaq5lbkj"))))
788 (build-system ruby-build-system)
789 (arguments
790 '(;; No included tests
791 #:tests? #f))
792 (propagated-inputs `(("ruby-rspec" ,ruby-rspec)))
793 (synopsis "Track failed RSpec tests to re-run them")
794 (description
795 "This package provides an automated way to track, and then re-run failed
796RSpec tests.")
797 (home-page "https://github.com/dblock/rspec-rerun")
798 (license license:expat)))
799
9c4cb1ef
CD
800(define-public ruby-rspec-wait
801 (package
802 (name "ruby-rspec-wait")
803 (version "0.0.9")
804 (source
805 (origin
806 (method url-fetch)
807 (uri (rubygems-uri "rspec-wait" version))
808 (sha256
809 (base32
810 "0gvj1bp5ccx001dyvcgk2j49s5sl6vs9fdaqqb08z3bd1554hsww"))))
811 (build-system ruby-build-system)
812 (arguments
813 '(#:phases
814 (modify-phases %standard-phases
815 (replace 'check
816 (lambda _
817 (invoke "rake" "spec"))))))
818 (native-inputs
819 `(("bundler" ,bundler)))
820 (propagated-inputs
821 `(("ruby-rspec" ,ruby-rspec)))
822 (home-page "https://github.com/laserlemon/rspec-wait")
823 (synopsis "Wait for conditions in RSpec")
824 (description
825 "RSpec::Wait strives to make it easier to test asynchronous or slow
826interactions.")
827 (license license:expat)))
828
d4fde1f2
DT
829(define-public ruby-rspec
830 (package
831 (name "ruby-rspec")
bee67d18 832 (version "3.8.0")
d4fde1f2
DT
833 (source (origin
834 (method url-fetch)
e83c6d00 835 (uri (rubygems-uri "rspec" version))
d4fde1f2
DT
836 (sha256
837 (base32
bee67d18 838 "15ppasvb9qrscwlyjz67ppw1lnxiqnkzx5vkx1bd8x5n3dhikxc3"))))
d4fde1f2
DT
839 (build-system ruby-build-system)
840 (arguments
841 '(#:tests? #f)) ; avoid dependency cycles
842 (propagated-inputs
843 `(("ruby-rspec-core" ,ruby-rspec-core)
844 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
845 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
846 (synopsis "Behavior-driven development framework for Ruby")
847 (description "RSpec is a behavior-driven development (BDD) framework for
848Ruby. This meta-package includes the RSpec test runner, along with the
849expectations and mocks frameworks.")
35739712 850 (home-page "https://rspec.info/")
d4fde1f2 851 (license license:expat)))
2cbc105b 852
5ac984b3
BW
853(define-public ruby-rspec-2
854 (package (inherit ruby-rspec)
855 (version "2.14.1")
856 (source (origin
857 (method url-fetch)
858 (uri (rubygems-uri "rspec" version))
859 (sha256
860 (base32
861 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
862 (propagated-inputs
863 `(("ruby-rspec-core" ,ruby-rspec-core-2)
864 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
865 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
866
2cbc105b
DT
867;; Bundler is yet another source of circular dependencies, so we must disable
868;; its test suite as well.
869(define-public bundler
870 (package
871 (name "bundler")
cbee8e31 872 (version "2.1.4")
2cbc105b
DT
873 (source (origin
874 (method url-fetch)
e83c6d00 875 (uri (rubygems-uri "bundler" version))
2cbc105b
DT
876 (sha256
877 (base32
cbee8e31 878 "12glbb1357x91fvd004jgkw7ihlkpc9dwr349pd7j83isqhls0ah"))))
2cbc105b
DT
879 (build-system ruby-build-system)
880 (arguments
881 '(#:tests? #f)) ; avoid dependency cycles
882 (synopsis "Ruby gem bundler")
883 (description "Bundler automatically downloads and installs a list of gems
884specified in a \"Gemfile\", as well as their dependencies.")
2f3800e5 885 (home-page "https://bundler.io/")
2cbc105b 886 (license license:expat)))
98b87b82 887
cf36174f
RW
888(define-public ruby-builder
889 (package
890 (name "ruby-builder")
42b48db2 891 (version "3.2.3")
cf36174f
RW
892 (source (origin
893 (method url-fetch)
894 (uri (rubygems-uri "builder" version))
895 (sha256
896 (base32
42b48db2 897 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
cf36174f
RW
898 (build-system ruby-build-system)
899 (arguments
900 `(#:phases
901 (modify-phases %standard-phases
902 (add-after 'unpack 'do-not-use-rvm
903 (lambda _
904 (substitute* "rakelib/tags.rake"
905 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
906 #t)))))
907 (synopsis "Ruby library to create structured data")
908 (description "Builder provides a number of builder objects that make it
909easy to create structured data. Currently the following builder objects are
910supported: XML Markup and XML Events.")
911 (home-page "https://github.com/jimweirich/builder")
912 (license license:expat)))
913
566f71f8
CB
914(define-public ruby-bump
915 (package
916 (name "ruby-bump")
917 (version "0.7.0")
918 (source
919 (origin
920 (method url-fetch)
921 (uri (rubygems-uri "bump" version))
922 (sha256
923 (base32
924 "1xinbr9rzh6cj75x24niwgqcnbhdxc68a8bc41lk8xv6fd906fym"))))
925 (build-system ruby-build-system)
926 (arguments
927 '(;; No included tests
928 #:tests? #f))
929 (synopsis "Tool for working with Rubygems")
930 (description
931 "Bump provides commands to manage Rubygem versioning, updating to the
932next patch version for example.")
933 (home-page "https://github.com/gregorym/bump")
934 (license license:expat)))
935
ad79eb55
RW
936(define-public ruby-rjb
937 (package
938 (name "ruby-rjb")
aeb4e61e 939 (version "1.5.5")
ad79eb55
RW
940 (source (origin
941 (method url-fetch)
942 (uri (rubygems-uri "rjb" version))
943 (sha256
944 (base32
aeb4e61e 945 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
ad79eb55
RW
946 (build-system ruby-build-system)
947 (arguments
948 `(#:tests? #f ; no rakefile
949 #:phases
950 (modify-phases %standard-phases
951 (add-before 'build 'set-java-home
952 (lambda* (#:key inputs #:allow-other-keys)
953 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
954 #t)))))
955 (native-inputs
d2540f80 956 `(("jdk" ,icedtea "jdk")))
ad79eb55
RW
957 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
958 (description "RJB is a bridge program that connects Ruby and Java via the
959Java Native Interface.")
2f3800e5 960 (home-page "https://www.artonx.org/collabo/backyard/?RubyJavaBridge")
ad79eb55
RW
961 (license license:lgpl2.1+)))
962
f9ae2c06
PP
963(define-public ruby-log4r
964 (package
965 (name "ruby-log4r")
966 (version "1.1.10")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (rubygems-uri "log4r" version))
971 (sha256
972 (base32
973 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
974 (build-system ruby-build-system)
975 (arguments
976 '(#:tests? #f)) ; no Rakefile in gem
977 (synopsis "Flexible logging library for Ruby")
978 (description "Comprehensive and flexible logging library written
979in Ruby for use in Ruby programs. It features a hierarchical logging
980system of any number of levels, custom level names, logger
981inheritance, multiple output destinations per log event, execution
982tracing, custom formatting, thread safteyness, XML and YAML
983configuration, and more.")
984 (home-page "http://log4r.rubyforge.org/")
985 (license license:bsd-3)))
986
71a03c29
RW
987(define-public ruby-atoulme-antwrap
988 (package
989 (name "ruby-atoulme-antwrap")
990 (version "0.7.5")
991 (source (origin
992 (method url-fetch)
993 (uri (rubygems-uri "atoulme-Antwrap" version))
994 (sha256
995 (base32
996 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
997 (build-system ruby-build-system)
998 ;; Test data required for most of the tests are not included.
999 (arguments `(#:tests? #f))
1000 (native-inputs
1001 `(("ruby-hoe" ,ruby-hoe)))
1002 (inputs
1003 `(("ruby-rjb" ,ruby-rjb)))
1004 (synopsis "Ruby wrapper for the Ant build tool")
1005 (description "Antwrap is a Ruby module that wraps the Apache Ant build
1006tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
1007script.")
1008 (home-page "http://rubyforge.org/projects/antwrap/")
1009 (license license:expat)))
1010
fe1ddad5
RW
1011(define-public ruby-atoulme-saikuro
1012 (package
1013 (name "ruby-atoulme-saikuro")
1014 (version "1.2.1")
1015 (source (origin
1016 (method url-fetch)
1017 (uri (rubygems-uri "atoulme-Saikuro" version))
1018 (sha256
1019 (base32
1020 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
1021 (build-system ruby-build-system)
1022 ;; FIXME: There are no unit tests. The tests are demonstrations of the
1023 ;; "saikuro" tool.
1024 (arguments `(#:tests? #f))
1025 (synopsis "Cyclomatic complexity analyzer")
1026 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
1027given Ruby source code Saikuro will generate a report listing the cyclomatic
1028complexity of each method found. In addition, Saikuro counts the number of
1029lines per method and can generate a listing of the number of tokens on each
1030line of code.")
1031 (home-page "http://www.github.com/atoulme/Saikuro")
1032 ;; File headers contain the BSD-3 license and the README.rdoc says that
1033 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
1034 ;; of the Expat license.
1035 (license license:bsd-3)))
1036
c84dd8d4
MC
1037(define-public ruby-pandoc-ruby
1038 (package
1039 (name "ruby-pandoc-ruby")
1040 (version "2.1.4")
1041 (source
1042 (origin
1043 (method git-fetch) ;the gem lacks many test files
1044 (uri (git-reference
b0e7b699 1045 (url "https://github.com/xwmx/pandoc-ruby")
c84dd8d4
MC
1046 (commit version)))
1047 (file-name (git-file-name name version))
1048 (sha256
1049 (base32
1050 "03a11clhycyn0jhc7g9davpqd83sn60jqwjy1y145ag9sq6sp935"))))
1051 (build-system ruby-build-system)
1052 (arguments
1053 `(#:phases
1054 (modify-phases %standard-phases
1055 (add-after 'unpack 'disable-failing-tests
1056 ;; TODO: Remove this phase after ghc-pandoc gets upgraded to 2.9.2+
1057 ;; (see: https://github.com/xwmx/pandoc-ruby/issues/39).
1058 (lambda _
1059 (substitute* "test/test_conversions.rb"
1060 (("next if from == to.*" all)
1061 (string-append
1062 all
1063 " next if ['plain', 'beamer'].include? to\n")))
1064 #t))
1065 (add-after 'unpack 'patch-pandoc-path
1066 (lambda* (#:key inputs #:allow-other-keys)
1067 (let ((pandoc (string-append (assoc-ref inputs "ghc-pandoc")
1068 "/bin/pandoc")))
1069 (substitute* "lib/pandoc-ruby.rb"
1070 (("@@pandoc_path = 'pandoc'")
1071 (format #f "@@pandoc_path = '~a'" pandoc)))
1072 (substitute* "test/test_pandoc_ruby.rb"
1073 (("('|\")pandoc" _ quote)
1074 (string-append quote pandoc))
1075 (("\\^pandoc")
1076 ".*pandoc"))
1077 #t)))
1078 (add-after 'extract-gemspec 'remove-Gemfile.lock
1079 (lambda _
1080 (delete-file "Gemfile.lock")
1081 (substitute* "pandoc-ruby.gemspec"
1082 (("Gemfile\\.lock") ""))
1083 #t)))))
1084 (native-inputs
1085 `(("ruby-mocha" ,ruby-mocha)))
1086 (inputs
1087 `(("ghc-pandoc" ,ghc-pandoc)))
1088 (synopsis "Ruby wrapper for Pandoc")
1089 (description "PandocRuby is a wrapper for Pandoc, a Haskell library with
1090command line tools for converting one markup format to another. Pandoc can
1091convert documents from a variety of formats including markdown,
1092reStructuredText, textile, HTML, DocBook, LaTeX, and MediaWiki markup to a
1093variety of other formats, including markdown, reStructuredText, HTML, LaTeX,
1094ConTeXt, PDF, RTF, DocBook XML, OpenDocument XML, ODT, GNU Texinfo, MediaWiki
1095markup, groff man pages, HTML slide shows, EPUB, Microsoft Word docx, and
1096more.")
1097 (home-page "https://github.com/xwmx/pandoc-ruby")
1098 (license license:expat)))
1099
fef0564c
MC
1100(define-public ruby-slim
1101 (package
1102 (name "ruby-slim")
1103 (version "4.1.0")
1104 (source
1105 (origin
1106 (method url-fetch)
1107 (uri (rubygems-uri "slim" version))
1108 (sha256
1109 (base32
1110 "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"))))
1111 (build-system ruby-build-system)
1112 (arguments
1113 `(#:phases
1114 (modify-phases %standard-phases
1115 ;; See: https://github.com/slim-template/slim/issues/857 and
1116 ;; https://github.com/slim-template/slim/issues/858.
1117 (add-after 'unpack 'skip-broken-tests
1118 (lambda _
1119 (substitute* "test/core/test_embedded_engines.rb"
1120 (("def test_render_with_markdown")
1121 "def skipped_test_render_with_markdown"))
1122 (substitute* "test/translator/test_translator.rb"
1123 (("raise (\"Missing test for.*)" _ tail)
1124 (string-append "print " tail)))
1125 #t))
1126 ;; See: https://salsa.debian.org/ruby-team/ruby-slim/-/commit/
1127 ;; 824862bd99d1675bc699d8fc71ba965a785c1f44.
1128 (add-after 'unpack 'prevent-bundler-interference
1129 (lambda _
1130 (substitute* "Rakefile"
1131 (("require 'bundler/setup'") "nil")
1132 (("Bundler::GemHelper\\.install_tasks") "nil"))
1133 #t)))))
1134 (native-inputs
1135 `(("ruby-rack-test" ,ruby-rack-test)
1136 ("ruby-sinatra" ,ruby-sinatra)))
1137 (propagated-inputs
1138 `(("ruby-temple" ,ruby-temple)
1139 ("ruby-tilt" ,ruby-tilt)))
1140 (synopsis "Minimalist template language for Ruby")
1141 (description "Slim is a template language for Ruby that aims to reduce the
1142syntax to the minimum while remaining clear.")
1143 (home-page "http://slim-lang.com/")
1144 (license license:expat)))
1145
34138e42
BW
1146(define-public ruby-asciidoctor
1147 (package
751bf33d 1148 (name "ruby-asciidoctor")
5df1126c 1149 (version "2.0.10")
751bf33d
MC
1150 (source
1151 (origin
5df1126c
MC
1152 (method git-fetch) ;the gem release lacks a Rakefile
1153 (uri (git-reference
b0e7b699 1154 (url "https://github.com/asciidoctor/asciidoctor")
5df1126c
MC
1155 (commit (string-append "v" version))))
1156 (file-name (git-file-name name version))
751bf33d 1157 (sha256
34138e42 1158 (base32
5df1126c 1159 "0jaxpnsdnx3qyjw5p2lsx1swny12q1i2vxw2kgdp4vlsyjv95z95"))))
751bf33d
MC
1160 (build-system ruby-build-system)
1161 (arguments
1162 `(#:test-target "test:all"
1163 #:phases
1164 (modify-phases %standard-phases
5df1126c 1165 (replace 'replace-git-ls-files
751bf33d 1166 (lambda _
5df1126c
MC
1167 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1168 ;; git ls-files output is merged in ruby-build-system.
1169 (substitute* "asciidoctor.gemspec"
1170 (("`git ls-files -z`")
1171 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1172 #t))
1173 (add-after 'extract-gemspec 'strip-version-requirements
1174 (lambda _
1175 (delete-file "Gemfile")
1176 (substitute* "asciidoctor.gemspec"
1177 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
1178 (string-append stripped "\n")))
751bf33d
MC
1179 #t)))))
1180 (native-inputs
5df1126c
MC
1181 `(("ruby-erubis" ,ruby-erubis)
1182 ("ruby-minitest" ,ruby-minitest)
751bf33d
MC
1183 ("ruby-nokogiri" ,ruby-nokogiri)
1184 ("ruby-asciimath" ,ruby-asciimath)
5df1126c
MC
1185 ("ruby-coderay" ,ruby-coderay)
1186 ("ruby-cucumber" ,ruby-cucumber)
1187 ("ruby-haml" ,ruby-haml)
1188 ("ruby-rouge" ,ruby-rouge)
1189 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
1190 ("ruby-simplecov" ,ruby-simplecov)
1191 ("ruby-slim" ,ruby-slim)
1192 ("ruby-tilt" ,ruby-tilt)))
751bf33d
MC
1193 (synopsis "Converter from AsciiDoc content to other formats")
1194 (description "Asciidoctor is a text processor and publishing toolchain for
1195converting AsciiDoc content to HTML5, DocBook 5 (or 4.5), PDF, and other
1196formats.")
1197 (home-page "https://asciidoctor.org")
1198 (license license:expat)))
34138e42 1199
15b188c3
MC
1200(define-public ruby-prawn-icon
1201 (package
1202 (name "ruby-prawn-icon")
1203 (version "2.5.0")
1204 (source
1205 (origin
1206 (method url-fetch)
1207 (uri (rubygems-uri "prawn-icon" version))
1208 (sha256
1209 (base32
1210 "1ivkdf8rdf92hhy97vbmc2a4w97vcvqd58jcj4z9hz3hfsb1526w"))))
1211 (build-system ruby-build-system)
1212 (arguments
1213 `(#:test-target "spec"
1214 #:phases (modify-phases %standard-phases
1215 (add-after 'unpack 'remove-unnecessary-dependencies
1216 (lambda _
1217 (substitute* '("Rakefile" "spec/spec_helper.rb")
1218 ((".*[Bb]undler.*") "")
1219 (("^require 'rubocop.*") "")
1220 (("^RuboCop.*") ""))
1221 #t)))))
1222 (native-inputs
1223 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1224 ("ruby-pdf-reader" ,ruby-pdf-reader)
1225 ("ruby-rspec" ,ruby-rspec)
1226 ("ruby-simplecov" ,ruby-simplecov)))
1227 (propagated-inputs
1228 `(("ruby-prawn" ,ruby-prawn)))
1229 (synopsis "Icon fonts for use with the Prawn PDF toolkit")
1230 (description "@code{Prawn::Icon} provides various icon fonts including
1231FontAwesome, PaymentFont and Foundation Icons for use with the Prawn PDF
1232toolkit.")
1233 (home-page "https://github.com/jessedoyle/prawn-icon/")
1234 (license %prawn-project-licenses)))
1235
2d877f6e
MC
1236(define-public ruby-css-parser
1237 (package
1238 (name "ruby-css-parser")
1239 (version "1.7.1")
1240 (source
1241 (origin
1242 (method url-fetch)
1243 (uri (rubygems-uri "css_parser" version))
1244 (sha256
1245 (base32
1246 "04c4dl8cm5rjr50k9qa6yl9r05fk9zcb1zxh0y0cdahxlsgcydfw"))))
1247 (build-system ruby-build-system)
1248 (arguments `(#:tests? #f)) ;gem doesn't ship with test suite
1249 (propagated-inputs
1250 `(("ruby-addressable" ,ruby-addressable)))
1251 (synopsis "Ruby Cascading Style Sheets (CSS) parser")
1252 (description "This package allows loading, parsing and cascading Cascading
1253Style Sheets (CSS) rule sets in Ruby.")
1254 (home-page "https://github.com/premailer/css_parser")
1255 (license license:expat)))
1256
95692655
MC
1257(define-public ruby-prawn-svg
1258 (package
1259 (name "ruby-prawn-svg")
1260 (version "0.30.0")
1261 (source
1262 (origin
1263 (method url-fetch)
1264 (uri (rubygems-uri "prawn-svg" version))
1265 (sha256
1266 (base32
1267 "0df3l49cy3xpwi0b73hmi2ykbjg9kjwrvhk0k3z7qhh5ghmmrn77"))))
1268 (build-system ruby-build-system)
1269 (arguments
1270 `(#:phases (modify-phases %standard-phases
1271 (add-after 'unpack 'do-not-use-bundler
1272 (lambda _
1273 (substitute* "spec/spec_helper.rb"
1274 ((".*[Bb]undler.*") ""))
1275 #t))
1276 (replace 'check
1277 (lambda* (#:key tests? #:allow-other-keys)
1278 (when tests?
1279 (invoke "rspec" "-Ilib" "-rprawn-svg"))
1280 #t)))))
1281 (native-inputs
1282 `(("ruby-rspec" ,ruby-rspec)))
1283 (propagated-inputs
1284 `(("ruby-css-parser" ,ruby-css-parser)
1285 ("ruby-prawn" ,ruby-prawn)))
1286 (synopsis "SVG renderer for the Prawn PDF library")
1287 (description "This library allows rendering Scalable Vector Graphics (SVG)
1288graphics directly into a Portable Document Format (PDF) document using the
1289Prawn module.")
1290 (home-page "https://github.com/mogest/prawn-svg")
1291 (license license:expat)))
1292
ce52f2b1
MC
1293(define-public ruby-prawn-templates
1294 (package
1295 (name "ruby-prawn-templates")
1296 (version "0.1.2")
1297 (source
1298 (origin
1299 (method git-fetch)
1300 (uri (git-reference
1301 (url "https://github.com/prawnpdf/prawn-templates.git")
1302 (commit version)))
1303 (file-name (git-file-name name version))
1304 (sha256
1305 (base32
1306 "0wll54wxxwixpwazfn4ffbqvqbfrl01cfsv8y11vnlzy7isx5xvl"))))
1307 (build-system ruby-build-system)
1308 (arguments
1309 `(#:phases (modify-phases %standard-phases
1310 (add-after 'unpack 'do-not-use-bundler
1311 (lambda _
1312 (substitute* "spec/spec_helper.rb"
1313 ((".*[Bb]undler.*") ""))
1314 #t))
1315 (replace 'check
1316 (lambda* (#:key tests? #:allow-other-keys)
1317 (when tests?
1318 (invoke "rspec"))
1319 #t)))))
1320 (native-inputs
1321 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
1322 ("ruby-rspec" ,ruby-rspec)))
1323 (propagated-inputs
1324 `(("ruby-pdf-reader" ,ruby-pdf-reader)
1325 ("ruby-prawn" ,ruby-prawn)))
1326 (synopsis "Prawn extension to include or combine PDF documents")
1327 (description "This @strong{unmaintained} package provides a Prawn
1328extension that allows including other Portable Document Format (PDF) documents
1329as background or combining several PDF documents into one. This functionality
1330used to be part of Prawn itself, but was extracted from Prawn 0.15.0 because
1331of its many longstanding issues.")
1332 (home-page "https://github.com/prawnpdf/prawn-templates")
1333 (license %prawn-project-licenses)))
1334
f949b60e
MC
1335(define-public ruby-polyglot
1336 (package
1337 (name "ruby-polyglot")
1338 (version "0.3.5")
1339 (source
1340 (origin
1341 (method url-fetch)
1342 (uri (rubygems-uri "polyglot" version))
1343 (sha256
1344 (base32
1345 "1bqnxwyip623d8pr29rg6m8r0hdg08fpr2yb74f46rn1wgsnxmjr"))))
1346 (build-system ruby-build-system)
1347 (arguments `(#:tests? #f)) ;no test suite
1348 (synopsis "Augment @code{require} to load non-Ruby file types")
1349 (description "The Polyglot library allows a Ruby module to register a
1350loader for the file type associated with a filename extension, and it augments
1351@code{require} to find and load matching files.")
1352 (home-page "https://github.com/cjheath/polyglot")
1353 (license license:expat)))
1354
1f183ca0
MC
1355(define-public ruby-treetop
1356 (package
1357 (name "ruby-treetop")
1358 (version "1.6.10")
1359 (source
1360 (origin
1361 (method git-fetch) ;no test suite in distributed gem
1362 (uri (git-reference
1363 (url "https://github.com/cjheath/treetop.git")
1364 (commit (string-append "v" version))))
1365 (file-name (git-file-name name version))
1366 (sha256
1367 (base32
1368 "1dmk94z6ivhrz5hsq68vl5vgydhkz89n394rha1ymddw3rymbfcv"))))
1369 (build-system ruby-build-system)
1370 (arguments
1371 `(#:test-target "spec"
1372 #:phases
1373 (modify-phases %standard-phases
1374 (replace 'replace-git-ls-files
1375 (lambda _
1376 ;; TODO: Remove after the fix of using 'cut' to better mimic the
1377 ;; git ls-files output is merged in ruby-build-system.
1378 (substitute* "treetop.gemspec"
1379 (("`git ls-files -z`")
1380 "`find . -type f -print0 |sort -z|cut -zc3-`"))
1381 #t)))))
1382 (native-inputs
1383 `(("ruby-activesupport" ,ruby-activesupport)
1384 ("ruby-rr" ,ruby-rr)
1385 ("ruby-rspec" ,ruby-rspec)))
1386 (propagated-inputs
1387 `(("ruby-polyglot" ,ruby-polyglot)))
1388 (synopsis "Ruby-based parsing DSL based on parsing expression grammars")
1389 (description "This package provides a Ruby-based Parsing Expression
1390Grammar (PEG) parser generator Domain Specific Language (DSL).")
1391 (home-page "https://github.com/cjheath/treetop")
1392 (license license:expat)))
1393
d5840f77
CB
1394(define-public ruby-ast
1395 (package
1396 (name "ruby-ast")
1397 (version "2.4.0")
1398 (source
1399 (origin
1400 (method url-fetch)
1401 (uri (rubygems-uri "ast" version))
1402 (sha256
1403 (base32
1404 "184ssy3w93nkajlz2c70ifm79jp3j737294kbc5fjw69v1w0n9x7"))))
1405 (build-system ruby-build-system)
1406 (arguments
1407 '(#:phases
1408 (modify-phases %standard-phases
1409 (add-after 'unpack 'remove-coveralls-requirement
1410 (lambda _
1411 (substitute* "test/helper.rb"
1412 (("require 'coveralls'") "")
1413 (("Coveralls::SimpleCov::Formatter") ""))
1414 #t))
1415 (add-after 'extract-gemspec 'remove-unnecessary-requirements
1416 (lambda _
1417 (substitute* "ast.gemspec"
1418 ((".*coveralls.*") "\n")
1419 (("%q<rest-client>.*") "%q<rest-client>.freeze, [\">= 0\"])\n")
1420 (("%q<mime-types>.*") "%q<mime-types>.freeze, [\">= 0\"])\n")
1421 (("%q<rake>.*") "%q<rake>.freeze, [\">= 0\"])\n"))
1422 #t)))))
1423 (native-inputs
1424 `(("bundler" ,bundler)
1425 ("ruby-simplecov" ,ruby-simplecov)
1426 ("ruby-json-pure" ,ruby-json-pure)
1427 ("ruby-mime-times" ,ruby-mime-types)
1428 ("ruby-yard" ,ruby-yard)
1429 ("ruby-kramdown" ,ruby-kramdown)
1430 ("ruby-rest-client" ,ruby-rest-client)
1431 ("ruby-bacon" ,ruby-bacon)
1432 ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
1433 ("ruby-racc" ,ruby-racc)))
1434 (synopsis "Library for working with Abstract Syntax Trees")
1435 (description
1436 "@code{ast} is a Ruby library for working with Abstract Syntax Trees.
1437It does this through immutable data structures.")
1438 (home-page "https://whitequark.github.io/ast/")
1439 (license license:expat)))
1440
b88502c9
BW
1441(define-public ruby-sporkmonger-rack-mount
1442 ;; Testing the addressable gem requires a newer commit than that released, so
1443 ;; use an up to date version.
1444 (let ((revision "1")
1445 (commit "076aa2c47d9a4c081f1e9bcb56a826a9e72bd5c3"))
1446 (package
1447 (name "ruby-sporkmonger-rack-mount")
1448 (version (git-version "0.8.3" revision commit))
1449 (source (origin
1450 (method git-fetch)
1451 (uri (git-reference
b0e7b699 1452 (url "https://github.com/sporkmonger/rack-mount")
b88502c9
BW
1453 (commit commit)))
1454 (file-name (git-file-name name version))
1455 (sha256
1456 (base32
1457 "1scx273g3xd93424x9lxc4zyvcp2niknbw5mkz6wkivpf7xsyxdq"))))
1458 (build-system ruby-build-system)
1459 (arguments
1460 ;; Tests currently fail so disable them.
1461 ;; https://github.com/sporkmonger/rack-mount/pull/1
1462 `(#:tests? #f))
1463 (propagated-inputs `(("ruby-rack" ,ruby-rack)))
1464 (synopsis "Stackable dynamic tree based Rack router")
1465 (description
1466 "@code{Rack::Mount} supports Rack's @code{X-Cascade} convention to
1467continue trying routes if the response returns pass. This allows multiple
1468routes to be nested or stacked on top of each other.")
1469 (home-page "https://github.com/sporkmonger/rack-mount")
1470 (license license:expat))))
1471
2f9e0b68
RW
1472(define-public ruby-ci-reporter
1473 (package
1474 (name "ruby-ci-reporter")
1475 (version "2.0.0")
1476 (source (origin
1477 (method url-fetch)
1478 (uri (rubygems-uri "ci_reporter" version))
1479 (sha256
1480 (base32
1481 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
1482 (build-system ruby-build-system)
1483 (arguments
1484 `(#:test-target "rspec"))
1485 (propagated-inputs
1486 `(("ruby-builder" ,ruby-builder)))
1487 (native-inputs
1488 `(("bundler" ,bundler)
1489 ("ruby-rspec" ,ruby-rspec)))
1490 (synopsis "Generate XML reports of runs test")
1491 (description
1492 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
1493you to generate XML reports of your test runs. The resulting files can be
1494read by a continuous integration system that understands Ant's JUnit report
1495format.")
1496 (home-page "https://github.com/nicksieger/ci_reporter")
1497 (license license:expat)))
1498
2ed201c1
CB
1499(define-public ruby-contracts
1500 (package
1501 (name "ruby-contracts")
1502 (version "0.16.0")
1503 (source
1504 (origin
1505 (method url-fetch)
1506 (uri (rubygems-uri "contracts" version))
1507 (sha256
1508 (base32
1509 "119f5p1n6r5svbx8h09za6a4vrsnj5i1pzr9cqdn9hj3wrxvyl3a"))))
1510 (build-system ruby-build-system)
1511 (arguments
1512 '(#:test-target "spec"
1513 #:phases
1514 (modify-phases %standard-phases
1515 ;; Don't run or require rubocop, the code linting tool, as this is a
1516 ;; bit unnecessary.
1517 (add-after 'unpack 'dont-run-rubocop
1518 (lambda _
1519 (substitute* "Rakefile"
1520 ((".*rubocop.*") "")
1521 ((".*RuboCop.*") ""))
1522 #t)))))
1523 (native-inputs
1524 `(("ruby-rspec" ,ruby-rspec)))
1525 (synopsis "Method contracts for Ruby")
1526 (description
1527 "This library provides contracts for Ruby. A contract describes the
1528correct inputs and output for a method, and will raise an error if a incorrect
1529value is found.")
1530 (home-page "https://github.com/egonSchiele/contracts.ruby")
1531 (license license:bsd-2)))
1532
6f8bf0eb
CB
1533(define-public ruby-crack
1534 (package
1535 (name "ruby-crack")
1536 (version "0.4.3")
1537 (source
1538 (origin
1539 (method url-fetch)
1540 (uri (rubygems-uri "crack" version))
1541 (sha256
1542 (base32
1543 "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
1544 (build-system ruby-build-system)
1545 (arguments
1546 `(#:phases
1547 (modify-phases %standard-phases
1548 (replace 'check
1549 (lambda* (#:key tests? #:allow-other-keys)
1550 (when tests?
1551 (for-each (lambda (file)
1552 (display file)(display "\n")
1553 (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
1554 (find-files "test" ".*rb$")))
1555 #t)))))
1556 (propagated-inputs
1557 `(("ruby-safe-yaml" ,ruby-safe-yaml)))
1558 (synopsis "Simple JSON and XML parsing for Ruby")
1559 (description
1560 "@code{crack} provides really simple JSON and XML parsing, extracted from
1561code in Merb and Rails.")
1562 (home-page "https://github.com/jnunemaker/crack")
1563 (license license:expat)))
1564
bef3506e
CB
1565(define-public ruby-cliver
1566 (package
1567 (name "ruby-cliver")
1568 (version "0.3.2")
1569 (source
1570 (origin
1571 (method url-fetch)
1572 (uri (rubygems-uri "cliver" version))
1573 (sha256
1574 (base32
1575 "096f4rj7virwvqxhkavy0v55rax10r4jqf8cymbvn4n631948xc7"))))
1576 (build-system ruby-build-system)
1577 (arguments
1578 '(#:phases
1579 (modify-phases %standard-phases
1580 ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
1581 ;; would be nice, but the tests look to be incompatible:
1582 ;;
1583 ;; NoMethodError: undefined method `last_comment'
1584 (replace 'check
1585 (lambda* (#:key tests? #:allow-other-keys)
1586 (when tests?
1587 (invoke "rspec"))
1588 #t)))))
1589 (native-inputs
1590 `(("bundler" ,bundler)
1591 ("ruby-rspec" ,ruby-rspec-2)))
1592 (synopsis "Assertions for command-line dependencies in Ruby")
1593 (description
1594 "@code{cliver} provides a way to detect missing command-line
1595dependencies, including versions.")
1596 (home-page "https://github.com/yaauie/cliver")
1597 (license license:expat)))
1598
fe5dd5f4
CB
1599(define-public ruby-czmq-ffi-gen
1600 (package
1601 (name "ruby-czmq-ffi-gen")
1602 (version "0.13.0")
1603 (source
1604 (origin
1605 (method url-fetch)
1606 (uri (rubygems-uri "czmq-ffi-gen" version))
1607 (sha256
1608 (base32
1609 "1yf719dmf4mwks1hqdsy6i5kzfvlsha69sfnhb2fr2cgk2snbys3"))))
1610 (build-system ruby-build-system)
1611 (arguments
1612 '(#:tests? #f ;; Tests are not included in the release on rubygems.org
1613 #:phases
1614 (modify-phases %standard-phases
1615 (add-after 'unpack 'patch-lib_dirs
1616 (lambda* (#:key inputs #:allow-other-keys)
1617 (substitute* "lib/czmq-ffi-gen/czmq/ffi.rb"
1618 (("lib\\_dirs = \\[.*\\]")
1619 (string-append "lib_dirs = ['"
1620 (assoc-ref inputs "czmq") "/lib"
1621 "']")))
1622 (substitute* "lib/czmq-ffi-gen/libzmq.rb"
1623 (("lib\\_dirs = \\[.*\\]")
1624 (string-append "lib_dirs = ['"
1625 (assoc-ref inputs "zeromq") "/lib"
1626 "']"))))))))
1627 (inputs
1628 `(("zeromq" ,zeromq)
1629 ("czmq" ,czmq)))
1630 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
1631 (synopsis "Low-level Ruby bindings for CZMQ (generated using zproject)")
1632 (description
1633 "These Ruby bindings are not intended to be directly used, but rather
1634used by higher level bindings like those provided by CZTop.")
1635 (home-page
1636 "https://github.com/paddor/czmq-ffi-gen")
1637 (license license:isc)))
1638
d0afff26
CB
1639(define-public ruby-cztop
1640 (package
1641 (name "ruby-cztop")
1642 (version "0.12.2")
1643 (source
1644 (origin
1645 (method url-fetch)
1646 (uri (rubygems-uri "cztop" version))
1647 (sha256
1648 (base32
1649 "0yqbpaiw5d7f271d73lyrsh8xpx6n4zi6xqwfgi00dacxrq3s3fa"))))
1650 (build-system ruby-build-system)
1651 (arguments
1652 '(#:test-target "spec"
1653 #:phases
1654 (modify-phases %standard-phases
1655 (add-after 'unpack 'patch-lib_paths
1656 (lambda* (#:key inputs #:allow-other-keys)
1657 (substitute* "lib/cztop/poller/zmq.rb"
1658 (("lib\\_paths = \\[.*\\]")
1659 (string-append "lib_paths = ['"
1660 (assoc-ref inputs "zeromq") "/lib"
1661 "']"))))))))
1662 (native-inputs
1663 `(("bundler" ,bundler)
1664 ("ruby-rspec" ,ruby-rspec)))
1665 (inputs
1666 `(("zeromq" ,zeromq)))
1667 (propagated-inputs
1668 `(("ruby-czmq-ffi-gen" ,ruby-czmq-ffi-gen)))
1669 (synopsis "CZMQ Ruby bindings")
1670 (description
1671 "CZMQ Ruby bindings, based on the generated low-level FFI bindings of
1672CZMQ. The focus of of CZTop is on being easy to use and providing first class
1673support for security mechanisms.")
1674 (home-page "https://github.com/paddor/cztop")
1675 (license license:isc)))
1676
b004fb6a
RW
1677(define-public ruby-saikuro-treemap
1678 (package
1679 (name "ruby-saikuro-treemap")
1680 (version "0.2.0")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (rubygems-uri "saikuro_treemap" version))
1684 (sha256
1685 (base32
1686 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
1687 (build-system ruby-build-system)
1688 ;; Some of the tests fail because the generated JSON has keys in a
1689 ;; different order. This is a problem with the test suite rather than any
1690 ;; of the involved libraries.
1691 (arguments `(#:tests? #f))
1692 (propagated-inputs
1693 `(("ruby-json-pure" ,ruby-json-pure)
1694 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
1695 (synopsis "Generate complexity treemap based on saikuro analysis")
1696 (description
1697 "This gem generates a treemap showing the complexity of Ruby code on
1698which it is run. It uses Saikuro under the covers to analyze Ruby code
1699complexity.")
7bf837fd 1700 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
b004fb6a
RW
1701 (license license:expat)))
1702
92b37500
CB
1703(define-public ruby-oauth2
1704 (package
1705 (name "ruby-oauth2")
5dd10be5 1706 (version "1.4.2")
92b37500
CB
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (rubygems-uri "oauth2" version))
1711 (sha256
5dd10be5 1712 (base32 "15i9z4j5pcjkr30lkcd79xzbr4kpmy0bqgwa436fqyqk646fv036"))))
92b37500
CB
1713 (build-system ruby-build-system)
1714 (arguments
5dd10be5 1715 '(#:tests? #f)) ; no included tests
92b37500
CB
1716 (propagated-inputs
1717 `(("ruby-faraday" ,ruby-faraday)
1718 ("ruby-jwt" ,ruby-jwt)
1719 ("ruby-multi-json" ,ruby-multi-json)
1720 ("ruby-multi-xml" ,ruby-multi-xml)
1721 ("ruby-rack" ,ruby-rack)))
1722 (synopsis "Ruby wrapper for the OAuth 2.0")
1723 (description
1724 "This package provides a Ruby wrapper for the OAuth 2.0 protocol built
1725with a similar style to the original OAuth spec.")
1726 (home-page "https://github.com/oauth-xx/oauth2")
1727 (license license:expat)))
1728
29dc4823
CB
1729(define-public ruby-omniauth
1730 (package
1731 (name "ruby-omniauth")
a7b7817d 1732 (version "1.9.1")
29dc4823
CB
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (rubygems-uri "omniauth" version))
1737 (sha256
a7b7817d 1738 (base32 "002vi9gwamkmhf0dsj2im1d47xw2n1jfhnzl18shxf3ampkqfmyz"))))
29dc4823
CB
1739 (build-system ruby-build-system)
1740 (arguments
1741 '(#:tests? #f)) ; No included tests
1742 (propagated-inputs
1743 `(("ruby-hashie" ,ruby-hashie)
1744 ("ruby-rack" ,ruby-rack)))
1745 (synopsis "Generalized Rack framework for multiple-provider authentication")
1746 (description
1747 "This package provides a generalized Rack framework for multiple-provider
1748authentication.")
1749 (home-page "https://github.com/omniauth/omniauth")
1750 (license license:expat)))
1751
d6084cdb
CB
1752(define-public ruby-omniauth-oauth2
1753 (package
1754 (name "ruby-omniauth-oauth2")
1755 (version "1.6.0")
1756 (source
1757 (origin
1758 (method url-fetch)
1759 (uri (rubygems-uri "omniauth-oauth2" version))
1760 (sha256
1761 (base32
1762 "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
1763 (build-system ruby-build-system)
1764 (arguments
1765 '(#:phases
1766 (modify-phases %standard-phases
1767 (add-after 'unpack 'remove-unnecessary-dependencies
1768 (lambda _
1769 ;; The coveralls gem submits coverage information to an online
1770 ;; service, and is unnecessary when running the tests
1771 (substitute* "Gemfile"
1772 ((".*coveralls\"") ""))
1773 (substitute* "spec/helper.rb"
1774 (("require \"coveralls\"") "")
1775 (("Coveralls::SimpleCov::Formatter") ""))
1776 #t)))))
1777 (propagated-inputs
1778 `(("ruby-oauth2" ,ruby-oauth2)
1779 ("ruby-omniauth" ,ruby-omniauth)))
1780 (native-inputs
1781 `(("bundler" ,bundler)
1782 ("ruby-rspec" ,ruby-rspec)
1783 ("ruby-simplecov" ,ruby-simplecov)
1784 ("ruby-rack-test" ,ruby-rack-test)
1785 ("ruby-webmock" ,ruby-webmock-2)))
1786 (synopsis "Abstract OAuth2 strategy for OmniAuth")
1787 (description
1788 "This library provides a generic OAuth2 strategy for OmniAuth. It
1789doesn't provide a way to gather user information, so should be used as a
1790building block for authentication strategies.")
1791 (home-page "https://github.com/omniauth/omniauth-oauth2")
1792 (license license:expat)))
1793
433e3154
CB
1794(define-public ruby-open4
1795 (package
1796 (name "ruby-open4")
1797 (version "1.3.4")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (rubygems-uri "open4" version))
1802 (sha256
1803 (base32
1804 "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1"))))
1805 (build-system ruby-build-system)
1806 (arguments
1807 '(#:phases
1808 (modify-phases %standard-phases
1809 (add-after 'unpack 'patch
1810 (lambda _
1811 (substitute* "rakefile"
1812 ;; Update the Rakefile so it works
1813 (("-rubygems") "-rrubygems")
1814 (("Config") "RbConfig"))
1815 #t))
1816 (add-before 'check 'set-LIB
1817 (lambda _
1818 ;; This is used in the rakefile when running the tests
1819 (setenv "LIB" "open4")
1820 #t)))))
1821 (synopsis "Open child processes from Ruby and manage them easily")
1822 (description
1823 "@code{Open4} is a Ruby library to run child processes and manage their
1824input and output.")
1825 (home-page "https://github.com/ahoward/open4")
1826 (license license:ruby)))
1827
cef87ed6
CB
1828(define-public ruby-options
1829 (package
1830 (name "ruby-options")
1831 (version "2.3.2")
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (rubygems-uri "options" version))
1836 (sha256
1837 (base32
1838 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
1839 (build-system ruby-build-system)
1840 (arguments
1841 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
1842 #:phases
1843 (modify-phases %standard-phases
1844 (add-before 'check 'set-LIB
1845 (lambda _
1846 ;; This is used in the Rakefile, and setting it avoids an issue
1847 ;; with running the tests.
fe27238c
CB
1848 (setenv "LIB" "options")
1849 #t)))))
cef87ed6
CB
1850 (synopsis "Ruby library to parse options from *args cleanly")
1851 (description
1852 "The @code{options} library helps with parsing keyword options in Ruby
1853functions.")
1854 (home-page "https://github.com/ahoward/options")
1855 (license license:ruby)))
1856
d15dbe83
CB
1857(define-public ruby-erubi
1858 (package
1859 (name "ruby-erubi")
1860 (version "1.8.0")
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (rubygems-uri "erubi" version))
1865 (sha256
1866 (base32
1867 "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"))))
1868 (build-system ruby-build-system)
1869 (synopsis "ERB template engine for Ruby")
1870 (description
1871 "Erubi is a ERB template engine for Ruby. It is a simplified fork of
1872Erubis")
1873 (home-page "https://github.com/jeremyevans/erubi")
1874 (license license:expat)))
1875
d64ebebd
BW
1876(define-public ruby-erubis
1877 (package
1878 (name "ruby-erubis")
1879 (version "2.7.0")
1880 (source
1881 (origin
1882 (method url-fetch)
1883 (uri (rubygems-uri "erubis" version))
1884 (sha256
1885 (base32
1886 "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"))))
1887 (build-system ruby-build-system)
1888 (arguments
1889 '(#:tests? #f)) ; tests do not run properly with Ruby 2.0
1890 (synopsis "Implementation of embedded Ruby (eRuby)")
1891 (description
1892 "Erubis is a fast implementation of embedded Ruby (eRuby) with several
1893features such as multi-language support, auto escaping, auto trimming spaces
1894around @code{<% %>}, a changeable embedded pattern, and Ruby on Rails
1895support.")
1896 (home-page "http://www.kuwata-lab.com/erubis/")
1897 (license license:expat)))
1898
3ca43524
CB
1899(define-public ruby-execjs
1900 (package
1901 (name "ruby-execjs")
1902 (version "2.7.0")
1903 (source
1904 (origin
1905 ;; fetch from github as the gem does not contain testing code
1906 (method git-fetch)
1907 (uri (git-reference
b0e7b699 1908 (url "https://github.com/rails/execjs")
3ca43524
CB
1909 (commit (string-append "v" version))))
1910 (file-name (git-file-name name version))
1911 (sha256
1912 (base32
1913 "0c0vd2mmqq3ar4plbwi2wsbr31vn4h45i19r5km66skydnnbp1y6"))))
1914 (build-system ruby-build-system)
1915 (native-inputs
1916 `(("bundler" ,bundler)
1917 ;; The test suite tests all the available backends. Currenly, this just
1918 ;; means the node backend.
1919 ;;
1920 ;; PASSED: test:node
1921 ;; SKIPPED: test:duktape, ;; test:javascriptcore, test:jscript,
1922 ;; test:miniracer, test:rubyracer, ;; test:rubyrhino, test:v8
1923 ("node" ,node)))
1924 (synopsis "Run JavaScript code from Ruby")
1925 (description
1926 "ExecJS lets you run JavaScript code from Ruby. It automatically picks a
1927runtime to evaluate your JavaScript program, then returns the result to you as
1928a Ruby object.")
1929 (home-page "https://github.com/rails/execjs")
1930 (license license:expat)))
1931
6623a151
MB
1932(define-public ruby-fakefs
1933 (package
1934 (name "ruby-fakefs")
1935 (version "1.2.2")
1936 (home-page "https://github.com/fakefs/fakefs")
1937 (source (origin
1938 ;; The Rubygems release does not contain tests.
1939 (method git-fetch)
1940 (uri (git-reference
1941 (url home-page)
1942 (commit (string-append "v" version))))
1943 (file-name (git-file-name name version))
1944 (sha256
1945 (base32
1946 "008dq9knyip2bfbl0mrk8b8r7bv0k3bf128wcfqsgy1rqal4mgwk"))))
1947 (build-system ruby-build-system)
1948 (arguments
1949 '(#:phases (modify-phases %standard-phases
1950 (replace 'replace-git-ls-files
1951 (lambda _
1952 (substitute* "fakefs.gemspec"
1953 (("`git ls-files lib README.md LICENSE`")
1954 "`find lib README.md LICENSE -type f | sort`"))
1955 #t))
1956 (add-before 'check 'remove-version-constraints
1957 (lambda _
1958 ;; Drop hard version requirements for test dependencies.
1959 (substitute* "fakefs.gemspec"
1960 (("(.*add_development_dependency .*), .*" _ dep)
1961 (string-append dep "\n")))
a011f67b 1962 #t)))))
6623a151
MB
1963 (native-inputs
1964 `(("ruby-bump" ,ruby-bump)
1965 ("ruby-maxitest" ,ruby-maxitest)
1966 ("ruby-rubocop" ,ruby-rubocop)
1967 ("ruby-rspec" ,ruby-rspec)))
1968 (synopsis "Fake file system for Ruby")
1969 (description
1970 "This package provides a fake file system for use in test suites. It
1971avoids the need for manually creating temporary directories, or dealing
1972with platform intricacies in @code{File} and @code{FileUtils}.")
1973 (license license:expat)))
1974
cc53e630
RW
1975(define-public ruby-orderedhash
1976 (package
1977 (name "ruby-orderedhash")
1978 (version "0.0.6")
1979 (source (origin
1980 (method url-fetch)
1981 (uri (rubygems-uri "orderedhash" version))
1982 (sha256
1983 (base32
1984 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
1985 (build-system ruby-build-system)
1986 (arguments
1987 '(#:tests? #f)) ; no test suite
1988 (synopsis "Ruby library providing an order-preserving hash")
1989 (description "Orderedhash is a Ruby library providing a hash
1990implementation that preserves the order of items and features some array-like
1991extensions.")
1992 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
1993 (license license:public-domain)))
1994
28c5d42d
PP
1995(define-public ruby-libxml
1996 (package
1997 (name "ruby-libxml")
acbc5062 1998 (version "3.0.0")
28c5d42d
PP
1999 (source
2000 (origin
2001 (method url-fetch)
2002 (uri (rubygems-uri "libxml-ruby" version))
2003 (sha256
2004 (base32
acbc5062 2005 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
28c5d42d
PP
2006 (build-system ruby-build-system)
2007 (inputs
2008 `(("zlib" ,zlib)
2009 ("libxml2" ,libxml2)))
2010 (arguments
2011 '(#:tests? #f ; test suite hangs for unknown reason
2012 #:gem-flags
2013 (list "--"
2014 (string-append "--with-xml2-include="
2015 (assoc-ref %build-inputs "libxml2")
2016 "/include/libxml2" ))))
2017 (synopsis "Ruby bindings for GNOME Libxml2")
2018 (description "The Libxml-Ruby project provides Ruby language bindings for
2019the GNOME Libxml2 XML toolkit.")
2f3800e5 2020 (home-page "https://xml4r.github.com/libxml-ruby")
28c5d42d
PP
2021 (license license:expat)))
2022
b3222518
CB
2023(define-public ruby-lino
2024 (package
2025 (name "ruby-lino")
2026 (version "1.1.0")
2027 (source
2028 (origin
2029 (method url-fetch)
2030 (uri (rubygems-uri "lino" version))
2031 (sha256
2032 (base32
2033 "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
2034 (build-system ruby-build-system)
2035 (arguments
2036 '(#:tests? #f)) ; No included tests
2037 (propagated-inputs
2038 `(("ruby-hamster" ,ruby-hamster)
2039 ("ruby-open4" ,ruby-open4)))
2040 (synopsis "Build and execute commands in Ruby")
2041 (description
2042 "@code{Lino} provides an interface to run external commands. It provides
2043an interface to add options as well as managing the standard input, output and
2044error streams.")
2045 (home-page "https://github.com/tobyclemson/lino")
2046 (license license:expat)))
2047
8b9bde07
RW
2048(define-public ruby-xml-simple
2049 (package
2050 (name "ruby-xml-simple")
2051 (version "1.1.5")
2052 (source (origin
2053 (method url-fetch)
2054 (uri (rubygems-uri "xml-simple" version))
2055 (sha256
2056 (base32
2057 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
2058 (build-system ruby-build-system)
2059 (arguments
2060 '(#:tests? #f)) ; no test suite
2061 (synopsis "Simple Ruby library for XML processing")
2062 (description "This library provides a simple API for XML processing in
2063Ruby.")
2064 (home-page "https://github.com/maik/xml-simple")
2065 (license license:ruby)))
2066
2cb3ab48
RW
2067(define-public ruby-thor
2068 (package
2069 (name "ruby-thor")
bb719d6a 2070 (version "1.0.1")
2cb3ab48 2071 (source (origin
bb719d6a
MB
2072 ;; Pull from git because the gem has no tests.
2073 (method git-fetch)
2074 (uri (git-reference
2075 (url "https://github.com/erikhuda/thor")
2076 (commit (string-append "v" version))))
2077 (file-name (git-file-name name version))
2cb3ab48
RW
2078 (sha256
2079 (base32
bb719d6a 2080 "1anrx5vynk57hn5c8ig5pgkmcsbj9q5mvckd5rviw1jid7n89k57"))))
2cb3ab48
RW
2081 (build-system ruby-build-system)
2082 (arguments
bb719d6a
MB
2083 '(#:phases (modify-phases %standard-phases
2084 (add-after 'unpack 'fix-readline-tests
2085 (lambda _
2086 ;; Ensure Readline is initialized before running the
2087 ;; test to avoid a type clash with the mock ::Readline.
2088 ;; See <https://github.com/erikhuda/thor/pull/717>.
2089 (substitute* "spec/line_editor/readline_spec.rb"
2090 (("unless defined\\? ::Readline" all)
2091 (string-append "Thor::LineEditor::Readline.available?\n"
2092 all)))
2093 #t))
2094 (add-after 'unpack 'remove-coveralls-dependency
2095 (lambda _
2096 ;; Do not hook the test suite into the online
2097 ;; coveralls service.
2098 (substitute* "Gemfile"
2099 ((".*coveralls.*") ""))
2100 (substitute* "spec/helper.rb"
2101 (("require \"coveralls\"") "")
2102 (("Coveralls::SimpleCov::Formatter") "")
2103 ;; Also drop the WebMock dependency which is only
2104 ;; present to allow a coveralls.io connection, and
2105 ;; would otherwise introduce a circular dependency.
2106 (("require \"webmock/rspec\"") "")
2107 (("WebMock\\.disable_net_connect.*") ""))
2108 #t))
2109 (add-after 'unpack 'disable-network-tests
2110 (lambda _
2111 ;; These tests attempt to look up example.com.
2112 (substitute* "spec/actions/file_manipulation_spec.rb"
2113 (("it \"accepts (https?) remote sources" _ proto)
2114 (string-append "xit \"accepts " proto " remote sources")))
2115 #t))
2116 (add-after 'unpack 'disable-quality-tests
2117 (lambda _
2118 ;; These tests attempt to check the git repository for
2119 ;; tabs vs spaces, double vs single quotes, etc, and
2120 ;; depend on the git checkout.
2121 (delete-file "spec/quality_spec.rb")
2122 #t))
2123 (add-before 'check 'make-files-writable
2124 (lambda _
2125 ;; The tests needs rw access to the test suite.
2126 (for-each make-file-writable (find-files "spec"))
2127 #t))
2128 (replace 'check
2129 (lambda _
2130 (invoke "rspec" "spec"))))))
2cb3ab48 2131 (native-inputs
bb719d6a
MB
2132 `(("ruby-rspec" ,ruby-rspec)
2133 ("ruby-simplecov" ,ruby-simplecov)))
2cb3ab48
RW
2134 (synopsis "Ruby toolkit for building command-line interfaces")
2135 (description "Thor is a toolkit for building powerful command-line
2136interfaces.")
2137 (home-page "http://whatisthor.com/")
2138 (license license:expat)))
2139
ec79018e
RW
2140(define-public ruby-lumberjack
2141 (package
2142 (name "ruby-lumberjack")
41700efa 2143 (version "1.0.13")
ec79018e
RW
2144 (source (origin
2145 (method url-fetch)
2146 (uri (rubygems-uri "lumberjack" version))
2147 (sha256
2148 (base32
41700efa 2149 "06im7gcg42x77yhz2w5da2ly9xz0n0c36y5ks7xs53v0l9g0vf5n"))))
ec79018e
RW
2150 (build-system ruby-build-system)
2151 (native-inputs
8be62d3f
BW
2152 `(("ruby-rspec" ,ruby-rspec)
2153 ("ruby-timecop" ,ruby-timecop)))
ec79018e
RW
2154 (synopsis "Logging utility library for Ruby")
2155 (description "Lumberjack is a simple logging utility that can be a drop in
2156replacement for Logger or ActiveSupport::BufferedLogger. It provides support
2157for automatically rolling log files even with multiple processes writing the
2158same log file.")
7bf837fd 2159 (home-page "https://github.com/bdurand/lumberjack")
ec79018e
RW
2160 (license license:expat)))
2161
2a9ce5cb
CB
2162(define-public ruby-rbnacl
2163 (package
2164 (name "ruby-rbnacl")
2165 (version "6.0.1")
2166 (source
2167 (origin
2168 (method url-fetch)
2169 (uri (rubygems-uri "rbnacl" version))
2170 (sha256
2171 (base32
2172 "0ajxy5kj2jw09wdsla3jmha8w07vj5l14288xr9djpl327g3lzhn"))))
2173 (build-system ruby-build-system)
2174 (arguments
2175 `(#:phases
2176 (modify-phases %standard-phases
2177 (add-after 'unpack 'remove-unnecessary-dependencies
2178 (lambda _
2179 ;; Coveralls relates to a network service, and Rubocop to code
2180 ;; linting and both are unnecessary to run the tests
2181 (substitute* "Gemfile"
2182 ((".*rubocop.*") "\n")
2183 ((".*guard-rspec.*") "\n")
2184 ((".*coveralls.*") "\n"))
2185 (substitute* "spec/spec_helper.rb"
2186 (("require \"coveralls\"") "")
2187 (("Coveralls.wear!") ""))
2188 #t))
2189 (add-after 'unpack 'use-libsodium-from-store
2190 (lambda* (#:key inputs #:allow-other-keys)
2191 (substitute* '("lib/rbnacl/init.rb"
2192 "lib/rbnacl/sodium.rb")
2193 (("ffi_lib \\[.+\\]")
2194 (string-append "ffi_lib [\""
2195 (assoc-ref inputs "libsodium") "/lib/libsodium.so"
2196 "\"]")))
2197 #t))
2198 ;; Run Rspec directly to avoid the Rubocop dependency in the Rakefile
2199 (replace 'check
2200 (lambda* (#:key tests? #:allow-other-keys)
2201 (when tests?
2202 (invoke "rspec"))
2203 #t)))))
2204 (propagated-inputs
2205 `(("ruby-ffi" ,ruby-ffi)))
2206 (inputs
2207 `(("libsodium" ,libsodium)))
2208 (native-inputs
2209 `(("bundler" ,bundler)
2210 ("ruby-rspec" ,ruby-rspec)))
2211 (synopsis "Ruby FFI binding to libsodium")
2212 (description
2213 "This package provides Ruby FFI bindings to the Networking and
2214Cryptography (NaCl) library, also known as libsodium. This provides a
2215high-level toolkit for building cryptographic systems and protocols.")
2216 (home-page "https://github.com/crypto-rb/rbnacl")
2217 (license license:expat)))
2218
70b4cf38
RW
2219(define-public ruby-nenv
2220 (package
2221 (name "ruby-nenv")
12313cd0 2222 (version "0.3.0")
70b4cf38
RW
2223 (source (origin
2224 (method url-fetch)
2225 (uri (rubygems-uri "nenv" version))
2226 (sha256
2227 (base32
12313cd0 2228 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
70b4cf38
RW
2229 (build-system ruby-build-system)
2230 (arguments
2231 `(#:tests? #f)) ; no tests included
2232 (native-inputs
2233 `(("ruby-rspec" ,ruby-rspec)
2234 ("bundler" ,bundler)))
2235 (synopsis "Ruby interface for modifying the environment")
2236 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
2237and inspect the environment.")
2238 (home-page "https://github.com/e2/nenv")
2239 (license license:expat)))
2240
af59d4b4
MB
2241(define-public ruby-ptools
2242 (package
2243 (name "ruby-ptools")
2244 (version "1.3.5")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (rubygems-uri "ptools" version))
2248 (sha256
2249 (base32
2250 "1jb1h1nsk9zwykpniw8filbsk26kjsdlpk5wz6w0zyamcd41h87j"))))
2251 (build-system ruby-build-system)
2252 (arguments
2253 '(#:phases (modify-phases %standard-phases
2254 (add-after 'unpack 'patch-/bin/ls
2255 (lambda _
2256 (substitute* "test/test_binary.rb"
2257 (("/bin/ls")
2258 (which "ls")))
2259 #t))
2260 (add-before 'install 'create-gem
2261 (lambda _
2262 ;; Do not attempt to sign the gem.
2263 (substitute* "Rakefile"
2264 (("spec\\.signing_key = .*")
2265 ""))
2266 (invoke "rake" "gem:create"))))))
2267 (synopsis "Extra methods for Ruby's @code{File} class")
2268 (description
2269 "The @dfn{ptools} (power tools) library extends Ruby's core @code{File}
2270class with many additional methods modelled after common POSIX tools, such as
2271@code{File.which} for finding executables, @code{File.tail} to print the last
2272lines of a file, @code{File.wc} to count words, and so on.")
2273 (home-page "https://github.com/djberg96/ptools")
2274 (license license:artistic2.0)))
2275
8d9e9f28
RW
2276(define-public ruby-permutation
2277 (package
2278 (name "ruby-permutation")
2279 (version "0.1.8")
2280 (source (origin
2281 (method url-fetch)
2282 (uri (rubygems-uri "permutation" version))
2283 (sha256
2284 (base32
2285 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
2286 (build-system ruby-build-system)
2287 (arguments
2288 `(#:phases
2289 (modify-phases %standard-phases
2290 (add-after 'unpack 'fix-rakefile
2291 (lambda _
2292 (substitute* "Rakefile"
2293 (("require 'rake/gempackagetask'")
2294 "require 'rubygems/package_task'")
2295 (("include Config") ""))
2296 #t))
2297 (replace 'check
2298 (lambda _
9923d5a4 2299 (invoke "ruby" "-Ilib" "test/test.rb"))))))
8d9e9f28
RW
2300 (synopsis "Library to perform operations with sequence permutations")
2301 (description "This package provides a Ruby library to perform different
2302operations with permutations of sequences, such as strings and arrays.")
2f3800e5 2303 (home-page "https://flori.github.io/permutation")
8d9e9f28
RW
2304 (license license:gpl2))) ; GPL 2 only
2305
c5d14d42
RW
2306(define-public ruby-shellany
2307 (package
2308 (name "ruby-shellany")
2309 (version "0.0.1")
2310 (source (origin
2311 (method url-fetch)
2312 (uri (rubygems-uri "shellany" version))
2313 (sha256
2314 (base32
2315 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
2316 (build-system ruby-build-system)
2317 (arguments
2318 `(#:test-target "default"
2319 #:phases
2320 (modify-phases %standard-phases
2321 (add-after 'unpack 'fix-version-test
2322 (lambda _
2323 (substitute* "spec/shellany_spec.rb"
2324 (("^RSpec") "require \"shellany\"\nRSpec"))
2325 #t)))))
2326 (native-inputs
2327 `(("ruby-rspec" ,ruby-rspec)
2328 ("ruby-nenv" ,ruby-nenv)
2329 ("bundler" ,bundler)))
2330 (synopsis "Capture command output")
2331 (description "Shellany is a Ruby library providing functions to capture
2332the output produced by running shell commands.")
2333 (home-page "https://rubygems.org/gems/shellany")
2334 (license license:expat)))
2335
d152162f
RW
2336(define-public ruby-notiffany
2337 (package
2338 (name "ruby-notiffany")
8c1e4a4f 2339 (version "0.1.3")
d152162f
RW
2340 (source (origin
2341 (method url-fetch)
2342 (uri (rubygems-uri "notiffany" version))
2343 (sha256
2344 (base32
8c1e4a4f 2345 "0f47h3bmg1apr4x51szqfv3rh2vq58z3grh4w02cp3bzbdh6jxnk"))))
d152162f
RW
2346 (build-system ruby-build-system)
2347 ;; Tests are not included in the gem.
2348 (arguments `(#:tests? #f))
2349 (propagated-inputs
2350 `(("ruby-shellany" ,ruby-shellany)
2351 ("ruby-nenv" ,ruby-nenv)))
2352 (native-inputs
2353 `(("bundler" ,bundler)))
01eb17de
VC
2354 (synopsis "Wrapper library for notification libraries")
2355 (description "Notiffany is a Ruby wrapper library for notification
d152162f
RW
2356libraries such as Libnotify.")
2357 (home-page "https://github.com/guard/notiffany")
2358 (license license:expat)))
2359
96bf7521
MB
2360(define-public ruby-forking-test-runner
2361 (package
2362 (name "ruby-forking-test-runner")
2363 (version "1.6.0")
2364 (home-page "https://github.com/grosser/forking_test_runner")
2365 (source (origin
2366 (method git-fetch)
2367 (uri (git-reference (url home-page)
2368 (commit (string-append "v" version))))
2369 (file-name (git-file-name name version))
2370 (sha256
2371 (base32
2372 "1mrglzkj2nrgisccf2f30zbfmcs0awv1g3lw994b2az90fl39x8m"))))
2373 (build-system ruby-build-system)
2374 (arguments
2375 '(#:test-target "spec"
2376 ;; FIXME: ActiveRecord depends on sqlite3 1.3.6, but Guix has
2377 ;; 1.4.1, which in turn breaks the tests that use ActiveRecord.
2378 #:tests? #f
2379 #:phases (modify-phases %standard-phases
2380 (replace 'replace-git-ls-files
2381 (lambda _
2382 (substitute* "forking_test_runner.gemspec"
2383 (("`git ls-files lib/ bin/ MIT-LICENSE`")
2384 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
2385 #t))
2386 (add-before 'check 'remove-version-constraints
2387 (lambda _
2388 ;; Ignore hard coded version constraints for the tests.
2389 (delete-file "Gemfile.lock")
2390 #t))
2391 (add-before 'check 'set-HOME
2392 (lambda _
2393 ;; Many tests invoke Bundler, and fails when Bundler
2394 ;; warns that /homeless-shelter does not exist.
2395 (setenv "HOME" "/tmp")
2396 #t)))))
2397 (native-inputs
2398 `(("ruby-activerecord" ,ruby-activerecord)
2399 ("ruby-bump" ,ruby-bump)
2400 ("ruby-rspec" ,ruby-rspec)
2401 ("ruby-sqlite3" ,ruby-sqlite3)
2402 ("ruby-wwtd" ,ruby-wwtd)))
2403 (propagated-inputs
2404 `(("ruby-parallel-tests" ,ruby-parallel-tests)))
2405 (synopsis "Run every test in a fork")
2406 (description
2407 "This package is a wrapper around @code{parallel_tests} that runs every
2408test in a fork to avoid pollution and get clean output per test.")
2409 (license license:expat)))
2410
8528365b
RW
2411(define-public ruby-formatador
2412 (package
2413 (name "ruby-formatador")
2414 (version "0.2.5")
2415 (source (origin
2416 (method url-fetch)
2417 (uri (rubygems-uri "formatador" version))
2418 (sha256
2419 (base32
2420 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
2421 (build-system ruby-build-system)
2422 ;; Circular dependency: Tests require ruby-shindo, which requires
2423 ;; ruby-formatador at runtime.
2424 (arguments `(#:tests? #f))
2425 (synopsis "Ruby library to format text on stdout")
2426 (description "Formatador is a Ruby library to format text printed to the
2427standard output stream.")
7bf837fd 2428 (home-page "https://github.com/geemus/formatador")
8528365b
RW
2429 (license license:expat)))
2430
5437c741
CB
2431(define-public ruby-fuubar
2432 (package
2433 (name "ruby-fuubar")
2434 (version "2.3.2")
2435 (source
2436 (origin
2437 ;; Fetch from the git repository, as the gem package doesn't include
2438 ;; the tests.
2439 (method git-fetch)
2440 (uri (git-reference
b0e7b699 2441 (url "https://github.com/thekompanee/fuubar")
5437c741
CB
2442 (commit (string-append "releases/v" version))))
2443 (file-name (git-file-name name version))
2444 (sha256
2445 (base32
2446 "0jm1x2xp13csbnadixaikj7mlkp5yk4byx51npm56zi13izp7259"))))
2447 (build-system ruby-build-system)
2448 (arguments
2449 '(;; TODO: Some tests fail, unsure why.
2450 ;; 21 examples, 7 failures
2451 #:tests? #f
2452 #:phases
2453 (modify-phases %standard-phases
2454 (add-before 'build 'delete-certificate
2455 (lambda _
2456 ;; Remove 's.cert_chain' as we do not build with a private key
2457 (substitute* "fuubar.gemspec"
2458 ((".*cert_chain.*") "")
2459 ((".*signing_key.*") ""))
2460 #t))
2461 (replace 'check
2462 (lambda* (#:key tests? #:allow-other-keys)
2463 (when tests?
2464 (invoke "rspec"))
2465 #t)))))
2466 (native-inputs
2467 `(("bundler" ,bundler)))
2468 (propagated-inputs
2469 `(("ruby-rspec-core" ,ruby-rspec-core)
2470 ("ruby-progressbar" ,ruby-progressbar)))
2471 (synopsis "Fuubar is an RSpec formatter that uses a progress bar")
2472 (description
2473 "Fuubar is an RSpec formatter that uses a progress bar instead of a
2474string of letters and dots as feedback. It also stops on the first test
2475failure.")
2476 (home-page "https://github.com/thekompanee/fuubar")
2477 (license license:expat)))
2478
8ea991e3
CB
2479(define-public ruby-haml
2480 (package
2481 (name "ruby-haml")
2482 (version "5.0.4")
2483 (source
2484 (origin
2485 (method url-fetch)
2486 (uri (rubygems-uri "haml" version))
2487 (sha256
2488 (base32
2489 "1q0a9fvqh8kn6wm97fcks6qzbjd400bv8bx748w8v87m7p4klhac"))))
2490 (build-system ruby-build-system)
2491 (arguments
2492 '(#:tests? #f)) ; No included tests
2493 (propagated-inputs
2494 `(("ruby-tilt" ,ruby-tilt)
2495 ("ruby-temple" ,ruby-temple)))
2496 (synopsis "Haml is a Ruby library to generate HTML documents")
2497 (description
2498 "@acronym{Haml, HTML Abstraction Markup Language} is a layer on top of
2499HTML or XML that is designed to express the structure of documents using
2500indentation rather than closing tags. It was originally envisioned as a
2501plugin for Ruby on Rails, but it can function as a stand-alone templating
2502engine.")
2503 (home-page "http://haml.info/")
2504 (license license:expat)))
2505
353b7eb8
CB
2506(define-public ruby-hamster
2507 (package
2508 (name "ruby-hamster")
2509 (version "3.0.0")
2510 (source
2511 (origin
2512 (method url-fetch)
2513 (uri (rubygems-uri "hamster" version))
2514 (sha256
2515 (base32
2516 "1n1lsh96vnyc1pnzyd30f9prcsclmvmkdb3nm5aahnyizyiy6lar"))))
2517 (build-system ruby-build-system)
2518 (arguments
2519 '(#:phases
2520 (modify-phases %standard-phases
2521 (add-after 'unpack 'remove-unnecessary-dependencies
2522 (lambda _
2523 ;; pry is a debugging tool, and is unnecessary when running the
2524 ;; tests
2525 (substitute* "spec/lib/hamster/vector/insert_spec.rb"
2526 (("require 'pry'") ""))
2527 (substitute* "spec/spec_helper.rb"
2528 (("require \"pry\"") "")
2529 ;; CodeClimate is an online service, and is unnecessary for
2530 ;; running the tests
2531 (("require \"codeclimate-test-reporter\"") "")
2532 (("CodeClimate.*\n") ""))
2533 #t))
2534 ;; No Rakefile is included, so run rspec directly.
2535 (replace 'check
2536 (lambda* (#:key tests? #:allow-other-keys)
2537 (when tests?
2538 (invoke "rspec"))
2539 #t)))))
2540 (propagated-inputs
2541 `(("ruby-concurrent" ,ruby-concurrent)))
2542 (native-inputs
2543 `(("ruby-rspec" ,ruby-rspec)))
2544 (synopsis "Efficient, immutable, thread-safe collection classes for Ruby")
2545 (description
2546 "Hamster provides 6 persistent data structures: @code{Hash}, @code{Vector},
2547@code{Set}, @code{SortedSet}, @code{List}, and @code{Deque} (which works as an
2548immutable queue or stack).")
2549 (home-page "https://github.com/hamstergem/hamster")
2550 (license license:expat)))
2551
21781436
CB
2552(define-public ruby-hashdiff
2553 (package
2554 (name "ruby-hashdiff")
2555 (version "0.3.8")
2556 (source
2557 (origin
2558 (method url-fetch)
2559 (uri (rubygems-uri "hashdiff" version))
2560 (sha256
2561 (base32
2562 "19ykg5pax8798nh1yv71adkx0zzs7gn2rxjj86v7nsw0jba5lask"))))
2563 (build-system ruby-build-system)
2564 (arguments
2565 '(#:phases
2566 (modify-phases %standard-phases
2567 ;; Run tests directly via rspec to avoid Rake issue:
2568 ;; NoMethodError: undefined method `last_comment'
2569 (replace 'check
2570 (lambda* (#:key tests? #:allow-other-keys)
2571 (when tests?
2572 (invoke "rspec"))
2573 #t)))))
2574 (native-inputs
2575 `(("bundler" ,bundler)
2576 ("ruby-rspec" ,ruby-rspec-2)))
2577 (synopsis "HashDiff computes the smallest difference between two hashes")
2578 (description
2579 "HashDiff is a Ruby library to compute the smallest difference between
2580two hashes.")
2581 (home-page "https://github.com/liufengyun/hashdiff")
2582 (license license:expat)))
2583
3cc8e029
MB
2584(define-public ruby-hydra
2585 ;; No releases yet.
2586 (let ((commit "5abfa378743756ae4d9306cc134bcc482f5c9525")
2587 (revision "0"))
2588 (package
2589 (name "ruby-hydra")
2590 (version (git-version "0.0" revision commit))
2591 (home-page "https://github.com/hyphenation/hydra")
2592 (source (origin
2593 (method git-fetch)
2594 (uri (git-reference (url home-page) (commit commit)))
2595 (file-name (git-file-name name version))
2596 (sha256
2597 (base32
2598 "1cik398l2765y3d9sdhjzki3303hkry58ac6jlkiy7iy62nm529f"))))
2599 (build-system ruby-build-system)
2600 (arguments
2601 '(#:phases (modify-phases %standard-phases
2602 (add-after 'unpack 'make-files-writable
2603 (lambda _
2604 (for-each make-file-writable (find-files "."))
2605 #t))
2606 (replace 'check
2607 (lambda _
2608 (invoke "rspec"))))))
2609 (native-inputs
2610 `(("ruby-rspec" ,ruby-rspec)))
2611 (propagated-inputs
2612 `(("ruby-byebug" ,ruby-byebug)))
2613 (synopsis "Ruby hyphenation patterns")
2614 (description
2615 "ruby-hydra is a Ruby library for working with hyphenation patterns.")
2616 (license license:expat))))
2617
7ac4610f
RW
2618(define-public ruby-shindo
2619 (package
2620 (name "ruby-shindo")
2621 (version "0.3.8")
2622 (source (origin
2623 (method url-fetch)
2624 (uri (rubygems-uri "shindo" version))
2625 (sha256
2626 (base32
2627 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
2628 (build-system ruby-build-system)
2629 (arguments
2630 `(#:test-target "shindo_tests"
2631 #:phases
2632 (modify-phases %standard-phases
2633 (add-after 'unpack 'fix-tests
0b060e34
CB
2634 (lambda _
2635 (substitute* "tests/tests_helper.rb"
2636 (("-rubygems") ""))
2637 (substitute* "Rakefile"
2638 (("system \"shindo") "system \"./bin/shindo")
2639 ;; This test doesn't work, so we disable it.
2640 (("fail \"The build_error test should fail") "#")
2641 ((" -rubygems") ""))
2642 #t)))))
7ac4610f
RW
2643 (propagated-inputs
2644 `(("ruby-formatador" ,ruby-formatador)))
2645 (synopsis "Simple depth first Ruby testing")
2646 (description "Shindo is a simple depth first testing library for Ruby.")
2647 (home-page "https://github.com/geemus/shindo")
2648 (license license:expat)))
2649
f13636f2
RW
2650(define-public ruby-rubygems-tasks
2651 (package
2652 (name "ruby-rubygems-tasks")
f0f5f2d3 2653 (version "0.2.5")
f13636f2
RW
2654 (source (origin
2655 (method url-fetch)
2656 (uri (rubygems-uri "rubygems-tasks" version))
2657 (sha256
2658 (base32
f0f5f2d3 2659 "1x3sz3n2dlknd3v7w1mrq6f0ag6pwzhjvg7z29p75w3p42ma1gbx"))))
f13636f2
RW
2660 (build-system ruby-build-system)
2661 ;; Tests need Internet access.
2662 (arguments `(#:tests? #f))
2663 (native-inputs
2664 `(("ruby-rspec" ,ruby-rspec)
2665 ("ruby-yard" ,ruby-yard)))
2666 (synopsis "Rake tasks for managing and releasing Ruby Gems")
2667 (description "Rubygems-task provides Rake tasks for managing and releasing
2668Ruby Gems.")
2669 (home-page "https://github.com/postmodern/rubygems-tasks")
2670 (license license:expat)))
2671
cb6bc5df
CB
2672(define-public ruby-rubyzip
2673 (package
2674 (name "ruby-rubyzip")
2675 (version "1.2.1")
2676 (source
2677 (origin
2678 (method url-fetch)
2679 (uri (rubygems-uri "rubyzip" version))
2680 (sha256
2681 (base32
2682 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
2683 (build-system ruby-build-system)
2684 (arguments
2685 '(#:phases
2686 (modify-phases %standard-phases
2687 (add-before 'check 'patch-tests
2688 (lambda* (#:key inputs #:allow-other-keys)
2689 (substitute* "test/gentestfiles.rb"
2690 (("/usr/bin/zip")
2691 (string-append
2692 (assoc-ref inputs "zip") "/bin/zip")))
2693 (substitute* "test/input_stream_test.rb"
2694 (("/usr/bin/env ruby") (which "ruby")))
2695 #t)))))
2696 (native-inputs
2697 `(("bundler" ,bundler)
2698 ("ruby-simplecov" ,ruby-simplecov)
2699 ("zip" ,zip)
2700 ("unzip" ,unzip)))
2701 (synopsis "Ruby module is for reading and writing zip files")
2702 (description
2703 "The rubyzip module provides ways to read from and create zip files.")
702a1012 2704 (home-page "https://github.com/rubyzip/rubyzip")
cb6bc5df
CB
2705 (license license:bsd-2)))
2706
58b59742
RW
2707(define-public ruby-simplecov-html
2708 (package
2709 (name "ruby-simplecov-html")
53fd476f 2710 (version "0.10.2")
58b59742
RW
2711 (source (origin
2712 (method url-fetch)
2713 (uri (rubygems-uri "simplecov-html" version))
2714 (sha256
2715 (base32
53fd476f 2716 "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"))))
58b59742 2717 (build-system ruby-build-system)
8b749cf3 2718 (arguments `(#:tests? #f)) ; there are no tests
58b59742
RW
2719 (native-inputs
2720 `(("bundler" ,bundler)))
2721 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
2722 (description "This package provides the default HTML formatter for
2723the SimpleCov code coverage tool for Ruby version 1.9 and above.")
2724 (home-page "https://github.com/colszowka/simplecov-html")
2725 (license license:expat)))
2726
a84fa2ad
RW
2727(define-public ruby-simplecov
2728 (package
2729 (name "ruby-simplecov")
d432682b 2730 (version "0.17.1")
a84fa2ad
RW
2731 (source (origin
2732 (method url-fetch)
2733 (uri (rubygems-uri "simplecov" version))
2734 (sha256
2735 (base32
d432682b 2736 "1135k46nik05sdab30yxb8264lqiz01c8v000g16cl9pjc4mxrdw"))))
a84fa2ad
RW
2737 (build-system ruby-build-system)
2738 ;; Simplecov depends on rubocop for code style checking at build time.
2739 ;; Rubocop needs simplecov at build time.
2740 (arguments `(#:tests? #f))
2741 (propagated-inputs
2742 `(("ruby-json" ,ruby-json)
2743 ("ruby-docile" ,ruby-docile)
2744 ("ruby-simplecov-html" ,ruby-simplecov-html)))
2745 (native-inputs
2746 `(("bundler" ,bundler)))
2747 (synopsis "Code coverage framework for Ruby")
2748 (description "SimpleCov is a code coverage framework for Ruby with a
2749powerful configuration library and automatic merging of coverage across test
2750suites.")
7bf837fd 2751 (home-page "https://github.com/colszowka/simplecov")
a84fa2ad
RW
2752 (license license:expat)))
2753
98b87b82
DT
2754(define-public ruby-useragent
2755 (package
2756 (name "ruby-useragent")
959d908d 2757 (version "0.16.10")
98b87b82
DT
2758 (source (origin
2759 (method url-fetch)
e83c6d00 2760 (uri (rubygems-uri "useragent" version))
98b87b82
DT
2761 (sha256
2762 (base32
959d908d 2763 "1fv5kvq494swy0p17h9qya9r50w15xsi9zmvhzb8gh55kq6ki50p"))))
98b87b82
DT
2764 (build-system ruby-build-system)
2765 (arguments
e83c6d00 2766 '(#:tests? #f)) ; no test suite
98b87b82
DT
2767 (synopsis "HTTP user agent parser for Ruby")
2768 (description "UserAgent is a Ruby library that parses and compares HTTP
2769User Agents.")
2770 (home-page "https://github.com/gshutler/useragent")
2771 (license license:expat)))
96086cc5 2772
f7e9b2f3
CB
2773(define-public ruby-backports
2774 (package
2775 (name "ruby-backports")
2776 (version "3.11.4")
2777 (source
2778 (origin
2779 (method url-fetch)
2780 (uri (rubygems-uri "backports" version))
2781 (sha256
2782 (base32
2783 "1hshjxww2h7s0dk57njrygq4zpp0nlqrjfya7zwm27iq3rhc3y8g"))))
2784 (build-system ruby-build-system)
2785 (arguments
2786 '(;; TODO: This should be default, but there is one test failure
2787 #:test-target "all_spec"))
2788 (native-inputs
2789 `(("ruby-mspec" ,ruby-mspec)
2790 ("ruby-activesupport" ,ruby-activesupport)))
2791 (synopsis "Backports of the features in newer Ruby versions")
2792 (description
2793 "Backports enables more compatibility across Ruby versions by providing
2794backports of some features.")
2795 (home-page "https://github.com/marcandre/backports")
2796 (license license:expat)))
2797
96086cc5
DT
2798(define-public ruby-bacon
2799 (package
2800 (name "ruby-bacon")
e83c6d00 2801 (version "1.2.0")
96086cc5
DT
2802 (source (origin
2803 (method url-fetch)
e83c6d00 2804 (uri (rubygems-uri "bacon" version))
96086cc5
DT
2805 (sha256
2806 (base32
e83c6d00 2807 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
96086cc5 2808 (build-system ruby-build-system)
96086cc5
DT
2809 (synopsis "Small RSpec clone")
2810 (description "Bacon is a small RSpec clone providing all essential
2811features.")
2812 (home-page "https://github.com/chneukirchen/bacon")
2813 (license license:expat)))
de59d316 2814
a8d2bf3c
CB
2815(define-public ruby-bacon-bits
2816 (package
2817 (name "ruby-bacon-bits")
2818 (version "0.1.0")
2819 (source
2820 (origin
2821 (method url-fetch)
2822 (uri (rubygems-uri "bacon-bits" version))
2823 (sha256
2824 (base32
2825 "1ghpj8ja94lhi8rgi872hqk4fd2amz2k7g9znd64z5dj7v6l0dmx"))))
2826 (build-system ruby-build-system)
2827 (arguments
2828 ;; No tests
2829 '(#:tests? #f))
2830 (propagated-inputs `(("ruby-bacon" ,ruby-bacon)))
2831 (synopsis "Extensions to Bacon, for disabling tests, before and after
2832blocks and more")
2833 (description
2834 "This extends the bacon testing framework with useful extensions to
2835disable tests, have before and after blocks that run once and more.")
2836 (home-page "https://github.com/cldwalker/bacon-bits")
2837 (license license:expat)))
2838
65f65889
CB
2839(define-public ruby-bacon-colored-output
2840 (package
2841 (name "ruby-bacon-colored-output")
2842 (version "1.1.1")
2843 (source
2844 (origin
2845 (method url-fetch)
2846 (uri (rubygems-uri "bacon-colored_output" version))
2847 (sha256
2848 (base32
2849 "1znyh3vkfdlmf19p3k4zip88ibym41dn5g4p4n5hmks2iznb7qpx"))))
2850 (build-system ruby-build-system)
2851 (arguments
2852 '(;; No included tests
2853 #:tests? #f))
2854 (propagated-inputs
2855 `(("ruby-bacon" ,ruby-bacon)))
2856 (synopsis "Colored output for Bacon test framework")
2857 (description
2858 "This package adds color through ANSI escape codes to Bacon test
2859output.")
2860 (home-page "https://github.com/whitequark/bacon-colored_output")
2861 (license license:expat)))
2862
e259bdf0
DT
2863(define-public ruby-connection-pool
2864 (package
2865 (name "ruby-connection-pool")
58021db4 2866 (version "2.2.2")
e259bdf0
DT
2867 (source (origin
2868 (method url-fetch)
e83c6d00 2869 (uri (rubygems-uri "connection_pool" version))
e259bdf0
DT
2870 (sha256
2871 (base32
58021db4 2872 "0lflx29mlznf1hn0nihkgllzbj8xp5qasn8j7h838465pi399k68"))))
e259bdf0
DT
2873 (build-system ruby-build-system)
2874 (native-inputs
2875 `(("bundler" ,bundler)))
2876 (synopsis "Generic connection pool for Ruby")
2877 (description "Connection_pool provides a generic connection pooling
2878interface for Ruby programs.")
2879 (home-page "https://github.com/mperham/connection_pool")
2880 (license license:expat)))
4c0aeb44 2881
4a98314d
MB
2882(define-public ruby-fast-gettext
2883 (package
2884 (name "ruby-fast-gettext")
c3beb7ce 2885 (version "2.0.3")
4a98314d
MB
2886 (home-page "https://github.com/grosser/fast_gettext")
2887 (source (origin
2888 (method git-fetch)
2889 (uri (git-reference (url home-page)
2890 (commit (string-append "v" version))))
2891 (file-name (git-file-name name version))
2892 (sha256
2893 (base32
c3beb7ce 2894 "1dg14apq5sfjshhcq0idphhs7aq9ikzswhqmn689p1h76mxqr1v6"))))
4a98314d
MB
2895 (build-system ruby-build-system)
2896 (arguments
2897 '(#:test-target "spec"
2898 #:phases (modify-phases %standard-phases
2899 (add-before 'check 'remove-version-constraints
2900 (lambda _
2901 (delete-file "Gemfile.lock")
2902 #t))
2903 (add-before 'check 'remove-activerecord-test
2904 (lambda _
2905 ;; FIXME: This test fails because ActiveRecord depends on
2906 ;; a different version of ruby-sqlite than the currently
2907 ;; available one.
2908 (delete-file
2909 "spec/fast_gettext/translation_repository/db_spec.rb")
2910 #t))
2911 (add-before 'check 'disable-i18n-test
2912 (lambda _
2913 ;; XXX: This test checks i18n intricasies with Rails 3 and
2914 ;; automatically disables itself for Rails 4.0, but does
2915 ;; not know about newer versions as it has not been updated
2916 ;; since 2014. Disable for later versions of Rails too.
2917 (substitute* "spec/fast_gettext/vendor/string_spec.rb"
2918 (((string-append "ActiveRecord::VERSION::MAJOR == 4 and "
2919 "ActiveRecord::VERSION::MINOR == 0"))
2920 "ActiveRecord::VERSION::MAJOR >= 4"))
2921 #t)))))
2922 (native-inputs
2923 `(;; For tests.
2924 ("ruby-activerecord" ,ruby-activerecord)
2925 ("ruby-activesupport" ,ruby-activesupport)
2926 ("ruby-bump" ,ruby-bump)
2927 ("ruby-forking-test-runner" ,ruby-forking-test-runner)
2928 ("ruby-i18n" ,ruby-i18n)
2929 ("ruby-rubocop" ,ruby-rubocop)
2930 ("ruby-rspec" ,ruby-rspec)
2931 ("ruby-single-cov" ,ruby-single-cov)
2932 ("ruby-sqlite3" ,ruby-sqlite3)
2933 ("ruby-wwtd" ,ruby-wwtd)))
2934 (synopsis "Fast implementation of @code{GetText}")
2935 (description
2936 "This package provides an alternative implementation of the Ruby
2937@code{GetText} library that is approximately 12x faster yet thread safe.")
2938 ;; Some parts are covered by the Ruby license, see file headers.
2939 (license (list license:expat license:ruby))))
2940
4c0aeb44
DT
2941(define-public ruby-net-http-persistent
2942 (package
2943 (name "ruby-net-http-persistent")
185ea446 2944 (version "3.0.0")
4c0aeb44
DT
2945 (source (origin
2946 (method url-fetch)
e83c6d00 2947 (uri (rubygems-uri "net-http-persistent" version))
4c0aeb44
DT
2948 (sha256
2949 (base32
185ea446 2950 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
4c0aeb44 2951 (build-system ruby-build-system)
4c0aeb44
DT
2952 (native-inputs
2953 `(("ruby-connection-pool" ,ruby-connection-pool)
2954 ("ruby-hoe" ,ruby-hoe)))
2955 (synopsis "Persistent HTTP connection manager")
2956 (description "Net::HTTP::Persistent manages persistent HTTP connections
2957using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
2958 (home-page "https://github.com/drbrain/net-http-persistent")
2959 (license license:expat)))
afbbdf77 2960
f88bacaf
RW
2961(define-public ruby-power-assert
2962 (package
2963 (name "ruby-power-assert")
6754323b 2964 (version "1.1.5")
f88bacaf
RW
2965 (source (origin
2966 (method url-fetch)
2967 (uri (rubygems-uri "power_assert" version))
2968 (sha256
2969 (base32
6754323b 2970 "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"))))
f88bacaf 2971 (build-system ruby-build-system)
6754323b
CB
2972 (arguments
2973 '(#:tests? #f)) ; No included tests
f88bacaf
RW
2974 (native-inputs
2975 `(("bundler" ,bundler)))
2976 (synopsis "Assert library with descriptive assertion messages")
2977 (description "Power-assert is an assertion library providing descriptive
2978assertion messages for tests.")
2979 (home-page "https://github.com/k-tsj/power_assert")
2980 (license (list license:bsd-2 license:ruby))))
2981
e42e3bfa
CB
2982(define-public ruby-powerpack
2983 (package
2984 (name "ruby-powerpack")
2985 (version "0.1.2")
2986 (source
2987 (origin
2988 (method url-fetch)
2989 (uri (rubygems-uri "powerpack" version))
2990 (sha256
2991 (base32
2992 "1r51d67wd467rpdfl6x43y84vwm8f5ql9l9m85ak1s2sp3nc5hyv"))))
2993 (build-system ruby-build-system)
2994 (arguments
2995 '(#:test-target "spec"))
2996 (native-inputs
2997 `(("bundler" ,bundler)
2998 ("ruby-rspec" ,ruby-rspec)
2999 ("ruby-yard" ,ruby-yard)))
3000 (synopsis "Useful extensions to core Ruby classes")
3001 (description
3002 "This package provides a few useful extensions to core Ruby classes,
3003including @code{Array}, @code{Enumerable}, @code{Hash}, @code{Numeric}, and
3004@code{String}.")
3005 (home-page "https://github.com/bbatsov/powerpack")
3006 (license license:expat)))
3007
347eb21e
RW
3008(define-public ruby-locale
3009 (package
3010 (name "ruby-locale")
3011 (version "2.1.2")
3012 (source (origin
3013 (method url-fetch)
3014 (uri (rubygems-uri "locale" version))
3015 (sha256
3016 (base32
3017 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
3018 (build-system ruby-build-system)
3019 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3020 ;; which needs ruby-gettext, which needs ruby-locale. To break the
3021 ;; dependency cycle we disable tests.
3022 (arguments `(#:tests? #f))
3023 (native-inputs
3024 `(("bundler" ,bundler)
3025 ("ruby-yard" ,ruby-yard)))
3026 (synopsis "Ruby library providing basic localization APIs")
3027 (description
3028 "Ruby-Locale is the pure ruby library which provides basic APIs for
3029localization.")
3030 (home-page "https://github.com/ruby-gettext/locale")
3031 (license (list license:lgpl3+ license:ruby))))
3032
09e2b0af
CB
3033(define-public ruby-temple
3034 (package
3035 (name "ruby-temple")
b1c79cab 3036 (version "0.8.2")
09e2b0af
CB
3037 (source
3038 (origin
3039 (method url-fetch)
3040 (uri (rubygems-uri "temple" version))
3041 (sha256
3042 (base32
b1c79cab 3043 "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
09e2b0af
CB
3044 (build-system ruby-build-system)
3045 (native-inputs
3046 `(("ruby-tilt" ,ruby-tilt)
3047 ("ruby-bacon" ,ruby-bacon)
3048 ("ruby-erubis" ,ruby-erubis)))
3049 (synopsis "Template compilation framework in Ruby")
3050 (description
3051 "Temple is an abstraction and framework for compiling templates to pure
3052Ruby.")
3053 (home-page "https://github.com/judofyr/temple")
3054 (license license:expat)))
3055
e2333ea3
RW
3056(define-public ruby-text
3057 (package
3058 (name "ruby-text")
3059 (version "1.3.1")
3060 (source (origin
3061 (method url-fetch)
3062 (uri (rubygems-uri "text" version))
3063 (sha256
3064 (base32
3065 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
3066 (build-system ruby-build-system)
3067 (synopsis "Collection of text algorithms for Ruby")
3068 (description
3069 "This package provides a collection of text algorithms: Levenshtein,
3070Soundex, Metaphone, Double Metaphone, Porter Stemming.")
7bf837fd 3071 (home-page "https://github.com/threedaymonk/text")
e2333ea3
RW
3072 (license license:expat)))
3073
c1f52261
RW
3074(define-public ruby-gettext
3075 (package
3076 (name "ruby-gettext")
3077 (version "3.1.7")
3078 (source (origin
3079 (method url-fetch)
3080 (uri (rubygems-uri "gettext" version))
3081 (sha256
3082 (base32
3083 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
3084 (build-system ruby-build-system)
3085 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
3086 ;; which needs ruby-gettext. To break the dependency cycle we disable
3087 ;; tests.
3088 (arguments `(#:tests? #f))
3089 (propagated-inputs
3090 `(("ruby-locale" ,ruby-locale)
3091 ("ruby-text" ,ruby-text)))
3092 (native-inputs
3093 `(("bundler" ,bundler)
3094 ("ruby-yard" ,ruby-yard)))
3095 (synopsis "GNU gettext-like program for Ruby")
3096 (description
3097 "Gettext is a GNU gettext-like program for Ruby. The catalog
3098file (po-file) used is the same as that used by GNU gettext, allowing you to
3099use GNU gettext tools for maintenance.")
2f3800e5 3100 (home-page "https://ruby-gettext.github.com/")
c1f52261
RW
3101 (license (list license:lgpl3+ license:ruby))))
3102
cc5aeb8c
RW
3103(define-public ruby-packnga
3104 (package
3105 (name "ruby-packnga")
1d60c436 3106 (version "1.0.4")
cc5aeb8c
RW
3107 (source (origin
3108 (method url-fetch)
3109 (uri (rubygems-uri "packnga" version))
3110 (sha256
3111 (base32
1d60c436 3112 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
cc5aeb8c
RW
3113 (build-system ruby-build-system)
3114 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
3115 ;; To break the dependency cycle we disable tests.
3116 (arguments `(#:tests? #f))
3117 (propagated-inputs
3118 `(("ruby-gettext" ,ruby-gettext)
3119 ("ruby-yard" ,ruby-yard)))
3120 (native-inputs
3121 `(("bundler" ,bundler)))
3122 (synopsis "Utility library to package internationalized libraries")
3123 (description
3124 "Packnga is a library to translate to many languages using YARD.")
3125 (home-page "http://ranguba.org/packnga/")
3126 (license license:lgpl2.0+)))
3127
93dc8684
CB
3128(define-public ruby-test-construct
3129 (package
3130 (name "ruby-test-construct")
3131 (version "2.0.1")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (rubygems-uri "test_construct" version))
3136 (sha256
3137 (base32
3138 "1a2ym3l068d0pxzzr95kvqx87zpdsarxslz9ygd4qfm9frrz0kgj"))))
3139 (build-system ruby-build-system)
3140 (native-inputs
3141 `(("bundler" ,bundler)
3142 ("ruby-mocha" ,ruby-mocha)
3143 ("ruby-rspec" ,ruby-rspec)))
3144 (synopsis "Creates temporary files and directories for testing")
3145 (description
3146 "TestConstruct is a @acronym{DSL, Domain Specific Language} for creating
3147temporary files and directories during tests.")
3148 (home-page "https://github.com/bhb/test_construct")
3149 (license license:expat)))
3150
3383f5bd
RW
3151(define-public ruby-test-unit
3152 (package
3153 (name "ruby-test-unit")
d74d96e4 3154 (version "3.2.5")
3383f5bd
RW
3155 (source (origin
3156 (method url-fetch)
3157 (uri (rubygems-uri "test-unit" version))
3158 (sha256
3159 (base32
d74d96e4 3160 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
3383f5bd
RW
3161 (build-system ruby-build-system)
3162 (propagated-inputs
3163 `(("ruby-power-assert" ,ruby-power-assert)))
3164 (native-inputs
3165 `(("bundler" ,bundler)
3166 ("ruby-packnga" ,ruby-packnga)
3167 ("ruby-yard" ,ruby-yard)))
3168 (synopsis "Unit testing framework for Ruby")
3169 (description "@code{Test::Unit} is unit testing framework for Ruby, based
3170on xUnit principles. These were originally designed by Kent Beck, creator of
3171extreme programming software development methodology, for Smalltalk's SUnit.
3172It allows writing tests, checking results and automated testing in Ruby.")
2f3800e5 3173 (home-page "https://test-unit.github.io/")
3383f5bd
RW
3174 (license (list license:psfl license:ruby))))
3175
76b732fb
CB
3176(define-public ruby-markaby
3177 (package
3178 (name "ruby-markaby")
3179 (version "0.9.0")
3180 (source
3181 (origin
3182 (method url-fetch)
3183 (uri (rubygems-uri "markaby" version))
3184 (sha256
3185 (base32
3186 "1j4jc31ycydbkh5h3q6zwidzpavg3g5mbb5lqyaczd3jrq78rd7i"))))
3187 (build-system ruby-build-system)
3188 (arguments
3189 '(#:phases
3190 (modify-phases %standard-phases
3191 ;; Run rspec manually without using the Rakefile, as the versions of
3192 ;; Rake and RSpec 2 are incompatible:
3193 ;;
3194 ;; NoMethodError: undefined method `last_comment'
3195 (replace 'check
3196 (lambda* (#:key tests? #:allow-other-keys)
3197 (when tests?
3198 (invoke "rspec"))
3199 #t)))))
3200 (propagated-inputs
3201 `(("ruby-builder" ,ruby-builder)))
3202 (native-inputs
3203 `(("bundler" ,bundler)
3204 ("ruby-rspec" ,ruby-rspec-2)))
3205 (synopsis "Write HTML pages in pure Ruby")
3206 (description
3207 "Markaby allows writing HTML packages in pure Ruby. This is similar to
e54af322 3208the functionality provided by @acronym{ERB, Embedded Ruby}, but without the
76b732fb 3209mixture of HTML and additional ERB syntax.")
41181b76 3210 (home-page "https://markaby.github.io/")
76b732fb
CB
3211 (license license:expat)))
3212
b9511aa9
CB
3213(define-public ruby-maruku
3214 (package
3215 (name "ruby-maruku")
3216 (version "0.7.3")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (rubygems-uri "maruku" version))
3221 (sha256
3222 (base32
3223 "1r7bxpgnx2hp3g12bjrmdrpv663dfqxsdp0af69kjhxmaxpia56x"))))
3224 (build-system ruby-build-system)
3225 (arguments
3226 '(;; TODO: 3 tests seem to fail due to HTML encoding issues
3227 #:tests? #f
3228 #:phases
3229 (modify-phases %standard-phases
3230 (replace 'check
3231 (lambda* (#:key tests? #:allow-other-keys)
3232 (when tests?
3233 (invoke "rspec"))
3234 #t)))))
3235 (native-inputs
3236 `(("ruby-rspec" ,ruby-rspec)
3237 ("ruby-simplecov" ,ruby-simplecov)
3238 ("ruby-nokogiri-diff" ,ruby-nokogiri-diff)))
3239 (synopsis "Markdown interpreter in Ruby")
3240 (description
3241 "Maruku is a Markdown interpreter in Ruby. It can export Markdown to
3242HTML, and PDF through LaTeX.")
3243 (home-page "https://github.com/bhollis/maruku")
3244 (license license:expat)))
3245
25d6d49b
RW
3246(define-public ruby-metaclass
3247 (package
3248 (name "ruby-metaclass")
3249 (version "0.0.4")
3250 (source (origin
3251 (method url-fetch)
3252 (uri (rubygems-uri "metaclass" version))
3253 (sha256
3254 (base32
3255 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
3256 (build-system ruby-build-system)
3257 (arguments
3258 `(#:phases
3259 (modify-phases %standard-phases
3260 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 3261 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3262 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3263 (substitute* "Rakefile"
3264 (("t\\.libs << \"test\"" line)
3265 (string-append line "; t.libs << \""
3cb3fa67 3266 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3267 "/gems/test-unit-"
3268 ,(package-version ruby-test-unit)
3269 "/lib\""))))
3270 #t)))))
25d6d49b
RW
3271 (native-inputs
3272 `(("bundler" ,bundler)
3273 ("ruby-test-unit" ,ruby-test-unit)))
3274 (synopsis "Ruby library adding metaclass method to all objects")
3275 (description
3276 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
3277objects.")
7bf837fd 3278 (home-page "https://github.com/floehopper/metaclass")
25d6d49b
RW
3279 (license license:expat)))
3280
fae1c866
MB
3281(define-public ruby-mkmf-lite
3282 (package
3283 (name "ruby-mkmf-lite")
3284 (version "0.3.2")
3285 (source (origin
3286 (method url-fetch)
3287 (uri (rubygems-uri "mkmf-lite" version))
3288 (sha256
3289 (base32
3290 "0br9k6zijj1zc25n8p7f2j1mwl58nfgdknf3q13h9k156jvrir06"))))
3291 (build-system ruby-build-system)
3292 (propagated-inputs
3293 `(("ruby-ptools" ,ruby-ptools)))
3294 (synopsis "Lightweight alternative to @code{mkmf}")
3295 (description
3296 "@code{mkmf-lite} is a light version of Ruby's @code{mkmf.rb} designed
3297for use as a library. It does not create packages, builds, or log files of
3298any kind. Instead, it provides mixin methods that you can use in FFI or tests
3299to check for the presence of header files, constants, and so on.")
3300 (home-page "https://github.com/djberg96/mkmf-lite")
3301 (license license:asl2.0)))
3302
1d1d20b0
CB
3303(define-public ruby-mspec
3304 (package
3305 (name "ruby-mspec")
3306 (version "1.9.1")
3307 (source
3308 (origin
3309 (method url-fetch)
3310 (uri (rubygems-uri "mspec" version))
3311 (sha256
3312 (base32
3313 "0wmyh2n40m4srwdx9z6h6g6p46k02pzyhcsja3hqcw5h5b0hfmhd"))))
3314 (build-system ruby-build-system)
3315 (arguments
3316 '(;; TODO: 3 test failures
3317 ;; ./spec/mocks/mock_spec.rb:82
3318 ;; ./spec/utils/name_map_spec.rb:151
3319 ;; ./spec/utils/name_map_spec.rb:155
3320 #:tests? #f
3321 #:phases
3322 (modify-phases %standard-phases
3323 (add-after 'extract-gemspec 'change-dependency-constraints
3324 (lambda _
3325 (substitute* "mspec.gemspec"
3326 (("rake.*") "rake>)\n")
3327 (("rspec.*") "rspec>)\n"))
3328 #t))
3329 (replace 'check
3330 (lambda* (#:key tests? #:allow-other-keys)
3331 (when tests?
3332 (invoke "rspec" "spec"))
3333 #t)))))
3334 (native-inputs
3335 `(("bundler" ,bundler)
3336 ("ruby-rake" ,ruby-rake)
3337 ("ruby-rspec" ,ruby-rspec)))
3338 (synopsis "MSpec is a specialized framework for RubySpec")
3339 (description
3340 "MSpec is a specialized framework that is syntax-compatible with RSpec 2
3341for basic features. MSpec contains additional features that assist in writing
3342specs for Ruby implementations in ruby/spec.")
3343 (home-page "http://rubyspec.org")
3344 (license license:expat)))
3345
b8aecc31
CB
3346(define-public ruby-mysql2
3347 (package
3348 (name "ruby-mysql2")
3349 (version "0.5.2")
3350 (source
3351 (origin
3352 (method git-fetch)
3353 (uri (git-reference
b0e7b699 3354 (url "https://github.com/brianmario/mysql2")
b8aecc31
CB
3355 (commit version)))
3356 (file-name (git-file-name name version))
3357 (sha256
3358 (base32
3359 "11lvfgc2rmvkm52jp0nbi6pvhk06klznghr7llldfw8basl9n5wv"))))
3360 (build-system ruby-build-system)
3361 (arguments
3362 '(;; TODO: Tests require a running MySQL/MariaDB service
3363 #:tests? #f
3364 #:phases
3365 (modify-phases %standard-phases
3366 (replace 'replace-git-ls-files
3367 (lambda _
3368 (substitute* "mysql2.gemspec"
3369 (("git ls-files .*`") "find . -type f |sort`"))
3370 #t))
3371 (add-before 'install 'set-MAKEFLAGS
3372 (lambda* (#:key outputs #:allow-other-keys)
3373 (setenv "MAKEFLAGS"
3374 (string-append
3375 "V=1 "
3376 "prefix=" (assoc-ref outputs "out")))
3377 #t))
3378 ;; Move the 'check phase to after 'install, as then you can test
3379 ;; using the installed mysql2 gem in the store.
3380 (delete 'check)
3381 (add-after 'install 'check
3382 (lambda* (#:key outputs tests? #:allow-other-keys)
3383 (setenv "GEM_PATH"
3384 (string-append
3385 (getenv "GEM_PATH")
3386 ":"
3387 (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
3388 (when tests?
3389 (invoke "rspec"))
3390 #t)))))
3391 (inputs
2b8491fb
JL
3392 `(("mariadb" ,mariadb "lib")
3393 ("mariadb-dev" ,mariadb "dev")
b8aecc31
CB
3394 ("zlib" ,zlib)))
3395 (native-inputs
3396 `(("ruby-rspec" ,ruby-rspec)
3397 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3398 (synopsis "MySQL library for Ruby, binding to libmysql")
3399 (description
3400 "This package provides a simple, fast MySQL library for Ruby, binding to
3401libmysql.")
3402 (home-page "https://github.com/brianmario/mysql2")
3403 (license license:expat)))
3404
21f7b7bd
RW
3405(define-public ruby-blankslate
3406 (package
3407 (name "ruby-blankslate")
3408 (version "3.1.3")
3409 (source (origin
3410 (method url-fetch)
3411 (uri (rubygems-uri "blankslate" version))
3412 (sha256
3413 (base32
3414 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
3415 (build-system ruby-build-system)
3416 (arguments
3417 `(#:phases
3418 (modify-phases %standard-phases
3419 (replace 'check
9923d5a4 3420 (lambda _ (invoke "rspec" "spec/"))))))
21f7b7bd
RW
3421 (native-inputs
3422 `(("bundler" ,bundler)
3423 ("ruby-rspec" ,ruby-rspec)))
3424 (synopsis "Abstract base class with no predefined methods")
3425 (description
3426 "BlankSlate provides an abstract base class with no predefined
3427methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
3428as a base class when writing classes that depend upon
3429@code{method_missing} (e.g. dynamic proxies).")
7bf837fd 3430 (home-page "https://github.com/masover/blankslate")
21f7b7bd
RW
3431 (license license:expat)))
3432
afdb437c
CB
3433(define-public ruby-bond
3434 (package
3435 (name "ruby-bond")
3436 (version "0.5.1")
3437 (source
3438 (origin
3439 (method url-fetch)
3440 (uri (rubygems-uri "bond" version))
3441 (sha256
3442 (base32
3443 "1r19ifc4skyl2gxnifrxa5jvbbay9fb2in79ppgv02b6n4bhsw90"))))
3444 (build-system ruby-build-system)
3445 (native-inputs
3446 `(("ruby-bacon" ,ruby-bacon)
3447 ("ruby-bacon-bits" ,ruby-bacon-bits)
3448 ("ruby-mocha-on-bacon" ,ruby-mocha-on-bacon)))
3449 (synopsis "Bond can provide custom autocompletion for arguments, methods
3450and more")
3451 (description
3452 "Bond can autocomplete argument(s) to methods, uniquely completing per
3453module, per method and per argument. Bond provides a configuration system and
3454a DSL for creating custom completions and completion rules. Bond can also
3455load completions that ship with gems. Bond is able to offer more than irb's
3456completion since it uses the full line of input when completing as opposed to
3457irb's last-word approach.")
3458 (home-page "http://tagaholic.me/bond/")
3459 (license license:expat)))
3460
f3d7bb93
CB
3461(define-public ruby-idn-ruby
3462 (package
3463 (name "ruby-idn-ruby")
3464 (version "0.1.0")
3465 (source
3466 (origin
3467 (method url-fetch)
3468 (uri (rubygems-uri "idn-ruby" version))
3469 (sha256
3470 (base32
3471 "07vblcyk3g72sbq12xz7xj28snpxnh3sbcnxy8bglqbfqqhvmawr"))))
3472 (build-system ruby-build-system)
3473 (arguments
3474 '(#:phases
3475 (modify-phases %standard-phases
3476 (delete 'check)
3477 (add-after 'install 'check
3478 (lambda* (#:key tests? outputs #:allow-other-keys)
3479 (when tests?
3480 (let* ((gem-file (cadr (find-files "." "\\.gem")))
3481 (name-and-version (basename gem-file ".gem")))
3482 (apply invoke
3483 "ruby" "--verbose"
3484 (string-append "-I"
3485 (assoc-ref outputs "out")
3486 "/lib/ruby/vendor_ruby/gems/"
3487 name-and-version
3488 "/lib")
3489 (find-files "./test" ".*\\.rb"))))
3490 #t)))))
3491 (inputs
3492 `(("libidn" ,libidn)))
3493 (synopsis "Ruby Bindings for the GNU LibIDN library")
3494 (description
3495 "Ruby Bindings for the GNU LibIDN library, an implementation of the
3496Stringprep, Punycode and IDNA specifications. These are used to encode and
3497decode internationalized domain + names according to the IDNA2003
3498specifications.
3499
3500Included are the most important parts of the Stringprep, Punycode and IDNA
3501APIs like performing Stringprep processings, encoding to and decoding from
3502Punycode strings and converting entire domain names to and from the ACE
3503encoded form.")
3504 (home-page "https://github.com/deepfryed/idn-ruby")
3505 (license license:asl2.0)))
3506
4016ba3f
RW
3507(define-public ruby-instantiator
3508 (package
3509 (name "ruby-instantiator")
688c9076 3510 (version "0.0.7")
4016ba3f
RW
3511 (source (origin
3512 (method url-fetch)
3513 (uri (rubygems-uri "instantiator" version))
3514 (sha256
3515 (base32
688c9076 3516 "0w07w3gkyqr7m0vz5h13vm8b411660qywjm2xxxgdjv4wb3fazbr"))))
4016ba3f
RW
3517 (build-system ruby-build-system)
3518 (arguments
3519 `(#:phases
3520 (modify-phases %standard-phases
3521 (add-after 'unpack 'add-test-unit-to-search-path
761e7042 3522 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3523 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3524 (substitute* "Rakefile"
3525 (("t\\.libs << \"test\"" line)
3526 (string-append line "; t.libs << \""
3cb3fa67 3527 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3528 "/gems/test-unit-"
3529 ,(package-version ruby-test-unit)
3530 "/lib\""))))
3531 #t)))))
4016ba3f
RW
3532 (propagated-inputs
3533 `(("ruby-blankslate" ,ruby-blankslate)))
3534 (native-inputs
3535 `(("bundler" ,bundler)
3536 ("ruby-test-unit" ,ruby-test-unit)))
3537 (synopsis "Instantiate an arbitrary Ruby class")
3538 (description
3539 "Instantiator lets you instantiate an arbitrary Ruby class without
3540knowing anything about the constructor.")
3541 (home-page "https://github.com/floehopper/instantiator")
3542 (license license:expat)))
3543
97aee8d3
RW
3544(define-public ruby-introspection
3545 (package
3546 (name "ruby-introspection")
98ff58a5 3547 (version "0.0.4")
97aee8d3
RW
3548 (source (origin
3549 (method url-fetch)
3550 (uri (rubygems-uri "introspection" version))
3551 (sha256
3552 (base32
98ff58a5 3553 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
97aee8d3
RW
3554 (build-system ruby-build-system)
3555 (arguments
3556 `(#:phases
3557 (modify-phases %standard-phases
3558 (add-after 'unpack 'add-test-unit-to-search-path
3559 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 3560 (let* ((test-unit (assoc-ref inputs "ruby-test-unit")))
761e7042
BW
3561 (substitute* "Rakefile"
3562 (("t\\.libs << \"test\"" line)
3563 (string-append line "; t.libs << \""
3cb3fa67 3564 test-unit "/lib/ruby/vendor_ruby"
761e7042
BW
3565 "/gems/test-unit-"
3566 ,(package-version ruby-test-unit)
3567 "/lib\""))))
97aee8d3
RW
3568 #t)))))
3569 (propagated-inputs
3570 `(("ruby-instantiator" ,ruby-instantiator)
3571 ("ruby-metaclass" ,ruby-metaclass)))
3572 (native-inputs
3573 `(("bundler" ,bundler)
3574 ("ruby-blankslate" ,ruby-blankslate)
3575 ("ruby-test-unit" ,ruby-test-unit)))
3576 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
3577 (description
3578 "Introspection provides tools to inspect the hierarchy of method
3579definitions on a Ruby object.")
3580 (home-page "https://github.com/floehopper/introspection")
3581 (license license:expat)))
3582
d93062fd
RW
3583(define-public ruby-redcarpet
3584 (package
3585 (name "ruby-redcarpet")
ba4084bb 3586 (version "3.5.0")
d93062fd
RW
3587 (source (origin
3588 (method url-fetch)
3589 (uri (rubygems-uri "redcarpet" version))
3590 (sha256
3591 (base32
ba4084bb 3592 "0skcyx1h8b5ms0rp2zm3ql6g322b8c1adnkwkqyv7z3kypb4bm7k"))))
d93062fd
RW
3593 (build-system ruby-build-system)
3594 (arguments
3595 `(#:phases
3596 (modify-phases %standard-phases
3597 ;; The gem archive does not include the conformance tests.
3598 (add-after 'unpack 'disable-conformance-tests
3599 (lambda _
3600 (substitute* "Rakefile"
3601 (("task :test => %w\\[test:unit test:conformance\\]")
3602 "task :test => %w[test:unit]"))
3603 #t)))))
3604 (native-inputs
3605 `(("bundler" ,bundler)
3606 ("ruby-test-unit" ,ruby-test-unit)
3607 ("ruby-rake-compiler" ,ruby-rake-compiler)))
3608 (synopsis "Extensible Markdown to (X)HTML converter")
3609 (description
3610 "Redcarpet is an extensible Ruby library for Markdown processing and
3611conversion to (X)HTML.")
7bf837fd 3612 (home-page "https://github.com/vmg/redcarpet")
d93062fd
RW
3613 (license license:expat)))
3614
09924294
CB
3615(define-public ruby-rerun
3616 (package
3617 (name "ruby-rerun")
3618 (version "0.13.0")
3619 (source
3620 (origin
3621 (method url-fetch)
3622 (uri (rubygems-uri "rerun" version))
3623 (sha256
3624 (base32
3625 "1cskvxk8z8vmfail8na7hj91hs0qnvds9nydj04zi3dbddgnbmvz"))))
3626 (build-system ruby-build-system)
3627 (arguments
3628 '(#:tests? #f)) ; No included tests
3629 (propagated-inputs
3630 `(("ruby-listen" ,ruby-listen)))
3631 (synopsis "Run a process, and restart when some monitored files change")
3632 (description
52beae7b 3633 "Rerun is a tool to launch programs, then monitor the file system, and
09924294
CB
3634restart the program when any of the monitored files change. It's written in
3635Ruby, but can be used for all programs.")
3636 (home-page "https://github.com/alexch/rerun/")
3637 (license license:expat)))
3638
8d85543b
MB
3639(define-public ruby-maxitest
3640 (package
3641 (name "ruby-maxitest")
3642 (version "3.6.0")
3643 (home-page "https://github.com/grosser/maxitest")
3644 (source (origin
3645 ;; Pull from git because the gem does not contain tests.
3646 (method git-fetch)
3647 (uri (git-reference
3648 (url home-page)
3649 (commit (string-append "v" version))))
3650 (file-name (git-file-name name version))
3651 (sha256
3652 (base32
3653 "07b3j0bv3dx5j42jlvpvl07aaxplyi6wq688y3jl8y528ww2hjz8"))))
3654 (build-system ruby-build-system)
3655 (arguments
3656 '(#:test-target "default"
3657 #:phases (modify-phases %standard-phases
3658 (replace 'replace-git-ls-files
3659 (lambda _
3660 (substitute* "maxitest.gemspec"
3661 (("`git ls-files lib/ bin/ MIT-LICENSE Readme.md`")
3662 "`find lib/ bin/ MIT-LICENSE Readme.md -type f | sort`"))
3663 #t))
3664 (add-before 'check 'remove-version-constraints
3665 (lambda _
3666 ;; Don't use specific versions of dependencies, instead
3667 ;; take whatever is available in Guix.
3668 (delete-file "Gemfile.lock")
3669 #t))
3670 (add-before 'check 'add-mtest-on-PATH
3671 (lambda _
3672 ;; Tests use 'mtest' which is not automatically added on
3673 ;; PATH.
3674 (setenv "PATH" (string-append (getcwd) "/bin:"
3675 (getenv "PATH")))
3676 #t)))))
3677 (native-inputs
3678 `(("ps" ,procps)
3679 ("ruby-bump" ,ruby-bump)
3680 ("ruby-byebug" ,ruby-byebug)
3681 ("ruby-rspec" ,ruby-rspec)
3682 ("ruby-wwtd" ,ruby-wwtd)))
3683 (propagated-inputs
3684 `(("ruby-minitest" ,ruby-minitest)))
3685 (synopsis "Minitest with extra features")
3686 (description
3687 "Maxitest is a wrapper around Minitest with extra functionality such
3688as timeouts, an @command{mtest} executable that can run tests by line
3689number, support for interrupted tests, better backtraces, and more.")
3690 (license license:expat)))
3691
4f2a52ae
RW
3692(define-public ruby-mocha
3693 (package
3694 (name "ruby-mocha")
2fc3cc24 3695 (version "1.11.2")
4f2a52ae
RW
3696 (source (origin
3697 (method url-fetch)
3698 (uri (rubygems-uri "mocha" version))
3699 (sha256
3700 (base32
2fc3cc24 3701 "0hxmkm8qxd04vwj8mqnpyrf2dwy7g1k9zipdfhl4y71cw7ijm9n4"))))
4f2a52ae
RW
3702 (build-system ruby-build-system)
3703 (arguments
3704 `(#:phases
3705 (modify-phases %standard-phases
2fc3cc24
MB
3706 (add-before 'check 'remove-rubocop-dependency
3707 (lambda _
3708 ;; Disable dependency on Rubocop, which is just a linter,
3709 ;; and would introduce a circular dependency.
3710 (substitute* "mocha.gemspec"
3711 ((".*rubocop.*")
3712 "true\n"))
3713 #t)))))
4f2a52ae 3714 (native-inputs
2fc3cc24 3715 `(("ruby-introspection" ,ruby-introspection)))
4f2a52ae
RW
3716 (synopsis "Mocking and stubbing library for Ruby")
3717 (description
3718 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
3719allows mocking and stubbing of methods on real (non-mock) classes.")
3720 (home-page "http://gofreerange.com/mocha/docs")
e3febab5
MB
3721 ;; Mocha can be used with either license at the users choice.
3722 (license (list license:expat license:ruby))))
4f2a52ae 3723
cf646acf
CB
3724(define-public ruby-mocha-on-bacon
3725 (package
3726 (name "ruby-mocha-on-bacon")
3727 (version "0.2.3")
3728 (source
3729 (origin
3730 (method url-fetch)
3731 (uri (rubygems-uri "mocha-on-bacon" version))
3732 (sha256
3733 (base32
3734 "1h49b33rq889hn8x3wp9byczl91va16jh1w4d2wyy4yj23icdrcp"))))
3735 (build-system ruby-build-system)
3736 (arguments
3737 ;; rubygems.org release missing tests
3738 '(#:tests? #f))
3739 (propagated-inputs `(("ruby-mocha" ,ruby-mocha)))
3740 (synopsis "Mocha adapter for Bacon")
3741 (description
3742 "This package provides a Mocha adapter for Bacon, allowing you to use the
3743Mocha stubbing and mocking library with Bacon, a small RSpec clone.")
3744 (home-page
3745 "https://github.com/alloy/mocha-on-bacon")
3746 (license license:expat)))
3747
2c84ba7e
RW
3748(define-public ruby-net-ssh
3749 (package
3750 (name "ruby-net-ssh")
5803f872 3751 (version "4.2.0")
2c84ba7e
RW
3752 (source (origin
3753 (method url-fetch)
3754 (uri (rubygems-uri "net-ssh" version))
3755 (sha256
3756 (base32
5803f872 3757 "07c4v97zl1daabmri9zlbzs6yvkl56z1q14bw74d53jdj0c17nhx"))))
2c84ba7e
RW
3758 (build-system ruby-build-system)
3759 (native-inputs
a7938625
MB
3760 `(("bundler" ,bundler)
3761 ("ruby-mocha" ,ruby-mocha)
2c84ba7e
RW
3762 ("ruby-test-unit" ,ruby-test-unit)))
3763 (synopsis "Ruby implementation of the SSH2 client protocol")
3764 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
3765client protocol. It allows you to write programs that invoke and interact
3766with processes on remote servers, via SSH2.")
3767 (home-page "https://github.com/net-ssh/net-ssh")
3768 (license license:expat)))
3769
d38755cb
DM
3770(define-public ruby-net-scp
3771 (package
3772 (name "ruby-net-scp")
3773 ;; The 1.2.1 release would be incompatible with ruby-net-ssh >= 4.
3774 (version "1.2.2.rc2")
3775 (source
3776 (origin
e405f996
TGR
3777 (method git-fetch)
3778 (uri (git-reference
b0e7b699 3779 (url "https://github.com/net-ssh/net-scp")
e405f996
TGR
3780 (commit (string-append "v" version))))
3781 (file-name (git-file-name name version))
d38755cb 3782 (sha256
e405f996 3783 (base32 "1nyn17sy71fn7zs3y6wbgcn35318c10flqgc0582409095x4h0sx"))))
d38755cb
DM
3784 (build-system ruby-build-system)
3785 (native-inputs
3786 `(("bundler" ,bundler)
3787 ("ruby-test-unit" ,ruby-test-unit)
3788 ("ruby-mocha" ,ruby-mocha)))
3789 (propagated-inputs
3790 `(("ruby-net-ssh" ,ruby-net-ssh)))
3791 (synopsis "Pure-Ruby SCP client library")
3792 (description "@code{Net::SCP} is a pure-Ruby implementation of the SCP
3793client protocol.")
3794 (home-page "https://github.com/net-ssh/net-scp")
3795 (license license:expat)))
3796
2206e948
DT
3797(define-public ruby-minitest
3798 (package
3799 (name "ruby-minitest")
88a105c1 3800 (version "5.11.3")
2206e948 3801 (source (origin
e83c6d00
DT
3802 (method url-fetch)
3803 (uri (rubygems-uri "minitest" version))
2206e948
DT
3804 (sha256
3805 (base32
88a105c1 3806 "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"))))
2206e948 3807 (build-system ruby-build-system)
2206e948
DT
3808 (native-inputs
3809 `(("ruby-hoe" ,ruby-hoe)))
3810 (synopsis "Small test suite library for Ruby")
3811 (description "Minitest provides a complete suite of Ruby testing
3812facilities supporting TDD, BDD, mocking, and benchmarking.")
3813 (home-page "https://github.com/seattlerb/minitest")
3814 (license license:expat)))
3815
1db6e09f
RW
3816;; This is the last release of Minitest 4, which is used by some packages.
3817(define-public ruby-minitest-4
3818 (package (inherit ruby-minitest)
3819 (version "4.7.5")
3820 (source (origin
3821 (method url-fetch)
3822 (uri (rubygems-uri "minitest" version))
3823 (sha256
3824 (base32
3825 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
3826 (arguments
3827 `(#:phases
3828 (modify-phases %standard-phases
3829 (add-after 'unpack 'remove-unsupported-method
3830 (lambda _
3831 (substitute* "Rakefile"
3832 (("self\\.rubyforge_name = .*") ""))
9a7017eb
BW
3833 #t))
3834 (add-after 'build 'exclude-failing-tests
3835 (lambda _
3836 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
3837 ;; Fixnum.
3838 (delete-file "test/minitest/test_minitest_spec.rb")
3839 #t)))))))
1db6e09f 3840
450a3f7f
CB
3841(define-public ruby-minitest-around
3842 (package
3843 (name "ruby-minitest-around")
3844 (version "0.5.0")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (rubygems-uri "minitest-around" version))
3849 (sha256
3850 (base32
3851 "15ywnqx0719jl9c25yqfshmwcir57i5f4hr1ra9v9vay9ylcwndr"))))
3852 (build-system ruby-build-system)
3853 (arguments
3854 '(#:phases
3855 (modify-phases %standard-phases
3856 (add-after 'extract-gemspec 'remove-unnecessary-dependency-versions
3857 (lambda _
3858 (substitute* "minitest-around.gemspec"
3859 (("%q<cucumber>.*") "%q<cucumber>, [\">= 0\"])\n"))
3860 #t)))))
3861 (propagated-inputs
3862 `(("ruby-minitest" ,ruby-minitest)))
3863 (native-inputs
3864 `(("bundler" ,bundler)
3865 ("ruby-cucumber" ,ruby-cucumber)
3866 ("ruby-bump" ,ruby-bump)
3867 ("ruby-test-construct" ,ruby-test-construct)))
3868 (synopsis "Run code around tests in Minitest")
3869 (description
3870 "This library provides a way to run code around tests in Minitest,
3871written using either the unit test or spec style.")
3872 (home-page "https://github.com/splattael/minitest-around")
3873 (license license:expat)))
3874
35130835
DT
3875(define-public ruby-minitest-sprint
3876 (package
3877 (name "ruby-minitest-sprint")
3878 (version "1.1.0")
3879 (source (origin
e83c6d00
DT
3880 (method url-fetch)
3881 (uri (rubygems-uri "minitest-sprint" version))
35130835
DT
3882 (sha256
3883 (base32
e83c6d00 3884 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
35130835 3885 (build-system ruby-build-system)
35130835
DT
3886 (native-inputs
3887 `(("ruby-hoe" ,ruby-hoe)
3888 ("ruby-minitest" ,ruby-minitest)))
3889 (synopsis "Fast test suite runner for minitest")
3890 (description "Minitest-sprint is a test runner for minitest that makes it
3891easier to re-run individual failing tests.")
3892 (home-page "https://github.com/seattlerb/minitest-sprint")
3893 (license license:expat)))
3894
0808e361
DT
3895(define-public ruby-minitest-bacon
3896 (package
3897 (name "ruby-minitest-bacon")
6f9652b0 3898 (version "1.0.3")
0808e361 3899 (source (origin
e83c6d00
DT
3900 (method url-fetch)
3901 (uri (rubygems-uri "minitest-bacon" version))
0808e361
DT
3902 (sha256
3903 (base32
6f9652b0 3904 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
0808e361 3905 (build-system ruby-build-system)
0808e361
DT
3906 (native-inputs
3907 `(("ruby-hoe" ,ruby-hoe)))
3908 (inputs
3909 `(("ruby-minitest" ,ruby-minitest)))
3910 (synopsis "Bacon compatibility library for minitest")
3911 (description "Minitest-bacon extends minitest with bacon-like
3912functionality, making it easier to migrate test suites from bacon to minitest.")
3913 (home-page "https://github.com/seattlerb/minitest-bacon")
3914 (license license:expat)))
3915
39dc0eb5
BW
3916(define-public ruby-minitest-focus
3917 (package
3918 (name "ruby-minitest-focus")
3919 (version "1.1.2")
3920 (source
3921 (origin
3922 (method url-fetch)
3923 (uri (rubygems-uri "minitest-focus" version))
3924 (sha256
3925 (base32
3926 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
3927 (build-system ruby-build-system)
3928 (propagated-inputs
3929 `(("ruby-minitest" ,ruby-minitest)))
3930 (native-inputs
3931 `(("ruby-hoe" ,ruby-hoe)))
3932 (synopsis "Allows a few specific tests to be focused on")
3933 (description
3934 "@code{minitest-focus} gives the ability focus on a few tests with ease
3935without having to use command-line arguments. It introduces a @code{focus}
3936class method for use in testing classes, specifying that the next defined test
3937is to be run.")
3938 (home-page "https://github.com/seattlerb/minitest-focus")
3939 (license license:expat)))
3940
99fc5cd5
BW
3941(define-public ruby-minitest-pretty-diff
3942 ;; Use git reference because gem is out of date and does not contain testing
3943 ;; script. There are no releases on GitHub.
3944 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
3945 (package
3946 (name "ruby-minitest-pretty-diff")
3947 (version (string-append "0.1-1." (string-take commit 8)))
3948 (source (origin
3949 (method git-fetch)
3950 (uri (git-reference
b0e7b699 3951 (url "https://github.com/adammck/minitest-pretty_diff")
99fc5cd5
BW
3952 (commit commit)))
3953 (file-name (string-append name "-" version "-checkout"))
3954 (sha256
3955 (base32
3956 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
3957 (build-system ruby-build-system)
3958 (arguments
3959 `(#:phases
3960 (modify-phases %standard-phases
3961 (replace 'check
3962 (lambda _
9923d5a4 3963 (invoke "script/test"))))))
99fc5cd5
BW
3964 (native-inputs
3965 `(("bundler" ,bundler)
3966 ("ruby-turn" ,ruby-turn)))
3967 (synopsis "Pretty-print hashes and arrays in MiniTest")
3968 (description
3969 "@code{minitest-pretty_diff} monkey-patches
3970@code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
3971diffing them. This makes it easier to spot differences between nested
3972structures when tests fail.")
3973 (home-page "https://github.com/adammck/minitest-pretty_diff")
3974 (license license:expat))))
3975
685d0d2f
BW
3976(define-public ruby-minitest-moar
3977 (package
3978 (name "ruby-minitest-moar")
3979 (version "0.0.4")
3980 (source
3981 (origin
3982 (method url-fetch)
3983 (uri (rubygems-uri "minitest-moar" version))
3984 (sha256
3985 (base32
3986 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
3987 (build-system ruby-build-system)
3988 (arguments
3989 `(#:phases
3990 (modify-phases %standard-phases
3991 (add-before 'check 'clean-dependencies
3992 (lambda _
3993 ;; Remove all gems defined in the Gemfile because these are not
3994 ;; truly needed.
3995 (substitute* "Gemfile"
3996 (("gem .*") ""))
3997 ;; Remove byebug as not needed to run tests.
3998 (substitute* "test/test_helper.rb"
3999 (("require 'byebug'") ""))
4000 #t)))))
4001 (native-inputs
4002 `(("bundler" ,bundler)
4003 ("ruby-minitest" ,ruby-minitest)))
4004 (synopsis "Extra features and changes to MiniTest")
4005 (description "@code{MiniTest Moar} add some additional features and
4006changes some default behaviours in MiniTest. For instance, Moar replaces the
4007MiniTest @code{Object#stub} with a global @code{stub} method.")
4008 (home-page "https://github.com/dockyard/minitest-moar")
4009 (license license:expat)))
4010
e07ef1d6
BW
4011(define-public ruby-minitest-bonus-assertions
4012 (package
4013 (name "ruby-minitest-bonus-assertions")
c9e261b7 4014 (version "3.0")
e07ef1d6
BW
4015 (source
4016 (origin
4017 (method url-fetch)
4018 (uri (rubygems-uri "minitest-bonus-assertions" version))
4019 (sha256
4020 (base32
c9e261b7 4021 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
e07ef1d6
BW
4022 (build-system ruby-build-system)
4023 (arguments
4024 `(#:phases
4025 (modify-phases %standard-phases
4026 (add-before 'check 'clean-dependencies
4027 (lambda _
4028 ;; Remove unneeded require statement that would entail another
4029 ;; dependency.
4030 (substitute* "test/minitest_config.rb"
4031 (("require 'minitest/bisect'") ""))
4032 #t)))))
4033 (native-inputs
4034 `(("ruby-hoe" ,ruby-hoe)
4035 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
4036 ("ruby-minitest-focus" ,ruby-minitest-focus)
4037 ("ruby-minitest-moar" ,ruby-minitest-moar)))
4038 (synopsis "Bonus assertions for @code{Minitest}")
4039 (description
4040 "Minitest bonus assertions provides extra MiniTest assertions. For
4041instance, it provides @code{assert_true}, @code{assert_false} and
4042@code{assert_set_equal}.")
4043 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
4044 (license license:expat)))
4045
e2c9a9cc
CB
4046(define-public ruby-minitest-reporters
4047 (package
4048 (name "ruby-minitest-reporters")
4049 (version "1.3.6")
4050 (source
4051 (origin
4052 (method url-fetch)
4053 (uri (rubygems-uri "minitest-reporters" version))
4054 (sha256
4055 (base32
4056 "1a3das80rwgys5rj48i5ly144nvszyqyi748bk9bss74jblcf5ay"))))
4057 (build-system ruby-build-system)
4058 (arguments
4059 '(#:phases
4060 (modify-phases %standard-phases
4061 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
4062 ;; including it as an input can lead to circular dependencies.
4063 (add-after 'unpack 'remove-rubocop-from-Rakefile
4064 (lambda _
4065 (substitute* "Rakefile"
4066 (("require 'rubocop/rake\\_task'") "")
4067 (("RuboCop::RakeTask\\.new\\(:rubocop\\)") "[].each"))
4068 #t))
4069 (add-after 'extract-gemspec 'remove-rubocop-from-gemspec
4070 (lambda _
4071 (substitute* "minitest-reporters.gemspec"
4072 ((".*%q<rubocop>.*") "\n"))
4073 #t)))))
4074 (propagated-inputs
4075 `(("ruby-ansi" ,ruby-ansi)
4076 ("ruby-builder" ,ruby-builder)
4077 ("ruby-minitest" ,ruby-minitest)
4078 ("ruby-progressbar" ,ruby-progressbar)))
4079 (native-inputs
4080 `(("bundler" ,bundler)
4081 ("ruby-maruku" ,ruby-maruku)))
4082 (synopsis "Enhanced reporting for Minitest tests")
4083 (description
4084 "@code{minitest/reporters} provides a custom Minitest runner to improve
4085how the test state is reported. A number of different reporters are
4086available, including a spec reporter, progress bar reporter, a HTML
4087reporter.")
4088 (home-page "https://github.com/kern/minitest-reporters")
4089 (license license:expat)))
4090
e582fa93
BW
4091(define-public ruby-minitest-rg
4092 (package
4093 (name "ruby-minitest-rg")
4094 (version "5.2.0")
4095 (source
4096 (origin
4097 (method url-fetch)
4098 (uri (rubygems-uri "minitest-rg" version))
4099 (sha256
4100 (base32
4101 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
4102 (build-system ruby-build-system)
4103 (arguments
4104 ;; Some tests fail even outside Guix, so disable tests.
4105 ;; https://github.com/blowmage/minitest-rg/issues/12
4106 ;; https://github.com/blowmage/minitest-rg/pull/13
4107 `(#:tests? #f))
4108 (propagated-inputs
4109 `(("ruby-minitest" ,ruby-minitest)))
4110 (synopsis "Coloured output for Minitest")
4111 (description
4112 "@code{minitest-rg} changes the colour of the output from Minitest.")
8e486e80 4113 (home-page "https://blowmage.com/minitest-rg/")
e582fa93
BW
4114 (license license:expat)))
4115
2a96dbe6
BW
4116(define-public ruby-minitest-hooks
4117 (package
4118 (name "ruby-minitest-hooks")
eaaf8b12 4119 (version "1.4.2")
2a96dbe6
BW
4120 (source
4121 (origin
4122 (method url-fetch)
4123 (uri (rubygems-uri "minitest-hooks" version))
4124 (sha256
4125 (base32
eaaf8b12 4126 "0lnpvzijbjrvxjc43d155jnbk2mkfshrz22an711wh004scavlzc"))))
2a96dbe6
BW
4127 (build-system ruby-build-system)
4128 (arguments
4129 '(#:test-target "spec"))
4130 (native-inputs
4131 `(("ruby-sequel" ,ruby-sequel)
4132 ("ruby-sqlite3" ,ruby-sqlite3)))
4133 (synopsis "Hooks for the minitest framework")
4134 (description
4135 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
4136@code{around_all} hooks for Minitest. This allows, for instance, running each
4137suite of specs inside a database transaction, running each spec inside its own
4138savepoint inside that transaction. This can significantly speed up testing
4139for specs that share expensive database setup code.")
7bf837fd 4140 (home-page "https://github.com/jeremyevans/minitest-hooks")
2a96dbe6
BW
4141 (license license:expat)))
4142
afbbdf77
DT
4143(define-public ruby-daemons
4144 (package
4145 (name "ruby-daemons")
f03153db 4146 (version "1.2.5")
afbbdf77
DT
4147 (source (origin
4148 (method url-fetch)
e83c6d00 4149 (uri (rubygems-uri "daemons" version))
afbbdf77
DT
4150 (sha256
4151 (base32
f03153db 4152 "15smbsg0gxb7nf0nrlnplc68y0cdy13dm6fviavpmw7c630sring"))))
afbbdf77
DT
4153 (build-system ruby-build-system)
4154 (arguments
4155 `(#:tests? #f)) ; no test suite
4156 (synopsis "Daemonize Ruby programs")
4157 (description "Daemons provides a way to wrap existing Ruby scripts to be
4158run as a daemon and to be controlled by simple start/stop/restart commands.")
4159 (home-page "https://github.com/thuehlinger/daemons")
4160 (license license:expat)))
b03eb6ac
CB
4161
4162(define-public ruby-data_uri
4163 (package
4164 (name "ruby-data_uri")
4165 (version "0.1.0")
4166 (source
4167 (origin
4168 (method url-fetch)
4169 (uri (rubygems-uri "data_uri" version))
4170 (sha256
4171 (base32
4172 "0fzkxgdxrlbfl4537y3n9mjxbm28kir639gcw3x47ffchwsgdcky"))))
4173 (build-system ruby-build-system)
4174 (synopsis "URI class for parsing data URIs")
4175 (description
4176 "Data @acronym{URI, universal resource idenfitier}s allow resources to be
4177embedded inside a URI. The URI::Data class provides support for parsing these
4178URIs using the normal URI.parse method.")
4179 (home-page "https://github.com/dball/data_uri")
4180 (license license:expat)))
66e20863 4181
72c785f9
MB
4182(define-public ruby-deep-merge
4183 (package
4184 (name "ruby-deep-merge")
4185 (version "1.2.1")
4186 (home-page "https://github.com/danielsdeleo/deep_merge")
4187 ;; The Rubygem source does not contain the gemspec required for tests.
4188 (source (origin
4189 (method git-fetch)
4190 (uri (git-reference (url home-page) (commit version)))
4191 (file-name (git-file-name name version))
4192 (sha256
4193 (base32
4194 "0c9rk23ilhc0n4489y6lda2wzphpzh6ish6fahlbpjhxn82wb931"))))
4195 (build-system ruby-build-system)
4196 (native-inputs
4197 `(("ruby-minitest" ,ruby-minitest)))
4198 (synopsis "Recursively merge hashes")
4199 (description
4200 "Deep Merge is a set of utility functions for @code{Hash}. It permits
4201you to merge elements inside a hash together recursively.")
4202 (license license:expat)))
4203
66e20863
DT
4204(define-public ruby-git
4205 (package
4206 (name "ruby-git")
ceaff59e 4207 (version "1.3.0")
66e20863
DT
4208 (source (origin
4209 (method url-fetch)
e83c6d00 4210 (uri (rubygems-uri "git" version))
66e20863
DT
4211 (sha256
4212 (base32
ceaff59e 4213 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
66e20863
DT
4214 (build-system ruby-build-system)
4215 (arguments
e83c6d00
DT
4216 `(#:tests? #f ; no tests
4217 #:phases (modify-phases %standard-phases
4218 (add-after 'install 'patch-git-binary
4219 (lambda* (#:key inputs outputs #:allow-other-keys)
66e20863
DT
4220 ;; Make the default git binary an absolute path to the
4221 ;; store.
e83c6d00
DT
4222 (let ((git (string-append (assoc-ref inputs "git")
4223 "/bin/git"))
3cb3fa67
CB
4224 (config (string-append
4225 (assoc-ref outputs "out")
4226 "/lib/ruby/vendor_ruby/gems/git-"
4227 ,version "/lib/git/config.rb")))
e83c6d00 4228 (substitute* (list config)
66e20863
DT
4229 (("'git'")
4230 (string-append "'" git "'")))
e83c6d00 4231 #t))))))
66e20863
DT
4232 (inputs
4233 `(("git" ,git)))
4234 (synopsis "Ruby wrappers for Git")
4235 (description "Ruby/Git is a Ruby library that can be used to create, read
4236and manipulate Git repositories by wrapping system calls to the git binary.")
4237 (home-page "https://github.com/schacon/ruby-git")
4238 (license license:expat)))
71d3e2c2 4239
95598153
MB
4240(define-public ruby-hocon
4241 (package
4242 (name "ruby-hocon")
fd13ec5f 4243 (version "1.3.1")
95598153
MB
4244 (home-page "https://github.com/puppetlabs/ruby-hocon")
4245 (source (origin
4246 (method git-fetch)
4247 (uri (git-reference (url home-page) (commit version)))
4248 (file-name (git-file-name name version))
4249 (sha256
4250 (base32
fd13ec5f 4251 "172hh2zr0n9nnszv0qvlgwszgkrq84yahrg053m68asy79zpmbqr"))))
95598153
MB
4252 (build-system ruby-build-system)
4253 (arguments
4254 '(#:phases (modify-phases %standard-phases
4255 (replace 'check
4256 (lambda* (#:key tests? #:allow-other-keys)
4257 (if tests?
4258 (invoke "rspec")
4259 (format #t "test suite not run~%"))
4260 #t)))))
4261 (native-inputs
4262 `(("bundler" ,bundler)
4263 ("ruby-rspec" ,ruby-rspec)))
4264 (synopsis "HOCON config library")
4265 (description
4266 "This package provides Ruby support for the @acronym{HOCON,
4267Human-Optimized Config Object Notation} configuration file format. It
4268supports parsing and modifying HOCON and JSON files, and rendering parsed
4269objects back to a @code{String}.")
4270 (license license:asl2.0)))
4271
71d3e2c2
DT
4272(define-public ruby-slop
4273 (package
4274 (name "ruby-slop")
d14e5eaa 4275 (version "4.5.0")
71d3e2c2
DT
4276 (source (origin
4277 (method url-fetch)
e83c6d00 4278 (uri (rubygems-uri "slop" version))
71d3e2c2
DT
4279 (sha256
4280 (base32
d14e5eaa 4281 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
71d3e2c2
DT
4282 (build-system ruby-build-system)
4283 (native-inputs
4284 `(("ruby-minitest" ,ruby-minitest)))
4285 (synopsis "Ruby command line option parser")
4286 (description "Slop provides a Ruby domain specific language for gathering
4287options and parsing command line flags.")
4288 (home-page "https://github.com/leejarvis/slop")
4289 (license license:expat)))
e778a549 4290
5337f8b9
DT
4291(define-public ruby-slop-3
4292 (package (inherit ruby-slop)
4293 (version "3.6.0")
4294 (source (origin
4295 (method url-fetch)
4296 (uri (rubygems-uri "slop" version))
4297 (sha256
4298 (base32
4299 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
4300
ca914b5b
CB
4301(define-public ruby-multi-xml
4302 (package
4303 (name "ruby-multi-xml")
4304 (version "0.6.0")
4305 (source
4306 (origin
4307 (method url-fetch)
4308 (uri (rubygems-uri "multi_xml" version))
4309 (sha256
4310 (base32
4311 "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj"))))
4312 (build-system ruby-build-system)
4313 (arguments
4314 '(#:tests? #f)) ; No included tests
4315 (synopsis "Swappable XML backends for Ruby")
4316 (description
4317 "@code{MultiXml} provides swappable XML backends utilizing either LibXML,
4318Nokogiri, Ox, or REXML.")
4319 (home-page "https://github.com/sferik/multi_xml")
4320 (license license:expat)))
4321
e778a549
DT
4322(define-public ruby-multipart-post
4323 (package
4324 (name "ruby-multipart-post")
4325 (version "2.0.0")
4326 (source (origin
4327 (method url-fetch)
e83c6d00 4328 (uri (rubygems-uri "multipart-post" version))
e778a549
DT
4329 (sha256
4330 (base32
e83c6d00 4331 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
e778a549
DT
4332 (build-system ruby-build-system)
4333 (native-inputs
4334 `(("bundler" ,bundler)))
4335 (synopsis "Multipart POST library for Ruby")
4336 (description "Multipart-Post Adds multipart POST capability to Ruby's
4337net/http library.")
4338 (home-page "https://github.com/nicksieger/multipart-post")
4339 (license license:expat)))
f8da3af0 4340
9a97e7ce
CB
4341(define-public ruby-multi-json
4342 (package
4343 (name "ruby-multi-json")
1b6f5475 4344 (version "1.13.1")
9a97e7ce
CB
4345 (source
4346 (origin
b872b47b 4347 (method git-fetch)
1b6f5475
BW
4348 ;; Tests are not distributed at rubygems.org so download from GitHub
4349 ;; instead.
b872b47b
EF
4350 (uri (git-reference
4351 (url "https://github.com/intridea/multi_json")
4352 (commit (string-append "v" version))))
4353 (file-name (git-file-name name version))
9a97e7ce
CB
4354 (sha256
4355 (base32
b872b47b 4356 "18wpb6p01rrkl4v33byh70vxj2a5jxkfxzv3pz8z6pssy4ymwkm4"))))
9a97e7ce
CB
4357 (build-system ruby-build-system)
4358 (arguments
1b6f5475
BW
4359 `(#:phases
4360 (modify-phases %standard-phases
4361 (add-after 'unpack 'remove-signing-key-reference
4362 (lambda _
4363 (substitute* "multi_json.gemspec"
4364 ((".*spec.signing_key.*") ""))
4365 #t)))))
4366 (native-inputs
4367 `(("bundler" ,bundler)
4368 ("ruby-rspec" ,ruby-rspec)
4369 ("ruby-yard" ,ruby-yard)
4370 ("ruby-json-pure" ,ruby-json-pure)
4371 ("ruby-oj" ,ruby-oj)
4372 ("ruby-yajl-ruby" ,ruby-yajl-ruby)))
9a97e7ce
CB
4373 (synopsis "Common interface to multiple JSON libraries for Ruby")
4374 (description
4375 "This package provides a common interface to multiple JSON libraries,
4376including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
4377NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
1b6f5475 4378 (home-page "https://github.com/intridea/multi_json")
9a97e7ce
CB
4379 (license license:expat)))
4380
5edef88b
BW
4381(define-public ruby-multi-test
4382 (package
4383 (name "ruby-multi-test")
4384 (version "0.1.2")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (rubygems-uri "multi_test" version))
4389 (sha256
4390 (base32
4391 "1sx356q81plr67hg16jfwz9hcqvnk03bd9n75pmdw8pfxjfy1yxd"))))
4392 (build-system ruby-build-system)
4393 (arguments
4394 '(;; Tests require different sets of specific gem versions to be available,
4395 ;; and there is no gemfile that specifies the newest versions of
4396 ;; dependencies to be tested.
4397 #:tests? #f))
4398 (synopsis
4399 "Interface to testing libraries loaded into a running Ruby process")
4400 (description
4401 "@code{multi_test} provides a uniform interface onto whatever testing
4402libraries that have been loaded into a running Ruby process to help control
4403rogue test/unit/autorun requires.")
4404 (home-page "https://github.com/cucumber/multi_test")
9a97e7ce
CB
4405 (license license:expat)))
4406
f8da3af0
DT
4407(define-public ruby-arel
4408 (package
4409 (name "ruby-arel")
aecd533d 4410 (version "9.0.0")
f8da3af0
DT
4411 (source (origin
4412 (method url-fetch)
4413 (uri (rubygems-uri "arel" version))
4414 (sha256
4415 (base32
aecd533d 4416 "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"))))
f8da3af0
DT
4417 (build-system ruby-build-system)
4418 (arguments '(#:tests? #f)) ; no tests
4419 (home-page "https://github.com/rails/arel")
4420 (synopsis "SQL AST manager for Ruby")
6f23e2fb
TGR
4421 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
4422Ruby. It simplifies the generation of complex SQL queries and adapts to
4423various relational database implementations.")
f8da3af0 4424 (license license:expat)))
616eaead 4425
554bf4f6
CB
4426(define-public ruby-marcel
4427 (package
4428 (name "ruby-marcel")
4429 (version "0.3.3")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (rubygems-uri "marcel" version))
4434 (sha256
4435 (base32
4436 "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"))))
4437 (build-system ruby-build-system)
4438 (arguments
4439 '(;; No included tests
4440 #:tests? #f))
4441 (propagated-inputs
4442 `(("ruby-mimemagic" ,ruby-mimemagic)))
4443 (synopsis "MIME type detection using magic numbers, filenames and extensions")
4444 (description
4445 "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail
4446Extensions} type detection using magic numbers, filenames, and extensions")
4447 (home-page "https://github.com/basecamp/marcel")
4448 (license license:expat)))
4449
616eaead 4450(define-public ruby-minitar
bfaf8efd
BW
4451 ;; We package from the GitHub source to fix the security issue reported at
4452 ;; https://github.com/halostatue/minitar/issues/16.
4453 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
4454 (package
4455 (name "ruby-minitar")
4456 (version (string-append "0.5.4-1." (string-take commit 8)))
4457 (source
4458 (origin
4459 (method git-fetch)
4460 (uri (git-reference
b0e7b699 4461 (url "https://github.com/halostatue/minitar")
bfaf8efd
BW
4462 (commit commit)))
4463 (file-name (string-append name "-" version "-checkout"))
4464 (sha256
4465 (base32
4466 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
4467 (build-system ruby-build-system)
4468 (arguments
4469 '(#:tests? #f)) ; missing a gemspec
4470 (synopsis "Ruby library and utility for handling tar archives")
4471 (description
4472 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
616eaead 4473that provides the ability to deal with POSIX tar archive files.")
bfaf8efd
BW
4474 (home-page "http://www.github.com/atoulme/minitar")
4475 (license (list license:gpl2+ license:ruby)))))
bea1c0e2
DT
4476
4477(define-public ruby-mini-portile
4478 (package
4479 (name "ruby-mini-portile")
4480 (version "0.6.2")
4481 (source
4482 (origin
4483 (method url-fetch)
4484 (uri (rubygems-uri "mini_portile" version))
4485 (sha256
4486 (base32
4487 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
4488 (build-system ruby-build-system)
4489 (arguments
4490 '(#:tests? #f)) ; tests require network access
4491 (synopsis "Ports system for Ruby developers")
4492 (description "Mini-portile is a port/recipe system for Ruby developers.
4493It provides a standard way to compile against specific versions of libraries
4494to reproduce user environments.")
7bf837fd 4495 (home-page "https://github.com/flavorjones/mini_portile")
bea1c0e2 4496 (license license:expat)))
e920bfca 4497
d000fc92
BW
4498(define-public ruby-mini-portile-2
4499 (package (inherit ruby-mini-portile)
a88ac044 4500 (version "2.4.0")
d000fc92
BW
4501 (source (origin
4502 (method url-fetch)
4503 (uri (rubygems-uri "mini_portile2" version))
4504 (sha256
4505 (base32
a88ac044 4506 "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"))))))
d000fc92 4507
e920bfca
DT
4508(define-public ruby-nokogiri
4509 (package
4510 (name "ruby-nokogiri")
62cc7344 4511 (version "1.10.9")
e920bfca
DT
4512 (source (origin
4513 (method url-fetch)
4514 (uri (rubygems-uri "nokogiri" version))
4515 (sha256
4516 (base32
62cc7344 4517 "12j76d0bp608932xkzmfi638c7aqah57l437q8494znzbj610qnm"))))
e920bfca
DT
4518 (build-system ruby-build-system)
4519 (arguments
4520 ;; Tests fail because Nokogiri can only test with an installed extension,
4521 ;; and also because many test framework dependencies are missing.
7b01f250 4522 `(#:tests? #f
e920bfca
DT
4523 #:gem-flags (list "--" "--use-system-libraries"
4524 (string-append "--with-xml2-include="
4525 (assoc-ref %build-inputs "libxml2")
5e7f1b0b
BW
4526 "/include/libxml2" ))
4527 #:phases
4528 (modify-phases %standard-phases
7b01f250
BW
4529 (add-before 'build 'patch-extconf
4530 ;; 'pkg-config' is not included in the GEM_PATH during
4531 ;; installation, so we add it directly to the load path.
4532 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 4533 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config")))
7b01f250
BW
4534 (substitute* "ext/nokogiri/extconf.rb"
4535 (("gem 'pkg-config'.*")
4536 (string-append "$:.unshift '"
3cb3fa67 4537 pkg-config "/lib/ruby/vendor_ruby"
7b01f250
BW
4538 "/gems/pkg-config-"
4539 ,(package-version ruby-pkg-config)
4540 "/lib'\n"))))
5e7f1b0b 4541 #t)))))
e920bfca 4542 (native-inputs
7b01f250 4543 `(("ruby-hoe" ,ruby-hoe)))
e920bfca
DT
4544 (inputs
4545 `(("zlib" ,zlib)
4546 ("libxml2" ,libxml2)
4547 ("libxslt" ,libxslt)))
4548 (propagated-inputs
7b01f250
BW
4549 `(("ruby-mini-portile" ,ruby-mini-portile-2)
4550 ("ruby-pkg-config" ,ruby-pkg-config)))
e920bfca
DT
4551 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
4552 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
4553both CSS3 selector and XPath 1.0 support.")
4554 (home-page "http://www.nokogiri.org/")
4555 (license license:expat)))
30b0b725
DT
4556
4557(define-public ruby-method-source
4558 (package
4559 (name "ruby-method-source")
ec08f469 4560 (version "1.0.0")
30b0b725
DT
4561 (source
4562 (origin
4563 (method url-fetch)
4564 (uri (rubygems-uri "method_source" version))
4565 (sha256
4566 (base32
ec08f469 4567 "1pnyh44qycnf9mzi1j6fywd5fkskv3x7nmsqrrws0rjn5dd4ayfp"))))
30b0b725 4568 (build-system ruby-build-system)
c8355037
BW
4569 (arguments
4570 `(#:test-target "spec"))
30b0b725 4571 (native-inputs
c8355037 4572 `(("ruby-rspec" ,ruby-rspec)
30b0b725
DT
4573 ("git" ,git)))
4574 (synopsis "Retrieve the source code for Ruby methods")
4575 (description "Method_source retrieves the source code for Ruby methods.
4576Additionally, it can extract source code from Proc and Lambda objects or just
4577extract comments.")
4578 (home-page "https://github.com/banister/method_source")
4579 (license license:expat)))
2e3fdea4
DT
4580
4581(define-public ruby-coderay
4582 (package
4583 (name "ruby-coderay")
5cf0997a 4584 (version "1.1.2")
2e3fdea4
DT
4585 (source
4586 (origin
4587 (method url-fetch)
4588 (uri (rubygems-uri "coderay" version))
4589 (sha256
4590 (base32
5cf0997a 4591 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
2e3fdea4
DT
4592 (build-system ruby-build-system)
4593 (arguments
4594 '(#:tests? #f)) ; missing test files
4595 (synopsis "Ruby syntax highlighting library")
4596 (description "Coderay is a Ruby library that provides syntax highlighting
4597for select languages.")
4598 (home-page "http://coderay.rubychan.de")
4599 (license license:expat)))
96e76083 4600
f9083965
MC
4601(define-public ruby-cuke-modeler
4602 (package
4603 (name "ruby-cuke-modeler")
4604 (version "3.1.0")
4605 (source
4606 (origin
4607 (method url-fetch)
4608 (uri (rubygems-uri "cuke_modeler" version))
4609 (sha256
4610 (base32
4611 "19smj3g3wvz0203l549sadpcxgh0ir350a6k78gq0bmlv9cchmjb"))))
4612 (build-system ruby-build-system)
4613 (arguments `(#:tests? #f)) ;no test suite in gem
4614 (propagated-inputs
4615 `(("ruby-gherkin" ,ruby-gherkin)))
4616 (synopsis "Gherkin test suite analysis tool")
4617 (description "CukeModeler facilitates modeling a test suite that is
4618written in Gherkin (e.g. Cucumber, SpecFlow, Lettuce, etc.). It does this by
4619providing an abstraction layer on top of the Abstract Syntax Tree (AST) that
4620the @code{cucumber-gherkin} generates when parsing features, as well as
4621providing models for feature files and directories in order to be able to have
4622a fully traversable model tree of a test suite's structure. These models can
4623then be analyzed or manipulated more easily than the underlying AST layer.")
4624 (home-page "https://github.com/enkessler/cuke_modeler")
4625 (license license:expat)))
4626
2156cc9c
MB
4627(define-public ruby-parallel-tests
4628 (package
4629 (name "ruby-parallel-tests")
8a01e2fa 4630 (version "3.0.0")
2156cc9c
MB
4631 (home-page "https://github.com/grosser/parallel_tests")
4632 (source (origin
4633 (method git-fetch)
4634 (uri (git-reference
4635 (url home-page)
4636 (commit (string-append "v" version))))
4637 (file-name (string-append name version))
4638 (sha256
4639 (base32
8a01e2fa 4640 "08a6ndqn2dqacmc7yg48k0dh2rfrynvhkd5hiay16dl9m1r9q8pz"))))
2156cc9c
MB
4641 (build-system ruby-build-system)
4642 (arguments
4643 '(#:test-target "default"
4644 #:phases (modify-phases %standard-phases
4645 (add-after 'patch-source-shebangs 'patch-shell-invokations
4646 (lambda _
4647 (substitute* '("lib/parallel_tests/tasks.rb"
4648 "spec/parallel_tests/tasks_spec.rb")
4649 (("/bin/sh") (which "sh"))
4650 (("/bin/bash") (which "bash")))
4651 #t))
4652 (add-before 'check 'remove-version-constraints
4653 (lambda _
4654 ;; Remove hard coded version constraints, instead just
4655 ;; use whatever versions are available in Guix.
4656 (delete-file "Gemfile.lock")
4657 (substitute* "Gemfile"
4658 (("'minitest',.*")
4659 "'minitest'\n")
4660 (("'cucumber',.*")
4661 "'cucumber'\n"))
4662 #t))
4663 (add-before 'check 'disable-rails-test
4664 (lambda _
4665 ;; XXX: This test attempts to download and run the test
4666 ;; suites of multiple Rails versions(!) directly.
4667 (delete-file "spec/rails_spec.rb")
4668 #t))
4669 (add-before 'check 'set-HOME
4670 (lambda _
4671 ;; Some tests check the output of Bundler, and fail when
4672 ;; Bundler warns that /homeless-shelter does not exist.
4673 (setenv "HOME" "/tmp")
4674 #t)))))
4675 (native-inputs
4676 `(("ruby-bump" ,ruby-bump)
4677 ("ruby-cucumber" ,ruby-cucumber)
8a01e2fa 4678 ("ruby-cuke-modeler" ,ruby-cuke-modeler)
2156cc9c
MB
4679 ("ruby-minitest" ,ruby-minitest)
4680 ("ruby-rake" ,ruby-rake)
4681 ("ruby-rspec" ,ruby-rspec)
4682 ("ruby-spinach" ,ruby-spinach)))
4683 (propagated-inputs
4684 `(("ruby-parallel" ,ruby-parallel)))
4685 (synopsis "Run tests in parallel")
4686 (description
4687 "This package can speed up @code{Test::Unit}, @code{RSpec},
4688@code{Cucumber}, and @code{Spinach} tests by running them concurrently
4689across multiple CPU cores.")
4690 (license license:expat)))
4691
54993457
CB
4692(define-public ruby-parser
4693 (package
4694 (name "ruby-parser")
4695 (version "2.6.0.0")
4696 (source
4697 (origin
4698 (method url-fetch)
4699 (uri (rubygems-uri "parser" version))
4700 (sha256
4701 (base32
4702 "1hhz2k5417vr2k1llwqgjdnmyrhlpqicy0y2arr6r1gp04fg9wlm"))))
4703 (build-system ruby-build-system)
4704 (native-inputs
4705 `(("bundler" ,bundler)
4706 ("ruby-cliver" ,ruby-cliver)
4707 ("ruby-simplecov" ,ruby-simplecov)
4708 ("ruby-racc" ,ruby-racc)))
4709 (inputs
4710 `(("ragel" ,ragel)))
4711 (propagated-inputs
4712 `(("ruby-ast" ,ruby-ast)))
4713 (synopsis "Ruby parser written in pure Ruby")
4714 (description
4715 "This package provides a Ruby parser written in pure Ruby.")
4716 (home-page "https://github.com/whitequark/parser")
4717 (license license:expat)))
4718
a8cdfd53
MC
4719(define-public ruby-sexp-processor
4720 (package
4721 (name "ruby-sexp-processor")
4722 (version "4.15.0")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (rubygems-uri "sexp_processor" version))
4727 (sha256
4728 (base32
4729 "0d1vks77xnd0m3s94a58f9bkdwlaml5qdkmprx279m2s0pc2gv55"))))
4730 (build-system ruby-build-system)
4731 (native-inputs
4732 ;; TODO: Add ruby-minitest-proveit once available.
4733 `(("hoe" ,ruby-hoe)))
4734 (synopsis "ParseTree fork which includes generic S-exp processing tools")
4735 (description "The sexp_processor package is derived from ParseTree, but
4736contrary to ParseTree, it includes all the generic S-exp processing tools.
4737Amongst the included tools are @code{Sexp}, @code{SexpProcessor} and
4738@code{Environment}")
4739 (home-page "https://github.com/seattlerb/sexp_processor")
4740 (license license:expat)))
4741
24be6751
MC
4742(define-public ruby-ruby-parser
4743 (package
4744 (name "ruby-ruby-parser")
4745 (version "3.14.2")
4746 (source
4747 (origin
4748 (method url-fetch)
4749 (uri (rubygems-uri "ruby_parser" version))
4750 (sha256
4751 (base32
4752 "09qcdyjjw3p7g6cjm5m9swkms1xnv35ndiy7yw24cas16qrhha6c"))))
4753 (build-system ruby-build-system)
4754 (native-inputs
4755 `(("hoe" ,ruby-hoe)
4756 ("racc" ,ruby-racc)
4757 ("unifdef" ,unifdef)))
4758 (propagated-inputs
4759 `(("ruby-sexp-processor" ,ruby-sexp-processor)))
4760 (home-page "https://github.com/seattlerb/ruby_parser/")
4761 (synopsis "Ruby parser written in pure Ruby")
4762 (description "The ruby_parser (RP) package provides a Ruby parser written
4763in pure Ruby. It outputs S-expressions which can be manipulated and converted
4764back to Ruby via the @code{ruby2ruby} library.")
4765 (license license:expat)))
4766
16f423cb
CB
4767(define-public ruby-prawn-manual-builder
4768 (package
4769 (name "ruby-prawn-manual-builder")
1d4f0019 4770 (version "0.3.1")
16f423cb
CB
4771 (source
4772 (origin
4773 (method url-fetch)
4774 (uri (rubygems-uri "prawn-manual_builder" version))
4775 (sha256
1d4f0019 4776 (base32 "1vlg5w7wq43g2hgpgra2nrcxj1kb4ayqliz4gmja2rhs037j2vzs"))))
16f423cb
CB
4777 (build-system ruby-build-system)
4778 (arguments
1d4f0019 4779 '(#:tests? #f ; no included tests
16f423cb
CB
4780 #:phases
4781 (modify-phases %standard-phases
4782 (add-after 'extract-gemspec 'patch-gemspec
4783 (lambda _
4784 (substitute* ".gemspec"
4785 ;; Loosen the requirement for pdf-inspector
4786 (("~> 1\\.0\\.7") ">= 0")))))))
4787 (propagated-inputs
4788 `(("ruby-coderay" ,ruby-coderay)))
4789 (synopsis "Tool for writing manuals for Prawn and Prawn accessories")
4790 (description
4791 "This package provides a tool for writing manuals for Prawn and Prawn
4792accessories")
4793 (home-page "https://github.com/prawnpdf/prawn-manual_builder")
cc10ca33 4794 (license %prawn-project-licenses)))
16f423cb 4795
268643b9
CB
4796(define-public ruby-progress_bar
4797 (package
4798 (name "ruby-progress_bar")
4799 (version "1.1.0")
4800 (source
4801 (origin
4802 (method url-fetch)
4803 (uri (rubygems-uri "progress_bar" version))
4804 (sha256
4805 (base32
4806 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
4807 (build-system ruby-build-system)
4808 (arguments
4809 '(#:test-target "spec"))
4810 (propagated-inputs
4811 `(("ruby-highline" ,ruby-highline)
4812 ("ruby-options" ,ruby-options)))
4813 (native-inputs
4814 `(("bundler" ,bundler)
4815 ("ruby-rspec" ,ruby-rspec)
4816 ("ruby-timecop" ,ruby-timecop)))
4817 (synopsis
4818 "Ruby library for displaying progress bars")
4819 (description
4820 "ProgressBar is a simple library for displaying progress bars. The
4821maximum value is configurable, and additional information can be displayed
4822like the percentage completion, estimated time remaining, elapsed time and
4823rate.")
4824 (home-page "https://github.com/paul/progress_bar")
4825 (license license:wtfpl2)))
4826
95f85d44
CB
4827(define-public ruby-dep
4828 (package
4829 (name "ruby-dep")
4830 (version "1.5.0")
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (rubygems-uri "ruby_dep" version))
4835 (sha256
4836 (base32
4837 "1c1bkl97i9mkcvkn1jks346ksnvnnp84cs22gwl0vd7radybrgy5"))))
4838 (build-system ruby-build-system)
4839 (arguments
4840 '(#:tests? #f)) ; No included tests
4841 (synopsis "Creates a version constraint of supported Rubies")
4842 (description
4843 "This package helps create a version constraint of supported Rubies,
4844suitable for a gemspec file.")
4845 (home-page "https://github.com/e2/ruby_dep")
4846 (license license:expat)))
4847
158a9253
CB
4848(define-public ruby-progressbar
4849 (package
4850 (name "ruby-progressbar")
2d2a2363 4851 (version "1.10.1")
158a9253
CB
4852 (source
4853 (origin
4854 (method url-fetch)
4855 (uri (rubygems-uri "ruby-progressbar" version))
4856 (sha256
2d2a2363 4857 (base32 "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf"))))
158a9253
CB
4858 (build-system ruby-build-system)
4859 (arguments
4860 '(;; TODO: There looks to be a circular dependency with ruby-fuubar.
4861 #:tests? #f))
4862 (synopsis "Text progress bar library for Ruby")
4863 (description
4864 "Ruby/ProgressBar is an flexible text progress bar library for Ruby.
4865The output can be customized with a formatting system.")
4866 (home-page "https://github.com/jfelchner/ruby-progressbar")
4867 (license license:expat)))
4868
96e76083
DT
4869(define-public ruby-pry
4870 (package
4871 (name "ruby-pry")
a0d93c17 4872 (version "0.13.1")
96e76083
DT
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (rubygems-uri "pry" version))
4877 (sha256
4878 (base32
a0d93c17 4879 "0iyw4q4an2wmk8v5rn2ghfy2jaz9vmw2nk8415nnpx2s866934qk"))))
96e76083
DT
4880 (build-system ruby-build-system)
4881 (arguments
4882 '(#:tests? #f)) ; no tests
4883 (propagated-inputs
4884 `(("ruby-coderay" ,ruby-coderay)
1960d4fd 4885 ("ruby-method-source" ,ruby-method-source)))
96e76083
DT
4886 (synopsis "Ruby REPL")
4887 (description "Pry is an IRB alternative and runtime developer console for
4888Ruby. It features syntax highlighting, a plugin architecture, runtime
4889invocation, and source and documentation browsing.")
a0d93c17 4890 (home-page "https://cobaltbluemedia.com/pryrepl/")
96e76083 4891 (license license:expat)))
1415792a 4892
def7908a
MB
4893(define-public ruby-single-cov
4894 (package
4895 (name "ruby-single-cov")
4896 (version "1.3.2")
4897 (home-page "https://github.com/grosser/single_cov")
4898 (source (origin
4899 (method git-fetch)
4900 (uri (git-reference (url home-page)
4901 (commit (string-append "v" version))))
4902 (file-name (git-file-name name version))
4903 (sha256
4904 (base32
4905 "05qdzpcai1p23a120gb9bxkfl4y73k9hicx34ch2lsk31lgi9bl7"))))
4906 (build-system ruby-build-system)
4907 (arguments
4908 '(#:test-target "default"
4909 #:phases (modify-phases %standard-phases
4910 (replace 'replace-git-ls-files
4911 (lambda _
4912 (substitute* "single_cov.gemspec"
4913 (("`git ls-files lib/ bin/ MIT-LICENSE`")
4914 "`find lib/ bin/ MIT-LICENSE -type f | sort`"))
4915 #t))
4916 (add-before 'check 'remove-version-constraints
4917 (lambda _
4918 (delete-file "Gemfile.lock")
4919 #t))
4920 (add-before 'check 'make-files-writable
4921 (lambda _
4922 ;; Tests need to create local directories and open files
4923 ;; with write permissions.
4924 (for-each make-file-writable
4925 (find-files "specs" #:directories? #t))
4926 #t))
4927 (add-before 'check 'disable-failing-test
4928 (lambda _
4929 ;; XXX: This test copies assets from minitest, but can
4930 ;; not cope with the files being read-only. Just skip
4931 ;; it for now.
4932 (substitute* "specs/single_cov_spec.rb"
4933 (("it \"complains when coverage is bad\"")
4934 "xit \"complains when coverage is bad\""))
4935 #t)))))
4936 (native-inputs
4937 `(("ruby-bump" ,ruby-bump)
4938 ("ruby-minitest" ,ruby-minitest)
4939 ("ruby-rspec" ,ruby-rspec)
4940 ("ruby-simplecov" ,ruby-simplecov)))
4941 (synopsis "Code coverage reporting tool")
4942 (description
4943 "This package provides actionable code coverage reports for Ruby
4944projects. It has very little overhead and can be easily integrated with
4945development tools to catch coverage problems early.")
4946 (license license:expat)))
4947
051deeb7
RW
4948(define-public ruby-guard
4949 (package
4950 (name "ruby-guard")
4951 (version "2.13.0")
4952 (source (origin
3c6128f6 4953 (method git-fetch)
051deeb7
RW
4954 ;; The gem does not include a Rakefile, nor does it contain a
4955 ;; gemspec file, nor does it come with the tests. This is why
4956 ;; we fetch the tarball from Github.
3c6128f6
EF
4957 (uri (git-reference
4958 (url "https://github.com/guard/guard")
4959 (commit (string-append "v" version))))
4960 (file-name (git-file-name name version))
051deeb7
RW
4961 (sha256
4962 (base32
3c6128f6 4963 "16pxcszr0g2jnl3090didxh1d8z5m2mly14m3w4rspb8fmclsnjs"))))
051deeb7
RW
4964 (build-system ruby-build-system)
4965 (arguments
4966 `(#:tests? #f ; tests require cucumber
4967 #:phases
4968 (modify-phases %standard-phases
4969 (add-after 'unpack 'remove-git-ls-files
4970 (lambda* (#:key outputs #:allow-other-keys)
4971 (substitute* "guard.gemspec"
4972 (("git ls-files -z") "find . -type f -print0"))
4973 #t))
4974 (replace 'build
4975 (lambda _
9923d5a4 4976 (invoke "gem" "build" "guard.gemspec"))))))
051deeb7
RW
4977 (propagated-inputs
4978 `(("ruby-formatador" ,ruby-formatador)
4979 ("ruby-listen" ,ruby-listen)
4980 ("ruby-lumberjack" ,ruby-lumberjack)
4981 ("ruby-nenv" ,ruby-nenv)
4982 ("ruby-notiffany" ,ruby-notiffany)
4983 ("ruby-pry" ,ruby-pry)
4984 ("ruby-shellany" ,ruby-shellany)
4985 ("ruby-thor" ,ruby-thor)))
4986 (native-inputs
4987 `(("bundler" ,bundler)
4988 ("ruby-rspec" ,ruby-rspec)))
4989 (synopsis "Tool to handle events on file system modifications")
4990 (description
4991 "Guard is a command line tool to easily handle events on file system
4992modifications. Guard automates various tasks by running custom rules whenever
4993file or directories are modified.")
3c6128f6 4994 (home-page "https://guardgem.org/")
051deeb7
RW
4995 (license license:expat)))
4996
c09bc60d
MB
4997(define-public ruby-spinach
4998 (package
4999 (name "ruby-spinach")
5000 (version "0.11.0")
702a1012 5001 (home-page "https://github.com/codegram/spinach")
c09bc60d
MB
5002 (source (origin
5003 (method url-fetch)
5004 (uri (rubygems-uri "spinach" version))
5005 (sha256
5006 (base32
5007 "1mv053mqz9c8ngqa6wp1ymk2fax6j0yqzax6918akrdr7c3fx3c6"))))
5008 (build-system ruby-build-system)
5009 (arguments
5010 ;; FIXME: Disable tests altogether because they depend on 'capybara'
5011 ;; which in turn depends on many other unpackaged gems. Enable once
5012 ;; capybara is available.
5013 '(#:tests? #f))
5014 (propagated-inputs
5015 `(("ruby-colorize" ,ruby-colorize)
5016 ("ruby-gherkin-ruby" ,ruby-gherkin-ruby)
5017 ("ruby-json" ,ruby-json)))
5018 (synopsis "Gherkin-based BDD framework")
5019 (description
5020 "Spinach is a high-level @acronym{BDD, Behavior-driven development}
5021framework that leverages the expressive @code{Gherkin} language to help you
5022define executable specifications of your code.")
5023 (license license:expat)))
5024
bcbb3cc9
CB
5025(define-public ruby-tilt
5026 (package
5027 (name "ruby-tilt")
c3f15f54 5028 (version "2.0.10")
bcbb3cc9
CB
5029 (source
5030 (origin
c3f15f54
MC
5031 (method git-fetch) ;the distributed gem lacks tests
5032 (uri (git-reference
b0e7b699 5033 (url "https://github.com/rtomayko/tilt")
c3f15f54
MC
5034 (commit (string-append "v" version))))
5035 (file-name (git-file-name name version))
bcbb3cc9
CB
5036 (sha256
5037 (base32
c3f15f54 5038 "0adb7fg7925n2rd9a8kkqz3mgylw2skp9hkh9qc1rnph72mqsm6r"))))
bcbb3cc9
CB
5039 (build-system ruby-build-system)
5040 (arguments
5041 '(#:phases
5042 (modify-phases %standard-phases
5043 (add-after 'unpack 'remove-some-dependencies
5044 (lambda _
5045 (substitute* "Gemfile"
5046 ;; TODO ronn is used for generating the manual
5047 (("gem 'ronn'.*") "\n")
5048 ;; ruby-haml has a runtime dependency on ruby-tilt, so don't
5049 ;; pass it in as a native-input
5050 (("gem 'haml'.*") "\n")
5051 ;; TODO Not all of these gems are packaged for Guix yet:
5052 ;; less, coffee-script, livescript, babel-transpiler,
5053 ;; typescript-node
5054 (("if can_execjs") "if false")
5055 ;; Disable the secondary group to reduce the number of
5056 ;; dependencies. None of the normal approaches work, so patch
5057 ;; the Gemfile instead.
5058 (("group :secondary") "[].each"))
5059 #t)))))
cfa4a318
MC
5060 (propagated-inputs
5061 `(("ruby-pandoc-ruby" ,ruby-pandoc-ruby)
5062 ("ruby-sassc" ,ruby-sassc)))
bcbb3cc9
CB
5063 (native-inputs
5064 `(("bundler" ,bundler)
5065 ("ruby-yard" ,ruby-yard)
5066 ("ruby-builder" ,ruby-builder)
5067 ("ruby-erubis" ,ruby-erubis)
cfa4a318 5068 ("ruby-markaby" ,ruby-markaby)))
bcbb3cc9
CB
5069 (synopsis "Generic interface to multiple Ruby template engines")
5070 (description
5071 "Tilt is a thin interface over a number of different Ruby template
5072engines in an attempt to make their usage as generic as possible.")
5073 (home-page "https://github.com/rtomayko/tilt/")
5074 (license license:expat)))
5075
1415792a
DT
5076(define-public ruby-thread-safe
5077 (package
5078 (name "ruby-thread-safe")
313dd5dd 5079 (version "0.3.6")
1415792a
DT
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (rubygems-uri "thread_safe" version))
5084 (sha256
5085 (base32
313dd5dd 5086 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
1415792a
DT
5087 (build-system ruby-build-system)
5088 (arguments
5089 '(#:tests? #f)) ; needs simplecov, among others
5090 (synopsis "Thread-safe utilities for Ruby")
5091 (description "The thread_safe library provides thread-safe collections and
5092utilities for Ruby.")
5093 (home-page "https://github.com/ruby-concurrency/thread_safe")
5094 (license license:asl2.0)))
08a1b701
DT
5095
5096(define-public ruby-tzinfo
5097 (package
5098 (name "ruby-tzinfo")
4237af85 5099 (version "1.2.4")
08a1b701
DT
5100 (source
5101 (origin
5102 (method url-fetch)
5103 (uri (rubygems-uri "tzinfo" version))
5104 (sha256
5105 (base32
4237af85 5106 "09dpbrih054mn42flbbcdpzk2727mzfvjrgqb12zdafhx7p9rrzp"))))
08a1b701 5107 (build-system ruby-build-system)
740fea08
CB
5108 (arguments
5109 '(#:phases
5110 (modify-phases %standard-phases
5111 (add-after 'unpack 'skip-safe-tests
5112 (lambda _
5113 (substitute* "test/test_utils.rb"
5114 (("def safe_test\\(options = \\{\\}\\)")
5115 "def safe_test(options = {})
5116 skip('The Guix build environment has an unsafe load path')"))
5117 #t)))))
08a1b701
DT
5118 (propagated-inputs
5119 `(("ruby-thread-safe" ,ruby-thread-safe)))
5120 (synopsis "Time zone library for Ruby")
5121 (description "TZInfo is a Ruby library that provides daylight savings
5122aware transformations between times in different time zones.")
2f3800e5 5123 (home-page "https://tzinfo.github.io")
1e12924a
BW
5124 (license license:expat)))
5125
5126(define-public ruby-tzinfo-data
5127 (package
5128 (name "ruby-tzinfo-data")
92513191 5129 (version "1.2017.3")
1e12924a
BW
5130 (source
5131 (origin
bb1e7ed0 5132 (method git-fetch)
1e12924a
BW
5133 ;; Download from GitHub because the rubygems version does not contain
5134 ;; Rakefile or tests.
bb1e7ed0
EF
5135 (uri (git-reference
5136 (url "https://github.com/tzinfo/tzinfo-data")
5137 (commit (string-append "v" version))))
5138 (file-name (git-file-name name version))
1e12924a
BW
5139 (sha256
5140 (base32
bb1e7ed0 5141 "0v3phl5l3jrm6waxcszqmj2dkjhqawxfsxb6mss7vkp1hlckqcdp"))
1e12924a
BW
5142 ;; Remove the known test failure.
5143 ;; https://github.com/tzinfo/tzinfo-data/issues/10
5144 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
5145 (patches (search-patches
5146 "ruby-tzinfo-data-ignore-broken-test.patch"))))
5147 (build-system ruby-build-system)
5148 (propagated-inputs
5149 `(("ruby-tzinfo" ,ruby-tzinfo)))
5150 (synopsis "Data from the IANA Time Zone database")
5151 (description
5152 "This library provides @code{TZInfo::Data}, which contains data from the
5153IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
2f3800e5 5154 (home-page "https://tzinfo.github.io")
08a1b701 5155 (license license:expat)))
c99e2247 5156
48e6851f
RW
5157(define-public ruby-rb-inotify
5158 (package
5159 (name "ruby-rb-inotify")
32bbfea8 5160 (version "0.9.10")
48e6851f
RW
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (rubygems-uri "rb-inotify" version))
5165 (sha256
5166 (base32
32bbfea8 5167 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
48e6851f
RW
5168 (build-system ruby-build-system)
5169 (arguments
5170 '(#:tests? #f ; there are no tests
5171 #:phases
5172 (modify-phases %standard-phases
5173 ;; Building the gemspec with rake is not working here since it is
5174 ;; generated with Jeweler. It is also unnecessary because the
5175 ;; existing gemspec does not use any development tools to generate a
5176 ;; list of files.
5177 (replace 'build
5178 (lambda _
9923d5a4 5179 (invoke "gem" "build" "rb-inotify.gemspec"))))))
48e6851f
RW
5180 (propagated-inputs
5181 `(("ruby-ffi" ,ruby-ffi)))
5182 (native-inputs
5183 `(("ruby-yard" ,ruby-yard)))
5184 (synopsis "Ruby wrapper for Linux's inotify")
5185 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
5186kernel subsystem for monitoring changes to files and directories.")
5187 (home-page "https://github.com/nex3/rb-inotify")
5188 (license license:expat)))
5189
a75bdfce
RW
5190(define-public ruby-pry-editline
5191 (package
5192 (name "ruby-pry-editline")
5193 (version "1.1.2")
5194 (source (origin
5195 (method url-fetch)
5196 (uri (rubygems-uri "pry-editline" version))
5197 (sha256
5198 (base32
5199 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
5200 (build-system ruby-build-system)
5201 (arguments `(#:tests? #f)) ; no tests included
5202 (native-inputs
5203 `(("bundler" ,bundler)))
5204 (synopsis "Open the current REPL line in an editor")
5205 (description
5206 "This gem provides a plugin for the Ruby REPL to enable opening the
5207current line in an external editor.")
5208 (home-page "https://github.com/tpope/pry-editline")
5209 (license license:expat)))
5210
d3b20a02
RW
5211(define-public ruby-sdoc
5212 (package
5213 (name "ruby-sdoc")
6700dc33 5214 (version "1.1.0")
d3b20a02
RW
5215 (source (origin
5216 (method url-fetch)
5217 (uri (rubygems-uri "sdoc" version))
5218 (sha256
5219 (base32
6700dc33 5220 "1am73dldx1fqlw2xny5vyk00pgkisg6bvs0pa8jjd7c19drjczrd"))))
d3b20a02
RW
5221 (build-system ruby-build-system)
5222 (arguments
5223 `(#:phases
5224 (modify-phases %standard-phases
fc29d5e6 5225 (add-before 'check 'set-rubylib-and-patch-gemfile
d3b20a02 5226 (lambda _
fdf3a68d 5227 (setenv "RUBYLIB" "lib")
fc29d5e6
BW
5228 (substitute* "sdoc.gemspec"
5229 (("s.add_runtime_dependency.*") "\n")
5230 (("s.add_dependency.*") "\n"))
5231 (substitute* "Gemfile"
5232 (("gem \"rake\".*")
5233 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
d3b20a02
RW
5234 #t)))))
5235 (propagated-inputs
5236 `(("ruby-json" ,ruby-json)))
5237 (native-inputs
5238 `(("bundler" ,bundler)
fdf3a68d
BW
5239 ("ruby-minitest" ,ruby-minitest)
5240 ("ruby-hoe" ,ruby-hoe)))
d3b20a02
RW
5241 (synopsis "Generate searchable RDoc documentation")
5242 (description
5243 "SDoc is an RDoc documentation generator to build searchable HTML
5244documentation for Ruby code.")
7bf837fd 5245 (home-page "https://github.com/voloko/sdoc")
d3b20a02
RW
5246 (license license:expat)))
5247
70b002aa
RW
5248(define-public ruby-tins
5249 (package
5250 (name "ruby-tins")
fbefd6ff 5251 (version "1.15.0")
70b002aa
RW
5252 (source (origin
5253 (method url-fetch)
5254 (uri (rubygems-uri "tins" version))
5255 (sha256
5256 (base32
fbefd6ff 5257 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
70b002aa
RW
5258 (build-system ruby-build-system)
5259 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
5260 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
5261 ;; the gemspec.
5262 (arguments
5263 `(#:tests? #f ; there are no tests
5264 #:phases
5265 (modify-phases %standard-phases
5266 (replace 'build
5267 (lambda _
5268 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
5269 ;; causes an error.
5270 (substitute* "tins.gemspec"
5271 (("\"lib/spruz\", ") ""))
9923d5a4 5272 (invoke "gem" "build" "tins.gemspec"))))))
70b002aa
RW
5273 (synopsis "Assorted tools for Ruby")
5274 (description "Tins is a Ruby library providing assorted tools.")
5275 (home-page "https://github.com/flori/tins")
5276 (license license:expat)))
5277
bc8277e4
RW
5278(define-public ruby-gem-hadar
5279 (package
5280 (name "ruby-gem-hadar")
3fd577e3 5281 (version "1.9.1")
bc8277e4
RW
5282 (source (origin
5283 (method url-fetch)
5284 (uri (rubygems-uri "gem_hadar" version))
5285 (sha256
5286 (base32
3fd577e3 5287 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
bc8277e4
RW
5288 (build-system ruby-build-system)
5289 ;; This gem needs itself at development time. We disable rebuilding of the
5290 ;; gemspec to avoid this loop.
5291 (arguments
5292 `(#:tests? #f ; there are no tests
5293 #:phases
5294 (modify-phases %standard-phases
5295 (replace 'build
5296 (lambda _
9923d5a4 5297 (invoke "gem" "build" "gem_hadar.gemspec"))))))
bc8277e4
RW
5298 (propagated-inputs
5299 `(("git" ,git)
5300 ("ruby-tins" ,ruby-tins)
3fd577e3 5301 ("ruby-yard" ,ruby-yard)))
bc8277e4
RW
5302 (synopsis "Library for the development of Ruby gems")
5303 (description
5304 "This library contains some useful functionality to support the
5305development of Ruby gems.")
5306 (home-page "https://github.com/flori/gem_hadar")
5307 (license license:expat)))
5308
d8cafe29
RW
5309(define-public ruby-minitest-tu-shim
5310 (package
5311 (name "ruby-minitest-tu-shim")
5312 (version "1.3.3")
5313 (source (origin
5314 (method url-fetch)
5315 (uri (rubygems-uri "minitest_tu_shim" version))
5316 (sha256
5317 (base32
5318 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
5319 (build-system ruby-build-system)
5320 (arguments
5321 `(#:phases
5322 (modify-phases %standard-phases
5323 (add-after 'unpack 'fix-test-include-path
5324 (lambda* (#:key inputs #:allow-other-keys)
3cb3fa67 5325 (let* ((minitest (assoc-ref inputs "ruby-minitest-4")))
761e7042
BW
5326 (substitute* "Rakefile"
5327 (("Hoe\\.add_include_dirs .*")
5328 (string-append "Hoe.add_include_dirs \""
3cb3fa67 5329 minitest "/lib/ruby/vendor_ruby"
761e7042
BW
5330 "/gems/minitest-"
5331 ,(package-version ruby-minitest-4)
5332 "/lib" "\""))))
5333 #t))
d8cafe29
RW
5334 (add-before 'check 'fix-test-assumptions
5335 (lambda _
5336 ;; The test output includes the file name, so a couple of tests
5337 ;; fail. Changing the regular expressions slightly fixes this
5338 ;; problem.
5339 (substitute* "test/test_mini_test.rb"
5340 (("output.sub!\\(.*, 'FILE:LINE'\\)")
5341 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
5342 (("gsub\\(/.*, 'FILE:LINE'\\)")
5343 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
5344 #t)))))
5345 (propagated-inputs
5346 `(("ruby-minitest-4" ,ruby-minitest-4)))
5347 (native-inputs
5348 `(("ruby-hoe" ,ruby-hoe)))
5349 (synopsis "Adapter library between minitest and test/unit")
5350 (description
5351 "This library bridges the gap between the small and fast minitest and
5352Ruby's large and slower test/unit.")
5353 (home-page "https://rubygems.org/gems/minitest_tu_shim")
5354 (license license:expat)))
5355
fd83a212
RW
5356(define-public ruby-term-ansicolor
5357 (package
5358 (name "ruby-term-ansicolor")
f3a6311a 5359 (version "1.6.0")
fd83a212
RW
5360 (source (origin
5361 (method url-fetch)
5362 (uri (rubygems-uri "term-ansicolor" version))
5363 (sha256
5364 (base32
f3a6311a 5365 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
fd83a212
RW
5366 (build-system ruby-build-system)
5367 ;; Rebuilding the gemspec seems to require git, even though this is not a
5368 ;; git repository, so we just build the gem from the existing gemspec.
5369 (arguments
5370 `(#:phases
5371 (modify-phases %standard-phases
39ecb977
CB
5372 (add-after 'unpack 'fix-test
5373 (lambda -
5374 (substitute* "tests/hsl_triple_test.rb"
5375 (("0\\\\\\.0%")
5376 "0\\.?0?%"))))
fd83a212
RW
5377 (replace 'build
5378 (lambda _
9923d5a4 5379 (invoke "gem" "build" "term-ansicolor.gemspec"))))))
fd83a212
RW
5380 (propagated-inputs
5381 `(("ruby-tins" ,ruby-tins)))
5382 (native-inputs
5383 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5384 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
5385 (synopsis "Ruby library to control the attributes of terminal output")
5386 (description
5387 "This Ruby library uses ANSI escape sequences to control the attributes
5388of terminal output.")
2f3800e5 5389 (home-page "https://flori.github.io/term-ansicolor/")
fd83a212
RW
5390 ;; There is no mention of the "or later" clause.
5391 (license license:gpl2)))
5392
a714c30f
CB
5393(define-public ruby-terraform
5394 (package
5395 (name "ruby-terraform")
5396 (version "0.22.0")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (rubygems-uri "ruby-terraform" version))
5401 (sha256
5402 (base32
5403 "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
5404 (build-system ruby-build-system)
5405 (arguments
5406 '(#:tests? #f)) ; No included tests
5407 (propagated-inputs
5408 `(("ruby-lino" ,ruby-lino)))
5409 (synopsis "Ruby wrapper around the Terraform command line interface")
5410 (description
5411 "This package provides a Ruby wrapper around the Terraform command line
5412interface so that Terraform can be more easily invoked from Ruby code.")
5413 (home-page "https://github.com/infrablocks/ruby_terraform")
5414 (license license:expat)))
5415
6e376ca4
RW
5416(define-public ruby-pstree
5417 (package
5418 (name "ruby-pstree")
5419 (version "0.1.0")
5420 (source (origin
5421 (method url-fetch)
5422 (uri (rubygems-uri "pstree" version))
5423 (sha256
5424 (base32
5425 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
5426 (build-system ruby-build-system)
5427 (native-inputs
5428 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5429 ("bundler" ,bundler)))
5430 (synopsis "Create a process tree data structure")
5431 (description
5432 "This library uses the output of the @code{ps} command to create a
5433process tree data structure for the current host.")
2f3800e5 5434 (home-page "https://github.com/flori/pstree")
6e376ca4
RW
5435 ;; There is no mention of the "or later" clause.
5436 (license license:gpl2)))
5437
53239b5f
RW
5438(define-public ruby-utils
5439 (package
5440 (name "ruby-utils")
cd698b6e 5441 (version "0.9.0")
53239b5f
RW
5442 (source (origin
5443 (method url-fetch)
5444 (uri (rubygems-uri "utils" version))
5445 (sha256
5446 (base32
cd698b6e 5447 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
53239b5f
RW
5448 (build-system ruby-build-system)
5449 (propagated-inputs
5450 `(("ruby-tins" ,ruby-tins)
5451 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
5452 ("ruby-pstree" ,ruby-pstree)
5453 ("ruby-pry-editline" ,ruby-pry-editline)))
5454 (native-inputs
5455 `(("ruby-gem-hadar" ,ruby-gem-hadar)
5456 ("bundler" ,bundler)))
5457 (synopsis "Command line tools for working with Ruby")
5458 (description
5459 "This package provides assorted command line tools that may be useful
5460when working with Ruby code.")
5461 (home-page "https://github.com/flori/utils")
5462 ;; There is no mention of the "or later" clause.
5463 (license license:gpl2)))
5464
433f10b5
CB
5465(define-public ruby-jaro-winkler
5466 (package
5467 (name "ruby-jaro-winkler")
37b23e44 5468 (version "1.5.4")
433f10b5
CB
5469 (source
5470 (origin
5471 (method url-fetch)
5472 (uri (rubygems-uri "jaro_winkler" version))
5473 (sha256
37b23e44 5474 (base32 "1y8l6k34svmdyqxya3iahpwbpvmn3fswhwsvrz0nk1wyb8yfihsh"))))
433f10b5
CB
5475 (build-system ruby-build-system)
5476 (arguments
37b23e44 5477 '(#:tests? #f)) ; no included tests
433f10b5
CB
5478 (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
5479 (description
5480 "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
5481algorithm. It is written as a C extension and will fallback to a pure Ruby
5482implementation on platforms where this is unsupported.")
5483 (home-page "https://github.com/tonytonyjan/jaro_winkler")
5484 (license license:expat)))
5485
c99e2247
DT
5486(define-public ruby-json
5487 (package
5488 (name "ruby-json")
a281acce 5489 (version "2.1.0")
c99e2247
DT
5490 (source
5491 (origin
5492 (method url-fetch)
5493 (uri (rubygems-uri "json" version))
5494 (sha256
5495 (base32
a281acce 5496 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
c99e2247
DT
5497 (build-system ruby-build-system)
5498 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
5499 (synopsis "JSON library for Ruby")
5500 (description "This Ruby library provides a JSON implementation written as
5501a native C extension.")
5502 (home-page "http://json-jruby.rubyforge.org/")
5503 (license (list license:ruby license:gpl2)))) ; GPL2 only
5ff89a1b 5504
763624f5
RW
5505(define-public ruby-json-pure
5506 (package
5507 (name "ruby-json-pure")
1c65d99f 5508 (version "2.2.0")
763624f5
RW
5509 (source (origin
5510 (method url-fetch)
5511 (uri (rubygems-uri "json_pure" version))
5512 (sha256
5513 (base32
1c65d99f 5514 "0m0j1mfwv0mvw72kzqisb26xjl236ivqypw1741dkis7s63b8439"))))
763624f5
RW
5515 (build-system ruby-build-system)
5516 (arguments
ac01cb07 5517 `(#:phases
763624f5 5518 (modify-phases %standard-phases
ac01cb07 5519 (add-after 'unpack 'fix-rakefile
763624f5 5520 (lambda _
ac01cb07
BW
5521 (substitute* "Rakefile"
5522 ;; Since this is not a git repository, do not call 'git'.
5523 (("`git ls-files`") "`find . -type f |sort`")
5524 ;; Loosen dependency constraint.
5525 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
5526 #t))
5527 (add-after 'replace-git-ls-files 'regenerate-gemspec
5528 (lambda _
5529 ;; Regenerate gemspec so loosened dependency constraints are
5530 ;; propagated.
17cfb7ae
CB
5531 (invoke "rake" "gemspec")))
5532 (add-after 'regenerate-gemspec 'fix-json-java.gemspec
5533 (lambda _
5534 ;; This gemspec doesn't look to be generated by the above
5535 ;; command, so patch it separately.
5536 (substitute* "json-java.gemspec"
5537 (("%q<test-unit>\\.freeze, \\[\"~> 2\\.0\"\\]")
5538 "%q<test-unit>.freeze, [\">= 2.0\"]"))
5539 #t)))))
763624f5 5540 (native-inputs
ac01cb07 5541 `(("bundler" ,bundler)
0c9f73cd
TGR
5542 ("ragel" ,ragel)
5543 ("ruby-simplecov" ,ruby-simplecov)
5544 ("ruby-test-unit" ,ruby-test-unit)))
763624f5
RW
5545 (synopsis "JSON implementation in pure Ruby")
5546 (description
5547 "This package provides a JSON implementation written in pure Ruby.")
1c65d99f 5548 (home-page "https://flori.github.com/json/")
763624f5
RW
5549 (license license:ruby)))
5550
2a8581ac
CB
5551(define-public ruby-jwt
5552 (package
5553 (name "ruby-jwt")
5554 (version "2.1.0")
5555 (source
5556 (origin
5557 (method url-fetch)
5558 (uri (rubygems-uri "jwt" version))
5559 (sha256
5560 (base32
5561 "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
5562 (build-system ruby-build-system)
5563 (arguments
5564 '(#:test-target "test"
5565 #:phases
5566 (modify-phases %standard-phases
5567 (add-after 'unpack 'remove-unnecessary-dependencies
5568 (lambda _
5569 (substitute* "spec/spec_helper.rb"
5570 (("require 'simplecov.*") "\n")
5571 ;; Use [].each to disable running the SimpleCov configuration
5572 ;; block
5573 (("SimpleCov\\.configure") "[].each")
5574 (("require 'codeclimate-test-reporter'") "")
5575 (("require 'codacy-coverage'") "")
5576 (("Codacy::Reporter\\.start") ""))
5577 #t)))))
5578 (native-inputs
5579 `(("bundler" ,bundler)
5580 ("ruby-rspec" ,ruby-rspec)
5581 ("ruby-rbnacl" ,ruby-rbnacl)))
5582 (synopsis "Ruby implementation of the JSON Web Token standard")
5583 (description
5584 "This package provides a pure Ruby implementation of the RFC 7519 OAuth
5585@acronym{JWT, JSON Web Token} standard.")
5586 (home-page "https://github.com/jwt/ruby-jwt")
5587 (license license:expat)))
5588
16b324cd
RW
5589;; Even though this package only provides bindings for a Mac OSX API it is
5590;; required by "ruby-listen" at runtime.
5591(define-public ruby-rb-fsevent
5592 (package
5593 (name "ruby-rb-fsevent")
b0ef15ed 5594 (version "0.10.3")
16b324cd
RW
5595 (source (origin
5596 (method url-fetch)
5597 (uri (rubygems-uri "rb-fsevent" version))
5598 (sha256
5599 (base32
b0ef15ed 5600 "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8"))))
16b324cd
RW
5601 (build-system ruby-build-system)
5602 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
5603 ;; "listen", which needs "rb-fsevent" at runtime.
5604 (arguments `(#:tests? #f))
5605 (synopsis "FSEvents API with signals catching")
5606 (description
5607 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
5608 (home-page "https://rubygems.org/gems/rb-fsevent")
5609 (license license:expat)))
5610
b86be2ad
RW
5611(define-public ruby-listen
5612 (package
5613 (name "ruby-listen")
12341d34 5614 (version "3.2.0")
b86be2ad
RW
5615 (source
5616 (origin
35602819
CB
5617 ;; The gem does not include a Rakefile, so fetch from the Git
5618 ;; repository.
5619 (method git-fetch)
5620 (uri (git-reference
b0e7b699 5621 (url "https://github.com/guard/listen")
35602819
CB
5622 (commit (string-append "v" version))))
5623 (file-name (git-file-name name version))
b86be2ad
RW
5624 (sha256
5625 (base32
12341d34 5626 "1hkp1g6hk5clsmbd001gkc12ma6s459x820piajyasv61m87if24"))))
b86be2ad 5627 (build-system ruby-build-system)
35602819
CB
5628 (arguments
5629 `(#:test-target "spec"
5630 #:phases
5631 (modify-phases %standard-phases
5632 (add-after 'unpack 'fix-files-in-gemspec
5633 (lambda _
5634 (substitute* "listen.gemspec"
5635 (("`git ls-files -z`") "`find . -type f -printf '%P\\\\0' |sort -z`"))
5636 #t))
5637 (add-before 'check 'remove-unnecessary-dependencies'
5638 (lambda _
5639 (substitute* "Rakefile"
5640 ;; Rubocop is for code linting, and is unnecessary for running
5641 ;; the tests.
5642 ((".*rubocop.*") ""))
5643 #t)))))
5644 (native-inputs
5645 `(("bundler" ,bundler)
5646 ("ruby-rspec" ,ruby-rspec)))
5647 (inputs
5648 `(;; ruby-thor is used for the command line interface, and is referenced
5649 ;; in the wrapper, and therefore just needs to be an input.
5650 ("ruby-thor" ,ruby-thor)))
b86be2ad 5651 (propagated-inputs
35602819
CB
5652 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
5653 ("ruby-rb-inotify" ,ruby-rb-inotify)
5654 ("ruby-dep" ,ruby-dep)))
b86be2ad
RW
5655 (synopsis "Listen to file modifications")
5656 (description "The Listen gem listens to file modifications and notifies
5657you about the changes.")
5658 (home-page "https://github.com/guard/listen")
5659 (license license:expat)))
5660
8d3c5ff6
CB
5661(define-public ruby-loofah
5662 (package
5663 (name "ruby-loofah")
5664 (version "2.2.3")
5665 (source
5666 (origin
5667 (method url-fetch)
5668 (uri (rubygems-uri "loofah" version))
5669 (sha256
5670 (base32
5671 "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"))))
5672 (build-system ruby-build-system)
5673 (arguments
5674 '(#:phases
5675 (modify-phases %standard-phases
5676 (add-after 'unpack 'remove-unnecessary-dependencies
5677 (lambda _
5678 ;; concourse is a development tool which is unused, so remove it
5679 ;; so it's not required.
5680 (substitute* "Gemfile"
5681 ((".*\"concourse\".*") "\n"))
5682 (substitute* "Rakefile"
5683 (("require 'concourse'") "")
5684 (("Concourse\\.new.*") "\n"))
5685 #t)))))
5686 (native-inputs
5687 `(("ruby-hoe" ,ruby-hoe)
5688 ("ruby-rr" ,ruby-rr)))
5689 (propagated-inputs
5690 `(("ruby-nokogiri" ,ruby-nokogiri)
5691 ("ruby-crass" ,ruby-crass)))
5692 (synopsis "Ruby library for manipulating and transforming HTML/XML")
5693 (description
5694 "Loofah is a general library for manipulating and transforming HTML/XML
5695documents and fragments. It's built on top of Nokogiri and libxml2.")
5696 (home-page "https://github.com/flavorjones/loofah")
5697 (license license:expat)))
5698
5ff89a1b
DT
5699(define-public ruby-activesupport
5700 (package
5701 (name "ruby-activesupport")
bcf1fe5b 5702 (version "5.2.2.1")
5ff89a1b
DT
5703 (source
5704 (origin
5705 (method url-fetch)
5706 (uri (rubygems-uri "activesupport" version))
5707 (sha256
5708 (base32
bcf1fe5b 5709 "161bp4p01v1a1lvszrhd1a02zf9x1p1l1yhw79a3rix1kvzkkdqb"))))
5ff89a1b
DT
5710 (build-system ruby-build-system)
5711 (arguments
2af45e50
BW
5712 `(#:phases
5713 (modify-phases %standard-phases
5714 (replace 'check
5715 (lambda _
9923d5a4
TGR
5716 ;; There are no tests, instead attempt to load the library.
5717 (invoke "ruby" "-Ilib" "-r" "active_support"))))))
5ff89a1b 5718 (propagated-inputs
2af45e50
BW
5719 `(("ruby-concurrent" ,ruby-concurrent)
5720 ("ruby-i18n" ,ruby-i18n)
5ff89a1b 5721 ("ruby-minitest" ,ruby-minitest)
606ee9a1
BW
5722 ("ruby-tzinfo" ,ruby-tzinfo)
5723 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
5ff89a1b
DT
5724 (synopsis "Ruby on Rails utility library")
5725 (description "ActiveSupport is a toolkit of support libraries and Ruby
5726core extensions extracted from the Rails framework. It includes support for
5727multibyte strings, internationalization, time zones, and testing.")
5728 (home-page "http://www.rubyonrails.org")
5729 (license license:expat)))
f847ad7b 5730
3996f0aa
RW
5731(define-public ruby-crass
5732 (package
5733 (name "ruby-crass")
a84a185a
MB
5734 (version "1.0.6")
5735 (home-page "https://github.com/rgrove/crass")
3996f0aa 5736 (source (origin
a84a185a
MB
5737 ;; The gem does not contain tests, so pull from git.
5738 (method git-fetch)
5739 (uri (git-reference
5740 (url home-page)
5741 (commit (string-append "v" version))))
5742 (file-name (git-file-name name version))
3996f0aa
RW
5743 (sha256
5744 (base32
a84a185a 5745 "1gbsb81psgb6xhnwpx4s409jc0mk0gijh039sy5xyi8jpaaadp40"))))
3996f0aa 5746 (build-system ruby-build-system)
3996f0aa
RW
5747 (synopsis "Pure Ruby CSS parser")
5748 (description
5749 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
3996f0aa
RW
5750 (license license:expat)))
5751
c2c4e5b2 5752(define-public ruby-nokogumbo
2e366b0a
MB
5753 (package
5754 (name "ruby-nokogumbo")
5755 (version "2.0.2")
5756 (source (origin
5757 ;; We use the git reference, because there's no Rakefile in the
5758 ;; published gem and the tarball on Github is outdated.
5759 (method git-fetch)
5760 (uri (git-reference
b0e7b699 5761 (url "https://github.com/rubys/nokogumbo")
2e366b0a
MB
5762 (commit (string-append "v" version))))
5763 (file-name (string-append name "-" version "-checkout"))
5764 (sha256
5765 (base32
5766 "1qg0iyw450lw6d0j1ghzg79a6l60nm1m4qmrzwzybi585861jxcx"))))
5767 (build-system ruby-build-system)
5768 (native-inputs
5769 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
5770 (inputs
5771 `(("gumbo-parser" ,gumbo-parser)))
5772 (propagated-inputs
5773 `(("ruby-nokogiri" ,ruby-nokogiri)))
5774 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
5775 (description
5776 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
c2c4e5b2 5777access the result as a Nokogiri parsed document.")
2e366b0a
MB
5778 (home-page "https://github.com/rubys/nokogumbo/")
5779 (license license:asl2.0)))
c2c4e5b2 5780
d56ff88b
RW
5781(define-public ruby-sanitize
5782 (package
5783 (name "ruby-sanitize")
f362b53c
MB
5784 (version "5.1.0")
5785 (home-page "https://github.com/rgrove/sanitize")
d56ff88b 5786 (source (origin
f362b53c 5787 (method git-fetch)
d56ff88b 5788 ;; The gem does not include the Rakefile, so we download the
f362b53c
MB
5789 ;; source from Github.
5790 (uri (git-reference
5791 (url home-page)
5792 (commit (string-append "v" version))))
5793 (file-name (git-file-name name version))
5794 (patches (search-patches "ruby-sanitize-system-libxml.patch"))
d56ff88b
RW
5795 (sha256
5796 (base32
f362b53c 5797 "0lj0q9yhjp0q0in5majkshnki07mw8m2vxgndx4m5na6232aszl0"))))
d56ff88b
RW
5798 (build-system ruby-build-system)
5799 (propagated-inputs
5800 `(("ruby-crass" ,ruby-crass)
5801 ("ruby-nokogiri" ,ruby-nokogiri)
5802 ("ruby-nokogumbo" ,ruby-nokogumbo)))
5803 (native-inputs
f362b53c 5804 `(("ruby-minitest" ,ruby-minitest)))
d56ff88b
RW
5805 (synopsis "Whitelist-based HTML and CSS sanitizer")
5806 (description
5807 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
5808acceptable elements, attributes, and CSS properties, Sanitize will remove all
5809unacceptable HTML and/or CSS from a string.")
d56ff88b
RW
5810 (license license:expat)))
5811
ed4b6b18
BW
5812(define-public ruby-oj
5813 (package
5814 (name "ruby-oj")
93dfdec5 5815 (version "3.10.1")
ed4b6b18
BW
5816 (source
5817 (origin
b09ef660 5818 (method git-fetch)
ed4b6b18
BW
5819 ;; Version on rubygems.org does not contain Rakefile, so download from
5820 ;; GitHub instead.
b09ef660
EF
5821 (uri (git-reference
5822 (url "https://github.com/ohler55/oj")
5823 (commit (string-append "v" version))))
5824 (file-name (git-file-name name version))
ed4b6b18
BW
5825 (sha256
5826 (base32
93dfdec5 5827 "0i5xjx4sh816zx2c1a4d1q67k7vllg5jnnc4jy6zhbmwi1dvp5vw"))))
ed4b6b18
BW
5828 (build-system ruby-build-system)
5829 (arguments
5830 '(#:test-target "test_all"
5831 #:phases
5832 (modify-phases %standard-phases
5833 (add-before 'check 'disable-bundler
5834 (lambda _
5835 (substitute* "Rakefile"
5836 (("Bundler\\.with_clean_env") "1.times")
5837 (("bundle exec ") "")))))))
5838 (native-inputs
5839 `(("bundler" ,bundler)
5840 ("ruby-rspec" ,ruby-rspec)
5841 ("ruby-rake-compiler" ,ruby-rake-compiler)))
5842 (synopsis "JSON parser for Ruby optimized for speed")
5843 (description
5844 "Oj is a JSON parser and generator for Ruby, where the encoding and
5845decoding of JSON is implemented as a C extension to Ruby.")
b09ef660 5846 (home-page "http://www.ohler.com/oj/")
ed4b6b18
BW
5847 (license (list license:expat ; Ruby code
5848 license:bsd-3)))) ; extension code
5849
f847ad7b
DT
5850(define-public ruby-ox
5851 (package
5852 (name "ruby-ox")
263c0dbf 5853 (version "2.6.0")
f847ad7b
DT
5854 (source
5855 (origin
5856 (method url-fetch)
5857 (uri (rubygems-uri "ox" version))
5858 (sha256
5859 (base32
263c0dbf 5860 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
f847ad7b
DT
5861 (build-system ruby-build-system)
5862 (arguments
5863 '(#:tests? #f)) ; no tests
5864 (synopsis "Optimized XML library for Ruby")
5865 (description
5866 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
5867written as a native C extension. It was designed to be an alternative to
5868Nokogiri and other Ruby XML parsers for generic XML parsing and as an
5869alternative to Marshal for Object serialization. ")
5870 (home-page "http://www.ohler.com/ox")
5871 (license license:expat)))
4a9e0585 5872
0c4e7625
RW
5873(define-public ruby-redcloth
5874 (package
5875 (name "ruby-redcloth")
2a91494e 5876 (version "4.3.2")
0c4e7625
RW
5877 (source (origin
5878 (method url-fetch)
5879 (uri (rubygems-uri "RedCloth" version))
5880 (sha256
5881 (base32
2a91494e 5882 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
0c4e7625
RW
5883 (build-system ruby-build-system)
5884 (arguments
5885 `(#:tests? #f ; no tests
5886 #:phases
5887 (modify-phases %standard-phases
5888 ;; Redcloth has complicated rake tasks to build various versions for
5889 ;; multiple targets using RVM. We don't want this so we just use the
5890 ;; existing gemspec.
5891 (replace 'build
5892 (lambda _
9923d5a4 5893 (invoke "gem" "build" "redcloth.gemspec"))))))
0c4e7625
RW
5894 (native-inputs
5895 `(("bundler" ,bundler)
5896 ("ruby-diff-lcs" ,ruby-diff-lcs)
5897 ("ruby-rspec-2" ,ruby-rspec-2)))
5898 (synopsis "Textile markup language parser for Ruby")
5899 (description
5900 "RedCloth is a Ruby parser for the Textile markup language.")
5901 (home-page "http://redcloth.org")
5902 (license license:expat)))
5903
4a9e0585
DT
5904(define-public ruby-pg
5905 (package
5906 (name "ruby-pg")
ffc4869e 5907 (version "1.1.4")
4a9e0585
DT
5908 (source
5909 (origin
5910 (method url-fetch)
5911 (uri (rubygems-uri "pg" version))
5912 (sha256
5913 (base32
ffc4869e 5914 "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"))))
4a9e0585
DT
5915 (build-system ruby-build-system)
5916 (arguments
5917 '(#:test-target "spec"))
5918 (native-inputs
5919 `(("ruby-rake-compiler" ,ruby-rake-compiler)
5920 ("ruby-hoe" ,ruby-hoe)
5921 ("ruby-rspec" ,ruby-rspec)))
5922 (inputs
ffc4869e 5923 `(("postgresql" ,postgresql)))
4a9e0585
DT
5924 (synopsis "Ruby interface to PostgreSQL")
5925 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
4db80f8b 5926with PostgreSQL 9.0 and later.")
4a9e0585
DT
5927 (home-page "https://bitbucket.org/ged/ruby-pg")
5928 (license license:ruby)))
468e5657
DT
5929
5930(define-public ruby-byebug
5931 (package
5932 (name "ruby-byebug")
d5489a61 5933 (version "9.0.6")
468e5657
DT
5934 (source
5935 (origin
5936 (method url-fetch)
5937 (uri (rubygems-uri "byebug" version))
5938 (sha256
5939 (base32
d5489a61 5940 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
468e5657
DT
5941 (build-system ruby-build-system)
5942 (arguments
5943 '(#:tests? #f)) ; no tests
5944 (synopsis "Debugger for Ruby 2")
5945 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
5946TracePoint C API for execution control and the Debug Inspector C API for call
5947stack navigation. The core component provides support that front-ends can
5948build on. It provides breakpoint handling and bindings for stack frames among
5949other things and it comes with a command line interface.")
7bf837fd 5950 (home-page "https://github.com/deivid-rodriguez/byebug")
468e5657 5951 (license license:bsd-2)))
64b6ccc3 5952
7aa00628
MC
5953;;; TODO: Make it the default byebug in core-updates.
5954(define-public ruby-byebug-11
5955 (package
5956 (inherit ruby-byebug)
5957 (name "ruby-byebug")
5958 (version "11.1.3")
5959 (source
5960 (origin
5961 (method git-fetch)
5962 (uri (git-reference
b0e7b699 5963 (url "https://github.com/deivid-rodriguez/byebug")
7aa00628
MC
5964 (commit (string-append "v" version))))
5965 (file-name (git-file-name name version))
5966 (sha256
5967 (base32
5968 "0vyy3k2s7dcndngj6m8kxhs1vxc2c93dw8b3yyand3srsg9ffpij"))
5969 (modules '((guix build utils)))
5970 (snippet
5971 '(begin
5972 ;; Remove wrappers that try to setup a bundle environment.
5973 (with-directory-excursion "bin"
5974 (for-each delete-file '("bundle" "rake" "rubocop"))
5975 ;; ruby-minitest doesn't come with a launcher, so fix the one
5976 ;; provided.
5977 (substitute* "minitest"
5978 (("load File\\.expand_path\\(\"bundle\".*") "")
5979 (("require \"bundler/setup\".*") "")))
5980 #t))))
5981 (arguments
5982 `(#:tests? #t
5983 #:phases
5984 (modify-phases %standard-phases
5985 (add-after 'unpack 'skip-tmp-path-sensitive-test
5986 (lambda _
5987 (substitute* "test/commands/where_test.rb"
5988 (("unless /cygwin\\|mswin\\|mingw\\|darwin/.*")
5989 "unless true\n"))
5990 #t))
5991 (add-before 'build 'compile
5992 (lambda _
5993 (invoke "rake" "compile")))
5994 (add-before 'check 'set-home
5995 (lambda _
5996 (setenv "HOME" (getcwd))
5997 #t)))))
5998 (native-inputs
5999 `(("bundler" ,bundler)
6000 ("ruby-chandler" ,ruby-chandler)
6001 ("ruby-minitest" ,ruby-minitest)
6002 ("ruby-pry" ,ruby-pry)
6003 ("ruby-rake-compiler" ,ruby-rake-compiler)
6004 ("ruby-rubocop" ,ruby-rubocop)
6005 ("ruby-yard" ,ruby-yard)))))
6006
5799bc2b
RW
6007(define-public ruby-netrc
6008 (package
6009 (name "ruby-netrc")
6010 (version "0.11.0")
6011 (source (origin
6012 (method url-fetch)
6013 (uri (rubygems-uri "netrc" version))
6014 (sha256
6015 (base32
6016 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
6017 (build-system ruby-build-system)
6018 (arguments
6019 `(#:phases
6020 (modify-phases %standard-phases
6021 (replace 'check
6022 ;; There is no Rakefile and minitest can only run one file at once,
6023 ;; so we have to iterate over all test files.
6024 (lambda _
9923d5a4
TGR
6025 (map (lambda (file)
6026 (invoke "ruby" "-Itest" file))
6027 (find-files "./test" "test_.*\\.rb")))))))
5799bc2b
RW
6028 (native-inputs
6029 `(("ruby-minitest" ,ruby-minitest)))
6030 (synopsis "Library to read and update netrc files")
6031 (description
6032 "This library can read and update netrc files, preserving formatting
6033including comments and whitespace.")
6034 (home-page "https://github.com/geemus/netrc")
6035 (license license:expat)))
6036
3a6989ce
RW
6037(define-public ruby-unf-ext
6038 (package
6039 (name "ruby-unf-ext")
14db8f19 6040 (version "0.0.7.6")
3a6989ce
RW
6041 (source (origin
6042 (method url-fetch)
6043 (uri (rubygems-uri "unf_ext" version))
6044 (sha256
6045 (base32
14db8f19 6046 "1ll6w64ibh81qwvjx19h8nj7mngxgffg7aigjx11klvf5k2g4nxf"))))
3a6989ce 6047 (build-system ruby-build-system)
b809cc9a
RW
6048 (arguments
6049 `(#:phases
6050 (modify-phases %standard-phases
6051 (add-after 'build 'build-ext
14db8f19
MB
6052 (lambda _ (invoke "rake" "compile:unf_ext")))
6053 (add-before 'check 'lose-rake-compiler-dock-dependency
6054 (lambda _
6055 ;; rake-compiler-dock is listed in the gemspec, but only
6056 ;; required when cross-compiling.
6057 (substitute* "unf_ext.gemspec"
6058 ((".*rake-compiler-dock.*") ""))
6059 #t)))))
3a6989ce
RW
6060 (native-inputs
6061 `(("bundler" ,bundler)
6062 ("ruby-rake-compiler" ,ruby-rake-compiler)
6063 ("ruby-test-unit" ,ruby-test-unit)))
6064 (synopsis "Unicode normalization form support library")
6065 (description
6066 "This package provides unicode normalization form support for Ruby.")
6067 (home-page "https://github.com/knu/ruby-unf_ext")
6068 (license license:expat)))
6069
2632a067 6070(define-public ruby-tdiff
5071f17b
BW
6071 ;; Use a newer than released snapshot so that rspec-2 is not required.
6072 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
6073 (package
6074 (name "ruby-tdiff")
6075 (version (string-append "0.3.3-1." (string-take commit 8)))
6076 (source (origin
6077 (method git-fetch)
6078 (uri (git-reference
b0e7b699 6079 (url "https://github.com/postmodern/tdiff")
5071f17b
BW
6080 (commit commit)))
6081 (file-name (string-append name "-" version "-checkout"))
6082 (sha256
6083 (base32
6084 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
6085 (build-system ruby-build-system)
6086 (native-inputs
6087 `(("ruby-rspec" ,ruby-rspec)
6088 ("ruby-yard" ,ruby-yard)
6089 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6090 (synopsis "Calculate the differences between two tree-like structures")
6091 (description
6092 "This library provides functions to calculate the differences between two
2632a067 6093tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
5071f17b
BW
6094 (home-page "https://github.com/postmodern/tdiff")
6095 (license license:expat))))
2632a067 6096
f60f5002 6097(define-public ruby-nokogiri-diff
5b0c223a
BW
6098 ;; Use a newer than released snapshot so that rspec-2 is not required.
6099 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
6100 (package
6101 (name "ruby-nokogiri-diff")
6102 (version (string-append "0.2.0-1." (string-take commit 8)))
6103 (source (origin
6104 (method git-fetch)
6105 (uri (git-reference
b0e7b699 6106 (url "https://github.com/postmodern/nokogiri-diff")
5b0c223a
BW
6107 (commit commit)))
6108 (file-name (string-append name "-" version "-checkout"))
6109 (sha256
6110 (base32
6111 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
6112 (build-system ruby-build-system)
6113 (propagated-inputs
6114 `(("ruby-tdiff" ,ruby-tdiff)
6115 ("ruby-nokogiri" ,ruby-nokogiri)))
6116 (native-inputs
6117 `(("ruby-rspec" ,ruby-rspec)
6118 ("ruby-yard" ,ruby-yard)
6119 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
6120 (synopsis "Calculate the differences between two XML/HTML documents")
6121 (description
6122 "@code{Nokogiri::Diff} adds the ability to calculate the
f60f5002 6123differences (added or removed nodes) between two XML/HTML documents.")
5b0c223a
BW
6124 (home-page "https://github.com/postmodern/nokogiri-diff")
6125 (license license:expat))))
f60f5002 6126
6dc21310
CB
6127(define-public ruby-racc
6128 (package
6129 (name "ruby-racc")
6130 (version "1.4.14")
6131 (source
6132 (origin
6133 (method url-fetch)
6134 (uri (rubygems-uri "racc" version))
6135 (sha256
6136 (base32
6137 "00yhs2ag7yy5v83mqvkbnhk9bvsh6mx3808k53n61ddzx446v1zl"))))
6138 (build-system ruby-build-system)
6139 (native-inputs
6140 `(("ruby-hoe" ,ruby-hoe)
6141 ("ruby-rake-compiler" ,ruby-rake-compiler)))
6142 (synopsis "LALR(1) parser generator for Ruby")
6143 (description
6144 "Racc is a LALR(1) parser generator. It is written in Ruby itself, and
6145generates Ruby program.")
6146 (home-page "http://i.loveruby.net/en/projects/racc/")
6147 (license (list
6148 ;; Generally licensed under the LGPL2.1, and some files also
6149 ;; available under the same license as Ruby.
6150 license:lgpl2.1
6151 license:ruby))))
6152
64b6ccc3
DT
6153(define-public ruby-rack
6154 (package
6155 (name "ruby-rack")
288d2480 6156 (version "2.0.6")
64b6ccc3
DT
6157 (source
6158 (origin
83870c32 6159 (method git-fetch)
1db791d5 6160 ;; Download from GitHub so that the patch can be applied.
83870c32
EF
6161 (uri (git-reference
6162 (url "https://github.com/rack/rack")
6163 (commit version)))
6164 (file-name (git-file-name name version))
64b6ccc3
DT
6165 (sha256
6166 (base32
83870c32 6167 "1n7z4g1x6yxip096cdc04wq7yk7ywpinq28g2xjb46r4nlv5h0j6"))
1db791d5
BW
6168 ;; Ignore test which fails inside the build environment but works
6169 ;; outside.
6170 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
64b6ccc3
DT
6171 (build-system ruby-build-system)
6172 (arguments
6173 '(#:phases
6174 (modify-phases %standard-phases
6175 (add-before 'check 'fix-tests
6176 (lambda _
6177 ;; A few of the tests use the length of a file on disk for
6178 ;; Content-Length and Content-Range headers. However, this file
6179 ;; has a shebang in it which an earlier phase patches, growing
6180 ;; the file size from 193 to 239 bytes when the store prefix is
6181 ;; "/gnu/store".
6182 (let ((size-diff (- (string-length (which "ruby"))
6183 (string-length "/usr/bin/env ruby"))))
6184 (substitute* '("test/spec_file.rb")
6185 (("193")
6186 (number->string (+ 193 size-diff)))
6187 (("bytes(.)22-33" all delimiter)
6188 (string-append "bytes"
6189 delimiter
6190 (number->string (+ 22 size-diff))
6191 "-"
6192 (number->string (+ 33 size-diff))))))
83870c32
EF
6193 #t))
6194 (add-before 'reset-gzip-timestamps 'make-files-writable
6195 (lambda* (#:key outputs #:allow-other-keys)
6196 ;; Make sure .gz files are writable so that the
6197 ;; 'reset-gzip-timestamps' phase can do its work.
6198 (let ((out (assoc-ref outputs "out")))
6199 (for-each make-file-writable
6200 (find-files out "\\.gz$"))
6201 #t))))))
64b6ccc3 6202 (native-inputs
1db791d5
BW
6203 `(("ruby-minitest" ,ruby-minitest)
6204 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
6205 ("which" ,which)))
6206 (propagated-inputs
6207 `(("ruby-concurrent" ,ruby-concurrent)))
64b6ccc3
DT
6208 (synopsis "Unified web application interface for Ruby")
6209 (description "Rack provides a minimal, modular and adaptable interface for
6210developing web applications in Ruby. By wrapping HTTP requests and responses,
6211it unifies the API for web servers, web frameworks, and software in between
6212into a single method call.")
2f3800e5 6213 (home-page "https://rack.github.io/")
64b6ccc3 6214 (license license:expat)))
62e4cc5a 6215
20a0f804
BW
6216(define-public ruby-rack-test
6217 (package
6218 (name "ruby-rack-test")
6219 (version "0.8.3")
6220 (source
6221 (origin
6222 (method url-fetch)
6223 (uri (rubygems-uri "rack-test" version))
6224 (sha256
6225 (base32
6226 "14ij39zywvr1i9f6jsixfg4zxi2q1m1n1nydvf47f0b6sfc9mv1g"))))
6227 (build-system ruby-build-system)
6228 (arguments
6229 ;; Disable tests because of circular dependencies: requires sinatra,
6230 ;; which requires rack-protection, which requires rack-test. Instead
6231 ;; simply require the library.
6232 `(#:phases
6233 (modify-phases %standard-phases
6234 (replace 'check
6235 (lambda _
6236 (invoke "ruby" "-Ilib" "-r" "rack/test"))))))
6237 (propagated-inputs
6238 `(("ruby-rack" ,ruby-rack)))
6239 (synopsis "Testing API for Rack applications")
6240 (description
6241 "Rack::Test is a small, simple testing API for Rack applications. It can
6242be used on its own or as a reusable starting point for Web frameworks and
6243testing libraries to build on.")
6244 (home-page "https://github.com/rack-test/rack-test")
6245 (license license:expat)))
6246
a0a7e690
BW
6247(define-public ruby-rack-protection
6248 (package
6249 (name "ruby-rack-protection")
3355e49c 6250 (version "2.0.5")
a0a7e690
BW
6251 (source
6252 (origin
6253 (method url-fetch)
6254 (uri (rubygems-uri "rack-protection" version))
6255 (sha256
6256 (base32
3355e49c 6257 "15167q25rmxipqwi6hjqj3i1byi9iwl3xq9b7mdar7qiz39pmjsk"))))
a0a7e690
BW
6258 (build-system ruby-build-system)
6259 (arguments
fafeeaa2 6260 '(;; Tests missing from the gem.
a0a7e690
BW
6261 #:tests? #f))
6262 (propagated-inputs
6263 `(("ruby-rack" ,ruby-rack)))
6264 (native-inputs
6265 `(("bundler" ,bundler)
6266 ("ruby-rspec" ,ruby-rspec-2)
6267 ("ruby-rack-test" ,ruby-rack-test)))
6268 (synopsis "Rack middleware that protects against typical web attacks")
6269 (description "Rack middleware that can be used to protect against typical
6270web attacks. It can protect all Rack apps, including Rails. For instance, it
6271protects against cross site request forgery, cross site scripting,
6272clickjacking, directory traversal, session hijacking and IP spoofing.")
6273 (home-page "https://github.com/sinatra/sinatra/tree/master/rack-protection")
6274 (license license:expat)))
6275
6edabcb2
CB
6276(define-public ruby-rainbow
6277 (package
6278 (name "ruby-rainbow")
6279 (version "3.0.0")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (rubygems-uri "rainbow" version))
6284 (sha256
6285 (base32
6286 "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk"))))
6287 (build-system ruby-build-system)
6288 (arguments
6289 '(#:phases
6290 (modify-phases %standard-phases
6291 ;; Run rspec directly, to avoid requiring Rubocop which is used from
6292 ;; the Rakefile.
6293 (replace 'check
6294 (lambda* (#:key tests? #:allow-other-keys)
6295 (when tests?
6296 (invoke "rspec"))
6297 #t)))))
6298 (native-inputs
6299 `(("bundler" ,bundler)
6300 ("ruby-rspec" ,ruby-rspec)))
6301 (synopsis "Colorize printed text on ANSI terminals")
6302 (description
6303 "@code{rainbow} provides a string presenter object to colorize strings by
6304wrapping them in ANSI escape codes.")
6305 (home-page "https://github.com/sickill/rainbow")
79193b20
CB
6306 (license license:expat)))
6307
6188d643
CB
6308(define-public ruby-rr
6309 (package
6310 (name "ruby-rr")
6311 (version "1.2.1")
6312 (source
6313 (origin
6314 (method url-fetch)
6315 (uri (rubygems-uri "rr" version))
6316 (sha256
6317 (base32
6318 "1n9g78ba4c2zzmz8cdb97c38h1xm0clircag00vbcxwqs4dq0ymp"))))
6319 (build-system ruby-build-system)
6320 (arguments
6321 '(#:tests? #f)) ; test files not included
6322 (native-inputs
6323 `(("bundler" ,bundler)
6324 ("ruby-rspec" ,ruby-rspec)))
6325 (synopsis "Ruby test double framework")
6326 (description
6327 "RR is a test double framework that features a rich selection of double
6328techniques and a terse syntax.")
6329 (home-page "https://rr.github.io/rr/")
6330 (license license:expat)))
6331
79193b20
CB
6332(define-public ruby-rest-client
6333 (package
6334 (name "ruby-rest-client")
6335 (version "2.0.2")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (rubygems-uri "rest-client" version))
6340 (sha256
6341 (base32
6342 "1hzcs2r7b5bjkf2x2z3n8z6082maz0j8vqjiciwgg3hzb63f958j"))))
6343 (build-system ruby-build-system)
6344 (arguments
6345 '(#:phases
6346 (modify-phases %standard-phases
6347 (add-before 'check 'remove-unnecessary-development-dependencies
6348 (lambda _
6349 (substitute* "rest-client.gemspec"
6350 ;; Remove rubocop as it's unused. Rubocop also indirectly
6351 ;; depends on this package through ruby-parser and ruby-ast so
6352 ;; this avoids a dependency loop.
6353 ((".*rubocop.*") "\n")
6354 ;; Remove pry as it's unused, it's a debugging tool
6355 ((".*pry.*") "\n")
6356 ;; Remove an unnecessarily strict rdoc dependency
6357 ((".*rdoc.*") "\n"))
6358 #t))
6359 (add-before 'check 'delete-network-dependent-tests
6360 (lambda _
6361 (delete-file "spec/integration/request_spec.rb")
6362 (delete-file "spec/integration/httpbin_spec.rb")
6363 #t)))))
6364 (propagated-inputs
6365 `(("ruby-http-cookie" ,ruby-http-cookie)
6366 ("ruby-mime-types" ,ruby-mime-types)
6367 ("ruby-netrc" ,ruby-netrc)))
6368 (native-inputs
6369 `(("bundler" ,bundler)
eea094cc
TGR
6370 ("ruby-webmock" ,ruby-webmock-2)
6371 ("ruby-rspec" ,ruby-rspec)))
79193b20
CB
6372 (synopsis "Simple HTTP and REST client for Ruby")
6373 (description
6374 "@code{rest-client} provides a simple HTTP and REST client for Ruby,
6375inspired by the Sinatra microframework style of specifying actions:
6376@code{get}, @code{put}, @code{post}, @code{delete}.")
6377 (home-page "https://github.com/rest-client/rest-client")
6edabcb2
CB
6378 (license license:expat)))
6379
5d8fe6de
CB
6380(define-public ruby-rubocop
6381 (package
6382 (name "ruby-rubocop")
865ba3f4 6383 (version "0.77.0")
5d8fe6de
CB
6384 (source
6385 (origin
6386 (method url-fetch)
6387 (uri (rubygems-uri "rubocop" version))
6388 (sha256
6389 (base32
865ba3f4 6390 "0m88b1bgbhmmbdnz2xv6n0il0j4q5qm9jbc0vf1zsaxmxqp06nx9"))))
5d8fe6de
CB
6391 (build-system ruby-build-system)
6392 (arguments
6393 '(;; No included tests
6394 #:tests? #f))
6395 (propagated-inputs
6396 `(("ruby-parser" ,ruby-parser)
6397 ("ruby-powerpack" ,ruby-powerpack)
6398 ("ruby-rainbow" ,ruby-rainbow)
6399 ("ruby-progressbar" ,ruby-progressbar)
6400 ("ruby-parallel" ,ruby-parallel)
6401 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
6402 ("ruby-unicode-display-width" ,ruby-unicode-display-width)))
6403 (synopsis "Ruby code style checking tool")
6404 (description
6405 "@code{rubocop} is a Ruby code style checking tool. It aims to enforce
6406the community-driven Ruby Style Guide.")
6407 (home-page "https://github.com/rubocop-hq/rubocop")
6408 (license license:expat)))
6409
6ef85256
BW
6410(define-public ruby-contest
6411 (package
6412 (name "ruby-contest")
6413 (version "0.1.3")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (rubygems-uri "contest" version))
6418 (sha256
6419 (base32
6420 "1p9f2292b7b0fbrcjswvj9v01z7ig5ig52328wyqcabgb553qsdf"))))
6421 (build-system ruby-build-system)
6422 (synopsis "Write declarative tests using nested contexts")
6423 (description
6424 "Contest allows writing declarative @code{Test::Unit} tests using nested
6425contexts without performance penalties.")
6426 (home-page "https://github.com/citrusbyte/contest")
6427 (license license:expat)))
6428
c4550f75
BW
6429(define-public ruby-creole
6430 (package
6431 (name "ruby-creole")
6432 (version "0.5.0")
6433 (source
6434 (origin
6435 (method url-fetch)
6436 (uri (rubygems-uri "creole" version))
6437 (sha256
6438 (base32
6439 "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm"))))
6440 (build-system ruby-build-system)
6441 (native-inputs
6442 `(("ruby-bacon" ,ruby-bacon)))
6443 (synopsis "Creole markup language converter")
6444 (description
6445 "Creole is a lightweight markup language and this library for converting
6446creole to @code{HTML}.")
6447 (home-page "https://github.com/minad/creole")
6448 (license license:ruby)))
6449
6aaa815e
PP
6450(define-public ruby-docile
6451 (package
6452 (name "ruby-docile")
6453 (version "1.1.5")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (rubygems-uri "docile" version))
6458 (sha256
6459 (base32
6460 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
6461 (build-system ruby-build-system)
6462 (arguments
6463 '(#:tests? #f)) ; needs github-markup, among others
6464 (synopsis "Ruby EDSL helper library")
6465 (description "Docile is a Ruby library that provides an interface for
6466creating embedded domain specific languages (EDSLs) that manipulate existing
6467Ruby classes.")
6468 (home-page "https://ms-ati.github.io/docile/")
6469 (license license:expat)))
6470
fab8fed3
MC
6471(define-public ruby-middleware
6472 (package
6473 (name "ruby-middleware")
6474 (version "0.1.0")
6475 (source
6476 (origin
6477 (method url-fetch)
6478 (uri (rubygems-uri "middleware" version))
6479 (sha256
6480 (base32
6481 "0703nkf2v371wqr41c04x5qid7ww45cxqv3hnlg07if3b3xrm9xl"))))
6482 (build-system ruby-build-system)
6483 (arguments '(#:tests? #f)) ;no test suite
6484 (synopsis "Implementation of a middleware abstraction for Ruby")
6485 (description "Middleware is a generalized implementation of a middleware
6486abstraction for Ruby.")
6487 (home-page "https://github.com/mitchellh/middleware")
6488 (license license:expat)))
6489
1d537c71
MC
6490(define-public ruby-benchmark-ips
6491 (package
6492 (name "ruby-benchmark-ips")
6493 (version "2.8.2")
6494 (source
6495 (origin
6496 (method url-fetch)
6497 (uri (rubygems-uri "benchmark-ips" version))
6498 (sha256
6499 (base32
6500 "1n9397j7kh4vvikfann1467qgksc679imlr50hax3lk1q3af8kdw"))))
6501 (build-system ruby-build-system)
6502 (native-inputs
6503 `(("ruby-hoe" ,ruby-hoe)))
6504 (synopsis "Iterations per second enhancement for the Ruby Benchmark module")
6505 (description "Benchmark-ips enhances the Ruby Benchmark module with the
6506iterations per second count. For short snippets of code, it can automatically
6507figure out how many times to run the code to get interesting data.")
6508 (home-page "https://github.com/evanphx/benchmark-ips")
6509 (license license:expat)))
6510
fc5d1c5a
MC
6511(define-public ruby-ffi-rzmq-core
6512 (package
6513 (name "ruby-ffi-rzmq-core")
6514 (version "1.0.7")
6515 (source
6516 (origin
6517 (method url-fetch)
6518 (uri (rubygems-uri "ffi-rzmq-core" version))
6519 (sha256
6520 (base32
6521 "0amkbvljpjfnv0jpdmz71p1i3mqbhyrnhamjn566w0c01xd64hb5"))))
6522 (build-system ruby-build-system)
6523 (arguments
6524 `(#:phases
6525 (modify-phases %standard-phases
6526 (add-after 'unpack 'patch-libzmq-search-path
6527 (lambda* (#:key inputs #:allow-other-keys)
6528 (let ((zeromq (assoc-ref inputs "zeromq")))
6529 (substitute* "lib/ffi-rzmq-core/libzmq.rb"
6530 (("/usr/local/lib")
6531 (string-append zeromq "/lib")))
6532 #t)))
6533 (replace 'check
6534 (lambda _
6535 (invoke "rspec"))))))
6536 (native-inputs
6537 `(("ruby-rspec" ,ruby-rspec)))
6538 (inputs
6539 `(("zeromq" ,zeromq)))
6540 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
6541 (synopsis "Low-level Ruby FFI wrapper for the ZeroMQ networking library")
6542 (description "This library only provides the FFI wrapper for the ZeroMQ
6543networking library. It can be used to implement a Ruby API for the ZeroMQ
6544library.")
6545 (home-page "https://github.com/chuckremes/ffi-rzmq-core")
6546 (license license:expat)))
6547
7a503516
MC
6548(define-public ruby-ffi-rzmq
6549 (package
6550 (name "ruby-ffi-rzmq")
6551 (version "2.0.7")
6552 (source
6553 (origin
6554 (method url-fetch)
6555 (uri (rubygems-uri "ffi-rzmq" version))
6556 (sha256
6557 (base32
6558 "14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
6559 (build-system ruby-build-system)
6560 (arguments '(#:tests? #t
6561 #:phases (modify-phases %standard-phases
6562 (replace 'check
6563 (lambda _
6564 (invoke "rspec"))))))
6565 (native-inputs
6566 `(("ruby-rspec" ,ruby-rspec)))
6567 (propagated-inputs
6568 `(("ruby-ffi-rzmq-core" ,ruby-ffi-rzmq-core)))
6569 (synopsis "High-level Ruby wrapper for the ZeroMQ networking library")
6570 (description "This library provides a high-level API that wraps the ZeroMQ
6571networking library using the Ruby foreign function interface (FFI). It is a
6572pure Ruby wrapper, hence is compatible with any Ruby runtime that has support
6573for FFI.")
6574 (home-page "https://github.com/chuckremes/ffi-rzmq")
6575 (license license:expat)))
6576
03a0f98a
MC
6577(define-public ruby-sawyer
6578 (package
6579 (name "ruby-sawyer")
6580 (version "0.8.2")
6581 (source
6582 (origin
6583 (method url-fetch)
6584 (uri (rubygems-uri "sawyer" version))
6585 (sha256
6586 (base32
6587 "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"))))
6588 (build-system ruby-build-system)
6589 (propagated-inputs
6590 `(("ruby-addressable" ,ruby-addressable)
6591 ("ruby-faraday" ,ruby-faraday)))
6592 (synopsis "Experimental hypermedia agent for Ruby")
6593 (description "Sawyer is an experimental hypermedia agent for Ruby built on
6594top of Faraday.")
6595 (home-page "https://github.com/lostisland/sawyer")
6596 (license license:expat)))
6597
aa3c76b1
MC
6598(define-public ruby-octokit
6599 (package
6600 (name "ruby-octokit")
6601 (version "4.18.0")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (rubygems-uri "octokit" version))
6606 (sha256
6607 (base32
6608 "0zvfr9njmj5svi39fcsi2b0g7pcxb0vamw9dlyas8bg814jlzhi6"))))
6609 (build-system ruby-build-system)
6610 (arguments '(#:tests? #f)) ;no test suite in the gem release
6611 (propagated-inputs
6612 `(("ruby-faraday" ,ruby-faraday)
6613 ("ruby-sawyer" ,ruby-sawyer)))
6614 (synopsis "Ruby toolkit for the GitHub API")
6615 (description "Octokit wraps the GitHub API in a flat API client that
6616follows Ruby conventions and requires little knowledge of REST.")
6617 (home-page "https://github.com/octokit/octokit.rb")
6618 (license license:expat)))
6619
1157d2f8
MC
6620(define-public ruby-chandler
6621 (package
6622 (name "ruby-chandler")
6623 (version "0.9.0")
6624 (source
6625 (origin
6626 (method url-fetch)
6627 (uri (rubygems-uri "chandler" version))
6628 (sha256
6629 (base32
6630 "1n8a4mr2jkcz5vaaps45g2rxa2pzy1wb7cylgw85xmmyyp14lnrr"))))
6631 (build-system ruby-build-system)
6632 (native-inputs
6633 `(("ruby-rubocop" ,ruby-rubocop)))
6634 (propagated-inputs
6635 `(("ruby-netrc" ,ruby-netrc)
6636 ("ruby-octokit" ,ruby-octokit)))
6637 (synopsis "Sync CHANGELOG entries to GitHub's release notes")
6638 (description "Chandler syncs a project's CHANGELOG file entries to
6639GitHub's release notes to remove the need of manually entering release
6640notes.")
6641 (home-page "https://github.com/mattbrictson/chandler")
6642 (license license:expat)))
6643
acb28876
MC
6644(define-public ruby-pry-byebug
6645 (package
6646 (name "ruby-pry-byebug")
6647 (version "3.9.0")
6648 (source
6649 (origin
6650 (method git-fetch)
6651 (uri (git-reference
b0e7b699 6652 (url "https://github.com/deivid-rodriguez/pry-byebug")
acb28876
MC
6653 (commit (string-append "v" version))))
6654 (file-name (git-file-name name version))
6655 (sha256
6656 (base32
6657 "1kchrwccai92068p50zyd6mh524ywqnm0jw5g3lks7iwmf0xkmgc"))))
6658 (build-system ruby-build-system)
6659 (arguments
6660 `(#:phases (modify-phases %standard-phases
6661 (add-before 'check 'set-home
6662 (lambda _
6663 (setenv "HOME" (getcwd))
6664 #t)))))
6665 (native-inputs
6666 `(("ruby-chandler" ,ruby-chandler)
6667 ("ruby-rubocop" ,ruby-rubocop)
6668 ("ruby-simplecov" ,ruby-simplecov)))
6669 (propagated-inputs
6670 `(("ruby-byebug" ,ruby-byebug-11)
6671 ("ruby-pry" ,ruby-pry)))
6672 (synopsis "Step-by-step debugging and stack navigation in Pry")
6673 (description "This package adds step-by-step debugging and stack
6674navigation capabilities to @code{pry}, using @code{byebug}.")
6675 (home-page "https://github.com/deivid-rodriguez/pry-byebug")
6676 (license license:expat)))
6677
4d31fe6b
MC
6678(define-public ruby-binding-of-caller
6679 (package
6680 (name "ruby-binding-of-caller")
6681 (version "0.8.0")
6682 (source
6683 (origin
6684 (method url-fetch)
6685 (uri (rubygems-uri "binding_of_caller" version))
6686 (sha256
6687 (base32
6688 "05syqlks7463zsy1jdfbbdravdhj9hpj5pv2m74blqpv8bq4vv5g"))))
6689 (build-system ruby-build-system)
6690 ;; Attempting to run the test suite fails with a rake deprecation error
6691 ;; (see: https://github.com/banister/binding_of_caller/issues/76).
6692 (arguments '(#:tests? #f))
6693 (propagated-inputs
6694 `(("ruby-debug-inspector" ,ruby-debug-inspector)))
6695 (synopsis "Retrieve the binding of a method's caller")
6696 (description "The @code{binding_of_caller} module provides the
6697@code{Binding#of_caller} method. It allows accessing bindings from upper
6698frames in the call stack and can evaluate code in that context.")
6699 (home-page "https://github.com/banister/binding_of_caller")
6700 (license license:expat)))
6701
f4699abc
MC
6702(define-public ruby-pry-stack-explorer
6703 (package
6704 (name "ruby-pry-stack-explorer")
6705 (version "0.5.1")
6706 (source
6707 (origin
6708 (method url-fetch)
6709 (uri (rubygems-uri "pry-stack_explorer" version))
6710 (sha256
6711 (base32
6712 "157rd2n9pfvcmmicm0xkq8z4p6famaj13syrpra6b4032qpb1wn0"))))
6713 (build-system ruby-build-system)
6714 (arguments '(#:tests? #f)) ;no test suite in gem release
6715 (propagated-inputs
6716 `(("ruby-binding-of-caller" ,ruby-binding-of-caller)
6717 ("ruby-pry" ,ruby-pry)))
6718 (synopsis "Call-stack navigation plugin for the Pry REPL")
6719 (description "@code{pry-stack_explorer} is a plugin for the Pry REPL that
6720add support to navigate the call-stack.")
6721 (home-page "https://github.com/pry/pry-stack_explorer")
6722 (license license:expat)))
6723
1f014c97
MC
6724(define-public ruby-varint
6725 (package
6726 (name "ruby-varint")
6727 (version "0.1.1")
6728 (source
6729 (origin
6730 (method url-fetch)
6731 (uri (rubygems-uri "varint" version))
6732 (sha256
6733 (base32
6734 "1y0l2qc64cwsyv76ygg9bbjnk86riz2kq73kmn87gdrlmpiyrdac"))))
6735 (build-system ruby-build-system)
6736 (arguments '(#:tests? #f)) ;no test suite
6737 (synopsis "Variable length integers (varint) C extension for Ruby")
6738 (description "This package provides a small C extension to speed up
6739variable length integers (varint) in Ruby Protocol Buffers.")
6740 (home-page "https://github.com/liquidm/varint")
6741 (license license:bsd-3)))
6742
1b214174
MC
6743(define-public ruby-ruby-prof
6744 (package
6745 (name "ruby-ruby-prof")
6746 (version "1.4.1")
6747 (source
6748 (origin
6749 (method url-fetch)
6750 (uri (rubygems-uri "ruby-prof" version))
6751 (sha256
6752 (base32
6753 "12cd91m08ih0imfpy4k87618hd4mhyz291a6bx2hcskza4nf6d27"))))
6754 (build-system ruby-build-system)
6755 (arguments
6756 `(#:phases
6757 (modify-phases %standard-phases
6758 (add-after 'unpack 'patch-rakefile
6759 ;; This fixes the following error: "NameError: uninitialized
6760 ;; constant Bundler::GemHelper" (see:
6761 ;; https://github.com/ruby-prof/ruby-prof/issues/274).
6762 (lambda _
6763 (substitute* "Rakefile"
6764 ((".*require \"bundler/setup\".*" all)
6765 (string-append all " require 'bundler/gem_tasks'\n")))
6766 #t))
661ad8d7
MC
6767 ;; The LineNumbersTest test fails non-deterministically (see:
6768 ;; https://github.com/ruby-prof/ruby-prof/issues/276).
6769 (add-after 'extract-gemspec 'delete-flaky-test
6770 (lambda _
6771 (delete-file "test/line_number_test.rb")
6772 (substitute* "ruby-prof.gemspec"
6773 (("\"test/line_number_test\\.rb\"\\.freeze, ") ""))
6774 #t))
1b214174
MC
6775 (add-before 'check 'compile
6776 (lambda _
6777 (invoke "rake" "compile"))))))
6778 (native-inputs
6779 `(("bundler" ,bundler)
6780 ("ruby-minitest" ,ruby-minitest)
6781 ("ruby-rake-compiler" ,ruby-rake-compiler)
6782 ("ruby-rdoc" ,ruby-rdoc)))
6783 (synopsis "Fast code profiler for Ruby")
6784 (description "RubyProf is a fast code profiler for Ruby. Its features
6785include:
6786@table @asis
6787@item Speed
6788Being a C extension, it is many times faster than the standard Ruby profiler.
6789@item Measurement Modes
6790It can measure program wall time, process time, object allocations and memory
6791usage.
6792@item Reports
6793A variety of text and cross-referenced HTML reports can be generated.
6794@item Threads
6795Profiling multiple threads simultaneously is supported.
6796@end table")
6797 (home-page "https://github.com/ruby-prof/ruby-prof")
6798 (license license:bsd-2)))
6799
dff5392f
MC
6800(define-public ruby-cucumber-messages
6801 (package
6802 (name "ruby-cucumber-messages")
6803 (version "12.2.0")
6804 (source (origin
6805 (method git-fetch)
6806 (uri (git-reference
b0e7b699 6807 (url "https://github.com/cucumber/messages-ruby")
dff5392f
MC
6808 (commit "12cd07eac87bce7843fd1bb0bf64bc4da09f097c")))
6809 (file-name (git-file-name name version))
6810 (sha256
6811 (base32
6812 "16wwqfpsq7crvxc3q08lphgyh12cl2d83p1c79p312q4jmy9cn5a"))))
6813 (build-system ruby-build-system)
6814 (arguments
6815 `(#:phases (modify-phases %standard-phases
6816 (add-after 'unpack 'patch-protobuf.rb
6817 (lambda _
6818 (substitute* "rake/protobuf.rb"
6819 (("load 'protobuf/tasks/compile.rake'")
6820 "require 'protobuf/tasks'"))
6821 #t))
6822 (add-before 'build 'compile
6823 (lambda _
6824 (substitute* "Makefile"
6825 (("bundle exec ") "")
6826 (("include default.mk.*" all)
6827 (string-append "#" all)))
6828 (invoke "make")))
6829 (replace 'check
6830 (lambda _
6831 (invoke "rspec"))))))
6832 (propagated-inputs
6833 `(("ruby-protobuf" ,ruby-protobuf-cucumber)))
6834 (native-inputs
6835 `(("ruby-rspec" ,ruby-rspec)))
6836 (home-page "https://github.com/cucumber/messages-ruby")
6837 (synopsis "Cucumber Messages for Ruby (Protocol Buffers)")
6838 (description "Cucumber Messages for Ruby is a library which allows
6839serialization and deserialization of the protocol buffer messages used in
6840Cucumber.")
6841 (license license:expat)))
6842
44514637 6843(define-public ruby-gherkin
62e4cc5a 6844 (package
44514637 6845 (name "ruby-gherkin")
cfef316f
MC
6846 (version "14.0.1")
6847 (source (origin
6848 (method git-fetch)
6849 (uri (git-reference
6850 (url "https://github.com/cucumber/gherkin-ruby")
6851 (commit (string-append "v" version))))
6852 (file-name (git-file-name name version))
6853 (sha256
6854 (base32
6855 "1dwa8632nc6kijv8p257jl64rsjmc0fimlaqvxlkdi2h9n1nympb"))))
62e4cc5a
PP
6856 (build-system ruby-build-system)
6857 (native-inputs
cfef316f
MC
6858 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
6859 ("ruby-rspec" ,ruby-rspec)))
62e4cc5a 6860 (arguments
cfef316f 6861 `(#:test-target "spec"))
62e4cc5a 6862 (synopsis "Gherkin parser for Ruby")
44514637 6863 (description "Gherkin is a parser and compiler for the Gherkin language.
aada5f6f
CB
6864It is intended be used by all Cucumber implementations to parse
6865@file{.feature} files.")
cfef316f 6866 (home-page "https://github.com/cucumber/gherkin-ruby")
62e4cc5a 6867 (license license:expat)))
cd89fecb 6868
8f85018d
MB
6869(define-public ruby-gherkin-ruby
6870 (package
6871 (name "ruby-gherkin-ruby")
6872 (version "0.3.2")
702a1012 6873 (home-page "https://github.com/codegram/gherkin-ruby")
8f85018d
MB
6874 (source (origin
6875 (method url-fetch)
6876 (uri (rubygems-uri "gherkin-ruby" version))
6877 (sha256
6878 (base32
6879 "18ay7yiibf4sl9n94k7mbi4k5zj2igl4j71qcmkswv69znyx0sn1"))))
6880 (build-system ruby-build-system)
6881 (synopsis "Pure Ruby Gherkin parser")
6882 (description
6883 "Gherkin-ruby is a Gherkin parser written in pure Ruby and less than
6884200 lines of code.")
6885 ;; XXX: No license information anywhere but Readme.md.
6886 (license license:expat)))
6887
15b16c2c
CB
6888(define-public ruby-aruba
6889 (package
6890 (name "ruby-aruba")
cf7201c4 6891 (version "0.14.14")
15b16c2c
CB
6892 (source
6893 (origin
6894 (method url-fetch)
6895 (uri (rubygems-uri "aruba" version))
6896 (sha256
6897 (base32
cf7201c4 6898 "0l2mfpdxc03gdrbwc2hv4vdhjhqhfcdp6d02j05j64ncpi9srlqn"))))
15b16c2c
CB
6899 (build-system ruby-build-system)
6900 (arguments
6901 '(#:test-target "spec"
6902 #:phases
6903 (modify-phases %standard-phases
6904 (add-after 'unpack 'patch
6905 (lambda _
6906 (substitute* "spec/aruba/api_spec.rb"
6907 ;; This resolves some errors in the specs
6908 ;;
6909 ;; undefined method `parse' for Time:Class
6910 (("require 'spec_helper'")
6911 "require 'spec_helper'\nrequire 'time'"))
6912 ;; Avoid shebang issues in this spec file
6913 (substitute* "spec/aruba/matchers/command_spec.rb"
6914 (("/usr/bin/env bash")
6915 (which "bash")))
6916 #t))
6917 (add-before 'check 'remove-unnecessary-dependencies
6918 (lambda _
6919 (substitute* "Gemfile"
6920 ((".*byebug.*") "\n")
6921 ((".*pry.*") "\n")
6922 ((".*yaml.*") "\n")
6923 ((".*bcat.*") "\n")
6924 ((".*kramdown.*") "\n")
6925 ((".*rubocop.*") "\n")
6926 ((".*cucumber-pro.*") "\n")
6927 ((".*cucumber.*") "\n")
6928 ((".*license_finder.*") "\n")
6929 ((".*rake.*") "gem 'rake'\n")
15b16c2c 6930 ((".*relish.*") "\n"))
15b16c2c
CB
6931 (substitute* "aruba.gemspec"
6932 (("spec\\.add\\_runtime\\_dependency 'cucumber'.*")
6933 "spec.add_runtime_dependency 'cucumber'"))
6934 #t))
6935 (add-before 'check 'set-home
6936 (lambda _ (setenv "HOME" "/tmp") #t)))))
6937 (native-inputs
6938 `(("bundler" ,bundler)
6939 ("ruby-rspec" ,ruby-rspec)
cf7201c4
CB
6940 ("ruby-fuubar" ,ruby-fuubar)
6941 ("ruby-simplecov" ,ruby-simplecov)))
15b16c2c
CB
6942 (propagated-inputs
6943 `(("ruby-childprocess" ,ruby-childprocess)
6944 ("ruby-contracts" ,ruby-contracts)
6945 ("ruby-cucumber" ,ruby-cucumber)
6946 ("ruby-ffi" ,ruby-ffi)
6947 ("ruby-rspec-expectations" ,ruby-rspec-expectations)
6948 ("ruby-thor" ,ruby-thor)
6949 ("ruby-yard" ,ruby-yard)))
6950 (synopsis "Test command-line applications with Cucumber, RSpec or Minitest")
6951 (description
6952 "Aruba is an extension for Cucumber, RSpec and Minitest for testing
6953command-line applications. It supports applications written in any
6954language.")
6955 (home-page "https://github.com/cucumber/aruba")
6956 (license license:expat)))
6957
6958;; A version of ruby-aruba without tests run so that circular dependencies can
6959;; be avoided.
6960(define ruby-aruba-without-tests
6961 (package
6962 (inherit ruby-aruba)
6963 (arguments '(#:tests? #f))
6964 (propagated-inputs
6965 `(("ruby-cucumber" ,ruby-cucumber-without-tests)
6966 ,@(alist-delete "ruby-cucumber"
6967 (package-propagated-inputs ruby-aruba))))
6968 (native-inputs '())))
6969
fd6577b4
MC
6970(define-public ruby-sys-uname
6971 (package
6972 (name "ruby-sys-uname")
6973 (version "1.2.1")
6974 (source
6975 (origin
6976 (method url-fetch)
6977 (uri (rubygems-uri "sys-uname" version))
6978 (sha256
6979 (base32
6980 "00p3wwvkdbg6pl38bchaagncv3i4fq4y0ks470imwykjanpy2ic0"))))
6981 (build-system ruby-build-system)
6982 (arguments
6983 `(#:test-target "spec"))
6984 (propagated-inputs `(("ruby-ffi" ,ruby-ffi)))
6985 (native-inputs `(("ruby-rspec" ,ruby-rspec)))
6986 (synopsis "Ruby interface for gathering system information")
6987 (description "The sys-uname library provides an interface for gathering
6988information about your current platform. It allows retrieving information
6989such as the OS name, OS version, system name, etc.")
6990 (home-page "https://github.com/djberg96/sys-uname")
6991 (license license:asl2.0)))
6992
ac3ec612
MC
6993(define-public ruby-cucumber-create-meta
6994 (package
6995 (name "ruby-cucumber-create-meta")
6996 (version "1.0.0")
6997 (source
6998 (origin
6999 (method url-fetch)
7000 (uri (rubygems-uri "cucumber-create-meta" version))
7001 (sha256
7002 (base32
7003 "0i0i3arymjrnjk72mg79w1a11607x4d0lrqafm9sz2gq9l52zasw"))))
7004 (build-system ruby-build-system)
7005 (arguments
7006 `(#:phases (modify-phases %standard-phases
7007 (add-after 'extract-gemspec 'relax-version-requirements
7008 (lambda _
7009 (substitute* ".gemspec"
7010 ((" 12\\.2")
7011 " 12.1"))
7012 #t))
7013 (replace 'check
7014 (lambda _
7015 (invoke "rspec"))))))
7016 (native-inputs
7017 `(("ruby-rspec" ,ruby-rspec)))
7018 (propagated-inputs
7019 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
7020 ("ruby-sys-uname" ,ruby-sys-uname)))
7021 (synopsis "Function to create @code{Meta} messages for Cucumber Ruby")
7022 (description "The @code{createMeta} utility function allows generating
7023system-specific @code{Meta} messages for Cucumber Ruby.")
7024 (home-page "https://github.com/cucumber/cucumber/tree/master/create-meta/ruby")
7025 (license license:expat)))
7026
f3574624
MC
7027(define-public ruby-cucumber-html-formatter
7028 (package
7029 (name "ruby-cucumber-html-formatter")
7030 (version "7.0.0")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (rubygems-uri "cucumber-html-formatter" version))
7035 (sha256
7036 (base32
7037 "0lshj4sw9jw7687wrhknyb9kffblai3l843zgrznyqij3ga0bc62"))))
7038 (build-system ruby-build-system)
7039 (arguments
7040 `(#:phases (modify-phases %standard-phases
7041 (replace 'check
7042 (lambda _
7043 (invoke "rspec"))))))
7044 (native-inputs
7045 `(("ruby-rspec" ,ruby-rspec)))
7046 (propagated-inputs
7047 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)))
7048 (synopsis "HTML formatter for Cucumber")
7049 (description "Cucumber HTML Formatter produces a HTML report for Cucumber
7050runs. It is built on top of cucumber-react and works with any Cucumber
7051implementation with a protocol buffer formatter that outputs Cucumber
7052messages.")
7053 (home-page "https://github.com/cucumber/cucumber/tree/\
7054master/html-formatter/ruby")
7055 (license license:expat)))
7056
15b16c2c
CB
7057(define-public ruby-cucumber
7058 (package
7059 (name "ruby-cucumber")
92ebbaad 7060 (version "4.1.0")
15b16c2c
CB
7061 (source
7062 (origin
7063 (method git-fetch)
7064 (uri (git-reference
b0e7b699 7065 (url "https://github.com/cucumber/cucumber-ruby")
15b16c2c
CB
7066 (commit (string-append "v" version))))
7067 (file-name (git-file-name name version))
7068 (sha256
7069 (base32
92ebbaad 7070 "0g9rqfslbzkkrq2kvl14fgknrhfbji3bjjpjxff5nc9wzd3hd549"))))
15b16c2c
CB
7071 (build-system ruby-build-system)
7072 (arguments
fa8e4dbf 7073 '(#:test-target "default"
15b16c2c
CB
7074 #:phases
7075 (modify-phases %standard-phases
fa8e4dbf
MC
7076 (add-after 'unpack 'disable-rubocop
7077 ;; Rubocop lint check fails with our more recent version.
7078 (lambda _
7079 (substitute* "Rakefile"
7080 (("spec cucumber rubocop")
7081 "spec cucumber"))
7082 #t))
92ebbaad 7083 (add-after 'extract-gemspec 'strip-version-requirements
15b16c2c 7084 (lambda _
fa8e4dbf 7085 (delete-file "Gemfile") ;do not use Bundler
92ebbaad
MC
7086 (substitute* "cucumber.gemspec"
7087 (("(.*add_.*dependency '[_A-Za-z0-9-]+').*" _ stripped)
7088 (string-append stripped "\n")))
fa8e4dbf
MC
7089 #t))
7090 (add-before 'check 'set-home
7091 (lambda _
7092 (setenv "HOME" (getcwd))
15b16c2c
CB
7093 #t)))))
7094 (propagated-inputs
7095 `(("ruby-builder" ,ruby-builder)
7096 ("ruby-cucumber-core" ,ruby-cucumber-core)
92ebbaad
MC
7097 ("ruby-cucumber-create-meta" ,ruby-cucumber-create-meta)
7098 ("ruby-cucumber-html-formatter" ,ruby-cucumber-html-formatter)
7099 ("ruby-cucumber-messages" ,ruby-cucumber-messages)
15b16c2c 7100 ("ruby-cucumber-wire" ,ruby-cucumber-wire)
15b16c2c
CB
7101 ("ruby-diff-lcs" ,ruby-diff-lcs)
7102 ("ruby-gherkin" ,ruby-gherkin)
7103 ("ruby-multi-json" ,ruby-multi-json)
7104 ("ruby-multi-test" ,ruby-multi-test)))
7105 (native-inputs
92ebbaad 7106 `(;; Use a untested version of aruba, to avoid a circular dependency, as
15b16c2c
CB
7107 ;; ruby-aruba depends on ruby-cucumber.
7108 ("ruby-aruba", ruby-aruba-without-tests)
7109 ("ruby-rspec" ,ruby-rspec)
7110 ("ruby-pry" ,ruby-pry)
92ebbaad
MC
7111 ("ruby-nokogiri" ,ruby-nokogiri)
7112 ("ruby-rubocop" ,ruby-rubocop)))
15b16c2c 7113 (synopsis "Describe automated tests in plain language")
92ebbaad
MC
7114 (description "Cucumber is a tool for running automated tests written in
7115plain language. It's designed to support a Behaviour Driven Development (BDD)
15b16c2c
CB
7116software development workflow.")
7117 (home-page "https://cucumber.io/")
7118 (license license:expat)))
7119
7120(define ruby-cucumber-without-tests
7121 (package (inherit ruby-cucumber)
7122 (arguments
7123 '(#:tests? #f))
7124 (native-inputs
7125 '())))
7126
f048ef52
MC
7127(define-public ruby-coveralls
7128 (package
7129 (name "ruby-coveralls")
7130 (version "0.8.23")
7131 (source
7132 (origin
7133 (method url-fetch)
7134 (uri (rubygems-uri "coveralls" version))
7135 (sha256
7136 (base32
7137 "1mv4fn5lfxhy7bc2f1lpnc5yp9mvv97az77j4r7jgrxcqwn8fqxc"))))
7138 (build-system ruby-build-system)
7139 ;; The test suite depends on ruby-vcr, which cannot be included in Guix
7140 ;; because of its nonfree, Hippocratic derived license.
7141 (arguments '(#:tests? #f))
7142 (propagated-inputs
7143 `(("ruby-json" ,ruby-json)
7144 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
7145 ("ruby-thor" ,ruby-thor)
7146 ("ruby-tins" ,ruby-tins)))
7147 (synopsis "Ruby implementation of the Coveralls API")
7148 (description "This package provides a Ruby implementation of the Coveralls
7149API.")
7150 (home-page "https://coveralls.io")
7151 (license license:expat)))
f2a1b7fa
MC
7152
7153(define-public ruby-unindent
7154 (package
7155 (name "ruby-unindent")
7156 (version "1.0")
7157 (source
7158 (origin
7159 (method url-fetch)
7160 (uri (rubygems-uri "unindent" version))
7161 (sha256
7162 (base32
7163 "1wqh3rzv8589yzibigminxx3qpmj2nqj28f90xy1sczk1pijmcrd"))))
7164 (build-system ruby-build-system)
7165 (synopsis "Ruby method to unindent strings")
7166 (description "This module provides a @code{String#unindent} Ruby method to
7167unindent strings, which can be useful to unindent multiline strings embedded
7168in already-indented code.")
7169 (home-page "https://github.com/mynyml/unindent")
7170 (license license:expat)))
f048ef52 7171
cd89fecb
PP
7172(define-public ruby-cucumber-core
7173 (package
7174 (name "ruby-cucumber-core")
95a5d992 7175 (version "7.1.0")
cd89fecb
PP
7176 (source
7177 (origin
95a5d992
MC
7178 (method git-fetch)
7179 (uri (git-reference
b0e7b699 7180 (url "https://github.com/cucumber/cucumber-ruby-core")
95a5d992
MC
7181 (commit (string-append "v" version))))
7182 (file-name (git-file-name name version))
cd89fecb
PP
7183 (sha256
7184 (base32
95a5d992 7185 "1p5wb6wbggbw37ariyag4kxpiczznvgm3c8cnz1744dmbj79q1rn"))))
cd89fecb 7186 (build-system ruby-build-system)
95a5d992
MC
7187 (arguments
7188 `(#:test-target "spec"
7189 #:phases
7190 (modify-phases %standard-phases
7191 (add-after 'extract-gemspec 'relax-version-requirements
7192 (lambda _
7193 (substitute* "cucumber-core.gemspec"
7194 (("'cucumber-tag-expressions',.*")
7195 "'cucumber-tag-expressions', '>=2.0.0'\n"))
7196 #t)))))
7197 (native-inputs
7198 `(("ruby-rspec" ,ruby-rspec)
7199 ("ruby-coveralls" ,ruby-coveralls)
7200 ("ruby-rubocop" ,ruby-rubocop)
7201 ("ruby-simplecov" ,ruby-simplecov)
7202 ("ruby-unindent" ,ruby-unindent)))
cd89fecb 7203 (propagated-inputs
95a5d992 7204 `(("ruby-cucumber-messages" ,ruby-cucumber-messages)
5cd047e8
CB
7205 ("ruby-gherkin" ,ruby-gherkin)
7206 ("ruby-cucumber-tag-expressions" ,ruby-cucumber-tag-expressions)))
cd89fecb
PP
7207 (synopsis "Core library for the Cucumber BDD app")
7208 (description "Cucumber is a tool for running automated tests
7209written in plain language. Because they're written in plain language,
7210they can be read by anyone on your team. Because they can be read by
7211anyone, you can use them to help improve communication, collaboration
7212and trust on your team.")
7213 (home-page "https://cucumber.io/")
7214 (license license:expat)))
212d563d 7215
fb1a8954
CB
7216(define-public ruby-cucumber-expressions
7217 (package
7218 (name "ruby-cucumber-expressions")
4ada4a42 7219 (version "10.2.0")
fb1a8954
CB
7220 (source
7221 (origin
4ada4a42
MC
7222 (method git-fetch)
7223 (uri (git-reference
b0e7b699 7224 (url "https://github.com/cucumber/cucumber-expressions-ruby")
4ada4a42
MC
7225 (commit (string-append "v" version))))
7226 (file-name (git-file-name name version))
fb1a8954
CB
7227 (sha256
7228 (base32
4ada4a42 7229 "1aivhcpjrmbvp9bg0y7g6zxh2swfvylvg0sapq5jc4i1y74k8npd"))))
fb1a8954
CB
7230 (build-system ruby-build-system)
7231 (arguments
7232 '(#:test-target "spec"))
7233 (native-inputs
4ada4a42 7234 `(("ruby-rspec" ,ruby-rspec)
fb1a8954
CB
7235 ("ruby-simplecov" ,ruby-simplecov)))
7236 (synopsis "Simpler alternative to Regular Expressions")
7237 (description "Cucumber Expressions offer similar functionality to Regular
7238Expressions, with a syntax that is easier to read and write. Cucumber
7239Expressions are extensible with parameter types.")
7240 (home-page "https://github.com/cucumber/cucumber-expressions-ruby")
7241 (license license:expat)))
7242
ce872770
CB
7243(define-public ruby-cucumber-wire
7244 (package
7245 (name "ruby-cucumber-wire")
6516827e 7246 (version "3.1.0")
ce872770
CB
7247 (source
7248 (origin
7249 (method url-fetch)
7250 (uri (rubygems-uri "cucumber-wire" version))
7251 (sha256
7252 (base32
6516827e 7253 "0z1n13lqv70zb2lcrvs2263lm0gsb3gz8gbv890kxzwp8cvd433k"))))
ce872770
CB
7254 (build-system ruby-build-system)
7255 (arguments
6516827e 7256 '(#:tests? #f ;tests use cucumber, causing a cycle
ce872770
CB
7257 #:phases
7258 (modify-phases %standard-phases
6516827e 7259 (add-after 'extract-gemspec 'relax-version-requirements
ce872770 7260 (lambda _
6516827e
MC
7261 (substitute* ".gemspec"
7262 ((" 10\\.1") " 10.2"))
ce872770 7263 #t)))))
6516827e
MC
7264 (propagated-inputs
7265 `(("ruby-cucumber-core" ,ruby-cucumber-core)
7266 ("ruby-cucumber-expressions" ,ruby-cucumber-expressions)
7267 ("ruby-cucumber-messages" ,ruby-cucumber-messages)))
ce872770 7268 (synopsis "Cucumber wire protocol plugin")
6516827e
MC
7269 (description "Cucumber's wire protocol allows step definitions to be
7270implemented and invoked on any platform.")
ce872770
CB
7271 (home-page "https://github.com/cucumber/cucumber-ruby-wire")
7272 (license license:expat)))
7273
0ce8f344
CB
7274(define-public ruby-cucumber-tag-expressions
7275 (package
7276 (name "ruby-cucumber-tag-expressions")
0d2c45ce 7277 (version "3.0.0")
0ce8f344
CB
7278 (source
7279 (origin
0d2c45ce
MC
7280 (method git-fetch)
7281 (uri (git-reference
b0e7b699 7282 (url "https://github.com/cucumber/tag-expressions-ruby")
0d2c45ce
MC
7283 (commit (string-append "v" version))))
7284 (file-name (git-file-name name version))
0ce8f344
CB
7285 (sha256
7286 (base32
0d2c45ce 7287 "15dw4w0npd4m6aw7zhqkjxxzngp42kswrkwfygxkxcxnhy5zl1vx"))))
0ce8f344
CB
7288 (build-system ruby-build-system)
7289 (arguments
0d2c45ce 7290 `(#:test-target "spec"))
0ce8f344
CB
7291 (native-inputs
7292 `(("ruby-rspec" ,ruby-rspec)))
7293 (synopsis "Cucumber tag expressions for Ruby")
0d2c45ce
MC
7294 (description "Cucumber tag expression parser for Ruby. A tag expression
7295is an infix boolean expression used by Cucumber.")
0ce8f344
CB
7296 (home-page "https://github.com/cucumber/tag-expressions-ruby")
7297 (license license:expat)))
7298
73a5aff7
CB
7299(define-public ruby-bindex
7300 (package
7301 (name "ruby-bindex")
7302 (version "0.5.0")
7303 (source
7304 (origin
7305 (method url-fetch)
7306 (uri (rubygems-uri "bindex" version))
7307 (sha256
7308 (base32
7309 "1wvhf4v8sk5x8li03pcc0v0wglmyv7ikvvg05bnms83dfy7s4k8i"))))
7310 (build-system ruby-build-system)
7311 (arguments
7312 '(#:test-target "default"))
7313 (native-inputs
7314 `(("bundler" ,bundler)
7315 ("ruby-rake-compiler" ,ruby-rake-compiler)))
7316 (synopsis "Provides access for bindings relating to Ruby exceptions")
7317 (description
7318 "@code{bindex} provides a way to access the bindings that relate to
7319exceptions in Ruby, providing more information about the context in which the
7320exception occurred.")
7321 (home-page "https://github.com/gsamokovarov/bindex")
7322 (license license:expat)))
7323
212d563d
PP
7324(define-public ruby-bio-logger
7325 (package
7326 (name "ruby-bio-logger")
7327 (version "1.0.1")
7328 (source
7329 (origin
7330 (method url-fetch)
7331 (uri (rubygems-uri "bio-logger" version))
7332 (sha256
7333 (base32
7334 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
7335 (build-system ruby-build-system)
7336 (arguments
7337 `(#:tests? #f)) ; rake errors, missing shoulda
7338 (propagated-inputs
7339 `(("ruby-log4r" ,ruby-log4r)))
7340 (synopsis "Log4r wrapper for Ruby")
7341 (description "Bio-logger is a wrapper around Log4r adding extra logging
7342features such as filtering and fine grained logging.")
7343 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
7344 (license license:expat)))
07f61cb2 7345
2db0f9c8
BW
7346(define-public ruby-yajl-ruby
7347 (package
7348 (name "ruby-yajl-ruby")
7349 (version "1.4.1")
7350 (source
7351 (origin
7352 (method url-fetch)
7353 (uri (rubygems-uri "yajl-ruby" version))
7354 (sha256
7355 (base32
7356 "16v0w5749qjp13xhjgr2gcsvjv6mf35br7iqwycix1n2h7kfcckf"))))
7357 (build-system ruby-build-system)
7358 (arguments
7359 '(#:test-target "spec"
7360 #:phases
7361 (modify-phases %standard-phases
7362 (add-before 'check 'patch-test-to-update-load-path
7363 (lambda _
7364 (substitute* "spec/parsing/large_number_spec.rb"
7365 (("require \"yajl\"")
7366 "$LOAD_PATH << 'lib'; require 'yajl'"))
7367 #t)))))
7368 (native-inputs
7369 `(("ruby-rake-compiler" ,ruby-rake-compiler)
7370 ("ruby-rspec" ,ruby-rspec)))
7371 (synopsis "Streaming JSON parsing and encoding library for Ruby")
7372 (description
7373 "Ruby C bindings to the Yajl JSON stream-based parser library. The API
7374is compatible with the JSON gem, so yajl-ruby can act as a drop in
7375replacement.
7376
7377A modified copy of yajl is used, and included in the package.")
7378 (home-page "https://github.com/brianmario/yajl-ruby")
7379 (license (list license:expat ; Ruby code, yajl_ext.c and yajl_ext.h
7380 license:bsd-3)))) ; Included, modified copy of yajl
7381
07f61cb2 7382(define-public ruby-yard
6499893e
BW
7383 (package
7384 (name "ruby-yard")
7eb8ff0b 7385 (version "0.9.25")
6499893e
BW
7386 (source
7387 (origin
f3fd70c0 7388 (method git-fetch)
6499893e 7389 ;; Tests do not pass if we build from the distributed gem.
f3fd70c0 7390 (uri (git-reference
65a61239
MC
7391 (url "https://github.com/lsegal/yard")
7392 (commit (string-append "v" version))))
f3fd70c0 7393 (file-name (git-file-name name version))
6499893e
BW
7394 (sha256
7395 (base32
7eb8ff0b 7396 "1x7y4s557hrnq439lih7nqg1y7ximardw75jx9i92x3yzpviqqwa"))))
6499893e
BW
7397 (build-system ruby-build-system)
7398 (arguments
65a61239
MC
7399 ;; Note: Tests are willfully disabled to alleviate dependency cycle
7400 ;; problems.
7401 `(#:tests? #f))
6499893e 7402 (synopsis "Documentation generation tool for Ruby")
65a61239
MC
7403 (description "YARD is a documentation generation tool for the Ruby
7404programming language. It enables the user to generate consistent, usable
7405documentation that can be exported to a number of formats very easily, and
7406also supports extending for custom Ruby constructs such as custom class level
7407definitions.")
2f3800e5 7408 (home-page "https://yardoc.org")
6499893e 7409 (license license:expat)))
2cbcd23a 7410
df32ab11
MC
7411(define-public ruby-yard-with-tests
7412 (package
7413 (inherit ruby-yard)
7414 (name "ruby-yard-with-tests")
7415 (arguments
7416 (substitute-keyword-arguments (package-arguments ruby-yard)
7417 ((#:tests? _ #t) #t)
7418 ((#:test-target _ "default") "default")
7419 ((#:phases phases '%standard-phases)
7420 `(modify-phases ,phases
7421 (add-before 'check 'prepare-for-tests
7422 (lambda* (#:key tests? #:allow-other-keys)
7423 (when tests?
7424 (substitute* "Rakefile"
7425 ((".*[Ss]amus.*") ""))
7426 ;; Delete the Gemfile to avoid errors relating to it.
7427 (delete-file "Gemfile")
7428 ;; $HOME needs to be set to somewhere writeable for tests to
7429 ;; run.
7430 (setenv "HOME" "/tmp"))
7431 #t))))))
7432 (native-inputs
7433 `(("ruby-rspec" ,ruby-rspec)
7434 ("ruby-rack" ,ruby-rack)
7435 ("ruby-redcloth" ,ruby-redcloth)
7436 ("ruby-asciidoc" ,ruby-asciidoctor)))))
7437
908df675
MC
7438(define-public ruby-spectroscope
7439 (package
7440 (name "ruby-spectroscope")
7441 (version "0.1.0")
7442 (source
7443 (origin
7444 (method url-fetch)
7445 (uri (rubygems-uri "spectroscope" version))
7446 (sha256
7447 (base32
7448 "0iiid9sm110qhx0i1zkds710cvsnmhd308wbqa7slkzbq2akrb3y"))))
7449 (build-system ruby-build-system)
7450 (arguments
7451 `(#:phases
7452 (modify-phases %standard-phases
7453 (replace 'check
7454 (lambda _
7455 (with-output-to-file ".test"
7456 (lambda _
7457 (display
7458 "\
7459require 'ae/should'
7460require 'rspec'
7461
7462include RSpec
7463
7464Test.run :default do |run|
7465 run.files << 'spec/*_spec.rb'
7466end")))
7467 (invoke "ruby" "-Ilib" "-rrubytest" ".test"))))))
7468 (native-inputs
7469 `(("ruby-ae" ,ruby-ae)
7470 ("ruby-rspec" ,ruby-rspec)))
7471 (propagated-inputs
7472 `(("ruby-rubytest" ,ruby-rubytest)))
7473 (synopsis "Behavior-Driven Development (BDD) framework built on RubyTest")
7474 (description "Spectroscope is a Behavior-Driven Development (BDD)
7475framework built on RubyTest, designed to emulate RSpec in most respects. It
7476is assertion framework independent so any number of assertion systems can be
7477used, such as Assay or AE.")
7478 (home-page "http://rubyworks.github.com/spectroscope/")
7479 (license license:bsd-2)))
7480
24ffd91b
MC
7481(define-public ruby-tomparse
7482 (package
7483 (name "ruby-tomparse")
7484 (version "0.4.2")
7485 (source
7486 (origin
7487 (method url-fetch)
7488 (uri (rubygems-uri "tomparse" version))
7489 (sha256
7490 (base32
7491 "06xakk41f1kgj6j1ahkwn4r6cvidixvm4phhlrvmwb7c3pr8ygc8"))))
7492 (build-system ruby-build-system)
7493 ;; TODO: Tests require citron and rulebow, not yet packaged.
7494 (arguments '(#:tests? #f))
7495 (synopsis "TomDoc parser for Ruby")
7496 (description "TomParse is a TomDoc parser for Ruby. It takes a code
7497comment as input and parses it into a convenient object-oriented structure in
7498accordance with the TomDoc standard. See
7499@url{https://github.com/mojombo/tomdoc, TomDoc} for more information about the
7500TomDoc format.")
7501 (home-page "http://rubyworks.github.com/tomparse/")
7502 (license license:bsd-2)))
7503
257dee50
MC
7504(define-public ruby-yard-tomdoc
7505 (package
7506 (name "ruby-yard-tomdoc")
7507 (version "0.7.1")
7508 (source
7509 (origin
7510 (method url-fetch)
7511 (uri (rubygems-uri "yard-tomdoc" version))
7512 (sha256
7513 (base32
7514 "1725gs8b8klpwhrvnf2wwp7dw3zxs9vz2la983l2d8c4r4fn1j2z"))))
7515 (build-system ruby-build-system)
7516 (arguments
7517 `(#:phases (modify-phases %standard-phases
7518 (replace 'check
7519 (lambda _
7520 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
7521 (native-inputs
7522 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
7523 ("ruby-spectroscope" ,ruby-spectroscope)
7524 ("ruby-ae" ,ruby-ae)))
7525 (propagated-inputs
7526 `(("ruby-tomparse" ,ruby-tomparse)
7527 ("ruby-yard" ,ruby-yard)))
7528 (synopsis "TomDoc syntax for YARD")
7529 (description "This module adds support for the TomDoc documentation format
7530to YARD, a documentation generation tool for Ruby.")
7531 (home-page "http://rubyworks.github.com/yard-tomdoc/")
7532 (license license:expat)))
7533
ad686ef3
RW
7534(define-public ruby-clap
7535 (package
7536 (name "ruby-clap")
7537 (version "1.0.0")
7538 (source (origin
7539 (method url-fetch)
7540 (uri (rubygems-uri "clap" version))
7541 (sha256
7542 (base32
7543 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
7544 (build-system ruby-build-system)
7545 ;; Clap needs cutest for running tests, but cutest needs clap.
7546 (arguments `(#:tests? #f))
7547 (synopsis "Command line argument parsing for simple applications")
7548 (description
7549 "Clap provides command line argument parsing features. It covers the
7550simple case of executing code based on the flags or parameters passed.")
7551 (home-page "https://github.com/djanowski/cutest")
0c80451e
RW
7552 (license license:expat)))
7553
7554(define-public ruby-cutest
7555 (package
7556 (name "ruby-cutest")
7557 (version "1.2.2")
7558 (source (origin
7559 (method url-fetch)
7560 (uri (rubygems-uri "cutest" version))
7561 (sha256
7562 (base32
7563 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
7564 (build-system ruby-build-system)
7565 (propagated-inputs
7566 `(("ruby-clap" ,ruby-clap)))
7567 (synopsis "Run tests in separate processes")
7568 (description
7569 "Cutest runs tests in separate processes to avoid shared state.")
7570 (home-page "https://github.com/djanowski/cutest")
ad686ef3
RW
7571 (license license:expat)))
7572
ac09beba
RW
7573(define-public ruby-pygmentize
7574 (package
7575 (name "ruby-pygmentize")
7576 (version "0.0.3")
7577 (source (origin
7578 (method url-fetch)
7579 (uri (rubygems-uri "pygmentize" version))
7580 (sha256
7581 (base32
7582 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
7583 (build-system ruby-build-system)
7584 (arguments
7585 `(#:phases
7586 (modify-phases %standard-phases
7587 (add-after 'unpack 'fix-pygmentize-path
7588 (lambda _
7589 (substitute* "lib/pygmentize.rb"
7590 (("\"/usr/bin/env python.*")
7591 (string-append "\"" (which "pygmentize") "\"\n")))
7592 #t))
7593 (add-after 'build 'do-not-use-vendor-directory
7594 (lambda _
7595 ;; Remove bundled pygments sources
7596 ;; FIXME: ruby-build-system does not support snippets.
7597 (delete-file-recursively "vendor")
7598 (substitute* "pygmentize.gemspec"
7599 (("\"vendor/\\*\\*/\\*\",") ""))
7600 #t)))))
7601 (inputs
7602 `(("pygments" ,python-pygments)))
7603 (native-inputs
7604 `(("ruby-cutest" ,ruby-cutest)
7605 ("ruby-nokogiri" ,ruby-nokogiri)))
7606 (synopsis "Thin Ruby wrapper around pygmentize")
7607 (description
7608 "Pygmentize provides a simple way to call pygmentize from within a Ruby
7609application.")
7610 (home-page "https://github.com/djanowski/pygmentize")
7611 (license license:expat)))
7612
2cbcd23a
DT
7613(define-public ruby-eventmachine
7614 (package
7615 (name "ruby-eventmachine")
c207fa5e 7616 (version "1.2.7")
2cbcd23a
DT
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (rubygems-uri "eventmachine" version))
7621 (sha256
7622 (base32
c207fa5e 7623 "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"))))
2cbcd23a
DT
7624 (build-system ruby-build-system)
7625 (arguments
c5d269fb 7626 '(#:tests? #f)) ; test suite tries to connect to google.com
2cbcd23a
DT
7627 (native-inputs
7628 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
7629 (synopsis "Single-threaded network event framework for Ruby")
7630 (description
7631 "EventMachine implements a single-threaded engine for arbitrary network
7632communications. EventMachine wraps all interactions with sockets, allowing
7633programs to concentrate on the implementation of network protocols. It can be
7634used to create both network servers and clients.")
24a26227
TGR
7635 ;; The ‘official’ rubyeventmachine.com domain is now registrar-squatted.
7636 (home-page "https://github.com/eventmachine/eventmachine")
2cbcd23a 7637 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
7d3a1a2d 7638
e218b0c8
BW
7639(define-public ruby-ruby-engine
7640 (package
7641 (name "ruby-ruby-engine")
77d098bf 7642 (version "2.0.0")
e218b0c8
BW
7643 (source
7644 (origin
7645 (method url-fetch)
7646 (uri (rubygems-uri "ruby_engine" version))
7647 (sha256
7648 (base32
77d098bf 7649 "0wqdcv8gxybp1y7kjhh18g3r9dczacs62d4ahcvyhz32bih8c9fm"))))
e218b0c8
BW
7650 (build-system ruby-build-system)
7651 (arguments
7652 `(#:phases
7653 (modify-phases %standard-phases
77d098bf 7654 (add-after 'extract-gemspec 'clean-up
e218b0c8
BW
7655 (lambda _
7656 (delete-file "Gemfile.lock")
7657 (substitute* "ruby_engine.gemspec"
7658 ;; Remove unnecessary imports that would entail further
7659 ;; dependencies.
7660 ((".*<rdoc.*") "")
7661 ((".*<rubygems-tasks.*") "")
7662 ;; Remove extraneous .gem file
77d098bf
MC
7663 (("\"pkg/ruby_engine-[0-9.]+\\.gem\".freeze, ") "")
7664 (("\"Gemfile.lock\".freeze, ") "")
e218b0c8 7665 ;; Soften rake dependency
77d098bf 7666 (("%q<rake>.freeze, \\[\"~> 10.0\"\\]")
e218b0c8
BW
7667 "%q<rake>.freeze, [\">= 10.0\"]")
7668 ;; Soften the rspec dependency
77d098bf 7669 (("%q<rspec>.freeze, \\[\"~> 2.4\"\\]")
e218b0c8
BW
7670 "%q<rspec>.freeze, [\">= 2.4\"]"))
7671 (substitute* "Rakefile"
7672 (("require 'rubygems/tasks'") "")
7673 (("Gem::Tasks.new") ""))
7674 ;; Remove extraneous .gem file that otherwise gets installed.
77d098bf 7675 (delete-file-recursively "pkg")
e218b0c8
BW
7676 #t)))))
7677 (native-inputs
7678 `(("bundler" ,bundler)
7679 ("ruby-rake" ,ruby-rake)
7680 ("ruby-rspec" ,ruby-rspec)))
7681 (synopsis "Simplifies checking for Ruby implementation")
7682 (description
7683 "@code{ruby_engine} provides an RubyEngine class that can be used to
7684check which implementation of Ruby is in use. It can provide the interpreter
7685name and provides query methods such as @{RubyEngine.mri?}.")
7686 (home-page "https://github.com/janlelis/ruby_engine")
7687 (license license:expat)))
7688
8092e333
BW
7689(define-public ruby-turn
7690 (package
7691 (name "ruby-turn")
7692 (version "0.9.7")
7693 (source
7694 (origin
7695 (method url-fetch)
7696 (uri (rubygems-uri "turn" version))
7697 (sha256
7698 (base32
7699 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
7700 (build-system ruby-build-system)
7701 (arguments
7702 `(#:phases
7703 (modify-phases %standard-phases
7704 ;; Tests fail because turn changes its environment so can no longer
7705 ;; find test/unit. Instead simply test if the executable runs
7706 ;; without issue.
7707 (replace 'check
7708 (lambda _
9923d5a4 7709 (invoke "ruby" "-Ilib" "bin/turn" "-h"))))))
8092e333
BW
7710 (propagated-inputs
7711 `(("ruby-ansi" ,ruby-ansi)
7712 ("ruby-minitest" ,ruby-minitest-4)))
7713 (synopsis "Alternate set of alternative runners for MiniTest")
7714 (description
7715 "TURN provides a set of alternative runners for MiniTest which are both
7716colorful and informative. TURN displays each test on a separate line with
7717failures being displayed immediately instead of at the end of the tests. Note
7718that TURN is no longer being maintained.")
f433b662 7719 (home-page "https://rubygems.org/gems/turn")
8092e333
BW
7720 (license license:expat)))
7721
8279b1d3
CB
7722(define-public ruby-mimemagic
7723 (package
7724 (name "ruby-mimemagic")
60bc8952 7725 (version "0.3.3")
8279b1d3
CB
7726 (source
7727 (origin
7728 (method url-fetch)
7729 (uri (rubygems-uri "mimemagic" version))
7730 (sha256
60bc8952 7731 (base32 "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"))))
8279b1d3
CB
7732 (build-system ruby-build-system)
7733 (arguments
7734 '(#:phases
7735 (modify-phases %standard-phases
7736 ;; This phase breaks the tests, as it patches some of the test data.
7737 (delete 'patch-source-shebangs))))
7738 (native-inputs
7739 `(("ruby-bacon" ,ruby-bacon)))
7740 (synopsis "Ruby library for MIME detection by extension or content")
7741 (description
7742 "@acronym{MIME, Multipurpose Internet Mail Extensions} detection by
7743extension or content, using the freedesktop.org.xml shared-mime-info
7744database.")
7745 (home-page "https://github.com/minad/mimemagic")
7746 (license license:expat)))
7747
32d1c06f
BW
7748(define-public ruby-mime-types-data
7749 (package
7750 (name "ruby-mime-types-data")
f49511db 7751 (version "3.2016.0521")
32d1c06f
BW
7752 (source
7753 (origin
7754 (method url-fetch)
7755 (uri (rubygems-uri "mime-types-data" version))
7756 (sha256
7757 (base32
f49511db 7758 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
32d1c06f
BW
7759 (build-system ruby-build-system)
7760 (native-inputs
7761 `(("ruby-hoe" ,ruby-hoe)))
7762 (synopsis "Registry for information about MIME media type definitions")
7763 (description
7764 "@code{mime-types-data} provides a registry for information about
7765Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
7766be used with the Ruby mime-types library or other software to determine
7767defined filename extensions for MIME types, or to use filename extensions to
7768look up the likely MIME type definitions.")
7769 (home-page "https://github.com/mime-types/mime-types-data/")
7770 (license license:expat)))
7771
d39b606c
BW
7772(define-public ruby-mime-types
7773 (package
7774 (name "ruby-mime-types")
803bcc81 7775 (version "3.1")
d39b606c
BW
7776 (source
7777 (origin
7778 (method url-fetch)
7779 (uri (rubygems-uri "mime-types" version))
7780 (sha256
7781 (base32
803bcc81 7782 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
d39b606c
BW
7783 (build-system ruby-build-system)
7784 (propagated-inputs
7785 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
7786 (native-inputs
7787 `(("ruby-hoe" ,ruby-hoe)
7788 ("ruby-fivemat" ,ruby-fivemat)
7789 ("ruby-minitest-focus" ,ruby-minitest-focus)
7790 ("ruby-minitest-rg" ,ruby-minitest-rg)
803bcc81
BW
7791 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
7792 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
d39b606c
BW
7793 (synopsis "Library and registry for MIME content type definitions")
7794 (description "The mime-types library provides a library and registry for
7795information about Multipurpose Internet Mail Extensions (MIME) content type
7796definitions. It can be used to determine defined filename extensions for MIME
7797types, or to use filename extensions to look up the likely MIME type
7798definitions.")
7799 (home-page "https://github.com/mime-types/ruby-mime-types")
7800 (license license:expat)))
7801
eb5e0bd9
BW
7802(define-public ruby-fivemat
7803 (package
7804 (name "ruby-fivemat")
c664ebcc 7805 (version "1.3.7")
eb5e0bd9
BW
7806 (source
7807 (origin
7808 (method url-fetch)
7809 (uri (rubygems-uri "fivemat" version))
7810 (sha256
7811 (base32
c664ebcc 7812 "0pzlycasvwmg4bbx7plllpqnhd9zlmmff8l2w3yii86nrm2nvf9n"))))
eb5e0bd9
BW
7813 (build-system ruby-build-system)
7814 (arguments
7815 `(#:tests? #f)) ; no tests
7816 (synopsis "Each test file given its own line of dots")
7817 (description
7818 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
7819its own line of dots during testing. It aims to provide test output that is
7820neither too verbose nor too minimal.")
7821 (home-page "https://github.com/tpope/fivemat")
7822 (license license:expat)))
7823
4fea500b
BW
7824(define-public ruby-sqlite3
7825 (package
7826 (name "ruby-sqlite3")
e7cdba61 7827 (version "1.4.2")
4fea500b
BW
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (rubygems-uri "sqlite3" version))
7832 (sha256
7833 (base32
e7cdba61 7834 "0lja01cp9xd5m6vmx99zwn4r7s97r1w5cb76gqd8xhbm1wxyzf78"))))
4fea500b
BW
7835 (build-system ruby-build-system)
7836 (arguments
7837 `(#:phases
7838 (modify-phases %standard-phases
7839 (add-before 'check 'add-gemtest-file
7840 ;; This file exists in the repository but is not distributed.
9923d5a4 7841 (lambda _ (invoke "touch" ".gemtest"))))))
4fea500b
BW
7842 (inputs
7843 `(("sqlite" ,sqlite)))
7844 (native-inputs
7845 `(("ruby-hoe" ,ruby-hoe)
7846 ("ruby-rake-compiler" ,ruby-rake-compiler)
7847 ("ruby-mini-portile" ,ruby-mini-portile)))
7848 (synopsis "Interface with SQLite3 databases")
7849 (description
7850 "This module allows Ruby programs to interface with the SQLite3 database
7851engine.")
7852 (home-page
7853 "https://github.com/sparklemotion/sqlite3-ruby")
7854 (license license:bsd-3)))
7855
4dfa39cc
BW
7856(define-public ruby-shoulda-context
7857 (package
7858 (name "ruby-shoulda-context")
e7d1d472 7859 (version "1.2.2")
4dfa39cc
BW
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (rubygems-uri "shoulda-context" version))
7864 (sha256
7865 (base32
e7d1d472 7866 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
4dfa39cc
BW
7867 (build-system ruby-build-system)
7868 (arguments
7869 `(#:phases
7870 (modify-phases %standard-phases
7871 (replace 'check
7872 (lambda _
7873 ;; Do not run tests to avoid circular dependence with rails.
7874 ;; Instead just import the library to test.
9923d5a4 7875 (invoke "ruby" "-Ilib" "-r" "shoulda-context"))))))
4dfa39cc
BW
7876 (synopsis "Test::Unit context framework extracted from Shoulda")
7877 (description
7878 "@code{shoulda-context} is the context framework extracted from Shoulda.
7879Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
7880context, setup, and should blocks combine to produce natural test method
7881names.")
7882 (home-page "https://github.com/thoughtbot/shoulda-context")
7883 (license license:expat)))
7884
e4fea008
BW
7885(define-public ruby-shoulda-matchers
7886 (package
7887 (name "ruby-shoulda-matchers")
d1c1f368 7888 (version "3.1.2")
e4fea008
BW
7889 (source
7890 (origin
7891 (method url-fetch)
7892 (uri (rubygems-uri "shoulda-matchers" version))
7893 (sha256
7894 (base32
d1c1f368 7895 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
e4fea008
BW
7896 (build-system ruby-build-system)
7897 (arguments
7898 `(#:phases
7899 (modify-phases %standard-phases
e4fea008
BW
7900 (replace 'check
7901 (lambda _
7902 ;; Do not run tests to avoid circular dependence with rails. Instead
7903 ;; just import the library to test.
9923d5a4 7904 (invoke "ruby" "-Ilib" "-r" "shoulda-matchers"))))))
e4fea008
BW
7905 (propagated-inputs
7906 `(("ruby-activesupport" ,ruby-activesupport)))
7907 (synopsis "Collection of testing matchers extracted from Shoulda")
7908 (description
7909 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
7910test common Rails functionality. These tests would otherwise be much longer,
7911more complex, and error-prone.")
7912 (home-page "https://github.com/thoughtbot/shoulda-matchers")
7913 (license license:expat)))
7914
3885c58b
BW
7915(define-public ruby-shoulda-matchers-2
7916 (package
7917 (inherit ruby-shoulda-matchers)
7918 (version "2.8.0")
7919 (source (origin
7920 (method url-fetch)
7921 (uri (rubygems-uri "shoulda-matchers" version))
7922 (sha256
7923 (base32
7924 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
7925
6f390716
BW
7926(define-public ruby-shoulda
7927 (package
7928 (name "ruby-shoulda")
7929 (version "3.5.0")
7930 (source
7931 (origin
7932 (method url-fetch)
7933 (uri (rubygems-uri "shoulda" version))
7934 (sha256
7935 (base32
7936 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
7937 (build-system ruby-build-system)
7938 (arguments
7939 `(#:phases
7940 (modify-phases %standard-phases
7941 (replace 'check
7942 ;; Don't run tests to avoid circular dependence with rails. Instead
7943 ;; just import the library to test.
9923d5a4 7944 (lambda _ (invoke "ruby" "-Ilib" "-r" "shoulda"))))))
6f390716
BW
7945 (propagated-inputs
7946 `(("ruby-shoulda-context" ,ruby-shoulda-context)
7947 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
7948 (synopsis "Context framework and matchers for testing")
7949 (description
7950 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
7951@code{shoulda-matchers} providing tools for writing tests.")
7952 (home-page "https://github.com/thoughtbot/shoulda")
7953 (license license:expat)))
7954
3b44bcdf
BW
7955(define-public ruby-unf
7956 (package
7957 (name "ruby-unf")
7958 (version "0.1.4")
7959 (source
7960 (origin
7961 (method url-fetch)
7962 (uri (rubygems-uri "unf" version))
7963 (sha256
7964 (base32
7965 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
7966 (build-system ruby-build-system)
7967 (arguments
7968 `(#:phases
7969 (modify-phases %standard-phases
7970 (add-before 'check 'add-dependency-to-bundler
7971 (lambda _
7972 ;; test-unit is required but not provided by the bundler
7973 ;; environment. This is fixed in the upstream repository but fix
7974 ;; has not been released.
7975 (substitute* "Gemfile"
7976 (("^gemspec") "gem 'test-unit'\ngemspec"))
7977 #t)))))
7978 (propagated-inputs
7979 `(("ruby-unf-ext" ,ruby-unf-ext)))
7980 (native-inputs
7981 `(("ruby-shoulda" ,ruby-shoulda)
7982 ("bundler" ,bundler)
7983 ("ruby-test-unit" ,ruby-test-unit)))
7984 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
7985 (description
7986 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
7987support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
7988@code{java.text.Normalizer} on JRuby.")
7989 (home-page "https://github.com/knu/ruby-unf")
7990 (license license:bsd-2)))
7991
e32c99d2
CB
7992(define-public ruby-warden
7993 (package
7994 (name "ruby-warden")
7995 (version "1.2.8")
7996 (source
7997 (origin
7998 (method url-fetch)
7999 (uri (rubygems-uri "warden" version))
8000 (sha256
8001 (base32
8002 "1fr9n9i9r82xb6i61fdw4xgc7zjv7fsdrr4k0njchy87iw9fl454"))))
8003 (build-system ruby-build-system)
8004 (arguments
8005 '(#:tests? #f)) ; No included tests
8006 (propagated-inputs
8007 `(("ruby-rack" ,ruby-rack)))
8008 (synopsis "Rack middleware providing authentication")
8009 (description
8010 "Warden is a Rack-based middleware that provides a mechanism for
8011authentication in Ruby web applications.")
8012 (home-page "https://github.com/wardencommunity/warden")
8013 (license license:expat)))
8014
e42eecdb
CB
8015(define-public ruby-warden-oauth2
8016 (package
8017 (name "ruby-warden-oauth2")
8018 (version "0.0.1")
8019 (source
8020 (origin
8021 (method url-fetch)
8022 (uri (rubygems-uri "warden-oauth2" version))
8023 (sha256
8024 (base32
8025 "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
8026 (build-system ruby-build-system)
8027 (arguments
8028 '(#:test-target "spec"
8029 #:phases
8030 (modify-phases %standard-phases
8031 (add-after 'unpack 'remove-unnecessary-dependencies
8032 (lambda _
8033 (substitute* "Gemfile"
8034 ;; All of these gems relate to development, and are unnecessary
8035 ;; when running the tests
8036 (("gem 'guard-bundler'") "")
8037 (("gem 'guard'") "")
8038 (("gem 'guard-rspec'") "")
8039 (("gem 'rb-fsevent'") "")
8040 (("gem 'pry'") "")
8041 (("gem 'growl'") ""))
8042 #t))
8043 ;; The test suite doesn't work with rspec@2, and this is incompatible
8044 ;; with the current version of Rake, so invoke Rspec directly
8045 (replace 'check
8046 (lambda* (#:key tests? #:allow-other-keys)
8047 (when tests?
8048 (invoke "bundle" "exec" "rspec"))
8049 #t)))))
8050 (propagated-inputs
8051 `(("ruby-warden" ,ruby-warden)))
8052 (native-inputs
8053 `(("bundler" ,bundler)
8054 ("ruby-rspec" ,ruby-rspec-2)
8055 ("ruby-rack-test" ,ruby-rack-test)))
8056 (synopsis "OAuth 2.0 strategies for Warden")
8057 (description
8058 "This library extends Warden to support OAuth 2.0 authorized API
8059requests.")
8060 (home-page "https://github.com/opperator/warden-oauth2")
8061 (license license:expat)))
8062
8c7ae384
CB
8063(define-public ruby-webmock-2
8064 (package
8065 (name "ruby-webmock")
8066 (version "2.3.2")
8067 (source
8068 (origin
8069 (method url-fetch)
8070 (uri (rubygems-uri "webmock" version))
8071 (sha256
8072 (base32
8073 "04hkcqsmbfnp8g237pisnc834vpgildklicbjbyikqg0bg1rwcy5"))))
8074 (build-system ruby-build-system)
8075 (native-inputs
8076 `(("bundler" ,bundler)
8077 ("ruby-rspec" ,ruby-rspec)))
8078 (propagated-inputs
8079 `(("ruby-addressable" ,ruby-addressable)
8080 ("ruby-crack" ,ruby-crack)
8081 ("ruby-hashdiff" ,ruby-hashdiff)))
8082 (synopsis "Allows stubbing and setting expectations on HTTP requests")
8083 (description
8084 "WebMock allows stubbing HTTP requests and setting expectations on HTTP
8085requests. This is useful when testing software.")
8086 (home-page "https://github.com/bblimke/webmock")
8087 (license license:expat)))
8088
d8c189ed
CB
8089(define-public ruby-unicode-display-width
8090 (package
8091 (name "ruby-unicode-display-width")
216ccced 8092 (version "1.6.0")
d8c189ed
CB
8093 (source
8094 (origin
8095 (method url-fetch)
8096 (uri (rubygems-uri "unicode-display_width" version))
8097 (sha256
8098 (base32
216ccced 8099 "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w"))))
d8c189ed
CB
8100 (build-system ruby-build-system)
8101 (arguments
8102 '(;; Test data not included.
8103 #:tests? #f))
8104 (synopsis "Determine the monospace display width of Ruby strings")
8105 (description
8106 "@code{Unicode::DisplayWidth} is a Ruby library which can determine the
8107display width of strings in Ruby.")
8108 (home-page "https://github.com/janlelis/unicode-display_width")
8109 (license license:expat)))
8110
6120589f
CB
8111;; There is another gem called 'ruby-version' so we use an underscore in this
8112;; name
8113(define-public ruby_version
8114 (package
8115 (name "ruby_version")
1097fdbe 8116 (version "1.0.2")
6120589f
CB
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (rubygems-uri "ruby_version" version))
8121 (sha256
8122 (base32
1097fdbe 8123 "0lvc7bd5ps3w2vq2wb02i0pi3vfcx2rnckx2ix4rjym1qf52kb2j"))))
6120589f
CB
8124 (build-system ruby-build-system)
8125 (arguments
1097fdbe 8126 `(#:phases
6120589f
CB
8127 (modify-phases %standard-phases
8128 (add-before 'check 'fix-dependencies
8129 (lambda _
8130 ;; Remove the Gemfile.lock, as we want to use Guix packages at
8131 ;; whatever versions.
8132 (delete-file "Gemfile.lock")
1097fdbe
MC
8133 ;; Remove the included gem files as they unnecessary.
8134 (delete-file-recursively "pkg/")
8135 ;; Accept any version of rake, rdoc and rspec
6120589f 8136 (substitute* "ruby_version.gemspec"
6120589f 8137 (("%q<rake.*") "%q<rake>)\n")
1097fdbe 8138 (("%q<rdoc.*") "%q<rdoc>)\n")
6120589f 8139 (("%q<rspec.*") "%q<rspec>)\n"))
1097fdbe 8140 ;; Do not use bundler.
6120589f 8141 (substitute* "Rakefile"
1097fdbe 8142 (("Bundler\\.setup.*") "nil\n"))
6120589f
CB
8143 #t)))))
8144 (native-inputs
1097fdbe
MC
8145 `(("ruby-rdoc" ,ruby-rdoc)
8146 ("ruby-rspec" ,ruby-rspec)
8147 ("ruby-rubygems-tasks", ruby-rubygems-tasks)))
6120589f 8148 (synopsis "Ruby library to help check the Ruby version")
1097fdbe 8149 (description "@code{ruby_version} provides a @code{RubyVersion} module to simplify
6120589f
CB
8150checking for the right Ruby version in software.")
8151 (home-page "https://github.com/janlelis/ruby_version")
8152 (license license:expat)))
8153
a229acff
CB
8154(define-public ruby-websocket-driver
8155 (package
8156 (name "ruby-websocket-driver")
9d1cf6d4 8157 (version "0.7.1")
a229acff
CB
8158 (source
8159 (origin
8160 (method url-fetch)
8161 (uri (rubygems-uri "websocket-driver" version))
8162 (sha256
9d1cf6d4 8163 (base32 "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"))))
a229acff
CB
8164 (build-system ruby-build-system)
8165 (arguments
9d1cf6d4 8166 '(#:tests? #f)) ; no included tests
a229acff
CB
8167 (propagated-inputs
8168 `(("ruby-websocket-extensions" ,ruby-websocket-extensions)))
8169 (synopsis "WebSocket protocol handler with pluggable I/O")
8170 (description
8171 "@code{websocket-driver} provides a complete implementation of the
8172WebSocket protocols that can be hooked up to any TCP library")
8173 (home-page "https://github.com/faye/websocket-driver-ruby")
8174 (license license:expat)))
8175
52b015a9
CB
8176(define-public ruby-websocket-extensions
8177 (package
8178 (name "ruby-websocket-extensions")
8179 (version "0.1.3")
8180 (source
8181 (origin
8182 (method url-fetch)
8183 (uri (rubygems-uri "websocket-extensions" version))
8184 (sha256
8185 (base32
8186 "034sdr7fd34yag5l6y156rkbhiqgmy395m231dwhlpcswhs6d270"))))
8187 (build-system ruby-build-system)
8188 (arguments
8189 '(;; No included tests
8190 #:tests? #f))
8191 (synopsis "Generic extension manager for WebSocket connections")
8192 (description
8193 "@code{websocket-extensions} provides a container for registering
8194extension plugins.")
8195 (home-page "https://github.com/faye/websocket-extensions-ruby")
8196 (license license:expat)))
8197
5799aadd
BW
8198(define-public ruby-domain-name
8199 (package
8200 (name "ruby-domain-name")
222999c9 8201 (version "0.5.20180417")
5799aadd
BW
8202 (source
8203 (origin
8204 (method url-fetch)
8205 (uri (rubygems-uri "domain_name" version))
8206 (sha256
8207 (base32
222999c9 8208 "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v"))))
5799aadd
BW
8209 (build-system ruby-build-system)
8210 (arguments
8211 `(#:phases
8212 (modify-phases %standard-phases
8213 (add-before 'check 'fix-versions
8214 (lambda _
8215 ;; Fix NameError that appears to already be fixed upstream.
8216 (substitute* "Rakefile"
8217 (("DomainName::VERSION")
8218 "Bundler::GemHelper.gemspec.version"))
8219 ;; Loosen unnecessarily strict test-unit version specification.
8220 (substitute* "domain_name.gemspec"
71596c3c 8221 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
5799aadd
BW
8222 #t)))))
8223 (propagated-inputs
8224 `(("ruby-unf" ,ruby-unf)))
8225 (native-inputs
8226 `(("ruby-shoulda" ,ruby-shoulda)
8227 ("bundler" ,bundler)
8228 ("ruby-test-unit" ,ruby-test-unit)))
8229 (synopsis "Domain name manipulation library")
8230 (description
8231 "@code{domain_name} is a Domain name manipulation library. It parses a
8232domain name ready for extracting the registered domain and TLD (Top Level
8233Domain). It can also be used for cookie domain validation based on the Public
8234Suffix List.")
8235 (home-page "https://github.com/knu/ruby-domain_name")
8236 (license license:bsd-2)))
8237
d114ceeb
BW
8238(define-public ruby-http-cookie
8239 (package
8240 (name "ruby-http-cookie")
2a2eb07d 8241 (version "1.0.3")
d114ceeb
BW
8242 (source
8243 (origin
8244 (method url-fetch)
8245 (uri (rubygems-uri "http-cookie" version))
8246 (sha256
8247 (base32
2a2eb07d 8248 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
d114ceeb
BW
8249 (build-system ruby-build-system)
8250 (arguments
8251 `(#:phases
8252 (modify-phases %standard-phases
8253 (add-before 'check 'add-dependency-to-bundler
8254 (lambda _
8255 ;; Fix NameError
8256 (substitute* "Rakefile"
8257 (("HTTP::Cookie::VERSION")
8258 "Bundler::GemHelper.gemspec.version"))
8259 #t)))))
8260 (propagated-inputs
8261 `(("ruby-domain-name" ,ruby-domain-name)))
8262 (native-inputs
8263 `(("rubysimplecov" ,ruby-simplecov)
8264 ("bundler" ,bundler)
8265 ("ruby-sqlite3" ,ruby-sqlite3)
8266 ("ruby-test-unit" ,ruby-test-unit)))
8267 (synopsis "Handle HTTP Cookies based on RFC 6265")
8268 (description
8269 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
8270RFC 6265. It has been designed with security, standards compliance and
8271compatibility in mind, to behave just the same as today's major web browsers.
8272It has built-in support for the legacy @code{cookies.txt} and
8273@code{cookies.sqlite} formats of Mozilla Firefox.")
8274 (home-page "https://github.com/sparklemotion/http-cookie")
8275 (license license:expat)))
8276
1c8e6fd3
CB
8277(define-public ruby-httpclient
8278 (package
8279 (name "ruby-httpclient")
8280 (version "2.8.3")
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (rubygems-uri "httpclient" version))
8285 (sha256
8286 (base32
8287 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
8288 (build-system ruby-build-system)
8289 (arguments
8290 '(;; TODO: Some tests currently fail
8291 ;; ------
8292 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
8293 ;; 2 omissions, 0 notifications
8294 ;; 91.866% passed
8295 ;; ------
8296 ;; 6.49 tests/s, 22.41 assertions/s
8297 #:tests? #f
8298 #:phases
8299 (modify-phases %standard-phases
8300 (replace 'check
8301 (lambda* (#:key tests? #:allow-other-keys)
8302 (if tests?
9923d5a4
TGR
8303 (invoke "ruby"
8304 "-Ilib"
8305 "test/runner.rb")
0076f5a9 8306 #t))))))
1c8e6fd3
CB
8307 (native-inputs
8308 `(("ruby-rack" ,ruby-rack)))
8309 (synopsis
8310 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
8311 (description
8312 "The @code{httpclient} ruby library provides functionality related to
8313HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
8314Cookie, multithreading and authentication (digest, NTLM) support.
8315
8316Also provided is a @command{httpclient} command, which can perform HTTP
8317requests either using arguments or with an interactive prompt.")
8318 (home-page "https://github.com/nahi/httpclient")
8319 (license license:ruby)))
8320
7d3a1a2d
BW
8321(define-public ruby-ansi
8322 (package
8323 (name "ruby-ansi")
8324 (version "1.5.0")
8325 (source
8326 (origin
3d30c332 8327 (method git-fetch)
7d3a1a2d 8328 ;; Fetch from GitHub as the gem does not contain testing code.
3d30c332
EF
8329 (uri (git-reference
8330 (url "https://github.com/rubyworks/ansi")
8331 (commit version)))
8332 (file-name (git-file-name name version))
7d3a1a2d
BW
8333 (sha256
8334 (base32
3d30c332 8335 "1wsz7xxwl3vkh277jb7fd7akqnqqgbvalxzpjwniiqk8ghfprbi5"))))
7d3a1a2d
BW
8336 (build-system ruby-build-system)
8337 (arguments
8338 `(#:phases
8339 (modify-phases %standard-phases
8340 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
8341 ;; cycle ansi, qed, ansi. Instead simply test that the library can
8342 ;; be require'd.
8343 (replace 'check
8344 (lambda _
9923d5a4 8345 (invoke "ruby" "-Ilib" "-r" "ansi")))
0899352f
MB
8346 (add-before 'validate-runpath 'replace-broken-symlink
8347 (lambda* (#:key outputs #:allow-other-keys)
8348 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
8349 (file (string-append
8350 out "/lib/ruby/vendor_ruby/gems/ansi-"
8351 ,version "/lib/ansi.yml")))
0899352f
MB
8352 ;; XXX: This symlink is broken since ruby 2.4.
8353 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
8354 (delete-file file)
8355 (symlink "../.index" file)
8356 #t))))))
7d3a1a2d
BW
8357 (synopsis "ANSI escape code related libraries")
8358 (description
8359 "This package is a collection of ANSI escape code related libraries
8360enabling ANSI colorization and stylization of console output. Included in the
8361library are the @code{Code} module, which defines ANSI codes as constants and
8362methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
8363@code{ProgressBar}, and a @code{String} subclass. The library also includes a
8364@code{Terminal} module which provides information about the current output
8365device.")
3d30c332 8366 (home-page "https://rubyworks.github.io/ansi/")
7d3a1a2d 8367 (license license:bsd-2)))
7c033c46
BW
8368
8369(define-public ruby-systemu
8370 (package
8371 (name "ruby-systemu")
8372 (version "2.6.5")
8373 (source
8374 (origin
8375 (method url-fetch)
8376 (uri (rubygems-uri "systemu" version))
8377 (sha256
8378 (base32
8379 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
8380 (build-system ruby-build-system)
8381 (arguments
8382 `(#:phases
8383 (modify-phases %standard-phases
8384 (add-before 'check 'set-version
8385 (lambda _
8386 (setenv "VERSION" ,version)
8387 #t)))))
8388 (synopsis "Capture of stdout/stderr and handling of child processes")
8389 (description
8390 "Systemu can be used on any platform to return status, stdout, and stderr
8391of any command. Unlike other methods like @code{open3} and @code{popen4}
8392there is no danger of full pipes or threading issues hanging your process or
8393subprocess.")
8394 (home-page "https://github.com/ahoward/systemu")
8395 (license license:ruby)))
3d84a99e
BW
8396
8397(define-public ruby-bio-commandeer
8398 (package
8399 (name "ruby-bio-commandeer")
37b08547 8400 (version "0.4.0")
3d84a99e
BW
8401 (source
8402 (origin
8403 (method url-fetch)
8404 (uri (rubygems-uri "bio-commandeer" version))
8405 (sha256
8406 (base32
37b08547 8407 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
3d84a99e
BW
8408 (build-system ruby-build-system)
8409 (arguments
8410 `(#:phases
8411 (modify-phases %standard-phases
8412 (replace 'check
8413 ;; Run test without calling 'rake' so that jeweler is
8414 ;; not required as an input.
8415 (lambda _
9923d5a4 8416 (invoke "rspec" "spec/bio-commandeer_spec.rb"))))))
3d84a99e
BW
8417 (propagated-inputs
8418 `(("ruby-bio-logger" ,ruby-bio-logger)
8419 ("ruby-systemu" ,ruby-systemu)))
8420 (native-inputs
8421 `(("bundler" ,bundler)
8422 ("ruby-rspec" ,ruby-rspec)))
8423 (synopsis "Simplified running of shell commands from within Ruby")
8424 (description
8425 "Bio-commandeer provides an opinionated method of running shell commands
8426from within Ruby. The advantage of bio-commandeer over other methods of
8427running external commands is that when something goes wrong, messages printed
8428to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
8429detail to ease debugging.")
7bf837fd 8430 (home-page "https://github.com/wwood/bioruby-commandeer")
3d84a99e 8431 (license license:expat)))
7c8131c7
BW
8432
8433(define-public ruby-rubytest
8434 (package
8435 (name "ruby-rubytest")
8436 (version "0.8.1")
8437 (source
8438 (origin
8439 (method url-fetch)
8440 (uri (rubygems-uri "rubytest" version))
8441 (sha256
8442 (base32
8443 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
8444 (build-system ruby-build-system)
8445 (arguments
8446 ;; Disable regular testing to break the cycle rubytest, qed, brass,
8447 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
8448 ;; simply test that the library can be require'd.
8449 `(#:phases
8450 (modify-phases %standard-phases
8451 (replace 'check
8452 (lambda _
9923d5a4 8453 (invoke "ruby" "-Ilib" "-r" "rubytest"))))))
7c8131c7
BW
8454 (propagated-inputs
8455 `(("ruby-ansi" ,ruby-ansi)))
8456 (synopsis "Universal test harness for Ruby")
8457 (description
8458 "Rubytest is a testing meta-framework for Ruby. It can handle any
8459compliant test framework and can run tests from multiple frameworks in a
8460single pass.")
2f3800e5 8461 (home-page "https://rubyworks.github.io/rubytest")
7c8131c7 8462 (license license:bsd-2)))
90fcedf2
BW
8463
8464(define-public ruby-brass
8465 (package
8466 (name "ruby-brass")
8467 (version "1.2.1")
8468 (source
8469 (origin
8470 (method url-fetch)
8471 (uri (rubygems-uri "brass" version))
8472 (sha256
8473 (base32
8474 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
8475 (build-system ruby-build-system)
8476 (arguments
8477 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
8478 ;; Instead simply test that the library can be require'd.
8479 `(#:phases
8480 (modify-phases %standard-phases
8481 (replace 'check
8482 (lambda _
9923d5a4 8483 (invoke "ruby" "-Ilib" "-r" "brass"))))))
90fcedf2
BW
8484 (synopsis "Basic foundational assertions framework")
8485 (description
8486 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
8487foundational assertions framework for other assertion and test frameworks to
8488make use of.")
2f3800e5 8489 (home-page "https://rubyworks.github.io/brass")
90fcedf2 8490 (license license:bsd-2)))
120fc74b
BW
8491
8492(define-public ruby-qed
8493 (package
8494 (name "ruby-qed")
8495 (version "2.9.2")
8496 (source
8497 (origin
8498 (method url-fetch)
8499 (uri (rubygems-uri "qed" version))
8500 (sha256
8501 (base32
8502 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
8503 (build-system ruby-build-system)
8504 (arguments
8505 ;; Disable testing to break the cycle qed, ansi, qed, among others.
8506 ;; Instead simply test that the executable runs using --copyright.
8507 `(#:phases
8508 (modify-phases %standard-phases
8509 (replace 'check
8510 (lambda _
9923d5a4 8511 (invoke "ruby" "-Ilib" "bin/qed" "--copyright"))))))
120fc74b
BW
8512 (propagated-inputs
8513 `(("ruby-ansi" ,ruby-ansi)
8514 ("ruby-brass" ,ruby-brass)))
8515 (synopsis "Test framework utilizing literate programming techniques")
8516 (description
8517 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
8518@dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
8519Development} (BDD) utilizing Literate Programming techniques. QED sits
8520somewhere between lower-level testing tools like @code{Test::Unit} and
8521requirement specifications systems like Cucumber.")
2f3800e5 8522 (home-page "https://rubyworks.github.io/qed")
120fc74b 8523 (license license:bsd-2)))
9273ee8f 8524
dbbe88d3
CB
8525(define-public ruby-que
8526 (package
8527 (name "ruby-que")
8528 (version "1.0.0.beta3")
8529 (source
8530 (origin
8531 (method url-fetch)
8532 (uri (rubygems-uri "que" version))
8533 (sha256
8534 (base32
8535 "0gr9pb814d4qj3ds98g6cjrdk7wv0yg8aqbm7c1lmgl87jkg8q04"))))
8536 (build-system ruby-build-system)
8537 (arguments
8538 '(#:tests? #f)) ; No included tests
8539 (synopsis "Job queue using PostgreSQL written in Ruby")
8540 (description
8541 "This package provides a job queue that uses PostgreSQL for storing jobs
8542and locking between worker processes.")
8543 (home-page "https://github.com/chanks/que")
8544 (license license:expat)))
8545
9273ee8f
BW
8546(define-public ruby-ae
8547 (package
8548 (name "ruby-ae")
8549 (version "1.8.2")
8550 (source
8551 (origin
11d1b318 8552 (method git-fetch)
9273ee8f 8553 ;; Fetch from github so tests are included.
11d1b318
EF
8554 (uri (git-reference
8555 (url "https://github.com/rubyworks/ae")
8556 (commit version)))
8557 (file-name (git-file-name name version))
9273ee8f
BW
8558 (sha256
8559 (base32
11d1b318 8560 "11299jj5ma8mi7b4majkyjy70y6zlqpgl8aql1c5lvfjavlpwmlp"))))
9273ee8f
BW
8561 (build-system ruby-build-system)
8562 (arguments
8563 `(#:phases
8564 (modify-phases %standard-phases
8565 (replace 'check
9923d5a4 8566 (lambda _ (invoke "qed")))
de6f6efd
MB
8567 (add-before 'validate-runpath 'replace-broken-symlink
8568 (lambda* (#:key outputs #:allow-other-keys)
8569 (let* ((out (assoc-ref outputs "out"))
3cb3fa67
CB
8570 (file (string-append
8571 out "/lib/ruby/vendor_ruby/gems/ae-"
8572 ,version "/lib/ae.yml")))
de6f6efd
MB
8573 ;; XXX: This symlink is broken since ruby 2.4.
8574 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
8575 (delete-file file)
8576 (symlink "../.index" file)
8577 #t))))))
9273ee8f
BW
8578 (propagated-inputs
8579 `(("ruby-ansi" ,ruby-ansi)))
8580 (native-inputs
8581 `(("ruby-qed" ,ruby-qed)))
8582 (synopsis "Assertions library")
8583 (description
8584 "Assertive Expressive (AE) is an assertions library specifically designed
8585for reuse by other test frameworks.")
11d1b318 8586 (home-page "https://rubyworks.github.io/ae/")
9273ee8f 8587 (license license:bsd-2)))
78bb471f
BW
8588
8589(define-public ruby-lemon
8590 (package
8591 (name "ruby-lemon")
8592 (version "0.9.1")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (rubygems-uri "lemon" version))
8597 (sha256
8598 (base32
8599 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
8600 (build-system ruby-build-system)
8601 (arguments
8602 `(#:phases
8603 (modify-phases %standard-phases
9923d5a4 8604 (replace 'check (lambda _ (invoke "qed"))))))
78bb471f
BW
8605 (propagated-inputs
8606 `(("ruby-ae" ,ruby-ae)
8607 ("ruby-ansi" ,ruby-ansi)
8608 ("ruby-rubytest" ,ruby-rubytest)))
8609 (native-inputs
8610 `(("ruby-qed" ,ruby-qed)))
8611 (synopsis "Test framework correlating code structure and test unit")
8612 (description
8613 "Lemon is a unit testing framework that enforces highly formal
8614case-to-class and unit-to-method test construction. This enforcement can help
8615focus concern on individual units of behavior.")
2f3800e5 8616 (home-page "https://rubyworks.github.io/lemon")
78bb471f 8617 (license license:bsd-2)))
0832804e
BW
8618
8619(define-public ruby-rubytest-cli
8620 (package
8621 (name "ruby-rubytest-cli")
8622 (version "0.2.0")
8623 (source
8624 (origin
8625 (method url-fetch)
8626 (uri (rubygems-uri "rubytest-cli" version))
8627 (sha256
8628 (base32
8629 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
8630 (build-system ruby-build-system)
8631 (arguments
8632 `(#:tests? #f)) ; no tests
8633 (propagated-inputs
8634 `(("ruby-ansi" ,ruby-ansi)
8635 ("ruby-rubytest" ,ruby-rubytest)))
8636 (synopsis "Command-line interface for rubytest")
8637 (description
8638 "Rubytest CLI is a command-line interface for running tests for
8639Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
2f3800e5 8640 (home-page "https://rubyworks.github.io/rubytest-cli")
0832804e 8641 (license license:bsd-2)))
72ccbfe3
BW
8642
8643(define-public ruby-hashery
8644 (package
8645 (name "ruby-hashery")
cba96208 8646 (version "2.1.2")
72ccbfe3
BW
8647 (source
8648 (origin
8649 (method url-fetch)
8650 (uri (rubygems-uri "hashery" version))
8651 (sha256
8652 (base32
cba96208 8653 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
72ccbfe3
BW
8654 (build-system ruby-build-system)
8655 (arguments
8656 `(#:phases
8657 (modify-phases %standard-phases
8658 (replace 'check
8659 (lambda _
9923d5a4
TGR
8660 (invoke "qed")
8661 (invoke "rubytest" "-Ilib" "-Itest" "test/"))))))
72ccbfe3
BW
8662 (native-inputs
8663 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
8664 ("ruby-qed" ,ruby-qed)
8665 ("ruby-lemon" ,ruby-lemon)))
8666 (synopsis "Hash-like classes with extra features")
8667 (description
8668 "The Hashery is a tight collection of @code{Hash}-like classes.
8669Included are the auto-sorting @code{Dictionary} class, the efficient
8670@code{LRUHash}, the flexible @code{OpenHash} and the convenient
8671@code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
8672defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
8673standard @code{Hash} making it possible to subclass and augment to fit any
8674specific use case.")
2f3800e5 8675 (home-page "https://rubyworks.github.io/hashery")
72ccbfe3 8676 (license license:bsd-2)))
1f1d71e0
BW
8677
8678(define-public ruby-rc4
8679 (package
8680 (name "ruby-rc4")
8681 (version "0.1.5")
8682 (source
8683 (origin
8684 (method url-fetch)
8685 (uri (rubygems-uri "ruby-rc4" version))
8686 (sha256
8687 (base32
8688 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
8689 (build-system ruby-build-system)
8690 (arguments
8691 `(#:phases
8692 (modify-phases %standard-phases
8693 (replace 'check
8694 (lambda _
9923d5a4 8695 (invoke "rspec" "spec/rc4_spec.rb"))))))
1f1d71e0
BW
8696 (native-inputs
8697 `(("ruby-rspec" ,ruby-rspec-2)))
8698 (synopsis "Implementation of the RC4 algorithm")
8699 (description
8700 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
8701 (home-page "https://github.com/caiges/Ruby-RC4")
8702 (license license:expat)))
f3e085a8
BW
8703
8704(define-public ruby-afm
8705 (package
8706 (name "ruby-afm")
8707 (version "0.2.2")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (rubygems-uri "afm" version))
8712 (sha256
8713 (base32
8714 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
8715 (build-system ruby-build-system)
8716 (native-inputs
8717 `(("bundler" ,bundler)))
8718 (synopsis "Read Adobe Font Metrics (afm) files")
8719 (description
8720 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
8721files and use the data therein.")
7bf837fd 8722 (home-page "https://github.com/halfbyte/afm")
f3e085a8 8723 (license license:expat)))
acb6be42
BW
8724
8725(define-public ruby-ascii85
8726 (package
8727 (name "ruby-ascii85")
5854082a 8728 (version "1.0.3")
acb6be42
BW
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (rubygems-uri "Ascii85" version))
8733 (sha256
8734 (base32
5854082a 8735 "0658m37jjjn6drzqg1gk4p6c205mgp7g1jh2d00n4ngghgmz5qvs"))))
acb6be42
BW
8736 (build-system ruby-build-system)
8737 (native-inputs
8738 `(("bundler" ,bundler)))
8739 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
8740 (description
8741 "This library provides methods to encode and decode Ascii85
8742binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
8743@dfn{Portable Document Format} (PDF) file formats.")
8744 (home-page "https://github.com/datawraith/ascii85gem")
8745 (license license:expat)))
edf8caae
BW
8746
8747(define-public ruby-ttfunk
8748 (package
8749 (name "ruby-ttfunk")
4179ed93 8750 (version "1.6.2.1")
edf8caae
BW
8751 (source
8752 (origin
4e110825 8753 (method git-fetch)
edf8caae 8754 ;; fetch from github as the gem does not contain testing code
4e110825
EF
8755 (uri (git-reference
8756 (url "https://github.com/prawnpdf/ttfunk")
8757 (commit version)))
8758 (file-name (git-file-name name version))
edf8caae
BW
8759 (sha256
8760 (base32
4179ed93 8761 "0rsf4j6s97wbcnjbvmmh6xrc7imw4g9lrlcvn945wh400lc8r53z"))))
edf8caae
BW
8762 (build-system ruby-build-system)
8763 (arguments
8764 `(#:test-target "spec"
8765 #:phases
8766 (modify-phases %standard-phases
afb7a3e8
JL
8767 (add-before 'build 'remove-ssh
8768 (lambda _
8769 ;; remove dependency on an ssh key pair that doesn't exist
8770 (substitute* "ttfunk.gemspec"
8771 (("spec.signing_key.*") ""))
8772 #t))
edf8caae
BW
8773 (add-before 'check 'remove-rubocop
8774 (lambda _
8775 ;; remove rubocop as a dependency as not needed for testing
8776 (substitute* "ttfunk.gemspec"
8777 (("spec.add_development_dependency\\('rubocop'.*") ""))
8778 (substitute* "Rakefile"
8779 (("require 'rubocop/rake_task'") "")
afb7a3e8 8780 (("RuboCop::RakeTask.new") ""))
edf8caae
BW
8781 #t)))))
8782 (native-inputs
8783 `(("ruby-rspec" ,ruby-rspec)
afb7a3e8 8784 ("ruby-yard" ,ruby-yard)
edf8caae
BW
8785 ("bundler" ,bundler)))
8786 (synopsis "Font metrics parser for the Prawn PDF generator")
8787 (description
8788 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
8789part of the Prawn PDF generator.")
8790 (home-page "https://github.com/prawnpdf/ttfunk")
8791 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
8792 ;; for details."
4179ed93 8793 (license %prawn-project-licenses)))
cbdd428c 8794
9270298f
BW
8795(define-public ruby-puma
8796 (package
8797 (name "ruby-puma")
63755fcd 8798 (version "3.9.1")
9270298f
BW
8799 (source
8800 (origin
a6cffe6e 8801 (method git-fetch)
9270298f 8802 ;; Fetch from GitHub because distributed gem does not contain tests.
a6cffe6e
EF
8803 (uri (git-reference
8804 (url "https://github.com/puma/puma")
8805 (commit (string-append "v" version))))
8806 (file-name (git-file-name name version))
9270298f
BW
8807 (sha256
8808 (base32
a6cffe6e 8809 "1kj75k81iik3aj73pkc9ixj9rwf95ipkyma65n28m64dgw02qi1f"))))
9270298f
BW
8810 (build-system ruby-build-system)
8811 (arguments
63755fcd
BW
8812 `(#:tests? #f ; Tests require an out-dated version of minitest.
8813 #:phases
9270298f
BW
8814 (modify-phases %standard-phases
8815 (add-before 'build 'fix-gemspec
8816 (lambda _
8817 (substitute* "puma.gemspec"
8818 (("git ls-files") "find * |sort"))
8819 #t)))))
9270298f
BW
8820 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
8821 (description
8822 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
8823for Ruby/Rack applications. Puma is intended for use in both development and
8824production environments. In order to get the best throughput, it is highly
8825recommended that you use a Ruby implementation with real threads like Rubinius
8826or JRuby.")
a6cffe6e 8827 (home-page "https://puma.io/")
9270298f
BW
8828 (license license:expat)))
8829
b0813490
BW
8830(define-public ruby-hoe-git
8831 (package
8832 (name "ruby-hoe-git")
8833 (version "1.6.0")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (rubygems-uri "hoe-git" version))
8838 (sha256
8839 (base32
8840 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
8841 (build-system ruby-build-system)
8842 (propagated-inputs
8843 `(("ruby-hoe" ,ruby-hoe)
8844 ("git" ,git)))
8845 (synopsis "Hoe plugins for tighter Git integration")
8846 (description
8847 "This package provides a set of Hoe plugins for tighter Git integration.
8848It provides tasks to automate release tagging and pushing and changelog
8849generation.")
7bf837fd 8850 (home-page "https://github.com/jbarnette/hoe-git")
b0813490
BW
8851 (license license:expat)))
8852
cbdd428c
BW
8853(define-public ruby-sequel
8854 (package
8855 (name "ruby-sequel")
65a7f09c 8856 (version "4.49.0")
cbdd428c
BW
8857 (source
8858 (origin
8859 (method url-fetch)
8860 (uri (rubygems-uri "sequel" version))
8861 (sha256
8862 (base32
65a7f09c 8863 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
cbdd428c
BW
8864 (build-system ruby-build-system)
8865 (arguments
8866 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
8867 (synopsis "Database toolkit for Ruby")
8868 (description "Sequel provides thread safety, connection pooling and a
8869concise DSL for constructing SQL queries and table schemas. It includes a
8870comprehensive ORM layer for mapping records to Ruby objects and handling
8871associated records.")
e2b70d90 8872 (home-page "https://sequel.jeremyevans.net")
cbdd428c 8873 (license license:expat)))
3cc78097
BW
8874
8875(define-public ruby-timecop
8876 (package
8877 (name "ruby-timecop")
3d4a5eb5 8878 (version "0.9.1")
3cc78097
BW
8879 (source
8880 (origin
8881 (method url-fetch)
8882 (uri (rubygems-uri "timecop" version))
8883 (sha256
8884 (base32
3d4a5eb5 8885 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
3cc78097
BW
8886 (build-system ruby-build-system)
8887 (arguments
8888 `(#:phases
8889 (modify-phases %standard-phases
8890 (add-before 'check 'set-check-rubylib
8891 (lambda _
8892 ;; Set RUBYLIB so timecop tests finds its own lib.
8893 (setenv "RUBYLIB" "lib")
8894 #t)))))
8895 (native-inputs
8896 `(("bundler" ,bundler)
8897 ("ruby-minitest-rg" ,ruby-minitest-rg)
8898 ("ruby-mocha" ,ruby-mocha)
8899 ("ruby-activesupport" ,ruby-activesupport)))
66e07664 8900 (synopsis "Test mocks for time-dependent functions")
3cc78097
BW
8901 (description
8902 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
8903making it easier to test time-dependent code. It provides a unified method to
8904mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
8905call.")
8906 (home-page "https://github.com/travisjeffery/timecop")
8907 (license license:expat)))
8908
dae620b8
BW
8909(define-public ruby-concurrent
8910 (package
8911 (name "ruby-concurrent")
1007640a 8912 (version "1.1.5")
dae620b8
BW
8913 (source
8914 (origin
8fcba3be 8915 (method git-fetch)
dae620b8
BW
8916 ;; Download from GitHub because the rubygems version does not contain
8917 ;; Rakefile.
8fcba3be
MB
8918 (uri (git-reference
8919 (url "https://github.com/ruby-concurrency/concurrent-ruby")
8920 (commit (string-append "v" version))))
8921 (file-name (git-file-name name version))
dae620b8
BW
8922 (sha256
8923 (base32
1007640a 8924 "193q2k47vk7qdvv9hlhmmdxgy91xl4imapyk1ijdg9vgf46knyzj"))))
dae620b8
BW
8925 (build-system ruby-build-system)
8926 (arguments
1007640a 8927 `(#:test-target "ci"
dae620b8
BW
8928 #:phases
8929 (modify-phases %standard-phases
520e89eb 8930 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
dae620b8
BW
8931 (lambda _
8932 ;; Delete extra gemspec files so 'first-gemspec' chooses the
8933 ;; correct one.
8934 (delete-file "concurrent-ruby-edge.gemspec")
8935 (delete-file "concurrent-ruby-ext.gemspec")
8936 #t))
1007640a 8937 (replace 'replace-git-ls-files
520e89eb 8938 (lambda _
1007640a
MB
8939 ;; XXX: The default substitution made by this phase is not fully
8940 ;; compatible with "git ls-files". The latter produces file names
8941 ;; such as "lib/foo", whereas ruby-build-system uses "find . [...]"
8942 ;; which gives "./lib/foo". That difference in turn breaks the
8943 ;; comparison against a glob pattern in this script.
8944 (substitute* "concurrent-ruby.gemspec"
8945 (("git ls-files") "find * -type f | sort"))
8946 #t))
8947 (add-before 'build 'remove-jar-from-gemspec
520e89eb 8948 (lambda _
1007640a
MB
8949 ;; The gemspec wants to include a JAR file that we do not build
8950 ;; nor need.
8951 (substitute* "concurrent-ruby.gemspec"
8952 (("'lib/concurrent/concurrent_ruby.jar'")
8953 ""))
8954 #t))
8955 (add-before 'build 'remove-rake_compiler_dock-dependency
8956 (lambda _
8957 ;; This library is only used when building for non-MRI targets.
8958 (substitute* "Rakefile"
8959 (("require 'rake_compiler_dock'")
8960 ""))
520e89eb 8961 #t))
9019b37f
BW
8962 (add-before 'check 'remove-timecop-dependency
8963 ;; Remove timecop-dependent tests as having timecop as a depedency
8964 ;; causes circular depedencies.
8965 (lambda _
8966 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
8967 (delete-file "spec/concurrent/scheduled_task_spec.rb")
8968 #t)))))
dae620b8
BW
8969 (native-inputs
8970 `(("ruby-rake-compiler" ,ruby-rake-compiler)
9019b37f 8971 ("ruby-rspec" ,ruby-rspec)))
dae620b8
BW
8972 (synopsis "Concurrency tools for Ruby")
8973 (description
8974 "This library provides modern concurrency tools including agents,
8975futures, promises, thread pools, actors, supervisors, and more. It is
8976inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
8977patterns.")
8978 (home-page "http://www.concurrent-ruby.com")
8979 (license license:expat)))
2de61e34
BW
8980
8981(define-public ruby-pkg-config
8982 (package
8983 (name "ruby-pkg-config")
884a80dd 8984 (version "1.2.5")
2de61e34
BW
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (rubygems-uri "pkg-config" version))
8989 (sha256
8990 (base32
884a80dd 8991 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
2de61e34
BW
8992 (build-system ruby-build-system)
8993 (arguments
8994 ;; Tests require extra files not included in the gem.
8995 `(#:tests? #f))
8996 (synopsis "Detect libraries for compiling Ruby native extensions")
8997 (description
8998 "@code{pkg-config} can be used in your extconf.rb to properly detect need
8999libraries for compiling Ruby native extensions.")
9000 (home-page "https://github.com/ruby-gnome2/pkg-config")
9001 (license license:lgpl2.0+)))
6689c636
MFM
9002
9003(define-public ruby-net-http-digest-auth
9004 (package
9005 (name "ruby-net-http-digest-auth")
ba074a85 9006 (version "1.4.1")
6689c636
MFM
9007 (source
9008 (origin
9009 (method url-fetch)
9010 (uri (rubygems-uri "net-http-digest_auth" version))
9011 (sha256
9012 (base32
ba074a85 9013 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
6689c636
MFM
9014 (build-system ruby-build-system)
9015 (native-inputs
9016 `(("ruby-hoe" ,ruby-hoe)))
9017 (synopsis "RFC 2617 HTTP digest authentication library")
9018 (description
9019 "This library implements HTTP's digest authentication scheme based on
9020RFC 2617. This enables the use of the digest authentication scheme instead
9021of the more insecure basic authentication scheme.")
7bf837fd 9022 (home-page "https://github.com/drbrain/net-http-digest_auth")
6689c636 9023 (license license:expat)))
06116573 9024
9025(define-public ruby-mail
9026 (package
9027 (name "ruby-mail")
04de0cb5 9028 (version "2.6.6")
06116573 9029 (source
9030 (origin
9031 (method url-fetch)
9032 (uri (rubygems-uri "mail" version))
9033 (sha256
9034 (base32
04de0cb5 9035 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
06116573 9036 (build-system ruby-build-system)
9037 (propagated-inputs
9038 `(("ruby-mime-types" ,ruby-mime-types)))
9039 (arguments
9040 ;; Tests require extra gems not included in the Gemfile.
9041 ;; XXX: Try enabling this for the next version with mini_mime.
9042 `(#:tests? #f))
9043 (synopsis "Mail library for Ruby")
9044 (description
9045 "Mail is an internet library for Ruby that is designed to handle email
9046generation, parsing and sending. The purpose of this library is to provide
9047a single point of access to handle all email functions, including sending
9048and receiving emails. All network type actions are done through proxy
9049methods to @code{Net::SMTP}, @code{Net::POP3} etc.
9050
9051Mail has been designed with a very simple object oriented system that
9052really opens up the email messages you are parsing, if you know what you
9053are doing, you can fiddle with every last bit of your email directly.")
9054 (home-page "https://github.com/mikel/mail")
9055 (license license:expat)))
9b4c8e1b 9056
4d372cb9
CB
9057(define-public ruby-mathn
9058 (package
9059 (name "ruby-mathn")
9060 (version "0.1.0")
9061 (source
9062 (origin
9063 (method url-fetch)
9064 (uri (rubygems-uri "mathn" version))
9065 (sha256
9066 (base32
9067 "1wn812llln9jzgybz2d7536q39z3gi99i6fi0j1dapcpzvhgrr0p"))))
9068 (build-system ruby-build-system)
9069 (native-inputs
9070 `(("bundler" ,bundler)
9071 ("ruby-rake-compiler" ,ruby-rake-compiler)))
9072 (synopsis "Extends math operations for increased precision")
9073 (description
9074 "This gem makes mathematical operations more precise in Ruby and
9075integrates other mathematical standard libraries. Prior to Ruby 2.5,
9076@code{mathn} was part of the Ruby standard library.")
9077 (home-page "https://github.com/ruby/mathn")
9078 (license license:bsd-2)))
9079
9b4c8e1b
BW
9080(define-public ruby-code-statistics
9081 (package
9082 (name "ruby-code-statistics")
9083 (version "0.2.13")
9084 (source
9085 (origin
9086 (method url-fetch)
9087 (uri (rubygems-uri "code_statistics" version))
9088 (sha256
9089 (base32
9090 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
9091 (build-system ruby-build-system)
9092 (arguments
9093 `(#:tests? #f)) ; Not all test code is included in gem.
9094 (synopsis "Port of the rails 'rake stats' method")
9095 (description
9096 "This gem is a port of the rails 'rake stats' method so it can be made
9097more robust and work for non rails projects.")
702a1012 9098 (home-page "https://github.com/danmayer/code_statistics")
9b4c8e1b 9099 (license license:expat)))
f90c25c1
CL
9100
9101(define-public ruby-rubypants
9102 (package
9103 (name "ruby-rubypants")
9104 (version "0.6.0")
9105 (source (origin
9106 (method url-fetch)
9107 (uri (rubygems-uri "rubypants" version))
9108 (sha256
9109 (base32
9110 "0xpqkslan2wkyal2h9qhplkr5d4sdn7q6csigrhnljjpp8j4qfsh"))))
9111 (build-system ruby-build-system)
9112 (arguments
9113 '(#:tests? #f)) ; need Codecov
9114 (synopsis "Port of the smart-quotes library SmartyPants")
9115 (description
9116 "RubyPants is a Ruby port of the smart-quotes library SmartyPants. The
9117original SmartyPants is a web publishing plug-in for Movable Type, Blosxom,
9118and BBEdit that easily translates plain ASCII punctuation characters into
9119smart typographic punctuation HTML entities.")
9120 (home-page "https://github.com/jmcnevin/rubypants")
9121 (license license:bsd-2)))
beb34835
CL
9122
9123(define-public ruby-org-ruby
9124 (package
9125 (name "ruby-org-ruby")
9126 (version "0.9.12")
9127 (source (origin
9128 (method url-fetch)
9129 (uri (rubygems-uri "org-ruby" version))
9130 (sha256
9131 (base32
9132 "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk"))))
9133 (build-system ruby-build-system)
9134 (arguments
9135 '(#:tests? #f)) ; no rakefile
9136 (propagated-inputs
9137 `(("ruby-rubypants" ,ruby-rubypants)))
9138 (synopsis "Org-mode parser written in Ruby")
9139 (description
9140 "Org-ruby is an org-mode parser written in Ruby. The most significant
9141thing this library does today is convert org-mode files to HTML or Textile or
9142Markdown.")
9143 (home-page "https://github.com/wallyqs/org-ruby")
9144 (license license:expat)))
670ee20a
BW
9145
9146(define-public ruby-rake
9147 (package
9148 (name "ruby-rake")
c997403a 9149 (version "13.0.1")
670ee20a
BW
9150 (source
9151 (origin
9152 (method url-fetch)
9153 (uri (rubygems-uri "rake" version))
9154 (sha256
9155 (base32
c997403a 9156 "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"))))
670ee20a
BW
9157 (build-system ruby-build-system)
9158 (native-inputs
9159 `(("bundler" ,bundler)))
9160 (synopsis "Rake is a Make-like program implemented in Ruby")
9161 (description
9162 "Rake is a Make-like program where tasks and dependencies are specified
9163in standard Ruby syntax.")
9164 (home-page "https://github.com/ruby/rake")
9165 (license license:expat)))
45498f51 9166
51420124 9167(define-public ruby-childprocess
45498f51
DM
9168 (package
9169 (name "ruby-childprocess")
459e4a1a 9170 (version "3.0.0")
45498f51
DM
9171 (source
9172 (origin
9173 (method url-fetch)
9174 (uri (rubygems-uri "childprocess" version))
9175 (sha256
9176 (base32
459e4a1a 9177 "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"))))
45498f51
DM
9178 (build-system ruby-build-system)
9179 (arguments
9180 `(#:tests? #f))
9181 (native-inputs
9182 `(("bundler" ,bundler)
9183 ("ruby-rspec" ,ruby-rspec)))
9184 (propagated-inputs
9185 `(("ruby-ffi" ,ruby-ffi)))
9186 (synopsis "Control external programs running in the background, in Ruby")
9187 (description "@code{childprocess} provides a gem to control external
9188programs running in the background, in Ruby.")
459e4a1a 9189 (home-page "https://github.com/enkessler/childprocess")
45498f51 9190 (license license:expat)))
1f10e28d 9191
0d16905b
JL
9192(define-public ruby-public-suffix
9193 (package
9194 (name "ruby-public-suffix")
9de12df7 9195 (version "4.0.1")
0d16905b
JL
9196 (source (origin
9197 (method url-fetch)
9198 (uri (rubygems-uri "public_suffix" version))
9199 (sha256
9200 (base32
9de12df7 9201 "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"))))
0d16905b
JL
9202 (build-system ruby-build-system)
9203 (arguments
1f4fc125
CB
9204 '(#:phases
9205 (modify-phases %standard-phases
9206 ;; Remove the requirement on Rubocop, as it isn't useful to run, and
9207 ;; including it as an input can lead to circular dependencies.
9208 (add-after 'unpack 'remove-rubocop-from-Rakefile
9209 (lambda _
9210 (substitute* "Rakefile"
9211 (("require \"rubocop/rake\\_task\"") "")
9212 (("RuboCop::RakeTask\\.new") ""))
9213 #t)))))
9214 (native-inputs
9215 `(("bundler" ,bundler)
9216 ("ruby-yard" ,ruby-yard)
9217 ("ruby-mocha" ,ruby-mocha)
9218 ("ruby-minitest-reporters" ,ruby-minitest-reporters)))
0d16905b
JL
9219 (home-page "https://simonecarletti.com/code/publicsuffix-ruby/")
9220 (synopsis "Domain name parser")
9221 (description "The gem @code{public_suffix} is a domain name parser,
9222written in Ruby, and based on the @dfn{Public Suffix List}. A public suffix
9223is one under which Internet users can (or historically could) directly
9224register names. Some examples of public suffixes are @code{.com},
9225@code{.co.uk} and @code{pvt.k12.ma.us}. The Public Suffix List is a list of
9226all known public suffixes.")
9227 (license license:expat)))
6f2c4efb
JL
9228
9229(define-public ruby-addressable
9230 (package
9231 (name "ruby-addressable")
91f7ee87 9232 (version "2.7.0")
6f2c4efb
JL
9233 (source (origin
9234 (method url-fetch)
9235 (uri (rubygems-uri "addressable" version))
9236 (sha256
9237 (base32
91f7ee87 9238 "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"))))
6f2c4efb 9239 (build-system ruby-build-system)
0a794b30
CB
9240 (arguments
9241 '(#:test-target "spec"
9242 #:phases
9243 (modify-phases %standard-phases
9244 (add-after 'unpack 'remove-unnecessary-dependencies-from-Gemfile
9245 (lambda _
9246 (substitute* "Gemfile"
9247 (("git: 'https://github.com/sporkmonger/rack-mount.git',") "")
9248 ((".*launchy.*") "")
9249 ((".*rake.*") "gem 'rake'\n")
9250 ((".*redcarpet.*") ""))
9251 #t))
9252 (add-before 'check 'delete-network-dependent-test
9253 (lambda _
9254 (delete-file "spec/addressable/net_http_compat_spec.rb")
9255 #t)))))
9256 (native-inputs
9257 `(("ruby-rspec" ,ruby-rspec)
9258 ("bundler" ,bundler)
9259 ("ruby-idn-ruby" ,ruby-idn-ruby)
9260 ("ruby-sporkmonger-rack-mount" ,ruby-sporkmonger-rack-mount)
d7bd7016 9261 ("ruby-rspec-its", ruby-rspec-its-minimal)
0a794b30
CB
9262 ("ruby-yard" ,ruby-yard)
9263 ("ruby-simplecov" ,ruby-simplecov)))
6f2c4efb
JL
9264 (propagated-inputs
9265 `(("ruby-public-suffix" ,ruby-public-suffix)))
6f2c4efb
JL
9266 (home-page "https://github.com/sporkmonger/addressable")
9267 (synopsis "Alternative URI implementation")
9268 (description "Addressable is a replacement for the URI implementation that
9269is part of Ruby's standard library. It more closely conforms to RFC 3986,
9270RFC 3987, and RFC 6570 (level 4), providing support for IRIs and URI templates.")
9271 (license license:asl2.0)))
9c7f15c0 9272
305e9b33
MB
9273(define-public ruby-colorize
9274 (package
9275 (name "ruby-colorize")
9276 (version "0.8.1")
9277 (source (origin
9278 (method url-fetch)
9279 (uri (rubygems-uri "colorize" version))
9280 (sha256
9281 (base32
9282 "133rqj85n400qk6g3dhf2bmfws34mak1wqihvh3bgy9jhajw580b"))))
9283 (build-system ruby-build-system)
9284 (arguments
9285 '(#:phases (modify-phases %standard-phases
9286 (add-before 'check 'remove-codeclimate-dependency
9287 (lambda _
9288 (substitute* "test/test_colorize.rb"
9289 ;; Do not hook the tests into the online CodeClimate
9290 ;; service which is unnecessary for these tests.
9291 (("require 'codeclimate-test-reporter'")
9292 "")
9293 (("CodeClimate.*") ""))
9294 #t)))))
9295 (synopsis "Add color effects to the @code{String} class")
9296 (description
9297 "This package extends the @code{String} class and adds a
9298@code{ColorizedString} with methods to set text color, background color,
9299and text effects.")
702a1012 9300 (home-page "https://github.com/fazibear/colorize")
305e9b33
MB
9301 (license license:gpl2+)))
9302
9c7f15c0
JL
9303(define-public ruby-colorator
9304 (package
9305 (name "ruby-colorator")
9306 (version "1.1.0")
9307 (source (origin
9308 (method url-fetch)
9309 (uri (rubygems-uri "colorator" version))
9310 (sha256
9311 (base32
9312 "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"))))
9313 (build-system ruby-build-system)
9314 (arguments
9315 ;; No test target
9316 `(#:tests? #f))
9317 (home-page "http://octopress.org/colorator/")
9318 (synopsis "Terminal color library")
9319 (description "Colorator is a Ruby gem that helps you colorize your text
9320for the terminal.")
9321 (license license:expat)))
78b9c291
JL
9322
9323(define-public ruby-command-line-reporter
9324 (package
9325 (name "ruby-command-line-reporter")
b448e408 9326 (version "4.0.1")
78b9c291
JL
9327 (source (origin
9328 (method url-fetch)
9329 (uri (rubygems-uri "command_line_reporter" version))
9330 (sha256
9331 (base32
b448e408 9332 "1l0zxkh5n9dxfw46lpkg416ljpldlq1bgdhqh0d118dk338nz4ll"))))
78b9c291
JL
9333 (build-system ruby-build-system)
9334 (arguments
9335 ;; No Rakefile
9336 `(#:tests? #f
9337 #:phases
9338 (modify-phases %standard-phases
9339 (add-before 'build 'fix-dependencies
9340 (lambda _
9341 (substitute* ".gemspec"
9342 ;; colored is unmaintained
9343 (("colored") "colorator")
9344 ;; colorator version
9345 (("= 1.2") "= 1.1"))
9346 #t)))))
9347 (propagated-inputs `(("ruby-colorator" ,ruby-colorator)))
9348 (home-page "https://github.com/wbailey/command_line_reporter")
9349 (synopsis "Report production while executing Ruby scripts")
9350 (description "This gem provides a DSL that makes it easy to write reports
9351of various types in ruby. It eliminates the need to litter your source with
9352puts statements, instead providing a more readable, expressive interface to
9353your application.")
9354 (license license:asl2.0)))
f22c0387
JL
9355
9356(define-public ruby-command-line-reporter-3
9357 (package
9358 (inherit ruby-command-line-reporter)
9359 (version "3.3.6")
9360 (source (origin
9361 (method url-fetch)
9362 (uri (rubygems-uri "command_line_reporter" version))
9363 (sha256
9364 (base32
9365 "1h39zqqxp3k4qk49ajpx0jps1vmvxgkh43mqkb6znk583bl0fv71"))))))
6bba8ecf 9366
439d47cd
MC
9367(define-public ruby-kpeg
9368 (package
9369 (name "ruby-kpeg")
9370 (version "1.1.0")
9371 (source
9372 (origin
9373 (method url-fetch)
9374 (uri (rubygems-uri "kpeg" version))
9375 (sha256
9376 (base32
9377 "0x2kpfrcagj931masm5y1kwbnc6nxl60cqdcd3lyd1d2hz7kzlia"))))
9378 (build-system ruby-build-system)
9379 (native-inputs
9380 `(("ruby-hoe" ,ruby-hoe)))
9381 (synopsis "PEG library for Ruby")
9382 (description "KPeg is a simple PEG library for Ruby. It provides an API as
9383well as native grammar to build the grammar. KPeg supports direct left
9384recursion of rules via the
9385@uref{http://www.vpri.org/pdf/tr2008003_experimenting.pdf,OMeta memoization}
9386technique.")
9387 (home-page "https://github.com/evanphx/kpeg")
9388 (license license:expat)))
9389
6bba8ecf
JL
9390(define-public ruby-rdoc
9391 (package
9392 (name "ruby-rdoc")
9304f989 9393 (version "6.2.0")
6bba8ecf 9394 (source
9304f989
MC
9395 (origin
9396 (method git-fetch)
9397 (uri (git-reference
b0e7b699 9398 (url "https://github.com/ruby/rdoc")
9304f989
MC
9399 (commit (string-append "v" version))))
9400 (file-name (git-file-name name version))
9401 (sha256
9402 (base32
9403 "0dhk29nidv93b5vnjvlm9gcixgn4i0jcyzrgxdk6pdg019bw4cj6"))))
6bba8ecf 9404 (build-system ruby-build-system)
9304f989
MC
9405 (arguments
9406 `(#:phases
9407 (modify-phases %standard-phases
9408 (add-after 'unpack 'patch-gemspec
9409 ;; TODO: Remove after next release is tagged.
9410 (lambda _
9411 (substitute* "rdoc.gemspec"
9412 (("\"lib/rdoc/generator/template/darkfish/js/\
9413jquery\\.js\", ") ""))
9414 #t))
9415 (add-before 'build 'generate
9416 ;; 'gem build' doesn't honor Rakefile dependencies (see:
9417 ;; https://github.com/ruby/rdoc/issues/432#issuecomment-650808977).
9418 (lambda _
9419 (invoke "rake" "generate"))))))
6bba8ecf 9420 (native-inputs
9304f989
MC
9421 `(("bundler" ,bundler)
9422 ("ruby-kpeg" ,ruby-kpeg)
9423 ("ruby-racc" ,ruby-racc)
9424 ("ruby-rubocop" ,ruby-rubocop)))
6bba8ecf
JL
9425 (home-page "https://ruby.github.io/rdoc/")
9426 (synopsis "HTML and command-line documentation utility")
9427 (description "RDoc produces HTML and command-line documentation for Ruby
9428projects. RDoc includes the +rdoc+ and +ri+ tools for generating and displaying
9429documentation from the command-line.")
9430 (license license:gpl2+)))
18077ffc
JL
9431
9432(define-public ruby-sass-listen
9433 (package
9434 (name "ruby-sass-listen")
9435 (version "4.0.0")
9436 (source (origin
9437 (method url-fetch)
9438 (uri (rubygems-uri "sass-listen" version))
9439 (sha256
9440 (base32
9441 "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"))))
9442 (build-system ruby-build-system)
9443 (arguments
9444 ;; No test target
9445 `(#:tests? #f))
9446 (propagated-inputs
9447 `(("ruby-rb-fsevent" ,ruby-rb-fsevent)
9448 ("ruby-rb-inotify" ,ruby-rb-inotify)))
9449 (home-page "https://github.com/sass/listen")
9450 (synopsis "File modification notification library")
9451 (description "The Listen gem listens to file modifications and notifies you
9452about the changes.")
9453 (license license:expat)))
0c8eedc1
JL
9454
9455(define-public ruby-terminfo
9456 (package
9457 (name "ruby-terminfo")
9458 (version "0.1.1")
9459 (source
9460 (origin
9461 (method url-fetch)
9462 (uri (rubygems-uri "ruby-terminfo" version))
9463 (sha256
9464 (base32
9465 "0rl4ic5pzvrpgd42z0c1s2n3j39c9znksblxxvmhkzrc0ckyg2cm"))))
9466 (build-system ruby-build-system)
9467 (arguments
9468 `(#:test-target "test"
9469 ;; Rakefile requires old packages and would need modification to
9470 ;; work with current software.
9471 #:tests? #f))
9472 (inputs
9473 `(("ncurses" ,ncurses)))
9474 (native-inputs
9475 `(("ruby-rubygems-tasks" ,ruby-rubygems-tasks)
9476 ("ruby-rdoc" ,ruby-rdoc)))
9477 (home-page "http://www.a-k-r.org/ruby-terminfo/")
9478 (synopsis "Terminfo binding for Ruby")
9479 (description "Ruby-terminfo provides terminfo binding for Ruby.")
9480 (license license:bsd-3)))
ddc3a667
JL
9481
9482(define-public ruby-diffy
9483 (package
9484 (name "ruby-diffy")
9485 (version "3.2.1")
9486 (source
9487 (origin
9488 (method url-fetch)
9489 (uri (rubygems-uri "diffy" version))
9490 (sha256
9491 (base32
9492 "119imrkn01agwhx5raxhknsi331y5i4yda7r0ws0an6905ximzjg"))))
9493 (build-system ruby-build-system)
9494 (arguments
9495 ;; No tests
9496 `(#:tests? #f))
9497 (native-inputs
9498 `(("ruby-rspec" ,ruby-rspec)))
9499 (home-page "https://github.com/samg/diffy")
9500 (synopsis "Convenient diffing in ruby")
9501 (description "Diffy provides a convenient way to generate a diff from two
9502strings or files.")
9503 (license license:expat)))
6456beef
JL
9504
9505(define-public ruby-sass-spec
9506 (package
9507 (name "ruby-sass-spec")
9508 (version "3.5.4")
11df8321
TGR
9509 (source
9510 (origin
9511 (method git-fetch)
9512 (uri (git-reference
b0e7b699 9513 (url "https://github.com/sass/sass-spec")
11df8321
TGR
9514 (commit (string-append "v" version))))
9515 (file-name (git-file-name name version))
9516 (sha256
9517 (base32 "1zsw66830w0xlc7kxz6fm4b5nyb44vdsdgm9mgy06s5aixx83pwr"))))
6456beef
JL
9518 (build-system ruby-build-system)
9519 (propagated-inputs
9520 `(("ruby-command-line-reporter-3" ,ruby-command-line-reporter-3)
9521 ("ruby-diffy" ,ruby-diffy)
9522 ("ruby-terminfo" ,ruby-terminfo)))
9523 (arguments
2c7cb711
CB
9524 `(;; This package contains tests for a sass implementation, and the to
9525 ;; avoid any circular dependencies, the tests are not run here
9526 #:tests? #f
9527 #:phases
9528 (modify-phases %standard-phases
9529 (add-after 'unpack 'patch-test
9530 (lambda _
9531 (delete-file "spec/values/colors/alpha_hex-3.5/error")
9532 (substitute* "spec/values/colors/alpha_hex-3.5/expected_output.css"
9533 (("string") "color")))))))
6456beef
JL
9534 (home-page "https://github.com/sass/sass-spec")
9535 (synopsis "Test suite for Sass")
9536 (description "Sass Spec is a test suite for Sass. Test cases are all in
9537the @file{spec} directory.")
9538 (license license:expat)))
f00f4492
JL
9539
9540(define-public ruby-sass
9541 (package
9542 (name "ruby-sass")
11ff2adc 9543 (version "3.6.0")
f00f4492
JL
9544 (source (origin
9545 (method url-fetch)
9546 (uri (rubygems-uri "sass" version))
9547 (sha256
9548 (base32
11ff2adc 9549 "18c6prbw9wl8bqhb2435pd9s0lzarl3g7xf8pmyla28zblvwxmyh"))))
f00f4492
JL
9550 (build-system ruby-build-system)
9551 (propagated-inputs
9552 `(("ruby-sass-listen" ,ruby-sass-listen)))
9553 (native-inputs
11ff2adc
CB
9554 `(("ruby-sass-spec" ,ruby-sass-spec)
9555 ("ruby-mathn" ,ruby-mathn)))
3497086b 9556 (home-page "https://sass-lang.com/")
f00f4492
JL
9557 (synopsis "CSS extension language")
9558 (description "Sass is a CSS extension language. It extends CSS with
9559features that don't exist yet like variables, nesting, mixins and inheritance.")
9560 (license license:expat)))
5e242cb4 9561
9efc888d
CB
9562(define-public ruby-sassc
9563 (package
9564 (name "ruby-sassc")
3e776b44 9565 (version "2.2.1")
9efc888d
CB
9566 (source
9567 (origin
9568 (method url-fetch)
9569 (uri (rubygems-uri "sassc" version))
9570 (sha256
9571 (base32
3e776b44 9572 "09bnid7r5z5hcin5hykvpvv8xig27wbbckxwis60z2aaxq4j9siz"))))
9efc888d
CB
9573 (build-system ruby-build-system)
9574 (arguments
3e776b44
CB
9575 '(#:modules ((guix build ruby-build-system)
9576 (guix build utils)
9577 (ice-9 textual-ports))
9578 #:phases
9efc888d
CB
9579 (modify-phases %standard-phases
9580 ;; TODO: This would be better as a snippet, but the ruby-build-system
9581 ;; doesn't seem to support that
9582 (add-after 'unpack 'remove-libsass
9583 (lambda _
9584 (delete-file-recursively "ext")
3e776b44
CB
9585 (with-atomic-file-replacement "sassc.gemspec"
9586 (lambda (in out)
9587 (let* ((gemspec (get-string-all in))
9588 (index (string-contains gemspec "libsass_dir")))
9589 (display (string-append
9590 (string-take gemspec index)
9591 "\nend\n")
9592 out))))
9efc888d
CB
9593 #t))
9594 (add-after 'unpack 'dont-check-the-libsass-version
9595 (lambda _
9596 (substitute* "test/native_test.rb"
9597 (("assert_equal.*Native\\.version") ""))
9598 #t))
9599 (add-after 'unpack 'remove-git-from-gemspec
9600 (lambda _
9601 (substitute* "sassc.gemspec"
3e776b44 9602 (("`git ls-files -z`") "`find . -type f -print0 |sort -z`"))
9efc888d
CB
9603 #t))
9604 (add-after 'unpack 'remove-extensions-from-gemspec
9605 (lambda _
9606 (substitute* "sassc.gemspec"
3e776b44 9607 (("\\[\"ext/extconf.rb\"\\]") "[]"))
9efc888d
CB
9608 #t))
9609 (add-after 'unpack 'fix-Rakefile
9610 (lambda _
9611 (substitute* "Rakefile"
3e776b44 9612 (("test: 'compile:libsass'") ":test"))
9efc888d
CB
9613 #t))
9614 (add-after 'unpack 'remove-unnecessary-dependencies
9615 (lambda _
9616 (substitute* "test/test_helper.rb"
9617 (("require \"pry\"") ""))
9618 #t))
9619 (add-before 'build 'patch-native.rb
9620 (lambda* (#:key inputs #:allow-other-keys)
9621 (substitute* "lib/sassc/native.rb"
9622 ((".*gem_root = spec.gem_dir") "")
9623 (("ffi_lib .*\n")
9624 (string-append
9625 "ffi_lib '" (assoc-ref inputs "libsass") "/lib/libsass.so'")))
9626 #t))
9627 ;; The gemspec still references the libsass files, so just keep the
9628 ;; one in the gem.
9629 (delete 'extract-gemspec))))
9630 (propagated-inputs
9631 `(("ruby-ffi" ,ruby-ffi)
9632 ("ruby-rake" ,ruby-rake)))
9633 (inputs
9634 `(("libsass" ,libsass)))
9635 (native-inputs
9636 `(("bundler" ,bundler)
3e776b44 9637 ("ruby-rake-compiler" ,ruby-rake-compiler)
9efc888d
CB
9638 ("ruby-minitest-around" ,ruby-minitest-around)
9639 ("ruby-test-construct" ,ruby-test-construct)))
9640 (synopsis "Use libsss from Ruby")
9641 (description
9642 "This library provides Ruby q@acronym{FFI, Foreign Function Interface}
9643bindings to the libsass library. This enables rendering
9644@acronym{SASS,Syntactically awesome style sheets} from Ruby code.")
9645 (home-page "https://github.com/sass/sassc-ruby")
9646 (license license:expat)))
9647
5e242cb4
JL
9648(define-public ruby-jekyll-sass-converter
9649 (package
9650 (name "ruby-jekyll-sass-converter")
9651 (version "1.5.2")
9652 (source (origin
9653 (method url-fetch)
9654 (uri (rubygems-uri "jekyll-sass-converter" version))
9655 (sha256
9656 (base32
9657 "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"))))
9658 (build-system ruby-build-system)
9659 (propagated-inputs
9660 `(("ruby-sass" ,ruby-sass)))
9661 (arguments
9662 ;; No rakefile
9663 `(#:tests? #f))
9664 (home-page "https://github.com/jekyll/jekyll-sass-converter")
9665 (synopsis "Sass converter for Jekyll")
9666 (description "This gem provide built-in support for the Sass converter
9667in Jekyll.")
9668 (license license:expat)))
ceac6f6f
JL
9669
9670(define-public ruby-jekyll-watch
9671 (package
9672 (name "ruby-jekyll-watch")
6cbba8a3 9673 (version "2.1.2")
ceac6f6f
JL
9674 (source (origin
9675 (method url-fetch)
9676 (uri (rubygems-uri "jekyll-watch" version))
9677 (sha256
9678 (base32
6cbba8a3 9679 "1s9ly83sp8albvgdff12xy2h4xd8lm6z2fah4lzmk2yvp85jzdzv"))))
ceac6f6f
JL
9680 (build-system ruby-build-system)
9681 (propagated-inputs
6cbba8a3 9682 `(("ruby-listen" ,ruby-listen)))
ceac6f6f
JL
9683 (arguments
9684 ;; No rakefile
9685 `(#:tests? #f))
9686 (home-page "https://github.com/jekyll/jekyll-watch")
9687 (synopsis "Jekyll auto-rebuild support")
9688 (description "This gems add the @code{--watch} switch to the jekyll CLI
9689interface. It allows Jekyll to rebuild your site when a file changes.")
9690 (license license:expat)))
3224a5a8
JL
9691
9692(define-public ruby-parallel
9693 (package
9694 (name "ruby-parallel")
c41fba01
CB
9695 (version "1.13.0")
9696 (source
9697 (origin
9698 (method git-fetch)
9699 (uri (git-reference
b0e7b699 9700 (url "https://github.com/grosser/parallel")
c41fba01
CB
9701 (commit (string-append "v" version))))
9702 (file-name (git-file-name name version))
9703 (sha256
9704 (base32
9705 "1isqzbqxz2ndad4i5z3lb9ldrhaijfncj8bmffv04sq44sv87ikv"))))
3224a5a8 9706 (build-system ruby-build-system)
c41fba01
CB
9707 (arguments
9708 `(;; TODO 3 test failures
9709 ;; rspec ./spec/parallel_spec.rb:190 # Parallel.in_processes does not
9710 ;; open unnecessary pipes
9711 ;; rspec './spec/parallel_spec.rb[1:9:7]' # Parallel.each works with
9712 ;; SQLite in processes
9713 ;; rspec './spec/parallel_spec.rb[1:9:16]' # Parallel.each works with
9714 ;; SQLite in threads
9715 #:tests? #f
9716 #:test-target "rspec-rerun:spec"
9717 #:phases
9718 (modify-phases %standard-phases
9719 (add-after 'unpack 'patch-Gemfile
9720 (lambda _
9721 (substitute* "Gemfile"
9722 (("gem 'rspec-legacy_formatters'") "")
9723 (("gem 'activerecord.*$") "gem 'activerecord'\n"))))
9724 (add-before 'check 'delete-Gemfile.lock
9725 (lambda _
9726 ;; Bundler isn't being used for fetching dependendencies, so
9727 ;; delete the Gemfile.lock
9728 (delete-file "Gemfile.lock")
9729 #t))
9730 (add-before 'build 'patch-gemspec
9731 (lambda _
9732 (substitute* "parallel.gemspec"
9733 (("git ls-files") "find"))
9734 #t)))))
9735 (native-inputs
9736 `(("ruby-rspec" ,ruby-rspec)
9737 ("ruby-rspec-rerun" ,ruby-rspec-rerun)
9738 ("bundler" ,bundler)
9739 ("ruby-activerecord" ,ruby-activerecord)
9740 ("ruby-progressbar" ,ruby-progressbar)
9741 ("ruby-bump" ,ruby-bump)
9742 ("procps" ,procps)
9743 ("lsof" ,lsof)
9744 ("ruby-mysql2" ,ruby-mysql2)
9745 ("ruby-sqlite3" ,ruby-sqlite3)
9746 ("ruby-i18n" ,ruby-i18n)))
3224a5a8
JL
9747 (home-page "https://github.com/grosser/parallel")
9748 (synopsis "Parallel processing in Ruby")
9749 (description "Parallel allows you to run any code in parallel Processes
9750(to use all CPUs) or Threads(to speedup blocking operations). It is best
9751suited for map-reduce or e.g. parallel downloads/uploads.")
9752 (license license:expat)))
83d9f672
JL
9753
9754(define-public ruby-cane
9755 (package
9756 (name "ruby-cane")
9757 (version "3.0.0")
9758 (source (origin
9759 (method url-fetch)
9760 (uri (rubygems-uri "cane" version))
9761 (sha256
9762 (base32
9763 "0yf5za3l7lhrqa3g56sah73wh33lbxy5y3cb7ij0a2bp1b4kwhih"))))
9764 (build-system ruby-build-system)
9765 (arguments `(#:tests? #f)); No rakefile
9766 (home-page "https://github.com/square/cane")
9767 (propagated-inputs
9768 `(("ruby-parallel" ,ruby-parallel)))
9769 (synopsis "Code quality threshold checking")
9770 (description "Cane fails your build if code quality thresholds are not met.")
9771 (license license:asl2.0)))
00d71efc
JL
9772
9773(define-public ruby-morecane
9774 (package
9775 (name "ruby-morecane")
9776 (version "0.2.0")
9777 (source (origin
9778 (method url-fetch)
9779 (uri (rubygems-uri "morecane" version))
9780 (sha256
9781 (base32
9782 "0w70vb8z5bdhvr21h660aa43m5948pv0bd27z7ngai2iwdvqd771"))))
9783 (build-system ruby-build-system)
9784 (home-page "https://github.com/yob/morecane")
9785 (arguments `(#:tests? #f)); No rakefile
9786 (propagated-inputs
9787 `(("ruby-parallel" ,ruby-parallel)))
9788 (synopsis "Extra checks for cane")
9789 (description "The cane gem provides a great framework for running quality
9790checks over your ruby project as part of continuous integration build. It
9791comes with a few checks out of the box, but also provides an API for loading
9792custom checks. This gem provides a set of additional checks.")
9793 (license license:expat)))
abbe629c
JL
9794
9795(define-public ruby-pdf-reader
9796 (package
9797 (name "ruby-pdf-reader")
b377dd95 9798 (version "2.4.0")
abbe629c 9799 (source (origin
34796d7a
MC
9800 (method git-fetch) ;no test in distributed gem archive
9801 (uri (git-reference
9802 (url "https://github.com/yob/pdf-reader.git")
9803 (commit (string-append "v" version))))
9804 (file-name (git-file-name name version))
abbe629c
JL
9805 (sha256
9806 (base32
34796d7a 9807 "1yh8yrlssf5ppnkvk4m78vmh5r5vqwdcd0gm3lqipw162llz0rai"))))
abbe629c 9808 (build-system ruby-build-system)
34796d7a
MC
9809 (arguments `(#:test-target "spec"
9810 #:phases (modify-phases %standard-phases
9811 (add-after 'unpack 'do-not-use-bundler
9812 (lambda _
9813 (substitute* "spec/spec_helper.rb"
9814 ((".*[Bb]undler.*") ""))
9815 #t)))))
abbe629c 9816 (native-inputs
34796d7a 9817 `(("ruby-rspec" ,ruby-rspec)
abbe629c
JL
9818 ("ruby-cane" ,ruby-cane)
9819 ("ruby-morecane" ,ruby-morecane)))
9820 (propagated-inputs
9821 `(("ruby-afm" ,ruby-afm)
9822 ("ruby-ascii85" ,ruby-ascii85)
9823 ("ruby-hashery" ,ruby-hashery)
9824 ("ruby-rc4" ,ruby-rc4)
9825 ("ruby-ttfunk" ,ruby-ttfunk)))
9826 (home-page "https://github.com/yob/pdf-reader")
9827 (synopsis "PDF parser in Ruby")
9828 (description "The PDF::Reader library implements a PDF parser conforming as
9829much as possible to the PDF specification from Adobe. It provides programmatic
9830access to the contents of a PDF file with a high degree of flexibility.")
9831 (license license:gpl3+)))
461fb859
JL
9832
9833(define-public ruby-pdf-inspector
ed2f26f8
MC
9834 (let ((revision "1")
9835 (commit "00ee4c92ff917118785ebec188e81effc968abeb"))
9836 (package
9837 (name "ruby-pdf-inspector")
9838 (version (git-version "1.3.0" revision commit))
9839 (source (origin
9840 (method git-fetch)
9841 (uri (git-reference
9842 (url "https://github.com/prawnpdf/pdf-inspector.git")
9843 (commit commit)))
9844 (file-name (git-file-name name version))
9845 (sha256
9846 (base32
9847 "0h9w81ddd0gvkh5n2cvny9ddb5qiac1si0dhinkk0xxh5382qs0m"))))
9848 (build-system ruby-build-system)
9849 (arguments
9850 `(#:test-target "spec"
9851 #:phases (modify-phases %standard-phases
9852 (add-before 'build 'drop-signing-key-requirement
9853 (lambda _
9854 (substitute* "pdf-inspector.gemspec"
9855 (("spec.signing_key =.*")
9856 "spec.signing_key = nil"))
9857 #t))
9858 (replace 'check
9859 (lambda _
9860 (substitute* "pdf-inspector.gemspec"
9861 ((".*rubocop.*") "")
9862 ((".*yard.*") ""))
9863 (invoke "rspec"))))))
9864 (native-inputs
9865 `(("ruby-rspec" ,ruby-rspec)))
9866 (propagated-inputs
9867 `(("ruby-pdf-reader" ,ruby-pdf-reader)))
9868 (home-page "https://github.com/prawnpdf/pdf-inspector")
9869 (synopsis "Analysis classes for inspecting PDF output")
9870 (description "This library provides a number of PDF::Reader based tools for
461fb859
JL
9871use in testing PDF output. Presently, the primary purpose of this tool is to
9872support the tests found in Prawn, a pure Ruby PDF generation library.")
ed2f26f8 9873 (license %prawn-project-licenses))))
770e3b53
JL
9874
9875(define-public ruby-pdf-core
9876 (package
9877 (name "ruby-pdf-core")
9878 (version "0.8.1")
9879 (source (origin
9880 (method url-fetch)
9881 (uri (rubygems-uri "pdf-core" version))
9882 (sha256
9883 (base32
9884 "15d6m99bc8bbzlkcg13qfpjjzphfg5x905pjbfygvpcxsm8gnsvg"))))
9885 (build-system ruby-build-system)
9886 (arguments
9887 ; No test target
9888 `(#:tests? #f))
9889 (home-page "https://github.com/prawnpdf/pdf-core")
9890 (synopsis "Low level PDF features for Prawn")
9891 (description "This is an experimental gem that extracts low-level PDF
9892functionality from Prawn.")
9893 (license license:gpl3+)))
37fbced7 9894
7ad8dd08 9895(define-public ruby-prawn
e6c7a601
MC
9896 ;; There hasn't been a new release since 2017/03/17.
9897 (let ((revision "1")
9898 (commit "d980247be8a00e7c59cd4e5785e3aa98f9856db1"))
9899 (package
9900 (name "ruby-prawn")
9901 (version (git-version "2.2.2" revision commit))
9902 (source (origin
9903 (method git-fetch)
9904 (uri (git-reference
9905 (url "https://github.com/prawnpdf/prawn.git")
9906 (commit commit)))
9907 (file-name (git-file-name name version))
9908 (sha256
9909 (base32
9910 "0mcmvf22h8il93yq48v9f31qpy27pvjxgv9172p0f4x9lqy0imwr"))))
9911 (build-system ruby-build-system)
9912 (arguments
9913 `(#:phases
9914 (modify-phases %standard-phases
9915 (add-before 'build 'drop-signing-key-requirement
9916 (lambda _
9917 (substitute* "prawn.gemspec"
9918 (("spec.signing_key =.*")
9919 "spec.signing_key = nil"))
9920 #t))
9921 (replace 'check
9922 (lambda* (#:key tests? #:allow-other-keys)
9923 (when tests?
9924 ;; The Prawn manual test fails (see:
9925 ;; https://github.com/prawnpdf/prawn/issues/1163), so exclude
9926 ;; it.
9927 (invoke "rspec" "--exclude-pattern" "prawn_manual_spec.rb"))
9928 #t)))))
9929 (propagated-inputs
9930 `(("ruby-pdf-core" ,ruby-pdf-core)
9931 ("ruby-ttfunk" ,ruby-ttfunk)))
9932 (native-inputs
9933 `(("ruby-pdf-inspector" ,ruby-pdf-inspector)
9934 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
9935 ("ruby-rspec" ,ruby-rspec)
9936 ("ruby-simplecov" ,ruby-simplecov)
9937 ("ruby-yard" ,ruby-yard)))
9938 (home-page "https://prawnpdf.org/api-docs/2.0/")
9939 (synopsis "PDF generation for Ruby")
9940 (description "Prawn is a pure Ruby PDF generation library.")
9941 (license %prawn-project-licenses))))
197ca8ec
JL
9942
9943(define-public ruby-prawn-table
9944 (package
9945 (name "ruby-prawn-table")
9946 (version "0.2.2")
9947 (source (origin
9948 (method url-fetch)
9949 (uri (rubygems-uri "prawn-table" version))
9950 (sha256
9951 (base32
9952 "1nxd6qmxqwl850icp18wjh5k0s3amxcajdrkjyzpfgq0kvilcv9k"))))
9953 (build-system ruby-build-system)
197ca8ec 9954 (propagated-inputs
0927b039
CB
9955 `(("ruby-prawn" ,ruby-prawn)
9956 ("ruby-pdf-inspector" ,ruby-pdf-inspector)))
9957 (native-inputs
9958 `(("bundler" ,bundler)
9959 ("ruby-yard" ,ruby-yard)
9960 ("ruby-mocha" ,ruby-mocha)
9961 ("ruby-coderay" ,ruby-coderay)
9962 ("ruby-prawn-manual-builder" ,ruby-prawn-manual-builder)
9963 ("ruby-simplecov" ,ruby-simplecov)
9964 ("ruby-rspec-2" ,ruby-rspec-2)))
9965 (arguments
9966 '(;; TODO: 1 test fails
9967 ;; Failure/Error: pdf.page_count.should == 1
9968 ;; expected: 1
9969 ;; got: 2 (using ==)
9970 ;; # ./spec/table_spec.rb:1308
9971 ;;
9972 ;; 225 examples, 1 failure
9973 #:tests? #f
9974 #:phases
9975 (modify-phases %standard-phases
9976 (add-before 'check 'patch-gemspec
9977 (lambda _
9978 (substitute* "prawn-table.gemspec"
9979 ;; Loosen the requirement for pdf-inspector
9980 (("~> 1\\.1\\.0") ">= 0")
9981 ;; Loosen the requirement for pdf-reader
9982 (("~> 1\\.2") ">= 0"))))
9983 (replace 'check
9984 (lambda* (#:key tests? #:allow-other-keys)
9985 (when tests?
9986 (invoke "rspec"))
9987 #t)))))
197ca8ec
JL
9988 (home-page "https://github.com/prawnpdf/prawn-table")
9989 (synopsis "Tables support for Prawn")
9990 (description "This gem provides tables support for Prawn.")
9991 (license license:gpl3+)))
03127069
JL
9992
9993(define-public ruby-kramdown
9994 (package
9995 (name "ruby-kramdown")
9996 (version "1.17.0")
9997 (source (origin
9998 (method url-fetch)
9999 (uri (rubygems-uri "kramdown" version))
10000 (sha256
10001 (base32
10002 "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq"))))
10003 (build-system ruby-build-system)
10004 (arguments `(#:tests? #f)); FIXME: some test failures
10005 (native-inputs
10006 `(("ruby-prawn" ,ruby-prawn)
10007 ("ruby-prawn-table" ,ruby-prawn-table)))
10008 (home-page "https://kramdown.gettalong.org/")
10009 (synopsis "Markdown parsing and converting library")
10010 (description "Kramdown is a library for parsing and converting a superset
10011of Markdown. It is completely written in Ruby, supports standard Markdown
10012(with some minor modifications) and various extensions that have been made
10013popular by the PHP @code{Markdown Extra} package and @code{Maruku}.")
10014 (license license:expat)))
fa0063bc
JL
10015
10016(define-public ruby-http-parser.rb
10017 (package
10018 (name "ruby-http-parser.rb")
10019 (version "0.6.0")
10020 (source
10021 (origin
10022 (method url-fetch)
10023 (uri (rubygems-uri "http_parser.rb" version))
10024 (sha256
10025 (base32
10026 "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"))))
10027 (build-system ruby-build-system)
10028 (arguments
10029 ;; No tests
10030 `(#:tests? #f))
10031 (native-inputs
10032 `(("ruby-rake-compiler" ,ruby-rake-compiler)
10033 ("ruby-rspec" ,ruby-rspec)))
10034 (home-page "https://github.com/tmm1/http_parser.rb")
10035 (synopsis "HTTP parser un Ruby")
10036 (description "This gem is a simple callback-based HTTP request/response
10037parser for writing http servers, clients and proxies.")
10038 (license license:expat)))
5e2f74bd
JL
10039
10040(define-public ruby-em-websocket
10041 (package
10042 (name "ruby-em-websocket")
10043 (version "0.5.1")
10044 (source
10045 (origin
10046 (method url-fetch)
10047 (uri (rubygems-uri "em-websocket" version))
10048 (sha256
10049 (base32
10050 "1bsw8vjz0z267j40nhbmrvfz7dvacq4p0pagvyp17jif6mj6v7n3"))))
10051 (build-system ruby-build-system)
10052 (arguments
10053 ;; No tests
10054 `(#:tests? #f))
10055 (propagated-inputs
10056 `(("ruby-eventmachine" ,ruby-eventmachine)
10057 ("ruby-http-parser.rb" ,ruby-http-parser.rb)))
10058 (native-inputs
10059 `(("bundler" ,bundler)
10060 ("ruby-rspec" ,ruby-rspec)))
10061 (home-page "https://github.com/igrigorik/em-websocket")
10062 (synopsis "EventMachine based WebSocket server")
10063 (description "Em-websocket is an EventMachine based WebSocket server
10064implementation.")
10065 (license license:expat)))
4ce0414b
JL
10066
10067(define-public ruby-rouge
10068 (package
10069 (name "ruby-rouge")
55cc5ef8 10070 (version "3.13.0")
4ce0414b
JL
10071 (source (origin
10072 (method url-fetch)
10073 (uri (rubygems-uri "rouge" version))
10074 (sha256
10075 (base32
55cc5ef8 10076 "1y90nx9ph9adnrpcsvs2adca2l3dyz8am2d2kzxkwd3a086ji7aw"))))
4ce0414b
JL
10077 (build-system ruby-build-system)
10078 (arguments `(#:tests? #f)); No rakefile
10079 (home-page "http://rouge.jneen.net/")
10080 (synopsis "Code highlighter")
10081 (description "Rouge is a code highlighter written in Ruby. It supports more
10082than 100 languages and outputs HTML or ANSI 256-color text. Its HTML output
10083is compatible with stylesheets designed for pygments.")
10084 (license (list
10085 ;; rouge is licensed under expat
10086 license:expat
10087 ;; pygments is licensed under bsd-2
10088 license:bsd-2))))
2c5028bd
JL
10089
10090(define-public ruby-rouge-2
10091 (package
10092 (inherit ruby-rouge)
10093 (version "2.2.1")
10094 (source (origin
10095 (method url-fetch)
10096 (uri (rubygems-uri "rouge" version))
10097 (sha256
10098 (base32
10099 "02kpahk5nkc33yxnn75649kzxaz073wvazr2zyg491nndykgnvcs"))))))
2e072e37
JL
10100
10101(define-public ruby-hashie
10102 (package
10103 (name "ruby-hashie")
10104 (version "3.6.0")
10105 (source (origin
10106 (method url-fetch)
10107 (uri (rubygems-uri "hashie" version))
10108 (sha256
10109 (base32
10110 "13bdzfp25c8k51ayzxqkbzag3wj5gc1jd8h7d985nsq6pn57g5xh"))))
10111 (build-system ruby-build-system)
10112 (native-inputs
10113 `(("bundler" ,bundler)))
10114 (arguments `(#:tests? #f)); FIXME: Could not locate Gemfile or .bundle/ directory
10115 (home-page "https://github.com/intridea/hashie")
10116 (synopsis "Extensions to Ruby Hashes")
10117 (description "Hashie is a collection of classes and mixins that make Ruby
10118hashes more powerful.")
10119 (license license:expat)))
73bfc125
JL
10120
10121(define-public ruby-heredoc-unindent
10122 (package
10123 (name "ruby-heredoc-unindent")
10124 (version "1.2.0")
10125 (source (origin
10126 (method url-fetch)
10127 (uri (rubygems-uri "heredoc_unindent" version))
10128 (sha256
10129 (base32
10130 "14ijr2fsjwhrkjkcaz81d5xnfa4vvgvcflrff83avqw9klm011yw"))))
10131 (build-system ruby-build-system)
10132 (native-inputs
10133 `(("ruby-hoe" ,ruby-hoe)))
10134 (home-page "https://github.com/adrianomitre/heredoc_unindent")
10135 (synopsis "Heredoc indentation cleaner")
10136 (description "This gem removes common margin from indented strings, such
10137as the ones produced by indented heredocs. In other words, it strips out
4f66ae28 10138leading whitespace chars at the beginning of each line, but only as much as
73bfc125
JL
10139the line with the smallest margin.
10140
10141It is acknowledged that many strings defined by heredocs are just code and
10142fact is that most parsers are insensitive to indentation. If, however, the
10143strings are to be used otherwise, be it for printing or testing, the extra
10144indentation will probably be an issue and hence this gem.")
10145 (license license:expat)))
f8ae2ee5
JL
10146
10147(define-public ruby-safe-yaml
10148 (package
10149 (name "ruby-safe-yaml")
7fa83fa8 10150 (version "1.0.5")
28cf8dab
CB
10151 (source
10152 (origin
28cf8dab
CB
10153 (method git-fetch)
10154 (uri (git-reference
b0e7b699 10155 (url "https://github.com/dtao/safe_yaml")
28cf8dab
CB
10156 (commit version)))
10157 (file-name (git-file-name name version))
10158 (sha256
10159 (base32
7fa83fa8 10160 "1a0wh7y3va2m7bjza95na2snw0vrdh9syz40mpjvjphbc4ph3pzg"))))
f8ae2ee5
JL
10161 (build-system ruby-build-system)
10162 (native-inputs
10163 `(("ruby-rspec" ,ruby-rspec)
10164 ("ruby-hashie" ,ruby-hashie)
10165 ("ruby-heredoc-unindent" ,ruby-heredoc-unindent)))
28cf8dab
CB
10166 (arguments
10167 '(#:test-target "spec"
10168 #:phases
10169 (modify-phases %standard-phases
10170 (add-before 'check 'set-TZ
10171 (lambda _
10172 ;; This test is dependent on the timezone
10173 ;; spec/transform/to_date_spec.rb:35
10174 ;; # SafeYAML::Transform::ToDate converts times to the local
10175 ;; timezone
10176 (setenv "TZ" "UTC-11")
10177 #t)))))
f8ae2ee5
JL
10178 (home-page "https://github.com/dtao/safe_yaml")
10179 (synopsis "YAML parser")
10180 (description "The SafeYAML gem provides an alternative implementation of
10181YAML.load suitable for accepting user input in Ruby applications.")
10182 (license license:expat)))
f1ec4d76
JL
10183
10184(define-public ruby-mercenary
10185 (package
10186 (name "ruby-mercenary")
10187 (version "0.3.6")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (rubygems-uri "mercenary" version))
10191 (sha256
10192 (base32
10193 "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"))))
10194 (build-system ruby-build-system)
10195 (arguments `(#:test-target "spec"))
10196 (native-inputs
10197 `(("bundler" ,bundler)))
10198 (home-page "https://github.com/jekyll/mercenary")
10199 (synopsis "Command-line apps library in Ruby")
10200 (description "Mercenary is a lightweight and flexible library for writing
10201command-line apps in Ruby.")
10202 (license license:expat)))
a13d451e
JL
10203
10204(define-public ruby-liquid
10205 (package
10206 (name "ruby-liquid")
10207 (version "4.0.0")
10208 (source (origin
10209 (method url-fetch)
10210 (uri (rubygems-uri "liquid" version))
10211 (sha256
10212 (base32
10213 "17fa0jgwm9a935fyvzy8bysz7j5n1vf1x2wzqkdfd5k08dbw3x2y"))))
10214 (build-system ruby-build-system)
10215 (arguments `(#:tests? #f)); No rakefile
10216 (home-page "https://shopify.github.io/liquid/")
10217 (synopsis "Template language")
10218 (description "Liquid is a template language written in Ruby. It is used
10219to load dynamic content on storefronts.")
10220 (license license:expat)))
49395112
JL
10221
10222(define-public ruby-forwardable-extended
10223 (package
10224 (name "ruby-forwardable-extended")
10225 (version "2.6.0")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (rubygems-uri "forwardable-extended" version))
10229 (sha256
10230 (base32
10231 "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"))))
10232 (build-system ruby-build-system)
10233 (arguments `(#:tests? #f)); Cyclic dependency on luna-rspec-formatters
10234 (home-page "https://github.com/envygeeks/forwardable-extended")
10235 (synopsis "Delegation to hashes and instance variables in Forwardable")
10236 (description "Forwardable Extended provides more @code{Forwardable}
10237methods for your source as @code{Forwardable::Extended}.")
10238 (license license:expat)))
37296113
JL
10239
10240(define-public ruby-pathutil
10241 (package
10242 (name "ruby-pathutil")
feaaa603 10243 (version "0.16.2")
37296113
JL
10244 (source (origin
10245 (method url-fetch)
10246 (uri (rubygems-uri "pathutil" version))
10247 (sha256
10248 (base32
feaaa603 10249 "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"))))
37296113
JL
10250 (build-system ruby-build-system)
10251 (propagated-inputs
10252 `(("ruby-forwardable-extended" ,ruby-forwardable-extended)))
10253 (native-inputs
10254 `(("bundler" ,bundler)
10255 ("ruby-rspec" ,ruby-rspec)))
10256 ;; Fails with: cannot load such file --
10257 ;; /tmp/guix-build-ruby-pathutil-0.16.0.drv-0/gem/benchmark/support/task
10258 (arguments `(#:tests? #f))
10259 (home-page "https://github.com/envygeeks/pathutil")
10260 (synopsis "Extended implementation of Pathname")
10261 (description "Pathutil tries to be a faster pure Ruby implementation of
10262Pathname.")
10263 (license license:expat)))
49e1dde5
JL
10264
10265(define-public jekyll
10266 (package
10267 (name "jekyll")
fcf82fd3 10268 (version "3.8.6")
49e1dde5
JL
10269 (source (origin
10270 (method url-fetch)
10271 (uri (rubygems-uri "jekyll" version))
10272 (sha256
10273 (base32
fcf82fd3 10274 "1ph1jjjl25vmzif7bvxzviq7azjm384pm7ba4k24cah94285bzhz"))))
49e1dde5
JL
10275 (build-system ruby-build-system)
10276 (arguments
fcf82fd3 10277 ;; No rakefile, but a test subdirectory.
49e1dde5
JL
10278 `(#:tests? #f
10279 #:phases
10280 (modify-phases %standard-phases
10281 (add-before 'build 'fix-i18n
10282 (lambda _
10283 (substitute* ".gemspec"
10284 (("~> 0.7") ">= 0.7"))
10285 #t)))))
10286 (propagated-inputs
10287 `(("ruby-addressable" ,ruby-addressable)
10288 ("ruby-colorator" ,ruby-colorator)
10289 ("ruby-em-websocket" ,ruby-em-websocket)
10290 ("ruby-i18n" ,ruby-i18n)
10291 ("ruby-jekyll-sass-converter" ,ruby-jekyll-sass-converter)
10292 ("ruby-jekyll-watch" ,ruby-jekyll-watch)
10293 ("ruby-kramdown" ,ruby-kramdown)
10294 ("ruby-liquid" ,ruby-liquid)
10295 ("ruby-mercenary" ,ruby-mercenary)
10296 ("ruby-pathutil" ,ruby-pathutil)
10297 ("ruby-rouge" ,ruby-rouge-2)
10298 ("ruby-safe-yaml" ,ruby-safe-yaml)))
10299 (home-page "https://jekyllrb.com/")
10300 (synopsis "Static site generator")
10301 (description "Jekyll is a simple, blog aware, static site generator.")
10302 (license license:expat)))
37a0f470
JL
10303
10304(define-public ruby-jekyll-paginate-v2
10305 (package
10306 (name "ruby-jekyll-paginate-v2")
10307 (version "2.0.0")
10308 (source (origin
10309 (method url-fetch)
10310 (uri (rubygems-uri "jekyll-paginate-v2" version))
10311 (sha256
10312 (base32
10313 "154bfpyml6abxww9868hhyfvxasl8qhsc5zy2q30c7dxaj0igdib"))))
10314 (build-system ruby-build-system)
10315 (propagated-inputs
10316 `(("jekyll" ,jekyll)))
10317 (home-page "https://github.com/sverrirs/jekyll-paginate-v2")
10318 (synopsis "Pagination Generator for Jekyll 3")
10319 (description "The Pagination Generator forms the core of the pagination
10320logic in Jekyll. It calculates and generates the pagination pages.")
10321 (license license:expat)))
909eae21
CB
10322
10323(define-public ruby-faraday
10324 (package
10325 (name "ruby-faraday")
10326 (version "0.15.4")
10327 (source
10328 (origin
10329 (method url-fetch)
10330 (uri (rubygems-uri "faraday" version))
10331 (sha256
10332 (base32
10333 "0s72m05jvzc1pd6cw1i289chas399q0a14xrwg4rvkdwy7bgzrh0"))))
10334 (build-system ruby-build-system)
10335 (arguments
10336 '(#:tests? #f))
10337 (propagated-inputs
10338 `(("ruby-multipart-post" ,ruby-multipart-post)))
10339 (synopsis "Ruby HTTP/REST API client library")
10340 (description
10341 "Faraday is a HTTP/REST API client library which provides a common
10342interface over different adapters.")
10343 (home-page "https://github.com/lostisland/faraday")
10344 (license license:expat)))
a058cbfd
CB
10345
10346(define-public ruby-nio4r
10347 (package
10348 (name "ruby-nio4r")
7923b9bf 10349 (version "2.5.2")
a058cbfd
CB
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (rubygems-uri "nio4r" version))
10354 (sha256
10355 (base32
7923b9bf 10356 "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"))))
a058cbfd
CB
10357 (build-system ruby-build-system)
10358 (arguments
10359 '(#:phases
10360 (modify-phases %standard-phases
10361 (add-after 'unpack 'remove-unnecessary-dependencies
10362 (lambda _
10363 (substitute* "spec/spec_helper.rb"
10364 ;; Coveralls is for uploading test coverage information to an
10365 ;; online service, and thus unnecessary for building the Guix
10366 ;; package
10367 (("require \"coveralls\"") "")
10368 (("Coveralls\\.wear!") "")
10369 ;; Remove rspec/retry as we are not retrying the tests
10370 (("require \"rspec/retry\"") "")
10371 (("config\\.display_try_failure_messages = true") "")
10372 (("config\\.verbose_retry = true") ""))
10373 #t))
10374 (add-before 'check 'compile
10375 (lambda _
10376 (invoke "rake" "compile")
10377 #t))
10378 (replace 'check
10379 (lambda* (#:key tests? #:allow-other-keys)
10380 (when tests?
10381 (invoke "rspec"))
10382 #t)))))
10383 (native-inputs
10384 `(("bundler" ,bundler)
10385 ("ruby-rake-compiler" ,ruby-rake-compiler)
10386 ("ruby-rspec" ,ruby-rspec)
10387 ("ruby-rubocop" ,ruby-rubocop)))
10388 (synopsis "New I/O for Ruby")
10389 (description
10390 "@code{nio} provides cross-platform asynchronous I/O primitives in Ruby
10391for scalable network clients and servers.")
10392 (home-page "https://github.com/socketry/nio4r")
10393 (license license:expat)))
f9da1ada
CB
10394
10395(define-public ruby-globalid
10396 (package
10397 (name "ruby-globalid")
10398 (version "0.4.2")
10399 (source
10400 (origin
10401 (method url-fetch)
10402 (uri (rubygems-uri "globalid" version))
10403 (sha256
10404 (base32
10405 "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"))))
10406 (build-system ruby-build-system)
10407 (arguments
10408 '(;; No included tests
10409 #:tests? #f))
10410 (propagated-inputs
10411 `(("ruby-activesupport" ,ruby-activesupport)))
10412 (synopsis "Generate URIs idenfitying model instances in Ruby")
10413 (description
10414 "@code{GlobalID} provides a way to generate URIs from a model in Ruby that
10415uniquely identify it.")
10416 (home-page "https://rubyonrails.org/")
10417 (license license:expat)))
15606d98
CB
10418
10419(define-public ruby-sprockets
10420 (package
10421 (name "ruby-sprockets")
10422 (version "3.7.2")
10423 (source
10424 (origin
10425 (method url-fetch)
10426 (uri (rubygems-uri "sprockets" version))
10427 (sha256
10428 (base32
10429 "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"))))
10430 (build-system ruby-build-system)
10431 (arguments
10432 '(;; No included tests
10433 #:tests? #f))
10434 (propagated-inputs
10435 `(("ruby-concurrent" ,ruby-concurrent)
10436 ("ruby-rack" ,ruby-rack)))
10437 (synopsis "Sprockets is a Rack-based asset packaging system")
10438 (description
10439 "Sprockets is a Rack-based asset packaging system that concatenates and
10440serves JavaScript, CoffeeScript, CSS, LESS, Sass, and SCSS.")
10441 (home-page "https://github.com/rails/sprockets")
10442 (license license:expat)))
acb9e3d8
PN
10443
10444(define-public ruby-mustermann
10445 (package
10446 (name "ruby-mustermann")
10447 (version "1.0.3")
10448 (source
10449 (origin
10450 (method url-fetch)
10451 (uri (rubygems-uri "mustermann" version))
10452 (sha256
10453 (base32
10454 "0lycgkmnyy0bf29nnd2zql5a6pcf8sp69g9v4xw0gcfcxgpwp7i1"))))
10455 (build-system ruby-build-system)
10456 (arguments
10457 ;; No tests.
10458 '(#:tests? #f))
10459 (synopsis "Library implementing patterns that behave like regular expressions")
10460 (description "Given a string pattern, Mustermann will turn it into an
10461object that behaves like a regular expression and has comparable performance
10462characteristics.")
10463 (home-page "https://github.com/sinatra/mustermann")
10464 (license license:expat)))
3bb094e2 10465
7bddb6aa
BL
10466(define-public ruby-htmlentities
10467 (package
10468 (name "ruby-htmlentities")
10469 (version "4.3.4")
10470 (source
10471 (origin
10472 (method url-fetch)
10473 (uri (rubygems-uri "htmlentities" version))
10474 (sha256
10475 (base32
10476 "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"))))
10477 (build-system ruby-build-system)
10478 (arguments
10479 `(#:phases
10480 (modify-phases %standard-phases
10481 (replace 'check
10482 (lambda _
10483 (map (lambda (file)
10484 (invoke "ruby" "-Itest" file))
10485 (find-files "./test" ".*_test\\.rb")))))))
10486 (synopsis "Encode and decode (X)HTML entities")
10487 (description
10488 "This package provides a module for encoding and decoding (X)HTML
10489entities.")
10490 (home-page "https://github.com/threedaymonk/htmlentities")
10491 (license license:expat)))
10492
3bb094e2
PN
10493(define-public ruby-sinatra
10494 (package
10495 (name "ruby-sinatra")
7af92924 10496 (version "2.0.8.1")
3bb094e2
PN
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (rubygems-uri "sinatra" version))
10501 (sha256
10502 (base32
7af92924 10503 "0riy3hwjab1mr73jcqx3brmbmwspnw3d193j06a5f0fy1w35z15q"))))
3bb094e2 10504 (build-system ruby-build-system)
7af92924
MC
10505 (arguments
10506 `(#:phases
10507 (modify-phases %standard-phases
10508 ;; See: https://github.com/sinatra/sinatra/issues/1578.
10509 (add-after 'extract-gemspec 'fix-slow-doc-generation
10510 (lambda _
10511 (substitute* "sinatra.gemspec"
10512 (("\"README.rdoc\"\\.freeze," all)
10513 (string-append all " \"--exclude=.*\\.md\".freeze,")))
10514 #t)))))
3bb094e2
PN
10515 (propagated-inputs
10516 `(("ruby-mustermann" ,ruby-mustermann)
10517 ("ruby-rack" ,ruby-rack)
10518 ("ruby-rack-protection" ,ruby-rack-protection)
10519 ("ruby-tilt" ,ruby-tilt)))
10520 (synopsis "DSL for quick web applications creation in Ruby")
10521 (description
10522 "Sinatra is a DSL for quickly creating web applications in Ruby with
10523minimal effort.")
10524 (home-page "http://sinatrarb.com/")
10525 (license license:expat)))
6e87695b
PN
10526
10527(define-public ruby-thin
10528 (package
10529 (name "ruby-thin")
10530 (version "1.7.2")
10531 (source
10532 (origin
10533 (method url-fetch)
10534 (uri (rubygems-uri "thin" version))
10535 (sha256
10536 (base32
10537 "0nagbf9pwy1vg09k6j4xqhbjjzrg5dwzvkn4ffvlj76fsn6vv61f"))))
10538 (build-system ruby-build-system)
10539 (arguments
10540 ;; No tests.
10541 '(#:tests? #f))
10542 (propagated-inputs
10543 `(("ruby-daemons" ,ruby-daemons)
10544 ("ruby-eventmachine" ,ruby-eventmachine)
10545 ("ruby-rack" ,ruby-rack)))
10546 (synopsis "Thin and fast web server for Ruby")
10547 (description "Thin is a Ruby web server that glues together 3 Ruby libraries:
10548@itemize
10549@item the Mongrel parser,
10550@item Event Machine, a network I/O library with high scalability, performance
10551and stability,
10552@item Rack, a minimal interface between webservers and Ruby frameworks.
10553@end itemize\n")
60783303 10554 (home-page "https://github.com/macournoyer/thin")
6e87695b 10555 (license license:ruby)))
be6016db
PN
10556
10557(define-public ruby-skinny
10558 (package
10559 (name "ruby-skinny")
10560 (version "0.2.4")
10561 (source
10562 (origin
10563 (method url-fetch)
10564 (uri (rubygems-uri "skinny" version))
10565 (sha256
10566 (base32
10567 "1y3yvx88ylgz4d2s1wskjk5rkmrcr15q3ibzp1q88qwzr5y493a9"))))
10568 (build-system ruby-build-system)
10569 (arguments
10570 '(#:tests? #f ; No included tests
10571 #:phases
10572 (modify-phases %standard-phases
10573 (add-before 'build 'patch-gemspec
10574 (lambda _
10575 (substitute* ".gemspec"
10576 (("<eventmachine>.freeze, \\[\\\"~> 1.0.0\"")
10577 "<eventmachine>, [\">= 1.0.0\"")
10578 (("<thin>.freeze, \\[\\\"< 1.7\", ") "<thin>, ["))
10579 #t)))))
10580 (propagated-inputs
10581 `(("ruby-eventmachine" ,ruby-eventmachine)
10582 ("ruby-thin" ,ruby-thin)))
10583 (synopsis "Simple, upgradable WebSockets for Ruby Thin")
10584 (description "Skinny is a simple, upgradable WebSockets for Ruby, using
10585the Thin library.")
10586 (home-page "https://github.com/sj26/skinny")
10587 (license license:expat)))
df747c8d 10588
9c566d1b
MB
10589(define-public ruby-sys-filesystem
10590 (package
10591 (name "ruby-sys-filesystem")
10592 (version "1.3.4")
10593 (source (origin
10594 (method url-fetch)
10595 (uri (rubygems-uri "sys-filesystem" version))
10596 (sha256
10597 (base32
10598 "0mizqnsiagagmracadr16s5na2ks2j3ih1w0f3gp4ssrda6szl01"))))
10599 (build-system ruby-build-system)
10600 (arguments
10601 '(#:phases (modify-phases %standard-phases
10602 (add-before 'check 'set-HOME
10603 (lambda _
10604 ;; Some tests attempt to stat $HOME. Let them.
10605 (setenv "HOME" "/tmp")
10606 #t)))))
10607 (propagated-inputs
10608 `(("ruby-ffi" ,ruby-ffi)))
10609 (native-inputs
10610 `(("ruby-mkmf-lite" ,ruby-mkmf-lite)))
10611 (synopsis "Gather file system information")
10612 (description
10613 "The @code{sys-filesystem} library provides a cross-platform interface
10614for gathering file system information, such as disk space and mount points.")
10615 (home-page "https://github.com/djberg96/sys-filesystem")
10616 (license license:asl2.0)))
10617
df747c8d
PN
10618(define-public mailcatcher
10619 (package
10620 (name "mailcatcher")
10621 (version "0.7.1")
10622 (source
10623 (origin
10624 (method url-fetch)
10625 (uri (rubygems-uri "mailcatcher" version))
10626 (sha256
10627 (base32
10628 "02w1ycyfv7x0sh9799lz7xa65p5qvl5z4pa8a7prb68h2zwkfq0n"))))
10629 (build-system ruby-build-system)
10630 (arguments
10631 ;; Tests require web/assets which is not included in the output. We
10632 ;; might be able to fix this by adding the Git repository to the GEM_PATH
10633 ;; of the tests. See ruby-mysql2.
10634 '(#:tests? #f
10635 #:phases
10636 (modify-phases %standard-phases
10637 (add-before 'build 'patch-gemspec
10638 (lambda _
10639 (substitute* ".gemspec"
10640 (("<eventmachine>.freeze, \\[\\\"= 1.0.9.1")
10641 "<eventmachine>, [\">= 1.0.9.1")
10642 (("<rack>.freeze, \\[\\\"~> 1.5") "<rack>, [\">= 1.5")
10643 (("<thin>.freeze, \\[\\\"~> 1.5.0") "<thin>, [\">= 1.5.0")
10644 (("<sinatra>.freeze, \\[\\\"~> 1.2") "<sinatra>, [\">= 1.2"))
10645 #t))
10646 (add-before 'build 'loosen-dependency-contraint
10647 (lambda _
10648 (substitute* "lib/mail_catcher.rb"
10649 (("\"eventmachine\", \"1.0.9.1\"") "\"eventmachine\", \">= 1.0.9.1\"")
10650 (("\"rack\", \"~> 1.5\"") "\"rack\", \">= 1.5\"")
10651 (("\"thin\", \"~> 1.5.0\"") "\"thin\", \">= 1.5.0\"")
10652 (("\"sinatra\", \"~> 1.2\"") "\"sinatra\", \">= 1.2\""))
10653 #t)))))
10654 (inputs
10655 `(("ruby-eventmachine" ,ruby-eventmachine)
10656 ("ruby-mail" ,ruby-mail)
10657 ("ruby-rack" ,ruby-rack)
10658 ("ruby-sinatra" ,ruby-sinatra)
10659 ("ruby-skinny" ,ruby-skinny)
10660 ("ruby-sqlite3" ,ruby-sqlite3)
10661 ("ruby-thin" ,ruby-thin)))
10662 (synopsis "SMTP server which catches messages to display them a browser")
10663 (description
10664 "MailCatcher runs a super simple SMTP server which catches any message
10665sent to it to display in a web interface. Run mailcatcher, set your favourite
10666app to deliver to smtp://127.0.0.1:1025 instead of your default SMTP server,
10667then check out http://127.0.0.1:1080 to see the mail.")
10668 (home-page "https://mailcatcher.me")
10669 (license license:expat)))
fc4f7c45
MK
10670
10671(define-public ruby-backport
10672 (package
10673 (name "ruby-backport")
b62863b8 10674 (version "1.1.2")
fc4f7c45
MK
10675 (source
10676 (origin
b62863b8 10677 ;; The gem does not include test code, so fetch from the Git repository.
fc4f7c45
MK
10678 (method git-fetch)
10679 (uri (git-reference
b0e7b699 10680 (url "https://github.com/castwide/backport")
fc4f7c45
MK
10681 (commit (string-append "v" version))))
10682 (file-name (git-file-name name version))
10683 (sha256
b62863b8 10684 (base32 "18fpg1n7n2z02ykz9v1x1q0cqa2lvivf8ygka768s01q1r9wfwv2"))))
fc4f7c45
MK
10685 (build-system ruby-build-system)
10686 (arguments
10687 `(#:test-target "spec"))
10688 (native-inputs
10689 `(("bundler" ,bundler)
10690 ("ruby-rspec" ,ruby-rspec)))
10691 (inputs
10692 `(("ruby-simplecov" ,ruby-simplecov)))
10693 (synopsis "Pure Ruby library for event-driven IO")
10694 (description
10695 "This package provides a pure Ruby library for event-driven IO.")
10696 (home-page "https://github.com/castwide/backport")
10697 (license license:expat)))
369faa59
JL
10698
10699(define-public ruby-json-schema
10700 (package
10701 (name "ruby-json-schema")
10702 (version "2.8.1")
10703 (source
10704 (origin
10705 (method url-fetch)
10706 (uri (rubygems-uri "json-schema" version))
10707 (sha256
10708 (base32
10709 "1yv5lfmr2nzd14af498xqd5p89f3g080q8wk0klr3vxgypsikkb5"))))
10710 (build-system ruby-build-system)
10711 (arguments
10712 `(#:tests? #f ; no tests
10713 #:phases
10714 (modify-phases %standard-phases
10715 (replace 'build
10716 (lambda _
10717 (invoke "gem" "build" ".gemspec"))))))
10718 (propagated-inputs
10719 `(("ruby-addressable" ,ruby-addressable)))
10720 (synopsis "Ruby JSON Schema Validator")
10721 (description "This library provides Ruby with an interface for validating
10722JSON objects against a JSON schema conforming to JSON Schema Draft 4. Legacy
10723support for JSON Schema Draft 3, JSON Schema Draft 2, and JSON Schema Draft 1
10724is also included.")
10725 (home-page "https://github.com/ruby-json-schema/json-schema")
10726 (license license:expat)))
44881cad
JL
10727
10728(define-public swagger-diff
10729 (package
10730 (name "swagger-diff")
10731 (version "1.1.2")
10732 (source
10733 (origin
10734 (method url-fetch)
10735 (uri (rubygems-uri "swagger-diff" version))
10736 (sha256
10737 (base32
10738 "1hxx50nga1bqn254iqjcdwkc9c72364ks9lyjyw10ajz0l0ly7sn"))))
10739 (build-system ruby-build-system)
10740 (arguments
10741 `(#:test-target "spec"
10742 #:phases
10743 (modify-phases %standard-phases
10744 ;; Don't run or require rubocop, the code linting tool, as this is a
10745 ;; bit unnecessary.
10746 (add-after 'unpack 'dont-run-rubocop
10747 (lambda _
10748 (substitute* "Rakefile"
10749 ((".*rubocop.*") "")
10750 ((".*RuboCop.*") ""))
10751 #t)))))
10752 (propagated-inputs
10753 `(("ruby-json-schema" ,ruby-json-schema)))
10754 (native-inputs
10755 `(("bundler" ,bundler)
10756 ("ruby-rspec-core" ,ruby-rspec-core)
10757 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
10758 (synopsis
10759 "Compare Open API Initiative specification files")
10760 (description
10761 "Swagger::Diff is a utility for comparing two different Open API
10762Initiative (OAI) specifications (formerly known as Swagger specifications).
10763It is intended to determine whether a newer API specification is
10764backwards-compatible with an older API specification.")
10765 (home-page "https://github.com/civisanalytics/swagger-diff")
10766 (license license:bsd-3)))
9e065a8a
BL
10767
10768(define-public ruby-reverse-markdown
10769 (package
10770 (name "ruby-reverse-markdown")
10771 (version "1.1.0")
10772 (source
10773 (origin
10774 (method url-fetch)
10775 (uri (rubygems-uri "reverse_markdown" version))
10776 (sha256
10777 (base32
10778 "0w7y5n74daajvl9gixr91nh8670d7mkgspkk3ql71m8azq3nffbg"))))
10779 (build-system ruby-build-system)
10780 (propagated-inputs
10781 `(("ruby-nokogiri" ,ruby-nokogiri)))
10782 (native-inputs
10783 `(("bundler" ,bundler)
10784 ("ruby-rspec" ,ruby-rspec)
10785 ("ruby-kramdown" ,ruby-kramdown)
10786 ("ruby-simplecov" ,ruby-simplecov)))
10787 (arguments
10788 `(#:phases
10789 (modify-phases %standard-phases
10790 (replace 'check
10791 (lambda* (#:key tests? #:allow-other-keys)
10792 (when tests?
10793 (invoke "rspec"))
10794 #t)))))
10795 (synopsis "Convert HTML into Markdown")
10796 (description
10797 "This Ruby module allows you to map simple HTML back into
10798Markdown---e.g., if you want to import existing HTML data in your
10799application.")
10800 (home-page "https://github.com/xijo/reverse_markdown")
10801 (license license:wtfpl2)))
10802
a9e2de7e
BL
10803(define-public ruby-solargraph
10804 (package
10805 (name "ruby-solargraph")
10806 (version "0.36.0")
10807 (source
10808 (origin
10809 (method url-fetch)
10810 (uri (rubygems-uri "solargraph" version))
10811 (sha256
10812 (base32
10813 "0b93xzkgd1h06da9gdnwivj1mzbil8lc072y2838dy6i7bxgpy9i"))))
10814 (build-system ruby-build-system)
10815 (propagated-inputs
10816 `(("ruby-backport" ,ruby-backport)
10817 ("bundler" ,bundler)
10818 ("ruby-htmlentities" ,ruby-htmlentities)
10819 ("ruby-jaro-winkler" ,ruby-jaro-winkler)
10820 ("ruby-maruku" ,ruby-maruku)
10821 ("ruby-nokogiri" ,ruby-nokogiri)
10822 ("ruby-parser" ,ruby-parser)
10823 ("ruby-reverse-markdown" ,ruby-reverse-markdown)
10824 ("ruby-rubocop" ,ruby-rubocop)
10825 ("ruby-thor" ,ruby-thor)
10826 ("ruby-tilt" ,ruby-tilt)
10827 ("ruby-yard" ,ruby-yard)))
10828 (native-inputs
10829 `(("ruby-rspec" ,ruby-rspec)
10830 ("ruby-pry" ,ruby-pry)
10831 ("ruby-simplecov" ,ruby-simplecov)
10832 ("ruby-webmock" ,ruby-webmock-2)))
10833 ;; FIXME: can't figure out how to run the tests properly:
10834
10835 ;; An error occurred while loading spec_helper.
10836 ;; Failure/Error: return gem_original_require(path)
10837 ;; LoadError:
10838 ;; cannot load such file -- spec_helper
10839 (arguments
10840 '(#:tests? #f
10841 #:phases
10842 (modify-phases %standard-phases
10843 (replace 'check
10844 (lambda* (#:key tests? #:allow-other-keys)
10845 (when tests?
10846 (invoke "rspec"))
10847 #t)))))
10848 (synopsis
10849 "IDE tools for code completion, inline documentation, and static analysis")
10850 (description
10851 "Solargraph provides a comprehensive suite of tools for Ruby
10852programming: intellisense, diagnostics, inline documentation, and type
10853checking.")
10854 (home-page "https://solargraph.org/")
10855 (license license:expat)))
0c558aa9
DNB
10856
10857(define-public ruby-wayback-machine-downloader
10858 (package
10859 (name "ruby-wayback-machine-downloader")
10860 (version "2.2.1")
10861 (source
10862 (origin
10863 (method url-fetch)
10864 (uri (rubygems-uri
10865 "wayback_machine_downloader"
10866 version))
10867 (sha256
10868 (base32
10869 "12kb1qmvmmsaihqab1prn6cmynkn6cgb4vf41mgv22wkcgv5wgk2"))))
10870 (build-system ruby-build-system)
10871 (arguments
10872 '(#:tests? #f)) ; no tests
10873 (synopsis "Download archived websites from the Wayback Machine")
10874 (description
10875 "Wayback Machine Downloader is a command line tool for downloading
10876websites from the Internet Archive's Wayback Machine (archive.org).
10877It allows fine grained control over what to download by specifying
10878which snapshots to consider and what files to include.")
10879 (home-page
10880 "https://github.com/hartator/wayback-machine-downloader")
10881 (license license:expat)))
e6483f8c
MB
10882
10883(define-public ruby-wwtd
10884 (package
10885 (name "ruby-wwtd")
10886 (version "1.4.1")
702a1012 10887 (home-page "https://github.com/grosser/wwtd")
e6483f8c
MB
10888 (source (origin
10889 (method git-fetch)
10890 (uri (git-reference
10891 (url home-page)
10892 (commit (string-append "v" version))))
10893 (file-name (git-file-name name version))
10894 (sha256
10895 (base32
10896 "0gw7vfnbb41cy67yw82zji3jkhfsgmzcgzaszm99ax77y18wclf2"))
10897 (modules '((guix build utils)))
10898 (snippet
10899 '(begin
10900 ;; Remove bundled library.
10901 (delete-file "spec/rake-12.3.0.gem")
10902 #t))))
10903 (build-system ruby-build-system)
10904 (arguments
10905 '(;; XXX: Tests need multiple versions of ruby, wants to run
10906 ;; `bundle install`, etc.
10907 #:tests? #f
10908 #:phases (modify-phases %standard-phases
10909 (replace 'replace-git-ls-files
10910 (lambda _
10911 (substitute* "wwtd.gemspec"
10912 (("git ls-files lib/ bin/`")
10913 "find lib/ bin/ -type f |sort`"))
10914 #t))
10915 (add-before 'check 'remove-version-constraints
10916 (lambda _
10917 (delete-file "Gemfile.lock")
10918 #t))
10919 (replace 'check
10920 (lambda* (#:key tests? #:allow-other-keys)
10921 (if tests?
10922 (invoke "rspec" "spec/")
10923 (format #t "test suite not run~%"))
10924 #t)))))
10925 (native-inputs
10926 `(("ruby-bump" ,ruby-bump)
10927 ("ruby-rspec" ,ruby-rspec)))
10928 (synopsis "Run @file{.travis.yml} files locally")
10929 (description
10930 "WWTD is a @dfn{Travis Simulator} that lets you run test matrices
10931defined in @file{.travis.yml} on your local machine, using @code{rvm},
10932@code{rbenv}, or @code{chruby} to test different versions of Ruby.")
10933 (license license:expat)))