Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / rails.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages rails)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (gnu packages ruby)
25 #:use-module (guix build-system ruby))
26
27 (define-public ruby-spring
28 (package
29 (name "ruby-spring")
30 (version "1.7.2")
31 (source
32 (origin
33 (method url-fetch)
34 (uri
35 (string-append "https://github.com/rails/spring/archive/v"
36 version ".tar.gz"))
37 (file-name (string-append name "-" version ".tar.gz"))
38 (sha256
39 (base32
40 "1dd58y0cpsm2izj74yscn0ybfygmgcbbfdw1891g7cq41aai4b35"))))
41 (build-system ruby-build-system)
42 (arguments
43 `(#:test-target "test:unit"
44 #:phases
45 (modify-phases %standard-phases
46 (add-before 'check 'remove-bump
47 (lambda _
48 (substitute* "spring.gemspec"
49 (("gem.add_development_dependency 'bump'") "")
50 (("gem.add_development_dependency 'activesupport'.*")
51 "gem.add_development_dependency 'activesupport'\n"))
52 (substitute* "Rakefile"
53 (("require \\\"bump/tasks\\\"") ""))
54 #t)))))
55 (native-inputs
56 `(("bundler" ,bundler)
57 ("ruby-activesupport" ,ruby-activesupport)))
58 (synopsis "Ruby on Rails application preloader")
59 (description
60 "Spring is a Ruby on Rails application preloader. It speeds up
61 development by keeping your application running in the background so the
62 application does need to boot it every time you run a test, rake task or
63 migration.")
64 (home-page "https://github.com/rails/spring")
65 (license license:expat)))
66
67 (define-public ruby-debug-inspector
68 (package
69 (name "ruby-debug-inspector")
70 (version "0.0.3")
71 (source
72 (origin
73 (method url-fetch)
74 (uri (rubygems-uri "debug_inspector" version))
75 (sha256
76 (base32
77 "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0"))))
78 (build-system ruby-build-system)
79 (arguments
80 `(#:phases
81 (modify-phases %standard-phases
82 (replace 'check
83 (lambda _
84 (invoke "rake" "compile")
85 (invoke "ruby" "-Ilib" "-e"
86 (string-append
87 "require 'debug_inspector'; RubyVM::DebugInspector."
88 "open{|dc| p dc.backtrace_locations}")))))))
89 (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API")
90 (description
91 "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector
92 API.")
93 (home-page
94 "https://github.com/banister/debug_inspector")
95 (license license:expat)))