Class: R10K::SVN::Remote Private
- Inherits:
-
Object
- Object
- R10K::SVN::Remote
- Includes:
- Logging, Util::Setopts
- Defined in:
- lib/r10k/svn/remote.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Inspect and interact with SVN remote repositories
Constant Summary
Constants included from Logging
Instance Method Summary collapse
- #branches ⇒ Object private
-
#initialize(baseurl, opts = {}) ⇒ Remote
constructor
private
A new instance of Remote.
- #trunk ⇒ Object private
Methods included from Logging
formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level
Constructor Details
#initialize(baseurl, opts = {}) ⇒ Remote
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Remote.
12 13 14 15 |
# File 'lib/r10k/svn/remote.rb', line 12 def initialize(baseurl, opts = {}) @baseurl = baseurl setopts(opts, {:username => :self, :password => :self}) end |
Instance Method Details
#branches ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
gracefully handle cases where no branches exist
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/r10k/svn/remote.rb', line 23 def branches argv = ['ls', "#{@baseurl}/branches"] argv.concat(auth) text = svn(argv) text.lines.map do |line| line.chomp! line.gsub!(%r[/$], '') line end end |
#trunk ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
validate that the path to trunk exists in the remote
18 19 20 |
# File 'lib/r10k/svn/remote.rb', line 18 def trunk "#{@baseurl}/trunk" end |