Class: CloneEnvironment::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- CloneEnvironment::RakeTask
- Includes:
- DaptivChefCI::RakeTaskHelpers, Rake::DSL
- Defined in:
- lib/daptiv-chef-ci/clone_environment_task.rb
Overview
Example usage, copies a Chef environment definition to another environment.
CloneEnvironment::RakeTask.new do |t|
t.src_env = 'dev'
t.dest_env = "vagrant-#{ENV['LOGNAME']}-dotnetframework"
end
This class lets you define Rake tasks to clone Chef environments.
Instance Attribute Summary collapse
-
#dest_env ⇒ Object
Returns the value of attribute dest_env.
-
#src_env ⇒ Object
Returns the value of attribute src_env.
Instance Method Summary collapse
-
#initialize(name = 'clone_environment', desc = 'Clone environment 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 = 'clone_environment', desc = 'Clone environment task') {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
28 29 30 31 32 33 34 |
# File 'lib/daptiv-chef-ci/clone_environment_task.rb', line 28 def initialize(name = 'clone_environment', desc = 'Clone environment task') @logger = Log4r::Logger.new('daptiv_chef_ci::clone_environment_task') @shell = DaptivChefCI::Shell.new @name, @desc = name, desc yield self if block_given? define_task end |
Instance Attribute Details
#dest_env ⇒ Object
Returns the value of attribute dest_env.
24 25 26 |
# File 'lib/daptiv-chef-ci/clone_environment_task.rb', line 24 def dest_env @dest_env end |
#src_env ⇒ Object
Returns the value of attribute src_env.
23 24 25 |
# File 'lib/daptiv-chef-ci/clone_environment_task.rb', line 23 def src_env @src_env end |