suiteview 2.1.3 → 2.1.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/suiteview.rb +9 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc3d14c800ffc83b237e71923484783cd7360bd84f37151f53fed9cfe33ea1c6
4
- data.tar.gz: baae20f73d79a8e79810a8ef0993e82a0526ca14362043767ea55c79cdeaada1
3
+ metadata.gz: d9147697462708141f5c1dc6714487b05a20f9365470b38d9ecc467ed57088c9
4
+ data.tar.gz: a63fa95ad432ed7e3c7b2b8e7fe9d87da08d7629a737323b915850d50a8f45fa
5
5
  SHA512:
6
- metadata.gz: 0bfe734a751c11ce061faba67253d4c41e9a80c0f430589cdc73e5e02cd1d0432b6d2c6bd8d8529f3793401d04532d03ca5c8175f99eabe8d7e7a4d0bfcc41ab
7
- data.tar.gz: cf21d411cebda7188151d8ff5434499db1fdab2092305e10df76e433b043de66bcc23b06f7c238fb14d8465aeb9796225a29b900bf1141f962bd9101b333bc47
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.output = CSV.generate do |csv|
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.output
54
+ self.render_step.render
54
55
  end
55
56
 
56
57
  def render_to_file(filename)
57
- File.open(filename, "w") do |file|
58
- file.puts self.output
59
- end
58
+ self.render_step.render_to_file(filename)
60
59
  end
61
60
 
62
61
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suiteview
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - David West