Class: Horatio::VCS::Subversion

Inherits:
Object
  • Object
show all
Includes:
Helper::VCS
Defined in:
lib/horatio/vcs/subversion.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper::VCS

#initialize

Class Method Details

.detectObject



9
10
11
# File 'lib/horatio/vcs/subversion.rb', line 9

def self.detect
  ['.svn', '.subversion'].any? { |f| File.exist?(f) }
end

Instance Method Details

#commit(file) ⇒ Object



17
18
19
# File 'lib/horatio/vcs/subversion.rb', line 17

def commit(file)
  run_sh "svn commit -m 'image release' #{file}"
end

#latest_revisionObject



13
14
15
# File 'lib/horatio/vcs/subversion.rb', line 13

def latest_revision
  sh('svnversion').first.strip.split(':')[0]
end