Sha256: 98c5334c4fde98552dd1301e79241b0317cecfe2d3613df070aa603d7affd851

Contents?: true

Size: 680 Bytes

Versions: 8

Compression:

Stored size: 680 Bytes

Contents

require_relative 'configured_data_provider'

module Puppet::Pops
module Lookup
# @api private
class EnvironmentDataProvider < ConfiguredDataProvider
  def place
    'Environment'
  end

  protected

  def assert_config_version(config)
    raise Puppet::DataBinding::LookupError, "#{config.name} cannot be used in an environment" unless config.version > 3
    config
  end

  # Return the root of the environment
  #
  # @param lookup_invocation [Invocation] The current lookup invocation
  # @return [Pathname] Path to root of the environment
  def provider_root(lookup_invocation)
    Pathname.new(lookup_invocation.scope.environment.configuration.path_to_env)
  end
end
end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
puppet-4.9.1 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.1-x86-mingw32 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.1-x64-mingw32 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.1-universal-darwin lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.0 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.0-x86-mingw32 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.0-x64-mingw32 lib/puppet/pops/lookup/environment_data_provider.rb
puppet-4.9.0-universal-darwin lib/puppet/pops/lookup/environment_data_provider.rb