Class: CapistranoMulticonfigParallel::Application
- Inherits:
-
Capistrano::Application
- Object
- Capistrano::Application
- CapistranoMulticonfigParallel::Application
- Defined in:
- lib/capistrano_multiconfig_parallel/application.rb
Overview
class used as a wrapper around capistrano
Instance Method Summary collapse
- #multi_apps? ⇒ Boolean
- #multi_debug ⇒ Object
- #multi_manager_class ⇒ Object
- #multi_progress ⇒ Object
- #multi_secvential ⇒ Object
- #name ⇒ Object
- #sort_options(options) ⇒ Object
- #top_level ⇒ Object
Instance Method Details
#multi_apps? ⇒ Boolean
49 50 51 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 49 def multi_apps? stages.find { |stage| stage.include?(':') }.present? end |
#multi_debug ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 12 def multi_debug ['--multi-debug', '-D', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel::CelluloidManager.debug_enabled = true Celluloid.task_class = Celluloid::TaskThread end ] end |
#multi_manager_class ⇒ Object
53 54 55 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 53 def multi_manager_class multi_apps? ? CapistranoMulticonfigParallel::MultiAppManager : CapistranoMulticonfigParallel::SingleAppManager end |
#multi_progress ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 22 def multi_progress ['--multi-progress', '--multi-progress', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel.show_task_progress = true end ] end |
#multi_secvential ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 31 def multi_secvential ['--multi-secvential', '--multi-secvential', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel.execute_in_sequence = true end ] end |
#name ⇒ Object
4 5 6 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 4 def name 'multi_cap' end |
#sort_options(options) ⇒ Object
8 9 10 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 8 def () super.push(multi_debug, multi_progress, multi_secvential) end |
#top_level ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/capistrano_multiconfig_parallel/application.rb', line 40 def top_level job_manager = multi_manager_class.new(self, top_level_tasks, stages) if job_manager.can_start? && !.show_prereqs && !.show_tasks job_manager.start else super end end |