proc 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/proc/client.rb +24 -22
- data/lib/proc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fd5089ba0458dc13c198de1322bfc510a54157ef0ec49f957efa730b6de768e
|
4
|
+
data.tar.gz: d4c05363b54d8ae4607890b9ab552eb9ba3fc486c39251dcaac028aee29e21b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11793b5496575f947eb481b53732310b47d6a5fa5601e0826cc2dcc5f79fec498712abeaf14c9be82c683da519e1b9c785b7265e8d1f86e0027178aae6a606f6
|
7
|
+
data.tar.gz: c24ea2e3ef4337788c13cd53b373815e621c2cac9b504015672206c7e57dc7f9cef18b4deb94563eab0f4c9a536802f693687433b5cb21cb98222c2ced48b7db
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.14.0](https://github.com/metabahn/proc/releases/tag/2021-09-22)
|
2
|
+
|
3
|
+
*released on 2021-09-22*
|
4
|
+
|
5
|
+
* `chg` [#14](https://github.com/metabahn/proc/pull/14) Change Ruby client error handling to fallback to returning a result ([bryanp](https://github.com/bryanp))
|
6
|
+
|
1
7
|
## [v0.13.0](https://github.com/metabahn/proc/releases/tag/2021-09-15)
|
2
8
|
|
3
9
|
*released on 2021-09-15*
|
data/lib/proc/client.rb
CHANGED
@@ -171,27 +171,6 @@ class Proc
|
|
171
171
|
status, headers, payload = get_payload(proc: proc, body: body)
|
172
172
|
|
173
173
|
case status
|
174
|
-
when 200
|
175
|
-
result = extract_output(payload)
|
176
|
-
|
177
|
-
if (cursor = headers["x-cursor"])
|
178
|
-
enumerator = if cursor.empty?
|
179
|
-
::Proc::Enumerator.new(result)
|
180
|
-
else
|
181
|
-
::Proc::Enumerator.new(result) {
|
182
|
-
arguments[:cursor] = cursor.to_s
|
183
|
-
call(proc, input, **arguments)
|
184
|
-
}
|
185
|
-
end
|
186
|
-
|
187
|
-
if block
|
188
|
-
enumerator.each(&block)
|
189
|
-
else
|
190
|
-
enumerator
|
191
|
-
end
|
192
|
-
else
|
193
|
-
result
|
194
|
-
end
|
195
174
|
when 400
|
196
175
|
::Kernel.raise ::Proc::Invalid, extract_error_message(payload)
|
197
176
|
when 401
|
@@ -211,7 +190,30 @@ class Proc
|
|
211
190
|
when 508
|
212
191
|
::Kernel.raise ::Proc::Error, extract_error_message(payload)
|
213
192
|
else
|
214
|
-
|
193
|
+
result = extract_output(payload)
|
194
|
+
|
195
|
+
if !result.nil?
|
196
|
+
if (cursor = headers["x-cursor"])
|
197
|
+
enumerator = if cursor.empty?
|
198
|
+
::Proc::Enumerator.new(result)
|
199
|
+
else
|
200
|
+
::Proc::Enumerator.new(result) {
|
201
|
+
arguments[:cursor] = cursor.to_s
|
202
|
+
call(proc, input, **arguments)
|
203
|
+
}
|
204
|
+
end
|
205
|
+
|
206
|
+
if block
|
207
|
+
enumerator.each(&block)
|
208
|
+
else
|
209
|
+
enumerator
|
210
|
+
end
|
211
|
+
else
|
212
|
+
result
|
213
|
+
end
|
214
|
+
elsif (error = extract_error_message(payload))
|
215
|
+
::Kernel.raise ::Proc::Error, error
|
216
|
+
end
|
215
217
|
end
|
216
218
|
end
|
217
219
|
|
data/lib/proc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: core-async
|
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
rubygems_version: 3.2.
|
118
|
+
rubygems_version: 3.2.22
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Proc client library.
|