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 +4 -4
- data/lib/odata/service.rb +10 -3
- data/lib/odata/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f16368d2054cba495078a9100e02e9b8fa9ffb6
|
4
|
+
data.tar.gz: f2c68f494a1c2d661d804ce03372ef7962a34306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deed447ad436f1daf3db774bf0966a5874779185ac8a595be47a4c32484eb618fac265a3df47ec4b67b5c144e199aedce7c5a83275943b59b0a4540ac2b63358
|
7
|
+
data.tar.gz: 1ba0eb5eb2ae7ecf48fd3c2fad2779d59118749e0ea531c2218ee303b013997b952159d795765b5d5f6fd65c51b6de88b0d668d7110eafdfd59b69a32cbcf848
|
data/lib/odata/service.rb
CHANGED
@@ -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
|
-
|
220
|
-
|
221
|
-
|
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
|
data/lib/odata/version.rb
CHANGED