Sha256: bb26efb33463c6c7780b2f13f7f7fbc517ed2d44ac6f2b927ce35f471bf63357

Contents?: true

Size: 697 Bytes

Versions: 64

Compression:

Stored size: 697 Bytes

Contents

module PuppetX::Backend
  class SpecialDataProviderFactory < Puppet::Plugins::DataProviders::PathBasedDataProviderFactory
    def create(name, paths, parent_data_provider)
      SpecialDataProvider.new(name, paths)
    end

    def resolve_paths(datadir, declared_paths, paths, lookup_invocation)
      paths
    end
  end

  class SpecialDataProvider < Puppet::Plugins::DataProviders::PathBasedDataProvider
    def unchecked_lookup(key, lookup_invocation, merge)
      value = {
        'backend::test::param_a' => 'module data param_a is 1000',
        'backend::test::param_b' => 'module data param_b is 2000',
      }[key]
      throw :no_such_key if value.nil?
      value
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
puppet-4.10.12 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.12-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.12-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.12-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.11 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.11-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.11-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.11-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.10 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.10-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.10-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.10-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.9 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.9-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.9-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.9-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.8 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.8-x86-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.8-x64-mingw32 spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb
puppet-4.10.8-universal-darwin spec/fixtures/unit/data_providers/environments/sample/modules/backend/lib/puppet_x/backend/special_data_provider_factory.rb