Skip to content

Commit 7212eac

Browse files
authored
Bump ActiveRecord supported versions to >= 7 and < 9 (#201)
1 parent cc3dbcb commit 7212eac

17 files changed

+985
-43
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,29 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
ruby: ["3.0", "3.1", "3.2", "3.3"]
22+
ruby:
23+
[
24+
{ version: "3.1", gemfile: activerecord_7 },
25+
{ version: "3.1", gemfile: activerecord_7_1 },
26+
{ version: "3.1", gemfile: activerecord_7_2 },
27+
{ version: "3.2", gemfile: activerecord_7 },
28+
{ version: "3.2", gemfile: activerecord_7_1 },
29+
{ version: "3.2", gemfile: activerecord_7_2 },
30+
{ version: "3.2", gemfile: activerecord_8 },
31+
{ version: "3.2", gemfile: activerecord_main },
32+
{ version: "3.3", gemfile: activerecord_7 },
33+
{ version: "3.3", gemfile: activerecord_7_1 },
34+
{ version: "3.3", gemfile: activerecord_7_2 },
35+
{ version: "3.3", gemfile: activerecord_8 },
36+
{ version: "3.3", gemfile: activerecord_main },
37+
]
38+
env:
39+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.ruby.gemfile }}.gemfile
40+
BUNDLE_PATH_RELATIVE_TO_CWD: true
2341
steps:
2442
- uses: actions/checkout@v4
2543
- uses: ruby/setup-ruby@v1
2644
with:
2745
bundler-cache: true
28-
ruby-version: ${{ matrix.ruby }}
46+
ruby-version: ${{ matrix.ruby.version }}
2947
- run: bundle exec rake test

.rubocop.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ inherit_gem:
22
boxt_rubocop:
33
- rspec.yml
44

5+
inherit_mode:
6+
merge:
7+
- Exclude
8+
59
require:
610
- boxt_rubocop
711
- rubocop-rake
812
- rubocop-rspec
913

1014
AllCops:
11-
TargetRubyVersion: 3.0
15+
TargetRubyVersion: 3.1
16+
Exclude:
17+
- gemfiles/**/*

Appraisals

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# frozen_string_literal: true
2+
3+
# Currently doesn't work with Appraisal 2.5.0 and Ruby >= 3.1
4+
# customize_gemfiles do
5+
# {
6+
# heading: <<~HEADING
7+
# # frozen_string_literal: true
8+
#
9+
# `%<gemfile>s` has been generated by Appraisal, do NOT modify it or `%<lockfile>s` directly!
10+
# Make the changes to the "%<appraisal>s" block in `Appraisals` instead.
11+
# HEADING
12+
# }
13+
# end
14+
15+
appraise "activerecord-7" do
16+
gem "activerecord", "~> 7.0.0"
17+
gem "sqlite3", "~> 1.7"
18+
end
19+
20+
appraise "activerecord-7-1" do
21+
gem "activerecord", "~> 7.1.0"
22+
gem "sqlite3", "~> 1.7"
23+
end
24+
25+
appraise "activerecord-7-2" do
26+
gem "activerecord", "~> 7.2.0"
27+
gem "sqlite3", "~> 1.7"
28+
end
29+
30+
appraise "activerecord-8" do
31+
gem "activerecord", "~> 8.0.0"
32+
gem "sqlite3", "~> 2.0"
33+
end
34+
35+
appraise "activerecord-main" do
36+
gem "activerecord", github: "rails/rails", branch: "main"
37+
gem "sqlite3", "~> 2.0"
38+
end

Gemfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ source "https://rubygems.org"
44

55
gemspec
66

7-
group :development do
8-
gem "activerecord", "~> 7.1"
9-
gem "boxt_rubocop", "2.15.0"
10-
gem "byebug", "~> 11.0"
11-
gem "rake", "~> 13.2"
12-
gem "rspec", "~> 3.13"
13-
gem "simplecov", "~> 0.22"
14-
gem "sqlite3", "~> 1.7"
15-
gem "timecop", "~> 0.9"
16-
gem "with_model", "~> 2.1"
17-
end
7+
gem "activerecord", "~> 8.0"
8+
gem "appraisal", "~> 2.5"
9+
gem "boxt_rubocop", "2.15.0"
10+
gem "byebug", "~> 11.1"
11+
gem "rake", "~> 13.2"
12+
gem "rspec", "~> 3.13"
13+
gem "simplecov", "~> 0.22"
14+
gem "sqlite3", "~> 2.1"
15+
gem "timecop", "~> 0.9"
16+
gem "with_model", "~> 2.1"

Gemfile.lock

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,38 @@ PATH
22
remote: .
33
specs:
44
logga (5.0.0)
5-
activerecord (>= 6, < 8)
6-
activesupport (>= 6, < 8)
5+
activerecord (>= 7, < 9)
6+
activesupport (>= 7, < 9)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
activemodel (7.1.4.2)
12-
activesupport (= 7.1.4.2)
13-
activerecord (7.1.4.2)
14-
activemodel (= 7.1.4.2)
15-
activesupport (= 7.1.4.2)
11+
activemodel (8.0.0)
12+
activesupport (= 8.0.0)
13+
activerecord (8.0.0)
14+
activemodel (= 8.0.0)
15+
activesupport (= 8.0.0)
1616
timeout (>= 0.4.0)
17-
activesupport (7.1.4.2)
17+
activesupport (8.0.0)
1818
base64
19+
benchmark (>= 0.3)
1920
bigdecimal
20-
concurrent-ruby (~> 1.0, >= 1.0.2)
21+
concurrent-ruby (~> 1.0, >= 1.3.1)
2122
connection_pool (>= 2.2.5)
2223
drb
2324
i18n (>= 1.6, < 2)
25+
logger (>= 1.4.2)
2426
minitest (>= 5.1)
25-
mutex_m
26-
tzinfo (~> 2.0)
27+
securerandom (>= 0.3)
28+
tzinfo (~> 2.0, >= 2.0.5)
29+
uri (>= 0.13.1)
30+
appraisal (2.5.0)
31+
bundler
32+
rake
33+
thor (>= 0.14.0)
2734
ast (2.4.2)
2835
base64 (0.2.0)
36+
benchmark (0.4.0)
2937
bigdecimal (3.1.8)
3038
boxt_rubocop (2.15.0)
3139
rubocop (= 1.69.0)
@@ -39,16 +47,16 @@ GEM
3947
concurrent-ruby (1.3.4)
4048
connection_pool (2.4.1)
4149
diff-lcs (1.5.1)
42-
docile (1.4.0)
50+
docile (1.4.1)
4351
drb (2.2.1)
4452
faker (3.5.1)
4553
i18n (>= 1.8.11, < 2)
4654
i18n (1.14.6)
4755
concurrent-ruby (~> 1.0)
4856
json (2.9.0)
4957
language_server-protocol (3.17.0.3)
58+
logger (1.6.2)
5059
minitest (5.25.4)
51-
mutex_m (0.3.0)
5260
parallel (1.26.3)
5361
parser (3.3.6.0)
5462
ast (~> 2.4.1)
@@ -62,15 +70,15 @@ GEM
6270
rspec-core (~> 3.13.0)
6371
rspec-expectations (~> 3.13.0)
6472
rspec-mocks (~> 3.13.0)
65-
rspec-core (3.13.0)
73+
rspec-core (3.13.2)
6674
rspec-support (~> 3.13.0)
67-
rspec-expectations (3.13.1)
75+
rspec-expectations (3.13.3)
6876
diff-lcs (>= 1.2.0, < 2.0)
6977
rspec-support (~> 3.13.0)
70-
rspec-mocks (3.13.1)
78+
rspec-mocks (3.13.2)
7179
diff-lcs (>= 1.2.0, < 2.0)
7280
rspec-support (~> 3.13.0)
73-
rspec-support (3.13.1)
81+
rspec-support (3.13.2)
7482
rubocop (1.69.0)
7583
json (~> 2.3)
7684
language_server-protocol (>= 3.17.0)
@@ -101,22 +109,25 @@ GEM
101109
rubocop-rspec (3.2.0)
102110
rubocop (~> 1.61)
103111
ruby-progressbar (1.13.0)
112+
securerandom (0.4.0)
104113
simplecov (0.22.0)
105114
docile (~> 1.1)
106115
simplecov-html (~> 0.11)
107116
simplecov_json_formatter (~> 0.1)
108-
simplecov-html (0.12.3)
117+
simplecov-html (0.13.1)
109118
simplecov_json_formatter (0.1.4)
110-
sqlite3 (1.7.3-arm64-darwin)
111-
sqlite3 (1.7.3-x86_64-darwin)
112-
sqlite3 (1.7.3-x86_64-linux)
119+
sqlite3 (2.4.1-arm64-darwin)
120+
sqlite3 (2.4.1-x86_64-darwin)
121+
sqlite3 (2.4.1-x86_64-linux-gnu)
122+
thor (1.3.2)
113123
timecop (0.9.10)
114-
timeout (0.4.1)
124+
timeout (0.4.2)
115125
tzinfo (2.0.6)
116126
concurrent-ruby (~> 1.0)
117127
unicode-display_width (3.1.2)
118128
unicode-emoji (~> 4.0, >= 4.0.4)
119129
unicode-emoji (4.0.4)
130+
uri (1.0.2)
120131
with_model (2.1.7)
121132
activerecord (>= 6.0)
122133

@@ -132,14 +143,15 @@ PLATFORMS
132143
x86_64-linux
133144

134145
DEPENDENCIES
135-
activerecord (~> 7.1)
146+
activerecord (~> 8.0)
147+
appraisal (~> 2.5)
136148
boxt_rubocop (= 2.15.0)
137-
byebug (~> 11.0)
149+
byebug (~> 11.1)
138150
logga!
139151
rake (~> 13.2)
140152
rspec (~> 3.13)
141153
simplecov (~> 0.22)
142-
sqlite3 (~> 1.7)
154+
sqlite3 (~> 2.1)
143155
timecop (~> 0.9)
144156
with_model (~> 2.1)
145157

README.md

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

116116
## Development
117117

118-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
118+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec appraisal rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
119119

120120
To install this gem onto your local machine, run `bundle exec rake install`.
121121

gemfiles/activerecord_7.gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "activerecord", "~> 7.0.0"
6+
gem "appraisal", "~> 2.5"
7+
gem "boxt_rubocop", "2.15.0"
8+
gem "byebug", "~> 11.1"
9+
gem "rake", "~> 13.2"
10+
gem "rspec", "~> 3.13"
11+
gem "simplecov", "~> 0.22"
12+
gem "sqlite3", "~> 1.7"
13+
gem "timecop", "~> 0.9"
14+
gem "with_model", "~> 2.1"
15+
16+
gemspec path: "../"

0 commit comments

Comments
 (0)