Class: CapistranoMulticonfigParallel::SingleAppManager
- Inherits:
-
BaseManager
- Object
- BaseManager
- CapistranoMulticonfigParallel::SingleAppManager
- Includes:
- Celluloid, Celluloid::Logger
- Defined in:
- lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb
Overview
class used to find application dependencies
Instance Attribute Summary
Attributes inherited from BaseManager
#application, #args, #argv, #condition, #default_stage, #deps, #job_registered_condition, #jobs, #manager, #name, #stage
Instance Method Summary collapse
- #deploy_single_app(options) ⇒ Object
- #run ⇒ Object
- #run_custom_command(options) ⇒ Object
- #stage_deploy(options) ⇒ Object
Methods inherited from BaseManager
#can_start?, #collect_jobs, #custom_command?, #custom_commands, #deploy_app, #fetch_multi_stages, #initialize, #multi_apps?, #process_jobs, #start
Constructor Details
This class inherits a constructor from CapistranoMulticonfigParallel::BaseManager
Instance Method Details
#deploy_single_app(options) ⇒ Object
39 40 41 42 43 44 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 39 def deploy_single_app() return if custom_command? collect_jobs() do || deploy_app() end end |
#run ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 8 def run = {} if custom_command? run_custom_command() else deploy_single_app() end process_jobs end |
#run_custom_command(options) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 18 def run_custom_command() return unless custom_command? action_name = @name if action_name == custom_commands[:stages] stage_deploy() else raise "Custom command #{@name} not available for single apps" end end |
#stage_deploy(options) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/capistrano_multiconfig_parallel/helpers/single_app_manager.rb', line 28 def stage_deploy() return unless custom_command? stages = fetch_multi_stages return if stages.blank? collect_jobs() do || stages.each do |stage| deploy_app(.merge('stage' => stage, 'action' => 'deploy')) end end end |