Method: R10K::Source::Git#initialize

Defined in:
lib/r10k/source/git.rb

#initialize(name, basedir, options = {}) ⇒ Git

Initialize the given source.

Parameters:

  • name (String)

    The identifier for this source.

  • basedir (String)

    The base directory where the generated environments will be created.

  • options (Hash) (defaults to: {})

    An additional set of options for this source.

Options Hash (options):

  • :prefix (Boolean, String)

    If a String this becomes the prefix. If true, will use the source name as the prefix. Defaults to false for no environment prefix.

  • :remote (String)

    The URL to the base directory of the SVN repository

  • :remote (Hash)

    Additional settings that configure how the source should behave.

Since:

  • 1.3.0



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/r10k/source/git.rb', line 56

def initialize(name, basedir, options = {})
  super

  @environments = []

  @remote = options[:remote]
  @invalid_branches = (options[:invalid_branches] || 'correct_and_warn')
  @ignore_branch_prefixes = options[:ignore_branch_prefixes]

  @cache  = R10K::Git.cache.generate(@remote)
end