Skip to content

Commit 7d59e2d

Browse files
johnpaulashenfelterjmilljr24
authored andcommitted
Upgrade from beta to release of Rails 8.1 (#297)
* Update to release of Rails 8.1 * Update ci.rb with brakeman * Update ci with brakeman
1 parent 210d50c commit 7d59e2d

File tree

4 files changed

+143
-67
lines changed

4 files changed

+143
-67
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "https://rubygems.org"
22

33
ruby "3.3.8"
44

5-
gem "rails", "8.1.0.beta1"
5+
gem "rails", "~> 8.1.0"
66
gem "bootsnap", require: false
77

88
gem "sprockets-rails", "~> 3.2.2"

Gemfile.lock

Lines changed: 67 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,46 @@ GEM
33
specs:
44
action_text-trix (2.1.15)
55
railties
6-
actioncable (8.1.0.beta1)
7-
actionpack (= 8.1.0.beta1)
8-
activesupport (= 8.1.0.beta1)
6+
actioncable (8.1.0)
7+
actionpack (= 8.1.0)
8+
activesupport (= 8.1.0)
99
nio4r (~> 2.0)
1010
websocket-driver (>= 0.6.1)
1111
zeitwerk (~> 2.6)
12-
actionmailbox (8.1.0.beta1)
13-
actionpack (= 8.1.0.beta1)
14-
activejob (= 8.1.0.beta1)
15-
activerecord (= 8.1.0.beta1)
16-
activestorage (= 8.1.0.beta1)
17-
activesupport (= 8.1.0.beta1)
12+
actionmailbox (8.1.0)
13+
actionpack (= 8.1.0)
14+
activejob (= 8.1.0)
15+
activerecord (= 8.1.0)
16+
activestorage (= 8.1.0)
17+
activesupport (= 8.1.0)
1818
mail (>= 2.8.0)
19-
actionmailer (8.1.0.beta1)
20-
actionpack (= 8.1.0.beta1)
21-
actionview (= 8.1.0.beta1)
22-
activejob (= 8.1.0.beta1)
23-
activesupport (= 8.1.0.beta1)
19+
actionmailer (8.1.0)
20+
actionpack (= 8.1.0)
21+
actionview (= 8.1.0)
22+
activejob (= 8.1.0)
23+
activesupport (= 8.1.0)
2424
mail (>= 2.8.0)
2525
rails-dom-testing (~> 2.2)
26-
actionpack (8.1.0.beta1)
27-
actionview (= 8.1.0.beta1)
28-
activesupport (= 8.1.0.beta1)
26+
actionpack (8.1.0)
27+
actionview (= 8.1.0)
28+
activesupport (= 8.1.0)
2929
nokogiri (>= 1.8.5)
3030
rack (>= 2.2.4)
3131
rack-session (>= 1.0.1)
3232
rack-test (>= 0.6.3)
3333
rails-dom-testing (~> 2.2)
3434
rails-html-sanitizer (~> 1.6)
3535
useragent (~> 0.16)
36-
actiontext (8.1.0.beta1)
36+
actiontext (8.1.0)
3737
action_text-trix (~> 2.1.15)
38-
actionpack (= 8.1.0.beta1)
39-
activerecord (= 8.1.0.beta1)
40-
activestorage (= 8.1.0.beta1)
41-
activesupport (= 8.1.0.beta1)
38+
actionpack (= 8.1.0)
39+
activerecord (= 8.1.0)
40+
activestorage (= 8.1.0)
41+
activesupport (= 8.1.0)
4242
globalid (>= 0.6.0)
4343
nokogiri (>= 1.8.5)
44-
actionview (8.1.0.beta1)
45-
activesupport (= 8.1.0.beta1)
44+
actionview (8.1.0)
45+
activesupport (= 8.1.0)
4646
builder (~> 3.1)
4747
erubi (~> 1.11)
4848
rails-dom-testing (~> 2.2)
@@ -53,33 +53,33 @@ GEM
5353
activestorage (>= 6.1.4)
5454
activesupport (>= 6.1.4)
5555
marcel (>= 1.0.3)
56-
activejob (8.1.0.beta1)
57-
activesupport (= 8.1.0.beta1)
56+
activejob (8.1.0)
57+
activesupport (= 8.1.0)
5858
globalid (>= 0.3.6)
59-
activemodel (8.1.0.beta1)
60-
activesupport (= 8.1.0.beta1)
59+
activemodel (8.1.0)
60+
activesupport (= 8.1.0)
6161
activemodel-serializers-xml (1.0.3)
6262
activemodel (>= 5.0.0.a)
6363
activesupport (>= 5.0.0.a)
6464
builder (~> 3.1)
65-
activerecord (8.1.0.beta1)
66-
activemodel (= 8.1.0.beta1)
67-
activesupport (= 8.1.0.beta1)
65+
activerecord (8.1.0)
66+
activemodel (= 8.1.0)
67+
activesupport (= 8.1.0)
6868
timeout (>= 0.4.0)
69-
activestorage (8.1.0.beta1)
70-
actionpack (= 8.1.0.beta1)
71-
activejob (= 8.1.0.beta1)
72-
activerecord (= 8.1.0.beta1)
73-
activesupport (= 8.1.0.beta1)
69+
activestorage (8.1.0)
70+
actionpack (= 8.1.0)
71+
activejob (= 8.1.0)
72+
activerecord (= 8.1.0)
73+
activesupport (= 8.1.0)
7474
marcel (~> 1.0)
75-
activesupport (8.1.0.beta1)
75+
activesupport (8.1.0)
7676
base64
77-
benchmark (>= 0.3)
7877
bigdecimal
7978
concurrent-ruby (~> 1.0, >= 1.3.1)
8079
connection_pool (>= 2.2.5)
8180
drb
8281
i18n (>= 1.6, < 2)
82+
json
8383
logger (>= 1.4.2)
8484
minitest (>= 5.1)
8585
securerandom (>= 0.3)
@@ -111,12 +111,11 @@ GEM
111111
aws-eventstream (~> 1, >= 1.0.2)
112112
base64 (0.3.0)
113113
bcrypt (3.1.16)
114-
benchmark (0.4.1)
115114
better_errors (2.10.1)
116115
erubi (>= 1.0.0)
117116
rack (>= 0.9.0)
118117
rouge (>= 1.0.0)
119-
bigdecimal (3.2.3)
118+
bigdecimal (3.3.1)
120119
binding_of_caller (1.0.1)
121120
debug_inspector (>= 1.2.0)
122121
bootsnap (1.18.6)
@@ -175,7 +174,7 @@ GEM
175174
ruby2_keywords
176175
drb (2.2.3)
177176
dry-cli (1.3.0)
178-
erb (5.0.2)
177+
erb (5.1.1)
179178
erubi (1.13.1)
180179
execjs (2.10.0)
181180
factory_bot (6.5.5)
@@ -188,8 +187,8 @@ GEM
188187
feature_flipper (2.0.0)
189188
ffi (1.17.2)
190189
foundation_emails (2.2.1.0)
191-
globalid (1.1.0)
192-
activesupport (>= 5.0)
190+
globalid (1.3.0)
191+
activesupport (>= 6.1)
193192
htmlentities (4.3.4)
194193
httparty (0.23.1)
195194
csv
@@ -231,7 +230,8 @@ GEM
231230
loofah (2.24.1)
232231
crass (~> 1.0.2)
233232
nokogiri (>= 1.12.0)
234-
mail (2.8.1)
233+
mail (2.9.0)
234+
logger
235235
mini_mime (>= 0.1.1)
236236
net-imap
237237
net-pop
@@ -247,12 +247,12 @@ GEM
247247
logger
248248
mini_mime (1.1.5)
249249
mini_portile2 (2.8.9)
250-
minitest (5.25.5)
250+
minitest (5.26.0)
251251
msgpack (1.8.0)
252252
multi_xml (0.7.2)
253253
bigdecimal (~> 3.1)
254254
mutex_m (0.3.0)
255-
net-imap (0.4.22)
255+
net-imap (0.5.12)
256256
date
257257
net-protocol
258258
net-pop (0.1.2)
@@ -262,15 +262,15 @@ GEM
262262
net-smtp (0.5.1)
263263
net-protocol
264264
nio4r (2.7.4)
265-
nokogiri (1.18.9)
265+
nokogiri (1.18.10)
266266
mini_portile2 (~> 2.8.2)
267267
racc (~> 1.4)
268268
orm_adapter (0.5.0)
269269
polyglot (0.3.5)
270270
positioning (0.4.7)
271271
activerecord (>= 6.1)
272272
activesupport (>= 6.1)
273-
pp (0.6.2)
273+
pp (0.6.3)
274274
prettyprint
275275
premailer (1.27.0)
276276
addressable
@@ -305,30 +305,30 @@ GEM
305305
rack (>= 1.3)
306306
rackup (2.2.1)
307307
rack (>= 3)
308-
rails (8.1.0.beta1)
309-
actioncable (= 8.1.0.beta1)
310-
actionmailbox (= 8.1.0.beta1)
311-
actionmailer (= 8.1.0.beta1)
312-
actionpack (= 8.1.0.beta1)
313-
actiontext (= 8.1.0.beta1)
314-
actionview (= 8.1.0.beta1)
315-
activejob (= 8.1.0.beta1)
316-
activemodel (= 8.1.0.beta1)
317-
activerecord (= 8.1.0.beta1)
318-
activestorage (= 8.1.0.beta1)
319-
activesupport (= 8.1.0.beta1)
308+
rails (8.1.0)
309+
actioncable (= 8.1.0)
310+
actionmailbox (= 8.1.0)
311+
actionmailer (= 8.1.0)
312+
actionpack (= 8.1.0)
313+
actiontext (= 8.1.0)
314+
actionview (= 8.1.0)
315+
activejob (= 8.1.0)
316+
activemodel (= 8.1.0)
317+
activerecord (= 8.1.0)
318+
activestorage (= 8.1.0)
319+
activesupport (= 8.1.0)
320320
bundler (>= 1.15.0)
321-
railties (= 8.1.0.beta1)
321+
railties (= 8.1.0)
322322
rails-dom-testing (2.3.0)
323323
activesupport (>= 5.0.0)
324324
minitest
325325
nokogiri (>= 1.6)
326326
rails-html-sanitizer (1.6.2)
327327
loofah (~> 2.21)
328328
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
329-
railties (8.1.0.beta1)
330-
actionpack (= 8.1.0.beta1)
331-
activesupport (= 8.1.0.beta1)
329+
railties (8.1.0)
330+
actionpack (= 8.1.0)
331+
activesupport (= 8.1.0)
332332
irb (~> 1.13)
333333
rackup (>= 1.0.0)
334334
rake (>= 12.2)
@@ -339,9 +339,10 @@ GEM
339339
rb-fsevent (0.11.2)
340340
rb-inotify (0.11.1)
341341
ffi (~> 1.0)
342-
rdoc (6.14.2)
342+
rdoc (6.15.0)
343343
erb
344344
psych (>= 4.0.0)
345+
tsort
345346
regexp_parser (2.11.2)
346347
reline (0.6.2)
347348
io-console (~> 0.5)
@@ -483,7 +484,7 @@ DEPENDENCIES
483484
pry-rails
484485
puma (~> 6.0)
485486
rack-cors
486-
rails (= 8.1.0.beta1)
487+
rails (~> 8.1.0)
487488
rspec-rails
488489
search_cop (~> 1.0.6)
489490
selenium-webdriver

config/ci.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
step "Security: Gem audit", "bin/bundler-audit"
77
step "Security: Importmap vulnerability audit", "bin/importmap audit"
8+
step "Security: Brakeman code analysis", "bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error"
89

910
step "Tests: Rails", "bin/rails test"
1011
step "Tests: System", "bin/rails test:system"
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Be sure to restart your server when you modify this file.
2+
#
3+
# This file eases your Rails 8.1 framework defaults upgrade.
4+
#
5+
# Uncomment each configuration one by one to switch to the new default.
6+
# Once your application is ready to run with all new defaults, you can remove
7+
# this file and set the `config.load_defaults` to `8.1`.
8+
#
9+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
10+
# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
11+
12+
###
13+
# Skips escaping HTML entities and line separators. When set to `false`, the
14+
# JSON renderer no longer escapes these to improve performance.
15+
#
16+
# Example:
17+
# class PostsController < ApplicationController
18+
# def index
19+
# render json: { key: "\u2028\u2029<>&" }
20+
# end
21+
# end
22+
#
23+
# Renders `{"key":"\u2028\u2029\u003c\u003e\u0026"}` with the previous default, but `{"key":"

<>&"}` with the config
24+
# set to `false`.
25+
#
26+
# Applications that want to keep the escaping behavior can set the config to `true`.
27+
#++
28+
# Rails.configuration.action_controller.escape_json_responses = false
29+
30+
###
31+
# Skips escaping LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in JSON.
32+
#
33+
# Historically these characters were not valid inside JavaScript literal strings but that changed in ECMAScript 2019.
34+
# As such it's no longer a concern in modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset.
35+
#++
36+
# Rails.configuration.active_support.escape_js_separators_in_json = false
37+
38+
###
39+
# Raises an error when order dependent finder methods (e.g. `#first`, `#second`) are called without `order` values
40+
# on the relation, and the model does not have any order columns (`implicit_order_column`, `query_constraints`, or
41+
# `primary_key`) to fall back on.
42+
#
43+
# The current behavior of not raising an error has been deprecated, and this configuration option will be removed in
44+
# Rails 8.2.
45+
#++
46+
# Rails.configuration.active_record.raise_on_missing_required_finder_order_columns = true
47+
48+
###
49+
# Controls how Rails handles path relative URL redirects.
50+
# When set to `:raise`, Rails will raise an `ActionController::Redirecting::UnsafeRedirectError`
51+
# for relative URLs without a leading slash, which can help prevent open redirect vulnerabilities.
52+
#
53+
# Example:
54+
# redirect_to "example.com" # Raises UnsafeRedirectError
55+
# redirect_to "@attacker.com" # Raises UnsafeRedirectError
56+
# redirect_to "/safe/path" # Works correctly
57+
#
58+
# Applications that want to allow these redirects can set the config to `:log` (previous default)
59+
# to only log warnings, or `:notify` to send ActiveSupport notifications.
60+
#++
61+
# Rails.configuration.action_controller.action_on_path_relative_redirect = :raise
62+
63+
###
64+
# Use a Ruby parser to track dependencies between Action View templates
65+
#++
66+
# Rails.configuration.action_view.render_tracker = :ruby
67+
68+
###
69+
# When enabled, hidden inputs generated by `form_tag`, `token_tag`, `method_tag`, and the hidden parameter fields
70+
# included in `button_to` forms will omit the `autocomplete="off"` attribute.
71+
#
72+
# Applications that want to keep generating the `autocomplete` attribute for those tags can set it to `false`.
73+
#++
74+
# Rails.configuration.action_view.remove_hidden_field_autocomplete = true

0 commit comments

Comments
 (0)