poise-archive 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.kitchen.yml +3 -0
- data/.travis.yml +22 -0
- data/.yardopts +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +34 -0
- data/LICENSE +201 -0
- data/README.md +79 -0
- data/Rakefile +17 -0
- data/lib/poise_archive/archive_providers/base.rb +103 -0
- data/lib/poise_archive/archive_providers/tar.rb +121 -0
- data/lib/poise_archive/archive_providers/zip.rb +30 -0
- data/lib/poise_archive/archive_providers.rb +34 -0
- data/lib/poise_archive/cheftie.rb +18 -0
- data/lib/poise_archive/resources/poise_archive.rb +80 -0
- data/lib/poise_archive/resources.rb +26 -0
- data/lib/poise_archive/version.rb +20 -0
- data/lib/poise_archive.rb +21 -0
- data/poise-archive.gemspec +40 -0
- data/test/cookbook/files/myapp-1.0.0.tar +0 -0
- data/test/cookbook/files/myapp-1.0.0.tar.bz2 +0 -0
- data/test/cookbook/files/myapp-1.0.0.tar.gz +0 -0
- data/test/cookbook/files/myapp-1.0.0.zip +0 -0
- data/test/cookbook/metadata.rb +18 -0
- data/test/cookbook/recipes/default.rb +84 -0
- data/test/docker/docker.ca +29 -0
- data/test/docker/docker.pem +83 -0
- data/test/gemfiles/chef-12.1.gemfile +19 -0
- data/test/gemfiles/chef-12.2.gemfile +19 -0
- data/test/gemfiles/chef-12.3.gemfile +19 -0
- data/test/gemfiles/chef-12.4.gemfile +21 -0
- data/test/gemfiles/chef-12.5.gemfile +19 -0
- data/test/gemfiles/chef-12.6.gemfile +19 -0
- data/test/gemfiles/chef-12.gemfile +19 -0
- data/test/gemfiles/master.gemfile +25 -0
- data/test/integration/default/serverspec/default_spec.rb +66 -0
- data/test/spec/archive_providers/tar_spec.rb +134 -0
- data/test/spec/archive_providers/zip_spec.rb +32 -0
- data/test/spec/resources/poise_archive_spec.rb +87 -0
- data/test/sp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wVsPnIUzpRK4ORt4tlOCLTiR
|
79
|
+
5l35WEZp/RE6rWrpZjmP2zKi57on+sD38o4O8m0wmnu7frSqDr3EOdjclHCClkpC
|
80
|
+
Twoas4iVpdQegGhujHxs/GOvOSlqLXZxR3vsX3m/RkFfBfbKb0oQBdUGsZofaSx/
|
81
|
+
m/gTKv7QQDhU1L/B7o6YX4Y5XWwpPopQL8vEfByvN3r1N9QcGo4opmvZPyT4yZD0
|
82
|
+
3AueGterMQBKDIbS+S2gDigw0xGAL3VpxZvdUP0riThSAuUy7+j5a/ADM06ToLoU
|
83
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.1.2'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.2.1'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.3.0'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.4.3'
|
20
|
+
# Pending https://github.com/berkshelf/ridley/pull/335
|
21
|
+
gem 'ridley', '4.4.1'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.5.1'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.6.0'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', '~> 12.6'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
|
+
|
19
|
+
gem 'chef', github: 'chef/chef'
|
20
|
+
gem 'halite', github: 'poise/halite'
|
21
|
+
gem 'poise', github: 'poise/poise'
|
22
|
+
gem 'poise-boiler', github: 'poise/poise-boiler'
|
23
|
+
# gem 'poise-languages', github: 'poise/poise-languages'
|
24
|
+
gem 'poise-profiler', github: 'poise/poise-profiler'
|
25
|
+
gem 'poise-service', github: 'poise/poise-service'
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'serverspec'
|
18
|
+
set :backend, :exec
|
19
|
+
|
20
|
+
RSpec.shared_examples 'a poise_archive test' do |ext|
|
21
|
+
base = "/test/#{ext}"
|
22
|
+
|
23
|
+
describe file("#{base}/LICENSE") do
|
24
|
+
its(:content) { is_expected.to eq "This is in the public domain.\n" }
|
25
|
+
end
|
26
|
+
describe file("#{base}/README") do
|
27
|
+
its(:content) { is_expected.to eq "This is a project!\n\n" }
|
28
|
+
end
|
29
|
+
describe file("#{base}/src/main.c") do
|
30
|
+
it { is_expected.to be_a_file }
|
31
|
+
end
|
32
|
+
describe file("#{base}_0/myapp-1.0.0/src/main.c") do
|
33
|
+
it { is_expected.to be_a_file }
|
34
|
+
end
|
35
|
+
describe file("#{base}_2/main.c") do
|
36
|
+
it { is_expected.to be_a_file }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe 'tar' do
|
41
|
+
it_should_behave_like 'a poise_archive test', 'tar'
|
42
|
+
end
|
43
|
+
|
44
|
+
describe 'tar.gz' do
|
45
|
+
it_should_behave_like 'a poise_archive test', 'tar.gz'
|
46
|
+
end
|
47
|
+
|
48
|
+
describe 'tar.bz2' do
|
49
|
+
it_should_behave_like 'a poise_archive test', 'tar.bz2'
|
50
|
+
end
|
51
|
+
|
52
|
+
describe 'core features' do
|
53
|
+
describe file('/test/user') do
|
54
|
+
it { is_expected.to be_owned_by 'poise' }
|
55
|
+
it { is_expected.to be_mode '700' }
|
56
|
+
end
|
57
|
+
describe file('/test/user/README') do
|
58
|
+
it { is_expected.to be_owned_by 'poise' }
|
59
|
+
end
|
60
|
+
describe file('/test/keep/EXISTING') do
|
61
|
+
it { is_expected.to be_a_file }
|
62
|
+
end
|
63
|
+
describe file('/test/existing/EXISTING') do
|
64
|
+
it { is_expected.to_not exist }
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2016, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'spec_helper'
|
18
|
+
|
19
|
+
describe PoiseArchive::ArchiveProviders::Tar do
|
20
|
+
step_into(:poise_archive)
|
21
|
+
|
22
|
+
describe '#action_unpack' do
|
23
|
+
let(:tar_cmd) { [] }
|
24
|
+
let(:archive_provider) { chef_run.poise_archive('myapp').provider_for_action(:unpack) }
|
25
|
+
before do
|
26
|
+
allow(described_class).to receive(:mktmpdir).and_yield('/test')
|
27
|
+
allow(Dir).to receive(:entries).and_call_original
|
28
|
+
allow(Dir).to receive(:entries).with('/root/myapp').and_return([])
|
29
|
+
expect_any_instance_of(described_class).to receive(:poise_shell_out!).with(tar_cmd, cwd: '/test', group: nil, user: nil)
|
30
|
+
expect_any_instance_of(described_class).to receive(:entries_at_depth).with('/test', 1).and_return(%w{/test/myapp/bin /test/myapp/src})
|
31
|
+
expect(File).to receive(:rename).with('/test/myapp/bin', '/root/myapp/bin')
|
32
|
+
expect(File).to receive(:rename).with('/test/myapp/src', '/root/myapp/src')
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'with a .tar path' do
|
36
|
+
let(:tar_cmd) { %w{tar -xvf /root/myapp.tar} }
|
37
|
+
recipe do
|
38
|
+
poise_archive 'myapp' do
|
39
|
+
path '/root/myapp.tar'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it { expect(archive_provider).to be_a described_class }
|
44
|
+
end # /context with a .tar path
|
45
|
+
|
46
|
+
context 'with a .tar.gz path' do
|
47
|
+
let(:tar_cmd) { %w{tar -xzvf /root/myapp.tar.gz} }
|
48
|
+
recipe do
|
49
|
+
poise_archive 'myapp' do
|
50
|
+
path '/root/myapp.tar.gz'
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
it { expect(archive_provider).to be_a described_class }
|
55
|
+
end # /context with a .tar.gz path
|
56
|
+
|
57
|
+
context 'with a .tar.bz path' do
|
58
|
+
let(:tar_cmd) { %w{tar -xjvf /root/myapp.tar.bz} }
|
59
|
+
recipe do
|
60
|
+
poise_archive 'myapp' do
|
61
|
+
path '/root/myapp.tar.bz'
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
it { expect(archive_provider).to be_a described_class }
|
66
|
+
end # /context with a .tar.bz path
|
67
|
+
|
68
|
+
context 'with a .tar.bz2 path' do
|
69
|
+
let(:tar_cmd) { %w{tar -xjvf /root/myapp.tar.bz2} }
|
70
|
+
recipe do
|
71
|
+
poise_archive 'myapp' do
|
72
|
+
path '/root/myapp.tar.bz2'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
it { expect(archive_provider).to be_a described_class }
|
77
|
+
end # /context with a .tar.bz2 path
|
78
|
+
|
79
|
+
context 'with a .tgz path' do
|
80
|
+
let(:tar_cmd) { %w{tar -xzvf /root/myapp.tgz} }
|
81
|
+
recipe do
|
82
|
+
poise_archive 'myapp' do
|
83
|
+
path '/root/myapp.tgz'
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
it { expect(archive_provider).to be_a described_class }
|
88
|
+
end # /context with a .tgz path
|
89
|
+
|
90
|
+
context 'with a .tbz path' do
|
91
|
+
let(:tar_cmd) { %w{tar -xjvf /root/myapp.tbz} }
|
92
|
+
recipe do
|
93
|
+
poise_archive 'myapp' do
|
94
|
+
path '/root/myapp.tbz'
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
it { expect(archive_provider).to be_a described_class }
|
99
|
+
end # /context with a .tbz path
|
100
|
+
end # /describe #action_unpack
|
101
|
+
|
102
|
+
describe '#entries_at_depth' do
|
103
|
+
let(:depth) { nil }
|
104
|
+
subject { described_class.new(nil, nil).send(:entries_at_depth, '/test', depth) }
|
105
|
+
before do
|
106
|
+
allow(Dir).to receive(:entries).and_call_original
|
107
|
+
allow(Dir).to receive(:entries).with('/test').and_return(%w{. .. a b})
|
108
|
+
allow(Dir).to receive(:entries).with('/test/a').and_return(%w{. .. aa ab})
|
109
|
+
allow(Dir).to receive(:entries).with('/test/a/aa').and_return(%w{. .. aaa})
|
110
|
+
allow(Dir).to receive(:entries).with('/test/a/ab').and_return(%w{. .. aba abb})
|
111
|
+
allow(File).to receive(:directory?).and_call_original
|
112
|
+
allow(File).to receive(:directory?).with('/test').and_return(true)
|
113
|
+
allow(File).to receive(:directory?).with('/test/a').and_return(true)
|
114
|
+
allow(File).to receive(:directory?).with('/test/b').and_return(false)
|
115
|
+
allow(File).to receive(:directory?).with('/test/a/aa').and_return(true)
|
116
|
+
allow(File).to receive(:directory?).with('/test/a/ab').and_return(true)
|
117
|
+
end
|
118
|
+
|
119
|
+
context 'with depth 0' do
|
120
|
+
let(:depth) { 0 }
|
121
|
+
it { is_expected.to eq %w{/test/a /test/b} }
|
122
|
+
end # /context with depth 0
|
123
|
+
|
124
|
+
context 'with depth 1' do
|
125
|
+
let(:depth) { 1 }
|
126
|
+
it { is_expected.to eq %w{/test/a/aa /test/a/ab} }
|
127
|
+
end # /context with depth 1
|
128
|
+
|
129
|
+
context 'with depth 2' do
|
130
|
+
let(:depth) { 2 }
|
131
|
+
it { is_expected.to eq %w{/test/a/aa/aaa /test/a/ab/aba /test/a/ab/abb} }
|
132
|
+
end # /context with depth 2
|
133
|
+
end # /describe #entries_at_depth
|
134
|
+
end
|