odata 0.6.12 → 0.6.13

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: b2b1cbedefd8c14ecae1b82a025be819ecd665cc
4
- data.tar.gz: 084b1252cb352ab62d9a29bed15f95024dde2bb8
3
+ metadata.gz: 5381f4aa68afa778f56be63dc9864b456ee57f7f
4
+ data.tar.gz: a7e006c5b4f2590811c9813bdc2123494c50e814
5
5
  SHA512:
6
- metadata.gz: 22565266600b828544e8822776716acd28bd7b5c94b63ec2a0a1001228302df477b173d83cbbd2d6e86cabe5979b1bd7dba06fcddb7c5c0d82d08cc370cd29ee
7
- data.tar.gz: 04924842bffb503814cabc780333c7a7e21fb1b2f81c32612114b824d703c651f3b029d50811a82236c7480a4e27482e143460c7417392de27280f6cc8f15eb3
6
+ metadata.gz: a01f153de7461a09772d1cb7a63dec351d511967dff9820b9458fa96e9bc0e174bdf11c5dd2a6de2fc1fc71be96e27852849cf8b792db41c34eb03c4997b41bb
7
+ data.tar.gz: 8341abe5d59bbfabf16473087ab32080f6193d3e85fe92174f98b9f51427498ab5fc8fd66742d45f293b453bc87dc9a923bc230dddc65c63edd9447feb68d489
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.13
4
+
5
+ * Minor bug fix in OData::Query::Result#each implementation.
6
+
3
7
  ## 0.6.12
4
8
 
5
9
  * Minor bug fix in OData::Query::Result#each implementation.
@@ -17,12 +17,10 @@ module OData
17
17
  # @param block [block] a block to evaluate
18
18
  # @return [OData::Entity] each entity in turn for the query result
19
19
  def each(&block)
20
+ process_results(&block)
20
21
  until next_page.nil?
21
- service.find_entities(result).each do |entity_xml|
22
- entity = OData::Entity.from_xml(entity_xml, entity_options)
23
- block_given? ? block.call(entity) : yield(entity)
24
- end
25
22
  result = service.execute(next_page_url)
23
+ process_results(&block)
26
24
  end
27
25
  end
28
26
 
@@ -39,6 +37,13 @@ module OData
39
37
  query.entity_set.entity_options
40
38
  end
41
39
 
40
+ def process_results(&block)
41
+ service.find_entities(result).each do |entity_xml|
42
+ entity = OData::Entity.from_xml(entity_xml, entity_options)
43
+ block_given? ? block.call(entity) : yield(entity)
44
+ end
45
+ end
46
+
42
47
  def next_page
43
48
  doc = ::Nokogiri::XML(result.body)
44
49
  doc.remove_namespaces!
data/lib/odata/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.6.12'
2
+ VERSION = '0.6.13'
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.6.12
4
+ version: 0.6.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson