we-call 0.7.0 → 0.7.1.pre.1

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: 2f6b6c396092e080b179bf2811abd96992fd7e1a
4
- data.tar.gz: f3d35f54e93e60b405e28a732766155d2110d209
3
+ metadata.gz: e81876c48643fc470e42819662ec9b8b3f3f4de0
4
+ data.tar.gz: 5bd867a0b4749604b6d85eda6a9b71f5c3d9eb6a
5
5
  SHA512:
6
- metadata.gz: aa4b02af461ee342404ba0bd2ef959cbd1728cc89208fa1574fe6510b8daa85e80aa9111fe04729c57124ad2bae0bdaa736bddb800755affa0b484bfa457efe1
7
- data.tar.gz: b13a9ecdc979fdddc1d1cd3fd3be82eac6288d9be470e54414c46b3e2f7b39c261a0725a91bab51ab74578581fcade181295cb953e1ce6311057e3b6d7aa82a9
6
+ metadata.gz: 3b08a14fd756e74c5d7532ae6477afc62a9798bbf621567f10dc22d172aaaf13b5dc22392c9bcf0773359fd96e14eedd87de3a08578ffde65ccedd886a5e8e52
7
+ data.tar.gz: 9dd9d9fca31b30a0f9b3ff8d50de4058c064a984d8a7a869443043d3cbb304a8799c6d0c2bbbc347920c3e6c764db1473e6145ac79165e1bcdf930e67590c5cb
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+ ## [v0.7.1] - 2018-02-20
9
+ ### Fixed
10
+ - Call the gzip middleware to handle gzipped responses, which have been broken since v0.7 for typhoeus users
11
+
8
12
  ## [v0.7.0] - 2017-10-07
9
13
  ### Breaking Changes
10
14
  - Removed `We::Call::Deprecated` and `We::Call::Annotations`. Deprecation logic is now handled by [rails-sunset] instead. I fully understand the irony of removing deprecation logic without deprecation
@@ -1,13 +1,12 @@
1
1
  require 'faraday'
2
+ require 'faraday_middleware'
2
3
  require 'faraday-sunset'
3
4
  require 'typhoeus'
4
5
 
5
6
  module We
6
7
  module Call
7
- autoload :Annotations, "we/call/annotations"
8
8
  autoload :Connection, "we/call/connection"
9
9
  autoload :Configuration, "we/call/configuration"
10
- autoload :Deprecated, "we/call/deprecated"
11
10
  autoload :Middleware, "we/call/middleware"
12
11
  autoload :VERSION, "we/call/version"
13
12
 
@@ -21,12 +21,16 @@ module We
21
21
 
22
22
  QueryableBuilder = Class.new(Faraday::RackBuilder) do
23
23
  def adapter?
24
- @has_adapter || false
24
+ @adapter || false
25
25
  end
26
26
 
27
27
  def adapter(key, *args, &block)
28
28
  super
29
- @has_adapter = true
29
+ @adapter = key
30
+ end
31
+
32
+ def get_adapter
33
+ @adapter || DEFAULT_ADAPTER
30
34
  end
31
35
  end
32
36
 
@@ -71,6 +75,10 @@ module We
71
75
 
72
76
  yield faraday if block_given?
73
77
 
78
+ unless adapter_handles_gzip?(faraday.builder.get_adapter)
79
+ faraday.use :gzip
80
+ end
81
+
74
82
  faraday.adapter DEFAULT_ADAPTER unless faraday.builder.adapter?
75
83
  end
76
84
  end
@@ -95,6 +103,12 @@ module We
95
103
  raise MissingOpenTimeout, 'open_timeout must be set, and defaults to 1 second. This is the time until a connection is established with another server, and after 1 sec it\'s probably not there.'
96
104
  end
97
105
 
106
+ # @return [Boolean] Does the adapter handle gzip automatically or not
107
+ # https://github.com/lostisland/faraday_middleware/blob/master/lib/faraday_middleware/gzip.rb#L9
108
+ def adapter_handles_gzip?(adapter)
109
+ [:em_http, :net_http, :net_http_persistent].include?(adapter)
110
+ end
111
+
98
112
  def setup_sunset_middleware(faraday)
99
113
  # In v0.5.0 this was a bool switch, now it takes :active_support or an instance of a Logger
100
114
  if config.detect_deprecations == true || config.detect_deprecations == :active_support
@@ -1,5 +1,5 @@
1
1
  module We
2
2
  module Call
3
- VERSION = "0.7.0"
3
+ VERSION = "0.7.1-1"
4
4
  end
5
5
  end
@@ -21,11 +21,11 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ["lib"]
22
22
 
23
23
  spec.add_dependency "typhoeus", "~> 1.3"
24
- spec.add_dependency "faraday", ">= 0.9.0", "< 1.0"
25
- spec.add_dependency "faraday_middleware", '~> 0'
24
+ spec.add_dependency "faraday", ">= 0.9.0", "< 1"
25
+ spec.add_dependency "faraday_middleware", '~> 0.10'
26
26
  spec.add_dependency "faraday-sunset", "~> 0.1.0"
27
27
 
28
- spec.add_development_dependency "appraisal", "~> 2"
28
+ spec.add_development_dependency "appraisal", "~> 2.0"
29
29
  spec.add_development_dependency "coveralls", '~> 0.7'
30
30
  spec.add_development_dependency "bundler", "~> 1.14"
31
31
  spec.add_development_dependency "rake", "~> 12.0"
@@ -33,5 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "rspec", "~> 3.5"
34
34
  spec.add_development_dependency "simplecov", '~> 0.15'
35
35
  spec.add_development_dependency "hashie", "~> 3.5"
36
- spec.add_development_dependency "vcr", '~> 3'
36
+ spec.add_development_dependency "vcr", '~> 3.0'
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: we-call
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - WeWork Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 0.9.0
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '1.0'
36
+ version: '1'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: 0.9.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '1.0'
46
+ version: '1'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: faraday_middleware
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: '0.10'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: '0.10'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: faraday-sunset
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '2'
81
+ version: '2.0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '2'
88
+ version: '2.0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: coveralls
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -190,14 +190,14 @@ dependencies:
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: '3'
193
+ version: '3.0'
194
194
  type: :development
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: '3'
200
+ version: '3.0'
201
201
  description: Handles conventions of making calls to other services, with required
202
202
  metadata for tracking calls between services, deprecations of endpoints, trace IDs,
203
203
  throttling, etc.
@@ -243,9 +243,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
243
243
  version: '0'
244
244
  required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - ">="
246
+ - - ">"
247
247
  - !ruby/object:Gem::Version
248
- version: '0'
248
+ version: 1.3.1
249
249
  requirements: []
250
250
  rubyforge_project:
251
251
  rubygems_version: 2.6.8