flexirest 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 279ae7a2af0287f062269f28c6a7b0de3a68fc92
4
- data.tar.gz: b3c284e4398f6c2ba6ce00febf171b9fa2646a82
3
+ metadata.gz: b2a62022220324552e709d4f353392307b3e1cad
4
+ data.tar.gz: 0a31df3353a51c1f3308ffa7b2cbe3ebcb3b85a1
5
5
  SHA512:
6
- metadata.gz: 0b5d1fd29eee4108938611724a78058b9eb363a97ce9a36b60d20fa99c28328eaacd5e6e558a5b403938856932ad64ddee0ebf3dc7f1d0db3f3a28cb21774e56
7
- data.tar.gz: 1b8c7df46edc7894d71f2e398dd9923a114fe136d38ee0667a5c5182cb90954dd42f0124858ee529504fedd719b2055a41b5da59a9d9cc28ce57d347d9356533
6
+ metadata.gz: 5a7d7779afeb7ed595f065fc3464fbb4df653651aa4c26d73fc87c0aeed98d248a9c6aa0882f22c7c4419c0d09f0ebbcaa589712a99d40d121dd5bc8564eff0e
7
+ data.tar.gz: daa5bb17168731c3014f7f253c0def715101714a20ca817ea1a162d895922df6f980313b4e4266228386f3c7f246f577fc0d0ed1c42e2981775376704a081c60
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.5.2
4
+
5
+ Bugfix:
6
+
7
+ - Some APIs return an empty response body even on 200s, so any valid status with an empty body should be handled nicely
8
+
3
9
  ## 1.5.1
4
10
 
5
11
  Bugfix:
@@ -471,10 +471,11 @@ module Flexirest
471
471
  end
472
472
 
473
473
  if (200..399).include?(status)
474
- if @method[:options][:plain]
475
- return @response = Flexirest::PlainResponse.from_response(response)
476
- elsif [202, 204].include?(status) && @response.body.blank?
474
+ if @response.body.blank?
477
475
  @response.body = "{}"
476
+ end
477
+
478
+ if @method[:options][:plain]
478
479
  return @response = Flexirest::PlainResponse.from_response(response)
479
480
  elsif is_json_response? || is_xml_response?
480
481
  if @response.respond_to?(:proxied) && @response.proxied
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexirest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-01 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler