suiteview 1.0.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 +7 -0
  2. data/lib/suiteview.rb +24 -0
  3. metadata +87 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 84448df415255f3a7490492fdcf462100ee578b3138e59d55609abb3d897ebb4
4
+ data.tar.gz: feaae532449e78a93db1db545d76b8eb89b8bd790aceafa60466336b1f8bcb48
5
+ SHA512:
6
+ metadata.gz: c96d6161e99c378afe4c74cdbea39cce26b70edb653220e1883e39a92c7b27cd72aab723543b1cd58a3b20acdb66cad2fca235e21f70c742b0f39c1eb2eea3a6
7
+ data.tar.gz: 48a8f821f03f8152ad6534cb17ec790fd2afcf704d4aee4cb263ed7a97d84d289600b8f0b7e5ce1874e28b80e81a766db507fe5b1247086cbeb1075cfcb8445d
data/lib/suiteview.rb ADDED
@@ -0,0 +1,24 @@
1
+ require 'cql'
2
+ class SuiteView
3
+ attr_accessor :repo
4
+ def initialize(opts)
5
+ self.repo = CQL::Repository.new(opts[:repo])
6
+ end
7
+
8
+ def outline_tag_count(tag)
9
+ self.repo.query do
10
+ select examples
11
+ transform examples => lambda {|examples| examples[0].rows.drop(1) }
12
+ from outlines
13
+ with { |outline| outline.tags.map(&:name).include?(tag)}
14
+ end.map {|item| item['examples']}.flatten.count
15
+ end
16
+
17
+ def scenario_tag_count(tag)
18
+ self.repo.query do
19
+ select name
20
+ from scenarios
21
+ with { |scenario| scenario.tags.map(&:name).include?(tag)}
22
+ end.map {|item| item['name']}.count
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: suiteview
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - David West
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-05-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubycritic
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.9'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: cql
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.7'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.7'
55
+ description: suiteview is a tool to help show the contents of a cucumber suite with
56
+ your unique specifications
57
+ email: support@suiteview.xyz
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/suiteview.rb
63
+ homepage: https://rubygems.org/gems/suiteview
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubygems_version: 3.3.26
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: suiteview is a tool to help you get a big picture view of what is in your
86
+ cucumber suite
87
+ test_files: []