Class: Capistrano::Rsync::Scm::Base
- Inherits:
-
Object
- Object
- Capistrano::Rsync::Scm::Base
- 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.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#create_stage_cmds ⇒ Object
Returns array of commands required to create the stage respository.
-
#get_current_revision_cmd ⇒ Object
Returns command to obtain the current revision.
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
-
#update_stage_cmds ⇒ Object
Returns array of commands required to update the stage repository and prepare it to be ready to be rsynced to rsync_cache.
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
#context ⇒ Object (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_cmds ⇒ Object
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_cmd ⇒ Object
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_cmds ⇒ Object
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 |