Module: Capistrano::CLI::Execute

Module | Capistrano::CLI::Execute
In: | lib/capistrano/cli/execute.rb lib/capistrano/cli/execute.rb

### Methods

execute! execute! execute_requested_actions execute_requested_actions

### Classes and Modules

Module Capistrano::CLI::Execute::ClassMethods

### Public Instance methods

execute!()

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.

[Source]

        # File lib/capistrano/cli/execute.rb, line 23
    23:       def execute!
    24:         config = instantiate_configuration
    25:         config.debug = options[:debug]
    26:         config.dry_run = options[:dry_run]
    27:         config.logger.level = options[:verbose]
    28:
    29:         set_pre_vars(config)
    30:         load_recipes(config)
    31:
    32:         config.trigger(:load)
    33:         execute_requested_actions(config)
    34:         config.trigger(:exit)
    35:
    36:         config
    37:       rescue Exception => error
    38:         handle_error(error)
    39:       end

execute!()

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.

[Source]

        # File lib/capistrano/cli/execute.rb, line 23
    23:       def execute!
    24:         config = instantiate_configuration
    25:         config.debug = options[:debug]
    26:         config.dry_run = options[:dry_run]
    27:         config.logger.level = options[:verbose]
    28:
    29:         set_pre_vars(config)
    30:         load_recipes(config)
    31:
    32:         config.trigger(:load)
    33:         execute_requested_actions(config)
    34:         config.trigger(:exit)
    35:
    36:         config
    37:       rescue Exception => error
    38:         handle_error(error)
    39:       end

execute_requested_actions(config)

[Source]

        # File lib/capistrano/cli/execute.rb, line 41
    41:       def execute_requested_actions(config)
    42:         Array(options[:vars]).each { |name, value| config.set(name, value) }
    43:
    44:         Array(options[:actions]).each do |action|
    45:           config.find_and_execute_task(action, :before => :start, :after => :finish)
    46:         end
    47:       end

execute_requested_actions(config)

[Source]

        # File lib/capistrano/cli/execute.rb, line 41
    41:       def execute_requested_actions(config)
    42:         Array(options[:vars]).each { |name, value| config.set(name, value) }
    43:
    44:         Array(options[:actions]).each do |action|
    45:           config.find_and_execute_task(action, :before => :start, :after => :finish)
    46:         end
    47:       end

[Validate]