suiteview 2.1.3 → 2.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/suiteview.rb +9 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9147697462708141f5c1dc6714487b05a20f9365470b38d9ecc467ed57088c9
|
4
|
+
data.tar.gz: a63fa95ad432ed7e3c7b2b8e7fe9d87da08d7629a737323b915850d50a8f45fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93c0b7efecf86f3454741879825c8d05b25ff2fa65dff08ececcf6d3d0ff7ad49203030efb64421962f586408b5fa4d58d7742e66e08293d48a3cbe41127890b
|
7
|
+
data.tar.gz: aeaf77255c85d7bf60c78261bfd691e60942dfcdbda23405e792025f88c3730ddb03b328b0e74a748d315bcc6594bf2423be323b432919576b76988d4d65c233
|
data/lib/suiteview.rb
CHANGED
@@ -1,15 +1,19 @@
|
|
1
1
|
require 'cql'
|
2
|
-
require 'csv'
|
3
2
|
require_relative './suitestat'
|
3
|
+
require_relative './suiterender'
|
4
4
|
# SuiteView is responsible for providing consumable Ruby Cucumber suite stats
|
5
5
|
class SuiteView
|
6
|
-
attr_accessor :repo, :include_tags, :output
|
6
|
+
attr_accessor :repo, :include_tags, :output, :render_step
|
7
7
|
|
8
8
|
def initialize(opts)
|
9
9
|
self.output = nil
|
10
10
|
self.repo = CQL::Repository.new(opts[:repo])
|
11
11
|
self.include_tags = opts[:include_tags] || ""
|
12
12
|
self.include_tags = self.include_tags.split(',')
|
13
|
+
|
14
|
+
# Create a SuiteRender object and set it as the last step in the chain
|
15
|
+
self.render_step = SuiteRender.new(self)
|
16
|
+
render_step.next_step = self
|
13
17
|
end
|
14
18
|
|
15
19
|
def outline_tag_count(tag)
|
@@ -43,20 +47,15 @@ class SuiteView
|
|
43
47
|
end
|
44
48
|
|
45
49
|
def to_csv
|
46
|
-
self.
|
47
|
-
self.output.each { |row| csv << row }
|
48
|
-
end
|
49
|
-
self
|
50
|
+
self.render_step.to_csv
|
50
51
|
end
|
51
52
|
|
52
53
|
def render
|
53
|
-
self.
|
54
|
+
self.render_step.render
|
54
55
|
end
|
55
56
|
|
56
57
|
def render_to_file(filename)
|
57
|
-
|
58
|
-
file.puts self.output
|
59
|
-
end
|
58
|
+
self.render_step.render_to_file(filename)
|
60
59
|
end
|
61
60
|
|
62
61
|
private
|