class Pronto::BundlerAudit
Pronto::BundlerAudit
is a ::Pronto::Runner that:
-
Updates the Ruby Advisory Database,
-
Runs bundle-audit to scan the Gemfile.lock, and then
-
Returns an Array of ::Pronto::Message objects if any issues or advisories are found.
Constants
- GEMFILE_LOCK_FILENAME
Public Class Methods
configuration()
click to toggle source
# File lib/pronto/bundler_audit.rb, line 20 def self.configuration @configuration ||= Pronto::BundlerAudit::Configuration.new end
Public Instance Methods
commit_sha()
click to toggle source
Don't really need a commit SHA for Pronto's GitHubFormatter to work. Just need to return nil here, and in {Pronto::BundlerAudit::Results::ProntoMessagesAdapter::DeepLine#commit_sha}.
# File lib/pronto/bundler_audit.rb, line 45 def commit_sha nil end
filename()
click to toggle source
# File lib/pronto/bundler_audit.rb, line 38 def filename GEMFILE_LOCK_FILENAME end
path()
click to toggle source
@return [Pathname] the absolute path to the current git repo / code.
# File lib/pronto/bundler_audit.rb, line 34 def path Pathname.new(File.expand_path(".")) end
run()
click to toggle source
@return [Array<Pronto::Message>] one for each issue found
# File lib/pronto/bundler_audit.rb, line 25 def run results = Auditor.call Pronto::BundlerAudit::Results::ProntoMessagesAdapter.call( results, runner: self) end