Skip to content

Commit 83e3569

Browse files
committed
Confirming support for Ruby 4.0
1 parent 2088152 commit 83e3569

5 files changed

Lines changed: 15 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,9 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4' ]
13-
bundler: [ '1.17.3', '2.3.12' ]
12+
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0' ]
1413
database: [ 'mysql2', 'postgresql', 'sqlite3', 'trilogy' ]
1514
exclude:
16-
- ruby: '2.6'
17-
bundler: '2.3.12'
18-
- ruby: '2.7'
19-
bundler: '1.17.3'
20-
- ruby: '3.0'
21-
bundler: '1.17.3'
22-
- ruby: '3.1'
23-
bundler: '1.17.3'
24-
- ruby: '3.2'
25-
bundler: '1.17.3'
26-
- ruby: '3.3'
27-
bundler: '1.17.3'
28-
- ruby: '3.4'
29-
bundler: '1.17.3'
3015
- ruby: '2.6'
3116
database: 'trilogy'
3217
- ruby: '2.7'
@@ -53,26 +38,19 @@ jobs:
5338

5439
steps:
5540
- name: Check out code
56-
uses: actions/checkout@v2
41+
uses: actions/checkout@v6
5742
- name: Set up ruby
5843
uses: ruby/setup-ruby@v1
5944
with:
6045
ruby-version: ${{ matrix.ruby }}
61-
bundler: ${{ matrix.bundler }}
6246
bundler-cache: true
63-
64-
- name: Set up Bundler
65-
run: |
66-
export BUNDLER_VERSION=${{ matrix.bundler }}
67-
export BUNDLE_PATH=$PWD/vendor/bundle
68-
69-
bundle _${{ matrix.bundler }}_ config set path $PWD/$BUNDLE_PATH
70-
bundle _${{ matrix.bundler }}_ install --jobs=4 --retry=3
71-
bundle _${{ matrix.bundler }}_ update
7247
- name: Set up Appraisal
48+
env:
49+
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
7350
run: bundle exec appraisal update
7451
- name: Test
7552
env:
53+
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
7654
CI: "true"
7755
DB_ADAPTER: ${{ matrix.database }}
7856
DB_USERNAME: root
@@ -88,7 +66,7 @@ jobs:
8866

8967
steps:
9068
- name: Check out code
91-
uses: actions/checkout@v2
69+
uses: actions/checkout@v6
9270
- name: Set up ruby
9371
uses: ruby/setup-ruby@v1
9472
with:

Appraisals

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if RUBY_VERSION.to_f >= 2.5 && RUBY_VERSION.to_f < 3.1
2929
end
3030
end
3131

32-
if RUBY_VERSION.to_f >= 2.5
32+
if RUBY_VERSION.to_f >= 2.5 && RUBY_VERSION.to_f < 4.0
3333
appraise "rails-6.1" do
3434
gem "rails", "~> 6.1.0"
3535
gem "mysql2", "~> 0.5.0"
@@ -72,7 +72,9 @@ if RUBY_VERSION.to_f >= 3.2
7272
gem "sqlite3", "~> 2.1"
7373
gem "trilogy", "~> 2.9"
7474
end
75+
end
7576

77+
if RUBY_VERSION.to_f >= 3.3
7678
appraise "rails-edge" do
7779
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "main"
7880
gem "mysql2", "~> 0.5.0"

Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source "http://rubygems.org"
55
gemspec
66

77
if RUBY_VERSION.to_f < 3.0
8+
gem "psych", "< 5.0"
89
gem "sqlite3", "~> 1.3.13"
910
else
1011
gem "sqlite3", "~> 1.4"
@@ -13,5 +14,7 @@ end
1314
gem "rubocop", "~> 0.92"
1415
gem "rubocop-packaging", "~> 0.5"
1516

16-
# Required for testing Rails 6.1 on MRI 3.1+
17+
# Gems that are no longer part of stdlib:
1718
gem "net-smtp" if RUBY_VERSION.to_f > 3.0
19+
gem "ostruct" if RUBY_VERSION.to_f > 3.4
20+
gem "stringio" if RUBY_VERSION.to_f > 3.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ end
187187

188188
## Compatibility
189189

190-
The current test matrix covers MRI 2.6 to 3.4, and Rails 5.0 to 8.1. It will possibly work on older versions and other Ruby implementations as well.
190+
The current test matrix covers MRI 2.6 to 4.0, and Rails 5.0 to 8.1. It will possibly work on older versions and other Ruby implementations as well.
191191

192192
You can also use Combustion with multiple versions of Rails to test compatibility across them. [Appraisal](https://github.com/thoughtbot/appraisal) is a gem that can help with this, and a good starting reference is the [Thinking Sphinx](https://github.com/pat/thinking-sphinx) test suite, which runs against [multiple versions](https://github.com/pat/thinking-sphinx/blob/develop/Appraisals) of Rails.
193193

combustion.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ Gem::Specification.new do |s|
3737
s.add_development_dependency "pg"
3838
s.add_development_dependency "rails"
3939
s.add_development_dependency "rspec"
40-
s.add_development_dependency "rubocop", "~> 0.81.0"
40+
s.add_development_dependency "rubocop", "~> 0.92"
4141
s.add_development_dependency "sqlite3"
4242
end

0 commit comments

Comments
 (0)