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 +4 -4
- data/CHANGELOG.md +8 -2
- data/lib/cucumber/cli/options.rb +1 -1
- data/lib/cucumber/formatter/html.rb +1 -1
- data/lib/cucumber/formatter/http_io.rb +6 -10
- data/lib/cucumber/formatter/io.rb +3 -3
- data/lib/cucumber/formatter/json.rb +1 -1
- data/lib/cucumber/formatter/message.rb +1 -1
- data/lib/cucumber/formatter/pretty.rb +1 -1
- data/lib/cucumber/formatter/progress.rb +1 -1
- data/lib/cucumber/formatter/rerun.rb +1 -1
- data/lib/cucumber/formatter/steps.rb +1 -1
- data/lib/cucumber/formatter/summary.rb +1 -1
- data/lib/cucumber/formatter/url_reporter.rb +3 -16
- data/lib/cucumber/version +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36830fb7cfa9895488ea7f11bb33f6267c94328b8b3a08da75749d26f4047479
|
4
|
+
data.tar.gz: 725299585226f1af48d00c12af192844af884ec49d44e6966c22a8a607bd9fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 807a72bba0f0a30c266b68afd4866ead55178f2ee2f72bd5a86331445f6de62bf320ebd2a848c05dd6c906c52aa6d082c1b5f241a65cc00e5ff6df14ffe3d6b8
|
7
|
+
data.tar.gz: d11cfaaa57bf35ffbbf54273317825179beb5db3ab106feacb30c7d0860ca6aeacf90404774ee92eafba100db00b5a25428ca7f3447262b0f05687b57d03aeae
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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
|
-
## [
|
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
|
|
data/lib/cucumber/cli/options.rb
CHANGED
@@ -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"
|
338
|
+
'required or if the "support" directories themselves are',
|
339
339
|
'explicitly required.',
|
340
340
|
'This option can be specified multiple times.'
|
341
341
|
]
|
@@ -72,10 +72,11 @@ module Cucumber
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def close
|
75
|
-
|
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
|
-
|
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(
|
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)
|
@@ -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 = []
|
@@ -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(
|
13
|
-
|
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(
|
14
|
+
def report(banner); end
|
28
15
|
end
|
29
16
|
end
|
30
17
|
end
|
data/lib/cucumber/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
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.
|
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-
|
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.
|
401
|
+
version: '4.19'
|
402
402
|
- - ">="
|
403
403
|
- !ruby/object:Gem::Version
|
404
|
-
version: 4.
|
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.
|
411
|
+
version: '4.19'
|
412
412
|
- - ">="
|
413
413
|
- !ruby/object:Gem::Version
|
414
|
-
version: 4.
|
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.
|
645
|
+
summary: cucumber-5.2.0
|
646
646
|
test_files: []
|