Skip to content

Commit 9c7e5a3

Browse files
authored
Merge pull request #20 from clio/ruby-3
Update to Ruby 3
2 parents afd8046 + 934b0c9 commit 9c7e5a3

File tree

9 files changed

+29
-8
lines changed

9 files changed

+29
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,27 @@ jobs:
1616
matrix:
1717
ruby-version:
1818
- 2.7
19+
- 3.0
20+
- 3.1
21+
- 3.2
1922
active-record-version:
20-
- 5.2.0
23+
- 6.0.0
24+
- 6.1.0
25+
- 7.0.0
26+
- 7.1.0
27+
exclude:
28+
- ruby-version: 3.2
29+
active-record-version: 6.0.0
30+
- ruby-version: 3.2
31+
active-record-version: 6.1.0
32+
- ruby-version: 3.2
33+
active-record-version: 7.0.0
34+
- ruby-version: 3.1
35+
active-record-version: 6.0.0
36+
- ruby-version: 3.1
37+
active-record-version: 6.1.0
38+
- ruby-version: 3.0
39+
active-record-version: 6.0.0
2140
env:
2241
ACTIVE_RECORD_VERSION: "${{ matrix.active-record-version }}"
2342
steps:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ build/
2424
/.bundle/
2525
/lib/bundler/man/
2626

27+
Gemfile.lock
28+
2729
# for a library or gem, you might want to ignore these files since the code is
2830
# intended to run in multiple environments; otherwise, check them in:
2931
# Gemfile.lock

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.6
1+
3.1.4

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ar = case ar_version
99
when "master"
1010
{ github: "rails/rails" }
1111
when "default"
12-
">= 5.2"
12+
">= 6.0"
1313
else
1414
"~> #{ar_version}"
1515
end

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: "2.0"
33

44
setup:
5-
ruby: 2.7.6
5+
ruby: 3.1.4
66
bundler: 2.4.21
77

88
commands:

inheritance_integer_type.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
2222
spec.add_development_dependency "rake"
2323
spec.add_development_dependency "rspec"
2424
spec.add_development_dependency "activerecord", ">= 5.2"
25-
spec.add_development_dependency "sqlite3", "~> 1.3.6"
25+
spec.add_development_dependency "sqlite3", "~> 1.4"
2626
spec.add_development_dependency "pry"
2727
end

lib/inheritance_integer_type/extensions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def find_sti_class(type_name)
1313
else
1414
begin
1515
if store_full_sti_class
16-
ActiveSupport::Dependencies.constantize(lookup)
16+
lookup.constantize
1717
else
1818
compute_type(lookup)
1919
end

spec/inheritance_integer_type_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
describe "Has many associations" do
4949
let(:other) { Other.create }
5050
before do
51-
[base, left, deep].each{|a| a.update_attributes(other: other) }
51+
[base, left, deep].each{|a| a.update_attribute(:other, other) }
5252
end
5353
subject { other }
5454
it "properly finds the classes through the association" do

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
RSpec.configure do |config|
1111
config.before(:suite) do
12-
ActiveRecord::MigrationContext.new("#{File.dirname(__FILE__)}/support/migrations").migrate
12+
ActiveRecord::MigrationContext.new("#{File.dirname(__FILE__)}/support/migrations", ::ActiveRecord::SchemaMigration).migrate
1313
end
1414

1515
# No need to return the run the down migration after the test

0 commit comments

Comments
 (0)