Skip to content

Commit a70a129

Browse files
authored
Feature/bump minimum ruby (#594)
* Bump minimum ruby to 3.1 * Remove all redundant test workflows now minimum ruby is 3.1 * Add new 3.4 ruby support matrix and rules * Move ruby 3.3 into the regular support window and increase test coverage * Rails 5.2 has no longer any valid supported permutations - as such we can drop it from full support * Rails 6.0/1 also has no longer any valid support matrices. We will leave 6.1 in as a gemfile but will mark all as excluded incase the 6.1 psych version is fixed. We also still want to support rails 6.1 as a valid option with this version 4 of cucumber rails * Regenerate appraisals files and purge rails 5.2 and 6.0 gemfiles * Update readme to hint new supported versions * Update contributing docs * Update rubocop linting guidelines * Update test workflow notes * Fix rubocop
1 parent 78eb4e2 commit a70a129

File tree

9 files changed

+20
-90
lines changed

9 files changed

+20
-90
lines changed

.github/workflows/test.yml

+9-23
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,30 @@ jobs:
2323
# - rails versions if their patch release is within 6 months of the Ruby EOL date
2424
# - No version of the current rails major
2525
#
26-
# 2.6 -> EOL Mar '22 -> Only test Rails versions initially released before Sep '22
27-
# 2.7 -> EOL Mar '23 -> Only test Rails versions initially released before Sep '23
28-
# 3.0 -> EOL Mar '24 -> Only test Rails versions initially released before Sep '24
2926
# 3.1 -> EOL Mar '25 -> Only test Rails versions initially released before Sep '25
27+
# 3.2 -> EOL Mar '26 -> Only test Rails versions initially released before Sep '26
3028
include:
31-
- { ruby: '2.6', gemfile: 'rails_5_2' }
32-
- { ruby: '2.7', gemfile: 'rails_6_0' }
33-
- { ruby: '2.7', gemfile: 'rails_6_1' }
34-
# 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
35-
# 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)
36-
# Ruby 3.0+ also won't work with Rails 5.2: https://github.com/rails/rails/issues/40938
37-
- { ruby: '3.0', gemfile: 'rails_7_0' }
38-
# Ruby 3.1+ has issues with Rails 6.1 https://github.com/rails/rails/issues/46883#issuecomment-1371325906
39-
# 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
40-
- { ruby: '3.3', gemfile: 'rails_7_2' }
41-
- { ruby: '3.3', gemfile: 'rails_8_0' }
29+
- { ruby: '3.4', gemfile: 'rails_7_2' }
30+
- { ruby: '3.4', gemfile: 'rails_8_0' }
4231
# Supported rubies will test all permissible supported rails versions
43-
ruby: ['3.1', '3.2']
44-
gemfile: ['rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0', 'rails_7_1', 'rails_7_2', 'rails_8_0']
32+
ruby: ['3.1', '3.2', '3.3']
33+
gemfile: ['rails_6_1', 'rails_7_0', 'rails_7_1', 'rails_7_2', 'rails_8_0']
4534
exclude:
46-
# Ruby 3.0+ doesn't work with Rails 5.2: https://github.com/rails/rails/issues/40938
35+
# Ruby 3.1+ has issues with Rails 6.1 https://github.com/rails/rails/issues/46883#issuecomment-1371325906
36+
# 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
4737
# 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
48-
- { ruby: '3.1', gemfile: 'rails_5_2' }
49-
- { ruby: '3.1', gemfile: 'rails_6_0' }
38+
# Rails 8.x has a minimum ruby of 3.2
5039
- { ruby: '3.1', gemfile: 'rails_6_1' }
5140
- { ruby: '3.1', gemfile: 'rails_8_0' }
52-
- { ruby: '3.2', gemfile: 'rails_5_2' }
53-
- { ruby: '3.2', gemfile: 'rails_6_0' }
5441
- { ruby: '3.2', gemfile: 'rails_6_1' }
42+
- { ruby: '3.3', gemfile: 'rails_6_1' }
5543
env:
5644
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
5745
steps:
5846
- uses: actions/checkout@v4
5947
- uses: ruby/setup-ruby@v1
6048
with:
6149
ruby-version: ${{ matrix.ruby }}
62-
bundler: '2.4.19'
63-
rubygems: latest
6450
bundler-cache: true
6551
- run: bundle exec rake spec
6652
- run: bundle exec rubocop

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require:
66
- rubocop-rspec
77

88
AllCops:
9-
TargetRubyVersion: 2.6
9+
TargetRubyVersion: 3.1
1010
NewCops: enable
1111
Exclude:
1212
# These are auto-generated from a load of features that use aruba

Appraisals

-25
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
# frozen_string_literal: true
22

3-
appraise 'rails_5_2' do
4-
gem 'activerecord'
5-
gem 'capybara', '< 3.33'
6-
gem 'concurrent-ruby', '< 1.3.5'
7-
gem 'cucumber', '< 6'
8-
gem 'factory_bot', '< 6.4'
9-
gem 'psych', '< 4'
10-
gem 'rails-html-sanitizer', '< 1.4.3'
11-
gem 'railties', '~> 5.2.8'
12-
gem 'sqlite3', '~> 1.3.13'
13-
end
14-
15-
appraise 'rails_6_0' do
16-
gem 'activerecord'
17-
gem 'capybara', '< 3.35'
18-
gem 'concurrent-ruby', '< 1.3.5'
19-
gem 'cucumber', '< 6'
20-
gem 'factory_bot', '< 6.4'
21-
gem 'matrix'
22-
gem 'psych', '< 4'
23-
gem 'rails-html-sanitizer', '< 1.4.3'
24-
gem 'railties', '~> 6.0.6'
25-
gem 'sqlite3', '< 1.6'
26-
end
27-
283
appraise 'rails_6_1' do
294
gem 'activerecord'
305
gem 'capybara', '< 3.38'

CONTRIBUTING.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
## About to create a new Github Issue?
1+
## About to create a new GitHub Issue?
22

33
We appreciate that. But before you do, please learn our basic rules:
44

55
* This is not a support forum. If you have a question, please go to [The Cukes Google Group](http://groups.google.com/group/cukes).
6-
* 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).
6+
* Do you have an idea for a new feature? Then don't expect it to be implemented unless you or someone else
7+
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).
78
* Reporting a bug? Please tell us:
89
* which version of Cucumber you're using
910
* 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
3031
bundle install
3132
bin/install_geckodriver.sh
3233
bin/install_webpacker.sh
33-
# Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_6_0.gemfile), run
34-
bundle exec appraisal rails_6_0 rake test
34+
# Then to run tests on one version-specific Gemfile (e.g. gemfiles/rails_8_0.gemfile), run
35+
bundle exec appraisal rails_8_0 rake test
3536
# Or run tests across the full supported stack. Note that because we support many versions. This takes 5-10 minutes
3637
bundle exec rake appraisal
3738

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
[![Gem Version](https://badge.fury.io/rb/cucumber-rails.svg)](http://badge.fury.io/rb/cucumber-rails)
44
[![build](https://github.com/cucumber/cucumber-rails/actions/workflows/test.yml/badge.svg)](https://github.com/cucumber/cucumber-rails/actions/workflows/test.yml)
5-
[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails)
65
[![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails)
76

8-
Cucumber-Rails brings Cucumber to Rails 5.2, 6.x, 7.x, and 8.x.
7+
Cucumber-Rails brings Cucumber to Rails 6.1, 7.x, and 8.x.
98

109
## Installation
1110

@@ -103,7 +102,7 @@ suite against all gemfiles, run the following commands:
103102

104103
To run the suite against a named gemfile, use the following:
105104

106-
[bundle exec] appraisal rails_6_0 rake test
105+
[bundle exec] appraisal rails_8_0 rake test
107106

108107
### Adding dependencies
109108

cucumber-rails.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
1313

1414
s.license = 'MIT'
1515

16-
s.required_ruby_version = '>= 2.6.0'
17-
s.required_rubygems_version = '>= 3.2.3'
16+
s.required_ruby_version = '>= 3.1.0'
17+
s.required_rubygems_version = '>= 3.2.8'
1818

1919
s.metadata = {
2020
'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues',

gemfiles/rails_5_2.gemfile

-15
This file was deleted.

gemfiles/rails_6_0.gemfile

-16
This file was deleted.

lib/cucumber/rails/capybara/select_dates_and_times.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def select_datetime(datetime, options)
4545
if html5_input_field_present?(base_dom_id)
4646
fill_in options[:from], with: DateTime.parse(datetime)
4747
else
48-
extended_options = options.merge(base_dom_id: base_dom_id)
48+
extended_options = options.merge(base_dom_id:)
4949
select_date(datetime, extended_options)
5050
select_time(datetime, extended_options)
5151
end

0 commit comments

Comments
 (0)