Skip to content

Commit

Permalink
Merge pull request #20 from clio/ruby-3
Browse files Browse the repository at this point in the history
Update to Ruby 3
  • Loading branch information
peerkleio authored Jun 11, 2024
2 parents afd8046 + 934b0c9 commit 9c7e5a3
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 8 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,27 @@ jobs:
matrix:
ruby-version:
- 2.7
- 3.0
- 3.1
- 3.2
active-record-version:
- 5.2.0
- 6.0.0
- 6.1.0
- 7.0.0
- 7.1.0
exclude:
- ruby-version: 3.2
active-record-version: 6.0.0
- ruby-version: 3.2
active-record-version: 6.1.0
- ruby-version: 3.2
active-record-version: 7.0.0
- ruby-version: 3.1
active-record-version: 6.0.0
- ruby-version: 3.1
active-record-version: 6.1.0
- ruby-version: 3.0
active-record-version: 6.0.0
env:
ACTIVE_RECORD_VERSION: "${{ matrix.active-record-version }}"
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ build/
/.bundle/
/lib/bundler/man/

Gemfile.lock

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.6
3.1.4
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ar = case ar_version
when "master"
{ github: "rails/rails" }
when "default"
">= 5.2"
">= 6.0"
else
"~> #{ar_version}"
end
Expand Down
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: "2.0"

setup:
ruby: 2.7.6
ruby: 3.1.4
bundler: 2.4.21

commands:
Expand Down
2 changes: 1 addition & 1 deletion inheritance_integer_type.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "activerecord", ">= 5.2"
spec.add_development_dependency "sqlite3", "~> 1.3.6"
spec.add_development_dependency "sqlite3", "~> 1.4"
spec.add_development_dependency "pry"
end
2 changes: 1 addition & 1 deletion lib/inheritance_integer_type/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def find_sti_class(type_name)
else
begin
if store_full_sti_class
ActiveSupport::Dependencies.constantize(lookup)
lookup.constantize
else
compute_type(lookup)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/inheritance_integer_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
describe "Has many associations" do
let(:other) { Other.create }
before do
[base, left, deep].each{|a| a.update_attributes(other: other) }
[base, left, deep].each{|a| a.update_attribute(:other, other) }
end
subject { other }
it "properly finds the classes through the association" do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

# No need to return the run the down migration after the test
Expand Down

0 comments on commit 9c7e5a3

Please sign in to comment.