cucumber 5.1.3 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e1477c70b949106c7f0a7f30f5b387cfa8a86ed41180d791d3bed792dde0c38
4
- data.tar.gz: d0aa04c7c51cd100d2419684f4b7e8c4d245a68567588fe6cf5e1e4c2a301ac6
3
+ metadata.gz: 36830fb7cfa9895488ea7f11bb33f6267c94328b8b3a08da75749d26f4047479
4
+ data.tar.gz: 725299585226f1af48d00c12af192844af884ec49d44e6966c22a8a607bd9fa8
5
5
  SHA512:
6
- metadata.gz: 4d32e30dca15261c3f1aca9e0393c7a75ef2d044cae7bd209861a0d32580dc3ba59fc334269a6fe66fd29c792041552806c2fb3670670586c3cf27bf969795aa
7
- data.tar.gz: a17f70e4b4731c13b700be8e2ff3a9c8e97e8075531938a351d9a9df711fbbd1a1911f88903953e9c387079767b3efb9cfe647a0e3c658aca7be3ac9a70b444d
6
+ metadata.gz: 807a72bba0f0a30c266b68afd4866ead55178f2ee2f72bd5a86331445f6de62bf320ebd2a848c05dd6c906c52aa6d082c1b5f241a65cc00e5ff6df14ffe3d6b8
7
+ data.tar.gz: d11cfaaa57bf35ffbbf54273317825179beb5db3ab106feacb30c7d0860ca6aeacf90404774ee92eafba100db00b5a25428ca7f3447262b0f05687b57d03aeae
@@ -10,7 +10,7 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
10
10
 
11
11
  ----
12
12
 
13
- ## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.3...master)
13
+ ## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.2.0...master)
14
14
 
15
15
  ### Added
16
16
 
@@ -24,7 +24,13 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
24
24
 
25
25
  ### Security fixes
26
26
 
27
- ## [In GIT](https://github.com/cucumber/cucumber-ruby/compare/v5.1.2...v5.1.3)
27
+ ## [5.2.0](https://github.com/cucumber/cucumber-ruby/compare/v5.1.3...v5.2.0)
28
+
29
+ ### Changed
30
+
31
+ * `--publish` uses the response provided by the server as the banner [#1472](https://github.com/cucumber/cucumber-ruby/issues/1472)
32
+
33
+ ## [5.1.3](https://github.com/cucumber/cucumber-ruby/compare/v5.1.2...v5.1.3)
28
34
 
29
35
  ### Fixed
30
36
 
@@ -335,7 +335,7 @@ Specify SEED to reproduce the shuffling from a previous run.
335
335
  'option is specified; all loading becomes explicit.',
336
336
  'Files in directories named "support" are still always',
337
337
  'loaded first when their parent directories are',
338
- 'required or if the "support" directoires themselves are',
338
+ 'required or if the "support" directories themselves are',
339
339
  'explicitly required.',
340
340
  'This option can be specified multiple times.'
341
341
  ]
@@ -8,7 +8,7 @@ module Cucumber
8
8
  include Io
9
9
 
10
10
  def initialize(config)
11
- @io = ensure_io(config.out_stream)
11
+ @io = ensure_io(config.out_stream, config.error_stream)
12
12
  @html_formatter = Cucumber::HTMLFormatter::Formatter.new(@io)
13
13
  @html_formatter.write_pre_message
14
14
 
@@ -72,10 +72,11 @@ module Cucumber
72
72
  end
73
73
 
74
74
  def close
75
- resource_uri = send_content(@uri, @method, @headers)
76
-
77
- @reporter.report(resource_uri)
75
+ response = send_content(@uri, @method, @headers)
76
+ @reporter.report(response.body)
78
77
  @write_io.close
78
+ return if response.is_a?(Net::HTTPSuccess) || response.is_a?(Net::HTTPRedirection)
79
+ raise StandardError, "request to #{uri} failed with status #{response.code}"
79
80
  end
80
81
 
81
82
  def write(data)
@@ -117,16 +118,11 @@ module Cucumber
117
118
 
118
119
  case response
119
120
  when Net::HTTPAccepted
120
- return uri unless response['Location']
121
-
122
- send_content(URI(response['Location']), 'PUT', {}, attempt - 1)
123
- when Net::HTTPSuccess
124
- uri
121
+ send_content(URI(response['Location']), 'PUT', {}, attempt - 1) if response['Location']
125
122
  when Net::HTTPRedirection
126
123
  send_content(URI(response['Location']), method, headers, attempt - 1)
127
- else
128
- raise StandardError, "request to #{uri} failed with status #{response.code}"
129
124
  end
125
+ response
130
126
  end
131
127
 
132
128
  def build_request(uri, method, headers)
@@ -9,13 +9,13 @@ module Cucumber
9
9
  module Io
10
10
  module_function
11
11
 
12
- def ensure_io(path_or_url_or_io)
12
+ def ensure_io(path_or_url_or_io, error_stream)
13
13
  return nil if path_or_url_or_io.nil?
14
14
  return path_or_url_or_io if io?(path_or_url_or_io)
15
15
 
16
16
  io = if url?(path_or_url_or_io)
17
17
  url = path_or_url_or_io
18
- reporter = url.start_with?(Cucumber::Cli::Options::CUCUMBER_PUBLISH_URL) ? URLReporter.new($stderr) : NoReporter.new
18
+ reporter = url.start_with?(Cucumber::Cli::Options::CUCUMBER_PUBLISH_URL) ? URLReporter.new(error_stream) : NoReporter.new
19
19
  HTTPIO.open(url, nil, reporter)
20
20
  else
21
21
  File.open(path_or_url_or_io, Cucumber.file_mode('w'))
@@ -64,7 +64,7 @@ module Cucumber
64
64
  raise "You *must* specify --out FILE for the #{name} formatter" unless String == path.class
65
65
  raise "I can't write #{name} to a directory - it has to be a file" if File.directory?(path)
66
66
  raise "I can't write #{name} to a file in the non-existing directory #{File.dirname(path)}" unless File.directory?(File.dirname(path))
67
- ensure_io(path)
67
+ ensure_io(path, nil)
68
68
  end
69
69
 
70
70
  def ensure_dir(path, name)
@@ -22,7 +22,7 @@ module Cucumber
22
22
  '6.0.0'
23
23
  )
24
24
 
25
- @io = ensure_io(config.out_stream)
25
+ @io = ensure_io(config.out_stream, config.error_stream)
26
26
  @ast_lookup = AstLookup.new(config)
27
27
  @feature_hashes = []
28
28
  @step_or_hook_hash = {}
@@ -10,7 +10,7 @@ module Cucumber
10
10
  include Io
11
11
 
12
12
  def initialize(config)
13
- @io = ensure_io(config.out_stream)
13
+ @io = ensure_io(config.out_stream, config.error_stream)
14
14
  super(config)
15
15
  end
16
16
 
@@ -32,7 +32,7 @@ module Cucumber
32
32
  private :in_scenario_outline, :print_background_steps
33
33
 
34
34
  def initialize(config)
35
- @io = ensure_io(config.out_stream)
35
+ @io = ensure_io(config.out_stream, config.error_stream)
36
36
  @config = config
37
37
  @options = config.to_hash
38
38
  @snippets_input = []
@@ -19,7 +19,7 @@ module Cucumber
19
19
 
20
20
  def initialize(config)
21
21
  @config = config
22
- @io = ensure_io(config.out_stream)
22
+ @io = ensure_io(config.out_stream, config.error_stream)
23
23
  @snippets_input = []
24
24
  @undefined_parameter_types = []
25
25
  @total_duration = 0
@@ -8,7 +8,7 @@ module Cucumber
8
8
  include Formatter::Io
9
9
 
10
10
  def initialize(config)
11
- @io = ensure_io(config.out_stream)
11
+ @io = ensure_io(config.out_stream, config.error_stream)
12
12
  @config = config
13
13
  @failures = {}
14
14
  config.on_event :test_case_finished do |event|
@@ -5,7 +5,7 @@ module Cucumber
5
5
  # The formatter used for <tt>--format steps</tt>
6
6
  class Steps
7
7
  def initialize(runtime, path_or_io, options)
8
- @io = ensure_io(path_or_io)
8
+ @io = ensure_io(path_or_io, nil)
9
9
  @options = options
10
10
  @step_definition_files = collect_steps(runtime)
11
11
  end
@@ -16,7 +16,7 @@ module Cucumber
16
16
 
17
17
  def initialize(config)
18
18
  @config = config
19
- @io = ensure_io(config.out_stream)
19
+ @io = ensure_io(config.out_stream, config.error_stream)
20
20
  @ast_lookup = AstLookup.new(config)
21
21
  @counts = ConsoleCounts.new(@config)
22
22
  @issues = ConsoleIssues.new(@config, @ast_lookup)
@@ -1,30 +1,17 @@
1
- require 'cucumber/term/banner'
2
-
3
1
  module Cucumber
4
2
  module Formatter
5
3
  class URLReporter
6
- include Term::Banner
7
-
8
4
  def initialize(io)
9
5
  @io = io
10
6
  end
11
7
 
12
- def report(url)
13
- uri = URI(url)
14
- display_banner(
15
- [
16
- 'View your Cucumber Report at:',
17
- [["https://reports.cucumber.io#{uri.path}", :cyan, :bold, :underline]],
18
- '',
19
- [['This report will self-destruct in 24h unless it is claimed or deleted.', :green, :bold]]
20
- ],
21
- @io
22
- )
8
+ def report(banner)
9
+ @io.puts(banner)
23
10
  end
24
11
  end
25
12
 
26
13
  class NoReporter
27
- def report(url); end
14
+ def report(banner); end
28
15
  end
29
16
  end
30
17
  end
@@ -1 +1 @@
1
- 5.1.3
1
+ 5.2.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.1.3
4
+ version: 5.2.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: 2020-10-07 00:00:00.000000000 Z
13
+ date: 2020-10-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder
@@ -398,20 +398,20 @@ dependencies:
398
398
  requirements:
399
399
  - - "~>"
400
400
  - !ruby/object:Gem::Version
401
- version: '4.18'
401
+ version: '4.19'
402
402
  - - ">="
403
403
  - !ruby/object:Gem::Version
404
- version: 4.18.0
404
+ version: 4.19.0
405
405
  type: :development
406
406
  prerelease: false
407
407
  version_requirements: !ruby/object:Gem::Requirement
408
408
  requirements:
409
409
  - - "~>"
410
410
  - !ruby/object:Gem::Version
411
- version: '4.18'
411
+ version: '4.19'
412
412
  - - ">="
413
413
  - !ruby/object:Gem::Version
414
- version: 4.18.0
414
+ version: 4.19.0
415
415
  - !ruby/object:Gem::Dependency
416
416
  name: rack-test
417
417
  requirement: !ruby/object:Gem::Requirement
@@ -642,5 +642,5 @@ requirements: []
642
642
  rubygems_version: 3.1.2
643
643
  signing_key:
644
644
  specification_version: 4
645
- summary: cucumber-5.1.3
645
+ summary: cucumber-5.2.0
646
646
  test_files: []