wrest 2.1.1 → 2.1.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: 71e16e78be5f22404a1639ad9166c893c35a40b2
4
- data.tar.gz: 4713b8f3483fc1b80a48b4feac5802c7a991db63
3
+ metadata.gz: 2a808214938d46aa043337d954d8a1c67cdf191c
4
+ data.tar.gz: 5a9c6825873ceab65bdb829182586030e3a032ce
5
5
  SHA512:
6
- metadata.gz: 04113e29601ed0953ca5c8f995f0771d15cc722c6712403dd31761ad1c9fea19adfe66b5e0aeb22e9c5edb567f16e5788f195a5b57a6e4b896d2042d0874786d
7
- data.tar.gz: fad5508d9f0baee2ba934f6cfa7712f103b1d48c110ebe838423b61929dd09759965fdda4717a760f8f3b49e386eec2aa685795ec9f07ad1df681b900ab902d1
6
+ metadata.gz: fd9daf81f3825b2b0a0569e5ab754b7dbcb5516ec4d72f58e9112296f6c9ce8be24d5ab7c5ccb50ba874fcb4b9140a68f87ece43ae3276f33fc818e07612d3b4
7
+ data.tar.gz: 6e82bd0c09b606c404f4945a7b5ba8da5bdbfce693f0f298e12ed4abb3f529d7846f2b42bcb744cfe2607b96506eaeeb39998b8bbd871a7bf2a8af94c6734c3c
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  [![Build Status](https://travis-ci.org/c42/wrest.svg?branch=master)](https://travis-ci.org/c42/wrest)
2
2
 
3
- # Wrest 2.1.0
3
+ # Wrest 2.1.1
4
4
 
5
5
  (c) Copyright 2009-2015 [Sidu Ponnappa](http://twitter.com/ponnappa). All Rights Reserved.
6
6
 
@@ -110,7 +110,7 @@ module Wrest #:nodoc:
110
110
  def follow(redirect_request_options = {})
111
111
  self
112
112
  end
113
-
113
+
114
114
  def connection_closed?
115
115
  self[Native::StandardHeaders::Connection].downcase == Native::StandardTokens::Close.downcase
116
116
  end
@@ -118,8 +118,8 @@ module Wrest #:nodoc:
118
118
  # Returns whether this response is cacheable.
119
119
  def cacheable?
120
120
  code_cacheable? && no_cache_flag_not_set? && no_store_flag_not_set? &&
121
- (not max_age.nil? or (expires_not_in_our_past? && expires_not_in_its_past?)) && pragma_nocache_not_set? &&
122
- vary_tag_not_set?
121
+ (not max_age.nil? or (expires_not_in_our_past? && expires_not_in_its_past?)) && pragma_nocache_not_set? &&
122
+ vary_header_valid?
123
123
  end
124
124
 
125
125
  #:nodoc:
@@ -127,6 +127,11 @@ module Wrest #:nodoc:
127
127
  !code.nil? && ([200, 203, 300, 301, 302, 304, 307].include?(code.to_i))
128
128
  end
129
129
 
130
+ #:nodoc:
131
+ def vary_header_valid?
132
+ headers['vary'] != '*'
133
+ end
134
+
130
135
  #:nodoc:
131
136
  def max_age
132
137
  return @max_age if @max_age
@@ -152,11 +157,6 @@ module Wrest #:nodoc:
152
157
  headers['pragma'].nil? || (not headers['pragma'].include? 'no-cache')
153
158
  end
154
159
 
155
- #:nodoc:
156
- def vary_tag_not_set?
157
- headers['vary'].nil?
158
- end
159
-
160
160
  # Returns the Date from the response headers.
161
161
  def response_date
162
162
  return @response_date if @response_date
@@ -8,5 +8,5 @@
8
8
  # See the License for the specific language governing permissions and limitations under the License.
9
9
 
10
10
  module Wrest
11
- VERSION = "2.1.1"
11
+ VERSION = "2.1.2"
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sidu Ponnappa
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-26 00:00:00.000000000 Z
12
+ date: 2015-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec