Skip to content

Commit

Permalink
Replace PSON with JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
h-haaks committed Feb 20, 2024
1 parent b83ed3e commit 77ee756
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/type/elasticsearch_component_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def insync?(value)

fail(format('Could not find any content at %s', self[:source])) unless tmp

self[:content] = PSON.load(tmp.content)
self[:content] = JSON.load(tmp.content)

Check failure on line 105 in lib/puppet/type/elasticsearch_component_template.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Security/JSONLoad: Prefer `JSON.parse` over `JSON.load`. (https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load)
end
end
# rubocop:enable Style/SignalException
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/elasticsearch_ilm_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def insync?(value)

fail(format('Could not find any content at %s', self[:source])) unless tmp

self[:content] = PSON.load(tmp.content)
self[:content] = JSON.load(tmp.content)

Check failure on line 81 in lib/puppet/type/elasticsearch_ilm_policy.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Security/JSONLoad: Prefer `JSON.parse` over `JSON.load`. (https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load)
end
end
# rubocop:enable Style/SignalException
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/elasticsearch_index_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def insync?(value)

fail(format('Could not find any content at %s', self[:source])) unless tmp

self[:content] = PSON.load(tmp.content)
self[:content] = JSON.load(tmp.content)

Check failure on line 112 in lib/puppet/type/elasticsearch_index_template.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Security/JSONLoad: Prefer `JSON.parse` over `JSON.load`. (https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load)
end
end
# rubocop:enable Style/SignalException
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/elasticsearch_slm_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def insync?(value)

fail(format('Could not find any content at %s', self[:source])) unless tmp

self[:content] = PSON.load(tmp.content)
self[:content] = JSON.load(tmp.content)

Check failure on line 81 in lib/puppet/type/elasticsearch_slm_policy.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Security/JSONLoad: Prefer `JSON.parse` over `JSON.load`. (https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load)
end
end
# rubocop:enable Style/SignalException
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/elasticsearch_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def insync?(value)

fail(format('Could not find any content at %s', self[:source])) unless tmp

self[:content] = PSON.load(tmp.content)
self[:content] = JSON.load(tmp.content)

Check failure on line 113 in lib/puppet/type/elasticsearch_template.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Security/JSONLoad: Prefer `JSON.parse` over `JSON.load`. (https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load)
end
end
# rubocop:enable Style/SignalException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
end.not_to raise_error
end

it 'parses PSON-like values for certain types' do
it 'parses JSON-like values for certain types' do
expect(described_class.new(
:name => resource_name,
meta_property => { 'key' => { 'value' => '0', 'other' => true } }
Expand Down

0 comments on commit 77ee756

Please sign in to comment.