cucumber 5.3.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTING.md CHANGED
@@ -21,17 +21,29 @@ You can chat with the core team on https://gitter.im/cucumber/contributors. We t
21
21
 
22
22
  ## Installing your own gems
23
23
 
24
- A `Gemfile.local`-file can be used to have your own gems installed to support
25
- your normal development workflow.
24
+ A `Gemfile.local`-file can be used to have your own gems installed to support your normal development workflow.
25
+ Execute `bundle config set --local gemfile Gemfile.local` to use it per default.
26
26
 
27
27
  Example:
28
28
 
29
29
  ~~~ruby
30
- gem 'pry'
31
- gem 'pry-byebug'
32
- gem 'byebug'
30
+ # Include the regular Gemfile
31
+ eval File.read('Gemfile')
32
+
33
+ group :development do
34
+ gem 'byebug'
35
+ gem 'debase', require: false
36
+ gem 'ruby-debug-ide', require: false
37
+ gem 'pry'
38
+ gem 'pry-byebug'
39
+ end
33
40
  ~~~
34
41
 
42
+ ## Using Visual Studio Code?
43
+
44
+ Sample for launch.json configuration is available in
45
+ [docs/vscode-example-launch-configuration.md](https://github.com/cucumber/cucumber-ruby/blob/master/docs/vscode-example-launch-configuration.md)
46
+
35
47
  ## Note on Patches/Pull Requests
36
48
 
37
49
  * Fork the project. Make a branch for your change.
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  [![OpenCollective](https://opencollective.com/cucumber/backers/badge.svg)](https://opencollective.com/cucumber)
2
2
  [![OpenCollective](https://opencollective.com/cucumber/sponsors/badge.svg)](https://opencollective.com/cucumber)
3
-
3
+ [![pull requests](https://oselvar.com/api/badge?label=pull%20requests&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby%2FpullRequests.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby)
4
+ [![issues](https://oselvar.com/api/badge?label=issues&csvUrl=https%3A%2F%2Fraw.githubusercontent.com%2Fcucumber%2Foselvar-github-metrics%2Fmain%2Fdata%2Fcucumber%2Fcucumber-ruby%2Fissues.csv)](https://oselvar.com/github/cucumber/oselvar-github-metrics/main/cucumber/cucumber-ruby)
4
5
  [![CircleCI](https://circleci.com/gh/cucumber/cucumber-ruby.svg?style=svg)](https://circleci.com/gh/cucumber/cucumber-ruby)
5
-
6
6
  [![Code Climate](https://codeclimate.com/github/cucumber/cucumber-ruby.svg)](https://codeclimate.com/github/cucumber/cucumber-ruby)
7
7
  [![Coverage Status](https://coveralls.io/repos/cucumber/cucumber-ruby/badge.svg?branch=master)](https://coveralls.io/r/cucumber/cucumber-ruby?branch=master)
8
8
 
@@ -24,6 +24,8 @@ Where to get more info:
24
24
  See [CONTRIBUTING.md](CONTRIBUTING.md) for info on contributing to Cucumber.
25
25
 
26
26
  ## Supported platforms
27
+ * Ruby 3.0
28
+ * Ruby 2.7
27
29
  * Ruby 2.6
28
30
  * Ruby 2.5
29
31
  * Ruby 2.4
@@ -15,6 +15,7 @@ module Cucumber
15
15
  test/unit
16
16
  .gem/ruby
17
17
  bin/bundle
18
+ rdebug-ide
18
19
  ]
19
20
 
20
21
  @backtrace_filters << RbConfig::CONFIG['rubyarchdir'] if RbConfig::CONFIG['rubyarchdir']
@@ -94,10 +94,7 @@ module Cucumber
94
94
  test_step_output << src
95
95
  return
96
96
  end
97
- if File.file?(src)
98
- content = File.open(src, 'rb', &:read)
99
- data = encode64(content)
100
- elsif mime_type =~ /;base64$/
97
+ if mime_type =~ /;base64$/
101
98
  mime_type = mime_type[0..-8]
102
99
  data = src
103
100
  else
@@ -3,6 +3,7 @@
3
3
  require 'cucumber/gherkin/formatter/ansi_escapes'
4
4
  require 'cucumber/core/test/data_table'
5
5
  require 'cucumber/deprecate'
6
+ require 'mime/types'
6
7
 
7
8
  module Cucumber
8
9
  module Glue
@@ -72,47 +73,28 @@ module Cucumber
72
73
  MultilineArgument::DataTable.from(text_or_table)
73
74
  end
74
75
 
75
- # Print a message to the output.
76
- #
77
- # @note Cucumber might surprise you with the behaviour of this method. Instead
78
- # of sending the output directly to STDOUT, Cucumber will intercept and cache
79
- # the message until the current step has finished, and then display it.
80
- #
81
- # If you'd prefer to see the message immediately, call {Kernel.puts} instead.
82
- def puts(*messages)
83
- Cucumber.deprecate(
84
- 'Messages emitted with "puts" will no longer be caught by Cucumber ' \
85
- 'and sent to the formatter. If you want message to be in the formatted output, ' \
86
- "please use log(message) instead.\n" \
87
- 'If you simply want it in the console, '\
88
- 'keep using "puts" (or Kernel.puts to avoid this message)',
89
- 'puts(message)',
90
- '6.0.0'
91
- )
92
- messages.each { |message| log(message.to_s) }
93
- end
94
-
95
76
  # Pause the tests and ask the operator for input
96
77
  def ask(question, timeout_seconds = 60)
97
78
  super
98
79
  end
99
80
 
100
- # Embed an image in the output
101
- def embed(file, mime_type, _label = 'Screenshot')
102
- Cucumber.deprecate(
103
- 'Please use attach(file, media_type) instead',
104
- 'embed(file, mime_type, label)',
105
- '6.0.0'
106
- )
107
- attach(file, mime_type)
108
- end
109
-
110
81
  def log(*messages)
111
82
  messages.each { |message| attach(message.to_s.dup, 'text/x.cucumber.log+plain') }
112
83
  end
113
84
 
114
- def attach(file, media_type)
115
- super
85
+ # Attach a file to the output
86
+ # @param file [string|io] the file to attach.
87
+ # It can be a string containing the file content itself,
88
+ # the file path, or an IO ready to be read.
89
+ # @param media_type [string] the media type. If file is a valid path,
90
+ # media_type can be ommitted, it will then be inferred from the file name.
91
+ def attach(file, media_type = nil)
92
+ return super unless File.file?(file)
93
+
94
+ content = File.read(file, mode: 'rb')
95
+ media_type = MIME::Types.type_for(file).first if media_type.nil?
96
+
97
+ super(content, media_type.to_s)
116
98
  end
117
99
 
118
100
  # Mark the matched step as pending.
@@ -91,7 +91,7 @@ module Cucumber
91
91
  step_definition
92
92
  rescue Cucumber::CucumberExpressions::UndefinedParameterTypeError => e
93
93
  # TODO: add a way to extract the parameter type directly from the error.
94
- type_name = e.message.match(/^Undefined parameter type \{(.*)\}$/)[1]
94
+ type_name = e.message.match(/^Undefined parameter type ['|\{](.*)['|\}].?$/)[1]
95
95
 
96
96
  @configuration.notify :undefined_parameter_type, type_name, string_or_regexp
97
97
  end
data/lib/cucumber/version CHANGED
@@ -1 +1 @@
1
- 5.3.0
1
+ 6.0.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: 6.0.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-04-14 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: '9.0'
42
42
  - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: 8.0.1
44
+ version: 9.0.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: '9.0'
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 8.0.1
54
+ version: 9.0.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: '4.0'
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 2.0.2
64
+ version: 4.0.0
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: '4.0'
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 2.0.2
74
+ version: 4.0.0
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: '12.1'
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 10.3.0
84
+ version: 12.1.1
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: '12.1'
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: 10.3.0
94
+ version: 12.1.1
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: '18.1'
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 15.0.2
104
+ version: 18.1.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: '18.1'
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: 15.0.2
114
+ version: 18.1.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: '13.0'
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 9.0.0
124
+ version: 13.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: '13.0'
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
- version: 9.0.0
134
+ version: 13.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: '15.0'
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 13.1.0
144
+ version: 15.0.0
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: '15.0'
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 13.1.0
154
+ version: 15.0.0
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: '5.0'
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: 4.0.1
164
+ version: 5.0.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: '5.0'
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: 4.0.1
174
+ version: 5.0.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.11'
242
262
  - - ">="
243
263
  - !ruby/object:Gem::Version
244
- version: 1.10.10
264
+ version: 1.11.3
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.11'
252
272
  - - ">="
253
273
  - !ruby/object:Gem::Version
254
- version: 1.10.10
274
+ version: 1.11.3
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.3
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.3
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.0
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.0
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.20'
402
422
  - - ">="
403
423
  - !ruby/object:Gem::Version
404
- version: 4.19.0
424
+ version: 4.20.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.20'
412
432
  - - ">="
413
433
  - !ruby/object:Gem::Version
414
- version: 4.19.0
434
+ version: 4.20.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:
@@ -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-6.0.0
646
666
  test_files: []