Sha256: c8e8ddb3b80aa6373acbeb5c9131c3c2fd6deaf6e169101be88a0b3faab08b20

Contents?: true

Size: 627 Bytes

Versions: 39

Compression:

Stored size: 627 Bytes

Contents

require 'puppet/indirector'
require 'puppet/util/pson'

class Puppet::IndirectorTesting
  extend Puppet::Indirector
  indirects :indirector_testing

  # We should have some way to identify if we got a valid object back with the
  # current values, no?
  attr_accessor :value
  def initialize(value)
    self.value = value
  end

  PSON.register_document_type('IndirectorTesting',self)
  def self.from_pson(data)
    new(data['value'])
  end

  def to_pson
    {
      'document_type' => 'IndirectorTesting',
      'data'          => { 'value' => value },
      'metadata'      => { 'api_version' => 1 }
    }.to_pson
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
puppet-3.4.3 spec/lib/puppet/indirector_testing.rb
puppet-3.4.2 spec/lib/puppet/indirector_testing.rb
puppet-3.4.1 spec/lib/puppet/indirector_testing.rb
puppet-3.4.0 spec/lib/puppet/indirector_testing.rb
puppet-3.4.0.rc2 spec/lib/puppet/indirector_testing.rb
puppet-3.4.0.rc1 spec/lib/puppet/indirector_testing.rb
puppet-3.3.2 spec/lib/puppet/indirector_testing.rb
puppet-3.3.1 spec/lib/puppet/indirector_testing.rb
puppet-3.3.1.rc3 spec/lib/puppet/indirector_testing.rb
puppet-3.3.1.rc2 spec/lib/puppet/indirector_testing.rb
puppet-3.3.1.rc1 spec/lib/puppet/indirector_testing.rb
puppet-3.3.0 spec/lib/puppet/indirector_testing.rb
puppet-3.3.0.rc3 spec/lib/puppet/indirector_testing.rb
puppet-3.3.0.rc2 spec/lib/puppet/indirector_testing.rb
puppet-3.2.4 spec/lib/puppet/indirector_testing.rb
puppet-3.2.3 spec/lib/puppet/indirector_testing.rb
puppet-3.2.3.rc1 spec/lib/puppet/indirector_testing.rb
puppet-3.2.2 spec/lib/puppet/indirector_testing.rb
puppet-3.2.1 spec/lib/puppet/indirector_testing.rb
puppet-3.2.1.rc1 spec/lib/puppet/indirector_testing.rb