r10k 3.11.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docker.yml +1 -1
  3. data/.github/workflows/rspec_tests.yml +2 -2
  4. data/.travis.yml +1 -1
  5. data/CHANGELOG.mkd +34 -0
  6. data/doc/dynamic-environments/configuration.mkd +35 -7
  7. data/doc/dynamic-environments/usage.mkd +26 -0
  8. data/doc/puppetfile.mkd +16 -4
  9. data/integration/tests/basic_functionality/basic_deployment.rb +176 -0
  10. data/lib/r10k/action/base.rb +1 -1
  11. data/lib/r10k/action/deploy/deploy_helpers.rb +4 -0
  12. data/lib/r10k/action/deploy/display.rb +1 -1
  13. data/lib/r10k/action/deploy/environment.rb +13 -8
  14. data/lib/r10k/action/deploy/module.rb +14 -10
  15. data/lib/r10k/action/puppetfile/check.rb +7 -5
  16. data/lib/r10k/action/puppetfile/install.rb +22 -16
  17. data/lib/r10k/action/puppetfile/purge.rb +12 -9
  18. data/lib/r10k/action/runner.rb +6 -0
  19. data/lib/r10k/action/visitor.rb +3 -0
  20. data/lib/r10k/cli/deploy.rb +1 -0
  21. data/lib/r10k/cli/puppetfile.rb +0 -1
  22. data/lib/r10k/content_synchronizer.rb +16 -4
  23. data/lib/r10k/environment/bare.rb +4 -7
  24. data/lib/r10k/environment/base.rb +64 -11
  25. data/lib/r10k/environment/name.rb +14 -9
  26. data/lib/r10k/environment/plain.rb +16 -0
  27. data/lib/r10k/environment/tarball.rb +78 -0
  28. data/lib/r10k/environment/with_modules.rb +6 -10
  29. data/lib/r10k/environment.rb +2 -0
  30. data/lib/r10k/errors.rb +5 -0
  31. data/lib/r10k/forge/module_release.rb +2 -1
  32. data/lib/r10k/git/cache.rb +4 -13
  33. data/lib/r10k/git/rugged/base_repository.rb +12 -1
  34. data/lib/r10k/git/rugged/cache.rb +8 -0
  35. data/lib/r10k/git/stateful_repository.rb +9 -0
  36. data/lib/r10k/initializers.rb +21 -7
  37. data/lib/r10k/logging.rb +78 -1
  38. data/lib/r10k/module/base.rb +5 -1
  39. data/lib/r10k/module/definition.rb +64 -0
  40. data/lib/r10k/module/forge.rb +10 -2
  41. data/lib/r10k/module/git.rb +22 -1
  42. data/lib/r10k/module/local.rb +6 -3
  43. data/lib/r10k/module/svn.rb +10 -0
  44. data/lib/r10k/module/tarball.rb +101 -0
  45. data/lib/r10k/module.rb +21 -2
  46. data/lib/r10k/module_loader/puppetfile/dsl.rb +8 -3
  47. data/lib/r10k/module_loader/puppetfile.rb +109 -30
  48. data/lib/r10k/puppetfile.rb +1 -2
  49. data/lib/r10k/settings.rb +46 -0
  50. data/lib/r10k/source/git.rb +18 -18
  51. data/lib/r10k/source/yaml.rb +1 -1
  52. data/lib/r10k/tarball.rb +183 -0
  53. data/lib/r10k/util/cacheable.rb +31 -0
  54. data/lib/r10k/util/downloader.rb +134 -0
  55. data/lib/r10k/util/purgeable.rb +6 -2
  56. data/lib/r10k/util/setopts.rb +2 -0
  57. data/lib/r10k/util/subprocess.rb +1 -0
  58. data/lib/r10k/version.rb +1 -1
  59. data/locales/r10k.pot +119 -71
  60. data/r10k.gemspec +2 -2
  61. data/r10k.yaml.example +28 -0
  62. data/spec/fixtures/tarball/tarball.tar.gz +0 -0
  63. data/spec/fixtures/unit/action/r10k_logging.yaml +12 -0
  64. data/spec/fixtures/unit/puppetfile/forge-override/Puppetfile +8 -0
  65. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile +10 -0
  66. data/spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new +10 -0
  67. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_symlink_file +1 -0
  68. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/{managed_subdir_2 → subdir_allowlisted_2}/ignored_1 +0 -0
  69. data/spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/unmanaged_symlink_dir +1 -0
  70. data/spec/fixtures/unit/util/purgeable/managed_one/managed_symlink_dir +1 -0
  71. data/spec/fixtures/unit/util/purgeable/managed_one/unmanaged_symlink_file +1 -0
  72. data/spec/integration/git/rugged/cache_spec.rb +33 -0
  73. data/spec/integration/util/purageable_spec.rb +41 -0
  74. data/spec/r10k-mocks/mock_env.rb +3 -0
  75. data/spec/r10k-mocks/mock_source.rb +7 -3
  76. data/spec/shared-contexts/tarball.rb +32 -0
  77. data/spec/spec_helper.rb +1 -0
  78. data/spec/unit/action/deploy/environment_spec.rb +80 -30
  79. data/spec/unit/action/deploy/module_spec.rb +52 -64
  80. data/spec/unit/action/puppetfile/check_spec.rb +17 -5
  81. data/spec/unit/action/puppetfile/install_spec.rb +42 -36
  82. data/spec/unit/action/puppetfile/purge_spec.rb +15 -17
  83. data/spec/unit/action/runner_spec.rb +52 -9
  84. data/spec/unit/environment/bare_spec.rb +13 -0
  85. data/spec/unit/environment/base_spec.rb +30 -17
  86. data/spec/unit/environment/git_spec.rb +2 -2
  87. data/spec/unit/environment/name_spec.rb +18 -0
  88. data/spec/unit/environment/plain_spec.rb +8 -0
  89. data/spec/unit/environment/svn_spec.rb +4 -3
  90. data/spec/unit/environment/tarball_spec.rb +45 -0
  91. data/spec/unit/environment/with_modules_spec.rb +3 -2
  92. data/spec/unit/git/cache_spec.rb +2 -15
  93. data/spec/unit/git/rugged/cache_spec.rb +19 -0
  94. data/spec/unit/module/base_spec.rb +8 -8
  95. data/spec/unit/module/forge_spec.rb +32 -4
  96. data/spec/unit/module/git_spec.rb +51 -10
  97. data/spec/unit/module/svn_spec.rb +18 -6
  98. data/spec/unit/module/tarball_spec.rb +70 -0
  99. data/spec/unit/module_loader/puppetfile_spec.rb +96 -31
  100. data/spec/unit/puppetfile_spec.rb +2 -2
  101. data/spec/unit/settings_spec.rb +25 -2
  102. data/spec/unit/tarball_spec.rb +57 -0
  103. data/spec/unit/util/cacheable_spec.rb +23 -0
  104. data/spec/unit/util/downloader_spec.rb +98 -0
  105. data/spec/unit/util/purgeable_spec.rb +22 -11
  106. metadata +44 -17
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.0
4
+ version: 3.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrien Thebo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-17 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -142,6 +142,20 @@ dependencies:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
144
  version: 2.2.3
145
+ - !ruby/object:Gem::Dependency
146
+ name: minitar
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: 0.9.0
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: 0.9.0
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: rspec
147
161
  requirement: !ruby/object:Gem::Requirement
@@ -184,20 +198,6 @@ dependencies:
184
198
  - - "~>"
185
199
  - !ruby/object:Gem::Version
186
200
  version: 0.9.11
187
- - !ruby/object:Gem::Dependency
188
- name: minitar
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - "~>"
192
- - !ruby/object:Gem::Version
193
- version: 0.9.0
194
- type: :development
195
- prerelease: false
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: 0.9.0
201
201
  description: |2
202
202
  R10K provides a general purpose toolset for deploying Puppet environments and modules.
203
203
  It implements the Puppetfile format and provides a native implementation of Puppet
@@ -277,6 +277,7 @@ files:
277
277
  - integration/tests/Puppetfile/HTTP_PROXY_affects_forge_source.rb
278
278
  - integration/tests/Puppetfile/HTTP_PROXY_affects_git_source.rb
279
279
  - integration/tests/README.mkd
280
+ - integration/tests/basic_functionality/basic_deployment.rb
280
281
  - integration/tests/basic_functionality/install_pe_only_module_with_puppetfile.rb
281
282
  - integration/tests/basic_functionality/negative/neg_deploy_with_invalid_r10k_yaml.rb
282
283
  - integration/tests/basic_functionality/negative/neg_deploy_with_missing_r10k_yaml.rb
@@ -369,7 +370,9 @@ files:
369
370
  - lib/r10k/environment/base.rb
370
371
  - lib/r10k/environment/git.rb
371
372
  - lib/r10k/environment/name.rb
373
+ - lib/r10k/environment/plain.rb
372
374
  - lib/r10k/environment/svn.rb
375
+ - lib/r10k/environment/tarball.rb
373
376
  - lib/r10k/environment/with_modules.rb
374
377
  - lib/r10k/errors.rb
375
378
  - lib/r10k/errors/formatting.rb
@@ -402,11 +405,13 @@ files:
402
405
  - lib/r10k/logging/terminaloutputter.rb
403
406
  - lib/r10k/module.rb
404
407
  - lib/r10k/module/base.rb
408
+ - lib/r10k/module/definition.rb
405
409
  - lib/r10k/module/forge.rb
406
410
  - lib/r10k/module/git.rb
407
411
  - lib/r10k/module/local.rb
408
412
  - lib/r10k/module/metadata_file.rb
409
413
  - lib/r10k/module/svn.rb
414
+ - lib/r10k/module/tarball.rb
410
415
  - lib/r10k/module_loader/puppetfile.rb
411
416
  - lib/r10k/module_loader/puppetfile/dsl.rb
412
417
  - lib/r10k/puppetfile.rb
@@ -431,10 +436,13 @@ files:
431
436
  - lib/r10k/svn.rb
432
437
  - lib/r10k/svn/remote.rb
433
438
  - lib/r10k/svn/working_dir.rb
439
+ - lib/r10k/tarball.rb
434
440
  - lib/r10k/util/attempt.rb
435
441
  - lib/r10k/util/basedir.rb
442
+ - lib/r10k/util/cacheable.rb
436
443
  - lib/r10k/util/cleaner.rb
437
444
  - lib/r10k/util/commands.rb
445
+ - lib/r10k/util/downloader.rb
438
446
  - lib/r10k/util/exec_env.rb
439
447
  - lib/r10k/util/license.rb
440
448
  - lib/r10k/util/platform.rb
@@ -459,37 +467,48 @@ files:
459
467
  - spec/fixtures/module/forge/bad_module/metadata.json
460
468
  - spec/fixtures/module/forge/eight_hundred/Modulefile
461
469
  - spec/fixtures/module/forge/eight_hundred/metadata.json
470
+ - spec/fixtures/tarball/tarball.tar.gz
462
471
  - spec/fixtures/unit/action/r10k.yaml
463
472
  - spec/fixtures/unit/action/r10k_cachedir.yaml
464
473
  - spec/fixtures/unit/action/r10k_creds.yaml
465
474
  - spec/fixtures/unit/action/r10k_forge_auth.yaml
466
475
  - spec/fixtures/unit/action/r10k_forge_auth_no_url.yaml
467
476
  - spec/fixtures/unit/action/r10k_generate_types.yaml
477
+ - spec/fixtures/unit/action/r10k_logging.yaml
468
478
  - spec/fixtures/unit/action/r10k_puppet_path.yaml
469
479
  - spec/fixtures/unit/puppetfile/argument-error/Puppetfile
470
480
  - spec/fixtures/unit/puppetfile/default-branch-override/Puppetfile
471
481
  - spec/fixtures/unit/puppetfile/duplicate-module-error/Puppetfile
482
+ - spec/fixtures/unit/puppetfile/forge-override/Puppetfile
472
483
  - spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile
473
484
  - spec/fixtures/unit/puppetfile/load-error/Puppetfile
474
485
  - spec/fixtures/unit/puppetfile/name-error/Puppetfile
475
486
  - spec/fixtures/unit/puppetfile/valid-forge-with-version/Puppetfile
476
487
  - spec/fixtures/unit/puppetfile/valid-forge-without-version/Puppetfile
488
+ - spec/fixtures/unit/puppetfile/various-modules/Puppetfile
489
+ - spec/fixtures/unit/puppetfile/various-modules/Puppetfile.new
477
490
  - spec/fixtures/unit/util/purgeable/managed_one/expected_1
478
- - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_subdir_2/ignored_1
491
+ - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/managed_symlink_file
492
+ - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_allowlisted_2/ignored_1
479
493
  - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_expected_1
480
494
  - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/subdir_unmanaged_1
495
+ - spec/fixtures/unit/util/purgeable/managed_one/managed_subdir_1/unmanaged_symlink_dir
496
+ - spec/fixtures/unit/util/purgeable/managed_one/managed_symlink_dir
481
497
  - spec/fixtures/unit/util/purgeable/managed_one/unmanaged_1
498
+ - spec/fixtures/unit/util/purgeable/managed_one/unmanaged_symlink_file
482
499
  - spec/fixtures/unit/util/purgeable/managed_two/.hidden/unmanaged_3
483
500
  - spec/fixtures/unit/util/purgeable/managed_two/expected_2
484
501
  - spec/fixtures/unit/util/purgeable/managed_two/unmanaged_2
485
502
  - spec/fixtures/unit/util/subprocess/runner/no-execute.sh
486
503
  - spec/integration/git/rugged/bare_repository_spec.rb
504
+ - spec/integration/git/rugged/cache_spec.rb
487
505
  - spec/integration/git/rugged/thin_repository_spec.rb
488
506
  - spec/integration/git/rugged/working_repository_spec.rb
489
507
  - spec/integration/git/shellgit/bare_repository_spec.rb
490
508
  - spec/integration/git/shellgit/thin_repository_spec.rb
491
509
  - spec/integration/git/shellgit/working_repository_spec.rb
492
510
  - spec/integration/git/stateful_repository_spec.rb
511
+ - spec/integration/util/purageable_spec.rb
493
512
  - spec/matchers/exit_with.rb
494
513
  - spec/matchers/match_realpath.rb
495
514
  - spec/r10k-mocks.rb
@@ -497,6 +516,7 @@ files:
497
516
  - spec/r10k-mocks/mock_env.rb
498
517
  - spec/r10k-mocks/mock_source.rb
499
518
  - spec/shared-contexts/git-fixtures.rb
519
+ - spec/shared-contexts/tarball.rb
500
520
  - spec/shared-examples/deploy-actions.rb
501
521
  - spec/shared-examples/git-repository.rb
502
522
  - spec/shared-examples/git/bare_repository.rb
@@ -520,10 +540,13 @@ files:
520
540
  - spec/unit/cli_spec.rb
521
541
  - spec/unit/deployment/config_spec.rb
522
542
  - spec/unit/deployment_spec.rb
543
+ - spec/unit/environment/bare_spec.rb
523
544
  - spec/unit/environment/base_spec.rb
524
545
  - spec/unit/environment/git_spec.rb
525
546
  - spec/unit/environment/name_spec.rb
547
+ - spec/unit/environment/plain_spec.rb
526
548
  - spec/unit/environment/svn_spec.rb
549
+ - spec/unit/environment/tarball_spec.rb
527
550
  - spec/unit/environment/with_modules_spec.rb
528
551
  - spec/unit/errors/formatting_spec.rb
529
552
  - spec/unit/feature_spec.rb
@@ -545,6 +568,7 @@ files:
545
568
  - spec/unit/module/git_spec.rb
546
569
  - spec/unit/module/metadata_file_spec.rb
547
570
  - spec/unit/module/svn_spec.rb
571
+ - spec/unit/module/tarball_spec.rb
548
572
  - spec/unit/module_loader/puppetfile_spec.rb
549
573
  - spec/unit/module_spec.rb
550
574
  - spec/unit/puppetfile_spec.rb
@@ -566,8 +590,11 @@ files:
566
590
  - spec/unit/source_spec.rb
567
591
  - spec/unit/svn/remote_spec.rb
568
592
  - spec/unit/svn/working_dir_spec.rb
593
+ - spec/unit/tarball_spec.rb
569
594
  - spec/unit/util/attempt_spec.rb
595
+ - spec/unit/util/cacheable_spec.rb
570
596
  - spec/unit/util/commands_spec.rb
597
+ - spec/unit/util/downloader_spec.rb
571
598
  - spec/unit/util/exec_env_spec.rb
572
599
  - spec/unit/util/purgeable_spec.rb
573
600
  - spec/unit/util/setopts_spec.rb