Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Ruby 3 #20

Merged
merged 7 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

- 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