Class: Heroploy::DeployTaskLib
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Heroploy::DeployTaskLib
- Includes:
- Rake::DSL
- Defined in:
- lib/heroploy/tasks/deploy_task_lib.rb
Instance Attribute Summary collapse
-
#deploy_config ⇒ Object
Returns the value of attribute deploy_config.
Instance Method Summary collapse
- #define ⇒ Object
- #define_env_tasks ⇒ Object
- #define_fetch_task ⇒ Object
-
#initialize(deploy_config) ⇒ DeployTaskLib
constructor
A new instance of DeployTaskLib.
Constructor Details
#initialize(deploy_config) ⇒ DeployTaskLib
Returns a new instance of DeployTaskLib.
16 17 18 19 |
# File 'lib/heroploy/tasks/deploy_task_lib.rb', line 16 def initialize(deploy_config) @deploy_config = deploy_config define end |
Instance Attribute Details
#deploy_config ⇒ Object
Returns the value of attribute deploy_config.
14 15 16 |
# File 'lib/heroploy/tasks/deploy_task_lib.rb', line 14 def deploy_config @deploy_config end |
Instance Method Details
#define ⇒ Object
21 22 23 24 |
# File 'lib/heroploy/tasks/deploy_task_lib.rb', line 21 def define define_fetch_task define_env_tasks end |
#define_env_tasks ⇒ Object
33 34 35 36 37 |
# File 'lib/heroploy/tasks/deploy_task_lib.rb', line 33 def define_env_tasks deploy_config.environments.each do |env_config| EnvTaskLib.new(deploy_config, env_config) end end |
#define_fetch_task ⇒ Object
26 27 28 29 30 31 |
# File 'lib/heroploy/tasks/deploy_task_lib.rb', line 26 def define_fetch_task desc 'do a git fetch' task :fetch do git_fetch end end |