cucumber 5.2.0 → 5.3.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 +19 -3
- data/lib/cucumber/cli/configuration.rb +23 -1
- data/lib/cucumber/cli/options.rb +2 -1
- data/lib/cucumber/formatter/junit.rb +18 -1
- data/lib/cucumber/version +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61cd1181584bcc92134ced753b975cfd74a8501c00bdce0c75695145cf4ceaef
|
4
|
+
data.tar.gz: 57f3dec452665986e5f4916ad78f453e833a9fc94ba2f45124a5643f87b77d0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5f971b543114f4baab695a987ed131fe39931a7b644871ce036862a310b9bf17f52f9d4fe80069072864a295d9c31e3254be5f363e87a946ff80733bf33ecb7
|
7
|
+
data.tar.gz: 1c3bb21ce293544c88161cd40460be9e4b12c0dcc3221e50e976a8cc6d5666a982ebde2f5a7bb33d3de65d1423f80d14eaab1b6570a6c03434b568c6cde6e09d
|
data/CHANGELOG.md
CHANGED
@@ -10,19 +10,35 @@ 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.3.0...master)
|
14
14
|
|
15
15
|
### Added
|
16
16
|
|
17
|
+
### Fixed
|
18
|
+
|
17
19
|
### Changed
|
18
20
|
|
19
21
|
### Removed
|
20
22
|
|
21
|
-
###
|
23
|
+
### Security fixes
|
24
|
+
|
25
|
+
## [5.3.0](https://github.com/cucumber/cucumber-ruby/compare/v5.2.0...v5.3.0)
|
26
|
+
|
27
|
+
### Added
|
28
|
+
|
29
|
+
* `fileattribute` cli argument available to attach `file` to junit formatter
|
22
30
|
|
23
31
|
### Fixed
|
24
32
|
|
25
|
-
|
33
|
+
* Circle-CI windows build now silently installs MSYS2 using Chocolatey before
|
34
|
+
setting-up the ruby devkit with ridk
|
35
|
+
([#1503](https://github.com/cucumber/cucumber-ruby/pull/1503)
|
36
|
+
[aurelien-reeves](https://github.com/aurelien-reeves))
|
37
|
+
|
38
|
+
* `--publish` and no formatter now uses the pretty formatter per default
|
39
|
+
([#1468](https://github.com/cucumber/cucumber-ruby/issues/1468)
|
40
|
+
[#1500](https://github.com/cucumber/cucumber-ruby/pull/1500)
|
41
|
+
[aurelien-reeves](https://github.com/aurelien-reeves))
|
26
42
|
|
27
43
|
## [5.2.0](https://github.com/cucumber/cucumber-ruby/compare/v5.1.3...v5.2.0)
|
28
44
|
|
@@ -126,13 +126,35 @@ module Cucumber
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def arrange_formats
|
129
|
-
|
129
|
+
add_default_formatter if needs_default_formatter?
|
130
|
+
|
130
131
|
@options[:formats] = @options[:formats].sort_by do |f|
|
131
132
|
f[2] == @out_stream ? -1 : 1
|
132
133
|
end
|
133
134
|
@options[:formats].uniq!
|
134
135
|
@options.check_formatter_stream_conflicts
|
135
136
|
end
|
137
|
+
|
138
|
+
def add_default_formatter
|
139
|
+
@options[:formats] << ['pretty', {}, @out_stream]
|
140
|
+
end
|
141
|
+
|
142
|
+
def needs_default_formatter?
|
143
|
+
formatter_missing? || publish_only?
|
144
|
+
end
|
145
|
+
|
146
|
+
def formatter_missing?
|
147
|
+
@options[:formats].empty?
|
148
|
+
end
|
149
|
+
|
150
|
+
def publish_only?
|
151
|
+
@options[:formats]
|
152
|
+
.uniq
|
153
|
+
.map { |formatter, _, stream| [formatter, stream] }
|
154
|
+
.uniq
|
155
|
+
.reject { |formatter, stream| formatter == 'message' && stream != @out_stream }
|
156
|
+
.empty?
|
157
|
+
end
|
136
158
|
end
|
137
159
|
end
|
138
160
|
end
|
data/lib/cucumber/cli/options.rb
CHANGED
@@ -22,7 +22,8 @@ module Cucumber
|
|
22
22
|
"#{INDENT}filename instead."],
|
23
23
|
'stepdefs' => ['Cucumber::Formatter::Stepdefs', "Prints All step definitions with their locations. Same as\n" \
|
24
24
|
"#{INDENT}the usage formatter, except that steps are not printed."],
|
25
|
-
'junit' => ['Cucumber::Formatter::Junit',
|
25
|
+
'junit' => ['Cucumber::Formatter::Junit', "Generates a report similar to Ant+JUnit. Use\n" \
|
26
|
+
"#{INDENT}junit,fileattribute=true to include a file attribute."],
|
26
27
|
'json' => ['Cucumber::Formatter::Json', '[DEPRECATED] Prints the feature as JSON'],
|
27
28
|
'message' => ['Cucumber::Formatter::Message', 'Outputs protobuf messages'],
|
28
29
|
'html' => ['Cucumber::Formatter::HTML', 'Outputs HTML report'],
|
@@ -132,9 +132,12 @@ module Cucumber
|
|
132
132
|
duration = ResultBuilder.new(result).test_case_duration
|
133
133
|
@current_feature_data[:time] += duration
|
134
134
|
classname = @current_feature_data[:feature].name
|
135
|
+
filename = @current_feature_data[:uri]
|
135
136
|
name = scenario_designation
|
136
137
|
|
137
|
-
|
138
|
+
testcase_attributes = get_testcase_attributes(classname, name, duration, filename)
|
139
|
+
|
140
|
+
@current_feature_data[:builder].testcase(testcase_attributes) do
|
138
141
|
if !result.passed? && result.ok?(@config.strict)
|
139
142
|
@current_feature_data[:builder].skipped
|
140
143
|
@current_feature_data[:skipped] += 1
|
@@ -157,6 +160,20 @@ module Cucumber
|
|
157
160
|
@current_feature_data[:tests] += 1
|
158
161
|
end
|
159
162
|
|
163
|
+
def get_testcase_attributes(classname, name, duration, filename)
|
164
|
+
{ classname: classname, name: name, time: format('%<duration>.6f', duration: duration) }.tap do |attributes|
|
165
|
+
attributes[:file] = filename if add_fileattribute?
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
def add_fileattribute?
|
170
|
+
return false if @config.formats.nil? || @config.formats.empty?
|
171
|
+
|
172
|
+
!!@config.formats.find do |format|
|
173
|
+
format.first == 'junit' && format.dig(1, 'fileattribute') == 'true'
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
160
177
|
def get_backtrace_object(result)
|
161
178
|
if result.failed?
|
162
179
|
result.exception
|
data/lib/cucumber/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.3.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.3.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: 2021-01-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|
@@ -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.3.0
|
646
646
|
test_files: []
|