stormbreaker 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 522f2437e7afe8792e8cc1f9ddfbb2011d91f0e53c262c43d65f279a686c21bb
|
4
|
+
data.tar.gz: 8f84056920c199c89b004a5d7a54a676f047c630ef8553fd67cec9bd9c6ced77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0d0170a6155b7e746c482913ee99afcf0a1da0a04736cb8dffa45b603ac35dda7501e1e8ea5ef4f1aa259d9a5359a10f45c58b7ba93d663ad199e4cadb690dc
|
7
|
+
data.tar.gz: 4a9782cc7896960d74bce92c1b275c56d02371ed0e087660e7955d51e9037e71131e2b677d5eeca445620093b79b3057887a25bf502e657465bd39cc6fd49cab
|
@@ -16,17 +16,18 @@ module Stormbreaker
|
|
16
16
|
puts "Serialized results written to #{filename}"
|
17
17
|
end
|
18
18
|
|
19
|
-
def self.combine_results(path = Dir.pwd)
|
20
|
-
prefix
|
21
|
-
results_files = Dir.glob("#{prefix}*"
|
22
|
-
raise "No results matching /#{prefix}
|
19
|
+
def self.combine_results(path = Dir.pwd, prefix = nil)
|
20
|
+
prefix ||= Stormbreaker.configuration.serialize_prefix
|
21
|
+
results_files = Dir.glob(File.join(path, "#{prefix}*"))
|
22
|
+
raise "No results matching /#{prefix}* found in #{path}" if results_files.empty?
|
23
23
|
|
24
24
|
combined_manager = Stormbreaker::AxeViolationManager.new
|
25
25
|
results_files.each do |file|
|
26
26
|
# rubocop:disable Security/YAMLLoad
|
27
27
|
# Using YAML.load here so that we can specify safe and whitelisted_tags as args in order to not
|
28
28
|
# have to patch settings to use safe_load and potentially endanger consuming apps.
|
29
|
-
|
29
|
+
puts "Loading #{file}"
|
30
|
+
total_violations = YAML.load(File.read(file),
|
30
31
|
safe: true, whitelisted_tags: ALLOWED_TAGS, deserialize_symbols: true)
|
31
32
|
# rubocop:enable Security/YAMLLoad
|
32
33
|
total_violations.each do |violation|
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
namespace :stormbreaker do
|
4
4
|
desc 'Combines results that were created from isolated test runs'
|
5
|
-
task :combine_results, %i[path] do |_t, args|
|
5
|
+
task :combine_results, %i[path prefix] do |_t, args|
|
6
6
|
require_relative '../../stormbreaker'
|
7
|
-
manager = Stormbreaker::AxeResultsSerializer.combine_results(args[:path])
|
7
|
+
manager = Stormbreaker::AxeResultsSerializer.combine_results(args[:path], args[:prefix])
|
8
8
|
erb_writer = Stormbreaker::ErbFormatter.new(manager.total_violations)
|
9
9
|
erb_writer.write_to_erb
|
10
10
|
end
|
data/lib/stormbreaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stormbreaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: axe-core-api
|