puppet-resource_api 1.8.18 → 1.9.2

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: 3c0c670133fdc323f0924bf231fd59eb1d07f27ef17919b853275d0fb7cf0104
4
- data.tar.gz: f99601ad94f6d186d981efbc7b5b4ca77bc3b599ad8b8093aa669bf7454112b0
3
+ metadata.gz: f040155a6bb7bd8575bcc81e0a9c7a54c663e4e2419d60ec835d744ec49a0abd
4
+ data.tar.gz: 7020756cafa3f28cab07d5363e5325f7a824e4e0dac252a6c38004972c27ec9f
5
5
  SHA512:
6
- metadata.gz: 6ca81ef748e1ec292255f775922c68664360d59590c677da0cdc19fb001ea703ff89d924018e26a24234c2aebe2e3cdee2cd54250e6646daae1785f14c53df5f
7
- data.tar.gz: 143368873f583691dd5afe77e96a64008b8565eb5e1d5820b5a3c549c00954b647afa5ca67e8245c2cca7facd76288f35df91e4def3690d1e06bef5058af5c21
6
+ metadata.gz: b092384ea009b7d41ae56b0f4503ced423fc9b6cb30a243bdf4a961551f09b0d7d58941ccc68438e0094c6a8c4714a01038298470e1c707e1564b5b174c3402a
7
+ data.tar.gz: 2c903d9c06b36c4ed33326f1e276bb98a6e74857a328247e17c18a3b3428e2753a8a8014126e508d9930a5b4cd38fef3cf7d51be32e20e447900638765658cc7
data/CHANGELOG.md CHANGED
@@ -2,19 +2,47 @@
2
2
 
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
+ ## [1.9.2](https://github.com/puppetlabs/puppet-resource_api/tree/1.9.2) (2026-05-18)
5
6
 
6
- ## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) (2023-07-17)
7
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.9.1...1.9.2)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - \(PA-8346\): Preserve sensitive parameters [\#384](https://github.com/puppetlabs/puppet-resource_api/pull/384) ([joshcooper](https://github.com/joshcooper))
12
+
13
+ ## [1.9.1](https://github.com/puppetlabs/puppet-resource_api/tree/1.9.1) (2025-12-17)
14
+
15
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.9.0...1.9.1)
16
+
17
+ **Fixed bugs:**
18
+
19
+ - \(MODULES-11462\): Implement finish method for class tag inheritance in Puppet::ResourceApi in 1.9.0 branch [\#381](https://github.com/puppetlabs/puppet-resource_api/pull/381) ([span786](https://github.com/span786))
20
+
21
+ ## [1.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/1.9.0) (2023-08-08)
22
+
23
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.18...1.9.0)
24
+
25
+ **Implemented enhancements:**
26
+
27
+ - \(CAT-761\) Add custom\_generate as a feature [\#316](https://github.com/puppetlabs/puppet-resource_api/pull/316) ([david22swan](https://github.com/david22swan))
28
+
29
+ ## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) (2023-07-21)
7
30
 
8
31
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.16...1.8.18)
9
32
 
10
33
  **Merged pull requests:**
11
34
 
12
- - \(PA-5641\) Add release job via PR [\#321](https://github.com/puppetlabs/puppet-resource_api/pull/321) [\#322](https://github.com/puppetlabs/puppet-resource_api/pull/322) [\#323](https://github.com/puppetlabs/puppet-resource_api/pull/323) ([tvpartytonight](https://github.com/tvpartytonight))
13
- - Remove old Ruby logic from Gemfile [\#320](https://github.com/puppetlabs/puppet-resource_api/pull/320) ([mhashizume](https://github.com/mhashizume))
35
+ - \(PA-5641\) Release only to rubygems, do not bump and release [\#326](https://github.com/puppetlabs/puppet-resource_api/pull/326) ([tvpartytonight](https://github.com/tvpartytonight))
36
+ - \(PA-5641\) Prep for 1.8.18 release [\#324](https://github.com/puppetlabs/puppet-resource_api/pull/324) ([tvpartytonight](https://github.com/tvpartytonight))
37
+ - \(PA-5641\) Use new organizational token for rubygem pushing [\#323](https://github.com/puppetlabs/puppet-resource_api/pull/323) ([tvpartytonight](https://github.com/tvpartytonight))
38
+ - \(PA-5641\) prefer auto-generated GITHUB\_TOKEN [\#322](https://github.com/puppetlabs/puppet-resource_api/pull/322) ([tvpartytonight](https://github.com/tvpartytonight))
39
+ - \(PA-5641\) Add release job via PR [\#321](https://github.com/puppetlabs/puppet-resource_api/pull/321) ([tvpartytonight](https://github.com/tvpartytonight))
40
+ - \(maint\) Remove old Ruby logic from Gemfile [\#320](https://github.com/puppetlabs/puppet-resource_api/pull/320) ([mhashizume](https://github.com/mhashizume))
14
41
  - \(PA-4639\) Migrate away from AppVeyor [\#319](https://github.com/puppetlabs/puppet-resource_api/pull/319) ([mhashizume](https://github.com/mhashizume))
15
- - Don't require git [\#318](https://github.com/puppetlabs/puppet-resource_api/pull/318) ([joshcooper](https://github.com/joshcooper))
42
+ - \(maint\) Don't require git [\#318](https://github.com/puppetlabs/puppet-resource_api/pull/318) ([joshcooper](https://github.com/joshcooper))
16
43
  - \(PA-5641\) Update rspec tests with modern Ruby [\#317](https://github.com/puppetlabs/puppet-resource_api/pull/317) ([mhashizume](https://github.com/mhashizume))
17
- - Update to Mend [\#311](https://github.com/puppetlabs/puppet-resource_api/pull/311) ([cthorn42](https://github.com/cthorn42))
44
+ - \(maint\) Update to Mend [\#311](https://github.com/puppetlabs/puppet-resource_api/pull/311) ([cthorn42](https://github.com/cthorn42))
45
+ - \(packaging\) Bump to version '1.8.17' \[no-promote\] [\#301](https://github.com/puppetlabs/puppet-resource_api/pull/301) ([tvpartytonight](https://github.com/tvpartytonight))
18
46
 
19
47
  ## [1.8.16](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.16) (2022-10-03)
20
48
 
@@ -36,7 +36,7 @@ module Puppet::ResourceApi
36
36
  Puppet::ResourceApi::DataTypeHandling.validate_ensure(definition)
37
37
 
38
38
  definition[:features] ||= []
39
- supported_features = %w[supports_noop canonicalize custom_insync remote_resource simple_get_filter].freeze
39
+ supported_features = %w[supports_noop canonicalize custom_insync remote_resource simple_get_filter custom_generate].freeze
40
40
  unknown_features = definition[:features] - supported_features
41
41
  Puppet.warning("Unknown feature detected: #{unknown_features.inspect}") unless unknown_features.empty?
42
42
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Puppet
4
4
  module ResourceApi
5
- VERSION = '1.8.18'
5
+ VERSION = '1.9.2'
6
6
  end
7
7
  end
@@ -104,9 +104,31 @@ module Puppet::ResourceApi
104
104
  end
105
105
  end
106
106
 
107
+ attributes[:sensitive_parameters] = sensitives unless sensitives.empty?
107
108
  super(attributes)
108
109
  end
109
110
 
111
+ # Override finish method to ensure scope tags (like class names) are properly inherited
112
+ # This is called after the resource is added to the catalog and containment is established
113
+ def finish
114
+ super if defined?(super)
115
+ return unless @catalog
116
+
117
+ # Use pathbuilder to tag all containing classes
118
+ # Pathbuilder returns the containment hierarchy; class names appear as plain strings
119
+ # while other resources have the format "Type[title]"
120
+ return unless respond_to?(:pathbuilder)
121
+
122
+ pathbuilder.each do |container|
123
+ next unless container.is_a?(String)
124
+
125
+ # Classes don't contain '[' or ']' characters, resources do
126
+ # Classes: "Test::Modules_11462", "Settings"
127
+ # Resources: "Stage[main]", "Firewall[001 test rule]"
128
+ tag(container) unless container.include?('[')
129
+ end
130
+ end
131
+
110
132
  def name
111
133
  title
112
134
  end
@@ -136,6 +158,23 @@ module Puppet::ResourceApi
136
158
  @rsapi_canonicalized_target_state
137
159
  end
138
160
 
161
+ # Method is used to custom generate resources which are then applied by Puppet
162
+ def generate
163
+ # If feature `custom_generate` has been set then call the generate function within the provider and return the given results
164
+ return unless type_definition&.feature?('custom_generate')
165
+ should_hash = rsapi_canonicalized_target_state
166
+ is_hash = rsapi_current_state
167
+ title = rsapi_title
168
+
169
+ # Ensure that a custom `generate` method has been created within the provider
170
+ raise(Puppet::DevError, 'No generate method found within the types provider') unless my_provider.respond_to?(:generate)
171
+ # Call the providers custom `generate` method
172
+ rules_resources = my_provider.generate(context, title, is_hash, should_hash)
173
+
174
+ # Return array of resources
175
+ rules_resources
176
+ end
177
+
139
178
  def rsapi_current_state
140
179
  refresh_current_state unless @rsapi_current_state
141
180
  @rsapi_current_state
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-resource_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.18
4
+ version: 1.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Schmitt
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-07-21 00:00:00.000000000 Z
10
+ date: 2026-05-18 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: hocon
@@ -24,7 +23,6 @@ dependencies:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
25
  version: '1.0'
27
- description:
28
26
  email:
29
27
  - david.schmitt@puppet.com
30
28
  executables: []
@@ -68,7 +66,6 @@ homepage: https://github.com/puppetlabs/puppet-resource_api
68
66
  licenses:
69
67
  - Apache-2.0
70
68
  metadata: {}
71
- post_install_message:
72
69
  rdoc_options: []
73
70
  require_paths:
74
71
  - lib
@@ -83,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
80
  - !ruby/object:Gem::Version
84
81
  version: '0'
85
82
  requirements: []
86
- rubygems_version: 3.0.3
87
- signing_key:
83
+ rubygems_version: 3.6.3
88
84
  specification_version: 4
89
85
  summary: This library provides a simple way to write new native resources for puppet.
90
86
  test_files: []