r10k 3.9.3 → 3.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec_tests.yml +1 -1
  3. data/.travis.yml +0 -10
  4. data/CHANGELOG.mkd +33 -0
  5. data/README.mkd +6 -0
  6. data/doc/dynamic-environments/configuration.mkd +25 -0
  7. data/doc/dynamic-environments/usage.mkd +26 -0
  8. data/doc/puppetfile.mkd +18 -5
  9. data/integration/Rakefile +3 -1
  10. data/integration/tests/basic_functionality/basic_deployment.rb +176 -0
  11. data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +3 -9
  12. data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +21 -25
  13. data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +3 -3
  14. data/integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb +3 -3
  15. data/integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb +3 -3
  16. data/lib/r10k/action/base.rb +1 -1
  17. data/lib/r10k/action/deploy/deploy_helpers.rb +4 -0
  18. data/lib/r10k/action/deploy/display.rb +1 -1
  19. data/lib/r10k/action/deploy/environment.rb +22 -9
  20. data/lib/r10k/action/deploy/module.rb +41 -11
  21. data/lib/r10k/action/puppetfile/check.rb +7 -5
  22. data/lib/r10k/action/puppetfile/install.rb +22 -16
  23. data/lib/r10k/action/puppetfile/purge.rb +12 -9
  24. data/lib/r10k/action/runner.rb +45 -10
  25. data/lib/r10k/action/visitor.rb +3 -0
  26. data/lib/r10k/cli/deploy.rb +5 -0
  27. data/lib/r10k/cli/puppetfile.rb +0 -1
  28. data/lib/r10k/content_synchronizer.rb +16 -4
  29. data/lib/r10k/environment/base.rb +64 -11
  30. data/lib/r10k/environment/with_modules.rb +6 -10
  31. data/lib/r10k/git/cache.rb +1 -1
  32. data/lib/r10k/git/rugged/credentials.rb +77 -0
  33. data/lib/r10k/git/stateful_repository.rb +8 -0
  34. data/lib/r10k/git.rb +3 -0
  35. data/lib/r10k/initializers.rb +4 -0
  36. data/lib/r10k/module/base.rb +42 -1
  37. data/lib/r10k/module/definition.rb +64 -0
  38. data/lib/r10k/module/forge.rb +16 -3
  39. data/lib/r10k/module/git.rb +23 -1
  40. data/lib/r10k/module/local.rb +6 -3
  41. data/lib/r10k/module/svn.rb +11 -0
  42. data/lib/r10k/module.rb +20 -2
  43. data/lib/r10k/module_loader/puppetfile/dsl.rb +42 -0
  44. data/lib/r10k/module_loader/puppetfile.rb +276 -0
  45. data/lib/r10k/puppetfile.rb +82 -160
  46. data/lib/r10k/settings/definition.rb +1 -1
  47. data/lib/r10k/settings.rb +58 -2
  48. data/lib/r10k/source/base.rb +10 -0
  49. data/lib/r10k/source/git.rb +5 -0
  50. data/lib/r10k/source/svn.rb +4 -0
  51. data/lib/r10k/util/purgeable.rb +74 -8
  52. data/lib/r10k/util/setopts.rb +2 -0
  53. data/lib/r10k/util/subprocess.rb +1 -0
  54. data/lib/r10k/version.rb +1 -1
  55. data/locales/r10k.pot +165 -65
  56. data/r10k.gemspec +2 -0
  57. data/spec/fixtures/unit/action/r10k_forge_auth.yaml +4 -0
  58. data/spec/fixtures/unit/action/r10k_forge_auth_no_url.yaml +3 -0
  59. data/spec/fixtures/unit/puppetfile/forge-override/Puppetfile +8 -0
  60. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile +10 -0
  61. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new +10 -0
  62. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_subdir_2/ignored_1 +0 -0
  63. data/spec/fixtures/unit/util/purgeable/managed_two/.hidden/unmanaged_3 +0 -0
  64. data/spec/r10k-mocks/mock_env.rb +3 -0
  65. data/spec/r10k-mocks/mock_source.rb +7 -3
  66. data/spec/unit/action/deploy/environment_spec.rb +105 -30
  67. data/spec/unit/action/deploy/module_spec.rb +232 -42
  68. data/spec/unit/action/puppetfile/check_spec.rb +17 -5
  69. data/spec/unit/action/puppetfile/install_spec.rb +42 -36
  70. data/spec/unit/action/puppetfile/purge_spec.rb +15 -17
  71. data/spec/unit/action/runner_spec.rb +122 -26
  72. data/spec/unit/environment/base_spec.rb +30 -17
  73. data/spec/unit/environment/git_spec.rb +2 -2
  74. data/spec/unit/environment/svn_spec.rb +4 -3
  75. data/spec/unit/environment/with_modules_spec.rb +2 -1
  76. data/spec/unit/git/cache_spec.rb +14 -0
  77. data/spec/unit/git/rugged/credentials_spec.rb +29 -0
  78. data/spec/unit/git/stateful_repository_spec.rb +5 -0
  79. data/spec/unit/module/base_spec.rb +54 -8
  80. data/spec/unit/module/forge_spec.rb +59 -5
  81. data/spec/unit/module/git_spec.rb +67 -9
  82. data/spec/unit/module/svn_spec.rb +35 -5
  83. data/spec/unit/module_loader/puppetfile_spec.rb +405 -0
  84. data/spec/unit/module_spec.rb +12 -1
  85. data/spec/unit/puppetfile_spec.rb +125 -189
  86. data/spec/unit/settings_spec.rb +47 -2
  87. data/spec/unit/util/purgeable_spec.rb +38 -6
  88. metadata +29 -3
data/locales/r10k.pot CHANGED
@@ -6,11 +6,11 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: r10k 3.4.1-231-g5574915\n"
9
+ "Project-Id-Version: r10k 3.9.3-110-gfe65c736\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppetlabs.com\n"
12
- "POT-Creation-Date: 2021-05-10 23:18+0000\n"
13
- "PO-Revision-Date: 2021-05-10 23:18+0000\n"
12
+ "POT-Creation-Date: 2021-09-15 21:23+0000\n"
13
+ "PO-Revision-Date: 2021-09-15 21:23+0000\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -31,59 +31,71 @@ msgstr ""
31
31
  msgid "Reason: %{write_lock}"
32
32
  msgstr ""
33
33
 
34
- #: ../lib/r10k/action/deploy/environment.rb:109
34
+ #: ../lib/r10k/action/deploy/environment.rb:118
35
35
  msgid "Environment(s) \\'%{environments}\\' cannot be found in any source and will not be deployed."
36
36
  msgstr ""
37
37
 
38
- #: ../lib/r10k/action/deploy/environment.rb:139
38
+ #: ../lib/r10k/action/deploy/environment.rb:138
39
+ msgid "Executing postrun command."
40
+ msgstr ""
41
+
42
+ #: ../lib/r10k/action/deploy/environment.rb:152
39
43
  msgid "Environment %{env_dir} does not match environment name filter, skipping"
40
44
  msgstr ""
41
45
 
42
- #: ../lib/r10k/action/deploy/environment.rb:147
46
+ #: ../lib/r10k/action/deploy/environment.rb:160
43
47
  msgid "Deploying environment %{env_path}"
44
48
  msgstr ""
45
49
 
46
- #: ../lib/r10k/action/deploy/environment.rb:150
50
+ #: ../lib/r10k/action/deploy/environment.rb:163
47
51
  msgid "Environment %{env_dir} is now at %{env_signature}"
48
52
  msgstr ""
49
53
 
50
- #: ../lib/r10k/action/deploy/environment.rb:154
54
+ #: ../lib/r10k/action/deploy/environment.rb:167
51
55
  msgid "Environment %{env_dir} is new, updating all modules"
52
56
  msgstr ""
53
57
 
54
- #: ../lib/r10k/action/deploy/module.rb:78
58
+ #: ../lib/r10k/action/deploy/module.rb:82
59
+ msgid "Running postrun command for environments: %{envs_to_run}."
60
+ msgstr ""
61
+
62
+ #: ../lib/r10k/action/deploy/module.rb:92
63
+ msgid "No environments were modified, not executing postrun command."
64
+ msgstr ""
65
+
66
+ #: ../lib/r10k/action/deploy/module.rb:104
55
67
  msgid "Only updating modules in environment(s) %{opt_env} skipping environment %{env_path}"
56
68
  msgstr ""
57
69
 
58
- #: ../lib/r10k/action/deploy/module.rb:80
70
+ #: ../lib/r10k/action/deploy/module.rb:106
59
71
  msgid "Updating modules %{modules} in environment %{env_path}"
60
72
  msgstr ""
61
73
 
62
- #: ../lib/r10k/action/puppetfile/check.rb:16
74
+ #: ../lib/r10k/action/puppetfile/check.rb:18
63
75
  msgid "Syntax OK"
64
76
  msgstr ""
65
77
 
66
- #: ../lib/r10k/action/runner.rb:54 ../lib/r10k/deployment/config.rb:42
78
+ #: ../lib/r10k/action/runner.rb:57 ../lib/r10k/deployment/config.rb:42
67
79
  msgid "Overriding config file setting '%{key}': '%{old_val}' -> '%{new_val}'"
68
80
  msgstr ""
69
81
 
70
- #: ../lib/r10k/action/runner.rb:91
82
+ #: ../lib/r10k/action/runner.rb:99
71
83
  msgid "Reading configuration from %{config_path}"
72
84
  msgstr ""
73
85
 
74
- #: ../lib/r10k/action/runner.rb:94
86
+ #: ../lib/r10k/action/runner.rb:102
75
87
  msgid "No config file explicitly given and no default config file could be found, default settings will be used."
76
88
  msgstr ""
77
89
 
78
- #: ../lib/r10k/content_synchronizer.rb:13
90
+ #: ../lib/r10k/content_synchronizer.rb:33
79
91
  msgid "Updating modules with %{pool_size} threads"
80
92
  msgstr ""
81
93
 
82
- #: ../lib/r10k/content_synchronizer.rb:24
94
+ #: ../lib/r10k/content_synchronizer.rb:46
83
95
  msgid "Error during concurrent deploy of a module: %{message}"
84
96
  msgstr ""
85
97
 
86
- #: ../lib/r10k/content_synchronizer.rb:52
98
+ #: ../lib/r10k/content_synchronizer.rb:87
87
99
  msgid "Module thread %{id} exiting: %{message}"
88
100
  msgstr ""
89
101
 
@@ -95,7 +107,7 @@ msgstr ""
95
107
  msgid "Unable to load sources; the supplied configuration does not define the 'sources' key"
96
108
  msgstr ""
97
109
 
98
- #: ../lib/r10k/environment/base.rb:65 ../lib/r10k/environment/base.rb:81 ../lib/r10k/environment/base.rb:90 ../lib/r10k/source/base.rb:69
110
+ #: ../lib/r10k/environment/base.rb:89 ../lib/r10k/environment/base.rb:105 ../lib/r10k/environment/base.rb:114 ../lib/r10k/source/base.rb:83
99
111
  msgid "%{class} has not implemented method %{method}"
100
112
  msgstr ""
101
113
 
@@ -207,54 +219,106 @@ msgstr ""
207
219
  msgid "Rugged versions prior to 0.24.0 do not support pruning stale branches during fetch, please upgrade your \\'rugged\\' gem. (Current version is: %{version})"
208
220
  msgstr ""
209
221
 
210
- #: ../lib/r10k/git/rugged/credentials.rb:24
222
+ #: ../lib/r10k/git/rugged/credentials.rb:28
211
223
  msgid "Authentication failed for Git remote %{url}."
212
224
  msgstr ""
213
225
 
214
- #: ../lib/r10k/git/rugged/credentials.rb:48
226
+ #: ../lib/r10k/git/rugged/credentials.rb:52
215
227
  msgid "Using per-repository private key %{key} for URL %{url}"
216
228
  msgstr ""
217
229
 
218
- #: ../lib/r10k/git/rugged/credentials.rb:51
230
+ #: ../lib/r10k/git/rugged/credentials.rb:55
219
231
  msgid "URL %{url} has no per-repository private key using '%{key}'."
220
232
  msgstr ""
221
233
 
222
- #: ../lib/r10k/git/rugged/credentials.rb:53
234
+ #: ../lib/r10k/git/rugged/credentials.rb:57
223
235
  msgid "Git remote %{url} uses the SSH protocol but no private key was given"
224
236
  msgstr ""
225
237
 
226
- #: ../lib/r10k/git/rugged/credentials.rb:57
238
+ #: ../lib/r10k/git/rugged/credentials.rb:61
227
239
  msgid "Unable to use SSH key auth for %{url}: private key %{private_key} is missing or unreadable"
228
240
  msgstr ""
229
241
 
230
- #: ../lib/r10k/git/rugged/credentials.rb:84
242
+ #: ../lib/r10k/git/rugged/credentials.rb:102
231
243
  msgid "Using OAuth token from stdin for URL %{url}"
232
244
  msgstr ""
233
245
 
234
- #: ../lib/r10k/git/rugged/credentials.rb:87
246
+ #: ../lib/r10k/git/rugged/credentials.rb:105
235
247
  msgid "Using OAuth token from %{token_path} for URL %{url}"
236
248
  msgstr ""
237
249
 
238
- #: ../lib/r10k/git/rugged/credentials.rb:89
250
+ #: ../lib/r10k/git/rugged/credentials.rb:107
239
251
  msgid "%{path} is missing or unreadable, cannot load OAuth token"
240
252
  msgstr ""
241
253
 
242
- #: ../lib/r10k/git/rugged/credentials.rb:93
254
+ #: ../lib/r10k/git/rugged/credentials.rb:111
243
255
  msgid "Supplied OAuth token contains invalid characters."
244
256
  msgstr ""
245
257
 
246
- #: ../lib/r10k/git/rugged/credentials.rb:117
258
+ #: ../lib/r10k/git/rugged/credentials.rb:135
247
259
  msgid "URL %{url} includes the username %{username}, using that user for authentication."
248
260
  msgstr ""
249
261
 
250
- #: ../lib/r10k/git/rugged/credentials.rb:120
262
+ #: ../lib/r10k/git/rugged/credentials.rb:138
251
263
  msgid "URL %{url} did not specify a user, using %{user} from configuration"
252
264
  msgstr ""
253
265
 
254
- #: ../lib/r10k/git/rugged/credentials.rb:123
266
+ #: ../lib/r10k/git/rugged/credentials.rb:141
255
267
  msgid "URL %{url} did not specify a user, using current user %{user}"
256
268
  msgstr ""
257
269
 
270
+ #: ../lib/r10k/git/rugged/credentials.rb:148
271
+ msgid "Github App id contains invalid characters."
272
+ msgstr ""
273
+
274
+ #: ../lib/r10k/git/rugged/credentials.rb:149
275
+ msgid "Github App token ttl contains invalid characters."
276
+ msgstr ""
277
+
278
+ #: ../lib/r10k/git/rugged/credentials.rb:150
279
+ msgid "Github App key is missing or unreadable"
280
+ msgstr ""
281
+
282
+ #: ../lib/r10k/git/rugged/credentials.rb:155
283
+ msgid "Github App key is not a valid SSL private key"
284
+ msgstr ""
285
+
286
+ #: ../lib/r10k/git/rugged/credentials.rb:158
287
+ msgid "Github App key is not a valid SSL key"
288
+ msgstr ""
289
+
290
+ #: ../lib/r10k/git/rugged/credentials.rb:161
291
+ msgid "Using Github App id %{app_id} with SSL key from %{key_path}"
292
+ msgstr ""
293
+
294
+ #: ../lib/r10k/git/rugged/credentials.rb:178
295
+ msgid ""
296
+ "Unexpected response code: #{get_response.code}\n"
297
+ "Response body: #{get_response.body}"
298
+ msgstr ""
299
+
300
+ #: ../lib/r10k/git/rugged/credentials.rb:179
301
+ msgid "Error using private key to get Github App access token from url"
302
+ msgstr ""
303
+
304
+ #: ../lib/r10k/git/rugged/credentials.rb:194
305
+ msgid ""
306
+ "Unexpected response code: #{post_response.code}\n"
307
+ "Response body: #{post_response.body}"
308
+ msgstr ""
309
+
310
+ #: ../lib/r10k/git/rugged/credentials.rb:195
311
+ msgid "Error using private key to generate access token from #{access_token_url}"
312
+ msgstr ""
313
+
314
+ #: ../lib/r10k/git/rugged/credentials.rb:200
315
+ msgid "Github App token contains invalid characters."
316
+ msgstr ""
317
+
318
+ #: ../lib/r10k/git/rugged/credentials.rb:202
319
+ msgid "Github App token generated, expires at: %{expire}"
320
+ msgstr ""
321
+
258
322
  #: ../lib/r10k/git/rugged/thin_repository.rb:85 ../lib/r10k/git/shellgit/thin_repository.rb:65
259
323
  msgid "Updated repo %{path} to include alternate object db path %{objects_dir}"
260
324
  msgstr ""
@@ -271,31 +335,31 @@ msgstr ""
271
335
  msgid "Found local modifications in %{file_path}"
272
336
  msgstr ""
273
337
 
274
- #: ../lib/r10k/git/stateful_repository.rb:44
338
+ #: ../lib/r10k/git/stateful_repository.rb:45
275
339
  msgid "Unable to sync repo to unresolvable ref '%{ref}'"
276
340
  msgstr ""
277
341
 
278
- #: ../lib/r10k/git/stateful_repository.rb:51
342
+ #: ../lib/r10k/git/stateful_repository.rb:53
279
343
  msgid "Cloning %{repo_path} and checking out %{ref}"
280
344
  msgstr ""
281
345
 
282
- #: ../lib/r10k/git/stateful_repository.rb:54
346
+ #: ../lib/r10k/git/stateful_repository.rb:56
283
347
  msgid "Replacing %{repo_path} and checking out %{ref}"
284
348
  msgstr ""
285
349
 
286
- #: ../lib/r10k/git/stateful_repository.rb:58 ../lib/r10k/git/stateful_repository.rb:63
350
+ #: ../lib/r10k/git/stateful_repository.rb:60 ../lib/r10k/git/stateful_repository.rb:65
287
351
  msgid "Updating %{repo_path} to %{ref}"
288
352
  msgstr ""
289
353
 
290
- #: ../lib/r10k/git/stateful_repository.rb:62
354
+ #: ../lib/r10k/git/stateful_repository.rb:64
291
355
  msgid "Overwriting local modifications to %{repo_path}"
292
356
  msgstr ""
293
357
 
294
- #: ../lib/r10k/git/stateful_repository.rb:66
358
+ #: ../lib/r10k/git/stateful_repository.rb:68
295
359
  msgid "Skipping %{repo_path} due to local modifications"
296
360
  msgstr ""
297
361
 
298
- #: ../lib/r10k/git/stateful_repository.rb:69
362
+ #: ../lib/r10k/git/stateful_repository.rb:72
299
363
  msgid "%{repo_path} is already at Git ref %{ref}"
300
364
  msgstr ""
301
365
 
@@ -315,35 +379,55 @@ msgstr ""
315
379
  msgid "Invalid log level '%{val}'. Valid levels are %{log_levels}"
316
380
  msgstr ""
317
381
 
318
- #: ../lib/r10k/module.rb:29
382
+ #: ../lib/r10k/module.rb:45
319
383
  msgid "Module %{name} with args %{args} doesn't have an implementation. (Are you using the right arguments?)"
320
384
  msgstr ""
321
385
 
322
- #: ../lib/r10k/module/base.rb:75
386
+ #: ../lib/r10k/module/base.rb:83
387
+ msgid "Spec dir for #{@title} will not be deleted because it is not in the moduledir"
388
+ msgstr ""
389
+
390
+ #: ../lib/r10k/module/base.rb:95
391
+ msgid "Deleting spec data at #{spec_path}"
392
+ msgstr ""
393
+
394
+ #: ../lib/r10k/module/base.rb:103
395
+ msgid "No spec dir detected at #{spec_path}, skipping deletion"
396
+ msgstr ""
397
+
398
+ #: ../lib/r10k/module/base.rb:116
323
399
  msgid "Deploying module to %{path}"
324
400
  msgstr ""
325
401
 
326
- #: ../lib/r10k/module/base.rb:78
402
+ #: ../lib/r10k/module/base.rb:119
327
403
  msgid "Only updating modules %{modules}, skipping module %{name}"
328
404
  msgstr ""
329
405
 
330
- #: ../lib/r10k/module/base.rb:134
406
+ #: ../lib/r10k/module/base.rb:175
331
407
  msgid "Module name (%{title}) must match either 'modulename' or 'owner/modulename'"
332
408
  msgstr ""
333
409
 
334
- #: ../lib/r10k/module/forge.rb:88 ../lib/r10k/module/forge.rb:117
410
+ #: ../lib/r10k/module/definition.rb:28
411
+ msgid "Not updating module %{name}, assuming content unchanged"
412
+ msgstr ""
413
+
414
+ #: ../lib/r10k/module/forge.rb:98
415
+ msgid "The module %{title} does not appear to have any published releases, cannot determine latest version."
416
+ msgstr ""
417
+
418
+ #: ../lib/r10k/module/forge.rb:101 ../lib/r10k/module/forge.rb:130
335
419
  msgid "The module %{title} does not exist on %{url}."
336
420
  msgstr ""
337
421
 
338
- #: ../lib/r10k/module/forge.rb:192
422
+ #: ../lib/r10k/module/forge.rb:205
339
423
  msgid "Forge module names must match 'owner/modulename', instead got #{title}"
340
424
  msgstr ""
341
425
 
342
- #: ../lib/r10k/module/git.rb:66
426
+ #: ../lib/r10k/module/git.rb:81
343
427
  msgid "Cannot track control repo branch for content '%{name}' when not part of a git-backed environment, will use default if available."
344
428
  msgstr ""
345
429
 
346
- #: ../lib/r10k/module/local.rb:35
430
+ #: ../lib/r10k/module/local.rb:33
347
431
  msgid "Module %{title} is a local module, always indicating synced."
348
432
  msgstr ""
349
433
 
@@ -351,27 +435,43 @@ msgstr ""
351
435
  msgid "Could not read metadata.json"
352
436
  msgstr ""
353
437
 
354
- #: ../lib/r10k/puppetfile.rb:73
438
+ #: ../lib/r10k/module_loader/puppetfile.rb:58
355
439
  msgid "Using Puppetfile '%{puppetfile}'"
356
440
  msgstr ""
357
441
 
358
- #: ../lib/r10k/puppetfile.rb:87
359
- msgid "Puppetfile %{path} missing or unreadable"
442
+ #: ../lib/r10k/module_loader/puppetfile.rb:59
443
+ msgid "Using moduledir '%{moduledir}'"
360
444
  msgstr ""
361
445
 
362
- #: ../lib/r10k/puppetfile.rb:100
446
+ #: ../lib/r10k/module_loader/puppetfile.rb:80
363
447
  msgid "Failed to evaluate %{path}"
364
448
  msgstr ""
365
449
 
366
- #: ../lib/r10k/puppetfile.rb:114
450
+ #: ../lib/r10k/module_loader/puppetfile.rb:97
451
+ msgid "Unable to preload Puppetfile because of %{msg}"
452
+ msgstr ""
453
+
454
+ #: ../lib/r10k/module_loader/puppetfile.rb:115
455
+ msgid "Using Forge from Puppetfile: %{forge}"
456
+ msgstr ""
457
+
458
+ #: ../lib/r10k/module_loader/puppetfile.rb:118
459
+ msgid "Ignoring Forge declaration in Puppetfile, using value from settings: %{forge}."
460
+ msgstr ""
461
+
462
+ #: ../lib/r10k/module_loader/puppetfile.rb:179 ../lib/r10k/puppetfile.rb:104
463
+ msgid "Puppetfile %{path} missing or unreadable"
464
+ msgstr ""
465
+
466
+ #: ../lib/r10k/module_loader/puppetfile.rb:215
367
467
  msgid "Puppetfiles cannot contain duplicate module names."
368
468
  msgstr ""
369
469
 
370
- #: ../lib/r10k/puppetfile.rb:116
470
+ #: ../lib/r10k/module_loader/puppetfile.rb:217
371
471
  msgid "Remove the duplicates of the following modules: %{dupes}"
372
472
  msgstr ""
373
473
 
374
- #: ../lib/r10k/puppetfile.rb:276
474
+ #: ../lib/r10k/module_loader/puppetfile/dsl.rb:37
375
475
  msgid "unrecognized declaration '%{method}'"
376
476
  msgstr ""
377
477
 
@@ -454,27 +554,27 @@ msgid ""
454
554
  "Returned: %{data}"
455
555
  msgstr ""
456
556
 
457
- #: ../lib/r10k/source/git.rb:77
557
+ #: ../lib/r10k/source/git.rb:75
458
558
  msgid "Fetching '%{remote}' to determine current branches."
459
559
  msgstr ""
460
560
 
461
- #: ../lib/r10k/source/git.rb:80
561
+ #: ../lib/r10k/source/git.rb:78
462
562
  msgid "Unable to determine current branches for Git source '%{name}' (%{basedir})"
463
563
  msgstr ""
464
564
 
465
- #: ../lib/r10k/source/git.rb:110
565
+ #: ../lib/r10k/source/git.rb:113
466
566
  msgid "Environment %{env_name} contained non-word characters, correcting name to %{corrected_env_name}"
467
567
  msgstr ""
468
568
 
469
- #: ../lib/r10k/source/git.rb:119
569
+ #: ../lib/r10k/source/git.rb:122
470
570
  msgid "Environment %{env_name} contained non-word characters, ignoring it."
471
571
  msgstr ""
472
572
 
473
- #: ../lib/r10k/source/git.rb:138 ../lib/r10k/source/svn.rb:113
573
+ #: ../lib/r10k/source/git.rb:141 ../lib/r10k/source/svn.rb:115
474
574
  msgid "Branch %{branch} filtered out by ignore_branch_prefixes %{ibp}"
475
575
  msgstr ""
476
576
 
477
- #: ../lib/r10k/source/git.rb:149
577
+ #: ../lib/r10k/source/git.rb:152
478
578
  msgid "Branch `%{name}:%{branch}` filtered out by filter_command %{cmd}"
479
579
  msgstr ""
480
580
 
@@ -518,23 +618,23 @@ msgstr ""
518
618
  msgid "pe_license feature is not available, PE only Puppet modules will not be downloadable."
519
619
  msgstr ""
520
620
 
521
- #: ../lib/r10k/util/purgeable.rb:52
522
- msgid "Not purging %{item} due to internal exclusion match: %{exclusion_match}"
621
+ #: ../lib/r10k/util/purgeable.rb:87
622
+ msgid "Not purging %{path} due to internal exclusion match: %{exclusion_match}"
523
623
  msgstr ""
524
624
 
525
- #: ../lib/r10k/util/purgeable.rb:54
526
- msgid "Not purging %{item} due to whitelist match: %{whitelist_match}"
625
+ #: ../lib/r10k/util/purgeable.rb:89
626
+ msgid "Not purging %{path} due to whitelist match: %{allowlist_match}"
527
627
  msgstr ""
528
628
 
529
- #: ../lib/r10k/util/purgeable.rb:71
629
+ #: ../lib/r10k/util/purgeable.rb:133
530
630
  msgid "No unmanaged contents in %{managed_dirs}, nothing to purge"
531
631
  msgstr ""
532
632
 
533
- #: ../lib/r10k/util/purgeable.rb:76
633
+ #: ../lib/r10k/util/purgeable.rb:138
534
634
  msgid "Removing unmanaged path %{path}"
535
635
  msgstr ""
536
636
 
537
- #: ../lib/r10k/util/purgeable.rb:81
637
+ #: ../lib/r10k/util/purgeable.rb:143
538
638
  msgid "Unable to remove unmanaged path: %{path}"
539
639
  msgstr ""
540
640
 
data/r10k.gemspec CHANGED
@@ -36,6 +36,8 @@ Gem::Specification.new do |s|
36
36
  s.add_dependency 'fast_gettext', '~> 1.1.0'
37
37
  s.add_dependency 'gettext', ['>= 3.0.2', '< 3.3.0']
38
38
 
39
+ s.add_dependency 'jwt', '~> 2.2.3'
40
+
39
41
  s.add_development_dependency 'rspec', '~> 3.1'
40
42
 
41
43
  s.add_development_dependency 'rake'
@@ -0,0 +1,4 @@
1
+ ---
2
+ forge:
3
+ baseurl: 'http://private-forge.com'
4
+ authorization_token: 'faketoken'
@@ -0,0 +1,3 @@
1
+ ---
2
+ forge:
3
+ authorization_token: 'faketoken'
@@ -0,0 +1,8 @@
1
+ forge "my.custom.forge.com"
2
+
3
+ mod "puppetlabs/stdlib", '4.12.0'
4
+ mod "puppetlabs/concat", '2.1.0'
5
+
6
+ mod 'apache',
7
+ :git => 'https://github.com/puppetlabs/puppetlabs-apache',
8
+ :branch => 'docs_experiment'
@@ -0,0 +1,10 @@
1
+ mod 'puppetlabs/apt', '2.1.1'
2
+ mod 'puppetlabs/stdlib', :latest
3
+ mod 'puppetlabs/concat'
4
+ mod 'puppetlabs/rpm', '2.1.1-pre1'
5
+ mod 'foo', git: 'this/remote', branch: 'main'
6
+ mod 'bar', git: 'this/remote', tag: 'v1.2.3'
7
+ mod 'baz', git: 'this/remote', commit: '123abc456'
8
+ mod 'fizz', git: 'this/remote', ref: '1234567890abcdef1234567890abcdef12345678'
9
+ mod 'buzz', git: 'this/remote', ref: 'refs/heads/main'
10
+ mod 'canary', local: true
@@ -0,0 +1,10 @@
1
+ mod 'puppetlabs/apt', '3.0.0'
2
+ mod 'puppetlabs/stdlib', :latest
3
+ mod 'puppetlabs/concat'
4
+ mod 'puppetlabs/rpm', '2.1.1-pre1'
5
+ mod 'foo', git: 'this/remote', branch: 'main'
6
+ mod 'bar', git: 'this/remote', tag: 'v1.2.3'
7
+ mod 'baz', git: 'this/remote', commit: '123abc456'
8
+ mod 'fizz', git: 'this/remote', ref: '1234567890abcdef1234567890abcdef12345678'
9
+ mod 'buzz', git: 'this/remote', ref: 'refs/heads/main'
10
+ mod 'canary', local: true
@@ -1,6 +1,9 @@
1
1
  require 'r10k/environment'
2
+ require 'r10k/util/purgeable'
2
3
 
3
4
  class R10K::Environment::Mock < R10K::Environment::Base
5
+ include R10K::Util::Purgeable
6
+
4
7
  def sync
5
8
  "synced"
6
9
  end
@@ -5,9 +5,13 @@ class R10K::Source::Mock < R10K::Source::Base
5
5
  R10K::Source.register(:mock, self)
6
6
 
7
7
  def environments
8
- corrected_environment_names = @options[:environments].map do |env|
9
- R10K::Environment::Name.new(env, :prefix => @prefix, :invalid => 'correct_and_warn')
8
+ if @_environments.nil?
9
+ corrected_environment_names = @options[:environments].map do |env|
10
+ R10K::Environment::Name.new(env, :prefix => @prefix, :invalid => 'correct_and_warn')
11
+ end
12
+ @_environments = corrected_environment_names.map { |env| R10K::Environment::Mock.new(env.name, @basedir, env.dirname, { overrides: @options[:overrides] }) }
10
13
  end
11
- corrected_environment_names.map { |env| R10K::Environment::Mock.new(env.name, @basedir, env.dirname, { overrides: @options[:overrides] }) }
14
+
15
+ @_environments
12
16
  end
13
17
  end