Class: R10K::Deployment::Source Private

Inherits:
Object
  • Object
show all
Defined in:
lib/r10k/deployment/source.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.

:nocov:

Class Method Summary collapse

Class Method Details

.new(name, remote, basedir, prefix) ⇒ 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.



33
34
35
# File 'lib/r10k/deployment/source.rb', line 33

def self.new(name, remote, basedir, prefix)
  R10K::Source::Git.new(name, basedir, {:prefix => prefix, :remote => remote})
end

.vivify(name, attrs) ⇒ R10K::Source::Base

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.

Deprecated.

Create a new source from a hash representation

Parameters:

  • name (String)

    The name of the source

  • opts (Hash)

    The properties to use for the source

Returns:

Raises:

  • (ArgumentError)


20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/r10k/deployment/source.rb', line 20

def self.vivify(name, attrs)

  attrs.extend R10K::Util::CoreExt::HashExt::SymbolizeKeys
  attrs.symbolize_keys!

  remote  = attrs.delete(:remote)
  basedir = attrs.delete(:basedir)
  prefix  = attrs.delete(:prefix)

  raise ArgumentError, "Unrecognized attributes for #{self.name}: #{attrs.inspect}" unless attrs.empty?
  new(name, remote, basedir, prefix)
end