hyperdex 1.4.5.5.gf1ae4e6 → 1.4.5.6.g23093e5

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,11 +17,15 @@ class HyperDex::Client::Iterator < HyperDex::Client::Response
17
17
  end
18
18
 
19
19
  def has_next?
20
- @client.loop until @finished or !@backlog.empty?
20
+ @client.loop until finished? or item_available?
21
21
  !@backlog.empty?
22
22
  end
23
23
  alias_method :has_next, :has_next?
24
24
 
25
+ def item_available?
26
+ !(finished? or @backlog.empty?)
27
+ end
28
+
25
29
  def next
26
30
  @backlog.shift
27
31
  end
@@ -31,7 +31,7 @@ class HyperDex::Client::Response
31
31
  end
32
32
 
33
33
  def callback
34
- @finished = 1
34
+ @finished = true
35
35
  @client.delete_op(@reqid)
36
36
  end
37
37
 
@@ -39,6 +39,10 @@ class HyperDex::Client::Response
39
39
  @status_ptr.read_int32
40
40
  end
41
41
 
42
+ def finished?
43
+ @finished
44
+ end
45
+
42
46
  private
43
47
  def encode_return
44
48
  case status
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperdex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5.5.gf1ae4e6
4
+ version: 1.4.5.6.g23093e5
5
5
  prerelease: 8
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-11-28 00:00:00.000000000 Z
12
+ date: 2014-12-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi-enum-generator
@@ -264,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
264
  version: '0'
265
265
  segments:
266
266
  - 0
267
- hash: -2098128700064581276
267
+ hash: -1291375130734700964
268
268
  required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  none: false
270
270
  requirements: