cucumber-rails 1.5.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE.md +52 -0
  3. data/.github/PULL_REQUEST_TEMPLATE.md +42 -0
  4. data/.gitignore +3 -1
  5. data/.rspec +4 -1
  6. data/.rubocop.yml +68 -0
  7. data/.travis.yml +43 -33
  8. data/Appraisals +25 -92
  9. data/{History.md → CHANGELOG.md} +242 -40
  10. data/CONTRIBUTING.md +15 -24
  11. data/Gemfile +2 -4
  12. data/LICENSE +1 -1
  13. data/README.md +57 -27
  14. data/Rakefile +18 -14
  15. data/bin/install_geckodriver.sh +19 -0
  16. data/bin/install_webpacker.sh +9 -0
  17. data/config/cucumber.yml +2 -5
  18. data/cucumber-rails.gemspec +35 -28
  19. data/dev_tasks/cucumber.rake +2 -0
  20. data/dev_tasks/rspec.rake +2 -0
  21. data/dev_tasks/yard.rake +7 -14
  22. data/dev_tasks/yard/default/layout/html/setup.rb +6 -1
  23. data/features/allow_rescue.feature +16 -11
  24. data/features/annotations.feature +8 -11
  25. data/features/capybara_javascript_drivers.feature +38 -28
  26. data/features/choose_javascript_database_strategy.feature +37 -57
  27. data/features/configuration.feature +48 -0
  28. data/features/database_cleaner.feature +18 -18
  29. data/features/disable_automatic_database_cleaning.feature +12 -18
  30. data/features/emulate_javascript.feature +64 -47
  31. data/features/install_cucumber_rails.feature +4 -4
  32. data/features/no_database.feature +8 -19
  33. data/features/raising_errors.feature +9 -3
  34. data/features/rerun_profile.feature +17 -7
  35. data/features/rest_api.feature +12 -12
  36. data/features/step_definitions/cucumber_rails_steps.rb +44 -88
  37. data/features/support/aruba.rb +3 -1
  38. data/features/support/cucumber_rails_helper.rb +85 -0
  39. data/features/support/env.rb +4 -30
  40. data/features/support/hooks.rb +8 -0
  41. data/gemfiles/rails_4_2.gemfile +5 -13
  42. data/gemfiles/rails_5_0.gemfile +5 -12
  43. data/gemfiles/rails_5_1.gemfile +4 -9
  44. data/gemfiles/rails_5_2.gemfile +10 -0
  45. data/gemfiles/rails_6_0.gemfile +9 -0
  46. data/lib/cucumber/rails.rb +17 -15
  47. data/lib/cucumber/rails/action_dispatch.rb +21 -0
  48. data/lib/cucumber/rails/application.rb +16 -7
  49. data/lib/cucumber/rails/capybara.rb +2 -0
  50. data/lib/cucumber/rails/capybara/javascript_emulation.rb +45 -37
  51. data/lib/cucumber/rails/capybara/select_dates_and_times.rb +6 -4
  52. data/lib/cucumber/rails/database.rb +30 -8
  53. data/lib/cucumber/rails/hooks.rb +2 -0
  54. data/lib/cucumber/rails/hooks/active_record.rb +14 -12
  55. data/lib/cucumber/rails/hooks/allow_rescue.rb +2 -0
  56. data/lib/cucumber/rails/hooks/database_cleaner.rb +6 -4
  57. data/lib/cucumber/rails/hooks/mail.rb +4 -4
  58. data/lib/cucumber/rails/rspec.rb +3 -1
  59. data/lib/cucumber/rails/world.rb +24 -7
  60. data/lib/generators/cucumber/{install/USAGE → USAGE} +0 -0
  61. data/lib/generators/cucumber/{install/install_generator.rb → install_generator.rb} +23 -10
  62. data/lib/generators/cucumber/{install/templates → templates}/config/cucumber.yml.erb +4 -3
  63. data/lib/generators/cucumber/{install/templates → templates}/script/cucumber +1 -0
  64. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_each_run.rb.erb +2 -2
  65. data/lib/generators/cucumber/{install/templates → templates}/support/_rails_prefork.rb.erb +0 -0
  66. data/lib/generators/cucumber/{install/templates → templates}/support/capybara.rb +2 -0
  67. data/lib/generators/cucumber/{install/templates → templates}/support/edit_warning.txt +0 -0
  68. data/lib/generators/cucumber/{install/templates → templates}/support/rails.rb.erb +0 -0
  69. data/lib/generators/cucumber/{install/templates → templates}/support/rails_spork.rb.erb +0 -0
  70. data/lib/generators/cucumber/{install/templates → templates}/tasks/cucumber.rake.erb +9 -9
  71. data/spec/cucumber/rails/database_spec.rb +46 -33
  72. data/spec/generators/cucumber/{install/install_generator_spec.rb → install_generator_spec.rb} +17 -9
  73. data/spec/spec_helper.rb +13 -4
  74. metadata +105 -139
  75. data/Gemfile.appraisal +0 -3
  76. data/features/support/bundler_pre_support.rb +0 -28
  77. data/features/support/fixtures/bundler-1.0.21.gem +0 -0
  78. data/features/support/fixtures/bundler-1.1.rc.gem +0 -0
  79. data/features/support/legacy_web_steps_support.rb +0 -289
  80. data/gemfiles/lowest_version_bounds.gemfile +0 -26
  81. data/gemfiles/rails_4_0.gemfile +0 -19
  82. data/gemfiles/rails_4_1.gemfile +0 -18
  83. data/lib/cucumber/rails/action_controller.rb +0 -12
@@ -13,29 +13,32 @@ We appreciate that. But before you do, please learn our basic rules:
13
13
 
14
14
  # Contributing to cucumber-rails
15
15
 
16
- This document is a guide for those maintaining cucumber-Rails, and others who would like to submit patches.
16
+ This document is a guide for those maintaining Cucumber-Rails, and others who would like to submit patches.
17
17
 
18
18
  ## Note on Patches/Pull Requests
19
19
 
20
20
  * Fork the project. Make a branch for your change.
21
21
  * Make your feature addition or bug fix.
22
- * Make sure your patch is well covered by tests. We don't accept changes to cucumber-rails that aren't tested.
23
- * Please do not change the Rakefile, version, or history.
24
- (if you want to have your own version, that is fine but
25
- bump version in a commit by itself so we can ignore when we merge your change)
22
+ * Make sure your patch is well covered by tests. We don't accept changes to `cucumber-rails` that aren't tested.
23
+ * Please do not change the Rakefile, version, or CHANGELOG.
26
24
  * Send us a pull request.
27
25
 
28
26
  ## Running tests
29
27
 
30
28
  gem install bundler
31
29
  bundle install
32
- bundle exec rake
30
+ bin/install_geckodriver.sh
31
+ bin/install_webpacker.sh
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
 
36
- * Make sure `History.md` is updated with the upcoming version number, and has entries for all fixes.
37
- * No need to add a `History.md` header at this point - this should be done when a new change is made, later.
38
- * Make sure you have up-to-date and clean copy of cucumber/cucumber.github.com.git at the same level as cucumber repo.
39
+ * Make sure `CHANGELOG.md` is updated with the upcoming version number, and has entries for all fixes.
40
+ * No need to add a new version header at this point - this should be done when a new release is made, later.
41
+ * Make sure you have up-to-date and clean copy of `cucumber/cucumber.github.com.git` at the same level as cucumber repo.
39
42
 
40
43
  Now release it
41
44
 
@@ -44,29 +47,17 @@ 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 eror similiar 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 both the master and the rails-2.3.x branch
59
-
60
50
  ## Gaining Release Karma
61
51
 
62
- To become a release manager, create a pull request adding your name to the list below, and include your Rubygems email address in the ticket. One of the existing Release managers will then add you.
52
+ To become a release manager, create a pull request adding your name to the list below, including
53
+ your Rubygems email address in the ticket. One of the existing Release managers will then add you.
63
54
 
64
55
  Current release managers:
65
56
  * Kosmas Chatzimichalis
66
57
  * Matt Wynne
67
58
  * Mathieu Jobin
59
+ * Andrew Walter
68
60
 
69
61
  To grant release karma, issue the following command:
70
62
 
71
63
  gem owner cucumber-rails --add <NEW OWNER RUBYGEMS EMAIL>
72
-
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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2008,2009,2010,2011,2012,2013 Aslak Hellesøy and the Cucumber Team.
3
+ Copyright (c) 2008-2019 Aslak Hellesøy and the Cucumber Team.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -3,20 +3,21 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/cucumber-rails.svg)](http://badge.fury.io/rb/cucumber-rails)
4
4
  [![Build Status](https://secure.travis-ci.org/cucumber/cucumber-rails.svg?branch=master)](http://travis-ci.org/cucumber/cucumber-rails)
5
5
  [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.svg)](https://codeclimate.com/github/cucumber/cucumber-rails)
6
- [![Dependency Status](https://gemnasium.com/Kosmas/cucumber-rails.svg)](https://gemnasium.com/Kosmas/cucumber-rails)
7
- [![PullReview stats](https://www.pullreview.com/github/cucumber/cucumber-rails/badges/master.svg?)](https://www.pullreview.com/github/cucumber/cucumber-rails/reviews/master)
6
+ [![Open Source Helpers](https://www.codetriage.com/cucumber/cucumber-rails/badges/users.svg)](https://www.codetriage.com/cucumber/cucumber-rails)
8
7
 
9
- Cucumber-Rails brings Cucumber to Rails 4.x and 5.x. For Rails 3.x support, use version 1.4.5. For Rails 2.3.x support, see the [rails-2.3.x branch](https://github.com/cucumber/cucumber-rails/tree/rails-2.3.x).
8
+ Cucumber-Rails brings Cucumber to Rails 4.2, 5.x and 6.x.
10
9
 
11
10
  ## Installation
12
11
 
13
12
  Before you can use the generator, add the gem to your project's Gemfile as follows:
14
13
 
15
- group :test do
16
- gem 'cucumber-rails', :require => false
17
- # database_cleaner is not required, but highly recommended
18
- gem 'database_cleaner'
19
- end
14
+ ```ruby
15
+ group :test do
16
+ gem 'cucumber-rails', require: false
17
+ # database_cleaner is not required, but highly recommended
18
+ gem 'database_cleaner'
19
+ end
20
+ ```
20
21
 
21
22
  Then install it by running:
22
23
 
@@ -42,11 +43,20 @@ Without Rake:
42
43
 
43
44
  ## Configuration options
44
45
 
45
- By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean` before and after your scenarios. You can disable this behaviour like so:
46
+ By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean`
47
+ before and after your scenarios. You can disable this behaviour like so:
46
48
 
47
- # features/support/env.rb
48
- # ...
49
- Cucumber::Rails::Database.autorun_database_cleaner = false
49
+ ```ruby
50
+ # features/support/env.rb
51
+ # ...
52
+ Cucumber::Rails::Database.autorun_database_cleaner = false
53
+ ```
54
+
55
+ By default, cucumber-rails will auto mix-in the helpers from `Rack::Test` into your default Cucumber World instance. You can prevent this behaviour like so:
56
+ ```ruby
57
+ # features/support/env.rb
58
+ ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
59
+ ```
50
60
 
51
61
  ## Upgrading from a previous version
52
62
 
@@ -56,42 +66,59 @@ When upgrading from a previous version it is recommended that you rerun:
56
66
 
57
67
  ## Bugs and feature requests
58
68
 
59
- 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:
69
+ The *only* way to have a bug fixed or a new feature accepted is to describe it with a
70
+ Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator.
71
+ Fork this project, clone it to your workstation and check out a branch with a descriptive name:
60
72
 
61
73
  git clone git@github.com:you/cucumber-rails.git
62
- git checkout -b bug-install-generator
74
+ git checkout -b bugfix/generator-fails-on-ruby-25
63
75
 
64
- 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.
76
+ Start by making sure you can run the existing features. Now, create a feature that demonstrates
77
+ what's wrong. See the existing features for examples. When you have a failing feature that
78
+ reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team
79
+ will review it and hopefully create a fix.
65
80
 
66
- If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request.
81
+ If you know how to fix the bug yourself, make a second commit (after committing the failing
82
+ feature) before you send the pull request.
67
83
 
68
84
  ### Setting up your environment
69
85
 
70
- I strongly recommend rvm and ruby 1.9.3. When you have that, cd into your cucumber-rails repository and:
86
+ Make sure you have a supported ruby installed, cd into your cucumber-rails repository and:
71
87
 
72
88
  gem install bundler
73
89
  bundle install
90
+ bin/install_geckodriver.sh
91
+ bin/install_webpacker.sh
74
92
 
75
93
  ### Running all tests
76
94
 
77
95
  With all dependencies installed, all specs and features should pass:
78
96
 
79
- rake
97
+ [bundle exec] rake
80
98
 
81
99
  ### Running Appraisal suite
82
100
 
83
- 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:
101
+ In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal)
102
+ gem is used to generate multiple gemfiles, stored in the `gemfiles/` directory.
103
+ Normally these will only run on Travis; however, if you want to run the full test suite against
104
+ all gemfiles, run the following commands:
84
105
 
85
- appraisal install
86
- appraisal rake test
106
+ [bundle exec] appraisal install
107
+ [bundle exec] appraisal rake test
87
108
 
88
109
  To run the suite against a named gemfile, use the following:
89
110
 
90
- appraisal rails_4_1 rake test
111
+ [bundle exec] appraisal rails_4_2 rake test
112
+
113
+ To remove and rebuild the different gemfiles (for example, to update a rails version or its
114
+ dependencies), use the following:
91
115
 
92
- To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following:
116
+ [bundle exec] appraisal update
93
117
 
94
- appraisal install
118
+ If you've changed versions of the dependencies, you may find it helpful to forcefully clean
119
+ each appraisal's gem lock file in `gemfiles/`. You can do this using:
120
+
121
+ [bundle exec] rake clean
95
122
 
96
123
  ### Adding dependencies
97
124
 
@@ -99,9 +126,12 @@ To support the multiple-gemfile testing, when adding a new dependency the follow
99
126
 
100
127
  1. If it's a runtime dependency of the gem, add it to the gemspec
101
128
  2. If it's a primary development dependency, add it to the gemspec
102
- 3. If it's a dependency of a generated rails app in a test, add it to the Gemfile (for local test runs) and each appraisal section (if necessary).
129
+ 3. If it's a dependency of a generated rails app in a test, add it to [the helper] that
130
+ modifies the `Gemfile`.
131
+
132
+ For example, rspec is a primary development dependency, so it lives in the gemspec.
103
133
 
104
- For example, rspec is a primary development dependency, so it lives in the gemspec. By contrast, coffee-rails is a dependency of apps generated with rails 3.1 and 3.2, so lives in the main Gemfile and the rails 3.1 and 3.2 appraisal sections.
134
+ [the helper]: https://github.com/cucumber/cucumber-rails/blob/5e37c530560ae1c1a79521c38a54bae0be94242b/features/step_definitions/cucumber_rails_steps.rb#L15
105
135
 
106
136
  ### NOTE
107
137
 
@@ -109,7 +139,7 @@ If you get an error while trying to run the tests locally, similar to the one be
109
139
 
110
140
  Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
111
141
 
112
- you would need to install a javascript runtime.
142
+ You need to install a javascript runtime.
113
143
 
114
144
  You can do that in ubuntu by using:
115
145
 
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
- task :default => :test
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
@@ -0,0 +1,19 @@
1
+ #!/bin/bash
2
+
3
+ set -xeuo pipefail
4
+
5
+ curl --silent \
6
+ --show-error \
7
+ --location \
8
+ --fail \
9
+ --retry 3 \
10
+ --output /tmp/geckodriver_linux64.tar.gz \
11
+ https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
12
+
13
+ sudo tar -C /usr/local/bin -xvzf /tmp/geckodriver_linux64.tar.gz geckodriver
14
+
15
+ rm /tmp/geckodriver_linux64.tar.gz
16
+
17
+ geckodriver --version
18
+
19
+ set +x
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ set -xeuo pipefail
4
+
5
+ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
6
+ echo 'deb https://dl.yarnpkg.com/debian/ stable main' | sudo tee /etc/apt/sources.list.d/yarn.list
7
+ sudo apt update && sudo apt install --yes yarn
8
+
9
+ set +x
@@ -5,16 +5,13 @@ path = if failing_scenarios.empty?
5
5
  'features'
6
6
  else
7
7
  puts "Running failed scenarios"
8
- failing_scenarios
8
+ failing_scenarios.gsub /\s/, ' '
9
9
  end
10
10
  opts = [
11
11
  "--format #{path == 'features' ? 'progress' : 'pretty'}",
12
12
  "--format rerun -o #{rerun_file}"
13
13
  ]
14
14
  rails_version = `bundle exec rails --version`.match(/[\d.]+$/).to_s
15
- if Gem::Version.new(rails_version) < Gem::Version.new('4.2')
16
- opts << '--tags ~@requires-rails-version-42'
17
- end
18
15
  optlist = opts.join(' ')
19
16
  %>
20
- default: <%= path %> <%= optlist %> --tags ~@broken
17
+ default: <%= path %> <%= optlist %> --tags 'not @broken'
@@ -1,44 +1,51 @@
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.5.0'
7
- s.authors = ["Aslak Hellesøy", "Dennis Blöte", "Rob Holland"]
8
- s.description = "Cucumber Generator and Runtime for Rails"
7
+ s.version = '2.1.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 = 'https://cucumber.io'
12
13
 
13
14
  s.license = 'MIT'
14
15
 
15
- s.add_runtime_dependency('capybara', ['>= 1.1.2', '< 3'])
16
- s.add_runtime_dependency('cucumber', ['>= 1.3.8', '< 4'])
17
- s.add_runtime_dependency('nokogiri', '~> 1.5')
18
- s.add_runtime_dependency('railties', ['>= 4', '< 5.2'])
19
- s.add_runtime_dependency('mime-types', ['>= 1.17', '< 4'])
16
+ s.metadata = {
17
+ 'bug_tracker_uri' => 'https://github.com/cucumber/cucumber-rails/issues',
18
+ 'changelog_uri' => "https://github.com/cucumber/cucumber-rails/blob/v#{s.version}/CHANGELOG.md",
19
+ 'documentation_uri' => 'https://cucumber.io/docs',
20
+ 'mailing_list_uri' => 'https://groups.google.com/forum/#!forum/cukes',
21
+ 'source_code_uri' => "https://github.com/cucumber/cucumber-rails/tree/v#{s.version}"
22
+ }
23
+
24
+ s.add_runtime_dependency('capybara', ['>= 2.12', '< 4'])
25
+ s.add_runtime_dependency('cucumber', ['>= 3.0.2', '< 5'])
26
+ s.add_runtime_dependency('mime-types', ['>= 2.0', '< 4'])
27
+ s.add_runtime_dependency('nokogiri', '~> 1.8')
28
+ s.add_runtime_dependency('rails', ['>= 4.2', '< 7'])
20
29
 
21
30
  # Main development dependencies
22
- s.add_development_dependency('ammeter', ['>= 1.0.0', '< 1.1.3'])
23
- s.add_development_dependency('appraisal', '>= 0.5.1')
24
- s.add_development_dependency('aruba', '~> 0.14.2')
25
- s.add_development_dependency('builder', ['>= 3.1.0', '< 4'])
26
- s.add_development_dependency('bundler', '>= 1.3.5')
27
- s.add_development_dependency('selenium-webdriver', '>= 2.45.0')
28
- s.add_development_dependency('database_cleaner', '>= 1.0.0')
29
- s.add_development_dependency('factory_girl', '>= 3.2')
30
- s.add_development_dependency('rake', '>= 0.9.2.2')
31
- s.add_development_dependency('rspec', '~> 3.0')
32
- s.add_development_dependency('rails')
31
+ s.add_development_dependency('ammeter', '>= 1.1.4')
32
+ s.add_development_dependency('appraisal', '~> 2.2')
33
+ s.add_development_dependency('aruba', '~> 1.0')
34
+ s.add_development_dependency('bundler', '>= 1.17')
35
+ s.add_development_dependency('rake', '>= 12.0')
36
+ s.add_development_dependency('rspec', '~> 3.6')
37
+ s.add_development_dependency('rubocop', '~> 0.85.0')
38
+ s.add_development_dependency('rubocop-performance', '~> 1.6.1')
39
+ s.add_development_dependency('rubocop-rspec', '~> 1.39.0')
40
+ s.add_development_dependency('sqlite3', '~> 1.3')
33
41
 
34
42
  # 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')
43
+ s.add_development_dependency('rdoc', '>= 6.0')
44
+ s.add_development_dependency('yard', '~> 0.9.10')
38
45
 
39
- s.rubygems_version = ">= 1.6.1"
46
+ s.required_ruby_version = '>= 2.4.0'
47
+ s.rubygems_version = '>= 1.6.1'
40
48
  s.files = `git ls-files`.split("\n")
41
49
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
42
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
43
- s.require_path = "lib"
50
+ s.require_path = 'lib'
44
51
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cucumber/rake/task'
2
4
 
3
5
  Cucumber::Rake::Task.new
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rspec/core/rake_task'
2
4
 
3
5
  RSpec::Core::RakeTask.new