puppet-resource_api 1.8.4 → 1.8.6

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: 2f6caa565c4c74ffa60028baa93976517fe6a6677e1265e29b164b91c1b8ddf7
4
- data.tar.gz: 0d88b19fa67188d50658428a3a1a22fd3012831b2e7552fbf2d9dd5a546b2b52
3
+ metadata.gz: 1f8f4d59605ed8f5705f8c3efadede588ce5afbbdf7fca3653d368e05a7122e0
4
+ data.tar.gz: 686aab7f398a1b490a0e71525f19ce61abf98dfb57f2ca3c8f287611e872e7b4
5
5
  SHA512:
6
- metadata.gz: 12df0d25e70620dbc247bd26b4705c39d5b0d4341606d828f1aed79a152bd67934b2704b20dd29805955240e3dd972bce8f7586bf3719bdd509afe7fd1a6a219
7
- data.tar.gz: fc3e433a2a5a2c218a64dbcb2dab12af8aa96d36ed458b9607bf997cb470afce3352d0ed966e69ee03d0c7037bc738e713aab9ad8940560c9b7a6a59f8df5c2f
6
+ metadata.gz: bae7ccbf50e0151bf172ef6e80b77bd5681bb8f8385a8537a84a658d1f7340549d677ecceb815aec844b25e9984303a32aca488d9239135fc846acbb3ed9de3f
7
+ data.tar.gz: 50753cf51b07c11ea3718f7a7e445daf7592f2315b0660516850ee2595a86419da46115378d0bc4a06390ae1a75a69f3466b0954ef8584a11a308e8be89b2191
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
- --order rand
3
+ --order rand
data/.travis.yml CHANGED
@@ -14,8 +14,8 @@ branches:
14
14
  matrix:
15
15
  include:
16
16
  - rvm: 2.4.3
17
- env: PUPPET_GEM_VERSION='~> 5' COVERAGE=yes # 5.5
18
- - env: RVM="jruby-1.7.26" PUPPET_GEM_VERSION='~> 5' JRUBY_OPTS="--debug" COVERAGE=yes
17
+ env: PUPPET_GEM_VERSION='~> 5' SIMPLECOV=yes # 5.5
18
+ - env: RVM="jruby-1.7.26" PUPPET_GEM_VERSION='~> 5' JRUBY_OPTS="--debug" SIMPLECOV=yes
19
19
  before_cache: pushd ~/.rvm && rm -rf archives rubies/ruby-2.2.7 rubies/ruby-2.3.4 && popd
20
20
  cache:
21
21
  bundler: true
@@ -45,7 +45,7 @@ matrix:
45
45
  - rvm: 2.4.1
46
46
  env: PUPPET_GEM_VERSION='~> 5.0.0'
47
47
  - rvm: 2.1.9
48
- env: PUPPET_GEM_VERSION='~> 4' COVERAGE=yes # 4.10
48
+ env: PUPPET_GEM_VERSION='~> 4' SIMPLECOV=yes # 4.10
49
49
  before_install:
50
50
  - gem install bundler -v '< 2'
51
51
  - rvm: 2.1.9
data/CHANGELOG.md CHANGED
@@ -3,6 +3,95 @@
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
5
 
6
+ ## [v1.8.6](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.6) (2019-07-01)
7
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.5...v1.8.6)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - \(SERVER-2470\) list\_all\_transports implementation for puppetserver [\#187](https://github.com/puppetlabs/puppet-resource_api/pull/187) ([DavidS](https://github.com/DavidS))
12
+
13
+ **Fixed bugs:**
14
+
15
+ - \(MODULES-9428\) make the composite namevar implementation usable [\#174](https://github.com/puppetlabs/puppet-resource_api/pull/174) ([DavidS](https://github.com/DavidS))
16
+
17
+ **Merged pull requests:**
18
+
19
+ - Merge 1.6.x [\#194](https://github.com/puppetlabs/puppet-resource_api/pull/194) ([da-ar](https://github.com/da-ar))
20
+ - \(maint\) test fixes [\#193](https://github.com/puppetlabs/puppet-resource_api/pull/193) ([DavidS](https://github.com/DavidS))
21
+ - \(packaging\) Revert to version '1.8.5' \[no-promote\] [\#192](https://github.com/puppetlabs/puppet-resource_api/pull/192) ([gimmyxd](https://github.com/gimmyxd))
22
+ - \(packaging\) Bump to version '1.9.0' \[no-promote\] [\#191](https://github.com/puppetlabs/puppet-resource_api/pull/191) ([gimmyxd](https://github.com/gimmyxd))
23
+
24
+ ## [1.8.5](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.5) (2019-06-24)
25
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.4...1.8.5)
26
+
27
+ **Fixed bugs:**
28
+
29
+ - \(maint\) Mergeup 1.6.x: FM-7839, desc/docs cleanup [\#186](https://github.com/puppetlabs/puppet-resource_api/pull/186) ([DavidS](https://github.com/DavidS))
30
+
31
+ **Merged pull requests:**
32
+
33
+ - \(maint\) reduce debug noise caused by `feature?` [\#189](https://github.com/puppetlabs/puppet-resource_api/pull/189) ([da-ar](https://github.com/da-ar))
34
+ - \(FM-8265\) Merge branch '1.6.x' into master [\#188](https://github.com/puppetlabs/puppet-resource_api/pull/188) ([da-ar](https://github.com/da-ar))
35
+ - \(maint\) test fixes [\#185](https://github.com/puppetlabs/puppet-resource_api/pull/185) ([DavidS](https://github.com/DavidS))
36
+ - \(maint\) make test order really random [\#175](https://github.com/puppetlabs/puppet-resource_api/pull/175) ([DavidS](https://github.com/DavidS))
37
+ - \(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))
38
+
39
+ ## [1.8.4](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.4) (2019-06-12)
40
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.3...1.8.4)
41
+
42
+ **Implemented enhancements:**
43
+
44
+ - \(FM-7839\) Implement `to\_json` method for ResourceShim [\#168](https://github.com/puppetlabs/puppet-resource_api/pull/168) ([da-ar](https://github.com/da-ar))
45
+
46
+ **Fixed bugs:**
47
+
48
+ - \(maint\) backport minor fixes from master to 1.6.x [\#184](https://github.com/puppetlabs/puppet-resource_api/pull/184) ([DavidS](https://github.com/DavidS))
49
+ - \(PUP-9747\) Relax validation for bolt [\#182](https://github.com/puppetlabs/puppet-resource_api/pull/182) ([DavidS](https://github.com/DavidS))
50
+ - \(maint\) Add to\_hash function to resourceShim for compatibility [\#180](https://github.com/puppetlabs/puppet-resource_api/pull/180) ([da-ar](https://github.com/da-ar))
51
+ - \(maint\) implement `desc`/`docs` fallback [\#177](https://github.com/puppetlabs/puppet-resource_api/pull/177) ([DavidS](https://github.com/DavidS))
52
+
53
+ **Closed issues:**
54
+
55
+ - ResourceShim should respond to to\_hash [\#179](https://github.com/puppetlabs/puppet-resource_api/issues/179)
56
+
57
+ **Merged pull requests:**
58
+
59
+ - \(maint\) Merge 1.6.x to master [\#183](https://github.com/puppetlabs/puppet-resource_api/pull/183) ([mihaibuzgau](https://github.com/mihaibuzgau))
60
+ - \(maint\) Fixup Gemfile for JRuby 1.7 installs [\#173](https://github.com/puppetlabs/puppet-resource_api/pull/173) ([da-ar](https://github.com/da-ar))
61
+ - \(maint\) test cleanups [\#172](https://github.com/puppetlabs/puppet-resource_api/pull/172) ([DavidS](https://github.com/DavidS))
62
+
63
+ ## [1.8.3](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.3) (2019-04-12)
64
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.2...1.8.3)
65
+
66
+ **Fixed bugs:**
67
+
68
+ - \(FM-7867\) Always throw when transport schema validation fails [\#169](https://github.com/puppetlabs/puppet-resource_api/pull/169) ([da-ar](https://github.com/da-ar))
69
+
70
+ **Merged pull requests:**
71
+
72
+ - \(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))
73
+
74
+ ## [1.8.2](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.2) (2019-04-10)
75
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.4...1.8.2)
76
+
77
+ **Merged pull requests:**
78
+
79
+ - \(packaging\) Update reported version to 1.8.2 \[no-promote\] [\#167](https://github.com/puppetlabs/puppet-resource_api/pull/167) ([mihaibuzgau](https://github.com/mihaibuzgau))
80
+
81
+ ## [v1.6.4](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.4) (2019-03-25)
82
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.8.1...v1.6.4)
83
+
84
+ **Merged pull requests:**
85
+
86
+ - Add `implementations` to reserved bolt keywords [\#165](https://github.com/puppetlabs/puppet-resource_api/pull/165) ([DavidS](https://github.com/DavidS))
87
+ - \(MAINT\) Bump version [\#164](https://github.com/puppetlabs/puppet-resource_api/pull/164) ([sebastian-miclea](https://github.com/sebastian-miclea))
88
+ - Release prep for v1.8.1 [\#163](https://github.com/puppetlabs/puppet-resource_api/pull/163) ([DavidS](https://github.com/DavidS))
89
+
90
+ # Changelog
91
+
92
+ All significant changes to this repo will be summarized in this file.
93
+
94
+
6
95
  ## [v1.8.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.1) (2019-03-13)
7
96
  [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.8.0...v1.8.1)
8
97
 
@@ -413,5 +502,4 @@ All significant changes to this repo will be summarized in this file.
413
502
  - Workaround missing report back from here to flush\(\) [\#1](https://github.com/puppetlabs/puppet-resource_api/pull/1) ([james-stocks](https://github.com/james-stocks))
414
503
 
415
504
 
416
-
417
505
  \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ group :tests do
12
12
  # rubocop 0.58 throws when testing against ruby 2.1, so pin to the latest,
13
13
  # unless we're dealing with jruby...
14
14
  if RUBY_PLATFORM == 'java'
15
- # load any rubocop version that works on java for the Rakefile
15
+ # load a rubocop version that works on java for the Rakefile
16
16
  gem 'parser', '2.3.3.1'
17
17
  gem 'rubocop', '0.41.2'
18
18
  elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0')
data/HISTORY.md ADDED
@@ -0,0 +1,413 @@
1
+ # Changelog
2
+
3
+ All significant changes to this repo will be summarized in this file.
4
+
5
+
6
+ ## [v1.8.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.1) (2019-03-13)
7
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.8.0...v1.8.1)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - \(maint\) Fixes sensitive transport values where absent keys are wrapped [\#161](https://github.com/puppetlabs/puppet-resource_api/pull/161) ([da-ar](https://github.com/da-ar))
12
+
13
+ **Merged pull requests:**
14
+
15
+ - 1.6.x mergeup [\#162](https://github.com/puppetlabs/puppet-resource_api/pull/162) ([DavidS](https://github.com/DavidS))
16
+ - \(FM-7829\) Update README with transports examples [\#160](https://github.com/puppetlabs/puppet-resource_api/pull/160) ([willmeek](https://github.com/willmeek))
17
+ - \(maint\) update release docs [\#159](https://github.com/puppetlabs/puppet-resource_api/pull/159) ([DavidS](https://github.com/DavidS))
18
+ - Improve travis cells and testing [\#145](https://github.com/puppetlabs/puppet-resource_api/pull/145) ([DavidS](https://github.com/DavidS))
19
+
20
+ ## [v1.8.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.8.0) (2019-02-26)
21
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.7.0...v1.8.0)
22
+
23
+ **Implemented enhancements:**
24
+
25
+ - \(FM-7695\) Transports - the remote content framework [\#157](https://github.com/puppetlabs/puppet-resource_api/pull/157) ([DavidS](https://github.com/DavidS))
26
+ - \(FM-7698\) implement `sensitive:true` handling [\#156](https://github.com/puppetlabs/puppet-resource_api/pull/156) ([da-ar](https://github.com/da-ar))
27
+ - \(PDK-1271\) Allow a transport to be wrapped and used like a device [\#155](https://github.com/puppetlabs/puppet-resource_api/pull/155) ([da-ar](https://github.com/da-ar))
28
+ - \(FM-7701\) Support device providers when using Transport Wrapper [\#154](https://github.com/puppetlabs/puppet-resource_api/pull/154) ([da-ar](https://github.com/da-ar))
29
+ - \(FM-7726\) implement `context.transport` to provide access [\#152](https://github.com/puppetlabs/puppet-resource_api/pull/152) ([DavidS](https://github.com/DavidS))
30
+ - \(FM-7674\) Allow wrapping a Transport in a legacy Device [\#149](https://github.com/puppetlabs/puppet-resource_api/pull/149) ([da-ar](https://github.com/da-ar))
31
+ - \(FM-7600\) Add Transport.connect method [\#148](https://github.com/puppetlabs/puppet-resource_api/pull/148) ([da-ar](https://github.com/da-ar))
32
+
33
+ **Fixed bugs:**
34
+
35
+ - \(FM-7690\) Fix transports cache to be environment aware [\#151](https://github.com/puppetlabs/puppet-resource_api/pull/151) ([da-ar](https://github.com/da-ar))
36
+
37
+ **Merged pull requests:**
38
+
39
+ - Release prep for v1.8.0 [\#158](https://github.com/puppetlabs/puppet-resource_api/pull/158) ([DavidS](https://github.com/DavidS))
40
+ - \(FM-7726\) cleanups for the transport [\#153](https://github.com/puppetlabs/puppet-resource_api/pull/153) ([DavidS](https://github.com/DavidS))
41
+ - \(FM-7691,FM-7696\) refactoring definition handling in contexts [\#150](https://github.com/puppetlabs/puppet-resource_api/pull/150) ([DavidS](https://github.com/DavidS))
42
+
43
+ ## [v1.7.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.7.0) (2019-01-07)
44
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.3...v1.7.0)
45
+
46
+ **Implemented enhancements:**
47
+
48
+ - \(maint\) Validate Type Schema [\#142](https://github.com/puppetlabs/puppet-resource_api/pull/142) ([da-ar](https://github.com/da-ar))
49
+
50
+ **Merged pull requests:**
51
+
52
+ - \(maint\) Bundler 2.0 dropped support for Ruby versions \< 2.2 [\#147](https://github.com/puppetlabs/puppet-resource_api/pull/147) ([da-ar](https://github.com/da-ar))
53
+ - \(FM-7597\) RSAPI Transport register function [\#146](https://github.com/puppetlabs/puppet-resource_api/pull/146) ([da-ar](https://github.com/da-ar))
54
+ - \(packaging\) Update version to 1.7.0 [\#144](https://github.com/puppetlabs/puppet-resource_api/pull/144) ([branan](https://github.com/branan))
55
+
56
+ ## [v1.6.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.3) (2018-12-11)
57
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.2...v1.6.3)
58
+
59
+ **Closed issues:**
60
+
61
+ - Trying to understand stubbing in the examples [\#136](https://github.com/puppetlabs/puppet-resource_api/issues/136)
62
+
63
+ **Merged pull requests:**
64
+
65
+ - \(packaging\) Update version to 1.6.3 [\#143](https://github.com/puppetlabs/puppet-resource_api/pull/143) ([branan](https://github.com/branan))
66
+ - Move parameter and property logic to separate classes [\#140](https://github.com/puppetlabs/puppet-resource_api/pull/140) ([bpietraga](https://github.com/bpietraga))
67
+ - \(maint\) Predeclare Puppet module before ResourceApi [\#139](https://github.com/puppetlabs/puppet-resource_api/pull/139) ([caseywilliams](https://github.com/caseywilliams))
68
+ - \(maint\) minor fix to make data\_type\_handling change work [\#138](https://github.com/puppetlabs/puppet-resource_api/pull/138) ([DavidS](https://github.com/DavidS))
69
+ - \(maint\) extract data type handling code [\#137](https://github.com/puppetlabs/puppet-resource_api/pull/137) ([bpietraga](https://github.com/bpietraga))
70
+ - Release prep for v1.6.2 [\#135](https://github.com/puppetlabs/puppet-resource_api/pull/135) ([DavidS](https://github.com/DavidS))
71
+
72
+ ## [v1.6.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.2) (2018-10-25)
73
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.1...v1.6.2)
74
+
75
+ **Fixed bugs:**
76
+
77
+ - \(PDK-1209\) Fix the other call-sites of const\_defined? and const\_get [\#134](https://github.com/puppetlabs/puppet-resource_api/pull/134) ([DavidS](https://github.com/DavidS))
78
+
79
+ **Merged pull requests:**
80
+
81
+ - Release prep for v1.6.1 [\#133](https://github.com/puppetlabs/puppet-resource_api/pull/133) ([DavidS](https://github.com/DavidS))
82
+
83
+ ## [v1.6.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.1) (2018-10-25)
84
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.6.0...v1.6.1)
85
+
86
+ **Fixed bugs:**
87
+
88
+ - \(PDK-1209\) setting inherited const\_defined lookup to false [\#132](https://github.com/puppetlabs/puppet-resource_api/pull/132) ([Thomas-Franklin](https://github.com/Thomas-Franklin))
89
+
90
+ **Merged pull requests:**
91
+
92
+ - Updated announcement instructions [\#131](https://github.com/puppetlabs/puppet-resource_api/pull/131) ([davinhanlon](https://github.com/davinhanlon))
93
+ - Minor spelling fix [\#130](https://github.com/puppetlabs/puppet-resource_api/pull/130) ([AlmogCohen](https://github.com/AlmogCohen))
94
+ - Add internal announcement list to template [\#129](https://github.com/puppetlabs/puppet-resource_api/pull/129) ([DavidS](https://github.com/DavidS))
95
+ - Adjust announcement template to reality [\#128](https://github.com/puppetlabs/puppet-resource_api/pull/128) ([DavidS](https://github.com/DavidS))
96
+ - Release prep for v1.6.0 [\#127](https://github.com/puppetlabs/puppet-resource_api/pull/127) ([da-ar](https://github.com/da-ar))
97
+
98
+ ## [v1.6.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.6.0) (2018-09-25)
99
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.5.0...v1.6.0)
100
+
101
+ **Implemented enhancements:**
102
+
103
+ - \(PDK-1185\) Implement allowances for device-specific providers [\#126](https://github.com/puppetlabs/puppet-resource_api/pull/126) ([DavidS](https://github.com/DavidS))
104
+ - \(PDK-1143\) Allow SimpleProvider to handle multiple namevars [\#125](https://github.com/puppetlabs/puppet-resource_api/pull/125) ([da-ar](https://github.com/da-ar))
105
+
106
+ **Fixed bugs:**
107
+
108
+ - Update README walkthrough [\#122](https://github.com/puppetlabs/puppet-resource_api/pull/122) ([AlmogCohen](https://github.com/AlmogCohen))
109
+
110
+ **Merged pull requests:**
111
+
112
+ - Update README [\#124](https://github.com/puppetlabs/puppet-resource_api/pull/124) ([clairecadman](https://github.com/clairecadman))
113
+ - Update README [\#123](https://github.com/puppetlabs/puppet-resource_api/pull/123) ([DavidS](https://github.com/DavidS))
114
+ - \(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))
115
+ - Release prep for v1.5.0 [\#119](https://github.com/puppetlabs/puppet-resource_api/pull/119) ([DavidS](https://github.com/DavidS))
116
+
117
+ ## [v1.5.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.5.0) (2018-09-12)
118
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.2...v1.5.0)
119
+
120
+ **Implemented enhancements:**
121
+
122
+ - \(PDK-1150\) Allow providers to override :title when retrieving resources [\#115](https://github.com/puppetlabs/puppet-resource_api/pull/115) ([da-ar](https://github.com/da-ar))
123
+
124
+ **Fixed bugs:**
125
+
126
+ - \(maint\) create a new default value instance on every access [\#118](https://github.com/puppetlabs/puppet-resource_api/pull/118) ([DavidS](https://github.com/DavidS))
127
+ - \(PDK-1091\) Fix Sensitive value handling [\#117](https://github.com/puppetlabs/puppet-resource_api/pull/117) ([DavidS](https://github.com/DavidS))
128
+ - \(MODULES-7679\) correctly handle simple\_get\_filter providers [\#113](https://github.com/puppetlabs/puppet-resource_api/pull/113) ([da-ar](https://github.com/da-ar))
129
+
130
+ **Merged pull requests:**
131
+
132
+ - Release prep for v1.4.2 [\#112](https://github.com/puppetlabs/puppet-resource_api/pull/112) ([DavidS](https://github.com/DavidS))
133
+
134
+ ## [v1.4.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.2) (2018-08-09)
135
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.1...v1.4.2)
136
+
137
+ **Fixed bugs:**
138
+
139
+ - Allow an attribute with default boolean value to be set correctly [\#110](https://github.com/puppetlabs/puppet-resource_api/pull/110) ([da-ar](https://github.com/da-ar))
140
+
141
+ **Merged pull requests:**
142
+
143
+ - \(maint\) fix brace alignment; document reference [\#111](https://github.com/puppetlabs/puppet-resource_api/pull/111) ([DavidS](https://github.com/DavidS))
144
+ - Release prep for v1.4.1 [\#109](https://github.com/puppetlabs/puppet-resource_api/pull/109) ([DavidS](https://github.com/DavidS))
145
+
146
+ ## [v1.4.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.1) (2018-07-20)
147
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.4.0...v1.4.1)
148
+
149
+ **Fixed bugs:**
150
+
151
+ - Fix "undefined method `rs\_value'" error with metaparams [\#108](https://github.com/puppetlabs/puppet-resource_api/pull/108) ([DavidS](https://github.com/DavidS))
152
+ - Improve log\_exception output from PuppetContext [\#103](https://github.com/puppetlabs/puppet-resource_api/pull/103) ([da-ar](https://github.com/da-ar))
153
+
154
+ **Merged pull requests:**
155
+
156
+ - Misc fixes: license metadata, announcement template, puppet load fix [\#107](https://github.com/puppetlabs/puppet-resource_api/pull/107) ([DavidS](https://github.com/DavidS))
157
+ - Minor changes to README [\#106](https://github.com/puppetlabs/puppet-resource_api/pull/106) ([clairecadman](https://github.com/clairecadman))
158
+ - Release prep for v1.4.0 [\#102](https://github.com/puppetlabs/puppet-resource_api/pull/102) ([DavidS](https://github.com/DavidS))
159
+
160
+ ## [v1.4.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.4.0) (2018-06-19)
161
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.3.0...v1.4.0)
162
+
163
+ **Implemented enhancements:**
164
+
165
+ - Allow `SimpleDevice` to be initialized with a config hash [\#96](https://github.com/puppetlabs/puppet-resource_api/pull/96) ([DavidS](https://github.com/DavidS))
166
+ - \(PDK-1007\) implement enough to support purge=\>true [\#95](https://github.com/puppetlabs/puppet-resource_api/pull/95) ([DavidS](https://github.com/DavidS))
167
+ - \(PDK-917\) Validates provider.get values against Type schema [\#88](https://github.com/puppetlabs/puppet-resource_api/pull/88) ([da-ar](https://github.com/da-ar))
168
+
169
+ **Fixed bugs:**
170
+
171
+ - \(PDK-1004\) log exceptions as they are processed [\#101](https://github.com/puppetlabs/puppet-resource_api/pull/101) ([DavidS](https://github.com/DavidS))
172
+ - \(PDK-1000\) do not print nil valued attributes [\#100](https://github.com/puppetlabs/puppet-resource_api/pull/100) ([DavidS](https://github.com/DavidS))
173
+ - \(PDK-1007\) Handle setting `ensure` to a Symbol through code [\#94](https://github.com/puppetlabs/puppet-resource_api/pull/94) ([DavidS](https://github.com/DavidS))
174
+ - \(PDK-1007\) the namevar is a param [\#91](https://github.com/puppetlabs/puppet-resource_api/pull/91) ([DavidS](https://github.com/DavidS))
175
+ - \(PDK-996\) Provide better messaging when type cannot be resolved [\#87](https://github.com/puppetlabs/puppet-resource_api/pull/87) ([da-ar](https://github.com/da-ar))
176
+
177
+ **Merged pull requests:**
178
+
179
+ - Whitespace cleanup with new rubocop version [\#98](https://github.com/puppetlabs/puppet-resource_api/pull/98) ([DavidS](https://github.com/DavidS))
180
+ - \(PDK-1007\) add tests for `to\_resource` [\#93](https://github.com/puppetlabs/puppet-resource_api/pull/93) ([DavidS](https://github.com/DavidS))
181
+ - Enable randomised rspec testing [\#92](https://github.com/puppetlabs/puppet-resource_api/pull/92) ([da-ar](https://github.com/da-ar))
182
+ - appease rubocop 0.57.0 [\#90](https://github.com/puppetlabs/puppet-resource_api/pull/90) ([da-ar](https://github.com/da-ar))
183
+ - Improve unit tests of parameter and property results after register\_type [\#89](https://github.com/puppetlabs/puppet-resource_api/pull/89) ([DavidS](https://github.com/DavidS))
184
+ - Update release docs and announcement template [\#86](https://github.com/puppetlabs/puppet-resource_api/pull/86) ([DavidS](https://github.com/DavidS))
185
+ - Release prep for v1.3.0 [\#85](https://github.com/puppetlabs/puppet-resource_api/pull/85) ([da-ar](https://github.com/da-ar))
186
+
187
+ ## [v1.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.3.0) (2018-05-24)
188
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.2.0...v1.3.0)
189
+
190
+ **Implemented enhancements:**
191
+
192
+ - Check for more attributes that puppet can't use [\#84](https://github.com/puppetlabs/puppet-resource_api/pull/84) ([DavidS](https://github.com/DavidS))
193
+ - \(PDK-531\) Support for composite namevars [\#82](https://github.com/puppetlabs/puppet-resource_api/pull/82) ([da-ar](https://github.com/da-ar))
194
+ - \(PDK-889\) Write support for multiple namevars [\#79](https://github.com/puppetlabs/puppet-resource_api/pull/79) ([da-ar](https://github.com/da-ar))
195
+ - \(PDK-889\) Read-only support for multiple namevars [\#76](https://github.com/puppetlabs/puppet-resource_api/pull/76) ([da-ar](https://github.com/da-ar))
196
+
197
+ **Fixed bugs:**
198
+
199
+ - Ignore `provider` attribute when calculating target state [\#83](https://github.com/puppetlabs/puppet-resource_api/pull/83) ([DavidS](https://github.com/DavidS))
200
+ - Add check to handle absent resources through puppet apply [\#81](https://github.com/puppetlabs/puppet-resource_api/pull/81) ([da-ar](https://github.com/da-ar))
201
+ - \(PDK-988\) restrain mungify from non-`puppet resource` workflows [\#80](https://github.com/puppetlabs/puppet-resource_api/pull/80) ([DavidS](https://github.com/DavidS))
202
+
203
+ **Merged pull requests:**
204
+
205
+ - Update fixtures module to PDK v1.5 [\#78](https://github.com/puppetlabs/puppet-resource_api/pull/78) ([DavidS](https://github.com/DavidS))
206
+ - Some glue fixes: announcement, to\_manifest, to\_hierayaml [\#77](https://github.com/puppetlabs/puppet-resource_api/pull/77) ([DavidS](https://github.com/DavidS))
207
+ - Release prep for v1.2.0 [\#75](https://github.com/puppetlabs/puppet-resource_api/pull/75) ([DavidS](https://github.com/DavidS))
208
+
209
+ ## [v1.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.2.0) (2018-05-08)
210
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.1.0...v1.2.0)
211
+
212
+ **Implemented enhancements:**
213
+
214
+ - \(PDK-924\) Throw when SimpleProvider is used with unensurable type [\#73](https://github.com/puppetlabs/puppet-resource_api/pull/73) ([da-ar](https://github.com/da-ar))
215
+ - \(PDK-955\) Provide access to the type definition from the provider [\#72](https://github.com/puppetlabs/puppet-resource_api/pull/72) ([da-ar](https://github.com/da-ar))
216
+
217
+ **Fixed bugs:**
218
+
219
+ - \(PDK-946\) Passes ensure values to puppet as symbols. [\#74](https://github.com/puppetlabs/puppet-resource_api/pull/74) ([da-ar](https://github.com/da-ar))
220
+ - \(PDK-929\) Ignore validation for absent resources [\#69](https://github.com/puppetlabs/puppet-resource_api/pull/69) ([da-ar](https://github.com/da-ar))
221
+ - Make ruby files individually loadable without puppet [\#65](https://github.com/puppetlabs/puppet-resource_api/pull/65) ([DavidS](https://github.com/DavidS))
222
+ - \(PDK-526\) fix test for git [\#63](https://github.com/puppetlabs/puppet-resource_api/pull/63) ([DavidS](https://github.com/DavidS))
223
+
224
+ **Merged pull requests:**
225
+
226
+ - Add pre-commit hook for rubocop [\#70](https://github.com/puppetlabs/puppet-resource_api/pull/70) ([da-ar](https://github.com/da-ar))
227
+ - Add a template for release announcements [\#67](https://github.com/puppetlabs/puppet-resource_api/pull/67) ([DavidS](https://github.com/DavidS))
228
+ - Cache ~/.rvm for jruby jobs [\#66](https://github.com/puppetlabs/puppet-resource_api/pull/66) ([cotsog](https://github.com/cotsog))
229
+ - Release prep for v1.1.0 [\#64](https://github.com/puppetlabs/puppet-resource_api/pull/64) ([DavidS](https://github.com/DavidS))
230
+
231
+ ## [v1.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.1.0) (2018-04-12)
232
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.3...v1.1.0)
233
+
234
+ **Implemented enhancements:**
235
+
236
+ - \(PDK-895\) basic array support [\#59](https://github.com/puppetlabs/puppet-resource_api/pull/59) ([DavidS](https://github.com/DavidS))
237
+
238
+ **Fixed bugs:**
239
+
240
+ - \(PDK-919\) Workaround PUP-2368 "using booleans result in unmanaged pro… [\#62](https://github.com/puppetlabs/puppet-resource_api/pull/62) ([DavidS](https://github.com/DavidS))
241
+
242
+ **Merged pull requests:**
243
+
244
+ - \(PDK-526\) do not rely on git when building the gem on jenkins [\#61](https://github.com/puppetlabs/puppet-resource_api/pull/61) ([DavidS](https://github.com/DavidS))
245
+ - \(PDK-896\) Advanced Array tests [\#60](https://github.com/puppetlabs/puppet-resource_api/pull/60) ([DavidS](https://github.com/DavidS))
246
+ - Update puppetlabs\_spec\_helper to fixed master version [\#58](https://github.com/puppetlabs/puppet-resource_api/pull/58) ([DavidS](https://github.com/DavidS))
247
+ - Release prep for v1.0.3 [\#57](https://github.com/puppetlabs/puppet-resource_api/pull/57) ([DavidS](https://github.com/DavidS))
248
+
249
+ ## [v1.0.3](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.3) (2018-04-06)
250
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.2...v1.0.3)
251
+
252
+ **Implemented enhancements:**
253
+
254
+ - \(PDK-887\) Add checks for read\_only values being set or modified [\#54](https://github.com/puppetlabs/puppet-resource_api/pull/54) ([da-ar](https://github.com/da-ar))
255
+ - \(PDK-885\) Add support for init\_only attributes [\#52](https://github.com/puppetlabs/puppet-resource_api/pull/52) ([da-ar](https://github.com/da-ar))
256
+
257
+ **Fixed bugs:**
258
+
259
+ - \(PDK-911\) Fix handling of `ensure` values from symbols to strings [\#55](https://github.com/puppetlabs/puppet-resource_api/pull/55) ([DavidS](https://github.com/DavidS))
260
+
261
+ **Merged pull requests:**
262
+
263
+ - Misc fixes [\#56](https://github.com/puppetlabs/puppet-resource_api/pull/56) ([DavidS](https://github.com/DavidS))
264
+ - \(PDK-890\) document current constraints on possible data types [\#53](https://github.com/puppetlabs/puppet-resource_api/pull/53) ([DavidS](https://github.com/DavidS))
265
+ - Update release prep notes [\#51](https://github.com/puppetlabs/puppet-resource_api/pull/51) ([DavidS](https://github.com/DavidS))
266
+ - Release prep for v1.0.2 [\#50](https://github.com/puppetlabs/puppet-resource_api/pull/50) ([DavidS](https://github.com/DavidS))
267
+
268
+ ## [v1.0.2](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.2) (2018-03-26)
269
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.1...v1.0.2)
270
+
271
+ **Implemented enhancements:**
272
+
273
+ - \(PDK-875\) Validate behaviour values when registering a type [\#49](https://github.com/puppetlabs/puppet-resource_api/pull/49) ([da-ar](https://github.com/da-ar))
274
+
275
+ **Fixed bugs:**
276
+
277
+ - \(PDK-882,PDK-883\) validate only when needed [\#48](https://github.com/puppetlabs/puppet-resource_api/pull/48) ([DavidS](https://github.com/DavidS))
278
+ - \(PDK-884\) Handle missing namevars returned by providers [\#47](https://github.com/puppetlabs/puppet-resource_api/pull/47) ([da-ar](https://github.com/da-ar))
279
+
280
+ **Merged pull requests:**
281
+
282
+ - \(PDK-810\) run CI against all the versions [\#46](https://github.com/puppetlabs/puppet-resource_api/pull/46) ([DavidS](https://github.com/DavidS))
283
+
284
+ ## [v1.0.1](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.1) (2018-03-23)
285
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v1.0.0...v1.0.1)
286
+
287
+ **Fixed bugs:**
288
+
289
+ - Actually implement the promised behavior [\#44](https://github.com/puppetlabs/puppet-resource_api/pull/44) ([DavidS](https://github.com/DavidS))
290
+
291
+ **Merged pull requests:**
292
+
293
+ - Release prep for v1.0.1 [\#45](https://github.com/puppetlabs/puppet-resource_api/pull/45) ([DavidS](https://github.com/DavidS))
294
+ - Release prep for v1.0.0 [\#43](https://github.com/puppetlabs/puppet-resource_api/pull/43) ([da-ar](https://github.com/da-ar))
295
+
296
+ ## [v1.0.0](https://github.com/puppetlabs/puppet-resource_api/tree/v1.0.0) (2018-03-23)
297
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.10.0...v1.0.0)
298
+
299
+ **Implemented enhancements:**
300
+
301
+ - Improve logging output [\#42](https://github.com/puppetlabs/puppet-resource_api/pull/42) ([DavidS](https://github.com/DavidS))
302
+ - \(PDK-797\) Render read\_only values as comments in manifest output [\#41](https://github.com/puppetlabs/puppet-resource_api/pull/41) ([da-ar](https://github.com/da-ar))
303
+
304
+ **Fixed bugs:**
305
+
306
+ - \(PDK-819\) Ensure checks for mandatory type attributes [\#40](https://github.com/puppetlabs/puppet-resource_api/pull/40) ([da-ar](https://github.com/da-ar))
307
+
308
+ **Merged pull requests:**
309
+
310
+ - Notes on how to build a release [\#39](https://github.com/puppetlabs/puppet-resource_api/pull/39) ([DavidS](https://github.com/DavidS))
311
+ - Release prep for v0.10.0 [\#38](https://github.com/puppetlabs/puppet-resource_api/pull/38) ([DavidS](https://github.com/DavidS))
312
+
313
+ ## [v0.10.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.10.0) (2018-03-21)
314
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.9.0...v0.10.0)
315
+
316
+ **Implemented enhancements:**
317
+
318
+ - \(PDK-512\) Add support for simple\_get\_filter [\#37](https://github.com/puppetlabs/puppet-resource_api/pull/37) ([da-ar](https://github.com/da-ar))
319
+ - \(PDK-822\) Implement proper namevar handling [\#36](https://github.com/puppetlabs/puppet-resource_api/pull/36) ([DavidS](https://github.com/DavidS))
320
+ - \(PDK-513\) implement `supports\_noop` [\#31](https://github.com/puppetlabs/puppet-resource_api/pull/31) ([DavidS](https://github.com/DavidS))
321
+ - \(PDK-511\) Add canonicalization checking if puppet strict is on. [\#30](https://github.com/puppetlabs/puppet-resource_api/pull/30) ([da-ar](https://github.com/da-ar))
322
+ - \(PDK-508\) implement autorequire and friends [\#29](https://github.com/puppetlabs/puppet-resource_api/pull/29) ([DavidS](https://github.com/DavidS))
323
+ - Update README with PDK 1.4 commands and messages [\#28](https://github.com/puppetlabs/puppet-resource_api/pull/28) ([DavidS](https://github.com/DavidS))
324
+
325
+ **Merged pull requests:**
326
+
327
+ - Cleanups [\#34](https://github.com/puppetlabs/puppet-resource_api/pull/34) ([DavidS](https://github.com/DavidS))
328
+ - Cleanup test module [\#33](https://github.com/puppetlabs/puppet-resource_api/pull/33) ([DavidS](https://github.com/DavidS))
329
+ - Update to rubocop 0.53.0 [\#32](https://github.com/puppetlabs/puppet-resource_api/pull/32) ([DavidS](https://github.com/DavidS))
330
+
331
+ ## [v0.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.9.0) (2018-02-22)
332
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.3.0...v0.9.0)
333
+
334
+ **Implemented enhancements:**
335
+
336
+ - \(PDK-536\) Proper datatype parsing and checking [\#23](https://github.com/puppetlabs/puppet-resource_api/pull/23) ([DavidS](https://github.com/DavidS))
337
+
338
+ **Fixed bugs:**
339
+
340
+ - SimpleProvider: fix `is`-lookup and docs [\#24](https://github.com/puppetlabs/puppet-resource_api/pull/24) ([DavidS](https://github.com/DavidS))
341
+ - \(main\) Fixup to\_manifest output [\#20](https://github.com/puppetlabs/puppet-resource_api/pull/20) ([shermdog](https://github.com/shermdog))
342
+
343
+ **Merged pull requests:**
344
+
345
+ - Release prep v0.9.0 [\#27](https://github.com/puppetlabs/puppet-resource_api/pull/27) ([DavidS](https://github.com/DavidS))
346
+ - Add a note on device support to the README [\#26](https://github.com/puppetlabs/puppet-resource_api/pull/26) ([DavidS](https://github.com/DavidS))
347
+ - Remove Command API [\#25](https://github.com/puppetlabs/puppet-resource_api/pull/25) ([DavidS](https://github.com/DavidS))
348
+
349
+ ## [v0.3.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.3.0) (2018-02-21)
350
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.2...v0.3.0)
351
+
352
+ **Implemented enhancements:**
353
+
354
+ - \(FM-6797\) Add debug logging of current and target states [\#21](https://github.com/puppetlabs/puppet-resource_api/pull/21) ([da-ar](https://github.com/da-ar))
355
+ - \(PDK-803\) Add YAML output for resources [\#19](https://github.com/puppetlabs/puppet-resource_api/pull/19) ([shermdog](https://github.com/shermdog))
356
+ - Edits on resource api readme [\#17](https://github.com/puppetlabs/puppet-resource_api/pull/17) ([clairecadman](https://github.com/clairecadman))
357
+
358
+ **Fixed bugs:**
359
+
360
+ - \(PDK-569\) `puppet resource` now displays type name correctly [\#18](https://github.com/puppetlabs/puppet-resource_api/pull/18) ([tphoney](https://github.com/tphoney))
361
+
362
+ **Merged pull requests:**
363
+
364
+ - Release prep v0.3.0 [\#22](https://github.com/puppetlabs/puppet-resource_api/pull/22) ([DavidS](https://github.com/DavidS))
365
+
366
+ ## [v0.2.2](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.2) (2018-01-25)
367
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.1...v0.2.2)
368
+
369
+ **Fixed bugs:**
370
+
371
+ - make the server parts JRuby compatible [\#15](https://github.com/puppetlabs/puppet-resource_api/pull/15) ([DavidS](https://github.com/DavidS))
372
+
373
+ **Merged pull requests:**
374
+
375
+ - Release prep v0.2.2 [\#16](https://github.com/puppetlabs/puppet-resource_api/pull/16) ([DavidS](https://github.com/DavidS))
376
+
377
+ ## [v0.2.1](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.1) (2018-01-24)
378
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.2.0...v0.2.1)
379
+
380
+ **Fixed bugs:**
381
+
382
+ - gemspec fixes [\#12](https://github.com/puppetlabs/puppet-resource_api/pull/12) ([DavidS](https://github.com/DavidS))
383
+
384
+ **Merged pull requests:**
385
+
386
+ - Release prep [\#14](https://github.com/puppetlabs/puppet-resource_api/pull/14) ([DavidS](https://github.com/DavidS))
387
+
388
+ ## [v0.2.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.2.0) (2018-01-23)
389
+ [Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/v0.1.0...v0.2.0)
390
+
391
+ **Implemented enhancements:**
392
+
393
+ - \(PDK-703\) Resource API introduction with pdk [\#11](https://github.com/puppetlabs/puppet-resource_api/pull/11) ([DavidS](https://github.com/DavidS))
394
+ - \(PDK-746\) have a SimpleProvider for simple cases [\#8](https://github.com/puppetlabs/puppet-resource_api/pull/8) ([DavidS](https://github.com/DavidS))
395
+
396
+ **Fixed bugs:**
397
+
398
+ - Fix params and properties [\#10](https://github.com/puppetlabs/puppet-resource_api/pull/10) ([DavidS](https://github.com/DavidS))
399
+
400
+ **Merged pull requests:**
401
+
402
+ - Release Prep for 0.2.0 [\#9](https://github.com/puppetlabs/puppet-resource_api/pull/9) ([DavidS](https://github.com/DavidS))
403
+ - Small fixes [\#7](https://github.com/puppetlabs/puppet-resource_api/pull/7) ([DavidS](https://github.com/DavidS))
404
+
405
+ ## [v0.1.0](https://github.com/puppetlabs/puppet-resource_api/tree/v0.1.0) (2017-11-17)
406
+ **Merged pull requests:**
407
+
408
+ - \(maint\) sort dependencies in gemspec [\#6](https://github.com/puppetlabs/puppet-resource_api/pull/6) ([DavidS](https://github.com/DavidS))
409
+ - base\_context processing and processed logging methods [\#5](https://github.com/puppetlabs/puppet-resource_api/pull/5) ([james-stocks](https://github.com/james-stocks))
410
+ - Fix resource\_api logging format [\#4](https://github.com/puppetlabs/puppet-resource_api/pull/4) ([james-stocks](https://github.com/james-stocks))
411
+ - Add logging action methods to base\_context [\#3](https://github.com/puppetlabs/puppet-resource_api/pull/3) ([james-stocks](https://github.com/james-stocks))
412
+ - Logging [\#2](https://github.com/puppetlabs/puppet-resource_api/pull/2) ([james-stocks](https://github.com/james-stocks))
413
+ - Workaround missing report back from here to flush\(\) [\#1](https://github.com/puppetlabs/puppet-resource_api/pull/1) ([james-stocks](https://github.com/james-stocks))
data/Rakefile CHANGED
@@ -14,22 +14,30 @@ end
14
14
  require 'rspec/core/rake_task'
15
15
 
16
16
  RSpec::Core::RakeTask.new(:spec) do |t|
17
- Rake::Task[:spec_prep].invoke
18
17
  # thanks to the fixtures/modules/ symlinks this needs to exclude fixture modules explicitely
19
18
  excludes = ['fixtures/**/*.rb,fixtures/modules/*/**/*.rb']
20
19
  if RUBY_PLATFORM == 'java'
21
20
  excludes += ['acceptance/**/*.rb', 'integration/**/*.rb', 'puppet/resource_api/*_context_spec.rb', 'puppet/util/network_device/simple/device_spec.rb']
22
21
  t.rspec_opts = '--tag ~agent_test'
22
+ t.rspec_opts << ' --tag ~j17_exclude' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.0.0')
23
23
  end
24
24
  t.exclude_pattern = "spec/{#{excludes.join ','}}"
25
25
  end
26
26
 
27
+ task :spec => :spec_prep
28
+
27
29
  namespace :spec do
28
30
  desc 'Run RSpec code examples with coverage collection'
29
31
  task :coverage do
30
- ENV['COVERAGE'] = 'yes'
32
+ ENV['SIMPLECOV'] = 'yes'
31
33
  Rake::Task['spec'].execute
32
34
  end
35
+
36
+ RSpec::Core::RakeTask.new(:unit) do |t|
37
+ t.pattern = "spec/puppet/**/*_spec.rb,spec/integration/**/*_spec.rb"
38
+ end
39
+
40
+ task :unit => :spec_prep
33
41
  end
34
42
 
35
43
  #### LICENSE_FINDER ####
@@ -35,7 +35,7 @@ module Puppet::ResourceApi
35
35
  end
36
36
 
37
37
  Puppet::Type.newtype(definition[:name].to_sym) do
38
- @docs = definition[:docs]
38
+ @docs = definition[:desc]
39
39
  @type_definition = type_def
40
40
 
41
41
  # Keeps a copy of the provider around. Weird naming to avoid clashes with puppet's own `provider` member
@@ -66,7 +66,7 @@ module Puppet::ResourceApi
66
66
  apply_to_device
67
67
  end
68
68
 
69
- define_method(:initialize) do |attributes|
69
+ def initialize(attributes)
70
70
  # $stderr.puts "A: #{attributes.inspect}"
71
71
  if attributes.is_a? Puppet::Resource
72
72
  @title = attributes.title
@@ -94,7 +94,7 @@ module Puppet::ResourceApi
94
94
  # the `Puppet::Resource::Ral.find` method, when `instances` does not return a match, uses a Hash with a `:name` key to create
95
95
  # an "absent" resource. This is often hit by `puppet resource`. This needs to work, even if the namevar is not called `name`.
96
96
  # This bit here relies on the default `title_patterns` (see below) to match the title back to the first (and often only) namevar
97
- if definition[:attributes][:name].nil? && attributes[:title].nil?
97
+ if type_definition.attributes[:name].nil? && attributes[:title].nil?
98
98
  attributes[:title] = attributes.delete(:name)
99
99
  if attributes[:title].nil? && !type_definition.namevars.empty?
100
100
  attributes[:title] = @title
@@ -108,11 +108,25 @@ module Puppet::ResourceApi
108
108
  title
109
109
  end
110
110
 
111
+ def self.build_title(type_definition, resource_hash)
112
+ if type_definition.namevars.size > 1
113
+ # use a MonkeyHash to allow searching in Puppet's RAL
114
+ Puppet::ResourceApi::MonkeyHash[type_definition.namevars.map { |attr| [attr, resource_hash[attr]] }]
115
+ else
116
+ resource_hash[type_definition.namevars[0]]
117
+ end
118
+ end
119
+
120
+ def rsapi_title
121
+ @rsapi_title ||= self.class.build_title(type_definition, self)
122
+ @rsapi_title
123
+ end
124
+
111
125
  def to_resource
112
126
  to_resource_shim(super)
113
127
  end
114
128
 
115
- define_method(:to_resource_shim) do |resource|
129
+ def to_resource_shim(resource)
116
130
  resource_hash = Hash[resource.keys.map { |k| [k, resource[k]] }]
117
131
  resource_hash[:title] = resource.title
118
132
  ResourceShim.new(resource_hash, type_definition.name, type_definition.namevars, type_definition.attributes, catalog)
@@ -213,7 +227,7 @@ module Puppet::ResourceApi
213
227
  end
214
228
  end
215
229
 
216
- define_singleton_method(:instances) do
230
+ def self.instances
217
231
  # puts 'instances'
218
232
  # force autoloading of the provider
219
233
  provider(type_definition.name)
@@ -230,16 +244,16 @@ module Puppet::ResourceApi
230
244
  result = if resource_hash.key? :title
231
245
  new(title: resource_hash[:title])
232
246
  else
233
- new(title: resource_hash[type_definition.namevars.first])
247
+ new(title: build_title(type_definition, resource_hash))
234
248
  end
235
249
  result.cache_current_state(resource_hash)
236
250
  result
237
251
  end
238
252
  end
239
253
 
240
- define_method(:refresh_current_state) do
254
+ def refresh_current_state
241
255
  @rsapi_current_state = if type_definition.feature?('simple_get_filter')
242
- my_provider.get(context, [title]).find { |h| namevar_match?(h) }
256
+ my_provider.get(context, [rsapi_title]).find { |h| namevar_match?(h) }
243
257
  else
244
258
  my_provider.get(context).find { |h| namevar_match?(h) }
245
259
  end
@@ -248,7 +262,11 @@ module Puppet::ResourceApi
248
262
  type_definition.check_schema(@rsapi_current_state)
249
263
  strict_check(@rsapi_current_state) if type_definition.feature?('canonicalize')
250
264
  else
251
- @rsapi_current_state = { title: title }
265
+ @rsapi_current_state = if rsapi_title.is_a? Hash
266
+ rsapi_title.dup
267
+ else
268
+ { title: rsapi_title }
269
+ end
252
270
  @rsapi_current_state[:ensure] = :absent if type_definition.ensurable?
253
271
  end
254
272
  end
@@ -259,7 +277,7 @@ module Puppet::ResourceApi
259
277
  strict_check(@rsapi_current_state) if type_definition.feature?('canonicalize')
260
278
  end
261
279
 
262
- define_method(:retrieve) do
280
+ def retrieve
263
281
  refresh_current_state unless @rsapi_current_state
264
282
 
265
283
  Puppet.debug("Current State: #{@rsapi_current_state.inspect}")
@@ -273,13 +291,13 @@ module Puppet::ResourceApi
273
291
  result
274
292
  end
275
293
 
276
- define_method(:namevar_match?) do |item|
294
+ def namevar_match?(item)
277
295
  context.type.namevars.all? do |namevar|
278
296
  item[namevar] == @parameters[namevar].value if @parameters[namevar].respond_to? :value
279
297
  end
280
298
  end
281
299
 
282
- define_method(:flush) do
300
+ def flush
283
301
  raise_missing_attrs
284
302
 
285
303
  # puts 'flush'
@@ -297,7 +315,7 @@ module Puppet::ResourceApi
297
315
  # enforce init_only attributes
298
316
  if Puppet.settings[:strict] != :off && @rsapi_current_state && (@rsapi_current_state[:ensure] == 'present' && target_state[:ensure] == 'present')
299
317
  target_state.each do |name, value|
300
- next unless definition[:attributes][name][:behaviour] == :init_only && value != @rsapi_current_state[name]
318
+ next unless type_definition.attributes[name][:behaviour] == :init_only && value != @rsapi_current_state[name]
301
319
  message = "Attempting to change `#{name}` init_only attribute value from `#{@rsapi_current_state[name]}` to `#{value}`"
302
320
  case Puppet.settings[:strict]
303
321
  when :warning
@@ -309,9 +327,9 @@ module Puppet::ResourceApi
309
327
  end
310
328
 
311
329
  if type_definition.feature?('supports_noop')
312
- my_provider.set(context, { title => { is: @rsapi_current_state, should: target_state } }, noop: noop?)
330
+ my_provider.set(context, { rsapi_title => { is: @rsapi_current_state, should: target_state } }, noop: noop?)
313
331
  else
314
- my_provider.set(context, title => { is: @rsapi_current_state, should: target_state }) unless noop?
332
+ my_provider.set(context, rsapi_title => { is: @rsapi_current_state, should: target_state }) unless noop?
315
333
  end
316
334
  raise 'Execution encountered an error' if context.failed?
317
335
 
@@ -319,17 +337,17 @@ module Puppet::ResourceApi
319
337
  @rsapi_current_state = target_state
320
338
  end
321
339
 
322
- define_method(:raise_missing_attrs) do
340
+ def raise_missing_attrs
323
341
  error_msg = "The following mandatory attributes were not provided:\n * " + @missing_attrs.join(", \n * ")
324
342
  raise Puppet::ResourceError, error_msg if @missing_attrs.any? && (value(:ensure) != :absent && !value(:ensure).nil?)
325
343
  end
326
344
 
327
- define_method(:raise_missing_params) do
345
+ def raise_missing_params
328
346
  error_msg = "The following mandatory parameters were not provided:\n * " + @missing_params.join(", \n * ")
329
347
  raise Puppet::ResourceError, error_msg
330
348
  end
331
349
 
332
- define_method(:strict_check) do |current_state|
350
+ def strict_check(current_state)
333
351
  return if Puppet.settings[:strict] == :off
334
352
 
335
353
  # if strict checking is on we must notify if the values are changed by canonicalize
@@ -343,7 +361,7 @@ module Puppet::ResourceApi
343
361
  #:nocov:
344
362
  # codecov fails to register this multiline as covered, even though simplecov does.
345
363
  message = <<MESSAGE.strip
346
- #{definition[:name]}[#{@title}]#get has not provided canonicalized values.
364
+ #{type_definition.name}[#{@title}]#get has not provided canonicalized values.
347
365
  Returned values: #{current_state.inspect}
348
366
  Canonicalized values: #{state_clone.inspect}
349
367
  MESSAGE
@@ -356,7 +374,7 @@ MESSAGE
356
374
  raise Puppet::DevError, message
357
375
  end
358
376
 
359
- return nil
377
+ nil
360
378
  end
361
379
 
362
380
  define_singleton_method(:context) do
@@ -367,9 +385,9 @@ MESSAGE
367
385
  self.class.context
368
386
  end
369
387
 
370
- define_singleton_method(:title_patterns) do
371
- @title_patterns ||= if definition.key? :title_patterns
372
- parse_title_patterns(definition[:title_patterns])
388
+ def self.title_patterns
389
+ @title_patterns ||= if type_definition.definition.key? :title_patterns
390
+ parse_title_patterns(type_definition.definition[:title_patterns])
373
391
  else
374
392
  [[%r{(.*)}m, [[type_definition.namevars.first]]]]
375
393
  end
@@ -57,4 +57,19 @@ module Puppet::ResourceApi
57
57
  values.keys.reject { |k| k == :title || !attr_def[k] || (attr_def[k][:behaviour] == :namevar && @namevars.size == 1) }
58
58
  end
59
59
  end
60
+
61
+ # this hash allows key-value based ordering comparisons between instances of this and instances of this and other classes
62
+ # this is required for `lib/puppet/indirector/resource/ral.rb`'s `search` method which expects all titles to be comparable
63
+ class MonkeyHash < Hash
64
+ def <=>(other)
65
+ result = self.class.name <=> other.class.name
66
+ if result.zero?
67
+ result = keys.sort <=> other.keys.sort
68
+ end
69
+ if result.zero?
70
+ result = keys.sort.map { |k| self[k] } <=> other.keys.sort.map { |k| other[k] }
71
+ end
72
+ result
73
+ end
74
+ end
60
75
  end
@@ -1,4 +1,5 @@
1
1
  module Puppet; end # rubocop:disable Style/Documentation
2
+
2
3
  module Puppet::ResourceApi
3
4
  # This class provides a default implementation for set(), when your resource does not benefit from batching.
4
5
  # Instead of processing changes yourself, the `create`, `update`, and `delete` functions, are called for you,
@@ -19,12 +20,12 @@ module Puppet::ResourceApi
19
20
 
20
21
  raise 'SimpleProvider cannot be used with a Type that is not ensurable' unless context.type.ensurable?
21
22
 
22
- is = { name: name, ensure: 'absent' } if is.nil?
23
- should = { name: name, ensure: 'absent' } if should.nil?
23
+ is = SimpleProvider.create_absent(:name, name) if is.nil?
24
+ should = SimpleProvider.create_absent(:name, name) if should.nil?
24
25
 
25
26
  name_hash = if context.type.namevars.length > 1
26
27
  # pass a name_hash containing the values of all namevars
27
- name_hash = { title: name }
28
+ name_hash = {}
28
29
  context.type.namevars.each do |namevar|
29
30
  name_hash[namevar] = change[:should][namevar]
30
31
  end
@@ -60,5 +61,16 @@ module Puppet::ResourceApi
60
61
  def delete(_context, _name)
61
62
  raise "#{self.class} has not implemented `delete`"
62
63
  end
64
+
65
+ # @api private
66
+ def self.create_absent(namevar, title)
67
+ result = if title.is_a? Hash
68
+ title.dup
69
+ else
70
+ { namevar => title }
71
+ end
72
+ result[:ensure] = 'absent'
73
+ result
74
+ end
63
75
  end
64
76
  end
@@ -20,11 +20,35 @@ module Puppet::ResourceApi::Transport
20
20
  module_function :register # rubocop:disable Style/AccessModifierDeclarations
21
21
 
22
22
  # retrieve a Hash of transport schemas, keyed by their name.
23
+ # Only already loaded transports are returned.
23
24
  def list
24
25
  Marshal.load(Marshal.dump(transports))
25
26
  end
26
27
  module_function :list # rubocop:disable Style/AccessModifierDeclarations
27
28
 
29
+ # retrieve a Hash of transport schemas, keyed by their name.
30
+ # This uses the Puppet autoloader, provide a environment name as `force_environment`
31
+ # to choose where to load from.
32
+ # @api private
33
+ def list_all_transports(force_environment)
34
+ env = Puppet.lookup(:environments).get!(force_environment)
35
+ Puppet.override({ current_environment: env }, 'current env for list_all_transports') do
36
+ load_all_schemas
37
+ Marshal.load(Marshal.dump(transports))
38
+ end
39
+ end
40
+ module_function :list_all_transports # rubocop:disable Style/AccessModifierDeclarations
41
+
42
+ # Loads all schemas using the Puppet Autoloader.
43
+ def self.load_all_schemas
44
+ require 'puppet'
45
+ require 'puppet/settings'
46
+ require 'puppet/util/autoload'
47
+ @autoloader ||= Puppet::Util::Autoload.new(self, 'puppet/transport/schema')
48
+ @autoloader.loadall(Puppet.lookup(:current_environment))
49
+ end
50
+ private_class_method :load_all_schemas
51
+
28
52
  def connect(name, connection_info)
29
53
  validate(name, connection_info)
30
54
  require "puppet/transport/#{name}"
@@ -15,13 +15,7 @@ module Puppet::ResourceApi
15
15
 
16
16
  # rubocop complains when this is named has_feature?
17
17
  def feature?(feature)
18
- supported = (definition[:features] && definition[:features].include?(feature))
19
- if supported
20
- Puppet.debug("#{definition[:name]} supports `#{feature}`")
21
- else
22
- Puppet.debug("#{definition[:name]} does not support `#{feature}`")
23
- end
24
- supported
18
+ (definition[:features] && definition[:features].include?(feature))
25
19
  end
26
20
 
27
21
  def validate_schema(definition, attr_key)
@@ -101,10 +95,20 @@ module Puppet::ResourceApi
101
95
  }
102
96
  end
103
97
 
98
+ # fixup desc/docs backwards compatibility
99
+ if definition.key? :docs
100
+ if definition[:desc]
101
+ raise Puppet::DevError, '`%{name}` has both `desc` and `docs`, prefer using `desc`' % { name: definition[:name] }
102
+ end
103
+ definition[:desc] = definition[:docs]
104
+ definition.delete(:docs)
105
+ end
106
+ Puppet.warning('`%{name}` has no documentation, add it using a `desc` key' % { name: definition[:name] }) unless definition.key? :desc
107
+
104
108
  attributes.each do |key, attr|
105
109
  raise Puppet::DevError, "`#{definition[:name]}.#{key}` must be a Hash, not a #{attr.class}" unless attr.is_a? Hash
106
110
  raise Puppet::DevError, "`#{definition[:name]}.#{key}` has no type" unless attr.key? :type
107
- Puppet.warning("`#{definition[:name]}.#{key}` has no docs") unless attr.key? :desc
111
+ Puppet.warning('`%{name}.%{key}` has no documentation, add it using a `desc` key' % { name: definition[:name], key: key }) unless attr.key? :desc
108
112
 
109
113
  # validate the type by attempting to parse into a puppet type
110
114
  @data_type_cache[attributes[key][:type]] ||=
@@ -1,5 +1,5 @@
1
1
  module Puppet
2
2
  module ResourceApi
3
- VERSION = '1.8.4'.freeze
3
+ VERSION = '1.8.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-resource_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Schmitt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-21 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hocon
@@ -40,6 +40,7 @@ files:
40
40
  - CHANGELOG.md
41
41
  - CONTRIBUTING.md
42
42
  - Gemfile
43
+ - HISTORY.md
43
44
  - LICENSE
44
45
  - NOTICE
45
46
  - README.md