pdk 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +11 -0
  4. data/lib/pdk/answer_file.rb +1 -1
  5. data/lib/pdk/cli.rb +16 -6
  6. data/lib/pdk/cli/bundle.rb +5 -3
  7. data/lib/pdk/cli/errors.rb +10 -1
  8. data/lib/pdk/cli/exec.rb +9 -4
  9. data/lib/pdk/cli/module.rb +14 -0
  10. data/lib/pdk/cli/module/generate.rb +40 -0
  11. data/lib/pdk/cli/new.rb +2 -1
  12. data/lib/pdk/cli/new/class.rb +1 -1
  13. data/lib/pdk/cli/new/defined_type.rb +27 -0
  14. data/lib/pdk/cli/new/module.rb +1 -11
  15. data/lib/pdk/cli/util.rb +3 -3
  16. data/lib/pdk/cli/util/command_redirector.rb +26 -0
  17. data/lib/pdk/cli/util/interview.rb +17 -6
  18. data/lib/pdk/cli/util/option_normalizer.rb +3 -3
  19. data/lib/pdk/cli/validate.rb +9 -9
  20. data/lib/pdk/generate.rb +1 -0
  21. data/lib/pdk/generators/defined_type.rb +49 -0
  22. data/lib/pdk/generators/module.rb +113 -23
  23. data/lib/pdk/generators/puppet_class.rb +2 -2
  24. data/lib/pdk/generators/puppet_object.rb +3 -3
  25. data/lib/pdk/module/metadata.rb +7 -7
  26. data/lib/pdk/module/templatedir.rb +3 -3
  27. data/lib/pdk/report/event.rb +43 -12
  28. data/lib/pdk/tests/unit.rb +51 -17
  29. data/lib/pdk/util.rb +3 -3
  30. data/lib/pdk/util/bundler.rb +5 -5
  31. data/lib/pdk/util/version.rb +5 -2
  32. data/lib/pdk/util/windows.rb +6 -0
  33. data/lib/pdk/validators/base_validator.rb +1 -1
  34. data/lib/pdk/validators/metadata/metadata_json_lint.rb +2 -2
  35. data/lib/pdk/validators/metadata/metadata_syntax.rb +2 -2
  36. data/lib/pdk/validators/puppet/puppet_lint.rb +1 -1
  37. data/lib/pdk/validators/puppet/puppet_syntax.rb +1 -1
  38. data/lib/pdk/validators/ruby/rubocop.rb +1 -1
  39. data/lib/pdk/version.rb +1 -1
  40. data/lib/puppet/util/windows/api_types.rb +9 -5
  41. data/locales/pdk.pot +314 -180
  42. metadata +16 -10
@@ -96,7 +96,20 @@ module PDK
96
96
  location = nil if location.empty?
97
97
 
98
98
  # TODO: maybe add trace
99
- [severity, source, location, message].compact.join(': ')
99
+ header = [severity, source, location, message].compact.join(': ')
100
+ if source == 'rspec'
101
+ result = [header, " #{test}"]
102
+ context = context_lines
103
+ unless context.nil?
104
+ result << ' Failure/Error:'
105
+ result.concat(context)
106
+ result << "\n"
107
+ end
108
+
109
+ result.compact.join("\n")
110
+ else
111
+ header
112
+ end
100
113
  end
101
114
 
102
115
  # Renders the event as a JUnit XML testcase.
@@ -159,11 +172,11 @@ module PDK
159
172
  # a String.
160
173
  def sanitise_file(value)
161
174
  if value.nil? || (value.is_a?(String) && value.empty?)
162
- raise ArgumentError, _('file not specified')
175
+ raise ArgumentError, _('File not specified.')
163
176
  end
164
177
 
165
178
  unless value.is_a?(String)
166
- raise ArgumentError, _('file must be a String')
179
+ raise ArgumentError, _('File must be a String.')
167
180
  end
168
181
 
169
182
  path = Pathname.new(value)
@@ -196,17 +209,17 @@ module PDK
196
209
  # a String or Symbol representation of a valid state.
197
210
  def sanitise_state(value)
198
211
  if value.nil? || (value.is_a?(String) && value.empty?)
199
- raise ArgumentError, _('state not specified')
212
+ raise ArgumentError, _('State not specified.')
200
213
  end
201
214
 
202
215
  value = value.to_sym if value.is_a?(String)
203
216
  unless value.is_a?(Symbol)
204
- raise ArgumentError, _('state must be a Symbol, not %{type}') % { type: value.class }
217
+ raise ArgumentError, _('State must be a Symbol, not %{type}') % { type: value.class }
205
218
  end
206
219
 
207
220
  valid_states = [:passed, :error, :failure, :skipped]
208
221
  unless valid_states.include?(value)
209
- raise ArgumentError, _('Invalid state %{state}, valid states are: %{valid}') % {
222
+ raise ArgumentError, _('Invalid state %{state}. Valid states are: %{valid}.') % {
210
223
  state: value.inspect,
211
224
  valid: valid_states.map(&:inspect).join(', '),
212
225
  }
@@ -225,7 +238,7 @@ module PDK
225
238
  # @raise [ArgumentError] if the value is nil or an empty String.
226
239
  def sanitise_source(value)
227
240
  if value.nil? || (value.is_a?(String) && value.empty?)
228
- raise ArgumentError, _('source not specified')
241
+ raise ArgumentError, _('Source not specified.')
229
242
  end
230
243
 
231
244
  value.to_s
@@ -246,11 +259,11 @@ module PDK
246
259
  end
247
260
 
248
261
  unless valid_types.include?(value.class)
249
- raise ArgumentError, _('line must be an Integer or a String representation of an Integer')
262
+ raise ArgumentError, _('Line must be an Integer or a String representation of an Integer.')
250
263
  end
251
264
 
252
265
  if value.is_a?(String) && value !~ %r{\A[0-9]+\Z}
253
- raise ArgumentError, _('the line number can only contain the digits 0-9')
266
+ raise ArgumentError, _('The line number can contain only the digits 0-9.')
254
267
  end
255
268
 
256
269
  value.to_i
@@ -271,11 +284,11 @@ module PDK
271
284
  end
272
285
 
273
286
  unless valid_types.include?(value.class)
274
- raise ArgumentError, _('column must be an Integer or a String representation of an Integer')
287
+ raise ArgumentError, _('Column must be an Integer or a String representation of an Integer.')
275
288
  end
276
289
 
277
290
  if value.is_a?(String) && value !~ %r{\A[0-9]+\Z}
278
- raise ArgumentError, _('the column number can only contain the digits 0-9')
291
+ raise ArgumentError, _('The column number can contain only the digits 0-9.')
279
292
  end
280
293
 
281
294
  value.to_i
@@ -293,7 +306,7 @@ module PDK
293
306
  valid_types = [Array]
294
307
 
295
308
  unless valid_types.include?(value.class)
296
- raise ArgumentError, _('trace must be an Array of stack trace lines')
309
+ raise ArgumentError, _('Trace must be an Array of stack trace lines.')
297
310
  end
298
311
 
299
312
  # Drop any stacktrace lines that include '/gems/' in the path or
@@ -302,6 +315,24 @@ module PDK
302
315
  (line =~ %r{/gems/}) || (line =~ %r{bin/rspec:})
303
316
  end
304
317
  end
318
+
319
+ # Extract contextual information for the event from the file that it
320
+ # references.
321
+ #
322
+ # @param max_num_lines [Integer] The maximum number of lines to return.
323
+ #
324
+ # @return [Array] Array of lines from the file, centred on the line
325
+ # number of the event.
326
+ def context_lines(max_num_lines = 5)
327
+ return if file.nil? || line.nil?
328
+
329
+ file_content = File.read(file).split("\n")
330
+ delta = (max_num_lines - 1) / 2
331
+ min = [0, (line - 1) - delta].max
332
+ max = [(line - 1) + delta, file_content.length].min
333
+
334
+ file_content[min..max].map { |r| " #{r}" }
335
+ end
305
336
  end
306
337
  end
307
338
  end
@@ -8,8 +8,24 @@ module PDK
8
8
  class Unit
9
9
  def self.cmd(_tests, opts = {})
10
10
  # TODO: test selection
11
- rake_task = opts.key?(:parallel) ? 'parallel_spec' : 'spec'
12
- [File.join(PDK::Util.module_root, 'bin', 'rake'), rake_task]
11
+ opts.key?(:parallel) ? 'parallel_spec' : 'spec'
12
+ end
13
+
14
+ def self.rake_bin
15
+ @rake ||= File.join(PDK::Util.module_root, 'bin', 'rake')
16
+ end
17
+
18
+ def self.rake(task, spinner_text, environment = {})
19
+ argv = [rake_bin, task]
20
+ argv.unshift('ruby') if Gem.win_platform?
21
+
22
+ command = PDK::CLI::Exec::Command.new(*argv).tap do |c|
23
+ c.context = :module
24
+ c.add_spinner(spinner_text)
25
+ c.environment = environment
26
+ end
27
+
28
+ command.execute!
13
29
  end
14
30
 
15
31
  def self.parallel_with_no_tests?(ran_in_parallel, json_result, result)
@@ -18,25 +34,41 @@ module PDK
18
34
  result[:stderr].strip =~ %r{Pass files or folders to run$}
19
35
  end
20
36
 
21
- def self.invoke(report, options = {})
22
- PDK::Util::Bundler.ensure_bundle!
23
- PDK::Util::Bundler.ensure_binstubs!('rake')
37
+ def self.print_failure(result, exception)
38
+ $stderr.puts ''
39
+ result[:stdout].each_line { |line| $stderr.puts line.rstrip } unless result[:stdout].nil?
40
+ result[:stderr].each_line { |line| $stderr.puts line.rstrip } unless result[:stderr].nil?
41
+ $stderr.puts ''
42
+ raise PDK::CLI::FatalError, exception
43
+ end
24
44
 
25
- tests = options.fetch(:tests)
45
+ def self.tear_down
46
+ result = rake('spec_clean', _('Cleaning up after running unit tests.'))
26
47
 
27
- cmd_argv = cmd(tests, options)
28
- cmd_argv.unshift('ruby') if Gem.win_platform?
48
+ return if result[:exit_code].zero?
29
49
 
30
- command = PDK::CLI::Exec::Command.new(*cmd_argv).tap do |c|
31
- c.context = :module
32
- spinner_msg = options.key?(:parallel) ? _('Running unit tests in parallel') : _('Running unit tests')
33
- c.add_spinner(spinner_msg)
34
- c.environment['CI_SPEC_OPTIONS'] = '--format j'
35
- end
50
+ PDK.logger.error(_('The spec_clean rake task failed with the following error(s):'))
51
+ print_failure(result, _('Failed to clean up after running unit tests'))
52
+ end
53
+
54
+ def self.setup
55
+ result = rake('spec_prep', _('Preparing to run the unit tests.'))
56
+
57
+ return if result[:exit_code].zero?
58
+
59
+ PDK.logger.error(_('The spec_prep rake task failed with the following error(s):'))
60
+ print_failure(result, _('Failed to prepare to run the unit tests.'))
61
+ end
62
+
63
+ def self.invoke(report, options = {})
64
+ PDK::Util::Bundler.ensure_bundle!
65
+ PDK::Util::Bundler.ensure_binstubs!('rake')
36
66
 
37
- PDK.logger.debug(_('Running %{cmd}') % { cmd: command.argv.join(' ') })
67
+ setup
38
68
 
39
- result = command.execute!
69
+ tests = options.fetch(:tests)
70
+ spinner_msg = options.key?(:parallel) ? _('Running unit tests in parallel.') : _('Running unit tests.')
71
+ result = rake(cmd(tests, options), spinner_msg, 'CI_SPEC_OPTIONS' => '--format j')
40
72
 
41
73
  json_result = if options.key?(:parallel)
42
74
  PDK::Util.find_all_json_in(result[:stdout])
@@ -56,6 +88,8 @@ module PDK
56
88
  parse_output(report, json_result)
57
89
 
58
90
  result[:exit_code]
91
+ ensure
92
+ tear_down
59
93
  end
60
94
 
61
95
  def self.parse_output(report, json_data)
@@ -99,7 +133,7 @@ module PDK
99
133
  return unless json_data['summary']
100
134
 
101
135
  # TODO: standardize summary output
102
- $stderr.puts ' ' << _('Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending') % {
136
+ $stderr.puts ' ' << _('Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending.') % {
103
137
  total: json_data['summary']['example_count'],
104
138
  duration: json_data['summary']['duration'],
105
139
  failures: json_data['summary']['failure_count'],
@@ -1,8 +1,8 @@
1
1
  require 'tmpdir'
2
2
  require 'tempfile'
3
- require 'puppet/util/windows'
4
3
 
5
4
  require 'pdk/util/version'
5
+ require 'pdk/util/windows'
6
6
 
7
7
  module PDK
8
8
  module Util
@@ -44,7 +44,7 @@ module PDK
44
44
  def canonical_path(path)
45
45
  if Gem.win_platform?
46
46
  unless File.exist?(path)
47
- raise PDK::CLI::FatalError, _("Cannot resolve a full path to '%{path}' as it does not currently exist") % { path: path }
47
+ raise PDK::CLI::FatalError, _("Cannot resolve a full path to '%{path}', as it does not currently exist.") % { path: path }
48
48
  end
49
49
  Puppet::Util::Windows::File.get_long_pathname(path)
50
50
  else
@@ -64,7 +64,7 @@ module PDK
64
64
  module_function :gem_install?
65
65
 
66
66
  def pdk_package_basedir
67
- raise PDK::CLI::FatalError, _('Package basedir requested for non-package install') unless package_install?
67
+ raise PDK::CLI::FatalError, _('Package basedir requested for non-package install.') unless package_install?
68
68
 
69
69
  File.dirname(PDK::Util::Version.version_file)
70
70
  end
@@ -12,12 +12,12 @@ module PDK
12
12
  bundle = BundleHelper.new
13
13
 
14
14
  if already_bundled?(bundle.gemfile)
15
- PDK.logger.debug(_('Bundle has already been installed, skipping run'))
15
+ PDK.logger.debug(_('Bundle has already been installed. Skipping run.'))
16
16
  return
17
17
  end
18
18
 
19
19
  unless bundle.gemfile?
20
- PDK.logger.debug(_("No Gemfile found in '%{cwd}', skipping bundler management") % { cwd: Dir.pwd })
20
+ PDK.logger.debug(_("No Gemfile found in '%{cwd}'. Skipping bundler management.") % { cwd: Dir.pwd })
21
21
  return
22
22
  end
23
23
 
@@ -28,7 +28,7 @@ module PDK
28
28
  vendored_gemfile_lock = File.join(PDK::Util.package_cachedir, 'Gemfile.lock')
29
29
 
30
30
  if File.exist?(vendored_gemfile_lock)
31
- PDK.logger.debug(_("No Gemfile.lock found in module, using vendored Gemfile.lock from '%{source}'") % { source: vendored_gemfile_lock })
31
+ PDK.logger.debug(_("No Gemfile.lock found in module. Using vendored Gemfile.lock from '%{source}'.") % { source: vendored_gemfile_lock })
32
32
  FileUtils.cp(vendored_gemfile_lock, File.join(PDK::Util.module_root, 'Gemfile.lock'))
33
33
  end
34
34
  else
@@ -90,7 +90,7 @@ module PDK
90
90
 
91
91
  def lock!
92
92
  command = bundle_command('lock').tap do |c|
93
- c.add_spinner(_('Resolving Gemfile dependencies'))
93
+ c.add_spinner(_('Resolving Gemfile dependencies.'))
94
94
  end
95
95
 
96
96
  result = command.execute!
@@ -107,7 +107,7 @@ module PDK
107
107
  argv << "--path=#{bundle_cachedir}" if PDK::Util.gem_install?
108
108
 
109
109
  command = bundle_command(*argv).tap do |c|
110
- c.add_spinner(_('Installing missing Gemfile dependencies'))
110
+ c.add_spinner(_('Installing missing Gemfile dependencies.'))
111
111
  end
112
112
 
113
113
  result = command.execute!
@@ -23,9 +23,12 @@ module PDK
23
23
  end
24
24
 
25
25
  def self.git_ref
26
- ref_result = PDK::CLI::Exec.git('--git-dir', File.join(File.expand_path('../../..', File.dirname(__FILE__)), '.git'), 'describe', '--all', '--long')
26
+ source_git_dir = File.join(File.expand_path('../../..', File.dirname(__FILE__)), '.git')
27
27
 
28
- ref_result[:stdout].strip if ref_result[:exit_code].zero?
28
+ return nil unless File.directory?(source_git_dir)
29
+
30
+ ref_result = PDK::CLI::Exec.git('--git-dir', source_git_dir, 'describe', '--all', '--long')
31
+ return ref_result[:stdout].strip if ref_result[:exit_code].zero?
29
32
  end
30
33
 
31
34
  def self.version_file
@@ -0,0 +1,6 @@
1
+ module Puppet
2
+ module Util
3
+ end
4
+ end
5
+
6
+ require 'puppet/util/windows'
@@ -91,7 +91,7 @@ module PDK
91
91
  report.add_event(
92
92
  file: invalid_target,
93
93
  source: name,
94
- message: 'File does not exist.',
94
+ message: _('File does not exist.'),
95
95
  severity: :error,
96
96
  state: :error,
97
97
  )
@@ -20,7 +20,7 @@ module PDK
20
20
  end
21
21
 
22
22
  def self.spinner_text(targets = [])
23
- _('Checking metadata style (%{targets})') % {
23
+ _('Checking metadata style (%{targets}).') % {
24
24
  targets: PDK::Util.targets_relative_to_pwd(targets).join(' '),
25
25
  }
26
26
  end
@@ -37,7 +37,7 @@ module PDK
37
37
  end
38
38
 
39
39
  def self.parse_output(report, result, targets)
40
- raise ArgumentError, 'More than 1 target provided to PDK::Validate::MetadataJSONLint' if targets.count > 1
40
+ raise ArgumentError, _('More than 1 target provided to PDK::Validate::MetadataJSONLint.') if targets.count > 1
41
41
 
42
42
  if result[:stdout].strip.empty?
43
43
  # metadata-json-lint will print nothing if there are no problems with
@@ -15,7 +15,7 @@ module PDK
15
15
  end
16
16
 
17
17
  def self.spinner_text(targets = [])
18
- _('Checking metadata syntax (%{targets})') % {
18
+ _('Checking metadata syntax (%{targets}).') % {
19
19
  targets: PDK::Util.targets_relative_to_pwd(targets).join(' '),
20
20
  }
21
21
  end
@@ -66,7 +66,7 @@ module PDK
66
66
  source: name,
67
67
  state: :failure,
68
68
  severity: 'error',
69
- message: _('could not be read'),
69
+ message: _('Could not be read.'),
70
70
  )
71
71
  return_val = 1
72
72
  next
@@ -19,7 +19,7 @@ module PDK
19
19
  end
20
20
 
21
21
  def self.spinner_text(_targets = nil)
22
- _('Checking Puppet manifest style (%{pattern})') % { pattern: pattern }
22
+ _('Checking Puppet manifest style (%{pattern}).') % { pattern: pattern }
23
23
  end
24
24
 
25
25
  def self.parse_options(options, targets)
@@ -18,7 +18,7 @@ module PDK
18
18
  end
19
19
 
20
20
  def self.spinner_text(_targets = nil)
21
- _('Checking Puppet manifest syntax (%{pattern})') % { pattern: pattern }
21
+ _('Checking Puppet manifest syntax (%{pattern}).') % { pattern: pattern }
22
22
  end
23
23
 
24
24
  def self.parse_options(_options, targets)
@@ -21,7 +21,7 @@ module PDK
21
21
  end
22
22
 
23
23
  def self.spinner_text(_targets = nil)
24
- _('Checking Ruby code style (%{pattern})') % { pattern: pattern }
24
+ _('Checking Ruby code style (%{pattern}).') % { pattern: pattern }
25
25
  end
26
26
 
27
27
  def self.parse_options(options, targets)
@@ -1,3 +1,3 @@
1
1
  module PDK
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
@@ -53,17 +53,21 @@ module Puppet::Util::Windows::APITypes
53
53
  alias_method :read_word, :read_uint16
54
54
  alias_method :read_array_of_wchar, :read_array_of_uint16
55
55
 
56
- def read_wide_string(char_length, dst_encoding = Encoding::UTF_8)
56
+ def read_wide_string(char_length, dst_encoding = Encoding::UTF_8, encode_options = {})
57
57
  # char_length is number of wide chars (typically excluding NULLs), *not* bytes
58
58
  str = get_bytes(0, char_length * 2).force_encoding('UTF-16LE')
59
- str.encode(dst_encoding)
59
+ str.encode(dst_encoding, str.encoding, encode_options)
60
+ rescue Exception => e
61
+ Puppet.debug "Unable to convert value #{str.dump} to encoding #{dst_encoding} due to #{e.inspect}"
62
+ raise
60
63
  end
61
64
 
62
65
  # @param max_char_length [Integer] Maximum number of wide chars to return (typically excluding NULLs), *not* bytes
63
66
  # @param null_terminator [Symbol] Number of number of null wchar characters, *not* bytes, that determine the end of the string
64
67
  # null_terminator = :single_null, then the terminating sequence is two bytes of zero. This is UNIT16 = 0
65
68
  # null_terminator = :double_null, then the terminating sequence is four bytes of zero. This is UNIT32 = 0
66
- def read_arbitrary_wide_string_up_to(max_char_length = 512, null_terminator = :single_null)
69
+ # @param encode_options [Hash] Accepts the same option hash that may be passed to String#encode in Ruby
70
+ def read_arbitrary_wide_string_up_to(max_char_length = 512, null_terminator = :single_null, encode_options = {})
67
71
  if null_terminator != :single_null && null_terminator != :double_null
68
72
  raise _("Unable to read wide strings with %{null_terminator} terminal nulls") % { null_terminator: null_terminator }
69
73
  end
@@ -73,11 +77,11 @@ module Puppet::Util::Windows::APITypes
73
77
 
74
78
  # Look for a null terminating characters; if found, read up to that null (exclusive)
75
79
  (0...max_char_length - terminator_width).each do |i|
76
- return read_wide_string(i) if send(reader_method, (i * 2)) == 0
80
+ return read_wide_string(i, Encoding::UTF_8, encode_options) if send(reader_method, (i * 2)) == 0
77
81
  end
78
82
 
79
83
  # String is longer than the max; read just to the max
80
- read_wide_string(max_char_length)
84
+ read_wide_string(max_char_length, Encoding::UTF_8, encode_options)
81
85
  end
82
86
 
83
87
  def read_win32_local_pointer(&block)
@@ -6,11 +6,11 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: puppet development kit v0.5.0-90-g4f429f1\n"
9
+ "Project-Id-Version: puppet development kit v1.0.1-51-g1a5f668\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppet.com\n"
12
- "POT-Creation-Date: 2017-08-07 15:19+0100\n"
13
- "PO-Revision-Date: 2017-08-07 15:19+0100\n"
12
+ "POT-Creation-Date: 2017-09-13 10:09-0700\n"
13
+ "PO-Revision-Date: 2017-09-13 10:09-0700\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -20,10 +20,10 @@ msgstr ""
20
20
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
21
21
 
22
22
  #: ../lib/pdk/answer_file.rb:56
23
- msgid "Answer file can only be updated with a Hash"
23
+ msgid "Answer file can be updated only with a Hash"
24
24
  msgstr ""
25
25
 
26
- #: ../lib/pdk/answer_file.rb:83 ../lib/pdk/module/metadata.rb:50
26
+ #: ../lib/pdk/answer_file.rb:83
27
27
  msgid "Unable to open '%{file}' for reading"
28
28
  msgstr ""
29
29
 
@@ -39,40 +39,44 @@ msgstr ""
39
39
  msgid "Unable to write '%{file}': %{msg}"
40
40
  msgstr ""
41
41
 
42
- #: ../lib/pdk/cli.rb:35
43
- msgid "Specifies the URL to the template to use when creating new modules, and other parts."
42
+ #: ../lib/pdk/cli.rb:41
43
+ msgid "Specifies the URL to the template to use when creating new modules or classes."
44
+ msgstr ""
45
+
46
+ #: ../lib/pdk/cli.rb:45
47
+ msgid "When specified, skips interactive querying of metadata."
44
48
  msgstr ""
45
49
 
46
- #: ../lib/pdk/cli.rb:40
50
+ #: ../lib/pdk/cli.rb:50
47
51
  msgid "pdk command [options]"
48
52
  msgstr ""
49
53
 
50
- #: ../lib/pdk/cli.rb:41
54
+ #: ../lib/pdk/cli.rb:51
51
55
  msgid "Puppet Development Kit"
52
56
  msgstr ""
53
57
 
54
- #: ../lib/pdk/cli.rb:42
58
+ #: ../lib/pdk/cli.rb:52
55
59
  msgid "The shortest path to better modules."
56
60
  msgstr ""
57
61
 
58
- #: ../lib/pdk/cli.rb:45
59
- msgid "show version of pdk"
62
+ #: ../lib/pdk/cli.rb:55
63
+ msgid "Show version of pdk."
60
64
  msgstr ""
61
65
 
62
- #: ../lib/pdk/cli.rb:50
63
- msgid "show help for this command"
66
+ #: ../lib/pdk/cli.rb:60
67
+ msgid "Show help for this command."
64
68
  msgstr ""
65
69
 
66
- #: ../lib/pdk/cli.rb:55
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."
70
+ #: ../lib/pdk/cli.rb:65
71
+ msgid "Specify desired output format. Valid formats are '%{available_formats}'. You may also specify a file to which the formatted output is sent, for example: '--format=junit:report.xml'. This option may be specified multiple times if each option specifies a distinct target file."
68
72
  msgstr ""
69
73
 
70
- #: ../lib/pdk/cli.rb:66
74
+ #: ../lib/pdk/cli.rb:76
71
75
  msgid "Enable debug output."
72
76
  msgstr ""
73
77
 
74
- #: ../lib/pdk/cli.rb:70
75
- msgid "Path to an answer file"
78
+ #: ../lib/pdk/cli.rb:80
79
+ msgid "Path to an answer file."
76
80
  msgstr ""
77
81
 
78
82
  #: ../lib/pdk/cli/bundle.rb:5
@@ -80,45 +84,85 @@ msgid "bundle -- [bundler_options]"
80
84
  msgstr ""
81
85
 
82
86
  #: ../lib/pdk/cli/bundle.rb:6
83
- msgid "escape hatch to bundler"
87
+ msgid "(Experimental) Command pass-through to bundler"
84
88
  msgstr ""
85
89
 
86
90
  #: ../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."
91
+ msgid "[experimental] For advanced users, pdk bundle runs arbitrary commands in the bundler environment that pdk manages.Careless use of this command can lead to errors that pdk can't help recover from."
88
92
  msgstr ""
89
93
 
90
94
  #: ../lib/pdk/cli/errors.rb:6
91
- msgid "An unexpected error has occurred, try running the command again with --debug"
95
+ msgid "An unexpected error has occurred. Try running the command again with --debug"
92
96
  msgstr ""
93
97
 
94
- #: ../lib/pdk/cli/exec.rb:16
98
+ #: ../lib/pdk/cli/exec.rb:17
95
99
  msgid "Unable to find `%{name}`. Check that it is installed and try again."
96
100
  msgstr ""
97
101
 
98
- #: ../lib/pdk/cli/exec.rb:55
99
- msgid "PDK package installation not found, trying '%{fallback}' from the system PATH instead"
102
+ #: ../lib/pdk/cli/exec.rb:56
103
+ msgid "PDK package installation not found. Trying '%{fallback}' from the system PATH instead."
100
104
  msgstr ""
101
105
 
102
- #: ../lib/pdk/cli/exec.rb:60
103
- msgid "Using '%{vendored_bin_path}' from PDK package"
106
+ #: ../lib/pdk/cli/exec.rb:61
107
+ msgid "Using '%{vendored_bin_path}' from PDK package."
104
108
  msgstr ""
105
109
 
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"
110
+ #: ../lib/pdk/cli/exec.rb:64
111
+ msgid "Could not find '%{vendored_bin_path}' in PDK package. Trying '%{fallback}' from the system PATH instead."
108
112
  msgstr ""
109
113
 
110
- #: ../lib/pdk/cli/exec.rb:97
111
- msgid "Expected execution context to be :system or :module but got '%{context}'"
114
+ #: ../lib/pdk/cli/exec.rb:102
115
+ msgid "Expected execution context to be :system or :module but got '%{context}'."
112
116
  msgstr ""
113
117
 
114
- #: ../lib/pdk/cli/exec.rb:186
118
+ #: ../lib/pdk/cli/exec.rb:166
119
+ msgid "Current working directory is not part of a module. (No metadata.json was found.)"
120
+ msgstr ""
121
+
122
+ #: ../lib/pdk/cli/exec.rb:220
115
123
  msgid "Executing '%{command}'"
116
124
  msgstr ""
117
125
 
118
- #: ../lib/pdk/cli/exec.rb:191
126
+ #: ../lib/pdk/cli/exec.rb:222
127
+ msgid "Command environment: GEM_HOME is '%{gem_home}' and GEM_PATH is '%{gem_path}'"
128
+ msgstr ""
129
+
130
+ #: ../lib/pdk/cli/exec.rb:229
119
131
  msgid "Failed to execute '%{command}': %{message}"
120
132
  msgstr ""
121
133
 
134
+ #: ../lib/pdk/cli/exec.rb:243
135
+ msgid "Execution of '%{command}' complete (duration: %{duration_in_seconds}s; exit code: %{exit_code})"
136
+ msgstr ""
137
+
138
+ #: ../lib/pdk/cli/module.rb:4
139
+ msgid "module [options]"
140
+ msgstr ""
141
+
142
+ #: ../lib/pdk/cli/module.rb:5
143
+ msgid "Perform administrative tasks on your module."
144
+ msgstr ""
145
+
146
+ #: ../lib/pdk/cli/module.rb:6
147
+ msgid "Perform tasks on the module project."
148
+ msgstr ""
149
+
150
+ #: ../lib/pdk/cli/module/generate.rb:6
151
+ msgid "generate [options] <module_name>"
152
+ msgstr ""
153
+
154
+ #: ../lib/pdk/cli/module/generate.rb:7
155
+ msgid "This command is now 'pdk new module'."
156
+ msgstr ""
157
+
158
+ #: ../lib/pdk/cli/module/generate.rb:23
159
+ msgid "New modules are created using the ‘pdk new module’ command."
160
+ msgstr ""
161
+
162
+ #: ../lib/pdk/cli/module/generate.rb:33 ../lib/pdk/cli/new/module.rb:27
163
+ msgid "Creating new module: %{modname}"
164
+ msgstr ""
165
+
122
166
  #: ../lib/pdk/cli/new.rb:5
123
167
  msgid "new <type> [options]"
124
168
  msgstr ""
@@ -128,11 +172,11 @@ msgid "create a new module, etc."
128
172
  msgstr ""
129
173
 
130
174
  #: ../lib/pdk/cli/new.rb:7
131
- msgid "Creates a new instance of <type> using the options relevant to that type of thing"
175
+ msgid "Creates a new instance of <type> using relevant options."
132
176
  msgstr ""
133
177
 
134
178
  #: ../lib/pdk/cli/new/class.rb:4
135
- msgid "class [options] <class_name> [parameter[:type]] [parameter[:type]] ..."
179
+ msgid "class [options] <class_name>"
136
180
  msgstr ""
137
181
 
138
182
  #: ../lib/pdk/cli/new/class.rb:5
@@ -143,30 +187,28 @@ msgstr ""
143
187
  msgid "'%{name}' is not a valid class name"
144
188
  msgstr ""
145
189
 
146
- #: ../lib/pdk/cli/new/module.rb:5
147
- msgid "module [options] <module_name> [target_dir]"
190
+ #: ../lib/pdk/cli/new/defined_type.rb:4
191
+ msgid "defined_type [options] <name>"
148
192
  msgstr ""
149
193
 
150
- #: ../lib/pdk/cli/new/module.rb:6
151
- msgid "Create a new module named <module_name> using given options"
194
+ #: ../lib/pdk/cli/new/defined_type.rb:5
195
+ msgid "Create a new defined type named <name> using given options"
152
196
  msgstr ""
153
197
 
154
- #: ../lib/pdk/cli/new/module.rb:10
155
- msgid "Specifies the license this module is written under. This should be a identifier from https://spdx.org/licenses/. Common values are 'Apache-2.0', 'MIT', or 'proprietary'."
198
+ #: ../lib/pdk/cli/new/defined_type.rb:21
199
+ msgid "'%{name}' is not a valid defined type name"
156
200
  msgstr ""
157
201
 
158
- #: ../lib/pdk/cli/new/module.rb:13
159
- msgid "When specified, skips interactive querying of metadata."
202
+ #: ../lib/pdk/cli/new/module.rb:4
203
+ msgid "module [options] <module_name> [target_dir]"
160
204
  msgstr ""
161
205
 
162
- #: ../lib/pdk/cli/new/module.rb:27
163
- msgid ""
164
- "'%{module_name}' is not a valid module name.\n"
165
- "Module names must begin with a lowercase letter and can only include lowercase letters, digits, and underscores."
206
+ #: ../lib/pdk/cli/new/module.rb:5
207
+ msgid "Create a new module named <module_name> using given options"
166
208
  msgstr ""
167
209
 
168
- #: ../lib/pdk/cli/new/module.rb:37
169
- msgid "Creating new module: %{modname}"
210
+ #: ../lib/pdk/cli/new/module.rb:10
211
+ msgid "Specifies the license this module is written under. This should be a identifier from https://spdx.org/licenses/. Common values are 'Apache-2.0', 'MIT', or 'proprietary'."
170
212
  msgstr ""
171
213
 
172
214
  #: ../lib/pdk/cli/test.rb:5
@@ -210,14 +252,18 @@ msgid "%{id}\t%{description}"
210
252
  msgstr ""
211
253
 
212
254
  #: ../lib/pdk/cli/util.rb:9
213
- msgid "This command must be run from inside a module (no metadata.json found)"
255
+ msgid "This command must be run from inside a valid module (no metadata.json found)."
256
+ msgstr ""
257
+
258
+ #: ../lib/pdk/cli/util/command_redirector.rb:18
259
+ msgid "Did you mean '%{command}'?"
214
260
  msgstr ""
215
261
 
216
262
  #: ../lib/pdk/cli/util/interview.rb:30
217
263
  msgid "[Q %{current_number}/%{questions_total}]"
218
264
  msgstr ""
219
265
 
220
- #: ../lib/pdk/cli/util/interview.rb:33
266
+ #: ../lib/pdk/cli/util/interview.rb:34 ../lib/pdk/cli/util/interview.rb:43
221
267
  msgid "-->"
222
268
  msgstr ""
223
269
 
@@ -245,165 +291,191 @@ msgstr ""
245
291
  msgid "Non-standard data type '%{type}', make sure the type is available in your code, or dependencies"
246
292
  msgstr ""
247
293
 
248
- #: ../lib/pdk/cli/validate.rb:7
294
+ #: ../lib/pdk/cli/validate.rb:6
249
295
  msgid "validate [validators] [options] [targets]"
250
296
  msgstr ""
251
297
 
252
- #: ../lib/pdk/cli/validate.rb:8
298
+ #: ../lib/pdk/cli/validate.rb:7
253
299
  msgid "Run static analysis tests."
254
300
  msgstr ""
255
301
 
256
- #: ../lib/pdk/cli/validate.rb:9
302
+ #: ../lib/pdk/cli/validate.rb:8
257
303
  msgid ""
258
- "Run metadata, puppet, or ruby validation.\n"
304
+ "Run metadata, Puppet, or Ruby validation.\n"
259
305
  "\n"
260
- "[validators] is an optional comma separated list of validators to use. If not specified, all validators will be used.\n"
306
+ "[validators] is an optional comma-separated list of validators to use. If not specified, all validators are used.\n"
261
307
  "\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."
308
+ "[targets] is an optional space-separated list of files or directories to be validated. If not specified, validators are run against all applicable files in the module."
263
309
  msgstr ""
264
310
 
265
- #: ../lib/pdk/cli/validate.rb:17
266
- msgid "list all available validators"
311
+ #: ../lib/pdk/cli/validate.rb:16
312
+ msgid "List all available validators."
267
313
  msgstr ""
268
314
 
269
- #: ../lib/pdk/cli/validate.rb:18
270
- msgid "automatically correct problems (where possible)"
315
+ #: ../lib/pdk/cli/validate.rb:17
316
+ msgid "Automatically correct problems where possible."
271
317
  msgstr ""
272
318
 
273
- #: ../lib/pdk/cli/validate.rb:19
274
- msgid "run validations in parallel"
319
+ #: ../lib/pdk/cli/validate.rb:18
320
+ msgid "Run validations in parallel."
275
321
  msgstr ""
276
322
 
277
- #: ../lib/pdk/cli/validate.rb:32
323
+ #: ../lib/pdk/cli/validate.rb:31
278
324
  msgid "Available validators: %{validator_names}"
279
325
  msgstr ""
280
326
 
281
- #: ../lib/pdk/cli/validate.rb:48
282
- msgid "Unknown validator '%{v}'. Available validators: %{validators}"
327
+ #: ../lib/pdk/cli/validate.rb:47
328
+ msgid "Unknown validator '%{v}'. Available validators: %{validators}."
283
329
  msgstr ""
284
330
 
285
- #: ../lib/pdk/cli/validate.rb:58 ../lib/pdk/cli/validate.rb:62
331
+ #: ../lib/pdk/cli/validate.rb:57 ../lib/pdk/cli/validate.rb:61
286
332
  msgid "Running all available validators..."
287
333
  msgstr ""
288
334
 
289
- #: ../lib/pdk/generators/module.rb:24
335
+ #: ../lib/pdk/cli/validate.rb:85
336
+ msgid "Validating module using %{num_of_threads} threads"
337
+ msgstr ""
338
+
339
+ #: ../lib/pdk/generators/module.rb:37
340
+ msgid ""
341
+ "'%{module_name}' is not a valid module name.\n"
342
+ "Module names must begin with a lowercase letter and can only include lowercase letters, digits, and underscores."
343
+ msgstr ""
344
+
345
+ #: ../lib/pdk/generators/module.rb:46
290
346
  msgid "The destination directory '%{dir}' already exists"
291
347
  msgstr ""
292
348
 
293
- #: ../lib/pdk/generators/module.rb:34
349
+ #: ../lib/pdk/generators/module.rb:60
294
350
  msgid "You do not have permission to write to '%{parent_dir}'"
295
351
  msgstr ""
296
352
 
297
- #: ../lib/pdk/generators/module.rb:68
353
+ #: ../lib/pdk/generators/module.rb:101
354
+ msgid "Module '%{name}' generated at path '%{path}'."
355
+ msgstr ""
356
+
357
+ #: ../lib/pdk/generators/module.rb:102
358
+ msgid "In your module directory, add classes with the 'pdk new class' command."
359
+ msgstr ""
360
+
361
+ #: ../lib/pdk/generators/module.rb:105
298
362
  msgid "Failed to move '%{source}' to '%{target}': %{message}"
299
363
  msgstr ""
300
364
 
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."
365
+ #: ../lib/pdk/generators/module.rb:119
366
+ msgid "Your username is not a valid Forge username. Proceeding with the username %{username}. You can fix this later in metadata.json."
303
367
  msgstr ""
304
368
 
305
- #: ../lib/pdk/generators/module.rb:121
369
+ #: ../lib/pdk/generators/module.rb:159
306
370
  msgid "Unable to create directory '%{dir}': %{message}"
307
371
  msgstr ""
308
372
 
309
- #: ../lib/pdk/generators/module.rb:133
310
- msgid "What is your Puppet Forge username?"
373
+ #: ../lib/pdk/generators/module.rb:171
374
+ msgid "If you have a Puppet Forge username, add it here."
311
375
  msgstr ""
312
376
 
313
- #: ../lib/pdk/generators/module.rb:134
314
- msgid "This will be used when uploading your module to the Forge. You can opt out of this at any time."
377
+ #: ../lib/pdk/generators/module.rb:172
378
+ msgid "We can use this to upload your module to the Forge when it's complete."
315
379
  msgstr ""
316
380
 
317
- #: ../lib/pdk/generators/module.rb:137
381
+ #: ../lib/pdk/generators/module.rb:175
318
382
  msgid "Forge usernames can only contain lowercase letters and numbers"
319
383
  msgstr ""
320
384
 
321
- #: ../lib/pdk/generators/module.rb:142
385
+ #: ../lib/pdk/generators/module.rb:180
322
386
  msgid "What version is this module?"
323
387
  msgstr ""
324
388
 
325
- #: ../lib/pdk/generators/module.rb:143
389
+ #: ../lib/pdk/generators/module.rb:181
326
390
  msgid "Puppet uses Semantic Versioning (semver.org) to version modules."
327
391
  msgstr ""
328
392
 
329
- #: ../lib/pdk/generators/module.rb:146
393
+ #: ../lib/pdk/generators/module.rb:184
330
394
  msgid "Semantic Version numbers must be in the form MAJOR.MINOR.PATCH"
331
395
  msgstr ""
332
396
 
333
- #: ../lib/pdk/generators/module.rb:151
397
+ #: ../lib/pdk/generators/module.rb:189
334
398
  msgid "Who wrote this module?"
335
399
  msgstr ""
336
400
 
337
- #: ../lib/pdk/generators/module.rb:152
338
- msgid "The person who gets credit for creating the module. "
401
+ #: ../lib/pdk/generators/module.rb:190
402
+ msgid "This is used to credit the module's author."
339
403
  msgstr ""
340
404
 
341
- #: ../lib/pdk/generators/module.rb:158
405
+ #: ../lib/pdk/generators/module.rb:196
342
406
  msgid "What license does this module code fall under?"
343
407
  msgstr ""
344
408
 
345
- #: ../lib/pdk/generators/module.rb:159
409
+ #: ../lib/pdk/generators/module.rb:197
346
410
  msgid "This should be an identifier from https://spdk.org/licenses/. Common values are \"Apache-2.0\", \"MIT\", or \"proprietary\"."
347
411
  msgstr ""
348
412
 
349
- #: ../lib/pdk/generators/module.rb:165
350
- msgid "How would you describe this module in a single sentence?"
413
+ #: ../lib/pdk/generators/module.rb:203
414
+ msgid "What operating systems does this module support?"
351
415
  msgstr ""
352
416
 
353
- #: ../lib/pdk/generators/module.rb:166
354
- msgid "To help other Puppet users understand what the module does."
417
+ #: ../lib/pdk/generators/module.rb:204
418
+ msgid "Use the up and down keys to move between the choices, space to select and enter to continue."
355
419
  msgstr ""
356
420
 
357
- #: ../lib/pdk/generators/module.rb:172
358
- msgid "Where is this modules's source code repository?"
421
+ #: ../lib/pdk/generators/module.rb:260
422
+ msgid "Summarize the purpose of this module in a single sentence."
359
423
  msgstr ""
360
424
 
361
- #: ../lib/pdk/generators/module.rb:173
362
- msgid "Usually a GitHub URL"
425
+ #: ../lib/pdk/generators/module.rb:261
426
+ msgid "This helps other Puppet users understand what the module does."
363
427
  msgstr ""
364
428
 
365
- #: ../lib/pdk/generators/module.rb:179
366
- msgid "Where can others go to learn more about this module?"
429
+ #: ../lib/pdk/generators/module.rb:267
430
+ msgid "If there is a source code repository for this module, enter the URL here."
367
431
  msgstr ""
368
432
 
369
- #: ../lib/pdk/generators/module.rb:180
370
- msgid "A web site that offers full information about your module."
433
+ #: ../lib/pdk/generators/module.rb:268
434
+ msgid "Skip this if no repository exists yet. You can update this later in the metadata.json."
371
435
  msgstr ""
372
436
 
373
- #: ../lib/pdk/generators/module.rb:185
374
- msgid "Where can others go to file issues about this module?"
437
+ #: ../lib/pdk/generators/module.rb:274
438
+ msgid "If there is a URL where others can learn more about this module, enter it here."
375
439
  msgstr ""
376
440
 
377
- #: ../lib/pdk/generators/module.rb:186
378
- msgid "A web site with a public bug tracker for your module."
441
+ #: ../lib/pdk/generators/module.rb:275 ../lib/pdk/generators/module.rb:281
442
+ msgid "Optional. You can update this later in the metadata.json."
379
443
  msgstr ""
380
444
 
381
- #: ../lib/pdk/generators/module.rb:199
445
+ #: ../lib/pdk/generators/module.rb:280
446
+ msgid "If there is a public issue tracker for this module, enter its URL here."
447
+ msgstr ""
448
+
449
+ #: ../lib/pdk/generators/module.rb:294
382
450
  msgid ""
383
451
  "\n"
384
- "We need to create a metadata.json file for this module, so we're going to ask you %{count} quick questions.\n"
385
- "If the question is not applicable to this module, just leave the answer blank.\n"
452
+ "We need to create a metadata.json file for this module, so we're going to ask you %{count} questions.\n"
453
+ "If the question is not applicable to this module, accept the default option shown after each question. You can modify any answers at any time by manually updating the metadata.json file.\n"
386
454
  "\n"
387
455
  msgstr ""
388
456
 
389
- #: ../lib/pdk/generators/module.rb:207
390
- msgid "Interview cancelled, not generating the module."
457
+ #: ../lib/pdk/generators/module.rb:305 ../lib/pdk/generators/module.rb:327
458
+ msgid "Interview cancelled; not generating the module."
391
459
  msgstr ""
392
460
 
393
- #: ../lib/pdk/generators/module.rb:217
461
+ #: ../lib/pdk/generators/module.rb:316
394
462
  msgid "SUMMARY"
395
463
  msgstr ""
396
464
 
397
- #: ../lib/pdk/generators/module.rb:223
465
+ #: ../lib/pdk/generators/module.rb:323
398
466
  msgid "About to generate this module; continue?"
399
467
  msgstr ""
400
468
 
401
- #: ../lib/pdk/generators/module.rb:224
469
+ #: ../lib/pdk/generators/module.rb:324
470
+ msgid "Answer \"Y\" to continue or \"n\" to cancel."
471
+ msgstr ""
472
+
473
+ #: ../lib/pdk/generators/module.rb:332
402
474
  msgid "Module not generated."
403
475
  msgstr ""
404
476
 
405
477
  #: ../lib/pdk/generators/puppet_object.rb:88
406
- msgid "Unable to generate class, '%{file}' already exists."
478
+ msgid "Unable to generate %{object_type}; '%{file}' already exists."
407
479
  msgstr ""
408
480
 
409
481
  #: ../lib/pdk/generators/puppet_object.rb:118
@@ -423,7 +495,7 @@ msgid "No %{dir_type} template specified; trying next template directory."
423
495
  msgstr ""
424
496
 
425
497
  #: ../lib/pdk/generators/puppet_object.rb:168
426
- msgid "Unable to find a %{type} template in %{url}, trying next template directory"
498
+ msgid "Unable to find a %{type} template in %{url}; trying next template directory."
427
499
  msgstr ""
428
500
 
429
501
  #: ../lib/pdk/generators/puppet_object.rb:170
@@ -434,134 +506,178 @@ msgstr ""
434
506
  msgid "'%{dir}' does not contain valid Puppet module metadata: %{msg}"
435
507
  msgstr ""
436
508
 
437
- #: ../lib/pdk/module/metadata.rb:46
438
- msgid "'%{file}' does not exist or is not a file"
509
+ #: ../lib/pdk/module/metadata.rb:47
510
+ msgid "'%{file}' does not exist or is not a file."
439
511
  msgstr ""
440
512
 
441
- #: ../lib/pdk/module/metadata.rb:56
513
+ #: ../lib/pdk/module/metadata.rb:51
514
+ msgid "Unable to open '%{file}' for reading."
515
+ msgstr ""
516
+
517
+ #: ../lib/pdk/module/metadata.rb:57
442
518
  msgid "Invalid JSON in metadata.json: %{msg}"
443
519
  msgstr ""
444
520
 
445
- #: ../lib/pdk/module/templatedir.rb:53
446
- msgid "Unable to clone git repository '%{repo}' to '%{dest}'"
521
+ #: ../lib/pdk/module/metadata.rb:93
522
+ msgid "Field must be a dash-separated user name and module name."
523
+ msgstr ""
524
+
525
+ #: ../lib/pdk/module/metadata.rb:95
526
+ msgid "Module name must contain only alphanumeric or underscore characters."
527
+ msgstr ""
528
+
529
+ #: ../lib/pdk/module/metadata.rb:97
530
+ msgid "Module name must begin with a letter."
531
+ msgstr ""
532
+
533
+ #: ../lib/pdk/module/metadata.rb:99
534
+ msgid "Namespace must contain only alphanumeric characters."
535
+ msgstr ""
536
+
537
+ #: ../lib/pdk/module/metadata.rb:102
538
+ msgid "Invalid 'name' field in metadata.json: %{err}"
447
539
  msgstr ""
448
540
 
449
- #: ../lib/pdk/module/templatedir.rb:107
541
+ #: ../lib/pdk/module/templatedir.rb:55
542
+ msgid "Unable to clone git repository '%{repo}' to '%{dest}'."
543
+ msgstr ""
544
+
545
+ #: ../lib/pdk/module/templatedir.rb:111
450
546
  msgid "Rendering '%{template}'..."
451
547
  msgstr ""
452
548
 
453
- #: ../lib/pdk/module/templatedir.rb:113
549
+ #: ../lib/pdk/module/templatedir.rb:117
454
550
  msgid ""
455
551
  "Failed to render template '%{template}'\n"
456
552
  "%{exception}: %{message}"
457
553
  msgstr ""
458
554
 
459
- #: ../lib/pdk/module/templatedir.rb:177
460
- msgid "The specified template '%{path}' is not a directory"
555
+ #: ../lib/pdk/module/templatedir.rb:181
556
+ msgid "The specified template '%{path}' is not a directory."
461
557
  msgstr ""
462
558
 
463
- #: ../lib/pdk/module/templatedir.rb:181
464
- msgid "The template at '%{path}' does not contain a moduleroot directory"
559
+ #: ../lib/pdk/module/templatedir.rb:185
560
+ msgid "The template at '%{path}' does not contain a 'moduleroot/' directory."
465
561
  msgstr ""
466
562
 
467
- #: ../lib/pdk/module/templatedir.rb:225
563
+ #: ../lib/pdk/module/templatedir.rb:229
468
564
  msgid "'%{file}' is not a valid YAML file: %{message}"
469
565
  msgstr ""
470
566
 
471
- #: ../lib/pdk/report/event.rb:162
472
- msgid "file not specified"
567
+ #: ../lib/pdk/report/event.rb:175
568
+ msgid "File not specified."
473
569
  msgstr ""
474
570
 
475
- #: ../lib/pdk/report/event.rb:166
476
- msgid "file must be a String"
571
+ #: ../lib/pdk/report/event.rb:179
572
+ msgid "File must be a String."
477
573
  msgstr ""
478
574
 
479
- #: ../lib/pdk/report/event.rb:197
480
- msgid "state not specified"
575
+ #: ../lib/pdk/report/event.rb:212
576
+ msgid "State not specified."
481
577
  msgstr ""
482
578
 
483
- #: ../lib/pdk/report/event.rb:202
484
- msgid "state must be a Symbol, not %{type}"
579
+ #: ../lib/pdk/report/event.rb:217
580
+ msgid "State must be a Symbol, not %{type}"
485
581
  msgstr ""
486
582
 
487
- #: ../lib/pdk/report/event.rb:207
488
- msgid "Invalid state %{state}, valid states are: %{valid}"
583
+ #: ../lib/pdk/report/event.rb:222
584
+ msgid "Invalid state %{state}. Valid states are: %{valid}."
489
585
  msgstr ""
490
586
 
491
- #: ../lib/pdk/report/event.rb:226
492
- msgid "source not specified"
587
+ #: ../lib/pdk/report/event.rb:241
588
+ msgid "Source not specified."
493
589
  msgstr ""
494
590
 
495
- #: ../lib/pdk/report/event.rb:247
496
- msgid "line must be an Integer or a String representation of an Integer"
591
+ #: ../lib/pdk/report/event.rb:262
592
+ msgid "Line must be an Integer or a String representation of an Integer."
497
593
  msgstr ""
498
594
 
499
- #: ../lib/pdk/report/event.rb:251
500
- msgid "the line number can only contain the digits 0-9"
595
+ #: ../lib/pdk/report/event.rb:266
596
+ msgid "The line number can contain only the digits 0-9."
501
597
  msgstr ""
502
598
 
503
- #: ../lib/pdk/report/event.rb:272
504
- msgid "column must be an Integer or a String representation of an Integer"
599
+ #: ../lib/pdk/report/event.rb:287
600
+ msgid "Column must be an Integer or a String representation of an Integer."
505
601
  msgstr ""
506
602
 
507
- #: ../lib/pdk/report/event.rb:276
508
- msgid "the column number can only contain the digits 0-9"
603
+ #: ../lib/pdk/report/event.rb:291
604
+ msgid "The column number can contain only the digits 0-9."
509
605
  msgstr ""
510
606
 
511
- #: ../lib/pdk/report/event.rb:294
512
- msgid "trace must be an Array of stack trace lines"
607
+ #: ../lib/pdk/report/event.rb:309
608
+ msgid "Trace must be an Array of stack trace lines."
513
609
  msgstr ""
514
610
 
515
611
  #: ../lib/pdk/template_file.rb:62
516
612
  msgid "'%{template}' is not a readable file"
517
613
  msgstr ""
518
614
 
519
- #: ../lib/pdk/tests/unit.rb:32
520
- msgid "Running unit tests in parallel"
615
+ #: ../lib/pdk/tests/unit.rb:46
616
+ msgid "Cleaning up after running unit tests."
617
+ msgstr ""
618
+
619
+ #: ../lib/pdk/tests/unit.rb:50
620
+ msgid "The spec_clean rake task failed with the following error(s):"
621
+ msgstr ""
622
+
623
+ #: ../lib/pdk/tests/unit.rb:51
624
+ msgid "Failed to clean up after running unit tests"
625
+ msgstr ""
626
+
627
+ #: ../lib/pdk/tests/unit.rb:55
628
+ msgid "Preparing to run the unit tests."
629
+ msgstr ""
630
+
631
+ #: ../lib/pdk/tests/unit.rb:59
632
+ msgid "The spec_prep rake task failed with the following error(s):"
633
+ msgstr ""
634
+
635
+ #: ../lib/pdk/tests/unit.rb:60
636
+ msgid "Failed to prepare to run the unit tests."
521
637
  msgstr ""
522
638
 
523
- #: ../lib/pdk/tests/unit.rb:32
524
- msgid "Running unit tests"
639
+ #: ../lib/pdk/tests/unit.rb:70
640
+ msgid "Running unit tests in parallel."
525
641
  msgstr ""
526
642
 
527
- #: ../lib/pdk/tests/unit.rb:37
528
- msgid "Running %{cmd}"
643
+ #: ../lib/pdk/tests/unit.rb:70
644
+ msgid "Running unit tests."
529
645
  msgstr ""
530
646
 
531
- #: ../lib/pdk/tests/unit.rb:52
647
+ #: ../lib/pdk/tests/unit.rb:84
532
648
  msgid "Unit test output did not contain a valid JSON result: %{output}"
533
649
  msgstr ""
534
650
 
535
- #: ../lib/pdk/tests/unit.rb:102
536
- msgid "Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending"
651
+ #: ../lib/pdk/tests/unit.rb:136
652
+ msgid "Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending."
537
653
  msgstr ""
538
654
 
539
- #: ../lib/pdk/tests/unit.rb:159
655
+ #: ../lib/pdk/tests/unit.rb:193
540
656
  msgid "Failed to find valid JSON in output from rspec: %{output}"
541
657
  msgstr ""
542
658
 
543
- #: ../lib/pdk/tests/unit.rb:164
659
+ #: ../lib/pdk/tests/unit.rb:198
544
660
  msgid "Unable to enumerate examples. rspec reported: %{message}"
545
661
  msgstr ""
546
662
 
547
663
  #: ../lib/pdk/util.rb:47
548
- msgid "Cannot resolve a full path to '%{path}' as it does not currently exist"
664
+ msgid "Cannot resolve a full path to '%{path}', as it does not currently exist."
549
665
  msgstr ""
550
666
 
551
667
  #: ../lib/pdk/util.rb:67
552
- msgid "Package basedir requested for non-package install"
668
+ msgid "Package basedir requested for non-package install."
553
669
  msgstr ""
554
670
 
555
671
  #: ../lib/pdk/util/bundler.rb:15
556
- msgid "Bundle has already been installed, skipping run"
672
+ msgid "Bundle has already been installed. Skipping run."
557
673
  msgstr ""
558
674
 
559
675
  #: ../lib/pdk/util/bundler.rb:20
560
- msgid "No Gemfile found in '%{cwd}', skipping bundler management"
676
+ msgid "No Gemfile found in '%{cwd}'. Skipping bundler management."
561
677
  msgstr ""
562
678
 
563
679
  #: ../lib/pdk/util/bundler.rb:31
564
- msgid "No Gemfile.lock found in module, using vendored Gemfile.lock from '%{source}'"
680
+ msgid "No Gemfile.lock found in module. Using vendored Gemfile.lock from '%{source}'."
565
681
  msgstr ""
566
682
 
567
683
  #: ../lib/pdk/util/bundler.rb:37
@@ -580,48 +696,66 @@ msgstr ""
580
696
  msgid "Checking for missing Gemfile dependencies."
581
697
  msgstr ""
582
698
 
583
- #: ../lib/pdk/util/bundler.rb:94
584
- msgid "Resolving Gemfile dependencies"
699
+ #: ../lib/pdk/util/bundler.rb:93
700
+ msgid "Resolving Gemfile dependencies."
585
701
  msgstr ""
586
702
 
587
- #: ../lib/pdk/util/bundler.rb:112
588
- msgid "Installing missing Gemfile dependencies"
703
+ #: ../lib/pdk/util/bundler.rb:110
704
+ msgid "Installing missing Gemfile dependencies."
589
705
  msgstr ""
590
706
 
591
- #: ../lib/pdk/util/bundler.rb:134
592
- msgid "Failed to generate binstubs for %{gems}"
707
+ #: ../lib/pdk/util/bundler.rb:131
708
+ msgid ""
709
+ "Failed to generate binstubs for '%{gems}':\n"
710
+ "%{output}"
593
711
  msgstr ""
594
712
 
595
- #: ../lib/pdk/validators/base_validator.rb:46
713
+ #: ../lib/pdk/validators/base_validator.rb:72
596
714
  msgid "Invoking %{cmd}"
597
715
  msgstr ""
598
716
 
717
+ #: ../lib/pdk/validators/base_validator.rb:77
718
+ msgid "%{validator}: Skipped '%{target}'. Target does not contain any files to validate (%{pattern})."
719
+ msgstr ""
720
+
721
+ #: ../lib/pdk/validators/base_validator.rb:81
722
+ msgid "Target does not contain any files to validate (%{pattern})."
723
+ msgstr ""
724
+
725
+ #: ../lib/pdk/validators/base_validator.rb:90
726
+ msgid "%{validator}: Skipped '%{target}'. Target file not found."
727
+ msgstr ""
728
+
729
+ #: ../lib/pdk/validators/base_validator.rb:94
730
+ msgid "File does not exist."
731
+ msgstr ""
732
+
599
733
  #: ../lib/pdk/validators/metadata/metadata_json_lint.rb:23
600
- msgid "Checking metadata style (%{targets})"
734
+ msgid "Checking metadata style (%{targets})."
601
735
  msgstr ""
602
736
 
603
- #: ../lib/pdk/validators/metadata/metadata_syntax.rb:18
604
- msgid "Checking metadata syntax (%{targets})"
737
+ #: ../lib/pdk/validators/metadata/metadata_json_lint.rb:40
738
+ msgid "More than 1 target provided to PDK::Validate::MetadataJSONLint."
605
739
  msgstr ""
606
740
 
607
- #: ../lib/pdk/validators/metadata/metadata_syntax.rb:65
608
- msgid "not a file"
741
+ #: ../lib/pdk/validators/metadata/metadata_syntax.rb:18
742
+ msgid "Checking metadata syntax (%{targets})."
609
743
  msgstr ""
610
744
 
611
- #: ../lib/pdk/validators/metadata/metadata_syntax.rb:77
612
- msgid "could not be read"
745
+ #: ../lib/pdk/validators/metadata/metadata_syntax.rb:69
746
+ msgid "Could not be read."
613
747
  msgstr ""
614
748
 
615
749
  #: ../lib/pdk/validators/puppet/puppet_lint.rb:22
616
- msgid "Checking Puppet manifest style"
750
+ msgid "Checking Puppet manifest style (%{pattern})."
617
751
  msgstr ""
618
752
 
619
753
  #: ../lib/pdk/validators/puppet/puppet_syntax.rb:21
620
- msgid "Checking Puppet manifest syntax"
754
+ msgid "Checking Puppet manifest syntax (%{pattern})."
621
755
  msgstr ""
622
756
 
623
- #: ../lib/pdk/validators/ruby/rubocop.rb:20
624
- msgid "Checking Ruby code style"
757
+ #: ../lib/pdk/validators/ruby/rubocop.rb:24
758
+ msgid "Checking Ruby code style (%{pattern})."
625
759
  msgstr ""
626
760
 
627
761
  #: ../lib/puppet/util/windows/api_types.rb:68