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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcf52c4710584e363c52de7ad3edcf6ee510cfc3117fa3bf87aa1e082f33ca56
4
- data.tar.gz: 1a2c01a5f3fe5fc187acc86b98638e44ae9840ff8d7f546f2c8ebf3d31739043
3
+ metadata.gz: ece318da56b45d387a1226f12d25f99701b1aec5c8bd24c14bfe56db28b9e664
4
+ data.tar.gz: a4b801c632d5c9299c7d292184f184aa153372f5c9e6a8b695a43a56d7affa76
5
5
  SHA512:
6
- metadata.gz: 34a0255bb2676b55da6ea8a5059074f25b578f2f70d8ed0cbf008e4ab0e30b8826a69a83688c6a8eea52c764b598edb731019eac55cb36b95f42422a40dcd9d7
7
- data.tar.gz: 6d7d4d889feb3b7495f2674c8cf1a232e03c6b7b49fde5cde13ab84062378d24069c087b0f1049a405e4551ae6999642c574ea1b55a137262ffe94fdc931bc04
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
@@ -77,7 +77,7 @@ group(:packaging) do
77
77
  gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || 'https://github.com/openvoxproject/vanagon#main')
78
78
  end
79
79
  gem 'artifactory'
80
- gem 'json', '< 3'
80
+ gem 'json', '< 4'
81
81
  gem 'octokit'
82
82
  end
83
83
 
@@ -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.pretty_unparse(pn.to_data) : JSON.dump(pn.to_data)
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
@@ -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.pretty_unparse(pn.to_data) : JSON.dump(pn.to_data)
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.to_json(:pretty => pretty)
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
@@ -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
- ::JSON.parse(string, options)
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
- if !options.is_a?(JSON::State) && options.delete(:pretty)
53
- options.merge!(::JSON::PRETTY_STATE_PROTOTYPE.to_h)
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
@@ -8,7 +8,7 @@
8
8
  # Raketasks and such to set the version based on the output of `git describe`
9
9
 
10
10
  module Puppet
11
- PUPPETVERSION = '8.30.0'
11
+ PUPPETVERSION = '8.31.0'
12
12
  IMPLEMENTATION = 'openvox'
13
13
 
14
14
  ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvox
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.30.0
4
+ version: 8.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenVox Project