Class: R10K::SVN::Remote Private

Inherits:
Object
  • Object
show all
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

Since:

  • 1.3.0

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Method Summary collapse

Methods included from Logging

debug_formatter, default_formatter, default_outputter, #logger, #logger_name, 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.

Since:

  • 1.3.0



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

#branchesObject

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.

TODO:

gracefully handle cases where no branches exist

Since:

  • 1.3.0



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

#trunkObject

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.

TODO:

validate that the path to trunk exists in the remote

Since:

  • 1.3.0



18
19
20
# File 'lib/r10k/svn/remote.rb', line 18

def trunk
  "#{@baseurl}/trunk"
end