Skip to content
New issue

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

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

Already on GitHub? # to your account

Test against Rails 7 #633

Merged
merged 5 commits into from
Feb 17, 2022
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
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,38 @@ jobs:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
gemfile:
- Gemfile
- environments/Gemfile.rails5.0.rb
- environments/Gemfile.rails5.1.rb
- environments/Gemfile.rails5.2.rb
- environments/Gemfile.rails6.0.rb
- environments/Gemfile.rails6.1.rb
- environments/Gemfile.rails-edge.rb
exclude:
- ruby: '2.4'
gemfile: Gemfile
- ruby: '2.5'
gemfile: Gemfile
- ruby: '2.6'
gemfile: Gemfile
- ruby: '3.0'
gemfile: environments/Gemfile.rails5.0.rb
- ruby: '3.1'
gemfile: environments/Gemfile.rails5.0.rb
- ruby: '3.0'
gemfile: environments/Gemfile.rails5.1.rb
- ruby: '3.1'
gemfile: environments/Gemfile.rails5.1.rb
- ruby: '3.0'
gemfile: environments/Gemfile.rails5.2.rb
- ruby: '3.1'
gemfile: environments/Gemfile.rails5.2.rb
- ruby: '2.4'
gemfile: environments/Gemfile.rails6.0.rb
- ruby: '2.4'
gemfile: environments/Gemfile.rails6.1.rb
- ruby: '2.4'
gemfile: environments/Gemfile.rails-edge.rb
- ruby: '2.5'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

# We test against other Rails versions, too. See `environments/`
rails_version = '~> 6.1.2'
rails_version = '~> 7.0.2'

gem 'activerecord', rails_version
gem 'actionpack', rails_version
Expand Down
14 changes: 14 additions & 0 deletions environments/Gemfile.rails6.1.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
source 'https://rubygems.org'

rails_version = '~> 6.1.0'

gem 'activerecord', rails_version
gem 'actionpack', rails_version

gem 'rspec', '~> 2.99'
gem 'mocha', '~> 0.9.8'

gem 'sqlite3', '~> 1.4.0'

gem 'mysql2', '~> 0.5.2', :group => :mysql
gem 'pg', '~> 1.2', :group => :pg
3 changes: 2 additions & 1 deletion script/ci-matrix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ requirements = {
'environments/Gemfile.rails5.1.rb' => ['>= 2.2', '< 3.0'],
'environments/Gemfile.rails5.2.rb' => ['>= 2.2', '< 3.0'],
'environments/Gemfile.rails6.0.rb' => '>= 2.5',
'Gemfile' => '>= 2.5',
'environments/Gemfile.rails6.1.rb' => '>= 2.5',
'Gemfile' => '>= 2.7',
'environments/Gemfile.rails-edge.rb' => '>= 2.7',
}

Expand Down
13 changes: 13 additions & 0 deletions spec/finders/activerecord_test_connector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
require 'active_record/fixtures'
require 'stringio'
require 'erb'
require 'time'
require 'date'
require 'yaml'

# monkeypatch needed for Ruby 3.1 & Rails 6.0
YAML.module_eval do
class << self
alias_method :_load_orig, :load
def load(yaml_str)
_load_orig(yaml_str, permitted_classes: [Symbol, Date, Time])
end
end
end if YAML.method(:load).parameters.include?([:key, :permitted_classes])

$query_count = 0
$query_sql = []
Expand Down
2 changes: 1 addition & 1 deletion spec/view_helpers/action_view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def renderer.gap() '<span class="my-gap">~~</span>' end
end

# TODO: re-enable once Rails 6.1.4 ships
xit "page_entries_info" do
it "page_entries_info" do
@template = "<%= page_entries_info collection, options %>"
output = render(
collection: WillPaginate::Collection.new(1, 1, 3),
Expand Down