Skip to content

Commit a4cbc91

Browse files
authored
Merge pull request #1392 from Shopify/upgrade-rails-to-8.0
Upgrade Rails to 8.0
2 parents 2978264 + b2f75f5 commit a4cbc91

File tree

9 files changed

+78
-73
lines changed

9 files changed

+78
-73
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
ruby_version:
27-
- '3.1'
27+
- '3.2'
2828

2929
services:
3030
db:
@@ -67,7 +67,7 @@ jobs:
6767
fail-fast: false
6868
matrix:
6969
ruby_version:
70-
- '3.1'
70+
- '3.2'
7171

7272
services:
7373
db:
@@ -106,7 +106,6 @@ jobs:
106106
fail-fast: false
107107
matrix:
108108
ruby_version:
109-
- '3.1'
110109
- '3.2'
111110
- '3.3'
112111

@@ -146,7 +145,7 @@ jobs:
146145
export SHIPIT_GEM_PATH="${PWD}"
147146
mkdir /tmp/new-app
148147
cd /tmp/new-app
149-
gem install rails -v '~> 7.2.1' --no-document
148+
gem install rails -v '~> 8.0.1' --no-document
150149
rails new shipit --skip-action-cable --skip-turbolinks --skip-action-mailer --skip-active-storage --skip-webpack-install --skip-action-mailbox --skip-action-text -m "${SHIPIT_GEM_PATH}/template.rb"
151150
env:
152151
SHIPIT_EDGE: "1"

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AllCops:
2-
TargetRubyVersion: 3.1
2+
TargetRubyVersion: 3.2
33
Exclude:
44
- tmp/*
55
- bin/*

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.6
1+
3.2.0

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Unreleased
22

33
* Pass `Shipit::Stack` to `DeploySpec::FileSystem.new` and make it accessible through an accessor. (#1356)
4-
* Upgrade Rubocop to 1.48.0
4+
* Upgraded Rubocop to 1.48.0
5+
* Upgraded to Rails 8.0.1
6+
* Upgraded to Sqlite3 2.6.0
7+
* Minimum Ruby version is now Ruby 3.2
58

69
# 0.39.0
710

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
gemspec
44

5-
gem 'sqlite3'
5+
gem 'sqlite3', '>= 2.1'
66
gem 'ejson-rails', require: 'ejson/rails/skip_secrets'
77

88
group :ci do

Gemfile.lock

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ PATH
1616
omniauth-github (~> 1.4)
1717
paquito
1818
pubsubstub (~> 0.2.0)
19-
rails (~> 7.2.1)
19+
rails (~> 8.0.1)
2020
rails-timeago (~> 2.13.0)
2121
rails_autolink (~> 1.1.6)
2222
rake
@@ -33,70 +33,70 @@ PATH
3333
GEM
3434
remote: https://rubygems.org/
3535
specs:
36-
actioncable (7.2.1.1)
37-
actionpack (= 7.2.1.1)
38-
activesupport (= 7.2.1.1)
36+
actioncable (8.0.2)
37+
actionpack (= 8.0.2)
38+
activesupport (= 8.0.2)
3939
nio4r (~> 2.0)
4040
websocket-driver (>= 0.6.1)
4141
zeitwerk (~> 2.6)
42-
actionmailbox (7.2.1.1)
43-
actionpack (= 7.2.1.1)
44-
activejob (= 7.2.1.1)
45-
activerecord (= 7.2.1.1)
46-
activestorage (= 7.2.1.1)
47-
activesupport (= 7.2.1.1)
42+
actionmailbox (8.0.2)
43+
actionpack (= 8.0.2)
44+
activejob (= 8.0.2)
45+
activerecord (= 8.0.2)
46+
activestorage (= 8.0.2)
47+
activesupport (= 8.0.2)
4848
mail (>= 2.8.0)
49-
actionmailer (7.2.1.1)
50-
actionpack (= 7.2.1.1)
51-
actionview (= 7.2.1.1)
52-
activejob (= 7.2.1.1)
53-
activesupport (= 7.2.1.1)
49+
actionmailer (8.0.2)
50+
actionpack (= 8.0.2)
51+
actionview (= 8.0.2)
52+
activejob (= 8.0.2)
53+
activesupport (= 8.0.2)
5454
mail (>= 2.8.0)
5555
rails-dom-testing (~> 2.2)
56-
actionpack (7.2.1.1)
57-
actionview (= 7.2.1.1)
58-
activesupport (= 7.2.1.1)
56+
actionpack (8.0.2)
57+
actionview (= 8.0.2)
58+
activesupport (= 8.0.2)
5959
nokogiri (>= 1.8.5)
60-
racc
61-
rack (>= 2.2.4, < 3.2)
60+
rack (>= 2.2.4)
6261
rack-session (>= 1.0.1)
6362
rack-test (>= 0.6.3)
6463
rails-dom-testing (~> 2.2)
6564
rails-html-sanitizer (~> 1.6)
6665
useragent (~> 0.16)
67-
actiontext (7.2.1.1)
68-
actionpack (= 7.2.1.1)
69-
activerecord (= 7.2.1.1)
70-
activestorage (= 7.2.1.1)
71-
activesupport (= 7.2.1.1)
66+
actiontext (8.0.2)
67+
actionpack (= 8.0.2)
68+
activerecord (= 8.0.2)
69+
activestorage (= 8.0.2)
70+
activesupport (= 8.0.2)
7271
globalid (>= 0.6.0)
7372
nokogiri (>= 1.8.5)
74-
actionview (7.2.1.1)
75-
activesupport (= 7.2.1.1)
73+
actionview (8.0.2)
74+
activesupport (= 8.0.2)
7675
builder (~> 3.1)
7776
erubi (~> 1.11)
7877
rails-dom-testing (~> 2.2)
7978
rails-html-sanitizer (~> 1.6)
8079
active_model_serializers (0.9.13)
8180
activemodel (>= 3.2)
8281
concurrent-ruby (~> 1.0)
83-
activejob (7.2.1.1)
84-
activesupport (= 7.2.1.1)
82+
activejob (8.0.2)
83+
activesupport (= 8.0.2)
8584
globalid (>= 0.3.6)
86-
activemodel (7.2.1.1)
87-
activesupport (= 7.2.1.1)
88-
activerecord (7.2.1.1)
89-
activemodel (= 7.2.1.1)
90-
activesupport (= 7.2.1.1)
85+
activemodel (8.0.2)
86+
activesupport (= 8.0.2)
87+
activerecord (8.0.2)
88+
activemodel (= 8.0.2)
89+
activesupport (= 8.0.2)
9190
timeout (>= 0.4.0)
92-
activestorage (7.2.1.1)
93-
actionpack (= 7.2.1.1)
94-
activejob (= 7.2.1.1)
95-
activerecord (= 7.2.1.1)
96-
activesupport (= 7.2.1.1)
91+
activestorage (8.0.2)
92+
actionpack (= 8.0.2)
93+
activejob (= 8.0.2)
94+
activerecord (= 8.0.2)
95+
activesupport (= 8.0.2)
9796
marcel (~> 1.0)
98-
activesupport (7.2.1.1)
97+
activesupport (8.0.2)
9998
base64
99+
benchmark (>= 0.3)
100100
bigdecimal
101101
concurrent-ruby (~> 1.0, >= 1.3.1)
102102
connection_pool (>= 2.2.5)
@@ -106,6 +106,7 @@ GEM
106106
minitest (>= 5.1)
107107
securerandom (>= 0.3)
108108
tzinfo (~> 2.0, >= 2.0.5)
109+
uri (>= 0.13.1)
109110
addressable (2.8.0)
110111
public_suffix (>= 2.0.2, < 5.0)
111112
ansi_stream (0.0.6)
@@ -117,6 +118,7 @@ GEM
117118
ice_nine (~> 0.11.0)
118119
thread_safe (~> 0.3, >= 0.3.1)
119120
base64 (0.2.0)
121+
benchmark (0.4.0)
120122
bigdecimal (3.1.8)
121123
builder (3.3.0)
122124
byebug (11.1.3)
@@ -277,20 +279,20 @@ GEM
277279
rackup (1.0.0)
278280
rack (< 3)
279281
webrick
280-
rails (7.2.1.1)
281-
actioncable (= 7.2.1.1)
282-
actionmailbox (= 7.2.1.1)
283-
actionmailer (= 7.2.1.1)
284-
actionpack (= 7.2.1.1)
285-
actiontext (= 7.2.1.1)
286-
actionview (= 7.2.1.1)
287-
activejob (= 7.2.1.1)
288-
activemodel (= 7.2.1.1)
289-
activerecord (= 7.2.1.1)
290-
activestorage (= 7.2.1.1)
291-
activesupport (= 7.2.1.1)
282+
rails (8.0.2)
283+
actioncable (= 8.0.2)
284+
actionmailbox (= 8.0.2)
285+
actionmailer (= 8.0.2)
286+
actionpack (= 8.0.2)
287+
actiontext (= 8.0.2)
288+
actionview (= 8.0.2)
289+
activejob (= 8.0.2)
290+
activemodel (= 8.0.2)
291+
activerecord (= 8.0.2)
292+
activestorage (= 8.0.2)
293+
activesupport (= 8.0.2)
292294
bundler (>= 1.15.0)
293-
railties (= 7.2.1.1)
295+
railties (= 8.0.2)
294296
rails-dom-testing (2.2.0)
295297
activesupport (>= 5.0.0)
296298
minitest
@@ -305,9 +307,9 @@ GEM
305307
actionview (> 3.1)
306308
activesupport (> 3.1)
307309
railties (> 3.1)
308-
railties (7.2.1.1)
309-
actionpack (= 7.2.1.1)
310-
activesupport (= 7.2.1.1)
310+
railties (8.0.2)
311+
actionpack (= 8.0.2)
312+
activesupport (= 8.0.2)
311313
irb (~> 1.13)
312314
rackup (>= 1.0.0)
313315
rake (>= 12.2)
@@ -376,8 +378,8 @@ GEM
376378
activesupport (>= 5.2)
377379
sprockets (>= 3.0.0)
378380
spy (1.0.2)
379-
sqlite3 (2.0.4-arm64-darwin)
380-
sqlite3 (2.0.4-x86_64-linux-gnu)
381+
sqlite3 (2.6.0-arm64-darwin)
382+
sqlite3 (2.6.0-x86_64-linux-gnu)
381383
state_machines (0.5.0)
382384
state_machines-activemodel (0.8.0)
383385
activemodel (>= 5.1)
@@ -393,6 +395,7 @@ GEM
393395
tzinfo (2.0.6)
394396
concurrent-ruby (~> 1.0)
395397
unicode-display_width (2.6.0)
398+
uri (1.0.3)
396399
useragent (0.16.10)
397400
validate_url (1.0.15)
398401
activemodel (>= 3.0.0)
@@ -429,7 +432,7 @@ DEPENDENCIES
429432
shipit-engine!
430433
simplecov
431434
spy
432-
sqlite3
435+
sqlite3 (>= 2.1)
433436
webmock
434437

435438
BUNDLED WITH

shipit-engine.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
1818
s.files = Dir["{app,config,db,lib,vendor}/**/*", "LICENSE", "Rakefile", "README.md"]
1919
s.test_files = Dir["test/**/*"] - Dir["test/dummy/tmp/**/*"] - Dir["test/dummy/log/**/*"]
2020

21-
s.required_ruby_version = '>= 3.1.0'
21+
s.required_ruby_version = '>= 3.2.0'
2222

2323
s.add_dependency('active_model_serializers', '~> 0.9.3')
2424
s.add_dependency('ansi_stream', '~> 0.0.6')
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
3434
s.add_dependency('omniauth-github', '~> 1.4')
3535
s.add_dependency('paquito')
3636
s.add_dependency('pubsubstub', '~> 0.2.0')
37-
s.add_dependency('rails', '~> 7.2.1')
37+
s.add_dependency('rails', '~> 8.0.1')
3838
s.add_dependency('rails_autolink', '~> 1.1.6')
3939
s.add_dependency('rails-timeago', '~> 2.13.0')
4040
s.add_dependency('rake')

template.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.1')
44
raise Thor::Error, "You need at least Ruby 3.1 to install shipit"
55
end
6-
if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('7.2')
7-
raise Thor::Error, "You need Rails 7.2 to install shipit"
6+
if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('8.0')
7+
raise Thor::Error, "You need Rails 8.0 to install shipit"
88
end
99

1010
route %(mount Shipit::Engine, at: '/')
@@ -124,7 +124,7 @@
124124
end
125125
CODE
126126

127-
inject_into_file 'config/application.rb', after: "load_defaults 7.2\n" do
127+
inject_into_file 'config/application.rb', after: "load_defaults 8.0\n" do
128128
"\n config.active_job.queue_adapter = :sidekiq\n"
129129
end
130130

test/dummy/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
module Shipit
1919
class Application < Rails::Application
20-
config.load_defaults 7.2
20+
config.load_defaults 8.0
2121
config.active_record.encryption.support_sha1_for_non_deterministic_encryption = true
2222
end
2323
end

0 commit comments

Comments
 (0)