odata 0.6.8 → 0.6.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86fe14dc79c8c23c28ec5ad563b987ef69005dc6
4
- data.tar.gz: b05f4ae4d66316aac9ac870d8d05ef15afb3a410
3
+ metadata.gz: ace7b64af1f7ad87e1be18cb94fc6c6dfbb16580
4
+ data.tar.gz: 263968ed76008582991aa823ba949eacc5033f30
5
5
  SHA512:
6
- metadata.gz: 5901650dc4ac9b3c4da8fa20007654e4afb53b7cfa4054d3b99bb6e43f02446b1a42a973d9ff2df451367ac443b99bd3c2a2131e695e55daa5d4f6ac49257a21
7
- data.tar.gz: b31c165283c39baa71be5387e321b736b4c25c083ec6e4046b02d74d81e8f422b642a1ec3c712fa2abf7e465631f3ca8e05fa66144743936ae15d13090985dd3
6
+ metadata.gz: 76de4ec3ceb9bea778baed140b2b2a0ce2d83004a21b3c05e64738c4db1b021ccfb00a587f325fa297e0d3c653557eda01c54febf15f2eb269cdd9b23498b00a
7
+ data.tar.gz: d8186f45e6a643e1aceb999548e59ea486d0ec3120ca1115765611eef9039d50db19d883792acb804a6fd19b1b41eeecc86066637529cc32cbcce36dd4dadc34
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.9
4
+
5
+ * Changed how OData::Entity#from_xml functions to better work with feed results.
6
+
3
7
  ## 0.6.8
4
8
 
5
9
  * Added empty checking when checking for a nil value.
@@ -166,7 +166,7 @@ module OData
166
166
 
167
167
  def self.process_properties(entity, xml_doc)
168
168
  entity.instance_eval do
169
- xml_doc.xpath('//content/properties/*').each do |property_xml|
169
+ xml_doc.xpath('./content/properties/*').each do |property_xml|
170
170
  property_name = property_xml.name
171
171
  if property_xml.attributes['null'] &&
172
172
  property_xml.attributes['null'].value == 'true'
@@ -182,7 +182,7 @@ module OData
182
182
 
183
183
  def self.process_feed_property(entity, xml_doc, property_name)
184
184
  entity.instance_eval do
185
- property_value = xml_doc.xpath("//#{property_name}").first
185
+ property_value = xml_doc.xpath("./#{property_name}").first
186
186
  property_name = service.send("get_#{property_name}_property_name", name)
187
187
  return if property_name.nil?
188
188
  property = instantiate_property(property_name, property_value)
@@ -193,7 +193,7 @@ module OData
193
193
  def self.process_links(entity, xml_doc)
194
194
  entity.instance_eval do
195
195
  service.navigation_properties[name].each do |nav_name, details|
196
- xml_doc.xpath("//link[@title='#{nav_name}']").each do |node|
196
+ xml_doc.xpath("./link[@title='#{nav_name}']").each do |node|
197
197
  next if node.attributes['type'].nil?
198
198
  next unless node.attributes['type'].value =~ /^application\/atom\+xml;type=(feed|entry)$/i
199
199
  link_type = node.attributes['type'].value =~ /type=entry$/i ? :entry : :feed
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.6.8'
2
+ VERSION = '0.6.9'
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.8
4
+ version: 0.6.9
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-07 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler