Class: R10K::SVN::Remote

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/r10k/svn/remote.rb

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Method Summary collapse

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

#branchesObject

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

#trunkObject

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