Class: UploadCookbook::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- UploadCookbook::RakeTask
- Includes:
- DaptivChefCI::RakeTaskHelpers, Rake::DSL
- Defined in:
- lib/daptiv-chef-ci/upload_cookbook_task.rb
Overview
Example usage, uploads the current cookbook to the Chef server freezing it to the Canary environment.
UploadCookbook::RakeTask.new do |t|
t.environment = 'canary'
t.freeze = true
end
This class lets you define Rake tasks to upload cookbooks to Chef.
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#freeze ⇒ Object
Returns the value of attribute freeze.
Instance Method Summary collapse
-
#initialize(name = 'upload_cookbook', desc = 'Upload cookbook task') {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Methods included from DaptivChefCI::RakeTaskHelpers
#execute, #exit_on_failure, #exit_on_failure=
Constructor Details
#initialize(name = 'upload_cookbook', desc = 'Upload cookbook task') {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
26 27 28 29 30 31 32 33 |
# File 'lib/daptiv-chef-ci/upload_cookbook_task.rb', line 26 def initialize(name = 'upload_cookbook', desc = 'Upload cookbook task') @logger = Log4r::Logger.new('daptiv_chef_ci::upload_cookbook_task') @shell = DaptivChefCI::Shell.new @name, @desc = name, desc @freeze = false yield self if block_given? define_task end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
21 22 23 |
# File 'lib/daptiv-chef-ci/upload_cookbook_task.rb', line 21 def environment @environment end |
#freeze ⇒ Object
Returns the value of attribute freeze.
22 23 24 |
# File 'lib/daptiv-chef-ci/upload_cookbook_task.rb', line 22 def freeze @freeze end |