proc 0.8.0 → 0.8.1

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
  SHA256:
3
- metadata.gz: ece2d4c0f8e4e0aa122ca1df9e751d061afaa802dc056e5dd2c0ba7b272ff3e8
4
- data.tar.gz: 4f9ce5d28d966c23097dd3445d5ea5fc37fe9d0ecea1c5b13771b9633ac28d0c
3
+ metadata.gz: e066afa0667795307f8627a3220f8bc3887c644b2679a45b9e044d7843ca4ed3
4
+ data.tar.gz: a5775e58b9a2c7730242b9971d44f1d31d02eca4b5e6bc36ee2e5a712dc63537
5
5
  SHA512:
6
- metadata.gz: c084f766e97cced8633a74379d700d06efa54bc6f0eb81cf6351af9e2528aea465ebff4dc4d3dd3631c20016ce70a1a36c2245607fe14f85aaa29d115d3ac9a5
7
- data.tar.gz: 62303f9d27683c07bc0ff8f5df8c8697a669fa8df7ac496929457e3e572384ded1c779580ddf09082d830b8658c6c1be07eadb3478255de9b013e318a51b2755
6
+ metadata.gz: 1c41c56fdfb839226790e7ad63c2fce4724b25b8fd61d79ac47adf2f4e9e9e673dea272a1ebc3e9ee1c1960a71a31a048f133efcc6544fcab92759716b7605bf
7
+ data.tar.gz: 1c72579ebf19b7ac9a8f85641a4ced7637829e44f3259242d0cec76ced0daaac4180a1334d1711784c459bf9e21f0cecddda67b11fd08742fb63427188c184f4
data/lib/proc/client.rb CHANGED
@@ -101,10 +101,14 @@ class Proc
101
101
  result = extract_output(payload)
102
102
 
103
103
  if (cursor = headers["x-cursor"])
104
- enumerator = Enumerator.new(result) {
105
- arguments[:cursor] = cursor.to_s
106
- call(proc, input, **arguments)
107
- }
104
+ enumerator = if cursor.empty?
105
+ Enumerator.new(result)
106
+ else
107
+ Enumerator.new(result) {
108
+ arguments[:cursor] = cursor.to_s
109
+ call(proc, input, **arguments)
110
+ }
111
+ end
108
112
 
109
113
  if block
110
114
  enumerator.each(&block)
@@ -13,7 +13,10 @@ class Proc
13
13
  return to_enum(:each) unless block
14
14
 
15
15
  @values.each(&block)
16
- @next_block.call.each(&block)
16
+
17
+ if @next_block
18
+ @next_block.call.each(&block)
19
+ end
17
20
  end
18
21
  end
19
22
  end
data/lib/proc/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Proc
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
 
6
6
  def self.version
7
7
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell