odata 0.5.1 → 0.5.2

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: 0168d51fbc598d14a4ad183bf905476b1c7e0c33
4
- data.tar.gz: 2b1678db31c28a5bd4122753d43153f9d83ac6a7
3
+ metadata.gz: 6f16368d2054cba495078a9100e02e9b8fa9ffb6
4
+ data.tar.gz: f2c68f494a1c2d661d804ce03372ef7962a34306
5
5
  SHA512:
6
- metadata.gz: 315c0846a3e364a234fa63595618d89e8a6d340d0046440c815ba9153ec7db419136443027203ae6d307ba82883d089af0fcb02379c1c33010b53f21979f3251
7
- data.tar.gz: 53b3c627ab42f413d264c23aa8dfea0f64e559e87c0cd747ceba9e786de2c0f537836c6fdf528d27bcc6fd1cdfa32c4746350c681a22daed1664f3dfcfa63cd6
6
+ metadata.gz: deed447ad436f1daf3db774bf0966a5874779185ac8a595be47a4c32484eb618fac265a3df47ec4b67b5c144e199aedce7c5a83275943b59b0a4540ac2b63358
7
+ data.tar.gz: 1ba0eb5eb2ae7ecf48fd3c2fad2779d59118749e0ea531c2218ee303b013997b952159d795765b5d5f6fd65c51b6de88b0d668d7110eafdfd59b69a32cbcf848
@@ -216,9 +216,16 @@ module OData
216
216
  property_name = property_xml.attributes['Name'].value
217
217
  value_type = property_xml.attributes['Type'].value
218
218
  property_options = {}
219
- property_options[:allows_nil] = false if property_xml.attributes['Nullable'] == 'false'
220
- klass_name = value_type.gsub(/^Edm\./, '')
221
- property = get_property_class(klass_name).new(property_name, nil, property_options)
219
+
220
+ if value_type =~ /^#{namespace}\./
221
+ type_name = value_type.gsub(/^#{namespace}\./, '')
222
+ property = ::OData::ComplexType.new(name: type_name, service: self)
223
+ else
224
+ klass_name = value_type.gsub(/^Edm\./, '')
225
+ property_options[:allows_nil] = false if property_xml.attributes['Nullable'] == 'false'
226
+ property = ::OData::Properties.const_get(klass_name).new(property_name, nil, property_options)
227
+ end
228
+
222
229
  return [property_name, property]
223
230
  end
224
231
  end
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson