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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/odata/query/result.rb +9 -4
- 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: 5381f4aa68afa778f56be63dc9864b456ee57f7f
|
4
|
+
data.tar.gz: a7e006c5b4f2590811c9813bdc2123494c50e814
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a01f153de7461a09772d1cb7a63dec351d511967dff9820b9458fa96e9bc0e174bdf11c5dd2a6de2fc1fc71be96e27852849cf8b792db41c34eb03c4997b41bb
|
7
|
+
data.tar.gz: 8341abe5d59bbfabf16473087ab32080f6193d3e85fe92174f98b9f51427498ab5fc8fd66742d45f293b453bc87dc9a923bc230dddc65c63edd9447feb68d489
|
data/CHANGELOG.md
CHANGED
data/lib/odata/query/result.rb
CHANGED
@@ -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