diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74ecea0b1..e5a589bd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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' diff --git a/Gemfile b/Gemfile index e30d1d431..a9c26e9b6 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/test/action_controller/json_api/linked_test.rb b/test/action_controller/json_api/linked_test.rb index 69d8974d7..a5e396f1b 100644 --- a/test/action_controller/json_api/linked_test.rb +++ b/test/action_controller/json_api/linked_test.rb @@ -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 diff --git a/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb b/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb index a5460aa38..2a5b3980d 100644 --- a/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb +++ b/test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb @@ -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 @@ -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 diff --git a/test/support/isolated_unit.rb b/test/support/isolated_unit.rb index b83e0b296..af80f601b 100644 --- a/test/support/isolated_unit.rb +++ b/test/support/isolated_unit.rb @@ -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?