pdk 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -5
- data/lib/pdk/cli/exec/command.rb +1 -1
- data/lib/pdk/cli/util.rb +0 -12
- data/lib/pdk/module/release.rb +7 -19
- data/lib/pdk/util/puppet_version.rb +1 -1
- data/lib/pdk/util/vendored_file.rb +4 -2
- data/lib/pdk/validate/external_command_validator.rb +2 -2
- data/lib/pdk/validate/invokable_validator.rb +1 -1
- data/lib/pdk/validate/metadata/metadata_syntax_validator.rb +1 -12
- data/lib/pdk/validate/validator_group.rb +1 -1
- data/lib/pdk/version.rb +2 -2
- metadata +14 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8d097ab722c6b85e1a3f6bd87790a9d41c3a6de0efef08dbea9d9661ced6275
|
|
4
|
+
data.tar.gz: de41ce5f8860c34521f4001b4c882f4424b427fb6d85398332eba1b9ef8e324c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89b14fb73fb9122d4ce879f9260028ea8bc67a50f0e81c9b96a223c2087ed8493051eca0dde8d708ac37ffd984d88a0f19e950e1864395d6db0313364871df4d
|
|
7
|
+
data.tar.gz: 9d94174c163ebca1f7b16b0da7a51bb0767de7a2c5868cdb7d291f2c8f086dbc12a4ed7f90180c8ccd7c1f44f321119c78cf62e43155ee327d29508e70463b82
|
data/CHANGELOG.md
CHANGED
|
@@ -5,21 +5,44 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
|
|
6
6
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
|
7
7
|
|
|
8
|
-
## [v3.
|
|
8
|
+
## [v3.4.0](https://github.com/puppetlabs/pdk/tree/v3.4.0) - 2024-11-25
|
|
9
|
+
|
|
10
|
+
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v3.3.0...v3.4.0)
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- (CAT-2141) Update `json-schema` dependency [#1412](https://github.com/puppetlabs/pdk/pull/1412) ([david22swan](https://github.com/david22swan))
|
|
15
|
+
- (CAT-643) Add forge gem upload functionality [#1403](https://github.com/puppetlabs/pdk/pull/1403) ([danadoherty639](https://github.com/danadoherty639))
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- (CAT-2162) Remove support for SLES 12 [#1418](https://github.com/puppetlabs/pdk/pull/1418) ([david22swan](https://github.com/david22swan))
|
|
20
|
+
- (CAT-2155) Remove metadata_syntax_validator parser swap to `JSON::Pure` [#1415](https://github.com/puppetlabs/pdk/pull/1415) ([david22swan](https://github.com/david22swan))
|
|
21
|
+
- (CAT-2128) Remove `json_pure` dependency [#1411](https://github.com/puppetlabs/pdk/pull/1411) ([david22swan](https://github.com/david22swan))
|
|
22
|
+
- (maint) Fix Gem::Platform.match() deprecation warning [#1408](https://github.com/puppetlabs/pdk/pull/1408) ([jhbuchanan45](https://github.com/jhbuchanan45))
|
|
23
|
+
- (CAT-2007) Update http setting cert to setting ca_file [#1398](https://github.com/puppetlabs/pdk/pull/1398) ([david22swan](https://github.com/david22swan))
|
|
24
|
+
- (CAT-2007) Use vendored cert files and VERIFY_PEER wth NET::HTTP on Windows [#1396](https://github.com/puppetlabs/pdk/pull/1396) ([david22swan](https://github.com/david22swan))
|
|
25
|
+
- (CAT-2040) pdk spinner inconsistent on windows [#1394](https://github.com/puppetlabs/pdk/pull/1394) ([alex501212](https://github.com/alex501212))
|
|
26
|
+
|
|
27
|
+
## [v3.3.0](https://github.com/puppetlabs/pdk/tree/v3.3.0) - 2024-09-11
|
|
9
28
|
|
|
10
29
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v3.2.0...v3.3.0)
|
|
11
30
|
|
|
12
|
-
|
|
31
|
+
### Added
|
|
13
32
|
|
|
33
|
+
- (CAT-1928) Update Supported OS on new module to match what is expected [#1381](https://github.com/puppetlabs/pdk/pull/1381) ([david22swan](https://github.com/david22swan))
|
|
34
|
+
- (CAT-1896) - Use puppet-modulebuilder for `PDK build` [#1374](https://github.com/puppetlabs/pdk/pull/1374) ([jordanbreen28](https://github.com/jordanbreen28))
|
|
14
35
|
- Skip 'name' validation when in a controlrepo context [#1352](https://github.com/puppetlabs/pdk/pull/1352) ([garrettrowell](https://github.com/garrettrowell))
|
|
15
|
-
- (CAT-1896) - Use puppet-modulebuilder for PDK build [#1374](https://github.com/puppetlabs/pdk/pull/1374) ([jordanbreen28](https://github.com/jordanbreen28))
|
|
16
36
|
|
|
17
37
|
### Fixed
|
|
18
38
|
|
|
39
|
+
- (CAT-2026) Update how `pdk test unit --list` detects an error [#1388](https://github.com/puppetlabs/pdk/pull/1388) ([david22swan](https://github.com/david22swan))
|
|
40
|
+
- Support executable templates on filesystems mounted with `noexec` [#1383](https://github.com/puppetlabs/pdk/pull/1383) ([nabertrand](https://github.com/nabertrand))
|
|
41
|
+
- (CAT-1786) Remove Fedora 36 from the and add Fedora 40 to the PDK README [#1379](https://github.com/puppetlabs/pdk/pull/1379) ([LukasAud](https://github.com/LukasAud))
|
|
42
|
+
- (CAT-648) - Mark release*.rb files as non-executable [#1378](https://github.com/puppetlabs/pdk/pull/1378) ([jordanbreen28](https://github.com/jordanbreen28))
|
|
19
43
|
- (CAT-1643) Update childprocess and remove patch [#1356](https://github.com/puppetlabs/pdk/pull/1356) ([david22swan](https://github.com/david22swan))
|
|
20
|
-
- (CAT-2026) Update how pdk test unit --list detects an error [#1388](https://github.com/puppetlabs/pdk/pull/1388) ([david22swan](https://github.com/david22swan))
|
|
21
44
|
|
|
22
|
-
## [v3.2.0](https://github.com/puppetlabs/pdk/tree/v3.2.0) - 2024-05-
|
|
45
|
+
## [v3.2.0](https://github.com/puppetlabs/pdk/tree/v3.2.0) - 2024-05-08
|
|
23
46
|
|
|
24
47
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v3.1.0...v3.2.0)
|
|
25
48
|
|
|
@@ -57,6 +80,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
|
57
80
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v2.7.1...v3.0.0)
|
|
58
81
|
|
|
59
82
|
### Changed
|
|
83
|
+
|
|
60
84
|
- (CONT-1134) Bump PDK Templates REF [#1264](https://github.com/puppetlabs/pdk/pull/1264) ([chelnak](https://github.com/chelnak))
|
|
61
85
|
- (CONT-1154) Disable console command [#1263](https://github.com/puppetlabs/pdk/pull/1263) ([chelnak](https://github.com/chelnak))
|
|
62
86
|
- (CONT-1130) Bump PDK gem version [#1260](https://github.com/puppetlabs/pdk/pull/1260) ([chelnak](https://github.com/chelnak))
|
data/lib/pdk/cli/exec/command.rb
CHANGED
|
@@ -80,7 +80,7 @@ module PDK
|
|
|
80
80
|
|
|
81
81
|
require 'pdk/cli/util/spinner'
|
|
82
82
|
|
|
83
|
-
@spinner = TTY::Spinner.new("[:spinner] #{message}"
|
|
83
|
+
@spinner = TTY::Spinner.new("[:spinner] #{message}")
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def update_environment(additional_env)
|
data/lib/pdk/cli/util.rb
CHANGED
|
@@ -28,18 +28,6 @@ module PDK
|
|
|
28
28
|
end
|
|
29
29
|
module_function :ensure_in_module!
|
|
30
30
|
|
|
31
|
-
def spinner_opts_for_platform
|
|
32
|
-
windows_opts = {
|
|
33
|
-
success_mark: '*',
|
|
34
|
-
error_mark: 'X'
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return windows_opts if Gem.win_platform?
|
|
38
|
-
|
|
39
|
-
{}
|
|
40
|
-
end
|
|
41
|
-
module_function :spinner_opts_for_platform
|
|
42
|
-
|
|
43
31
|
def prompt_for_yes(question_text, opts = {})
|
|
44
32
|
require 'tty/prompt'
|
|
45
33
|
|
data/lib/pdk/module/release.rb
CHANGED
|
@@ -147,28 +147,16 @@ module PDK
|
|
|
147
147
|
validate_publish_options!
|
|
148
148
|
raise PDK::CLI::ExitWithError, format('Module tarball %{tarball_path} does not exist', tarball_path: tarball_path) unless PDK::Util::Filesystem.file?(tarball_path)
|
|
149
149
|
|
|
150
|
-
# TODO: Replace this code when the upload functionality is added to the forge ruby gem
|
|
151
|
-
require 'base64'
|
|
152
|
-
file_data = Base64.encode64(PDK::Util::Filesystem.read_file(tarball_path, open_args: 'rb'))
|
|
153
|
-
|
|
154
150
|
PDK.logger.info 'Uploading tarball to puppet forge...'
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
request.body = data.to_json
|
|
163
|
-
|
|
164
|
-
require 'openssl'
|
|
165
|
-
use_ssl = uri.instance_of?(URI::HTTPS)
|
|
166
|
-
response = Net::HTTP.start(uri.host, uri.port, use_ssl: use_ssl) do |http|
|
|
167
|
-
http.request(request)
|
|
151
|
+
begin
|
|
152
|
+
require 'puppet_forge'
|
|
153
|
+
PuppetForge.host = forge_upload_url
|
|
154
|
+
PuppetForge::Connection.authorization = forge_token
|
|
155
|
+
PuppetForge::V3::Release.upload(tarball_path)
|
|
156
|
+
rescue StandardError => e
|
|
157
|
+
raise PDK::CLI::ExitWithError, format('Error uploading to Puppet Forge: %{result}', result: e.message)
|
|
168
158
|
end
|
|
169
159
|
|
|
170
|
-
raise PDK::CLI::ExitWithError, format('Error uploading to Puppet Forge: %{result}', result: response.body) unless response.is_a?(Net::HTTPSuccess)
|
|
171
|
-
|
|
172
160
|
PDK.logger.info 'Publish to Forge was successful'
|
|
173
161
|
end
|
|
174
162
|
|
|
@@ -182,7 +182,7 @@ module PDK
|
|
|
182
182
|
@rubygems_puppet_versions ||= begin
|
|
183
183
|
fetcher = Gem::SpecFetcher.fetcher
|
|
184
184
|
puppet_tuples = fetcher.detect(:released) do |spec_tuple|
|
|
185
|
-
spec_tuple.name == 'puppet' && Gem::Platform.
|
|
185
|
+
spec_tuple.name == 'puppet' && Gem::Platform.match_spec?(spec_tuple)
|
|
186
186
|
end
|
|
187
187
|
puppet_versions = puppet_tuples.map { |name, _| name.version }.uniq
|
|
188
188
|
puppet_versions.sort.reverse
|
|
@@ -51,8 +51,10 @@ module PDK
|
|
|
51
51
|
uri = URI.parse(url)
|
|
52
52
|
http = Net::HTTP.new(uri.host, uri.port)
|
|
53
53
|
http.use_ssl = true
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
if Gem.win_platform?
|
|
55
|
+
http.ca_file = 'C:/Program Files/Puppet Labs/DevelopmentKit/ssl/cert.pem'
|
|
56
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
|
57
|
+
end
|
|
56
58
|
request = Net::HTTP::Get.new(uri.request_uri)
|
|
57
59
|
response = http.request(request)
|
|
58
60
|
|
|
@@ -161,9 +161,9 @@ module PDK
|
|
|
161
161
|
if parent_validator.nil? || parent_validator.spinner.nil? || !parent_validator.spinner.is_a?(TTY::Spinner::Multi)
|
|
162
162
|
c.add_spinner(spinner_text_for_targets(invokation_targets))
|
|
163
163
|
else
|
|
164
|
-
spinner = TTY::Spinner.new("[:spinner] #{spinner_text_for_targets(invokation_targets)}"
|
|
164
|
+
spinner = TTY::Spinner.new("[:spinner] #{spinner_text_for_targets(invokation_targets)}")
|
|
165
165
|
parent_validator.spinner.register(spinner)
|
|
166
|
-
c.register_spinner(spinner
|
|
166
|
+
c.register_spinner(spinner)
|
|
167
167
|
end
|
|
168
168
|
end
|
|
169
169
|
end
|
|
@@ -138,7 +138,7 @@ module PDK
|
|
|
138
138
|
|
|
139
139
|
require 'pdk/cli/util/spinner'
|
|
140
140
|
|
|
141
|
-
@spinner = TTY::Spinner.new("[:spinner] #{spinner_text}"
|
|
141
|
+
@spinner = TTY::Spinner.new("[:spinner] #{spinner_text}")
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# Process any targets that were skipped by the validator and add the events to the validation report
|
|
@@ -22,15 +22,6 @@ module PDK
|
|
|
22
22
|
JSON.parser = JSON::Ext::Parser if defined?(JSON::Ext::Parser)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
def before_validation
|
|
26
|
-
# The pure ruby JSON parser gives much nicer parse error messages than
|
|
27
|
-
# the C extension at the cost of slightly slower parsing. We require it
|
|
28
|
-
# here and restore the C extension at the end of the method (if it was
|
|
29
|
-
# being used).
|
|
30
|
-
require 'json/pure'
|
|
31
|
-
JSON.parser = JSON::Pure::Parser
|
|
32
|
-
end
|
|
33
|
-
|
|
34
25
|
def validate_target(report, target)
|
|
35
26
|
unless PDK::Util::Filesystem.readable?(target)
|
|
36
27
|
report.add_event(
|
|
@@ -56,9 +47,7 @@ module PDK
|
|
|
56
47
|
rescue JSON::ParserError => e
|
|
57
48
|
# Because the message contains a raw segment of the file, we use
|
|
58
49
|
# String#dump here to unescape any escape characters like newlines.
|
|
59
|
-
|
|
60
|
-
# point that json_pure likes to put in exception messages.
|
|
61
|
-
sane_message = e.message.dump[/\A"(.+?)!?"\Z/, 1]
|
|
50
|
+
sane_message = e.message.dump
|
|
62
51
|
|
|
63
52
|
report.add_event(
|
|
64
53
|
file: target,
|
|
@@ -42,7 +42,7 @@ module PDK
|
|
|
42
42
|
|
|
43
43
|
require 'pdk/cli/util/spinner'
|
|
44
44
|
|
|
45
|
-
@spinner = TTY::Spinner::Multi.new("[:spinner] #{spinner_text}"
|
|
45
|
+
@spinner = TTY::Spinner::Multi.new("[:spinner] #{spinner_text}")
|
|
46
46
|
|
|
47
47
|
# Register the child spinners
|
|
48
48
|
validator_instances.each do |instance|
|
data/lib/pdk/version.rb
CHANGED
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: 3.
|
|
4
|
+
version: 3.4.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: 2024-
|
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -154,14 +154,14 @@ dependencies:
|
|
|
154
154
|
requirements:
|
|
155
155
|
- - "~>"
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: '
|
|
157
|
+
version: '5.0'
|
|
158
158
|
type: :runtime
|
|
159
159
|
prerelease: false
|
|
160
160
|
version_requirements: !ruby/object:Gem::Requirement
|
|
161
161
|
requirements:
|
|
162
162
|
- - "~>"
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version: '
|
|
164
|
+
version: '5.0'
|
|
165
165
|
- !ruby/object:Gem::Dependency
|
|
166
166
|
name: puppet-modulebuilder
|
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -205,33 +205,33 @@ dependencies:
|
|
|
205
205
|
- !ruby/object:Gem::Version
|
|
206
206
|
version: 1.5.0
|
|
207
207
|
- !ruby/object:Gem::Dependency
|
|
208
|
-
name:
|
|
208
|
+
name: pathspec
|
|
209
209
|
requirement: !ruby/object:Gem::Requirement
|
|
210
210
|
requirements:
|
|
211
211
|
- - "~>"
|
|
212
212
|
- !ruby/object:Gem::Version
|
|
213
|
-
version:
|
|
213
|
+
version: '1.1'
|
|
214
214
|
type: :runtime
|
|
215
215
|
prerelease: false
|
|
216
216
|
version_requirements: !ruby/object:Gem::Requirement
|
|
217
217
|
requirements:
|
|
218
218
|
- - "~>"
|
|
219
219
|
- !ruby/object:Gem::Version
|
|
220
|
-
version:
|
|
220
|
+
version: '1.1'
|
|
221
221
|
- !ruby/object:Gem::Dependency
|
|
222
|
-
name:
|
|
222
|
+
name: puppet_forge
|
|
223
223
|
requirement: !ruby/object:Gem::Requirement
|
|
224
224
|
requirements:
|
|
225
225
|
- - "~>"
|
|
226
226
|
- !ruby/object:Gem::Version
|
|
227
|
-
version: '
|
|
227
|
+
version: '5.0'
|
|
228
228
|
type: :runtime
|
|
229
229
|
prerelease: false
|
|
230
230
|
version_requirements: !ruby/object:Gem::Requirement
|
|
231
231
|
requirements:
|
|
232
232
|
- - "~>"
|
|
233
233
|
- !ruby/object:Gem::Version
|
|
234
|
-
version: '
|
|
234
|
+
version: '5.0'
|
|
235
235
|
description: A CLI to facilitate easy, unified development workflows for Puppet modules.
|
|
236
236
|
email:
|
|
237
237
|
- pdk-maintainers@puppet.com
|
|
@@ -383,7 +383,7 @@ homepage: https://github.com/puppetlabs/pdk
|
|
|
383
383
|
licenses: []
|
|
384
384
|
metadata:
|
|
385
385
|
rubygems_mfa_required: 'true'
|
|
386
|
-
post_install_message:
|
|
386
|
+
post_install_message:
|
|
387
387
|
rdoc_options: []
|
|
388
388
|
require_paths:
|
|
389
389
|
- lib
|
|
@@ -398,8 +398,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
398
398
|
- !ruby/object:Gem::Version
|
|
399
399
|
version: '0'
|
|
400
400
|
requirements: []
|
|
401
|
-
rubygems_version: 3.
|
|
402
|
-
signing_key:
|
|
401
|
+
rubygems_version: 3.1.6
|
|
402
|
+
signing_key:
|
|
403
403
|
specification_version: 4
|
|
404
404
|
summary: A key part of the Puppet Development Kit, the shortest path to better modules
|
|
405
405
|
test_files: []
|