suiteview 2.1.41 → 2.2.0

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 +6 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9147697462708141f5c1dc6714487b05a20f9365470b38d9ecc467ed57088c9
4
- data.tar.gz: a63fa95ad432ed7e3c7b2b8e7fe9d87da08d7629a737323b915850d50a8f45fa
3
+ metadata.gz: 520d19b48b2266640d01fabfc62831c79ced8292ffa9c1ad493f77197bb901c4
4
+ data.tar.gz: 43f7c82b7a9a2b7e87000f77e5776bfd2a2217c41b54bce1a6565014e53601db
5
5
  SHA512:
6
- metadata.gz: 93c0b7efecf86f3454741879825c8d05b25ff2fa65dff08ececcf6d3d0ff7ad49203030efb64421962f586408b5fa4d58d7742e66e08293d48a3cbe41127890b
7
- data.tar.gz: aeaf77255c85d7bf60c78261bfd691e60942dfcdbda23405e792025f88c3730ddb03b328b0e74a748d315bcc6594bf2423be323b432919576b76988d4d65c233
6
+ metadata.gz: 01e2da4c0157741996ce10ba83557c390b87c97184dd42d616d157c3cfb06e622443c412fd0ac9ebb4796cd12a2093b86a93a486e8057e832a5d1e43444b4e7d
7
+ data.tar.gz: 90bc95a07718412cd38712818f40f8c154e35fd04c22d763b9b1d9c13ea491f9fa679fb07adddfa38299b94cf90ab040ae288af8c5a527c35babf6009e87fdcf
data/lib/suiteview.rb CHANGED
@@ -3,13 +3,14 @@ require_relative './suitestat'
3
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, :render_step
6
+ attr_accessor :repo, :include_tags, :exclude_tag, :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
+ self.exclude_tag = opts[:exclude_tag]
13
14
 
14
15
  # Create a SuiteRender object and set it as the last step in the chain
15
16
  self.render_step = SuiteRender.new(self)
@@ -84,19 +85,23 @@ class SuiteView
84
85
  end
85
86
 
86
87
  def outline_query(tag)
88
+ exclude_tag = self.exclude_tag
87
89
  self.repo.query do
88
90
  select examples
89
91
  transform examples => lambda { |examples| examples[0].rows.drop(1) }
90
92
  from outlines
91
93
  with { |outline| outline.tags.map(&:name).include?(tag) }
94
+ without { |outline| outline.tags.map(&:name).include?(exclude_tag) }
92
95
  end
93
96
  end
94
97
 
95
98
  def scenario_query(tag)
99
+ exclude_tag = self.exclude_tag
96
100
  self.repo.query do
97
101
  select name
98
102
  from scenarios
99
103
  with { |scenario| scenario.tags.map(&:name).include?(tag) }
104
+ without { |scenario| scenario.tags.map(&:name).include?(exclude_tag) }
100
105
  end
101
106
  end
102
107
  end
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.41
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David West