Commit | Line | Data |
---|---|---|
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 | |
62 | development by keeping your application running in the background so the | |
63 | application does need to boot it every time you run a test, rake task or | |
64 | migration.") | |
65 | (home-page "https://github.com/rails/spring") | |
66 | (license license:expat))) | |
67 | ||
a7749465 CB |
68 | (define-public ruby-sass-rails |
69 | (package | |
70 | (name "ruby-sass-rails") | |
71 | (version "5.0.7") | |
72 | (source | |
73 | (origin | |
74 | (method url-fetch) | |
75 | (uri (rubygems-uri "sass-rails" version)) | |
76 | (sha256 | |
77 | (base32 | |
78 | "1wa63sbsimrsf7nfm8h0m1wbsllkfxvd7naph5d1j6pbc555ma7s")))) | |
79 | (build-system ruby-build-system) | |
80 | (arguments | |
81 | '(#:tests? #f)) ; No included tests | |
82 | (propagated-inputs | |
83 | `(("ruby-railties" ,ruby-railties) | |
84 | ("ruby-sass" ,ruby-sass) | |
85 | ("ruby-sprockets" ,ruby-sprockets) | |
86 | ("ruby-sprockets-rails" ,ruby-sprockets-rails) | |
87 | ("ruby-tilt" ,ruby-tilt))) | |
88 | (synopsis "Sass adapter for the Rails asset pipeline") | |
89 | (description | |
90 | "This library integrates the SASS stylesheet language into Ruby on | |
91 | Rails.") | |
92 | (home-page "https://github.com/rails/sass-rails") | |
93 | (license license:expat))) | |
94 | ||
90322fdb MJ |
95 | (define-public ruby-debug-inspector |
96 | (package | |
97 | (name "ruby-debug-inspector") | |
eec0c587 | 98 | (version "0.0.3") |
90322fdb MJ |
99 | (source |
100 | (origin | |
101 | (method url-fetch) | |
102 | (uri (rubygems-uri "debug_inspector" version)) | |
103 | (sha256 | |
104 | (base32 | |
eec0c587 | 105 | "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0")))) |
90322fdb MJ |
106 | (build-system ruby-build-system) |
107 | (arguments | |
108 | `(#:phases | |
109 | (modify-phases %standard-phases | |
110 | (replace 'check | |
111 | (lambda _ | |
9923d5a4 TGR |
112 | (invoke "rake" "compile") |
113 | (invoke "ruby" "-Ilib" "-e" | |
114 | (string-append | |
115 | "require 'debug_inspector'; RubyVM::DebugInspector." | |
116 | "open{|dc| p dc.backtrace_locations}"))))))) | |
90322fdb MJ |
117 | (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API") |
118 | (description | |
119 | "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector | |
120 | API.") | |
121 | (home-page | |
122 | "https://github.com/banister/debug_inspector") | |
123 | (license license:expat))) | |
29fa6d84 CB |
124 | |
125 | (define-public ruby-activemodel | |
126 | (package | |
127 | (name "ruby-activemodel") | |
22468de4 | 128 | (version "5.2.2.1") |
29fa6d84 CB |
129 | (source |
130 | (origin | |
131 | (method url-fetch) | |
132 | (uri (rubygems-uri "activemodel" version)) | |
133 | (sha256 | |
134 | (base32 | |
22468de4 | 135 | "1idmvqvpgri34k31s44pjb88rc3jad3yxra7fd1kpidpnv5f3v65")))) |
29fa6d84 CB |
136 | (build-system ruby-build-system) |
137 | (arguments | |
138 | '(;; No included tests | |
139 | #:tests? #f)) | |
140 | (propagated-inputs | |
141 | `(("ruby-activesupport" ,ruby-activesupport))) | |
142 | (synopsis "Toolkit for building modeling frameworks like Active Record") | |
143 | (description | |
144 | "This package provides a toolkit for building modeling frameworks like | |
145 | Active Record. ActiveSupport handles attributes, callbacks, validations, | |
146 | serialization, internationalization, and testing.") | |
147 | (home-page "https://rubyonrails.org/") | |
148 | (license license:expat))) | |
13cf6aee CB |
149 | |
150 | (define-public ruby-activerecord | |
151 | (package | |
152 | (name "ruby-activerecord") | |
0fb8ed17 | 153 | (version "5.2.2.1") |
13cf6aee CB |
154 | (source |
155 | (origin | |
156 | (method url-fetch) | |
157 | (uri (rubygems-uri "activerecord" version)) | |
158 | (sha256 | |
159 | (base32 | |
0fb8ed17 | 160 | "1c5cz9v7ggpqjxf0fqs1xhy1pb9m34cp31pxarhs9aqb71qjl98v")))) |
13cf6aee CB |
161 | (build-system ruby-build-system) |
162 | (arguments | |
163 | '(;; No included tests | |
164 | #:tests? #f)) | |
165 | (propagated-inputs | |
166 | `(("ruby-activemodel" ,ruby-activemodel) | |
167 | ("ruby-activesupport" ,ruby-activesupport) | |
168 | ("ruby-arel" ,ruby-arel))) | |
169 | (synopsis "Ruby library to connect to relational databases") | |
170 | (description | |
171 | "Active Record connects classes to relational database table to establish | |
172 | an almost zero-configuration persistence layer for applications.") | |
173 | (home-page "https://rubyonrails.org") | |
174 | (license license:expat))) | |
ab654da5 | 175 | |
87688ff3 CB |
176 | (define-public ruby-rspec-rails |
177 | (package | |
178 | (name "ruby-rspec-rails") | |
179 | (version "3.8.2") | |
180 | (source | |
181 | (origin | |
182 | (method url-fetch) | |
183 | (uri (rubygems-uri "rspec-rails" version)) | |
184 | (sha256 | |
185 | (base32 | |
186 | "1pf6n9l4sw1arlax1bdbm1znsvl8cgna2n6k6yk1bi8vz2n73ls1")))) | |
187 | (build-system ruby-build-system) | |
188 | (arguments | |
189 | '(#:tests? #f)) ; No included tests | |
190 | (propagated-inputs | |
191 | `(("ruby-actionpack" ,ruby-actionpack) | |
192 | ("ruby-activesupport" ,ruby-activesupport) | |
193 | ("ruby-railties" ,ruby-railties) | |
194 | ("ruby-rspec-core" ,ruby-rspec-core) | |
195 | ("ruby-rspec-expectations" ,ruby-rspec-expectations) | |
196 | ("ruby-rspec-mocks" ,ruby-rspec-mocks) | |
197 | ("ruby-rspec-support" ,ruby-rspec-support))) | |
198 | (synopsis "Use RSpec to test Ruby on Rails applications") | |
199 | (description | |
200 | "This package provides support for using RSpec to test Ruby on Rails | |
201 | applications, in pace of the default Minitest testing library.") | |
202 | (home-page "https://github.com/rspec/rspec-rails") | |
203 | (license license:expat))) | |
204 | ||
ab654da5 CB |
205 | (define-public ruby-rails-html-sanitizer |
206 | (package | |
207 | (name "ruby-rails-html-sanitizer") | |
208 | (version "1.0.4") | |
209 | (source | |
210 | (origin | |
211 | (method url-fetch) | |
212 | (uri (rubygems-uri "rails-html-sanitizer" version)) | |
213 | (sha256 | |
214 | (base32 | |
215 | "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr")))) | |
216 | (build-system ruby-build-system) | |
217 | (arguments | |
218 | '(;; No included tests | |
219 | #:tests? #f)) | |
220 | (propagated-inputs | |
221 | `(("ruby-loofah" ,ruby-loofah))) | |
222 | (synopsis "HTML sanitization for Rails applications") | |
223 | (description | |
224 | "This gem is used to handle HTML sanitization in Rails applications. If | |
225 | you need similar functionality in non Rails apps consider using Loofah | |
226 | directly.") | |
227 | (home-page "https://github.com/rails/rails-html-sanitizer") | |
228 | (license license:expat))) | |
24412de4 CB |
229 | |
230 | (define-public ruby-rails-dom-testing | |
231 | (package | |
232 | (name "ruby-rails-dom-testing") | |
233 | (version "2.0.2") | |
234 | (source | |
235 | (origin | |
236 | (method git-fetch) | |
237 | (uri (git-reference | |
238 | (url "https://github.com/rails/rails-dom-testing.git") | |
239 | (commit (string-append "v" version)))) | |
240 | (file-name (git-file-name name version)) | |
241 | (sha256 | |
242 | (base32 | |
243 | "0zrg6x1w3wjgklbhcphjmggl11jx5s8cl21qjqij7wknm412i5wl")))) | |
244 | (build-system ruby-build-system) | |
245 | (native-inputs | |
246 | `(("bundler" ,bundler))) | |
247 | (propagated-inputs | |
248 | `(("ruby-activesupport" ,ruby-activesupport) | |
249 | ("ruby-nokogiri" ,ruby-nokogiri))) | |
250 | (synopsis "Compare HTML DOMs and assert certain elements exists") | |
251 | (description | |
252 | "This gem can compare HTML and assert certain elements exists. This is | |
253 | useful when writing tests.") | |
254 | (home-page "https://github.com/rails/rails-dom-testing") | |
255 | (license license:expat))) | |
1c48c539 CB |
256 | |
257 | (define-public ruby-actionview | |
258 | (package | |
259 | (name "ruby-actionview") | |
e8df5a50 | 260 | (version "5.2.2.1") |
1c48c539 CB |
261 | (source |
262 | (origin | |
263 | (method url-fetch) | |
264 | (uri (rubygems-uri "actionview" version)) | |
265 | (sha256 | |
266 | (base32 | |
e8df5a50 | 267 | "0832vlx37rly8ryfgi01b20mld8b3bv9cg62n5wax4zpzgn6jdxb")))) |
1c48c539 CB |
268 | (build-system ruby-build-system) |
269 | (arguments | |
270 | '(;; No included tests | |
271 | #:tests? #f)) | |
272 | (propagated-inputs | |
273 | `(("ruby-activesupport" ,ruby-activesupport) | |
274 | ("ruby-builder" ,ruby-builder) | |
275 | ("ruby-erubi" ,ruby-erubi) | |
276 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
277 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
278 | (synopsis "Conventions and helpers for building web pages") | |
279 | (description | |
280 | "ActionView provides conventions and helpers for building web pages in | |
281 | Ruby.") | |
282 | (home-page "https://rubyonrails.org/") | |
283 | (license license:expat))) | |
7b062e98 CB |
284 | |
285 | (define-public ruby-actionpack | |
286 | (package | |
287 | (name "ruby-actionpack") | |
24c704af | 288 | (version "5.2.2.1") |
7b062e98 CB |
289 | (source |
290 | (origin | |
291 | (method url-fetch) | |
292 | (uri (rubygems-uri "actionpack" version)) | |
293 | (sha256 | |
294 | (base32 | |
24c704af | 295 | "1lxqzxa728dqg42yw0q4hqkaawqagiw1k0392an2ghjfgb16pafx")))) |
7b062e98 CB |
296 | (build-system ruby-build-system) |
297 | (arguments | |
298 | '(;; No included tests | |
299 | #:tests? #f)) | |
300 | (propagated-inputs | |
301 | `(("ruby-actionview" ,ruby-actionview) | |
302 | ("ruby-activesupport" ,ruby-activesupport) | |
303 | ("ruby-rack" ,ruby-rack) | |
304 | ("ruby-rack-test" ,ruby-rack-test) | |
305 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing) | |
306 | ("ruby-rails-html-sanitizer" ,ruby-rails-html-sanitizer))) | |
307 | (synopsis "Conventions for building and testing MVC web applications") | |
308 | (description | |
309 | "ActionPack provides conventions for building and testing MVC web | |
310 | applications. These work with any Rack-compatible server.") | |
311 | (home-page "https://rubyonrails.org/") | |
312 | (license license:expat))) | |
937c8862 CB |
313 | |
314 | (define-public ruby-actioncable | |
315 | (package | |
316 | (name "ruby-actioncable") | |
2a737e80 | 317 | (version "5.2.2.1") |
937c8862 CB |
318 | (source |
319 | (origin | |
320 | (method url-fetch) | |
321 | (uri (rubygems-uri "actioncable" version)) | |
322 | (sha256 | |
323 | (base32 | |
2a737e80 | 324 | "1x5fxhsr2mxq5r6258s48xsn7ld081d3qaavppvj7yp7w9vqn871")))) |
937c8862 CB |
325 | (build-system ruby-build-system) |
326 | (arguments | |
327 | '(;; No included tests | |
328 | #:tests? #f)) | |
329 | (propagated-inputs | |
330 | `(("ruby-actionpack" ,ruby-actionpack) | |
331 | ("ruby-nio4r" ,ruby-nio4r) | |
332 | ("ruby-websocket-driver" ,ruby-websocket-driver))) | |
333 | (synopsis "Integrate integrates WebSockets with Rails applications") | |
334 | (description | |
335 | "Action Cable integrates WebSockets with Rails applications. Through | |
336 | WebSockets it allows for real-time features in web applications.") | |
337 | (home-page "https://rubyonrails.org/") | |
338 | (license license:expat))) | |
ca09c4b5 CB |
339 | |
340 | (define-public ruby-activejob | |
341 | (package | |
342 | (name "ruby-activejob") | |
fbc2309f | 343 | (version "5.2.2.1") |
ca09c4b5 CB |
344 | (source |
345 | (origin | |
346 | (method url-fetch) | |
347 | (uri (rubygems-uri "activejob" version)) | |
348 | (sha256 | |
349 | (base32 | |
fbc2309f | 350 | "1zma452lc3qp4a7r10zbdmsci0kv9a3gnk4da2apbdrc8fib5mr3")))) |
ca09c4b5 CB |
351 | (build-system ruby-build-system) |
352 | (arguments | |
353 | '(;; No included tests | |
354 | #:tests? #f)) | |
355 | (propagated-inputs | |
356 | `(("ruby-activesupport" ,ruby-activesupport) | |
357 | ("ruby-globalid" ,ruby-globalid))) | |
358 | (synopsis "Declare job classes for multiple backends") | |
359 | (description | |
360 | "ActiveJob allows declaring job classes in a common way across Rails | |
361 | applications.") | |
362 | (home-page "https://rubyonrails.org/") | |
363 | (license license:expat))) | |
0fc30899 | 364 | |
07884945 CB |
365 | (define-public ruby-activestorage |
366 | (package | |
367 | (name "ruby-activestorage") | |
e16dd189 | 368 | (version "5.2.2.1") |
07884945 CB |
369 | (source |
370 | (origin | |
371 | (method url-fetch) | |
372 | (uri (rubygems-uri "activestorage" version)) | |
373 | (sha256 | |
374 | (base32 | |
e16dd189 | 375 | "155xpbzrz0kr0argx0vsh5prvadd2h1g1m61kdiabvfy2iygc02n")))) |
07884945 CB |
376 | (build-system ruby-build-system) |
377 | (arguments | |
378 | '(;; No included tests | |
379 | #:tests? #f)) | |
380 | (propagated-inputs | |
381 | `(("ruby-actionpack" ,ruby-actionpack) | |
382 | ("ruby-activerecord" ,ruby-activerecord) | |
383 | ("ruby-marcel" ,ruby-marcel))) | |
384 | (synopsis "Integrate file storage services in to Rails applications") | |
385 | (description | |
386 | "ActiveStorage integrates file storage services with Rails applications, | |
387 | allowing files to be attached to ActiveRecord models..") | |
388 | (home-page "https://rubyonrails.org/") | |
389 | (license license:expat))) | |
390 | ||
0fc30899 CB |
391 | (define-public ruby-actionmailer |
392 | (package | |
393 | (name "ruby-actionmailer") | |
5be0aedf | 394 | (version "5.2.2.1") |
0fc30899 CB |
395 | (source |
396 | (origin | |
397 | (method url-fetch) | |
398 | (uri (rubygems-uri "actionmailer" version)) | |
399 | (sha256 | |
400 | (base32 | |
5be0aedf | 401 | "10n2v2al68rsq5ghrdp7cpycsc1q0m19fcd8cd5i528n30nl23iw")))) |
0fc30899 CB |
402 | (build-system ruby-build-system) |
403 | (arguments | |
404 | '(;; No included tests | |
405 | #:tests? #f)) | |
406 | (propagated-inputs | |
407 | `(("ruby-actionpack" ,ruby-actionpack) | |
408 | ("ruby-actionview" ,ruby-actionview) | |
409 | ("ruby-activejob" ,ruby-activejob) | |
410 | ("ruby-mail" ,ruby-mail) | |
411 | ("ruby-rails-dom-testing" ,ruby-rails-dom-testing))) | |
412 | (synopsis "Work with emails using the controller/view pattern") | |
413 | (description | |
414 | "Compose, deliver, receive, and test emails using the controller/view | |
415 | pattern. Including support for multipart email and attachments.") | |
416 | (home-page "https://rubyonrails.org/") | |
417 | (license license:expat))) | |
c8f079ca CB |
418 | |
419 | (define-public ruby-railties | |
420 | (package | |
421 | (name "ruby-railties") | |
1835fc26 | 422 | (version "5.2.2.1") |
c8f079ca CB |
423 | (source |
424 | (origin | |
425 | (method url-fetch) | |
426 | (uri (rubygems-uri "railties" version)) | |
427 | (sha256 | |
428 | (base32 | |
1835fc26 | 429 | "0al6mvh2jvr3n7cxkx0yvhgiiarby6gxc93vl5xg1yxkvx27qzd6")))) |
c8f079ca CB |
430 | (build-system ruby-build-system) |
431 | (arguments | |
432 | '(;; No included tests | |
433 | #:tests? #f)) | |
434 | (propagated-inputs | |
435 | `(("ruby-actionpack" ,ruby-actionpack) | |
436 | ("ruby-activesupport" ,ruby-activesupport) | |
437 | ("ruby-method-source" ,ruby-method-source) | |
438 | ("ruby-thor" ,ruby-thor))) | |
439 | (synopsis "Rails internals, including application bootup and generators") | |
440 | (description | |
441 | "@code{railties} provides the core Rails internals including handling | |
442 | application bootup, plugins, generators, and Rake tasks.") | |
443 | (home-page "https://rubyonrails.org/") | |
444 | (license license:expat))) | |
80c4bfa6 CB |
445 | |
446 | (define-public ruby-sprockets-rails | |
447 | (package | |
448 | (name "ruby-sprockets-rails") | |
449 | (version "3.2.1") | |
450 | (source | |
451 | (origin | |
452 | (method url-fetch) | |
453 | (uri (rubygems-uri "sprockets-rails" version)) | |
454 | (sha256 | |
455 | (base32 | |
456 | "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1")))) | |
457 | (build-system ruby-build-system) | |
458 | (arguments | |
459 | '(;; No included tests | |
460 | #:tests? #f)) | |
461 | (propagated-inputs | |
462 | `(("ruby-actionpack" ,ruby-actionpack) | |
463 | ("ruby-activesupport" ,ruby-activesupport) | |
464 | ("ruby-sprockets" ,ruby-sprockets))) | |
465 | (synopsis "Sprockets Rails integration") | |
466 | (description | |
467 | "Provides Sprockets implementation for the Rails Asset Pipeline.") | |
468 | (home-page | |
469 | "https://github.com/rails/sprockets-rails") | |
470 | (license license:expat))) | |
a3dbfbbd | 471 | |
ae9d1ab4 CB |
472 | (define-public ruby-web-console |
473 | (package | |
474 | (name "ruby-web-console") | |
475 | (version "3.7.0") | |
476 | (source | |
477 | (origin | |
478 | ;; Download from GitHub as test files are not provided in the gem. | |
479 | (method git-fetch) | |
480 | (uri (git-reference | |
481 | (url "https://github.com/rails/web-console.git") | |
482 | (commit (string-append "v" version)))) | |
483 | (file-name (git-file-name name version)) | |
484 | (sha256 | |
485 | (base32 | |
486 | "0ir999p8cnm3l3zwbgpwxxcq1vwkj8d0d3r24362cyaf4v1rglq2")))) | |
487 | (build-system ruby-build-system) | |
488 | (arguments | |
489 | '(#:phases | |
490 | (modify-phases %standard-phases | |
491 | (add-after 'unpack 'patch-Gemfile | |
492 | (lambda _ | |
493 | (substitute* "Gemfile" | |
494 | ;; Remove the github bit from the Gemfile, so that the Guix | |
495 | ;; packages are used. | |
496 | ((", github: .*") "\n") | |
497 | ;; The usual methods of not loading this group don't work, so | |
498 | ;; patch the Gemfile. | |
499 | (("group :development") "[].each") | |
500 | ;; tzinfo-data is propagated by ruby-activesupport, but it | |
501 | ;; needs to be in the Gemfile to become available. | |
502 | (("group :test do") "group :test do\n gem 'tzinfo-data'")) | |
503 | #t)) | |
504 | (add-after 'unpack 'fix-mocha-minitest-require | |
505 | (lambda _ | |
506 | (substitute* "test/test_helper.rb" | |
507 | ;; This chanegd in recent versions of Mocha | |
508 | (("mocha/minitest") "mocha/mini_test")) | |
509 | #t))))) | |
510 | (propagated-inputs | |
511 | `(("ruby-actionview" ,ruby-actionview) | |
512 | ("ruby-activemodel" ,ruby-activemodel) | |
513 | ("ruby-bindex" ,ruby-bindex) | |
514 | ("ruby-railties" ,ruby-railties))) | |
515 | (native-inputs | |
516 | `(("bundler" ,bundler) | |
517 | ("ruby-rails" ,ruby-rails) | |
518 | ("ruby-mocha" ,ruby-mocha) | |
519 | ("ruby-simplecov" ,ruby-simplecov))) | |
520 | (synopsis "Debugging tool for your Ruby on Rails applications") | |
521 | (description | |
522 | "This package allows you to create an interactive Ruby session in your | |
523 | browser. Those sessions are launched automatically in case of an error and | |
524 | can also be launched manually in any page.") | |
525 | (home-page "https://github.com/rails/web-console") | |
526 | (license license:expat))) | |
527 | ||
ad6471d4 CB |
528 | (define-public ruby-with-advisory-lock |
529 | (package | |
530 | (name "ruby-with-advisory-lock") | |
531 | (version "4.0.0") | |
532 | (source | |
533 | (origin | |
534 | (method url-fetch) | |
535 | (uri (rubygems-uri "with_advisory_lock" version)) | |
536 | (sha256 | |
537 | (base32 | |
538 | "1k37hxgmaqgsd54gplm5xim9nw3ghvqsbzaw7q4q64ha1nbd9a41")))) | |
539 | (build-system ruby-build-system) | |
540 | (arguments | |
541 | '(#:tests? #f)) ; TODO Tests require a running MySQL service | |
542 | (propagated-inputs | |
543 | `(("ruby-activerecord" ,ruby-activerecord))) | |
544 | (native-inputs | |
545 | `(("bundler" ,bundler) | |
546 | ("ruby-yard" ,ruby-yard) | |
547 | ("ruby-mysql2" ,ruby-mysql2))) | |
548 | (synopsis "Advisory locking for ActiveRecord") | |
549 | (description | |
550 | "The With advisory lock gem adds advisory locking to ActiveRecord for | |
551 | PostgreSQL and MySQL. SQLite is also supported, but this uses the filesystem | |
552 | for locks.") | |
553 | (home-page "https://closuretree.github.io/with_advisory_lock/") | |
554 | (license license:expat))) | |
555 | ||
a3dbfbbd CB |
556 | (define-public ruby-rails |
557 | (package | |
558 | (name "ruby-rails") | |
e2fbc272 | 559 | (version "5.2.2.1") |
a3dbfbbd CB |
560 | (source |
561 | (origin | |
562 | (method url-fetch) | |
563 | (uri (rubygems-uri "rails" version)) | |
564 | (sha256 | |
565 | (base32 | |
e2fbc272 | 566 | "1jxmwrykwgbn116hhmi7h75hcsdifhj89wk12m7ch2f3mn1lrmp9")))) |
a3dbfbbd CB |
567 | (build-system ruby-build-system) |
568 | (arguments | |
569 | '(#:phases | |
570 | (modify-phases %standard-phases | |
571 | ;; This gem acts as glue between the gems that actually make up | |
572 | ;; Rails. The important thing to check is that the gemspec matches up | |
573 | ;; with the Guix packages and Rubygems can successfully activate the | |
574 | ;; Rails gem. | |
575 | ;; | |
576 | ;; The following check phase tests this. | |
577 | (delete 'check) | |
578 | (add-after 'install 'check | |
579 | (lambda* (#:key tests? outputs #:allow-other-keys) | |
580 | (setenv "GEM_PATH" | |
581 | (string-append | |
582 | (getenv "GEM_PATH") | |
583 | ":" | |
584 | (assoc-ref outputs "out") "/lib/ruby/vendor_ruby")) | |
585 | (when tests? | |
586 | (invoke "ruby" "-e" "gem 'rails'")) | |
587 | #t))))) | |
588 | (propagated-inputs | |
589 | `(("ruby-activesupport" ,ruby-activesupport) | |
590 | ("ruby-actionpack" ,ruby-actionpack) | |
591 | ("ruby-actionview" ,ruby-actionview) | |
592 | ("ruby-activemodel" ,ruby-activemodel) | |
593 | ("ruby-activerecord" ,ruby-activerecord) | |
594 | ("ruby-actionmailer" ,ruby-actionmailer) | |
595 | ("ruby-activejob" ,ruby-activejob) | |
596 | ("ruby-actioncable" ,ruby-actioncable) | |
597 | ("ruby-activestorage" ,ruby-activestorage) | |
598 | ("ruby-railties" ,ruby-railties) | |
599 | ("bundler" ,bundler) | |
600 | ("ruby-sprockets-rails" ,ruby-sprockets-rails))) | |
601 | (synopsis "Full-stack web framework optimized for programmer happiness") | |
602 | (description | |
603 | "Ruby on Rails is a full-stack web framework optimized for programmer | |
604 | happiness and sustainable productivity. It encourages beautiful code by | |
605 | favoring convention over configuration.") | |
606 | (home-page "https://rubyonrails.org/") | |
607 | (license license:expat))) |