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

CI against Ruby 3.0 #224

Merged
merged 4 commits into from
Apr 9, 2021
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
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rvm:
- "2.5.7"
- "2.6.5"
- "2.7.0"
- "3.0.0"
gemfile:
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
Expand All @@ -19,5 +20,11 @@ matrix:
exclude:
- rvm: 2.4.9
gemfile: gemfiles/rails_6.0.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5.0.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5.1.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5.2.gemfile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Excluding these Rails 5.x and Ruby 3 combinations from the build target.

Because Rails 5 doesn't support Ruby 3.
See: rails/rails#40938

script: "bundle exec rake spec"
6 changes: 0 additions & 6 deletions gemfiles/rails_5.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ platform :ruby do
gem 'sqlite3', '~> 1.3.0'
end

platforms :rbx do
Copy link
Contributor Author

@tbotaq tbotaq Apr 2, 2021

Choose a reason for hiding this comment

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

rbx has been dropped from our build target since this commit .

Can we also remove rbx from gemfiles like this ?
(Even bundle install fails with Ruby 3 like this

gem 'racc'
gem 'rubysl', '~> 2.0'
gem 'psych'
end

gemspec :path => '../'
6 changes: 0 additions & 6 deletions gemfiles/rails_5.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ platform :ruby do
gem 'sqlite3', '~> 1.3.0'
end

platforms :rbx do
gem 'racc'
gem 'rubysl', '~> 2.0'
gem 'psych'
end

gemspec :path => '../'
6 changes: 0 additions & 6 deletions gemfiles/rails_5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ platform :ruby do
gem 'sqlite3', '~> 1.3.0'
end

platforms :rbx do
gem 'racc'
gem 'rubysl', '~> 2.0'
gem 'psych'
end

gemspec :path => '../'
6 changes: 0 additions & 6 deletions gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,4 @@ platform :ruby do
gem 'sqlite3'
end

platforms :rbx do
gem 'racc'
gem 'rubysl', '~> 2.0'
gem 'psych'
end

gemspec :path => '../'
2 changes: 1 addition & 1 deletion spec/associations/active_record_extensions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Book < ActiveRecord::Base
it "doesn't raise any exception when the belongs_to association class can't be autoloaded" do
# Simulate autoloader
allow_any_instance_of(String).to receive(:constantize).and_raise(LoadError, "Unable to autoload constant NonExistent")
expect { School.belongs_to :city, {class_name: 'NonExistent'} }.not_to raise_error
expect { School.belongs_to :city, class_name: 'NonExistent' }.not_to raise_error
end
end

Expand Down