excon 0.63.0 → 0.64.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of excon might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ecbc78ef3063e8b2dc33d085e83329c3c412a3b30d691b233ce0636bad20afb1
4
- data.tar.gz: a4bd845f630fed088995b6049193aa761cf1369c69d12a515b99c50167086efe
3
+ metadata.gz: '0089e6e20aad3c735ea51b5dae6b90820b31d1379d2159cb01a2d2ab5e1e0fa8'
4
+ data.tar.gz: f362e1a3bbedfa71887fcd4c53ef3d202cfe7a337a8d1414396787e8eb160733
5
5
  SHA512:
6
- metadata.gz: c996e65ff59e3e6b35729645a83fdbd168abdf2eb24658207a969f08574e5cfcedb536f10b5890577e3cd2ce4953c4fcf4c2b511293200cda93e3df6cf012bd3
7
- data.tar.gz: 306341ebb5c741ae32e16c72e50726e4832b1788538337fd2029756084e1d16ed9e54057ea42e7734fd3758358b3a957e5ef0421167b66946626d8149a0fb5f7
6
+ metadata.gz: d03f86c4ec2ab00e8190f462cc21e64709be82820898e3d1ce25229ebbe23a3026939b879a07dffb255e4dadf47a59f103cca6035661f7d361164e78a2144efc
7
+ data.tar.gz: efecb7088b79a9e951cec7af4ae768addb8ed7bee909bfe6ace5cecbcb7d43cbbcb9846a04feebe6b17c545d20eeefbca8d2733865e0613e93f74cbc8b7f1179
@@ -1,3 +1,8 @@
1
+ 0.64.0 2019-04-15
2
+ =================
3
+
4
+ warn, not error on undefined middlewares#valid_parameter keys
5
+
1
6
  0.63.0 2019-04-12
2
7
  =================
3
8
 
@@ -398,7 +398,16 @@ module Excon
398
398
  end
399
399
 
400
400
  def valid_middleware_keys(middlewares)
401
- middlewares.flat_map(&:valid_parameter_keys)
401
+ middlewares.flat_map do |middleware|
402
+ if middleware.respond_to?(:valid_parameter_keys)
403
+ middleware.valid_parameter_keys
404
+ else
405
+ Excon.display_warning(
406
+ "Excon middleware #{middleware} does not define #valid_parameter_keys"
407
+ )
408
+ []
409
+ end
410
+ end
402
411
  end
403
412
 
404
413
  def validate_params(validation, params, middlewares)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
- VERSION = '0.63.0'
3
+ VERSION = '0.64.0'
4
4
  end
@@ -0,0 +1,27 @@
1
+ Shindo.tests('Excon middleware') do
2
+
3
+ with_rackup('basic.ru', '0.0.0.0') do
4
+ tests('succeeds without defining valid_parameter_keys') do
5
+ class Middleware
6
+ def initialize(stack)
7
+ @stack = stack
8
+ end
9
+ def error_call(datum)
10
+ @stack.error_call(datum)
11
+ end
12
+ def request_call(datum)
13
+ @stack.request_call(datum)
14
+ end
15
+ def response_call(datum)
16
+ @stack.response_call(datum)
17
+ end
18
+ end
19
+ silence_warnings do
20
+ Excon.get(
21
+ 'http://127.0.0.1:9292/content-length/100',
22
+ :middlewares => Excon.defaults[:middlewares] + [Middleware]
23
+ )
24
+ end
25
+ end
26
+ end
27
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.63.0
4
+ version: 0.64.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dpiddy (Dan Peterson)
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-04-12 00:00:00.000000000 Z
13
+ date: 2019-04-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -279,6 +279,7 @@ files:
279
279
  - tests/error_tests.rb
280
280
  - tests/header_tests.rb
281
281
  - tests/instrumentors/logging_instrumentor_tests.rb
282
+ - tests/middleware_tests.rb
282
283
  - tests/middlewares/canned_response_tests.rb
283
284
  - tests/middlewares/capture_cookies_tests.rb
284
285
  - tests/middlewares/decompress_tests.rb