chef-sugar 2.1.0 → 2.2.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
  SHA1:
3
- metadata.gz: 7a756ffa35fc9de2af5b25d862c38ec8fcd6c67f
4
- data.tar.gz: f1bcb6ed7a4e85249f2701d7b4f5b31eb088ac2a
3
+ metadata.gz: ffd88ed3296573100935f5c32b367c0b358826c3
4
+ data.tar.gz: 9939836e75d3a827c143aa1de882dc476e63d117
5
5
  SHA512:
6
- metadata.gz: ad76496fedb799ce020db9d54fde348478144e24321a58bacdb3853a18d437e893627f9ca416526d6b99f824954b3fef79318c926eb05b37c90d84cbdb1b639d
7
- data.tar.gz: 4c1c70570f5f5774f9541112f9be14d5ff65282c49d74d3e431c2b28ec8943a5c4d1000b1650ed9f47ad72f153874cbd8c3eafa300d394ba5aa69d4f3e802344
6
+ metadata.gz: 47ab4596120ad672030793e294e2939495b34a853a58972e20b56ae4b55d27dc69aef96dd647f424a992046a37f6e9c2870cd00787efb5a7f8a0536c4f15f056
7
+ data.tar.gz: 029757c522fd23b773022f59d3230ff7a523cbc9696f292c8abe0f11eff8e34e9c11f66c0b310d8626781ba7bc450f74a26a7b83e0b1db8ed6dab95f3be6955d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@ Chef Sugar Changelog
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
+ v2.2.0 (2014-08-20)
6
+ -------------------
7
+ ### Improvements
8
+ - Add `smartos?` matcher
9
+ - Add `omnios?` matcher
10
+
5
11
  v2.1.0 (2014-06-26)
6
12
  -------------------
7
13
  ### Improvements
data/README.md CHANGED
@@ -275,6 +275,8 @@ node.deep_fetch('apache2', 'config', 'root') => node['apache2']['config']['root'
275
275
  - `ubuntu?`
276
276
  - `solaris2?`
277
277
  - `aix?`
278
+ - `smartos?`
279
+ - `omnios?`
278
280
 
279
281
  There are also a series of dynamically defined matchers that map named operating system release versions and comparison operators in the form "#{platform}\_#{operator}\_#{name}?". For example:
280
282
 
@@ -26,6 +26,7 @@ class Chef
26
26
  'jessie' => '8',
27
27
  },
28
28
  'linuxmint' => {
29
+ 'qiana' => '17',
29
30
  'petra' => '16',
30
31
  'olivia' => '15',
31
32
  'nadia' => '14',
@@ -185,6 +186,27 @@ class Chef
185
186
  node['platform'] == 'aix'
186
187
  end
187
188
 
189
+ #
190
+ # Determine if the current node is smartos
191
+ #
192
+ # @param [Chef::Node] node
193
+ #
194
+ # @return [Boolean]
195
+ #
196
+ def smartos?(node)
197
+ node['platform'] == 'smartos'
198
+ end
199
+
200
+ #
201
+ # Determine if the current node is omnios
202
+ #
203
+ # @param [Chef::Node] node
204
+ #
205
+ # @return [Boolean]
206
+ #
207
+ def omnios?(node)
208
+ node['platform'] == 'omnios'
209
+ end
188
210
  end
189
211
 
190
212
  module DSL
@@ -16,6 +16,6 @@
16
16
 
17
17
  class Chef
18
18
  module Sugar
19
- VERSION = '2.1.0'
19
+ VERSION = '2.2.0'
20
20
  end
21
21
  end
data/metadata.rb CHANGED
@@ -14,4 +14,4 @@ For the most up-to-date information and documentation, please visit the [Chef
14
14
  Sugar project page on GitHub](https://github.com/sethvargo/chef-sugar).
15
15
  EOH
16
16
 
17
- version '2.0.0'
17
+ version '2.2.0'
@@ -111,6 +111,30 @@ describe Chef::Sugar::Platform do
111
111
  end
112
112
  end
113
113
 
114
+ describe '#smartos?' do
115
+ it 'returns true when the platform is smartos' do
116
+ node = { 'platform' => 'smartos' }
117
+ expect(described_class.smartos?(node)).to be_truthy
118
+ end
119
+
120
+ it 'returns false when the platform is not smartos' do
121
+ node = { 'platform' => 'windows' }
122
+ expect(described_class.smartos?(node)).to be_falsey
123
+ end
124
+ end
125
+
126
+ describe '#omnios?' do
127
+ it 'returns true when the platform is omnios' do
128
+ node = { 'platform' => 'omnios' }
129
+ expect(described_class.omnios?(node)).to be_truthy
130
+ end
131
+
132
+ it 'returns false when the platform is not omnios' do
133
+ node = { 'platform' => 'windows' }
134
+ expect(described_class.omnios?(node)).to be_falsey
135
+ end
136
+ end
137
+
114
138
  context 'dynamic matchers' do
115
139
  describe '#ubuntu_after_lucid?' do
116
140
  it 'returns true when the version is later than 10.04' do
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: 2.1.0
4
+ version: 2.2.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: 2014-07-27 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler