pdk 1.10.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +50 -1
  3. data/lib/pdk.rb +16 -1
  4. data/lib/pdk/analytics.rb +28 -0
  5. data/lib/pdk/analytics/client/google_analytics.rb +138 -0
  6. data/lib/pdk/analytics/client/noop.rb +23 -0
  7. data/lib/pdk/analytics/util.rb +17 -0
  8. data/lib/pdk/cli.rb +37 -0
  9. data/lib/pdk/cli/build.rb +2 -0
  10. data/lib/pdk/cli/bundle.rb +2 -1
  11. data/lib/pdk/cli/convert.rb +2 -0
  12. data/lib/pdk/cli/exec.rb +28 -1
  13. data/lib/pdk/cli/new/class.rb +2 -0
  14. data/lib/pdk/cli/new/defined_type.rb +2 -0
  15. data/lib/pdk/cli/new/module.rb +2 -0
  16. data/lib/pdk/cli/new/provider.rb +2 -0
  17. data/lib/pdk/cli/new/task.rb +2 -0
  18. data/lib/pdk/cli/test.rb +0 -1
  19. data/lib/pdk/cli/test/unit.rb +13 -10
  20. data/lib/pdk/cli/update.rb +21 -0
  21. data/lib/pdk/cli/util.rb +35 -0
  22. data/lib/pdk/cli/util/interview.rb +7 -1
  23. data/lib/pdk/cli/validate.rb +9 -2
  24. data/lib/pdk/config.rb +94 -0
  25. data/lib/pdk/config/errors.rb +5 -0
  26. data/lib/pdk/config/json.rb +23 -0
  27. data/lib/pdk/config/namespace.rb +273 -0
  28. data/lib/pdk/config/validator.rb +31 -0
  29. data/lib/pdk/config/value.rb +94 -0
  30. data/lib/pdk/config/yaml.rb +31 -0
  31. data/lib/pdk/generate/module.rb +3 -2
  32. data/lib/pdk/logger.rb +21 -1
  33. data/lib/pdk/module/build.rb +58 -0
  34. data/lib/pdk/module/convert.rb +1 -1
  35. data/lib/pdk/module/metadata.rb +1 -0
  36. data/lib/pdk/module/templatedir.rb +24 -5
  37. data/lib/pdk/module/update_manager.rb +2 -2
  38. data/lib/pdk/report/event.rb +3 -3
  39. data/lib/pdk/template_file.rb +1 -1
  40. data/lib/pdk/tests/unit.rb +10 -12
  41. data/lib/pdk/util.rb +9 -0
  42. data/lib/pdk/util/bundler.rb +5 -9
  43. data/lib/pdk/util/filesystem.rb +37 -0
  44. data/lib/pdk/util/puppet_version.rb +1 -1
  45. data/lib/pdk/util/ruby_version.rb +16 -6
  46. data/lib/pdk/util/template_uri.rb +72 -43
  47. data/lib/pdk/util/version.rb +1 -1
  48. data/lib/pdk/util/windows.rb +1 -0
  49. data/lib/pdk/util/windows/api_types.rb +0 -7
  50. data/lib/pdk/util/windows/file.rb +1 -1
  51. data/lib/pdk/util/windows/string.rb +1 -1
  52. data/lib/pdk/validate/base_validator.rb +8 -6
  53. data/lib/pdk/validate/puppet/puppet_syntax.rb +1 -1
  54. data/lib/pdk/validate/ruby/rubocop.rb +1 -1
  55. data/lib/pdk/version.rb +1 -1
  56. data/locales/pdk.pot +223 -114
  57. metadata +103 -50
@@ -2,13 +2,6 @@ require 'ffi'
2
2
  require 'pdk/util/windows/string'
3
3
 
4
4
  module PDK::Util::Windows::APITypes
5
- module ::FFI
6
- WIN32_FALSE = 0
7
-
8
- # standard Win32 error codes
9
- ERROR_SUCCESS = 0
10
- end
11
-
12
5
  class ::FFI::Pointer
13
6
  def self.from_string_to_wide_string(str, &_block)
14
7
  str = PDK::Util::Windows::String.wide_string(str)
@@ -11,7 +11,7 @@ module PDK::Util::Windows::File
11
11
  # includes terminating NULL
12
12
  buffer_size = GetLongPathNameW(path_ptr, FFI::Pointer::NULL, 0)
13
13
  FFI::MemoryPointer.new(:wchar, buffer_size) do |converted_ptr|
14
- if GetLongPathNameW(path_ptr, converted_ptr, buffer_size) == FFI::WIN32_FALSE
14
+ if GetLongPathNameW(path_ptr, converted_ptr, buffer_size) == PDK::Util::Windows::WIN32_FALSE
15
15
  raise _('Failed to call GetLongPathName')
16
16
  end
17
17
 
@@ -3,7 +3,7 @@ require 'pdk/util/windows'
3
3
  module PDK::Util::Windows::String
4
4
  def wide_string(str)
5
5
  # if given a nil string, assume caller wants to pass a nil pointer to win32
6
- return nil if str.nil?
6
+ return if str.nil?
7
7
  # ruby (< 2.1) does not respect multibyte terminators, so it is possible
8
8
  # for a string to contain a single trailing null byte, followed by garbage
9
9
  # causing buffer overruns.
@@ -49,13 +49,15 @@ module PDK
49
49
  invalid = []
50
50
  matched = targets.map { |target|
51
51
  if respond_to?(:pattern)
52
- if File.directory?(target)
52
+ if PDK::Util::Filesystem.directory?(target)
53
53
  target_root = PDK::Util.module_root
54
- pattern_glob = Array(pattern).map { |p| Dir.glob(File.join(target_root, p), File::FNM_DOTMATCH) }
55
-
54
+ pattern_glob = Array(pattern).map { |p| PDK::Util::Filesystem.glob(File.join(target_root, p), File::FNM_DOTMATCH) }
56
55
  target_list = pattern_glob.flatten.map do |file|
57
- if File.fnmatch(File.join(File.expand_path(target), '*'), file, File::FNM_DOTMATCH)
56
+ if PDK::Util::Filesystem.fnmatch(File.join(PDK::Util::Filesystem.expand_path(PDK::Util.canonical_path(target)), '*'), file, File::FNM_DOTMATCH)
58
57
  Pathname.new(file).relative_path_from(Pathname.new(PDK::Util.module_root)).to_s
58
+ else
59
+ PDK.logger.debug(_('%{validator}: Skipped \'%{target}\'. Target directory does not exist.') % { validator: name, target: target })
60
+ nil
59
61
  end
60
62
  end
61
63
 
@@ -64,10 +66,10 @@ module PDK
64
66
 
65
67
  skipped << target if target_list.flatten.empty?
66
68
  target_list
67
- elsif File.file?(target)
69
+ elsif PDK::Util::Filesystem.file?(target)
68
70
  if Array(pattern).include? target
69
71
  target
70
- elsif Array(pattern).any? { |p| File.fnmatch(File.expand_path(p), File.expand_path(target), File::FNM_DOTMATCH) }
72
+ elsif Array(pattern).any? { |p| PDK::Util::Filesystem.fnmatch(PDK::Util::Filesystem.expand_path(p), PDK::Util::Filesystem.expand_path(target), File::FNM_DOTMATCH) }
71
73
  target
72
74
  else
73
75
  skipped << target
@@ -36,7 +36,7 @@ module PDK
36
36
  end
37
37
 
38
38
  def self.pattern
39
- '**/**.pp'
39
+ '**/*.pp'
40
40
  end
41
41
 
42
42
  def self.pattern_ignore
@@ -63,7 +63,7 @@ module PDK
63
63
  line: offense['location']['line'],
64
64
  column: offense['location']['column'],
65
65
  message: offense['message'],
66
- severity: (offense['corrected']) ? 'corrected' : offense['severity'],
66
+ severity: offense['corrected'] ? 'corrected' : offense['severity'],
67
67
  test: offense['cop_name'],
68
68
  state: :failure,
69
69
  ),
data/lib/pdk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PDK
2
- VERSION = '1.10.0'.freeze
2
+ VERSION = '1.11.0'.freeze
3
3
  TEMPLATE_REF = VERSION
4
4
  end
data/locales/pdk.pot CHANGED
@@ -6,11 +6,11 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: puppet development kit v1.9.1-46-g3e22a80\n"
9
+ "Project-Id-Version: puppet development kit v1.10.0-82-gd468eda\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppet.com\n"
12
- "POT-Creation-Date: 2019-04-02 10:51+1100\n"
13
- "PO-Revision-Date: 2019-04-02 10:51+1100\n"
12
+ "POT-Creation-Date: 2019-06-27 13:23+1000\n"
13
+ "PO-Revision-Date: 2019-06-27 13:23+1000\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -39,63 +39,63 @@ msgstr ""
39
39
  msgid "Unable to write '%{file}': %{msg}"
40
40
  msgstr ""
41
41
 
42
- #: ../lib/pdk/cli.rb:42
42
+ #: ../lib/pdk/cli.rb:79
43
43
  msgid "Specifies the URL to the template to use when creating new modules or classes. (default: %{default_url})"
44
44
  msgstr ""
45
45
 
46
- #: ../lib/pdk/cli.rb:48
46
+ #: ../lib/pdk/cli.rb:85
47
47
  msgid "Specifies the template git branch or tag to use when creating new modules or classes."
48
48
  msgstr ""
49
49
 
50
- #: ../lib/pdk/cli.rb:52
50
+ #: ../lib/pdk/cli.rb:89
51
51
  msgid "When specified, skips interactive querying of metadata."
52
52
  msgstr ""
53
53
 
54
- #: ../lib/pdk/cli.rb:56
54
+ #: ../lib/pdk/cli.rb:93
55
55
  msgid "When specified, interactive querying of metadata will include all optional questions."
56
56
  msgstr ""
57
57
 
58
- #: ../lib/pdk/cli.rb:60
58
+ #: ../lib/pdk/cli.rb:97
59
59
  msgid "Puppet version to run tests or validations against."
60
60
  msgstr ""
61
61
 
62
- #: ../lib/pdk/cli.rb:61
62
+ #: ../lib/pdk/cli.rb:98
63
63
  msgid "Puppet Enterprise version to run tests or validations against."
64
64
  msgstr ""
65
65
 
66
- #: ../lib/pdk/cli.rb:67
66
+ #: ../lib/pdk/cli.rb:104
67
67
  msgid "When specified, PDK will validate or test against the current Puppet source from github.com. To use this option, you must have network access to https://github.com."
68
68
  msgstr ""
69
69
 
70
- #: ../lib/pdk/cli.rb:72
70
+ #: ../lib/pdk/cli.rb:109
71
71
  msgid "pdk command [options]"
72
72
  msgstr ""
73
73
 
74
- #: ../lib/pdk/cli.rb:73
74
+ #: ../lib/pdk/cli.rb:110
75
75
  msgid "Puppet Development Kit"
76
76
  msgstr ""
77
77
 
78
- #: ../lib/pdk/cli.rb:74
78
+ #: ../lib/pdk/cli.rb:111
79
79
  msgid "The shortest path to better modules."
80
80
  msgstr ""
81
81
 
82
- #: ../lib/pdk/cli.rb:77
82
+ #: ../lib/pdk/cli.rb:114
83
83
  msgid "Show version of pdk."
84
84
  msgstr ""
85
85
 
86
- #: ../lib/pdk/cli.rb:82
86
+ #: ../lib/pdk/cli.rb:119
87
87
  msgid "Show help for this command."
88
88
  msgstr ""
89
89
 
90
- #: ../lib/pdk/cli.rb:87
90
+ #: ../lib/pdk/cli.rb:124
91
91
  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."
92
92
  msgstr ""
93
93
 
94
- #: ../lib/pdk/cli.rb:98
94
+ #: ../lib/pdk/cli.rb:135
95
95
  msgid "Enable debug output."
96
96
  msgstr ""
97
97
 
98
- #: ../lib/pdk/cli.rb:102
98
+ #: ../lib/pdk/cli.rb:139
99
99
  msgid "Path to an answer file."
100
100
  msgstr ""
101
101
 
@@ -119,47 +119,47 @@ msgstr ""
119
119
  msgid "`pdk build` can only be run from inside a valid module with a metadata.json."
120
120
  msgstr ""
121
121
 
122
- #: ../lib/pdk/cli/build.rb:31
122
+ #: ../lib/pdk/cli/build.rb:33
123
123
  msgid "This module is missing the following fields in the metadata.json: %{fields}. These missing fields may affect the visibility of the module on the Forge."
124
124
  msgstr ""
125
125
 
126
- #: ../lib/pdk/cli/build.rb:47
126
+ #: ../lib/pdk/cli/build.rb:49
127
127
  msgid "The file '%{package}' already exists."
128
128
  msgstr ""
129
129
 
130
- #: ../lib/pdk/cli/build.rb:49
130
+ #: ../lib/pdk/cli/build.rb:51
131
131
  msgid "Overwrite?"
132
132
  msgstr ""
133
133
 
134
- #: ../lib/pdk/cli/build.rb:50 ../lib/pdk/cli/build.rb:61
134
+ #: ../lib/pdk/cli/build.rb:52 ../lib/pdk/cli/build.rb:63
135
135
  msgid "Build cancelled; exiting."
136
136
  msgstr ""
137
137
 
138
- #: ../lib/pdk/cli/build.rb:56
138
+ #: ../lib/pdk/cli/build.rb:58
139
139
  msgid "This module is not compatible with PDK, so PDK can not validate or test this build. Unvalidated modules may have errors when uploading to the Forge. To make this module PDK compatible and use validate features, cancel the build and run `pdk convert`."
140
140
  msgstr ""
141
141
 
142
- #: ../lib/pdk/cli/build.rb:60
142
+ #: ../lib/pdk/cli/build.rb:62
143
143
  msgid "Continue build without converting?"
144
144
  msgstr ""
145
145
 
146
- #: ../lib/pdk/cli/build.rb:67
146
+ #: ../lib/pdk/cli/build.rb:69
147
147
  msgid "Building %{module_name} version %{module_version}"
148
148
  msgstr ""
149
149
 
150
- #: ../lib/pdk/cli/build.rb:74
150
+ #: ../lib/pdk/cli/build.rb:76
151
151
  msgid "Build of %{package_name} has completed successfully. Built package can be found here: %{package_path}"
152
152
  msgstr ""
153
153
 
154
- #: ../lib/pdk/cli/bundle.rb:5
154
+ #: ../lib/pdk/cli/bundle.rb:4
155
155
  msgid "bundle [bundler_options]"
156
156
  msgstr ""
157
157
 
158
- #: ../lib/pdk/cli/bundle.rb:6
158
+ #: ../lib/pdk/cli/bundle.rb:5
159
159
  msgid "(Experimental) Command pass-through to bundler"
160
160
  msgstr ""
161
161
 
162
- #: ../lib/pdk/cli/bundle.rb:7
162
+ #: ../lib/pdk/cli/bundle.rb:6
163
163
  msgid ""
164
164
  "[experimental] For advanced users, pdk bundle runs arbitrary commands in the bundler environment that pdk manages.\n"
165
165
  "Careless use of this command can lead to errors that pdk can't help recover from.\n"
@@ -167,7 +167,7 @@ msgid ""
167
167
  "Note that for PowerShell the '--' needs to be escaped using a backtick: '`--' to avoid it being parsed by the shell.\n"
168
168
  msgstr ""
169
169
 
170
- #: ../lib/pdk/cli/bundle.rb:18
170
+ #: ../lib/pdk/cli/bundle.rb:17
171
171
  msgid "`pdk bundle` can only be run from inside a valid module directory."
172
172
  msgstr ""
173
173
 
@@ -195,11 +195,11 @@ msgstr ""
195
195
  msgid "You can not specify --noop and --force when converting a module"
196
196
  msgstr ""
197
197
 
198
- #: ../lib/pdk/cli/convert.rb:32 ../lib/pdk/cli/new/module.rb:25
198
+ #: ../lib/pdk/cli/convert.rb:34 ../lib/pdk/cli/new/module.rb:27
199
199
  msgid "Ignoring --full-interview and continuing with --skip-interview."
200
200
  msgstr ""
201
201
 
202
- #: ../lib/pdk/cli/convert.rb:37
202
+ #: ../lib/pdk/cli/convert.rb:39
203
203
  msgid "Ignoring --full-interview and continuing with --force."
204
204
  msgstr ""
205
205
 
@@ -227,23 +227,39 @@ msgstr ""
227
227
  msgid "Expected execution context to be :system or :module but got '%{context}'."
228
228
  msgstr ""
229
229
 
230
- #: ../lib/pdk/cli/exec.rb:155
230
+ #: ../lib/pdk/cli/exec.rb:126
231
+ msgid "PUPPET_GEM_VERSION is not supported by PDK. Please use the --puppet-version option on your PDK command or set the PDK_PUPPET_VERSION environment variable instead"
232
+ msgstr ""
233
+
234
+ #: ../lib/pdk/cli/exec.rb:136
235
+ msgid "#{gem}_GEM_VERSION is not supported by PDK."
236
+ msgstr ""
237
+
238
+ #: ../lib/pdk/cli/exec.rb:175
231
239
  msgid "Current working directory is not part of a module. (No metadata.json was found.)"
232
240
  msgstr ""
233
241
 
234
- #: ../lib/pdk/cli/exec.rb:210
242
+ #: ../lib/pdk/cli/exec.rb:202
243
+ msgid "STDOUT: %{output}"
244
+ msgstr ""
245
+
246
+ #: ../lib/pdk/cli/exec.rb:205
247
+ msgid "STDERR: %{output}"
248
+ msgstr ""
249
+
250
+ #: ../lib/pdk/cli/exec.rb:237
235
251
  msgid "Executing '%{command}'"
236
252
  msgstr ""
237
253
 
238
- #: ../lib/pdk/cli/exec.rb:213
254
+ #: ../lib/pdk/cli/exec.rb:240
239
255
  msgid "Command environment:"
240
256
  msgstr ""
241
257
 
242
- #: ../lib/pdk/cli/exec.rb:224
258
+ #: ../lib/pdk/cli/exec.rb:251
243
259
  msgid "Failed to execute '%{command}': %{message}"
244
260
  msgstr ""
245
261
 
246
- #: ../lib/pdk/cli/exec.rb:240
262
+ #: ../lib/pdk/cli/exec.rb:267
247
263
  msgid "Execution of '%{command}' complete (duration: %{duration_in_seconds}s; exit code: %{exit_code})"
248
264
  msgstr ""
249
265
 
@@ -283,7 +299,7 @@ msgstr ""
283
299
  msgid "New modules are created using the ‘pdk new module’ command."
284
300
  msgstr ""
285
301
 
286
- #: ../lib/pdk/cli/module/generate.rb:41 ../lib/pdk/cli/new/module.rb:40
302
+ #: ../lib/pdk/cli/module/generate.rb:41 ../lib/pdk/cli/new/module.rb:42
287
303
  msgid "Creating new module: %{modname}"
288
304
  msgstr ""
289
305
 
@@ -379,11 +395,11 @@ msgstr ""
379
395
  msgid "'%{name}' is not a valid task name"
380
396
  msgstr ""
381
397
 
382
- #: ../lib/pdk/cli/test.rb:5
398
+ #: ../lib/pdk/cli/test.rb:4
383
399
  msgid "test [subcommand] [options]"
384
400
  msgstr ""
385
401
 
386
- #: ../lib/pdk/cli/test.rb:6
402
+ #: ../lib/pdk/cli/test.rb:5
387
403
  msgid "Run tests."
388
404
  msgstr ""
389
405
 
@@ -419,19 +435,19 @@ msgstr ""
419
435
  msgid "Unit tests can only be run from inside a valid module directory."
420
436
  msgstr ""
421
437
 
422
- #: ../lib/pdk/cli/test/unit.rb:41
438
+ #: ../lib/pdk/cli/test/unit.rb:53
423
439
  msgid "No unit test files with examples were found."
424
440
  msgstr ""
425
441
 
426
- #: ../lib/pdk/cli/test/unit.rb:43
442
+ #: ../lib/pdk/cli/test/unit.rb:55
427
443
  msgid "Unit Test Files:"
428
444
  msgstr ""
429
445
 
430
- #: ../lib/pdk/cli/test/unit.rb:52
446
+ #: ../lib/pdk/cli/test/unit.rb:64
431
447
  msgid "\t%{id}\t%{description}"
432
448
  msgstr ""
433
449
 
434
- #: ../lib/pdk/cli/test/unit.rb:57
450
+ #: ../lib/pdk/cli/test/unit.rb:69
435
451
  msgid "--verbose has no effect when not used with --list"
436
452
  msgstr ""
437
453
 
@@ -463,6 +479,14 @@ msgstr ""
463
479
  msgid "You can not specify --noop and --force when updating a module"
464
480
  msgstr ""
465
481
 
482
+ #: ../lib/pdk/cli/update.rb:30
483
+ msgid "This module has been updated to PDK %{module_pdk_version} which is newer than your PDK version (%{user_pdk_version}), proceed with caution!"
484
+ msgstr ""
485
+
486
+ #: ../lib/pdk/cli/update.rb:40
487
+ msgid "Please update your PDK installation and try again. You may also use the --force flag to override this and continue at your own risk."
488
+ msgstr ""
489
+
466
490
  #: ../lib/pdk/cli/util.rb:17
467
491
  msgid "This command must be run from inside a valid module (no metadata.json found)."
468
492
  msgstr ""
@@ -519,7 +543,7 @@ msgstr ""
519
543
  msgid "[Q %{current_number}/%{questions_total}]"
520
544
  msgstr ""
521
545
 
522
- #: ../lib/pdk/cli/util/interview.rb:34 ../lib/pdk/cli/util/interview.rb:43
546
+ #: ../lib/pdk/cli/util/interview.rb:36 ../lib/pdk/cli/util/interview.rb:40 ../lib/pdk/cli/util/interview.rb:49
523
547
  msgid "-->"
524
548
  msgstr ""
525
549
 
@@ -564,26 +588,91 @@ msgstr ""
564
588
  msgid "Run validations in parallel."
565
589
  msgstr ""
566
590
 
567
- #: ../lib/pdk/cli/validate.rb:34
591
+ #: ../lib/pdk/cli/validate.rb:35
568
592
  msgid "Available validators: %{validator_names}"
569
593
  msgstr ""
570
594
 
571
- #: ../lib/pdk/cli/validate.rb:41
595
+ #: ../lib/pdk/cli/validate.rb:42
572
596
  msgid "Code validation can only be run from inside a valid module directory"
573
597
  msgstr ""
574
598
 
575
- #: ../lib/pdk/cli/validate.rb:57
599
+ #: ../lib/pdk/cli/validate.rb:58
576
600
  msgid "Unknown validator '%{v}'. Available validators: %{validators}."
577
601
  msgstr ""
578
602
 
579
- #: ../lib/pdk/cli/validate.rb:67 ../lib/pdk/cli/validate.rb:71
603
+ #: ../lib/pdk/cli/validate.rb:68 ../lib/pdk/cli/validate.rb:72
580
604
  msgid "Running all available validators..."
581
605
  msgstr ""
582
606
 
583
- #: ../lib/pdk/cli/validate.rb:101
607
+ #: ../lib/pdk/cli/validate.rb:108
584
608
  msgid "Validating module using %{num_of_threads} threads"
585
609
  msgstr ""
586
610
 
611
+ #: ../lib/pdk/config.rb:55
612
+ msgid ""
613
+ "PDK collects anonymous usage information to help us understand how it is being used and make decisions on how to improve it. You can find out more about what data we collect and how it is used in the PDK documentation at %{url}.\n"
614
+ msgstr ""
615
+
616
+ #: ../lib/pdk/config.rb:61
617
+ msgid "You can opt in or out of the usage data collection at any time by editing the analytics configuration file at %{path} and changing the '%{key}' value."
618
+ msgstr ""
619
+
620
+ #: ../lib/pdk/config.rb:73
621
+ msgid "Do you consent to the collection of anonymous PDK usage information?"
622
+ msgstr ""
623
+
624
+ #: ../lib/pdk/config.rb:85
625
+ msgid "No answer given, opting out of analytics collection."
626
+ msgstr ""
627
+
628
+ #: ../lib/pdk/config/namespace.rb:59
629
+ msgid "Only PDK::Config::Namespace objects can be mounted into a namespace"
630
+ msgstr ""
631
+
632
+ #: ../lib/pdk/config/namespace.rb:203
633
+ msgid "Unable to open %{file} for reading"
634
+ msgstr ""
635
+
636
+ #: ../lib/pdk/config/namespace.rb:235
637
+ msgid "Unable to open %{file} for writing"
638
+ msgstr ""
639
+
640
+ #: ../lib/pdk/config/validator.rb:16
641
+ msgid "must be a boolean true or false"
642
+ msgstr ""
643
+
644
+ #: ../lib/pdk/config/validator.rb:26
645
+ msgid "must be a version 4 UUID"
646
+ msgstr ""
647
+
648
+ #: ../lib/pdk/config/value.rb:42
649
+ msgid "validator must be a Hash"
650
+ msgstr ""
651
+
652
+ #: ../lib/pdk/config/value.rb:43
653
+ msgid "the :proc key must contain a Proc"
654
+ msgstr ""
655
+
656
+ #: ../lib/pdk/config/value.rb:44
657
+ msgid "the :message key must contain a String"
658
+ msgstr ""
659
+
660
+ #: ../lib/pdk/config/value.rb:62
661
+ msgid "%{key} %{message}"
662
+ msgstr ""
663
+
664
+ #: ../lib/pdk/config/value.rb:76
665
+ msgid "must be passed a block"
666
+ msgstr ""
667
+
668
+ #: ../lib/pdk/config/yaml.rb:13
669
+ msgid "Syntax error when loading %{file}: %{error}"
670
+ msgstr ""
671
+
672
+ #: ../lib/pdk/config/yaml.rb:18
673
+ msgid "Unsupported class in %{file}: %{error}"
674
+ msgstr ""
675
+
587
676
  #: ../lib/pdk/generate/module.rb:24
588
677
  msgid ""
589
678
  "'%{module_name}' is not a valid module name.\n"
@@ -678,43 +767,43 @@ msgstr ""
678
767
  msgid "Use the up and down keys to move between the choices, space to select and enter to continue."
679
768
  msgstr ""
680
769
 
681
- #: ../lib/pdk/generate/module.rb:210
770
+ #: ../lib/pdk/generate/module.rb:211
682
771
  msgid "Summarize the purpose of this module in a single sentence."
683
772
  msgstr ""
684
773
 
685
- #: ../lib/pdk/generate/module.rb:211
774
+ #: ../lib/pdk/generate/module.rb:212
686
775
  msgid "This helps other Puppet users understand what the module does."
687
776
  msgstr ""
688
777
 
689
- #: ../lib/pdk/generate/module.rb:218
778
+ #: ../lib/pdk/generate/module.rb:219
690
779
  msgid "If there is a source code repository for this module, enter the URL here."
691
780
  msgstr ""
692
781
 
693
- #: ../lib/pdk/generate/module.rb:219
782
+ #: ../lib/pdk/generate/module.rb:220
694
783
  msgid "Skip this if no repository exists yet. You can update this later in the metadata.json."
695
784
  msgstr ""
696
785
 
697
- #: ../lib/pdk/generate/module.rb:226
786
+ #: ../lib/pdk/generate/module.rb:227
698
787
  msgid "If there is a URL where others can learn more about this module, enter it here."
699
788
  msgstr ""
700
789
 
701
- #: ../lib/pdk/generate/module.rb:227 ../lib/pdk/generate/module.rb:234
790
+ #: ../lib/pdk/generate/module.rb:228 ../lib/pdk/generate/module.rb:235
702
791
  msgid "Optional. You can update this later in the metadata.json."
703
792
  msgstr ""
704
793
 
705
- #: ../lib/pdk/generate/module.rb:233
794
+ #: ../lib/pdk/generate/module.rb:234
706
795
  msgid "If there is a public issue tracker for this module, enter its URL here."
707
796
  msgstr ""
708
797
 
709
- #: ../lib/pdk/generate/module.rb:260
798
+ #: ../lib/pdk/generate/module.rb:261
710
799
  msgid "update"
711
800
  msgstr ""
712
801
 
713
- #: ../lib/pdk/generate/module.rb:260
802
+ #: ../lib/pdk/generate/module.rb:261
714
803
  msgid "create"
715
804
  msgstr ""
716
805
 
717
- #: ../lib/pdk/generate/module.rb:261
806
+ #: ../lib/pdk/generate/module.rb:262
718
807
  msgid ""
719
808
  "\n"
720
809
  "We need to %{action} the metadata.json file for this module, so we\\'re going to ask you %{count} questions.\n"
@@ -722,19 +811,19 @@ msgid ""
722
811
  "\n"
723
812
  msgstr ""
724
813
 
725
- #: ../lib/pdk/generate/module.rb:275
814
+ #: ../lib/pdk/generate/module.rb:276
726
815
  msgid "No answers given, interview cancelled."
727
816
  msgstr ""
728
817
 
729
- #: ../lib/pdk/generate/module.rb:299
818
+ #: ../lib/pdk/generate/module.rb:300
730
819
  msgid "Metadata will be generated based on this information, continue?"
731
820
  msgstr ""
732
821
 
733
- #: ../lib/pdk/generate/module.rb:301
822
+ #: ../lib/pdk/generate/module.rb:302
734
823
  msgid "Interview cancelled; exiting."
735
824
  msgstr ""
736
825
 
737
- #: ../lib/pdk/generate/module.rb:305
826
+ #: ../lib/pdk/generate/module.rb:306
738
827
  msgid "Process cancelled; exiting."
739
828
  msgstr ""
740
829
 
@@ -814,10 +903,22 @@ msgstr ""
814
903
  msgid "A task named '%{name}' already exists in this module; defined in %{file}"
815
904
  msgstr ""
816
905
 
817
- #: ../lib/pdk/module/build.rb:149
906
+ #: ../lib/pdk/module/build.rb:127
907
+ msgid "%{message} Please rename the file or exclude it from the package by adding it to the .pdkignore file in your module."
908
+ msgstr ""
909
+
910
+ #: ../lib/pdk/module/build.rb:155
818
911
  msgid "Symlinks in modules are not supported and will not be included in the package. Please investigate symlink %{from} -> %{to}."
819
912
  msgstr ""
820
913
 
914
+ #: ../lib/pdk/module/build.rb:182
915
+ msgid "The path '%{path}' is longer than 256 bytes."
916
+ msgstr ""
917
+
918
+ #: ../lib/pdk/module/build.rb:206
919
+ msgid "'%{path}' could not be split at a directory separator into two parts, the first having a maximum length of 155 bytes and the second having a maximum length of 100 bytes."
920
+ msgstr ""
921
+
821
922
  #: ../lib/pdk/module/convert.rb:23 ../lib/pdk/module/update.rb:20
822
923
  msgid "No changes required."
823
924
  msgstr ""
@@ -878,93 +979,93 @@ msgstr ""
878
979
  msgid "Invalid JSON in metadata.json: %{msg}"
879
980
  msgstr ""
880
981
 
881
- #: ../lib/pdk/module/metadata.rb:139
982
+ #: ../lib/pdk/module/metadata.rb:140
882
983
  msgid "Module metadata does not contain any requirements."
883
984
  msgstr ""
884
985
 
885
- #: ../lib/pdk/module/metadata.rb:140
986
+ #: ../lib/pdk/module/metadata.rb:141
886
987
  msgid "Module metadata does not contain a \"puppet\" requirement."
887
988
  msgstr ""
888
989
 
889
- #: ../lib/pdk/module/metadata.rb:141
990
+ #: ../lib/pdk/module/metadata.rb:142
890
991
  msgid "The \"puppet\" requirement in module metadata does not specify a \"version_requirement\"."
891
992
  msgstr ""
892
993
 
893
- #: ../lib/pdk/module/metadata.rb:181
994
+ #: ../lib/pdk/module/metadata.rb:182
894
995
  msgid "Field must be a dash-separated user name and module name."
895
996
  msgstr ""
896
997
 
897
- #: ../lib/pdk/module/metadata.rb:183
998
+ #: ../lib/pdk/module/metadata.rb:184
898
999
  msgid "Module name must contain only alphanumeric or underscore characters."
899
1000
  msgstr ""
900
1001
 
901
- #: ../lib/pdk/module/metadata.rb:185
1002
+ #: ../lib/pdk/module/metadata.rb:186
902
1003
  msgid "Module name must begin with a letter."
903
1004
  msgstr ""
904
1005
 
905
- #: ../lib/pdk/module/metadata.rb:187
1006
+ #: ../lib/pdk/module/metadata.rb:188
906
1007
  msgid "Namespace must contain only alphanumeric characters."
907
1008
  msgstr ""
908
1009
 
909
- #: ../lib/pdk/module/metadata.rb:190
1010
+ #: ../lib/pdk/module/metadata.rb:191
910
1011
  msgid "Invalid 'name' field in metadata.json: %{err}"
911
1012
  msgstr ""
912
1013
 
913
- #: ../lib/pdk/module/templatedir.rb:42
1014
+ #: ../lib/pdk/module/templatedir.rb:43
914
1015
  msgid "%{class_name} must be initialized with a block."
915
1016
  msgstr ""
916
1017
 
917
- #: ../lib/pdk/module/templatedir.rb:45
1018
+ #: ../lib/pdk/module/templatedir.rb:46
918
1019
  msgid "PDK::Module::TemplateDir.new must be initialized with a PDK::Util::TemplateURI, got a %{uri_type}"
919
1020
  msgstr ""
920
1021
 
921
- #: ../lib/pdk/module/templatedir.rb:59
1022
+ #: ../lib/pdk/module/templatedir.rb:60
922
1023
  msgid "Repository '%{repo}' has a work-tree; skipping git reset."
923
1024
  msgstr ""
924
1025
 
925
- #: ../lib/pdk/module/templatedir.rb:118
1026
+ #: ../lib/pdk/module/templatedir.rb:122
926
1027
  msgid "Rendering '%{template}'..."
927
1028
  msgstr ""
928
1029
 
929
- #: ../lib/pdk/module/templatedir.rb:131
1030
+ #: ../lib/pdk/module/templatedir.rb:135
930
1031
  msgid ""
931
1032
  "Failed to render template '%{template}'\n"
932
1033
  "%{exception}: %{message}"
933
1034
  msgstr ""
934
1035
 
935
- #: ../lib/pdk/module/templatedir.rb:200
1036
+ #: ../lib/pdk/module/templatedir.rb:204
936
1037
  msgid "The built-in template has substantially changed. Please run \"pdk convert\" on your module to continue."
937
1038
  msgstr ""
938
1039
 
939
- #: ../lib/pdk/module/templatedir.rb:202
1040
+ #: ../lib/pdk/module/templatedir.rb:206
940
1041
  msgid "The specified template '%{path}' is not a directory."
941
1042
  msgstr ""
942
1043
 
943
- #: ../lib/pdk/module/templatedir.rb:207
1044
+ #: ../lib/pdk/module/templatedir.rb:211
944
1045
  msgid "The template at '%{path}' does not contain a 'moduleroot/' directory."
945
1046
  msgstr ""
946
1047
 
947
- #: ../lib/pdk/module/templatedir.rb:212
1048
+ #: ../lib/pdk/module/templatedir.rb:216
948
1049
  msgid "The template at '%{path}' does not contain a 'moduleroot_init/' directory, which indicates you are using an older style of template. Before continuing please use the --template-url flag when running the pdk new commands to pass a new style template."
949
1050
  msgstr ""
950
1051
 
951
- #: ../lib/pdk/module/templatedir.rb:227
1052
+ #: ../lib/pdk/module/templatedir.rb:232
952
1053
  msgid "The directory '%{dir}' doesn't exist"
953
1054
  msgstr ""
954
1055
 
955
- #: ../lib/pdk/module/templatedir.rb:282
1056
+ #: ../lib/pdk/module/templatedir.rb:301
956
1057
  msgid "'%{file}' is not a valid YAML file: %{problem} %{context} at line %{line} column %{column}"
957
1058
  msgstr ""
958
1059
 
959
- #: ../lib/pdk/module/templatedir.rb:317
1060
+ #: ../lib/pdk/module/templatedir.rb:336
960
1061
  msgid "Unable to clone git repository at '%{repo}' into '%{dest}'."
961
1062
  msgstr ""
962
1063
 
963
- #: ../lib/pdk/module/templatedir.rb:334
1064
+ #: ../lib/pdk/module/templatedir.rb:353
964
1065
  msgid "Unable to set HEAD of git repository at '%{repo}' to ref:'%{ref}'."
965
1066
  msgstr ""
966
1067
 
967
- #: ../lib/pdk/module/templatedir.rb:337
1068
+ #: ../lib/pdk/module/templatedir.rb:356
968
1069
  msgid "Uncommitted changes found when attempting to set HEAD of git repository at '%{repo}' to ref '%{ref}'; skipping git reset."
969
1070
  msgstr ""
970
1071
 
@@ -1092,11 +1193,15 @@ msgstr ""
1092
1193
  msgid "Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending."
1093
1194
  msgstr ""
1094
1195
 
1095
- #: ../lib/pdk/tests/unit.rb:197
1196
+ #: ../lib/pdk/tests/unit.rb:192
1197
+ msgid "Finding unit tests."
1198
+ msgstr ""
1199
+
1200
+ #: ../lib/pdk/tests/unit.rb:195
1096
1201
  msgid "Failed to find valid JSON in output from rspec: %{output}"
1097
1202
  msgstr ""
1098
1203
 
1099
- #: ../lib/pdk/tests/unit.rb:202
1204
+ #: ../lib/pdk/tests/unit.rb:200
1100
1205
  msgid "Unable to enumerate examples. rspec reported: %{message}"
1101
1206
  msgstr ""
1102
1207
 
@@ -1120,45 +1225,45 @@ msgstr ""
1120
1225
  msgid "Checking for missing Gemfile dependencies."
1121
1226
  msgstr ""
1122
1227
 
1123
- #: ../lib/pdk/util/bundler.rb:126
1228
+ #: ../lib/pdk/util/bundler.rb:122
1124
1229
  msgid "Vendored Gemfile.lock (%{source}) not found."
1125
1230
  msgstr ""
1126
1231
 
1127
- #: ../lib/pdk/util/bundler.rb:131
1232
+ #: ../lib/pdk/util/bundler.rb:127
1128
1233
  msgid "Using vendored Gemfile.lock from %{source}."
1129
1234
  msgstr ""
1130
1235
 
1131
- #: ../lib/pdk/util/bundler.rb:137
1236
+ #: ../lib/pdk/util/bundler.rb:133
1132
1237
  msgid "Resolving default Gemfile dependencies."
1133
1238
  msgstr ""
1134
1239
 
1135
- #: ../lib/pdk/util/bundler.rb:144
1240
+ #: ../lib/pdk/util/bundler.rb:140
1136
1241
  msgid "Unable to resolve default Gemfile dependencies."
1137
1242
  msgstr ""
1138
1243
 
1139
- #: ../lib/pdk/util/bundler.rb:157
1244
+ #: ../lib/pdk/util/bundler.rb:153
1140
1245
  msgid "Updating Gemfile dependencies."
1141
1246
  msgstr ""
1142
1247
 
1143
- #: ../lib/pdk/util/bundler.rb:185
1248
+ #: ../lib/pdk/util/bundler.rb:181
1144
1249
  msgid "Unable to resolve Gemfile dependencies."
1145
1250
  msgstr ""
1146
1251
 
1147
- #: ../lib/pdk/util/bundler.rb:196
1252
+ #: ../lib/pdk/util/bundler.rb:192
1148
1253
  msgid "Installing missing Gemfile dependencies."
1149
1254
  msgstr ""
1150
1255
 
1151
- #: ../lib/pdk/util/bundler.rb:204
1256
+ #: ../lib/pdk/util/bundler.rb:200
1152
1257
  msgid "Unable to install missing Gemfile dependencies."
1153
1258
  msgstr ""
1154
1259
 
1155
- #: ../lib/pdk/util/bundler.rb:218
1260
+ #: ../lib/pdk/util/bundler.rb:214
1156
1261
  msgid ""
1157
1262
  "Failed to generate binstubs for '%{gems}':\n"
1158
1263
  "%{output}"
1159
1264
  msgstr ""
1160
1265
 
1161
- #: ../lib/pdk/util/bundler.rb:219
1266
+ #: ../lib/pdk/util/bundler.rb:215
1162
1267
  msgid "Unable to install requested binstubs."
1163
1268
  msgstr ""
1164
1269
 
@@ -1226,39 +1331,39 @@ msgstr ""
1226
1331
  msgid "Failed to parse Puppet Enterprise version map file."
1227
1332
  msgstr ""
1228
1333
 
1229
- #: ../lib/pdk/util/ruby_version.rb:33
1334
+ #: ../lib/pdk/util/ruby_version.rb:36
1230
1335
  msgid "Unknown Ruby version \"%{ruby_version}\""
1231
1336
  msgstr ""
1232
1337
 
1233
- #: ../lib/pdk/util/template_uri.rb:33
1338
+ #: ../lib/pdk/util/template_uri.rb:49
1234
1339
  msgid "PDK::Util::TemplateURI attempted initialization with a non-uri string: {string}"
1235
1340
  msgstr ""
1236
1341
 
1237
- #: ../lib/pdk/util/template_uri.rb:150
1342
+ #: ../lib/pdk/util/template_uri.rb:155
1238
1343
  msgid "%{scp_uri} appears to be an SCP style URL; it will be converted to an RFC compliant URI: %{rfc_uri}"
1239
1344
  msgstr ""
1240
1345
 
1241
- #: ../lib/pdk/util/template_uri.rb:177
1346
+ #: ../lib/pdk/util/template_uri.rb:202
1242
1347
  msgid "--template-url"
1243
1348
  msgstr ""
1244
1349
 
1245
- #: ../lib/pdk/util/template_uri.rb:178
1350
+ #: ../lib/pdk/util/template_uri.rb:203
1246
1351
  msgid "metadata.json"
1247
1352
  msgstr ""
1248
1353
 
1249
- #: ../lib/pdk/util/template_uri.rb:179
1354
+ #: ../lib/pdk/util/template_uri.rb:204
1250
1355
  msgid "PDK answers"
1251
1356
  msgstr ""
1252
1357
 
1253
- #: ../lib/pdk/util/template_uri.rb:180
1358
+ #: ../lib/pdk/util/template_uri.rb:205
1254
1359
  msgid "default"
1255
1360
  msgstr ""
1256
1361
 
1257
- #: ../lib/pdk/util/template_uri.rb:201
1362
+ #: ../lib/pdk/util/template_uri.rb:226
1258
1363
  msgid "Unable to find a valid module template to use."
1259
1364
  msgstr ""
1260
1365
 
1261
- #: ../lib/pdk/util/template_uri.rb:222
1366
+ #: ../lib/pdk/util/template_uri.rb:247
1262
1367
  msgid "Unable to find a valid template at %{uri}"
1263
1368
  msgstr ""
1264
1369
 
@@ -1274,7 +1379,7 @@ msgstr ""
1274
1379
  msgid "Unable to download %{url}. Check internet connectivity and try again. %{error}"
1275
1380
  msgstr ""
1276
1381
 
1277
- #: ../lib/pdk/util/windows/api_types.rb:31
1382
+ #: ../lib/pdk/util/windows/api_types.rb:24
1278
1383
  msgid "Unable to convert value %{string} to encoding %{encoding} due to %{error}"
1279
1384
  msgstr ""
1280
1385
 
@@ -1282,23 +1387,27 @@ msgstr ""
1282
1387
  msgid "Failed to call GetLongPathName"
1283
1388
  msgstr ""
1284
1389
 
1285
- #: ../lib/pdk/validate/base_validator.rb:108
1390
+ #: ../lib/pdk/validate/base_validator.rb:59
1391
+ msgid "%{validator}: Skipped '%{target}'. Target directory does not exist."
1392
+ msgstr ""
1393
+
1394
+ #: ../lib/pdk/validate/base_validator.rb:110
1286
1395
  msgid "Invoking %{cmd}"
1287
1396
  msgstr ""
1288
1397
 
1289
- #: ../lib/pdk/validate/base_validator.rb:113
1398
+ #: ../lib/pdk/validate/base_validator.rb:115
1290
1399
  msgid "%{validator}: Skipped '%{target}'. Target does not contain any files to validate (%{pattern})."
1291
1400
  msgstr ""
1292
1401
 
1293
- #: ../lib/pdk/validate/base_validator.rb:117
1402
+ #: ../lib/pdk/validate/base_validator.rb:119
1294
1403
  msgid "Target does not contain any files to validate (%{pattern})."
1295
1404
  msgstr ""
1296
1405
 
1297
- #: ../lib/pdk/validate/base_validator.rb:126
1406
+ #: ../lib/pdk/validate/base_validator.rb:128
1298
1407
  msgid "%{validator}: Skipped '%{target}'. Target file not found."
1299
1408
  msgstr ""
1300
1409
 
1301
- #: ../lib/pdk/validate/base_validator.rb:130
1410
+ #: ../lib/pdk/validate/base_validator.rb:132
1302
1411
  msgid "File does not exist."
1303
1412
  msgstr ""
1304
1413