r10k 1.5.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +15 -0
  2. data/.travis.yml +0 -1
  3. data/CHANGELOG.mkd +63 -0
  4. data/Gemfile +2 -2
  5. data/README.mkd +1 -10
  6. data/doc/dynamic-environments/configuration.mkd +24 -6
  7. data/doc/dynamic-environments/quickstart.mkd +1 -1
  8. data/integration/Gemfile +1 -1
  9. data/integration/configs/pe/centos-5-64mda +25 -0
  10. data/integration/configs/pe/centos-6-64mda +1 -1
  11. data/integration/configs/pe/centos-7-64mda +1 -1
  12. data/integration/configs/pe/debian-6-64mda +1 -1
  13. data/integration/configs/pe/debian-7-64mda +1 -1
  14. data/integration/configs/pe/redhat-6-64mda +1 -1
  15. data/integration/configs/pe/redhat-7-64mda +1 -1
  16. data/integration/configs/pe/sles-11-64mda +1 -1
  17. data/integration/configs/pe/sles-12-64mda +25 -0
  18. data/integration/configs/pe/ubuntu-1004-64mda +1 -1
  19. data/integration/configs/pe/ubuntu-1204-64mda +1 -1
  20. data/integration/configs/pe/ubuntu-1404-64mda +1 -1
  21. data/integration/files/pre-suite/git_config.pp.erb +19 -0
  22. data/integration/pre-suite/01_git_config.rb +5 -17
  23. data/integration/pre-suite/02_pe_r10k.rb +0 -2
  24. data/integration/scripts/README.mkd +86 -0
  25. data/integration/scripts/setup_r10k_env_centos5.sh +23 -0
  26. data/integration/scripts/setup_r10k_env_centos6.sh +23 -0
  27. data/integration/scripts/setup_r10k_env_rhel7.sh +23 -0
  28. data/integration/scripts/setup_r10k_env_sles11.sh +23 -0
  29. data/integration/scripts/setup_r10k_env_sles12.sh +23 -0
  30. data/integration/scripts/setup_r10k_env_ubuntu1004.sh +23 -0
  31. data/integration/scripts/setup_r10k_env_ubuntu1204.sh +23 -0
  32. data/integration/scripts/setup_r10k_env_ubuntu1404.sh +23 -0
  33. data/integration/tests/basic_functionality/negative/neg_invalid_git_provider.rb +44 -0
  34. data/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +106 -0
  35. data/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb +107 -0
  36. data/integration/tests/git_source/git_source_git.rb +1 -1
  37. data/integration/tests/git_source/git_source_ssh.rb +1 -1
  38. data/integration/tests/git_source/negative/neg_git_unauthorized_https.rb +1 -1
  39. data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +1 -1
  40. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_basedir.rb +1 -1
  41. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module.rb +8 -2
  42. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module_ref.rb +1 -1
  43. data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_remote.rb +1 -1
  44. data/integration/tests/user_scenario/basic_workflow/negative/neg_branch_name_collision.rb +1 -1
  45. data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +5 -1
  46. data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +3 -3
  47. data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_puppet_file.rb +1 -1
  48. data/integration/tests/user_scenario/basic_workflow/negative/neg_read_only.rb +1 -1
  49. data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +4 -0
  50. data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +4 -0
  51. data/integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb +77 -0
  52. data/integration/tests/user_scenario/complex_workflow/single_env_git_module_update.rb +99 -0
  53. data/lib/r10k/action/deploy/display.rb +0 -1
  54. data/lib/r10k/action/runner.rb +20 -0
  55. data/lib/r10k/cli.rb +0 -3
  56. data/lib/r10k/cli/deploy.rb +0 -3
  57. data/lib/r10k/deployment.rb +1 -7
  58. data/lib/r10k/deployment/config.rb +15 -1
  59. data/lib/r10k/deployment/config/loader.rb +0 -11
  60. data/lib/r10k/environment/git.rb +0 -9
  61. data/lib/r10k/environment/svn.rb +0 -9
  62. data/lib/r10k/errors.rb +0 -3
  63. data/lib/r10k/feature.rb +24 -3
  64. data/lib/r10k/forge/module_release.rb +142 -0
  65. data/lib/r10k/git.rb +32 -11
  66. data/lib/r10k/module/forge.rb +25 -54
  67. data/lib/r10k/module_repository/forge.rb +2 -5
  68. data/lib/r10k/puppetfile.rb +1 -1
  69. data/lib/r10k/util/license.rb +20 -0
  70. data/lib/r10k/version.rb +1 -1
  71. data/lib/shared/puppet_forge/connection.rb +62 -0
  72. data/lib/shared/puppet_forge/error.rb +28 -0
  73. data/lib/shared/puppet_forge/tar.rb +10 -0
  74. data/lib/shared/puppet_forge/tar/mini.rb +81 -0
  75. data/lib/shared/puppet_forge/unpacker.rb +68 -0
  76. data/lib/shared/puppet_forge/v3.rb +13 -0
  77. data/lib/shared/puppet_forge/v3/module.rb +66 -0
  78. data/lib/shared/puppet_forge/v3/module_release.rb +73 -0
  79. data/lib/shared/puppet_forge/version.rb +3 -0
  80. data/r10k.gemspec +2 -2
  81. data/r10k.yaml.example +80 -5
  82. data/spec/spec_helper.rb +0 -12
  83. data/spec/unit/action/runner_spec.rb +53 -0
  84. data/spec/unit/deployment/config/loader_spec.rb +5 -19
  85. data/spec/unit/deployment/config_spec.rb +8 -0
  86. data/spec/unit/deployment_spec.rb +1 -1
  87. data/spec/unit/forge/module_release_spec.rb +130 -0
  88. data/spec/unit/git_spec.rb +5 -5
  89. data/spec/unit/module/forge_spec.rb +66 -116
  90. data/spec/unit/module_repository/forge_spec.rb +35 -5
  91. data/spec/unit/module_spec.rb +10 -10
  92. data/spec/unit/puppet_forge/connection_spec.rb +41 -0
  93. data/spec/unit/puppet_forge/tar/mini_spec.rb +87 -0
  94. data/spec/unit/puppet_forge/tar_spec.rb +9 -0
  95. data/spec/unit/puppet_forge/unpacker_spec.rb +59 -0
  96. data/spec/unit/puppet_forge/v3/module_release_spec.rb +68 -0
  97. data/spec/unit/puppet_forge/v3/module_spec.rb +67 -0
  98. metadata +48 -112
  99. data/lib/r10k/cli/environment.rb +0 -28
  100. data/lib/r10k/cli/environment/deploy.rb +0 -26
  101. data/lib/r10k/cli/environment/list.rb +0 -23
  102. data/lib/r10k/cli/environment/stale.rb +0 -24
  103. data/lib/r10k/cli/module.rb +0 -29
  104. data/lib/r10k/cli/module/deploy.rb +0 -27
  105. data/lib/r10k/cli/module/list.rb +0 -24
  106. data/lib/r10k/cli/synchronize.rb +0 -27
  107. data/lib/r10k/deployment/basedir.rb +0 -4
  108. data/lib/r10k/deployment/environment.rb +0 -20
  109. data/lib/r10k/deployment/source.rb +0 -37
  110. data/lib/r10k/git/commit.rb +0 -22
  111. data/lib/r10k/git/head.rb +0 -36
  112. data/lib/r10k/git/ref.rb +0 -66
  113. data/lib/r10k/git/remote_head.rb +0 -19
  114. data/lib/r10k/git/repository.rb +0 -158
  115. data/lib/r10k/git/tag.rb +0 -29
  116. data/lib/r10k/git/working_dir.rb +0 -186
  117. data/lib/r10k/registry.rb +0 -4
  118. data/lib/r10k/semver.rb +0 -128
  119. data/lib/r10k/task.rb +0 -12
  120. data/lib/r10k/task/deployment.rb +0 -164
  121. data/lib/r10k/task/environment.rb +0 -31
  122. data/lib/r10k/task/module.rb +0 -19
  123. data/lib/r10k/task/puppetfile.rb +0 -102
  124. data/lib/r10k/task_runner.rb +0 -72
  125. data/lib/r10k/util/monkey_patches.rb +0 -11
  126. data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_all_versions_of_a_given_module.yml +0 -187
  127. data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_the_latest_version_of_a_given_module.yml +0 -187
  128. data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/ignores_deleted_releases.yml +0 -190
  129. data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/it_handles_errors_from_forgeapi_puppetlabs_com/raises_an_error_for_a_non-existant_module.yml +0 -34
  130. data/spec/fixtures/vcr/cassettes/R10K_Module_Forge/and_the_expected_version_is_latest/sets_the_expected_version_based_on_the_latest_forge_version.yml +0 -103
  131. data/spec/shared-examples/git-ref.rb +0 -49
  132. data/spec/unit/deployment/environment_spec.rb +0 -25
  133. data/spec/unit/git/commit_spec.rb +0 -34
  134. data/spec/unit/git/head_spec.rb +0 -22
  135. data/spec/unit/git/ref_spec.rb +0 -45
  136. data/spec/unit/git/repository_spec.rb +0 -34
  137. data/spec/unit/git/tag_spec.rb +0 -32
  138. data/spec/unit/git/working_dir_spec.rb +0 -122
  139. data/spec/unit/util/monkey_patches_spec.rb +0 -20
@@ -1,190 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://forgeapi.puppetlabs.com/v3/modules/r10ktesting-spotty
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.9
12
- response:
13
- status:
14
- code: 200
15
- message:
16
- headers:
17
- !binary "c2VydmVy":
18
- - !binary |-
19
- bmdpbng=
20
- !binary "ZGF0ZQ==":
21
- - !binary |-
22
- VGh1LCAwMiBBcHIgMjAxNSAyMzo0ODozNiBHTVQ=
23
- !binary "Y29udGVudC10eXBl":
24
- - !binary |-
25
- YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04
26
- !binary "dHJhbnNmZXItZW5jb2Rpbmc=":
27
- - !binary |-
28
- Y2h1bmtlZA==
29
- !binary "Y29ubmVjdGlvbg==":
30
- - !binary |-
31
- Y2xvc2U=
32
- !binary "c3RhdHVz":
33
- - !binary |-
34
- MjAwIE9L
35
- !binary "Y2FjaGUtY29udHJvbA==":
36
- - !binary |-
37
- cHVibGljLCBtdXN0LXJldmFsaWRhdGU=
38
- !binary "bGFzdC1tb2RpZmllZA==":
39
- - !binary |-
40
- VGh1LCAwMiBBcHIgMjAxNSAyMzowNDoyMSBHTVQ=
41
- !binary "eC1ub2Rl":
42
- - !binary |-
43
- Zm9yZ2UtYWlvMDEtaW50ZXJuYWw=
44
- !binary "eC1yZXZpc2lvbg==":
45
- - !binary |-
46
- OGQ5ZDI5OA==
47
- !binary "eC1jb250ZW50LXR5cGUtb3B0aW9ucw==":
48
- - !binary |-
49
- bm9zbmlmZg==
50
- !binary "dmFyeQ==":
51
- - !binary |-
52
- QWNjZXB0LUVuY29kaW5n
53
- !binary "eC1mb3J3YXJkZWQtYnk=":
54
- - !binary |-
55
- Zm9yZ2UtYWlvMDEtaW50ZXJuYWw=
56
- body:
57
- encoding: ASCII-8BIT
58
- string: !binary |-
59
- ewogICJ1cmkiOiAiL3YzL21vZHVsZXMvcjEwa3Rlc3Rpbmctc3BvdHR5IiwK
60
- ICAibmFtZSI6ICJzcG90dHkiLAogICJkb3dubG9hZHMiOiAwLAogICJjcmVh
61
- dGVkX2F0IjogIjIwMTUtMDQtMDIgMTQ6MTY6MjcgLTA3MDAiLAogICJ1cGRh
62
- dGVkX2F0IjogIjIwMTUtMDQtMDIgMTY6MDQ6MjEgLTA3MDAiLAogICJzdXBw
63
- b3J0ZWQiOiBmYWxzZSwKICAiZW5kb3JzZW1lbnQiOiBudWxsLAogICJtb2R1
64
- bGVfZ3JvdXAiOiAiYmFzZSIsCiAgIm93bmVyIjogewogICAgInVyaSI6ICIv
65
- djMvdXNlcnMvcjEwa3Rlc3RpbmciLAogICAgInVzZXJuYW1lIjogInIxMGt0
66
- ZXN0aW5nIiwKICAgICJncmF2YXRhcl9pZCI6ICJhOTdjNWRjNWU4YTk0ZDIw
67
- ZmJlNjRmY2M0NmRhMjQwYiIKICB9LAogICJjdXJyZW50X3JlbGVhc2UiOiB7
68
- CiAgICAidXJpIjogIi92My9yZWxlYXNlcy9yMTBrdGVzdGluZy1zcG90dHkt
69
- MC40LjAiLAogICAgIm1vZHVsZSI6IHsKICAgICAgInVyaSI6ICIvdjMvbW9k
70
- dWxlcy9yMTBrdGVzdGluZy1zcG90dHkiLAogICAgICAibmFtZSI6ICJzcG90
71
- dHkiLAogICAgICAib3duZXIiOiB7CiAgICAgICAgInVyaSI6ICIvdjMvdXNl
72
- cnMvcjEwa3Rlc3RpbmciLAogICAgICAgICJ1c2VybmFtZSI6ICJyMTBrdGVz
73
- dGluZyIsCiAgICAgICAgImdyYXZhdGFyX2lkIjogImE5N2M1ZGM1ZThhOTRk
74
- MjBmYmU2NGZjYzQ2ZGEyNDBiIgogICAgICB9CiAgICB9LAogICAgInZlcnNp
75
- b24iOiAiMC40LjAiLAogICAgIm1ldGFkYXRhIjogewogICAgICAibmFtZSI6
76
- ICJyMTBrdGVzdGluZy1zcG90dHkiLAogICAgICAidmVyc2lvbiI6ICIwLjQu
77
- MCIsCiAgICAgICJhdXRob3IiOiAicjEwa3Rlc3RpbmciLAogICAgICAic3Vt
78
- bWFyeSI6ICJBIG1vZHVsZSB3aXRoIGEgc3BvdHR5IHJlbGVhc2UgcmVjb3Jk
79
- IiwKICAgICAgImxpY2Vuc2UiOiAiQXBhY2hlIDIuMCIsCiAgICAgICJzb3Vy
80
- Y2UiOiAiZ2l0Oi8vZ2l0aHViLmNvbS9qdXN0aW5zdG9sbGVyL3IxMGt0ZXN0
81
- aW5nLXNwb3R0eS5naXQiLAogICAgICAicHJvamVjdF9wYWdlIjogImh0dHBz
82
- Oi8vZ2l0aHViLmNvbS9qdXN0aW5zdG9sbGVyL3IxMGt0ZXN0aW5nLXNwb3R0
83
- eSIsCiAgICAgICJpc3N1ZXNfdXJsIjogImh0dHBzOi8vZ2l0aHViLmNvbS9q
84
- dXN0aW5zdG9sbGVyL3IxMGt0ZXN0aW5nLXNwb3R0eS9pc3N1ZXMiLAogICAg
85
- ICAiZGVwZW5kZW5jaWVzIjogWwogICAgICAgIHsKICAgICAgICAgICJuYW1l
86
- IjogInB1cHBldGxhYnMtc3RkbGliIiwKICAgICAgICAgICJ2ZXJzaW9uX3Jl
87
- cXVpcmVtZW50IjogIj49IDEuMC4wIgogICAgICAgIH0KICAgICAgXQogICAg
88
- fSwKICAgICJ0YWdzIjogWwoKICAgIF0sCiAgICAic3VwcG9ydGV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lvbmFsKipcblxuSWYgeW91
155
- IGFyZW4ndCB1c2luZyBjaGFuZ2Vsb2csIHB1dCB5b3VyIHJlbGVhc2Ugbm90
156
- ZXMgaGVyZSAodGhvdWdoIHlvdSBzaG91bGRcbmNvbnNpZGVyIHVzaW5nIGNo
157
- YW5nZWxvZykuIFlvdSBtYXkgYWxzbyBhZGQgYW55IGFkZGl0aW9uYWwgc2Vj
158
- dGlvbnMgeW91IGZlZWwgYXJlXG5uZWNlc3Nhcnkgb3IgaW1wb3J0YW50IHRv
159
- IGluY2x1ZGUgaGVyZS4gUGxlYXNlIHVzZSB0aGUgYCMjIGAgaGVhZGVyLlxu
160
- IiwKICAgICJjaGFuZ2Vsb2ciOiBudWxsLAogICAgImxpY2Vuc2UiOiBudWxs
161
- LAogICAgImNyZWF0ZWRfYXQiOiAiMjAxNS0wNC0wMiAxNDozMTozMiAtMDcw
162
- MCIsCiAgICAidXBkYXRlZF9hdCI6ICIyMDE1LTA0LTAyIDE2OjA0OjIxIC0w
163
- NzAwIiwKICAgICJkZWxldGVkX2F0IjogIjIwMTUtMDQtMDIgMTY6MDQ6MTcg
164
- LTA3MDAiLAogICAgImRlbGV0ZWRfZm9yIjogbnVsbAogIH0sCiAgInJlbGVh
165
- c2VzIjogWwogICAgewogICAgICAidXJpIjogIi92My9yZWxlYXNlcy9yMTBr
166
- dGVzdGluZy1zcG90dHktMC40LjAiLAogICAgICAidmVyc2lvbiI6ICIwLjQu
167
- MCIsCiAgICAgICJzdXBwb3J0ZWQiOiBmYWxzZSwKICAgICAgImNyZWF0ZWRf
168
- YXQiOiAiMjAxNS0wNC0wMiAxNDozMTozMiAtMDcwMCIsCiAgICAgICJkZWxl
169
- dGVkX2F0IjogIjIwMTUtMDQtMDIgMTY6MDQ6MTcgLTA3MDAiCiAgICB9LAog
170
- ICAgewogICAgICAidXJpIjogIi92My9yZWxlYXNlcy9yMTBrdGVzdGluZy1z
171
- cG90dHktMC4zLjAiLAogICAgICAidmVyc2lvbiI6ICIwLjMuMCIsCiAgICAg
172
- ICJzdXBwb3J0ZWQiOiBmYWxzZSwKICAgICAgImNyZWF0ZWRfYXQiOiAiMjAx
173
- NS0wNC0wMiAxNDozMDoyOSAtMDcwMCIsCiAgICAgICJkZWxldGVkX2F0Ijog
174
- bnVsbAogICAgfSwKICAgIHsKICAgICAgInVyaSI6ICIvdjMvcmVsZWFzZXMv
175
- cjEwa3Rlc3Rpbmctc3BvdHR5LTAuMi4wIiwKICAgICAgInZlcnNpb24iOiAi
176
- MC4yLjAiLAogICAgICAic3VwcG9ydGVkIjogZmFsc2UsCiAgICAgICJjcmVh
177
- dGVkX2F0IjogIjIwMTUtMDQtMDIgMTQ6Mjc6MzQgLTA3MDAiLAogICAgICAi
178
- ZGVsZXRlZF9hdCI6ICIyMDE1LTA0LTAyIDE2OjAzOjM1IC0wNzAwIgogICAg
179
- fSwKICAgIHsKICAgICAgInVyaSI6ICIvdjMvcmVsZWFzZXMvcjEwa3Rlc3Rp
180
- bmctc3BvdHR5LTAuMS4wIiwKICAgICAgInZlcnNpb24iOiAiMC4xLjAiLAog
181
- ICAgICAic3VwcG9ydGVkIjogZmFsc2UsCiAgICAgICJjcmVhdGVkX2F0Ijog
182
- IjIwMTUtMDQtMDIgMTQ6MTY6MjcgLTA3MDAiLAogICAgICAiZGVsZXRlZF9h
183
- dCI6IG51bGwKICAgIH0KICBdLAogICJmZWVkYmFja19zY29yZSI6IG51bGws
184
- CiAgImhvbWVwYWdlX3VybCI6ICJodHRwczovL2dpdGh1Yi5jb20vanVzdGlu
185
- c3RvbGxlci9yMTBrdGVzdGluZy1zcG90dHkiLAogICJpc3N1ZXNfdXJsIjog
186
- Imh0dHBzOi8vZ2l0aHViLmNvbS9qdXN0aW5zdG9sbGVyL3IxMGt0ZXN0aW5n
187
- LXNwb3R0eS9pc3N1ZXMiCn0=
188
- http_version:
189
- recorded_at: Thu, 02 Apr 2015 23:48:36 GMT
190
- recorded_with: VCR 2.9.3
@@ -1,34 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://forgeapi.puppetlabs.com/v3/modules/dne-dne
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.9
12
- response:
13
- status:
14
- code: 404
15
- message:
16
- headers:
17
- !binary "c2VydmVy":
18
- - nginx
19
- !binary "ZGF0ZQ==":
20
- - Mon, 02 Mar 2015 19:59:03 GMT
21
- !binary "Y29udGVudC10eXBl":
22
- - application/json
23
- content-length:
24
- - '36'
25
- !binary "Y29ubmVjdGlvbg==":
26
- - close
27
- etag:
28
- - ! '"54ee63e8-24"'
29
- body:
30
- encoding: US-ASCII
31
- string: ! "{\n \"errors\": [\"404 Not found\"]\n}\n"
32
- http_version:
33
- recorded_at: Mon, 02 Mar 2015 19:59:13 GMT
34
- recorded_with: VCR 2.9.3
@@ -1,103 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://forgeapi.puppetlabs.com/v3/modules/branan-eight_hundred
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - Faraday v0.8.9
12
- response:
13
- status:
14
- code: 200
15
- message:
16
- headers:
17
- !binary "c2VydmVy":
18
- - !binary |-
19
- bmdpbng=
20
- !binary "ZGF0ZQ==":
21
- - !binary |-
22
- TW9uLCAwMiBNYXIgMjAxNSAxOTo1OTowMiBHTVQ=
23
- !binary "Y29udGVudC10eXBl":
24
- - !binary |-
25
- YXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04
26
- !binary "dHJhbnNmZXItZW5jb2Rpbmc=":
27
- - !binary |-
28
- Y2h1bmtlZA==
29
- !binary "Y29ubmVjdGlvbg==":
30
- - !binary |-
31
- Y2xvc2U=
32
- !binary "c3RhdHVz":
33
- - !binary |-
34
- MjAwIE9L
35
- !binary "Y2FjaGUtY29udHJvbA==":
36
- - !binary |-
37
- cHVibGljLCBtdXN0LXJldmFsaWRhdGU=
38
- !binary "bGFzdC1tb2RpZmllZA==":
39
- - !binary |-
40
- TW9uLCAwMiBNYXIgMjAxNSAxNzoxNzozNCBHTVQ=
41
- !binary "eC1ub2Rl":
42
- - !binary |-
43
- Zm9yZ2UtYXBwMDItcHJvZA==
44
- !binary "eC1yZXZpc2lvbg==":
45
- - !binary |-
46
- ODQ4NDQyZA==
47
- !binary "eC1jb250ZW50LXR5cGUtb3B0aW9ucw==":
48
- - !binary |-
49
- bm9zbmlmZg==
50
- !binary "dmFyeQ==":
51
- - !binary |-
52
- QWNjZXB0LUVuY29kaW5n
53
- body:
54
- encoding: ASCII-8BIT
55
- string: !binary |-
56
- ewogICJ1cmkiOiAiL3YzL21vZHVsZXMvYnJhbmFuLWVpZ2h0X2h1bmRyZWQi
57
- LAogICJuYW1lIjogImVpZ2h0X2h1bmRyZWQiLAogICJkb3dubG9hZHMiOiAx
58
- NzQ5LAogICJjcmVhdGVkX2F0IjogIjIwMTMtMDEtMjMgMTI6MzI6MjMgLTA4
59
- MDAiLAogICJ1cGRhdGVkX2F0IjogIjIwMTUtMDMtMDIgMDk6MTc6MzQgLTA4
60
- MDAiLAogICJzdXBwb3J0ZWQiOiBmYWxzZSwKICAiZW5kb3JzZW1lbnQiOiBu
61
- dWxsLAogICJtb2R1bGVfZ3JvdXAiOiAiYmFzZSIsCiAgIm93bmVyIjogewog
62
- ICAgInVyaSI6ICIvdjMvdXNlcnMvYnJhbmFuIiwKICAgICJ1c2VybmFtZSI6
63
- ICJicmFuYW4iLAogICAgImdyYXZhdGFyX2lkIjogImM1NjQ5ZDE4YmI4MjMw
64
- NWI5YTY3MGYwZjgwMmYzYzAwIgogIH0sCiAgImN1cnJlbnRfcmVsZWFzZSI6
65
- IHsKICAgICJ1cmkiOiAiL3YzL3JlbGVhc2VzL2JyYW5hbi1laWdodF9odW5k
66
- cmVkLTguMC4wIiwKICAgICJtb2R1bGUiOiB7CiAgICAgICJ1cmkiOiAiL3Yz
67
- L21vZHVsZXMvYnJhbmFuLWVpZ2h0X2h1bmRyZWQiLAogICAgICAibmFtZSI6
68
- ICJlaWdodF9odW5kcmVkIiwKICAgICAgIm93bmVyIjogewogICAgICAgICJ1
69
- cmkiOiAiL3YzL3VzZXJzL2JyYW5hbiIsCiAgICAgICAgInVzZXJuYW1lIjog
70
- ImJyYW5hbiIsCiAgICAgICAgImdyYXZhdGFyX2lkIjogImM1NjQ5ZDE4YmI4
71
- MjMwNWI5YTY3MGYwZjgwMmYzYzAwIgogICAgICB9CiAgICB9LAogICAgInZl
72
- cnNpb24iOiAiOC4wLjAiLAogICAgIm1ldGFkYXRhIjogewogICAgICAiY2hl
73
- Y2tzdW1zIjogewogICAgICAgICJNb2R1bGVmaWxlIjogIjFlNzgwZDc5NGJj
74
- ZDY2MjlkYzMwMDYxMjlmYzAyZWRmIgogICAgICB9LAogICAgICAibGljZW5z
75
- ZSI6ICJBcGFjaGUgTGljZW5zZSAyLjAiLAogICAgICAidHlwZXMiOiBbCgog
76
- ICAgICBdLAogICAgICAidmVyc2lvbiI6ICI4LjAuMCIsCiAgICAgICJkZXBl
77
- bmRlbmNpZXMiOiBbCgogICAgICBdLAogICAgICAic3VtbWFyeSI6ICI4MDAg
78
- bW9kdWxlcyEgV09PT09PT08hIiwKICAgICAgInNvdXJjZSI6ICJodHRwczov
79
- L2dpdGh1Yi5jb20vYnJhbmFuL3B1cHBldC1tb2R1bGUtZWlnaHRfaHVuZHJl
80
- ZCIsCiAgICAgICJkZXNjcmlwdGlvbiI6ICI4MDAgbW9kdWxlcyEgV09PT09P
81
- T09PT09PT09PT09PTyEiLAogICAgICAiYXV0aG9yIjogIkJyYW5hbiBQdXJ2
82
- aW5lLVJpbGV5IiwKICAgICAgIm5hbWUiOiAiYnJhbmFuLWVpZ2h0X2h1bmRy
83
- ZWQiLAogICAgICAicHJvamVjdF9wYWdlIjogImh0dHBzOi8vZ2l0aHViLmNv
84
- bS9icmFuYW4vcHVwcGV0LW1vZHVsZS1laWdodF9odW5kcmVkIgogICAgfSwK
85
- ICAgICJ0YWdzIjogWwoKICAgIF0sCiAgICAic3VwcG9ydGVkIjogZmFsc2Us
86
- CiAgICAidmFsaWRhdGlvbl9zY29yZSI6IDgyLAogICAgImZpbGVfdXJpIjog
87
- Ii92My9maWxlcy9icmFuYW4tZWlnaHRfaHVuZHJlZC04LjAuMC50YXIuZ3oi
88
- LAogICAgImZpbGVfc2l6ZSI6IDUyNSwKICAgICJmaWxlX21kNSI6ICJkNTI5
89
- OTdhZjgxNGFlMTAwMTEyYTVmYzU0NmYzYmI0MiIsCiAgICAiZG93bmxvYWRz
90
- IjogMTc0OSwKICAgICJyZWFkbWUiOiBudWxsLAogICAgImNoYW5nZWxvZyI6
91
- IG51bGwsCiAgICAibGljZW5zZSI6IG51bGwsCiAgICAiY3JlYXRlZF9hdCI6
92
- ICIyMDEzLTAxLTIzIDEyOjQyOjQ2IC0wODAwIiwKICAgICJ1cGRhdGVkX2F0
93
- IjogIjIwMTUtMDItMDQgMjE6NTI6MDUgLTA4MDAiLAogICAgImRlbGV0ZWRf
94
- YXQiOiBudWxsCiAgfSwKICAicmVsZWFzZXMiOiBbCiAgICB7CiAgICAgICJ1
95
- cmkiOiAiL3YzL3JlbGVhc2VzL2JyYW5hbi1laWdodF9odW5kcmVkLTguMC4w
96
- IiwKICAgICAgInZlcnNpb24iOiAiOC4wLjAiLAogICAgICAic3VwcG9ydGVk
97
- IjogZmFsc2UsCiAgICAgICJjcmVhdGVkX2F0IjogIjIwMTMtMDEtMjMgMTI6
98
- NDI6NDYgLTA4MDAiCiAgICB9CiAgXSwKICAiZmVlZGJhY2tfc2NvcmUiOiBu
99
- dWxsLAogICJob21lcGFnZV91cmwiOiAiIiwKICAiaXNzdWVzX3VybCI6ICIi
100
- Cn0=
101
- http_version:
102
- recorded_at: Mon, 02 Mar 2015 19:59:12 GMT
103
- recorded_with: VCR 2.9.3
@@ -1,49 +0,0 @@
1
- shared_examples_for "a git ref" do
2
-
3
- it "can be created with an optional repository" do
4
- ref = described_class.new(ref, repo)
5
- expect(ref.repository).to eq repo
6
- end
7
-
8
- describe "comparing to another object" do
9
- let(:other) { R10K::Git::Ref.new('double') }
10
-
11
- it "is true if the resolved SHA1s match" do
12
- expect(other).to receive(:sha1).and_return 'fcf6140cf3e0b3738583167702176867833ec2a7'
13
- expect(subject).to receive(:sha1).and_return 'fcf6140cf3e0b3738583167702176867833ec2a7'
14
- expect(subject == other).to be_truthy
15
- end
16
-
17
- it "is false if the resolved SHA1s don't match" do
18
- expect(other).to receive(:sha1).and_return '57d31c788610d7d6a1c139b4ffff0d60888ca742'
19
- expect(subject).to receive(:sha1).and_return 'fcf6140cf3e0b3738583167702176867833ec2a7'
20
- expect(subject == other).to be_falsey
21
- end
22
-
23
- it "is false if an argumenterror is raised while comparing the SHA1s" do
24
- expect(other).to receive(:sha1).and_return 'fcf6140cf3e0b3738583167702176867833ec2a7'
25
- expect(subject).to receive(:sha1).and_raise(ArgumentError, "Cannot resolve")
26
- expect(subject == other).to be_falsey
27
- end
28
-
29
- it "is false if a nonexistenthasherror is raised while comparing the SHA1s" do
30
- expect(other).to receive(:sha1).and_return 'fcf6140cf3e0b3738583167702176867833ec2a7'
31
- expect(subject).to receive(:sha1).and_raise(R10K::Git::UnresolvableRefError, :ref => "hash")
32
- expect(subject == other).to be_falsey
33
- end
34
- end
35
- end
36
-
37
- shared_examples_for "an immutable git ref" do
38
- describe "determining if the ref needs to be fetched" do
39
- it "is false when the ref can be resolved" do
40
- expect(subject).to receive(:resolvable?).and_return true
41
- expect(subject.fetch?).to be_falsey
42
- end
43
-
44
- it "is true when the ref cannot be resolved" do
45
- expect(subject).to receive(:resolvable?).and_return false
46
- expect(subject.fetch?).to be_truthy
47
- end
48
- end
49
- end
@@ -1,25 +0,0 @@
1
- require 'spec_helper'
2
- require 'r10k/deployment/environment'
3
-
4
- describe R10K::Deployment::Environment do
5
-
6
- it "creates R10K::Environment::Git instances" do
7
- subject = described_class.new('gitref', 'git://git-server.local/git-remote.git', '/some/nonexistent/dir')
8
- expect(subject).to be_a_kind_of R10K::Environment::Git
9
- end
10
-
11
- it "uses the ref as the dirname by default" do
12
- subject = described_class.new('gitref', 'git://git-server.local/git-remote.git', '/some/nonexistent/dir')
13
- expect(subject.dirname).to eq 'gitref'
14
- end
15
-
16
- it "can specify an explicit dirname" do
17
- subject = described_class.new('gitref', 'git://git-server.local/git-remote.git', '/some/nonexistent/dir', 'explicit-dirname')
18
- expect(subject.dirname).to eq 'explicit-dirname'
19
- end
20
-
21
- it "supports prefixing for backwards compatibility" do
22
- subject = described_class.new('gitref', 'git://git-server.local/git-remote.git', '/some/nonexistent/dir', nil, 'source')
23
- expect(subject.dirname).to eq 'source_gitref'
24
- end
25
- end
@@ -1,34 +0,0 @@
1
- require 'spec_helper'
2
- require 'r10k/git'
3
- require 'r10k/git/commit'
4
-
5
- describe R10K::Git::Commit do
6
-
7
- let(:ref) { '96eeaba8c5069e31400a3dfcbeb37d016c1b1980' }
8
- let(:repo) { double('git repository') }
9
- subject { described_class.new(ref) }
10
-
11
-
12
- describe "determining if the commit can be resolved" do
13
- before do
14
- subject.repository = repo
15
- end
16
-
17
- it "is true if the commit can be rev-parsed" do
18
- expect(repo).to receive(:rev_parse).with(ref).and_return ref
19
- expect(subject).to be_resolvable
20
- end
21
-
22
- it "is true if the commit cannot be rev-parsed" do
23
- expect(repo).to receive(:rev_parse).with(ref).and_raise(R10K::Git::UnresolvableRefError, :ref => ref)
24
- expect(subject).to_not be_resolvable
25
- end
26
- end
27
-
28
- it "can be converted to a string" do
29
- expect(subject.to_s).to eq ref
30
- end
31
-
32
- it_behaves_like "a git ref"
33
- it_behaves_like "an immutable git ref"
34
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
- require 'r10k/git'
3
- require 'r10k/git/head'
4
-
5
- describe R10K::Git::Head do
6
-
7
- let(:ref) { 'git/branch' }
8
- let(:repo) { double('git repository') }
9
- subject { described_class.new(ref) }
10
-
11
- describe "determining if the head needs to be fetched" do
12
- it "is always true" do
13
- expect(subject.fetch?).to be_truthy
14
- end
15
- end
16
-
17
- it "can be converted to a string" do
18
- expect(subject.to_s).to eq ref
19
- end
20
-
21
- it_behaves_like "a git ref"
22
- end