Class: Bundler::Audit::Task

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

Overview

Defines the bundle:audit rake tasks.

Instance Method Summary collapse

Constructor Details

#initializeTask

Initializes the task.



12
13
14
# File 'lib/bundler/audit/task.rb', line 12

def initialize
  define
end

Instance Method Details

#defineObject (protected)

Defines the bundle:audit and bundle:audit:update task.



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/bundler/audit/task.rb', line 21

def define
  namespace :bundle do
    namespace :audit do
      desc 'Checks the Gemfile.lock for insecure dependencies'
      task :check do
        system 'bundler-audit', 'check'
      end

      desc 'Updates the bundler-audit vulnerability database'
      task :update do
        system '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