poise-languages 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -7
- data/CHANGELOG.md +8 -1
- data/Gemfile +2 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/poise_languages/command/mixin.rb +1 -1
- data/lib/poise_languages/command.rb +1 -1
- data/lib/poise_languages/error.rb +1 -1
- data/lib/poise_languages/scl/mixin.rb +1 -1
- data/lib/poise_languages/scl/resource.rb +1 -1
- data/lib/poise_languages/scl.rb +1 -1
- data/lib/poise_languages/static/mixin.rb +1 -1
- data/lib/poise_languages/static/resource.rb +3 -3
- data/lib/poise_languages/static.rb +1 -1
- data/lib/poise_languages/system/mixin.rb +1 -1
- data/lib/poise_languages/system/resource.rb +4 -3
- data/lib/poise_languages/system.rb +1 -1
- data/lib/poise_languages/utils/which.rb +2 -2
- data/lib/poise_languages/utils.rb +1 -1
- data/lib/poise_languages/version.rb +2 -2
- data/lib/poise_languages.rb +1 -1
- data/poise-languages.gemspec +1 -1
- 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 +2 -2
- data/test/gemfiles/master.gemfile +2 -1
- data/test/spec/command/mixin_spec.rb +1 -1
- data/test/spec/scl/mixin_spec.rb +1 -1
- data/test/spec/scl/resource_spec.rb +1 -1
- data/test/spec/spec_helper.rb +1 -1
- data/test/spec/static/resource_spec.rb +152 -0
- data/test/spec/system/mixin_spec.rb +1 -1
- data/test/spec/system/resource_spec.rb +1 -1
- data/test/spec/utils/which_spec.rb +1 -1
- data/test/spec/utils_spec.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 008fbb1c6b0f93e7579a1501d0bf326e1856a021
|
4
|
+
data.tar.gz: 25b5176424836a53b9143d4b6d143a3c64d33cac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecee153c5e3d81b2f310d0449c266be92573fb5558c5a3b3db3c548b3df3609a9845ce196ec0302a7a186213ef12d1f46f8bbb9a28376364efa84d68aea71a08
|
7
|
+
data.tar.gz: 20812e074fac41b31241e9504f4b9084d312f30d831da11c82ccd6ec969579ccfbc64b56120329f6e498ee23ee1ba7b3a9d0c5eb5ff15262a9c22670039a57be
|
data/.travis.yml
CHANGED
@@ -3,18 +3,18 @@ cache: bundler
|
|
3
3
|
language: ruby
|
4
4
|
rvm:
|
5
5
|
- '2.2'
|
6
|
-
addons:
|
7
|
-
apt:
|
8
|
-
packages:
|
9
|
-
- libgecode-dev
|
10
6
|
env:
|
11
|
-
global:
|
12
|
-
- USE_SYSTEM_GECODE=true
|
13
|
-
- KITCHEN_LOCAL_YAML=.kitchen.travis.yml
|
14
7
|
- secure: hBSCgjWddgLHgzkhAx1ItgA0joNdevIwYgo6B34fJ9meGVuntP1zbHgEJ/H4wzCnxumU7cvGo0DOy93nctrpy/El9YeQ8pqfqwt0vywDBY7FhNoRV2oW59+TsvOyUvdmO6YThv17qjzWf19Ag15A5X5LgfbCrFdubXpueOSMfgSsHzny3cjF+GTuh8Ykvs8U8914JlhLNc7k7Z/cyXog7i3sO83vaHEWUBytEsnBIc1YXbbp3d1B+7YiF2EDrFxMbyN2BjmjrWpkpl31SgiyneCmw8Vj8Q4T3seK9qRrLeX5HvIdtSa0YLTvxO4kfrsNlgcJgLOmVqqMo2EStT2LRDR1DdeP9Nj8RinqkNQ7lOl4InNK7IM6Kl56dgGmnt7ZVs2kVt1xhzqWQEcRYbP14kUocCzt6A9p4gLy9trQTkBGqgCIcxFqiyfXPLJv3yAYQovGemkv6WfPAViPum7GL+98pBj0TFbiRLLcOljijbAQOi7R2VTdgaHJVBDQ5u8R9mtcecTyiBJwgYn0INY7IjpGoL1mepRNBfG9gW1+awyfvGLeYXe3dISuaPUDKZHaRSKIvJIo2Pi/OxYUPsBLiF4cL8fg6DiB9Ly/AHmI2fgct+lvkByq6ec4NlSWpSyBRtBYF7uCEkXSeSo2MPCEmPxoY/S4pO6Jz6LPtzWRdRk=
|
8
|
+
before_install: "gem install bundler"
|
15
9
|
bundler_args: "--binstubs=$PWD/bin --jobs 3 --retry 3"
|
16
10
|
script:
|
17
11
|
- "./bin/rake travis"
|
18
12
|
gemfile:
|
19
13
|
- test/gemfiles/chef-12.gemfile
|
14
|
+
- test/gemfiles/chef-12.1.gemfile
|
15
|
+
- test/gemfiles/chef-12.2.gemfile
|
16
|
+
- test/gemfiles/chef-12.3.gemfile
|
17
|
+
- test/gemfiles/chef-12.4.gemfile
|
18
|
+
- test/gemfiles/chef-12.5.gemfile
|
19
|
+
- test/gemfiles/chef-12.6.gemfile
|
20
20
|
- test/gemfiles/master.gemfile
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v1.3.3
|
4
|
+
|
5
|
+
* [#3](https://github.com/poise/poise-languages/pull/3) Fix `static` binary
|
6
|
+
installation on AIX and Solaris.
|
7
|
+
* Only run the candidate version check for `system` installs when we aren't
|
8
|
+
passing in package_version.
|
9
|
+
|
3
10
|
## v1.3.2
|
4
11
|
|
5
12
|
* Handle static archive unpacking correctly when a single download is shared
|
@@ -21,7 +28,7 @@
|
|
21
28
|
* Support for installing development headers with SCL providers.
|
22
29
|
* Add `PoiseLanguages::Utils.shelljoin` for encoding command arrays with some
|
23
30
|
bash metadata characters allowed.
|
24
|
-
* [#1](https://github.com/poise/poise-languages/pull/1)
|
31
|
+
* [#1](https://github.com/poise/poise-languages/pull/1) Fix typo in gemspec.
|
25
32
|
|
26
33
|
## v1.1.0
|
27
34
|
|
data/Gemfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -30,3 +30,4 @@ end
|
|
30
30
|
dev_gem 'halite'
|
31
31
|
dev_gem 'poise'
|
32
32
|
dev_gem 'poise-boiler'
|
33
|
+
dev_gem 'poise-profiler'
|
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/poise_languages/scl.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -72,7 +72,7 @@ module PoiseLanguages
|
|
72
72
|
# @return [void]
|
73
73
|
def action_install
|
74
74
|
notifying_block do
|
75
|
-
install_utils unless node.platform_family?('mac_os_x', 'windows')
|
75
|
+
install_utils unless node.platform_family?('mac_os_x', 'windows', 'aix', 'solaris2')
|
76
76
|
download_archive
|
77
77
|
create_directory
|
78
78
|
# Unpack is handled as a notification from download_archive.
|
@@ -138,7 +138,7 @@ module PoiseLanguages
|
|
138
138
|
end
|
139
139
|
cmd << new_resource.cache_path
|
140
140
|
|
141
|
-
execute 'unpack archive' do
|
141
|
+
@unpack_archive ||= execute 'unpack archive' do
|
142
142
|
# Run via notification from #download_archive.
|
143
143
|
action :nothing
|
144
144
|
command cmd
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -165,8 +165,9 @@ module PoiseLanguages
|
|
165
165
|
# Grab the provider.
|
166
166
|
provider = resource.provider_for_action(action)
|
167
167
|
provider.action = action
|
168
|
-
# Check the candidate version if needed
|
169
|
-
|
168
|
+
# Check the candidate version if needed. With a manual package_version
|
169
|
+
# you get whatever you asked for.
|
170
|
+
patch_load_current_resource!(provider, new_resource.version) unless new_resource.package_version
|
170
171
|
# Run our action.
|
171
172
|
Chef::Log.debug("[#{new_resource.parent}] Running #{provider} with #{action}")
|
172
173
|
provider.run_action(action)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -37,7 +37,7 @@ module PoiseLanguages
|
|
37
37
|
# Allow passing something other than the real env var.
|
38
38
|
path ||= ENV['PATH']
|
39
39
|
# Based on Chef::Mixin::Which#which
|
40
|
-
# Copyright 2010-
|
40
|
+
# Copyright 2010-2016, Chef Softare, Inc.
|
41
41
|
paths = path.split(File::PATH_SEPARATOR) + extra_path
|
42
42
|
paths.each do |candidate_path|
|
43
43
|
filename = ::File.join(candidate_path, cmd)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -16,5 +16,5 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
module PoiseLanguages
|
19
|
-
VERSION = '1.3.
|
19
|
+
VERSION = '1.3.3'
|
20
20
|
end
|
data/lib/poise_languages.rb
CHANGED
data/poise-languages.gemspec
CHANGED
@@ -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'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -16,4 +16,4 @@
|
|
16
16
|
|
17
17
|
eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
18
18
|
|
19
|
-
gem 'chef', '~> 12.
|
19
|
+
gem 'chef', '~> 12.6'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015, Noah Kantrowitz
|
2
|
+
# Copyright 2015-2016, Noah Kantrowitz
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -20,3 +20,4 @@ gem 'chef', github: 'chef/chef'
|
|
20
20
|
gem 'halite', github: 'poise/halite'
|
21
21
|
gem 'poise', github: 'poise/poise'
|
22
22
|
gem 'poise-boiler', github: 'poise/poise-boiler'
|
23
|
+
gem 'poise-profiler', github: 'poise/poise-profiler'
|
data/test/spec/scl/mixin_spec.rb
CHANGED
data/test/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,152 @@
|
|
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
|
+
require 'spec_helper'
|
18
|
+
|
19
|
+
describe PoiseLanguages::Static::Resource do
|
20
|
+
let(:chefspec_options) { {platform: 'ubuntu', version: '14.04'} }
|
21
|
+
step_into(:poise_languages_static)
|
22
|
+
let(:unpack_resource) do
|
23
|
+
chef_run.execute('unpack archive')
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'on Ubuntu' do
|
27
|
+
recipe do
|
28
|
+
poise_languages_static '/opt/myapp' do
|
29
|
+
source 'http://example.com/myapp.tar'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
it { is_expected.to install_package('tar') }
|
34
|
+
it { is_expected.to create_directory('/opt/myapp') }
|
35
|
+
it { is_expected.to create_remote_file("#{Chef::Config[:file_cache_path]}/myapp.tar").with(source: 'http://example.com/myapp.tar') }
|
36
|
+
end # /context on Ubuntu
|
37
|
+
|
38
|
+
context 'on Solaris' do
|
39
|
+
let(:chefspec_options) { {platform: 'solaris2', version: '5.11'} }
|
40
|
+
recipe do
|
41
|
+
poise_languages_static '/opt/myapp' do
|
42
|
+
source 'http://example.com/myapp.tar'
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
it { is_expected.to_not install_package('tar') }
|
47
|
+
it { is_expected.to create_directory('/opt/myapp') }
|
48
|
+
it { is_expected.to create_remote_file("#{Chef::Config[:file_cache_path]}/myapp.tar").with(source: 'http://example.com/myapp.tar') }
|
49
|
+
end # /context on Solaris
|
50
|
+
|
51
|
+
context 'on AIX' do
|
52
|
+
let(:chefspec_options) { {platform: 'aix', version: '7.1'} }
|
53
|
+
recipe do
|
54
|
+
poise_languages_static '/opt/myapp' do
|
55
|
+
source 'http://example.com/myapp.tar'
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
it { is_expected.to_not install_package('tar') }
|
60
|
+
it { is_expected.to create_directory('/opt/myapp') }
|
61
|
+
it { is_expected.to create_remote_file("#{Chef::Config[:file_cache_path]}/myapp.tar").with(source: 'http://example.com/myapp.tar') }
|
62
|
+
end # /context on AIX
|
63
|
+
|
64
|
+
context 'with a .tar URL' do
|
65
|
+
recipe do
|
66
|
+
poise_languages_static '/opt/myapp' do
|
67
|
+
source 'http://example.com/myapp.tar'
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
it { is_expected.to install_package('tar') }
|
72
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xvf #{Chef::Config[:file_cache_path]}/myapp.tar} }
|
73
|
+
end # /context with a .tar URL
|
74
|
+
|
75
|
+
context 'with a .tar.gz URL' do
|
76
|
+
recipe do
|
77
|
+
poise_languages_static '/opt/myapp' do
|
78
|
+
source 'http://example.com/myapp.tar.gz'
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
it { is_expected.to install_package('tar') }
|
83
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xzvf #{Chef::Config[:file_cache_path]}/myapp.tar.gz} }
|
84
|
+
end # /context with a .tar.gz URL
|
85
|
+
|
86
|
+
context 'with a .tgz URL' do
|
87
|
+
recipe do
|
88
|
+
poise_languages_static '/opt/myapp' do
|
89
|
+
source 'http://example.com/myapp.tgz'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
it { is_expected.to install_package('tar') }
|
94
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xzvf #{Chef::Config[:file_cache_path]}/myapp.tgz} }
|
95
|
+
end # /context with a .tgz URL
|
96
|
+
|
97
|
+
context 'with a .tar.bz2 URL' do
|
98
|
+
recipe do
|
99
|
+
poise_languages_static '/opt/myapp' do
|
100
|
+
source 'http://example.com/myapp.tar.bz2'
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
it { is_expected.to install_package(%w{tar bzip2}) }
|
105
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xjvf #{Chef::Config[:file_cache_path]}/myapp.tar.bz2} }
|
106
|
+
end # /context with a .tar.bz2 URL
|
107
|
+
|
108
|
+
context 'with a .tbz URL' do
|
109
|
+
recipe do
|
110
|
+
poise_languages_static '/opt/myapp' do
|
111
|
+
source 'http://example.com/myapp.tbz'
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
it { is_expected.to install_package(%w{tar bzip2}) }
|
116
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xjvf #{Chef::Config[:file_cache_path]}/myapp.tbz} }
|
117
|
+
end # /context with a .tbz URL
|
118
|
+
|
119
|
+
context 'with a .tar.xz URL' do
|
120
|
+
recipe do
|
121
|
+
poise_languages_static '/opt/myapp' do
|
122
|
+
source 'http://example.com/myapp.tar.xz'
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
it { is_expected.to install_package(%w{tar xz-utils}) }
|
127
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xJvf #{Chef::Config[:file_cache_path]}/myapp.tar.xz} }
|
128
|
+
end # /context with a .tar.xz URL
|
129
|
+
|
130
|
+
context 'with a .txz URL' do
|
131
|
+
recipe do
|
132
|
+
poise_languages_static '/opt/myapp' do
|
133
|
+
source 'http://example.com/myapp.txz'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
it { is_expected.to install_package(%w{tar xz-utils}) }
|
138
|
+
it { expect(unpack_resource.command).to eq %W{tar --strip-components=1 -xJvf #{Chef::Config[:file_cache_path]}/myapp.txz} }
|
139
|
+
end # /context with a .txz URL
|
140
|
+
|
141
|
+
context 'action :uninstall' do
|
142
|
+
recipe do
|
143
|
+
poise_languages_static '/opt/myapp' do
|
144
|
+
action :uninstall
|
145
|
+
source 'http://example.com/myapp.tar'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
it { is_expected.to delete_directory('/opt/myapp').with(recursive: true) }
|
150
|
+
it { is_expected.to delete_file("#{Chef::Config[:file_cache_path]}/myapp.tar") }
|
151
|
+
end # /context action :uninstall
|
152
|
+
end
|
data/test/spec/utils_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-languages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: halite
|
@@ -85,12 +85,19 @@ files:
|
|
85
85
|
- poise-languages.gemspec
|
86
86
|
- test/docker/docker.ca
|
87
87
|
- test/docker/docker.pem
|
88
|
+
- test/gemfiles/chef-12.1.gemfile
|
89
|
+
- test/gemfiles/chef-12.2.gemfile
|
90
|
+
- test/gemfiles/chef-12.3.gemfile
|
91
|
+
- test/gemfiles/chef-12.4.gemfile
|
92
|
+
- test/gemfiles/chef-12.5.gemfile
|
93
|
+
- test/gemfiles/chef-12.6.gemfile
|
88
94
|
- test/gemfiles/chef-12.gemfile
|
89
95
|
- test/gemfiles/master.gemfile
|
90
96
|
- test/spec/command/mixin_spec.rb
|
91
97
|
- test/spec/scl/mixin_spec.rb
|
92
98
|
- test/spec/scl/resource_spec.rb
|
93
99
|
- test/spec/spec_helper.rb
|
100
|
+
- test/spec/static/resource_spec.rb
|
94
101
|
- test/spec/system/mixin_spec.rb
|
95
102
|
- test/spec/system/resource_spec.rb
|
96
103
|
- test/spec/utils/which_spec.rb
|
@@ -115,19 +122,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
122
|
version: '0'
|
116
123
|
requirements: []
|
117
124
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.5.2
|
119
126
|
signing_key:
|
120
127
|
specification_version: 4
|
121
128
|
summary: A Chef cookbook to help writing language cookbooks.
|
122
129
|
test_files:
|
123
130
|
- test/docker/docker.ca
|
124
131
|
- test/docker/docker.pem
|
132
|
+
- test/gemfiles/chef-12.1.gemfile
|
133
|
+
- test/gemfiles/chef-12.2.gemfile
|
134
|
+
- test/gemfiles/chef-12.3.gemfile
|
135
|
+
- test/gemfiles/chef-12.4.gemfile
|
136
|
+
- test/gemfiles/chef-12.5.gemfile
|
137
|
+
- test/gemfiles/chef-12.6.gemfile
|
125
138
|
- test/gemfiles/chef-12.gemfile
|
126
139
|
- test/gemfiles/master.gemfile
|
127
140
|
- test/spec/command/mixin_spec.rb
|
128
141
|
- test/spec/scl/mixin_spec.rb
|
129
142
|
- test/spec/scl/resource_spec.rb
|
130
143
|
- test/spec/spec_helper.rb
|
144
|
+
- test/spec/static/resource_spec.rb
|
131
145
|
- test/spec/system/mixin_spec.rb
|
132
146
|
- test/spec/system/resource_spec.rb
|
133
147
|
- test/spec/utils/which_spec.rb
|