Skip to content

Commit 8258d17

Browse files
authored
chore: update rails to 5.2.5 (#186)
* fix: update rails to 5.2.5 * fix: disable ActiveSupport.halt_callback_chains_on_return_false * fix: change skip_before_filter to skip_before_action * fix: set active_record.belongs_to_required_by_default to false * fix: set active_record.belongs_to_required_by_default to false Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
1 parent f76d1e1 commit 8258d17

File tree

6 files changed

+76
-67
lines changed

6 files changed

+76
-67
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ git_source(:github) do |repo_name|
55
"https://github.com/#{repo_name}.git"
66
end
77

8-
gem 'rails', '~> 5.0.2'
8+
gem 'rails', '= 5.2.5'
99
gem 'mysql2'
1010
gem 'puma', '~> 4.3'
1111
gem 'sass-rails', '~> 5.0'
1212
gem 'uglifier', '>= 1.3.0'
1313
gem 'safe_yaml'
14-
gem 'dotenv-rails', '~> 2.1.1'
14+
gem 'dotenv-rails', '~> 2.7.6'
1515
gem 'sanitize'
1616
gem 'rouge'
1717
gem 'haml-rails'

Gemfile.lock

Lines changed: 68 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,43 @@ GEM
33
specs:
44
acme-client (2.0.8)
55
faraday (>= 0.17, < 2.0.0)
6-
actioncable (5.0.7.2)
7-
actionpack (= 5.0.7.2)
8-
nio4r (>= 1.2, < 3.0)
9-
websocket-driver (~> 0.6.1)
10-
actionmailer (5.0.7.2)
11-
actionpack (= 5.0.7.2)
12-
actionview (= 5.0.7.2)
13-
activejob (= 5.0.7.2)
6+
actioncable (5.2.5)
7+
actionpack (= 5.2.5)
8+
nio4r (~> 2.0)
9+
websocket-driver (>= 0.6.1)
10+
actionmailer (5.2.5)
11+
actionpack (= 5.2.5)
12+
actionview (= 5.2.5)
13+
activejob (= 5.2.5)
1414
mail (~> 2.5, >= 2.5.4)
1515
rails-dom-testing (~> 2.0)
16-
actionpack (5.0.7.2)
17-
actionview (= 5.0.7.2)
18-
activesupport (= 5.0.7.2)
19-
rack (~> 2.0)
20-
rack-test (~> 0.6.3)
16+
actionpack (5.2.5)
17+
actionview (= 5.2.5)
18+
activesupport (= 5.2.5)
19+
rack (~> 2.0, >= 2.0.8)
20+
rack-test (>= 0.6.3)
2121
rails-dom-testing (~> 2.0)
2222
rails-html-sanitizer (~> 1.0, >= 1.0.2)
23-
actionview (5.0.7.2)
24-
activesupport (= 5.0.7.2)
23+
actionview (5.2.5)
24+
activesupport (= 5.2.5)
2525
builder (~> 3.1)
26-
erubis (~> 2.7.0)
26+
erubi (~> 1.4)
2727
rails-dom-testing (~> 2.0)
2828
rails-html-sanitizer (~> 1.0, >= 1.0.3)
29-
activejob (5.0.7.2)
30-
activesupport (= 5.0.7.2)
29+
activejob (5.2.5)
30+
activesupport (= 5.2.5)
3131
globalid (>= 0.3.6)
32-
activemodel (5.0.7.2)
33-
activesupport (= 5.0.7.2)
34-
activerecord (5.0.7.2)
35-
activemodel (= 5.0.7.2)
36-
activesupport (= 5.0.7.2)
37-
arel (~> 7.0)
38-
activesupport (5.0.7.2)
32+
activemodel (5.2.5)
33+
activesupport (= 5.2.5)
34+
activerecord (5.2.5)
35+
activemodel (= 5.2.5)
36+
activesupport (= 5.2.5)
37+
arel (>= 9.0)
38+
activestorage (5.2.5)
39+
actionpack (= 5.2.5)
40+
activerecord (= 5.2.5)
41+
marcel (~> 1.0.0)
42+
activesupport (5.2.5)
3943
concurrent-ruby (~> 1.0, >= 1.0.2)
4044
i18n (>= 0.7, < 2)
4145
minitest (~> 5.1)
@@ -44,9 +48,9 @@ GEM
4448
public_suffix (>= 2.0.2, < 5.0)
4549
airbrussh (1.4.0)
4650
sshkit (>= 1.6.1, != 1.7.0)
47-
arel (7.1.4)
51+
arel (9.0.0)
4852
aws-eventstream (1.1.1)
49-
aws-partitions (1.452.0)
53+
aws-partitions (1.455.0)
5054
aws-sdk-acm (1.41.0)
5155
aws-sdk-core (~> 3, >= 3.112.0)
5256
aws-sigv4 (~> 1.1)
@@ -92,12 +96,13 @@ GEM
9296
concurrent-ruby (1.1.8)
9397
connection_pool (2.2.5)
9498
crass (1.0.6)
95-
dotenv (2.1.2)
96-
dotenv-rails (2.1.2)
97-
dotenv (= 2.1.2)
98-
railties (>= 3.2, < 5.1)
99+
dotenv (2.7.6)
100+
dotenv-rails (2.7.6)
101+
dotenv (= 2.7.6)
102+
railties (>= 3.2)
103+
erubi (1.10.0)
99104
erubis (2.7.0)
100-
execjs (2.7.0)
105+
execjs (2.8.0)
101106
faraday (1.4.1)
102107
faraday-excon (~> 1.1)
103108
faraday-net_http (~> 1.0)
@@ -113,12 +118,12 @@ GEM
113118
haml (5.2.1)
114119
temple (>= 0.8.0)
115120
tilt
116-
haml-rails (1.0.0)
117-
actionpack (>= 4.0.1)
118-
activesupport (>= 4.0.1)
121+
haml-rails (2.0.1)
122+
actionpack (>= 5.1)
123+
activesupport (>= 5.1)
119124
haml (>= 4.0.6, < 6.0)
120125
html2haml (>= 1.0.1)
121-
railties (>= 4.0.1)
126+
railties (>= 5.1)
122127
html2haml (2.2.0)
123128
erubis (~> 2.7.0)
124129
haml (>= 4.0, < 6)
@@ -141,6 +146,7 @@ GEM
141146
nokogiri (>= 1.5.9)
142147
mail (2.7.1)
143148
mini_mime (>= 0.1.1)
149+
marcel (1.0.1)
144150
method_source (1.0.0)
145151
mini_mime (1.1.0)
146152
mini_racer (0.4.0)
@@ -158,27 +164,28 @@ GEM
158164
nokogumbo (2.0.5)
159165
nokogiri (~> 1.8, >= 1.8.4)
160166
public_suffix (4.0.6)
161-
puma (4.3.7)
167+
puma (4.3.8)
162168
nio4r (~> 2.0)
163169
racc (1.5.2)
164170
rack (2.2.3)
165171
rack-cors (1.1.1)
166172
rack (>= 2.0.0)
167173
rack-proxy (0.6.5)
168174
rack
169-
rack-test (0.6.3)
170-
rack (>= 1.0)
171-
rails (5.0.7.2)
172-
actioncable (= 5.0.7.2)
173-
actionmailer (= 5.0.7.2)
174-
actionpack (= 5.0.7.2)
175-
actionview (= 5.0.7.2)
176-
activejob (= 5.0.7.2)
177-
activemodel (= 5.0.7.2)
178-
activerecord (= 5.0.7.2)
179-
activesupport (= 5.0.7.2)
175+
rack-test (1.1.0)
176+
rack (>= 1.0, < 3)
177+
rails (5.2.5)
178+
actioncable (= 5.2.5)
179+
actionmailer (= 5.2.5)
180+
actionpack (= 5.2.5)
181+
actionview (= 5.2.5)
182+
activejob (= 5.2.5)
183+
activemodel (= 5.2.5)
184+
activerecord (= 5.2.5)
185+
activestorage (= 5.2.5)
186+
activesupport (= 5.2.5)
180187
bundler (>= 1.3.0)
181-
railties (= 5.0.7.2)
188+
railties (= 5.2.5)
182189
sprockets-rails (>= 2.0.0)
183190
rails-dom-testing (2.0.3)
184191
activesupport (>= 4.2.0)
@@ -189,15 +196,15 @@ GEM
189196
acme-client (~> 2.0.0)
190197
rails (>= 5.0)
191198
redis
192-
railties (5.0.7.2)
193-
actionpack (= 5.0.7.2)
194-
activesupport (= 5.0.7.2)
199+
railties (5.2.5)
200+
actionpack (= 5.2.5)
201+
activesupport (= 5.2.5)
195202
method_source
196203
rake (>= 0.8.7)
197-
thor (>= 0.18.1, < 2.0)
204+
thor (>= 0.19.0, < 2.0)
198205
rainbow (3.0.0)
199206
rake (13.0.3)
200-
rb-fsevent (0.10.4)
207+
rb-fsevent (0.11.0)
201208
rb-inotify (0.10.1)
202209
ffi (~> 1.0)
203210
rb-readline (0.5.5)
@@ -225,8 +232,8 @@ GEM
225232
sass-listen (4.0.0)
226233
rb-fsevent (~> 0.9, >= 0.9.4)
227234
rb-inotify (~> 0.9, >= 0.9.7)
228-
sass-rails (5.0.7)
229-
railties (>= 4.0.0, < 6)
235+
sass-rails (5.1.0)
236+
railties (>= 5.2.0)
230237
sass (~> 3.1)
231238
sprockets (>= 2.8, < 4.0)
232239
sprockets-rails (>= 2.0, < 4.0)
@@ -267,14 +274,14 @@ GEM
267274
activesupport (>= 4.2)
268275
rack-proxy (>= 0.6.1)
269276
railties (>= 4.2)
270-
websocket-driver (0.6.5)
277+
websocket-driver (0.7.3)
271278
websocket-extensions (>= 0.1.0)
272279
websocket-extensions (0.1.5)
273280
whenever (1.0.0)
274281
chronic (>= 0.6.3)
275282

276283
PLATFORMS
277-
x86_64-linux
284+
ruby
278285

279286
DEPENDENCIES
280287
aws-sdk-acm (~> 1.34)
@@ -288,7 +295,7 @@ DEPENDENCIES
288295
capistrano-rails
289296
capistrano-rvm
290297
capistrano-sidekiq
291-
dotenv-rails (~> 2.1.1)
298+
dotenv-rails (~> 2.7.6)
292299
haml-rails
293300
listen (~> 3.0.5)
294301
lograge (~> 0.11.2)
@@ -297,7 +304,7 @@ DEPENDENCIES
297304
newrelic_rpm (~> 7.0)
298305
puma (~> 4.3)
299306
rack-cors
300-
rails (~> 5.0.2)
307+
rails (= 5.2.5)
301308
rails-letsencrypt (~> 0.9.0)
302309
rb-readline
303310
react_on_rails (= 11.3)
@@ -315,4 +322,4 @@ DEPENDENCIES
315322
whenever
316323

317324
BUNDLED WITH
318-
2.2.16
325+
2.2.17

app/controllers/authors_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class AuthorsController < ApplicationController
44
CONDENSED_COVER_STYLE = "condensed"
55

66
# Allow API acess for actions inside "only"
7-
skip_before_filter :verify_authenticity_token, :only => [:extension]
7+
skip_before_action :verify_authenticity_token, :only => [:extension]
88

99
before_action {
1010
domain = Domain.find_by(domain: request.host)

app/controllers/posts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class PostsController < ApplicationController
55
FRONT_MATTER_CONTENT_PATTERN = /^(?<metadata>---\s*\n.*?\n?)^(---\s*$\n?)/m.freeze
66

77
# Allow API acess for actions inside "only"
8-
skip_before_filter :verify_authenticity_token, :only => [
8+
skip_before_action :verify_authenticity_token, :only => [
99
:create,
1010
:unpublish,
1111
:newsletter

config/application.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
module Listed
66
class Application < Rails::Application
7+
config.active_record.belongs_to_required_by_default = false
8+
79
# Cross-Origin Resource Sharing (CORS) for Rack compatible web applications.
810
config.middleware.insert_before 0, Rack::Cors do
911
allow do

config/initializers/new_framework_defaults.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
ActiveSupport.to_time_preserves_timezone = true
1616

1717
# Require `belongs_to` associations by default. Previous versions had false.
18-
Rails.application.config.active_record.belongs_to_required_by_default = true
18+
Rails.application.config.active_record.belongs_to_required_by_default = false
1919

2020
# Do not halt callback chains when a callback returns false. Previous versions had true.
21-
ActiveSupport.halt_callback_chains_on_return_false = false
21+
#ActiveSupport.halt_callback_chains_on_return_false = false
2222

2323
# Configure SSL options to enable HSTS with subdomains. Previous versions had false.
2424
Rails.application.config.ssl_options = { hsts: { subdomains: true } }

0 commit comments

Comments
 (0)