cucumber-report-format 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47778d25b6cc4b829087a094e7f5faabdcaefd20
4
- data.tar.gz: abb639d264d8e3c8051363270c2ff04eb81555f3
3
+ metadata.gz: f8ca70cfb91509a76b54a99ba60a6eb3a855d5e2
4
+ data.tar.gz: a03a86f221f01ce67aac039298dd398535ffdf5e
5
5
  SHA512:
6
- metadata.gz: 494dcde596471f0013cc5ba024e0998ce7264347fca5c1c199fffcd48bd25cb45cb346fbd7898a9d00e2c2f3de572d1331ede8f56403f11eeca63c57143f36b0
7
- data.tar.gz: ef1e81c71e49c98e5424bfcf7118052250018646aa6d47fdf7728ce9d2c2b16379cc8ff52053ceb3afbef422c8bf5a6922130ba1851a57c62cf09b89b5ea94d9
6
+ metadata.gz: 73bb4e80bffda79a9e01b613b85a532bcbca511f36301a93ec223161e0a9a78b3c746efb7c9f7e034bd4e6f0d82fa8693aef6b4bc2641c4de15998aae107fe05
7
+ data.tar.gz: 52af72464329afec2d6cf2103ddd40a9d8b696c0b9994e6bdd018f95559d4e0f4b679ec1d6f53fcf7927f8d1dd52cfcdfafae144ceb557e1549179d5cd055833
@@ -1,14 +1,3 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2017-01-16 21:03:27 +0100 using RuboCop version 0.44.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
1
  Style/Documentation:
11
2
  Exclude:
12
- - 'spec/**/*'
13
- - 'test/**/*'
14
3
  - 'bin/cucumber-report-format'
data/README.md CHANGED
@@ -1,2 +1,30 @@
1
+ [![Build Status](https://travis-ci.org/funkwerk/cucumber-report-format.svg)](https://travis-ci.org/funkwerk/cucumber-report-format)
2
+ [![Code Climate](https://codeclimate.com/github/funkwerk/cucumber-report-format/badges/gpa.svg)](https://codeclimate.com/github/funkwerk/cucumber-report-format)
3
+
1
4
  # cucumber-report-format
2
5
  Formats Cucumber Reports
6
+
7
+ ## Usage
8
+
9
+ `cucumber-report-format --template templates/summary.erb cucumber-report.json`
10
+
11
+ Will output something like:
12
+ ```
13
+ ## Summary
14
+
15
+ | Tests | 6 |
16
+ | - | - |
17
+ | Passed | 1 |
18
+ | Failed | 2 |
19
+ | Not Executed | 3 |
20
+
21
+ ```
22
+
23
+ ## Predefined Templates
24
+
25
+ | name | description |
26
+ | ---- | ----------- |
27
+ | markdown | Markdown Output of detailed Report |
28
+ | overall_summary | Prints an overall summary of the executed tests |
29
+ | summary | Print a summary of the executed tests |
30
+ | tag_overview | Provides an overview over the used tags |
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ end
7
7
 
8
8
  desc 'Publishes the Gem'
9
9
  task :push do
10
- sh 'gem push cucumber-report-format-0.0.1.gem'
10
+ sh 'gem push cucumber-report-format-0.0.2.gem'
11
11
  end
12
12
 
13
13
  task audit: :rubocop
@@ -38,7 +38,7 @@ OptionParser.new do |opts|
38
38
  opts.on('--template [TEMPLATE]', 'Renders into template') do |template|
39
39
  options[:template] = template
40
40
  end
41
- opts.on('-', 'Reads from stdin') do
41
+ opts.on('--stdin', 'Reads from stdin') do
42
42
  options[:stdin] = true
43
43
  end
44
44
  end.parse!
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'cucumber-report-format'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = '2017-01-16'
5
5
  s.summary = 'Format Cucumber Reports'
6
6
  s.description = 'Template Engine for Cucumber Reports'
@@ -82,8 +82,7 @@ def test_result(test)
82
82
  status = step['result']['status'] if step['result'].key? 'status'
83
83
  step['result']['error_message'].each { |a| error.push a } if step['result'].key? 'error_message'
84
84
  end
85
- # TODO: symbols as keys, not strings
86
- {'status' => status, 'duration' => duration, 'error' => error}
85
+ {:status => status, :duration => duration, :error => error}
87
86
  end
88
87
 
89
88
  def hover_div(scenario)
@@ -93,7 +92,7 @@ def hover_div(scenario)
93
92
  end
94
93
 
95
94
  def test_comment(scenario)
96
- errors = test_result(scenario)['error']
95
+ errors = test_result(scenario)[:error]
97
96
  return '' if errors.empty?
98
97
  errors.last
99
98
  end
@@ -126,6 +125,6 @@ end
126
125
 
127
126
  | No | Scenario | Type | Result | Comment |
128
127
  |----|----------|------|--------|---------|
129
- <% for @scenario in scenarios(@feature) %><% number += 1 %>| <%= number %> | <%= hover_div(@scenario) %> | <%= is_automatic?(@scenario) ? 'automatic' : 'manual' %> | <%= test_result(@scenario)['status'] %> | <%= test_comment(@scenario) %> |
128
+ <% for @scenario in scenarios(@feature) %><% number += 1 %>| <%= number %> | <%= hover_div(@scenario) %> | <%= is_automatic?(@scenario) ? 'automatic' : 'manual' %> | <%= test_result(@scenario)[:status] %> | <%= test_comment(@scenario) %> |
130
129
  <% end %>
131
130
  <% end %>
@@ -23,7 +23,7 @@ def test_result(test)
23
23
  next if status == 'failed'
24
24
  status = result['status'] if result.key? 'status'
25
25
  end
26
- {'status' => status, 'duration' => duration}
26
+ {:status => status, duration => duration}
27
27
  end
28
28
 
29
29
  def is_executed?(test)
@@ -32,4 +32,4 @@ def is_executed?(test)
32
32
  end
33
33
  true
34
34
  end
35
- %><%= all_tests(@features).length %> | <%= all_tests(@features).select { |test| test_result(test)['status'] == 'passed' }.length %> | <%= all_tests(@features).select { |test| test_result(test)['status'] == 'failed' }.length %> | <%= all_tests(@features).select { |test| !is_executed? test }.length %>
35
+ %><%= all_tests(@features).length %> | <%= all_tests(@features).select { |test| test_result(test)[:status] == 'passed' }.length %> | <%= all_tests(@features).select { |test| test_result(test)[:status] == 'failed' }.length %> | <%= all_tests(@features).select { |test| !is_executed? test }.length %>
@@ -23,7 +23,7 @@ def test_result(test)
23
23
  next if status == 'failed'
24
24
  status = result['status'] if result.key? 'status'
25
25
  end
26
- {'status' => status, 'duration' => duration}
26
+ {:status => status, :duration => duration}
27
27
  end
28
28
 
29
29
  def is_executed?(test)
@@ -37,6 +37,6 @@ end
37
37
 
38
38
  | Tests | <%= all_tests(@features).length %> |
39
39
  | - | - |
40
- | Passed | <%= all_tests(@features).select { |test| test_result(test)['status'] == 'passed' }.length %> |
41
- | Failed | <%= all_tests(@features).select { |test| test_result(test)['status'] == 'failed' }.length %> |
40
+ | Passed | <%= all_tests(@features).select { |test| test_result(test)[:status] == 'passed' }.length %> |
41
+ | Failed | <%= all_tests(@features).select { |test| test_result(test)[:status] == 'failed' }.length %> |
42
42
  | Not Executed | <%= all_tests(@features).select { |test| !is_executed? test }.length %> |
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-report-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Rohe