Skip to content

Commit f3425a8

Browse files
committed
Replace PSON.load with JSON.parse
1 parent 383f112 commit f3425a8

6 files changed

+6
-6
lines changed

lib/puppet/type/elasticsearch_component_template.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def insync?(value)
102102

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

105-
self[:content] = PSON.load(tmp.content)
105+
self[:content] = JSON.parse(tmp.content)
106106
end
107107
end
108108
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_ilm_policy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def insync?(value)
7878

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

81-
self[:content] = PSON.load(tmp.content)
81+
self[:content] = JSON.parse(tmp.content)
8282
end
8383
end
8484
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_index_template.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def insync?(value)
109109

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

112-
self[:content] = PSON.load(tmp.content)
112+
self[:content] = JSON.parse(tmp.content)
113113
end
114114
end
115115
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_slm_policy.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def insync?(value)
7878

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

81-
self[:content] = PSON.load(tmp.content)
81+
self[:content] = JSON.parse(tmp.content)
8282
end
8383
end
8484
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_template.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def insync?(value)
110110

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

113-
self[:content] = PSON.load(tmp.content)
113+
self[:content] = JSON.parse(tmp.content)
114114
end
115115
end
116116
# rubocop:enable Style/SignalException

spec/helpers/unit/type/elasticsearch_rest_shared_examples.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
end.not_to raise_error
6666
end
6767

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

0 commit comments

Comments
 (0)