gnu: Add ruby-globalid.
[jackhill/guix/guix.git] / gnu / packages / rails.scm
CommitLineData
90322fdb
MJ
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
9923d5a4 3;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
90322fdb
MJ
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)
24412de4 23 #:use-module (guix git-download)
90322fdb
MJ
24 #:use-module (guix packages)
25 #:use-module (gnu packages ruby)
26 #:use-module (guix build-system ruby))
27
3aeb6e1d
MJ
28(define-public ruby-spring
29 (package
30 (name "ruby-spring")
29f49403 31 (version "1.7.2")
3aeb6e1d
MJ
32 (source
33 (origin
34 (method url-fetch)
35 (uri
36 (string-append "https://github.com/rails/spring/archive/v"
37 version ".tar.gz"))
38 (file-name (string-append name "-" version ".tar.gz"))
39 (sha256
40 (base32
29f49403 41 "1dd58y0cpsm2izj74yscn0ybfygmgcbbfdw1891g7cq41aai4b35"))))
3aeb6e1d
MJ
42 (build-system ruby-build-system)
43 (arguments
44 `(#:test-target "test:unit"
45 #:phases
46 (modify-phases %standard-phases
47 (add-before 'check 'remove-bump
48 (lambda _
49 (substitute* "spring.gemspec"
29f49403
BW
50 (("gem.add_development_dependency 'bump'") "")
51 (("gem.add_development_dependency 'activesupport'.*")
52 "gem.add_development_dependency 'activesupport'\n"))
3aeb6e1d
MJ
53 (substitute* "Rakefile"
54 (("require \\\"bump/tasks\\\"") ""))
55 #t)))))
56 (native-inputs
57 `(("bundler" ,bundler)
58 ("ruby-activesupport" ,ruby-activesupport)))
59 (synopsis "Ruby on Rails application preloader")
60 (description
61 "Spring is a Ruby on Rails application preloader. It speeds up
62development by keeping your application running in the background so the
63application does need to boot it every time you run a test, rake task or
64migration.")
65 (home-page "https://github.com/rails/spring")
66 (license license:expat)))
67
90322fdb
MJ
68(define-public ruby-debug-inspector
69 (package
70 (name "ruby-debug-inspector")
eec0c587 71 (version "0.0.3")
90322fdb
MJ
72 (source
73 (origin
74 (method url-fetch)
75 (uri (rubygems-uri "debug_inspector" version))
76 (sha256
77 (base32
eec0c587 78 "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0"))))
90322fdb
MJ
79 (build-system ruby-build-system)
80 (arguments
81 `(#:phases
82 (modify-phases %standard-phases
83 (replace 'check
84 (lambda _
9923d5a4
TGR
85 (invoke "rake" "compile")
86 (invoke "ruby" "-Ilib" "-e"
87 (string-append
88 "require 'debug_inspector'; RubyVM::DebugInspector."
89 "open{|dc| p dc.backtrace_locations}")))))))
90322fdb
MJ
90 (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API")
91 (description
92 "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector
93API.")
94 (home-page
95 "https://github.com/banister/debug_inspector")
96 (license license:expat)))
29fa6d84
CB
97
98(define-public ruby-activemodel
99 (package
100 (name "ruby-activemodel")
101 (version "5.2.2")
102 (source
103 (origin
104 (method url-fetch)
105 (uri (rubygems-uri "activemodel" version))
106 (sha256
107 (base32
108 "1xmwi3mw8g4shbjvkhk72ra3r5jccbdsd4piphqka2y1h8s7sxvi"))))
109 (build-system ruby-build-system)
110 (arguments
111 '(;; No included tests
112 #:tests? #f))
113 (propagated-inputs
114 `(("ruby-activesupport" ,ruby-activesupport)))
115 (synopsis "Toolkit for building modeling frameworks like Active Record")
116 (description
117 "This package provides a toolkit for building modeling frameworks like
118Active Record. ActiveSupport handles attributes, callbacks, validations,
119serialization, internationalization, and testing.")
120 (home-page "https://rubyonrails.org/")
121 (license license:expat)))
13cf6aee
CB
122
123(define-public ruby-activerecord
124 (package
125 (name "ruby-activerecord")
126 (version "5.2.2")
127 (source
128 (origin
129 (method url-fetch)
130 (uri (rubygems-uri "activerecord" version))
131 (sha256
132 (base32
133 "19a0sns6a5wz2wym25lb1dv4lbrrl5sd1n15s5ky2636znmhz30y"))))
134 (build-system ruby-build-system)
135 (arguments
136 '(;; No included tests
137 #:tests? #f))
138 (propagated-inputs
139 `(("ruby-activemodel" ,ruby-activemodel)
140 ("ruby-activesupport" ,ruby-activesupport)
141 ("ruby-arel" ,ruby-arel)))
142 (synopsis "Ruby library to connect to relational databases")
143 (description
144 "Active Record connects classes to relational database table to establish
145an almost zero-configuration persistence layer for applications.")
146 (home-page "https://rubyonrails.org")
147 (license license:expat)))
ab654da5
CB
148
149(define-public ruby-rails-html-sanitizer
150 (package
151 (name "ruby-rails-html-sanitizer")
152 (version "1.0.4")
153 (source
154 (origin
155 (method url-fetch)
156 (uri (rubygems-uri "rails-html-sanitizer" version))
157 (sha256
158 (base32
159 "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr"))))
160 (build-system ruby-build-system)
161 (arguments
162 '(;; No included tests
163 #:tests? #f))
164 (propagated-inputs
165 `(("ruby-loofah" ,ruby-loofah)))
166 (synopsis "HTML sanitization for Rails applications")
167 (description
168 "This gem is used to handle HTML sanitization in Rails applications. If
169you need similar functionality in non Rails apps consider using Loofah
170directly.")
171 (home-page "https://github.com/rails/rails-html-sanitizer")
172 (license license:expat)))
24412de4
CB
173
174(define-public ruby-rails-dom-testing
175 (package
176 (name "ruby-rails-dom-testing")
177 (version "2.0.2")
178 (source
179 (origin
180 (method git-fetch)
181 (uri (git-reference
182 (url "https://github.com/rails/rails-dom-testing.git")
183 (commit (string-append "v" version))))
184 (file-name (git-file-name name version))
185 (sha256
186 (base32
187 "0zrg6x1w3wjgklbhcphjmggl11jx5s8cl21qjqij7wknm412i5wl"))))
188 (build-system ruby-build-system)
189 (native-inputs
190 `(("bundler" ,bundler)))
191 (propagated-inputs
192 `(("ruby-activesupport" ,ruby-activesupport)
193 ("ruby-nokogiri" ,ruby-nokogiri)))
194 (synopsis "Compare HTML DOMs and assert certain elements exists")
195 (description
196 "This gem can compare HTML and assert certain elements exists. This is
197useful when writing tests.")
198 (home-page "https://github.com/rails/rails-dom-testing")
199 (license license:expat)))
1c48c539
CB
200
201(define-public ruby-actionview
202 (package
203 (name "ruby-actionview")
204 (version "5.2.2")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (rubygems-uri "actionview" version))
209 (sha256
210 (base32
211 "1lz04drbi1z0xhvb8jnr14pbf505lilr02arahxq7y3mxiz0rs8z"))))
212 (build-system ruby-build-system)
213 (arguments
214 '(;; No included tests
215 #:tests? #f))
216 (propagated-inputs
217 `(("ruby-activesupport" ,ruby-activesupport)
218 ("ruby-builder" ,ruby-builder)
219 ("ruby-erubi" ,ruby-erubi)
220 ("ruby-rails-dom-testing" ,ruby-rails-dom-testing)
221 ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer)))
222 (synopsis "Conventions and helpers for building web pages")
223 (description
224 "ActionView provides conventions and helpers for building web pages in
225Ruby.")
226 (home-page "https://rubyonrails.org/")
227 (license license:expat)))
7b062e98
CB
228
229(define-public ruby-actionpack
230 (package
231 (name "ruby-actionpack")
232 (version "5.2.2")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (rubygems-uri "actionpack" version))
237 (sha256
238 (base32
239 "0iwhbqqn0cm39dq040iwq8cfyclqk3kyzwlp5k3j5cz8k2668wws"))))
240 (build-system ruby-build-system)
241 (arguments
242 '(;; No included tests
243 #:tests? #f))
244 (propagated-inputs
245 `(("ruby-actionview" ,ruby-actionview)
246 ("ruby-activesupport" ,ruby-activesupport)
247 ("ruby-rack" ,ruby-rack)
248 ("ruby-rack-test" ,ruby-rack-test)
249 ("ruby-rails-dom-testing" ,ruby-rails-dom-testing)
250 ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer)))
251 (synopsis "Conventions for building and testing MVC web applications")
252 (description
253 "ActionPack provides conventions for building and testing MVC web
254applications. These work with any Rack-compatible server.")
255 (home-page "https://rubyonrails.org/")
256 (license license:expat)))
937c8862
CB
257
258(define-public ruby-actioncable
259 (package
260 (name "ruby-actioncable")
261 (version "5.2.2")
262 (source
263 (origin
264 (method url-fetch)
265 (uri (rubygems-uri "actioncable" version))
266 (sha256
267 (base32
268 "0826k5ch0l03f9yrkxy69aiv039z4qi00lnahw2rzywd2iz6r68x"))))
269 (build-system ruby-build-system)
270 (arguments
271 '(;; No included tests
272 #:tests? #f))
273 (propagated-inputs
274 `(("ruby-actionpack" ,ruby-actionpack)
275 ("ruby-nio4r" ,ruby-nio4r)
276 ("ruby-websocket-driver" ,ruby-websocket-driver)))
277 (synopsis "Integrate integrates WebSockets with Rails applications")
278 (description
279 "Action Cable integrates WebSockets with Rails applications. Through
280WebSockets it allows for real-time features in web applications.")
281 (home-page "https://rubyonrails.org/")
282 (license license:expat)))