Skip to content

Commit f8ecafa

Browse files
committed
feat: Ruby 3.2 minimum and Ruby 4.0 support
1 parent d9fa0f5 commit f8ecafa

9 files changed

Lines changed: 54 additions & 41 deletions

.github/workflows/acceptance-tests-on-emulator.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,30 @@ jobs:
1818
strategy:
1919
max-parallel: 4
2020
matrix:
21-
ruby: ["3.1", "3.2", "3.3", "3.4"]
21+
ruby: ["3.2", "3.3", "3.4", "4.0"]
2222
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
2323
# Exclude combinations that are not supported.
2424
exclude:
25-
- ruby: "3.1"
26-
ar: "~> 8.0.0"
27-
- ruby: "3.1"
28-
ar: "~> 8.1.0"
2925
- ruby: "3.4"
3026
ar: "~> 7.0.0"
3127
- ruby: "3.4"
3228
ar: "~> 7.1.0"
3329
- ruby: "3.4"
3430
ar: "~> 7.2.0"
31+
- ruby: "4.0"
32+
ar: "~> 7.0.0"
33+
- ruby: "4.0"
34+
ar: "~> 7.1.0"
35+
- ruby: "4.0"
36+
ar: "~> 7.2.0"
3537
env:
3638
AR_VERSION: ${{ matrix.ar }}
3739
steps:
38-
- uses: actions/checkout@v6
40+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3941
- name: Set up Ruby
4042
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
4143
# (see https://github.com/ruby/setup-ruby#versioning):
42-
uses: ruby/setup-ruby@v1
44+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
4345
with:
4446
bundler-cache: false
4547
ruby-version: ${{ matrix.ruby }}

.github/workflows/ci.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,30 @@ jobs:
1010
strategy:
1111
max-parallel: 4
1212
matrix:
13-
ruby: ["3.1", "3.2", "3.3", "3.4"]
13+
ruby: ["3.2", "3.3", "3.4", "4.0"]
1414
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
1515
# Exclude combinations that are not supported.
1616
exclude:
17-
- ruby: "3.1"
18-
ar: "~> 8.0.0"
19-
- ruby: "3.1"
20-
ar: "~> 8.1.0"
2117
- ruby: "3.4"
2218
ar: "~> 7.0.0"
2319
- ruby: "3.4"
2420
ar: "~> 7.1.0"
2521
- ruby: "3.4"
2622
ar: "~> 7.2.0"
23+
- ruby: "4.0"
24+
ar: "~> 7.0.0"
25+
- ruby: "4.0"
26+
ar: "~> 7.1.0"
27+
- ruby: "4.0"
28+
ar: "~> 7.2.0"
2729
env:
2830
AR_VERSION: ${{ matrix.ar }}
2931
steps:
30-
- uses: actions/checkout@v6
32+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3133
- name: Set up Ruby
3234
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby
3335
# (see https://github.com/ruby/setup-ruby#versioning):
34-
uses: ruby/setup-ruby@v1
36+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
3537
with:
3638
bundler-cache: false
3739
ruby-version: ${{ matrix.ruby }}

.github/workflows/nightly-acceptance-tests-on-emulator.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,28 @@ jobs:
1818
strategy:
1919
max-parallel: 4
2020
matrix:
21-
ruby: ["3.1", "3.2", "3.3", "3.4"]
21+
ruby: ["3.2", "3.3", "3.4", "4.0"]
2222
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
2323
# Exclude combinations that are not supported.
2424
exclude:
25-
- ruby: "3.1"
26-
ar: "~> 8.0.0"
27-
- ruby: "3.1"
28-
ar: "~> 8.1.0"
2925
- ruby: "3.4"
3026
ar: "~> 7.0.0"
3127
- ruby: "3.4"
3228
ar: "~> 7.1.0"
3329
- ruby: "3.4"
3430
ar: "~> 7.2.0"
31+
- ruby: "4.0"
32+
ar: "~> 7.0.0"
33+
- ruby: "4.0"
34+
ar: "~> 7.1.0"
35+
- ruby: "4.0"
36+
ar: "~> 7.2.0"
3537
env:
3638
AR_VERSION: ${{ matrix.ar }}
3739
steps:
38-
- uses: actions/checkout@v6
40+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3941
- name: Set up Ruby
40-
uses: ruby/setup-ruby@v1
42+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
4143
with:
4244
# Disable caching as we are overriding the ActiveRecord below.
4345
bundler-cache: false

.github/workflows/nightly-unit-tests.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,28 @@ jobs:
1111
max-parallel: 4
1212
matrix:
1313
# Run acceptance tests all supported combinations of Ruby and ActiveRecord.
14-
ruby: ["3.1", "3.2", "3.3", "3.4"]
14+
ruby: ["3.2", "3.3", "3.4", "4.0"]
1515
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0", "~> 8.1.0"]
1616
# Exclude combinations that are not supported.
1717
exclude:
18-
- ruby: "3.1"
19-
ar: "~> 8.0.0"
20-
- ruby: "3.1"
21-
ar: "~> 8.1.0"
2218
- ruby: "3.4"
2319
ar: "~> 7.0.0"
2420
- ruby: "3.4"
2521
ar: "~> 7.1.0"
2622
- ruby: "3.4"
2723
ar: "~> 7.2.0"
24+
- ruby: "4.0"
25+
ar: "~> 7.0.0"
26+
- ruby: "4.0"
27+
ar: "~> 7.1.0"
28+
- ruby: "4.0"
29+
ar: "~> 7.2.0"
2830
env:
2931
AR_VERSION: ${{ matrix.ar }}
3032
steps:
31-
- uses: actions/checkout@v6
33+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
3234
- name: Set up Ruby
33-
uses: ruby/setup-ruby@v1
35+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
3436
with:
3537
# Disable caching as we are overriding the ActiveRecord below.
3638
bundler-cache: false

.github/workflows/rubocop.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
timeout-minutes: 10
1313

1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
1616
- name: setup ruby
17-
uses: ruby/setup-ruby@v1
17+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
1818
with:
19-
ruby-version: '3.4.8'
19+
ruby-version: '4.0'
2020
- name: cache gems
2121
uses: actions/cache@v5
2222
with:

.github/workflows/samples.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,28 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
ruby: ["3.1", "3.2", "3.3", "3.4"]
11+
ruby: ["3.2", "3.3", "3.4", "4.0"]
1212
ar: ["~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"]
1313
# Exclude combinations that are not supported.
1414
exclude:
15-
- ruby: "3.1"
16-
ar: "~> 8.0.0"
1715
- ruby: "3.4"
1816
ar: "~> 7.0.0"
1917
- ruby: "3.4"
2018
ar: "~> 7.1.0"
2119
- ruby: "3.4"
2220
ar: "~> 7.2.0"
21+
- ruby: "4.0"
22+
ar: "~> 7.0.0"
23+
- ruby: "4.0"
24+
ar: "~> 7.1.0"
25+
- ruby: "4.0"
26+
ar: "~> 7.2.0"
2327
env:
2428
AR_VERSION: ${{ matrix.ar }}
2529
steps:
26-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
2731
- name: Set up Ruby
28-
uses: ruby/setup-ruby@v1
32+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
2933
with:
3034
bundler-cache: false
3135
ruby-version: ${{ matrix.ruby }}

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ gem "minitest", "~> 5.27.0"
1010
gem "minitest-rg", "~> 5.4.0"
1111
gem "pry", "~> 0.14.2"
1212
gem "pry-byebug", "~> 3.11.0"
13+
gem "readline"
1314
gem "mutex_m"
1415
# Add sqlite3 for testing for compatibility with other adapters.
1516
gem 'sqlite3'

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ for Spanner PostgreSQL-dialect databases.__
1111

1212
This project provides a Spanner adapter for ActiveRecord. It supports the following versions:
1313

14-
- ActiveRecord 7.0.x with Ruby 3.1 and higher.
15-
- ActiveRecord 7.1.x with Ruby 3.1 and higher.
16-
- ActiveRecord 7.2.x with Ruby 3.1 and higher.
14+
- ActiveRecord 7.0.x with Ruby 3.2 and higher.
15+
- ActiveRecord 7.1.x with Ruby 3.2 and higher.
16+
- ActiveRecord 7.2.x with Ruby 3.2 and higher.
1717
- ActiveRecord 8.0.x with Ruby 3.2 and higher.
1818
- ActiveRecord 8.1.x with Ruby 3.2 and higher.
1919

activerecord-spanner-adapter.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ Gem::Specification.new do |spec|
2222
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename f }
2323
spec.require_paths = ["lib"]
2424

25-
spec.required_ruby_version = ">= 3.1"
25+
spec.required_ruby_version = ">= 3.2"
2626

2727
spec.add_dependency "google-cloud-spanner", "~> 2.25"
2828
spec.add_dependency "google-cloud-spanner-v1", "~> 1.7"
2929
spec.add_runtime_dependency "activerecord", [">= 7.0", "< 9"]
3030

3131
spec.add_development_dependency "autotest-suffix", "~> 1.1"
3232
spec.add_development_dependency "bundler", [">= 2.0", "< 5.0"]
33-
spec.add_development_dependency "google-style", "~> 1.31.0"
33+
spec.add_development_dependency "google-style", "~> 1.32.0"
3434
spec.add_development_dependency "minitest", "~> 5.10"
3535
spec.add_development_dependency "minitest-autotest", "~> 1.0"
3636
spec.add_development_dependency "minitest-focus", "~> 1.1"

0 commit comments

Comments
 (0)