api_consumer_json 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/api_consumer.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: 4a377dc011ed9bacc81b601074c9b574f22c5413
|
4
|
+
data.tar.gz: 30467a2a98a8b60a1f5a9c71694eb579283b6d7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b76a9faf5201ac45b48481edad76e3f577e0a046beea320a0d0f1f569a20c6aa90b2e285eb326190ebb509dd104fe2c8b8991fa5325a739594e58eb9aefc172
|
7
|
+
data.tar.gz: 140869d92a2eac0aae9e1ae0d467f767bc8eb117ef5e9c10fc2e72db6b538595f04668542076ee15184d3bcc5e42e3601b855e598803bcedcacf23cc725a049c
|
data/lib/api_consumer.rb
CHANGED
@@ -114,7 +114,7 @@ class APIConsumer
|
|
114
114
|
results = JSON.parse(response.body)
|
115
115
|
accept_codes = [200, 201, 202]
|
116
116
|
accept_codes += settings[:accept_codes].map(&:to_i) if settings[:accept_codes]
|
117
|
-
if !
|
117
|
+
if !accept_codes.include?(response.code.to_i)
|
118
118
|
results = error_code(response.code, opts[:errors], results)
|
119
119
|
end
|
120
120
|
results = blk.call(results) if blk
|