Files

Class/Module Index [+]

Quicksearch

Capistrano::CLI::Execute

Public Instance Methods

execute!() click to toggle source

Using the options build when the command-line was parsed, instantiate a new Capistrano configuration, initialize it, and execute the requested actions.

Returns the Configuration instance used, if successful.

# File lib/capistrano/cli/execute.rb, line 23
def execute!
  config = instantiate_configuration(options)
  config.debug = options[:debug]
  config.dry_run = options[:dry_run]
  config.preserve_roles = options[:preserve_roles]
  config.logger.level = options[:verbose]

  set_pre_vars(config)
  load_recipes(config)

  config.trigger(:load)
  execute_requested_actions(config)
  config.trigger(:exit)

  config
rescue Exception => error
  handle_error(error)
end
execute_requested_actions(config) click to toggle source
# File lib/capistrano/cli/execute.rb, line 42
def execute_requested_actions(config)
  Array(options[:vars]).each { |name, value| config.set(name, value) }

  Array(options[:actions]).each do |action|
    config.find_and_execute_task(action, :before => :start, :after => :finish)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.