Skip to content

Commit eef9fd2

Browse files
authored
Merge pull request #2483 from pulkit110/0-10-stable
Support Rails 8
2 parents b21e78b + b31d91c commit eef9fd2

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

.github/workflows/ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
matrix:
1414
include:
1515
# Recent Rubies and Rails
16+
- ruby-version: '3.3'
17+
rails-version: '8.0'
18+
- ruby-version: '3.2'
19+
rails-version: '8.0'
20+
- ruby-version: '3.2'
21+
rails-version: '7.2'
1622
- ruby-version: '3.2'
1723
rails-version: '7.1'
1824
- ruby-version: '3.1'

Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ end
6060

6161
group :test do
6262
platforms(*(@windows_platforms + [:ruby])) do
63-
if version == 'master' || version >= '6'
63+
if version == 'master' || version >= '8'
64+
gem 'sqlite3', '~> 2.1'
65+
elsif version >= '6'
6466
gem 'sqlite3', '< 1.6'
6567
else
6668
gem 'sqlite3', '~> 1.3.13'

test/action_controller/json_api/linked_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def render_collection_with_include
8888

8989
setup do
9090
@routes = Rails.application.routes.draw do
91-
ActiveSupport::Deprecation.silence do
91+
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
9292
match ':action', to: LinkedTestController, via: [:get, :post]
9393
end
9494
end

test/active_model_serializers/register_jsonapi_renderer_test_isolated.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class WithoutRenderer < JsonApiRendererTest
6666
make_basic_app
6767

6868
Rails.application.routes.draw do
69-
ActiveSupport::Deprecation.silence do
69+
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
7070
match ':action', to: TestController, via: [:get, :post]
7171
end
7272
end
@@ -112,7 +112,7 @@ class WithRenderer < JsonApiRendererTest
112112
make_basic_app
113113

114114
Rails.application.routes.draw do
115-
ActiveSupport::Deprecation.silence do
115+
(Rails.try(:deprecator) || ActiveSupport::Deprecation).silence do
116116
match ':action', to: TestController, via: [:get, :post]
117117
end
118118
end

test/support/isolated_unit.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def make_basic_app
7171
config.hosts << 'www.example.com' if Rails.version >= '6.0'
7272
end
7373
def app.name; 'IsolatedRailsApp'; end # rubocop:disable Style/SingleLineMethods
74-
app.respond_to?(:secrets) && app.secrets.secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
74+
75+
secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
76+
app.respond_to?(:secrets) && app.secrets.secret_key_base = secret_key_base
77+
app.respond_to?(:credentials) && app.credentials.secret_key_base = secret_key_base
7578

7679
@app = app
7780
yield @app if block_given?

0 commit comments

Comments
 (0)