pdk 2.6.1 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -1
  3. data/lib/pdk/analytics/client/google_analytics.rb +4 -2
  4. data/lib/pdk/cli/build.rb +17 -21
  5. data/lib/pdk/cli/bundle.rb +4 -5
  6. data/lib/pdk/cli/config/get.rb +6 -6
  7. data/lib/pdk/cli/config.rb +3 -3
  8. data/lib/pdk/cli/console.rb +7 -7
  9. data/lib/pdk/cli/convert.rb +11 -11
  10. data/lib/pdk/cli/env.rb +3 -4
  11. data/lib/pdk/cli/errors.rb +1 -1
  12. data/lib/pdk/cli/exec/command.rb +12 -14
  13. data/lib/pdk/cli/exec/interactive_command.rb +11 -11
  14. data/lib/pdk/cli/exec.rb +4 -4
  15. data/lib/pdk/cli/exec_group.rb +1 -3
  16. data/lib/pdk/cli/get/config.rb +5 -5
  17. data/lib/pdk/cli/get.rb +2 -2
  18. data/lib/pdk/cli/module/build.rb +3 -3
  19. data/lib/pdk/cli/module/generate.rb +4 -4
  20. data/lib/pdk/cli/module.rb +3 -3
  21. data/lib/pdk/cli/new/class.rb +4 -4
  22. data/lib/pdk/cli/new/defined_type.rb +4 -4
  23. data/lib/pdk/cli/new/fact.rb +3 -3
  24. data/lib/pdk/cli/new/function.rb +4 -4
  25. data/lib/pdk/cli/new/module.rb +10 -11
  26. data/lib/pdk/cli/new/provider.rb +3 -3
  27. data/lib/pdk/cli/new/task.rb +5 -5
  28. data/lib/pdk/cli/new/test.rb +7 -7
  29. data/lib/pdk/cli/new/transport.rb +3 -3
  30. data/lib/pdk/cli/new.rb +3 -3
  31. data/lib/pdk/cli/release/prep.rb +9 -9
  32. data/lib/pdk/cli/release/publish.rb +7 -11
  33. data/lib/pdk/cli/release.rb +35 -39
  34. data/lib/pdk/cli/remove/config.rb +15 -15
  35. data/lib/pdk/cli/remove.rb +2 -2
  36. data/lib/pdk/cli/set/config.rb +16 -16
  37. data/lib/pdk/cli/set.rb +2 -2
  38. data/lib/pdk/cli/test/unit.rb +13 -13
  39. data/lib/pdk/cli/test.rb +2 -2
  40. data/lib/pdk/cli/update.rb +19 -29
  41. data/lib/pdk/cli/util/command_redirector.rb +1 -1
  42. data/lib/pdk/cli/util/interview.rb +4 -4
  43. data/lib/pdk/cli/util/option_normalizer.rb +2 -2
  44. data/lib/pdk/cli/util/option_validator.rb +1 -1
  45. data/lib/pdk/cli/util.rb +19 -20
  46. data/lib/pdk/cli/validate.rb +16 -18
  47. data/lib/pdk/cli.rb +16 -33
  48. data/lib/pdk/config/ini_file_setting.rb +2 -2
  49. data/lib/pdk/config/json_schema_namespace.rb +3 -3
  50. data/lib/pdk/config/json_schema_setting.rb +1 -1
  51. data/lib/pdk/config/json_with_schema.rb +1 -1
  52. data/lib/pdk/config/namespace.rb +4 -4
  53. data/lib/pdk/config/setting.rb +5 -5
  54. data/lib/pdk/config/validator.rb +2 -2
  55. data/lib/pdk/config/yaml.rb +2 -2
  56. data/lib/pdk/config/yaml_with_schema.rb +3 -3
  57. data/lib/pdk/config.rb +18 -20
  58. data/lib/pdk/context/control_repo.rb +1 -1
  59. data/lib/pdk/context/module.rb +1 -1
  60. data/lib/pdk/context/none.rb +1 -1
  61. data/lib/pdk/generate/module.rb +52 -64
  62. data/lib/pdk/generate/puppet_object.rb +6 -6
  63. data/lib/pdk/generate/task.rb +1 -1
  64. data/lib/pdk/module/build.rb +11 -16
  65. data/lib/pdk/module/convert.rb +14 -16
  66. data/lib/pdk/module/metadata.rb +12 -12
  67. data/lib/pdk/module/release.rb +20 -19
  68. data/lib/pdk/module/update.rb +5 -5
  69. data/lib/pdk/module/update_manager.rb +6 -6
  70. data/lib/pdk/report/event.rb +11 -11
  71. data/lib/pdk/template/fetcher/git.rb +4 -4
  72. data/lib/pdk/template/fetcher.rb +1 -1
  73. data/lib/pdk/template/renderer/v1/legacy_template_dir.rb +1 -1
  74. data/lib/pdk/template/renderer/v1/renderer.rb +5 -7
  75. data/lib/pdk/template/renderer/v1/template_file.rb +3 -1
  76. data/lib/pdk/template/template_dir.rb +1 -1
  77. data/lib/pdk/template.rb +2 -2
  78. data/lib/pdk/tests/unit.rb +12 -12
  79. data/lib/pdk/util/bundler.rb +14 -14
  80. data/lib/pdk/util/changelog_generator.rb +6 -8
  81. data/lib/pdk/util/filesystem.rb +2 -2
  82. data/lib/pdk/util/git.rb +5 -5
  83. data/lib/pdk/util/puppet_strings.rb +2 -2
  84. data/lib/pdk/util/puppet_version.rb +24 -17
  85. data/lib/pdk/util/ruby_version.rb +2 -5
  86. data/lib/pdk/util/template_uri.rb +8 -8
  87. data/lib/pdk/util/vendored_file.rb +3 -3
  88. data/lib/pdk/util/windows/api_types.rb +3 -4
  89. data/lib/pdk/util/windows/file.rb +1 -1
  90. data/lib/pdk/util/windows/process.rb +5 -8
  91. data/lib/pdk/util.rb +2 -2
  92. data/lib/pdk/validate/control_repo/environment_conf_validator.rb +5 -5
  93. data/lib/pdk/validate/invokable_validator.rb +6 -6
  94. data/lib/pdk/validate/metadata/metadata_json_lint_validator.rb +2 -2
  95. data/lib/pdk/validate/metadata/metadata_syntax_validator.rb +2 -2
  96. data/lib/pdk/validate/puppet/puppet_epp_validator.rb +1 -1
  97. data/lib/pdk/validate/puppet/puppet_lint_validator.rb +1 -1
  98. data/lib/pdk/validate/puppet/puppet_plan_syntax_validator.rb +38 -0
  99. data/lib/pdk/validate/puppet/puppet_syntax_validator.rb +1 -1
  100. data/lib/pdk/validate/puppet/puppet_validator_group.rb +1 -0
  101. data/lib/pdk/validate/ruby/ruby_rubocop_validator.rb +1 -1
  102. data/lib/pdk/validate/tasks/tasks_metadata_lint_validator.rb +4 -4
  103. data/lib/pdk/validate/tasks/tasks_name_validator.rb +2 -5
  104. data/lib/pdk/validate/validator.rb +1 -1
  105. data/lib/pdk/validate/validator_group.rb +1 -1
  106. data/lib/pdk/validate/yaml/yaml_syntax_validator.rb +4 -4
  107. data/lib/pdk/validate.rb +2 -1
  108. data/lib/pdk/version.rb +2 -2
  109. data/lib/pdk.rb +0 -2
  110. metadata +32 -54
  111. data/lib/pdk/i18n.rb +0 -4
  112. data/locales/config.yaml +0 -21
  113. data/locales/pdk.pot +0 -2111
@@ -33,7 +33,7 @@ module PDK
33
33
  if context.nil?
34
34
  @context = PDK::Context::None.new(nil)
35
35
  else
36
- raise ArgumentError, _('Expected PDK::Context::AbstractContext but got \'%{klass}\' for context') % { klass: context.class } unless context.is_a?(PDK::Context::AbstractContext)
36
+ raise ArgumentError, 'Expected PDK::Context::AbstractContext but got \'%{klass}\' for context' % { klass: context.class } unless context.is_a?(PDK::Context::AbstractContext)
37
37
  @context = context
38
38
  end
39
39
  @options = options.dup.freeze
@@ -32,7 +32,7 @@ module PDK
32
32
  class ValidatorGroup < Validator
33
33
  # @see PDK::Validate::Validator.spinner_text
34
34
  def spinner_text
35
- _('Running %{name} validators ...') % { name: name }
35
+ 'Running %{name} validators ...' % { name: name }
36
36
  end
37
37
 
38
38
  # @see PDK::Validate::Validator.spinner
@@ -33,7 +33,7 @@ module PDK
33
33
  end
34
34
 
35
35
  def spinner_text
36
- _('Checking YAML syntax (%{patterns}).') % {
36
+ 'Checking YAML syntax (%{patterns}).' % {
37
37
  patterns: pattern.join(' '),
38
38
  }
39
39
  end
@@ -47,7 +47,7 @@ module PDK
47
47
  source: name,
48
48
  state: :failure,
49
49
  severity: 'error',
50
- message: _('Could not be read.'),
50
+ message: 'Could not be read.',
51
51
  )
52
52
  return 1
53
53
  end
@@ -70,7 +70,7 @@ module PDK
70
70
  severity: 'error',
71
71
  line: e.line,
72
72
  column: e.column,
73
- message: _('%{problem} %{context}') % {
73
+ message: '%{problem} %{context}' % {
74
74
  problem: e.problem,
75
75
  context: e.context,
76
76
  },
@@ -82,7 +82,7 @@ module PDK
82
82
  source: name,
83
83
  state: :failure,
84
84
  severity: 'error',
85
- message: _('Unsupported class: %{message}') % {
85
+ message: 'Unsupported class: %{message}' % {
86
86
  message: e.message,
87
87
  },
88
88
  )
data/lib/pdk/validate.rb CHANGED
@@ -23,6 +23,7 @@ module PDK
23
23
  autoload :PuppetEPPValidator, 'pdk/validate/puppet/puppet_epp_validator'
24
24
  autoload :PuppetLintValidator, 'pdk/validate/puppet/puppet_lint_validator'
25
25
  autoload :PuppetSyntaxValidator, 'pdk/validate/puppet/puppet_syntax_validator'
26
+ autoload :PuppetPlanSyntaxValidator, 'pdk/validate/puppet/puppet_plan_syntax_validator'
26
27
  autoload :PuppetValidatorGroup, 'pdk/validate/puppet/puppet_validator_group'
27
28
  end
28
29
 
@@ -75,7 +76,7 @@ module PDK
75
76
 
76
77
  require 'pdk/cli/exec_group'
77
78
  exec_group = PDK::CLI::ExecGroup.create(
78
- _('Validating module using %{num_of_threads} threads' % { num_of_threads: instances.count }),
79
+ 'Validating module using %{num_of_threads} threads' % { num_of_threads: instances.count },
79
80
  { parallel: parallel },
80
81
  options,
81
82
  )
data/lib/pdk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PDK
2
- VERSION = '2.6.1'.freeze
3
- TEMPLATE_REF = '2.7.1'.freeze
2
+ VERSION = '2.7.0'.freeze
3
+ TEMPLATE_REF = '2.7.2'.freeze
4
4
  end
data/lib/pdk.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'pdk/i18n'
2
-
3
1
  module PDK
4
2
  autoload :Analytics, 'pdk/analytics'
5
3
  autoload :AnswerFile, 'pdk/answer_file'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-26 00:00:00.000000000 Z
11
+ date: 2023-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.15.0
19
+ version: 2.3.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 3.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 1.15.0
29
+ version: 2.3.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 3.0.0
@@ -36,55 +36,49 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 4.0.0
39
+ version: 4.1.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 4.0.0
46
+ version: 4.1.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cri
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.10'
53
+ version: 2.15.11
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.10'
60
+ version: 2.15.11
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: diff-lcs
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: 1.4.4
68
- - - "<"
69
- - !ruby/object:Gem::Version
70
- version: '1.5'
67
+ version: 1.5.0
71
68
  type: :runtime
72
69
  prerelease: false
73
70
  version_requirements: !ruby/object:Gem::Requirement
74
71
  requirements:
75
72
  - - ">="
76
73
  - !ruby/object:Gem::Version
77
- version: 1.4.4
78
- - - "<"
79
- - !ruby/object:Gem::Version
80
- version: '1.5'
74
+ version: 1.5.0
81
75
  - !ruby/object:Gem::Dependency
82
76
  name: ffi
83
77
  requirement: !ruby/object:Gem::Requirement
84
78
  requirements:
85
79
  - - ">="
86
80
  - !ruby/object:Gem::Version
87
- version: 1.9.25
81
+ version: 1.15.5
88
82
  - - "<"
89
83
  - !ruby/object:Gem::Version
90
84
  version: 2.0.0
@@ -94,24 +88,10 @@ dependencies:
94
88
  requirements:
95
89
  - - ">="
96
90
  - !ruby/object:Gem::Version
97
- version: 1.9.25
91
+ version: 1.15.5
98
92
  - - "<"
99
93
  - !ruby/object:Gem::Version
100
94
  version: 2.0.0
101
- - !ruby/object:Gem::Dependency
102
- name: gettext-setup
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '0.24'
108
- type: :runtime
109
- prerelease: false
110
- version_requirements: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - "~>"
113
- - !ruby/object:Gem::Version
114
- version: '0.24'
115
95
  - !ruby/object:Gem::Dependency
116
96
  name: hitimes
117
97
  requirement: !ruby/object:Gem::Requirement
@@ -146,14 +126,14 @@ dependencies:
146
126
  requirements:
147
127
  - - "~>"
148
128
  - !ruby/object:Gem::Version
149
- version: 2.5.1
129
+ version: 2.6.2
150
130
  type: :runtime
151
131
  prerelease: false
152
132
  version_requirements: !ruby/object:Gem::Requirement
153
133
  requirements:
154
134
  - - "~>"
155
135
  - !ruby/object:Gem::Version
156
- version: 2.5.1
136
+ version: 2.6.2
157
137
  - !ruby/object:Gem::Dependency
158
138
  name: minitar
159
139
  requirement: !ruby/object:Gem::Requirement
@@ -188,63 +168,63 @@ dependencies:
188
168
  requirements:
189
169
  - - "~>"
190
170
  - !ruby/object:Gem::Version
191
- version: '0.22'
171
+ version: '0.23'
192
172
  type: :runtime
193
173
  prerelease: false
194
174
  version_requirements: !ruby/object:Gem::Requirement
195
175
  requirements:
196
176
  - - "~>"
197
177
  - !ruby/object:Gem::Version
198
- version: '0.22'
178
+ version: '0.23'
199
179
  - !ruby/object:Gem::Dependency
200
180
  name: tty-spinner
201
181
  requirement: !ruby/object:Gem::Requirement
202
182
  requirements:
203
183
  - - "~>"
204
184
  - !ruby/object:Gem::Version
205
- version: '0.5'
185
+ version: '0.9'
206
186
  type: :runtime
207
187
  prerelease: false
208
188
  version_requirements: !ruby/object:Gem::Requirement
209
189
  requirements:
210
190
  - - "~>"
211
191
  - !ruby/object:Gem::Version
212
- version: '0.5'
192
+ version: '0.9'
213
193
  - !ruby/object:Gem::Dependency
214
194
  name: tty-which
215
195
  requirement: !ruby/object:Gem::Requirement
216
196
  requirements:
217
197
  - - "~>"
218
198
  - !ruby/object:Gem::Version
219
- version: '0.3'
199
+ version: '0.5'
220
200
  type: :runtime
221
201
  prerelease: false
222
202
  version_requirements: !ruby/object:Gem::Requirement
223
203
  requirements:
224
204
  - - "~>"
225
205
  - !ruby/object:Gem::Version
226
- version: '0.3'
206
+ version: '0.5'
227
207
  - !ruby/object:Gem::Dependency
228
208
  name: concurrent-ruby
229
209
  requirement: !ruby/object:Gem::Requirement
230
210
  requirements:
231
211
  - - "~>"
232
212
  - !ruby/object:Gem::Version
233
- version: 1.1.5
213
+ version: 1.1.10
234
214
  type: :runtime
235
215
  prerelease: false
236
216
  version_requirements: !ruby/object:Gem::Requirement
237
217
  requirements:
238
218
  - - "~>"
239
219
  - !ruby/object:Gem::Version
240
- version: 1.1.5
220
+ version: 1.1.10
241
221
  - !ruby/object:Gem::Dependency
242
222
  name: facter
243
223
  requirement: !ruby/object:Gem::Requirement
244
224
  requirements:
245
225
  - - ">="
246
226
  - !ruby/object:Gem::Version
247
- version: 2.5.1
227
+ version: 4.0.0
248
228
  - - "<"
249
229
  - !ruby/object:Gem::Version
250
230
  version: 5.0.0
@@ -254,7 +234,7 @@ dependencies:
254
234
  requirements:
255
235
  - - ">="
256
236
  - !ruby/object:Gem::Version
257
- version: 2.5.1
237
+ version: 4.0.0
258
238
  - - "<"
259
239
  - !ruby/object:Gem::Version
260
240
  version: 5.0.0
@@ -278,14 +258,14 @@ dependencies:
278
258
  requirements:
279
259
  - - "~>"
280
260
  - !ruby/object:Gem::Version
281
- version: '1.1'
261
+ version: 1.2.2
282
262
  type: :runtime
283
263
  prerelease: false
284
264
  version_requirements: !ruby/object:Gem::Requirement
285
265
  requirements:
286
266
  - - "~>"
287
267
  - !ruby/object:Gem::Version
288
- version: '1.1'
268
+ version: 1.2.2
289
269
  description: A CLI to facilitate easy, unified development workflows for Puppet modules.
290
270
  email:
291
271
  - pdk-maintainers@puppet.com
@@ -380,7 +360,6 @@ files:
380
360
  - lib/pdk/generate/puppet_object.rb
381
361
  - lib/pdk/generate/task.rb
382
362
  - lib/pdk/generate/transport.rb
383
- - lib/pdk/i18n.rb
384
363
  - lib/pdk/logger.rb
385
364
  - lib/pdk/module.rb
386
365
  - lib/pdk/module/build.rb
@@ -431,6 +410,7 @@ files:
431
410
  - lib/pdk/validate/metadata/metadata_validator_group.rb
432
411
  - lib/pdk/validate/puppet/puppet_epp_validator.rb
433
412
  - lib/pdk/validate/puppet/puppet_lint_validator.rb
413
+ - lib/pdk/validate/puppet/puppet_plan_syntax_validator.rb
434
414
  - lib/pdk/validate/puppet/puppet_syntax_validator.rb
435
415
  - lib/pdk/validate/puppet/puppet_validator_group.rb
436
416
  - lib/pdk/validate/ruby/ruby_rubocop_validator.rb
@@ -443,12 +423,10 @@ files:
443
423
  - lib/pdk/validate/yaml/yaml_syntax_validator.rb
444
424
  - lib/pdk/validate/yaml/yaml_validator_group.rb
445
425
  - lib/pdk/version.rb
446
- - locales/config.yaml
447
- - locales/pdk.pot
448
426
  homepage: https://github.com/puppetlabs/pdk
449
427
  licenses: []
450
428
  metadata: {}
451
- post_install_message:
429
+ post_install_message:
452
430
  rdoc_options: []
453
431
  require_paths:
454
432
  - lib
@@ -456,15 +434,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
456
434
  requirements:
457
435
  - - ">="
458
436
  - !ruby/object:Gem::Version
459
- version: 2.4.0
437
+ version: 2.5.9
460
438
  required_rubygems_version: !ruby/object:Gem::Requirement
461
439
  requirements:
462
440
  - - ">="
463
441
  - !ruby/object:Gem::Version
464
442
  version: '0'
465
443
  requirements: []
466
- rubygems_version: 3.3.26
467
- signing_key:
444
+ rubygems_version: 3.1.6
445
+ signing_key:
468
446
  specification_version: 4
469
447
  summary: A key part of the Puppet Development Kit, the shortest path to better modules
470
448
  test_files: []
data/lib/pdk/i18n.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'gettext-setup'
2
-
3
- GettextSetup.initialize(File.absolute_path('../../locales', File.dirname(__FILE__)))
4
- GettextSetup.negotiate_locale!(GettextSetup.candidate_locales)
data/locales/config.yaml DELETED
@@ -1,21 +0,0 @@
1
- ---
2
- # This is the project-specific configuration file for setting up
3
- # fast_gettext for your project.
4
- gettext:
5
- # This is used for the name of the .pot and .po files; they will be
6
- # called <project_name>.pot?
7
- project_name: 'pdk'
8
- # This is used in comments in the .pot and .po files to indicate what
9
- # project the files belong to and should bea little more desctiptive than
10
- # <project_name>
11
- package_name: puppet development kit
12
- # The locale that the default messages in the .pot file are in
13
- default_locale: en
14
- # The email used for sending bug reports.
15
- bugs_address: docs@puppet.com
16
- # The holder of the copyright.
17
- copyright_holder: Puppet, Inc.
18
- # Patterns for +Dir.glob+ used to find all files that might contain
19
- # translatable content, relative to the project root directory
20
- source_files:
21
- - 'lib/**/*.rb'