Sha256: 994568e8e96e00acf157eed8e5c5ca77c5f8e509f30fba02c2f7cf633ff84859

Contents?: true

Size: 977 Bytes

Versions: 10

Compression:

Stored size: 977 Bytes

Contents

module R10K
  module Environment
    def self.factory
      @factory ||= R10K::KeyedFactory.new
    end

    def self.register(key, klass)
      factory.register(key, klass)
    end

    def self.retrieve(key)
      factory.retrieve(key)
    end

    def self.generate(type, name, basedir, dirname, options = {})
      factory.generate(type, name, basedir, dirname, options)
    end

    def self.from_hash(name, hash)
      R10K::Util::SymbolizeKeys.symbolize_keys!(hash)

      basedir = hash.delete(:basedir)
      dirname = hash.delete(:dirname) || name

      type = hash.delete(:type)
      type = type.is_a?(String) ? type.to_sym : type

      generate(type, name, basedir, dirname, hash)
    end

    require 'r10k/environment/base'
    require 'r10k/environment/with_modules'
    require 'r10k/environment/plain'
    require 'r10k/environment/bare'
    require 'r10k/environment/git'
    require 'r10k/environment/svn'
    require 'r10k/environment/tarball'
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
r10k-3.16.0 lib/r10k/environment.rb
r10k-3.15.4 lib/r10k/environment.rb
r10k-3.15.3 lib/r10k/environment.rb
r10k-3.15.2 lib/r10k/environment.rb
r10k-3.15.1 lib/r10k/environment.rb
r10k-3.15.0 lib/r10k/environment.rb
akerl-r10k-3.14.2.1 lib/r10k/environment.rb
r10k-3.14.2 lib/r10k/environment.rb
r10k-3.14.1 lib/r10k/environment.rb
r10k-3.14.0 lib/r10k/environment.rb