diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16385b42..0921f163 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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' diff --git a/Gemfile b/Gemfile index a8555b56..4e4ae97b 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/environments/Gemfile.rails6.1.rb b/environments/Gemfile.rails6.1.rb new file mode 100644 index 00000000..b6f222a5 --- /dev/null +++ b/environments/Gemfile.rails6.1.rb @@ -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 diff --git a/script/ci-matrix b/script/ci-matrix index 703bbe4a..f773f807 100755 --- a/script/ci-matrix +++ b/script/ci-matrix @@ -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', } diff --git a/spec/finders/activerecord_test_connector.rb b/spec/finders/activerecord_test_connector.rb index fe099324..999bfb47 100644 --- a/spec/finders/activerecord_test_connector.rb +++ b/spec/finders/activerecord_test_connector.rb @@ -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 = [] diff --git a/spec/view_helpers/action_view_spec.rb b/spec/view_helpers/action_view_spec.rb index 7a1304f0..8b7a2fb6 100644 --- a/spec/view_helpers/action_view_spec.rb +++ b/spec/view_helpers/action_view_spec.rb @@ -370,7 +370,7 @@ def renderer.gap() '~~' 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),