flexirest 1.3.31 → 1.3.32

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: fcf49e613a33a734a49d4e4c363e34dd7dda7621
4
- data.tar.gz: 15be49cb1ebeed32f1930c2b63798523de0323e3
3
+ metadata.gz: d818096fc6d03908005c35317dbc5e0ab2f03994
4
+ data.tar.gz: a4ed3f0e1e7db9dd92d4c5fca478b0fc385edca3
5
5
  SHA512:
6
- metadata.gz: 2029a279a42b2c222736e5e7ad81ef13a74f043ba003bb02335e065bd2924853d386413ee2bc48ad8bc9fc81d41bcba5546c03c10d6a443d6e1082bd6eeb46b6
7
- data.tar.gz: ec66f6352df44de47c8420cfcbfa323cc42807ff3f89893dfca94de84f4f1074f0ceb75d8234ffa087986b381fd45ef4b32868f0fea80ea46b634438c7391916
6
+ metadata.gz: 35af9776e44f7b291ba41753f4cb7efef1f2441ccd0aed3fd41474b27dce714d7951cfc9a6ad5fe98996e9399b3ecece34d9b00dab65b77a93fd38eac88ea07f
7
+ data.tar.gz: 45228f5f5c0fbcfde18bfa4bf5dac900024d9e45bd11d7957c80181da011e0ee253dbe59b55526b4fbf71199844b3bbc6b350874d851be3f6abf8527ae8dfd00
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.32
4
+
5
+ Bugfix:
6
+
7
+ - Rolled back 1.3.31 - was an error in client code
8
+
3
9
  ## 1.3.31
4
10
 
5
11
  Bugfix:
@@ -195,7 +195,7 @@ module Flexirest
195
195
  if verbose?
196
196
  Flexirest::Logger.debug " Response"
197
197
  Flexirest::Logger.debug " << Status : #{response_env.status}"
198
- (response_env.response_headers || response_env.try(:response).try(:headers)).each do |k,v|
198
+ response_env.response_headers.each do |k,v|
199
199
  Flexirest::Logger.debug " << #{k} : #{v}"
200
200
  end
201
201
  Flexirest::Logger.debug " << Body:\n#{response_env.body}"
@@ -500,8 +500,8 @@ module Flexirest
500
500
  end
501
501
 
502
502
  def hal_response?
503
- _, content_type = (@response.response_headers || @response.try(:response).try(:headers)).detect{|k,v| k.downcase == "content-type"}
504
- faked_response = (@response.response_headers || @response.try(:response).try(:headers)).detect{|k,v| k.downcase == "x-arc-faked-response"}
503
+ _, content_type = @response.response_headers.detect{|k,v| k.downcase == "content-type"}
504
+ faked_response = @response.response_headers.detect{|k,v| k.downcase == "x-arc-faked-response"}
505
505
  if content_type && content_type.respond_to?(:each)
506
506
  content_type.each do |ct|
507
507
  return true if ct[%r{application\/hal\+json}i]
@@ -561,13 +561,11 @@ module Flexirest
561
561
  end
562
562
 
563
563
  def is_json_response?
564
- headers = (@response.response_headers || @response.try(:response).try(:headers))
565
- headers['Content-Type'].nil? || headers['Content-Type'].include?('json')
564
+ @response.response_headers['Content-Type'].nil? || @response.response_headers['Content-Type'].include?('json')
566
565
  end
567
566
 
568
567
  def is_xml_response?
569
- headers = (@response.response_headers || @response.try(:response).try(:headers))
570
- headers['Content-Type'].include?('xml')
568
+ @response.response_headers['Content-Type'].include?('xml')
571
569
  end
572
570
 
573
571
  def generate_new_object(options={})
@@ -607,8 +605,8 @@ module Flexirest
607
605
  else
608
606
  result = new_object(body, @overridden_name)
609
607
  result._status = @response.status
610
- result._headers = (@response.response_headers || @response.try(:response).try(:headers))
611
- result._etag = result._headers['ETag']
608
+ result._headers = @response.response_headers
609
+ result._etag = @response.response_headers['ETag']
612
610
  if !object_is_class? && options[:mutable] != false
613
611
  @object._copy_from(result)
614
612
  @object._clean!
@@ -1,3 +1,3 @@
1
1
  module Flexirest
2
- VERSION = "1.3.31"
2
+ VERSION = "1.3.32"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexirest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.31
4
+ version: 1.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries