suiteview 2.1.41 → 2.2.0
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 +4 -4
- data/lib/suiteview.rb +6 -1
- 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: 520d19b48b2266640d01fabfc62831c79ced8292ffa9c1ad493f77197bb901c4
|
4
|
+
data.tar.gz: 43f7c82b7a9a2b7e87000f77e5776bfd2a2217c41b54bce1a6565014e53601db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|