Skip to content

Commit 30ebce1

Browse files
committed
Upgrade to Rails 7.2 and apply new framework defaults
* Use new syntax for enums * Fix usage of incorrect queue adapter for test environment * Adjust boilerplate code to match default for new Rails apps * Lint binstubs and remove outdated `yarn` stub
1 parent 742a17c commit 30ebce1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+540
-313
lines changed

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/*schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored
8+
config/credentials/*.yml.enc diff=rails_credentials
9+
config/credentials.yml.enc diff=rails_credentials
10+
111
spec/fixtures/files/avatar/* filter=lfs diff=lfs merge=lfs -text

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Setup Ruby
3131
uses: ruby/setup-ruby@v1
3232
with:
33-
ruby-version: 3.3
33+
ruby-version: .ruby-version
3434
bundler-cache: true
3535

3636
- name: Setup Node
@@ -64,7 +64,6 @@ jobs:
6464
cp config/action_mailer.yml.ci config/action_mailer.yml
6565
cp config/content_security_policy.yml.ci config/content_security_policy.yml
6666
cp config/database.yml.ci config/database.yml
67-
cp config/secrets.yml.ci config/secrets.yml
6867
cp config/mnemosyne.yml.ci config/mnemosyne.yml
6968
7069
- name: Create database
@@ -106,7 +105,7 @@ jobs:
106105
- name: Setup Ruby
107106
uses: ruby/setup-ruby@v1
108107
with:
109-
ruby-version: 3.3
108+
ruby-version: .ruby-version
110109
bundler-cache: true
111110

112111
- name: Run rubocop
@@ -137,7 +136,7 @@ jobs:
137136
- name: Setup Ruby
138137
uses: ruby/setup-ruby@v1
139138
with:
140-
ruby-version: 3.3
139+
ruby-version: .ruby-version
141140
bundler-cache: true
142141

143142
- name: Run slim-lint

.gitignore

+39-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,53 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# Temporary files generated by your text editor or operating system
4+
# belong in git's global ignore instead:
5+
# `$XDG_CONFIG_HOME/git/ignore` or `~/.config/git/ignore`
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore all environment files (except templates).
11+
/.env*
12+
!/.env*.erb
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
# Ignore pidfiles, but keep the directory.
21+
/tmp/pids/*
22+
!/tmp/pids/.keep
23+
24+
# Ignore storage (uploaded files in development and any SQLite databases).
25+
/storage/*
26+
!/storage/.keep
27+
/tmp/storage/*
28+
!/tmp/storage/.keep
29+
/public/uploads
30+
31+
# Ignore precompiled javascript packs
32+
/public/packs
33+
/public/packs-test
34+
/public/assets
35+
36+
# Ignore master key for decrypting credentials and more.
37+
/config/master.key
38+
139
# Ignore application configuration
240
/config/action_mailer.yml
341
/config/content_security_policy.yml
442
/config/database.yml
543
/config/mnemosyne.yml
6-
/config/secrets.yml
744
/config/settings.local.yml
845
/config/settings/*.local.yml
946
/config/environments/*.local.yml
1047

1148
# Ignore temporary files
1249
/coverage
13-
/log
1450
/rubocop.html
15-
/tmp
1651
*.DS_Store
1752

1853
## Ignore editor-specific artifacts
@@ -25,8 +60,7 @@
2560
/.idea
2661
*.iml
2762

28-
## Environment normalisation:
29-
/.bundle
63+
# Ignore local installation of gems
3064
/vendor/bundle
3165

3266
# Ignore Byebug command history file.
@@ -35,11 +69,6 @@
3569
# Ignore node_modules
3670
node_modules/
3771

38-
# Ignore precompiled javascript packs
39-
/public/packs
40-
/public/packs-test
41-
/public/assets
42-
4372
# Ignore yarn files
4473
/yarn-error.log
4574
yarn-debug.log*
@@ -53,7 +82,3 @@ yarn-debug.log*
5382
!.yarn/releases
5483
!.yarn/sdks
5584
!.yarn/versions
56-
57-
# Ignore uploaded files in development
58-
/storage
59-
/public/uploads

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ gem 'nokogiri'
2929
gem 'pg'
3030
gem 'proformaxml', '~> 1.5.1'
3131
gem 'puma'
32-
gem 'rails', '~> 7.1.4'
32+
gem 'rails', '~> 7.2.1'
3333
gem 'rails_admin'
3434
gem 'rails-html-sanitizer'
3535
gem 'rails-i18n'

Gemfile.lock

+65-68
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,80 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.1.4)
5-
actionpack (= 7.1.4)
6-
activesupport (= 7.1.4)
4+
actioncable (7.2.1)
5+
actionpack (= 7.2.1)
6+
activesupport (= 7.2.1)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
99
zeitwerk (~> 2.6)
10-
actionmailbox (7.1.4)
11-
actionpack (= 7.1.4)
12-
activejob (= 7.1.4)
13-
activerecord (= 7.1.4)
14-
activestorage (= 7.1.4)
15-
activesupport (= 7.1.4)
16-
mail (>= 2.7.1)
17-
net-imap
18-
net-pop
19-
net-smtp
20-
actionmailer (7.1.4)
21-
actionpack (= 7.1.4)
22-
actionview (= 7.1.4)
23-
activejob (= 7.1.4)
24-
activesupport (= 7.1.4)
25-
mail (~> 2.5, >= 2.5.4)
26-
net-imap
27-
net-pop
28-
net-smtp
10+
actionmailbox (7.2.1)
11+
actionpack (= 7.2.1)
12+
activejob (= 7.2.1)
13+
activerecord (= 7.2.1)
14+
activestorage (= 7.2.1)
15+
activesupport (= 7.2.1)
16+
mail (>= 2.8.0)
17+
actionmailer (7.2.1)
18+
actionpack (= 7.2.1)
19+
actionview (= 7.2.1)
20+
activejob (= 7.2.1)
21+
activesupport (= 7.2.1)
22+
mail (>= 2.8.0)
2923
rails-dom-testing (~> 2.2)
30-
actionpack (7.1.4)
31-
actionview (= 7.1.4)
32-
activesupport (= 7.1.4)
24+
actionpack (7.2.1)
25+
actionview (= 7.2.1)
26+
activesupport (= 7.2.1)
3327
nokogiri (>= 1.8.5)
3428
racc
35-
rack (>= 2.2.4)
29+
rack (>= 2.2.4, < 3.2)
3630
rack-session (>= 1.0.1)
3731
rack-test (>= 0.6.3)
3832
rails-dom-testing (~> 2.2)
3933
rails-html-sanitizer (~> 1.6)
40-
actiontext (7.1.4)
41-
actionpack (= 7.1.4)
42-
activerecord (= 7.1.4)
43-
activestorage (= 7.1.4)
44-
activesupport (= 7.1.4)
34+
useragent (~> 0.16)
35+
actiontext (7.2.1)
36+
actionpack (= 7.2.1)
37+
activerecord (= 7.2.1)
38+
activestorage (= 7.2.1)
39+
activesupport (= 7.2.1)
4540
globalid (>= 0.6.0)
4641
nokogiri (>= 1.8.5)
47-
actionview (7.1.4)
48-
activesupport (= 7.1.4)
42+
actionview (7.2.1)
43+
activesupport (= 7.2.1)
4944
builder (~> 3.1)
5045
erubi (~> 1.11)
5146
rails-dom-testing (~> 2.2)
5247
rails-html-sanitizer (~> 1.6)
53-
activejob (7.1.4)
54-
activesupport (= 7.1.4)
48+
activejob (7.2.1)
49+
activesupport (= 7.2.1)
5550
globalid (>= 0.3.6)
56-
activemodel (7.1.4)
57-
activesupport (= 7.1.4)
51+
activemodel (7.2.1)
52+
activesupport (= 7.2.1)
5853
activemodel-serializers-xml (1.0.3)
5954
activemodel (>= 5.0.0.a)
6055
activesupport (>= 5.0.0.a)
6156
builder (~> 3.1)
62-
activerecord (7.1.4)
63-
activemodel (= 7.1.4)
64-
activesupport (= 7.1.4)
57+
activerecord (7.2.1)
58+
activemodel (= 7.2.1)
59+
activesupport (= 7.2.1)
6560
timeout (>= 0.4.0)
66-
activestorage (7.1.4)
67-
actionpack (= 7.1.4)
68-
activejob (= 7.1.4)
69-
activerecord (= 7.1.4)
70-
activesupport (= 7.1.4)
61+
activestorage (7.2.1)
62+
actionpack (= 7.2.1)
63+
activejob (= 7.2.1)
64+
activerecord (= 7.2.1)
65+
activesupport (= 7.2.1)
7166
marcel (~> 1.0)
72-
activesupport (7.1.4)
67+
activesupport (7.2.1)
7368
base64
7469
bigdecimal
75-
concurrent-ruby (~> 1.0, >= 1.0.2)
70+
concurrent-ruby (~> 1.0, >= 1.3.1)
7671
connection_pool (>= 2.2.5)
7772
drb
7873
i18n (>= 1.6, < 2)
74+
logger (>= 1.4.2)
7975
minitest (>= 5.1)
80-
mutex_m
81-
tzinfo (~> 2.0)
76+
securerandom (>= 0.3)
77+
tzinfo (~> 2.0, >= 2.0.5)
8278
acts-as-taggable-on (11.0.0)
8379
activerecord (>= 7.0, < 8.0)
8480
zeitwerk (>= 2.4, < 3.0)
@@ -275,7 +271,6 @@ GEM
275271
bunny
276272
msgpack (1.7.3)
277273
multipart-post (2.4.1)
278-
mutex_m (0.2.0)
279274
nested_form (0.3.2)
280275
nested_form_fields (0.8.4)
281276
coffee-rails (>= 3.2.1)
@@ -357,20 +352,20 @@ GEM
357352
rackup (2.1.0)
358353
rack (>= 3)
359354
webrick (~> 1.8)
360-
rails (7.1.4)
361-
actioncable (= 7.1.4)
362-
actionmailbox (= 7.1.4)
363-
actionmailer (= 7.1.4)
364-
actionpack (= 7.1.4)
365-
actiontext (= 7.1.4)
366-
actionview (= 7.1.4)
367-
activejob (= 7.1.4)
368-
activemodel (= 7.1.4)
369-
activerecord (= 7.1.4)
370-
activestorage (= 7.1.4)
371-
activesupport (= 7.1.4)
355+
rails (7.2.1)
356+
actioncable (= 7.2.1)
357+
actionmailbox (= 7.2.1)
358+
actionmailer (= 7.2.1)
359+
actionpack (= 7.2.1)
360+
actiontext (= 7.2.1)
361+
actionview (= 7.2.1)
362+
activejob (= 7.2.1)
363+
activemodel (= 7.2.1)
364+
activerecord (= 7.2.1)
365+
activestorage (= 7.2.1)
366+
activesupport (= 7.2.1)
372367
bundler (>= 1.15.0)
373-
railties (= 7.1.4)
368+
railties (= 7.2.1)
374369
rails-controller-testing (1.0.5)
375370
actionpack (>= 5.0.1.rc1)
376371
actionview (>= 5.0.1.rc1)
@@ -392,10 +387,10 @@ GEM
392387
nested_form (~> 0.3)
393388
rails (>= 6.0, < 8)
394389
turbo-rails (>= 1.0, < 3)
395-
railties (7.1.4)
396-
actionpack (= 7.1.4)
397-
activesupport (= 7.1.4)
398-
irb
390+
railties (7.2.1)
391+
actionpack (= 7.2.1)
392+
activesupport (= 7.2.1)
393+
irb (~> 1.13)
399394
rackup (>= 1.0.0)
400395
rake (>= 12.2)
401396
thor (~> 1.0, >= 1.2.2)
@@ -494,6 +489,7 @@ GEM
494489
sprockets (> 3.0)
495490
sprockets-rails
496491
tilt
492+
securerandom (0.3.1)
497493
selenium-webdriver (4.25.0)
498494
base64 (~> 0.2)
499495
logger (~> 1.4)
@@ -575,6 +571,7 @@ GEM
575571
concurrent-ruby (~> 1.0)
576572
unicode-display_width (2.6.0)
577573
uri (0.13.1)
574+
useragent (0.16.10)
578575
warden (1.2.9)
579576
rack (>= 2.0.9)
580577
web-console (4.2.1)
@@ -648,7 +645,7 @@ DEPENDENCIES
648645
pundit
649646
pundit-matchers
650647
rack-mini-profiler
651-
rails (~> 7.1.4)
648+
rails (~> 7.2.1)
652649
rails-controller-testing
653650
rails-html-sanitizer
654651
rails-i18n

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# Add your own tasks in files placed in lib/tasks ending in .rake,
44
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
55

6-
require File.expand_path('config/application', __dir__)
6+
require_relative 'config/application'
77

88
Rails.application.load_tasks
+9-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
/*
2-
* This is a manifest file that'll be compiled into application.css, which will
3-
* include all the files listed below.
2+
* This is a manifest file that'll be compiled into application.css, which will include all the files
3+
* listed below.
44
*
5-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets,
6-
* vendor/assets/stylesheets, or vendor/assets/stylesheets of plugins, if any,
7-
* can be referenced here using a relative path.
5+
* Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
87
*
9-
* You're free to add application-wide styles to this file and they'll appear
10-
* at the top of the compiled file, but it's generally better to create a new
11-
* file per style scope.
8+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
9+
* compiled file so the styles you add here take precedence over styles defined in any other CSS
10+
* files in this directory. Styles in this file should be added after the last require_* statement.
11+
* It is generally better to create a new file per style scope.
1212
*
1313
* app/assets
1414
*= require_tree .
15+
*= require_self
1516
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# frozen_string_literal: true
2+
3+
module ApplicationCable
4+
class Channel < ActionCable::Channel::Base
5+
end
6+
end

0 commit comments

Comments
 (0)