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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e31316dd4d29bcce7e8ce68e80686d868b939e6
4
- data.tar.gz: 7b0ae9591a494b1520d9b4b1f65686b0b3282fe0
3
+ metadata.gz: 038dc613d3085dd5a50fd5449c6789411eac3138
4
+ data.tar.gz: bd090a5a7ed6ab96f0cfdf4e0008a49a9ec39df2
5
5
  SHA512:
6
- metadata.gz: 38a384c17104bc6b6febb1e6511f226395ec99cddcbaa36b42b7d6341128d7066e747d438423b913e8403f22e8567772f56c093209647d061b35e106154f4ce0
7
- data.tar.gz: 8dc9e056e2ad635675011a229dea3713d3d711d14f8196cfbdcffbc5959512dc26749a3849e7842e81739b5f9f4e231c3f7fb5d060b2d83460099046584e27e6
6
+ metadata.gz: 3eed9d5f5643e27f62c48d613a4f8a5dedb7fac4ea7d06ac0f0df170b803732b84c3fba57ecb1f1e238f249308c4e90538d206ec75d8791704f002f3437e2f88
7
+ data.tar.gz: b301271a9441a899cfbc3ed9890478335fca1e8408b2aba75ec2eb86a8d5ff42826f0d30ac395a2ec8b509d5d07f4ae0033a8860787b014df3787a1591fc5fed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.1
4
+
5
+ * Made a minor change to internals of OData::Query::Criteria.
6
+
3
7
  ## 0.6.0
4
8
 
5
9
  * Added ability to handle associations in a reasonable way.
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)
@@ -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} #{property.url_value}"
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
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.2'
3
3
  end
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.0
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-01 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler