Class: Bundler::Audit::Task

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/bundler/audit/task.rb

Instance Method Summary collapse

Constructor Details

#initializeTask

Initializes the task.



9
10
11
# File 'lib/bundler/audit/task.rb', line 9

def initialize
  define
end

Instance Method Details

#defineObject (protected)

Defines the bundle:audit task.



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/bundler/audit/task.rb', line 18

def define
  namespace :bundle do
    desc 'Updates the ruby-advisory-db then runs bundle-audit'
    task :audit do
      require 'bundler/audit/cli'
      %w(update check).each do |command|
        Bundler::Audit::CLI.start [command]
      end
    end
  end
end