From 2da10123d2a63bd3f4db2b342e8a52ed014ed339 Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 27 Aug 2019 14:04:49 +0200 Subject: [PATCH 1/2] Use rails6, and any version of 5.2 --- Appraisals | 8 ++++---- gemfiles/rails_5_1.gemfile | 2 +- gemfiles/rails_5_2.gemfile | 2 +- gemfiles/rails_6_0.gemfile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Appraisals b/Appraisals index 8f732b5a..f4bcb81b 100644 --- a/Appraisals +++ b/Appraisals @@ -17,19 +17,19 @@ end appraise 'rails_5_1' do gem 'capybara', '< 3.16.0', platform: :mri_23 gem 'nokogiri', '< 1.9.1', platform: :mri_23 - gem 'railties', '~> 5.1.0' + gem 'railties', '~> 5.1.7' gem 'sqlite3', '~> 1.3.13' end appraise 'rails_5_2' do gem 'capybara', '< 3.16.0', platform: :mri_23 gem 'nokogiri', '< 1.9.1', platform: :mri_23 - gem 'railties', '~> 5.2.3' + gem 'railties', '~> 5.2.0' gem 'sqlite3', '~> 1.3.13' end appraise 'rails_6_0' do - gem 'railties', '~> 6.0.0.rc2' - gem 'rails', '~> 6.0.0.rc2' + gem 'railties', '~> 6.0.0' + gem 'rails', '~> 6.0.0' gem 'sqlite3', '~> 1.4' end diff --git a/gemfiles/rails_5_1.gemfile b/gemfiles/rails_5_1.gemfile index 988e736c..2063d7a4 100644 --- a/gemfiles/rails_5_1.gemfile +++ b/gemfiles/rails_5_1.gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" gem "capybara", "< 3.16.0", platform: :mri_23 gem "nokogiri", "< 1.9.1", platform: :mri_23 -gem "railties", "~> 5.1.0" +gem "railties", "~> 5.1.7" gem "sqlite3", "~> 1.3.13" gemspec path: "../" diff --git a/gemfiles/rails_5_2.gemfile b/gemfiles/rails_5_2.gemfile index 08eb2792..63dd162b 100644 --- a/gemfiles/rails_5_2.gemfile +++ b/gemfiles/rails_5_2.gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" gem "capybara", "< 3.16.0", platform: :mri_23 gem "nokogiri", "< 1.9.1", platform: :mri_23 -gem "railties", "~> 5.2.3" +gem "railties", "~> 5.2.0" gem "sqlite3", "~> 1.3.13" gemspec path: "../" diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index 7fa76dee..d5f832ff 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" -gem "railties", "~> 6.0.0.rc2" -gem "rails", "~> 6.0.0.rc2" +gem "railties", "~> 6.0.0" +gem "rails", "~> 6.0.0" gem "sqlite3", "~> 1.4" gemspec path: "../" From 8130201bde85f5eeacd0bc55e615b8c05c81b35c Mon Sep 17 00:00:00 2001 From: Luke Hill Date: Tue, 27 Aug 2019 14:10:44 +0200 Subject: [PATCH 2/2] Spacing / formatting of readme, also introduce the concept of 6.x versions of rails --- README.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 96e91342..07c88dcc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails) [![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails) -Cucumber-Rails brings Cucumber to Rails 4.2, Rails 5.x and Rails 6.0. +Cucumber-Rails brings Cucumber to Rails 4.2, 5.x and 6.x. ## Installation @@ -43,7 +43,8 @@ Without Rake: ## Configuration options -By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean` before and after your scenarios. You can disable this behaviour like so: +By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean` +before and after your scenarios. You can disable this behaviour like so: ```ruby # features/support/env.rb @@ -59,14 +60,20 @@ When upgrading from a previous version it is recommended that you rerun: ## Bugs and feature requests -The *only* way to have a bug fixed or a new feature accepted is to describe it with a Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator. Fork this project, clone it to your workstation and check out a branch with a descriptive name: +The *only* way to have a bug fixed or a new feature accepted is to describe it with a +Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator. +Fork this project, clone it to your workstation and check out a branch with a descriptive name: git clone git@github.com:you/cucumber-rails.git git checkout -b bugfix/generator-fails-on-ruby-25 -Start by making sure you can run the existing features. Now, create a feature that demonstrates what's wrong. See the existing features for examples. When you have a failing feature that reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team will review it and hopefully create a fix. +Start by making sure you can run the existing features. Now, create a feature that demonstrates +what's wrong. See the existing features for examples. When you have a failing feature that +reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team +will review it and hopefully create a fix. -If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request. +If you know how to fix the bug yourself, make a second commit (after committing the failing +feature) before you send the pull request. ### Setting up your environment @@ -85,7 +92,10 @@ With all dependencies installed, all specs and features should pass: ### Running Appraisal suite -In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal) is used to generate multiple gemfiles, stored in the `gemfiles/` directory. Normally these will only run on Travis; however, if you want to run the full test suite against all gemfiles, run the following commands: +In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal) +gem is used to generate multiple gemfiles, stored in the `gemfiles/` directory. +Normally these will only run on Travis; however, if you want to run the full test suite against +all gemfiles, run the following commands: [bundle exec] appraisal install [bundle exec] appraisal rake test @@ -94,11 +104,13 @@ To run the suite against a named gemfile, use the following: [bundle exec] appraisal rails_4_2 rake test -To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following: +To remove and rebuild the different gemfiles (for example, to update a rails version or its +dependencies), use the following: [bundle exec] appraisal update -If you've changed versions of the dependencies, you may find it helpful to forcefully clean each appraisal's gem lock file in `gemfiles/`. You can do this using: +If you've changed versions of the dependencies, you may find it helpful to forcefully clean +each appraisal's gem lock file in `gemfiles/`. You can do this using: [bundle exec] rake clean @@ -108,7 +120,8 @@ To support the multiple-gemfile testing, when adding a new dependency the follow 1. If it's a runtime dependency of the gem, add it to the gemspec 2. If it's a primary development dependency, add it to the gemspec -3. If it's a dependency of a generated rails app in a test, add it to [the helper] that modifies that Gemfile. +3. If it's a dependency of a generated rails app in a test, add it to [the helper] that +modifies the `Gemfile`. For example, rspec is a primary development dependency, so it lives in the gemspec.