cucumber-rails 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +35 -0
  4. data/.rubocop_todo.yml +14 -398
  5. data/.travis.yml +23 -8
  6. data/Appraisals +26 -23
  7. data/CHANGELOG.md +70 -15
  8. data/CONTRIBUTING.md +4 -14
  9. data/Gemfile +2 -4
  10. data/README.md +4 -7
  11. data/Rakefile +17 -13
  12. data/bin/install_geckodriver.sh +1 -1
  13. data/cucumber-rails.gemspec +24 -24
  14. data/dev_tasks/cucumber.rake +2 -0
  15. data/dev_tasks/rspec.rake +2 -0
  16. data/dev_tasks/yard.rake +6 -5
  17. data/dev_tasks/yard/default/layout/html/setup.rb +6 -1
  18. data/features/allow_rescue.feature +11 -11
  19. data/features/annotations.feature +2 -2
  20. data/features/capybara_javascript_drivers.feature +11 -22
  21. data/features/choose_javascript_database_strategy.feature +36 -56
  22. data/features/database_cleaner.feature +12 -12
  23. data/features/disable_automatic_database_cleaning.feature +10 -16
  24. data/features/emulate_javascript.feature +16 -16
  25. data/features/no_database.feature +5 -6
  26. data/features/raising_errors.feature +2 -2
  27. data/features/rerun_profile.feature +4 -4
  28. data/features/rest_api.feature +10 -10
  29. data/features/step_definitions/cucumber_rails_steps.rb +20 -101
  30. data/features/support/aruba.rb +2 -0
  31. data/features/support/cucumber_rails_helper.rb +80 -0
  32. data/features/support/env.rb +4 -30
  33. data/features/support/legacy_web_steps_support.rb +1 -1
  34. data/gemfiles/rails_4_2.gemfile +4 -4
  35. data/gemfiles/rails_5_0.gemfile +4 -4
  36. data/gemfiles/rails_5_1.gemfile +3 -3
  37. data/gemfiles/rails_5_2.gemfile +4 -4
  38. data/gemfiles/rails_6_0.gemfile +3 -2
  39. data/lib/cucumber/rails.rb +14 -6
  40. data/lib/cucumber/rails/action_controller.rb +10 -6
  41. data/lib/cucumber/rails/application.rb +13 -7
  42. data/lib/cucumber/rails/capybara.rb +2 -0
  43. data/lib/cucumber/rails/capybara/javascript_emulation.rb +17 -7
  44. data/lib/cucumber/rails/capybara/select_dates_and_times.rb +3 -1
  45. data/lib/cucumber/rails/database.rb +25 -7
  46. data/lib/cucumber/rails/hooks.rb +2 -0
  47. data/lib/cucumber/rails/hooks/active_record.rb +8 -4
  48. data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
  49. data/lib/cucumber/rails/hooks/database_cleaner.rb +4 -2
  50. data/lib/cucumber/rails/hooks/mail.rb +2 -0
  51. data/lib/cucumber/rails/rspec.rb +3 -1
  52. data/lib/cucumber/rails/world.rb +12 -6
  53. data/lib/generators/cucumber/{install/USAGE → USAGE} +0 -0
  54. data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +18 -9
  55. data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +0 -0
  56. data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
  57. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +0 -0
  58. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_prefork.rb.erb +0 -0
  59. data/lib/generators/cucumber/{install/templates → templates}/support/capybara.rb +2 -0
  60. data/lib/generators/cucumber/{install/templates → templates}/support/edit_warning.txt +0 -0
  61. data/lib/generators/cucumber/{install/templates → templates}/support/rails.rb.erb +0 -0
  62. data/lib/generators/cucumber/{install/templates → templates}/support/rails_spork.rb.erb +0 -0
  63. data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +0 -0
  64. data/spec/cucumber/rails/database_spec.rb +20 -16
  65. data/spec/generators/cucumber/{install/install_generator_spec.rb → install_generator_spec.rb} +16 -6
  66. data/spec/spec_helper.rb +4 -2
  67. metadata +99 -96
  68. data/features/support/bundler_pre_support.rb +0 -28
  69. data/features/support/fixtures/bundler-1.0.21.gem +0 -0
  70. data/features/support/fixtures/bundler-1.1.rc.gem +0 -0
@@ -1,5 +1,8 @@
1
+ language: ruby
2
+
3
+ dist: xenial
4
+
1
5
  rvm:
2
- - 2.2
3
6
  - 2.3
4
7
  - 2.4
5
8
  - 2.5
@@ -9,11 +12,13 @@ rvm:
9
12
  addons:
10
13
  firefox: latest
11
14
 
12
- # whitelist
13
15
  branches:
14
16
  only:
15
17
  - master
16
18
 
19
+ services:
20
+ - xvfb
21
+
17
22
  gemfile:
18
23
  - gemfiles/rails_6_0.gemfile
19
24
  - gemfiles/rails_5_2.gemfile
@@ -26,20 +31,30 @@ matrix:
26
31
  allow_failures:
27
32
  - rvm: ruby-head
28
33
  exclude:
29
- - rvm: 2.2
30
- gemfile: gemfiles/rails_6_0.gemfile
34
+ # Only test Rails6 on supported rubies
35
+ # Don't test lowest rails support on maintained rubies
31
36
  - rvm: 2.3
32
37
  gemfile: gemfiles/rails_6_0.gemfile
33
- - rvm: 2.4
34
- gemfile: gemfiles/rails_6_0.gemfile
35
38
  - rvm: 2.4
36
39
  gemfile: gemfiles/rails_4_2.gemfile
40
+ - rvm: 2.4
41
+ gemfile: gemfiles/rails_6_0.gemfile
37
42
  - rvm: 2.5
38
43
  gemfile: gemfiles/rails_4_2.gemfile
44
+ - rvm: 2.6
45
+ gemfile: gemfiles/rails_4_2.gemfile
46
+ - rvm: 2.6
47
+ gemfile: gemfiles/rails_5_0.gemfile
48
+ - rvm: 2.6
49
+ gemfile: gemfiles/rails_5_1.gemfile
50
+ - rvm: ruby-head
51
+ gemfile: gemfiles/rails_4_2.gemfile
52
+ - rvm: ruby-head
53
+ gemfile: gemfiles/rails_5_0.gemfile
54
+ - rvm: ruby-head
55
+ gemfile: gemfiles/rails_5_1.gemfile
39
56
 
40
57
  before_install:
41
58
  - gem install --remote bundler -v '~> 1.17'
42
59
  - bin/install_geckodriver.sh
43
60
  - bin/install_webpacker.sh
44
-
45
- before_script: geckodriver -V
data/Appraisals CHANGED
@@ -1,32 +1,35 @@
1
- appraise "rails_4_2" do
2
- gem "railties", "~> 4.2.1"
3
- gem "i18n", "< 1.5.1", platform: :mri_22
4
- gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22]
5
- gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22]
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails_4_2' do
4
+ gem 'capybara', '< 3.16.0', platform: :mri_23
5
+ gem 'nokogiri', '< 1.9.1', platform: :mri_23
6
+ gem 'railties', '~> 4.2.11'
7
+ gem 'sqlite3', '~> 1.3.13'
6
8
  end
7
9
 
8
- appraise "rails_5_0" do
9
- gem "railties", "~> 5.0.0"
10
- gem "i18n", "< 1.5.1", platform: :mri_22
11
- gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22]
12
- gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22]
10
+ appraise 'rails_5_0' do
11
+ gem 'capybara', '< 3.16.0', platform: :mri_23
12
+ gem 'nokogiri', '< 1.9.1', platform: :mri_23
13
+ gem 'railties', '~> 5.0.7'
14
+ gem 'sqlite3', '~> 1.3.13'
13
15
  end
14
16
 
15
- appraise "rails_5_1" do
16
- gem "railties", "~> 5.1.0"
17
- gem "i18n", "< 1.5.1", platform: :mri_22
18
- gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22]
19
- gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22]
17
+ appraise 'rails_5_1' do
18
+ gem 'capybara', '< 3.16.0', platform: :mri_23
19
+ gem 'nokogiri', '< 1.9.1', platform: :mri_23
20
+ gem 'railties', '~> 5.1.0'
21
+ gem 'sqlite3', '~> 1.3.13'
20
22
  end
21
23
 
22
- appraise "rails_5_2" do
23
- gem "railties", "~> 5.2"
24
- gem "i18n", "< 1.5.1", platform: :mri_22
25
- gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22]
26
- gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22]
24
+ appraise 'rails_5_2' do
25
+ gem 'capybara', '< 3.16.0', platform: :mri_23
26
+ gem 'nokogiri', '< 1.9.1', platform: :mri_23
27
+ gem 'railties', '~> 5.2.3'
28
+ gem 'sqlite3', '~> 1.3.13'
27
29
  end
28
30
 
29
- appraise "rails_6_0" do
30
- gem "railties", "~> 6.0.0.beta1"
31
- gem "rails", "~> 6.0.0.beta1"
31
+ appraise 'rails_6_0' do
32
+ gem 'railties', '~> 6.0.0.rc2'
33
+ gem 'rails', '~> 6.0.0.rc2'
34
+ gem 'sqlite3', '~> 1.4'
32
35
  end
@@ -1,34 +1,80 @@
1
1
  Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) on how to contribute to Cucumber.
2
2
 
3
- ## [master](https://github.com/cucumber/cucumber-rails/compare/v1.6.0...master) (Not yet released)
4
- There are currently no unreleased changes.
3
+ ## [master](https://github.com/cucumber/cucumber-rails/compare/v1.8.0...master) (Not yet released)
5
4
 
5
+ ### Changed
6
+
7
+ *
8
+
9
+ ### Fixed
10
+
11
+ *
12
+
13
+ ## [v1.8.0](https://github.com/cucumber/cucumber-rails/compare/v1.7.0..v1.8.0) (2019-08-06)
14
+
15
+ ### Changed
16
+
17
+ * Drop Ruby 2.2 support (target 2.3 and up) ([#424](https://github.com/cucumber/cucumber-rails/pull/424) [mvz])
18
+
19
+ * Begin to update the core runtime / development dependencies to something a little more recent
20
+ ([#413](https://github.com/cucumber/cucumber-rails/pull/413) /
21
+ [#431](https://github.com/cucumber/cucumber-rails/pull/431) /
22
+ [#432](https://github.com/cucumber/cucumber-rails/pull/432)
23
+ [mvz] /
24
+ [luke-hill])
25
+
26
+ ### Fixed
27
+
28
+ * Various rubocop / styling issues that had built up over time
29
+ ([#414](https://github.com/cucumber/cucumber-rails/pull/414) /
30
+ [#416](https://github.com/cucumber/cucumber-rails/pull/416) /
31
+ [#419](https://github.com/cucumber/cucumber-rails/pull/419) /
32
+ [#420](https://github.com/cucumber/cucumber-rails/pull/420) /
33
+ [#421](https://github.com/cucumber/cucumber-rails/pull/421) /
34
+ [#421](https://github.com/cucumber/cucumber-rails/pull/434)
35
+ [luke-hill] /
36
+ [mvz])
37
+
38
+ * Generic Travis Healthcheck (Fixed up polluted logs and use newer Ubuntu OS)
39
+ ([#415](https://github.com/cucumber/cucumber-rails/pull/415) /
40
+ [#417](https://github.com/cucumber/cucumber-rails/pull/417)
41
+ [luke-hill])
42
+
43
+ * Rails6 not building correctly
44
+ ([#418](https://github.com/cucumber/cucumber-rails/pull/418)
45
+ [luke-hill])
46
+
47
+ * Provisional Ruby 2.7 builds not working
48
+ ([#427](https://github.com/cucumber/cucumber-rails/pull/427)
49
+ [amatsuda] /
50
+ [luke-hill])
51
+
6
52
  ## [v1.7.0](https://github.com/cucumber/cucumber-rails/compare/v1.6.0...v1.7.0) (2019-04-17)
7
53
 
8
54
  ### Changed
9
55
 
10
- * Drop rails `4.0` / `4.1` support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez](https://github.com/deivid-rodriguez))
11
- * Allow Ruby `2.6` users to `ERB.new` ([#399](https://github.com/cucumber/cucumber-rails/pull/399) [koic](https://github.com/koic))
12
- * Allow Rails to be used in the `6.x` series (Currently as of release only beta1 is supported) ([#405](https://github.com/cucumber/cucumber-rails/pull/405) [kotovalexarian](https://github.com/kotovalexarian))
13
- * Update CI to test most relevant Rubies ([#411](https://github.com/cucumber/cucumber-rails/pull/411) [olleolleolle](https://github.com/olleolleolle))
56
+ * Drop rails `4.0` / `4.1` support ([#392](https://github.com/cucumber/cucumber-rails/pull/392) [deivid-rodriguez])
57
+ * Allow Ruby `2.6` users to `ERB.new` ([#399](https://github.com/cucumber/cucumber-rails/pull/399) [koic])
58
+ * Allow Rails to be used in the `6.x` series (Currently as of release only beta1 is supported) ([#405](https://github.com/cucumber/cucumber-rails/pull/405) [kotovalexarian])
59
+ * Update CI to test most relevant Rubies ([#411](https://github.com/cucumber/cucumber-rails/pull/411) [olleolleolle])
14
60
 
15
61
  ### Fixed
16
62
 
17
63
  * Appraisals fixes (Up-to-date `geckodriver`, standardised the various `.gemfile`s)
18
- [#389](https://github.com/cucumber/cucumber-rails/pull/389) /
64
+ ([#389](https://github.com/cucumber/cucumber-rails/pull/389) /
19
65
  [#394](https://github.com/cucumber/cucumber-rails/pull/394) /
20
66
  [#395](https://github.com/cucumber/cucumber-rails/pull/395) /
21
67
  [#408](https://github.com/cucumber/cucumber-rails/pull/408)
22
- [xtrasimplicity](https://github.com/xtrasimplicity) /
23
- [deivid-rodriguez](https://github.com/deivid-rodriguez) /
24
- [mvz](https://github.com/mvz)
68
+ [xtrasimplicity] /
69
+ [deivid-rodriguez] /
70
+ [mvz])
25
71
 
26
72
  * Various build issues that had built up over the previous year
27
- [#403](https://github.com/cucumber/cucumber-rails/pull/403) /
73
+ ([#403](https://github.com/cucumber/cucumber-rails/pull/403) /
28
74
  [#404](https://github.com/cucumber/cucumber-rails/pull/404) /
29
75
  [#410](https://github.com/cucumber/cucumber-rails/pull/410)
30
- [koic](https://github.com/koic) /
31
- [mvz](https://github.com/mvz)
76
+ [koic] /
77
+ [mvz])
32
78
 
33
79
  ## [v1.6.0](https://github.com/cucumber/cucumber-rails/compare/v1.5.0...v1.6.0) (2018-04-23)
34
80
 
@@ -40,7 +86,7 @@ There are currently no unreleased changes.
40
86
  * Updated syntax to support both new and deprecated forms of tag negation. ([#348](https://github.com/cucumber/cucumber-rails/pull/348) [mirelon](https://github.com/mirelon), [#359](https://github.com/cucumber/cucumber-rails/pull/359) [xtrasimplicity](https://github.com/xtrasimplicity))
41
87
  * Dependencies: Allowed `Ammeter` versions greater than 1.1.3. ([#368](https://github.com/cucumber/cucumber-rails/pull/368) [mvz](https://github.com/mvz))
42
88
  * Switched to Ruby 1.9 hash syntax. ([#371](https://github.com/cucumber/cucumber-rails/pull/371) [mvz](https://github.com/mvz))
43
- * Added support to handle rerun files with multiple lines. ([#c6d3d7e](https://github.com/cucumber/cucumber-rails/commit/c6d3d7e77febb758ae17bd154b9d4da7a8847c3d) [mvz](https://github.com/mvz))
89
+ * Added support to handle rerun files with multiple lines. ([#373]((https://github.com/cucumber/cucumber-rails/pull/345)) [mvz](https://github.com/mvz))
44
90
  * Added support for Rails 5.2 and Capybara 3. ([#378](https://github.com/cucumber/cucumber-rails/pull/378/) [gobijan](https://github.com/gobijan), [radar](https://github.com/radar), [xtrasimplicity](https://github.com/xtrasimplicity))
45
91
 
46
92
  ### Fixed
@@ -52,7 +98,7 @@ There are currently no unreleased changes.
52
98
  ## [v1.5.0](https://github.com/cucumber/cucumber-rails/compare/1.4.5...1.5.0) (2017-05-12)
53
99
 
54
100
  * Drop rails 3 support ([#334](https://github.com/cucumber/cucumber-rails/pull/334) Matijs van Zuijlen)
55
- * Add rals 5.1 support ([#337](https://github.com/cucumber/cucumber-rails/pull/337) Matijs van Zuijlen - Rafael Reggiani Manzo)
101
+ * Add rails 5.1 support ([#337](https://github.com/cucumber/cucumber-rails/pull/337) Matijs van Zuijlen - Rafael Reggiani Manzo)
56
102
 
57
103
  ## [v1.4.5](https://github.com/cucumber/cucumber-rails/compare/1.4.4...1.4.5) (2016-09-27)
58
104
 
@@ -492,3 +538,12 @@ and to celebrate that cucumber-rails now supports Capybara as an alternative to
492
538
  * Webrat step "Then I should be on" should use request_uri instead of path for missing query string parameters (ZhangJinzhu)
493
539
  * Added MIME type parameter to attach file step definition (Felix Flores)
494
540
  * Added check when including ActiveSupport::Testing::SetupAndTeardown for older Rails versions (Jeremy Durham)
541
+
542
+ [deivid-rodriguez]: https://github.com/deivid-rodriguez
543
+ [koic]: https://github.com/koic
544
+ [kotovalexarian]: https://github.com/kotovalexarian
545
+ [mvz]: https://github.com/mvz
546
+ [olleolleolle]: https://github.com/olleolleolle
547
+ [luke-hill]: https://github.com/luke-hill
548
+ [amatsuda]: https://github.com/amatsuda
549
+ [xtrasimplicity]: https://github.com/xtrasimplicity
@@ -29,7 +29,10 @@ This document is a guide for those maintaining Cucumber-Rails, and others who wo
29
29
  bundle install
30
30
  bin/install_geckodriver.sh
31
31
  bin/install_webpacker.sh
32
- bundle exec rake
32
+ # Then to run tests on one specific gemfile (i.e. Rails 4.2), run
33
+ bundle exec appraisal rails_4_2 rake test
34
+ # Or run tests across the full supported stack. Note that because we support many versions. This takes 5-10 minutes
35
+ bundle exec rake appraisal
33
36
 
34
37
  ## Release Process
35
38
 
@@ -44,19 +47,6 @@ Now release it
44
47
  git commit -m "Release X.Y.Z"
45
48
  rake release
46
49
 
47
- ### NOTE:
48
-
49
- If after running the rake release task you get an error similar to this:
50
-
51
- rake aborted!
52
- Couldn't git push. `git push 2>&1' failed with the following output:
53
-
54
- To git@github.com:cucumber/cucumber-rails.git
55
- ! [rejected] rails-2.3.x -> rails-2.3.x (non-fast-forward)
56
- error: failed to push some refs to 'git@github.com:cucumber/cucumber-rails.git'
57
-
58
- make sure that you have pulled all the recent changes from the master branch
59
-
60
50
  ## Gaining Release Karma
61
51
 
62
52
  To become a release manager, create a pull request adding your name to the list below, including
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- # Test dependencies for Rails in the default test task, as test-generated
4
- # apps do not run bundler for speed reasons. Kept here so they can be
5
- # excluded from Appraisal-generated gemfiles.
3
+ source 'https://rubygems.org'
6
4
 
7
5
  gemspec
data/README.md CHANGED
@@ -5,8 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails)
6
6
  [![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails)
7
7
 
8
- Cucumber-Rails brings Cucumber to Rails 4.2 and Rails 5.x. This gem is also compatible with Rails 6.0+
9
- but this is currently in a beta phase, so there may be issues.
8
+ Cucumber-Rails brings Cucumber to Rails 4.2, Rails 5.x and Rails 6.0.
10
9
 
11
10
  ## Installation
12
11
 
@@ -63,7 +62,7 @@ When upgrading from a previous version it is recommended that you rerun:
63
62
  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:
64
63
 
65
64
  git clone git@github.com:you/cucumber-rails.git
66
- git checkout -b bug-install-generator
65
+ git checkout -b bugfix/generator-fails-on-ruby-25
67
66
 
68
67
  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.
69
68
 
@@ -97,14 +96,12 @@ To run the suite against a named gemfile, use the following:
97
96
 
98
97
  To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following:
99
98
 
100
- [bundle exec] appraisal install
99
+ [bundle exec] appraisal update
101
100
 
102
101
  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:
103
102
 
104
103
  [bundle exec] rake clean
105
104
 
106
-
107
-
108
105
  ### Adding dependencies
109
106
 
110
107
  To support the multiple-gemfile testing, when adding a new dependency the following rules apply:
@@ -123,7 +120,7 @@ If you get an error while trying to run the tests locally, similar to the one be
123
120
 
124
121
  Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
125
122
 
126
- you would need to install a javascript runtime.
123
+ You need to install a javascript runtime.
127
124
 
128
125
  You can do that in ubuntu by using:
129
126
 
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
- # encoding: utf-8
2
- CUCUMBER_RAILS_VERSION = Gem::Specification.load(File.dirname(__FILE__) + '/cucumber-rails.gemspec').version.version
1
+ # frozen_string_literal: true
2
+
3
+ CUCUMBER_RAILS_VERSION =
4
+ Gem::Specification.load(File.dirname(__FILE__) + '/cucumber-rails.gemspec').version.version
3
5
  require 'rubygems'
4
6
  require 'bundler'
5
7
  require 'bundler/setup'
@@ -9,41 +11,43 @@ require 'rake/clean'
9
11
  require 'pathname'
10
12
  Bundler::GemHelper.install_tasks
11
13
 
12
- $:.unshift(File.dirname(__FILE__) + '/lib')
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib')
13
15
  Dir["#{File.dirname(__FILE__)}/dev_tasks/*.rake"].sort.each { |ext| load ext }
14
16
 
15
17
  CLEAN.include('doc', 'tmp')
16
18
 
17
19
  task default: :test
18
20
 
19
- task test: [:spec, :cucumber]
21
+ task test: %i[spec cucumber]
20
22
 
21
23
  namespace :test do
22
- desc "Run tests against all gemfiles"
24
+ desc 'Run tests against all gemfiles'
23
25
  task :all do
24
26
  Rake::Task['appraisal'].invoke('test')
25
27
  end
26
28
 
27
- desc "Run tests against specified gemfile, e.g. rake test:gemfile[rails_3_0]"
28
- task :gemfile, :name do |task, args|
29
+ desc 'Run tests against specified gemfile, e.g. rake test:gemfile[rails_3_0]'
30
+ task :gemfile, :name do |_task, args|
29
31
  unless args.name && Pathname.new("gemfiles/#{args.name}.gemfile").exist?
30
- raise ArgumentError "You must provide the name of an existing Appraisal gemfile, e.g. 'rake test:gemfile[rails_3_2]'"
32
+ raise ArgumentError "You must provide the name of an existing Appraisal gemfile,
33
+ e.g. 'rake test:gemfile[rails_4_2]'"
31
34
  end
35
+
32
36
  Rake::Task["appraisal:#{args.name}"].invoke('test')
33
37
  end
34
38
  end
35
39
 
36
40
  namespace :gemfiles do
37
- desc "Install dependencies for all gemfiles"
41
+ desc 'Install dependencies for all gemfiles'
38
42
  task :install do
39
- ENV['BUNDLE_GEMFILE'] = "Gemfile.appraisal"
43
+ ENV['BUNDLE_GEMFILE'] = 'Gemfile.appraisal'
40
44
  Rake::Task['appraisal:install'].invoke
41
45
  end
42
46
 
43
47
  task :clean do
44
- FileUtils.rm_rf("gemfiles/*")
48
+ FileUtils.rm_rf('gemfiles/*')
45
49
  end
46
50
 
47
- desc "Rebuild generated gemfiles and install dependencies"
48
- task rebuild: [:clean, :install]
51
+ desc 'Rebuild generated gemfiles and install dependencies'
52
+ task rebuild: %i[clean install]
49
53
  end
@@ -8,7 +8,7 @@ curl --silent \
8
8
  --fail \
9
9
  --retry 3 \
10
10
  --output /tmp/geckodriver_linux64.tar.gz \
11
- https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz
11
+ https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
12
12
 
13
13
  sudo tar -C /usr/local/bin -xvzf /tmp/geckodriver_linux64.tar.gz geckodriver
14
14
 
@@ -1,44 +1,44 @@
1
- # -*- encoding: utf-8 -*-
2
- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('lib', __dir__)
3
4
 
4
5
  Gem::Specification.new do |s|
5
6
  s.name = 'cucumber-rails'
6
- s.version = '1.7.0'
7
- s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
8
- s.description = "Cucumber Generator and Runtime for Rails"
7
+ s.version = '1.8.0'
8
+ s.authors = ['Aslak Hellesøy', 'Dennis Blöte', 'Rob Holland']
9
+ s.description = 'Cucumber Generator and Runtime for Rails'
9
10
  s.summary = "#{s.name}-#{s.version}"
10
11
  s.email = 'cukes@googlegroups.com'
11
- s.homepage = "http://cukes.info"
12
+ s.homepage = 'http://cukes.info'
12
13
 
13
14
  s.license = 'MIT'
14
15
 
15
- s.required_ruby_version = '>= 2.2'
16
-
17
- s.add_runtime_dependency('capybara', ['>= 2.3.0', '< 4'])
16
+ s.add_runtime_dependency('capybara', ['>= 2.12', '< 4'])
18
17
  s.add_runtime_dependency('cucumber', ['>= 3.0.2', '< 4'])
18
+ s.add_runtime_dependency('mime-types', ['>= 2.0', '< 4'])
19
19
  s.add_runtime_dependency('nokogiri', '~> 1.8')
20
20
  s.add_runtime_dependency('railties', ['>= 4.2', '< 7'])
21
- s.add_runtime_dependency('mime-types', ['>= 1.17', '< 4'])
22
21
 
23
22
  # Main development dependencies
24
- s.add_development_dependency('ammeter', ['>= 1.0.0', '!= 1.1.3'])
25
- s.add_development_dependency('appraisal', '>= 0.5.1')
26
- s.add_development_dependency('aruba', '~> 0.14.2')
27
- s.add_development_dependency('bundler', '>= 1.3.5')
28
- s.add_development_dependency('rubocop', '~> 0.66.0')
29
- s.add_development_dependency('rake', '>= 10.3')
30
- s.add_development_dependency('rspec', '~> 3.5')
23
+ s.add_development_dependency('ammeter', '>= 1.1.4')
24
+ s.add_development_dependency('appraisal', '~> 2.2')
25
+ s.add_development_dependency('aruba', '~> 0.14.4')
26
+ s.add_development_dependency('bundler', '>= 1.17')
31
27
  s.add_development_dependency('rails', ['>= 4.2', '< 7'])
32
- s.add_development_dependency('sqlite3', '~> 1.3.13')
28
+ s.add_development_dependency('rake', '>= 12.0')
29
+ s.add_development_dependency('rspec', '~> 3.6')
30
+ s.add_development_dependency('rubocop', '~> 0.72.0')
31
+ s.add_development_dependency('rubocop-performance', '~> 1.4.0')
32
+ s.add_development_dependency('rubocop-rspec', '~> 1.33.0')
33
+ s.add_development_dependency('sqlite3', '~> 1.3')
33
34
 
34
35
  # For Documentation:
35
- s.add_development_dependency('rdiscount', '>= 2.0.7')
36
- s.add_development_dependency('rdoc', '>= 3.4')
37
- s.add_development_dependency('yard', '>= 0.8.7')
36
+ s.add_development_dependency('rdoc', '>= 6.0')
37
+ s.add_development_dependency('yard', '~> 0.9.10')
38
38
 
39
- s.required_ruby_version = '>= 2.2.0'
40
- s.rubygems_version = ">= 1.6.1"
39
+ s.required_ruby_version = '>= 2.3.0'
40
+ s.rubygems_version = '>= 1.6.1'
41
41
  s.files = `git ls-files`.split("\n")
42
42
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
43
- s.require_path = "lib"
43
+ s.require_path = 'lib'
44
44
  end