Class: CapistranoMulticonfigParallel::DependencyTracker
- Inherits:
-
Object
- Object
- CapistranoMulticonfigParallel::DependencyTracker
- Includes:
- ApplicationHelper
- Defined in:
- lib/capistrano_multiconfig_parallel/classes/dependency_tracker.rb
Overview
class used to find application dependencies
Instance Attribute Summary collapse
-
#job_manager ⇒ Object
Returns the value of attribute job_manager.
Instance Method Summary collapse
- #fetch_apps_needed_for_deployment(application, action) ⇒ Object
-
#initialize(job_manager) ⇒ DependencyTracker
constructor
A new instance of DependencyTracker.
Methods included from ApplicationHelper
parse_task_string, strip_characters_from_string
Methods included from StagesHelper
check_stage_path, checks_paths, fetch_stages, fetch_stages_paths, stages_paths
Methods included from CoreHelper
app_configuration, app_debug_enabled?, app_logger, ask_confirm, check_terminal_tty, debug_websocket?, execute_with_rescue, find_config_type, find_loaded_gem, find_worker_log, force_confirmation, format_error, log_error, log_to_file, rescue_error, rescue_interrupt, show_warning, websocket_config, websocket_server_config
Methods included from InternalHelper
config_file, custom_commands, default_internal_config, detect_root, enable_main_log_file, find_env_multi_cap_root, internal_config_directory, internal_config_file, log_directory, main_log_file, root, try_detect_capfile
Constructor Details
#initialize(job_manager) ⇒ DependencyTracker
Returns a new instance of DependencyTracker.
9 10 11 |
# File 'lib/capistrano_multiconfig_parallel/classes/dependency_tracker.rb', line 9 def initialize(job_manager) @job_manager = job_manager end |
Instance Attribute Details
#job_manager ⇒ Object
Returns the value of attribute job_manager.
7 8 9 |
# File 'lib/capistrano_multiconfig_parallel/classes/dependency_tracker.rb', line 7 def job_manager @job_manager end |
Instance Method Details
#fetch_apps_needed_for_deployment(application, action) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/capistrano_multiconfig_parallel/classes/dependency_tracker.rb', line 13 def fetch_apps_needed_for_deployment(application, action) applications = [] return applications unless @job_manager.multi_apps? if @job_manager.custom_command? apps_selected = all_websites_return_applications_selected applications = get_applications_to_deploy(action, apps_selected) elsif app_configuration.application_dependencies.present? if application.present? applications = get_applications_to_deploy(action, [application.camelcase]) applications = applications.delete_if { |hash| hash['app'] == application } else applications = [] end else applications = [] end applications end |