cucumber 5.3.0 → 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,12 +3,14 @@
3
3
  require 'fileutils'
4
4
  require 'cucumber/configuration'
5
5
  require 'cucumber/create_meta'
6
+ require 'cucumber/deprecate'
6
7
  require 'cucumber/load_path'
7
8
  require 'cucumber/formatter/duration'
8
9
  require 'cucumber/file_specs'
9
10
  require 'cucumber/filters'
10
11
  require 'cucumber/formatter/fanout'
11
12
  require 'cucumber/gherkin/i18n'
13
+ require 'cucumber/glue/registry_wrapper'
12
14
  require 'cucumber/step_match_search'
13
15
  require 'cucumber/messages'
14
16
  require 'sys/uname'
@@ -70,14 +72,18 @@ module Cucumber
70
72
  )
71
73
 
72
74
  load_step_definitions
73
- install_wire_plugin
74
75
  fire_after_configuration_hook
76
+ fire_install_plugin_hook
77
+ install_wire_plugin
78
+ fire_before_all_hook unless dry_run?
75
79
  # TODO: can we remove this state?
76
80
  self.visitor = report
77
81
 
78
82
  receiver = Test::Runner.new(@configuration.event_bus)
79
83
  compile features, receiver, filters, @configuration.event_bus
80
84
  @configuration.notify :test_run_finished
85
+
86
+ fire_after_all_hook unless dry_run?
81
87
  end
82
88
 
83
89
  def features_paths
@@ -112,6 +118,18 @@ module Cucumber
112
118
  @support_code.fire_hook(:after_configuration, @configuration)
113
119
  end
114
120
 
121
+ def fire_install_plugin_hook #:nodoc:
122
+ @support_code.fire_hook(:install_plugin, @configuration, registry_wrapper)
123
+ end
124
+
125
+ def fire_before_all_hook #:nodoc:
126
+ @support_code.fire_hook(:before_all)
127
+ end
128
+
129
+ def fire_after_all_hook #:nodoc:
130
+ @support_code.fire_hook(:after_all)
131
+ end
132
+
115
133
  require 'cucumber/core/gherkin/document'
116
134
  def features
117
135
  @features ||= feature_files.map do |path|
@@ -235,12 +253,17 @@ module Cucumber
235
253
  step_match_search = StepMatchSearch.new(@support_code.registry.method(:step_matches), @configuration)
236
254
  filters << Filters::ActivateSteps.new(step_match_search, @configuration)
237
255
  @configuration.filters.each { |filter| filters << filter }
256
+
238
257
  unless configuration.dry_run?
239
258
  filters << Filters::ApplyAfterStepHooks.new(@support_code)
240
259
  filters << Filters::ApplyBeforeHooks.new(@support_code)
241
260
  filters << Filters::ApplyAfterHooks.new(@support_code)
242
261
  filters << Filters::ApplyAroundHooks.new(@support_code)
243
- filters << Filters::BroadcastTestCaseReadyEvent.new(@configuration)
262
+ end
263
+
264
+ filters << Filters::BroadcastTestCaseReadyEvent.new(@configuration)
265
+
266
+ unless configuration.dry_run?
244
267
  filters << Filters::BroadcastTestRunStartedEvent.new(@configuration)
245
268
  filters << Filters::Quit.new
246
269
  filters << Filters::Retry.new(@configuration)
@@ -256,7 +279,19 @@ module Cucumber
256
279
  end
257
280
 
258
281
  def install_wire_plugin
259
- Cucumber::Wire::Plugin.new(@configuration, @support_code.registry).install if @configuration.all_files_to_load.any? { |f| f =~ /\.wire$/ }
282
+ return if Cucumber::Wire::Plugin.installed?
283
+ return unless @configuration.all_files_to_load.any? { |f| f =~ /\.wire$/ }
284
+
285
+ Cucumber::Wire::Plugin.new(@configuration, registry_wrapper).install
286
+ Cucumber.deprecate(
287
+ 'See https://github.com/cucumber/cucumber-ruby/blob/main/UPGRADING.md#upgrading-to-710 for more info',
288
+ ' built-in usage of the wire protocol',
289
+ '8.0.0'
290
+ )
291
+ end
292
+
293
+ def registry_wrapper
294
+ Cucumber::Glue::RegistryWrapper.new(@support_code.registry)
260
295
  end
261
296
 
262
297
  def log
@@ -28,7 +28,7 @@ module Cucumber
28
28
  end
29
29
 
30
30
  def invoke(multiline_arg)
31
- all_args = deep_clone_args
31
+ all_args = args
32
32
  multiline_arg.append_to(all_args)
33
33
  @step_definition.invoke(all_args)
34
34
  end
@@ -93,12 +93,6 @@ module Cucumber
93
93
  def inspect #:nodoc:
94
94
  "#<#{self.class}: #{location}>"
95
95
  end
96
-
97
- private
98
-
99
- def deep_clone_args
100
- Marshal.load(Marshal.dump(args))
101
- end
102
96
  end
103
97
 
104
98
  class SkippingStepMatch
data/lib/cucumber/version CHANGED
@@ -1 +1 @@
1
- 5.3.0
1
+ 7.1.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 7.1.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: 2021-01-28 00:00:00.000000000 Z
13
+ date: 2021-10-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -38,140 +38,140 @@ dependencies:
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '8.0'
41
+ version: '10.1'
42
42
  - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: 8.0.1
44
+ version: 10.1.0
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - "~>"
50
50
  - !ruby/object:Gem::Version
51
- version: '8.0'
51
+ version: '10.1'
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 8.0.1
54
+ version: 10.1.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cucumber-create-meta
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
61
+ version: '6.0'
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 2.0.2
64
+ version: 6.0.1
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: '2.0'
71
+ version: '6.0'
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 2.0.2
74
+ version: 6.0.1
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: cucumber-cucumber-expressions
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '10.3'
81
+ version: '14.0'
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 10.3.0
84
+ version: 14.0.0
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '10.3'
91
+ version: '14.0'
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: 10.3.0
94
+ version: 14.0.0
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: cucumber-gherkin
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: '15.0'
101
+ version: '22.0'
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 15.0.2
104
+ version: 22.0.0
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '15.0'
111
+ version: '22.0'
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: 15.0.2
114
+ version: 22.0.0
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: cucumber-html-formatter
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: '9.0'
121
+ version: '17.0'
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 9.0.0
124
+ version: 17.0.0
125
125
  type: :runtime
126
126
  prerelease: false
127
127
  version_requirements: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '9.0'
131
+ version: '17.0'
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
- version: 9.0.0
134
+ version: 17.0.0
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: cucumber-messages
137
137
  requirement: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: '13.1'
141
+ version: '17.1'
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 13.1.0
144
+ version: 17.1.1
145
145
  type: :runtime
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '13.1'
151
+ version: '17.1'
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 13.1.0
154
+ version: 17.1.1
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: cucumber-wire
157
157
  requirement: !ruby/object:Gem::Requirement
158
158
  requirements:
159
159
  - - "~>"
160
160
  - !ruby/object:Gem::Version
161
- version: '4.0'
161
+ version: '6.2'
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: 4.0.1
164
+ version: 6.2.0
165
165
  type: :runtime
166
166
  prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '4.0'
171
+ version: '6.2'
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: 4.0.1
174
+ version: 6.2.0
175
175
  - !ruby/object:Gem::Dependency
176
176
  name: diff-lcs
177
177
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +192,26 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.4.4
195
+ - !ruby/object:Gem::Dependency
196
+ name: mime-types
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '3.3'
202
+ - - ">="
203
+ - !ruby/object:Gem::Version
204
+ version: 3.3.1
205
+ type: :runtime
206
+ prerelease: false
207
+ version_requirements: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - "~>"
210
+ - !ruby/object:Gem::Version
211
+ version: '3.3'
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: 3.3.1
195
215
  - !ruby/object:Gem::Dependency
196
216
  name: multi_test
197
217
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +241,7 @@ dependencies:
221
241
  version: '1.2'
222
242
  - - ">="
223
243
  - !ruby/object:Gem::Version
224
- version: 1.2.1
244
+ version: 1.2.2
225
245
  type: :runtime
226
246
  prerelease: false
227
247
  version_requirements: !ruby/object:Gem::Requirement
@@ -231,47 +251,47 @@ dependencies:
231
251
  version: '1.2'
232
252
  - - ">="
233
253
  - !ruby/object:Gem::Version
234
- version: 1.2.1
254
+ version: 1.2.2
235
255
  - !ruby/object:Gem::Dependency
236
256
  name: nokogiri
237
257
  requirement: !ruby/object:Gem::Requirement
238
258
  requirements:
239
259
  - - "~>"
240
260
  - !ruby/object:Gem::Version
241
- version: '1.10'
261
+ version: '1.12'
242
262
  - - ">="
243
263
  - !ruby/object:Gem::Version
244
- version: 1.10.10
264
+ version: 1.12.5
245
265
  type: :development
246
266
  prerelease: false
247
267
  version_requirements: !ruby/object:Gem::Requirement
248
268
  requirements:
249
269
  - - "~>"
250
270
  - !ruby/object:Gem::Version
251
- version: '1.10'
271
+ version: '1.12'
252
272
  - - ">="
253
273
  - !ruby/object:Gem::Version
254
- version: 1.10.10
274
+ version: 1.12.5
255
275
  - !ruby/object:Gem::Dependency
256
276
  name: pry
257
277
  requirement: !ruby/object:Gem::Requirement
258
278
  requirements:
259
279
  - - "~>"
260
280
  - !ruby/object:Gem::Version
261
- version: '0.13'
281
+ version: '0.14'
262
282
  - - ">="
263
283
  - !ruby/object:Gem::Version
264
- version: 0.13.1
284
+ version: 0.14.1
265
285
  type: :development
266
286
  prerelease: false
267
287
  version_requirements: !ruby/object:Gem::Requirement
268
288
  requirements:
269
289
  - - "~>"
270
290
  - !ruby/object:Gem::Version
271
- version: '0.13'
291
+ version: '0.14'
272
292
  - - ">="
273
293
  - !ruby/object:Gem::Version
274
- version: 0.13.1
294
+ version: 0.14.1
275
295
  - !ruby/object:Gem::Dependency
276
296
  name: rake
277
297
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +301,7 @@ dependencies:
281
301
  version: '13.0'
282
302
  - - ">="
283
303
  - !ruby/object:Gem::Version
284
- version: 13.0.1
304
+ version: 13.0.6
285
305
  type: :development
286
306
  prerelease: false
287
307
  version_requirements: !ruby/object:Gem::Requirement
@@ -291,47 +311,47 @@ dependencies:
291
311
  version: '13.0'
292
312
  - - ">="
293
313
  - !ruby/object:Gem::Version
294
- version: 13.0.1
314
+ version: 13.0.6
295
315
  - !ruby/object:Gem::Dependency
296
316
  name: rspec
297
317
  requirement: !ruby/object:Gem::Requirement
298
318
  requirements:
299
319
  - - "~>"
300
320
  - !ruby/object:Gem::Version
301
- version: '3.9'
321
+ version: '3.10'
302
322
  - - ">="
303
323
  - !ruby/object:Gem::Version
304
- version: 3.9.0
324
+ version: 3.10.0
305
325
  type: :development
306
326
  prerelease: false
307
327
  version_requirements: !ruby/object:Gem::Requirement
308
328
  requirements:
309
329
  - - "~>"
310
330
  - !ruby/object:Gem::Version
311
- version: '3.9'
331
+ version: '3.10'
312
332
  - - ">="
313
333
  - !ruby/object:Gem::Version
314
- version: 3.9.0
334
+ version: 3.10.0
315
335
  - !ruby/object:Gem::Dependency
316
336
  name: simplecov
317
337
  requirement: !ruby/object:Gem::Requirement
318
338
  requirements:
319
339
  - - "~>"
320
340
  - !ruby/object:Gem::Version
321
- version: '0.19'
341
+ version: '0.21'
322
342
  - - ">="
323
343
  - !ruby/object:Gem::Version
324
- version: 0.19.0
344
+ version: 0.21.2
325
345
  type: :development
326
346
  prerelease: false
327
347
  version_requirements: !ruby/object:Gem::Requirement
328
348
  requirements:
329
349
  - - "~>"
330
350
  - !ruby/object:Gem::Version
331
- version: '0.19'
351
+ version: '0.21'
332
352
  - - ">="
333
353
  - !ruby/object:Gem::Version
334
- version: 0.19.0
354
+ version: 0.21.2
335
355
  - !ruby/object:Gem::Dependency
336
356
  name: syntax
337
357
  requirement: !ruby/object:Gem::Requirement
@@ -358,60 +378,60 @@ dependencies:
358
378
  requirements:
359
379
  - - "~>"
360
380
  - !ruby/object:Gem::Version
361
- version: '3.3'
381
+ version: '3.4'
362
382
  - - ">="
363
383
  - !ruby/object:Gem::Version
364
- version: 3.3.6
384
+ version: 3.4.8
365
385
  type: :development
366
386
  prerelease: false
367
387
  version_requirements: !ruby/object:Gem::Requirement
368
388
  requirements:
369
389
  - - "~>"
370
390
  - !ruby/object:Gem::Version
371
- version: '3.3'
391
+ version: '3.4'
372
392
  - - ">="
373
393
  - !ruby/object:Gem::Version
374
- version: 3.3.6
394
+ version: 3.4.8
375
395
  - !ruby/object:Gem::Dependency
376
396
  name: webrick
377
397
  requirement: !ruby/object:Gem::Requirement
378
398
  requirements:
379
399
  - - "~>"
380
400
  - !ruby/object:Gem::Version
381
- version: '1.6'
401
+ version: '1.7'
382
402
  - - ">="
383
403
  - !ruby/object:Gem::Version
384
- version: 1.6.1
404
+ version: 1.7.0
385
405
  type: :development
386
406
  prerelease: false
387
407
  version_requirements: !ruby/object:Gem::Requirement
388
408
  requirements:
389
409
  - - "~>"
390
410
  - !ruby/object:Gem::Version
391
- version: '1.6'
411
+ version: '1.7'
392
412
  - - ">="
393
413
  - !ruby/object:Gem::Version
394
- version: 1.6.1
414
+ version: 1.7.0
395
415
  - !ruby/object:Gem::Dependency
396
416
  name: octokit
397
417
  requirement: !ruby/object:Gem::Requirement
398
418
  requirements:
399
419
  - - "~>"
400
420
  - !ruby/object:Gem::Version
401
- version: '4.19'
421
+ version: '4.21'
402
422
  - - ">="
403
423
  - !ruby/object:Gem::Version
404
- version: 4.19.0
424
+ version: 4.21.0
405
425
  type: :development
406
426
  prerelease: false
407
427
  version_requirements: !ruby/object:Gem::Requirement
408
428
  requirements:
409
429
  - - "~>"
410
430
  - !ruby/object:Gem::Version
411
- version: '4.19'
431
+ version: '4.21'
412
432
  - - ">="
413
433
  - !ruby/object:Gem::Version
414
- version: 4.19.0
434
+ version: 4.21.0
415
435
  - !ruby/object:Gem::Dependency
416
436
  name: rack-test
417
437
  requirement: !ruby/object:Gem::Requirement
@@ -458,20 +478,20 @@ dependencies:
458
478
  requirements:
459
479
  - - "~>"
460
480
  - !ruby/object:Gem::Version
461
- version: '3.33'
481
+ version: '3.35'
462
482
  - - ">="
463
483
  - !ruby/object:Gem::Version
464
- version: 3.33.0
484
+ version: 3.35.3
465
485
  type: :development
466
486
  prerelease: false
467
487
  version_requirements: !ruby/object:Gem::Requirement
468
488
  requirements:
469
489
  - - "~>"
470
490
  - !ruby/object:Gem::Version
471
- version: '3.33'
491
+ version: '3.35'
472
492
  - - ">="
473
493
  - !ruby/object:Gem::Version
474
- version: 3.33.0
494
+ version: 3.35.3
475
495
  description: Behaviour Driven Development with elegance and joy
476
496
  email: cukes@googlegroups.com
477
497
  executables:
@@ -500,7 +520,6 @@ files:
500
520
  - lib/cucumber/cli/rerun_file.rb
501
521
  - lib/cucumber/configuration.rb
502
522
  - lib/cucumber/constantize.rb
503
- - lib/cucumber/core_ext/string.rb
504
523
  - lib/cucumber/deprecate.rb
505
524
  - lib/cucumber/encoding.rb
506
525
  - lib/cucumber/errors.rb
@@ -583,6 +602,7 @@ files:
583
602
  - lib/cucumber/glue/invoke_in_world.rb
584
603
  - lib/cucumber/glue/proto_world.rb
585
604
  - lib/cucumber/glue/registry_and_more.rb
605
+ - lib/cucumber/glue/registry_wrapper.rb
586
606
  - lib/cucumber/glue/snippet.rb
587
607
  - lib/cucumber/glue/step_definition.rb
588
608
  - lib/cucumber/glue/world_factory.rb
@@ -619,7 +639,7 @@ licenses:
619
639
  - MIT
620
640
  metadata:
621
641
  bug_tracker_uri: https://github.com/cucumber/cucumber-ruby/issues
622
- changelog_uri: https://github.com/cucumber/cucumber-ruby/blob/master/CHANGELOG.md
642
+ changelog_uri: https://github.com/cucumber/cucumber-ruby/blob/main/CHANGELOG.md
623
643
  documentation_uri: https://www.rubydoc.info/github/cucumber/cucumber-ruby/
624
644
  mailing_list_uri: https://groups.google.com/forum/#!forum/cukes
625
645
  source_code_uri: https://github.com/cucumber/cucumber-ruby
@@ -642,5 +662,5 @@ requirements: []
642
662
  rubygems_version: 3.1.2
643
663
  signing_key:
644
664
  specification_version: 4
645
- summary: cucumber-5.3.0
665
+ summary: cucumber-7.1.0
646
666
  test_files: []
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class String #:nodoc:
4
- def indent(n)
5
- if n >= 0
6
- gsub(/^/, ' ' * n)
7
- else
8
- gsub(/^ {0,#{-n}}/, '')
9
- end
10
- end
11
- end