chef-sugar 4.0.1 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/chef/sugar/platform_family.rb +1 -10
- data/lib/chef/sugar/version.rb +1 -1
- data/spec/unit/chef/sugar/platform_family_spec.rb +6 -21
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9af9d5af445419a590304e19d1b1d22e8c3c9914bd1c30e3f63bde1aeef2bd83
|
4
|
+
data.tar.gz: b09532265cda101b4acad35684aafcdf8cacde06b9bdcbec0adbd7753adcc6f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b75c485d56ff4a0404bc0b5eb6426ff388d405f0ba5b53caf0951b1d05f8a5cd59629cd5779cd0e28b550b5786f2c565b6af965f7e6649562ee9fd817bf2757c
|
7
|
+
data.tar.gz: 98bb4b85319dcf85e0f0123b88eea0d378c36838e496d5305bd445f53fba5843b641c5d6caaea2c53cdf68d358a611d6be16b49ef31cb734cb904180a1d59929
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,13 @@
|
|
2
2
|
|
3
3
|
This file is used to list changes made in each version of the chef-sugar cookbook and gem.
|
4
4
|
|
5
|
+
## v4.1.0 (2018-08-16)
|
6
|
+
|
7
|
+
- Improve the detection of linux hosts with the linux? helper. Amazon Linux and obscure distros will now be properly detected.
|
8
|
+
|
5
9
|
## v4.0.1 (2018-08-09)
|
6
10
|
|
7
|
-
- Add new Debian, Mint, macOS codenames
|
11
|
+
- Add new Debian, Mint, macOS codenames
|
8
12
|
- Add new Ubuntu codenames: artful, bionic, cosmic
|
9
13
|
|
10
14
|
## v4.0.0 (2018-01-26)
|
@@ -164,16 +164,7 @@ class Chef
|
|
164
164
|
# @return [Boolean]
|
165
165
|
#
|
166
166
|
def linux?(node)
|
167
|
-
|
168
|
-
arch
|
169
|
-
debian
|
170
|
-
fedora
|
171
|
-
gentoo
|
172
|
-
rhel
|
173
|
-
slackware
|
174
|
-
suse
|
175
|
-
wrlinux
|
176
|
-
).include?(node['platform_family'])
|
167
|
+
node['os'] == 'linux'
|
177
168
|
end
|
178
169
|
end
|
179
170
|
|
data/lib/chef/sugar/version.rb
CHANGED
@@ -148,33 +148,18 @@ describe Chef::Sugar::PlatformFamily do
|
|
148
148
|
end
|
149
149
|
|
150
150
|
describe '#linux?' do
|
151
|
-
it 'returns true when the
|
152
|
-
node = { '
|
153
|
-
expect(described_class.linux?(node)).to be true
|
154
|
-
end
|
155
|
-
|
156
|
-
it 'returns true when the platform_family is RedHat' do
|
157
|
-
node = { 'platform_family' => 'rhel' }
|
158
|
-
expect(described_class.linux?(node)).to be true
|
159
|
-
end
|
160
|
-
|
161
|
-
it 'returns true when the platform_family is wrlinux' do
|
162
|
-
node = { 'platform_family' => 'wrlinux' }
|
151
|
+
it 'returns true when the os is Linux' do
|
152
|
+
node = { 'os' => 'linux' }
|
163
153
|
expect(described_class.linux?(node)).to be true
|
164
154
|
end
|
165
155
|
|
166
|
-
it 'returns false when the
|
167
|
-
node = { '
|
168
|
-
expect(described_class.linux?(node)).to be false
|
169
|
-
end
|
170
|
-
|
171
|
-
it 'returns false when the platform_family is OSX' do
|
172
|
-
node = { 'platform_family' => 'mac_os_x' }
|
156
|
+
it 'returns false when the os is Windows' do
|
157
|
+
node = { 'os' => 'windows' }
|
173
158
|
expect(described_class.linux?(node)).to be false
|
174
159
|
end
|
175
160
|
|
176
|
-
it 'returns false when the
|
177
|
-
node = { '
|
161
|
+
it 'returns false when the os is Windows' do
|
162
|
+
node = { 'os' => 'darwin' }
|
178
163
|
expect(described_class.linux?(node)).to be false
|
179
164
|
end
|
180
165
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-sugar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|