Class: Rays::SCM
- Inherits:
-
Object
- Object
- Rays::SCM
- Defined in:
- lib/rays/services/scm.rb
Instance Method Summary collapse
- #checkout ⇒ Object
- #clean_checkout ⇒ Object
-
#initialize(path, username, password, type) ⇒ SCM
constructor
A new instance of SCM.
- #update ⇒ Object
Constructor Details
#initialize(path, username, password, type) ⇒ SCM
Returns a new instance of SCM.
30 31 32 33 34 35 36 37 |
# File 'lib/rays/services/scm.rb', line 30 def initialize(path, username, password, type) raise RaysException "unknown SCM type." if type.nil? if type.eql? "svn" @instance = SVN.new path, username, password, $rays_config.project_root else @instance = Git.new path, Rays::Utils::FileUtils.project_root end end |
Instance Method Details
#checkout ⇒ Object
43 44 45 |
# File 'lib/rays/services/scm.rb', line 43 def checkout @instance.checkout end |
#clean_checkout ⇒ Object
47 48 49 |
# File 'lib/rays/services/scm.rb', line 47 def clean_checkout @instance.checkout "/tmp/#{Project.instance.name}" end |
#update ⇒ Object
39 40 41 |
# File 'lib/rays/services/scm.rb', line 39 def update @instance.update end |