Class: R10K::SVN::Remote
- Inherits:
-
Object
- Object
- R10K::SVN::Remote
- Includes:
- Logging
- Defined in:
- lib/r10k/svn/remote.rb
Constant Summary
Constants included from Logging
Instance Method Summary collapse
- #branches ⇒ Object
-
#initialize(baseurl) ⇒ Remote
constructor
A new instance of Remote.
- #trunk ⇒ Object
Methods included from Logging
formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level
Constructor Details
#initialize(baseurl) ⇒ Remote
Returns a new instance of Remote.
5 6 7 |
# File 'lib/r10k/svn/remote.rb', line 5 def initialize(baseurl) @baseurl = baseurl end |
Instance Method Details
#branches ⇒ Object
TODO:
gracefully handle cases where no branches exist
15 16 17 18 19 20 21 22 |
# File 'lib/r10k/svn/remote.rb', line 15 def branches text = svn ['ls', "#{@baseurl}/branches"] text.lines.map do |line| line.chomp! line.gsub!(%r[/$], '') line end end |
#trunk ⇒ Object
TODO:
validate that the path to trunk exists in the remote
10 11 12 |
# File 'lib/r10k/svn/remote.rb', line 10 def trunk "#{@baseurl}/trunk" end |