wsdsl 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -88,18 +88,21 @@ module JSONResponseVerification
88
88
  def valid_hash_type?(hash, prop_template)
89
89
  name = prop_template.name.to_s
90
90
  attribute = hash[name]
91
+
91
92
  # Check for nullity
92
- if attribute.nil? && prop_template.opts[:null] != true
93
- return false
93
+ if attribute.nil?
94
+ return prop_template.opts[:null] == true
94
95
  end
96
+
95
97
  type = prop_template.type
96
98
  return true if type.nil?
99
+
97
100
  rule = ParamsVerification.type_validations[type.to_sym]
98
101
  if rule.nil?
99
102
  puts "Don't know how to validate attributes of type #{type}" if type.to_sym != :string
100
103
  return true
101
104
  end
102
-
105
+
103
106
  attribute.to_s =~ rule
104
107
  end
105
108
 
data/wsdsl.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wsdsl}
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Matt Aimonetti}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wsdsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: