Class: Capistrano::SCM

### Home Classes Methods

### In Files

- lib/capistrano/scm.rb

### Parent

Object

### Methods

- ::new
- #check
- #clone
- #fetch
- #fetch_revision
- #release
- #release_path
- #repo_path
- #repo_url
- #test
- #test!
- #update

### Files

- Capfile
- Capfile

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::Application
- Capistrano::Configuration
- Capistrano::Configuration::Filter
- Capistrano::Configuration::Question
- Capistrano::Configuration::Server
- Capistrano::Configuration::Server::Properties
- Capistrano::Configuration::Servers
- Capistrano::DSL
- Capistrano::DSL::Env
- Capistrano::DSL::Paths
- Capistrano::DSL::Stages
- Capistrano::Git
- Capistrano::Git::DefaultStrategy
- Capistrano::Hg
- Capistrano::Hg::DefaultStrategy
- Capistrano::SCM
- Capistrano::Svn
- Capistrano::Svn::DefaultStrategy
- Capistrano::TaskEnhancements
- Capistrano::UploadTask
- Capistrano::VersionValidator
- Object

No matching classes.

# Capistrano::SCM

Base class for SCM strategy providers.

@abstract

@attr_reader [Rake] context

@author Hartog de Mik

### Attributes

context[R]

### Public Class Methods

new(context, strategy) click to toggle source

Provide a wrapper for the SCM that loads a strategy for the user.

@param [Rake] context The context in which the strategy should run @param [Module] strategy A module to include into the SCM instance. The

    module should provide the abstract methods of Capistrano::SCM

    # File lib/capistrano/scm.rb, line 20
    def initialize(context, strategy)
      @context = context
      singleton = class << self; self; end
      singleton.send(:include, strategy)
    end

### Public Instance Methods

check() click to toggle source

@abstract

Your implementation should check if the specified remote-repository is available.

@return [Boolean]

    # File lib/capistrano/scm.rb, line 74
    def check
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #check method"
      )
    end

clone() click to toggle source

@abstract

Create a (new) clone of the remote-repository on the deployment target

@return void

    # File lib/capistrano/scm.rb, line 86
    def clone
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #clone method"
      )
    end

fetch(*args) click to toggle source

Fetch a var from the context @param [Symbol] variable The variable to fetch @param [Object] default The default value if not found

    # File lib/capistrano/scm.rb, line 50
    def fetch(*args)
      context.fetch(*args)
    end

fetch_revision() click to toggle source

@abstract

Identify the SHA of the commit that will be deployed. This will most likely involve SshKit's capture method.

@return void

    # File lib/capistrano/scm.rb, line 122
    def fetch_revision
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #fetch_revision method"
      )
    end

release() click to toggle source

@abstract

Copy the contents of the cache-repository onto the release path

@return void

    # File lib/capistrano/scm.rb, line 110
    def release
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #release method"
      )
    end

release_path() click to toggle source

The release path according to the context

    # File lib/capistrano/scm.rb, line 42
    def release_path
      context.release_path
    end

repo_path() click to toggle source

The repository path according to the context

    # File lib/capistrano/scm.rb, line 37
    def repo_path
      context.repo_path
    end

repo_url() click to toggle source

The repository URL according to the context

    # File lib/capistrano/scm.rb, line 32
    def repo_url
      context.repo_url
    end

test() click to toggle source

@abstract

Your implementation should check the existence of a cache repository on the deployment target

@return [Boolean]

    # File lib/capistrano/scm.rb, line 61
    def test
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #test method"
      )
    end

test!(*args) click to toggle source

Call test in context

    # File lib/capistrano/scm.rb, line 27
    def test!(*args)
      context.test *args
    end

update() click to toggle source

@abstract

Update the clone on the deployment target

@return void

    # File lib/capistrano/scm.rb, line 98
    def update
      raise NotImplementedError.new(
        "Your SCM strategy module should provide a #update method"
      )
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.