cucumber-rails 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +443 -0
- data/.travis.yml +22 -20
- data/Appraisals +17 -81
- data/CHANGELOG.md +68 -11
- data/CONTRIBUTING.md +12 -11
- data/LICENSE +1 -1
- data/README.md +22 -14
- data/bin/install_geckodriver.sh +19 -0
- data/bin/install_webpacker.sh +9 -0
- data/config/cucumber.yml +0 -3
- data/cucumber-rails.gemspec +10 -12
- data/features/allow_rescue.feature +8 -4
- data/features/annotations.feature +0 -1
- data/features/emulate_javascript.feature +2 -2
- data/features/install_cucumber_rails.feature +1 -1
- data/features/rest_api.feature +2 -2
- data/features/step_definitions/cucumber_rails_steps.rb +41 -25
- data/gemfiles/rails_4_2.gemfile +3 -12
- data/gemfiles/rails_5_0.gemfile +3 -11
- data/gemfiles/rails_5_1.gemfile +3 -10
- data/gemfiles/rails_5_2.gemfile +3 -10
- data/gemfiles/rails_6_0.gemfile +8 -0
- data/lib/cucumber/rails/action_controller.rb +1 -0
- data/lib/cucumber/rails/capybara/javascript_emulation.rb +3 -16
- data/lib/generators/cucumber/install/install_generator.rb +5 -1
- metadata +35 -75
- data/Gemfile.appraisal +0 -3
- data/gemfiles/rails_4_0.gemfile +0 -22
- data/gemfiles/rails_4_1.gemfile +0 -20
data/gemfiles/rails_5_2.gemfile
CHANGED
@@ -2,16 +2,9 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "rails", "~> 5.2"
|
6
5
|
gem "railties", "~> 5.2"
|
7
|
-
gem "
|
8
|
-
gem "
|
9
|
-
gem "
|
10
|
-
gem "rspec-rails", "~> 3.7"
|
11
|
-
gem "sass-rails", "~> 5.0"
|
12
|
-
gem "coffee-rails", "~> 4.2"
|
13
|
-
gem "uglifier", "~> 4.1"
|
14
|
-
gem "sqlite3", "~> 1.3.13"
|
15
|
-
gem "database_cleaner", ">= 1.6.2"
|
6
|
+
gem "i18n", "< 1.5.1", platform: :mri_22
|
7
|
+
gem "capybara", "< 3.16.0", platform: [:mri_23, :mri_22]
|
8
|
+
gem "nokogiri", "< 1.9.1", platform: [:mri_23, :mri_22]
|
16
9
|
|
17
10
|
gemspec path: "../"
|
@@ -7,6 +7,7 @@ class ActionDispatch::ShowExceptions
|
|
7
7
|
|
8
8
|
def call(env)
|
9
9
|
env['action_dispatch.show_exceptions'] = !!ActionController::Base.allow_rescue
|
10
|
+
env['action_dispatch.show_detailed_exceptions'] = !ActionController::Base.allow_rescue
|
10
11
|
__cucumber_orig_call__(env)
|
11
12
|
end
|
12
13
|
end
|
@@ -66,28 +66,15 @@ module Cucumber
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def link_with_non_get_http_method?
|
69
|
-
|
70
|
-
tag_name == 'a' && element_node['data-method'] && element_node['data-method'] =~ /(?:delete|put|post)/
|
71
|
-
else
|
72
|
-
tag_name == 'a' && element_node['onclick'] && element_node['onclick'] =~ /var f = document\.createElement\('form'\); f\.style\.display = 'none';/
|
73
|
-
end
|
69
|
+
tag_name == 'a' && element_node['data-method'] && element_node['data-method'] =~ /(?:delete|put|post)/
|
74
70
|
end
|
75
71
|
|
76
72
|
def emulated_method
|
77
|
-
|
78
|
-
element_node['data-method']
|
79
|
-
else
|
80
|
-
element_node['onclick'][/m\.setAttribute\('value', '([^']*)'\)/, 1]
|
81
|
-
end
|
73
|
+
element_node['data-method']
|
82
74
|
end
|
83
75
|
|
84
76
|
def element_node
|
85
|
-
|
86
|
-
self.native
|
87
|
-
else
|
88
|
-
warn 'DEPRECATED: cucumber-rails loves you, just not your version of Capybara. Please update Capybara to >= 0.4.0'
|
89
|
-
self.node
|
90
|
-
end
|
77
|
+
self.native
|
91
78
|
end
|
92
79
|
end
|
93
80
|
end
|
@@ -60,7 +60,11 @@ module Cucumber
|
|
60
60
|
|
61
61
|
def embed_template(source, indent = '')
|
62
62
|
template = File.join(self.class.source_root, source)
|
63
|
-
|
63
|
+
if RUBY_VERSION >= '2.6'
|
64
|
+
ERB.new(IO.read(template), trim_mode: '-').result(binding).gsub(/^/, indent)
|
65
|
+
else
|
66
|
+
ERB.new(IO.read(template), nil, '-').result(binding).gsub(/^/, indent)
|
67
|
+
end
|
64
68
|
end
|
65
69
|
end
|
66
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aslak Hellesøy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2019-04-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capybara
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 2.3.0
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '4'
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version:
|
31
|
+
version: 2.3.0
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '4'
|
@@ -72,20 +72,20 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '4'
|
75
|
+
version: '4.2'
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
78
|
+
version: '7'
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '4'
|
85
|
+
version: '4.2'
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '7'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: mime-types
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,26 +154,6 @@ dependencies:
|
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: 0.14.2
|
157
|
-
- !ruby/object:Gem::Dependency
|
158
|
-
name: builder
|
159
|
-
requirement: !ruby/object:Gem::Requirement
|
160
|
-
requirements:
|
161
|
-
- - ">="
|
162
|
-
- !ruby/object:Gem::Version
|
163
|
-
version: 3.1.0
|
164
|
-
- - "<"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '4'
|
167
|
-
type: :development
|
168
|
-
prerelease: false
|
169
|
-
version_requirements: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: 3.1.0
|
174
|
-
- - "<"
|
175
|
-
- !ruby/object:Gem::Version
|
176
|
-
version: '4'
|
177
157
|
- !ruby/object:Gem::Dependency
|
178
158
|
name: bundler
|
179
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,103 +169,81 @@ dependencies:
|
|
189
169
|
- !ruby/object:Gem::Version
|
190
170
|
version: 1.3.5
|
191
171
|
- !ruby/object:Gem::Dependency
|
192
|
-
name:
|
172
|
+
name: rubocop
|
193
173
|
requirement: !ruby/object:Gem::Requirement
|
194
174
|
requirements:
|
195
|
-
- - "
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: 3.4.1
|
198
|
-
type: :development
|
199
|
-
prerelease: false
|
200
|
-
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
requirements:
|
202
|
-
- - ">="
|
203
|
-
- !ruby/object:Gem::Version
|
204
|
-
version: 3.4.1
|
205
|
-
- !ruby/object:Gem::Dependency
|
206
|
-
name: database_cleaner
|
207
|
-
requirement: !ruby/object:Gem::Requirement
|
208
|
-
requirements:
|
209
|
-
- - ">="
|
210
|
-
- !ruby/object:Gem::Version
|
211
|
-
version: 1.0.0
|
212
|
-
type: :development
|
213
|
-
prerelease: false
|
214
|
-
version_requirements: !ruby/object:Gem::Requirement
|
215
|
-
requirements:
|
216
|
-
- - ">="
|
217
|
-
- !ruby/object:Gem::Version
|
218
|
-
version: 1.0.0
|
219
|
-
- !ruby/object:Gem::Dependency
|
220
|
-
name: factory_bot
|
221
|
-
requirement: !ruby/object:Gem::Requirement
|
222
|
-
requirements:
|
223
|
-
- - ">="
|
175
|
+
- - "~>"
|
224
176
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
177
|
+
version: 0.66.0
|
226
178
|
type: :development
|
227
179
|
prerelease: false
|
228
180
|
version_requirements: !ruby/object:Gem::Requirement
|
229
181
|
requirements:
|
230
|
-
- - "
|
182
|
+
- - "~>"
|
231
183
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
184
|
+
version: 0.66.0
|
233
185
|
- !ruby/object:Gem::Dependency
|
234
186
|
name: rake
|
235
187
|
requirement: !ruby/object:Gem::Requirement
|
236
188
|
requirements:
|
237
189
|
- - ">="
|
238
190
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
191
|
+
version: '10.3'
|
240
192
|
type: :development
|
241
193
|
prerelease: false
|
242
194
|
version_requirements: !ruby/object:Gem::Requirement
|
243
195
|
requirements:
|
244
196
|
- - ">="
|
245
197
|
- !ruby/object:Gem::Version
|
246
|
-
version:
|
198
|
+
version: '10.3'
|
247
199
|
- !ruby/object:Gem::Dependency
|
248
200
|
name: rspec
|
249
201
|
requirement: !ruby/object:Gem::Requirement
|
250
202
|
requirements:
|
251
203
|
- - "~>"
|
252
204
|
- !ruby/object:Gem::Version
|
253
|
-
version: '3.
|
205
|
+
version: '3.5'
|
254
206
|
type: :development
|
255
207
|
prerelease: false
|
256
208
|
version_requirements: !ruby/object:Gem::Requirement
|
257
209
|
requirements:
|
258
210
|
- - "~>"
|
259
211
|
- !ruby/object:Gem::Version
|
260
|
-
version: '3.
|
212
|
+
version: '3.5'
|
261
213
|
- !ruby/object:Gem::Dependency
|
262
214
|
name: rails
|
263
215
|
requirement: !ruby/object:Gem::Requirement
|
264
216
|
requirements:
|
265
217
|
- - ">="
|
266
218
|
- !ruby/object:Gem::Version
|
267
|
-
version: '
|
219
|
+
version: '4.2'
|
220
|
+
- - "<"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '7'
|
268
223
|
type: :development
|
269
224
|
prerelease: false
|
270
225
|
version_requirements: !ruby/object:Gem::Requirement
|
271
226
|
requirements:
|
272
227
|
- - ">="
|
273
228
|
- !ruby/object:Gem::Version
|
274
|
-
version: '
|
229
|
+
version: '4.2'
|
230
|
+
- - "<"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '7'
|
275
233
|
- !ruby/object:Gem::Dependency
|
276
234
|
name: sqlite3
|
277
235
|
requirement: !ruby/object:Gem::Requirement
|
278
236
|
requirements:
|
279
|
-
- - "
|
237
|
+
- - "~>"
|
280
238
|
- !ruby/object:Gem::Version
|
281
|
-
version:
|
239
|
+
version: 1.3.13
|
282
240
|
type: :development
|
283
241
|
prerelease: false
|
284
242
|
version_requirements: !ruby/object:Gem::Requirement
|
285
243
|
requirements:
|
286
|
-
- - "
|
244
|
+
- - "~>"
|
287
245
|
- !ruby/object:Gem::Version
|
288
|
-
version:
|
246
|
+
version: 1.3.13
|
289
247
|
- !ruby/object:Gem::Dependency
|
290
248
|
name: rdiscount
|
291
249
|
requirement: !ruby/object:Gem::Requirement
|
@@ -338,15 +296,18 @@ files:
|
|
338
296
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
339
297
|
- ".gitignore"
|
340
298
|
- ".rspec"
|
299
|
+
- ".rubocop.yml"
|
300
|
+
- ".rubocop_todo.yml"
|
341
301
|
- ".travis.yml"
|
342
302
|
- Appraisals
|
343
303
|
- CHANGELOG.md
|
344
304
|
- CONTRIBUTING.md
|
345
305
|
- Gemfile
|
346
|
-
- Gemfile.appraisal
|
347
306
|
- LICENSE
|
348
307
|
- README.md
|
349
308
|
- Rakefile
|
309
|
+
- bin/install_geckodriver.sh
|
310
|
+
- bin/install_webpacker.sh
|
350
311
|
- config/.gitignore
|
351
312
|
- config/cucumber.yml
|
352
313
|
- cucumber-rails.gemspec
|
@@ -378,12 +339,11 @@ files:
|
|
378
339
|
- features/support/fixtures/bundler-1.0.21.gem
|
379
340
|
- features/support/fixtures/bundler-1.1.rc.gem
|
380
341
|
- features/support/legacy_web_steps_support.rb
|
381
|
-
- gemfiles/rails_4_0.gemfile
|
382
|
-
- gemfiles/rails_4_1.gemfile
|
383
342
|
- gemfiles/rails_4_2.gemfile
|
384
343
|
- gemfiles/rails_5_0.gemfile
|
385
344
|
- gemfiles/rails_5_1.gemfile
|
386
345
|
- gemfiles/rails_5_2.gemfile
|
346
|
+
- gemfiles/rails_6_0.gemfile
|
387
347
|
- lib/cucumber/rails.rb
|
388
348
|
- lib/cucumber/rails/action_controller.rb
|
389
349
|
- lib/cucumber/rails/application.rb
|
@@ -435,7 +395,7 @@ rubyforge_project:
|
|
435
395
|
rubygems_version: 2.5.2.2
|
436
396
|
signing_key:
|
437
397
|
specification_version: 4
|
438
|
-
summary: cucumber-rails-1.
|
398
|
+
summary: cucumber-rails-1.7.0
|
439
399
|
test_files:
|
440
400
|
- features/allow_rescue.feature
|
441
401
|
- features/annotations.feature
|
data/Gemfile.appraisal
DELETED
data/gemfiles/rails_4_0.gemfile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "protected_attributes", "~> 1.0.3"
|
6
|
-
gem "rails", "~> 4.0.0"
|
7
|
-
gem "railties", "~> 4.0.0"
|
8
|
-
gem "capybara", "~> 2.0"
|
9
|
-
gem "selenium-webdriver", "~> 3.4.1"
|
10
|
-
gem "geckodriver-helper", "~> 0.0.5"
|
11
|
-
gem "turn", "~> 0.9.6"
|
12
|
-
gem "test-unit", "~> 3.1.5"
|
13
|
-
gem "rspec-rails", "~> 3.1.0"
|
14
|
-
gem "sass-rails", "~> 4.0.0"
|
15
|
-
gem "coffee-rails", "~> 4.0.0"
|
16
|
-
gem "jquery-rails", "~> 2.2.1"
|
17
|
-
gem "uglifier", "~> 2.1.0"
|
18
|
-
gem "sqlite3", "~> 1.3.7"
|
19
|
-
gem "database_cleaner", "~> 1.0.1"
|
20
|
-
gem "rake", "< 11.0"
|
21
|
-
|
22
|
-
gemspec path: "../"
|
data/gemfiles/rails_4_1.gemfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "protected_attributes", "~> 1.0.3"
|
6
|
-
gem "rails", "~> 4.1.0"
|
7
|
-
gem "railties", "~> 4.1.0"
|
8
|
-
gem "capybara", "~> 2.0"
|
9
|
-
gem "selenium-webdriver", "~> 3.4.1"
|
10
|
-
gem "geckodriver-helper", "~> 0.0.5"
|
11
|
-
gem "rspec-rails", "~> 3.1.0"
|
12
|
-
gem "sass-rails", "~> 4.0.0"
|
13
|
-
gem "coffee-rails", "~> 4.0.0"
|
14
|
-
gem "jquery-rails", "~> 2.2.1"
|
15
|
-
gem "uglifier", "~> 2.1.0"
|
16
|
-
gem "sqlite3", "~> 1.3.7"
|
17
|
-
gem "database_cleaner", "~> 1.0.1"
|
18
|
-
gem "rake", "< 11.0"
|
19
|
-
|
20
|
-
gemspec path: "../"
|