suiteview 2.1.3 → 2.1.4
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: '06679e0b83b8b947e67035ac24b79b77a8742dff0dd7c51420969ef88d550dfd'
|
4
|
+
data.tar.gz: a63fa95ad432ed7e3c7b2b8e7fe9d87da08d7629a737323b915850d50a8f45fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ffd0d280edd235691fb5a800025309a6fdf69ca016fd582354f7d20784295cc5a35cfb647e016f40ce5df77d2a05004ffba2eca320a3f336e9d052ce41944a
|
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
|