Skip to content

Commit 91176ea

Browse files
committed
⬆️ Upgrade Rails to 7.1.1
1 parent b2cfc1b commit 91176ea

File tree

20 files changed

+249
-199
lines changed

20 files changed

+249
-199
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ yarn.lock linguist-generated
88

99
# Mark any vendored files as having been vendored.
1010
vendor/* linguist-vendored
11+
config/credentials/*.yml.enc diff=rails_credentials
12+
config/credentials.yml.enc diff=rails_credentials

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ USER app
1515
# Enable YJIT
1616
ENV RUBY_YJIT_ENABLE=1
1717

18-
# Script to be executed every time the container starts
18+
# Entrypoint prepares the database.
1919
ENTRYPOINT ["docker/startup.sh"]
20+
21+
# Start the server by default, this can be overwritten at runtime
22+
CMD ["./bin/rails", "server"]

Gemfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
source 'https://rubygems.org'
2-
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
32

43
ruby '3.2.2'
54

65
# Full-stack web application framework. (https://rubyonrails.org)
7-
gem 'rails', '~> 7.0.4', '>= 7.0.4.2'
6+
gem 'rails', '~> 7.1.1'
87

98
# Use Vite in Rails and bring joy to your JavaScript experience (https://github.com/ElMassimo/vite_ruby)
109
gem 'vite_rails'
@@ -13,16 +12,16 @@ gem 'vite_rails'
1312
gem 'pg', '~> 1.1'
1413

1514
# Puma is a simple, fast, threaded, and highly parallel HTTP 1.1 server for Ruby/Rack applications (https://puma.io)
16-
gem 'puma', '~> 6'
15+
gem 'puma', '>= 5.0'
1716

1817
# Boot large ruby/rails apps faster (https://github.com/Shopify/bootsnap)
1918
gem 'bootsnap', require: false
2019

2120
# Timezone Data for TZInfo (https://tzinfo.github.io)
22-
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
21+
gem 'tzinfo-data', platforms: %i[windows jruby]
2322

2423
# A Ruby client library for Redis (https://github.com/redis/redis-rb)
25-
gem 'redis'
24+
gem 'redis', '>= 4.0.1'
2625

2726
# Tame Rails' multi-line logging into a single line per request (https://github.com/roidrage/lograge)
2827
gem 'lograge'
@@ -38,7 +37,7 @@ gem 'sidekiq'
3837

3938
group :development, :test do
4039
# Debugging functionality for Ruby (https://github.com/ruby/debug)
41-
gem 'debug', platforms: %i[mri mingw x64_mingw]
40+
gem 'debug', platforms: %i[mri windows]
4241

4342
# Autoload dotenv in Rails. (https://github.com/bkeepers/dotenv)
4443
gem 'dotenv-rails'

Gemfile.lock

Lines changed: 88 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,78 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.0.8)
5-
actionpack (= 7.0.8)
6-
activesupport (= 7.0.8)
4+
actioncable (7.1.1)
5+
actionpack (= 7.1.1)
6+
activesupport (= 7.1.1)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
9-
actionmailbox (7.0.8)
10-
actionpack (= 7.0.8)
11-
activejob (= 7.0.8)
12-
activerecord (= 7.0.8)
13-
activestorage (= 7.0.8)
14-
activesupport (= 7.0.8)
9+
zeitwerk (~> 2.6)
10+
actionmailbox (7.1.1)
11+
actionpack (= 7.1.1)
12+
activejob (= 7.1.1)
13+
activerecord (= 7.1.1)
14+
activestorage (= 7.1.1)
15+
activesupport (= 7.1.1)
1516
mail (>= 2.7.1)
1617
net-imap
1718
net-pop
1819
net-smtp
19-
actionmailer (7.0.8)
20-
actionpack (= 7.0.8)
21-
actionview (= 7.0.8)
22-
activejob (= 7.0.8)
23-
activesupport (= 7.0.8)
20+
actionmailer (7.1.1)
21+
actionpack (= 7.1.1)
22+
actionview (= 7.1.1)
23+
activejob (= 7.1.1)
24+
activesupport (= 7.1.1)
2425
mail (~> 2.5, >= 2.5.4)
2526
net-imap
2627
net-pop
2728
net-smtp
28-
rails-dom-testing (~> 2.0)
29-
actionpack (7.0.8)
30-
actionview (= 7.0.8)
31-
activesupport (= 7.0.8)
32-
rack (~> 2.0, >= 2.2.4)
29+
rails-dom-testing (~> 2.2)
30+
actionpack (7.1.1)
31+
actionview (= 7.1.1)
32+
activesupport (= 7.1.1)
33+
nokogiri (>= 1.8.5)
34+
rack (>= 2.2.4)
35+
rack-session (>= 1.0.1)
3336
rack-test (>= 0.6.3)
34-
rails-dom-testing (~> 2.0)
35-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36-
actiontext (7.0.8)
37-
actionpack (= 7.0.8)
38-
activerecord (= 7.0.8)
39-
activestorage (= 7.0.8)
40-
activesupport (= 7.0.8)
37+
rails-dom-testing (~> 2.2)
38+
rails-html-sanitizer (~> 1.6)
39+
actiontext (7.1.1)
40+
actionpack (= 7.1.1)
41+
activerecord (= 7.1.1)
42+
activestorage (= 7.1.1)
43+
activesupport (= 7.1.1)
4144
globalid (>= 0.6.0)
4245
nokogiri (>= 1.8.5)
43-
actionview (7.0.8)
44-
activesupport (= 7.0.8)
46+
actionview (7.1.1)
47+
activesupport (= 7.1.1)
4548
builder (~> 3.1)
46-
erubi (~> 1.4)
47-
rails-dom-testing (~> 2.0)
48-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49-
activejob (7.0.8)
50-
activesupport (= 7.0.8)
49+
erubi (~> 1.11)
50+
rails-dom-testing (~> 2.2)
51+
rails-html-sanitizer (~> 1.6)
52+
activejob (7.1.1)
53+
activesupport (= 7.1.1)
5154
globalid (>= 0.3.6)
52-
activemodel (7.0.8)
53-
activesupport (= 7.0.8)
54-
activerecord (7.0.8)
55-
activemodel (= 7.0.8)
56-
activesupport (= 7.0.8)
57-
activestorage (7.0.8)
58-
actionpack (= 7.0.8)
59-
activejob (= 7.0.8)
60-
activerecord (= 7.0.8)
61-
activesupport (= 7.0.8)
55+
activemodel (7.1.1)
56+
activesupport (= 7.1.1)
57+
activerecord (7.1.1)
58+
activemodel (= 7.1.1)
59+
activesupport (= 7.1.1)
60+
timeout (>= 0.4.0)
61+
activestorage (7.1.1)
62+
actionpack (= 7.1.1)
63+
activejob (= 7.1.1)
64+
activerecord (= 7.1.1)
65+
activesupport (= 7.1.1)
6266
marcel (~> 1.0)
63-
mini_mime (>= 1.1.0)
64-
activesupport (7.0.8)
67+
activesupport (7.1.1)
68+
base64
69+
bigdecimal
6570
concurrent-ruby (~> 1.0, >= 1.0.2)
71+
connection_pool (>= 2.2.5)
72+
drb
6673
i18n (>= 1.6, < 2)
6774
minitest (>= 5.1)
75+
mutex_m
6876
tzinfo (~> 2.0)
6977
addressable (2.8.5)
7078
public_suffix (>= 2.0.2, < 6.0)
@@ -73,6 +81,7 @@ GEM
7381
rake (>= 10.4, < 14.0)
7482
ast (2.4.2)
7583
base64 (0.1.1)
84+
bigdecimal (3.1.4)
7685
bootsnap (1.16.0)
7786
msgpack (~> 1.2)
7887
builder (3.2.4)
@@ -90,6 +99,8 @@ GEM
9099
dotenv-rails (2.8.1)
91100
dotenv (= 2.8.1)
92101
railties (>= 3.2)
102+
drb (2.1.1)
103+
ruby2_keywords
93104
dry-cli (1.0.0)
94105
erubi (1.12.0)
95106
ffi (1.16.3)
@@ -146,6 +157,7 @@ GEM
146157
mini_portile2 (2.8.4)
147158
minitest (5.20.0)
148159
msgpack (1.7.2)
160+
mutex_m (0.1.2)
149161
nenv (0.3.0)
150162
net-imap (0.4.1)
151163
date
@@ -182,44 +194,50 @@ GEM
182194
puma (6.4.0)
183195
nio4r (~> 2.0)
184196
racc (1.7.1)
185-
rack (2.2.8)
197+
rack (3.0.8)
186198
rack-canonical-host (1.2.0)
187199
addressable (> 0, < 3)
188200
rack (>= 1, < 4)
189201
rack-cors (2.0.1)
190202
rack (>= 2.0.0)
191203
rack-proxy (0.7.7)
192204
rack
205+
rack-session (2.0.0)
206+
rack (>= 3.0.0)
193207
rack-test (2.1.0)
194208
rack (>= 1.3)
195-
rails (7.0.8)
196-
actioncable (= 7.0.8)
197-
actionmailbox (= 7.0.8)
198-
actionmailer (= 7.0.8)
199-
actionpack (= 7.0.8)
200-
actiontext (= 7.0.8)
201-
actionview (= 7.0.8)
202-
activejob (= 7.0.8)
203-
activemodel (= 7.0.8)
204-
activerecord (= 7.0.8)
205-
activestorage (= 7.0.8)
206-
activesupport (= 7.0.8)
209+
rackup (2.1.0)
210+
rack (>= 3)
211+
webrick (~> 1.8)
212+
rails (7.1.1)
213+
actioncable (= 7.1.1)
214+
actionmailbox (= 7.1.1)
215+
actionmailer (= 7.1.1)
216+
actionpack (= 7.1.1)
217+
actiontext (= 7.1.1)
218+
actionview (= 7.1.1)
219+
activejob (= 7.1.1)
220+
activemodel (= 7.1.1)
221+
activerecord (= 7.1.1)
222+
activestorage (= 7.1.1)
223+
activesupport (= 7.1.1)
207224
bundler (>= 1.15.0)
208-
railties (= 7.0.8)
225+
railties (= 7.1.1)
209226
rails-dom-testing (2.2.0)
210227
activesupport (>= 5.0.0)
211228
minitest
212229
nokogiri (>= 1.6)
213230
rails-html-sanitizer (1.6.0)
214231
loofah (~> 2.21)
215232
nokogiri (~> 1.14)
216-
railties (7.0.8)
217-
actionpack (= 7.0.8)
218-
activesupport (= 7.0.8)
219-
method_source
233+
railties (7.1.1)
234+
actionpack (= 7.1.1)
235+
activesupport (= 7.1.1)
236+
irb
237+
rackup (>= 1.0.0)
220238
rake (>= 12.2)
221-
thor (~> 1.0)
222-
zeitwerk (~> 2.5)
239+
thor (~> 1.0, >= 1.2.2)
240+
zeitwerk (~> 2.6)
223241
rainbow (3.1.1)
224242
rake (13.0.6)
225243
rb-fsevent (0.11.2)
@@ -289,6 +307,7 @@ GEM
289307
rubocop-capybara (~> 2.17)
290308
rubocop-factory_bot (~> 2.22)
291309
ruby-progressbar (1.13.0)
310+
ruby2_keywords (0.0.5)
292311
shellany (0.0.1)
293312
sidekiq (7.1.6)
294313
concurrent-ruby (< 2)
@@ -326,6 +345,7 @@ GEM
326345
dry-cli (>= 0.7, < 2)
327346
rack-proxy (~> 0.6, >= 0.6.1)
328347
zeitwerk (~> 2.2)
348+
webrick (1.8.1)
329349
websocket-driver (0.7.6)
330350
websocket-extensions (>= 0.1.0)
331351
websocket-extensions (0.1.5)
@@ -344,11 +364,11 @@ DEPENDENCIES
344364
lograge
345365
pg (~> 1.1)
346366
prettier
347-
puma (~> 6)
367+
puma (>= 5.0)
348368
rack-canonical-host
349369
rack-cors
350-
rails (~> 7.0.4, >= 7.0.4.2)
351-
redis
370+
rails (~> 7.1.1)
371+
redis (>= 4.0.1)
352372
rspec-rails
353373
rubocop
354374
rubocop-performance

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ https://github.com/templatus/templatus-inertia/
2020
### Backend
2121

2222
- [Ruby](https://www.ruby-lang.org/de/) 3.2
23-
- [Ruby on Rails](https://rubyonrails.org/) 7.0
23+
- [Ruby on Rails](https://rubyonrails.org/) 7.1
2424
- [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html) for WebSocket communication
2525
- [PostgreSQL](https://www.postgresql.org/) for using as SQL database
2626
- [Sidekiq](https://sidekiq.org/) for background processing

bin/setup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'fileutils'
55
APP_ROOT = File.expand_path('..', __dir__)
66

77
def system!(*args)
8-
system(*args) || abort("\n== Command #{args} failed ==")
8+
system(*args, exception: true)
99
end
1010

1111
FileUtils.chdir APP_ROOT do

config/application.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@
2020
module Templatus
2121
class Application < Rails::Application
2222
# Initialize configuration defaults for originally generated Rails version.
23-
config.load_defaults 7.0
23+
config.load_defaults 7.1
24+
25+
# Please, add to the `ignore` list any other `lib` subdirectories that do
26+
# not contain `.rb` files, or that should not be reloaded or eager loaded.
27+
# Common ones are `templates`, `generators`, or `middleware`, for example.
28+
config.autoload_lib(ignore: %w[assets tasks middleware])
2429

2530
# Configuration for the application, engines, and railties goes here.
2631
#

config/environments/development.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# In the development environment your application's code is reloaded any time
77
# it changes. This slows down response time but is perfect for development
88
# since you don't have to restart the web server when you make code changes.
9-
config.cache_classes = false
9+
config.enable_reloading = true
1010

1111
# Do not eager load code on boot.
1212
config.eager_load = false
@@ -56,6 +56,9 @@
5656
# Highlight code that triggered database queries in logs.
5757
config.active_record.verbose_query_logs = true
5858

59+
# Highlight code that enqueued background job in logs.
60+
config.active_job.verbose_enqueue_logs = true
61+
5962
# Raises error for missing translations.
6063
# config.i18n.raise_on_missing_translations = true
6164

@@ -65,6 +68,9 @@
6568
# Uncomment if you wish to allow Action Cable access from any origin.
6669
# config.action_cable.disable_request_forgery_protection = true
6770

71+
# Raise error when a before_action's only/except options reference missing actions
72+
# config.action_controller.raise_on_missing_callback_actions = true
73+
6874
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
6975
config.force_ssl =
7076
ActiveModel::Type::Boolean.new.cast ENV.fetch('FORCE_SSL', true)

0 commit comments

Comments
 (0)