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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26e5390ab845a7043efbe3b331508964a5235cbd74033afefc0dd7b1ae197dec
4
- data.tar.gz: c4dd59760db4d2598cd3186e54281d00cdf7eb33fc12e67a0f024d82cb1dde8a
3
+ metadata.gz: 9af9d5af445419a590304e19d1b1d22e8c3c9914bd1c30e3f63bde1aeef2bd83
4
+ data.tar.gz: b09532265cda101b4acad35684aafcdf8cacde06b9bdcbec0adbd7753adcc6f8
5
5
  SHA512:
6
- metadata.gz: f5262a4a5ac63d0d9159cf523c31565aaf7a55530fa707993e893810d627e896280de1c3306d5da964dc5862154aad2c36ba7b2eff90c36838564e109a3185b1
7
- data.tar.gz: 9ecc9cc256950fb02cf2d85ef3cf679c9221d263092d6284c7d61c58f15bfb4303f44380591a40c52b5c2146810bfd7faacf39dba9230fad2facb3e2ff73b658
6
+ metadata.gz: b75c485d56ff4a0404bc0b5eb6426ff388d405f0ba5b53caf0951b1d05f8a5cd59629cd5779cd0e28b550b5786f2c565b6af965f7e6649562ee9fd817bf2757c
7
+ data.tar.gz: 98bb4b85319dcf85e0f0123b88eea0d378c36838e496d5305bd445f53fba5843b641c5d6caaea2c53cdf68d358a611d6be16b49ef31cb734cb904180a1d59929
@@ -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
- %w(
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
 
@@ -16,6 +16,6 @@
16
16
 
17
17
  class Chef
18
18
  module Sugar
19
- VERSION = '4.0.1'
19
+ VERSION = '4.1.0'
20
20
  end
21
21
  end
@@ -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 platform_family is Debian' do
152
- node = { 'platform_family' => 'debian' }
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 platform_family is Windows' do
167
- node = { 'platform_family' => 'windows' }
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 platform_family is OpenBSD' do
177
- node = { 'platform_family' => 'openbsd' }
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.1
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-09 00:00:00.000000000 Z
11
+ date: 2018-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler