diff options
Diffstat (limited to 'lib/puppet/file_serving/metadata.rb')
-rw-r--r-- | lib/puppet/file_serving/metadata.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/puppet/file_serving/metadata.rb b/lib/puppet/file_serving/metadata.rb index 6790c1a78..848a5f963 100644 --- a/lib/puppet/file_serving/metadata.rb +++ b/lib/puppet/file_serving/metadata.rb @@ -87,29 +87,32 @@ class Puppet::FileServing::Metadata < Puppet::FileServing::Base def to_pson_data_hash { 'document_type' => 'FileMetadata', - 'data' => super['data'].update({ - 'owner' => owner, - 'group' => group, - 'mode' => mode, - 'checksum' => { - 'type' => checksum_type, - 'value' => checksum + + 'data' => super['data'].update( + { + 'owner' => owner, + 'group' => group, + 'mode' => mode, + 'checksum' => { + 'type' => checksum_type, + 'value' => checksum }, 'type' => ftype, 'destination' => destination, + }), 'metadata' => { 'api_version' => 1 } - } + } end def to_pson(*args) - to_pson_data_hash.to_pson(*args) + to_pson_data_hash.to_pson(*args) end def self.from_pson(data) - new(data.delete('path'), data) + new(data.delete('path'), data) end end |