pdk 0.6.0 → 1.0.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 +24 -0
- data/README.md +50 -250
- data/lib/pdk/cli.rb +2 -1
- data/lib/pdk/cli/exec.rb +47 -38
- data/lib/pdk/cli/exec_group.rb +53 -0
- data/lib/pdk/cli/new/class.rb +1 -5
- data/lib/pdk/cli/util.rb +11 -0
- data/lib/pdk/cli/util/interview.rb +1 -0
- data/lib/pdk/cli/validate.rb +17 -5
- data/lib/pdk/generators/module.rb +36 -18
- data/lib/pdk/generators/puppet_class.rb +1 -4
- data/lib/pdk/generators/puppet_object.rb +1 -1
- data/lib/pdk/logger.rb +4 -0
- data/lib/pdk/module/metadata.rb +1 -0
- data/lib/pdk/module/templatedir.rb +9 -3
- data/lib/pdk/monkey_patches.rb +13 -0
- data/lib/pdk/report/event.rb +4 -2
- data/lib/pdk/util.rb +14 -0
- data/lib/pdk/util/bundler.rb +5 -11
- data/lib/pdk/validators/base_validator.rb +67 -6
- data/lib/pdk/validators/metadata/metadata_json_lint.rb +3 -3
- data/lib/pdk/validators/metadata/metadata_syntax.rb +33 -13
- data/lib/pdk/validators/puppet/puppet_lint.rb +1 -1
- data/lib/pdk/validators/puppet/puppet_syntax.rb +1 -1
- data/lib/pdk/validators/ruby/rubocop.rb +5 -1
- data/lib/pdk/version.rb +1 -1
- data/locales/pdk.pot +240 -117
- metadata +9 -8
- data/locales/de/pdk.po +0 -604
@@ -16,6 +16,17 @@ module PDK
|
|
16
16
|
File.join(PDK::Util.module_root, 'bin', cmd)
|
17
17
|
end
|
18
18
|
|
19
|
+
# Parses the target strings provided from the CLI
|
20
|
+
#
|
21
|
+
# @param options [Hash] A Hash containing the input options from the CLI.
|
22
|
+
#
|
23
|
+
# @return targets [Array] An Array of Strings containing target file paths
|
24
|
+
# for the validator to validate.
|
25
|
+
# @return skipped [Array] An Array of Strings containing targets
|
26
|
+
# that are skipped due to target not containing
|
27
|
+
# any files that can be validated by the validator.
|
28
|
+
# @return invalid [Array] An Array of Strings containing targets that do
|
29
|
+
# not exist, and will not be run by validator.
|
19
30
|
def self.parse_targets(options)
|
20
31
|
# If no targets are specified, then we will run validations from the
|
21
32
|
# base module directory.
|
@@ -25,17 +36,32 @@ module PDK
|
|
25
36
|
options[:targets]
|
26
37
|
end
|
27
38
|
|
28
|
-
|
39
|
+
skipped = []
|
40
|
+
invalid = []
|
41
|
+
matched = targets.map { |target|
|
29
42
|
if respond_to?(:pattern)
|
30
43
|
if File.directory?(target)
|
31
|
-
Array[pattern].flatten.map { |p| Dir.glob(File.join(target, p)) }
|
44
|
+
target_list = Array[pattern].flatten.map { |p| Dir.glob(File.join(target, p)) }
|
45
|
+
skipped << target if target_list.flatten.empty?
|
46
|
+
target_list
|
47
|
+
elsif File.file?(target)
|
48
|
+
if target.eql? pattern
|
49
|
+
target
|
50
|
+
elsif Array[pattern].flatten.map { |p| File.fnmatch(p, File.expand_path(target)) }.include? true
|
51
|
+
target
|
52
|
+
else
|
53
|
+
skipped << target
|
54
|
+
next
|
55
|
+
end
|
32
56
|
else
|
33
|
-
target
|
57
|
+
invalid << target
|
58
|
+
next
|
34
59
|
end
|
35
60
|
else
|
36
61
|
target
|
37
62
|
end
|
38
|
-
}.flatten
|
63
|
+
}.compact.flatten
|
64
|
+
[matched, skipped, invalid]
|
39
65
|
end
|
40
66
|
|
41
67
|
def self.parse_options(_options, targets)
|
@@ -46,8 +72,37 @@ module PDK
|
|
46
72
|
_('Invoking %{cmd}') % { cmd: cmd }
|
47
73
|
end
|
48
74
|
|
75
|
+
def self.process_skipped(report, skipped = [])
|
76
|
+
skipped.each do |skipped_target|
|
77
|
+
PDK.logger.debug(_('%{validator}: Skipped \'%{target}\'. Target does not contain any files to validate (%{pattern}).') % { validator: name, target: skipped_target, pattern: pattern })
|
78
|
+
report.add_event(
|
79
|
+
file: skipped_target,
|
80
|
+
source: name,
|
81
|
+
message: _('Target does not contain any files to validate (%{pattern}).') % { pattern: pattern },
|
82
|
+
severity: :info,
|
83
|
+
state: :skipped,
|
84
|
+
)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.process_invalid(report, invalid = [])
|
89
|
+
invalid.each do |invalid_target|
|
90
|
+
PDK.logger.debug(_('%{validator}: Skipped \'%{target}\'. Target file not found.') % { validator: name, target: invalid_target })
|
91
|
+
report.add_event(
|
92
|
+
file: invalid_target,
|
93
|
+
source: name,
|
94
|
+
message: 'File does not exist.',
|
95
|
+
severity: :error,
|
96
|
+
state: :error,
|
97
|
+
)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
49
101
|
def self.invoke(report, options = {})
|
50
|
-
targets = parse_targets(options)
|
102
|
+
targets, skipped, invalid = parse_targets(options)
|
103
|
+
|
104
|
+
process_skipped(report, skipped)
|
105
|
+
process_invalid(report, invalid)
|
51
106
|
|
52
107
|
return 0 if targets.empty?
|
53
108
|
|
@@ -67,7 +122,13 @@ module PDK
|
|
67
122
|
|
68
123
|
command = PDK::CLI::Exec::Command.new(*cmd_argv).tap do |c|
|
69
124
|
c.context = :module
|
70
|
-
|
125
|
+
exec_group = options[:exec_group]
|
126
|
+
if exec_group
|
127
|
+
sub_spinner = exec_group.add_spinner(spinner_text(invokation_targets))
|
128
|
+
c.register_spinner(sub_spinner)
|
129
|
+
else
|
130
|
+
c.add_spinner(spinner_text(invokation_targets))
|
131
|
+
end
|
71
132
|
end
|
72
133
|
|
73
134
|
result = command.execute!
|
@@ -19,9 +19,9 @@ module PDK
|
|
19
19
|
'metadata-json-lint'
|
20
20
|
end
|
21
21
|
|
22
|
-
def self.spinner_text(targets =
|
23
|
-
_('Checking metadata (%{targets})') % {
|
24
|
-
targets:
|
22
|
+
def self.spinner_text(targets = [])
|
23
|
+
_('Checking metadata style (%{targets})') % {
|
24
|
+
targets: PDK::Util.targets_relative_to_pwd(targets).join(' '),
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
@@ -14,12 +14,43 @@ module PDK
|
|
14
14
|
'metadata.json'
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.spinner_text(targets = [])
|
18
|
+
_('Checking metadata syntax (%{targets})') % {
|
19
|
+
targets: PDK::Util.targets_relative_to_pwd(targets).join(' '),
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.create_spinner(targets = [], options = {})
|
24
|
+
return if PDK.logger.debug?
|
25
|
+
options = options.merge(PDK::CLI::Util.spinner_opts_for_platform)
|
26
|
+
|
27
|
+
exec_group = options[:exec_group]
|
28
|
+
@spinner = if exec_group
|
29
|
+
exec_group.add_spinner(spinner_text(targets), options)
|
30
|
+
else
|
31
|
+
TTY::Spinner.new("[:spinner] #{spinner_text(targets)}", options)
|
32
|
+
end
|
33
|
+
@spinner.auto_spin
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.stop_spinner(exit_code)
|
37
|
+
if exit_code.zero? && @spinner
|
38
|
+
@spinner.success
|
39
|
+
elsif @spinner
|
40
|
+
@spinner.error
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
17
44
|
def self.invoke(report, options = {})
|
18
|
-
targets = parse_targets(options)
|
45
|
+
targets, skipped, invalid = parse_targets(options)
|
46
|
+
|
47
|
+
process_skipped(report, skipped)
|
48
|
+
process_invalid(report, invalid)
|
19
49
|
|
20
50
|
return 0 if targets.empty?
|
21
51
|
|
22
52
|
return_val = 0
|
53
|
+
create_spinner(targets, options)
|
23
54
|
|
24
55
|
# The pure ruby JSON parser gives much nicer parse error messages than
|
25
56
|
# the C extension at the cost of slightly slower parsing. We require it
|
@@ -29,18 +60,6 @@ module PDK
|
|
29
60
|
JSON.parser = JSON::Pure::Parser
|
30
61
|
|
31
62
|
targets.each do |target|
|
32
|
-
unless File.file?(target)
|
33
|
-
report.add_event(
|
34
|
-
file: target,
|
35
|
-
source: name,
|
36
|
-
state: :failure,
|
37
|
-
severity: 'error',
|
38
|
-
message: _('not a file'),
|
39
|
-
)
|
40
|
-
return_val = 1
|
41
|
-
next
|
42
|
-
end
|
43
|
-
|
44
63
|
unless File.readable?(target)
|
45
64
|
report.add_event(
|
46
65
|
file: target,
|
@@ -80,6 +99,7 @@ module PDK
|
|
80
99
|
end
|
81
100
|
end
|
82
101
|
|
102
|
+
stop_spinner(return_val)
|
83
103
|
return_val
|
84
104
|
ensure
|
85
105
|
JSON.parser = JSON::Ext::Parser if defined?(JSON::Ext::Parser)
|
@@ -16,8 +16,12 @@ module PDK
|
|
16
16
|
'rubocop'
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.pattern
|
20
|
+
'**/**.rb'
|
21
|
+
end
|
22
|
+
|
19
23
|
def self.spinner_text(_targets = nil)
|
20
|
-
_('Checking Ruby code style')
|
24
|
+
_('Checking Ruby code style (%{pattern})') % { pattern: pattern }
|
21
25
|
end
|
22
26
|
|
23
27
|
def self.parse_options(options, targets)
|
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 v0.
|
9
|
+
"Project-Id-Version: puppet development kit v0.5.0-90-g4f429f1\n"
|
10
10
|
"\n"
|
11
11
|
"Report-Msgid-Bugs-To: docs@puppet.com\n"
|
12
|
-
"POT-Creation-Date: 2017-
|
13
|
-
"PO-Revision-Date: 2017-
|
12
|
+
"POT-Creation-Date: 2017-08-07 15:19+0100\n"
|
13
|
+
"PO-Revision-Date: 2017-08-07 15:19+0100\n"
|
14
14
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
15
15
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
16
16
|
"Language: \n"
|
@@ -19,60 +19,104 @@ msgstr ""
|
|
19
19
|
"Content-Transfer-Encoding: 8bit\n"
|
20
20
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
21
21
|
|
22
|
-
#: ../lib/pdk/
|
22
|
+
#: ../lib/pdk/answer_file.rb:56
|
23
|
+
msgid "Answer file can only be updated with a Hash"
|
24
|
+
msgstr ""
|
25
|
+
|
26
|
+
#: ../lib/pdk/answer_file.rb:83 ../lib/pdk/module/metadata.rb:50
|
27
|
+
msgid "Unable to open '%{file}' for reading"
|
28
|
+
msgstr ""
|
29
|
+
|
30
|
+
#: ../lib/pdk/answer_file.rb:92
|
31
|
+
msgid "Answer file '%{path}' did not contain a valid set of answers, recreating it"
|
32
|
+
msgstr ""
|
33
|
+
|
34
|
+
#: ../lib/pdk/answer_file.rb:98
|
35
|
+
msgid "Answer file '%{path}' did not contain valid JSON, recreating it"
|
36
|
+
msgstr ""
|
37
|
+
|
38
|
+
#: ../lib/pdk/answer_file.rb:114
|
39
|
+
msgid "Unable to write '%{file}': %{msg}"
|
40
|
+
msgstr ""
|
41
|
+
|
42
|
+
#: ../lib/pdk/cli.rb:35
|
23
43
|
msgid "Specifies the URL to the template to use when creating new modules, and other parts."
|
24
44
|
msgstr ""
|
25
45
|
|
26
|
-
#: ../lib/pdk/cli.rb:
|
46
|
+
#: ../lib/pdk/cli.rb:40
|
27
47
|
msgid "pdk command [options]"
|
28
48
|
msgstr ""
|
29
49
|
|
30
|
-
#: ../lib/pdk/cli.rb:
|
50
|
+
#: ../lib/pdk/cli.rb:41
|
31
51
|
msgid "Puppet Development Kit"
|
32
52
|
msgstr ""
|
33
53
|
|
34
|
-
#: ../lib/pdk/cli.rb:
|
54
|
+
#: ../lib/pdk/cli.rb:42
|
35
55
|
msgid "The shortest path to better modules."
|
36
56
|
msgstr ""
|
37
57
|
|
38
|
-
#: ../lib/pdk/cli.rb:
|
58
|
+
#: ../lib/pdk/cli.rb:45
|
39
59
|
msgid "show version of pdk"
|
40
60
|
msgstr ""
|
41
61
|
|
42
|
-
#: ../lib/pdk/cli.rb:
|
62
|
+
#: ../lib/pdk/cli.rb:50
|
43
63
|
msgid "show help for this command"
|
44
64
|
msgstr ""
|
45
65
|
|
46
|
-
#: ../lib/pdk/cli.rb:
|
66
|
+
#: ../lib/pdk/cli.rb:55
|
47
67
|
msgid "Specify desired output format. Valid formats are '%{available_formats}'. You may also specify a file to which the formatted output will be directed, for example: '--format=junit:report.xml'. This option may be specified multiple times as long as each option specifies a distinct target file."
|
48
68
|
msgstr ""
|
49
69
|
|
50
|
-
#: ../lib/pdk/cli.rb:
|
70
|
+
#: ../lib/pdk/cli.rb:66
|
51
71
|
msgid "Enable debug output."
|
52
72
|
msgstr ""
|
53
73
|
|
74
|
+
#: ../lib/pdk/cli.rb:70
|
75
|
+
msgid "Path to an answer file"
|
76
|
+
msgstr ""
|
77
|
+
|
78
|
+
#: ../lib/pdk/cli/bundle.rb:5
|
79
|
+
msgid "bundle -- [bundler_options]"
|
80
|
+
msgstr ""
|
81
|
+
|
82
|
+
#: ../lib/pdk/cli/bundle.rb:6
|
83
|
+
msgid "escape hatch to bundler"
|
84
|
+
msgstr ""
|
85
|
+
|
86
|
+
#: ../lib/pdk/cli/bundle.rb:7
|
87
|
+
msgid "[experimental] For advanced users, this allows to run arbitrary commands in the bundler environment that the pdk manages. Careless use of this command can lead to errors later which can't be recovered by the pdk itself."
|
88
|
+
msgstr ""
|
89
|
+
|
54
90
|
#: ../lib/pdk/cli/errors.rb:6
|
55
91
|
msgid "An unexpected error has occurred, try running the command again with --debug"
|
56
92
|
msgstr ""
|
57
93
|
|
58
|
-
#: ../lib/pdk/cli/exec.rb:
|
59
|
-
msgid "
|
94
|
+
#: ../lib/pdk/cli/exec.rb:16
|
95
|
+
msgid "Unable to find `%{name}`. Check that it is installed and try again."
|
96
|
+
msgstr ""
|
97
|
+
|
98
|
+
#: ../lib/pdk/cli/exec.rb:55
|
99
|
+
msgid "PDK package installation not found, trying '%{fallback}' from the system PATH instead"
|
100
|
+
msgstr ""
|
101
|
+
|
102
|
+
#: ../lib/pdk/cli/exec.rb:60
|
103
|
+
msgid "Using '%{vendored_bin_path}' from PDK package"
|
60
104
|
msgstr ""
|
61
105
|
|
62
|
-
#: ../lib/pdk/cli/exec.rb:
|
63
|
-
msgid "
|
106
|
+
#: ../lib/pdk/cli/exec.rb:63
|
107
|
+
msgid "Could not find '%{vendored_bin_path}' in PDK package, trying '%{fallback}' from the system PATH instead"
|
64
108
|
msgstr ""
|
65
109
|
|
66
|
-
#: ../lib/pdk/cli/exec.rb:
|
110
|
+
#: ../lib/pdk/cli/exec.rb:97
|
67
111
|
msgid "Expected execution context to be :system or :module but got '%{context}'"
|
68
112
|
msgstr ""
|
69
113
|
|
70
|
-
#: ../lib/pdk/cli/exec.rb:
|
71
|
-
msgid "
|
114
|
+
#: ../lib/pdk/cli/exec.rb:186
|
115
|
+
msgid "Executing '%{command}'"
|
72
116
|
msgstr ""
|
73
117
|
|
74
|
-
#: ../lib/pdk/cli/exec.rb:
|
75
|
-
msgid "Failed to execute
|
118
|
+
#: ../lib/pdk/cli/exec.rb:191
|
119
|
+
msgid "Failed to execute '%{command}': %{message}"
|
76
120
|
msgstr ""
|
77
121
|
|
78
122
|
#: ../lib/pdk/cli/new.rb:5
|
@@ -87,15 +131,15 @@ msgstr ""
|
|
87
131
|
msgid "Creates a new instance of <type> using the options relevant to that type of thing"
|
88
132
|
msgstr ""
|
89
133
|
|
90
|
-
#: ../lib/pdk/cli/new/class.rb:
|
134
|
+
#: ../lib/pdk/cli/new/class.rb:4
|
91
135
|
msgid "class [options] <class_name> [parameter[:type]] [parameter[:type]] ..."
|
92
136
|
msgstr ""
|
93
137
|
|
94
|
-
#: ../lib/pdk/cli/new/class.rb:
|
138
|
+
#: ../lib/pdk/cli/new/class.rb:5
|
95
139
|
msgid "Create a new class named <class_name> using given options"
|
96
140
|
msgstr ""
|
97
141
|
|
98
|
-
#: ../lib/pdk/cli/new/class.rb:
|
142
|
+
#: ../lib/pdk/cli/new/class.rb:23
|
99
143
|
msgid "'%{name}' is not a valid class name"
|
100
144
|
msgstr ""
|
101
145
|
|
@@ -112,20 +156,16 @@ msgid "Specifies the license this module is written under. This should be a iden
|
|
112
156
|
msgstr ""
|
113
157
|
|
114
158
|
#: ../lib/pdk/cli/new/module.rb:13
|
115
|
-
msgid "Specifies the version control driver. Valid values: 'git', 'none'. Default: 'git'."
|
116
|
-
msgstr ""
|
117
|
-
|
118
|
-
#: ../lib/pdk/cli/new/module.rb:15
|
119
159
|
msgid "When specified, skips interactive querying of metadata."
|
120
160
|
msgstr ""
|
121
161
|
|
122
|
-
#: ../lib/pdk/cli/new/module.rb:
|
162
|
+
#: ../lib/pdk/cli/new/module.rb:27
|
123
163
|
msgid ""
|
124
164
|
"'%{module_name}' is not a valid module name.\n"
|
125
165
|
"Module names must begin with a lowercase letter and can only include lowercase letters, digits, and underscores."
|
126
166
|
msgstr ""
|
127
167
|
|
128
|
-
#: ../lib/pdk/cli/new/module.rb:
|
168
|
+
#: ../lib/pdk/cli/new/module.rb:37
|
129
169
|
msgid "Creating new module: %{modname}"
|
130
170
|
msgstr ""
|
131
171
|
|
@@ -137,28 +177,40 @@ msgstr ""
|
|
137
177
|
msgid "Run tests."
|
138
178
|
msgstr ""
|
139
179
|
|
140
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
180
|
+
#: ../lib/pdk/cli/test/unit.rb:7
|
141
181
|
msgid "unit [options]"
|
142
182
|
msgstr ""
|
143
183
|
|
144
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
184
|
+
#: ../lib/pdk/cli/test/unit.rb:8
|
145
185
|
msgid "Run unit tests."
|
146
186
|
msgstr ""
|
147
187
|
|
148
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
188
|
+
#: ../lib/pdk/cli/test/unit.rb:10
|
149
189
|
msgid "list all available unit tests and their descriptions"
|
150
190
|
msgstr ""
|
151
191
|
|
152
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
192
|
+
#: ../lib/pdk/cli/test/unit.rb:11
|
193
|
+
msgid "run unit tests in parallel"
|
194
|
+
msgstr ""
|
195
|
+
|
196
|
+
#: ../lib/pdk/cli/test/unit.rb:13
|
153
197
|
msgid "a comma-separated list of tests to run"
|
154
198
|
msgstr ""
|
155
199
|
|
156
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
157
|
-
msgid "
|
200
|
+
#: ../lib/pdk/cli/test/unit.rb:30
|
201
|
+
msgid "No examples found."
|
202
|
+
msgstr ""
|
203
|
+
|
204
|
+
#: ../lib/pdk/cli/test/unit.rb:32
|
205
|
+
msgid "Examples:"
|
158
206
|
msgstr ""
|
159
207
|
|
160
|
-
#: ../lib/pdk/cli/test/unit.rb:
|
161
|
-
msgid "
|
208
|
+
#: ../lib/pdk/cli/test/unit.rb:34
|
209
|
+
msgid "%{id}\t%{description}"
|
210
|
+
msgstr ""
|
211
|
+
|
212
|
+
#: ../lib/pdk/cli/util.rb:9
|
213
|
+
msgid "This command must be run from inside a module (no metadata.json found)"
|
162
214
|
msgstr ""
|
163
215
|
|
164
216
|
#: ../lib/pdk/cli/util/interview.rb:30
|
@@ -177,11 +229,11 @@ msgstr ""
|
|
177
229
|
msgid "'%{name}' is not a valid report format (%{valid})"
|
178
230
|
msgstr ""
|
179
231
|
|
180
|
-
#: ../lib/pdk/cli/util/option_normalizer.rb:
|
232
|
+
#: ../lib/pdk/cli/util/option_normalizer.rb:56
|
181
233
|
msgid "'%{name}' is not a valid parameter name"
|
182
234
|
msgstr ""
|
183
235
|
|
184
|
-
#: ../lib/pdk/cli/util/option_normalizer.rb:
|
236
|
+
#: ../lib/pdk/cli/util/option_normalizer.rb:62
|
185
237
|
msgid "'%{type}' is not a valid data type"
|
186
238
|
msgstr ""
|
187
239
|
|
@@ -193,115 +245,140 @@ msgstr ""
|
|
193
245
|
msgid "Non-standard data type '%{type}', make sure the type is available in your code, or dependencies"
|
194
246
|
msgstr ""
|
195
247
|
|
196
|
-
#: ../lib/pdk/cli/validate.rb:
|
197
|
-
msgid "validate [options]"
|
248
|
+
#: ../lib/pdk/cli/validate.rb:7
|
249
|
+
msgid "validate [validators] [options] [targets]"
|
198
250
|
msgstr ""
|
199
251
|
|
200
|
-
#: ../lib/pdk/cli/validate.rb:
|
252
|
+
#: ../lib/pdk/cli/validate.rb:8
|
201
253
|
msgid "Run static analysis tests."
|
202
254
|
msgstr ""
|
203
255
|
|
204
|
-
#: ../lib/pdk/cli/validate.rb:
|
205
|
-
msgid "
|
256
|
+
#: ../lib/pdk/cli/validate.rb:9
|
257
|
+
msgid ""
|
258
|
+
"Run metadata, puppet, or ruby validation.\n"
|
259
|
+
"\n"
|
260
|
+
"[validators] is an optional comma separated list of validators to use. If not specified, all validators will be used.\n"
|
261
|
+
"\n"
|
262
|
+
"[targets] is an optional space separated list of files or directories to be validated. If not specified, the validators will be run against all applicable files in the module."
|
206
263
|
msgstr ""
|
207
264
|
|
208
|
-
#: ../lib/pdk/cli/validate.rb:
|
265
|
+
#: ../lib/pdk/cli/validate.rb:17
|
209
266
|
msgid "list all available validators"
|
210
267
|
msgstr ""
|
211
268
|
|
212
269
|
#: ../lib/pdk/cli/validate.rb:18
|
213
|
-
msgid "
|
270
|
+
msgid "automatically correct problems (where possible)"
|
271
|
+
msgstr ""
|
272
|
+
|
273
|
+
#: ../lib/pdk/cli/validate.rb:19
|
274
|
+
msgid "run validations in parallel"
|
214
275
|
msgstr ""
|
215
276
|
|
216
277
|
#: ../lib/pdk/cli/validate.rb:32
|
278
|
+
msgid "Available validators: %{validator_names}"
|
279
|
+
msgstr ""
|
280
|
+
|
281
|
+
#: ../lib/pdk/cli/validate.rb:48
|
217
282
|
msgid "Unknown validator '%{v}'. Available validators: %{validators}"
|
218
283
|
msgstr ""
|
219
284
|
|
220
|
-
#: ../lib/pdk/cli/validate.rb:
|
285
|
+
#: ../lib/pdk/cli/validate.rb:58 ../lib/pdk/cli/validate.rb:62
|
221
286
|
msgid "Running all available validators..."
|
222
287
|
msgstr ""
|
223
288
|
|
224
|
-
#: ../lib/pdk/generators/module.rb:
|
289
|
+
#: ../lib/pdk/generators/module.rb:24
|
225
290
|
msgid "The destination directory '%{dir}' already exists"
|
226
291
|
msgstr ""
|
227
292
|
|
228
|
-
#: ../lib/pdk/generators/module.rb:
|
229
|
-
msgid "
|
293
|
+
#: ../lib/pdk/generators/module.rb:34
|
294
|
+
msgid "You do not have permission to write to '%{parent_dir}'"
|
295
|
+
msgstr ""
|
296
|
+
|
297
|
+
#: ../lib/pdk/generators/module.rb:68
|
298
|
+
msgid "Failed to move '%{source}' to '%{target}': %{message}"
|
299
|
+
msgstr ""
|
300
|
+
|
301
|
+
#: ../lib/pdk/generators/module.rb:82
|
302
|
+
msgid "Your username is not a valid Forge username, proceeding with the username %{username}. You can fix this afterwards in metadata.json."
|
303
|
+
msgstr ""
|
304
|
+
|
305
|
+
#: ../lib/pdk/generators/module.rb:121
|
306
|
+
msgid "Unable to create directory '%{dir}': %{message}"
|
230
307
|
msgstr ""
|
231
308
|
|
232
|
-
#: ../lib/pdk/generators/module.rb:
|
309
|
+
#: ../lib/pdk/generators/module.rb:133
|
233
310
|
msgid "What is your Puppet Forge username?"
|
234
311
|
msgstr ""
|
235
312
|
|
236
|
-
#: ../lib/pdk/generators/module.rb:
|
313
|
+
#: ../lib/pdk/generators/module.rb:134
|
237
314
|
msgid "This will be used when uploading your module to the Forge. You can opt out of this at any time."
|
238
315
|
msgstr ""
|
239
316
|
|
240
|
-
#: ../lib/pdk/generators/module.rb:
|
241
|
-
msgid "Forge usernames can only contain letters and numbers"
|
317
|
+
#: ../lib/pdk/generators/module.rb:137
|
318
|
+
msgid "Forge usernames can only contain lowercase letters and numbers"
|
242
319
|
msgstr ""
|
243
320
|
|
244
|
-
#: ../lib/pdk/generators/module.rb:
|
321
|
+
#: ../lib/pdk/generators/module.rb:142
|
245
322
|
msgid "What version is this module?"
|
246
323
|
msgstr ""
|
247
324
|
|
248
|
-
#: ../lib/pdk/generators/module.rb:
|
325
|
+
#: ../lib/pdk/generators/module.rb:143
|
249
326
|
msgid "Puppet uses Semantic Versioning (semver.org) to version modules."
|
250
327
|
msgstr ""
|
251
328
|
|
252
|
-
#: ../lib/pdk/generators/module.rb:
|
329
|
+
#: ../lib/pdk/generators/module.rb:146
|
253
330
|
msgid "Semantic Version numbers must be in the form MAJOR.MINOR.PATCH"
|
254
331
|
msgstr ""
|
255
332
|
|
256
|
-
#: ../lib/pdk/generators/module.rb:
|
333
|
+
#: ../lib/pdk/generators/module.rb:151
|
257
334
|
msgid "Who wrote this module?"
|
258
335
|
msgstr ""
|
259
336
|
|
260
|
-
#: ../lib/pdk/generators/module.rb:
|
337
|
+
#: ../lib/pdk/generators/module.rb:152
|
261
338
|
msgid "The person who gets credit for creating the module. "
|
262
339
|
msgstr ""
|
263
340
|
|
264
|
-
#: ../lib/pdk/generators/module.rb:
|
341
|
+
#: ../lib/pdk/generators/module.rb:158
|
265
342
|
msgid "What license does this module code fall under?"
|
266
343
|
msgstr ""
|
267
344
|
|
268
|
-
#: ../lib/pdk/generators/module.rb:
|
345
|
+
#: ../lib/pdk/generators/module.rb:159
|
269
346
|
msgid "This should be an identifier from https://spdk.org/licenses/. Common values are \"Apache-2.0\", \"MIT\", or \"proprietary\"."
|
270
347
|
msgstr ""
|
271
348
|
|
272
|
-
#: ../lib/pdk/generators/module.rb:
|
349
|
+
#: ../lib/pdk/generators/module.rb:165
|
273
350
|
msgid "How would you describe this module in a single sentence?"
|
274
351
|
msgstr ""
|
275
352
|
|
276
|
-
#: ../lib/pdk/generators/module.rb:
|
353
|
+
#: ../lib/pdk/generators/module.rb:166
|
277
354
|
msgid "To help other Puppet users understand what the module does."
|
278
355
|
msgstr ""
|
279
356
|
|
280
|
-
#: ../lib/pdk/generators/module.rb:
|
357
|
+
#: ../lib/pdk/generators/module.rb:172
|
281
358
|
msgid "Where is this modules's source code repository?"
|
282
359
|
msgstr ""
|
283
360
|
|
284
|
-
#: ../lib/pdk/generators/module.rb:
|
361
|
+
#: ../lib/pdk/generators/module.rb:173
|
285
362
|
msgid "Usually a GitHub URL"
|
286
363
|
msgstr ""
|
287
364
|
|
288
|
-
#: ../lib/pdk/generators/module.rb:
|
365
|
+
#: ../lib/pdk/generators/module.rb:179
|
289
366
|
msgid "Where can others go to learn more about this module?"
|
290
367
|
msgstr ""
|
291
368
|
|
292
|
-
#: ../lib/pdk/generators/module.rb:
|
369
|
+
#: ../lib/pdk/generators/module.rb:180
|
293
370
|
msgid "A web site that offers full information about your module."
|
294
371
|
msgstr ""
|
295
372
|
|
296
|
-
#: ../lib/pdk/generators/module.rb:
|
373
|
+
#: ../lib/pdk/generators/module.rb:185
|
297
374
|
msgid "Where can others go to file issues about this module?"
|
298
375
|
msgstr ""
|
299
376
|
|
300
|
-
#: ../lib/pdk/generators/module.rb:
|
377
|
+
#: ../lib/pdk/generators/module.rb:186
|
301
378
|
msgid "A web site with a public bug tracker for your module."
|
302
379
|
msgstr ""
|
303
380
|
|
304
|
-
#: ../lib/pdk/generators/module.rb:
|
381
|
+
#: ../lib/pdk/generators/module.rb:199
|
305
382
|
msgid ""
|
306
383
|
"\n"
|
307
384
|
"We need to create a metadata.json file for this module, so we're going to ask you %{count} quick questions.\n"
|
@@ -309,43 +386,51 @@ msgid ""
|
|
309
386
|
"\n"
|
310
387
|
msgstr ""
|
311
388
|
|
312
|
-
#: ../lib/pdk/generators/module.rb:
|
313
|
-
msgid "Interview cancelled,
|
389
|
+
#: ../lib/pdk/generators/module.rb:207
|
390
|
+
msgid "Interview cancelled, not generating the module."
|
314
391
|
msgstr ""
|
315
392
|
|
316
|
-
#: ../lib/pdk/generators/module.rb:
|
393
|
+
#: ../lib/pdk/generators/module.rb:217
|
317
394
|
msgid "SUMMARY"
|
318
395
|
msgstr ""
|
319
396
|
|
320
|
-
#: ../lib/pdk/generators/module.rb:
|
397
|
+
#: ../lib/pdk/generators/module.rb:223
|
321
398
|
msgid "About to generate this module; continue?"
|
322
399
|
msgstr ""
|
323
400
|
|
324
|
-
#: ../lib/pdk/generators/module.rb:
|
325
|
-
msgid "
|
401
|
+
#: ../lib/pdk/generators/module.rb:224
|
402
|
+
msgid "Module not generated."
|
326
403
|
msgstr ""
|
327
404
|
|
328
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
405
|
+
#: ../lib/pdk/generators/puppet_object.rb:88
|
329
406
|
msgid "Unable to generate class, '%{file}' already exists."
|
330
407
|
msgstr ""
|
331
408
|
|
332
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
409
|
+
#: ../lib/pdk/generators/puppet_object.rb:118
|
333
410
|
msgid "Creating '%{file}' from template."
|
334
411
|
msgstr ""
|
335
412
|
|
336
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
413
|
+
#: ../lib/pdk/generators/puppet_object.rb:124
|
414
|
+
msgid "Unable to create directory '%{path}': %{message}"
|
415
|
+
msgstr ""
|
416
|
+
|
417
|
+
#: ../lib/pdk/generators/puppet_object.rb:132
|
418
|
+
msgid "Unable to write to file '%{path}': %{message}"
|
419
|
+
msgstr ""
|
420
|
+
|
421
|
+
#: ../lib/pdk/generators/puppet_object.rb:155
|
337
422
|
msgid "No %{dir_type} template specified; trying next template directory."
|
338
423
|
msgstr ""
|
339
424
|
|
340
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
425
|
+
#: ../lib/pdk/generators/puppet_object.rb:168
|
341
426
|
msgid "Unable to find a %{type} template in %{url}, trying next template directory"
|
342
427
|
msgstr ""
|
343
428
|
|
344
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
429
|
+
#: ../lib/pdk/generators/puppet_object.rb:170
|
345
430
|
msgid "Unable to find the %{type} template in %{url}."
|
346
431
|
msgstr ""
|
347
432
|
|
348
|
-
#: ../lib/pdk/generators/puppet_object.rb:
|
433
|
+
#: ../lib/pdk/generators/puppet_object.rb:227
|
349
434
|
msgid "'%{dir}' does not contain valid Puppet module metadata: %{msg}"
|
350
435
|
msgstr ""
|
351
436
|
|
@@ -353,10 +438,6 @@ msgstr ""
|
|
353
438
|
msgid "'%{file}' does not exist or is not a file"
|
354
439
|
msgstr ""
|
355
440
|
|
356
|
-
#: ../lib/pdk/module/metadata.rb:50
|
357
|
-
msgid "Unable to open '%{file}' for reading"
|
358
|
-
msgstr ""
|
359
|
-
|
360
441
|
#: ../lib/pdk/module/metadata.rb:56
|
361
442
|
msgid "Invalid JSON in metadata.json: %{msg}"
|
362
443
|
msgstr ""
|
@@ -387,58 +468,90 @@ msgstr ""
|
|
387
468
|
msgid "'%{file}' is not a valid YAML file: %{message}"
|
388
469
|
msgstr ""
|
389
470
|
|
390
|
-
#: ../lib/pdk/report/event.rb:
|
471
|
+
#: ../lib/pdk/report/event.rb:162
|
391
472
|
msgid "file not specified"
|
392
473
|
msgstr ""
|
393
474
|
|
394
|
-
#: ../lib/pdk/report/event.rb:
|
475
|
+
#: ../lib/pdk/report/event.rb:166
|
395
476
|
msgid "file must be a String"
|
396
477
|
msgstr ""
|
397
478
|
|
398
|
-
#: ../lib/pdk/report/event.rb:
|
479
|
+
#: ../lib/pdk/report/event.rb:197
|
399
480
|
msgid "state not specified"
|
400
481
|
msgstr ""
|
401
482
|
|
402
|
-
#: ../lib/pdk/report/event.rb:
|
483
|
+
#: ../lib/pdk/report/event.rb:202
|
403
484
|
msgid "state must be a Symbol, not %{type}"
|
404
485
|
msgstr ""
|
405
486
|
|
406
|
-
#: ../lib/pdk/report/event.rb:
|
487
|
+
#: ../lib/pdk/report/event.rb:207
|
407
488
|
msgid "Invalid state %{state}, valid states are: %{valid}"
|
408
489
|
msgstr ""
|
409
490
|
|
410
|
-
#: ../lib/pdk/report/event.rb:
|
491
|
+
#: ../lib/pdk/report/event.rb:226
|
411
492
|
msgid "source not specified"
|
412
493
|
msgstr ""
|
413
494
|
|
414
|
-
#: ../lib/pdk/report/event.rb:
|
495
|
+
#: ../lib/pdk/report/event.rb:247
|
415
496
|
msgid "line must be an Integer or a String representation of an Integer"
|
416
497
|
msgstr ""
|
417
498
|
|
418
|
-
#: ../lib/pdk/report/event.rb:
|
499
|
+
#: ../lib/pdk/report/event.rb:251
|
419
500
|
msgid "the line number can only contain the digits 0-9"
|
420
501
|
msgstr ""
|
421
502
|
|
422
|
-
#: ../lib/pdk/report/event.rb:
|
503
|
+
#: ../lib/pdk/report/event.rb:272
|
423
504
|
msgid "column must be an Integer or a String representation of an Integer"
|
424
505
|
msgstr ""
|
425
506
|
|
426
|
-
#: ../lib/pdk/report/event.rb:
|
507
|
+
#: ../lib/pdk/report/event.rb:276
|
427
508
|
msgid "the column number can only contain the digits 0-9"
|
428
509
|
msgstr ""
|
429
510
|
|
511
|
+
#: ../lib/pdk/report/event.rb:294
|
512
|
+
msgid "trace must be an Array of stack trace lines"
|
513
|
+
msgstr ""
|
514
|
+
|
430
515
|
#: ../lib/pdk/template_file.rb:62
|
431
516
|
msgid "'%{template}' is not a readable file"
|
432
517
|
msgstr ""
|
433
518
|
|
434
|
-
#: ../lib/pdk/tests/unit.rb:
|
435
|
-
msgid "Running unit tests
|
519
|
+
#: ../lib/pdk/tests/unit.rb:32
|
520
|
+
msgid "Running unit tests in parallel"
|
436
521
|
msgstr ""
|
437
522
|
|
438
|
-
#: ../lib/pdk/
|
523
|
+
#: ../lib/pdk/tests/unit.rb:32
|
524
|
+
msgid "Running unit tests"
|
525
|
+
msgstr ""
|
526
|
+
|
527
|
+
#: ../lib/pdk/tests/unit.rb:37
|
528
|
+
msgid "Running %{cmd}"
|
529
|
+
msgstr ""
|
530
|
+
|
531
|
+
#: ../lib/pdk/tests/unit.rb:52
|
532
|
+
msgid "Unit test output did not contain a valid JSON result: %{output}"
|
533
|
+
msgstr ""
|
534
|
+
|
535
|
+
#: ../lib/pdk/tests/unit.rb:102
|
536
|
+
msgid "Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending"
|
537
|
+
msgstr ""
|
538
|
+
|
539
|
+
#: ../lib/pdk/tests/unit.rb:159
|
540
|
+
msgid "Failed to find valid JSON in output from rspec: %{output}"
|
541
|
+
msgstr ""
|
542
|
+
|
543
|
+
#: ../lib/pdk/tests/unit.rb:164
|
544
|
+
msgid "Unable to enumerate examples. rspec reported: %{message}"
|
545
|
+
msgstr ""
|
546
|
+
|
547
|
+
#: ../lib/pdk/util.rb:47
|
439
548
|
msgid "Cannot resolve a full path to '%{path}' as it does not currently exist"
|
440
549
|
msgstr ""
|
441
550
|
|
551
|
+
#: ../lib/pdk/util.rb:67
|
552
|
+
msgid "Package basedir requested for non-package install"
|
553
|
+
msgstr ""
|
554
|
+
|
442
555
|
#: ../lib/pdk/util/bundler.rb:15
|
443
556
|
msgid "Bundle has already been installed, skipping run"
|
444
557
|
msgstr ""
|
@@ -447,53 +560,63 @@ msgstr ""
|
|
447
560
|
msgid "No Gemfile found in '%{cwd}', skipping bundler management"
|
448
561
|
msgstr ""
|
449
562
|
|
450
|
-
#: ../lib/pdk/util/bundler.rb:
|
563
|
+
#: ../lib/pdk/util/bundler.rb:31
|
564
|
+
msgid "No Gemfile.lock found in module, using vendored Gemfile.lock from '%{source}'"
|
565
|
+
msgstr ""
|
566
|
+
|
567
|
+
#: ../lib/pdk/util/bundler.rb:37
|
451
568
|
msgid "Unable to resolve Gemfile dependencies."
|
452
569
|
msgstr ""
|
453
570
|
|
454
|
-
#: ../lib/pdk/util/bundler.rb:
|
571
|
+
#: ../lib/pdk/util/bundler.rb:44
|
455
572
|
msgid "Unable to install missing Gemfile dependencies."
|
456
573
|
msgstr ""
|
457
574
|
|
458
|
-
#: ../lib/pdk/util/bundler.rb:
|
575
|
+
#: ../lib/pdk/util/bundler.rb:63
|
459
576
|
msgid "Unable to install requested binstubs."
|
460
577
|
msgstr ""
|
461
578
|
|
462
|
-
#: ../lib/pdk/util/bundler.rb:
|
463
|
-
msgid "Checking for missing Gemfile dependencies"
|
579
|
+
#: ../lib/pdk/util/bundler.rb:77
|
580
|
+
msgid "Checking for missing Gemfile dependencies."
|
464
581
|
msgstr ""
|
465
582
|
|
466
|
-
#: ../lib/pdk/util/bundler.rb:
|
583
|
+
#: ../lib/pdk/util/bundler.rb:94
|
467
584
|
msgid "Resolving Gemfile dependencies"
|
468
585
|
msgstr ""
|
469
586
|
|
470
|
-
#: ../lib/pdk/util/bundler.rb:
|
587
|
+
#: ../lib/pdk/util/bundler.rb:112
|
471
588
|
msgid "Installing missing Gemfile dependencies"
|
472
589
|
msgstr ""
|
473
590
|
|
474
|
-
#: ../lib/pdk/util/bundler.rb:
|
475
|
-
msgid ""
|
476
|
-
"done.\n"
|
591
|
+
#: ../lib/pdk/util/bundler.rb:134
|
592
|
+
msgid "Failed to generate binstubs for %{gems}"
|
477
593
|
msgstr ""
|
478
594
|
|
479
|
-
#: ../lib/pdk/
|
480
|
-
msgid ""
|
481
|
-
"FAILURE!\n"
|
595
|
+
#: ../lib/pdk/validators/base_validator.rb:46
|
596
|
+
msgid "Invoking %{cmd}"
|
482
597
|
msgstr ""
|
483
598
|
|
484
|
-
#: ../lib/pdk/validators/
|
485
|
-
msgid "
|
599
|
+
#: ../lib/pdk/validators/metadata/metadata_json_lint.rb:23
|
600
|
+
msgid "Checking metadata style (%{targets})"
|
486
601
|
msgstr ""
|
487
602
|
|
488
|
-
#: ../lib/pdk/validators/
|
489
|
-
msgid "
|
603
|
+
#: ../lib/pdk/validators/metadata/metadata_syntax.rb:18
|
604
|
+
msgid "Checking metadata syntax (%{targets})"
|
605
|
+
msgstr ""
|
606
|
+
|
607
|
+
#: ../lib/pdk/validators/metadata/metadata_syntax.rb:65
|
608
|
+
msgid "not a file"
|
609
|
+
msgstr ""
|
610
|
+
|
611
|
+
#: ../lib/pdk/validators/metadata/metadata_syntax.rb:77
|
612
|
+
msgid "could not be read"
|
490
613
|
msgstr ""
|
491
614
|
|
492
615
|
#: ../lib/pdk/validators/puppet/puppet_lint.rb:22
|
493
616
|
msgid "Checking Puppet manifest style"
|
494
617
|
msgstr ""
|
495
618
|
|
496
|
-
#: ../lib/pdk/validators/puppet/
|
619
|
+
#: ../lib/pdk/validators/puppet/puppet_syntax.rb:21
|
497
620
|
msgid "Checking Puppet manifest syntax"
|
498
621
|
msgstr ""
|
499
622
|
|