Skip to content
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
32 changes: 9 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,30 @@ 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:
- uses: actions/checkout@v4
- 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
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 0 additions & 25 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
15 changes: 0 additions & 15 deletions gemfiles/rails_5_2.gemfile

This file was deleted.

16 changes: 0 additions & 16 deletions gemfiles/rails_6_0.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion lib/cucumber/rails/capybara/select_dates_and_times.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down