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