stormbreaker 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e6c78261727faf01de1719d7450bdfac83b9eb4c5eb4cfa64e17554b2fbf4a3f
4
- data.tar.gz: 97ee40f273a06dd673b32409f9c974c7ba87c743527c196dfb4d8b5f152d3132
3
+ metadata.gz: ec9eb79b7c9d77354bd781c0764e6d1889b47078b60c5b63f514e31d714dfacc
4
+ data.tar.gz: 472b88437a48a723e1fb90f7b9b840be20ac204296ec1996b688aada9ccfcd30
5
5
  SHA512:
6
- metadata.gz: 17cc5375945ec37d07aff44733844bc71f4e19e3b0c02887dece3a39241b613410165bdd6456cf27377bf90c04c3bb9461e9a607241109dff1fa467bf68ef9d7
7
- data.tar.gz: ebbe45e398d9e47d0e2b275cbacdef3efd14c650965bb45ecbd8bc5eb06b52de0a0a50070084900247bebf4d602dfa54e6135a83af645e173ff17c5ab9ce3941
6
+ metadata.gz: 23b898d105f7ca0d5be6899009f308521638e3bdb7354d845b2f50916b601b083a07f576a7d9d042b09f691735ee11998270006d67a33fd0f6d2e1804bcc375d
7
+ data.tar.gz: 06b4f3fbeb08b308e65ed0b8eaf14906078b06fa8464ef9341a1b0bf732cecc9bde3e7c6e06a9e86ab4af5f9019d9519901c3ef99c9e22d3ba9c184be66e9f5b
@@ -12,6 +12,12 @@ module Stormbreaker
12
12
  self.complete_summary = complete_summary
13
13
  end
14
14
 
15
+ def violation_count
16
+ return 0 if called_by.to_a.empty?
17
+
18
+ called_by.to_a.map { |spec| spec.to_s.match(/(.*):/) }.uniq.count
19
+ end
20
+
15
21
  def ==(other)
16
22
  called_by == other.called_by &&
17
23
  severity == other.severity &&
@@ -32,12 +32,6 @@ module Stormbreaker
32
32
  @violations.reduce(0) { |key, (_category, violations)| key + violations.count }
33
33
  end
34
34
 
35
- def failing_spec_count(violation)
36
- return if violation.called_by.to_a.empty?
37
-
38
- violation.called_by.to_a.map { |spec| spec.to_s.match(/(.*):/) }.uniq.count
39
- end
40
-
41
35
  def parse_callstack(violation)
42
36
  return if violation.called_by.to_a.empty?
43
37
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stormbreaker
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  end
@@ -73,16 +73,16 @@
73
73
  </tr>
74
74
  </thead>
75
75
  <tbody>
76
- <% @violations[f].each do |v| %>
77
- <tr class="accordion">
78
- <td>
76
+ <% @violations[f].sort_by {|v| v.violation_count }.each do |v| %>
77
+ <tr class="accordion test_result_row">
78
+ <td class="test_result_element">
79
79
  <%= html_escape(v.element) %>
80
80
  </td>
81
- <td>
81
+ <td class="test_result_violation">
82
82
  <%= html_escape(v.violation) %>
83
83
  </td>
84
- <td>
85
- <%= failing_spec_count(v) %>
84
+ <td class="test_result_count">
85
+ <%= v.violation_count %>
86
86
  </td>
87
87
  </tr>
88
88
  <tr class="child">
data/stormbreaker.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Layout/ExtraSpacing, Layout/SpaceAroundOperators, Metrics/BlockLength
3
+ # rubocop:disable Layout/ExtraSpacing, Layout/SpaceAroundOperators
4
4
  require './lib/stormbreaker/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
@@ -8,12 +8,10 @@ Gem::Specification.new do |gem|
8
8
  gem.version = Stormbreaker::VERSION
9
9
  gem.license = 'MIT'
10
10
  gem.authors = [
11
- 'Brian Watson',
12
- 'Mikey Hargiss'
11
+ 'Brian Watson'
13
12
  ]
14
13
  gem.email = [
15
- 'bwatson@instructure.com',
16
- 'mhargiss@instructure.com'
14
+ 'bwatson@instructure.com'
17
15
  ]
18
16
  gem.summary = 'Add axe assertions to expect statements by default in Ruby Selenium'
19
17
 
@@ -24,11 +22,7 @@ Gem::Specification.new do |gem|
24
22
  gem.bindir = 'bin'
25
23
  gem.require_paths = ['lib']
26
24
 
27
- gem.metadata = {
28
- 'allowed_push_host' => 'https://rubygems.org',
29
- 'rubygems_mfa_required' => 'true'
30
- }
31
-
25
+ gem.metadata['allowed_push_host'] = 'https://rubygems.org'
32
26
  gem.required_ruby_version = '>= 2.6'
33
27
 
34
28
  gem.add_dependency 'axe-core-api', '~> 4.1.0'
@@ -41,4 +35,4 @@ Gem::Specification.new do |gem|
41
35
  gem.add_development_dependency 'rake', '~> 12.3'
42
36
  gem.add_development_dependency 'simplecov', '~> 0.17'
43
37
  end
44
- # rubocop:enable Layout/ExtraSpacing, Layout/SpaceAroundOperators, Metrics/BlockLength
38
+ # rubocop:enable Layout/ExtraSpacing, Layout/SpaceAroundOperators
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stormbreaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Watson
8
- - Mikey Hargiss
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2021-11-15 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: axe-core-api
@@ -137,10 +136,9 @@ dependencies:
137
136
  - - "~>"
138
137
  - !ruby/object:Gem::Version
139
138
  version: '0.17'
140
- description:
139
+ description:
141
140
  email:
142
141
  - bwatson@instructure.com
143
- - mhargiss@instructure.com
144
142
  executables: []
145
143
  extensions: []
146
144
  extra_rdoc_files: []
@@ -164,13 +162,12 @@ files:
164
162
  - lib/stormbreaker/version.rb
165
163
  - lib/templates/results.erb
166
164
  - stormbreaker.gemspec
167
- homepage:
165
+ homepage:
168
166
  licenses:
169
167
  - MIT
170
168
  metadata:
171
169
  allowed_push_host: https://rubygems.org
172
- rubygems_mfa_required: 'true'
173
- post_install_message:
170
+ post_install_message:
174
171
  rdoc_options: []
175
172
  require_paths:
176
173
  - lib
@@ -186,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
183
  version: '0'
187
184
  requirements: []
188
185
  rubygems_version: 3.1.6
189
- signing_key:
186
+ signing_key:
190
187
  specification_version: 4
191
188
  summary: Add axe assertions to expect statements by default in Ruby Selenium
192
189
  test_files: []