Skip to content

Commit 1f58d61

Browse files
committed
Update to rails 8.0
1 parent 8527a50 commit 1f58d61

File tree

7 files changed

+22
-16
lines changed

7 files changed

+22
-16
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
ruby-version: ['3.1', '3.2']
15+
ruby-version: ['3.3', '3.4']
1616
haml: [true, false]
1717
steps:
1818
- uses: actions/checkout@v4
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Ruby
3535
uses: ruby/setup-ruby@v1
3636
with:
37-
ruby-version: 3.1
37+
ruby-version: 3.3
3838
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3939
- name: Run rubocop
4040
run: bundle exec rubocop
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Ruby
4848
uses: ruby/setup-ruby@v1
4949
with:
50-
ruby-version: 3.1
50+
ruby-version: 3.3
5151
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
5252
- uses: paambaati/[email protected]
5353
env:

Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '~> 7.1.0'
3+
gem 'rails', '~> 8.0.0'
44

55
gem 'puma'
66

77
gem 'rake'
8-
gem 'sdoc'
8+
99
gem 'rspec-rails'
1010

1111
gem 'haml'
1212
gem 'jbuilder'
1313

1414
gem 'kaminari'
1515

16-
gem "sprockets-rails"
16+
gem "propshaft"
1717
gem "jsbundling-rails"
1818
gem "cssbundling-rails"
1919
gem "turbo-rails"
@@ -27,11 +27,12 @@ group :development do
2727
gem 'web-console'
2828
gem 'rubocop'
2929
gem 'rubocop-rails'
30+
gem 'sdoc'
3031
gem 'spring'
3132
end
3233

3334
gem 'simplecov', require: false
34-
gem 'debug', platforms: [:mri, :windows]
35+
gem 'debug', platforms: [:mri, :windows], require: "debug/prelude"
3536

3637
# platform specific gems
3738

Rakefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,21 @@ namespace :test do
6464
/\A/,
6565
"require 'simplecov'\nSimpleCov.start do\n" +
6666
" coverage_dir 'coverage/test'\nend\n")
67+
file_replace(File.join(TEST_APP_ROOT, 'test', 'test_helper.rb'),
68+
/module ActiveSupport/,
69+
"Rails.root.glob('test/support/**/*.rb').sort_by(&:to_s).each { |f| require f }\n\n" +
70+
"module ActiveSupport")
6771
file_replace(File.join(TEST_APP_ROOT, 'spec', 'spec_helper.rb'),
6872
/\A/,
6973
"require 'simplecov'\nSimpleCov.start do\n" +
7074
" coverage_dir 'coverage/spec'\nend\n")
7175
file_replace(File.join(TEST_APP_ROOT, 'spec', 'rails_helper.rb'),
72-
"# Rails.root.glob('spec/support/**/*.rb').sort.each { |f| require f }",
73-
"Rails.root.glob('spec/support/**/*.rb').sort.each { |f| require f }")
76+
"# Rails.root.glob('spec/support/**/*.rb').sort_by(&:to_s).each { |f| require f }",
77+
"Rails.root.glob('spec/support/**/*.rb').sort_by(&:to_s).each { |f| require f }")
78+
79+
file_replace(File.join(TEST_APP_ROOT, 'spec', 'rails_helper.rb'),
80+
"# config.infer_spec_type_from_file_location!",
81+
"config.infer_spec_type_from_file_location!")
7482
end
7583
end
7684

app/controllers/dry_crud/render_callbacks.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ module Prepends
1717
# If a callback renders or redirects, the action is not rendered.
1818
def render(...)
1919
options = _normalize_render(...)
20-
callback = "render_#{options[:template]}"
21-
20+
callback = "render_#{options[:template] || options[:action] || action_name}"
2221
run_callbacks(callback) if respond_to?(:"_#{callback}_callbacks", true)
2322

24-
super(...) unless performed?
23+
super unless performed?
2524
end
2625

2726
private

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<%= csp_meta_tag %>
1111

1212
<%= stylesheet_link_tag 'application', 'data-turbo-track': 'reload' %>
13-
<%= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true %>
13+
<%= javascript_include_tag 'application', 'data-turbo-track': 'reload', type: 'module', defer: true %>
1414

1515
<%= yield :head %>
1616
</head>

app/views/layouts/application.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
= csp_meta_tag
1313

1414
= stylesheet_link_tag 'application', 'data-turbo-track': 'reload'
15-
= javascript_include_tag 'application', 'data-turbo-track': 'reload', defer: true
15+
= javascript_include_tag 'application', 'data-turbo-track': 'reload', type: 'module', defer: true
1616

1717
= yield :head
1818

test/templates/Gemfile.append

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ gem 'dry_crud', path: '../..'
22

33
gem 'simplecov', require: false, group: :test
44

5-
gem 'sqlite3', '~> 1.4', platforms: :ruby
6-
75
platforms :jruby do
86
gem 'jdbc-sqlite3'
97
gem 'activerecord-jdbcsqlite3-adapter'

0 commit comments

Comments
 (0)