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 +4 -4
- data/README.md +1 -1
- data/lib/wrest/native/response.rb +8 -8
- data/lib/wrest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a808214938d46aa043337d954d8a1c67cdf191c
|
4
|
+
data.tar.gz: 5a9c6825873ceab65bdb829182586030e3a032ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd9daf81f3825b2b0a0569e5ab754b7dbcb5516ec4d72f58e9112296f6c9ce8be24d5ab7c5ccb50ba874fcb4b9140a68f87ece43ae3276f33fc818e07612d3b4
|
7
|
+
data.tar.gz: 6e82bd0c09b606c404f4945a7b5ba8da5bdbfce693f0f298e12ed4abb3f529d7846f2b42bcb744cfe2607b96506eaeeb39998b8bbd871a7bf2a8af94c6734c3c
|
data/README.md
CHANGED
@@ -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
|
-
|
122
|
-
|
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
|
data/lib/wrest/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|