zendesk_api 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- zendesk_api (0.3.1)
16
+ zendesk_api (0.3.2)
17
17
  faraday (>= 0.8.0)
18
18
  faraday_middleware (>= 0.8.7)
19
19
  hashie
@@ -131,8 +131,13 @@ module ZendeskAPI
131
131
  builder.use ZendeskAPI::Middleware::Response::Logger, config.logger if config.logger
132
132
  builder.use ZendeskAPI::Middleware::Response::ParseIsoDates
133
133
  builder.response :json, :content_type => 'application/json'
134
- builder.use ZendeskAPI::Middleware::Response::Gzip
135
- builder.use ZendeskAPI::Middleware::Response::Deflate
134
+
135
+ adapter = config.adapter || Faraday.default_adapter
136
+
137
+ unless [:em_http, Faraday::Adapter::EMHttp].include?(adapter)
138
+ builder.use ZendeskAPI::Middleware::Response::Gzip
139
+ builder.use ZendeskAPI::Middleware::Response::Deflate
140
+ end
136
141
 
137
142
  # request
138
143
  builder.use ZendeskAPI::Middleware::Request::EtagCache, :cache => config.cache
@@ -141,7 +146,7 @@ module ZendeskAPI
141
146
  builder.request :json
142
147
  builder.use ZendeskAPI::Middleware::Request::Retry, :logger => config.logger if config.retry # Should always be first in the stack
143
148
 
144
- builder.adapter *config.adapter || Faraday.default_adapter
149
+ builder.adapter *adapter
145
150
  end
146
151
  end
147
152
 
@@ -1,3 +1,3 @@
1
1
  module ZendeskAPI
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  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.1
4
+ version: 0.3.2
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-03-05 00:00:00.000000000 Z
13
+ date: 2013-03-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bump