diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a006563..06c87a4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,35 +23,23 @@ jobs: # - rails versions if their patch release is within 6 months of the Ruby EOL date # - No version of the current rails major # - # 2.6 -> EOL Mar '22 -> Only test Rails versions initially released before Sep '22 - # 2.7 -> EOL Mar '23 -> Only test Rails versions initially released before Sep '23 - # 3.0 -> EOL Mar '24 -> Only test Rails versions initially released before Sep '24 # 3.1 -> EOL Mar '25 -> Only test Rails versions initially released before Sep '25 + # 3.2 -> EOL Mar '26 -> Only test Rails versions initially released before Sep '26 include: - - { ruby: '2.6', gemfile: 'rails_5_2' } - - { ruby: '2.7', gemfile: 'rails_6_0' } - - { ruby: '2.7', gemfile: 'rails_6_1' } - # Capybara has an incompatibility here with rails 6. It's easier to just exclude this one run from the matrix until it's out of support - # As such ruby 3.0 is tested on rails 7.0 ONLY as an EXCEPTION to the above rules (Because we need at least one combination of ruby/rails) - # Ruby 3.0+ also won't work with Rails 5.2: https://github.com/rails/rails/issues/40938 - - { ruby: '3.0', gemfile: 'rails_7_0' } - # Ruby 3.1+ has issues with Rails 6.1 https://github.com/rails/rails/issues/46883#issuecomment-1371325906 - # It (Rails 6.1.x), has been marked as a won't fix and as such it's likely this will need to just be excluded until out of support window - - { ruby: '3.3', gemfile: 'rails_7_2' } - - { ruby: '3.3', gemfile: 'rails_8_0' } + - { ruby: '3.4', gemfile: 'rails_7_2' } + - { ruby: '3.4', gemfile: 'rails_8_0' } # Supported rubies will test all permissible supported rails versions - ruby: ['3.1', '3.2'] - gemfile: ['rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0', 'rails_7_1', 'rails_7_2', 'rails_8_0'] + ruby: ['3.1', '3.2', '3.3'] + gemfile: ['rails_6_1', 'rails_7_0', 'rails_7_1', 'rails_7_2', 'rails_8_0'] exclude: - # Ruby 3.0+ doesn't work with Rails 5.2: https://github.com/rails/rails/issues/40938 + # Ruby 3.1+ has issues with Rails 6.1 https://github.com/rails/rails/issues/46883#issuecomment-1371325906 + # It (Rails 6.1.x), has been marked as a won't fix and as such it's likely this will need to just be excluded until out of support window # Ruby 3.1+ has a conflicting Psych version with Rails 6.x: https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias - - { ruby: '3.1', gemfile: 'rails_5_2' } - - { ruby: '3.1', gemfile: 'rails_6_0' } + # Rails 8.x has a minimum ruby of 3.2 - { ruby: '3.1', gemfile: 'rails_6_1' } - { ruby: '3.1', gemfile: 'rails_8_0' } - - { ruby: '3.2', gemfile: 'rails_5_2' } - - { ruby: '3.2', gemfile: 'rails_6_0' } - { ruby: '3.2', gemfile: 'rails_6_1' } + - { ruby: '3.3', gemfile: 'rails_6_1' } env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: @@ -59,8 +47,6 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - bundler: '2.4.19' - rubygems: latest bundler-cache: true - run: bundle exec rake spec - run: bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 30ac32ca..0b59c067 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,7 +6,7 @@ require: - rubocop-rspec AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 3.1 NewCops: enable Exclude: # These are auto-generated from a load of features that use aruba diff --git a/Appraisals b/Appraisals index 9ecd6f45..6d94c614 100644 --- a/Appraisals +++ b/Appraisals @@ -1,30 +1,5 @@ # frozen_string_literal: true -appraise 'rails_5_2' do - gem 'activerecord' - gem 'capybara', '< 3.33' - gem 'concurrent-ruby', '< 1.3.5' - gem 'cucumber', '< 6' - gem 'factory_bot', '< 6.4' - gem 'psych', '< 4' - gem 'rails-html-sanitizer', '< 1.4.3' - gem 'railties', '~> 5.2.8' - gem 'sqlite3', '~> 1.3.13' -end - -appraise 'rails_6_0' do - gem 'activerecord' - gem 'capybara', '< 3.35' - gem 'concurrent-ruby', '< 1.3.5' - gem 'cucumber', '< 6' - gem 'factory_bot', '< 6.4' - gem 'matrix' - gem 'psych', '< 4' - gem 'rails-html-sanitizer', '< 1.4.3' - gem 'railties', '~> 6.0.6' - gem 'sqlite3', '< 1.6' -end - appraise 'rails_6_1' do gem 'activerecord' gem 'capybara', '< 3.38' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22bb49e4..831b7048 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,10 @@ -## About to create a new Github Issue? +## About to create a new GitHub Issue? We appreciate that. But before you do, please learn our basic rules: * This is not a support forum. If you have a question, please go to [The Cukes Google Group](http://groups.google.com/group/cukes). -* Do you have an idea for a new feature? Then don't expect it to be implemented unless you or someone else sends a [pull request](https://help.github.com/articles/using-pull-requests). You might be better to start a discussion on [the google group](http://groups.google.com/group/cukes). +* Do you have an idea for a new feature? Then don't expect it to be implemented unless you or someone else +sends a [pull request](https://help.github.com/articles/using-pull-requests). You might be better to start a discussion on [the google group](http://groups.google.com/group/cukes). * Reporting a bug? Please tell us: * which version of Cucumber you're using * which version of Ruby you're using @@ -30,8 +31,8 @@ This document is a guide for those maintaining Cucumber-Rails, and others who wo bundle install bin/install_geckodriver.sh bin/install_webpacker.sh - # Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_6_0.gemfile), run - bundle exec appraisal rails_6_0 rake test + # Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_8_0.gemfile), run + bundle exec appraisal rails_8_0 rake test # Or run tests across the full supported stack. Note that because we support many versions. This takes 5-10 minutes bundle exec rake appraisal diff --git a/README.md b/README.md index 41dca2c7..98f95747 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,9 @@ [![Gem Version](https://badge.fury.io/rb/cucumber-rails.svg)](http://badge.fury.io/rb/cucumber-rails) [![build](https://github.com/cucumber/cucumber-rails/actions/workflows/test.yml/badge.svg)](https://github.com/cucumber/cucumber-rails/actions/workflows/test.yml) -[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails) [![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails) -Cucumber-Rails brings Cucumber to Rails 5.2, 6.x, 7.x, and 8.x. +Cucumber-Rails brings Cucumber to Rails 6.1, 7.x, and 8.x. ## Installation @@ -103,7 +102,7 @@ suite against all gemfiles, run the following commands: To run the suite against a named gemfile, use the following: - [bundle exec] appraisal rails_6_0 rake test + [bundle exec] appraisal rails_8_0 rake test ### Adding dependencies diff --git a/cucumber-rails.gemspec b/cucumber-rails.gemspec index 08163088..8842569c 100644 --- a/cucumber-rails.gemspec +++ b/cucumber-rails.gemspec @@ -13,8 +13,8 @@ Gem::Specification.new do |s| s.license = 'MIT' - s.required_ruby_version = '>= 2.6.0' - s.required_rubygems_version = '>= 3.2.3' + s.required_ruby_version = '>= 3.1.0' + s.required_rubygems_version = '>= 3.2.8' s.metadata = { 'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues', diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile deleted file mode 100644 index 229b959d..00000000 --- a/gemfiles/rails_5_2.gemfile +++ /dev/null @@ -1,15 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord" -gem "capybara", "< 3.33" -gem "concurrent-ruby", "< 1.3.5" -gem "cucumber", "< 6" -gem "factory_bot", "< 6.4" -gem "psych", "< 4" -gem "rails-html-sanitizer", "< 1.4.3" -gem "railties", "~> 5.2.8" -gem "sqlite3", "~> 1.3.13" - -gemspec path: "../" diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile deleted file mode 100644 index a9df4acf..00000000 --- a/gemfiles/rails_6_0.gemfile +++ /dev/null @@ -1,16 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "activerecord" -gem "capybara", "< 3.35" -gem "concurrent-ruby", "< 1.3.5" -gem "cucumber", "< 6" -gem "factory_bot", "< 6.4" -gem "matrix" -gem "psych", "< 4" -gem "rails-html-sanitizer", "< 1.4.3" -gem "railties", "~> 6.0.6" -gem "sqlite3", "< 1.6" - -gemspec path: "../" diff --git a/lib/cucumber/rails/capybara/select_dates_and_times.rb b/lib/cucumber/rails/capybara/select_dates_and_times.rb index 72565d12..bf7234bb 100644 --- a/lib/cucumber/rails/capybara/select_dates_and_times.rb +++ b/lib/cucumber/rails/capybara/select_dates_and_times.rb @@ -45,7 +45,7 @@ def select_datetime(datetime, options) if html5_input_field_present?(base_dom_id) fill_in options[:from], with: DateTime.parse(datetime) else - extended_options = options.merge(base_dom_id: base_dom_id) + extended_options = options.merge(base_dom_id:) select_date(datetime, extended_options) select_time(datetime, extended_options) end