Class: SwitchTower::SCM::Base

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

Overview

The ancestor class of the various SCM module implementations.

Direct Known Subclasses

Baz, Bzr, Cvs, Darcs, Perforce, Subversion

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Base

:nodoc:



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

def initialize(configuration) #:nodoc:
  @configuration = configuration
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



6
7
8
# File 'lib/switchtower/scm/base.rb', line 6

def configuration
  @configuration
end

Instance Method Details

#current_revision(actor) ⇒ Object



16
17
18
# File 'lib/switchtower/scm/base.rb', line 16

def current_revision(actor)
  raise "#{self.class} doesn't support querying the deployed revision"
end

#diff(actor, from = nil, to = nil) ⇒ Object



20
21
22
# File 'lib/switchtower/scm/base.rb', line 20

def diff(actor, from=nil, to=nil)
  raise "#{self.class} doesn't support diff(from, to)"
end

#latest_revisionObject



12
13
14
# File 'lib/switchtower/scm/base.rb', line 12

def latest_revision
  nil
end

#update(actor) ⇒ Object



24
25
26
# File 'lib/switchtower/scm/base.rb', line 24

def update(actor)
  raise "#{self.class} doesn't support update(actor)"
end