poise-languages 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/poise_languages.rb +1 -1
- data/lib/poise_languages/command.rb +1 -1
- data/lib/poise_languages/command/mixin.rb +1 -1
- data/lib/poise_languages/error.rb +1 -1
- data/lib/poise_languages/scl.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/static.rb +1 -1
- data/lib/poise_languages/static/mixin.rb +1 -1
- data/lib/poise_languages/static/resource.rb +1 -1
- data/lib/poise_languages/system.rb +1 -1
- data/lib/poise_languages/system/mixin.rb +1 -1
- data/lib/poise_languages/system/resource.rb +11 -4
- data/lib/poise_languages/utils.rb +1 -1
- data/lib/poise_languages/utils/which.rb +2 -2
- data/lib/poise_languages/version.rb +2 -2
- data/poise-languages.gemspec +1 -1
- data/test/gemfiles/chef-12.1.gemfile +1 -1
- data/test/gemfiles/chef-12.10.gemfile +1 -1
- data/test/gemfiles/chef-12.11.gemfile +1 -1
- data/test/gemfiles/chef-12.12.gemfile +1 -1
- data/test/gemfiles/chef-12.13.gemfile +1 -1
- data/test/gemfiles/chef-12.14.gemfile +1 -1
- data/test/gemfiles/chef-12.15.gemfile +1 -1
- data/test/gemfiles/chef-12.16.gemfile +19 -0
- data/test/gemfiles/chef-12.17.gemfile +19 -0
- data/test/gemfiles/chef-12.2.gemfile +1 -1
- data/test/gemfiles/chef-12.3.gemfile +1 -1
- data/test/gemfiles/chef-12.4.gemfile +2 -2
- data/test/gemfiles/chef-12.5.gemfile +1 -1
- data/test/gemfiles/chef-12.6.gemfile +1 -1
- data/test/gemfiles/chef-12.7.gemfile +1 -1
- data/test/gemfiles/chef-12.8.gemfile +1 -1
- data/test/gemfiles/chef-12.9.gemfile +1 -1
- data/test/gemfiles/chef-12.gemfile +2 -2
- data/test/gemfiles/master.gemfile +1 -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 +1 -1
- data/test/spec/system/mixin_spec.rb +1 -1
- data/test/spec/system/resource_spec.rb +7 -7
- data/test/spec/utils/which_spec.rb +1 -1
- data/test/spec/utils_spec.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fcceac2b90bd84a52cf585a0c822fbad9414a11
|
4
|
+
data.tar.gz: 9e44805de886e6b3da58a1544455b1ea91da6525
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d57acf64731c04828f9647460e2d811d0d27a91ad57b876475c7e400442e0009ad204b8c8457f0753676193d66a30cb1f58ce161822a1bd6c3dc21b87cf6949c
|
7
|
+
data.tar.gz: 7a889cba9e2f8882826fae01967ad23dce09d86ba3ae6ce4b355b2d80598ecffcecd6645348ca36a677f2bc0cb7791ebd2e3c3cee542de0ef504bda15341c9ce
|
data/.travis.yml
CHANGED
@@ -41,5 +41,9 @@ matrix:
|
|
41
41
|
gemfile: test/gemfiles/chef-12.14.gemfile
|
42
42
|
- rvm: 2.3.1
|
43
43
|
gemfile: test/gemfiles/chef-12.15.gemfile
|
44
|
+
- rvm: 2.3.1
|
45
|
+
gemfile: test/gemfiles/chef-12.16.gemfile
|
46
|
+
- rvm: 2.3.1
|
47
|
+
gemfile: test/gemfiles/chef-12.17.gemfile
|
44
48
|
- rvm: 2.3.1
|
45
49
|
gemfile: test/gemfiles/master.gemfile
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
data/lib/poise_languages.rb
CHANGED
data/lib/poise_languages/scl.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015-
|
2
|
+
# Copyright 2015-2017, 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.
|
@@ -133,10 +133,11 @@ module PoiseLanguages
|
|
133
133
|
end
|
134
134
|
|
135
135
|
Chef::Log.debug("[#{new_resource.parent}] Building package resource using #{packages.inspect}.")
|
136
|
+
package_resource_class = Chef::Resource.resource_for_node(:package, node)
|
136
137
|
@package_resource ||= if node.platform_family?('rhel', 'fedora', 'amazon', 'mac_os_x')
|
137
138
|
# @todo Can't use multi-package mode with yum pending https://github.com/chef/chef/issues/3476.
|
138
139
|
packages.map do |name, version|
|
139
|
-
|
140
|
+
package_resource_class.new(name, run_context).tap do |r|
|
140
141
|
r.version(version)
|
141
142
|
r.action(action)
|
142
143
|
r.declared_type = :package
|
@@ -144,7 +145,7 @@ module PoiseLanguages
|
|
144
145
|
end
|
145
146
|
end
|
146
147
|
else
|
147
|
-
[
|
148
|
+
[package_resource_class.new(packages.keys, run_context).tap do |r|
|
148
149
|
r.version(packages.values)
|
149
150
|
r.action(action)
|
150
151
|
r.declared_type = :package
|
@@ -195,7 +196,13 @@ module PoiseLanguages
|
|
195
196
|
# so we need the nil? check to see if the object being proxied is
|
196
197
|
# nil (i.e. there is no version).
|
197
198
|
unless candidate_version && (!candidate_version.nil?) && (!candidate_version.empty?) && candidate_version.start_with?(version)
|
198
|
-
|
199
|
+
# Don't display a wonky error message if there is no candidate.
|
200
|
+
candidate_label = if candidate_version && (!candidate_version.nil?) && (!candidate_version.empty?)
|
201
|
+
candidate_version
|
202
|
+
else
|
203
|
+
candidate_version.inspect
|
204
|
+
end
|
205
|
+
raise PoiseLanguages::Error.new("Package #{package_name} would install #{candidate_label}, which does not match #{version.empty? ? version.inspect : version}. Please set the package_name or package_version provider options.")
|
199
206
|
end
|
200
207
|
end
|
201
208
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015-
|
2
|
+
# Copyright 2015-2017, 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-2017, 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-
|
2
|
+
# Copyright 2015-2017, 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 = '2.0.
|
19
|
+
VERSION = '2.0.5'
|
20
20
|
end
|
data/poise-languages.gemspec
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2017, 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.16.42'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2017, 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.17.44'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015-
|
2
|
+
# Copyright 2015-2017, 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.
|
@@ -18,6 +18,6 @@ eval_gemfile File.expand_path('../../../Gemfile', __FILE__)
|
|
18
18
|
|
19
19
|
gem 'chef', '~> 12.4.3'
|
20
20
|
gem 'rack', '< 2'
|
21
|
-
gem 'ridley', '4.4.1'
|
22
21
|
gem 'foodcritic', '< 8'
|
23
22
|
gem 'fauxhai', '<= 3.9.0'
|
23
|
+
gem 'gh', '0.14.0'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015-
|
2
|
+
# Copyright 2015-2017, 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.17'
|
data/test/spec/scl/mixin_spec.rb
CHANGED
data/test/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2015-
|
2
|
+
# Copyright 2015-2017, 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.
|
@@ -59,14 +59,14 @@ describe PoiseLanguages::System::Resource do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
context 'on Ubuntu' do
|
62
|
-
it { is_expected.to
|
62
|
+
it { is_expected.to install_apt_package('mylang, mylang-dev') }
|
63
63
|
end # /context on Ubuntu
|
64
64
|
|
65
65
|
context 'on CentOS' do
|
66
66
|
let(:chefspec_options) { {platform: 'centos', version: '7.0'} }
|
67
67
|
|
68
|
-
it { is_expected.to
|
69
|
-
it { is_expected.to
|
68
|
+
it { is_expected.to install_yum_package('mylang') }
|
69
|
+
it { is_expected.to install_yum_package('mylang-devel') }
|
70
70
|
end # /context on Ubuntu
|
71
71
|
|
72
72
|
context 'action :upgrade' do
|
@@ -79,7 +79,7 @@ describe PoiseLanguages::System::Resource do
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
it { is_expected.to
|
82
|
+
it { is_expected.to upgrade_apt_package('mylang, mylang-dev') }
|
83
83
|
end # /context action :upgrade
|
84
84
|
|
85
85
|
context 'action :uninstall' do
|
@@ -95,7 +95,7 @@ describe PoiseLanguages::System::Resource do
|
|
95
95
|
default_attributes[:poise_current] = '2.0'
|
96
96
|
end
|
97
97
|
|
98
|
-
it { is_expected.to
|
98
|
+
it { is_expected.to purge_apt_package('mylang, mylang-dev') }
|
99
99
|
end # /context action :uninstall
|
100
100
|
|
101
101
|
context 'with a matching version' do
|
@@ -107,7 +107,7 @@ describe PoiseLanguages::System::Resource do
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
-
it { is_expected.to
|
110
|
+
it { is_expected.to install_apt_package('mylang, mylang-dev') }
|
111
111
|
end # /context with a matching version
|
112
112
|
|
113
113
|
context 'with a non-matching version' do
|
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: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- test/gemfiles/chef-12.13.gemfile
|
121
121
|
- test/gemfiles/chef-12.14.gemfile
|
122
122
|
- test/gemfiles/chef-12.15.gemfile
|
123
|
+
- test/gemfiles/chef-12.16.gemfile
|
124
|
+
- test/gemfiles/chef-12.17.gemfile
|
123
125
|
- test/gemfiles/chef-12.2.gemfile
|
124
126
|
- test/gemfiles/chef-12.3.gemfile
|
125
127
|
- test/gemfiles/chef-12.4.gemfile
|
@@ -173,6 +175,8 @@ test_files:
|
|
173
175
|
- test/gemfiles/chef-12.13.gemfile
|
174
176
|
- test/gemfiles/chef-12.14.gemfile
|
175
177
|
- test/gemfiles/chef-12.15.gemfile
|
178
|
+
- test/gemfiles/chef-12.16.gemfile
|
179
|
+
- test/gemfiles/chef-12.17.gemfile
|
176
180
|
- test/gemfiles/chef-12.2.gemfile
|
177
181
|
- test/gemfiles/chef-12.3.gemfile
|
178
182
|
- test/gemfiles/chef-12.4.gemfile
|