module CapistranoMulticonfigParallel
base module that has the statis methods that this gem is using
Returns the version of the currently loaded gem as a Gem::Version
Constants
- GITFLOW_CALCULATE_TAG_TASK
- GITFLOW_TAG_STAGING_TASK
- GITFLOW_VERIFY_UPTODATE_TASK
Attributes
config[RW]
config_keys[RW]
logger[RW]
original_args[RW]
Public Class Methods
configuration()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 15 def configuration @config ||= fetch_configuration @config end
configuration_flags()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 24 def configuration_flags default_internal_config.each_with_object({}) do |array_item, hash| key = array_item[0].to_s value = get_prop_config(key, configuration) hash[key] = value.is_a?(Array) ? value.join(',') : value hash end.except('application_dependencies') end
enable_logging()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 33 def enable_logging enable_file_logging set_celluloid_exception_handling end
env_job_key_id()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 20 def env_job_key_id CapistranoSentinel::RequestHooks::ENV_KEY_JOB_ID end
gem_version()
click to toggle source
# File lib/capistrano_multiconfig_parallel/version.rb, line 3 def self.gem_version Gem::Version.new VERSION::STRING end
original_args_hash()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 38 def original_args_hash multi_fetch_argv((original_args || ARGV).dup) end
Private Class Methods
enable_file_logging()
click to toggle source
# File lib/capistrano_multiconfig_parallel/base.rb, line 63 def enable_file_logging if configuration.multi_debug.to_s.downcase == 'true' enable_main_log_file self.logger = ::Logger.new(main_log_file) else self.logger ||= ::Logger.new(DevNull.new) end end
set_celluloid_exception_handling()
click to toggle source
def capistrano_version
find_loaded_gem_property('capistrano', 'version')
end
def capistrano_version_2?
capistrano_version.blank? ? false : verify_gem_version(capistrano_version, '3.0', operator: '<')
end
# File lib/capistrano_multiconfig_parallel/base.rb, line 53 def set_celluloid_exception_handling Celluloid.logger = logger Celluloid.task_class = defined?(Celluloid::TaskThread) ? Celluloid::TaskThread : Celluloid::Task::Threaded Celluloid.exception_handler do |ex| unless ex.is_a?(Interrupt) || ex.is_a?(SystemExit) || ex.is_a?(CapistranoMulticonfigParallel::TaskFailed) rescue_error(ex, 'stderr') end end end