34387e57542da06e12a8b6811c03b5ec1804177e
[jackhill/guix/guix.git] / gnu / packages / ruby.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Pjotr Prins <pjotr.guix@thebird.nl>
3 ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
6 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Ben Woodcroft <donttrustben@gmail.com>
8 ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
9 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages ruby)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages databases)
32 #:use-module (gnu packages readline)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages java)
35 #:use-module (gnu packages libffi)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages ragel)
38 #:use-module (gnu packages tls)
39 #:use-module (gnu packages version-control)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix utils)
44 #:use-module (guix build-system gnu)
45 #:use-module (gnu packages xml)
46 #:use-module (gnu packages web)
47 #:use-module (guix build-system ruby))
48
49 (define-public ruby
50 (package
51 (name "ruby")
52 (replacement ruby-2.4.3)
53 (version "2.4.2")
54 (source
55 (origin
56 (method url-fetch)
57 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
58 (version-major+minor version)
59 "/ruby-" version ".tar.xz"))
60 (sha256
61 (base32
62 "0dgp4ypk3smrsbh2c249n5pl6nqhpd2igq9484dbsh81sf08k2kl"))
63 (modules '((guix build utils)))
64 (snippet `(begin
65 ;; Remove bundled libffi
66 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
67 #t))))
68 (build-system gnu-build-system)
69 (arguments
70 `(#:test-target "test"
71 #:phases
72 (modify-phases %standard-phases
73 (add-before 'configure 'replace-bin-sh-and-remove-libffi
74 (lambda _
75 (substitute* '("Makefile.in"
76 "ext/pty/pty.c"
77 "io.c"
78 "lib/mkmf.rb"
79 "process.c"
80 "test/rubygems/test_gem_ext_configure_builder.rb"
81 "test/rdoc/test_rdoc_parser.rb"
82 "test/ruby/test_rubyoptions.rb"
83 "test/ruby/test_process.rb"
84 "test/ruby/test_system.rb"
85 "tool/rbinstall.rb")
86 (("/bin/sh") (which "sh")))
87 #t)))))
88 (inputs
89 `(("readline" ,readline)
90 ("openssl" ,openssl)
91 ("libffi" ,libffi)
92 ("gdbm" ,gdbm)
93 ("zlib" ,zlib)))
94 (native-search-paths
95 (list (search-path-specification
96 (variable "GEM_PATH")
97 (files (list (string-append "lib/ruby/gems/"
98 (version-major+minor version)
99 ".0"))))))
100 (synopsis "Programming language interpreter")
101 (description "Ruby is a dynamic object-oriented programming language with
102 a focus on simplicity and productivity.")
103 (home-page "https://ruby-lang.org")
104 (license license:ruby)))
105
106 (define-public ruby-2.4.3
107 (package
108 (inherit ruby)
109 (name "ruby")
110 (version "2.4.3")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
115 (version-major+minor version)
116 "/ruby-" version ".tar.xz"))
117 (sha256
118 (base32
119 "0l9bv67dgsphk42lmiskhrnh47hbyj6rfg2rcjx22xivpx07srr3"))
120 (modules '((guix build utils)))
121 (snippet `(begin
122 ;; Remove bundled libffi
123 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
124 #t))))))
125
126 (define-public ruby-2.3
127 (package
128 (inherit ruby)
129 (version "2.3.6")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
134 (version-major+minor version)
135 "/ruby-" version ".tar.xz"))
136 (sha256
137 (base32
138 "0mlz0mk7yyxia37k8fdv8m8a72h61nfbns28430h796l4an6kng0"))
139 (modules '((guix build utils)))
140 (snippet `(begin
141 ;; Remove bundled libffi
142 (delete-file-recursively "ext/fiddle/libffi-3.2.1")
143 #t))))))
144
145 (define-public ruby-2.2
146 (package (inherit ruby)
147 (version "2.2.9")
148 (source
149 (origin
150 (method url-fetch)
151 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
152 (version-major+minor version)
153 "/ruby-" version ".tar.xz"))
154 (sha256
155 (base32
156 "0p18xykx8dm5mmlx5n5243z67lj4vbvwr70bnc5x12am22ql8fri"))))))
157
158 (define-public ruby-2.1
159 (package (inherit ruby)
160 (version "2.1.10")
161 (source
162 (origin
163 (method url-fetch)
164 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
165 (version-major+minor version)
166 "/ruby-" version ".tar.bz2"))
167 (sha256
168 (base32
169 "1wglbd599mlwxfcb2xgqcxi2shr363pjn5dpbv11m04si9bpaim7"))))
170 (arguments
171 `(#:test-target "test"
172 #:parallel-tests? #f
173 #:phases
174 (modify-phases %standard-phases
175 (add-before 'configure 'replace-bin-sh
176 (lambda _
177 (substitute* '("Makefile.in"
178 "ext/pty/pty.c"
179 "io.c"
180 "lib/mkmf.rb"
181 "process.c")
182 (("/bin/sh") (which "sh")))
183 #t)))))
184 (native-search-paths
185 (list (search-path-specification
186 (variable "GEM_PATH")
187 (files (list (string-append "lib/ruby/gems/"
188 (version-major+minor version)
189 ".0"))))))))
190
191 (define-public ruby-1.8
192 (package (inherit ruby)
193 (version "1.8.7-p374")
194 (source
195 (origin
196 (method url-fetch)
197 (uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
198 (version-major+minor version)
199 "/ruby-" version ".tar.bz2"))
200 (sha256
201 (base32
202 "1qq7khilwkayrhwmzlxk83scrmiqfi7lgsn4c63znyvz2c1lgqxl"))))
203 (native-search-paths '())
204 (arguments
205 `(#:test-target "test"
206 #:parallel-tests? #f
207 #:phases
208 (modify-phases %standard-phases
209 (add-before 'configure 'replace-bin-sh
210 (lambda _
211 (substitute* '("Makefile.in"
212 "ext/pty/pty.c"
213 "io.c"
214 "lib/mkmf.rb"
215 "process.c")
216 (("/bin/sh") (which "sh")))
217 #t)))))))
218
219 (define (gem-directory ruby-version)
220 "Return the relative gem install directory for RUBY-VERSION."
221 (string-append "/lib/ruby/gems/" (version-major+minor ruby-version)
222 ".0/gems"))
223
224 (define-public ruby-highline
225 (package
226 (name "ruby-highline")
227 (version "1.7.8")
228 (source
229 (origin
230 (method url-fetch)
231 (uri (rubygems-uri "highline" version))
232 (sha256
233 (base32
234 "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr"))))
235 (build-system ruby-build-system)
236 (arguments
237 `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
238 (native-inputs
239 `(("bundler" ,bundler)
240 ("ruby-code-statistics" ,ruby-code-statistics)))
241 (synopsis
242 "HighLine helps you build command-line interfaces")
243 (description
244 "HighLine provides a high-level IO library that provides validation,
245 type conversion, and more for command-line interfaces. HighLine also includes
246 a menu system for providing multiple options to the user.")
247 (home-page "https://github.com/JEG2/highline")
248 (license (list license:gpl2 license:ruby))))
249
250 (define-public ruby-hoe
251 (package
252 (name "ruby-hoe")
253 (version "3.16.0")
254 (source (origin
255 (method url-fetch)
256 (uri (rubygems-uri "hoe" version))
257 (sha256
258 (base32
259 "03r8nsw4n4mnia9iqiqk9kqhvrl96m2i81j4yg8cpnppd8vk7vlb"))))
260 (build-system ruby-build-system)
261 (synopsis "Ruby project management helper")
262 (description
263 "Hoe is a rake/rubygems helper for project Rakefiles. It helps manage,
264 maintain, and release projects and includes a dynamic plug-in system allowing
265 for easy extensibility. Hoe ships with plug-ins for all the usual project
266 tasks including rdoc generation, testing, packaging, deployment, and
267 announcement.")
268 (home-page "http://www.zenspider.com/projects/hoe.html")
269 (license license:expat)))
270
271 (define-public ruby-rake-compiler
272 (package
273 (name "ruby-rake-compiler")
274 (version "1.0.4")
275 (source (origin
276 (method url-fetch)
277 (uri (rubygems-uri "rake-compiler" version))
278 (sha256
279 (base32
280 "1xpdi4w8zaklk1i9ps8g3k0icw3v5fcks092l84w28rgrpx82qip"))))
281 (build-system ruby-build-system)
282 (arguments
283 '(#:tests? #f)) ; needs cucumber
284 (synopsis "Building and packaging helper for Ruby native extensions")
285 (description "Rake-compiler provides a framework for building and
286 packaging native C and Java extensions in Ruby.")
287 (home-page "https://github.com/rake-compiler/rake-compiler")
288 (license license:expat)))
289
290 (define-public ruby-i18n
291 (package
292 (name "ruby-i18n")
293 (version "0.7.0")
294 (source (origin
295 (method url-fetch)
296 (uri (rubygems-uri "i18n" version))
297 (sha256
298 (base32
299 "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758"))))
300 (build-system ruby-build-system)
301 (arguments
302 '(#:tests? #f)) ; no tests
303 (synopsis "Internationalization library for Ruby")
304 (description "Ruby i18n is an internationalization and localization
305 solution for Ruby programs. It features translation and localization,
306 interpolation of values to translations, pluralization, customizable
307 transliteration to ASCII, flexible defaults, bulk lookup, lambdas as
308 translation data, custom key/scope separator, custom exception handlers, and
309 an extensible architecture with a swappable backend.")
310 (home-page "https://github.com/svenfuchs/i18n")
311 (license license:expat)))
312
313 ;; RSpec is the dominant testing library for Ruby projects. Even RSpec's
314 ;; dependencies use RSpec for their test suites! To avoid these circular
315 ;; dependencies, we disable tests for all of the RSpec-related packages.
316 (define ruby-rspec-support
317 (package
318 (name "ruby-rspec-support")
319 (version "3.5.0")
320 (source (origin
321 (method url-fetch)
322 (uri (rubygems-uri "rspec-support" version))
323 (sha256
324 (base32
325 "10vf3k3d472y573mag2kzfsfrf6rv355s13kadnpryk8d36yq5r0"))))
326 (build-system ruby-build-system)
327 (arguments
328 '(#:tests? #f)) ; avoid dependency cycles
329 (synopsis "RSpec support library")
330 (description "Support utilities for RSpec gems.")
331 (home-page "https://github.com/rspec/rspec-support")
332 (license license:expat)))
333
334 (define-public ruby-rspec-core
335 (package
336 (name "ruby-rspec-core")
337 (version "3.5.4")
338 (source (origin
339 (method url-fetch)
340 (uri (rubygems-uri "rspec-core" version))
341 (sha256
342 (base32
343 "1nacs062qbr98fx6czf1vwppn1js956nv2c8vfwj6i65axdfs46i"))))
344 (build-system ruby-build-system)
345 (arguments
346 '(#:tests? #f)) ; avoid dependency cycles
347 (propagated-inputs
348 `(("ruby-rspec-support" ,ruby-rspec-support)))
349 (synopsis "RSpec core library")
350 (description "Rspec-core provides the RSpec test runner and example
351 groups.")
352 (home-page "https://github.com/rspec/rspec-core")
353 (license license:expat)))
354
355 (define-public ruby-rspec-core-2
356 (package (inherit ruby-rspec-core)
357 (version "2.14.8")
358 (source (origin
359 (method url-fetch)
360 (uri (rubygems-uri "rspec-core" version))
361 (sha256
362 (base32
363 "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc"))))
364 (propagated-inputs `())))
365
366 (define-public ruby-diff-lcs
367 (package
368 (name "ruby-diff-lcs")
369 (version "1.3")
370 (source (origin
371 (method url-fetch)
372 (uri (rubygems-uri "diff-lcs" version))
373 (sha256
374 (base32
375 "18w22bjz424gzafv6nzv98h0aqkwz3d9xhm7cbr1wfbyas8zayza"))))
376 (build-system ruby-build-system)
377 (arguments
378 '(#:tests? #f)) ; avoid dependency cycles
379 (synopsis "Compute the difference between two Enumerable sequences")
380 (description "Diff::LCS computes the difference between two Enumerable
381 sequences using the McIlroy-Hunt longest common subsequence (LCS) algorithm.
382 It includes utilities to create a simple HTML diff output format and a
383 standard diff-like tool.")
384 (home-page "https://github.com/halostatue/diff-lcs")
385 (license license:expat)))
386
387 (define-public ruby-rspec-expectations
388 (package
389 (name "ruby-rspec-expectations")
390 (version "3.5.0")
391 (source (origin
392 (method url-fetch)
393 (uri (rubygems-uri "rspec-expectations" version))
394 (sha256
395 (base32
396 "0bbqfrb1x8gmwf8x2xhhwvvlhwbbafq4isbvlibxi6jk602f09gs"))))
397 (build-system ruby-build-system)
398 (arguments
399 '(#:tests? #f)) ; avoid dependency cycles
400 (propagated-inputs
401 `(("ruby-rspec-support" ,ruby-rspec-support)
402 ("ruby-diff-lcs" ,ruby-diff-lcs)))
403 (synopsis "RSpec expectations library")
404 (description "Rspec-expectations provides a simple API to express expected
405 outcomes of a code example.")
406 (home-page "https://github.com/rspec/rspec-expectations")
407 (license license:expat)))
408
409 (define-public ruby-rspec-expectations-2
410 (package (inherit ruby-rspec-expectations)
411 (version "2.14.5")
412 (source (origin
413 (method url-fetch)
414 (uri (rubygems-uri "rspec-expectations" version))
415 (sha256
416 (base32
417 "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9"))))
418 (propagated-inputs
419 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
420
421 (define-public ruby-rspec-mocks
422 (package
423 (name "ruby-rspec-mocks")
424 (version "3.5.0")
425 (source (origin
426 (method url-fetch)
427 (uri (rubygems-uri "rspec-mocks" version))
428 (sha256
429 (base32
430 "0nl3ksivh9wwrjjd47z5dggrwx40v6gpb3a0gzbp1gs06a5dmk24"))))
431 (build-system ruby-build-system)
432 (arguments
433 '(#:tests? #f)) ; avoid dependency cycles
434 (propagated-inputs
435 `(("ruby-rspec-support" ,ruby-rspec-support)
436 ("ruby-diff-lcs" ,ruby-diff-lcs)))
437 (synopsis "RSpec stubbing and mocking library")
438 (description "Rspec-mocks provides RSpec's \"test double\" framework, with
439 support for stubbing and mocking.")
440 (home-page "https://github.com/rspec/rspec-mocks")
441 (license license:expat)))
442
443 (define-public ruby-rspec-mocks-2
444 (package (inherit ruby-rspec-mocks)
445 (version "2.14.6")
446 (source (origin
447 (method url-fetch)
448 (uri (rubygems-uri "rspec-mocks" version))
449 (sha256
450 (base32
451 "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30"))))
452 (propagated-inputs
453 `(("ruby-diff-lcs" ,ruby-diff-lcs)))))
454
455 (define-public ruby-rspec
456 (package
457 (name "ruby-rspec")
458 (version "3.5.0")
459 (source (origin
460 (method url-fetch)
461 (uri (rubygems-uri "rspec" version))
462 (sha256
463 (base32
464 "16g3mmih999f0b6vcz2c3qsc7ks5zy4lj1rzjh8hf6wk531nvc6s"))))
465 (build-system ruby-build-system)
466 (arguments
467 '(#:tests? #f)) ; avoid dependency cycles
468 (propagated-inputs
469 `(("ruby-rspec-core" ,ruby-rspec-core)
470 ("ruby-rspec-mocks" ,ruby-rspec-mocks)
471 ("ruby-rspec-expectations" ,ruby-rspec-expectations)))
472 (synopsis "Behavior-driven development framework for Ruby")
473 (description "RSpec is a behavior-driven development (BDD) framework for
474 Ruby. This meta-package includes the RSpec test runner, along with the
475 expectations and mocks frameworks.")
476 (home-page "http://rspec.info/")
477 (license license:expat)))
478
479 (define-public ruby-rspec-2
480 (package (inherit ruby-rspec)
481 (version "2.14.1")
482 (source (origin
483 (method url-fetch)
484 (uri (rubygems-uri "rspec" version))
485 (sha256
486 (base32
487 "134y4wzk1prninb5a0bhxgm30kqfzl8dg06af4js5ylnhv2wd7sg"))))
488 (propagated-inputs
489 `(("ruby-rspec-core" ,ruby-rspec-core-2)
490 ("ruby-rspec-mocks" ,ruby-rspec-mocks-2)
491 ("ruby-rspec-expectations" ,ruby-rspec-expectations-2)))))
492
493 ;; Bundler is yet another source of circular dependencies, so we must disable
494 ;; its test suite as well.
495 (define-public bundler
496 (package
497 (name "bundler")
498 (version "1.15.4")
499 (source (origin
500 (method url-fetch)
501 (uri (rubygems-uri "bundler" version))
502 (sha256
503 (base32
504 "0wl4r7wbwdq68xidfv4hhzfb1spb6lmhbspwlzrg4pf1l6ipxlgs"))))
505 (build-system ruby-build-system)
506 (arguments
507 '(#:tests? #f)) ; avoid dependency cycles
508 (synopsis "Ruby gem bundler")
509 (description "Bundler automatically downloads and installs a list of gems
510 specified in a \"Gemfile\", as well as their dependencies.")
511 (home-page "http://bundler.io/")
512 (license license:expat)))
513
514 (define-public ruby-builder
515 (package
516 (name "ruby-builder")
517 (version "3.2.3")
518 (source (origin
519 (method url-fetch)
520 (uri (rubygems-uri "builder" version))
521 (sha256
522 (base32
523 "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"))))
524 (build-system ruby-build-system)
525 (arguments
526 `(#:phases
527 (modify-phases %standard-phases
528 (add-after 'unpack 'do-not-use-rvm
529 (lambda _
530 (substitute* "rakelib/tags.rake"
531 (("RVM_GEMDIR = .*") "RVM_GEMDIR = 'no-rvm-please'\n"))
532 #t)))))
533 (synopsis "Ruby library to create structured data")
534 (description "Builder provides a number of builder objects that make it
535 easy to create structured data. Currently the following builder objects are
536 supported: XML Markup and XML Events.")
537 (home-page "https://github.com/jimweirich/builder")
538 (license license:expat)))
539
540 (define-public ruby-rjb
541 (package
542 (name "ruby-rjb")
543 (version "1.5.5")
544 (source (origin
545 (method url-fetch)
546 (uri (rubygems-uri "rjb" version))
547 (sha256
548 (base32
549 "1ppj8rbicj3w0nhh7f73mflq19yd7pzdzkh2a91hcvphriy5b0ca"))))
550 (build-system ruby-build-system)
551 (arguments
552 `(#:tests? #f ; no rakefile
553 #:phases
554 (modify-phases %standard-phases
555 (add-before 'build 'set-java-home
556 (lambda* (#:key inputs #:allow-other-keys)
557 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
558 #t)))))
559 (native-inputs
560 `(("jdk" ,icedtea "jdk")))
561 (synopsis "Ruby-to-Java bridge using the Java Native Interface")
562 (description "RJB is a bridge program that connects Ruby and Java via the
563 Java Native Interface.")
564 (home-page "http://www.artonx.org/collabo/backyard/?RubyJavaBridge")
565 (license license:lgpl2.1+)))
566
567 (define-public ruby-log4r
568 (package
569 (name "ruby-log4r")
570 (version "1.1.10")
571 (source
572 (origin
573 (method url-fetch)
574 (uri (rubygems-uri "log4r" version))
575 (sha256
576 (base32
577 "0ri90q0frfmigkirqv5ihyrj59xm8pq5zcmf156cbdv4r4l2jicv"))))
578 (build-system ruby-build-system)
579 (arguments
580 '(#:tests? #f)) ; no Rakefile in gem
581 (synopsis "Flexible logging library for Ruby")
582 (description "Comprehensive and flexible logging library written
583 in Ruby for use in Ruby programs. It features a hierarchical logging
584 system of any number of levels, custom level names, logger
585 inheritance, multiple output destinations per log event, execution
586 tracing, custom formatting, thread safteyness, XML and YAML
587 configuration, and more.")
588 (home-page "http://log4r.rubyforge.org/")
589 (license license:bsd-3)))
590
591 (define-public ruby-atoulme-antwrap
592 (package
593 (name "ruby-atoulme-antwrap")
594 (version "0.7.5")
595 (source (origin
596 (method url-fetch)
597 (uri (rubygems-uri "atoulme-Antwrap" version))
598 (sha256
599 (base32
600 "05s3iw44lqa81f8nfy5f0xjj808600h82zb9bsh46b9kcq2w2kmz"))))
601 (build-system ruby-build-system)
602 ;; Test data required for most of the tests are not included.
603 (arguments `(#:tests? #f))
604 (native-inputs
605 `(("ruby-hoe" ,ruby-hoe)))
606 (inputs
607 `(("ruby-rjb" ,ruby-rjb)))
608 (synopsis "Ruby wrapper for the Ant build tool")
609 (description "Antwrap is a Ruby module that wraps the Apache Ant build
610 tool. Antwrap can be used to invoke Ant tasks from a Ruby or a JRuby
611 script.")
612 (home-page "http://rubyforge.org/projects/antwrap/")
613 (license license:expat)))
614
615 (define-public ruby-atoulme-saikuro
616 (package
617 (name "ruby-atoulme-saikuro")
618 (version "1.2.1")
619 (source (origin
620 (method url-fetch)
621 (uri (rubygems-uri "atoulme-Saikuro" version))
622 (sha256
623 (base32
624 "0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
625 (build-system ruby-build-system)
626 ;; FIXME: There are no unit tests. The tests are demonstrations of the
627 ;; "saikuro" tool.
628 (arguments `(#:tests? #f))
629 (synopsis "Cyclomatic complexity analyzer")
630 (description "Saikuro is a Ruby cyclomatic complexity analyzer. When
631 given Ruby source code Saikuro will generate a report listing the cyclomatic
632 complexity of each method found. In addition, Saikuro counts the number of
633 lines per method and can generate a listing of the number of tokens on each
634 line of code.")
635 (home-page "http://www.github.com/atoulme/Saikuro")
636 ;; File headers contain the BSD-3 license and the README.rdoc says that
637 ;; "Saikuro uses the BSD license", but the LICENSE file contains the text
638 ;; of the Expat license.
639 (license license:bsd-3)))
640
641 (define-public ruby-ci-reporter
642 (package
643 (name "ruby-ci-reporter")
644 (version "2.0.0")
645 (source (origin
646 (method url-fetch)
647 (uri (rubygems-uri "ci_reporter" version))
648 (sha256
649 (base32
650 "17fm20jmw3ajdryhkkxpjahcfx7bgswqzxrskivlkns2718ayyyg"))))
651 (build-system ruby-build-system)
652 (arguments
653 `(#:test-target "rspec"))
654 (propagated-inputs
655 `(("ruby-builder" ,ruby-builder)))
656 (native-inputs
657 `(("bundler" ,bundler)
658 ("ruby-rspec" ,ruby-rspec)))
659 (synopsis "Generate XML reports of runs test")
660 (description
661 "@code{CI::Reporter} is an add-on to Ruby testing frameworks that allows
662 you to generate XML reports of your test runs. The resulting files can be
663 read by a continuous integration system that understands Ant's JUnit report
664 format.")
665 (home-page "https://github.com/nicksieger/ci_reporter")
666 (license license:expat)))
667
668 (define-public ruby-saikuro-treemap
669 (package
670 (name "ruby-saikuro-treemap")
671 (version "0.2.0")
672 (source (origin
673 (method url-fetch)
674 (uri (rubygems-uri "saikuro_treemap" version))
675 (sha256
676 (base32
677 "0w70nmh43mwfbpq20iindl61siqqr8acmf7p3m7n5ipd61c24950"))))
678 (build-system ruby-build-system)
679 ;; Some of the tests fail because the generated JSON has keys in a
680 ;; different order. This is a problem with the test suite rather than any
681 ;; of the involved libraries.
682 (arguments `(#:tests? #f))
683 (propagated-inputs
684 `(("ruby-json-pure" ,ruby-json-pure)
685 ("ruby-atoulme-saikuro" ,ruby-atoulme-saikuro)))
686 (synopsis "Generate complexity treemap based on saikuro analysis")
687 (description
688 "This gem generates a treemap showing the complexity of Ruby code on
689 which it is run. It uses Saikuro under the covers to analyze Ruby code
690 complexity.")
691 (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
692 (license license:expat)))
693
694 (define-public ruby-options
695 (package
696 (name "ruby-options")
697 (version "2.3.2")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (rubygems-uri "options" version))
702 (sha256
703 (base32
704 "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
705 (build-system ruby-build-system)
706 (arguments
707 '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
708 #:phases
709 (modify-phases %standard-phases
710 (add-before 'check 'set-LIB
711 (lambda _
712 ;; This is used in the Rakefile, and setting it avoids an issue
713 ;; with running the tests.
714 (setenv "LIB" "options"))))))
715 (synopsis "Ruby library to parse options from *args cleanly")
716 (description
717 "The @code{options} library helps with parsing keyword options in Ruby
718 functions.")
719 (home-page "https://github.com/ahoward/options")
720 (license license:ruby)))
721
722 (define-public ruby-orderedhash
723 (package
724 (name "ruby-orderedhash")
725 (version "0.0.6")
726 (source (origin
727 (method url-fetch)
728 (uri (rubygems-uri "orderedhash" version))
729 (sha256
730 (base32
731 "0fryy7f9jbpx33jq5m402yqj01zcg563k9fsxlqbhmq638p4bzd7"))))
732 (build-system ruby-build-system)
733 (arguments
734 '(#:tests? #f)) ; no test suite
735 (synopsis "Ruby library providing an order-preserving hash")
736 (description "Orderedhash is a Ruby library providing a hash
737 implementation that preserves the order of items and features some array-like
738 extensions.")
739 (home-page "http://codeforpeople.com/lib/ruby/orderedhash/")
740 (license license:public-domain)))
741
742 (define-public ruby-libxml
743 (package
744 (name "ruby-libxml")
745 (version "3.0.0")
746 (source
747 (origin
748 (method url-fetch)
749 (uri (rubygems-uri "libxml-ruby" version))
750 (sha256
751 (base32
752 "0xy8wmjwjcnv36zi042678ncjzpxvy351ccbv7mzkns2n3kxfp54"))))
753 (build-system ruby-build-system)
754 (inputs
755 `(("zlib" ,zlib)
756 ("libxml2" ,libxml2)))
757 (arguments
758 '(#:tests? #f ; test suite hangs for unknown reason
759 #:gem-flags
760 (list "--"
761 (string-append "--with-xml2-include="
762 (assoc-ref %build-inputs "libxml2")
763 "/include/libxml2" ))))
764 (synopsis "Ruby bindings for GNOME Libxml2")
765 (description "The Libxml-Ruby project provides Ruby language bindings for
766 the GNOME Libxml2 XML toolkit.")
767 (home-page "http://xml4r.github.com/libxml-ruby")
768 (license license:expat)))
769
770 (define-public ruby-xml-simple
771 (package
772 (name "ruby-xml-simple")
773 (version "1.1.5")
774 (source (origin
775 (method url-fetch)
776 (uri (rubygems-uri "xml-simple" version))
777 (sha256
778 (base32
779 "0xlqplda3fix5pcykzsyzwgnbamb3qrqkgbrhhfz2a2fxhrkvhw8"))))
780 (build-system ruby-build-system)
781 (arguments
782 '(#:tests? #f)) ; no test suite
783 (synopsis "Simple Ruby library for XML processing")
784 (description "This library provides a simple API for XML processing in
785 Ruby.")
786 (home-page "https://github.com/maik/xml-simple")
787 (license license:ruby)))
788
789 (define-public ruby-thor
790 (package
791 (name "ruby-thor")
792 (version "0.19.4")
793 (source (origin
794 (method url-fetch)
795 (uri (rubygems-uri "thor" version))
796 (sha256
797 (base32
798 "01n5dv9kql60m6a00zc0r66jvaxx98qhdny3klyj0p3w34pad2ns"))))
799 (build-system ruby-build-system)
800 (arguments
801 '(#:tests? #f)) ; no test suite
802 (native-inputs
803 `(("bundler" ,bundler)))
804 (synopsis "Ruby toolkit for building command-line interfaces")
805 (description "Thor is a toolkit for building powerful command-line
806 interfaces.")
807 (home-page "http://whatisthor.com/")
808 (license license:expat)))
809
810 (define-public ruby-lumberjack
811 (package
812 (name "ruby-lumberjack")
813 (version "1.0.12")
814 (source (origin
815 (method url-fetch)
816 (uri (rubygems-uri "lumberjack" version))
817 (sha256
818 (base32
819 "0yz26k9mi0djx1qvlmvdw1xw2yf7a2rkfmnb2j0d28kms33xpibp"))))
820 (build-system ruby-build-system)
821 (native-inputs
822 `(("ruby-rspec" ,ruby-rspec)
823 ("ruby-timecop" ,ruby-timecop)))
824 (synopsis "Logging utility library for Ruby")
825 (description "Lumberjack is a simple logging utility that can be a drop in
826 replacement for Logger or ActiveSupport::BufferedLogger. It provides support
827 for automatically rolling log files even with multiple processes writing the
828 same log file.")
829 (home-page "https://github.com/bdurand/lumberjack")
830 (license license:expat)))
831
832 (define-public ruby-nenv
833 (package
834 (name "ruby-nenv")
835 (version "0.3.0")
836 (source (origin
837 (method url-fetch)
838 (uri (rubygems-uri "nenv" version))
839 (sha256
840 (base32
841 "0r97jzknll9bhd8yyg2bngnnkj8rjhal667n7d32h8h7ny7nvpnr"))))
842 (build-system ruby-build-system)
843 (arguments
844 `(#:tests? #f)) ; no tests included
845 (native-inputs
846 `(("ruby-rspec" ,ruby-rspec)
847 ("bundler" ,bundler)))
848 (synopsis "Ruby interface for modifying the environment")
849 (description "Nenv provides a convenient wrapper for Ruby's ENV to modify
850 and inspect the environment.")
851 (home-page "https://github.com/e2/nenv")
852 (license license:expat)))
853
854 (define-public ruby-permutation
855 (package
856 (name "ruby-permutation")
857 (version "0.1.8")
858 (source (origin
859 (method url-fetch)
860 (uri (rubygems-uri "permutation" version))
861 (sha256
862 (base32
863 "13crwk2vfbzv99czva7881027dbcnidihmvx2jc58z2vm3bp9sl8"))))
864 (build-system ruby-build-system)
865 (arguments
866 `(#:phases
867 (modify-phases %standard-phases
868 (add-after 'unpack 'fix-rakefile
869 (lambda _
870 (substitute* "Rakefile"
871 (("require 'rake/gempackagetask'")
872 "require 'rubygems/package_task'")
873 (("include Config") ""))
874 #t))
875 (replace 'check
876 (lambda _
877 (zero? (system* "ruby" "-Ilib" "test/test.rb")))))))
878 (synopsis "Library to perform operations with sequence permutations")
879 (description "This package provides a Ruby library to perform different
880 operations with permutations of sequences, such as strings and arrays.")
881 (home-page "http://flori.github.io/permutation")
882 (license license:gpl2))) ; GPL 2 only
883
884 (define-public ruby-shellany
885 (package
886 (name "ruby-shellany")
887 (version "0.0.1")
888 (source (origin
889 (method url-fetch)
890 (uri (rubygems-uri "shellany" version))
891 (sha256
892 (base32
893 "1ryyzrj1kxmnpdzhlv4ys3dnl2r5r3d2rs2jwzbnd1v96a8pl4hf"))))
894 (build-system ruby-build-system)
895 (arguments
896 `(#:test-target "default"
897 #:phases
898 (modify-phases %standard-phases
899 (add-after 'unpack 'fix-version-test
900 (lambda _
901 (substitute* "spec/shellany_spec.rb"
902 (("^RSpec") "require \"shellany\"\nRSpec"))
903 #t)))))
904 (native-inputs
905 `(("ruby-rspec" ,ruby-rspec)
906 ("ruby-nenv" ,ruby-nenv)
907 ("bundler" ,bundler)))
908 (synopsis "Capture command output")
909 (description "Shellany is a Ruby library providing functions to capture
910 the output produced by running shell commands.")
911 (home-page "https://rubygems.org/gems/shellany")
912 (license license:expat)))
913
914 (define-public ruby-notiffany
915 (package
916 (name "ruby-notiffany")
917 (version "0.1.1")
918 (source (origin
919 (method url-fetch)
920 (uri (rubygems-uri "notiffany" version))
921 (sha256
922 (base32
923 "0x838fa5il0dd9zbm3lxkpbfxcf5fxv9556mayc2mxsdl5ghv8nx"))))
924 (build-system ruby-build-system)
925 ;; Tests are not included in the gem.
926 (arguments `(#:tests? #f))
927 (propagated-inputs
928 `(("ruby-shellany" ,ruby-shellany)
929 ("ruby-nenv" ,ruby-nenv)))
930 (native-inputs
931 `(("bundler" ,bundler)))
932 (synopsis "Wrapper libray for notification libraries")
933 (description "Notiffany is a Ruby wrapper libray for notification
934 libraries such as Libnotify.")
935 (home-page "https://github.com/guard/notiffany")
936 (license license:expat)))
937
938 (define-public ruby-formatador
939 (package
940 (name "ruby-formatador")
941 (version "0.2.5")
942 (source (origin
943 (method url-fetch)
944 (uri (rubygems-uri "formatador" version))
945 (sha256
946 (base32
947 "1gc26phrwlmlqrmz4bagq1wd5b7g64avpx0ghxr9xdxcvmlii0l0"))))
948 (build-system ruby-build-system)
949 ;; Circular dependency: Tests require ruby-shindo, which requires
950 ;; ruby-formatador at runtime.
951 (arguments `(#:tests? #f))
952 (synopsis "Ruby library to format text on stdout")
953 (description "Formatador is a Ruby library to format text printed to the
954 standard output stream.")
955 (home-page "https://github.com/geemus/formatador")
956 (license license:expat)))
957
958 (define-public ruby-shindo
959 (package
960 (name "ruby-shindo")
961 (version "0.3.8")
962 (source (origin
963 (method url-fetch)
964 (uri (rubygems-uri "shindo" version))
965 (sha256
966 (base32
967 "0s8v1jbz8i0jh92f2fgxb3p51l1azrpkc8nv4mhrqy4vndpvd7wq"))))
968 (build-system ruby-build-system)
969 (arguments
970 `(#:test-target "shindo_tests"
971 #:phases
972 (modify-phases %standard-phases
973 (add-after 'unpack 'fix-tests
974 (lambda _
975 (substitute* "Rakefile"
976 (("system \"shindo") "system \"./bin/shindo")
977 ;; This test doesn't work, so we disable it.
978 (("fail \"The build_error test should fail") "#"))
979 #t)))))
980 (propagated-inputs
981 `(("ruby-formatador" ,ruby-formatador)))
982 (synopsis "Simple depth first Ruby testing")
983 (description "Shindo is a simple depth first testing library for Ruby.")
984 (home-page "https://github.com/geemus/shindo")
985 (license license:expat)))
986
987 (define-public ruby-rubygems-tasks
988 (package
989 (name "ruby-rubygems-tasks")
990 (version "0.2.4")
991 (source (origin
992 (method url-fetch)
993 (uri (rubygems-uri "rubygems-tasks" version))
994 (sha256
995 (base32
996 "16cp45qlbcglnqdm4f1vj3diywdz4v024saqpgrz6palf0wmgz2j"))))
997 (build-system ruby-build-system)
998 ;; Tests need Internet access.
999 (arguments `(#:tests? #f))
1000 (native-inputs
1001 `(("ruby-rspec" ,ruby-rspec)
1002 ("ruby-yard" ,ruby-yard)))
1003 (synopsis "Rake tasks for managing and releasing Ruby Gems")
1004 (description "Rubygems-task provides Rake tasks for managing and releasing
1005 Ruby Gems.")
1006 (home-page "https://github.com/postmodern/rubygems-tasks")
1007 (license license:expat)))
1008
1009 (define-public ruby-rubyzip
1010 (package
1011 (name "ruby-rubyzip")
1012 (version "1.2.1")
1013 (source
1014 (origin
1015 (method url-fetch)
1016 (uri (rubygems-uri "rubyzip" version))
1017 (sha256
1018 (base32
1019 "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
1020 (build-system ruby-build-system)
1021 (arguments
1022 '(#:phases
1023 (modify-phases %standard-phases
1024 (add-before 'check 'patch-tests
1025 (lambda* (#:key inputs #:allow-other-keys)
1026 (substitute* "test/gentestfiles.rb"
1027 (("/usr/bin/zip")
1028 (string-append
1029 (assoc-ref inputs "zip") "/bin/zip")))
1030 (substitute* "test/input_stream_test.rb"
1031 (("/usr/bin/env ruby") (which "ruby")))
1032 #t)))))
1033 (native-inputs
1034 `(("bundler" ,bundler)
1035 ("ruby-simplecov" ,ruby-simplecov)
1036 ("zip" ,zip)
1037 ("unzip" ,unzip)))
1038 (synopsis "Ruby module is for reading and writing zip files")
1039 (description
1040 "The rubyzip module provides ways to read from and create zip files.")
1041 (home-page "http://github.com/rubyzip/rubyzip")
1042 (license license:bsd-2)))
1043
1044 (define-public ruby-simplecov-html
1045 (package
1046 (name "ruby-simplecov-html")
1047 (version "0.10.1")
1048 (source (origin
1049 (method url-fetch)
1050 (uri (rubygems-uri "simplecov-html" version))
1051 (sha256
1052 (base32
1053 "0f3psphismgp6jp1fxxz09zbswh7m2xxxr6gqlzdh7sgv415clvm"))))
1054 (build-system ruby-build-system)
1055 (arguments `(#:tests? #f)) ; there are no tests
1056 (native-inputs
1057 `(("bundler" ,bundler)))
1058 (synopsis "Default HTML formatter for SimpleCov code coverage tool")
1059 (description "This package provides the default HTML formatter for
1060 the SimpleCov code coverage tool for Ruby version 1.9 and above.")
1061 (home-page "https://github.com/colszowka/simplecov-html")
1062 (license license:expat)))
1063
1064 (define-public ruby-simplecov
1065 (package
1066 (name "ruby-simplecov")
1067 (version "0.12.0")
1068 (source (origin
1069 (method url-fetch)
1070 (uri (rubygems-uri "simplecov" version))
1071 (sha256
1072 (base32
1073 "0ffhyrfnq2zm2mc1742a4hqy475g3qa1zf6yfldwg1ldh5sn3qbx"))))
1074 (build-system ruby-build-system)
1075 ;; Simplecov depends on rubocop for code style checking at build time.
1076 ;; Rubocop needs simplecov at build time.
1077 (arguments `(#:tests? #f))
1078 (propagated-inputs
1079 `(("ruby-json" ,ruby-json)
1080 ("ruby-docile" ,ruby-docile)
1081 ("ruby-simplecov-html" ,ruby-simplecov-html)))
1082 (native-inputs
1083 `(("bundler" ,bundler)))
1084 (synopsis "Code coverage framework for Ruby")
1085 (description "SimpleCov is a code coverage framework for Ruby with a
1086 powerful configuration library and automatic merging of coverage across test
1087 suites.")
1088 (home-page "https://github.com/colszowka/simplecov")
1089 (license license:expat)))
1090
1091 (define-public ruby-useragent
1092 (package
1093 (name "ruby-useragent")
1094 (version "0.16.8")
1095 (source (origin
1096 (method url-fetch)
1097 (uri (rubygems-uri "useragent" version))
1098 (sha256
1099 (base32
1100 "1139cjqyv1hk1qcw89k81ajjkqyakqgbcyvmfrsmjqi8yn9kgqhq"))))
1101 (build-system ruby-build-system)
1102 (arguments
1103 '(#:tests? #f)) ; no test suite
1104 (synopsis "HTTP user agent parser for Ruby")
1105 (description "UserAgent is a Ruby library that parses and compares HTTP
1106 User Agents.")
1107 (home-page "https://github.com/gshutler/useragent")
1108 (license license:expat)))
1109
1110 (define-public ruby-bacon
1111 (package
1112 (name "ruby-bacon")
1113 (version "1.2.0")
1114 (source (origin
1115 (method url-fetch)
1116 (uri (rubygems-uri "bacon" version))
1117 (sha256
1118 (base32
1119 "1f06gdj77bmwzc1k5iragl1595hbn67yc7sqvs56ca8plrr2vmai"))))
1120 (build-system ruby-build-system)
1121 (synopsis "Small RSpec clone")
1122 (description "Bacon is a small RSpec clone providing all essential
1123 features.")
1124 (home-page "https://github.com/chneukirchen/bacon")
1125 (license license:expat)))
1126
1127 (define-public ruby-connection-pool
1128 (package
1129 (name "ruby-connection-pool")
1130 (version "2.2.1")
1131 (source (origin
1132 (method url-fetch)
1133 (uri (rubygems-uri "connection_pool" version))
1134 (sha256
1135 (base32
1136 "17vpaj6kyf2i8bimaxz7rg1kyadf4d10642ja67qiqlhwgczl2w7"))))
1137 (build-system ruby-build-system)
1138 (native-inputs
1139 `(("bundler" ,bundler)))
1140 (synopsis "Generic connection pool for Ruby")
1141 (description "Connection_pool provides a generic connection pooling
1142 interface for Ruby programs.")
1143 (home-page "https://github.com/mperham/connection_pool")
1144 (license license:expat)))
1145
1146 (define-public ruby-net-http-persistent
1147 (package
1148 (name "ruby-net-http-persistent")
1149 (version "3.0.0")
1150 (source (origin
1151 (method url-fetch)
1152 (uri (rubygems-uri "net-http-persistent" version))
1153 (sha256
1154 (base32
1155 "156rv95bgxfz6qw5y1r7c7bswr77918hygl8dyl14qzbqc5vyp18"))))
1156 (build-system ruby-build-system)
1157 (native-inputs
1158 `(("ruby-connection-pool" ,ruby-connection-pool)
1159 ("ruby-hoe" ,ruby-hoe)))
1160 (synopsis "Persistent HTTP connection manager")
1161 (description "Net::HTTP::Persistent manages persistent HTTP connections
1162 using Net::HTTP, supporting reconnection and retry according to RFC 2616.")
1163 (home-page "https://github.com/drbrain/net-http-persistent")
1164 (license license:expat)))
1165
1166 (define-public ruby-power-assert
1167 (package
1168 (name "ruby-power-assert")
1169 (version "0.2.7")
1170 (source (origin
1171 (method url-fetch)
1172 (uri (rubygems-uri "power_assert" version))
1173 (sha256
1174 (base32
1175 "0ka6w71lcan4wgf111xi3pcn9ma9lhakv31jg8w007nwzi0xfjbi"))))
1176 (build-system ruby-build-system)
1177 (native-inputs
1178 `(("bundler" ,bundler)))
1179 (synopsis "Assert library with descriptive assertion messages")
1180 (description "Power-assert is an assertion library providing descriptive
1181 assertion messages for tests.")
1182 (home-page "https://github.com/k-tsj/power_assert")
1183 (license (list license:bsd-2 license:ruby))))
1184
1185 (define-public ruby-locale
1186 (package
1187 (name "ruby-locale")
1188 (version "2.1.2")
1189 (source (origin
1190 (method url-fetch)
1191 (uri (rubygems-uri "locale" version))
1192 (sha256
1193 (base32
1194 "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"))))
1195 (build-system ruby-build-system)
1196 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
1197 ;; which needs ruby-gettext, which needs ruby-locale. To break the
1198 ;; dependency cycle we disable tests.
1199 (arguments `(#:tests? #f))
1200 (native-inputs
1201 `(("bundler" ,bundler)
1202 ("ruby-yard" ,ruby-yard)))
1203 (synopsis "Ruby library providing basic localization APIs")
1204 (description
1205 "Ruby-Locale is the pure ruby library which provides basic APIs for
1206 localization.")
1207 (home-page "https://github.com/ruby-gettext/locale")
1208 (license (list license:lgpl3+ license:ruby))))
1209
1210 (define-public ruby-text
1211 (package
1212 (name "ruby-text")
1213 (version "1.3.1")
1214 (source (origin
1215 (method url-fetch)
1216 (uri (rubygems-uri "text" version))
1217 (sha256
1218 (base32
1219 "1x6kkmsr49y3rnrin91rv8mpc3dhrf3ql08kbccw8yffq61brfrg"))))
1220 (build-system ruby-build-system)
1221 (synopsis "Collection of text algorithms for Ruby")
1222 (description
1223 "This package provides a collection of text algorithms: Levenshtein,
1224 Soundex, Metaphone, Double Metaphone, Porter Stemming.")
1225 (home-page "https://github.com/threedaymonk/text")
1226 (license license:expat)))
1227
1228 (define-public ruby-gettext
1229 (package
1230 (name "ruby-gettext")
1231 (version "3.1.7")
1232 (source (origin
1233 (method url-fetch)
1234 (uri (rubygems-uri "gettext" version))
1235 (sha256
1236 (base32
1237 "1hg9islkm324mb4sd4za1fgafj1hqnm3bdvzj3k4fqpnzqnbcfiq"))))
1238 (build-system ruby-build-system)
1239 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga,
1240 ;; which needs ruby-gettext. To break the dependency cycle we disable
1241 ;; tests.
1242 (arguments `(#:tests? #f))
1243 (propagated-inputs
1244 `(("ruby-locale" ,ruby-locale)
1245 ("ruby-text" ,ruby-text)))
1246 (native-inputs
1247 `(("bundler" ,bundler)
1248 ("ruby-yard" ,ruby-yard)))
1249 (synopsis "GNU gettext-like program for Ruby")
1250 (description
1251 "Gettext is a GNU gettext-like program for Ruby. The catalog
1252 file (po-file) used is the same as that used by GNU gettext, allowing you to
1253 use GNU gettext tools for maintenance.")
1254 (home-page "http://ruby-gettext.github.com/")
1255 (license (list license:lgpl3+ license:ruby))))
1256
1257 (define-public ruby-packnga
1258 (package
1259 (name "ruby-packnga")
1260 (version "1.0.4")
1261 (source (origin
1262 (method url-fetch)
1263 (uri (rubygems-uri "packnga" version))
1264 (sha256
1265 (base32
1266 "1vv2j0i43s4xid2km5hgrrxqlqpwgq8nlm8kaxfg2531c1vwfsd4"))))
1267 (build-system ruby-build-system)
1268 ;; ruby-test-unit is required to run tests, but that needs ruby-packnga.
1269 ;; To break the dependency cycle we disable tests.
1270 (arguments `(#:tests? #f))
1271 (propagated-inputs
1272 `(("ruby-gettext" ,ruby-gettext)
1273 ("ruby-yard" ,ruby-yard)))
1274 (native-inputs
1275 `(("bundler" ,bundler)))
1276 (synopsis "Utility library to package internationalized libraries")
1277 (description
1278 "Packnga is a library to translate to many languages using YARD.")
1279 (home-page "http://ranguba.org/packnga/")
1280 (license license:lgpl2.0+)))
1281
1282 (define-public ruby-test-unit
1283 (package
1284 (name "ruby-test-unit")
1285 (version "3.2.5")
1286 (source (origin
1287 (method url-fetch)
1288 (uri (rubygems-uri "test-unit" version))
1289 (sha256
1290 (base32
1291 "05bx36fw01iqz0xqhvjfrwjgnj1zx3b2vn6w1fzp19rchd7zqc52"))))
1292 (build-system ruby-build-system)
1293 (propagated-inputs
1294 `(("ruby-power-assert" ,ruby-power-assert)))
1295 (native-inputs
1296 `(("bundler" ,bundler)
1297 ("ruby-packnga" ,ruby-packnga)
1298 ("ruby-yard" ,ruby-yard)))
1299 (synopsis "Unit testing framework for Ruby")
1300 (description "@code{Test::Unit} is unit testing framework for Ruby, based
1301 on xUnit principles. These were originally designed by Kent Beck, creator of
1302 extreme programming software development methodology, for Smalltalk's SUnit.
1303 It allows writing tests, checking results and automated testing in Ruby.")
1304 (home-page "http://test-unit.github.io/")
1305 (license (list license:psfl license:ruby))))
1306
1307 (define-public ruby-metaclass
1308 (package
1309 (name "ruby-metaclass")
1310 (version "0.0.4")
1311 (source (origin
1312 (method url-fetch)
1313 (uri (rubygems-uri "metaclass" version))
1314 (sha256
1315 (base32
1316 "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"))))
1317 (build-system ruby-build-system)
1318 (arguments
1319 `(#:phases
1320 (modify-phases %standard-phases
1321 (add-after 'unpack 'add-test-unit-to-search-path
1322 (lambda* (#:key inputs #:allow-other-keys)
1323 (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
1324 (test-unit-home (gem-home test-unit
1325 ,(package-version ruby))))
1326 (substitute* "Rakefile"
1327 (("t\\.libs << \"test\"" line)
1328 (string-append line "; t.libs << \""
1329 test-unit-home
1330 "/gems/test-unit-"
1331 ,(package-version ruby-test-unit)
1332 "/lib\""))))
1333 #t)))))
1334 (native-inputs
1335 `(("bundler" ,bundler)
1336 ("ruby-test-unit" ,ruby-test-unit)))
1337 (synopsis "Ruby library adding metaclass method to all objects")
1338 (description
1339 "Metaclass is a Ruby library adding a @code{metaclass} method to all Ruby
1340 objects.")
1341 (home-page "https://github.com/floehopper/metaclass")
1342 (license license:expat)))
1343
1344 (define-public ruby-blankslate
1345 (package
1346 (name "ruby-blankslate")
1347 (version "3.1.3")
1348 (source (origin
1349 (method url-fetch)
1350 (uri (rubygems-uri "blankslate" version))
1351 (sha256
1352 (base32
1353 "0fwkb4d1j9gc7vdwn2nxvwgy2g5wlag4c4bp7bl85jvq0kgp6cyx"))))
1354 (build-system ruby-build-system)
1355 (arguments
1356 `(#:phases
1357 (modify-phases %standard-phases
1358 (replace 'check
1359 (lambda _ (zero? (system* "rspec" "spec/")))))))
1360 (native-inputs
1361 `(("bundler" ,bundler)
1362 ("ruby-rspec" ,ruby-rspec)))
1363 (synopsis "Abstract base class with no predefined methods")
1364 (description
1365 "BlankSlate provides an abstract base class with no predefined
1366 methods (except for @code{__send__} and @code{__id__}). BlankSlate is useful
1367 as a base class when writing classes that depend upon
1368 @code{method_missing} (e.g. dynamic proxies).")
1369 (home-page "https://github.com/masover/blankslate")
1370 (license license:expat)))
1371
1372 (define-public ruby-instantiator
1373 (package
1374 (name "ruby-instantiator")
1375 (version "0.0.6")
1376 (source (origin
1377 (method url-fetch)
1378 (uri (rubygems-uri "instantiator" version))
1379 (sha256
1380 (base32
1381 "0mfmqhg9xrv9i8i1kmphf15ywddhivyh2z3ccl0xjw8qy54zr21i"))))
1382 (build-system ruby-build-system)
1383 (arguments
1384 `(#:phases
1385 (modify-phases %standard-phases
1386 (add-after 'unpack 'add-test-unit-to-search-path
1387 (lambda* (#:key inputs #:allow-other-keys)
1388 (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
1389 (test-unit-home (gem-home test-unit ,(package-version
1390 ruby))))
1391 (substitute* "Rakefile"
1392 (("t\\.libs << \"test\"" line)
1393 (string-append line "; t.libs << \""
1394 test-unit-home
1395 "/gems/test-unit-"
1396 ,(package-version ruby-test-unit)
1397 "/lib\""))))
1398 #t)))))
1399 (propagated-inputs
1400 `(("ruby-blankslate" ,ruby-blankslate)))
1401 (native-inputs
1402 `(("bundler" ,bundler)
1403 ("ruby-test-unit" ,ruby-test-unit)))
1404 (synopsis "Instantiate an arbitrary Ruby class")
1405 (description
1406 "Instantiator lets you instantiate an arbitrary Ruby class without
1407 knowing anything about the constructor.")
1408 (home-page "https://github.com/floehopper/instantiator")
1409 (license license:expat)))
1410
1411 (define-public ruby-introspection
1412 (package
1413 (name "ruby-introspection")
1414 (version "0.0.4")
1415 (source (origin
1416 (method url-fetch)
1417 (uri (rubygems-uri "introspection" version))
1418 (sha256
1419 (base32
1420 "1y2nbijkc0zlfmn9ss6588ilarq2kbn2i7w7pwwsli66dj84zgca"))))
1421 (build-system ruby-build-system)
1422 (arguments
1423 `(#:phases
1424 (modify-phases %standard-phases
1425 (add-after 'unpack 'add-test-unit-to-search-path
1426 (lambda* (#:key inputs #:allow-other-keys)
1427 (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
1428 (test-unit-home (gem-home test-unit ,(package-version
1429 ruby))))
1430 (substitute* "Rakefile"
1431 (("t\\.libs << \"test\"" line)
1432 (string-append line "; t.libs << \""
1433 test-unit-home
1434 "/gems/test-unit-"
1435 ,(package-version ruby-test-unit)
1436 "/lib\""))))
1437 #t)))))
1438 (propagated-inputs
1439 `(("ruby-instantiator" ,ruby-instantiator)
1440 ("ruby-metaclass" ,ruby-metaclass)))
1441 (native-inputs
1442 `(("bundler" ,bundler)
1443 ("ruby-blankslate" ,ruby-blankslate)
1444 ("ruby-test-unit" ,ruby-test-unit)))
1445 (synopsis "Dynamic inspection of the method hierarchy on a Ruby object")
1446 (description
1447 "Introspection provides tools to inspect the hierarchy of method
1448 definitions on a Ruby object.")
1449 (home-page "https://github.com/floehopper/introspection")
1450 (license license:expat)))
1451
1452 (define-public ruby-redcarpet
1453 (package
1454 (name "ruby-redcarpet")
1455 (version "3.4.0")
1456 (source (origin
1457 (method url-fetch)
1458 (uri (rubygems-uri "redcarpet" version))
1459 (sha256
1460 (base32
1461 "0h9qz2hik4s9knpmbwrzb3jcp3vc5vygp9ya8lcpl7f1l9khmcd7"))))
1462 (build-system ruby-build-system)
1463 (arguments
1464 `(#:phases
1465 (modify-phases %standard-phases
1466 ;; The gem archive does not include the conformance tests.
1467 (add-after 'unpack 'disable-conformance-tests
1468 (lambda _
1469 (substitute* "Rakefile"
1470 (("task :test => %w\\[test:unit test:conformance\\]")
1471 "task :test => %w[test:unit]"))
1472 #t)))))
1473 (native-inputs
1474 `(("bundler" ,bundler)
1475 ("ruby-test-unit" ,ruby-test-unit)
1476 ("ruby-rake-compiler" ,ruby-rake-compiler)))
1477 (synopsis "Extensible Markdown to (X)HTML converter")
1478 (description
1479 "Redcarpet is an extensible Ruby library for Markdown processing and
1480 conversion to (X)HTML.")
1481 (home-page "https://github.com/vmg/redcarpet")
1482 (license license:expat)))
1483
1484 (define-public ruby-mocha
1485 (package
1486 (name "ruby-mocha")
1487 (version "1.1.0")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (rubygems-uri "mocha" version))
1491 (sha256
1492 (base32
1493 "107nmnngbv8lq2g7hbjpn5kplb4v2c8gs9lxrg6vs8gdbddkilzi"))))
1494 (build-system ruby-build-system)
1495 (arguments
1496 `(#:phases
1497 (modify-phases %standard-phases
1498 (add-after 'unpack 'add-test-unit-to-search-path
1499 (lambda* (#:key inputs #:allow-other-keys)
1500 (let* ((test-unit (assoc-ref inputs "ruby-test-unit"))
1501 (test-unit-home (gem-home test-unit
1502 ,(package-version ruby))))
1503 (substitute* "Rakefile"
1504 (("t\\.libs << 'test'" line)
1505 (string-append line "; t.libs << \""
1506 test-unit-home
1507 "/gems/test-unit-"
1508 ,(package-version ruby-test-unit)
1509 "/lib\""))))
1510 #t))
1511 (add-before 'check 'use-latest-redcarpet
1512 (lambda _
1513 (substitute* "mocha.gemspec"
1514 (("<redcarpet>.freeze, \\[\"~> 1\"\\]")
1515 "<redcarpet>.freeze, [\">= 3\"]"))
1516 #t))
1517 (add-before 'check 'hardcode-version
1518 (lambda _
1519 ;; Mocha is undefined at build time
1520 (substitute* "Rakefile"
1521 (("#\\{Mocha::VERSION\\}") ,version))
1522 #t))
1523 (add-before 'check 'remove-failing-test
1524 ;; FIXME: This test fails for reasons unrelated to Guix packaging.
1525 (lambda _
1526 (delete-file "test/acceptance/stubbing_nil_test.rb")
1527 #t)))))
1528 (propagated-inputs
1529 `(("ruby-metaclass" ,ruby-metaclass)))
1530 (native-inputs
1531 `(("bundler" ,bundler)
1532 ("ruby-yard" ,ruby-yard)
1533 ("ruby-introspection" ,ruby-introspection)
1534 ("ruby-test-unit" ,ruby-test-unit)
1535 ("ruby-redcarpet" ,ruby-redcarpet)))
1536 (synopsis "Mocking and stubbing library for Ruby")
1537 (description
1538 "Mocha is a mocking and stubbing library with JMock/SchMock syntax, which
1539 allows mocking and stubbing of methods on real (non-mock) classes.")
1540 (home-page "http://gofreerange.com/mocha/docs")
1541 (license license:expat)))
1542
1543 (define-public ruby-net-ssh
1544 (package
1545 (name "ruby-net-ssh")
1546 (version "4.1.0")
1547 (source (origin
1548 (method url-fetch)
1549 (uri (rubygems-uri "net-ssh" version))
1550 (sha256
1551 (base32
1552 "013p5jb4wy0cq7x7036piw2a3s1i9p752ki1srx2m289mpz4ml3q"))))
1553 (build-system ruby-build-system)
1554 (native-inputs
1555 `(("bundler" ,bundler)
1556 ("ruby-mocha" ,ruby-mocha)
1557 ("ruby-test-unit" ,ruby-test-unit)))
1558 (synopsis "Ruby implementation of the SSH2 client protocol")
1559 (description "@code{Net::SSH} is a pure-Ruby implementation of the SSH2
1560 client protocol. It allows you to write programs that invoke and interact
1561 with processes on remote servers, via SSH2.")
1562 (home-page "https://github.com/net-ssh/net-ssh")
1563 (license license:expat)))
1564
1565 (define-public ruby-minitest
1566 (package
1567 (name "ruby-minitest")
1568 (version "5.10.3")
1569 (source (origin
1570 (method url-fetch)
1571 (uri (rubygems-uri "minitest" version))
1572 (sha256
1573 (base32
1574 "05521clw19lrksqgvg2kmm025pvdhdaniix52vmbychrn2jm7kz2"))))
1575 (build-system ruby-build-system)
1576 (native-inputs
1577 `(("ruby-hoe" ,ruby-hoe)))
1578 (synopsis "Small test suite library for Ruby")
1579 (description "Minitest provides a complete suite of Ruby testing
1580 facilities supporting TDD, BDD, mocking, and benchmarking.")
1581 (home-page "https://github.com/seattlerb/minitest")
1582 (license license:expat)))
1583
1584 ;; This is the last release of Minitest 4, which is used by some packages.
1585 (define-public ruby-minitest-4
1586 (package (inherit ruby-minitest)
1587 (version "4.7.5")
1588 (source (origin
1589 (method url-fetch)
1590 (uri (rubygems-uri "minitest" version))
1591 (sha256
1592 (base32
1593 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
1594 (arguments
1595 `(#:phases
1596 (modify-phases %standard-phases
1597 (add-after 'unpack 'remove-unsupported-method
1598 (lambda _
1599 (substitute* "Rakefile"
1600 (("self\\.rubyforge_name = .*") ""))
1601 #t))
1602 (add-after 'build 'exclude-failing-tests
1603 (lambda _
1604 ;; Some tests are failing on Ruby 2.4 due to the deprecation of
1605 ;; Fixnum.
1606 (delete-file "test/minitest/test_minitest_spec.rb")
1607 #t)))))))
1608
1609 (define-public ruby-minitest-sprint
1610 (package
1611 (name "ruby-minitest-sprint")
1612 (version "1.1.0")
1613 (source (origin
1614 (method url-fetch)
1615 (uri (rubygems-uri "minitest-sprint" version))
1616 (sha256
1617 (base32
1618 "179d6pj56l9xzm46fqsqj10mzjkr1f9fv4cxa8wvchs97hqz33w1"))))
1619 (build-system ruby-build-system)
1620 (native-inputs
1621 `(("ruby-hoe" ,ruby-hoe)
1622 ("ruby-minitest" ,ruby-minitest)))
1623 (synopsis "Fast test suite runner for minitest")
1624 (description "Minitest-sprint is a test runner for minitest that makes it
1625 easier to re-run individual failing tests.")
1626 (home-page "https://github.com/seattlerb/minitest-sprint")
1627 (license license:expat)))
1628
1629 (define-public ruby-minitest-bacon
1630 (package
1631 (name "ruby-minitest-bacon")
1632 (version "1.0.3")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (rubygems-uri "minitest-bacon" version))
1636 (sha256
1637 (base32
1638 "0zhdwcl6bgha61qiyfvr7zs7ywaxc33wmj9xhxl8jdmpdvifvfaj"))))
1639 (build-system ruby-build-system)
1640 (native-inputs
1641 `(("ruby-hoe" ,ruby-hoe)))
1642 (inputs
1643 `(("ruby-minitest" ,ruby-minitest)))
1644 (synopsis "Bacon compatibility library for minitest")
1645 (description "Minitest-bacon extends minitest with bacon-like
1646 functionality, making it easier to migrate test suites from bacon to minitest.")
1647 (home-page "https://github.com/seattlerb/minitest-bacon")
1648 (license license:expat)))
1649
1650 (define-public ruby-minitest-focus
1651 (package
1652 (name "ruby-minitest-focus")
1653 (version "1.1.2")
1654 (source
1655 (origin
1656 (method url-fetch)
1657 (uri (rubygems-uri "minitest-focus" version))
1658 (sha256
1659 (base32
1660 "1zgjslp6d7dzcn8smj595idymgd5j603p9g2jqkfgi28sqbhz6m0"))))
1661 (build-system ruby-build-system)
1662 (propagated-inputs
1663 `(("ruby-minitest" ,ruby-minitest)))
1664 (native-inputs
1665 `(("ruby-hoe" ,ruby-hoe)))
1666 (synopsis "Allows a few specific tests to be focused on")
1667 (description
1668 "@code{minitest-focus} gives the ability focus on a few tests with ease
1669 without having to use command-line arguments. It introduces a @code{focus}
1670 class method for use in testing classes, specifying that the next defined test
1671 is to be run.")
1672 (home-page "https://github.com/seattlerb/minitest-focus")
1673 (license license:expat)))
1674
1675 (define-public ruby-minitest-pretty-diff
1676 ;; Use git reference because gem is out of date and does not contain testing
1677 ;; script. There are no releases on GitHub.
1678 (let ((commit "11f32e930f574225432f42e5e1ef6e7471efe572"))
1679 (package
1680 (name "ruby-minitest-pretty-diff")
1681 (version (string-append "0.1-1." (string-take commit 8)))
1682 (source (origin
1683 (method git-fetch)
1684 (uri (git-reference
1685 (url "https://github.com/adammck/minitest-pretty_diff.git")
1686 (commit commit)))
1687 (file-name (string-append name "-" version "-checkout"))
1688 (sha256
1689 (base32
1690 "13y5dhmcckhzd83gj1nfwh41iykbjcm2w7y4pr6j6rpqa5as122r"))))
1691 (build-system ruby-build-system)
1692 (arguments
1693 `(#:phases
1694 (modify-phases %standard-phases
1695 (replace 'check
1696 (lambda _
1697 (zero? (system* "script/test")))))))
1698 (native-inputs
1699 `(("bundler" ,bundler)
1700 ("ruby-turn" ,ruby-turn)))
1701 (synopsis "Pretty-print hashes and arrays in MiniTest")
1702 (description
1703 "@code{minitest-pretty_diff} monkey-patches
1704 @code{MiniTest::Assertions#mu_pp} to pretty-print hashes and arrays before
1705 diffing them. This makes it easier to spot differences between nested
1706 structures when tests fail.")
1707 (home-page "https://github.com/adammck/minitest-pretty_diff")
1708 (license license:expat))))
1709
1710 (define-public ruby-minitest-moar
1711 (package
1712 (name "ruby-minitest-moar")
1713 (version "0.0.4")
1714 (source
1715 (origin
1716 (method url-fetch)
1717 (uri (rubygems-uri "minitest-moar" version))
1718 (sha256
1719 (base32
1720 "0nb83blrsab92gcy6nfpw39njys7zisia8pw4igzzfzfl51cis0x"))))
1721 (build-system ruby-build-system)
1722 (arguments
1723 `(#:phases
1724 (modify-phases %standard-phases
1725 (add-before 'check 'clean-dependencies
1726 (lambda _
1727 ;; Remove all gems defined in the Gemfile because these are not
1728 ;; truly needed.
1729 (substitute* "Gemfile"
1730 (("gem .*") ""))
1731 ;; Remove byebug as not needed to run tests.
1732 (substitute* "test/test_helper.rb"
1733 (("require 'byebug'") ""))
1734 #t)))))
1735 (native-inputs
1736 `(("bundler" ,bundler)
1737 ("ruby-minitest" ,ruby-minitest)))
1738 (synopsis "Extra features and changes to MiniTest")
1739 (description "@code{MiniTest Moar} add some additional features and
1740 changes some default behaviours in MiniTest. For instance, Moar replaces the
1741 MiniTest @code{Object#stub} with a global @code{stub} method.")
1742 (home-page "https://github.com/dockyard/minitest-moar")
1743 (license license:expat)))
1744
1745 (define-public ruby-minitest-bonus-assertions
1746 (package
1747 (name "ruby-minitest-bonus-assertions")
1748 (version "3.0")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (rubygems-uri "minitest-bonus-assertions" version))
1753 (sha256
1754 (base32
1755 "1hbq9jk904xkz868yha1bqcm6azm7kmjsll2k4pn2nrcib508h2a"))))
1756 (build-system ruby-build-system)
1757 (arguments
1758 `(#:phases
1759 (modify-phases %standard-phases
1760 (add-before 'check 'clean-dependencies
1761 (lambda _
1762 ;; Remove unneeded require statement that would entail another
1763 ;; dependency.
1764 (substitute* "test/minitest_config.rb"
1765 (("require 'minitest/bisect'") ""))
1766 #t)))))
1767 (native-inputs
1768 `(("ruby-hoe" ,ruby-hoe)
1769 ("ruby-minitest-pretty-diff" ,ruby-minitest-pretty-diff)
1770 ("ruby-minitest-focus" ,ruby-minitest-focus)
1771 ("ruby-minitest-moar" ,ruby-minitest-moar)))
1772 (synopsis "Bonus assertions for @code{Minitest}")
1773 (description
1774 "Minitest bonus assertions provides extra MiniTest assertions. For
1775 instance, it provides @code{assert_true}, @code{assert_false} and
1776 @code{assert_set_equal}.")
1777 (home-page "https://github.com/halostatue/minitest-bonus-assertions")
1778 (license license:expat)))
1779
1780 (define-public ruby-minitest-rg
1781 (package
1782 (name "ruby-minitest-rg")
1783 (version "5.2.0")
1784 (source
1785 (origin
1786 (method url-fetch)
1787 (uri (rubygems-uri "minitest-rg" version))
1788 (sha256
1789 (base32
1790 "0sq509ax1x62rd0w10b0hcydcxyk5bxxr3fwrgxv02r8drq2r354"))))
1791 (build-system ruby-build-system)
1792 (arguments
1793 ;; Some tests fail even outside Guix, so disable tests.
1794 ;; https://github.com/blowmage/minitest-rg/issues/12
1795 ;; https://github.com/blowmage/minitest-rg/pull/13
1796 `(#:tests? #f))
1797 (propagated-inputs
1798 `(("ruby-minitest" ,ruby-minitest)))
1799 (synopsis "Coloured output for Minitest")
1800 (description
1801 "@code{minitest-rg} changes the colour of the output from Minitest.")
1802 (home-page "http://blowmage.com/minitest-rg")
1803 (license license:expat)))
1804
1805 (define-public ruby-minitest-hooks
1806 (package
1807 (name "ruby-minitest-hooks")
1808 (version "1.4.1")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (rubygems-uri "minitest-hooks" version))
1813 (sha256
1814 (base32
1815 "05bngfyxwq1cflk568nhddgfrmws5ff6kiqax4skklsjnh71ykbi"))))
1816 (build-system ruby-build-system)
1817 (arguments
1818 '(#:test-target "spec"))
1819 (native-inputs
1820 `(("ruby-sequel" ,ruby-sequel)
1821 ("ruby-sqlite3" ,ruby-sqlite3)))
1822 (synopsis "Hooks for the minitest framework")
1823 (description
1824 "Minitest-hooks adds @code{around}, @code{before_all}, @code{after_all},
1825 @code{around_all} hooks for Minitest. This allows, for instance, running each
1826 suite of specs inside a database transaction, running each spec inside its own
1827 savepoint inside that transaction. This can significantly speed up testing
1828 for specs that share expensive database setup code.")
1829 (home-page "https://github.com/jeremyevans/minitest-hooks")
1830 (license license:expat)))
1831
1832 (define-public ruby-daemons
1833 (package
1834 (name "ruby-daemons")
1835 (version "1.2.4")
1836 (source (origin
1837 (method url-fetch)
1838 (uri (rubygems-uri "daemons" version))
1839 (sha256
1840 (base32
1841 "1bmb4qrd95b5gl3ym5j3q6mf090209f4vkczggn49n56w6s6zldz"))))
1842 (build-system ruby-build-system)
1843 (arguments
1844 `(#:tests? #f)) ; no test suite
1845 (synopsis "Daemonize Ruby programs")
1846 (description "Daemons provides a way to wrap existing Ruby scripts to be
1847 run as a daemon and to be controlled by simple start/stop/restart commands.")
1848 (home-page "https://github.com/thuehlinger/daemons")
1849 (license license:expat)))
1850
1851 (define-public ruby-git
1852 (package
1853 (name "ruby-git")
1854 (version "1.3.0")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (rubygems-uri "git" version))
1858 (sha256
1859 (base32
1860 "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3"))))
1861 (build-system ruby-build-system)
1862 (arguments
1863 `(#:tests? #f ; no tests
1864 #:phases (modify-phases %standard-phases
1865 (add-after 'install 'patch-git-binary
1866 (lambda* (#:key inputs outputs #:allow-other-keys)
1867 ;; Make the default git binary an absolute path to the
1868 ;; store.
1869 (let ((git (string-append (assoc-ref inputs "git")
1870 "/bin/git"))
1871 (config (string-append (getenv "GEM_HOME")
1872 "/gems/git-" ,version
1873 "/lib/git/config.rb")))
1874 (substitute* (list config)
1875 (("'git'")
1876 (string-append "'" git "'")))
1877 #t))))))
1878 (inputs
1879 `(("git" ,git)))
1880 (synopsis "Ruby wrappers for Git")
1881 (description "Ruby/Git is a Ruby library that can be used to create, read
1882 and manipulate Git repositories by wrapping system calls to the git binary.")
1883 (home-page "https://github.com/schacon/ruby-git")
1884 (license license:expat)))
1885
1886 (define-public ruby-slop
1887 (package
1888 (name "ruby-slop")
1889 (version "4.5.0")
1890 (source (origin
1891 (method url-fetch)
1892 (uri (rubygems-uri "slop" version))
1893 (sha256
1894 (base32
1895 "0bfm8535g0rkn9cbjndkckf0f7a3wj0rg4rqhrpsgxnbfdf2lm0p"))))
1896 (build-system ruby-build-system)
1897 (native-inputs
1898 `(("ruby-minitest" ,ruby-minitest)))
1899 (synopsis "Ruby command line option parser")
1900 (description "Slop provides a Ruby domain specific language for gathering
1901 options and parsing command line flags.")
1902 (home-page "https://github.com/leejarvis/slop")
1903 (license license:expat)))
1904
1905 (define-public ruby-slop-3
1906 (package (inherit ruby-slop)
1907 (version "3.6.0")
1908 (source (origin
1909 (method url-fetch)
1910 (uri (rubygems-uri "slop" version))
1911 (sha256
1912 (base32
1913 "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n"))))))
1914
1915 (define-public ruby-multipart-post
1916 (package
1917 (name "ruby-multipart-post")
1918 (version "2.0.0")
1919 (source (origin
1920 (method url-fetch)
1921 (uri (rubygems-uri "multipart-post" version))
1922 (sha256
1923 (base32
1924 "09k0b3cybqilk1gwrwwain95rdypixb2q9w65gd44gfzsd84xi1x"))))
1925 (build-system ruby-build-system)
1926 (native-inputs
1927 `(("bundler" ,bundler)))
1928 (synopsis "Multipart POST library for Ruby")
1929 (description "Multipart-Post Adds multipart POST capability to Ruby's
1930 net/http library.")
1931 (home-page "https://github.com/nicksieger/multipart-post")
1932 (license license:expat)))
1933
1934 (define-public ruby-multi-json
1935 (package
1936 (name "ruby-multi-json")
1937 (version "1.12.2")
1938 (source
1939 (origin
1940 (method url-fetch)
1941 (uri (rubygems-uri "multi_json" version))
1942 (sha256
1943 (base32
1944 "1raim9ddjh672m32psaa9niw67ywzjbxbdb8iijx3wv9k5b0pk2x"))))
1945 (build-system ruby-build-system)
1946 (arguments
1947 '(#:tests? #f)) ;; No testsuite included in the gem.
1948 (synopsis "Common interface to multiple JSON libraries for Ruby")
1949 (description
1950 "This package provides a common interface to multiple JSON libraries,
1951 including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
1952 NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
1953 (home-page "http://github.com/intridea/multi_json")
1954 (license license:expat)))
1955
1956 (define-public ruby-arel
1957 (package
1958 (name "ruby-arel")
1959 (version "8.0.0")
1960 (source (origin
1961 (method url-fetch)
1962 (uri (rubygems-uri "arel" version))
1963 (sha256
1964 (base32
1965 "0nw0qbc6ph625p6n3maqq9f527vz3nbl0hk72fbyka8jzsmplxzl"))))
1966 (build-system ruby-build-system)
1967 (arguments '(#:tests? #f)) ; no tests
1968 (home-page "https://github.com/rails/arel")
1969 (synopsis "SQL AST manager for Ruby")
1970 (description "Arel is an SQL @dfn{Abstract Syntax Tree} (AST) manager for
1971 Ruby. It simplifies the generation of complex SQL queries and adapts to
1972 various relational database implementations.")
1973 (license license:expat)))
1974
1975 (define-public ruby-minitar
1976 ;; We package from the GitHub source to fix the security issue reported at
1977 ;; https://github.com/halostatue/minitar/issues/16.
1978 (let ((commit "e25205ecbb6277ae8a3df1e6a306d7ed4458b6e4"))
1979 (package
1980 (name "ruby-minitar")
1981 (version (string-append "0.5.4-1." (string-take commit 8)))
1982 (source
1983 (origin
1984 (method git-fetch)
1985 (uri (git-reference
1986 (url "https://github.com/halostatue/minitar.git")
1987 (commit commit)))
1988 (file-name (string-append name "-" version "-checkout"))
1989 (sha256
1990 (base32
1991 "1iywfx07jgjqcmixzkxk9zdwfmij1fyg1z2jlwzj15cj7s99qlfv"))))
1992 (build-system ruby-build-system)
1993 (arguments
1994 '(#:tests? #f)) ; missing a gemspec
1995 (synopsis "Ruby library and utility for handling tar archives")
1996 (description
1997 "Archive::Tar::Minitar is a pure-Ruby library and command-line utility
1998 that provides the ability to deal with POSIX tar archive files.")
1999 (home-page "http://www.github.com/atoulme/minitar")
2000 (license (list license:gpl2+ license:ruby)))))
2001
2002 (define-public ruby-mini-portile
2003 (package
2004 (name "ruby-mini-portile")
2005 (version "0.6.2")
2006 (source
2007 (origin
2008 (method url-fetch)
2009 (uri (rubygems-uri "mini_portile" version))
2010 (sha256
2011 (base32
2012 "0h3xinmacscrnkczq44s6pnhrp4nqma7k056x5wv5xixvf2wsq2w"))))
2013 (build-system ruby-build-system)
2014 (arguments
2015 '(#:tests? #f)) ; tests require network access
2016 (synopsis "Ports system for Ruby developers")
2017 (description "Mini-portile is a port/recipe system for Ruby developers.
2018 It provides a standard way to compile against specific versions of libraries
2019 to reproduce user environments.")
2020 (home-page "https://github.com/flavorjones/mini_portile")
2021 (license license:expat)))
2022
2023 (define-public ruby-mini-portile-2
2024 (package (inherit ruby-mini-portile)
2025 (version "2.2.0")
2026 (source (origin
2027 (method url-fetch)
2028 (uri (rubygems-uri "mini_portile2" version))
2029 (sha256
2030 (base32
2031 "0g5bpgy08q0nc0anisg3yvwc1gc3inl854fcrg48wvg7glqd6dpm"))))))
2032
2033 (define-public ruby-nokogiri
2034 (package
2035 (name "ruby-nokogiri")
2036 (version "1.8.0")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (rubygems-uri "nokogiri" version))
2040 (sha256
2041 (base32
2042 "1nffsyx1xjg6v5n9rrbi8y1arrcx2i5f21cp6clgh9iwiqkr7rnn"))))
2043 (build-system ruby-build-system)
2044 (arguments
2045 ;; Tests fail because Nokogiri can only test with an installed extension,
2046 ;; and also because many test framework dependencies are missing.
2047 `(#:tests? #f
2048 #:gem-flags (list "--" "--use-system-libraries"
2049 (string-append "--with-xml2-include="
2050 (assoc-ref %build-inputs "libxml2")
2051 "/include/libxml2" ))
2052 #:phases
2053 (modify-phases %standard-phases
2054 (add-before 'build 'patch-extconf
2055 ;; 'pkg-config' is not included in the GEM_PATH during
2056 ;; installation, so we add it directly to the load path.
2057 (lambda* (#:key inputs #:allow-other-keys)
2058 (let* ((pkg-config (assoc-ref inputs "ruby-pkg-config"))
2059 (pkg-config-home (gem-home pkg-config
2060 ,(package-version ruby))))
2061 (substitute* "ext/nokogiri/extconf.rb"
2062 (("gem 'pkg-config'.*")
2063 (string-append "$:.unshift '"
2064 pkg-config-home
2065 "/gems/pkg-config-"
2066 ,(package-version ruby-pkg-config)
2067 "/lib'\n"))))
2068 #t)))))
2069 (native-inputs
2070 `(("ruby-hoe" ,ruby-hoe)))
2071 (inputs
2072 `(("zlib" ,zlib)
2073 ("libxml2" ,libxml2)
2074 ("libxslt" ,libxslt)))
2075 (propagated-inputs
2076 `(("ruby-mini-portile" ,ruby-mini-portile-2)
2077 ("ruby-pkg-config" ,ruby-pkg-config)))
2078 (synopsis "HTML, XML, SAX, and Reader parser for Ruby")
2079 (description "Nokogiri (鋸) parses and searches XML/HTML, and features
2080 both CSS3 selector and XPath 1.0 support.")
2081 (home-page "http://www.nokogiri.org/")
2082 (license license:expat)))
2083
2084 (define-public ruby-method-source
2085 (package
2086 (name "ruby-method-source")
2087 (version "0.9.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (rubygems-uri "method_source" version))
2092 (sha256
2093 (base32
2094 "0xqj21j3vfq4ldia6i2akhn2qd84m0iqcnsl49kfpq3xk6x0dzgn"))))
2095 (build-system ruby-build-system)
2096 (arguments
2097 `(#:test-target "spec"))
2098 (native-inputs
2099 `(("ruby-rspec" ,ruby-rspec)
2100 ("git" ,git)))
2101 (synopsis "Retrieve the source code for Ruby methods")
2102 (description "Method_source retrieves the source code for Ruby methods.
2103 Additionally, it can extract source code from Proc and Lambda objects or just
2104 extract comments.")
2105 (home-page "https://github.com/banister/method_source")
2106 (license license:expat)))
2107
2108 (define-public ruby-coderay
2109 (package
2110 (name "ruby-coderay")
2111 (version "1.1.2")
2112 (source
2113 (origin
2114 (method url-fetch)
2115 (uri (rubygems-uri "coderay" version))
2116 (sha256
2117 (base32
2118 "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"))))
2119 (build-system ruby-build-system)
2120 (arguments
2121 '(#:tests? #f)) ; missing test files
2122 (synopsis "Ruby syntax highlighting library")
2123 (description "Coderay is a Ruby library that provides syntax highlighting
2124 for select languages.")
2125 (home-page "http://coderay.rubychan.de")
2126 (license license:expat)))
2127
2128 (define-public ruby-progress_bar
2129 (package
2130 (name "ruby-progress_bar")
2131 (version "1.1.0")
2132 (source
2133 (origin
2134 (method url-fetch)
2135 (uri (rubygems-uri "progress_bar" version))
2136 (sha256
2137 (base32
2138 "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
2139 (build-system ruby-build-system)
2140 (arguments
2141 '(#:test-target "spec"))
2142 (propagated-inputs
2143 `(("ruby-highline" ,ruby-highline)
2144 ("ruby-options" ,ruby-options)))
2145 (native-inputs
2146 `(("bundler" ,bundler)
2147 ("ruby-rspec" ,ruby-rspec)
2148 ("ruby-timecop" ,ruby-timecop)))
2149 (synopsis
2150 "Ruby library for displaying progress bars")
2151 (description
2152 "ProgressBar is a simple library for displaying progress bars. The
2153 maximum value is configurable, and additional information can be displayed
2154 like the percentage completion, estimated time remaining, elapsed time and
2155 rate.")
2156 (home-page "https://github.com/paul/progress_bar")
2157 (license license:wtfpl2)))
2158
2159 (define-public ruby-pry
2160 (package
2161 (name "ruby-pry")
2162 (version "0.11.1")
2163 (source
2164 (origin
2165 (method url-fetch)
2166 (uri (rubygems-uri "pry" version))
2167 (sha256
2168 (base32
2169 "0ci461a55sn50rlrmcl97ycf79681glp443a2gzp23rnm7y70fkj"))))
2170 (build-system ruby-build-system)
2171 (arguments
2172 '(#:tests? #f)) ; no tests
2173 (propagated-inputs
2174 `(("ruby-coderay" ,ruby-coderay)
2175 ("ruby-method-source" ,ruby-method-source)))
2176 (synopsis "Ruby REPL")
2177 (description "Pry is an IRB alternative and runtime developer console for
2178 Ruby. It features syntax highlighting, a plugin architecture, runtime
2179 invocation, and source and documentation browsing.")
2180 (home-page "http://pryrepl.org")
2181 (license license:expat)))
2182
2183 (define-public ruby-guard
2184 (package
2185 (name "ruby-guard")
2186 (version "2.13.0")
2187 (source (origin
2188 (method url-fetch)
2189 ;; The gem does not include a Rakefile, nor does it contain a
2190 ;; gemspec file, nor does it come with the tests. This is why
2191 ;; we fetch the tarball from Github.
2192 (uri (string-append "https://github.com/guard/guard/archive/v"
2193 version ".tar.gz"))
2194 (file-name (string-append name "-" version ".tar.gz"))
2195 (sha256
2196 (base32
2197 "1hwj0yi17k6f5axrm0k2bb7fq71dlp0zfywmd7pij9iimbppcca0"))))
2198 (build-system ruby-build-system)
2199 (arguments
2200 `(#:tests? #f ; tests require cucumber
2201 #:phases
2202 (modify-phases %standard-phases
2203 (add-after 'unpack 'remove-git-ls-files
2204 (lambda* (#:key outputs #:allow-other-keys)
2205 (substitute* "guard.gemspec"
2206 (("git ls-files -z") "find . -type f -print0"))
2207 #t))
2208 (replace 'build
2209 (lambda _
2210 (zero? (system* "gem" "build" "guard.gemspec")))))))
2211 (propagated-inputs
2212 `(("ruby-formatador" ,ruby-formatador)
2213 ("ruby-listen" ,ruby-listen)
2214 ("ruby-lumberjack" ,ruby-lumberjack)
2215 ("ruby-nenv" ,ruby-nenv)
2216 ("ruby-notiffany" ,ruby-notiffany)
2217 ("ruby-pry" ,ruby-pry)
2218 ("ruby-shellany" ,ruby-shellany)
2219 ("ruby-thor" ,ruby-thor)))
2220 (native-inputs
2221 `(("bundler" ,bundler)
2222 ("ruby-rspec" ,ruby-rspec)))
2223 (synopsis "Tool to handle events on file system modifications")
2224 (description
2225 "Guard is a command line tool to easily handle events on file system
2226 modifications. Guard automates various tasks by running custom rules whenever
2227 file or directories are modified.")
2228 (home-page "http://guardgem.org/")
2229 (license license:expat)))
2230
2231 (define-public ruby-thread-safe
2232 (package
2233 (name "ruby-thread-safe")
2234 (version "0.3.6")
2235 (source
2236 (origin
2237 (method url-fetch)
2238 (uri (rubygems-uri "thread_safe" version))
2239 (sha256
2240 (base32
2241 "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"))))
2242 (build-system ruby-build-system)
2243 (arguments
2244 '(#:tests? #f)) ; needs simplecov, among others
2245 (synopsis "Thread-safe utilities for Ruby")
2246 (description "The thread_safe library provides thread-safe collections and
2247 utilities for Ruby.")
2248 (home-page "https://github.com/ruby-concurrency/thread_safe")
2249 (license license:asl2.0)))
2250
2251 (define-public ruby-tzinfo
2252 (package
2253 (name "ruby-tzinfo")
2254 (version "1.2.3")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri (rubygems-uri "tzinfo" version))
2259 (sha256
2260 (base32
2261 "05r81lk7q7275rdq7xipfm0yxgqyd2ggh73xpc98ypngcclqcscl"))))
2262 (build-system ruby-build-system)
2263 (propagated-inputs
2264 `(("ruby-thread-safe" ,ruby-thread-safe)))
2265 (synopsis "Time zone library for Ruby")
2266 (description "TZInfo is a Ruby library that provides daylight savings
2267 aware transformations between times in different time zones.")
2268 (home-page "http://tzinfo.github.io")
2269 (license license:expat)))
2270
2271 (define-public ruby-tzinfo-data
2272 (package
2273 (name "ruby-tzinfo-data")
2274 (version "1.2016.9")
2275 (source
2276 (origin
2277 (method url-fetch)
2278 ;; Download from GitHub because the rubygems version does not contain
2279 ;; Rakefile or tests.
2280 (uri (string-append
2281 "https://github.com/tzinfo/tzinfo-data/archive/v"
2282 version
2283 ".tar.gz"))
2284 (file-name (string-append name "-" version ".tar.gz"))
2285 (sha256
2286 (base32
2287 "0i8vz2j7wmcpr4pd066qvlg4if5blscjrgxk2imavfa49nq5lp06"))
2288 ;; Remove the known test failure.
2289 ;; https://github.com/tzinfo/tzinfo-data/issues/10
2290 ;; https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1587128
2291 (patches (search-patches
2292 "ruby-tzinfo-data-ignore-broken-test.patch"))))
2293 (build-system ruby-build-system)
2294 (propagated-inputs
2295 `(("ruby-tzinfo" ,ruby-tzinfo)))
2296 (synopsis "Data from the IANA Time Zone database")
2297 (description
2298 "This library provides @code{TZInfo::Data}, which contains data from the
2299 IANA Time Zone database packaged as Ruby modules for use with @code{TZInfo}.")
2300 (home-page "http://tzinfo.github.io")
2301 (license license:expat)))
2302
2303 (define-public ruby-rb-inotify
2304 (package
2305 (name "ruby-rb-inotify")
2306 (version "0.9.10")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (rubygems-uri "rb-inotify" version))
2311 (sha256
2312 (base32
2313 "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71"))))
2314 (build-system ruby-build-system)
2315 (arguments
2316 '(#:tests? #f ; there are no tests
2317 #:phases
2318 (modify-phases %standard-phases
2319 ;; Building the gemspec with rake is not working here since it is
2320 ;; generated with Jeweler. It is also unnecessary because the
2321 ;; existing gemspec does not use any development tools to generate a
2322 ;; list of files.
2323 (replace 'build
2324 (lambda _
2325 (zero? (system* "gem" "build" "rb-inotify.gemspec")))))))
2326 (propagated-inputs
2327 `(("ruby-ffi" ,ruby-ffi)))
2328 (native-inputs
2329 `(("ruby-yard" ,ruby-yard)))
2330 (synopsis "Ruby wrapper for Linux's inotify")
2331 (description "rb-inotify is a simple wrapper over the @code{inotify} Linux
2332 kernel subsystem for monitoring changes to files and directories.")
2333 (home-page "https://github.com/nex3/rb-inotify")
2334 (license license:expat)))
2335
2336 (define-public ruby-pry-editline
2337 (package
2338 (name "ruby-pry-editline")
2339 (version "1.1.2")
2340 (source (origin
2341 (method url-fetch)
2342 (uri (rubygems-uri "pry-editline" version))
2343 (sha256
2344 (base32
2345 "1pjxyvdxvw41xw3yyl18pwzix8hbvn6lgics7qcfhjfsf1zs8x1z"))))
2346 (build-system ruby-build-system)
2347 (arguments `(#:tests? #f)) ; no tests included
2348 (native-inputs
2349 `(("bundler" ,bundler)))
2350 (synopsis "Open the current REPL line in an editor")
2351 (description
2352 "This gem provides a plugin for the Ruby REPL to enable opening the
2353 current line in an external editor.")
2354 (home-page "https://github.com/tpope/pry-editline")
2355 (license license:expat)))
2356
2357 (define-public ruby-sdoc
2358 (package
2359 (name "ruby-sdoc")
2360 (version "0.4.2")
2361 (source (origin
2362 (method url-fetch)
2363 (uri (rubygems-uri "sdoc" version))
2364 (sha256
2365 (base32
2366 "0qhvy10vnmrqcgh8494m13kd5ag9c3sczzhfasv8j0294ylk679n"))))
2367 (build-system ruby-build-system)
2368 (arguments
2369 `(#:phases
2370 (modify-phases %standard-phases
2371 (add-before 'check 'set-rubylib-and-patch-gemfile
2372 (lambda _
2373 (setenv "RUBYLIB" "lib")
2374 (substitute* "sdoc.gemspec"
2375 (("s.add_runtime_dependency.*") "\n")
2376 (("s.add_dependency.*") "\n"))
2377 (substitute* "Gemfile"
2378 (("gem \"rake\".*")
2379 "gem 'rake'\ngem 'rdoc'\ngem 'json'\n"))
2380 #t)))))
2381 (propagated-inputs
2382 `(("ruby-json" ,ruby-json)))
2383 (native-inputs
2384 `(("bundler" ,bundler)
2385 ("ruby-minitest" ,ruby-minitest)
2386 ("ruby-hoe" ,ruby-hoe)))
2387 (synopsis "Generate searchable RDoc documentation")
2388 (description
2389 "SDoc is an RDoc documentation generator to build searchable HTML
2390 documentation for Ruby code.")
2391 (home-page "https://github.com/voloko/sdoc")
2392 (license license:expat)))
2393
2394 (define-public ruby-tins
2395 (package
2396 (name "ruby-tins")
2397 (version "1.15.0")
2398 (source (origin
2399 (method url-fetch)
2400 (uri (rubygems-uri "tins" version))
2401 (sha256
2402 (base32
2403 "09whix5a7ics6787zrkwjmp16kqyh6560p9f317syks785805f7s"))))
2404 (build-system ruby-build-system)
2405 ;; This gem needs gem-hadar at development time, but gem-hadar needs tins
2406 ;; at runtime. To avoid the dependency on gem-hadar we disable rebuilding
2407 ;; the gemspec.
2408 (arguments
2409 `(#:tests? #f ; there are no tests
2410 #:phases
2411 (modify-phases %standard-phases
2412 (replace 'build
2413 (lambda _
2414 ;; "lib/spruz" is a symlink. Leaving it in the gemspec file
2415 ;; causes an error.
2416 (substitute* "tins.gemspec"
2417 (("\"lib/spruz\", ") ""))
2418 (zero? (system* "gem" "build" "tins.gemspec")))))))
2419 (synopsis "Assorted tools for Ruby")
2420 (description "Tins is a Ruby library providing assorted tools.")
2421 (home-page "https://github.com/flori/tins")
2422 (license license:expat)))
2423
2424 (define-public ruby-gem-hadar
2425 (package
2426 (name "ruby-gem-hadar")
2427 (version "1.9.1")
2428 (source (origin
2429 (method url-fetch)
2430 (uri (rubygems-uri "gem_hadar" version))
2431 (sha256
2432 (base32
2433 "1zxvd9l95rbks7x3cxn396w0sn7nha5542bf97v8akkn4vm7nby9"))))
2434 (build-system ruby-build-system)
2435 ;; This gem needs itself at development time. We disable rebuilding of the
2436 ;; gemspec to avoid this loop.
2437 (arguments
2438 `(#:tests? #f ; there are no tests
2439 #:phases
2440 (modify-phases %standard-phases
2441 (replace 'build
2442 (lambda _
2443 (zero? (system* "gem" "build" "gem_hadar.gemspec")))))))
2444 (propagated-inputs
2445 `(("git" ,git)
2446 ("ruby-tins" ,ruby-tins)
2447 ("ruby-yard" ,ruby-yard)))
2448 (synopsis "Library for the development of Ruby gems")
2449 (description
2450 "This library contains some useful functionality to support the
2451 development of Ruby gems.")
2452 (home-page "https://github.com/flori/gem_hadar")
2453 (license license:expat)))
2454
2455 (define-public ruby-minitest-tu-shim
2456 (package
2457 (name "ruby-minitest-tu-shim")
2458 (version "1.3.3")
2459 (source (origin
2460 (method url-fetch)
2461 (uri (rubygems-uri "minitest_tu_shim" version))
2462 (sha256
2463 (base32
2464 "0xlyh94iirvssix157ng2akr9nqhdygdd0c6094hhv7dqcfrn9fn"))))
2465 (build-system ruby-build-system)
2466 (arguments
2467 `(#:phases
2468 (modify-phases %standard-phases
2469 (add-after 'unpack 'fix-test-include-path
2470 (lambda* (#:key inputs #:allow-other-keys)
2471 (let* ((minitest (assoc-ref inputs "ruby-minitest-4"))
2472 (minitest-home (gem-home minitest
2473 ,(package-version ruby))))
2474 (substitute* "Rakefile"
2475 (("Hoe\\.add_include_dirs .*")
2476 (string-append "Hoe.add_include_dirs \""
2477 minitest-home
2478 "/gems/minitest-"
2479 ,(package-version ruby-minitest-4)
2480 "/lib" "\""))))
2481 #t))
2482 (add-before 'check 'fix-test-assumptions
2483 (lambda _
2484 ;; The test output includes the file name, so a couple of tests
2485 ;; fail. Changing the regular expressions slightly fixes this
2486 ;; problem.
2487 (substitute* "test/test_mini_test.rb"
2488 (("output.sub!\\(.*, 'FILE:LINE'\\)")
2489 "output.sub!(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')")
2490 (("gsub\\(/.*, 'FILE:LINE'\\)")
2491 "gsub(/\\/.+-[\\w\\/\\.]+:\\d+/, 'FILE:LINE')"))
2492 #t)))))
2493 (propagated-inputs
2494 `(("ruby-minitest-4" ,ruby-minitest-4)))
2495 (native-inputs
2496 `(("ruby-hoe" ,ruby-hoe)))
2497 (synopsis "Adapter library between minitest and test/unit")
2498 (description
2499 "This library bridges the gap between the small and fast minitest and
2500 Ruby's large and slower test/unit.")
2501 (home-page "https://rubygems.org/gems/minitest_tu_shim")
2502 (license license:expat)))
2503
2504 (define-public ruby-term-ansicolor
2505 (package
2506 (name "ruby-term-ansicolor")
2507 (version "1.6.0")
2508 (source (origin
2509 (method url-fetch)
2510 (uri (rubygems-uri "term-ansicolor" version))
2511 (sha256
2512 (base32
2513 "1b1wq9ljh7v3qyxkk8vik2fqx2qzwh5lval5f92llmldkw7r7k7b"))))
2514 (build-system ruby-build-system)
2515 ;; Rebuilding the gemspec seems to require git, even though this is not a
2516 ;; git repository, so we just build the gem from the existing gemspec.
2517 (arguments
2518 `(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'build
2521 (lambda _
2522 (zero? (system* "gem" "build" "term-ansicolor.gemspec")))))))
2523 (propagated-inputs
2524 `(("ruby-tins" ,ruby-tins)))
2525 (native-inputs
2526 `(("ruby-gem-hadar" ,ruby-gem-hadar)
2527 ("ruby-minitest-tu-shim" ,ruby-minitest-tu-shim)))
2528 (synopsis "Ruby library to control the attributes of terminal output")
2529 (description
2530 "This Ruby library uses ANSI escape sequences to control the attributes
2531 of terminal output.")
2532 (home-page "http://flori.github.io/term-ansicolor/")
2533 ;; There is no mention of the "or later" clause.
2534 (license license:gpl2)))
2535
2536 (define-public ruby-pstree
2537 (package
2538 (name "ruby-pstree")
2539 (version "0.1.0")
2540 (source (origin
2541 (method url-fetch)
2542 (uri (rubygems-uri "pstree" version))
2543 (sha256
2544 (base32
2545 "1mig1sv5qx1cdyhjaipy8jlh9j8pnja04vprrzihyfr54x0215p1"))))
2546 (build-system ruby-build-system)
2547 (native-inputs
2548 `(("ruby-gem-hadar" ,ruby-gem-hadar)
2549 ("bundler" ,bundler)))
2550 (synopsis "Create a process tree data structure")
2551 (description
2552 "This library uses the output of the @code{ps} command to create a
2553 process tree data structure for the current host.")
2554 (home-page "http://flori.github.com/pstree")
2555 ;; There is no mention of the "or later" clause.
2556 (license license:gpl2)))
2557
2558 (define-public ruby-utils
2559 (package
2560 (name "ruby-utils")
2561 (version "0.9.0")
2562 (source (origin
2563 (method url-fetch)
2564 (uri (rubygems-uri "utils" version))
2565 (sha256
2566 (base32
2567 "196zhgcygrnx09bb9mh22qas03rl9avzx8qs0wnxznpin4pffwcl"))))
2568 (build-system ruby-build-system)
2569 (propagated-inputs
2570 `(("ruby-tins" ,ruby-tins)
2571 ("ruby-term-ansicolor" ,ruby-term-ansicolor)
2572 ("ruby-pstree" ,ruby-pstree)
2573 ("ruby-pry-editline" ,ruby-pry-editline)))
2574 (native-inputs
2575 `(("ruby-gem-hadar" ,ruby-gem-hadar)
2576 ("bundler" ,bundler)))
2577 (synopsis "Command line tools for working with Ruby")
2578 (description
2579 "This package provides assorted command line tools that may be useful
2580 when working with Ruby code.")
2581 (home-page "https://github.com/flori/utils")
2582 ;; There is no mention of the "or later" clause.
2583 (license license:gpl2)))
2584
2585 (define-public ruby-json
2586 (package
2587 (name "ruby-json")
2588 (version "2.1.0")
2589 (source
2590 (origin
2591 (method url-fetch)
2592 (uri (rubygems-uri "json" version))
2593 (sha256
2594 (base32
2595 "01v6jjpvh3gnq6sgllpfqahlgxzj50ailwhj9b3cd20hi2dx0vxp"))))
2596 (build-system ruby-build-system)
2597 (arguments '(#:tests? #f)) ; dependency cycle with sdoc
2598 (synopsis "JSON library for Ruby")
2599 (description "This Ruby library provides a JSON implementation written as
2600 a native C extension.")
2601 (home-page "http://json-jruby.rubyforge.org/")
2602 (license (list license:ruby license:gpl2)))) ; GPL2 only
2603
2604 (define-public ruby-json-pure
2605 (package
2606 (name "ruby-json-pure")
2607 (version "2.1.0")
2608 (source (origin
2609 (method url-fetch)
2610 (uri (rubygems-uri "json_pure" version))
2611 (sha256
2612 (base32
2613 "12yf9fmhr4c2jm3xl20vf1qyz5i63vc8a6ngz9j0f86nqwhmi2as"))))
2614 (build-system ruby-build-system)
2615 (arguments
2616 `(#:phases
2617 (modify-phases %standard-phases
2618 (add-after 'unpack 'fix-rakefile
2619 (lambda _
2620 (substitute* "Rakefile"
2621 ;; Since this is not a git repository, do not call 'git'.
2622 (("`git ls-files`") "`find . -type f |sort`")
2623 ;; Loosen dependency constraint.
2624 (("'test-unit', '~> 2.0'") "'test-unit', '>= 2.0'"))
2625 #t))
2626 (add-after 'replace-git-ls-files 'regenerate-gemspec
2627 (lambda _
2628 ;; Regenerate gemspec so loosened dependency constraints are
2629 ;; propagated.
2630 (zero? (system* "rake" "gemspec")))))))
2631 (native-inputs
2632 `(("bundler" ,bundler)
2633 ("ruby-test-unit" ,ruby-test-unit)
2634 ("ruby-simplecov" ,ruby-simplecov)))
2635 (synopsis "JSON implementation in pure Ruby")
2636 (description
2637 "This package provides a JSON implementation written in pure Ruby.")
2638 (home-page "http://flori.github.com/json")
2639 (license license:ruby)))
2640
2641 ;; Even though this package only provides bindings for a Mac OSX API it is
2642 ;; required by "ruby-listen" at runtime.
2643 (define-public ruby-rb-fsevent
2644 (package
2645 (name "ruby-rb-fsevent")
2646 (version "0.10.2")
2647 (source (origin
2648 (method url-fetch)
2649 (uri (rubygems-uri "rb-fsevent" version))
2650 (sha256
2651 (base32
2652 "1fbpmjypwxkb8r7y1kmhmyp6gawa4byw0yb3jc3dn9ly4ld9lizf"))))
2653 (build-system ruby-build-system)
2654 ;; Tests need "guard-rspec", which needs "guard". However, "guard" needs
2655 ;; "listen", which needs "rb-fsevent" at runtime.
2656 (arguments `(#:tests? #f))
2657 (synopsis "FSEvents API with signals catching")
2658 (description
2659 "This library provides Ruby bindings for the Mac OSX FSEvents API.")
2660 (home-page "https://rubygems.org/gems/rb-fsevent")
2661 (license license:expat)))
2662
2663 (define-public ruby-listen
2664 (package
2665 (name "ruby-listen")
2666 (version "3.1.5")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (rubygems-uri "listen" version))
2671 (sha256
2672 (base32
2673 "01v5mrnfqm6sgm8xn2v5swxsn1wlmq7rzh2i48d4jzjsc7qvb6mx"))))
2674 (build-system ruby-build-system)
2675 (arguments '(#:tests? #f)) ; no tests
2676 (propagated-inputs
2677 `(("ruby-rb-inotify" ,ruby-rb-inotify)
2678 ("ruby-rb-fsevent" ,ruby-rb-fsevent)))
2679 (synopsis "Listen to file modifications")
2680 (description "The Listen gem listens to file modifications and notifies
2681 you about the changes.")
2682 (home-page "https://github.com/guard/listen")
2683 (license license:expat)))
2684
2685 (define-public ruby-activesupport
2686 (package
2687 (name "ruby-activesupport")
2688 (version "5.1.4")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (rubygems-uri "activesupport" version))
2693 (sha256
2694 (base32
2695 "0sgf4rsfr7jcaqsx0wwzx4l4k9xsjlwv0mzl08pxiyp1qzyx8scr"))))
2696 (build-system ruby-build-system)
2697 (arguments
2698 `(#:phases
2699 (modify-phases %standard-phases
2700 (replace 'check
2701 (lambda _
2702 ;; There is no tests, instead attempt to load the library.
2703 (zero? (system* "ruby" "-Ilib" "-r" "active_support")))))))
2704 (propagated-inputs
2705 `(("ruby-concurrent" ,ruby-concurrent)
2706 ("ruby-i18n" ,ruby-i18n)
2707 ("ruby-minitest" ,ruby-minitest)
2708 ("ruby-tzinfo" ,ruby-tzinfo)
2709 ("ruby-tzinfo-data" ,ruby-tzinfo-data)))
2710 (synopsis "Ruby on Rails utility library")
2711 (description "ActiveSupport is a toolkit of support libraries and Ruby
2712 core extensions extracted from the Rails framework. It includes support for
2713 multibyte strings, internationalization, time zones, and testing.")
2714 (home-page "http://www.rubyonrails.org")
2715 (license license:expat)))
2716
2717 (define-public ruby-crass
2718 (package
2719 (name "ruby-crass")
2720 (version "1.0.2")
2721 (source (origin
2722 (method url-fetch)
2723 (uri (rubygems-uri "crass" version))
2724 (sha256
2725 (base32
2726 "1c377r8g7m58y22803iyjgqkkvnnii0pymskda1pardxrzaighj9"))))
2727 (build-system ruby-build-system)
2728 (native-inputs
2729 `(("bundler" ,bundler)
2730 ("ruby-minitest" ,ruby-minitest)))
2731 (synopsis "Pure Ruby CSS parser")
2732 (description
2733 "Crass is a pure Ruby CSS parser based on the CSS Syntax Level 3 spec.")
2734 (home-page "https://github.com/rgrove/crass/")
2735 (license license:expat)))
2736
2737 (define-public ruby-nokogumbo
2738 (let ((commit "fb51ff299a1c34346837580b6d1d9a60fadf5dbd"))
2739 (package
2740 (name "ruby-nokogumbo")
2741 (version (string-append "1.4.7-1." (string-take commit 8)))
2742 (source (origin
2743 ;; We use the git reference, because there's no Rakefile in the
2744 ;; published gem and the tarball on Github is outdated.
2745 (method git-fetch)
2746 (uri (git-reference
2747 (url "https://github.com/rubys/nokogumbo.git")
2748 (commit "d56f954d20a")))
2749 (file-name (string-append name "-" version "-checkout"))
2750 (sha256
2751 (base32
2752 "0bnppjy96xiadrsrc9dp8y6wvdwnkfa930n7acrp0mqm4qywl2wl"))))
2753 (build-system ruby-build-system)
2754 (arguments
2755 `(#:modules ((guix build ruby-build-system)
2756 (guix build utils)
2757 (ice-9 rdelim))
2758 #:phases
2759 (modify-phases %standard-phases
2760 (add-after 'unpack 'build-gemspec
2761 (lambda _
2762 (substitute* "Rakefile"
2763 ;; Build Makefile even without a copy of gumbo-parser sources
2764 (("'gumbo-parser/src',") "")
2765 ;; We don't bundle gumbo-parser sources
2766 (("'gumbo-parser/src/\\*',") "")
2767 (("'gumbo-parser/visualc/include/\\*',") "")
2768 ;; The definition of SOURCES will be cut in gemspec, and
2769 ;; "FileList" will be undefined.
2770 (("SOURCES \\+ FileList\\[")
2771 "['ext/nokogumboc/extconf.rb', 'ext/nokogumboc/nokogumbo.c', "))
2772
2773 ;; Copy the Rakefile and cut out the gemspec.
2774 (copy-file "Rakefile" ".gemspec")
2775 (with-atomic-file-replacement ".gemspec"
2776 (lambda (in out)
2777 (let loop ((line (read-line in 'concat))
2778 (skipping? #t))
2779 (if (eof-object? line)
2780 #t
2781 (let ((skip-next? (if skipping?
2782 (not (string-prefix? "SPEC =" line))
2783 (string-prefix? "end" line))))
2784 (when (or (not skipping?)
2785 (and skipping? (not skip-next?)))
2786 (format #t "~a" line)
2787 (display line out))
2788 (loop (read-line in 'concat) skip-next?))))))
2789 #t)))))
2790 (inputs
2791 `(("gumbo-parser" ,gumbo-parser)))
2792 (propagated-inputs
2793 `(("ruby-nokogiri" ,ruby-nokogiri)))
2794 (synopsis "Ruby bindings to the Gumbo HTML5 parser")
2795 (description
2796 "Nokogumbo allows a Ruby program to invoke the Gumbo HTML5 parser and
2797 access the result as a Nokogiri parsed document.")
2798 (home-page "https://github.com/rubys/nokogumbo/")
2799 (license license:asl2.0))))
2800
2801 (define-public ruby-sanitize
2802 (package
2803 (name "ruby-sanitize")
2804 (version "4.0.0")
2805 (source (origin
2806 (method url-fetch)
2807 ;; The gem does not include the Rakefile, so we download the
2808 ;; release tarball from Github.
2809 (uri (string-append "https://github.com/rgrove/"
2810 "sanitize/archive/v" version ".tar.gz"))
2811 (file-name (string-append name "-" version ".tar.gz"))
2812 (sha256
2813 (base32
2814 "055xnj38l60gxnnng76kpy2l2jbrp0byjdyq17jw79w7l4b40znr"))))
2815 (build-system ruby-build-system)
2816 (propagated-inputs
2817 `(("ruby-crass" ,ruby-crass)
2818 ("ruby-nokogiri" ,ruby-nokogiri)
2819 ("ruby-nokogumbo" ,ruby-nokogumbo)))
2820 (native-inputs
2821 `(("bundler" ,bundler)
2822 ("ruby-minitest" ,ruby-minitest)
2823 ("ruby-redcarpet" ,ruby-redcarpet)
2824 ("ruby-yard" ,ruby-yard)))
2825 (synopsis "Whitelist-based HTML and CSS sanitizer")
2826 (description
2827 "Sanitize is a whitelist-based HTML and CSS sanitizer. Given a list of
2828 acceptable elements, attributes, and CSS properties, Sanitize will remove all
2829 unacceptable HTML and/or CSS from a string.")
2830 (home-page "https://github.com/rgrove/sanitize/")
2831 (license license:expat)))
2832
2833 (define-public ruby-ox
2834 (package
2835 (name "ruby-ox")
2836 (version "2.6.0")
2837 (source
2838 (origin
2839 (method url-fetch)
2840 (uri (rubygems-uri "ox" version))
2841 (sha256
2842 (base32
2843 "0fmk62b1h2i79dfzjj8wmf8qid1rv5nhwfc17l489ywnga91xl83"))))
2844 (build-system ruby-build-system)
2845 (arguments
2846 '(#:tests? #f)) ; no tests
2847 (synopsis "Optimized XML library for Ruby")
2848 (description
2849 "Optimized XML (Ox) is a fast XML parser and object serializer for Ruby
2850 written as a native C extension. It was designed to be an alternative to
2851 Nokogiri and other Ruby XML parsers for generic XML parsing and as an
2852 alternative to Marshal for Object serialization. ")
2853 (home-page "http://www.ohler.com/ox")
2854 (license license:expat)))
2855
2856 (define-public ruby-redcloth
2857 (package
2858 (name "ruby-redcloth")
2859 (version "4.3.2")
2860 (source (origin
2861 (method url-fetch)
2862 (uri (rubygems-uri "RedCloth" version))
2863 (sha256
2864 (base32
2865 "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy"))))
2866 (build-system ruby-build-system)
2867 (arguments
2868 `(#:tests? #f ; no tests
2869 #:phases
2870 (modify-phases %standard-phases
2871 ;; Redcloth has complicated rake tasks to build various versions for
2872 ;; multiple targets using RVM. We don't want this so we just use the
2873 ;; existing gemspec.
2874 (replace 'build
2875 (lambda _
2876 (zero? (system* "gem" "build" "redcloth.gemspec"))))
2877 ;; Make sure that the "redcloth" executable finds required Ruby
2878 ;; libraries.
2879 (add-after 'install 'wrap-bin-redcloth
2880 (lambda* (#:key outputs #:allow-other-keys)
2881 (wrap-program (string-append (assoc-ref outputs "out")
2882 "/bin/redcloth")
2883 `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
2884 #t)))))
2885 (native-inputs
2886 `(("bundler" ,bundler)
2887 ("ruby-diff-lcs" ,ruby-diff-lcs)
2888 ("ruby-rspec-2" ,ruby-rspec-2)))
2889 (synopsis "Textile markup language parser for Ruby")
2890 (description
2891 "RedCloth is a Ruby parser for the Textile markup language.")
2892 (home-page "http://redcloth.org")
2893 (license license:expat)))
2894
2895 (define-public ruby-pg
2896 (package
2897 (name "ruby-pg")
2898 (version "0.21.0")
2899 (source
2900 (origin
2901 (method url-fetch)
2902 (uri (rubygems-uri "pg" version))
2903 (sha256
2904 (base32
2905 "00vhasqwc4f98qb4wxqn2h07fjwzhp5lwyi41j2gndi2g02wrdqh"))))
2906 (build-system ruby-build-system)
2907 (arguments
2908 '(#:test-target "spec"))
2909 (native-inputs
2910 `(("ruby-rake-compiler" ,ruby-rake-compiler)
2911 ("ruby-hoe" ,ruby-hoe)
2912 ("ruby-rspec" ,ruby-rspec)))
2913 (inputs
2914 `(("postgresql" ,postgresql)))
2915 (synopsis "Ruby interface to PostgreSQL")
2916 (description "Pg is the Ruby interface to the PostgreSQL RDBMS. It works
2917 with PostgreSQL 8.4 and later.")
2918 (home-page "https://bitbucket.org/ged/ruby-pg")
2919 (license license:ruby)))
2920
2921 (define-public ruby-byebug
2922 (package
2923 (name "ruby-byebug")
2924 (version "9.0.6")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (rubygems-uri "byebug" version))
2929 (sha256
2930 (base32
2931 "1kbfcn65rgdhi72n8x9l393b89rvi5z542459k7d1ggchpb0idb0"))))
2932 (build-system ruby-build-system)
2933 (arguments
2934 '(#:tests? #f)) ; no tests
2935 (synopsis "Debugger for Ruby 2")
2936 (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2
2937 TracePoint C API for execution control and the Debug Inspector C API for call
2938 stack navigation. The core component provides support that front-ends can
2939 build on. It provides breakpoint handling and bindings for stack frames among
2940 other things and it comes with a command line interface.")
2941 (home-page "https://github.com/deivid-rodriguez/byebug")
2942 (license license:bsd-2)))
2943
2944 (define-public ruby-netrc
2945 (package
2946 (name "ruby-netrc")
2947 (version "0.11.0")
2948 (source (origin
2949 (method url-fetch)
2950 (uri (rubygems-uri "netrc" version))
2951 (sha256
2952 (base32
2953 "0gzfmcywp1da8nzfqsql2zqi648mfnx6qwkig3cv36n9m0yy676y"))))
2954 (build-system ruby-build-system)
2955 (arguments
2956 `(#:phases
2957 (modify-phases %standard-phases
2958 (replace 'check
2959 ;; There is no Rakefile and minitest can only run one file at once,
2960 ;; so we have to iterate over all test files.
2961 (lambda _
2962 (and (map (lambda (file)
2963 (zero? (system* "ruby" "-Itest" file)))
2964 (find-files "./test" "test_.*\\.rb"))))))))
2965 (native-inputs
2966 `(("ruby-minitest" ,ruby-minitest)))
2967 (synopsis "Library to read and update netrc files")
2968 (description
2969 "This library can read and update netrc files, preserving formatting
2970 including comments and whitespace.")
2971 (home-page "https://github.com/geemus/netrc")
2972 (license license:expat)))
2973
2974 (define-public ruby-unf-ext
2975 (package
2976 (name "ruby-unf-ext")
2977 (version "0.0.7.1")
2978 (source (origin
2979 (method url-fetch)
2980 (uri (rubygems-uri "unf_ext" version))
2981 (sha256
2982 (base32
2983 "0ly2ms6c3irmbr1575ldyh52bz2v0lzzr2gagf0p526k12ld2n5b"))))
2984 (build-system ruby-build-system)
2985 (arguments
2986 `(#:phases
2987 (modify-phases %standard-phases
2988 (add-after 'build 'build-ext
2989 (lambda _ (zero? (system* "rake" "compile:unf_ext")))))))
2990 (native-inputs
2991 `(("bundler" ,bundler)
2992 ("ruby-rake-compiler" ,ruby-rake-compiler)
2993 ("ruby-test-unit" ,ruby-test-unit)))
2994 (synopsis "Unicode normalization form support library")
2995 (description
2996 "This package provides unicode normalization form support for Ruby.")
2997 (home-page "https://github.com/knu/ruby-unf_ext")
2998 (license license:expat)))
2999
3000 (define-public ruby-tdiff
3001 ;; Use a newer than released snapshot so that rspec-2 is not required.
3002 (let ((commit "b662a6048f08abc45c1a834e5f34dd1c662935e2"))
3003 (package
3004 (name "ruby-tdiff")
3005 (version (string-append "0.3.3-1." (string-take commit 8)))
3006 (source (origin
3007 (method git-fetch)
3008 (uri (git-reference
3009 (url "https://github.com/postmodern/tdiff.git")
3010 (commit commit)))
3011 (file-name (string-append name "-" version "-checkout"))
3012 (sha256
3013 (base32
3014 "0n3gq8rx49f7ln6zqlshqfg2mgqyy30rsdjlnki5mv307ykc7ad4"))))
3015 (build-system ruby-build-system)
3016 (native-inputs
3017 `(("ruby-rspec" ,ruby-rspec)
3018 ("ruby-yard" ,ruby-yard)
3019 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
3020 (synopsis "Calculate the differences between two tree-like structures")
3021 (description
3022 "This library provides functions to calculate the differences between two
3023 tree-like structures. It is similar to Ruby's built-in @code{TSort} module.")
3024 (home-page "https://github.com/postmodern/tdiff")
3025 (license license:expat))))
3026
3027 (define-public ruby-nokogiri-diff
3028 ;; Use a newer than released snapshot so that rspec-2 is not required.
3029 (let ((commit "a38491e4d8709b7406f2cae11a50226d927d06f5"))
3030 (package
3031 (name "ruby-nokogiri-diff")
3032 (version (string-append "0.2.0-1." (string-take commit 8)))
3033 (source (origin
3034 (method git-fetch)
3035 (uri (git-reference
3036 (url "https://github.com/postmodern/nokogiri-diff.git")
3037 (commit commit)))
3038 (file-name (string-append name "-" version "-checkout"))
3039 (sha256
3040 (base32
3041 "1ah2sfjh9n1p0ln2wkqzfl448ml7j4zfy6dhp1qgzq2m41php6rf"))))
3042 (build-system ruby-build-system)
3043 (propagated-inputs
3044 `(("ruby-tdiff" ,ruby-tdiff)
3045 ("ruby-nokogiri" ,ruby-nokogiri)))
3046 (native-inputs
3047 `(("ruby-rspec" ,ruby-rspec)
3048 ("ruby-yard" ,ruby-yard)
3049 ("ruby-rubygems-tasks" ,ruby-rubygems-tasks)))
3050 (synopsis "Calculate the differences between two XML/HTML documents")
3051 (description
3052 "@code{Nokogiri::Diff} adds the ability to calculate the
3053 differences (added or removed nodes) between two XML/HTML documents.")
3054 (home-page "https://github.com/postmodern/nokogiri-diff")
3055 (license license:expat))))
3056
3057 (define-public ruby-rack
3058 (package
3059 (name "ruby-rack")
3060 (version "2.0.3")
3061 (source
3062 (origin
3063 (method url-fetch)
3064 ;; Download from GitHub so that the patch can be applied.
3065 (uri (string-append
3066 "https://github.com/rack/rack/archive/"
3067 version
3068 ".tar.gz"))
3069 (file-name (string-append name "-" version ".tar.gz"))
3070 (sha256
3071 (base32
3072 "12bnqrcg43x9hsswjqg31qqwk8cwj2fh0d2m179y20bjghhn54kx"))
3073 ;; Ignore test which fails inside the build environment but works
3074 ;; outside.
3075 (patches (search-patches "ruby-rack-ignore-failing-test.patch"))))
3076 (build-system ruby-build-system)
3077 (arguments
3078 '(#:phases
3079 (modify-phases %standard-phases
3080 (add-before 'check 'fix-tests
3081 (lambda _
3082 ;; A few of the tests use the length of a file on disk for
3083 ;; Content-Length and Content-Range headers. However, this file
3084 ;; has a shebang in it which an earlier phase patches, growing
3085 ;; the file size from 193 to 239 bytes when the store prefix is
3086 ;; "/gnu/store".
3087 (let ((size-diff (- (string-length (which "ruby"))
3088 (string-length "/usr/bin/env ruby"))))
3089 (substitute* '("test/spec_file.rb")
3090 (("193")
3091 (number->string (+ 193 size-diff)))
3092 (("bytes(.)22-33" all delimiter)
3093 (string-append "bytes"
3094 delimiter
3095 (number->string (+ 22 size-diff))
3096 "-"
3097 (number->string (+ 33 size-diff))))))
3098 #t)))))
3099 (native-inputs
3100 `(("ruby-minitest" ,ruby-minitest)
3101 ("ruby-minitest-sprint" ,ruby-minitest-sprint)
3102 ("which" ,which)))
3103 (propagated-inputs
3104 `(("ruby-concurrent" ,ruby-concurrent)))
3105 (synopsis "Unified web application interface for Ruby")
3106 (description "Rack provides a minimal, modular and adaptable interface for
3107 developing web applications in Ruby. By wrapping HTTP requests and responses,
3108 it unifies the API for web servers, web frameworks, and software in between
3109 into a single method call.")
3110 (home-page "http://rack.github.io/")
3111 (license license:expat)))
3112
3113 (define-public ruby-docile
3114 (package
3115 (name "ruby-docile")
3116 (version "1.1.5")
3117 (source
3118 (origin
3119 (method url-fetch)
3120 (uri (rubygems-uri "docile" version))
3121 (sha256
3122 (base32
3123 "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"))))
3124 (build-system ruby-build-system)
3125 (arguments
3126 '(#:tests? #f)) ; needs github-markup, among others
3127 (synopsis "Ruby EDSL helper library")
3128 (description "Docile is a Ruby library that provides an interface for
3129 creating embedded domain specific languages (EDSLs) that manipulate existing
3130 Ruby classes.")
3131 (home-page "https://ms-ati.github.io/docile/")
3132 (license license:expat)))
3133
3134 (define-public ruby-gherkin
3135 (package
3136 (name "ruby-gherkin")
3137 (version "4.1.3")
3138 (source
3139 (origin
3140 (method url-fetch)
3141 (uri (rubygems-uri "gherkin" version))
3142 (sha256
3143 (base32
3144 "1d18r8mf2qyd9jbq9xxvca8adyysdzvwdy8v9c2s5hrd6p02kg79"))))
3145 (build-system ruby-build-system)
3146 (native-inputs
3147 `(("bundler" ,bundler)))
3148 (arguments
3149 '(#:tests? #f)) ; needs simplecov, among others
3150 (synopsis "Gherkin parser for Ruby")
3151 (description "Gherkin is a parser and compiler for the Gherkin language.
3152 It is intended be used by all Cucumber implementations to parse '.feature'
3153 files.")
3154 (home-page "https://github.com/cucumber/gherkin3")
3155 (license license:expat)))
3156
3157 (define-public ruby-cucumber-core
3158 (package
3159 (name "ruby-cucumber-core")
3160 (version "2.0.0")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (rubygems-uri "cucumber-core" version))
3165 (sha256
3166 (base32
3167 "136hnvqv444qyxzcgy1k60y4i6cn3sn9lbqr4wan9dzz1yzllqbm"))))
3168 (build-system ruby-build-system)
3169 (propagated-inputs
3170 `(("ruby-gherkin" ,ruby-gherkin)))
3171 (native-inputs
3172 `(("bundler" ,bundler)))
3173 (arguments
3174 '(#:tests? #f)) ; needs simplecov, among others
3175 (synopsis "Core library for the Cucumber BDD app")
3176 (description "Cucumber is a tool for running automated tests
3177 written in plain language. Because they're written in plain language,
3178 they can be read by anyone on your team. Because they can be read by
3179 anyone, you can use them to help improve communication, collaboration
3180 and trust on your team.")
3181 (home-page "https://cucumber.io/")
3182 (license license:expat)))
3183
3184 (define-public ruby-bio-logger
3185 (package
3186 (name "ruby-bio-logger")
3187 (version "1.0.1")
3188 (source
3189 (origin
3190 (method url-fetch)
3191 (uri (rubygems-uri "bio-logger" version))
3192 (sha256
3193 (base32
3194 "02pylfy8nkdqzyzplvnhn1crzmfkj1zmi3qjhrj2f2imlxvycd28"))))
3195 (build-system ruby-build-system)
3196 (arguments
3197 `(#:tests? #f)) ; rake errors, missing shoulda
3198 (propagated-inputs
3199 `(("ruby-log4r" ,ruby-log4r)))
3200 (synopsis "Log4r wrapper for Ruby")
3201 (description "Bio-logger is a wrapper around Log4r adding extra logging
3202 features such as filtering and fine grained logging.")
3203 (home-page "https://github.com/pjotrp/bioruby-logger-plugin")
3204 (license license:expat)))
3205
3206 (define-public ruby-yard
3207 (package
3208 (name "ruby-yard")
3209 (version "0.9.6")
3210 (source
3211 (origin
3212 (method url-fetch)
3213 ;; Tests do not pass if we build from the distributed gem.
3214 (uri (string-append "https://github.com/lsegal/yard/archive/v"
3215 version ".tar.gz"))
3216 (file-name (string-append name "-" version ".tar.gz"))
3217 (sha256
3218 (base32
3219 "0rsz4bghgx7fryzyhlz8wlnd2m9xgyvf1xhrq58mnzfrrfm41bdg"))))
3220 (build-system ruby-build-system)
3221 (arguments
3222 `(#:phases
3223 (modify-phases %standard-phases
3224 (replace 'check
3225 (lambda _
3226 ;; $HOME needs to be set to somewhere writeable for tests to run
3227 (setenv "HOME" "/tmp")
3228 ;; Run tests without using 'rake' to avoid dependencies.
3229 (zero? (system* "rspec")))))))
3230 (native-inputs
3231 `(("ruby-rspec" ,ruby-rspec)
3232 ("ruby-rack" ,ruby-rack)))
3233 (synopsis "Documentation generation tool for Ruby")
3234 (description
3235 "YARD is a documentation generation tool for the Ruby programming
3236 language. It enables the user to generate consistent, usable documentation
3237 that can be exported to a number of formats very easily, and also supports
3238 extending for custom Ruby constructs such as custom class level definitions.")
3239 (home-page "http://yardoc.org")
3240 (license license:expat)))
3241
3242 (define-public ruby-clap
3243 (package
3244 (name "ruby-clap")
3245 (version "1.0.0")
3246 (source (origin
3247 (method url-fetch)
3248 (uri (rubygems-uri "clap" version))
3249 (sha256
3250 (base32
3251 "190m05k3pca72c1h8k0fnvby15m303zi0lpb9c478ad19wqawa5q"))))
3252 (build-system ruby-build-system)
3253 ;; Clap needs cutest for running tests, but cutest needs clap.
3254 (arguments `(#:tests? #f))
3255 (synopsis "Command line argument parsing for simple applications")
3256 (description
3257 "Clap provides command line argument parsing features. It covers the
3258 simple case of executing code based on the flags or parameters passed.")
3259 (home-page "https://github.com/djanowski/cutest")
3260 (license license:expat)))
3261
3262 (define-public ruby-cutest
3263 (package
3264 (name "ruby-cutest")
3265 (version "1.2.2")
3266 (source (origin
3267 (method url-fetch)
3268 (uri (rubygems-uri "cutest" version))
3269 (sha256
3270 (base32
3271 "1mldhjn62g53vx4gq2qdqg2lgjvyrqxa8d0khf8347bbfgi16d32"))))
3272 (build-system ruby-build-system)
3273 (propagated-inputs
3274 `(("ruby-clap" ,ruby-clap)))
3275 (synopsis "Run tests in separate processes")
3276 (description
3277 "Cutest runs tests in separate processes to avoid shared state.")
3278 (home-page "https://github.com/djanowski/cutest")
3279 (license license:expat)))
3280
3281 (define-public ruby-pygmentize
3282 (package
3283 (name "ruby-pygmentize")
3284 (version "0.0.3")
3285 (source (origin
3286 (method url-fetch)
3287 (uri (rubygems-uri "pygmentize" version))
3288 (sha256
3289 (base32
3290 "1pxryhkiwvsz6xzda3bvqwz5z8ggzl1cdglf8qbcf4bb7akirdpb"))))
3291 (build-system ruby-build-system)
3292 (arguments
3293 `(#:phases
3294 (modify-phases %standard-phases
3295 (add-after 'unpack 'fix-pygmentize-path
3296 (lambda _
3297 (substitute* "lib/pygmentize.rb"
3298 (("\"/usr/bin/env python.*")
3299 (string-append "\"" (which "pygmentize") "\"\n")))
3300 #t))
3301 (add-after 'build 'do-not-use-vendor-directory
3302 (lambda _
3303 ;; Remove bundled pygments sources
3304 ;; FIXME: ruby-build-system does not support snippets.
3305 (delete-file-recursively "vendor")
3306 (substitute* "pygmentize.gemspec"
3307 (("\"vendor/\\*\\*/\\*\",") ""))
3308 #t)))))
3309 (inputs
3310 `(("pygments" ,python-pygments)))
3311 (native-inputs
3312 `(("ruby-cutest" ,ruby-cutest)
3313 ("ruby-nokogiri" ,ruby-nokogiri)))
3314 (synopsis "Thin Ruby wrapper around pygmentize")
3315 (description
3316 "Pygmentize provides a simple way to call pygmentize from within a Ruby
3317 application.")
3318 (home-page "https://github.com/djanowski/pygmentize")
3319 (license license:expat)))
3320
3321 (define-public ruby-eventmachine
3322 (package
3323 (name "ruby-eventmachine")
3324 (version "1.2.5")
3325 (source
3326 (origin
3327 (method url-fetch)
3328 (uri (rubygems-uri "eventmachine" version))
3329 (sha256
3330 (base32
3331 "075hdw0fgzldgss3xaqm2dk545736khcvv1fmzbf1sgdlkyh1v8z"))))
3332 (build-system ruby-build-system)
3333 (arguments
3334 '(#:tests? #f)) ; test suite tries to connect to google.com
3335 (native-inputs
3336 `(("ruby-rake-compiler" ,ruby-rake-compiler)))
3337 (synopsis "Single-threaded network event framework for Ruby")
3338 (description
3339 "EventMachine implements a single-threaded engine for arbitrary network
3340 communications. EventMachine wraps all interactions with sockets, allowing
3341 programs to concentrate on the implementation of network protocols. It can be
3342 used to create both network servers and clients.")
3343 (home-page "http://rubyeventmachine.com")
3344 (license (list license:ruby license:gpl3)))) ; GPLv3 only AFAICT
3345
3346 (define-public ruby-turn
3347 (package
3348 (name "ruby-turn")
3349 (version "0.9.7")
3350 (source
3351 (origin
3352 (method url-fetch)
3353 (uri (rubygems-uri "turn" version))
3354 (sha256
3355 (base32
3356 "1691rc2sq04cw8mxxh340k2j04ll90kwgcy8ddrp6rligmfrf8fw"))))
3357 (build-system ruby-build-system)
3358 (arguments
3359 `(#:phases
3360 (modify-phases %standard-phases
3361 ;; Tests fail because turn changes its environment so can no longer
3362 ;; find test/unit. Instead simply test if the executable runs
3363 ;; without issue.
3364 (replace 'check
3365 (lambda _
3366 (zero? (system* "ruby" "-Ilib" "bin/turn" "-h")))))))
3367 (propagated-inputs
3368 `(("ruby-ansi" ,ruby-ansi)
3369 ("ruby-minitest" ,ruby-minitest-4)))
3370 (synopsis "Alternate set of alternative runners for MiniTest")
3371 (description
3372 "TURN provides a set of alternative runners for MiniTest which are both
3373 colorful and informative. TURN displays each test on a separate line with
3374 failures being displayed immediately instead of at the end of the tests. Note
3375 that TURN is no longer being maintained.")
3376 (home-page "http://rubygems.org/gems/turn")
3377 (license license:expat)))
3378
3379 (define-public ruby-mime-types-data
3380 (package
3381 (name "ruby-mime-types-data")
3382 (version "3.2016.0521")
3383 (source
3384 (origin
3385 (method url-fetch)
3386 (uri (rubygems-uri "mime-types-data" version))
3387 (sha256
3388 (base32
3389 "04my3746hwa4yvbx1ranhfaqkgf6vavi1kyijjnw8w3dy37vqhkm"))))
3390 (build-system ruby-build-system)
3391 (native-inputs
3392 `(("ruby-hoe" ,ruby-hoe)))
3393 (synopsis "Registry for information about MIME media type definitions")
3394 (description
3395 "@code{mime-types-data} provides a registry for information about
3396 Multipurpose Internet Mail Extensions (MIME) media type definitions. It can
3397 be used with the Ruby mime-types library or other software to determine
3398 defined filename extensions for MIME types, or to use filename extensions to
3399 look up the likely MIME type definitions.")
3400 (home-page "https://github.com/mime-types/mime-types-data/")
3401 (license license:expat)))
3402
3403 (define-public ruby-mime-types
3404 (package
3405 (name "ruby-mime-types")
3406 (version "3.1")
3407 (source
3408 (origin
3409 (method url-fetch)
3410 (uri (rubygems-uri "mime-types" version))
3411 (sha256
3412 (base32
3413 "0087z9kbnlqhci7fxh9f6il63hj1k02icq2rs0c6cppmqchr753m"))))
3414 (build-system ruby-build-system)
3415 (propagated-inputs
3416 `(("ruby-mime-types-data" ,ruby-mime-types-data)))
3417 (native-inputs
3418 `(("ruby-hoe" ,ruby-hoe)
3419 ("ruby-fivemat" ,ruby-fivemat)
3420 ("ruby-minitest-focus" ,ruby-minitest-focus)
3421 ("ruby-minitest-rg" ,ruby-minitest-rg)
3422 ("ruby-minitest-bonus-assertions" ,ruby-minitest-bonus-assertions)
3423 ("ruby-minitest-hooks" ,ruby-minitest-hooks)))
3424 (synopsis "Library and registry for MIME content type definitions")
3425 (description "The mime-types library provides a library and registry for
3426 information about Multipurpose Internet Mail Extensions (MIME) content type
3427 definitions. It can be used to determine defined filename extensions for MIME
3428 types, or to use filename extensions to look up the likely MIME type
3429 definitions.")
3430 (home-page "https://github.com/mime-types/ruby-mime-types")
3431 (license license:expat)))
3432
3433 (define-public ruby-fivemat
3434 (package
3435 (name "ruby-fivemat")
3436 (version "1.3.5")
3437 (source
3438 (origin
3439 (method url-fetch)
3440 (uri (rubygems-uri "fivemat" version))
3441 (sha256
3442 (base32
3443 "0ij7n250gk5c1g34rsbwjnpcv64gk4vsas8lkz8fac4wbygvk6z1"))))
3444 (build-system ruby-build-system)
3445 (arguments
3446 `(#:tests? #f)) ; no tests
3447 (synopsis "Each test file given its own line of dots")
3448 (description
3449 "Fivemat is a MiniTest/RSpec/Cucumber formatter that gives each test file
3450 its own line of dots during testing. It aims to provide test output that is
3451 neither too verbose nor too minimal.")
3452 (home-page "https://github.com/tpope/fivemat")
3453 (license license:expat)))
3454
3455 (define-public ruby-sqlite3
3456 (package
3457 (name "ruby-sqlite3")
3458 (version "1.3.13")
3459 (source
3460 (origin
3461 (method url-fetch)
3462 (uri (rubygems-uri "sqlite3" version))
3463 (sha256
3464 (base32
3465 "01ifzp8nwzqppda419c9wcvr8n82ysmisrs0hph9pdmv1lpa4f5i"))))
3466 (build-system ruby-build-system)
3467 (arguments
3468 `(#:phases
3469 (modify-phases %standard-phases
3470 (add-before 'check 'add-gemtest-file
3471 ;; This file exists in the repository but is not distributed.
3472 (lambda _ (zero? (system* "touch" ".gemtest")))))))
3473 (inputs
3474 `(("sqlite" ,sqlite)))
3475 (native-inputs
3476 `(("ruby-hoe" ,ruby-hoe)
3477 ("ruby-rake-compiler" ,ruby-rake-compiler)
3478 ("ruby-mini-portile" ,ruby-mini-portile)))
3479 (synopsis "Interface with SQLite3 databases")
3480 (description
3481 "This module allows Ruby programs to interface with the SQLite3 database
3482 engine.")
3483 (home-page
3484 "https://github.com/sparklemotion/sqlite3-ruby")
3485 (license license:bsd-3)))
3486
3487 (define-public ruby-shoulda-context
3488 (package
3489 (name "ruby-shoulda-context")
3490 (version "1.2.2")
3491 (source
3492 (origin
3493 (method url-fetch)
3494 (uri (rubygems-uri "shoulda-context" version))
3495 (sha256
3496 (base32
3497 "1l0ncsxycb4s8n47dml97kdnixw4mizljbkwqc3rh05r70csq9bc"))))
3498 (build-system ruby-build-system)
3499 (arguments
3500 `(#:phases
3501 (modify-phases %standard-phases
3502 (replace 'check
3503 (lambda _
3504 ;; Do not run tests to avoid circular dependence with rails.
3505 ;; Instead just import the library to test.
3506 (zero? (system* "ruby" "-Ilib" "-r" "shoulda-context")))))))
3507 (synopsis "Test::Unit context framework extracted from Shoulda")
3508 (description
3509 "@code{shoulda-context} is the context framework extracted from Shoulda.
3510 Instead of writing Ruby methods with lots_of_underscores, shoulda-context adds
3511 context, setup, and should blocks combine to produce natural test method
3512 names.")
3513 (home-page "https://github.com/thoughtbot/shoulda-context")
3514 (license license:expat)))
3515
3516 (define-public ruby-shoulda-matchers
3517 (package
3518 (name "ruby-shoulda-matchers")
3519 (version "3.1.2")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (rubygems-uri "shoulda-matchers" version))
3524 (sha256
3525 (base32
3526 "1zvv94pqk5b5my3w1shdz7h34xf2ldhg5k4qfdpbwi2iy0j9zw2a"))))
3527 (build-system ruby-build-system)
3528 (arguments
3529 `(#:phases
3530 (modify-phases %standard-phases
3531 (replace 'check
3532 (lambda _
3533 ;; Do not run tests to avoid circular dependence with rails. Instead
3534 ;; just import the library to test.
3535 (zero? (system* "ruby" "-Ilib" "-r" "shoulda-matchers")))))))
3536 (propagated-inputs
3537 `(("ruby-activesupport" ,ruby-activesupport)))
3538 (synopsis "Collection of testing matchers extracted from Shoulda")
3539 (description
3540 "Shoulda Matchers provides RSpec- and Minitest-compatible one-liners that
3541 test common Rails functionality. These tests would otherwise be much longer,
3542 more complex, and error-prone.")
3543 (home-page "https://github.com/thoughtbot/shoulda-matchers")
3544 (license license:expat)))
3545
3546 (define-public ruby-shoulda-matchers-2
3547 (package
3548 (inherit ruby-shoulda-matchers)
3549 (version "2.8.0")
3550 (source (origin
3551 (method url-fetch)
3552 (uri (rubygems-uri "shoulda-matchers" version))
3553 (sha256
3554 (base32
3555 "0d3ryqcsk1n9y35bx5wxnqbgw4m8b3c79isazdjnnbg8crdp72d0"))))))
3556
3557 (define-public ruby-shoulda
3558 (package
3559 (name "ruby-shoulda")
3560 (version "3.5.0")
3561 (source
3562 (origin
3563 (method url-fetch)
3564 (uri (rubygems-uri "shoulda" version))
3565 (sha256
3566 (base32
3567 "0csmf15a7mcinfq54lfa4arp0f4b2jmwva55m0p94hdf3pxnjymy"))))
3568 (build-system ruby-build-system)
3569 (arguments
3570 `(#:phases
3571 (modify-phases %standard-phases
3572 (replace 'check
3573 ;; Don't run tests to avoid circular dependence with rails. Instead
3574 ;; just import the library to test.
3575 (lambda _ (zero? (system* "ruby" "-Ilib" "-r" "shoulda")))))))
3576 (propagated-inputs
3577 `(("ruby-shoulda-context" ,ruby-shoulda-context)
3578 ("ruby-shoulda-matchers" ,ruby-shoulda-matchers-2)))
3579 (synopsis "Context framework and matchers for testing")
3580 (description
3581 "@code{shoulda} is a meta-package combining @code{shoulda-context} and
3582 @code{shoulda-matchers} providing tools for writing tests.")
3583 (home-page "https://github.com/thoughtbot/shoulda")
3584 (license license:expat)))
3585
3586 (define-public ruby-unf
3587 (package
3588 (name "ruby-unf")
3589 (version "0.1.4")
3590 (source
3591 (origin
3592 (method url-fetch)
3593 (uri (rubygems-uri "unf" version))
3594 (sha256
3595 (base32
3596 "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"))))
3597 (build-system ruby-build-system)
3598 (arguments
3599 `(#:phases
3600 (modify-phases %standard-phases
3601 (add-before 'check 'add-dependency-to-bundler
3602 (lambda _
3603 ;; test-unit is required but not provided by the bundler
3604 ;; environment. This is fixed in the upstream repository but fix
3605 ;; has not been released.
3606 (substitute* "Gemfile"
3607 (("^gemspec") "gem 'test-unit'\ngemspec"))
3608 #t)))))
3609 (propagated-inputs
3610 `(("ruby-unf-ext" ,ruby-unf-ext)))
3611 (native-inputs
3612 `(("ruby-shoulda" ,ruby-shoulda)
3613 ("bundler" ,bundler)
3614 ("ruby-test-unit" ,ruby-test-unit)))
3615 (synopsis "Unicode Normalization Form support to Ruby and JRuby")
3616 (description
3617 "@code{ruby-unf} is a wrapper library to bring Unicode Normalization Form
3618 support to both Ruby and JRuby. It uses @code{unf_ext} on CRuby and
3619 @code{java.text.Normalizer} on JRuby.")
3620 (home-page "https://github.com/knu/ruby-unf")
3621 (license license:bsd-2)))
3622
3623 (define-public ruby-domain-name
3624 (package
3625 (name "ruby-domain-name")
3626 (version "0.5.20170404")
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (rubygems-uri "domain_name" version))
3631 (sha256
3632 (base32
3633 "12hs8yijhak7p2hf1xkh98g0mnp5phq3mrrhywzaxpwz1gw5r3kf"))))
3634 (build-system ruby-build-system)
3635 (arguments
3636 `(#:phases
3637 (modify-phases %standard-phases
3638 (add-before 'check 'fix-versions
3639 (lambda _
3640 ;; Fix NameError that appears to already be fixed upstream.
3641 (substitute* "Rakefile"
3642 (("DomainName::VERSION")
3643 "Bundler::GemHelper.gemspec.version"))
3644 ;; Loosen unnecessarily strict test-unit version specification.
3645 (substitute* "domain_name.gemspec"
3646 (("<test-unit>.freeze, \\[\\\"~> 2.5.5") "<test-unit>, [\">0"))
3647 #t)))))
3648 (propagated-inputs
3649 `(("ruby-unf" ,ruby-unf)))
3650 (native-inputs
3651 `(("ruby-shoulda" ,ruby-shoulda)
3652 ("bundler" ,bundler)
3653 ("ruby-test-unit" ,ruby-test-unit)))
3654 (synopsis "Domain name manipulation library")
3655 (description
3656 "@code{domain_name} is a Domain name manipulation library. It parses a
3657 domain name ready for extracting the registered domain and TLD (Top Level
3658 Domain). It can also be used for cookie domain validation based on the Public
3659 Suffix List.")
3660 (home-page "https://github.com/knu/ruby-domain_name")
3661 (license license:bsd-2)))
3662
3663 (define-public ruby-http-cookie
3664 (package
3665 (name "ruby-http-cookie")
3666 (version "1.0.3")
3667 (source
3668 (origin
3669 (method url-fetch)
3670 (uri (rubygems-uri "http-cookie" version))
3671 (sha256
3672 (base32
3673 "004cgs4xg5n6byjs7qld0xhsjq3n6ydfh897myr2mibvh6fjc49g"))))
3674 (build-system ruby-build-system)
3675 (arguments
3676 `(#:phases
3677 (modify-phases %standard-phases
3678 (add-before 'check 'add-dependency-to-bundler
3679 (lambda _
3680 ;; Fix NameError
3681 (substitute* "Rakefile"
3682 (("HTTP::Cookie::VERSION")
3683 "Bundler::GemHelper.gemspec.version"))
3684 #t)))))
3685 (propagated-inputs
3686 `(("ruby-domain-name" ,ruby-domain-name)))
3687 (native-inputs
3688 `(("rubysimplecov" ,ruby-simplecov)
3689 ("bundler" ,bundler)
3690 ("ruby-sqlite3" ,ruby-sqlite3)
3691 ("ruby-test-unit" ,ruby-test-unit)))
3692 (synopsis "Handle HTTP Cookies based on RFC 6265")
3693 (description
3694 "@code{HTTP::Cookie} is a Ruby library to handle HTTP Cookies based on
3695 RFC 6265. It has been designed with security, standards compliance and
3696 compatibility in mind, to behave just the same as today's major web browsers.
3697 It has built-in support for the legacy @code{cookies.txt} and
3698 @code{cookies.sqlite} formats of Mozilla Firefox.")
3699 (home-page "https://github.com/sparklemotion/http-cookie")
3700 (license license:expat)))
3701
3702 (define-public ruby-httpclient
3703 (package
3704 (name "ruby-httpclient")
3705 (version "2.8.3")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (rubygems-uri "httpclient" version))
3710 (sha256
3711 (base32
3712 "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
3713 (build-system ruby-build-system)
3714 (arguments
3715 '(;; TODO: Some tests currently fail
3716 ;; ------
3717 ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
3718 ;; 2 omissions, 0 notifications
3719 ;; 91.866% passed
3720 ;; ------
3721 ;; 6.49 tests/s, 22.41 assertions/s
3722 #:tests? #f
3723 #:phases
3724 (modify-phases %standard-phases
3725 (replace 'check
3726 (lambda* (#:key tests? #:allow-other-keys)
3727 (if tests?
3728 (zero?
3729 (system* "ruby"
3730 "-Ilib"
3731 "test/runner.rb"))
3732 #t)))
3733 (add-after 'install 'wrap-bin-httpclient
3734 (lambda* (#:key outputs #:allow-other-keys)
3735 (wrap-program (string-append (assoc-ref outputs "out")
3736 "/bin/httpclient")
3737 `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
3738 #t)))))
3739 (native-inputs
3740 `(("ruby-rack" ,ruby-rack)))
3741 (synopsis
3742 "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
3743 (description
3744 "The @code{httpclient} ruby library provides functionality related to
3745 HTTP. Compared to the @code{net/http} library, @{httpclient} also provides
3746 Cookie, multithreading and authentication (digest, NTLM) support.
3747
3748 Also provided is a @command{httpclient} command, which can perform HTTP
3749 requests either using arguments or with an interactive prompt.")
3750 (home-page "https://github.com/nahi/httpclient")
3751 (license license:ruby)))
3752
3753 (define-public ruby-ansi
3754 (package
3755 (name "ruby-ansi")
3756 (version "1.5.0")
3757 (source
3758 (origin
3759 (method url-fetch)
3760 ;; Fetch from GitHub as the gem does not contain testing code.
3761 (uri (string-append "https://github.com/rubyworks/ansi/archive/"
3762 version ".tar.gz"))
3763 (file-name (string-append name "-" version ".tar.gz"))
3764 (sha256
3765 (base32
3766 "1zdip30hivyipi8hndhb457bhiz033awd00bgrsk5axjrwp6zhly"))))
3767 (build-system ruby-build-system)
3768 (arguments
3769 `(#:phases
3770 (modify-phases %standard-phases
3771 ;; Disable testing to break the cycle ansi, ae, ansi, as well as the
3772 ;; cycle ansi, qed, ansi. Instead simply test that the library can
3773 ;; be require'd.
3774 (replace 'check
3775 (lambda _
3776 (zero? (system* "ruby" "-Ilib" "-r" "ansi"))))
3777 (add-before 'validate-runpath 'replace-broken-symlink
3778 (lambda* (#:key outputs #:allow-other-keys)
3779 (let* ((out (assoc-ref outputs "out"))
3780 (file (string-append out
3781 ,(gem-directory (package-version ruby))
3782 "/ansi-" ,version "/lib/ansi.yml")))
3783 ;; XXX: This symlink is broken since ruby 2.4.
3784 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
3785 (delete-file file)
3786 (symlink "../.index" file)
3787 #t))))))
3788 (synopsis "ANSI escape code related libraries")
3789 (description
3790 "This package is a collection of ANSI escape code related libraries
3791 enabling ANSI colorization and stylization of console output. Included in the
3792 library are the @code{Code} module, which defines ANSI codes as constants and
3793 methods, a @code{Mixin} module for including color methods, a @code{Logger}, a
3794 @code{ProgressBar}, and a @code{String} subclass. The library also includes a
3795 @code{Terminal} module which provides information about the current output
3796 device.")
3797 (home-page "http://rubyworks.github.io/ansi")
3798 (license license:bsd-2)))
3799
3800 (define-public ruby-systemu
3801 (package
3802 (name "ruby-systemu")
3803 (version "2.6.5")
3804 (source
3805 (origin
3806 (method url-fetch)
3807 (uri (rubygems-uri "systemu" version))
3808 (sha256
3809 (base32
3810 "0gmkbakhfci5wnmbfx5i54f25j9zsvbw858yg3jjhfs5n4ad1xq1"))))
3811 (build-system ruby-build-system)
3812 (arguments
3813 `(#:phases
3814 (modify-phases %standard-phases
3815 (add-before 'check 'set-version
3816 (lambda _
3817 (setenv "VERSION" ,version)
3818 #t)))))
3819 (synopsis "Capture of stdout/stderr and handling of child processes")
3820 (description
3821 "Systemu can be used on any platform to return status, stdout, and stderr
3822 of any command. Unlike other methods like @code{open3} and @code{popen4}
3823 there is no danger of full pipes or threading issues hanging your process or
3824 subprocess.")
3825 (home-page "https://github.com/ahoward/systemu")
3826 (license license:ruby)))
3827
3828 (define-public ruby-bio-commandeer
3829 (package
3830 (name "ruby-bio-commandeer")
3831 (version "0.4.0")
3832 (source
3833 (origin
3834 (method url-fetch)
3835 (uri (rubygems-uri "bio-commandeer" version))
3836 (sha256
3837 (base32
3838 "0khpfw1yl5l3d2m8nxpkk32ybc4c3pa5hic3agd160jdfjjjnlni"))))
3839 (build-system ruby-build-system)
3840 (arguments
3841 `(#:phases
3842 (modify-phases %standard-phases
3843 (replace 'check
3844 ;; Run test without calling 'rake' so that jeweler is
3845 ;; not required as an input.
3846 (lambda _
3847 (zero? (system* "rspec" "spec/bio-commandeer_spec.rb")))))))
3848 (propagated-inputs
3849 `(("ruby-bio-logger" ,ruby-bio-logger)
3850 ("ruby-systemu" ,ruby-systemu)))
3851 (native-inputs
3852 `(("bundler" ,bundler)
3853 ("ruby-rspec" ,ruby-rspec)))
3854 (synopsis "Simplified running of shell commands from within Ruby")
3855 (description
3856 "Bio-commandeer provides an opinionated method of running shell commands
3857 from within Ruby. The advantage of bio-commandeer over other methods of
3858 running external commands is that when something goes wrong, messages printed
3859 to the @code{STDOUT} and @code{STDERR} streams are reported, giving extra
3860 detail to ease debugging.")
3861 (home-page "https://github.com/wwood/bioruby-commandeer")
3862 (license license:expat)))
3863
3864 (define-public ruby-rubytest
3865 (package
3866 (name "ruby-rubytest")
3867 (version "0.8.1")
3868 (source
3869 (origin
3870 (method url-fetch)
3871 (uri (rubygems-uri "rubytest" version))
3872 (sha256
3873 (base32
3874 "19jydsdnkl81i9dhdcr4dc34j0ilm68ff2ngnka1hi38xiw4p5qz"))))
3875 (build-system ruby-build-system)
3876 (arguments
3877 ;; Disable regular testing to break the cycle rubytest, qed, brass,
3878 ;; rubytest, as well as the cycle rubytest, qed, ansi, rubytest. Instead
3879 ;; simply test that the library can be require'd.
3880 `(#:phases
3881 (modify-phases %standard-phases
3882 (replace 'check
3883 (lambda _
3884 (zero? (system* "ruby" "-Ilib" "-r" "rubytest")))))))
3885 (propagated-inputs
3886 `(("ruby-ansi" ,ruby-ansi)))
3887 (synopsis "Universal test harness for Ruby")
3888 (description
3889 "Rubytest is a testing meta-framework for Ruby. It can handle any
3890 compliant test framework and can run tests from multiple frameworks in a
3891 single pass.")
3892 (home-page "http://rubyworks.github.io/rubytest")
3893 (license license:bsd-2)))
3894
3895 (define-public ruby-brass
3896 (package
3897 (name "ruby-brass")
3898 (version "1.2.1")
3899 (source
3900 (origin
3901 (method url-fetch)
3902 (uri (rubygems-uri "brass" version))
3903 (sha256
3904 (base32
3905 "154lp8rp1vmg60ri1j4cb8hqlw37z7bn575h899v8hzxwi11sxka"))))
3906 (build-system ruby-build-system)
3907 (arguments
3908 ;; Disable tests to break the cycle brass, lemon, ae, qed, brass.
3909 ;; Instead simply test that the library can be require'd.
3910 `(#:phases
3911 (modify-phases %standard-phases
3912 (replace 'check
3913 (lambda _
3914 (zero? (system* "ruby" "-Ilib" "-r" "brass")))))))
3915 (synopsis "Basic foundational assertions framework")
3916 (description
3917 "BRASS (Bare-Metal Ruby Assertion System Standard) is a basic
3918 foundational assertions framework for other assertion and test frameworks to
3919 make use of.")
3920 (home-page "http://rubyworks.github.io/brass")
3921 (license license:bsd-2)))
3922
3923 (define-public ruby-qed
3924 (package
3925 (name "ruby-qed")
3926 (version "2.9.2")
3927 (source
3928 (origin
3929 (method url-fetch)
3930 (uri (rubygems-uri "qed" version))
3931 (sha256
3932 (base32
3933 "03h4lmlxpcya8j7s2cnyscqlx8v3xl1xgsw5y1wk1scxcgz2vbmr"))))
3934 (build-system ruby-build-system)
3935 (arguments
3936 ;; Disable testing to break the cycle qed, ansi, qed, among others.
3937 ;; Instead simply test that the executable runs using --copyright.
3938 `(#:phases
3939 (modify-phases %standard-phases
3940 (replace 'check
3941 (lambda _
3942 (zero? (system* "ruby" "-Ilib" "bin/qed" "--copyright")))))))
3943 (propagated-inputs
3944 `(("ruby-ansi" ,ruby-ansi)
3945 ("ruby-brass" ,ruby-brass)))
3946 (synopsis "Test framework utilizing literate programming techniques")
3947 (description
3948 "@dfn{Quality Ensured Demonstrations} (QED) is a test framework for
3949 @dfn{Test Driven Development} (TDD) and @dfn{Behaviour Driven
3950 Development} (BDD) utilizing Literate Programming techniques. QED sits
3951 somewhere between lower-level testing tools like @code{Test::Unit} and
3952 requirement specifications systems like Cucumber.")
3953 (home-page "http://rubyworks.github.io/qed")
3954 (license license:bsd-2)))
3955
3956 (define-public ruby-ae
3957 (package
3958 (name "ruby-ae")
3959 (version "1.8.2")
3960 (source
3961 (origin
3962 (method url-fetch)
3963 ;; Fetch from github so tests are included.
3964 (uri (string-append
3965 "https://github.com/rubyworks/ae/archive/"
3966 version ".tar.gz"))
3967 (file-name (string-append name "-" version ".tar.gz"))
3968 (sha256
3969 (base32
3970 "147jmkx54x7asy2d8m4dyrhhf4hdx4galpnhwzai030y3cdsfrrl"))))
3971 (build-system ruby-build-system)
3972 (arguments
3973 `(#:phases
3974 (modify-phases %standard-phases
3975 (replace 'check
3976 (lambda _ (zero? (system* "qed"))))
3977 (add-before 'validate-runpath 'replace-broken-symlink
3978 (lambda* (#:key outputs #:allow-other-keys)
3979 (let* ((out (assoc-ref outputs "out"))
3980 (file (string-append out
3981 ,(gem-directory (package-version ruby))
3982 "/ae-" ,version "/lib/ae.yml")))
3983 ;; XXX: This symlink is broken since ruby 2.4.
3984 ;; https://lists.gnu.org/archive/html/guix-devel/2017-06/msg00034.html
3985 (delete-file file)
3986 (symlink "../.index" file)
3987 #t))))))
3988 (propagated-inputs
3989 `(("ruby-ansi" ,ruby-ansi)))
3990 (native-inputs
3991 `(("ruby-qed" ,ruby-qed)))
3992 (synopsis "Assertions library")
3993 (description
3994 "Assertive Expressive (AE) is an assertions library specifically designed
3995 for reuse by other test frameworks.")
3996 (home-page "http://rubyworks.github.io/ae")
3997 (license license:bsd-2)))
3998
3999 (define-public ruby-lemon
4000 (package
4001 (name "ruby-lemon")
4002 (version "0.9.1")
4003 (source
4004 (origin
4005 (method url-fetch)
4006 (uri (rubygems-uri "lemon" version))
4007 (sha256
4008 (base32
4009 "0gqhpgjavgpvx23rqpfqcv3d5bs8gc7lr9yvj8kxgp7mfbdc2jcm"))))
4010 (build-system ruby-build-system)
4011 (arguments
4012 `(#:phases
4013 (modify-phases %standard-phases
4014 (replace 'check (lambda _ (zero? (system* "qed")))))))
4015 (propagated-inputs
4016 `(("ruby-ae" ,ruby-ae)
4017 ("ruby-ansi" ,ruby-ansi)
4018 ("ruby-rubytest" ,ruby-rubytest)))
4019 (native-inputs
4020 `(("ruby-qed" ,ruby-qed)))
4021 (synopsis "Test framework correlating code structure and test unit")
4022 (description
4023 "Lemon is a unit testing framework that enforces highly formal
4024 case-to-class and unit-to-method test construction. This enforcement can help
4025 focus concern on individual units of behavior.")
4026 (home-page "http://rubyworks.github.io/lemon")
4027 (license license:bsd-2)))
4028
4029 (define-public ruby-rubytest-cli
4030 (package
4031 (name "ruby-rubytest-cli")
4032 (version "0.2.0")
4033 (source
4034 (origin
4035 (method url-fetch)
4036 (uri (rubygems-uri "rubytest-cli" version))
4037 (sha256
4038 (base32
4039 "0n7hv4k1ba4fm3i98c6ydbsqhkxgbp52mhi70ba1x3mqzfvk438p"))))
4040 (build-system ruby-build-system)
4041 (arguments
4042 `(#:tests? #f)) ; no tests
4043 (propagated-inputs
4044 `(("ruby-ansi" ,ruby-ansi)
4045 ("ruby-rubytest" ,ruby-rubytest)))
4046 (synopsis "Command-line interface for rubytest")
4047 (description
4048 "Rubytest CLI is a command-line interface for running tests for
4049 Rubytest-based test frameworks. It provides the @code{rubytest} executable.")
4050 (home-page "http://rubyworks.github.io/rubytest-cli")
4051 (license license:bsd-2)))
4052
4053 (define-public ruby-hashery
4054 (package
4055 (name "ruby-hashery")
4056 (version "2.1.2")
4057 (source
4058 (origin
4059 (method url-fetch)
4060 (uri (rubygems-uri "hashery" version))
4061 (sha256
4062 (base32
4063 "0qj8815bf7q6q7llm5rzdz279gzmpqmqqicxnzv066a020iwqffj"))))
4064 (build-system ruby-build-system)
4065 (arguments
4066 `(#:phases
4067 (modify-phases %standard-phases
4068 (replace 'check
4069 (lambda _
4070 (and (zero? (system* "qed"))
4071 (zero? (system* "rubytest" "-Ilib" "-Itest" "test/"))))))))
4072 (native-inputs
4073 `(("ruby-rubytest-cli" ,ruby-rubytest-cli)
4074 ("ruby-qed" ,ruby-qed)
4075 ("ruby-lemon" ,ruby-lemon)))
4076 (synopsis "Hash-like classes with extra features")
4077 (description
4078 "The Hashery is a tight collection of @code{Hash}-like classes.
4079 Included are the auto-sorting @code{Dictionary} class, the efficient
4080 @code{LRUHash}, the flexible @code{OpenHash} and the convenient
4081 @code{KeyHash}. Nearly every class is a subclass of the @code{CRUDHash} which
4082 defines a CRUD (Create, Read, Update and Delete) model on top of Ruby's
4083 standard @code{Hash} making it possible to subclass and augment to fit any
4084 specific use case.")
4085 (home-page "http://rubyworks.github.io/hashery")
4086 (license license:bsd-2)))
4087
4088 (define-public ruby-rc4
4089 (package
4090 (name "ruby-rc4")
4091 (version "0.1.5")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (rubygems-uri "ruby-rc4" version))
4096 (sha256
4097 (base32
4098 "00vci475258mmbvsdqkmqadlwn6gj9m01sp7b5a3zd90knil1k00"))))
4099 (build-system ruby-build-system)
4100 (arguments
4101 `(#:phases
4102 (modify-phases %standard-phases
4103 (replace 'check
4104 (lambda _
4105 (zero? (system* "rspec" "spec/rc4_spec.rb")))))))
4106 (native-inputs
4107 `(("ruby-rspec" ,ruby-rspec-2)))
4108 (synopsis "Implementation of the RC4 algorithm")
4109 (description
4110 "RubyRC4 is a pure Ruby implementation of the RC4 algorithm.")
4111 (home-page "https://github.com/caiges/Ruby-RC4")
4112 (license license:expat)))
4113
4114 (define-public ruby-afm
4115 (package
4116 (name "ruby-afm")
4117 (version "0.2.2")
4118 (source
4119 (origin
4120 (method url-fetch)
4121 (uri (rubygems-uri "afm" version))
4122 (sha256
4123 (base32
4124 "06kj9hgd0z8pj27bxp2diwqh6fv7qhwwm17z64rhdc4sfn76jgn8"))))
4125 (build-system ruby-build-system)
4126 (native-inputs
4127 `(("bundler" ,bundler)))
4128 (synopsis "Read Adobe Font Metrics (afm) files")
4129 (description
4130 "This library provides methods to read @dfn{Adobe Font Metrics} (afm)
4131 files and use the data therein.")
4132 (home-page "https://github.com/halfbyte/afm")
4133 (license license:expat)))
4134
4135 (define-public ruby-ascii85
4136 (package
4137 (name "ruby-ascii85")
4138 (version "1.0.2")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (rubygems-uri "Ascii85" version))
4143 (sha256
4144 (base32
4145 "0j95sbxd18kc8rhcnvl1w37kflqpax1r12h1x47gh4xxn3mz4m7q"))))
4146 (build-system ruby-build-system)
4147 (native-inputs
4148 `(("bundler" ,bundler)))
4149 (synopsis "Encode and decode Ascii85 binary-to-text encoding")
4150 (description
4151 "This library provides methods to encode and decode Ascii85
4152 binary-to-text encoding. The main modern use of Ascii85 is in PostScript and
4153 @dfn{Portable Document Format} (PDF) file formats.")
4154 (home-page "https://github.com/datawraith/ascii85gem")
4155 (license license:expat)))
4156
4157 (define-public ruby-ttfunk
4158 (package
4159 (name "ruby-ttfunk")
4160 (version "1.4.0")
4161 (source
4162 (origin
4163 (method url-fetch)
4164 ;; fetch from github as the gem does not contain testing code
4165 (uri (string-append
4166 "https://github.com/prawnpdf/ttfunk/archive/"
4167 version ".tar.gz"))
4168 (file-name (string-append name "-" version ".tar.gz"))
4169 (sha256
4170 (base32
4171 "1izq84pnm9niyvkzp8k0vl232q9zj41hwmp9na9fzycfh1pbnsl6"))))
4172 (build-system ruby-build-system)
4173 (arguments
4174 `(#:test-target "spec"
4175 #:phases
4176 (modify-phases %standard-phases
4177 (add-before 'check 'remove-rubocop
4178 (lambda _
4179 ;; remove rubocop as a dependency as not needed for testing
4180 (substitute* "ttfunk.gemspec"
4181 (("spec.add_development_dependency\\('rubocop'.*") ""))
4182 (substitute* "Rakefile"
4183 (("require 'rubocop/rake_task'") "")
4184 (("Rubocop::RakeTask.new") ""))
4185 #t)))))
4186 (native-inputs
4187 `(("ruby-rspec" ,ruby-rspec)
4188 ("bundler" ,bundler)))
4189 (synopsis "Font metrics parser for the Prawn PDF generator")
4190 (description
4191 "TTFunk is a TrueType font parser written in pure Ruby. It is used as
4192 part of the Prawn PDF generator.")
4193 (home-page "https://github.com/prawnpdf/ttfunk")
4194 ;; From the README: "Matz's terms for Ruby, GPLv2, or GPLv3. See LICENSE
4195 ;; for details."
4196 (license (list license:gpl2 license:gpl3 license:ruby))))
4197
4198 (define-public ruby-puma
4199 (package
4200 (name "ruby-puma")
4201 (version "3.9.1")
4202 (source
4203 (origin
4204 (method url-fetch)
4205 ;; Fetch from GitHub because distributed gem does not contain tests.
4206 (uri (string-append "https://github.com/puma/puma/archive/v"
4207 version ".tar.gz"))
4208 (file-name (string-append name "-" version ".tar.gz"))
4209 (sha256
4210 (base32
4211 "03pifga841h17brh4vgia8i2ybh3cmsyg0dbybzdf6dq51wzcxdx"))))
4212 (build-system ruby-build-system)
4213 (arguments
4214 `(#:tests? #f ; Tests require an out-dated version of minitest.
4215 #:phases
4216 (modify-phases %standard-phases
4217 (add-before 'build 'fix-gemspec
4218 (lambda _
4219 (substitute* "puma.gemspec"
4220 (("git ls-files") "find * |sort"))
4221 #t)))))
4222 (synopsis "Simple, concurrent HTTP server for Ruby/Rack")
4223 (description
4224 "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server
4225 for Ruby/Rack applications. Puma is intended for use in both development and
4226 production environments. In order to get the best throughput, it is highly
4227 recommended that you use a Ruby implementation with real threads like Rubinius
4228 or JRuby.")
4229 (home-page "http://puma.io")
4230 (license license:expat)))
4231
4232 (define-public ruby-hoe-git
4233 (package
4234 (name "ruby-hoe-git")
4235 (version "1.6.0")
4236 (source
4237 (origin
4238 (method url-fetch)
4239 (uri (rubygems-uri "hoe-git" version))
4240 (sha256
4241 (base32
4242 "10jmmbjm0lkglwxbn4rpqghgg1ipjxrswm117n50adhmy8yij650"))))
4243 (build-system ruby-build-system)
4244 (propagated-inputs
4245 `(("ruby-hoe" ,ruby-hoe)
4246 ("git" ,git)))
4247 (synopsis "Hoe plugins for tighter Git integration")
4248 (description
4249 "This package provides a set of Hoe plugins for tighter Git integration.
4250 It provides tasks to automate release tagging and pushing and changelog
4251 generation.")
4252 (home-page "https://github.com/jbarnette/hoe-git")
4253 (license license:expat)))
4254
4255 (define-public ruby-sequel
4256 (package
4257 (name "ruby-sequel")
4258 (version "4.49.0")
4259 (source
4260 (origin
4261 (method url-fetch)
4262 (uri (rubygems-uri "sequel" version))
4263 (sha256
4264 (base32
4265 "010p4a60npppvgbyw7pq5xia8aydpgxdlhh3qjm2615kwjsw3fl8"))))
4266 (build-system ruby-build-system)
4267 (arguments
4268 '(#:tests? #f)) ; Avoid dependency loop with ruby-minitest-hooks.
4269 (synopsis "Database toolkit for Ruby")
4270 (description "Sequel provides thread safety, connection pooling and a
4271 concise DSL for constructing SQL queries and table schemas. It includes a
4272 comprehensive ORM layer for mapping records to Ruby objects and handling
4273 associated records.")
4274 (home-page "http://sequel.jeremyevans.net")
4275 (license license:expat)))
4276
4277 (define-public ruby-timecop
4278 (package
4279 (name "ruby-timecop")
4280 (version "0.9.1")
4281 (source
4282 (origin
4283 (method url-fetch)
4284 (uri (rubygems-uri "timecop" version))
4285 (sha256
4286 (base32
4287 "0d7mm786180v4kzvn1f77rhfppsg5n0sq2bdx63x9nv114zm8jrp"))))
4288 (build-system ruby-build-system)
4289 (arguments
4290 `(#:phases
4291 (modify-phases %standard-phases
4292 (add-before 'check 'set-check-rubylib
4293 (lambda _
4294 ;; Set RUBYLIB so timecop tests finds its own lib.
4295 (setenv "RUBYLIB" "lib")
4296 #t)))))
4297 (native-inputs
4298 `(("bundler" ,bundler)
4299 ("ruby-minitest-rg" ,ruby-minitest-rg)
4300 ("ruby-mocha" ,ruby-mocha)
4301 ("ruby-activesupport" ,ruby-activesupport)))
4302 (synopsis "Test mocks for time-dependent functions")
4303 (description
4304 "Timecop provides \"time travel\" and \"time freezing\" capabilities,
4305 making it easier to test time-dependent code. It provides a unified method to
4306 mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
4307 call.")
4308 (home-page "https://github.com/travisjeffery/timecop")
4309 (license license:expat)))
4310
4311 (define-public ruby-concurrent
4312 (package
4313 (name "ruby-concurrent")
4314 (version "1.0.5")
4315 (source
4316 (origin
4317 (method url-fetch)
4318 ;; Download from GitHub because the rubygems version does not contain
4319 ;; Rakefile.
4320 (uri (string-append
4321 "https://github.com/ruby-concurrency/concurrent-ruby/archive/v"
4322 version
4323 ".tar.gz"))
4324 (file-name (string-append name "-" version ".tar.gz"))
4325 (sha256
4326 (base32
4327 "0qhv0qzsby4iijgwa4s9r88zj8123pmyz1dwaqzdk57xgqll9pny"))
4328 ;; Exclude failing test reported at
4329 ;; https://github.com/ruby-concurrency/concurrent-ruby/issues/534
4330 (patches (search-patches "ruby-concurrent-ignore-broken-test.patch"
4331 "ruby-concurrent-test-arm.patch"))))
4332 (build-system ruby-build-system)
4333 (arguments
4334 `(#:test-target "spec"
4335 #:phases
4336 (modify-phases %standard-phases
4337 (add-before 'replace-git-ls-files 'remove-extra-gemspecs
4338 (lambda _
4339 ;; Delete extra gemspec files so 'first-gemspec' chooses the
4340 ;; correct one.
4341 (delete-file "concurrent-ruby-edge.gemspec")
4342 (delete-file "concurrent-ruby-ext.gemspec")
4343 #t))
4344 (add-before 'build 'replace-git-ls-files2
4345 (lambda _
4346 (substitute* "support/file_map.rb"
4347 (("git ls-files") "find * |sort"))
4348 #t))
4349 (add-before 'check 'rake-compile
4350 ;; Fix the test error described at
4351 ;; https://github.com/ruby-concurrency/concurrent-ruby/pull/408
4352 (lambda _ (zero? (system* "rake" "compile"))))
4353 (add-before 'check 'remove-timecop-dependency
4354 ;; Remove timecop-dependent tests as having timecop as a depedency
4355 ;; causes circular depedencies.
4356 (lambda _
4357 (delete-file "spec/concurrent/executor/timer_set_spec.rb")
4358 (delete-file "spec/concurrent/scheduled_task_spec.rb")
4359 #t)))))
4360 (native-inputs
4361 `(("ruby-rake-compiler" ,ruby-rake-compiler)
4362 ("ruby-rspec" ,ruby-rspec)))
4363 (synopsis "Concurrency tools for Ruby")
4364 (description
4365 "This library provides modern concurrency tools including agents,
4366 futures, promises, thread pools, actors, supervisors, and more. It is
4367 inspired by Erlang, Clojure, Go, JavaScript, actors and classic concurrency
4368 patterns.")
4369 (home-page "http://www.concurrent-ruby.com")
4370 (license license:expat)))
4371
4372 (define-public ruby-pkg-config
4373 (package
4374 (name "ruby-pkg-config")
4375 (version "1.2.5")
4376 (source
4377 (origin
4378 (method url-fetch)
4379 (uri (rubygems-uri "pkg-config" version))
4380 (sha256
4381 (base32
4382 "056mzqdh4yjznsg36fi0xiq76f24vxlhzh2n4az919l3x5k318ar"))))
4383 (build-system ruby-build-system)
4384 (arguments
4385 ;; Tests require extra files not included in the gem.
4386 `(#:tests? #f))
4387 (synopsis "Detect libraries for compiling Ruby native extensions")
4388 (description
4389 "@code{pkg-config} can be used in your extconf.rb to properly detect need
4390 libraries for compiling Ruby native extensions.")
4391 (home-page "https://github.com/ruby-gnome2/pkg-config")
4392 (license license:lgpl2.0+)))
4393
4394 (define-public ruby-net-http-digest-auth
4395 (package
4396 (name "ruby-net-http-digest-auth")
4397 (version "1.4.1")
4398 (source
4399 (origin
4400 (method url-fetch)
4401 (uri (rubygems-uri "net-http-digest_auth" version))
4402 (sha256
4403 (base32
4404 "1nq859b0gh2vjhvl1qh1zrk09pc7p54r9i6nnn6sb06iv07db2jb"))))
4405 (build-system ruby-build-system)
4406 (native-inputs
4407 `(("ruby-hoe" ,ruby-hoe)))
4408 (synopsis "RFC 2617 HTTP digest authentication library")
4409 (description
4410 "This library implements HTTP's digest authentication scheme based on
4411 RFC 2617. This enables the use of the digest authentication scheme instead
4412 of the more insecure basic authentication scheme.")
4413 (home-page "https://github.com/drbrain/net-http-digest_auth")
4414 (license license:expat)))
4415
4416 (define-public ruby-mail
4417 (package
4418 (name "ruby-mail")
4419 (version "2.6.6")
4420 (source
4421 (origin
4422 (method url-fetch)
4423 (uri (rubygems-uri "mail" version))
4424 (sha256
4425 (base32
4426 "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"))))
4427 (build-system ruby-build-system)
4428 (propagated-inputs
4429 `(("ruby-mime-types" ,ruby-mime-types)))
4430 (arguments
4431 ;; Tests require extra gems not included in the Gemfile.
4432 ;; XXX: Try enabling this for the next version with mini_mime.
4433 `(#:tests? #f))
4434 (synopsis "Mail library for Ruby")
4435 (description
4436 "Mail is an internet library for Ruby that is designed to handle email
4437 generation, parsing and sending. The purpose of this library is to provide
4438 a single point of access to handle all email functions, including sending
4439 and receiving emails. All network type actions are done through proxy
4440 methods to @code{Net::SMTP}, @code{Net::POP3} etc.
4441
4442 Mail has been designed with a very simple object oriented system that
4443 really opens up the email messages you are parsing, if you know what you
4444 are doing, you can fiddle with every last bit of your email directly.")
4445 (home-page "https://github.com/mikel/mail")
4446 (license license:expat)))
4447
4448 (define-public ruby-code-statistics
4449 (package
4450 (name "ruby-code-statistics")
4451 (version "0.2.13")
4452 (source
4453 (origin
4454 (method url-fetch)
4455 (uri (rubygems-uri "code_statistics" version))
4456 (sha256
4457 (base32
4458 "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
4459 (build-system ruby-build-system)
4460 (arguments
4461 `(#:tests? #f)) ; Not all test code is included in gem.
4462 (synopsis "Port of the rails 'rake stats' method")
4463 (description
4464 "This gem is a port of the rails 'rake stats' method so it can be made
4465 more robust and work for non rails projects.")
4466 (home-page "http://github.com/danmayer/code_statistics")
4467 (license license:expat)))