zendesk_api 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -30,7 +30,7 @@ module ZendeskAPI
|
|
30
30
|
|
31
31
|
@app.call(env).on_complete do
|
32
32
|
if cached && env[:status] == 304 # not modified
|
33
|
-
env[:body]
|
33
|
+
env.merge!(:body => cached[:body], :response_headers => cached[:response_headers])
|
34
34
|
elsif env[:status] == 200 && env[:response_headers]["Etag"] # modified and cacheable
|
35
35
|
@cache.write(cache_key(env), env)
|
36
36
|
end
|
data/lib/zendesk_api/version.rb
CHANGED
@@ -9,9 +9,12 @@ describe ZendeskAPI::Middleware::Request::EtagCache do
|
|
9
9
|
response.status.should == 200
|
10
10
|
response.body.should == {"x"=>1}
|
11
11
|
|
12
|
+
headers = response.headers
|
13
|
+
|
12
14
|
stub_request(:get, %r{blergh}).to_return(:status => 304, :headers => {"Etag" => "x"})
|
13
15
|
response = client.connection.get("blergh")
|
14
16
|
response.status.should == 304
|
15
17
|
response.body.should == {"x"=>1}
|
18
|
+
response.headers.should == headers
|
16
19
|
end
|
17
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-05-
|
13
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bump
|