Class: Automatiek::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/automatiek/rake_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, &task_block) ⇒ RakeTask

Returns a new instance of RakeTask.


8
9
10
11
12
13
14
15
16
17
# File 'lib/automatiek/rake_task.rb', line 8

def initialize(*args, &task_block)
  @gem = Gem.new(*args, &task_block)

  namespace :vendor do
    desc "Vendors #{@gem.gem_name}" unless ::Rake.application.last_description
    task(@gem.gem_name, [:version] => []) do |_, task_args|
      @gem.vendor!(task_args[:version])
    end
  end
end