puppet-resource_api 1.8.18 → 2.0.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: 3c0c670133fdc323f0924bf231fd59eb1d07f27ef17919b853275d0fb7cf0104
4
- data.tar.gz: f99601ad94f6d186d981efbc7b5b4ca77bc3b599ad8b8093aa669bf7454112b0
3
+ metadata.gz: 7a48e0eaa8e29f85ccff8b789e7975f868168fba24d1b06947886129ab395900
4
+ data.tar.gz: f65bcaf44dc9daff85b7c0d5d8f9c54382f4553b393ea49d9cca45ca451c0fa5
5
5
  SHA512:
6
- metadata.gz: 6ca81ef748e1ec292255f775922c68664360d59590c677da0cdc19fb001ea703ff89d924018e26a24234c2aebe2e3cdee2cd54250e6646daae1785f14c53df5f
7
- data.tar.gz: 143368873f583691dd5afe77e96a64008b8565eb5e1d5820b5a3c549c00954b647afa5ca67e8245c2cca7facd76288f35df91e4def3690d1e06bef5058af5c21
6
+ metadata.gz: c029faae370d209d286b91468cf96dd879697d0e48836f3ea8088df79315aae65f9d91a59ff28303b86af0cf4bd49c7d119be5d27fdf5b5238ccdfcb88e7936e
7
+ data.tar.gz: 74df2d8e1b9e03f3d8860554bbacfc0826f627a65575a73b7927b438072d0e506624552dd2bea6ed214570cf89cfc9ffc98898ddb9fb353e7272075963a6e50c
data/CHANGELOG.md CHANGED
@@ -1,22 +1,55 @@
1
+ <!-- markdownlint-disable MD024 -->
1
2
  # Changelog
2
3
 
3
- All significant changes to this repo will be summarized in this file.
4
+ All notable changes to this project will be documented in this file.
4
5
 
6
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
5
7
 
6
- ## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) (2023-07-17)
8
+ ## [v2.0.0](https://github.com/puppetlabs/puppet-resource_api/tree/v2.0.0) - 2025-03-13
9
+
10
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.9.0...v2.0.0)
11
+
12
+ ### Changed
13
+
14
+ - (CAT-2254) Remove puppet 7 / Ruby 2.7 related code [#368](https://github.com/puppetlabs/puppet-resource_api/pull/368) ([LukasAud](https://github.com/LukasAud))
15
+
16
+ ### Added
17
+
18
+ - Provider get() call optimization [#306](https://github.com/puppetlabs/puppet-resource_api/pull/306) ([seanmil](https://github.com/seanmil))
19
+
20
+ ### Fixed
21
+
22
+ - Fix instances method with simple_get_filter [#304](https://github.com/puppetlabs/puppet-resource_api/pull/304) ([seanmil](https://github.com/seanmil))
23
+ - SimpleProvider name fixes [#302](https://github.com/puppetlabs/puppet-resource_api/pull/302) ([seanmil](https://github.com/seanmil))
24
+ - Various Rubocop fixes
25
+
26
+ ## [1.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/1.9.0) - 2023-08-08
27
+
28
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.18...1.9.0)
29
+
30
+ **Implemented enhancements:**
31
+
32
+ - \(CAT-761\) Add custom\_generate as a feature [\#316](https://github.com/puppetlabs/puppet-resource_api/pull/316) ([david22swan](https://github.com/david22swan))
33
+
34
+ ## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) - 2023-07-21
7
35
 
8
36
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.16...1.8.18)
9
37
 
10
38
  **Merged pull requests:**
11
39
 
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))
40
+ - \(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))
41
+ - \(PA-5641\) Prep for 1.8.18 release [\#324](https://github.com/puppetlabs/puppet-resource_api/pull/324) ([tvpartytonight](https://github.com/tvpartytonight))
42
+ - \(PA-5641\) Use new organizational token for rubygem pushing [\#323](https://github.com/puppetlabs/puppet-resource_api/pull/323) ([tvpartytonight](https://github.com/tvpartytonight))
43
+ - \(PA-5641\) prefer auto-generated GITHUB\_TOKEN [\#322](https://github.com/puppetlabs/puppet-resource_api/pull/322) ([tvpartytonight](https://github.com/tvpartytonight))
44
+ - \(PA-5641\) Add release job via PR [\#321](https://github.com/puppetlabs/puppet-resource_api/pull/321) ([tvpartytonight](https://github.com/tvpartytonight))
45
+ - \(maint\) Remove old Ruby logic from Gemfile [\#320](https://github.com/puppetlabs/puppet-resource_api/pull/320) ([mhashizume](https://github.com/mhashizume))
14
46
  - \(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))
47
+ - \(maint\) Don't require git [\#318](https://github.com/puppetlabs/puppet-resource_api/pull/318) ([joshcooper](https://github.com/joshcooper))
16
48
  - \(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))
49
+ - \(maint\) Update to Mend [\#311](https://github.com/puppetlabs/puppet-resource_api/pull/311) ([cthorn42](https://github.com/cthorn42))
50
+ - \(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
51
 
19
- ## [1.8.16](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.16) (2022-10-03)
52
+ ## [1.8.16](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.16) - 2022-10-03
20
53
 
21
54
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.14...1.8.16)
22
55
 
@@ -31,7 +64,7 @@ All significant changes to this repo will be summarized in this file.
31
64
  - Support ensure parameter with Optional data type [\#292](https://github.com/puppetlabs/puppet-resource_api/pull/292) ([seanmil](https://github.com/seanmil))
32
65
  - Only ship needed files [\#289](https://github.com/puppetlabs/puppet-resource_api/pull/289) ([ekohl](https://github.com/ekohl))
33
66
 
34
- ## [1.8.14](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.14) (2021-06-09)
67
+ ## [1.8.14](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.14) - 2021-06-09
35
68
 
36
69
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.13...1.8.14)
37
70
 
@@ -64,7 +97,7 @@ All significant changes to this repo will be summarized in this file.
64
97
  - Update rake requirement from ~\> 10.0 to ~\> 13.0 [\#262](https://github.com/puppetlabs/puppet-resource_api/pull/262) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
65
98
  - \(maint\) update Gemfile to allow use of non-vulnerable rake version 12.3.3 [\#260](https://github.com/puppetlabs/puppet-resource_api/pull/260) ([DavidS](https://github.com/DavidS))
66
99
 
67
- ## [1.8.13](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.13) (2020-02-19)
100
+ ## [1.8.13](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.13) - 2020-02-19
68
101
 
69
102
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.12...1.8.13)
70
103
 
@@ -72,7 +105,7 @@ All significant changes to this repo will be summarized in this file.
72
105
 
73
106
  - \(IAC-274\) update CHANGELOG [\#259](https://github.com/puppetlabs/puppet-resource_api/pull/259) ([DavidS](https://github.com/DavidS))
74
107
 
75
- ## [1.8.12](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.12) (2020-02-03)
108
+ ## [1.8.12](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.12) - 2020-02-03
76
109
 
77
110
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.11...1.8.12)
78
111
 
@@ -84,7 +117,7 @@ All significant changes to this repo will be summarized in this file.
84
117
 
85
118
  - Update dependency\_decisions for LicenseFinder 6.0; Fix deprecation warning with outdated win32-service gem pulled in by puppet [\#252](https://github.com/puppetlabs/puppet-resource_api/pull/252) ([DavidS](https://github.com/DavidS))
86
119
 
87
- ## [1.8.11](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.11) (2019-12-30)
120
+ ## [1.8.11](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.11) - 2019-12-30
88
121
 
89
122
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.10...1.8.11)
90
123
 
@@ -102,7 +135,7 @@ All significant changes to this repo will be summarized in this file.
102
135
 
103
136
  - Pin json gem to older version for JRuby 1.7 [\#249](https://github.com/puppetlabs/puppet-resource_api/pull/249) ([DavidS](https://github.com/DavidS))
104
137
 
105
- ## [1.8.10](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.10) (2019-11-14)
138
+ ## [1.8.10](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.10) - 2019-11-14
106
139
 
107
140
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.9...1.8.10)
108
141
 
@@ -119,7 +152,7 @@ All significant changes to this repo will be summarized in this file.
119
152
 
120
153
  - \(FM-8740\): Documentation tweaks based on most recent walkthrough [\#246](https://github.com/puppetlabs/puppet-resource_api/pull/246) ([sanfrancrisko](https://github.com/sanfrancrisko))
121
154
 
122
- ## [1.8.9](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.9) (2019-10-03)
155
+ ## [1.8.9](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.9) - 2019-10-03
123
156
 
124
157
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.8...1.8.9)
125
158
 
@@ -135,7 +168,7 @@ All significant changes to this repo will be summarized in this file.
135
168
 
136
169
  - \(packaging\) Bump to version '1.8.9' [\#239](https://github.com/puppetlabs/puppet-resource_api/pull/239) ([mihaibuzgau](https://github.com/mihaibuzgau))
137
170
 
138
- ## [1.8.8](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.8) (2019-09-25)
171
+ ## [1.8.8](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.8) - 2019-09-25
139
172
 
140
173
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.7...1.8.8)
141
174
 
@@ -144,7 +177,7 @@ All significant changes to this repo will be summarized in this file.
144
177
  - \(MODULES-9258\) Remove obsolete documentation [\#229](https://github.com/puppetlabs/puppet-resource_api/pull/229) ([DavidS](https://github.com/DavidS))
145
178
  - CHANGELOG for 1.8.7 [\#206](https://github.com/puppetlabs/puppet-resource_api/pull/206) ([DavidS](https://github.com/DavidS))
146
179
 
147
- ## [1.8.7](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.7) (2019-09-11)
180
+ ## [1.8.7](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.7) - 2019-09-11
148
181
 
149
182
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.6...1.8.7)
150
183
 
@@ -158,7 +191,7 @@ All significant changes to this repo will be summarized in this file.
158
191
  - \(MODULES-9258\) Improve referencing and add summary [\#199](https://github.com/puppetlabs/puppet-resource_api/pull/199) ([maxiegit](https://github.com/maxiegit))
159
192
  - \(maint\) Pin both Jruby cells to use `dist: trusty` [\#197](https://github.com/puppetlabs/puppet-resource_api/pull/197) ([da-ar](https://github.com/da-ar))
160
193
 
161
- ## [1.8.6](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.6) (2019-07-04)
194
+ ## [1.8.6](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.6) - 2019-07-04
162
195
 
163
196
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.6.5...1.8.6)
164
197
 
@@ -173,7 +206,7 @@ All significant changes to this repo will be summarized in this file.
173
206
  - \(packaging\) Bump to version '1.9.0' \[no-promote\] [\#191](https://github.com/puppetlabs/puppet-resource_api/pull/191) ([gimmyxd](https://github.com/gimmyxd))
174
207
  - \(maint\) retrofitting changelog for the last couple of releases [\#190](https://github.com/puppetlabs/puppet-resource_api/pull/190) ([DavidS](https://github.com/DavidS))
175
208
 
176
- ## [1.6.5](https://github.com/puppetlabs/puppet-resource_api/tree/1.6.5) (2019-07-04)
209
+ ## [1.6.5](https://github.com/puppetlabs/puppet-resource_api/tree/1.6.5) - 2019-07-04
177
210
 
178
211
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.5...1.6.5)
179
212
 
@@ -186,7 +219,7 @@ All significant changes to this repo will be summarized in this file.
186
219
  - \(packaging\) Bump to 1.6.5 [\#196](https://github.com/puppetlabs/puppet-resource_api/pull/196) ([gimmyxd](https://github.com/gimmyxd))
187
220
  - \(maint\) test fixes [\#193](https://github.com/puppetlabs/puppet-resource_api/pull/193) ([DavidS](https://github.com/DavidS))
188
221
 
189
- ## [1.8.5](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.5) (2019-06-24)
222
+ ## [1.8.5](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.5) - 2019-06-24
190
223
 
191
224
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.4...1.8.5)
192
225
 
@@ -203,7 +236,7 @@ All significant changes to this repo will be summarized in this file.
203
236
  - \(maint\) test fixes [\#185](https://github.com/puppetlabs/puppet-resource_api/pull/185) ([DavidS](https://github.com/DavidS))
204
237
  - \(maint\) make test order really random [\#175](https://github.com/puppetlabs/puppet-resource_api/pull/175) ([DavidS](https://github.com/DavidS))
205
238
 
206
- ## [1.8.4](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.4) (2019-06-12)
239
+ ## [1.8.4](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.4) - 2019-06-12
207
240
 
208
241
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.3...1.8.4)
209
242
 
@@ -227,7 +260,7 @@ All significant changes to this repo will be summarized in this file.
227
260
  - \(maint\) test cleanups [\#172](https://github.com/puppetlabs/puppet-resource_api/pull/172) ([DavidS](https://github.com/DavidS))
228
261
  - \(packaging\) Update reported version to 1.8.4 \[no-promote\] [\#171](https://github.com/puppetlabs/puppet-resource_api/pull/171) ([gimmyxd](https://github.com/gimmyxd))
229
262
 
230
- ## [1.8.3](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.3) (2019-04-12)
263
+ ## [1.8.3](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.3) - 2019-04-12
231
264
 
232
265
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.2...1.8.3)
233
266
 
@@ -239,7 +272,7 @@ All significant changes to this repo will be summarized in this file.
239
272
 
240
273
  - \(PA-2496\) Bump version and remove v from version number [\#170](https://github.com/puppetlabs/puppet-resource_api/pull/170) ([mihaibuzgau](https://github.com/mihaibuzgau))
241
274
 
242
- ## [1.8.2](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.2) (2019-04-10)
275
+ ## [1.8.2](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.2) - 2019-04-10
243
276
 
244
277
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.4...1.8.2)
245
278
 
@@ -249,7 +282,7 @@ All significant changes to this repo will be summarized in this file.
249
282
  - Add `implementations` to reserved bolt keywords [\#165](https://github.com/puppetlabs/puppet-resource_api/pull/165) ([DavidS](https://github.com/DavidS))
250
283
  - Release prep for v1.8.1 [\#163](https://github.com/puppetlabs/puppet-resource_api/pull/163) ([DavidS](https://github.com/DavidS))
251
284
 
252
- ## [v1.6.4](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.4) (2019-03-25)
285
+ ## [v1.6.4](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.4) - 2019-03-25
253
286
 
254
287
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.8.1...v1.6.4)
255
288
 
@@ -257,7 +290,7 @@ All significant changes to this repo will be summarized in this file.
257
290
 
258
291
  - \(MAINT\) Bump version [\#164](https://github.com/puppetlabs/puppet-resource_api/pull/164) ([sebastian-miclea](https://github.com/sebastian-miclea))
259
292
 
260
- ## [v1.8.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.1) (2019-03-13)
293
+ ## [v1.8.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.1) - 2019-03-13
261
294
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.8.0...v1.8.1)
262
295
 
263
296
  **Fixed bugs:**
@@ -271,7 +304,7 @@ All significant changes to this repo will be summarized in this file.
271
304
  - \(maint\) update release docs [\#159](https://github.com/puppetlabs/puppet-resource_api/pull/159) ([DavidS](https://github.com/DavidS))
272
305
  - Improve travis cells and testing [\#145](https://github.com/puppetlabs/puppet-resource_api/pull/145) ([DavidS](https://github.com/DavidS))
273
306
 
274
- ## [v1.8.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.0) (2019-02-26)
307
+ ## [v1.8.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.0) - 2019-02-26
275
308
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.7.0...v1.8.0)
276
309
 
277
310
  **Implemented enhancements:**
@@ -294,7 +327,7 @@ All significant changes to this repo will be summarized in this file.
294
327
  - \(FM-7726\) cleanups for the transport [\#153](https://github.com/puppetlabs/puppet-resource_api/pull/153) ([DavidS](https://github.com/DavidS))
295
328
  - \(FM-7691,FM-7696\) refactoring definition handling in contexts [\#150](https://github.com/puppetlabs/puppet-resource_api/pull/150) ([DavidS](https://github.com/DavidS))
296
329
 
297
- ## [v1.7.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.7.0) (2019-01-07)
330
+ ## [v1.7.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.7.0) - 2019-01-07
298
331
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.3...v1.7.0)
299
332
 
300
333
  **Implemented enhancements:**
@@ -307,7 +340,7 @@ All significant changes to this repo will be summarized in this file.
307
340
  - \(FM-7597\) RSAPI Transport register function [\#146](https://github.com/puppetlabs/puppet-resource_api/pull/146) ([da-ar](https://github.com/da-ar))
308
341
  - \(packaging\) Update version to 1.7.0 [\#144](https://github.com/puppetlabs/puppet-resource_api/pull/144) ([branan](https://github.com/branan))
309
342
 
310
- ## [v1.6.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.3) (2018-12-11)
343
+ ## [v1.6.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.3) - 2018-12-11
311
344
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.2...v1.6.3)
312
345
 
313
346
  **Closed issues:**
@@ -323,7 +356,7 @@ All significant changes to this repo will be summarized in this file.
323
356
  - \(maint\) extract data type handling code [\#137](https://github.com/puppetlabs/puppet-resource_api/pull/137) ([bpietraga](https://github.com/bpietraga))
324
357
  - Release prep for v1.6.2 [\#135](https://github.com/puppetlabs/puppet-resource_api/pull/135) ([DavidS](https://github.com/DavidS))
325
358
 
326
- ## [v1.6.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.2) (2018-10-25)
359
+ ## [v1.6.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.2) - 2018-10-25
327
360
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.1...v1.6.2)
328
361
 
329
362
  **Fixed bugs:**
@@ -334,7 +367,7 @@ All significant changes to this repo will be summarized in this file.
334
367
 
335
368
  - Release prep for v1.6.1 [\#133](https://github.com/puppetlabs/puppet-resource_api/pull/133) ([DavidS](https://github.com/DavidS))
336
369
 
337
- ## [v1.6.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.1) (2018-10-25)
370
+ ## [v1.6.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.1) - 2018-10-25
338
371
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.0...v1.6.1)
339
372
 
340
373
  **Fixed bugs:**
@@ -349,7 +382,7 @@ All significant changes to this repo will be summarized in this file.
349
382
  - Adjust announcement template to reality [\#128](https://github.com/puppetlabs/puppet-resource_api/pull/128) ([DavidS](https://github.com/DavidS))
350
383
  - Release prep for v1.6.0 [\#127](https://github.com/puppetlabs/puppet-resource_api/pull/127) ([da-ar](https://github.com/da-ar))
351
384
 
352
- ## [v1.6.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.0) (2018-09-25)
385
+ ## [v1.6.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.0) - 2018-09-25
353
386
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.5.0...v1.6.0)
354
387
 
355
388
  **Implemented enhancements:**
@@ -368,7 +401,7 @@ All significant changes to this repo will be summarized in this file.
368
401
  - \(maint\) Add Travis job for Puppet 6.0.x branch [\#120](https://github.com/puppetlabs/puppet-resource_api/pull/120) ([da-ar](https://github.com/da-ar))
369
402
  - Release prep for v1.5.0 [\#119](https://github.com/puppetlabs/puppet-resource_api/pull/119) ([DavidS](https://github.com/DavidS))
370
403
 
371
- ## [v1.5.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.5.0) (2018-09-12)
404
+ ## [v1.5.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.5.0) - 2018-09-12
372
405
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.2...v1.5.0)
373
406
 
374
407
  **Implemented enhancements:**
@@ -385,7 +418,7 @@ All significant changes to this repo will be summarized in this file.
385
418
 
386
419
  - Release prep for v1.4.2 [\#112](https://github.com/puppetlabs/puppet-resource_api/pull/112) ([DavidS](https://github.com/DavidS))
387
420
 
388
- ## [v1.4.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.2) (2018-08-09)
421
+ ## [v1.4.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.2) - 2018-08-09
389
422
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.1...v1.4.2)
390
423
 
391
424
  **Fixed bugs:**
@@ -397,7 +430,7 @@ All significant changes to this repo will be summarized in this file.
397
430
  - \(maint\) fix brace alignment; document reference [\#111](https://github.com/puppetlabs/puppet-resource_api/pull/111) ([DavidS](https://github.com/DavidS))
398
431
  - Release prep for v1.4.1 [\#109](https://github.com/puppetlabs/puppet-resource_api/pull/109) ([DavidS](https://github.com/DavidS))
399
432
 
400
- ## [v1.4.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.1) (2018-07-20)
433
+ ## [v1.4.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.1) - 2018-07-20
401
434
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.0...v1.4.1)
402
435
 
403
436
  **Fixed bugs:**
@@ -411,7 +444,7 @@ All significant changes to this repo will be summarized in this file.
411
444
  - Minor changes to README [\#106](https://github.com/puppetlabs/puppet-resource_api/pull/106) ([clairecadman](https://github.com/clairecadman))
412
445
  - Release prep for v1.4.0 [\#102](https://github.com/puppetlabs/puppet-resource_api/pull/102) ([DavidS](https://github.com/DavidS))
413
446
 
414
- ## [v1.4.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.0) (2018-06-19)
447
+ ## [v1.4.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.0) - 2018-06-19
415
448
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.3.0...v1.4.0)
416
449
 
417
450
  **Implemented enhancements:**
@@ -438,7 +471,7 @@ All significant changes to this repo will be summarized in this file.
438
471
  - Update release docs and announcement template [\#86](https://github.com/puppetlabs/puppet-resource_api/pull/86) ([DavidS](https://github.com/DavidS))
439
472
  - Release prep for v1.3.0 [\#85](https://github.com/puppetlabs/puppet-resource_api/pull/85) ([da-ar](https://github.com/da-ar))
440
473
 
441
- ## [v1.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.3.0) (2018-05-24)
474
+ ## [v1.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.3.0) - 2018-05-24
442
475
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.2.0...v1.3.0)
443
476
 
444
477
  **Implemented enhancements:**
@@ -460,7 +493,7 @@ All significant changes to this repo will be summarized in this file.
460
493
  - Some glue fixes: announcement, to\_manifest, to\_hierayaml [\#77](https://github.com/puppetlabs/puppet-resource_api/pull/77) ([DavidS](https://github.com/DavidS))
461
494
  - Release prep for v1.2.0 [\#75](https://github.com/puppetlabs/puppet-resource_api/pull/75) ([DavidS](https://github.com/DavidS))
462
495
 
463
- ## [v1.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.2.0) (2018-05-08)
496
+ ## [v1.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.2.0) - 2018-05-08
464
497
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.1.0...v1.2.0)
465
498
 
466
499
  **Implemented enhancements:**
@@ -482,7 +515,7 @@ All significant changes to this repo will be summarized in this file.
482
515
  - Cache ~/.rvm for jruby jobs [\#66](https://github.com/puppetlabs/puppet-resource_api/pull/66) ([cotsog](https://github.com/cotsog))
483
516
  - Release prep for v1.1.0 [\#64](https://github.com/puppetlabs/puppet-resource_api/pull/64) ([DavidS](https://github.com/DavidS))
484
517
 
485
- ## [v1.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.1.0) (2018-04-12)
518
+ ## [v1.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.1.0) - 2018-04-12
486
519
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.3...v1.1.0)
487
520
 
488
521
  **Implemented enhancements:**
@@ -500,7 +533,7 @@ All significant changes to this repo will be summarized in this file.
500
533
  - Update puppetlabs\_spec\_helper to fixed master version [\#58](https://github.com/puppetlabs/puppet-resource_api/pull/58) ([DavidS](https://github.com/DavidS))
501
534
  - Release prep for v1.0.3 [\#57](https://github.com/puppetlabs/puppet-resource_api/pull/57) ([DavidS](https://github.com/DavidS))
502
535
 
503
- ## [v1.0.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.3) (2018-04-06)
536
+ ## [v1.0.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.3) - 2018-04-06
504
537
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.2...v1.0.3)
505
538
 
506
539
  **Implemented enhancements:**
@@ -519,7 +552,7 @@ All significant changes to this repo will be summarized in this file.
519
552
  - Update release prep notes [\#51](https://github.com/puppetlabs/puppet-resource_api/pull/51) ([DavidS](https://github.com/DavidS))
520
553
  - Release prep for v1.0.2 [\#50](https://github.com/puppetlabs/puppet-resource_api/pull/50) ([DavidS](https://github.com/DavidS))
521
554
 
522
- ## [v1.0.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.2) (2018-03-26)
555
+ ## [v1.0.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.2) - 2018-03-26
523
556
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.1...v1.0.2)
524
557
 
525
558
  **Implemented enhancements:**
@@ -535,7 +568,7 @@ All significant changes to this repo will be summarized in this file.
535
568
 
536
569
  - \(PDK-810\) run CI against all the versions [\#46](https://github.com/puppetlabs/puppet-resource_api/pull/46) ([DavidS](https://github.com/DavidS))
537
570
 
538
- ## [v1.0.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.1) (2018-03-23)
571
+ ## [v1.0.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.1) - 2018-03-23
539
572
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.0...v1.0.1)
540
573
 
541
574
  **Fixed bugs:**
@@ -547,7 +580,7 @@ All significant changes to this repo will be summarized in this file.
547
580
  - Release prep for v1.0.1 [\#45](https://github.com/puppetlabs/puppet-resource_api/pull/45) ([DavidS](https://github.com/DavidS))
548
581
  - Release prep for v1.0.0 [\#43](https://github.com/puppetlabs/puppet-resource_api/pull/43) ([da-ar](https://github.com/da-ar))
549
582
 
550
- ## [v1.0.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.0) (2018-03-23)
583
+ ## [v1.0.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.0) - 2018-03-23
551
584
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.10.0...v1.0.0)
552
585
 
553
586
  **Implemented enhancements:**
@@ -564,7 +597,7 @@ All significant changes to this repo will be summarized in this file.
564
597
  - Notes on how to build a release [\#39](https://github.com/puppetlabs/puppet-resource_api/pull/39) ([DavidS](https://github.com/DavidS))
565
598
  - Release prep for v0.10.0 [\#38](https://github.com/puppetlabs/puppet-resource_api/pull/38) ([DavidS](https://github.com/DavidS))
566
599
 
567
- ## [v0.10.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.10.0) (2018-03-21)
600
+ ## [v0.10.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.10.0) - 2018-03-21
568
601
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.9.0...v0.10.0)
569
602
 
570
603
  **Implemented enhancements:**
@@ -582,7 +615,7 @@ All significant changes to this repo will be summarized in this file.
582
615
  - Cleanup test module [\#33](https://github.com/puppetlabs/puppet-resource_api/pull/33) ([DavidS](https://github.com/DavidS))
583
616
  - Update to rubocop 0.53.0 [\#32](https://github.com/puppetlabs/puppet-resource_api/pull/32) ([DavidS](https://github.com/DavidS))
584
617
 
585
- ## [v0.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.9.0) (2018-02-22)
618
+ ## [v0.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.9.0) - 2018-02-22
586
619
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.3.0...v0.9.0)
587
620
 
588
621
  **Implemented enhancements:**
@@ -600,7 +633,7 @@ All significant changes to this repo will be summarized in this file.
600
633
  - Add a note on device support to the README [\#26](https://github.com/puppetlabs/puppet-resource_api/pull/26) ([DavidS](https://github.com/DavidS))
601
634
  - Remove Command API [\#25](https://github.com/puppetlabs/puppet-resource_api/pull/25) ([DavidS](https://github.com/DavidS))
602
635
 
603
- ## [v0.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.3.0) (2018-02-21)
636
+ ## [v0.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.3.0) - 2018-02-21
604
637
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.2...v0.3.0)
605
638
 
606
639
  **Implemented enhancements:**
@@ -617,7 +650,7 @@ All significant changes to this repo will be summarized in this file.
617
650
 
618
651
  - Release prep v0.3.0 [\#22](https://github.com/puppetlabs/puppet-resource_api/pull/22) ([DavidS](https://github.com/DavidS))
619
652
 
620
- ## [v0.2.2](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.2) (2018-01-25)
653
+ ## [v0.2.2](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.2) - 2018-01-25
621
654
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.1...v0.2.2)
622
655
 
623
656
  **Fixed bugs:**
@@ -628,7 +661,7 @@ All significant changes to this repo will be summarized in this file.
628
661
 
629
662
  - Release prep v0.2.2 [\#16](https://github.com/puppetlabs/puppet-resource_api/pull/16) ([DavidS](https://github.com/DavidS))
630
663
 
631
- ## [v0.2.1](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.1) (2018-01-24)
664
+ ## [v0.2.1](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.1) - 2018-01-24
632
665
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.0...v0.2.1)
633
666
 
634
667
  **Fixed bugs:**
@@ -639,7 +672,7 @@ All significant changes to this repo will be summarized in this file.
639
672
 
640
673
  - Release prep [\#14](https://github.com/puppetlabs/puppet-resource_api/pull/14) ([DavidS](https://github.com/DavidS))
641
674
 
642
- ## [v0.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.0) (2018-01-23)
675
+ ## [v0.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.0) - 2018-01-23
643
676
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.1.0...v0.2.0)
644
677
 
645
678
  **Implemented enhancements:**
@@ -656,7 +689,7 @@ All significant changes to this repo will be summarized in this file.
656
689
  - Release Prep for 0.2.0 [\#9](https://github.com/puppetlabs/puppet-resource_api/pull/9) ([DavidS](https://github.com/DavidS))
657
690
  - Small fixes [\#7](https://github.com/puppetlabs/puppet-resource_api/pull/7) ([DavidS](https://github.com/DavidS))
658
691
 
659
- ## [v0.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.1.0) (2017-11-17)
692
+ ## [v0.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.1.0) - 2017-11-17
660
693
  **Merged pull requests:**
661
694
 
662
695
  - \(maint\) sort dependencies in gemspec [\#6](https://github.com/puppetlabs/puppet-resource_api/pull/6) ([DavidS](https://github.com/DavidS))
@@ -19,7 +19,7 @@ class Puppet::ResourceApi::BaseContext
19
19
  elsif definition.is_a? Puppet::ResourceApi::BaseTypeDefinition
20
20
  @type = definition
21
21
  else
22
- raise ArgumentError, 'BaseContext requires definition to be a child of Puppet::ResourceApi::BaseTypeDefinition, not <%{actual_type}>' % { actual_type: definition.class }
22
+ raise ArgumentError, format('BaseContext requires definition to be a child of Puppet::ResourceApi::BaseTypeDefinition, not <%<actual_type>s>', actual_type: definition.class)
23
23
  end
24
24
  end
25
25
 
@@ -44,7 +44,7 @@ class Puppet::ResourceApi::BaseContext
44
44
  type.feature?(feature)
45
45
  end
46
46
 
47
- [:debug, :info, :notice, :warning, :err].each do |level|
47
+ %i[debug info notice warning err].each do |level|
48
48
  define_method(level) do |*args|
49
49
  if args.length == 1
50
50
  message = "#{@context || @type.name}: #{args.last}"
@@ -58,7 +58,7 @@ class Puppet::ResourceApi::BaseContext
58
58
  end
59
59
  end
60
60
 
61
- [:creating, :updating, :deleting].each do |method|
61
+ %i[creating updating deleting].each do |method|
62
62
  define_method(method) do |titles, message: method.to_s.capitalize, &block|
63
63
  start_time = Time.now
64
64
  setup_context(titles, message)
@@ -92,6 +92,7 @@ class Puppet::ResourceApi::BaseContext
92
92
 
93
93
  def processing(title, is, should, message = 'Processing')
94
94
  raise "#{__method__} only accepts a single resource title" if title.respond_to?(:each)
95
+
95
96
  start_time = Time.now
96
97
  setup_context(title, message)
97
98
  begin
@@ -106,7 +107,7 @@ class Puppet::ResourceApi::BaseContext
106
107
  end
107
108
  end
108
109
 
109
- [:created, :updated, :deleted].each do |method|
110
+ %i[created updated deleted].each do |method|
110
111
  define_method(method) do |titles, message: method.to_s.capitalize|
111
112
  notice("#{message}: #{titles}")
112
113
  end
@@ -114,11 +115,13 @@ class Puppet::ResourceApi::BaseContext
114
115
 
115
116
  def processed(title, is, should)
116
117
  raise "#{__method__} only accepts a single resource title" if title.respond_to?(:each)
118
+
117
119
  notice("Processed #{title} from #{is} to #{should}")
118
120
  end
119
121
 
120
122
  def attribute_changed(title, attribute, is, should, message: nil)
121
123
  raise "#{__method__} only accepts a single resource title" if title.respond_to?(:each)
124
+
122
125
  printable_is = 'nil'
123
126
  printable_should = 'nil'
124
127
  if is
@@ -156,7 +159,7 @@ class Puppet::ResourceApi::BaseContext
156
159
  private
157
160
 
158
161
  def format_titles(titles)
159
- if titles.length.zero? && !titles.is_a?(String)
162
+ if titles.empty? && !titles.is_a?(String)
160
163
  @type.name
161
164
  else
162
165
  "#{@type.name}[#{[titles].flatten.compact.join(', ')}]"
@@ -169,7 +172,8 @@ class Puppet::ResourceApi::BaseContext
169
172
  end
170
173
 
171
174
  def format_seconds(seconds)
172
- return '%.6f' % seconds if seconds < 1
173
- '%.2f' % seconds
175
+ return format('%.6f', seconds) if seconds < 1
176
+
177
+ format('%.2f', seconds)
174
178
  end
175
179
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation,Style/ClassAndModuleChildren
3
+ module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation
4
4
 
5
5
  # This module is used to handle data inside types, contains methods for munging
6
6
  # and validation of the type values.
@@ -20,12 +20,12 @@ module Puppet::ResourceApi::DataTypeHandling
20
20
  # @param unpack_strings[Boolean] unpacking of strings for migrating off
21
21
  # legacy type
22
22
  # @return [type] the cleaned value
23
- def self.mungify(type, value, error_msg_prefix, unpack_strings = false)
23
+ def self.mungify(type, value, error_msg_prefix, unpack_strings = false) # rubocop:disable Style/OptionalBooleanParameter
24
24
  cleaned_value = mungify_core(
25
25
  type,
26
26
  value,
27
27
  error_msg_prefix,
28
- unpack_strings,
28
+ unpack_strings
29
29
  )
30
30
  validate(type, cleaned_value, error_msg_prefix)
31
31
  cleaned_value
@@ -42,13 +42,14 @@ module Puppet::ResourceApi::DataTypeHandling
42
42
  # @return [type] the cleaned value
43
43
  # @raise [Puppet::ResourceError] if `value` could not be parsed into `type`
44
44
  # @private
45
- def self.mungify_core(type, value, error_msg_prefix, unpack_strings = false)
45
+ def self.mungify_core(type, value, error_msg_prefix, unpack_strings = false) # rubocop:disable Style/OptionalBooleanParameter
46
46
  if unpack_strings
47
47
  # When the provider is exercised from the `puppet resource` CLI, we need
48
48
  # to unpack strings into the correct types, e.g. "1" (a string)
49
49
  # to 1 (an integer)
50
50
  cleaned_value, error_msg = try_mungify(type, value, error_msg_prefix)
51
51
  raise Puppet::ResourceError, error_msg if error_msg
52
+
52
53
  cleaned_value
53
54
  elsif value == :false # rubocop:disable Lint/BooleanSymbol
54
55
  # work around https://tickets.puppetlabs.com/browse/PUP-2368
@@ -77,18 +78,14 @@ module Puppet::ResourceApi::DataTypeHandling
77
78
  end
78
79
  # only convert the values if none failed. otherwise fall through and
79
80
  # rely on puppet to render a proper error
80
- if conversions.all? { |c| c[1].nil? }
81
- value = conversions.map { |c| c[0] }
82
- end
81
+ value = conversions.map { |c| c[0] } if conversions.all? { |c| c[1].nil? }
83
82
  end
84
83
  when Puppet::Pops::Types::PBooleanType
85
84
  value = boolean_munge(value)
86
85
  when Puppet::Pops::Types::PIntegerType,
87
86
  Puppet::Pops::Types::PFloatType,
88
87
  Puppet::Pops::Types::PNumericType
89
- if value.is_a?(String) && (value.match?(%r{^-?\d+$}) || value.match?(Puppet::Pops::Patterns::NUMERIC))
90
- value = Puppet::Pops::Utils.to_n(value)
91
- end
88
+ value = Puppet::Pops::Utils.to_n(value) if value.is_a?(String) && (value.match?(/^-?\d+$/) || value.match?(Puppet::Pops::Patterns::NUMERIC))
92
89
  when Puppet::Pops::Types::PEnumType,
93
90
  Puppet::Pops::Types::PStringType,
94
91
  Puppet::Pops::Types::PPatternType
@@ -109,9 +106,7 @@ module Puppet::ResourceApi::DataTypeHandling
109
106
  return conversion_results[0] if conversion_results.length == 1
110
107
 
111
108
  # return an error if ambiguous
112
- if conversion_results.length > 1
113
- return [nil, ambiguous_error_msg(error_msg_prefix, value, type)]
114
- end
109
+ return [nil, ambiguous_error_msg(error_msg_prefix, value, type)] if conversion_results.length > 1
115
110
 
116
111
  # try to interpret as string
117
112
  return try_mungify(string_type, value, error_msg_prefix) if string_type
@@ -121,6 +116,7 @@ module Puppet::ResourceApi::DataTypeHandling
121
116
 
122
117
  error_msg = try_validate(type, value, error_msg_prefix)
123
118
  return [nil, error_msg] if error_msg # an error
119
+
124
120
  [value, nil] # match
125
121
  end
126
122
 
@@ -146,7 +142,7 @@ module Puppet::ResourceApi::DataTypeHandling
146
142
  # @private
147
143
  def self.ambiguous_error_msg(error_msg_prefix, value, type)
148
144
  "#{error_msg_prefix} #{value.inspect} is not unabiguously convertable to " \
149
- "#{type}"
145
+ "#{type}"
150
146
  end
151
147
 
152
148
  # Validates the `value` against the specified `type`.
@@ -171,16 +167,16 @@ module Puppet::ResourceApi::DataTypeHandling
171
167
 
172
168
  # an error :-(
173
169
  inferred_type = Puppet::Pops::Types::TypeCalculator.infer_set(value)
174
- error_msg = Puppet::Pops::Types::TypeMismatchDescriber.new.describe_mismatch(
170
+ Puppet::Pops::Types::TypeMismatchDescriber.new.describe_mismatch(
175
171
  error_msg_prefix,
176
172
  type,
177
- inferred_type,
173
+ inferred_type
178
174
  )
179
- error_msg
180
175
  end
181
176
 
182
177
  def self.validate_ensure(definition)
183
178
  return unless definition[:attributes].key? :ensure
179
+
184
180
  options = definition[:attributes][:ensure]
185
181
  type = parse_puppet_type(:ensure, options[:type])
186
182
 
@@ -199,9 +195,9 @@ module Puppet::ResourceApi::DataTypeHandling
199
195
  Puppet::Pops::Types::TypeParser.singleton.parse(type)
200
196
  rescue Puppet::ParseErrorWithIssue => e
201
197
  raise Puppet::DevError, "The type of the `#{attr_name}` attribute " \
202
- "`#{type}` could not be parsed: #{e.message}"
198
+ "`#{type}` could not be parsed: #{e.message}"
203
199
  rescue Puppet::ParseError => e
204
200
  raise Puppet::DevError, "The type of the `#{attr_name}` attribute " \
205
- "`#{type}` is not recognised: #{e.message}"
201
+ "`#{type}` is not recognised: #{e.message}"
206
202
  end
207
203
  end