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,9 +1,21 @@
1
1
  require 'spec_helper'
2
2
 
3
+ require 'faraday'
4
+
3
5
  require 'r10k/module_repository/forge'
4
6
 
5
7
  describe R10K::ModuleRepository::Forge do
6
8
 
9
+ let(:faraday_stubs) { Faraday::Adapter::Test::Stubs.new }
10
+
11
+ let(:conn) do
12
+ Faraday.new { |builder| builder.adapter(:test, faraday_stubs) }
13
+ end
14
+
15
+ before do
16
+ allow_any_instance_of(described_class).to receive(:make_conn).and_return conn
17
+ end
18
+
7
19
  it "uses the official forge by default" do
8
20
  forge = described_class.new
9
21
  expect(forge.forge).to eq 'forgeapi.puppetlabs.com'
@@ -19,15 +31,33 @@ describe R10K::ModuleRepository::Forge do
19
31
  expect(forge.forge).to eq 'forge.example.local'
20
32
  end
21
33
 
22
- describe "and the expected version is :latest", :vcr => true do
34
+ describe "and the expected version is :latest" do
23
35
  subject(:forge) { described_class.new }
24
36
 
37
+ let(:boolean_body) do
38
+ {"releases" => [
39
+ {"version" => "1.0.1"},
40
+ {"version" => "1.0.0"},
41
+ {"version" => "0.9.0"}
42
+ ]
43
+ }
44
+ end
45
+
46
+ let(:spotty_body) do
47
+ {"releases" => [
48
+ {"version" => "0.4.0", "deleted_at" => "some point"},
49
+ {"version" => "0.3.0"}
50
+ ]
51
+ }
52
+ end
53
+
25
54
  before do
26
- forge.conn.builder.insert_before(Faraday::Adapter::NetHttp, VCR::Middleware::Faraday)
55
+ faraday_stubs.get('/v3/modules/adrien-boolean') { [200, {}, boolean_body] }
56
+ faraday_stubs.get('/v3/modules/r10ktesting-spotty') { [200, {}, spotty_body] }
27
57
  end
28
58
 
29
59
  it "can fetch all versions of a given module" do
30
- expect(forge.versions('adrien/boolean')).to eq ["0.9.0-rc1", "0.9.0", "1.0.0", "1.0.1"]
60
+ expect(forge.versions('adrien/boolean')).to eq ["0.9.0", "1.0.0", "1.0.1"]
31
61
  end
32
62
 
33
63
  it "can fetch the latest version of a given module" do
@@ -39,11 +69,11 @@ describe R10K::ModuleRepository::Forge do
39
69
  end
40
70
  end
41
71
 
42
- describe "it handles errors from forgeapi.puppetlabs.com", :vcr => true do
72
+ describe "it handles errors from forgeapi.puppetlabs.com" do
43
73
  subject(:forge) { described_class.new }
44
74
 
45
75
  before do
46
- forge.conn.builder.insert_before(Faraday::Adapter::NetHttp, VCR::Middleware::Faraday)
76
+ faraday_stubs.get('/v3/modules/dne-dne') { [404, {}, 'not found'] }
47
77
  end
48
78
 
49
79
  it "raises an error for a non-existant module" do
@@ -9,21 +9,21 @@ describe R10K::Module do
9
9
  end
10
10
  end
11
11
 
12
- describe 'delegating to R10K::Module::Git' do
13
- it "accepts name matching 'username/modulename' and no args" do
14
- obj = R10K::Module.new('bar/quux', '/modulepath', [])
15
- expect(obj).to be_a_kind_of(R10K::Module::Forge)
16
- end
17
-
18
- it "accepts name matching 'username/modulename' and a semver argument" do
19
- obj = R10K::Module.new('bar/quux', '/modulepath', '10.0.0')
20
- expect(obj).to be_a_kind_of(R10K::Module::Forge)
12
+ describe 'delegating to R10K::Module::Forge' do
13
+ [
14
+ ['bar/quux', []],
15
+ ['bar-quux', []],
16
+ ['bar/quux', ['8.0.0']],
17
+ ].each do |scenario|
18
+ it "accepts a name matching #{scenario[0]} and args #{scenario[1].inspect}" do
19
+ expect(R10K::Module.new(scenario[0], '/modulepath', scenario[1])).to be_a_kind_of(R10K::Module::Forge)
20
+ end
21
21
  end
22
22
  end
23
23
 
24
24
  it "raises an error if delegation fails" do
25
25
  expect {
26
- R10K::Module.new('bar-quux', '/modulepath', ["NOPE NOPE NOPE NOPE!"])
26
+ R10K::Module.new('bar!quux', '/modulepath', ["NOPE NOPE NOPE NOPE!"])
27
27
  }.to raise_error RuntimeError, /doesn't have an implementation/
28
28
  end
29
29
  end
@@ -0,0 +1,41 @@
1
+ require 'shared/puppet_forge/connection'
2
+
3
+ describe PuppetForge::Connection do
4
+
5
+ let(:extended) { Object.new.extend(described_class) }
6
+
7
+ describe 'creating a new connection' do
8
+
9
+ let(:faraday_stubs) { Faraday::Adapter::Test::Stubs.new }
10
+
11
+ subject { extended.make_connection('https://some.site/url', [:test, faraday_stubs]) }
12
+
13
+ it 'parses response bodies with a JSON content-type into a hash' do
14
+ faraday_stubs.get('/json') { [200, {'Content-Type' => 'application/json'}, '{"hello": "world"}'] }
15
+ expect(subject.get('/json').body).to eq('hello' => 'world')
16
+ end
17
+
18
+ it 'returns the response body as-is when the content-type is not JSON' do
19
+ faraday_stubs.get('/binary') { [200, {'Content-Type' => 'application/octet-stream'}, 'I am a big bucket of binary data'] }
20
+ expect(subject.get('/binary').body).to eq('I am a big bucket of binary data')
21
+ end
22
+
23
+ it 'raises errors when the request has an error status code' do
24
+ faraday_stubs.get('/error') { [503, {}, "The server caught fire and cannot service your request right now"] }
25
+
26
+ expect {
27
+ subject.get('/error')
28
+ }.to raise_error(Faraday::ClientError, "the server responded with status 503")
29
+ end
30
+
31
+ context 'when an authorization value is provided' do
32
+ before(:each) do
33
+ allow(described_class).to receive(:authorization).and_return("auth-test value")
34
+ end
35
+
36
+ it 'sets authorization header on requests' do
37
+ expect(subject.headers).to include(:authorization => "auth-test value")
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,87 @@
1
+ require 'shared/puppet_forge/tar/mini'
2
+ require 'shared/puppet_forge/error'
3
+
4
+
5
+ describe PuppetForge::Tar::Mini do
6
+ let(:entry_class) do
7
+ Class.new do
8
+ attr_accessor :typeflag, :name
9
+ def initialize(name, typeflag)
10
+ @name = name
11
+ @typeflag = typeflag
12
+ end
13
+ end
14
+ end
15
+ let(:sourcefile) { '/the/module.tar.gz' }
16
+ let(:destdir) { File.expand_path '/the/dest/dir' }
17
+ let(:sourcedir) { '/the/src/dir' }
18
+ let(:destfile) { '/the/dest/file.tar.gz' }
19
+ let(:minitar) { described_class.new }
20
+ let(:tarfile_contents) { [entry_class.new('file', '0'), \
21
+ entry_class.new('symlink', '2'), \
22
+ entry_class.new('invalid', 'F')] }
23
+
24
+ it "unpacks a tar file" do
25
+ unpacks_the_entry(:file_start, 'thefile')
26
+
27
+ minitar.unpack(sourcefile, destdir)
28
+ end
29
+
30
+ it "does not allow an absolute path" do
31
+ unpacks_the_entry(:file_start, '/thefile')
32
+
33
+ expect {
34
+ minitar.unpack(sourcefile, destdir)
35
+ }.to raise_error(PuppetForge::InvalidPathInPackageError,
36
+ "Attempt to install file into \"/thefile\" under \"#{destdir}\"")
37
+ end
38
+
39
+ it "does not allow a file to be written outside the destination directory" do
40
+ unpacks_the_entry(:file_start, '../../thefile')
41
+
42
+ expect {
43
+ minitar.unpack(sourcefile, destdir)
44
+ }.to raise_error(PuppetForge::InvalidPathInPackageError,
45
+ "Attempt to install file into \"#{File.expand_path('/the/thefile')}\" under \"#{destdir}\"")
46
+ end
47
+
48
+ it "does not allow a directory to be written outside the destination directory" do
49
+ unpacks_the_entry(:dir, '../../thedir')
50
+
51
+ expect {
52
+ minitar.unpack(sourcefile, destdir)
53
+ }.to raise_error(PuppetForge::InvalidPathInPackageError,
54
+ "Attempt to install file into \"#{File.expand_path('/the/thedir')}\" under \"#{destdir}\"")
55
+ end
56
+
57
+ it "packs a tar file" do
58
+ writer = double('GzipWriter')
59
+
60
+ expect(Zlib::GzipWriter).to receive(:open).with(destfile).and_yield(writer)
61
+ expect(Archive::Tar::Minitar).to receive(:pack).with(sourcedir, writer)
62
+
63
+ minitar.pack(sourcedir, destfile)
64
+ end
65
+
66
+ it "returns filenames in a tar separated into correct categories" do
67
+ reader = double('GzipReader')
68
+
69
+ expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader)
70
+ expect(Archive::Tar::Minitar).to receive(:open).with(reader).and_return(tarfile_contents)
71
+ expect(Archive::Tar::Minitar).to receive(:unpack).with(reader, destdir, ['file']).and_yield(:file_start, 'thefile', nil)
72
+
73
+ file_lists = minitar.unpack(sourcefile, destdir)
74
+
75
+ expect(file_lists[:valid]).to eq(['file'])
76
+ expect(file_lists[:invalid]).to eq(['invalid'])
77
+ expect(file_lists[:symlinks]).to eq(['symlink'])
78
+ end
79
+
80
+ def unpacks_the_entry(type, name)
81
+ reader = double('GzipReader')
82
+
83
+ expect(Zlib::GzipReader).to receive(:open).with(sourcefile).and_yield(reader)
84
+ expect(minitar).to receive(:validate_files).with(reader).and_return({:valid => [name]})
85
+ expect(Archive::Tar::Minitar).to receive(:unpack).with(reader, destdir, [name]).and_yield(type, name, nil)
86
+ end
87
+ end
@@ -0,0 +1,9 @@
1
+ require 'shared/puppet_forge/tar'
2
+
3
+ describe PuppetForge::Tar do
4
+
5
+ it "returns an instance of minitar" do
6
+ expect(described_class.instance).to be_a_kind_of PuppetForge::Tar::Mini
7
+ end
8
+
9
+ end
@@ -0,0 +1,59 @@
1
+ require 'json'
2
+ require 'tmpdir'
3
+ require 'shared/puppet_forge/unpacker'
4
+
5
+ describe PuppetForge::Unpacker do
6
+
7
+ let(:source) { Dir.mktmpdir("source") }
8
+ let(:target) { Dir.mktmpdir("unpacker") }
9
+ let(:module_name) { 'myusername-mytarball' }
10
+ let(:filename) { Dir.mktmpdir("module") + "/module.tar.gz" }
11
+ let(:working_dir) { Dir.mktmpdir("working_dir") }
12
+ let(:trash_dir) { Dir.mktmpdir("trash_dir") }
13
+
14
+ it "attempts to untar file to temporary location" do
15
+
16
+ minitar = double('PuppetForge::Tar::Mini')
17
+
18
+ expect(minitar).to receive(:unpack).with(filename, anything()) do |src, dest|
19
+ FileUtils.mkdir(File.join(dest, 'extractedmodule'))
20
+ File.open(File.join(dest, 'extractedmodule', 'metadata.json'), 'w+') do |file|
21
+ file.puts JSON.generate('name' => module_name, 'version' => '1.0.0')
22
+ end
23
+ true
24
+ end
25
+
26
+ expect(PuppetForge::Tar).to receive(:instance).and_return(minitar)
27
+ PuppetForge::Unpacker.unpack(filename, target, trash_dir)
28
+ expect(File).to be_directory(target)
29
+ end
30
+
31
+ it "returns the appropriate categories of the contents of the tar file from the tar implementation" do
32
+
33
+ minitar = double('PuppetForge::Tar::Mini')
34
+
35
+ expect(minitar).to receive(:unpack).with(filename, anything()) do |src, dest|
36
+ FileUtils.mkdir(File.join(dest, 'extractedmodule'))
37
+ File.open(File.join(dest, 'extractedmodule', 'metadata.json'), 'w+') do |file|
38
+ file.puts JSON.generate('name' => module_name, 'version' => '1.0.0')
39
+ end
40
+ { :valid => [File.join('extractedmodule', 'metadata.json')], :invalid => [], :symlinks => [] }
41
+ end
42
+
43
+ expect(PuppetForge::Tar).to receive(:instance).and_return(minitar)
44
+ file_lists = PuppetForge::Unpacker.unpack(filename, target, trash_dir)
45
+ expect(file_lists).to eq({:valid=>["extractedmodule/metadata.json"], :invalid=>[], :symlinks=>[]})
46
+ expect(File).to be_directory(target)
47
+ end
48
+
49
+ it "attempts to set the ownership of a target dir to a source dir's owner" do
50
+
51
+ source_path = Pathname.new(source)
52
+ target_path = Pathname.new(target)
53
+
54
+ expect(FileUtils).to receive(:chown_R).with(source_path.stat.uid, source_path.stat.gid, target_path)
55
+
56
+ PuppetForge::Unpacker.harmonize_ownership(source_path, target_path)
57
+ end
58
+
59
+ end
@@ -0,0 +1,68 @@
1
+ require 'shared/puppet_forge/v3/module_release'
2
+
3
+ describe PuppetForge::V3::ModuleRelease do
4
+
5
+ subject { described_class.new('username-modulename', '3.1.4') }
6
+
7
+ let(:faraday_stubs) { Faraday::Adapter::Test::Stubs.new }
8
+
9
+ let(:conn) do
10
+ Faraday.new do |builder|
11
+ builder.adapter :test, faraday_stubs
12
+ end
13
+ end
14
+
15
+ before do
16
+ subject.conn = conn
17
+ end
18
+
19
+ it "creates a slug from the full_name and version" do
20
+ expect(subject.slug).to eq 'username-modulename-3.1.4'
21
+ end
22
+
23
+
24
+ describe '#data' do
25
+ it 'returns the body of the response' do
26
+ faraday_stubs.get('/v3/releases/username-modulename-3.1.4') { [200, {}, {'metadata' => 'yep'}] }
27
+ expect(subject.data).to eq('metadata' => 'yep')
28
+ end
29
+ end
30
+
31
+ describe '#download' do
32
+ it 'downloads the file to the provided path' do
33
+ faraday_stubs.get('/v3/files/username-modulename-3.1.4.tar.gz') { [200, {}, "I'm a file!"] }
34
+
35
+ path = Pathname.new('/some/path')
36
+ io = instance_double('IO')
37
+
38
+ expect(path).to receive(:open).with('wb').and_yield io
39
+ expect(io).to receive(:write).with("I'm a file!")
40
+
41
+ subject.download(path)
42
+ end
43
+ end
44
+
45
+ describe '#verify' do
46
+ let(:digest) { instance_double('Digest::MD5') }
47
+
48
+ let(:path) { Pathname.new('/some/path') }
49
+
50
+ it "returns without error when the checksum matches" do
51
+ expect(Digest::MD5).to receive(:file).with(path).and_return(digest)
52
+ expect(digest).to receive(:hexdigest).and_return('823fe0a11fc0ef23a5853e2791880c9b')
53
+ expect(subject).to receive(:data).and_return('file_md5' => '823fe0a11fc0ef23a5853e2791880c9b')
54
+
55
+ subject.verify(path)
56
+ end
57
+
58
+ it "raises an error when the checksum doesn't match" do
59
+ expect(Digest::MD5).to receive(:file).with(path).and_return(digest)
60
+ expect(digest).to receive(:hexdigest).and_return('00000000000000000000000000000000')
61
+ expect(subject).to receive(:data).and_return('file_md5' => '823fe0a11fc0ef23a5853e2791880c9b')
62
+
63
+ expect {
64
+ subject.verify(path)
65
+ }.to raise_error(PuppetForge::V3::ModuleRelease::ChecksumMismatch, 'Expected /some/path checksum to be 823fe0a11fc0ef23a5853e2791880c9b, got 00000000000000000000000000000000')
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,67 @@
1
+ require 'shared/puppet_forge/v3/module'
2
+
3
+ describe PuppetForge::V3::Module do
4
+ subject { described_class.new('authorname-modulename') }
5
+
6
+ let(:faraday_stubs) { Faraday::Adapter::Test::Stubs.new }
7
+
8
+ let(:conn) do
9
+ Faraday.new do |builder|
10
+ builder.adapter :test, faraday_stubs
11
+ end
12
+ end
13
+
14
+ before do
15
+ subject.conn = conn
16
+ end
17
+
18
+ let(:releases_without_deletions) do
19
+ {"releases" => [
20
+ {"version" => "1.0.1"},
21
+ {"version" => "1.0.0"},
22
+ {"version" => "0.9.0"}
23
+ ]
24
+ }
25
+ end
26
+
27
+ let(:releases_with_deletions) do
28
+ {"releases" => [
29
+ {"version" => "0.4.0", "deleted_at" => "some point"},
30
+ {"version" => "0.3.0"}
31
+ ]
32
+ }
33
+ end
34
+
35
+ describe '#release' do
36
+ it 'creates a release object for the module with the given version' do
37
+ release = subject.release('3.1.4')
38
+ expect(release.slug).to eq 'authorname-modulename-3.1.4'
39
+ end
40
+
41
+ it 'passes along the module connection object' do
42
+ conn = Object.new
43
+ subject.conn = conn
44
+ release = subject.release('3.1.4')
45
+ expect(release.conn).to eq conn
46
+ end
47
+ end
48
+
49
+ describe '#versions' do
50
+ it "returns all module release versions" do
51
+ faraday_stubs.get('/v3/modules/authorname-modulename') { [200, {}, releases_without_deletions] }
52
+ expect(subject.versions).to eq ["0.9.0", "1.0.0", "1.0.1"]
53
+ end
54
+
55
+ it "ignores deleted releases" do
56
+ faraday_stubs.get('/v3/modules/authorname-modulename') { [200, {}, releases_with_deletions] }
57
+ expect(subject.versions).to eq ["0.3.0"]
58
+ end
59
+ end
60
+
61
+ describe '#latest_version' do
62
+ it "returns the most recent version" do
63
+ faraday_stubs.get('/v3/modules/authorname-modulename') { [200, {}, releases_without_deletions] }
64
+ expect(subject.latest_version).to eq '1.0.1'
65
+ end
66
+ end
67
+ end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r10k
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adrien Thebo
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-06-09 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: colored
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: cri
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: log4r
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: multi_json
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,31 +62,13 @@ dependencies:
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
68
  version: '1.10'
78
- - !ruby/object:Gem::Dependency
79
- name: json_pure
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: '1.8'
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: '1.8'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: faraday
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
73
  - - ~>
100
74
  - !ruby/object:Gem::Version
@@ -102,7 +76,6 @@ dependencies:
102
76
  type: :runtime
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
80
  - - ~>
108
81
  - !ruby/object:Gem::Version
@@ -110,7 +83,6 @@ dependencies:
110
83
  - !ruby/object:Gem::Dependency
111
84
  name: faraday_middleware
112
85
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
86
  requirements:
115
87
  - - ~>
116
88
  - !ruby/object:Gem::Version
@@ -118,7 +90,6 @@ dependencies:
118
90
  type: :runtime
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
93
  requirements:
123
94
  - - ~>
124
95
  - !ruby/object:Gem::Version
@@ -126,7 +97,6 @@ dependencies:
126
97
  - !ruby/object:Gem::Dependency
127
98
  name: faraday_middleware-multi_json
128
99
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
100
  requirements:
131
101
  - - ~>
132
102
  - !ruby/object:Gem::Version
@@ -134,7 +104,6 @@ dependencies:
134
104
  type: :runtime
135
105
  prerelease: false
136
106
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
107
  requirements:
139
108
  - - ~>
140
109
  - !ruby/object:Gem::Version
@@ -142,7 +111,6 @@ dependencies:
142
111
  - !ruby/object:Gem::Dependency
143
112
  name: semantic_puppet
144
113
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
114
  requirements:
147
115
  - - ~>
148
116
  - !ruby/object:Gem::Version
@@ -150,7 +118,6 @@ dependencies:
150
118
  type: :runtime
151
119
  prerelease: false
152
120
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
121
  requirements:
155
122
  - - ~>
156
123
  - !ruby/object:Gem::Version
@@ -158,7 +125,6 @@ dependencies:
158
125
  - !ruby/object:Gem::Dependency
159
126
  name: rspec
160
127
  requirement: !ruby/object:Gem::Requirement
161
- none: false
162
128
  requirements:
163
129
  - - ~>
164
130
  - !ruby/object:Gem::Version
@@ -166,31 +132,13 @@ dependencies:
166
132
  type: :development
167
133
  prerelease: false
168
134
  version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
135
  requirements:
171
136
  - - ~>
172
137
  - !ruby/object:Gem::Version
173
138
  version: '3.1'
174
- - !ruby/object:Gem::Dependency
175
- name: vcr
176
- requirement: !ruby/object:Gem::Requirement
177
- none: false
178
- requirements:
179
- - - ~>
180
- - !ruby/object:Gem::Version
181
- version: '2.9'
182
- type: :development
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ~>
188
- - !ruby/object:Gem::Version
189
- version: '2.9'
190
139
  - !ruby/object:Gem::Dependency
191
140
  name: minitar
192
141
  requirement: !ruby/object:Gem::Requirement
193
- none: false
194
142
  requirements:
195
143
  - - ! '>='
196
144
  - !ruby/object:Gem::Version
@@ -198,7 +146,6 @@ dependencies:
198
146
  type: :development
199
147
  prerelease: false
200
148
  version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
149
  requirements:
203
150
  - - ! '>='
204
151
  - !ruby/object:Gem::Version
@@ -206,7 +153,6 @@ dependencies:
206
153
  - !ruby/object:Gem::Dependency
207
154
  name: yard
208
155
  requirement: !ruby/object:Gem::Requirement
209
- none: false
210
156
  requirements:
211
157
  - - ~>
212
158
  - !ruby/object:Gem::Version
@@ -214,7 +160,6 @@ dependencies:
214
160
  type: :development
215
161
  prerelease: false
216
162
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
163
  requirements:
219
164
  - - ~>
220
165
  - !ruby/object:Gem::Version
@@ -253,6 +198,7 @@ files:
253
198
  - integration/Gemfile
254
199
  - integration/README.mkd
255
200
  - integration/configs/README.mkd
201
+ - integration/configs/pe/centos-5-64mda
256
202
  - integration/configs/pe/centos-6-64mda
257
203
  - integration/configs/pe/centos-7-64mda
258
204
  - integration/configs/pe/debian-6-64mda
@@ -260,6 +206,7 @@ files:
260
206
  - integration/configs/pe/redhat-6-64mda
261
207
  - integration/configs/pe/redhat-7-64mda
262
208
  - integration/configs/pe/sles-11-64mda
209
+ - integration/configs/pe/sles-12-64mda
263
210
  - integration/configs/pe/ubuntu-1004-64mda
264
211
  - integration/configs/pe/ubuntu-1204-64mda
265
212
  - integration/configs/pe/ubuntu-1404-64mda
@@ -269,6 +216,7 @@ files:
269
216
  - integration/files/modules/hieratest/manifests/init.pp
270
217
  - integration/files/modules/unicode/files/pretend_unicode
271
218
  - integration/files/modules/unicode/manifests/init.pp
219
+ - integration/files/pre-suite/git_config.pp.erb
272
220
  - integration/files/pre-suite/prod_env.config
273
221
  - integration/files/r10k_conf.yaml.erb
274
222
  - integration/lib/README.mkd
@@ -281,6 +229,15 @@ files:
281
229
  - integration/pre-suite/02_pe_r10k.rb
282
230
  - integration/pre-suite/03_test_utils.rb
283
231
  - integration/pre-suite/README.mkd
232
+ - integration/scripts/README.mkd
233
+ - integration/scripts/setup_r10k_env_centos5.sh
234
+ - integration/scripts/setup_r10k_env_centos6.sh
235
+ - integration/scripts/setup_r10k_env_rhel7.sh
236
+ - integration/scripts/setup_r10k_env_sles11.sh
237
+ - integration/scripts/setup_r10k_env_sles12.sh
238
+ - integration/scripts/setup_r10k_env_ubuntu1004.sh
239
+ - integration/scripts/setup_r10k_env_ubuntu1204.sh
240
+ - integration/scripts/setup_r10k_env_ubuntu1404.sh
284
241
  - integration/test_run_scripts/README.mkd
285
242
  - integration/test_run_scripts/all_tests-rugged-pe-centos6.sh
286
243
  - integration/test_run_scripts/all_tests-rugged-pe-rhel7.sh
@@ -300,6 +257,9 @@ files:
300
257
  - integration/tests/README.mkd
301
258
  - integration/tests/basic_functionality/negative/neg_deploy_with_invalid_r10k_yaml.rb
302
259
  - integration/tests/basic_functionality/negative/neg_deploy_with_missing_r10k_yaml.rb
260
+ - integration/tests/basic_functionality/negative/neg_invalid_git_provider.rb
261
+ - integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb
262
+ - integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb
303
263
  - integration/tests/command_line/deploy_env_without_mod_update.rb
304
264
  - integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb
305
265
  - integration/tests/command_line/negative/neg_invalid_cli_dep_flag.rb
@@ -346,6 +306,8 @@ files:
346
306
  - integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb
347
307
  - integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb
348
308
  - integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb
309
+ - integration/tests/user_scenario/complex_workflow/multi_env_unamanaged.rb
310
+ - integration/tests/user_scenario/complex_workflow/single_env_git_module_update.rb
349
311
  - lib/r10k.rb
350
312
  - lib/r10k/action/cri_runner.rb
351
313
  - lib/r10k/action/deploy.rb
@@ -361,24 +323,13 @@ files:
361
323
  - lib/r10k/action/visitor.rb
362
324
  - lib/r10k/cli.rb
363
325
  - lib/r10k/cli/deploy.rb
364
- - lib/r10k/cli/environment.rb
365
- - lib/r10k/cli/environment/deploy.rb
366
- - lib/r10k/cli/environment/list.rb
367
- - lib/r10k/cli/environment/stale.rb
368
326
  - lib/r10k/cli/ext/logging.rb
369
327
  - lib/r10k/cli/help.rb
370
- - lib/r10k/cli/module.rb
371
- - lib/r10k/cli/module/deploy.rb
372
- - lib/r10k/cli/module/list.rb
373
328
  - lib/r10k/cli/puppetfile.rb
374
- - lib/r10k/cli/synchronize.rb
375
329
  - lib/r10k/cli/version.rb
376
330
  - lib/r10k/deployment.rb
377
- - lib/r10k/deployment/basedir.rb
378
331
  - lib/r10k/deployment/config.rb
379
332
  - lib/r10k/deployment/config/loader.rb
380
- - lib/r10k/deployment/environment.rb
381
- - lib/r10k/deployment/source.rb
382
333
  - lib/r10k/environment.rb
383
334
  - lib/r10k/environment/base.rb
384
335
  - lib/r10k/environment/git.rb
@@ -389,15 +340,11 @@ files:
389
340
  - lib/r10k/feature.rb
390
341
  - lib/r10k/feature/collection.rb
391
342
  - lib/r10k/features.rb
343
+ - lib/r10k/forge/module_release.rb
392
344
  - lib/r10k/git.rb
393
345
  - lib/r10k/git/alternates.rb
394
346
  - lib/r10k/git/cache.rb
395
- - lib/r10k/git/commit.rb
396
347
  - lib/r10k/git/errors.rb
397
- - lib/r10k/git/head.rb
398
- - lib/r10k/git/ref.rb
399
- - lib/r10k/git/remote_head.rb
400
- - lib/r10k/git/repository.rb
401
348
  - lib/r10k/git/rugged.rb
402
349
  - lib/r10k/git/rugged/bare_repository.rb
403
350
  - lib/r10k/git/rugged/base_repository.rb
@@ -411,8 +358,6 @@ files:
411
358
  - lib/r10k/git/shellgit/thin_repository.rb
412
359
  - lib/r10k/git/shellgit/working_repository.rb
413
360
  - lib/r10k/git/stateful_repository.rb
414
- - lib/r10k/git/tag.rb
415
- - lib/r10k/git/working_dir.rb
416
361
  - lib/r10k/instance_cache.rb
417
362
  - lib/r10k/keyed_factory.rb
418
363
  - lib/r10k/logging.rb
@@ -426,8 +371,6 @@ files:
426
371
  - lib/r10k/module_repository.rb
427
372
  - lib/r10k/module_repository/forge.rb
428
373
  - lib/r10k/puppetfile.rb
429
- - lib/r10k/registry.rb
430
- - lib/r10k/semver.rb
431
374
  - lib/r10k/settings.rb
432
375
  - lib/r10k/settings/container.rb
433
376
  - lib/r10k/settings/mixin.rb
@@ -438,17 +381,11 @@ files:
438
381
  - lib/r10k/svn.rb
439
382
  - lib/r10k/svn/remote.rb
440
383
  - lib/r10k/svn/working_dir.rb
441
- - lib/r10k/task.rb
442
- - lib/r10k/task/deployment.rb
443
- - lib/r10k/task/environment.rb
444
- - lib/r10k/task/module.rb
445
- - lib/r10k/task/puppetfile.rb
446
- - lib/r10k/task_runner.rb
447
384
  - lib/r10k/util/attempt.rb
448
385
  - lib/r10k/util/basedir.rb
449
386
  - lib/r10k/util/commands.rb
450
387
  - lib/r10k/util/exec_env.rb
451
- - lib/r10k/util/monkey_patches.rb
388
+ - lib/r10k/util/license.rb
452
389
  - lib/r10k/util/platform.rb
453
390
  - lib/r10k/util/purgeable.rb
454
391
  - lib/r10k/util/setopts.rb
@@ -462,6 +399,15 @@ files:
462
399
  - lib/r10k/util/symbolize_keys.rb
463
400
  - lib/r10k/version.rb
464
401
  - lib/shared/puppet/module_tool/metadata.rb
402
+ - lib/shared/puppet_forge/connection.rb
403
+ - lib/shared/puppet_forge/error.rb
404
+ - lib/shared/puppet_forge/tar.rb
405
+ - lib/shared/puppet_forge/tar/mini.rb
406
+ - lib/shared/puppet_forge/unpacker.rb
407
+ - lib/shared/puppet_forge/v3.rb
408
+ - lib/shared/puppet_forge/v3/module.rb
409
+ - lib/shared/puppet_forge/v3/module_release.rb
410
+ - lib/shared/puppet_forge/version.rb
465
411
  - r10k.gemspec
466
412
  - r10k.yaml.example
467
413
  - spec/fixtures/empty/.empty
@@ -472,11 +418,6 @@ files:
472
418
  - spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile
473
419
  - spec/fixtures/unit/puppetfile/load-error/Puppetfile
474
420
  - spec/fixtures/unit/util/subprocess/posix/runner/no-execute.sh
475
- - spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_all_versions_of_a_given_module.yml
476
- - spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_the_latest_version_of_a_given_module.yml
477
- - spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/ignores_deleted_releases.yml
478
- - spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/it_handles_errors_from_forgeapi_puppetlabs_com/raises_an_error_for_a_non-existant_module.yml
479
- - spec/fixtures/vcr/cassettes/R10K_Module_Forge/and_the_expected_version_is_latest/sets_the_expected_version_based_on_the_latest_forge_version.yml
480
421
  - spec/integration/git/rugged/bare_repository_spec.rb
481
422
  - spec/integration/git/rugged/thin_repository_spec.rb
482
423
  - spec/integration/git/rugged/working_repository_spec.rb
@@ -491,7 +432,6 @@ files:
491
432
  - spec/r10k-mocks/mock_env.rb
492
433
  - spec/r10k-mocks/mock_source.rb
493
434
  - spec/shared-contexts/git-fixtures.rb
494
- - spec/shared-examples/git-ref.rb
495
435
  - spec/shared-examples/git-repository.rb
496
436
  - spec/shared-examples/git/bare_repository.rb
497
437
  - spec/shared-examples/git/thin_repository.rb
@@ -504,7 +444,6 @@ files:
504
444
  - spec/unit/action/visitor_spec.rb
505
445
  - spec/unit/deployment/config/loader_spec.rb
506
446
  - spec/unit/deployment/config_spec.rb
507
- - spec/unit/deployment/environment_spec.rb
508
447
  - spec/unit/deployment_spec.rb
509
448
  - spec/unit/environment/base_spec.rb
510
449
  - spec/unit/environment/git_spec.rb
@@ -512,17 +451,12 @@ files:
512
451
  - spec/unit/environment/svn_spec.rb
513
452
  - spec/unit/errors/formatting_spec.rb
514
453
  - spec/unit/feature_spec.rb
454
+ - spec/unit/forge/module_release_spec.rb
515
455
  - spec/unit/git/alternates_spec.rb
516
456
  - spec/unit/git/cache_spec.rb
517
- - spec/unit/git/commit_spec.rb
518
- - spec/unit/git/head_spec.rb
519
- - spec/unit/git/ref_spec.rb
520
- - spec/unit/git/repository_spec.rb
521
457
  - spec/unit/git/rugged/cache_spec.rb
522
458
  - spec/unit/git/shellgit/cache_spec.rb
523
459
  - spec/unit/git/stateful_repository_spec.rb
524
- - spec/unit/git/tag_spec.rb
525
- - spec/unit/git/working_dir_spec.rb
526
460
  - spec/unit/git_spec.rb
527
461
  - spec/unit/instance_cache_spec.rb
528
462
  - spec/unit/keyed_factory_spec.rb
@@ -536,6 +470,12 @@ files:
536
470
  - spec/unit/module_repository/forge_spec.rb
537
471
  - spec/unit/module_spec.rb
538
472
  - spec/unit/puppet/module_tool/metadata_spec.rb
473
+ - spec/unit/puppet_forge/connection_spec.rb
474
+ - spec/unit/puppet_forge/tar/mini_spec.rb
475
+ - spec/unit/puppet_forge/tar_spec.rb
476
+ - spec/unit/puppet_forge/unpacker_spec.rb
477
+ - spec/unit/puppet_forge/v3/module_release_spec.rb
478
+ - spec/unit/puppet_forge/v3/module_spec.rb
539
479
  - spec/unit/puppetfile_spec.rb
540
480
  - spec/unit/settings/container_spec.rb
541
481
  - spec/unit/source/base_spec.rb
@@ -547,7 +487,6 @@ files:
547
487
  - spec/unit/util/attempt_spec.rb
548
488
  - spec/unit/util/commands_spec.rb
549
489
  - spec/unit/util/exec_env_spec.rb
550
- - spec/unit/util/monkey_patches_spec.rb
551
490
  - spec/unit/util/setopts_spec.rb
552
491
  - spec/unit/util/subprocess/result_spec.rb
553
492
  - spec/unit/util/subprocess/runner/posix_spec.rb
@@ -558,27 +497,26 @@ files:
558
497
  homepage: http://github.com/adrienthebo/r10k
559
498
  licenses:
560
499
  - Apache-2.0
500
+ metadata: {}
561
501
  post_install_message:
562
502
  rdoc_options: []
563
503
  require_paths:
564
504
  - lib
565
505
  required_ruby_version: !ruby/object:Gem::Requirement
566
- none: false
567
506
  requirements:
568
507
  - - ! '>='
569
508
  - !ruby/object:Gem::Version
570
- version: '0'
509
+ version: 1.9.3
571
510
  required_rubygems_version: !ruby/object:Gem::Requirement
572
- none: false
573
511
  requirements:
574
512
  - - ! '>='
575
513
  - !ruby/object:Gem::Version
576
514
  version: '0'
577
515
  requirements: []
578
516
  rubyforge_project:
579
- rubygems_version: 1.8.23.2
517
+ rubygems_version: 2.4.6
580
518
  signing_key:
581
- specification_version: 3
519
+ specification_version: 4
582
520
  summary: Puppet environment and module deployment
583
521
  test_files:
584
522
  - spec/integration/git/stateful_repository_spec.rb
@@ -594,26 +532,19 @@ test_files:
594
532
  - spec/unit/environment/git_spec.rb
595
533
  - spec/unit/module_spec.rb
596
534
  - spec/unit/module_repository/forge_spec.rb
597
- - spec/unit/git/ref_spec.rb
598
535
  - spec/unit/git/stateful_repository_spec.rb
599
- - spec/unit/git/working_dir_spec.rb
600
536
  - spec/unit/git/cache_spec.rb
601
- - spec/unit/git/commit_spec.rb
602
- - spec/unit/git/repository_spec.rb
603
- - spec/unit/git/head_spec.rb
604
537
  - spec/unit/git/shellgit/cache_spec.rb
605
538
  - spec/unit/git/alternates_spec.rb
606
- - spec/unit/git/tag_spec.rb
607
539
  - spec/unit/git/rugged/cache_spec.rb
540
+ - spec/unit/forge/module_release_spec.rb
608
541
  - spec/unit/keyed_factory_spec.rb
609
542
  - spec/unit/puppet/module_tool/metadata_spec.rb
610
543
  - spec/unit/deployment/config/loader_spec.rb
611
- - spec/unit/deployment/environment_spec.rb
612
544
  - spec/unit/deployment/config_spec.rb
613
545
  - spec/unit/feature_spec.rb
614
546
  - spec/unit/source_spec.rb
615
547
  - spec/unit/puppetfile_spec.rb
616
- - spec/unit/util/monkey_patches_spec.rb
617
548
  - spec/unit/util/exec_env_spec.rb
618
549
  - spec/unit/util/attempt_spec.rb
619
550
  - spec/unit/util/setopts_spec.rb
@@ -645,4 +576,9 @@ test_files:
645
576
  - spec/unit/module/svn_spec.rb
646
577
  - spec/unit/module/git_spec.rb
647
578
  - spec/unit/logging_spec.rb
648
- has_rdoc:
579
+ - spec/unit/puppet_forge/tar_spec.rb
580
+ - spec/unit/puppet_forge/v3/module_spec.rb
581
+ - spec/unit/puppet_forge/v3/module_release_spec.rb
582
+ - spec/unit/puppet_forge/unpacker_spec.rb
583
+ - spec/unit/puppet_forge/connection_spec.rb
584
+ - spec/unit/puppet_forge/tar/mini_spec.rb