Module: Capistrano

### Home Classes Methods

### In Files

- lib/capistrano/callback.rb
- lib/capistrano/cli.rb
- lib/capistrano/cli/execute.rb
- lib/capistrano/cli/help.rb
- lib/capistrano/cli/options.rb
- lib/capistrano/cli/ui.rb
- lib/capistrano/command.rb
- lib/capistrano/configuration.rb
- lib/capistrano/configuration/actions/file_transfer.rb
- lib/capistrano/configuration/actions/inspect.rb
- lib/capistrano/configuration/actions/invocation.rb
- lib/capistrano/configuration/alias_task.rb
- lib/capistrano/configuration/callbacks.rb
- lib/capistrano/configuration/connections.rb
- lib/capistrano/configuration/execution.rb
- lib/capistrano/configuration/loading.rb
- lib/capistrano/configuration/log_formatters.rb
- lib/capistrano/configuration/namespaces.rb
- lib/capistrano/configuration/roles.rb
- lib/capistrano/configuration/servers.rb
- lib/capistrano/configuration/variables.rb
- lib/capistrano/errors.rb
- lib/capistrano/extensions.rb
- lib/capistrano/logger.rb
- lib/capistrano/processable.rb
- lib/capistrano/recipes/deploy/dependencies.rb
- lib/capistrano/recipes/deploy/local_dependency.rb
- lib/capistrano/recipes/deploy/remote_dependency.rb
- lib/capistrano/recipes/deploy/scm.rb
- lib/capistrano/recipes/deploy/scm/accurev.rb
- lib/capistrano/recipes/deploy/scm/base.rb
- lib/capistrano/recipes/deploy/scm/bzr.rb
- lib/capistrano/recipes/deploy/scm/cvs.rb
- lib/capistrano/recipes/deploy/scm/darcs.rb
- lib/capistrano/recipes/deploy/scm/git.rb
- lib/capistrano/recipes/deploy/scm/mercurial.rb
- lib/capistrano/recipes/deploy/scm/none.rb
- lib/capistrano/recipes/deploy/scm/perforce.rb
- lib/capistrano/recipes/deploy/scm/subversion.rb
- lib/capistrano/recipes/deploy/strategy.rb
- lib/capistrano/recipes/deploy/strategy/base.rb
- lib/capistrano/recipes/deploy/strategy/checkout.rb
- lib/capistrano/recipes/deploy/strategy/copy.rb
- lib/capistrano/recipes/deploy/strategy/export.rb
- lib/capistrano/recipes/deploy/strategy/remote.rb
- lib/capistrano/recipes/deploy/strategy/remote_cache.rb
- lib/capistrano/recipes/deploy/strategy/unshared_remote_cache.rb
- lib/capistrano/role.rb
- lib/capistrano/server_definition.rb
- lib/capistrano/shell.rb
- lib/capistrano/ssh.rb
- lib/capistrano/task_definition.rb
- lib/capistrano/transfer.rb
- lib/capistrano/version.rb

### Namespace

- MODULE Capistrano::Deploy
- MODULE Capistrano::Processable
- CLASS Capistrano::CLI
- CLASS Capistrano::Callback
- CLASS Capistrano::Command
- CLASS Capistrano::Configuration
- CLASS Capistrano::ProcCallback
- CLASS Capistrano::RemoteError
- CLASS Capistrano::Role
- CLASS Capistrano::SSH
- CLASS Capistrano::ServerDefinition
- CLASS Capistrano::Shell
- CLASS Capistrano::TaskCallback
- CLASS Capistrano::TaskDefinition
- CLASS Capistrano::Transfer
- CLASS Capistrano::Version

### Methods

- ::plugin
- ::remove_plugin

### Files

- help.txt

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::CLI
- Capistrano::CLI::Execute
- Capistrano::CLI::Execute::ClassMethods
- Capistrano::CLI::Help
- Capistrano::CLI::Options
- Capistrano::CLI::Options::ClassMethods
- Capistrano::CLI::UI
- Capistrano::CLI::UI::ClassMethods
- Capistrano::Callback
- Capistrano::Command
- Capistrano::Command::Tree
- Capistrano::Command::Tree::Branch
- Capistrano::Command::Tree::ConditionBranch
- Capistrano::Command::Tree::ConditionBranch::Evaluator
- Capistrano::Command::Tree::ElseBranch
- Capistrano::Configuration
- Capistrano::Configuration::Actions
- Capistrano::Configuration::Actions::FileTransfer
- Capistrano::Configuration::Actions::Inspect
- Capistrano::Configuration::Actions::Invocation
- Capistrano::Configuration::Actions::Invocation::ClassMethods
- Capistrano::Configuration::AliasTask
- Capistrano::Configuration::Callbacks
- Capistrano::Configuration::Connections
- Capistrano::Configuration::Execution
- Capistrano::Configuration::Loading
- Capistrano::Configuration::Loading::ClassMethods
- Capistrano::Configuration::LogFormatters
- Capistrano::Configuration::Namespaces
- Capistrano::Configuration::Namespaces::Namespace
- Capistrano::Configuration::Roles
- Capistrano::Configuration::Servers
- Capistrano::Configuration::Variables
- Capistrano::Deploy
- Capistrano::Deploy::Dependencies
- Capistrano::Deploy::LocalDependency
- Capistrano::Deploy::RemoteDependency
- Capistrano::Deploy::SCM
- Capistrano::Deploy::SCM::Accurev
- Capistrano::Deploy::SCM::Accurev::InternalRevision
- Capistrano::Deploy::SCM::Base
- Capistrano::Deploy::SCM::Base::LocalProxy
- Capistrano::Deploy::SCM::Bzr
- Capistrano::Deploy::SCM::Cvs
- Capistrano::Deploy::SCM::Darcs
- Capistrano::Deploy::SCM::Git
- Capistrano::Deploy::SCM::Mercurial
- Capistrano::Deploy::SCM::None
- Capistrano::Deploy::SCM::Perforce
- Capistrano::Deploy::SCM::Subversion
- Capistrano::Deploy::Strategy
- Capistrano::Deploy::Strategy::Base
- Capistrano::Deploy::Strategy::Checkout
- Capistrano::Deploy::Strategy::Copy
- Capistrano::Deploy::Strategy::Export
- Capistrano::Deploy::Strategy::Remote
- Capistrano::Deploy::Strategy::RemoteCache
- Capistrano::Deploy::Strategy::UnsharedRemoteCache
- Capistrano::ProcCallback
- Capistrano::Processable
- Capistrano::Processable::SessionAssociation
- Capistrano::RemoteError
- Capistrano::Role
- Capistrano::Role::DynamicServerList
- Capistrano::SSH
- Capistrano::ServerDefinition
- Capistrano::Shell
- Capistrano::TaskCallback
- Capistrano::TaskDefinition
- Capistrano::Transfer
- Capistrano::Transfer::SFTPTransferWrapper
- Capistrano::Version
- Kernel
- Object
- String

No matching classes.

# Capistrano

Add custom log formatters

Passing a hash or a array of hashes with custom log formatters.

Add the following to your deploy.rb or in your ~/.caprc

## Example:

    capistrano_log_formatters = [
      { :match => /command finished/,       :color => :hide,      :priority => 10, :prepend => "$$$" },
      { :match => /executing command/,      :color => :blue,      :priority => 10, :style => :underscore, :timestamp => true },
      { :match => /^transaction: commit$/,  :color => :magenta,   :priority => 10, :style => :blink },
      { :match => /git/,                    :color => :white,     :priority => 20, :style => :reverse }
    ]

    format_logs capistrano_log_formatters

You can call format_logs multiple times, with either a hash or an array of hashes.

## Colors:

:color can have the following values:

- :hide (hides the row completely)

- :none

- :black

- :red

- :green

- :yellow

- :blue

- :magenta

- :cyan

- :white

## Styles:

:style can have the following values:

- :bright

- :dim

- :underscore

- :blink

- :reverse

- :hidden

    == Text alterations

:prepend gives static text to be prepended to the output :replace replaces the matched text in the output :timestamp adds the current time before the output

Notes:

    no global verbose flag for scm_verbose
    sync, checkout and export are just sync in p4

### Constants

CaptureError
CommandError
ConnectionError
EXTENSIONS

  Holds the set of registered plugins, keyed by name (where the name is a symbol).

Error
LocalArgumentError
NoMatchingServersError
NoSuchTaskError
TransferError

### Public Class Methods

plugin(name, mod) click to toggle source

Register the given module as a plugin with the given name. It will henceforth be available via a proxy object on Configuration instances, accessible by a method with the given name.

    # File lib/capistrano/extensions.rb, line 20
    def self.plugin(name, mod)
      name = name.to_sym
      return false if EXTENSIONS.has_key?(name)

      methods = Capistrano::Configuration.public_instance_methods +
        Capistrano::Configuration.protected_instance_methods +
        Capistrano::Configuration.private_instance_methods

      if methods.any? { |m| m.to_sym == name }
        raise Capistrano::Error, "registering a plugin named `#{name}' would shadow a method on Capistrano::Configuration with the same name"
      end

      Capistrano::Configuration.class_eval       def #{name}        @__#{name}_proxy ||= Capistrano::ExtensionProxy.new(self, Capistrano::EXTENSIONS[#{name.inspect}])      end, __FILE__, __LINE__+1

      EXTENSIONS[name] = mod
      return true
    end

remove_plugin(name) click to toggle source

Unregister the plugin with the given name.

    # File lib/capistrano/extensions.rb, line 43
    def self.remove_plugin(name)
      name = name.to_sym
      if EXTENSIONS.delete(name)
        Capistrano::Configuration.send(:remove_method, name)
        return true
      end

      return false
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.