From 44344305600c009998098881e6103adbc0fd7d7c Mon Sep 17 00:00:00 2001 From: Matt Wynne Date: Tue, 3 Jan 2023 15:17:42 -0800 Subject: [PATCH 1/2] Remove Ruby 2.5 support --- .github/workflows/test.yml | 11 +---------- .rubocop.yml | 2 +- cucumber-rails.gemspec | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 397f9d46..0f06f9b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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' } @@ -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 diff --git a/.rubocop.yml b/.rubocop.yml index 0fa42afd..319d0d04 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -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 diff --git a/cucumber-rails.gemspec b/cucumber-rails.gemspec index c1207a2c..2d825344 100644 --- a/cucumber-rails.gemspec +++ b/cucumber-rails.gemspec @@ -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'] From 4f73a2de3676764e192274045937242121149dfa Mon Sep 17 00:00:00 2001 From: Matt Wynne Date: Tue, 3 Jan 2023 15:38:42 -0800 Subject: [PATCH 2/2] Fix Rubocop crime --- lib/generators/cucumber/install_generator.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/generators/cucumber/install_generator.rb b/lib/generators/cucumber/install_generator.rb index 4187ddd3..8ab59fad 100644 --- a/lib/generators/cucumber/install_generator.rb +++ b/lib/generators/cucumber/install_generator.rb @@ -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