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: b7bd034d510483332e5bdb2dcd2e370e83832fe2efd0a898f94ea304e867fae7
4
- data.tar.gz: c20fc367cab6c4ebc5668821d703fbe7008e58a407104efb260292c5f346c65d
3
+ metadata.gz: 522f2437e7afe8792e8cc1f9ddfbb2011d91f0e53c262c43d65f279a686c21bb
4
+ data.tar.gz: 8f84056920c199c89b004a5d7a54a676f047c630ef8553fd67cec9bd9c6ced77
5
5
  SHA512:
6
- metadata.gz: 8052bb39b91ea6b40306d0dd8fc8fe95a170bd3c9f76f7820336e4f12c1dbfcd7538e9b59853c562db7b91f31b4d6fbc6a66558608ddb20ee9ec5c3fb90275b9
7
- data.tar.gz: 583c03ad767c4540116b5f1a3f398655cba597157a421f4355fe069c28e69f98b745b3d3b925ba3fb78581a88b385ca046cba136ab68d9c43841be1fc9b166f3
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 = Stormbreaker.configuration.serialize_prefix
21
- results_files = Dir.glob("#{prefix}*", base: path)
22
- raise "No results matching /#{prefix}*/ found in #{path}" if results_files.empty?
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
- total_violations = YAML.load(File.read(File.join(path, file)),
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stormbreaker
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
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.1
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-22 00:00:00.000000000 Z
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