pdk 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -1
- data/lib/pdk/cli/exec.rb +1 -1
- data/lib/pdk/module/metadata.rb +2 -1
- data/lib/pdk/validate/puppet/puppet_syntax.rb +26 -1
- data/lib/pdk/validate/yaml/syntax.rb +15 -1
- data/lib/pdk/version.rb +1 -1
- data/locales/pdk.pot +18 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27fc827b1a70d71d9cce1b0c392f75b8e90f2732
|
4
|
+
data.tar.gz: ad2eab7e2e51368f1407ba9828b9646369e472ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f7aaff79bd0600fe54706aa1ddd8509e33dc328df96f3d24bde51b2321fa885ef4e4d5438ed9dfd4129966ae3ea864746a07dab7a58ea4d4db0f08f8568548
|
7
|
+
data.tar.gz: 922b5d8512cf3a2954de87f95c3cc03a67980901ff8a82ab909be9589d550f4ba8400460a63232da54fcba11757f7acaeada7afb53d32c21cf92af6140bfb410
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,23 @@ 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.9.
|
7
|
+
## [v1.9.1](https://github.com/puppetlabs/pdk/tree/v1.9.1) (2019-03-01)
|
8
|
+
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.9.0...v1.9.1)
|
9
|
+
|
10
|
+
**Fixed bugs:**
|
11
|
+
|
12
|
+
- \(IMAGES-1037\) Make sure our paths are used [\#630](https://github.com/puppetlabs/pdk/pull/630) ([mihaibuzgau](https://github.com/mihaibuzgau))
|
13
|
+
- \(PDK-1266\) Clear modulepath value when validating manifest syntax [\#629](https://github.com/puppetlabs/pdk/pull/629) ([rodjek](https://github.com/rodjek))
|
14
|
+
- \(PDK-1272\) Convert user/module module names to user-module [\#626](https://github.com/puppetlabs/pdk/pull/626) ([rodjek](https://github.com/rodjek))
|
15
|
+
- \(PDK-1276\) Skip non-file YAML validator targets [\#625](https://github.com/puppetlabs/pdk/pull/625) ([rodjek](https://github.com/rodjek))
|
16
|
+
- \(PDK-1273\) Whitelist Ruby symbols in YAML validator [\#624](https://github.com/puppetlabs/pdk/pull/624) ([rodjek](https://github.com/rodjek))
|
17
|
+
|
18
|
+
**Merged pull requests:**
|
19
|
+
|
20
|
+
- \(maint\) Pin parallel gem to 1.13.0 [\#631](https://github.com/puppetlabs/pdk/pull/631) ([rodjek](https://github.com/rodjek))
|
21
|
+
- \(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))
|
22
|
+
|
23
|
+
## [v1.9.0](https://github.com/puppetlabs/pdk/tree/v1.9.0) (2019-01-29)
|
8
24
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.8.0...v1.9.0)
|
9
25
|
|
10
26
|
**Implemented enhancements:**
|
@@ -23,6 +39,10 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
23
39
|
|
24
40
|
**Merged pull requests:**
|
25
41
|
|
42
|
+
- \(maint\) Fix pin for nokogiri in package tests [\#620](https://github.com/puppetlabs/pdk/pull/620) ([bmjen](https://github.com/bmjen))
|
43
|
+
- \(PDK-1240\) Update nokogiri to minimum of 1.8.5 [\#619](https://github.com/puppetlabs/pdk/pull/619) ([bmjen](https://github.com/bmjen))
|
44
|
+
- \(maint\) Update hitimes pin to 1.3.0 for r2.1 compat [\#617](https://github.com/puppetlabs/pdk/pull/617) ([bmjen](https://github.com/bmjen))
|
45
|
+
- Release 1.9.0 [\#616](https://github.com/puppetlabs/pdk/pull/616) ([bmjen](https://github.com/bmjen))
|
26
46
|
- \(MAINT\) Configure Slack notifications for Travis [\#614](https://github.com/puppetlabs/pdk/pull/614) ([scotje](https://github.com/scotje))
|
27
47
|
- \(maint\) Fix package tests to remove hardcoding [\#613](https://github.com/puppetlabs/pdk/pull/613) ([bmjen](https://github.com/bmjen))
|
28
48
|
- \(MAINT\) Fix package acceptance tests to pass with any Ruby 2.4.x [\#611](https://github.com/puppetlabs/pdk/pull/611) ([scotje](https://github.com/scotje))
|
data/lib/pdk/cli/exec.rb
CHANGED
@@ -143,8 +143,8 @@ module PDK
|
|
143
143
|
File.join(@process.environment['GEM_HOME'], 'bin'),
|
144
144
|
PDK::Util::RubyVersion.gem_paths_raw.map { |gem_path| File.join(gem_path, 'bin') },
|
145
145
|
package_binpath,
|
146
|
-
ENV['PATH'],
|
147
146
|
PDK::Util.package_install? ? PDK::Util::Git.git_paths : nil,
|
147
|
+
ENV['PATH'],
|
148
148
|
].compact.flatten.join(File::PATH_SEPARATOR)
|
149
149
|
|
150
150
|
mod_root = PDK::Util.module_root
|
data/lib/pdk/module/metadata.rb
CHANGED
@@ -163,7 +163,8 @@ module PDK
|
|
163
163
|
# Do basic validation and parsing of the name parameter.
|
164
164
|
def process_name(data)
|
165
165
|
validate_name(data['name'])
|
166
|
-
author,
|
166
|
+
author, modname = data['name'].split(%r{[-/]}, 2)
|
167
|
+
data['name'] = [author, modname].join('-')
|
167
168
|
|
168
169
|
data['author'] ||= author if @data['author'] == DEFAULTS['author']
|
169
170
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'pdk'
|
2
2
|
require 'pdk/cli/exec'
|
3
3
|
require 'pdk/validate/base_validator'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'tmpdir'
|
4
6
|
|
5
7
|
module PDK
|
6
8
|
module Validate
|
@@ -46,7 +48,30 @@ module PDK
|
|
46
48
|
end
|
47
49
|
|
48
50
|
def self.parse_options(_options, targets)
|
49
|
-
|
51
|
+
# Due to PDK-1266 we need to run `puppet parser validate` with an empty
|
52
|
+
# modulepath. On *nix, Ruby treats `/dev/null` as an empty directory
|
53
|
+
# however it doesn't do so with `NUL` on Windows. The workaround for
|
54
|
+
# this to ensure consistent behaviour is to create an empty temporary
|
55
|
+
# directory and use that as the modulepath.
|
56
|
+
['parser', 'validate', '--config', null_file, '--modulepath', validate_tmpdir].concat(targets)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.invoke(report, options)
|
60
|
+
super
|
61
|
+
ensure
|
62
|
+
remove_validate_tmpdir
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.validate_tmpdir
|
66
|
+
@validate_tmpdir ||= Dir.mktmpdir('puppet-parser-validate')
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.remove_validate_tmpdir
|
70
|
+
return unless @validate_tmpdir
|
71
|
+
return unless File.directory?(@validate_tmpdir)
|
72
|
+
|
73
|
+
FileUtils.remove_entry_secure(@validate_tmpdir)
|
74
|
+
@validate_tmpdir = nil
|
50
75
|
end
|
51
76
|
|
52
77
|
def self.null_file
|
@@ -9,6 +9,7 @@ module PDK
|
|
9
9
|
class YAML
|
10
10
|
class Syntax < BaseValidator
|
11
11
|
IGNORE_DOTFILES = false
|
12
|
+
YAML_WHITELISTED_CLASSES = [Symbol].freeze
|
12
13
|
|
13
14
|
def self.name
|
14
15
|
'yaml-syntax'
|
@@ -62,6 +63,8 @@ module PDK
|
|
62
63
|
create_spinner(targets, options)
|
63
64
|
|
64
65
|
targets.each do |target|
|
66
|
+
next unless File.file?(target)
|
67
|
+
|
65
68
|
unless File.readable?(target)
|
66
69
|
report.add_event(
|
67
70
|
file: target,
|
@@ -75,7 +78,7 @@ module PDK
|
|
75
78
|
end
|
76
79
|
|
77
80
|
begin
|
78
|
-
::YAML.safe_load(File.read(target),
|
81
|
+
::YAML.safe_load(File.read(target), YAML_WHITELISTED_CLASSES, [], true)
|
79
82
|
|
80
83
|
report.add_event(
|
81
84
|
file: target,
|
@@ -97,6 +100,17 @@ module PDK
|
|
97
100
|
},
|
98
101
|
)
|
99
102
|
return_val = 1
|
103
|
+
rescue Psych::DisallowedClass => e
|
104
|
+
report.add_event(
|
105
|
+
file: target,
|
106
|
+
source: name,
|
107
|
+
state: :failure,
|
108
|
+
severity: 'error',
|
109
|
+
message: _('Unsupported class: %{message}') % {
|
110
|
+
message: e.message,
|
111
|
+
},
|
112
|
+
)
|
113
|
+
return_val = 1
|
100
114
|
end
|
101
115
|
end
|
102
116
|
|
data/lib/pdk/version.rb
CHANGED
data/locales/pdk.pot
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
#, fuzzy
|
7
7
|
msgid ""
|
8
8
|
msgstr ""
|
9
|
-
"Project-Id-Version: puppet development kit v1.
|
9
|
+
"Project-Id-Version: puppet development kit v1.9.0-15-g264d3c07ab\n"
|
10
10
|
"\n"
|
11
11
|
"Report-Msgid-Bugs-To: docs@puppet.com\n"
|
12
|
-
"POT-Creation-Date: 2019-01
|
13
|
-
"PO-Revision-Date: 2019-01
|
12
|
+
"POT-Creation-Date: 2019-03-01 11:43-0700\n"
|
13
|
+
"PO-Revision-Date: 2019-03-01 11:43-0700\n"
|
14
14
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
15
15
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
16
16
|
"Language: \n"
|
@@ -695,11 +695,11 @@ msgid "If there is a public issue tracker for this module, enter its URL here."
|
|
695
695
|
msgstr ""
|
696
696
|
|
697
697
|
#: ../lib/pdk/generate/module.rb:258
|
698
|
-
msgid "
|
698
|
+
msgid "update"
|
699
699
|
msgstr ""
|
700
700
|
|
701
701
|
#: ../lib/pdk/generate/module.rb:258
|
702
|
-
msgid "
|
702
|
+
msgid "create"
|
703
703
|
msgstr ""
|
704
704
|
|
705
705
|
#: ../lib/pdk/generate/module.rb:259
|
@@ -878,23 +878,23 @@ msgstr ""
|
|
878
878
|
msgid "The \"puppet\" requirement in module metadata does not specify a \"version_requirement\"."
|
879
879
|
msgstr ""
|
880
880
|
|
881
|
-
#: ../lib/pdk/module/metadata.rb:
|
881
|
+
#: ../lib/pdk/module/metadata.rb:181
|
882
882
|
msgid "Field must be a dash-separated user name and module name."
|
883
883
|
msgstr ""
|
884
884
|
|
885
|
-
#: ../lib/pdk/module/metadata.rb:
|
885
|
+
#: ../lib/pdk/module/metadata.rb:183
|
886
886
|
msgid "Module name must contain only alphanumeric or underscore characters."
|
887
887
|
msgstr ""
|
888
888
|
|
889
|
-
#: ../lib/pdk/module/metadata.rb:
|
889
|
+
#: ../lib/pdk/module/metadata.rb:185
|
890
890
|
msgid "Module name must begin with a letter."
|
891
891
|
msgstr ""
|
892
892
|
|
893
|
-
#: ../lib/pdk/module/metadata.rb:
|
893
|
+
#: ../lib/pdk/module/metadata.rb:187
|
894
894
|
msgid "Namespace must contain only alphanumeric characters."
|
895
895
|
msgstr ""
|
896
896
|
|
897
|
-
#: ../lib/pdk/module/metadata.rb:
|
897
|
+
#: ../lib/pdk/module/metadata.rb:190
|
898
898
|
msgid "Invalid 'name' field in metadata.json: %{err}"
|
899
899
|
msgstr ""
|
900
900
|
|
@@ -1246,7 +1246,7 @@ msgstr ""
|
|
1246
1246
|
msgid "Checking metadata syntax (%{targets})."
|
1247
1247
|
msgstr ""
|
1248
1248
|
|
1249
|
-
#: ../lib/pdk/validate/metadata/metadata_syntax.rb:69 ../lib/pdk/validate/tasks/metadata_lint.rb:77 ../lib/pdk/validate/yaml/syntax.rb:
|
1249
|
+
#: ../lib/pdk/validate/metadata/metadata_syntax.rb:69 ../lib/pdk/validate/tasks/metadata_lint.rb:77 ../lib/pdk/validate/yaml/syntax.rb:74
|
1250
1250
|
msgid "Could not be read."
|
1251
1251
|
msgstr ""
|
1252
1252
|
|
@@ -1254,7 +1254,7 @@ msgstr ""
|
|
1254
1254
|
msgid "Checking Puppet manifest style (%{pattern})."
|
1255
1255
|
msgstr ""
|
1256
1256
|
|
1257
|
-
#: ../lib/pdk/validate/puppet/puppet_syntax.rb:
|
1257
|
+
#: ../lib/pdk/validate/puppet/puppet_syntax.rb:47
|
1258
1258
|
msgid "Checking Puppet manifest syntax (%{pattern})."
|
1259
1259
|
msgstr ""
|
1260
1260
|
|
@@ -1282,10 +1282,14 @@ msgstr ""
|
|
1282
1282
|
msgid "Checking task names (%{targets})."
|
1283
1283
|
msgstr ""
|
1284
1284
|
|
1285
|
-
#: ../lib/pdk/validate/yaml/syntax.rb:
|
1285
|
+
#: ../lib/pdk/validate/yaml/syntax.rb:28
|
1286
1286
|
msgid "Checking YAML syntax (%{targets})."
|
1287
1287
|
msgstr ""
|
1288
1288
|
|
1289
|
-
#: ../lib/pdk/validate/yaml/syntax.rb:
|
1289
|
+
#: ../lib/pdk/validate/yaml/syntax.rb:97
|
1290
1290
|
msgid "%{problem} %{context}"
|
1291
1291
|
msgstr ""
|
1292
|
+
|
1293
|
+
#: ../lib/pdk/validate/yaml/syntax.rb:109
|
1294
|
+
msgid "Unsupported class: %{message}"
|
1295
|
+
msgstr ""
|
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: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|