Class: Volley::Scm::Subversion
- Defined in:
- lib/volley/scm/subversion.rb
Instance Method Summary collapse
- #branch ⇒ Object
-
#initialize(opt = { }) ⇒ Subversion
constructor
A new instance of Subversion.
- #revision ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(opt = { }) ⇒ Subversion
Returns a new instance of Subversion.
6 7 8 9 10 |
# File 'lib/volley/scm/subversion.rb', line 6 def initialize(opt={ }) @options = { :update => false }.merge(opt) end |
Instance Method Details
#branch ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/volley/scm/subversion.rb', line 12 def branch @branch ||= begin if data["URL"] =~ /\/trunk/ "trunk" elsif data["URL"] =~ /\/branches\// m = data["URL"].match(/\/branches\/([^\/]+)\/*/) m[1] else nil end end end |
#revision ⇒ Object
25 26 27 28 29 |
# File 'lib/volley/scm/subversion.rb', line 25 def revision @revision ||= begin data["Revision"] end end |
#update ⇒ Object
31 32 33 34 35 |
# File 'lib/volley/scm/subversion.rb', line 31 def update @options.delete(:update) up = %x{svn update} @data = nil end |