Skip to content

Commit 4ae6374

Browse files
authored
Implement ruby matrix for testing (#190)
* Implement ruby matrix for testing * update ruby-version/gemfiles * better generic configuration * rails matrix * fix * appraisal * typo * wip * revert
1 parent 87f43b4 commit 4ae6374

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

.github/workflows/ruby.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ on:
1414
jobs:
1515
test:
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
ruby: ["3.2", "3.3", "3.4"]
1720
steps:
1821
- uses: actions/checkout@v4
1922
- uses: ruby/setup-ruby@v1
2023
with:
21-
ruby-version: "3.2" # Not needed with a .ruby-version file
24+
ruby-version: ${{ matrix.ruby }}
2225
- uses: actions/cache@v3
2326
with:
2427
path: vendor/bundle
@@ -40,7 +43,7 @@ jobs:
4043
- uses: actions/checkout@v4
4144
- uses: ruby/setup-ruby@v1
4245
with:
43-
ruby-version: "3.2" # Not needed with a .ruby-version file
46+
ruby-version: "3.4" # Not needed with a .ruby-version file
4447
- uses: actions/cache@v3
4548
with:
4649
path: vendor/bundle

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.4.2

gemfiles/rails_8.0.gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
source 'https://rubygems.org'
66

7-
gem 'rails', github: 'rails/rails'
7+
gem 'rails', '~> 8.0.2'
88

99
gemspec path: '../'

gemfiles/rails_edge.gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
# This file was generated by Appraisal
4+
5+
source 'https://rubygems.org'
6+
7+
gem 'rails', github: 'rails/rails'
8+
9+
gemspec path: '../'

spec/cloudflare/rails_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
ActiveSupport::Dependencies.autoload_once_paths = []
1414
ActiveSupport::Dependencies.autoload_paths = []
1515
Class.new(Rails::Application) do
16-
config.active_support.deprecation = :stderr
16+
config.load_defaults Rails.gem_version.version.to_f
1717
config.eager_load = false
18-
config.cache_store = :null_store
19-
config.action_dispatch.return_only_media_type_on_content_type = false
20-
config.secret_key_base = SecureRandom.hex
18+
config.active_support.deprecation = :stderr
2119
config.middleware.use Rack::Attack if ENV['RACK_ATTACK']
2220
end
2321
end

0 commit comments

Comments
 (0)