Class R10K::Source::SVN
In: lib/r10k/source/svn.rb
Parent: R10K::Source::Base

This class implements a source for SVN environments.

An SVN source generates environments by enumerating the branches and trunk for a given SVN remote. SVN repositories must conform to the conventional SVN repository structure with the directories trunk/, branches/, and optionally tags/ in the root of the repository. The trunk/ directory is specifically mapped to the production environment, branches are created as environments with the name of the given branch.

@see svnbook.red-bean.com/en/1.7/svn.branchmerge.maint.html @since 1.3.0

Methods

Included Modules

R10K::Util::Setopts R10K::Logging

Attributes

password  [R]  @!attribute [r] password
  @return [String, nil] The SVN password to be passed to the underlying SVN commands
  @api private
remote  [R]  @!attribute [r] remote
  @return [String] The URL to the base directory of the SVN repository
svn_remote  [R]  @!attribute [r] svn_remote
  @api private
  @return [R10K::SVN::Remote]
username  [R]  @!attribute [r] username
  @return [String, nil] The SVN username to be passed to the underlying SVN commands
  @api private

Public Class methods

Initialize the given source.

@param name [String] The identifier for this source. @param basedir [String] The base directory where the generated environments will be created. @param options [Hash] An additional set of options for this source.

@option options [Boolean] :prefix Whether to prefix the source name to the

  environment directory names. Defaults to false.

@option options [String] :remote The URL to the base directory of the SVN repository @option options [String] :username The SVN username @option options [String] :password The SVN password

Public Instance methods

List all environments that should exist in the basedir for this source @note This is required by {R10K::Util::Basedir} @return [Array<String>]

Enumerate the environments associated with this SVN source.

@return [Array<R10K::Environment::SVN>] An array of environments created

  from this source.

Generate a list of currently available SVN environments

@todo respect environment name corrections

@api protected @return [Array<R10K::Environment::SVN>] An array of environments created

  from this source.

[Validate]