openvox 8.30.0 → 8.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -1
- data/lib/puppet/face/epp.rb +1 -1
- data/lib/puppet/face/parser.rb +1 -1
- data/lib/puppet/pal/json_catalog_encoder.rb +1 -1
- data/lib/puppet/util/json.rb +15 -3
- data/lib/puppet/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ece318da56b45d387a1226f12d25f99701b1aec5c8bd24c14bfe56db28b9e664
|
|
4
|
+
data.tar.gz: a4b801c632d5c9299c7d292184f184aa153372f5c9e6a8b695a43a56d7affa76
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 317ad75eebd895d0f718250404861d3090a32569a73b4ca8afe3f09f1ce3440399d99bf0b36eb4199e364f9ffeb592a82cac37ffae59ec0c21d943eb467fcfab
|
|
7
|
+
data.tar.gz: 4b968c2474e46628e7e06d9937de4d4e7cb3738436c3353491fd9ba2b2ef2ea6624215a9c6e0bfc0a9e8599f0f486f86cd6729878107b113952adef2e16a2123
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [8.31.0](https://github.com/openvoxproject/openvox/tree/8.31.0) (2026-10-12)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.30.0...8.31.0)
|
|
8
|
+
|
|
9
|
+
**Implemented enhancements:**
|
|
10
|
+
|
|
11
|
+
- \[Backport 8.x\] Port Puppet::Util::Json to the json 3 API [\#721](https://github.com/OpenVoxProject/openvox/pull/721) ([miharp](https://github.com/miharp))
|
|
12
|
+
|
|
13
|
+
**Merged pull requests:**
|
|
14
|
+
|
|
15
|
+
- Promote puppet-runtime 2026.10.12.2 into 8.x [\#723](https://github.com/OpenVoxProject/openvox/pull/723) ([OpenVoxProjectBot](https://github.com/OpenVoxProjectBot))
|
|
16
|
+
|
|
5
17
|
## [8.30.0](https://github.com/openvoxproject/openvox/tree/8.30.0) (2026-10-07)
|
|
6
18
|
|
|
7
19
|
[Full Changelog](https://github.com/openvoxproject/openvox/compare/8.29.0...8.30.0)
|
data/Gemfile
CHANGED
data/lib/puppet/face/epp.rb
CHANGED
|
@@ -384,7 +384,7 @@ Puppet::Face.define(:epp, '0.0.1') do
|
|
|
384
384
|
pn = Puppet::Pops::Model::PNTransformer.transform(parse_result)
|
|
385
385
|
case fmt
|
|
386
386
|
when 'json'
|
|
387
|
-
options[:pretty] ? JSON.
|
|
387
|
+
options[:pretty] ? JSON.pretty_generate(pn.to_data) : JSON.dump(pn.to_data)
|
|
388
388
|
else
|
|
389
389
|
pn.format(options[:pretty] ? Puppet::Pops::PN::Indent.new(' ') : nil, output)
|
|
390
390
|
end
|
data/lib/puppet/face/parser.rb
CHANGED
|
@@ -194,7 +194,7 @@ Puppet::Face.define(:parser, '0.0.1') do
|
|
|
194
194
|
pn = Puppet::Pops::Model::PNTransformer.transform(parse_result)
|
|
195
195
|
case fmt
|
|
196
196
|
when 'json'
|
|
197
|
-
options[:pretty] ? JSON.
|
|
197
|
+
options[:pretty] ? JSON.pretty_generate(pn.to_data) : JSON.dump(pn.to_data)
|
|
198
198
|
else
|
|
199
199
|
pn.format(options[:pretty] ? Puppet::Pops::PN::Indent.new(' ') : nil, output)
|
|
200
200
|
end
|
|
@@ -58,7 +58,7 @@ class JsonCatalogEncoder
|
|
|
58
58
|
r = possibly_filtered_catalog.resource(type, title)
|
|
59
59
|
return nil if r.nil?
|
|
60
60
|
|
|
61
|
-
r.to_data_hash
|
|
61
|
+
Puppet::Util::Json.dump(r.to_data_hash, :pretty => pretty)
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
# Applies a filter for virtual resources and returns filtered catalog
|
data/lib/puppet/util/json.rb
CHANGED
|
@@ -18,6 +18,14 @@ module Puppet::Util
|
|
|
18
18
|
|
|
19
19
|
require 'json'
|
|
20
20
|
|
|
21
|
+
# Generator options equivalent to the `JSON::PRETTY_STATE_PROTOTYPE`
|
|
22
|
+
# that json 2.x provided and json 3 removed.
|
|
23
|
+
PRETTY_OPTIONS = { :indent => ' ', :space => ' ', :object_nl => "\n", :array_nl => "\n" }.freeze
|
|
24
|
+
|
|
25
|
+
# Generator options that json 3 rejects as unknown. `quirks_mode` has been
|
|
26
|
+
# a no-op since json 2.0, when quirks mode became the only mode.
|
|
27
|
+
OBSOLETE_DUMP_OPTIONS = [:quirks_mode].freeze
|
|
28
|
+
|
|
21
29
|
# Load the content from a file as JSON if
|
|
22
30
|
# contents are in valid format. This method does not
|
|
23
31
|
# raise error but returns `nil` when invalid file is
|
|
@@ -41,16 +49,20 @@ module Puppet::Util
|
|
|
41
49
|
def self.load(string, options = {})
|
|
42
50
|
string = string.read if string.respond_to?(:read)
|
|
43
51
|
|
|
52
|
+
options = options.dup
|
|
44
53
|
options[:symbolize_names] = true if options.delete(:symbolize_keys)
|
|
45
|
-
|
|
54
|
+
# json 3 only accepts parser options as keyword arguments
|
|
55
|
+
::JSON.parse(string, **options)
|
|
46
56
|
rescue JSON::ParserError => e
|
|
47
57
|
raise Puppet::Util::Json::ParseError.build(e, string)
|
|
48
58
|
end
|
|
49
59
|
|
|
50
60
|
def self.dump(object, options = {})
|
|
51
61
|
# Options is a state when we're being called recursively
|
|
52
|
-
|
|
53
|
-
options.
|
|
62
|
+
unless options.is_a?(JSON::State)
|
|
63
|
+
options = options.dup
|
|
64
|
+
OBSOLETE_DUMP_OPTIONS.each { |key| options.delete(key) }
|
|
65
|
+
options.merge!(PRETTY_OPTIONS) if options.delete(:pretty)
|
|
54
66
|
end
|
|
55
67
|
object.to_json(options)
|
|
56
68
|
end
|
data/lib/puppet/version.rb
CHANGED