Class: Quality::Tools::BundleAudit

Inherits:
Tool
  • Object
show all
Defined in:
lib/quality/tools/bundle_audit.rb

Overview

Adds ‘bundler_audit’ tool support to quality gem

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Tool

#initialize

Constructor Details

This class inherits a constructor from Quality::Tools::Tool

Class Method Details

.command_nameObject



7
8
9
# File 'lib/quality/tools/bundle_audit.rb', line 7

def self.command_name
  'bundle-audit'
end

Instance Method Details

#quality_bundle_auditObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/quality/tools/bundle_audit.rb', line 11

def quality_bundle_audit
  ratchet_quality_cmd('bundle-audit',
                      args: '',
                      gives_error_code_on_violations: true) do |line|
    if line =~ /^Name: /
      1
    else
      0
    end
  end
end