proc 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/proc/client.rb +8 -4
- data/lib/proc/enumerator.rb +4 -1
- data/lib/proc/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e066afa0667795307f8627a3220f8bc3887c644b2679a45b9e044d7843ca4ed3
|
4
|
+
data.tar.gz: a5775e58b9a2c7730242b9971d44f1d31d02eca4b5e6bc36ee2e5a712dc63537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
105
|
-
|
106
|
-
|
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)
|
data/lib/proc/enumerator.rb
CHANGED
data/lib/proc/version.rb
CHANGED