class Bundler::Audit::Task
Defines the ‘bundle:audit` rake tasks.
def bundler_audit(*arguments)
- Note: -
Raises:
-
(CommandNotFound)
-
Returns:
-
(true)
-
Parameters:
-
arguments
(Array
) --
def bundler_audit(*arguments) case system('bundler-audit',*arguments) when false exit $?.exitstatus || 1 when nil raise(CommandNotFound,"bundler-audit could not be executed") else return true end end
def define
Defines the `bundle:audit` and `bundle:audit:update` task.
def define namespace :bundle do namespace :audit do desc 'Checks the Gemfile.lock for insecure dependencies' task :check do bundler_audit 'check' end desc 'Updates the bundler-audit vulnerability database' task :update do bundler_audit 'update' end end task :audit => 'audit:check' end task 'bundler:audit' => 'bundle:audit' task 'bundler:audit:check' => 'bundle:audit:check' task 'bundler:audit:update' => 'bundle:audit:update' end
def initialize
Initializes the task.
def initialize define end