Skip to content

Commit

Permalink
Rails 5.2 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-hill committed Sep 14, 2023
1 parent 925ad20 commit d3d4f46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![pull requests](https://oselvar.com/api/badge?label=pull%20requests&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-rails%2FpullRequests.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-rails)
[![issues](https://oselvar.com/api/badge?label=issues&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-rails%2Fissues.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-rails)

Cucumber-Rails brings Cucumber to Rails 5.x, 6.x and 7.x.
Cucumber-Rails brings Cucumber to Rails 5.2, 6.x and 7.x.

## Installation

Expand Down
7 changes: 3 additions & 4 deletions features/support/cucumber_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def add_gem(name, *args)
gem_regexp = /gem ["']#{name}["'].*$/
gemfile_content = File.read(expand_path('Gemfile'))

if gemfile_content&.match?(gem_regexp)
if gemfile_content.match?(gem_regexp)
updated_gemfile_content = gemfile_content.gsub(gem_regexp, line)
overwrite_file('Gemfile', updated_gemfile_content)
else
Expand Down Expand Up @@ -77,9 +77,8 @@ def configure_rails_layout

def run_rails_new_command(options)
options[:name] ||= 'test_app'
flags = %w[ --skip-action-cable --skip-action-mailer --skip-active-job --skip-bootsnap --skip-bundle --skip-javascript
--skip-jbuilder --skip-listen --skip-spring --skip-sprockets --skip-test-unit --skip-turbolinks ]
flags += %w[--skip-active-storage] if rails_equal_or_higher_than?('5.2')
flags = %w[--skip-action-cable --skip-action-mailer --skip-active-job --skip-bootsnap --skip-bundle --skip-javascript
--skip-jbuilder --skip-listen --skip-spring --skip-sprockets --skip-test-unit --skip-turbolinks --skip-active-storage]
flags += %w[--skip-action-mailbox --skip-action-text] if rails_equal_or_higher_than?('6.0')
run_command "bundle exec rails new #{options[:name]} #{flags.join(' ')} #{options[:args]}"
end
Expand Down

0 comments on commit d3d4f46

Please sign in to comment.