chef-validation 0.2.0 → 0.2.1

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: c10072b01c8f4841b522cd9161644601699af394
4
- data.tar.gz: 019ce301127133ac4504158ba7ea0d8f63bd0c0a
3
+ metadata.gz: 1b29af6d04d2912a53945dd0e0397c742759e80a
4
+ data.tar.gz: aa651f92089bf1f9b5c3b664b6b9de062ebe515b
5
5
  SHA512:
6
- metadata.gz: 40e9e2680692b1bf27877d63d86160bf581214a31ff2b304a72500a8bc7c158f6727f0c78f0e85d15026f02bbcb27b20cc427566db4d7530d18252a5f210a109
7
- data.tar.gz: 24d5d8cb1c11e9783516b1ba15b091489fd245e9f2e7091d85f91be076ba866fb33e4b9954514bf70d1af223cd4b43abf7cb5643895f0b285851ba79ec2811dc
6
+ metadata.gz: a4015182c4d51a8e2a05805397fb743579ad7cd3f25a688379e6798ebf28443b0e01946613dafcaaa2b98d7838149888dc4114589ee2d29ca2d06be0b604319e
7
+ data.tar.gz: 74d31befe91e602d5b2a177bb5ce9a3a51221ac961deac61b921a5bb6a1db818d901c33e22dadf6fed9ce54f26c2f7666ace95acbb9f6f26612f2a5ae0f027f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.2.1
2
+
3
+ * Bug Fixes
4
+ * Don't treat 'false' as a missing required attribute
5
+
1
6
  # 0.2.0
2
7
 
3
8
  * Enhancements
@@ -86,6 +86,8 @@ module Chef::Validation
86
86
 
87
87
  def validate_required(value, name)
88
88
  errors = []
89
+ return errors if value.is_a?(TrueClass) || value.is_a?(FalseClass)
90
+
89
91
  if value.blank?
90
92
  errors << "Required attribute but was not present."
91
93
  end
@@ -1,4 +1,4 @@
1
1
  class Chef; end;
2
2
  module Chef::Validation
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor