rails.scm 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  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. ;;; Copyright © 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu packages rails)
  21. #:use-module ((guix licenses) #:prefix license:)
  22. #:use-module (guix download)
  23. #:use-module (guix git-download)
  24. #:use-module (guix packages)
  25. #:use-module (gnu packages node)
  26. #:use-module (gnu packages ruby)
  27. #:use-module (guix build-system ruby))
  28. (define-public ruby-spring
  29. (package
  30. (name "ruby-spring")
  31. (version "1.7.2")
  32. (source
  33. (origin
  34. (method git-fetch)
  35. (uri (git-reference
  36. (url "https://github.com/rails/spring")
  37. (commit (string-append "v" version))))
  38. (file-name (git-file-name name version))
  39. (sha256
  40. (base32
  41. "0smwrndjmnr7g7jjskw05zin3gh6kx5db6yrkiqi6i9wl5mrn9n5"))))
  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"
  50. (("gem.add_development_dependency 'bump'") "")
  51. (("gem.add_development_dependency 'activesupport'.*")
  52. "gem.add_development_dependency 'activesupport'\n"))
  53. (substitute* "Rakefile"
  54. (("require \\\"bump/tasks\\\"") ""))
  55. #t)))))
  56. (native-inputs
  57. (list bundler 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. (define-public ruby-sass-rails
  67. (package
  68. (name "ruby-sass-rails")
  69. (version "5.0.7")
  70. (source
  71. (origin
  72. (method url-fetch)
  73. (uri (rubygems-uri "sass-rails" version))
  74. (sha256
  75. (base32
  76. "1wa63sbsimrsf7nfm8h0m1wbsllkfxvd7naph5d1j6pbc555ma7s"))))
  77. (build-system ruby-build-system)
  78. (arguments
  79. '(#:tests? #f)) ; No included tests
  80. (propagated-inputs
  81. (list ruby-railties ruby-sass ruby-sprockets ruby-sprockets-rails
  82. ruby-tilt))
  83. (synopsis "Sass adapter for the Rails asset pipeline")
  84. (description
  85. "This library integrates the SASS stylesheet language into Ruby on
  86. Rails.")
  87. (home-page "https://github.com/rails/sass-rails")
  88. (license license:expat)))
  89. (define-public ruby-debug-inspector
  90. (package
  91. (name "ruby-debug-inspector")
  92. (version "0.0.3")
  93. (source
  94. (origin
  95. (method url-fetch)
  96. (uri (rubygems-uri "debug_inspector" version))
  97. (sha256
  98. (base32
  99. "0vxr0xa1mfbkfcrn71n7c4f2dj7la5hvphn904vh20j3x4j5lrx0"))))
  100. (build-system ruby-build-system)
  101. (arguments
  102. `(#:phases
  103. (modify-phases %standard-phases
  104. (replace 'check
  105. (lambda _
  106. (invoke "rake" "compile")
  107. (invoke "ruby" "-Ilib" "-e"
  108. (string-append
  109. "require 'debug_inspector'; RubyVM::DebugInspector."
  110. "open{|dc| p dc.backtrace_locations}")))))))
  111. (synopsis "Ruby wrapper for the MRI 2.0 debug_inspector API")
  112. (description
  113. "This package provides a Ruby wrapper for the MRI 2.0 debug_inspector
  114. API.")
  115. (home-page
  116. "https://github.com/banister/debug_inspector")
  117. (license license:expat)))
  118. (define-public ruby-autoprefixer-rails
  119. (package
  120. (name "ruby-autoprefixer-rails")
  121. (version "9.4.7")
  122. (source
  123. (origin
  124. (method url-fetch)
  125. (uri (rubygems-uri "autoprefixer-rails" version))
  126. (sha256
  127. (base32
  128. "0fxbfl3xrrjj84n98x24yzxbz4nvm6c492dxj41kkrl9z97ga13i"))))
  129. (build-system ruby-build-system)
  130. (arguments
  131. '(#:test-target "spec"
  132. #:phases
  133. (modify-phases %standard-phases
  134. (add-after 'extract-gemspec 'remove-unnecessary-dependencies
  135. (lambda _
  136. ;; Remove the testing of compass, as its use is deprecated, and
  137. ;; it's unpackaged for Guix.
  138. (substitute* "autoprefixer-rails.gemspec"
  139. ((".*%q<compass>.*") "\n")
  140. (("\"spec/compass_spec\\.rb\"\\.freeze, ") ""))
  141. (delete-file "spec/compass_spec.rb")
  142. (substitute* "Gemfile"
  143. ;; Remove overly strict requirement on sprockets
  144. ((", '>= 4\\.0\\.0\\.beta1'") "")
  145. ;; The mini_racer gem isn't packaged yet, and it's not directly
  146. ;; required, as other backends for ruby-execjs can be used.
  147. (("gem 'mini_racer'") "")
  148. ;; For some reason, this is required for the gems to be picked
  149. ;; up
  150. (("gemspec") "gemspec\ngem 'tzinfo-data'\ngem 'sass'"))
  151. #t)))))
  152. (native-inputs
  153. (list bundler
  154. ruby-rails
  155. ruby-rspec-rails
  156. ;; This is needed for a test, but I'm unsure why
  157. ruby-sass
  158. ;; This is used as the ruby-execjs runtime
  159. node))
  160. (propagated-inputs
  161. (list ruby-execjs))
  162. (synopsis "Parse CSS and add vendor prefixes to CSS rules")
  163. (description
  164. "This gem provides Ruby and Ruby on Rails integration with Autoprefixer,
  165. which can parse CSS and add vendor prefixes to CSS rules using values from the
  166. Can I Use website.")
  167. (home-page "https://github.com/ai/autoprefixer-rails")
  168. (license license:expat)))
  169. (define-public ruby-activemodel
  170. (package
  171. (name "ruby-activemodel")
  172. (version "6.1.3")
  173. (source
  174. (origin
  175. (method url-fetch)
  176. (uri (rubygems-uri "activemodel" version))
  177. (sha256
  178. (base32
  179. "07m85r00cd1dzxg65zr9wjrdqppw51b5ka9c5mrz92vnw18kfb70"))))
  180. (build-system ruby-build-system)
  181. (arguments
  182. '(;; No included tests
  183. #:tests? #f))
  184. (propagated-inputs
  185. (list ruby-activesupport))
  186. (synopsis "Toolkit for building modeling frameworks like Active Record")
  187. (description
  188. "This package provides a toolkit for building modeling frameworks like
  189. Active Record. ActiveSupport handles attributes, callbacks, validations,
  190. serialization, internationalization, and testing.")
  191. (home-page "https://rubyonrails.org/")
  192. (license license:expat)))
  193. (define-public ruby-activerecord
  194. (package
  195. (name "ruby-activerecord")
  196. (version "6.1.3")
  197. (source
  198. (origin
  199. (method url-fetch)
  200. (uri (rubygems-uri "activerecord" version))
  201. (sha256
  202. (base32
  203. "03kr6vslwd9iw89jidjpjlp7prr2rf7kpsfa4fz03g9by0kliivs"))))
  204. (build-system ruby-build-system)
  205. (arguments
  206. '(;; No included tests
  207. #:tests? #f))
  208. (propagated-inputs
  209. (list ruby-activemodel ruby-activesupport ruby-arel))
  210. (synopsis "Ruby library to connect to relational databases")
  211. (description
  212. "Active Record connects classes to relational database table to establish
  213. an almost zero-configuration persistence layer for applications.")
  214. (home-page "https://rubyonrails.org")
  215. (license license:expat)))
  216. (define-public ruby-rspec-rails
  217. (package
  218. (name "ruby-rspec-rails")
  219. (version "3.8.2")
  220. (source
  221. (origin
  222. (method url-fetch)
  223. (uri (rubygems-uri "rspec-rails" version))
  224. (sha256
  225. (base32
  226. "1pf6n9l4sw1arlax1bdbm1znsvl8cgna2n6k6yk1bi8vz2n73ls1"))))
  227. (build-system ruby-build-system)
  228. (arguments
  229. '(#:tests? #f)) ; No included tests
  230. (propagated-inputs
  231. (list ruby-actionpack
  232. ruby-activesupport
  233. ruby-railties
  234. ruby-rspec-core
  235. ruby-rspec-expectations
  236. ruby-rspec-mocks
  237. ruby-rspec-support))
  238. (synopsis "Use RSpec to test Ruby on Rails applications")
  239. (description
  240. "This package provides support for using RSpec to test Ruby on Rails
  241. applications, in pace of the default Minitest testing library.")
  242. (home-page "https://github.com/rspec/rspec-rails")
  243. (license license:expat)))
  244. (define-public ruby-rails-html-sanitizer
  245. (package
  246. (name "ruby-rails-html-sanitizer")
  247. (version "1.3.0")
  248. (source
  249. (origin
  250. (method url-fetch)
  251. (uri (rubygems-uri "rails-html-sanitizer" version))
  252. (sha256
  253. (base32
  254. "1icpqmxbppl4ynzmn6dx7wdil5hhq6fz707m9ya6d86c7ys8sd4f"))))
  255. (build-system ruby-build-system)
  256. (arguments
  257. '(;; No included tests
  258. #:tests? #f))
  259. (propagated-inputs
  260. (list ruby-loofah))
  261. (synopsis "HTML sanitization for Rails applications")
  262. (description
  263. "This gem is used to handle HTML sanitization in Rails applications. If
  264. you need similar functionality in non Rails apps consider using Loofah
  265. directly.")
  266. (home-page "https://github.com/rails/rails-html-sanitizer")
  267. (license license:expat)))
  268. (define-public ruby-rails-dom-testing
  269. (package
  270. (name "ruby-rails-dom-testing")
  271. (version "2.0.3")
  272. (source
  273. (origin
  274. (method git-fetch)
  275. (uri (git-reference
  276. (url "https://github.com/rails/rails-dom-testing")
  277. (commit (string-append "v" version))))
  278. (file-name (git-file-name name version))
  279. (sha256
  280. (base32
  281. "17vdh273cmmfpzy5m546dd13zqmimv54jjx0f7sl0zi5lwz0gnck"))))
  282. (build-system ruby-build-system)
  283. (native-inputs
  284. (list bundler))
  285. (propagated-inputs
  286. (list ruby-activesupport ruby-nokogiri))
  287. (synopsis "Compare HTML DOMs and assert certain elements exists")
  288. (description
  289. "This gem can compare HTML and assert certain elements exists. This is
  290. useful when writing tests.")
  291. (home-page "https://github.com/rails/rails-dom-testing")
  292. (license license:expat)))
  293. (define-public ruby-actiontext
  294. (package
  295. (name "ruby-actiontext")
  296. (version "6.1.3")
  297. (source
  298. (origin
  299. (method url-fetch)
  300. (uri (rubygems-uri "actiontext" version))
  301. (sha256
  302. (base32
  303. "04k4z4xj40sbzbgx0x9m6i8k0nc22jb6dkrlslj16p2z2dfnwhqg"))))
  304. (build-system ruby-build-system)
  305. (arguments
  306. '(;; No included tests
  307. #:tests? #f))
  308. (propagated-inputs
  309. (list ruby-actionpack ruby-activerecord ruby-activestorage
  310. ruby-activesupport ruby-nokogiri))
  311. (synopsis "Edit and display rich text in Rails applications")
  312. (description
  313. "ActionText edits and displays rich text in Rails applications.")
  314. (home-page "https://rubyonrails.org")
  315. (license license:expat)))
  316. (define-public ruby-actionview
  317. (package
  318. (name "ruby-actionview")
  319. (version "6.1.3")
  320. (source
  321. (origin
  322. (method url-fetch)
  323. (uri (rubygems-uri "actionview" version))
  324. (sha256
  325. (base32
  326. "1s5kc1abi7id1g54lz1npgc42zl7pbz172wp8pi7j3s7qljafzw5"))))
  327. (build-system ruby-build-system)
  328. (arguments
  329. '(;; No included tests
  330. #:tests? #f))
  331. (propagated-inputs
  332. (list ruby-activesupport ruby-builder ruby-erubi
  333. ruby-rails-dom-testing ruby-rails-html-sanitizer))
  334. (synopsis "Conventions and helpers for building web pages")
  335. (description
  336. "ActionView provides conventions and helpers for building web pages in
  337. Ruby.")
  338. (home-page "https://rubyonrails.org/")
  339. (license license:expat)))
  340. (define-public ruby-actionpack
  341. (package
  342. (name "ruby-actionpack")
  343. (version "6.1.3")
  344. (source
  345. (origin
  346. (method url-fetch)
  347. (uri (rubygems-uri "actionpack" version))
  348. (sha256
  349. (base32
  350. "030yyaskzlic5cp4d9zbwwr3rhf4k6hsls44a7ihsfd6r8mlivq5"))))
  351. (build-system ruby-build-system)
  352. (arguments
  353. '(;; No included tests
  354. #:tests? #f))
  355. (propagated-inputs
  356. (list ruby-actionview
  357. ruby-activesupport
  358. ruby-rack
  359. ruby-rack-test
  360. ruby-rails-dom-testing
  361. ruby-rails-html-sanitizer))
  362. (synopsis "Conventions for building and testing MVC web applications")
  363. (description
  364. "ActionPack provides conventions for building and testing MVC web
  365. applications. These work with any Rack-compatible server.")
  366. (home-page "https://rubyonrails.org/")
  367. (license license:expat)))
  368. (define-public ruby-actioncable
  369. (package
  370. (name "ruby-actioncable")
  371. (version "6.1.3")
  372. (source
  373. (origin
  374. (method url-fetch)
  375. (uri (rubygems-uri "actioncable" version))
  376. (sha256
  377. (base32
  378. "1cgb1l0gml1vklxka2djpi5q5b4bgzgm5pahzfjvvgm5vzvrvi9v"))))
  379. (build-system ruby-build-system)
  380. (arguments
  381. '(;; No included tests
  382. #:tests? #f))
  383. (propagated-inputs
  384. (list ruby-actionpack ruby-activesupport ruby-nio4r
  385. ruby-websocket-driver))
  386. (synopsis "Integrate integrates WebSockets with Rails applications")
  387. (description
  388. "Action Cable integrates WebSockets with Rails applications. Through
  389. WebSockets it allows for real-time features in web applications.")
  390. (home-page "https://rubyonrails.org/")
  391. (license license:expat)))
  392. (define-public ruby-activejob
  393. (package
  394. (name "ruby-activejob")
  395. (version "6.1.3")
  396. (source
  397. (origin
  398. (method url-fetch)
  399. (uri (rubygems-uri "activejob" version))
  400. (sha256
  401. (base32
  402. "175d8q0achdlsxjsvq0w9znvfqfkgbj75kbmdrvg4fb277wwplmf"))))
  403. (build-system ruby-build-system)
  404. (arguments
  405. '(;; No included tests
  406. #:tests? #f))
  407. (propagated-inputs
  408. (list ruby-activesupport ruby-globalid))
  409. (synopsis "Declare job classes for multiple backends")
  410. (description
  411. "ActiveJob allows declaring job classes in a common way across Rails
  412. applications.")
  413. (home-page "https://rubyonrails.org/")
  414. (license license:expat)))
  415. (define-public ruby-activestorage
  416. (package
  417. (name "ruby-activestorage")
  418. (version "6.1.3")
  419. (source
  420. (origin
  421. (method url-fetch)
  422. (uri (rubygems-uri "activestorage" version))
  423. (sha256
  424. (base32
  425. "0gkxvbi5w8zmdxpiyz3b10kzz8cxqqh9bj81sjl3fp8wa3v2ld4i"))))
  426. (build-system ruby-build-system)
  427. (arguments
  428. '(;; No included tests
  429. #:tests? #f))
  430. (propagated-inputs
  431. (list ruby-actionpack
  432. ruby-activejob
  433. ruby-activerecord
  434. ruby-activesupport
  435. ruby-marcel
  436. ruby-mimemagic))
  437. (synopsis "Integrate file storage services in to Rails applications")
  438. (description
  439. "ActiveStorage integrates file storage services with Rails applications,
  440. allowing files to be attached to ActiveRecord models.")
  441. (home-page "https://rubyonrails.org/")
  442. (license license:expat)))
  443. (define-public ruby-actionmailbox
  444. (package
  445. (name "ruby-actionmailbox")
  446. (version "6.1.3")
  447. (source
  448. (origin
  449. (method url-fetch)
  450. (uri (rubygems-uri "actionmailbox" version))
  451. (sha256
  452. (base32
  453. "0wv2p24xn4f0kj8kiyagkn934hzrcp98vzjqxwd4r75qq0cijadp"))))
  454. (build-system ruby-build-system)
  455. (arguments
  456. '(;; No included tests
  457. #:tests? #f))
  458. (propagated-inputs
  459. (list ruby-actionpack
  460. ruby-activejob
  461. ruby-activerecord
  462. ruby-activestorage
  463. ruby-activesupport
  464. ruby-mail))
  465. (synopsis "Receive and process incoming emails in Rails applications")
  466. (description
  467. "ActionMailbox receives and processes incoming emails in Rails applications.")
  468. (home-page "https://rubyonrails.org")
  469. (license license:expat)))
  470. (define-public ruby-actionmailer
  471. (package
  472. (name "ruby-actionmailer")
  473. (version "6.1.3")
  474. (source
  475. (origin
  476. (method url-fetch)
  477. (uri (rubygems-uri "actionmailer" version))
  478. (sha256
  479. (base32
  480. "0lic4mc6wqi3p9ipdqljl64vd9ndabm0k8hww0m07sfdhwsl5ba9"))))
  481. (build-system ruby-build-system)
  482. (arguments
  483. '(;; No included tests
  484. #:tests? #f))
  485. (propagated-inputs
  486. (list ruby-actionpack
  487. ruby-actionview
  488. ruby-activejob
  489. ruby-activesupport
  490. ruby-mail
  491. ruby-rails-dom-testing))
  492. (synopsis "Work with emails using the controller/view pattern")
  493. (description
  494. "Compose, deliver, receive, and test emails using the controller/view
  495. pattern. Including support for multipart email and attachments.")
  496. (home-page "https://rubyonrails.org/")
  497. (license license:expat)))
  498. (define-public ruby-railties
  499. (package
  500. (name "ruby-railties")
  501. (version "6.1.3")
  502. (source
  503. (origin
  504. (method url-fetch)
  505. (uri (rubygems-uri "railties" version))
  506. (sha256
  507. (base32
  508. "1685y5dcfgcq0b38j13vrpkhiiblmrl64wa9w065669bkgmkw4ra"))))
  509. (build-system ruby-build-system)
  510. (arguments
  511. '(;; No included tests
  512. #:tests? #f))
  513. (propagated-inputs
  514. (list ruby-actionpack ruby-activesupport ruby-method-source ruby-rake
  515. ruby-thor))
  516. (synopsis "Rails internals, including application bootup and generators")
  517. (description
  518. "@code{railties} provides the core Rails internals including handling
  519. application bootup, plugins, generators, and Rake tasks.")
  520. (home-page "https://rubyonrails.org/")
  521. (license license:expat)))
  522. (define-public ruby-sprockets-rails
  523. (package
  524. (name "ruby-sprockets-rails")
  525. (version "3.2.1")
  526. (source
  527. (origin
  528. (method url-fetch)
  529. (uri (rubygems-uri "sprockets-rails" version))
  530. (sha256
  531. (base32
  532. "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1"))))
  533. (build-system ruby-build-system)
  534. (arguments
  535. '(;; No included tests
  536. #:tests? #f))
  537. (propagated-inputs
  538. (list ruby-actionpack ruby-activesupport ruby-sprockets))
  539. (synopsis "Sprockets Rails integration")
  540. (description
  541. "Provides Sprockets implementation for the Rails Asset Pipeline.")
  542. (home-page
  543. "https://github.com/rails/sprockets-rails")
  544. (license license:expat)))
  545. (define-public ruby-web-console
  546. (package
  547. (name "ruby-web-console")
  548. (version "4.1.0")
  549. (source
  550. (origin
  551. ;; Download from GitHub as test files are not provided in the gem.
  552. (method git-fetch)
  553. (uri (git-reference
  554. (url "https://github.com/rails/web-console")
  555. (commit (string-append "v" version))))
  556. (file-name (git-file-name name version))
  557. (sha256
  558. (base32
  559. "0azk8nmimnjbh74vxgwcj9jr588rj7kb5rrlclcjfjsw9jqjzckc"))))
  560. (build-system ruby-build-system)
  561. (arguments
  562. '(#:phases
  563. (modify-phases %standard-phases
  564. (add-after 'unpack 'patch-Gemfile
  565. (lambda _
  566. (substitute* "Gemfile"
  567. ;; Remove the github bit from the Gemfile, so that the Guix
  568. ;; packages are used.
  569. ((", github: .*") "\n")
  570. ;; The usual methods of not loading this group don't work, so
  571. ;; patch the Gemfile.
  572. (("group :development") "[].each")
  573. ;; tzinfo-data is propagated by ruby-activesupport, but it
  574. ;; needs to be in the Gemfile to become available.
  575. (("group :test do") "group :test do\n gem 'tzinfo-data'"))
  576. #t)))))
  577. (propagated-inputs
  578. (list ruby-actionview ruby-activemodel ruby-bindex ruby-railties))
  579. (native-inputs
  580. (list bundler ruby-rails ruby-mocha ruby-simplecov))
  581. (synopsis "Debugging tool for your Ruby on Rails applications")
  582. (description
  583. "This package allows you to create an interactive Ruby session in your
  584. browser. Those sessions are launched automatically in case of an error and
  585. can also be launched manually in any page.")
  586. (home-page "https://github.com/rails/web-console")
  587. (license license:expat)))
  588. (define-public ruby-with-advisory-lock
  589. (package
  590. (name "ruby-with-advisory-lock")
  591. (version "4.0.0")
  592. (source
  593. (origin
  594. (method url-fetch)
  595. (uri (rubygems-uri "with_advisory_lock" version))
  596. (sha256
  597. (base32
  598. "1k37hxgmaqgsd54gplm5xim9nw3ghvqsbzaw7q4q64ha1nbd9a41"))))
  599. (build-system ruby-build-system)
  600. (arguments
  601. '(#:tests? #f)) ; TODO Tests require a running MySQL service
  602. (propagated-inputs
  603. (list ruby-activerecord))
  604. (native-inputs
  605. (list bundler ruby-yard ruby-mysql2))
  606. (synopsis "Advisory locking for ActiveRecord")
  607. (description
  608. "The With advisory lock gem adds advisory locking to ActiveRecord for
  609. PostgreSQL and MySQL. SQLite is also supported, but this uses the file system
  610. for locks.")
  611. (home-page "https://closuretree.github.io/with_advisory_lock/")
  612. (license license:expat)))
  613. (define-public ruby-rails
  614. (package
  615. (name "ruby-rails")
  616. (version "6.1.3")
  617. (source
  618. (origin
  619. (method url-fetch)
  620. (uri (rubygems-uri "rails" version))
  621. (sha256
  622. (base32
  623. "0hdancysa617lzyy5gmrcmnpgyb1mz1lawy0l34ycz2wary7y2bz"))))
  624. (build-system ruby-build-system)
  625. (arguments
  626. '(#:phases
  627. (modify-phases %standard-phases
  628. ;; This gem acts as glue between the gems that actually make up
  629. ;; Rails. The important thing to check is that the gemspec matches up
  630. ;; with the Guix packages and Rubygems can successfully activate the
  631. ;; Rails gem.
  632. ;;
  633. ;; The following check phase tests this.
  634. (delete 'check)
  635. (add-after 'install 'check
  636. (lambda* (#:key tests? outputs #:allow-other-keys)
  637. (setenv "GEM_PATH"
  638. (string-append
  639. (getenv "GEM_PATH")
  640. ":"
  641. (assoc-ref outputs "out") "/lib/ruby/vendor_ruby"))
  642. (when tests?
  643. (invoke "ruby" "-e" "gem 'rails'"))
  644. #t)))))
  645. (propagated-inputs
  646. (list ruby-actioncable
  647. ruby-actionmailbox
  648. ruby-actionmailer
  649. ruby-actionpack
  650. ruby-actiontext
  651. ruby-actionview
  652. ruby-activejob
  653. ruby-activemodel
  654. ruby-activerecord
  655. ruby-activestorage
  656. ruby-activesupport
  657. bundler
  658. ruby-railties
  659. ruby-sprockets-rails))
  660. (synopsis "Full-stack web framework optimized for programmer happiness")
  661. (description
  662. "Ruby on Rails is a full-stack web framework optimized for programmer
  663. happiness and sustainable productivity. It encourages beautiful code by
  664. favoring convention over configuration.")
  665. (home-page "https://rubyonrails.org/")
  666. (license license:expat)))