Module: Capistrano

Module | Capistrano
In: | lib/capistrano/callback.rb lib/capistrano/cli/execute.rb lib/capistrano/cli/help.rb lib/capistrano/cli/options.rb lib/capistrano/cli/ui.rb lib/capistrano/cli.rb lib/capistrano/command.rb lib/capistrano/configuration/actions/file_transfer.rb lib/capistrano/configuration/actions/inspect.rb lib/capistrano/configuration/actions/invocation.rb lib/capistrano/configuration/callbacks.rb lib/capistrano/configuration/connections.rb lib/capistrano/configuration/execution.rb lib/capistrano/configuration/loading.rb lib/capistrano/configuration/namespaces.rb lib/capistrano/configuration/roles.rb lib/capistrano/configuration/servers.rb lib/capistrano/configuration/variables.rb lib/capistrano/configuration.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/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/scm.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.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 lib/capistrano/callback.rb lib/capistrano/cli/execute.rb lib/capistrano/cli/help.rb lib/capistrano/cli/options.rb lib/capistrano/cli/ui.rb lib/capistrano/cli.rb lib/capistrano/command.rb lib/capistrano/configuration/actions/file_transfer.rb lib/capistrano/configuration/actions/inspect.rb lib/capistrano/configuration/actions/invocation.rb lib/capistrano/configuration/callbacks.rb lib/capistrano/configuration/connections.rb lib/capistrano/configuration/execution.rb lib/capistrano/configuration/loading.rb lib/capistrano/configuration/namespaces.rb lib/capistrano/configuration/roles.rb lib/capistrano/configuration/servers.rb lib/capistrano/configuration/variables.rb lib/capistrano/configuration.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/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/scm.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.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

Notes:

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

### Methods

plugin plugin remove_plugin remove_plugin sessions sessions

### Classes and Modules

Module Capistrano::Deploy
Module Capistrano::Processable
Class Capistrano::CLI
Class Capistrano::Callback
Class Capistrano::CaptureError
Class Capistrano::Command
Class Capistrano::CommandError
Class Capistrano::Configuration
Class Capistrano::ConnectionError
Class Capistrano::Error
Class Capistrano::NoMatchingServersError
Class Capistrano::NoSuchTaskError
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::TransferError
Class Capistrano::Version

### Constants

EXTENSIONS | = | {} |  | Holds the set of registered plugins, keyed by name (where the name is a symbol).
EXTENSIONS | = | {} |  | Holds the set of registered plugins, keyed by name (where the name is a symbol).

### Public Class methods

plugin(name, mod)

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.

[Source]

        # File lib/capistrano/extensions.rb, line 20
    20:   def self.plugin(name, mod)
    21:     name = name.to_sym
    22:     return false if EXTENSIONS.has_key?(name)
    23:
    24:     methods = Capistrano::Configuration.public_instance_methods +
    25:       Capistrano::Configuration.protected_instance_methods +
    26:       Capistrano::Configuration.private_instance_methods
    27:
    28:     if methods.any? { |m| m.to_sym == name }
    29:       raise Capistrano::Error, "registering a plugin named `#{name}' would shadow a method on Capistrano::Configuration with the same name"
    30:     end
    31:
    32:     Capistrano::Configuration.class_eval "def \#{name}\n@__\#{name}_proxy ||= Capistrano::ExtensionProxy.new(self, Capistrano::EXTENSIONS[\#{name.inspect}])\nend\n", __FILE__, __LINE__+1
    33:
    34:     EXTENSIONS[name] = mod
    35:     return true
    36:   end

plugin(name, mod)

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.

[Source]

        # File lib/capistrano/extensions.rb, line 20
    20:   def self.plugin(name, mod)
    21:     name = name.to_sym
    22:     return false if EXTENSIONS.has_key?(name)
    23:
    24:     methods = Capistrano::Configuration.public_instance_methods +
    25:       Capistrano::Configuration.protected_instance_methods +
    26:       Capistrano::Configuration.private_instance_methods
    27:
    28:     if methods.any? { |m| m.to_sym == name }
    29:       raise Capistrano::Error, "registering a plugin named `#{name}' would shadow a method on Capistrano::Configuration with the same name"
    30:     end
    31:
    32:     Capistrano::Configuration.class_eval "def \#{name}\n@__\#{name}_proxy ||= Capistrano::ExtensionProxy.new(self, Capistrano::EXTENSIONS[\#{name.inspect}])\nend\n", __FILE__, __LINE__+1
    33:
    34:     EXTENSIONS[name] = mod
    35:     return true
    36:   end

remove_plugin(name)

Unregister the plugin with the given name.

[Source]

        # File lib/capistrano/extensions.rb, line 44
    44:   def self.remove_plugin(name)
    45:     name = name.to_sym
    46:     if EXTENSIONS.delete(name)
    47:       Capistrano::Configuration.send(:remove_method, name)
    48:       return true
    49:     end
    50:
    51:     return false
    52:   end

remove_plugin(name)

Unregister the plugin with the given name.

[Source]

        # File lib/capistrano/extensions.rb, line 44
    44:   def self.remove_plugin(name)
    45:     name = name.to_sym
    46:     if EXTENSIONS.delete(name)
    47:       Capistrano::Configuration.send(:remove_method, name)
    48:       return true
    49:     end
    50:
    51:     return false
    52:   end

### Public Instance methods

sessions()

All open sessions, needed to satisfy the Command::Processable include

[Source]

         # File lib/capistrano/shell.rb, line 259
    259:     def sessions
    260:       configuration.sessions.values
    261:     end

sessions()

All open sessions, needed to satisfy the Command::Processable include

[Source]

         # File lib/capistrano/shell.rb, line 259
    259:     def sessions
    260:       configuration.sessions.values
    261:     end

[Validate]