Skip to content

Support Rails 8 #2483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ jobs:
matrix:
include:
# Recent Rubies and Rails
- ruby-version: '3.3'
rails-version: '8.0'
- ruby-version: '3.2'
rails-version: '8.0'
- ruby-version: '3.2'
rails-version: '7.2'
- ruby-version: '3.2'
rails-version: '7.1'
- ruby-version: '3.1'
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ end

group :test do
platforms(*(@windows_platforms + [:ruby])) do
if version == 'master' || version >= '6'
if version == 'master' || version >= '8'
gem 'sqlite3', '~> 2.1'
elsif version >= '6'
gem 'sqlite3', '< 1.6'
else
gem 'sqlite3', '~> 1.3.13'
Expand Down
2 changes: 1 addition & 1 deletion test/action_controller/json_api/linked_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def render_collection_with_include

setup do
@routes = Rails.application.routes.draw do
ActiveSupport::Deprecation.silence do
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
match ':action', to: LinkedTestController, via: [:get, :post]
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class WithoutRenderer < JsonApiRendererTest
make_basic_app

Rails.application.routes.draw do
ActiveSupport::Deprecation.silence do
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
match ':action', to: TestController, via: [:get, :post]
end
end
Expand Down Expand Up @@ -112,7 +112,7 @@ class WithRenderer < JsonApiRendererTest
make_basic_app

Rails.application.routes.draw do
ActiveSupport::Deprecation.silence do
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
match ':action', to: TestController, via: [:get, :post]
end
end
Expand Down
5 changes: 4 additions & 1 deletion test/support/isolated_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def make_basic_app
config.hosts << 'www.example.com' if Rails.version >= '6.0'
end
def app.name; 'IsolatedRailsApp'; end # rubocop:disable Style/SingleLineMethods
app.respond_to?(:secrets) && app.secrets.secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'

secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
app.respond_to?(:secrets) && app.secrets.secret_key_base = secret_key_base
app.respond_to?(:credentials) && app.credentials.secret_key_base = secret_key_base

@app = app
yield @app if block_given?
Expand Down