Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Ruby 2.5 support #558

Merged
merged 3 commits into from
Jan 3, 2023
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
11 changes: 1 addition & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.5.8', '2.6', '2.7', '3.0', '3.1']
ruby: ['2.6', '2.7', '3.0', '3.1']
gemfile: ['rails_5_0', 'rails_5_1', 'rails_5_2', 'rails_6_0', 'rails_6_1', 'rails_7_0']
exclude:
# Latest ruby will test
Expand All @@ -19,14 +19,9 @@ jobs:
# - all permissible rails versions released within 6 months of EOL
# - nothing in the current rails major

# 2.5 -> Unsupported from March '21 -> Only test up to Sep '21
# 2.6 -> Unsupported from March '22 -> Only test up to Sep '22
# 2.7 -> Supported until March '23 (At least)
# 3.0 -> Supported for a while...
- { ruby: '2.5.8', gemfile: 'rails_5_2' }
- { ruby: '2.5.8', gemfile: 'rails_6_0' }
- { ruby: '2.5.8', gemfile: 'rails_6_1' }
- { ruby: '2.5.8', gemfile: 'rails_7_0' }
- { ruby: '2.6', gemfile: 'rails_7_0' }
- { ruby: '2.7', gemfile: 'rails_5_0' }
- { ruby: '2.7', gemfile: 'rails_5_1' }
Expand All @@ -48,8 +43,4 @@ jobs:
bundler-cache: true
- run: bundle exec rake spec
- run: bundle exec rubocop
# ruby-2.5.8 and 2.5.9 has issues running bundle install during specs.
# see errors here https://github.com/mgrunberg/cucumber-rails/runs/4824503004?check_suite_focus=true
- run: gem update --system
if: matrix.ruby == '2.5.8'
- run: bundle exec rake cucumber
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 2.6
NewCops: enable
Exclude:
# These are auto-generated from a load of features that use aruba
Expand Down
2 changes: 1 addition & 1 deletion cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('rdoc', '>= 6.0')
s.add_development_dependency('yard', '~> 0.9.10')

s.required_ruby_version = '>= 2.5.0'
s.required_ruby_version = '>= 2.6.0'
s.required_rubygems_version = '>= 1.6.1'
s.require_path = 'lib'
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md']
Expand Down
6 changes: 1 addition & 5 deletions lib/generators/cucumber/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ def embed_file(source, indent = '')

def embed_template(source, indent = '')
template = File.join(self.class.source_root, source)
if RUBY_VERSION >= '2.6'
ERB.new(File.read(template), trim_mode: '-').result(binding).gsub(/^/, indent)
else
ERB.new(File.read(template), nil, '-').result(binding).gsub(/^/, indent)
end
ERB.new(File.read(template), trim_mode: '-').result(binding).gsub(/^/, indent)
end
end
end