odata 0.6.0 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/odata/entity.rb +1 -0
- data/lib/odata/query/criteria.rb +6 -2
- data/lib/odata/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 038dc613d3085dd5a50fd5449c6789411eac3138
|
4
|
+
data.tar.gz: bd090a5a7ed6ab96f0cfdf4e0008a49a9ec39df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3eed9d5f5643e27f62c48d613a4f8a5dedb7fac4ea7d06ac0f0df170b803732b84c3fba57ecb1f1e238f249308c4e90538d206ec75d8791704f002f3437e2f88
|
7
|
+
data.tar.gz: b301271a9441a899cfbc3ed9890478335fca1e8408b2aba75ec2eb86a8d5ff42826f0d30ac395a2ec8b509d5d07f4ae0033a8860787b014df3787a1591fc5fed
|
data/CHANGELOG.md
CHANGED
data/lib/odata/entity.rb
CHANGED
@@ -187,6 +187,7 @@ module OData
|
|
187
187
|
entity.instance_eval do
|
188
188
|
service.navigation_properties[name].each do |nav_name, details|
|
189
189
|
xml_doc.xpath("//link[@title='#{nav_name}']").each do |node|
|
190
|
+
next if node.attributes['type'].nil?
|
190
191
|
next unless node.attributes['type'].value =~ /^application\/atom\+xml;type=(feed|entry)$/i
|
191
192
|
link_type = node.attributes['type'].value =~ /type=entry$/i ? :entry : :feed
|
192
193
|
new_links = instance_variable_get(:@links)
|
data/lib/odata/query/criteria.rb
CHANGED
@@ -62,13 +62,17 @@ module OData
|
|
62
62
|
|
63
63
|
# Returns criteria as query-ready string.
|
64
64
|
def to_s
|
65
|
-
"#{property.name} #{operator} #{
|
65
|
+
"#{property.name} #{operator} #{url_value}"
|
66
66
|
end
|
67
67
|
|
68
68
|
private
|
69
69
|
|
70
|
+
def url_value
|
71
|
+
property.nil? ? value : property.url_value
|
72
|
+
end
|
73
|
+
|
70
74
|
def set_operator_and_value(operator, value)
|
71
|
-
property.value = value
|
75
|
+
property.value = value unless property.nil?
|
72
76
|
|
73
77
|
@operator = operator
|
74
78
|
@value = value
|
data/lib/odata/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Thompson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|