10000 V3/version deps (#579) · cucumber/cucumber-rails@9879b81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9879b81

Browse files
authored
V3/version deps (#579)
* Bump max permissible version of cucumber to v9.x and update minimum rubocop versions for a variety of gems * Update changelogs * Downgrade some gems and remove lockfile to attempt to get a partial gem update to work - See: rubygems/rubygems#7044 * Permit v9 of cucumber again * Permit cucumber v9 in rails 6.1 testing * Remove final 2 issues we guard around (1 is redundant, 1 has been fixed) * Remove duplicate step from codebase, use aruba * Remove small file and absorb into env.rb * Lean on aruba command for features * Add changelog * Add max version restrictions for some of the older rails gems now 7.1 has been released * Ensure no args are passed downstream * This class was removed from the stdlib around ruby 1.9.3 * Add matrix gem in to mitigate slightly older capybara issues * Pass in a Minitest run-name if needed * Manually overload the matrix require until 3.36+ of capybara is the min * Update rails 6.1 gemfile to use a slightly higher version of capybara * Add 2 more workflows to the exclusion list (One will be flaky with psych, the other with capybara) * ACtually exclude the runs desired
1 parent 9bdbad6 commit 9879b81

20 files changed

+56
-68
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ jobs:
3939
- { ruby: '2.7', gemfile: 'rails_7_1' }
4040
# Ruby 3+ won't work with Rails 5.2: https://github.com/rails/rails/issues/40938
4141
- { ruby: '3.0', gemfile: 'rails_5_2' }
42+
# 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
43+
- { ruby: '3.0', gemfile: 'rails_6_0' }
44+
- { ruby: '3.0', gemfile: 'rails_6_1' }
4245
- { ruby: '3.1', gemfile: 'rails_5_2' }
43-
# Ruby 3.1+ has a conflicting Psych version with Rails 6.0 (And maybe 6.1...): https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
46+
# 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
4447
- { ruby: '3.1', gemfile: 'rails_6_0' }
48+
- { ruby: '3.1', gemfile: 'rails_6_1' }
4549
- { ruby: '3.2', gemfile: 'rails_5_2' }
4650
- { ruby: '3.2', gemfile: 'rails_6_0' }
51+
- { ruby: '3.2', gemfile: 'rails_6_1' }
4752
env:
4853
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
4954
steps:

.rubocop.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ Layout/LineLength:
2424
- '^When'
2525
- '^Then'
2626

27-
# This needs fixing as it's inheriting a lot more than what we originally need.
28-
# The inheritance chain goes all the way down to a single test case which the world
29-
# definitely doesn't represent. GH issue 505
30-
Lint/MissingSuper:
31-
Exclude:
32-
- lib/cucumber/rails/world.rb
33-
34-
# These can both be removed once we upgrade rubocop and rubocop-rspec to more up to date versions
35-
Metrics/BlockLength:
36-
Exclude:
37-
- './spec/**/*_spec.rb'
38-
- 'cucumber-rails.gemspec'
39-
4027
# This allows us to read the chmod action in a more reproducible way
4128
Style/NumericLiteralPrefix:
4229
EnforcedOctalStyle: zero_only

Appraisals

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ end
1212

1313
appraise 'rails_6_0' do
1414
gem 'activerecord'
15+
gem 'capybara', '< 3.35'
1516
gem 'cucumber', '< 6'
17+
gem 'matrix' # Until capybara 3.36+
1618
gem 'psych', '< 4'
1719
gem 'rails-html-sanitizer', '< 1.4.3'
1820
gem 'railties', '~> 6.0.3'
@@ -21,15 +23,17 @@ end
2123

2224
appraise 'rails_6_1' do
2325
gem 'activerecord'
24-
gem 'cucumber', '< 9'
26+
gem 'capybara', '< 3.38'
27+
gem 'cucumber', '< 10'
2528
gem 'psych', '< 4'
2629
gem 'railties', '~> 6.1.3'
2730
gem 'sqlite3', '~> 1.4'
2831
end
2932

3033
appraise 'rails_7_0' do
3134
gem 'activerecord'
32-
gem 'railties', '~> 7.0.0'
35+
gem 'cucumber', '< 10'
36+
gem 'railties', '~> 7.0.0'
3337
gem 'sqlite3', '~> 1.4'
3438
end
3539

CHANGELOG.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ This file is intended to be modified using the [`changelog`](github.com/cucumber
1313

1414
### Fixed
1515
- Some of the rails 5.2 tests were installing lots of old conflicting gems ([luke-hill])
16-
- Generator updates:
17-
- Updated the install locations for some scripts from `script/` to `bin/`
18-
- Changed some install generators to remove some legacy items
19-
- Updates have facilitated minimum support versions altering: capybara must be `v3.11+` and cucumber must be `v5+`
20-
([luke-hill])
16+
- Generator updates (Updated the install locations for some scripts from `script/` to `bin/` and remove some legacy items)
17+
([luke-hill])
18+
- Update minimum versions of several gems: capybara must be `v3.11+` and cucumber must be `v5+` (cucumber v9 is also permissible)
19+
([luke-hill])
20+
- Fixed an issue where the World instantiation didn't re-run the inherited classes initializer ([luke-hill])
2121

2222
## [3.0.0.rc.1] - 2023-09-15
2323
### Removed

cucumber-rails.gemspec

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ 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'
18+
1619
s.metadata = {
1720
'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues',
1821
'changelog_uri' => "https://github.com/cucumber/cucumber-rails/blob/v#{s.version}/CHANGELOG.md",
@@ -22,7 +25,7 @@ Gem::Specification.new do |s|
2225
}
2326

2427
s.add_runtime_dependency('capybara', '>= 3.11', '< 4')
25-
s.add_runtime_dependency('cucumber', '>= 5', '< 9')
28+
s.add_runtime_dependency('cucumber', '>= 5', '< 10')
2629
s.add_runtime_dependency('railties', '>= 5.2', '< 8')
2730

2831
# Main development dependencies
@@ -33,16 +36,14 @@ Gem::Specification.new do |s|
3336
s.add_development_dependency('rails', '>= 5.2', '< 8')
3437
s.add_development_dependency('rake', '>= 12.0')
3538
s.add_development_dependency('rspec', '~> 3.6')
36-
s.add_development_dependency('rubocop', '~> 1.28.2')
39+
s.add_development_dependency('rubocop', '~> 1.31.0')
3740
s.add_development_dependency('rubocop-packaging', '~> 0.5.1')
38-
s.add_development_dependency('rubocop-performance', '~> 1.13.3')
39-
s.add_development_dependency('rubocop-rspec', '~> 2.10.0')
41+
s.add_development_dependency('rubocop-performance', '~> 1.17.0')
42+
s.add_development_dependency('rubocop-rspec', '~> 2.12.0')
4043

4144
# For Documentation:
4245
s.add_development_dependency('yard', '~> 0.9.10')
4346

44-
s.required_ruby_version = '>= 2.6.0'
45-
s.required_rubygems_version = '>= 3.2.3'
4647
s.require_path = 'lib'
4748
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md']
4849
end

features/allow_rescue.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Feature: Allow Cucumber to rescue exceptions
3838
"""
3939
And I run `bundle exec rake db:migrate`
4040
And I run `bundle exec cucumber`
41-
Then the feature run should pass with:
41+
Then the feature should pass with:
4242
"""
4343
1 scenario (1 passed)
4444
2 steps (2 passed)

features/capybara_javascript_drivers.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Feature: Capybara Javascript Drivers
4040
"""
4141
And I run `bundle exec rake db:migrate`
4242
And I run `bundle exec rake cucumber`
43-
Then the feature run should pass with:
43+
Then the feature should pass with:
4444
"""
4545
1 scenario (1 passed)
4646
6 steps (6 passed)
@@ -87,7 +87,7 @@ Feature: Capybara Javascript Drivers
8787
"""
8888
And I run `bundle exec rake db:migrate`
8989
And I run `bundle exec rake cucumber`
90-
Then the feature run should pass with:
90+
Then the feature should pass with:
9191
"""
9292
1 scenario (1 passed)
9393
6 steps (6 passed)
@@ -126,7 +126,7 @@ Feature: Capybara Javascript Drivers
126126
"""
127127
And I run `bundle exec rake db:migrate`
128128
And I run `bundle exec rake cucumber`
129-
Then the feature run should pass with:
129+
Then the feature should pass with:
130130
"""
131131
1 scenario (1 passed)
132132
3 steps (3 passed)
@@ -176,7 +176,7 @@ Feature: Capybara Javascript Drivers
176176
"""
177177
And I run `bundle exec rake db:migrate`
178178
And I run `bundle exec rake cucumber`
179-
Then the feature run should pass with:
179+
Then the feature should pass with:
180180
"""
181181
1 scenario (1 passed)
182182
6 steps (6 passed)

features/choose_javascript_database_strategy.feature

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ Feature: Choose javascript database strategy
7171
Then the DatabaseCleaner strategy should be transaction
7272
And I should have 2 widgets
7373
"""
74-
And I run the cukes
75-
Then the feature run should pass with:
74+
And I run `bundle exec cucumber`
75+
Then the feature should pass with:
7676
"""
7777
3 scenarios (3 passed)
7878
10 steps (10 passed)
@@ -97,8 +97,8 @@ Feature: Choose javascript database strategy
9797
Scenario:
9898
Then I should have 2 widgets
9999
"""
100-
And I run the cukes
101-
Then the feature run should pass with:
100+
And I run `bundle exec cucumber`
101+
Then the feature should pass with:
102102
"""
103103
2 scenarios (2 passed)
104104
5 steps (5 passed)
@@ -126,8 +126,8 @@ Feature: Choose javascript database strategy
126126
Then I should have 2 widgets
127127
And the DatabaseCleaner strategy should be transaction
128128
"""
129-
And I run the cukes
130-
Then the feature run should pass with:
129+
And I run `bundle exec cucumber`
130+
Then the feature should pass with:
131131
"""
132132
2 scenarios (2 passed)
133133
7 steps (7 passed)
@@ -149,8 +149,8 @@ Feature: Choose javascript database strategy
149149
Scenario:
150150
Then I should have 3 widgets
151151
"""
152-
And I run the cukes
153-
Then the feature run should pass with:
152+
And I run `bundle exec cucumber`
153+
Then the feature should pass with:
154154
"""
155155
2 scenarios (2 passed)
156156
3 steps (3 passed)

features/configuration.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Feature: Cucumber Rails Configuration
1919
end
2020
"""
2121
And I run `bundle exec rake cucumber`
22-
Then the feature run should pass with:
22+
Then the feature should pass with:
2323
"""
2424
1 scenario (1 passed)
2525
1 step (1 passed)
@@ -41,7 +41,7 @@ Feature: Cucumber Rails Configuration
4141
end
4242
"""
4343
And I run `bundle exec rake cucumber`
44-
Then the feature run should pass with:
44+
Then the feature should pass with:
4545
"""
4646
1 scenario (1 passed)
4747
1 step (1 passed)

features/database_cleaner.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Feature: Database Cleaner
3737
"""
3838
And I run `bundle exec rake db:migrate`
3939
And I run `bundle exec rake cucumber`
40-
Then the feature run should pass with:
40+
Then the feature should pass with:
4141
"""
4242
2 scenarios (2 passed)
4343
6 steps (6 passed)
@@ -80,7 +80,7 @@ Feature: Database Cleaner
8080
"""
8181
And I run `bundle exec rake db:migrate`
8282
And I run `bundle exec rake cucumber`
83-
Then the feature run should pass with:
83+
Then the feature should pass with:
8484
"""
8585
2 scenarios (2 passed)
8686
6 steps (6 passed)
@@ -124,7 +124,7 @@ Feature: Database Cleaner
124124
"""
125125
And I run `bundle exec rake db:migrate`
126126
And I run `bundle exec rake cucumber`
127-
Then the feature run should pass with:
127+
Then the feature should pass with:
128128
"""
129129
2 scenarios (2 passed)
130130
6 steps (6 passed)

0 commit comments

Comments
 (0)
0