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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/api_consumer.rb +1 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fd0f4a81476afc73d4f6add37fc3d1f50aba1e1
4
- data.tar.gz: 563e08957e9dbfe74f6a2bc1792fa73d1db3ec24
3
+ metadata.gz: 4a377dc011ed9bacc81b601074c9b574f22c5413
4
+ data.tar.gz: 30467a2a98a8b60a1f5a9c71694eb579283b6d7b
5
5
  SHA512:
6
- metadata.gz: 77512fe3328d8abbc8b89dd1617780366e64aaf0e848f3f9c16a46e686af98a383795f35f6f5446f86747286f505e3036010428222ec04445bec5b0982398d38
7
- data.tar.gz: 3ab94771e61decda36bc657a11f3c314f850352e33b5e705cf28ca410fbcdf0db79af09a8c8d849440d318f7090b50a898c4b76eec0452909aa2f03ac11c3b5b
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 ![200, 201].include?(response.code.to_i)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_consumer_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Reister