Sha256: d70104368a97fc6743a21343a3857e9b294c1f1c35f8b00d271b3b36d2dc3ba9

Contents?: true

Size: 901 Bytes

Versions: 16

Compression:

Stored size: 901 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/bare'
    require 'r10k/environment/git'
    require 'r10k/environment/svn'
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
r10k-3.12.1 lib/r10k/environment.rb
r10k-3.12.0 lib/r10k/environment.rb
r10k-3.11.0 lib/r10k/environment.rb
r10k-3.10.0 lib/r10k/environment.rb
r10k-3.9.3 lib/r10k/environment.rb
r10k-3.9.2 lib/r10k/environment.rb
r10k-3.9.1 lib/r10k/environment.rb
r10k-3.9.0 lib/r10k/environment.rb
r10k-3.8.0 lib/r10k/environment.rb
r10k-3.7.0 lib/r10k/environment.rb
r10k-3.6.0 lib/r10k/environment.rb
r10k-3.5.2 lib/r10k/environment.rb
r10k-3.5.1 lib/r10k/environment.rb
r10k-3.5.0 lib/r10k/environment.rb
r10k-3.4.1 lib/r10k/environment.rb
r10k-3.4.0 lib/r10k/environment.rb