pdk 1.17.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +71 -2
- data/lib/pdk/cli/convert.rb +7 -9
- data/lib/pdk/cli/new/class.rb +2 -1
- data/lib/pdk/cli/new/defined_type.rb +2 -1
- data/lib/pdk/cli/new/provider.rb +2 -1
- data/lib/pdk/cli/new/task.rb +2 -1
- data/lib/pdk/cli/new/test.rb +2 -1
- data/lib/pdk/cli/new/transport.rb +2 -1
- data/lib/pdk/cli/remove/config.rb +80 -0
- data/lib/pdk/cli/remove.rb +20 -0
- data/lib/pdk/cli/set/config.rb +119 -0
- data/lib/pdk/cli/set.rb +20 -0
- data/lib/pdk/cli/update.rb +6 -8
- data/lib/pdk/cli/util/update_manager_printer.rb +82 -0
- data/lib/pdk/cli/util.rb +1 -0
- data/lib/pdk/cli.rb +2 -0
- data/lib/pdk/config.rb +96 -13
- data/lib/pdk/context.rb +8 -5
- data/lib/pdk/generate/defined_type.rb +25 -32
- data/lib/pdk/generate/module.rb +11 -10
- data/lib/pdk/generate/provider.rb +16 -65
- data/lib/pdk/generate/puppet_class.rb +25 -31
- data/lib/pdk/generate/puppet_object.rb +83 -187
- data/lib/pdk/generate/resource_api_object.rb +55 -0
- data/lib/pdk/generate/task.rb +28 -46
- data/lib/pdk/generate/transport.rb +21 -75
- data/lib/pdk/generate.rb +1 -0
- data/lib/pdk/module/convert.rb +41 -23
- data/lib/pdk/module/release.rb +1 -1
- data/lib/pdk/module/update.rb +6 -10
- data/lib/pdk/module/update_manager.rb +7 -0
- data/lib/pdk/module.rb +0 -1
- data/lib/pdk/template/fetcher/git.rb +85 -0
- data/lib/pdk/template/fetcher/local.rb +28 -0
- data/lib/pdk/template/fetcher.rb +98 -0
- data/lib/pdk/template/renderer/v1/legacy_template_dir.rb +116 -0
- data/lib/pdk/template/renderer/v1/renderer.rb +132 -0
- data/lib/pdk/template/renderer/v1/template_file.rb +102 -0
- data/lib/pdk/template/renderer/v1.rb +25 -0
- data/lib/pdk/template/renderer.rb +96 -0
- data/lib/pdk/template/template_dir.rb +67 -0
- data/lib/pdk/template.rb +59 -0
- data/lib/pdk/tests/unit.rb +5 -0
- data/lib/pdk/util/json_finder.rb +84 -0
- data/lib/pdk/util/puppet_strings.rb +3 -3
- data/lib/pdk/util/template_uri.rb +4 -6
- data/lib/pdk/util.rb +4 -35
- data/lib/pdk/validate/control_repo/control_repo_validator_group.rb +23 -0
- data/lib/pdk/validate/control_repo/environment_conf_validator.rb +98 -0
- data/lib/pdk/validate/invokable_validator.rb +2 -3
- data/lib/pdk/validate/validator.rb +7 -0
- data/lib/pdk/validate/validator_group.rb +1 -0
- data/lib/pdk/validate.rb +17 -10
- data/lib/pdk/version.rb +1 -1
- data/lib/pdk.rb +1 -1
- data/locales/pdk.pot +356 -228
- metadata +33 -12
- data/lib/pdk/module/template_dir/base.rb +0 -268
- data/lib/pdk/module/template_dir/git.rb +0 -91
- data/lib/pdk/module/template_dir/local.rb +0 -21
- data/lib/pdk/module/template_dir.rb +0 -115
- data/lib/pdk/template_file.rb +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5e09523a0989d3a437659e92470469a90817c21e
|
4
|
+
data.tar.gz: 143f82470256dc0a640fb60778697b384742bc18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b5a9d6796606e1c976848e5010a3ff9d4bd0681391cbda438238c882a996d36d067ee6456229498a199be810eb05ff54aaeb3e7b99060601c539fede12d23de
|
7
|
+
data.tar.gz: 4f61632e41478575a9b2d1f9624a6866d7b00253e1a5bc5e770e5f17fa912e4f11d4914b2ab2ad332a7597aa7fb0840153aca87c501c789ebea1e2a392668844
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,38 @@ All changes to this repo will be documented in this file.
|
|
4
4
|
See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) for a high-level summary.
|
5
5
|
|
6
6
|
|
7
|
+
## [v1.18.0](https://github.com/puppetlabs/pdk/tree/v1.18.0) (2020-05-12)
|
8
|
+
|
9
|
+
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.17.0...v1.18.0)
|
10
|
+
|
11
|
+
**Implemented enhancements:**
|
12
|
+
|
13
|
+
- \(PDK-1109\) Add pdk remove config [\#870](https://github.com/puppetlabs/pdk/pull/870) ([glennsarti](https://github.com/glennsarti))
|
14
|
+
- \(PDK-1632\) Only show validators that are available in the given PDK Context [\#867](https://github.com/puppetlabs/pdk/pull/867) ([glennsarti](https://github.com/glennsarti))
|
15
|
+
- \(PDK-1615\) Add validator for environment.conf [\#866](https://github.com/puppetlabs/pdk/pull/866) ([glennsarti](https://github.com/glennsarti))
|
16
|
+
- \(PDK-1108\) Add pdk set config command [\#859](https://github.com/puppetlabs/pdk/pull/859) ([glennsarti](https://github.com/glennsarti))
|
17
|
+
|
18
|
+
**Fixed bugs:**
|
19
|
+
|
20
|
+
- Warning from libhoney when running unit test with PDK 1.17 [\#875](https://github.com/puppetlabs/pdk/issues/875)
|
21
|
+
- 'pdk convert' of a module that's inside a control repo adds boilerplate to the control repo [\#874](https://github.com/puppetlabs/pdk/issues/874)
|
22
|
+
- GemNotFound error for public\_suffix-3.1.1 when using --add-tests [\#869](https://github.com/puppetlabs/pdk/issues/869)
|
23
|
+
- Scrollback of failed rspec tests in VS code is extremely limited [\#829](https://github.com/puppetlabs/pdk/issues/829)
|
24
|
+
- Running individual rspec tests on Windows requires escaping the path [\#828](https://github.com/puppetlabs/pdk/issues/828)
|
25
|
+
- Generated descriptions for certain test comparisons break JUnit output [\#821](https://github.com/puppetlabs/pdk/issues/821)
|
26
|
+
- Fix PDK release command module validation [\#880](https://github.com/puppetlabs/pdk/pull/880) ([carabasdaniel](https://github.com/carabasdaniel))
|
27
|
+
- \(GH-828\) Munge backslash in rake paths for unit tests [\#878](https://github.com/puppetlabs/pdk/pull/878) ([glennsarti](https://github.com/glennsarti))
|
28
|
+
- \(GH-874\) Use PDK Context root for PDK Convert and Update [\#877](https://github.com/puppetlabs/pdk/pull/877) ([glennsarti](https://github.com/glennsarti))
|
29
|
+
- \(\#869\) Ensure bundle update on convert/update [\#871](https://github.com/puppetlabs/pdk/pull/871) ([rodjek](https://github.com/rodjek))
|
30
|
+
- \(\#821\) Allow for unbalanced JSON fragments in RSpec output [\#822](https://github.com/puppetlabs/pdk/pull/822) ([scotje](https://github.com/scotje))
|
31
|
+
|
32
|
+
**Merged pull requests:**
|
33
|
+
|
34
|
+
- \(MAINT\) Bump nokogiri and rake for security advisories [\#865](https://github.com/puppetlabs/pdk/pull/865) ([scotje](https://github.com/scotje))
|
35
|
+
- \(FIXUP\) Make system config path absolute instead of relative on POSIX hosts [\#862](https://github.com/puppetlabs/pdk/pull/862) ([scotje](https://github.com/scotje))
|
36
|
+
|
7
37
|
## [v1.17.0](https://github.com/puppetlabs/pdk/tree/v1.17.0) (2020-02-27)
|
38
|
+
|
8
39
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.16.0...v1.17.0)
|
9
40
|
|
10
41
|
**Implemented enhancements:**
|
@@ -29,6 +60,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
29
60
|
- \(PDK-1592\) Refactor PDK validators to be more singular purpose [\#831](https://github.com/puppetlabs/pdk/pull/831) ([glennsarti](https://github.com/glennsarti))
|
30
61
|
|
31
62
|
## [v1.16.0](https://github.com/puppetlabs/pdk/tree/v1.16.0) (2020-02-05)
|
63
|
+
|
32
64
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.15.0...v1.16.0)
|
33
65
|
|
34
66
|
**Implemented enhancements:**
|
@@ -53,6 +85,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
53
85
|
- \(MAINT\) Refactor how gem\_path to bundler is calculated [\#745](https://github.com/puppetlabs/pdk/pull/745) ([scotje](https://github.com/scotje))
|
54
86
|
|
55
87
|
## [v1.15.0](https://github.com/puppetlabs/pdk/tree/v1.15.0) (2019-12-13)
|
88
|
+
|
56
89
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.14.1...v1.15.0)
|
57
90
|
|
58
91
|
**Implemented enhancements:**
|
@@ -80,6 +113,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
80
113
|
- \(PDK-1523\) Refactor filesystem operations to use PDK::Util::Filesystem [\#799](https://github.com/puppetlabs/pdk/pull/799) ([rodjek](https://github.com/rodjek))
|
81
114
|
|
82
115
|
## [v1.14.1](https://github.com/puppetlabs/pdk/tree/v1.14.1) (2019-11-01)
|
116
|
+
|
83
117
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.14.0...v1.14.1)
|
84
118
|
|
85
119
|
**Fixed bugs:**
|
@@ -111,6 +145,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
111
145
|
- \(\#770\) Add missing require to PDK::Module::Metadata.from\_file [\#771](https://github.com/puppetlabs/pdk/pull/771) ([hajee](https://github.com/hajee))
|
112
146
|
|
113
147
|
## [v1.14.0](https://github.com/puppetlabs/pdk/tree/v1.14.0) (2019-10-09)
|
148
|
+
|
114
149
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.13.0...v1.14.0)
|
115
150
|
|
116
151
|
**Implemented enhancements:**
|
@@ -136,6 +171,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
136
171
|
- \(MAINT\) Bump version to 1.14.0.pre [\#741](https://github.com/puppetlabs/pdk/pull/741) ([scotje](https://github.com/scotje))
|
137
172
|
|
138
173
|
## [v1.13.0](https://github.com/puppetlabs/pdk/tree/v1.13.0) (2019-08-29)
|
174
|
+
|
139
175
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.12.0...v1.13.0)
|
140
176
|
|
141
177
|
**Implemented enhancements:**
|
@@ -153,7 +189,6 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
153
189
|
- Windows MSI installer fails with PDK 1.12.0 [\#721](https://github.com/puppetlabs/pdk/issues/721)
|
154
190
|
- Handle deleted template files for new module [\#725](https://github.com/puppetlabs/pdk/pull/725) ([seanmil](https://github.com/seanmil))
|
155
191
|
- \(GH-722\) Do not emit nil targets for validators against a directory [\#724](https://github.com/puppetlabs/pdk/pull/724) ([glennsarti](https://github.com/glennsarti))
|
156
|
-
- \(maint\) avoid interfering with local ruby configs [\#86](https://github.com/puppetlabs/pdk/pull/86) ([DavidS](https://github.com/DavidS))
|
157
192
|
|
158
193
|
**Merged pull requests:**
|
159
194
|
|
@@ -169,6 +204,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
169
204
|
- \(PDK-1432\) Autogenerate PowerShell modules from code [\#701](https://github.com/puppetlabs/pdk/pull/701) ([glennsarti](https://github.com/glennsarti))
|
170
205
|
|
171
206
|
## [v1.12.0](https://github.com/puppetlabs/pdk/tree/v1.12.0) (2019-07-31)
|
207
|
+
|
172
208
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.11.1...v1.12.0)
|
173
209
|
|
174
210
|
**Implemented enhancements:**
|
@@ -202,6 +238,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
202
238
|
- \(PDK-1333\) command\_spec rake task [\#644](https://github.com/puppetlabs/pdk/pull/644) ([rodjek](https://github.com/rodjek))
|
203
239
|
|
204
240
|
## [v1.11.1](https://github.com/puppetlabs/pdk/tree/v1.11.1) (2019-07-01)
|
241
|
+
|
205
242
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.11.0...v1.11.1)
|
206
243
|
|
207
244
|
**Closed issues:**
|
@@ -216,6 +253,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
216
253
|
- \(PDK-1409\) Bump PDK version to 1.11.1.pre [\#688](https://github.com/puppetlabs/pdk/pull/688) ([rodjek](https://github.com/rodjek))
|
217
254
|
|
218
255
|
## [v1.11.0](https://github.com/puppetlabs/pdk/tree/v1.11.0) (2019-06-27)
|
256
|
+
|
219
257
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.10.0...v1.11.0)
|
220
258
|
|
221
259
|
**Fixed bugs:**
|
@@ -265,6 +303,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
265
303
|
- \(PDK-1193\) Saves packaged template-url in metadata as a keyword [\#639](https://github.com/puppetlabs/pdk/pull/639) ([bmjen](https://github.com/bmjen))
|
266
304
|
|
267
305
|
## [v1.10.0](https://github.com/puppetlabs/pdk/tree/v1.10.0) (2019-04-02)
|
306
|
+
|
268
307
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.9.1...v1.10.0)
|
269
308
|
|
270
309
|
**Implemented enhancements:**
|
@@ -290,6 +329,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
290
329
|
- \(PDK-1298\) acceptance:local test suite optimisation [\#633](https://github.com/puppetlabs/pdk/pull/633) ([rodjek](https://github.com/rodjek))
|
291
330
|
|
292
331
|
## [v1.9.1](https://github.com/puppetlabs/pdk/tree/v1.9.1) (2019-03-01)
|
332
|
+
|
293
333
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.9.0...v1.9.1)
|
294
334
|
|
295
335
|
**Fixed bugs:**
|
@@ -307,6 +347,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
307
347
|
- \(PDK-1260\) Bump to 1.10.0.pre for new dev work [\#621](https://github.com/puppetlabs/pdk/pull/621) ([bmjen](https://github.com/bmjen))
|
308
348
|
|
309
349
|
## [v1.9.0](https://github.com/puppetlabs/pdk/tree/v1.9.0) (2019-01-29)
|
350
|
+
|
310
351
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.8.0...v1.9.0)
|
311
352
|
|
312
353
|
**Implemented enhancements:**
|
@@ -338,6 +379,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
338
379
|
- \(PDK-1001\) Chdir before execing git rather than "git -C" [\#602](https://github.com/puppetlabs/pdk/pull/602) ([rodjek](https://github.com/rodjek))
|
339
380
|
|
340
381
|
## [v1.8.0](https://github.com/puppetlabs/pdk/tree/v1.8.0) (2018-11-28)
|
382
|
+
|
341
383
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.7.1...v1.8.0)
|
342
384
|
|
343
385
|
**Implemented enhancements:**
|
@@ -375,6 +417,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
375
417
|
- \(maint\) Bump version for dev [\#577](https://github.com/puppetlabs/pdk/pull/577) ([bmjen](https://github.com/bmjen))
|
376
418
|
|
377
419
|
## [v1.7.1](https://github.com/puppetlabs/pdk/tree/v1.7.1) (2018-10-05)
|
420
|
+
|
378
421
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.7.0...v1.7.1)
|
379
422
|
|
380
423
|
**Implemented enhancements:**
|
@@ -396,6 +439,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
396
439
|
- Bump version to 1.8.0.pre [\#564](https://github.com/puppetlabs/pdk/pull/564) ([bmjen](https://github.com/bmjen))
|
397
440
|
|
398
441
|
## [v1.7.0](https://github.com/puppetlabs/pdk/tree/v1.7.0) (2018-08-15)
|
442
|
+
|
399
443
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.6.1...v1.7.0)
|
400
444
|
|
401
445
|
**Implemented enhancements:**
|
@@ -414,6 +458,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
414
458
|
- \(PDK-1077\) Expand the package acceptance test suite [\#554](https://github.com/puppetlabs/pdk/pull/554) ([rodjek](https://github.com/rodjek))
|
415
459
|
|
416
460
|
## [v1.6.1](https://github.com/puppetlabs/pdk/tree/v1.6.1) (2018-07-25)
|
461
|
+
|
417
462
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.6.0...v1.6.1)
|
418
463
|
|
419
464
|
**Implemented enhancements:**
|
@@ -452,6 +497,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
452
497
|
- \(maint\) Bump version for next dev cycle [\#529](https://github.com/puppetlabs/pdk/pull/529) ([bmjen](https://github.com/bmjen))
|
453
498
|
|
454
499
|
## [v1.6.0](https://github.com/puppetlabs/pdk/tree/v1.6.0) (2018-06-21)
|
500
|
+
|
455
501
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.5.0...v1.6.0)
|
456
502
|
|
457
503
|
**Implemented enhancements:**
|
@@ -490,6 +536,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
490
536
|
- Convert package acceptance tests over to beaker-rspec & serverspec [\#495](https://github.com/puppetlabs/pdk/pull/495) ([rodjek](https://github.com/rodjek))
|
491
537
|
|
492
538
|
## [v1.5.0](https://github.com/puppetlabs/pdk/tree/v1.5.0) (2018-04-30)
|
539
|
+
|
493
540
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.4.1...v1.5.0)
|
494
541
|
|
495
542
|
**Implemented enhancements:**
|
@@ -544,6 +591,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
544
591
|
- \(maint\) Fixup remaining ruby 2.4.3 issues [\#454](https://github.com/puppetlabs/pdk/pull/454) ([bmjen](https://github.com/bmjen))
|
545
592
|
|
546
593
|
## [v1.4.1](https://github.com/puppetlabs/pdk/tree/v1.4.1) (2018-02-26)
|
594
|
+
|
547
595
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.4.0...v1.4.1)
|
548
596
|
|
549
597
|
**Fixed bugs:**
|
@@ -563,6 +611,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
563
611
|
- Release 1.4.1 [\#435](https://github.com/puppetlabs/pdk/pull/435) ([bmjen](https://github.com/bmjen))
|
564
612
|
|
565
613
|
## [v1.4.0](https://github.com/puppetlabs/pdk/tree/v1.4.0) (2018-02-21)
|
614
|
+
|
566
615
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.3.2...v1.4.0)
|
567
616
|
|
568
617
|
**Implemented enhancements:**
|
@@ -606,6 +655,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
606
655
|
- \(PDK-575\) Run puppet parser validate with an dummy empty puppet.conf [\#402](https://github.com/puppetlabs/pdk/pull/402) ([rodjek](https://github.com/rodjek))
|
607
656
|
|
608
657
|
## [v1.3.2](https://github.com/puppetlabs/pdk/tree/v1.3.2) (2018-01-17)
|
658
|
+
|
609
659
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.3.1...v1.3.2)
|
610
660
|
|
611
661
|
**Closed issues:**
|
@@ -622,6 +672,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
622
672
|
- \(PDK-739\) Fall back to default template if necessary [\#400](https://github.com/puppetlabs/pdk/pull/400) ([rodjek](https://github.com/rodjek))
|
623
673
|
|
624
674
|
## [v1.3.1](https://github.com/puppetlabs/pdk/tree/v1.3.1) (2017-12-20)
|
675
|
+
|
625
676
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.3.0...v1.3.1)
|
626
677
|
|
627
678
|
**Fixed bugs:**
|
@@ -633,6 +684,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
633
684
|
- Release Prep for 1.3.1 Hotfix [\#398](https://github.com/puppetlabs/pdk/pull/398) ([HelenCampbell](https://github.com/HelenCampbell))
|
634
685
|
|
635
686
|
## [v1.3.0](https://github.com/puppetlabs/pdk/tree/v1.3.0) (2017-12-15)
|
687
|
+
|
636
688
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.2.1...v1.3.0)
|
637
689
|
|
638
690
|
**Implemented enhancements:**
|
@@ -694,6 +746,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
694
746
|
- \(PDK-621\) Implement a skeleton `pdk convert` command [\#335](https://github.com/puppetlabs/pdk/pull/335) ([rodjek](https://github.com/rodjek))
|
695
747
|
|
696
748
|
## [v1.2.1](https://github.com/puppetlabs/pdk/tree/v1.2.1) (2017-10-26)
|
749
|
+
|
697
750
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.2.0...v1.2.1)
|
698
751
|
|
699
752
|
**Fixed bugs:**
|
@@ -718,6 +771,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
718
771
|
- Fix link to PDK docs [\#317](https://github.com/puppetlabs/pdk/pull/317) ([turbodog](https://github.com/turbodog))
|
719
772
|
|
720
773
|
## [v1.2.0](https://github.com/puppetlabs/pdk/tree/v1.2.0) (2017-10-06)
|
774
|
+
|
721
775
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.1.0...v1.2.0)
|
722
776
|
|
723
777
|
**Implemented enhancements:**
|
@@ -748,6 +802,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
748
802
|
- \(PDK-468\) Adding parameters field to task metadata [\#300](https://github.com/puppetlabs/pdk/pull/300) ([bmjen](https://github.com/bmjen))
|
749
803
|
|
750
804
|
## [v1.1.0](https://github.com/puppetlabs/pdk/tree/v1.1.0) (2017-09-13)
|
805
|
+
|
751
806
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.0.1...v1.1.0)
|
752
807
|
|
753
808
|
**Implemented enhancements:**
|
@@ -792,6 +847,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
792
847
|
- \(maint\) Updates version to 1.1.0.pre [\#264](https://github.com/puppetlabs/pdk/pull/264) ([bmjen](https://github.com/bmjen))
|
793
848
|
|
794
849
|
## [v1.0.1](https://github.com/puppetlabs/pdk/tree/v1.0.1) (2017-08-17)
|
850
|
+
|
795
851
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.0.0...v1.0.1)
|
796
852
|
|
797
853
|
**Fixed bugs:**
|
@@ -806,6 +862,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
806
862
|
- Formatting fix [\#258](https://github.com/puppetlabs/pdk/pull/258) ([turbodog](https://github.com/turbodog))
|
807
863
|
|
808
864
|
## [v1.0.0](https://github.com/puppetlabs/pdk/tree/v1.0.0) (2017-08-15)
|
865
|
+
|
809
866
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.6.0...v1.0.0)
|
810
867
|
|
811
868
|
**Implemented enhancements:**
|
@@ -840,6 +897,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
840
897
|
- \(maint\) add license auditing to travis [\#205](https://github.com/puppetlabs/pdk/pull/205) ([DavidS](https://github.com/DavidS))
|
841
898
|
|
842
899
|
## [v0.6.0](https://github.com/puppetlabs/pdk/tree/v0.6.0) (2017-08-08)
|
900
|
+
|
843
901
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.5.0...v0.6.0)
|
844
902
|
|
845
903
|
**Implemented enhancements:**
|
@@ -903,6 +961,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
903
961
|
- \(maint\) Move contributor's notes to separate file [\#181](https://github.com/puppetlabs/pdk/pull/181) ([DavidS](https://github.com/DavidS))
|
904
962
|
|
905
963
|
## [v0.5.0](https://github.com/puppetlabs/pdk/tree/v0.5.0) (2017-07-20)
|
964
|
+
|
906
965
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.4.4...v0.5.0)
|
907
966
|
|
908
967
|
**Implemented enhancements:**
|
@@ -922,6 +981,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
922
981
|
- \(maint\) Finish PDK::Validate::\* unit tests [\#139](https://github.com/puppetlabs/pdk/pull/139) ([rodjek](https://github.com/rodjek))
|
923
982
|
|
924
983
|
## [v0.4.4](https://github.com/puppetlabs/pdk/tree/v0.4.4) (2017-07-18)
|
984
|
+
|
925
985
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.4.3...v0.4.4)
|
926
986
|
|
927
987
|
**Fixed bugs:**
|
@@ -943,6 +1003,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
943
1003
|
- \(maint\) fix `new module` description in README [\#169](https://github.com/puppetlabs/pdk/pull/169) ([DavidS](https://github.com/DavidS))
|
944
1004
|
|
945
1005
|
## [v0.4.3](https://github.com/puppetlabs/pdk/tree/v0.4.3) (2017-07-17)
|
1006
|
+
|
946
1007
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.4.2...v0.4.3)
|
947
1008
|
|
948
1009
|
**Fixed bugs:**
|
@@ -955,6 +1016,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
955
1016
|
- \(MAINT\) Re-bump version to 0.5.0.pre [\#163](https://github.com/puppetlabs/pdk/pull/163) ([scotje](https://github.com/scotje))
|
956
1017
|
|
957
1018
|
## [v0.4.2](https://github.com/puppetlabs/pdk/tree/v0.4.2) (2017-07-17)
|
1019
|
+
|
958
1020
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.4.1...v0.4.2)
|
959
1021
|
|
960
1022
|
**Fixed bugs:**
|
@@ -970,6 +1032,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
970
1032
|
- \(maint\) Bumps version for next dev cycle. [\#152](https://github.com/puppetlabs/pdk/pull/152) ([bmjen](https://github.com/bmjen))
|
971
1033
|
|
972
1034
|
## [v0.4.1](https://github.com/puppetlabs/pdk/tree/v0.4.1) (2017-07-14)
|
1035
|
+
|
973
1036
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.4.0...v0.4.1)
|
974
1037
|
|
975
1038
|
**Fixed bugs:**
|
@@ -981,6 +1044,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
981
1044
|
- Release prep 0.4.1 [\#155](https://github.com/puppetlabs/pdk/pull/155) ([scotje](https://github.com/scotje))
|
982
1045
|
|
983
1046
|
## [v0.4.0](https://github.com/puppetlabs/pdk/tree/v0.4.0) (2017-07-14)
|
1047
|
+
|
984
1048
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.3.0...v0.4.0)
|
985
1049
|
|
986
1050
|
**Implemented enhancements:**
|
@@ -1016,6 +1080,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
1016
1080
|
- \(idea\) More expressive RSpec matchers for JUnit XML content [\#117](https://github.com/puppetlabs/pdk/pull/117) ([rodjek](https://github.com/rodjek))
|
1017
1081
|
|
1018
1082
|
## [v0.3.0](https://github.com/puppetlabs/pdk/tree/v0.3.0) (2017-06-29)
|
1083
|
+
|
1019
1084
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.2.0...v0.3.0)
|
1020
1085
|
|
1021
1086
|
**Implemented enhancements:**
|
@@ -1053,6 +1118,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
1053
1118
|
- \(SDK-256\) Acceptance tests for metadata validator behavior and output [\#99](https://github.com/puppetlabs/pdk/pull/99) ([rodjek](https://github.com/rodjek))
|
1054
1119
|
|
1055
1120
|
## [v0.2.0](https://github.com/puppetlabs/pdk/tree/v0.2.0) (2017-06-21)
|
1121
|
+
|
1056
1122
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v0.1.0...v0.2.0)
|
1057
1123
|
|
1058
1124
|
**Implemented enhancements:**
|
@@ -1103,6 +1169,9 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
1103
1169
|
- Relax data type validation to warn when non-standard types used [\#59](https://github.com/puppetlabs/pdk/pull/59) ([rodjek](https://github.com/rodjek))
|
1104
1170
|
|
1105
1171
|
## [v0.1.0](https://github.com/puppetlabs/pdk/tree/v0.1.0) (2017-06-05)
|
1172
|
+
|
1173
|
+
[Full Changelog](https://github.com/puppetlabs/pdk/compare/2be9329bed4715c888f273814b99f2cf37ee9341...v0.1.0)
|
1174
|
+
|
1106
1175
|
**Implemented enhancements:**
|
1107
1176
|
|
1108
1177
|
- \(maint\) update Contributing section [\#56](https://github.com/puppetlabs/pdk/pull/56) ([DavidS](https://github.com/DavidS))
|
@@ -1157,4 +1226,4 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
1157
1226
|
|
1158
1227
|
|
1159
1228
|
|
1160
|
-
\* *This
|
1229
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/lib/pdk/cli/convert.rb
CHANGED
@@ -14,14 +14,12 @@ module PDK::CLI
|
|
14
14
|
flag nil, :'default-template', _('Convert the module to use the default PDK template.')
|
15
15
|
|
16
16
|
run do |opts, _args, _cmd|
|
17
|
-
|
18
|
-
|
17
|
+
# Write the context information to the debug log
|
18
|
+
PDK.context.to_debug_log
|
19
19
|
|
20
|
-
PDK::
|
21
|
-
|
22
|
-
|
23
|
-
log_level: :info,
|
24
|
-
)
|
20
|
+
unless PDK.context.is_a?(PDK::Context::Module)
|
21
|
+
raise PDK::CLI::ExitWithError, _('`pdk convert` can only be run from inside a valid module directory.')
|
22
|
+
end
|
25
23
|
|
26
24
|
if opts[:noop] && opts[:force]
|
27
25
|
raise PDK::CLI::ExitWithError, _('You can not specify --noop and --force when converting a module')
|
@@ -31,7 +29,7 @@ module PDK::CLI
|
|
31
29
|
raise PDK::CLI::ExitWithError, _('You can not specify --template-url and --default-template.') if opts[:'template-url']
|
32
30
|
|
33
31
|
opts[:'template-url'] = PDK::Util::TemplateURI.default_template_addressable_uri.to_s
|
34
|
-
PDK.config.user
|
32
|
+
PDK.config.set(%w[user module_defaults template-url], nil)
|
35
33
|
end
|
36
34
|
|
37
35
|
PDK::CLI::Util.validate_template_opts(opts)
|
@@ -48,7 +46,7 @@ module PDK::CLI
|
|
48
46
|
opts[:'full-interview'] = false
|
49
47
|
end
|
50
48
|
|
51
|
-
PDK::Module::Convert.invoke(PDK
|
49
|
+
PDK::Module::Convert.invoke(PDK.context.root_path, opts)
|
52
50
|
end
|
53
51
|
end
|
54
52
|
end
|
data/lib/pdk/cli/new/class.rb
CHANGED
@@ -25,7 +25,8 @@ module PDK::CLI
|
|
25
25
|
|
26
26
|
PDK::CLI::Util.analytics_screen_view('new_class', opts)
|
27
27
|
|
28
|
-
PDK::Generate::PuppetClass.new(PDK
|
28
|
+
updates = PDK::Generate::PuppetClass.new(PDK.context, class_name, opts).run
|
29
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
@@ -25,7 +25,8 @@ module PDK::CLI
|
|
25
25
|
|
26
26
|
require 'pdk/generate/defined_type'
|
27
27
|
|
28
|
-
PDK::Generate::DefinedType.new(PDK
|
28
|
+
updates = PDK::Generate::DefinedType.new(PDK.context, defined_type_name, opts).run
|
29
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
29
30
|
end
|
30
31
|
end
|
31
32
|
end
|
data/lib/pdk/cli/new/provider.rb
CHANGED
@@ -22,7 +22,8 @@ module PDK::CLI
|
|
22
22
|
|
23
23
|
require 'pdk/generate/provider'
|
24
24
|
|
25
|
-
PDK::Generate::Provider.new(PDK
|
25
|
+
updates = PDK::Generate::Provider.new(PDK.context, provider_name, opts).run
|
26
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
data/lib/pdk/cli/new/task.rb
CHANGED
@@ -27,7 +27,8 @@ module PDK::CLI
|
|
27
27
|
|
28
28
|
PDK::CLI::Util.analytics_screen_view('new_task', opts)
|
29
29
|
|
30
|
-
PDK::Generate::Task.new(PDK
|
30
|
+
updates = PDK::Generate::Task.new(PDK.context, task_name, opts).run
|
31
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
31
32
|
end
|
32
33
|
end
|
33
34
|
end
|
data/lib/pdk/cli/new/test.rb
CHANGED
@@ -40,7 +40,8 @@ module PDK::CLI
|
|
40
40
|
|
41
41
|
PDK::CLI::Util.analytics_screen_view('new_test', opts)
|
42
42
|
|
43
|
-
generator.new(PDK
|
43
|
+
updates = generator.new(PDK.context, obj['name'], opts.merge(spec_only: true)).run
|
44
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
44
45
|
rescue PDK::Util::PuppetStrings::NoObjectError
|
45
46
|
raise PDK::CLI::ExitWithError, _('Unable to find anything called "%{object}" to generate unit tests for.') % { object: object_name }
|
46
47
|
rescue PDK::Util::PuppetStrings::NoGeneratorError => e
|
@@ -20,7 +20,8 @@ module PDK::CLI
|
|
20
20
|
|
21
21
|
require 'pdk/generate/transport'
|
22
22
|
|
23
|
-
PDK::Generate::Transport.new(PDK
|
23
|
+
updates = PDK::Generate::Transport.new(PDK.context, transport_name, opts).run
|
24
|
+
PDK::CLI::Util::UpdateManagerPrinter.print_summary(updates, tense: :past)
|
24
25
|
end
|
25
26
|
end
|
26
27
|
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
module PDK::CLI
|
2
|
+
module Remove
|
3
|
+
module Config
|
4
|
+
def self.run(opts, args)
|
5
|
+
item_name = (args.count > 0) ? args[0] : nil
|
6
|
+
item_value = (args.count > 1) ? args[1].strip : nil
|
7
|
+
item_value = nil if !item_value.nil? && item_value.empty?
|
8
|
+
|
9
|
+
force = opts[:force] || false
|
10
|
+
|
11
|
+
raise PDK::CLI::ExitWithError, _('Configuration name is required') if item_name.nil?
|
12
|
+
|
13
|
+
current_value = PDK.config.get(item_name)
|
14
|
+
raise PDK::CLI::ExitWithError, _("The configuration item '%{name}' can not be removed.") % { name: item_name } if current_value.is_a?(PDK::Config::Namespace)
|
15
|
+
if current_value.nil?
|
16
|
+
PDK.logger.info(_("Could not remove '%{name}' as it has not been set") % { name: item_name })
|
17
|
+
return 0
|
18
|
+
end
|
19
|
+
|
20
|
+
PDK.logger.info(_("Ignoring the item value '%{value}' as --force has been set") % { value: item_value }) if current_value.is_a?(Array) && !item_value.nil? && force
|
21
|
+
PDK.logger.info(_('Ignoring --force as the setting is not multi-valued')) if !current_value.is_a?(Array) && force
|
22
|
+
|
23
|
+
# FIXME: It'd be nice to shortcircuit deleting default values. This causes the configuration file
|
24
|
+
# to be saved, even though nothing actually changes
|
25
|
+
|
26
|
+
# For most value types, just changing the value to nil is enough, however Arrays are a special case.
|
27
|
+
# Unless they're forced, array removal with either remove a single entry (matched by .to_s) or clear the
|
28
|
+
# array. When forced, the array is completed removed just like a string or number.
|
29
|
+
if current_value.is_a?(Array) && !force
|
30
|
+
# If the user didn't set a value then set the array as empty, otherwise remove that one item
|
31
|
+
new_value = item_value.nil? ? [] : current_value.reject { |item| item.to_s == item_value }
|
32
|
+
if current_value.count == new_value.count
|
33
|
+
if item_value.nil?
|
34
|
+
PDK.logger.info(_("Could not remove '%{name}' as it is already empty") % { name: item_name })
|
35
|
+
else
|
36
|
+
PDK.logger.info(_("Could not remove '%{value}' from '%{name}' as it has not been set") % { value: item_value, name: item_name })
|
37
|
+
end
|
38
|
+
return 0
|
39
|
+
end
|
40
|
+
PDK.config.set(item_name, new_value, force: true)
|
41
|
+
else
|
42
|
+
# Set the value to nil for deleting.
|
43
|
+
PDK.config.set(item_name, nil, force: true)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Output the result to the user
|
47
|
+
new_value = PDK.config.get(item_name)
|
48
|
+
if current_value.is_a?(Array) && !force
|
49
|
+
# Arrays have a special output format. If item_value is nil then the user wanted to empty/clear
|
50
|
+
# the array otherwise they just wanted to remove a single entry.
|
51
|
+
if item_value.nil?
|
52
|
+
PDK.logger.info(_("Cleared '%{name}' which had a value of '%{from}'") % { name: item_name, from: current_value })
|
53
|
+
else
|
54
|
+
PDK.logger.info(_("Removed '%{value}' from '%{name}'") % { value: item_value, name: item_name })
|
55
|
+
end
|
56
|
+
elsif !new_value.nil?
|
57
|
+
PDK.logger.info(_("Could not remove '%{name}' as it using a default value of '%{to}'") % { name: item_name, to: new_value })
|
58
|
+
else
|
59
|
+
PDK.logger.info(_("Removed '%{name}' which had a value of '%{from}'") % { name: item_name, from: current_value })
|
60
|
+
end
|
61
|
+
|
62
|
+
# Same output as `get config`
|
63
|
+
$stdout.puts _('%{name}=%{value}') % { name: item_name, value: new_value }
|
64
|
+
0
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
@remove_config_cmd = @remove_cmd.define_command do
|
70
|
+
name 'config'
|
71
|
+
usage _('config [name] [value]')
|
72
|
+
summary _('Remove or delete the configuration for <name>')
|
73
|
+
|
74
|
+
option :f, :force, _('Force multi-value configuration settings to be removed instead of emptied.'), argument: :forbidden
|
75
|
+
|
76
|
+
run do |opts, args, _cmd|
|
77
|
+
exit PDK::CLI::Remove::Config.run(opts, args)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module PDK::CLI
|
2
|
+
@remove_cmd = @base_cmd.define_command do
|
3
|
+
name 'remove'
|
4
|
+
usage _('remove [subcommand] [options]')
|
5
|
+
summary _('Remove or delete information about the PDK or current project.')
|
6
|
+
default_subcommand 'help'
|
7
|
+
|
8
|
+
run do |_opts, args, _cmd|
|
9
|
+
if args == ['help']
|
10
|
+
PDK::CLI.run(%w[remove --help])
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
14
|
+
PDK::CLI.run(%w[remove help]) if args.empty?
|
15
|
+
end
|
16
|
+
end
|
17
|
+
@remove_cmd.add_command Cri::Command.new_basic_help
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'pdk/cli/remove/config'
|