Class: Capistrano::Rsync::Scm::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/rsync/scm/base.rb

Overview

Abstract class to be inherited with the abstract methods to be implemented. Provides the capistrano context.

Direct Known Subclasses

Git, Svn

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.



10
11
12
# File 'lib/capistrano/rsync/scm/base.rb', line 10

def initialize(context)
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



8
9
10
# File 'lib/capistrano/rsync/scm/base.rb', line 8

def context
  @context
end

Instance Method Details

#create_stage_cmdsObject

Returns array of commands required to create the stage respository. Skipped if rsync_stage directory already exists.



21
22
23
# File 'lib/capistrano/rsync/scm/base.rb', line 21

def create_stage_cmds
  throw NotImplementedError
end

#get_current_revision_cmdObject

Returns command to obtain the current revision



15
16
17
# File 'lib/capistrano/rsync/scm/base.rb', line 15

def get_current_revision_cmd
  throw NotImplementedError
end

#update_stage_cmdsObject

Returns array of commands required to update the stage repository and prepare it to be ready to be rsynced to rsync_cache.

Commands will be executed in the rsync_stage directory.



29
30
31
# File 'lib/capistrano/rsync/scm/base.rb', line 29

def update_stage_cmds
  throw NotImplementedError
end