chef-sugar 3.0.1 → 3.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
  SHA1:
3
- metadata.gz: 0a4445aeb371367f5395edf0f995fd4f52e6314a
4
- data.tar.gz: 92dcd636d49954fd5095234337e363905a402c69
3
+ metadata.gz: 84e4ca4897116b3bbebc4ee5793028a00dea4069
4
+ data.tar.gz: 8f824034670f45f3b410cc427f3fc483e0f7d5b1
5
5
  SHA512:
6
- metadata.gz: 3c97a0235cba4f0600e1f7213edfb881443a37867962a89d878d3b9976e0dc3b8198a7440a17ca0a7cf8d78a365e1b0653aedd915cea4d0a8a1aad06a0352b35
7
- data.tar.gz: 067a00297c93cbb0ad32842070f7b0002e39703f7a13881d8a8c36931b56fdfd6e7da2e34c77dd3d16485ffb036431f117dafd50f9005367cf9fd64f595fca5b
6
+ metadata.gz: 9f4b0c8adc010dccea2d920e2315c735a093fb630e2dd9d1367c31a06610ce4fcee7fae632dd32e15629ccdec117434d4a56a8188aee4a1182a5f779305add3d
7
+ data.tar.gz: b32b2f55093c5f19ae0942206a3177048637a8b362a456c181d22ac9006d6bd40fce7e8d7b473773f0d250c32610baf2549dbc1c75dce991a1351043250cbc34
@@ -2,6 +2,14 @@ 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
+ v3.0.2 (2015-03-26)
6
+ -------------------
7
+ ### Improvements
8
+ - Add helpers for `ppc64` and `ppc64le` architecture
9
+
10
+ ### Bug Fixes
11
+ - Adjustments to error message
12
+
5
13
  v3.0.1 (2015-03-20)
6
14
  -------------------
7
15
  ### Breaking Changes
data/README.md CHANGED
@@ -80,6 +80,8 @@ API
80
80
  - `_32_bit?`
81
81
  - `intel?`
82
82
  - `sparc?`
83
+ - `ppc64?`
84
+ - `ppc64le?`
83
85
 
84
86
  #### Examples
85
87
  ```ruby
@@ -60,6 +60,26 @@ class Chef
60
60
  %w(sun4u sun4v)
61
61
  .include?(node['kernel']['machine'])
62
62
  end
63
+
64
+ #
65
+ # Determine if the current architecture is Powerpc64 Big Endian
66
+ #
67
+ # @return [Boolean]
68
+ #
69
+ def ppc64?(node)
70
+ %w(ppc64)
71
+ .include?(node['kernel']['machine'])
72
+ end
73
+
74
+ #
75
+ # Determine if the current architecture is Powerpc64 Little Endian
76
+ #
77
+ # @return [Boolean]
78
+ #
79
+ def ppc64le?(node)
80
+ %w(ppc64le)
81
+ .include?(node['kernel']['machine'])
82
+ end
63
83
  end
64
84
 
65
85
  module DSL
@@ -75,6 +95,12 @@ class Chef
75
95
 
76
96
  # @see Chef::Sugar::Architecture#sparc?
77
97
  def sparc?; Chef::Sugar::Architecture.sparc?(node); end
98
+
99
+ # @see Chef::Sugar::Architecture#ppc64?
100
+ def ppc64?; Chef::Sugar::Architecture.ppc64?(node); end
101
+
102
+ # @see Chef::Sugar::Architecture#ppc64le?
103
+ def ppc64le?; Chef::Sugar::Architecture.ppc64le?(node); end
78
104
  end
79
105
  end
80
106
  end
@@ -162,21 +162,11 @@ The Chef Sugar recipe DSL method `compile_time' has been renamed to
162
162
  version, so please continue reading to understand the necessary semantic
163
163
  versioning violation.
164
164
 
165
- Despite having existed since October 15, 2013 (b4d4c0e) and being one of the
166
- most widely used cookbooks in the Chef ecosystem, Chef Software decided to
167
- implement their own version of `compile_time' in Chef 12.1, breaking any cookbook
168
- that uses or depends on Chef Sugar on Chef 12.1:
165
+ Chef Software implemented a version of `compile_time' in Chef 12.1, breaking any
166
+ cookbook that uses or depends on Chef Sugar on Chef 12.1:
169
167
 
170
168
  https://www.chef.io/blog/2015/03/03/chef-12-1-0-released
171
169
 
172
- As is common with Chef-ecosystem tooling, no warning was given, and maintainers
173
- are left to pick up the pieces from upset Chef users who get rather bespoke
174
- error messages now:
175
-
176
- https://github.com/sethvargo/chef-sugar/issues/89
177
- https://github.com/opscode-cookbooks/xml/issues/22
178
- https://github.com/opscode-cookbooks/aws/pull/110
179
-
180
170
  In order to progress Chef Sugar forward, the DSL method has been renamed to
181
171
  avoid the namespace collision.
182
172
 
@@ -211,7 +201,7 @@ You should NOT change resource-level `compile_time' attributes:
211
201
 
212
202
  I truly apologize for the inconvienence and hope the reason for introducing this
213
203
  breaking change is clear. I am sorry if it causes extra work, but I promise this
214
- error message is much more informative that "wrong number of arguments".
204
+ error message is much more informative than "wrong number of arguments".
215
205
 
216
206
  If you have any questions, please feel free to open an issue on GitHub at:
217
207
 
@@ -16,6 +16,6 @@
16
16
 
17
17
  class Chef
18
18
  module Sugar
19
- VERSION = '3.0.1'
19
+ VERSION = '3.1.0'
20
20
  end
21
21
  end
@@ -60,4 +60,18 @@ describe Chef::Sugar::Architecture do
60
60
  end
61
61
  end
62
62
  end
63
+
64
+ describe '#ppc64?' do
65
+ it 'returns true when the system is PowerPC64 Big Endian' do
66
+ node = { 'kernel' => { 'machine' => 'ppc64' } }
67
+ expect(described_class.ppc64?(node)).to be true
68
+ end
69
+ end
70
+
71
+ describe '#ppc64le?' do
72
+ it 'returns true when the system is PowerPC64 Little Endian' do
73
+ node = { 'kernel' => { 'machine' => 'ppc64le' } }
74
+ expect(described_class.ppc64le?(node)).to be true
75
+ end
76
+ end
63
77
  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: 3.0.1
4
+ version: 3.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: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.4.5
167
+ rubygems_version: 2.4.6
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: A collection of helper methods and modules that make working with Chef recipes
@@ -191,4 +191,3 @@ test_files:
191
191
  - spec/unit/chef/sugar/vagrant_spec.rb
192
192
  - spec/unit/chef/sugar/virtualization_spec.rb
193
193
  - spec/unit/recipes/default_spec.rb
194
- has_rdoc: