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
25 changes: 13 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
ruby: [ '2.5.8', '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:
# Only test latest Rails (Of each major), on actively supported Ruby Versions
# Only test latest Ruby with latest Rails versions (Of each major)
# 2.4 -> Only use legacy rails versions (5.0/5.1)
# 2.5 -> Not 5.2/6.1
# 2.6 -> Users of this should be using Rails 5.2+
# 2.7 -> Users of this should be using Rails 5.2+
# 3.0 -> Only Rails 6.1
- { ruby: '2.4', gemfile: 'rails_5_2' }
- { ruby: '2.4', gemfile: 'rails_6_0' }
- { ruby: '2.4', gemfile: 'rails_6_1' }
- { ruby: '2.4', gemfile: 'rails_7_0' }
- { ruby: '2.5', gemfile: 'rails_5_2' }
- { ruby: '2.5', gemfile: 'rails_6_1' }
- { ruby: '2.5', gemfile: 'rails_7_0' }
# 3.0 -> Rails 6.1 and 7.0
# 3.1 -> Only 7.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments appears missplaced

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate or make a suggestion? I see them fine on the final file (tabs alignment and above the first exclusion item).

- { ruby: '2.5.8', gemfile: 'rails_5_2' }
- { ruby: '2.5.8', gemfile: 'rails_6_1' }
- { ruby: '2.5.8', gemfile: 'rails_7_0' }
- { ruby: '2.6', gemfile: 'rails_5_0' }
- { ruby: '2.6', gemfile: 'rails_5_1' }
- { ruby: '2.6', gemfile: 'rails_7_0' }
Expand All @@ -33,6 +29,11 @@ jobs:
- { ruby: '3.0', gemfile: 'rails_5_1' }
- { ruby: '3.0', gemfile: 'rails_5_2' }
- { ruby: '3.0', gemfile: 'rails_6_0' }
- { ruby: '3.1', gemfile: 'rails_5_0' }
- { ruby: '3.1', gemfile: 'rails_5_1' }
- { ruby: '3.1', gemfile: 'rails_5_2' }
- { ruby: '3.1', gemfile: 'rails_6_0' }
- { ruby: '3.1', gemfile: 'rails_6_1' }
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
Expand All @@ -44,9 +45,9 @@ jobs:
bundler-cache: true
- run: bundle exec rake spec
- run: bundle exec rubocop
# ruby-2.5.9 has issues running bundle install during specs.
# 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
# seems incompatibility with psych gem and rubygems version.
- run: gem update --system
if: matrix.ruby == '2.5'
if: matrix.ruby == '2.5.8'
- run: bundle exec rake cucumber
6 changes: 5 additions & 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.4
TargetRubyVersion: 2.5
NewCops: enable
Exclude:
# These are auto-generated from a load of features that use aruba
Expand Down Expand Up @@ -48,3 +48,7 @@ Style/RegexpLiteral:

RSpec/MessageSpies:
EnforcedStyle: receive

# TODO: investigate changes to release process and then enable MFA (https://guides.rubygems.org/mfa-requirement-opt-in/)
Gemspec/RequireMFA:
Enabled: false
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ on how to contribute to Cucumber.
### New Features

* Added `:none` option for `javascript_strategy` which indicates no special handling of `@javascript` tagged tests ([#522](https://github.com/cucumber/cucumber-rails/pull/522) [akostadinov])
* Add support for Rails 7 ([#526](https://github.com/cucumber/cucumber-rails/pull/526/)
* Added support for Rails 7 ([#526](https://github.com/cucumber/cucumber-rails/pull/526/) [mgrunberg])
* Added Ruby 3.1 support ([#529](https://github.com/cucumber/cucumber-rails/pull/529) [mgrunberg])

### Changed

*
* Dropped Ruby 2.4 support ([#529](https://github.com/cucumber/cucumber-rails/pull/529) [mgrunberg])

### Fixed

Expand Down
4 changes: 2 additions & 2 deletions cucumber-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Gem::Specification.new do |s|
s.add_development_dependency('database_cleaner', ['>= 1.8', '< 3.0'])
s.add_development_dependency('rake', '>= 12.0')
s.add_development_dependency('rspec', '~> 3.6')
s.add_development_dependency('rubocop', '~> 1.7.0')
s.add_development_dependency('rubocop', '~> 1.24.0')
s.add_development_dependency('rubocop-packaging', '~> 0.5.1')
s.add_development_dependency('rubocop-performance', '~> 1.10.2')
s.add_development_dependency('rubocop-rspec', '~> 2.2.0')
Expand All @@ -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.4.0'
s.required_ruby_version = '>= 2.5.0'
s.rubygems_version = '>= 1.6.1'
s.require_path = 'lib'
s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md']
Expand Down
2 changes: 1 addition & 1 deletion dev_tasks/yard/default/layout/html/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ def init
super
options[:serializer].serialize(
'/images/bubble_32x32.png',
IO.read("#{File.dirname(__FILE__)}/bubble_32x32.png")
File.read("#{File.dirname(__FILE__)}/bubble_32x32.png")
)
end
6 changes: 3 additions & 3 deletions lib/generators/cucumber/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ def create_database
protected

def embed_file(source, indent = '')
IO.read(File.join(self.class.source_root, source)).gsub(/^/, indent)
File.read(File.join(self.class.source_root, source)).gsub(/^/, indent)
end

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