pdk 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -1
- data/lib/pdk/cli/bundle.rb +1 -1
- data/lib/pdk/cli/exec.rb +3 -3
- data/lib/pdk/cli/validate.rb +1 -1
- data/lib/pdk/module.rb +4 -3
- data/lib/pdk/module/templatedir.rb +16 -8
- data/lib/pdk/template_file.rb +6 -0
- data/lib/pdk/util.rb +16 -4
- data/lib/pdk/util/ruby_version.rb +3 -2
- data/lib/pdk/validate.rb +8 -1
- data/lib/pdk/validate/base_validator.rb +10 -4
- data/lib/pdk/validate/yaml/syntax.rb +109 -0
- data/lib/pdk/validate/yaml_validator.rb +31 -0
- data/lib/pdk/version.rb +1 -1
- data/locales/pdk.pot +25 -17
- metadata +56 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39407f42f251787224ba10cb588fe376e2e99b5f
|
4
|
+
data.tar.gz: 430e0c03b853a1efbd6f2186559017694511ebe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 364a943cce4e41ae087c06653761329495ac21826b658b9172280f574b53bd6ebbf5a77439f5f2f29ea7b507876c2c25a153095a3e3d99919a3894a46b9d1f87
|
7
|
+
data.tar.gz: 5e7a3d759fc50064b5a0e28806fb7ea8aae447f90396f968baad45b27ac7b72a17f2c3ec9d5d77f5c089195cc8e730f9ab58bdf1392d3232fb0951207cb9ceff
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,34 @@ 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.
|
7
|
+
## [v1.9.0](https://github.com/puppetlabs/pdk/tree/v1.9.0) (2019-01-25)
|
8
|
+
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.8.0...v1.9.0)
|
9
|
+
|
10
|
+
**Implemented enhancements:**
|
11
|
+
|
12
|
+
- \(PDK-735\) Implement a YAML validator [\#612](https://github.com/puppetlabs/pdk/pull/612) ([rodjek](https://github.com/rodjek))
|
13
|
+
|
14
|
+
**Fixed bugs:**
|
15
|
+
|
16
|
+
- \(PDK-914\) Adjust default\_template\_url validation to accept local dirs [\#606](https://github.com/puppetlabs/pdk/pull/606) ([rodjek](https://github.com/rodjek))
|
17
|
+
- \(PDK-1204\) pdk bundle execs in the context of the pwd [\#603](https://github.com/puppetlabs/pdk/pull/603) ([rodjek](https://github.com/rodjek))
|
18
|
+
|
19
|
+
**Closed issues:**
|
20
|
+
|
21
|
+
- After today upgrade rubygems-update the check for ruby 2.1.9 is completely broken [\#609](https://github.com/puppetlabs/pdk/issues/609)
|
22
|
+
- 'unknown type yumrepo' during 'pdk test unit' [\#607](https://github.com/puppetlabs/pdk/issues/607)
|
23
|
+
|
24
|
+
**Merged pull requests:**
|
25
|
+
|
26
|
+
- \(MAINT\) Configure Slack notifications for Travis [\#614](https://github.com/puppetlabs/pdk/pull/614) ([scotje](https://github.com/scotje))
|
27
|
+
- \(maint\) Fix package tests to remove hardcoding [\#613](https://github.com/puppetlabs/pdk/pull/613) ([bmjen](https://github.com/bmjen))
|
28
|
+
- \(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))
|
29
|
+
- \(MAINT\) Bump default packaged ruby version to 2.4.5 [\#608](https://github.com/puppetlabs/pdk/pull/608) ([scotje](https://github.com/scotje))
|
30
|
+
- \(PDK-1202\) Pass TemplateDir object through to TemplateFile [\#605](https://github.com/puppetlabs/pdk/pull/605) ([rodjek](https://github.com/rodjek))
|
31
|
+
- \(PDK-1231\) Update version for new dev cycle. [\#604](https://github.com/puppetlabs/pdk/pull/604) ([bmjen](https://github.com/bmjen))
|
32
|
+
- \(PDK-1001\) Chdir before execing git rather than "git -C" [\#602](https://github.com/puppetlabs/pdk/pull/602) ([rodjek](https://github.com/rodjek))
|
33
|
+
|
34
|
+
## [v1.8.0](https://github.com/puppetlabs/pdk/tree/v1.8.0) (2018-11-28)
|
8
35
|
[Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.7.1...v1.8.0)
|
9
36
|
|
10
37
|
**Implemented enhancements:**
|
@@ -34,6 +61,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
|
|
34
61
|
|
35
62
|
**Merged pull requests:**
|
36
63
|
|
64
|
+
- Release 1.8.0 [\#601](https://github.com/puppetlabs/pdk/pull/601) ([bmjen](https://github.com/bmjen))
|
37
65
|
- \(maint\) Update package tests to add task name validation [\#600](https://github.com/puppetlabs/pdk/pull/600) ([bmjen](https://github.com/bmjen))
|
38
66
|
- \(maint\) Fix package tests [\#596](https://github.com/puppetlabs/pdk/pull/596) ([rodjek](https://github.com/rodjek))
|
39
67
|
- \(maint\) Add --skip-bundle-install to `pdk new module` [\#595](https://github.com/puppetlabs/pdk/pull/595) ([rodjek](https://github.com/rodjek))
|
data/lib/pdk/cli/bundle.rb
CHANGED
@@ -27,7 +27,7 @@ EOF
|
|
27
27
|
gemfile_env = PDK::Util::Bundler::BundleHelper.gemfile_env(puppet_env[:gemset])
|
28
28
|
|
29
29
|
command = PDK::CLI::Exec::Command.new(PDK::CLI::Exec.bundle_bin, *args).tap do |c|
|
30
|
-
c.context = :
|
30
|
+
c.context = :pwd
|
31
31
|
c.update_environment(gemfile_env)
|
32
32
|
end
|
33
33
|
|
data/lib/pdk/cli/exec.rb
CHANGED
@@ -94,7 +94,7 @@ module PDK
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def context=(new_context)
|
97
|
-
unless [:system, :module].include?(new_context)
|
97
|
+
unless [:system, :module, :pwd].include?(new_context)
|
98
98
|
raise ArgumentError, _("Expected execution context to be :system or :module but got '%{context}'.") % { context: new_context }
|
99
99
|
end
|
100
100
|
|
@@ -132,7 +132,7 @@ module PDK
|
|
132
132
|
|
133
133
|
@process.environment['BUNDLE_IGNORE_CONFIG'] = '1'
|
134
134
|
|
135
|
-
if
|
135
|
+
if [:module, :pwd].include?(context)
|
136
136
|
@process.environment['GEM_HOME'] = PDK::Util::RubyVersion.gem_home
|
137
137
|
@process.environment['GEM_PATH'] = PDK::Util::RubyVersion.gem_path
|
138
138
|
|
@@ -155,7 +155,7 @@ module PDK
|
|
155
155
|
raise PDK::CLI::FatalError, _('Current working directory is not part of a module. (No metadata.json was found.)')
|
156
156
|
end
|
157
157
|
|
158
|
-
if Dir.pwd == mod_root
|
158
|
+
if Dir.pwd == mod_root || context == :pwd
|
159
159
|
run_process_in_clean_env!
|
160
160
|
else
|
161
161
|
Dir.chdir(mod_root) do
|
data/lib/pdk/cli/validate.rb
CHANGED
@@ -6,7 +6,7 @@ module PDK::CLI
|
|
6
6
|
usage _('validate [validators] [options] [targets]')
|
7
7
|
summary _('Run static analysis tests.')
|
8
8
|
description _(
|
9
|
-
"Run metadata, Puppet, Ruby, or Tasks validation.\n\n" \
|
9
|
+
"Run metadata, YAML, Puppet, Ruby, or Tasks validation.\n\n" \
|
10
10
|
'[validators] is an optional comma-separated list of validators to use. ' \
|
11
11
|
'If not specified, all validators are used. ' \
|
12
12
|
"Note that when using PowerShell, the list of validators must be enclosed in single quotes.\n\n" \
|
data/lib/pdk/module.rb
CHANGED
@@ -4,7 +4,6 @@ module PDK
|
|
4
4
|
module Module
|
5
5
|
DEFAULT_IGNORED = [
|
6
6
|
'/pkg/',
|
7
|
-
'.*',
|
8
7
|
'~*',
|
9
8
|
'/coverage',
|
10
9
|
'/checksums.json',
|
@@ -13,8 +12,10 @@ module PDK
|
|
13
12
|
'/vendor/',
|
14
13
|
].freeze
|
15
14
|
|
16
|
-
def default_ignored_pathspec
|
17
|
-
|
15
|
+
def default_ignored_pathspec(ignore_dotfiles = true)
|
16
|
+
PathSpec.new(DEFAULT_IGNORED).tap do |ps|
|
17
|
+
ps.add('.*') if ignore_dotfiles
|
18
|
+
end
|
18
19
|
end
|
19
20
|
module_function :default_ignored_pathspec
|
20
21
|
end
|
@@ -117,7 +117,7 @@ module PDK
|
|
117
117
|
dest_status = :delete
|
118
118
|
else
|
119
119
|
begin
|
120
|
-
dest_content = PDK::TemplateFile.new(File.join(template_loc, template_file), configs: config).render
|
120
|
+
dest_content = PDK::TemplateFile.new(File.join(template_loc, template_file), configs: config, template_dir: self).render
|
121
121
|
rescue => e
|
122
122
|
error_msg = _(
|
123
123
|
"Failed to render template '%{template}'\n" \
|
@@ -269,8 +269,14 @@ module PDK
|
|
269
269
|
if File.file?(loc) && File.readable?(loc)
|
270
270
|
begin
|
271
271
|
YAML.safe_load(File.read(loc), [], [], true)
|
272
|
-
rescue
|
273
|
-
PDK.logger.warn
|
272
|
+
rescue Psych::SyntaxError => e
|
273
|
+
PDK.logger.warn _("'%{file}' is not a valid YAML file: %{problem} %{context} at line %{line} column %{column}") % {
|
274
|
+
file: loc,
|
275
|
+
problem: e.problem,
|
276
|
+
context: e.context,
|
277
|
+
line: e.line,
|
278
|
+
column: e.column,
|
279
|
+
}
|
274
280
|
{}
|
275
281
|
end
|
276
282
|
else
|
@@ -294,11 +300,13 @@ module PDK
|
|
294
300
|
clone_result = PDK::Util::Git.git('clone', origin_repo, temp_dir)
|
295
301
|
|
296
302
|
if clone_result[:exit_code].zero?
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
303
|
+
Dir.chdir(temp_dir) do
|
304
|
+
reset_result = PDK::Util::Git.git('reset', '--hard', git_ref)
|
305
|
+
unless reset_result[:exit_code].zero?
|
306
|
+
PDK.logger.error reset_result[:stdout]
|
307
|
+
PDK.logger.error reset_result[:stderr]
|
308
|
+
raise PDK::CLI::FatalError, _("Unable to set HEAD of git repository at '%{repo}' to ref:'%{ref}'.") % { repo: temp_dir, ref: git_ref }
|
309
|
+
end
|
302
310
|
end
|
303
311
|
else
|
304
312
|
PDK.logger.error clone_result[:stdout]
|
data/lib/pdk/template_file.rb
CHANGED
data/lib/pdk/util.rb
CHANGED
@@ -206,13 +206,25 @@ module PDK
|
|
206
206
|
return puppetlabs_template_url if answer_file_url == 'https://github.com/puppetlabs/pdk-module-template'
|
207
207
|
return puppetlabs_template_url if answer_file_url == puppetlabs_template_url
|
208
208
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
209
|
+
if File.directory?(answer_file_url)
|
210
|
+
# Instantiating a new TemplateDir object pointing to the directory
|
211
|
+
# will cause the directory contents to be validated, raising
|
212
|
+
# ArgumentError if it does not appear to be a valid template.
|
213
|
+
PDK::Module::TemplateDir.new(answer_file_url) {}
|
214
|
+
return answer_file_url
|
213
215
|
end
|
214
216
|
|
217
|
+
raise ArgumentError unless PDK::Util::Git.repo?(answer_file_url)
|
218
|
+
|
215
219
|
answer_file_url
|
220
|
+
rescue ArgumentError
|
221
|
+
PDK.logger.warn(
|
222
|
+
_("Unable to access the previously used template '%{template}', using the default template instead.") % {
|
223
|
+
template: answer_file_url,
|
224
|
+
},
|
225
|
+
)
|
226
|
+
PDK.answers.update!('template-url' => nil)
|
227
|
+
return puppetlabs_template_url
|
216
228
|
end
|
217
229
|
module_function :default_template_url
|
218
230
|
|
@@ -45,8 +45,9 @@ module PDK
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def default_ruby_version
|
48
|
-
# For now, the packaged versions will be using default of 2.4.
|
49
|
-
|
48
|
+
# For now, the packaged versions will be using default of 2.4.5
|
49
|
+
# FIXME: make this dynamic
|
50
|
+
return '2.4.5' if PDK::Util.package_install?
|
50
51
|
|
51
52
|
# TODO: may not be a safe assumption that highest available version should be default
|
52
53
|
latest_ruby_version
|
data/lib/pdk/validate.rb
CHANGED
@@ -2,11 +2,18 @@ require 'pdk/validate/metadata_validator'
|
|
2
2
|
require 'pdk/validate/puppet_validator'
|
3
3
|
require 'pdk/validate/ruby_validator'
|
4
4
|
require 'pdk/validate/tasks_validator'
|
5
|
+
require 'pdk/validate/yaml_validator'
|
5
6
|
|
6
7
|
module PDK
|
7
8
|
module Validate
|
8
9
|
def self.validators
|
9
|
-
@validators ||= [
|
10
|
+
@validators ||= [
|
11
|
+
MetadataValidator,
|
12
|
+
YAMLValidator,
|
13
|
+
PuppetValidator,
|
14
|
+
RubyValidator,
|
15
|
+
TasksValidator,
|
16
|
+
].freeze
|
10
17
|
end
|
11
18
|
|
12
19
|
class ParseOutputError < StandardError; end
|
@@ -21,6 +21,8 @@ module PDK
|
|
21
21
|
# false - PDK will pass the globbed targets to the validator command.
|
22
22
|
ALLOW_EMPTY_TARGETS = false
|
23
23
|
|
24
|
+
IGNORE_DOTFILES = true
|
25
|
+
|
24
26
|
def self.cmd_path
|
25
27
|
File.join(PDK::Util.module_root, 'bin', cmd)
|
26
28
|
end
|
@@ -49,10 +51,10 @@ module PDK
|
|
49
51
|
if respond_to?(:pattern)
|
50
52
|
if File.directory?(target)
|
51
53
|
target_root = PDK::Util.module_root
|
52
|
-
pattern_glob = Array(pattern).map { |p| Dir.glob(File.join(target_root, p)) }
|
54
|
+
pattern_glob = Array(pattern).map { |p| Dir.glob(File.join(target_root, p), File::FNM_DOTMATCH) }
|
53
55
|
|
54
56
|
target_list = pattern_glob.flatten.map do |file|
|
55
|
-
if File.fnmatch(File.join(File.expand_path(target), '*'), file)
|
57
|
+
if File.fnmatch(File.join(File.expand_path(target), '*'), file, File::FNM_DOTMATCH)
|
56
58
|
Pathname.new(file).relative_path_from(Pathname.new(PDK::Util.module_root)).to_s
|
57
59
|
end
|
58
60
|
end
|
@@ -65,7 +67,7 @@ module PDK
|
|
65
67
|
elsif File.file?(target)
|
66
68
|
if Array(pattern).include? target
|
67
69
|
target
|
68
|
-
elsif Array(pattern).any? { |p| File.fnmatch(File.expand_path(p), File.expand_path(target)) }
|
70
|
+
elsif Array(pattern).any? { |p| File.fnmatch(File.expand_path(p), File.expand_path(target), File::FNM_DOTMATCH) }
|
69
71
|
target
|
70
72
|
else
|
71
73
|
skipped << target
|
@@ -83,7 +85,7 @@ module PDK
|
|
83
85
|
end
|
84
86
|
|
85
87
|
def self.ignore_pathspec
|
86
|
-
ignore_pathspec = PDK::Module.default_ignored_pathspec
|
88
|
+
ignore_pathspec = PDK::Module.default_ignored_pathspec(ignore_dotfiles?)
|
87
89
|
|
88
90
|
if respond_to?(:pattern_ignore)
|
89
91
|
Array(pattern_ignore).each do |pattern|
|
@@ -94,6 +96,10 @@ module PDK
|
|
94
96
|
ignore_pathspec
|
95
97
|
end
|
96
98
|
|
99
|
+
def self.ignore_dotfiles?
|
100
|
+
self::IGNORE_DOTFILES
|
101
|
+
end
|
102
|
+
|
97
103
|
def self.parse_options(_options, targets)
|
98
104
|
targets
|
99
105
|
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'pdk'
|
2
|
+
require 'pdk/cli/exec'
|
3
|
+
require 'pdk/validate/base_validator'
|
4
|
+
require 'pdk/util'
|
5
|
+
require 'pathname'
|
6
|
+
|
7
|
+
module PDK
|
8
|
+
module Validate
|
9
|
+
class YAML
|
10
|
+
class Syntax < BaseValidator
|
11
|
+
IGNORE_DOTFILES = false
|
12
|
+
|
13
|
+
def self.name
|
14
|
+
'yaml-syntax'
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.pattern
|
18
|
+
[
|
19
|
+
'**/*.yaml',
|
20
|
+
'*.yaml',
|
21
|
+
'**/*.yml',
|
22
|
+
'*.yml',
|
23
|
+
]
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.spinner_text(_targets = [])
|
27
|
+
_('Checking YAML syntax (%{targets}).') % {
|
28
|
+
targets: pattern,
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.create_spinner(targets = [], options = {})
|
33
|
+
return unless PDK::CLI::Util.interactive?
|
34
|
+
options = options.merge(PDK::CLI::Util.spinner_opts_for_platform)
|
35
|
+
|
36
|
+
exec_group = options[:exec_group]
|
37
|
+
@spinner = if exec_group
|
38
|
+
exec_group.add_spinner(spinner_text(targets), options)
|
39
|
+
else
|
40
|
+
TTY::Spinner.new("[:spinner] #{spinner_text(targets)}", options)
|
41
|
+
end
|
42
|
+
@spinner.auto_spin
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.stop_spinner(exit_code)
|
46
|
+
if exit_code.zero? && @spinner
|
47
|
+
@spinner.success
|
48
|
+
elsif @spinner
|
49
|
+
@spinner.error
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.invoke(report, options = {})
|
54
|
+
targets, skipped, invalid = parse_targets(options)
|
55
|
+
|
56
|
+
process_skipped(report, skipped)
|
57
|
+
process_invalid(report, invalid)
|
58
|
+
|
59
|
+
return 0 if targets.empty?
|
60
|
+
|
61
|
+
return_val = 0
|
62
|
+
create_spinner(targets, options)
|
63
|
+
|
64
|
+
targets.each do |target|
|
65
|
+
unless File.readable?(target)
|
66
|
+
report.add_event(
|
67
|
+
file: target,
|
68
|
+
source: name,
|
69
|
+
state: :failure,
|
70
|
+
severity: 'error',
|
71
|
+
message: _('Could not be read.'),
|
72
|
+
)
|
73
|
+
return_val = 1
|
74
|
+
next
|
75
|
+
end
|
76
|
+
|
77
|
+
begin
|
78
|
+
::YAML.safe_load(File.read(target), [], [], true)
|
79
|
+
|
80
|
+
report.add_event(
|
81
|
+
file: target,
|
82
|
+
source: name,
|
83
|
+
state: :passed,
|
84
|
+
severity: 'ok',
|
85
|
+
)
|
86
|
+
rescue Psych::SyntaxError => e
|
87
|
+
report.add_event(
|
88
|
+
file: target,
|
89
|
+
source: name,
|
90
|
+
state: :failure,
|
91
|
+
severity: 'error',
|
92
|
+
line: e.line,
|
93
|
+
column: e.column,
|
94
|
+
message: _('%{problem} %{context}') % {
|
95
|
+
problem: e.problem,
|
96
|
+
context: e.context,
|
97
|
+
},
|
98
|
+
)
|
99
|
+
return_val = 1
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
stop_spinner(return_val)
|
104
|
+
return_val
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'pdk'
|
2
|
+
require 'pdk/cli/exec'
|
3
|
+
require 'pdk/validate/base_validator'
|
4
|
+
require 'pdk/validate/yaml/syntax'
|
5
|
+
|
6
|
+
module PDK
|
7
|
+
module Validate
|
8
|
+
class YAMLValidator < BaseValidator
|
9
|
+
def self.name
|
10
|
+
'yaml'
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.validators
|
14
|
+
[
|
15
|
+
PDK::Validate::YAML::Syntax,
|
16
|
+
]
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.invoke(report, options = {})
|
20
|
+
exit_code = 0
|
21
|
+
|
22
|
+
validators.each do |validator|
|
23
|
+
exit_code = validator.invoke(report, options)
|
24
|
+
break if exit_code != 0
|
25
|
+
end
|
26
|
+
|
27
|
+
exit_code
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/pdk/version.rb
CHANGED
data/locales/pdk.pot
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# SOME DESCRIPTIVE TITLE.
|
2
|
-
# Copyright (C)
|
2
|
+
# Copyright (C) 2019 Puppet, Inc.
|
3
3
|
# This file is distributed under the same license as the puppet development kit package.
|
4
|
-
# FIRST AUTHOR <EMAIL@ADDRESS>,
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
|
5
5
|
#
|
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.8.0-22-g7b2950bc5f\n"
|
10
10
|
"\n"
|
11
11
|
"Report-Msgid-Bugs-To: docs@puppet.com\n"
|
12
|
-
"POT-Creation-Date:
|
13
|
-
"PO-Revision-Date:
|
12
|
+
"POT-Creation-Date: 2019-01-25 16:10-0700\n"
|
13
|
+
"PO-Revision-Date: 2019-01-25 16:10-0700\n"
|
14
14
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
15
15
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
16
16
|
"Language: \n"
|
@@ -533,7 +533,7 @@ msgstr ""
|
|
533
533
|
|
534
534
|
#: ../lib/pdk/cli/validate.rb:8
|
535
535
|
msgid ""
|
536
|
-
"Run metadata, Puppet, Ruby, or Tasks validation.\n"
|
536
|
+
"Run metadata, YAML, Puppet, Ruby, or Tasks validation.\n"
|
537
537
|
"\n"
|
538
538
|
"[validators] is an optional comma-separated list of validators to use. If not specified, all validators are used. Note that when using PowerShell, the list of validators must be enclosed in single quotes.\n"
|
539
539
|
"\n"
|
@@ -933,14 +933,14 @@ msgid "The directory '%{dir}' doesn't exist"
|
|
933
933
|
msgstr ""
|
934
934
|
|
935
935
|
#: ../lib/pdk/module/templatedir.rb:273
|
936
|
-
msgid "'%{file}' is not a valid YAML file: %{
|
936
|
+
msgid "'%{file}' is not a valid YAML file: %{problem} %{context} at line %{line} column %{column}"
|
937
937
|
msgstr ""
|
938
938
|
|
939
|
-
#: ../lib/pdk/module/templatedir.rb:
|
939
|
+
#: ../lib/pdk/module/templatedir.rb:308
|
940
940
|
msgid "Unable to set HEAD of git repository at '%{repo}' to ref:'%{ref}'."
|
941
941
|
msgstr ""
|
942
942
|
|
943
|
-
#: ../lib/pdk/module/templatedir.rb:
|
943
|
+
#: ../lib/pdk/module/templatedir.rb:314
|
944
944
|
msgid "Unable to clone git repository at '%{repo}' into '%{dest}'."
|
945
945
|
msgstr ""
|
946
946
|
|
@@ -1024,7 +1024,7 @@ msgstr ""
|
|
1024
1024
|
msgid "Trace must be an Array of stack trace lines."
|
1025
1025
|
msgstr ""
|
1026
1026
|
|
1027
|
-
#: ../lib/pdk/template_file.rb:
|
1027
|
+
#: ../lib/pdk/template_file.rb:68
|
1028
1028
|
msgid "'%{template}' is not a readable file"
|
1029
1029
|
msgstr ""
|
1030
1030
|
|
@@ -1084,7 +1084,7 @@ msgstr ""
|
|
1084
1084
|
msgid "Package basedir requested for non-package install."
|
1085
1085
|
msgstr ""
|
1086
1086
|
|
1087
|
-
#: ../lib/pdk/util.rb:
|
1087
|
+
#: ../lib/pdk/util.rb:222
|
1088
1088
|
msgid "Unable to access the previously used template '%{template}', using the default template instead."
|
1089
1089
|
msgstr ""
|
1090
1090
|
|
@@ -1214,23 +1214,23 @@ msgstr ""
|
|
1214
1214
|
msgid "Failed to call GetLongPathName"
|
1215
1215
|
msgstr ""
|
1216
1216
|
|
1217
|
-
#: ../lib/pdk/validate/base_validator.rb:
|
1217
|
+
#: ../lib/pdk/validate/base_validator.rb:108
|
1218
1218
|
msgid "Invoking %{cmd}"
|
1219
1219
|
msgstr ""
|
1220
1220
|
|
1221
|
-
#: ../lib/pdk/validate/base_validator.rb:
|
1221
|
+
#: ../lib/pdk/validate/base_validator.rb:113
|
1222
1222
|
msgid "%{validator}: Skipped '%{target}'. Target does not contain any files to validate (%{pattern})."
|
1223
1223
|
msgstr ""
|
1224
1224
|
|
1225
|
-
#: ../lib/pdk/validate/base_validator.rb:
|
1225
|
+
#: ../lib/pdk/validate/base_validator.rb:117
|
1226
1226
|
msgid "Target does not contain any files to validate (%{pattern})."
|
1227
1227
|
msgstr ""
|
1228
1228
|
|
1229
|
-
#: ../lib/pdk/validate/base_validator.rb:
|
1229
|
+
#: ../lib/pdk/validate/base_validator.rb:126
|
1230
1230
|
msgid "%{validator}: Skipped '%{target}'. Target file not found."
|
1231
1231
|
msgstr ""
|
1232
1232
|
|
1233
|
-
#: ../lib/pdk/validate/base_validator.rb:
|
1233
|
+
#: ../lib/pdk/validate/base_validator.rb:130
|
1234
1234
|
msgid "File does not exist."
|
1235
1235
|
msgstr ""
|
1236
1236
|
|
@@ -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
|
1249
|
+
#: ../lib/pdk/validate/metadata/metadata_syntax.rb:69 ../lib/pdk/validate/tasks/metadata_lint.rb:77 ../lib/pdk/validate/yaml/syntax.rb:71
|
1250
1250
|
msgid "Could not be read."
|
1251
1251
|
msgstr ""
|
1252
1252
|
|
@@ -1281,3 +1281,11 @@ msgstr ""
|
|
1281
1281
|
#: ../lib/pdk/validate/tasks/name.rb:23
|
1282
1282
|
msgid "Checking task names (%{targets})."
|
1283
1283
|
msgstr ""
|
1284
|
+
|
1285
|
+
#: ../lib/pdk/validate/yaml/syntax.rb:27
|
1286
|
+
msgid "Checking YAML syntax (%{targets})."
|
1287
|
+
msgstr ""
|
1288
|
+
|
1289
|
+
#: ../lib/pdk/validate/yaml/syntax.rb:94
|
1290
|
+
msgid "%{problem} %{context}"
|
1291
|
+
msgstr ""
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.15.0
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 3.0.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: 1.15.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.0.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: cri
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,6 +184,48 @@ dependencies:
|
|
178
184
|
- - "~>"
|
179
185
|
- !ruby/object:Gem::Version
|
180
186
|
version: 0.2.1
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: ffi
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - "~>"
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: 1.9.0
|
194
|
+
type: :runtime
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - "~>"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: 1.9.0
|
201
|
+
- !ruby/object:Gem::Dependency
|
202
|
+
name: hitimes
|
203
|
+
requirement: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - '='
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: 1.3.0
|
208
|
+
type: :runtime
|
209
|
+
prerelease: false
|
210
|
+
version_requirements: !ruby/object:Gem::Requirement
|
211
|
+
requirements:
|
212
|
+
- - '='
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: 1.3.0
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: net-ssh
|
217
|
+
requirement: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - "~>"
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 4.2.0
|
222
|
+
type: :runtime
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - "~>"
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: 4.2.0
|
181
229
|
- !ruby/object:Gem::Dependency
|
182
230
|
name: deep_merge
|
183
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,6 +324,8 @@ files:
|
|
276
324
|
- lib/pdk/validate/tasks/metadata_lint.rb
|
277
325
|
- lib/pdk/validate/tasks/name.rb
|
278
326
|
- lib/pdk/validate/tasks_validator.rb
|
327
|
+
- lib/pdk/validate/yaml/syntax.rb
|
328
|
+
- lib/pdk/validate/yaml_validator.rb
|
279
329
|
- lib/pdk/version.rb
|
280
330
|
- locales/config.yaml
|
281
331
|
- locales/pdk.pot
|