Class: Capistrano::Deploy::Strategy::Remote

### Home Classes Methods

### In Files

- lib/capistrano/recipes/deploy/strategy/remote.rb

### Parent

Capistrano::Deploy::Strategy::Base

### Methods

- #check!
- #command
- #deploy!
- #mark
- #scm_run

### 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::Deploy::Strategy::Remote

An abstract superclass, which forms the base for all deployment strategies which work by grabbing the code from the repository directly from remote host. This includes deploying by checkout (the default), and deploying by export.

### Public Instance Methods

check!() click to toggle source

    # File lib/capistrano/recipes/deploy/strategy/remote.rb, line 18
    def check!
      super.check do |d|
        d.remote.command(source.command)
      end
    end

deploy!() click to toggle source

Executes the SCM command for this strategy and writes the REVISION mark file to each host.

    # File lib/capistrano/recipes/deploy/strategy/remote.rb, line 14
    def deploy!
      scm_run "#{command} && #{mark}"
    end

### Protected Instance Methods

command() click to toggle source

An abstract method which must be overridden in subclasses, to return the actual SCM command(s) which must be executed on each target host in order to perform the deployment.

    # File lib/capistrano/recipes/deploy/strategy/remote.rb, line 39
    def command
      raise NotImplementedError, "`command' is not implemented by #{self.class.name}"
    end

mark() click to toggle source

Returns the command which will write the identifier of the revision being deployed to the REVISION file on each host.

    # File lib/capistrano/recipes/deploy/strategy/remote.rb, line 45
    def mark
      "(echo #{revision} > #{configuration[:release_path]}/REVISION)"
    end

scm_run(command) click to toggle source

Runs the given command, filtering output back through the handle_data filter of the SCM implementation.

    # File lib/capistrano/recipes/deploy/strategy/remote.rb, line 28
    def scm_run(command)
      run(command) do |ch,stream,text|
        ch[:state] ||= { :channel => ch }
        output = source.handle_data(ch[:state], stream, text)
        ch.send_data(output) if output
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.