Class: Rays::SVN

Inherits:
Object
  • Object
show all
Defined in:
lib/rays/services/scm.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, username, password, source_dir) ⇒ SVN

Returns a new instance of SVN.



75
76
77
78
79
80
# File 'lib/rays/services/scm.rb', line 75

def initialize path, username, password, source_dir
  @path = path
  @username = username
  @password = password
  @source_dir = source_dir
end

Instance Method Details

#checkout(dir = nil) ⇒ Object



82
83
84
85
86
# File 'lib/rays/services/scm.rb', line 82

def checkout(dir = nil)
  dir ||= @source_dir
  rays_exec("svn co #{@path} --username=#{@username} --password=#{@password} #{dir}")
  @source_dir = dir
end

#updateObject



88
89
90
# File 'lib/rays/services/scm.rb', line 88

def update
  system_exec("cd #{@source_dir} && svn up", $rays_config.debug)
end