excon 0.61.0 → 0.63.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 +5 -5
- data/.github/stale.yml +17 -0
- data/.travis.yml +7 -19
- data/LICENSE.md +1 -1
- data/README.md +5 -4
- data/changelog.txt +30 -0
- data/data/cacert.pem +440 -994
- data/excon.gemspec +9 -0
- data/lib/excon/connection.rb +53 -36
- data/lib/excon/constants.rb +33 -13
- data/lib/excon/error.rb +3 -0
- data/lib/excon/instrumentors/logging_instrumentor.rb +3 -14
- data/lib/excon/instrumentors/standard_instrumentor.rb +1 -8
- data/lib/excon/middlewares/base.rb +6 -0
- data/lib/excon/middlewares/expects.rb +6 -0
- data/lib/excon/middlewares/idempotent.rb +20 -3
- data/lib/excon/middlewares/instrumentor.rb +8 -0
- data/lib/excon/middlewares/mock.rb +8 -0
- data/lib/excon/middlewares/response_parser.rb +3 -0
- data/lib/excon/pretty_printer.rb +1 -8
- data/lib/excon/socket.rb +36 -10
- data/lib/excon/ssl_socket.rb +7 -0
- data/lib/excon/utils.rb +23 -4
- data/lib/excon/version.rb +1 -1
- data/lib/excon.rb +9 -1
- data/spec/excon/test/server_spec.rb +2 -2
- data/spec/helpers/warning_helpers.rb +9 -0
- data/spec/requests/unix_socket_spec.rb +2 -10
- data/spec/requests/validation_spec.rb +80 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/shared_contexts/test_stub_context.rb +11 -0
- data/spec/support/shared_examples/shared_example_for_clients.rb +13 -2
- data/tests/authorization_header_tests.rb +19 -21
- data/tests/bad_tests.rb +22 -0
- data/tests/batch_requests.rb +1 -1
- data/tests/complete_responses.rb +1 -1
- data/tests/data/127.0.0.1.cert.crt +15 -18
- data/tests/data/127.0.0.1.cert.key +28 -27
- data/tests/data/excon.cert.crt +15 -18
- data/tests/data/excon.cert.key +28 -27
- data/tests/error_tests.rb +1 -1
- data/tests/instrumentors/logging_instrumentor_tests.rb +28 -0
- data/tests/middlewares/decompress_tests.rb +1 -1
- data/tests/middlewares/idempotent_tests.rb +56 -17
- data/tests/middlewares/mock_tests.rb +2 -2
- data/tests/pipeline_tests.rb +1 -1
- data/tests/request_tests.rb +5 -6
- data/tests/response_tests.rb +1 -1
- data/tests/servers/bad.rb +5 -0
- data/tests/servers/good.rb +0 -8
- data/tests/servers/good_ipv4.rb +8 -0
- data/tests/servers/good_ipv6.rb +8 -0
- data/tests/test_helper.rb +27 -36
- metadata +17 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ecbc78ef3063e8b2dc33d085e83329c3c412a3b30d691b233ce0636bad20afb1
|
4
|
+
data.tar.gz: a4bd845f630fed088995b6049193aa761cf1369c69d12a515b99c50167086efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c996e65ff59e3e6b35729645a83fdbd168abdf2eb24658207a969f08574e5cfcedb536f10b5890577e3cd2ce4953c4fcf4c2b511293200cda93e3df6cf012bd3
|
7
|
+
data.tar.gz: 306341ebb5c741ae32e16c72e50726e4832b1788538337fd2029756084e1d16ed9e54057ea42e7734fd3758358b3a957e5ef0421167b66946626d8149a0fb5f7
|
data/.github/stale.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Number of days of inactivity before an issue becomes stale
|
2
|
+
daysUntilStale: 60
|
3
|
+
# Number of days of inactivity before a stale issue is closed
|
4
|
+
daysUntilClose: 7
|
5
|
+
# Issues with these labels will never be considered stale
|
6
|
+
exemptLabels:
|
7
|
+
- pinned
|
8
|
+
- security
|
9
|
+
# Label to use when marking an issue as stale
|
10
|
+
staleLabel: wontfix
|
11
|
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
|
+
markComment: >
|
13
|
+
This issue has been automatically marked stale due to inactivity.
|
14
|
+
It will be closed if no further activity occurs.
|
15
|
+
Thank you for your contributions.
|
16
|
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
+
closeComment: false
|
data/.travis.yml
CHANGED
@@ -1,29 +1,17 @@
|
|
1
1
|
before_install:
|
2
2
|
- gem install bundler
|
3
|
+
before_script:
|
4
|
+
# enable ipv6 see: https://github.com/travis-ci/travis-ci/issues/8361#issuecomment-350497804
|
5
|
+
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
6
|
+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
|
7
|
+
fi
|
3
8
|
language: ruby
|
4
|
-
matrix:
|
5
|
-
allow_failures:
|
6
|
-
- rvm: 1.8.7
|
7
|
-
- rvm: 1.9.2
|
8
|
-
- rvm: jruby
|
9
|
-
- rvm: rbx-3.2
|
10
|
-
- rvm: ree
|
11
|
-
fast_finish: true
|
12
9
|
rvm:
|
13
|
-
- 1.8.7
|
14
|
-
- 1.9.2
|
15
|
-
- 1.9.3
|
16
|
-
- 2.0
|
17
|
-
- 2.1
|
18
|
-
- 2.2
|
19
10
|
- 2.3
|
20
11
|
- 2.4
|
21
12
|
- 2.5
|
22
|
-
-
|
23
|
-
|
24
|
-
- ree
|
25
|
-
script:
|
13
|
+
- 2.6
|
14
|
+
script:
|
26
15
|
- "bundle exec shindont"
|
27
16
|
- "bundle exec rake spec[progress]"
|
28
|
-
|
29
17
|
sudo: false
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2009-
|
3
|
+
Copyright (c) 2009-2019 [CONTRIBUTORS.md](https://github.com/excon/excon/blob/master/CONTRIBUTORS.md)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.md
CHANGED
@@ -5,9 +5,7 @@ Usable, fast, simple Ruby HTTP 1.1
|
|
5
5
|
Excon was designed to be simple, fast and performant. It works great as a general HTTP(s) client and is particularly well suited to usage in API clients.
|
6
6
|
|
7
7
|
[![Build Status](https://travis-ci.org/excon/excon.svg?branch=master)](https://travis-ci.org/excon/excon)
|
8
|
-
[![Dependency Status](https://gemnasium.com/excon/excon.svg)](https://gemnasium.com/excon/excon)
|
9
8
|
[![Gem Version](https://badge.fury.io/rb/excon.svg)](https://badge.fury.io/rb/excon)
|
10
|
-
[![Gittip](https://img.shields.io/gittip/geemus.svg)](https://www.gittip.com/geemus/)
|
11
9
|
|
12
10
|
* [Getting Started](#getting-started)
|
13
11
|
* [Options](#options)
|
@@ -130,7 +128,7 @@ connection.request(:method => 'GET')
|
|
130
128
|
# expect one or more status codes, or raise an error
|
131
129
|
connection.request(:expects => [200, 201], :method => :get)
|
132
130
|
|
133
|
-
# this request can be repeated safely, so retry on errors up to
|
131
|
+
# this request can be repeated safely, so retry on errors up to 4 times
|
134
132
|
connection.request(:idempotent => true)
|
135
133
|
|
136
134
|
# this request can be repeated safely, retry up to 6 times
|
@@ -161,6 +159,9 @@ connection = Excon.new('http://geemus.com/', :nonblock => false)
|
|
161
159
|
|
162
160
|
# use basic authentication by supplying credentials in the URL or as parameters
|
163
161
|
connection = Excon.new('http://username:password@secure.geemus.com')
|
162
|
+
# Note: username & password is unescaped for request, so you should provide escaped values here
|
163
|
+
# i. e. instead of `password: 'pa%%word'` you should use `password: Excon::Utils.escape_uri('pa%%word')`,
|
164
|
+
# which return `pa%25%25word`
|
164
165
|
connection = Excon.new('http://secure.geemus.com',
|
165
166
|
:user => 'username', :password => 'password')
|
166
167
|
|
@@ -252,7 +253,7 @@ The proxy URL must be fully specified, including scheme (e.g. "http://") and por
|
|
252
253
|
|
253
254
|
Proxy support must be set when establishing a connection object and cannot be overridden in individual requests.
|
254
255
|
|
255
|
-
NOTE: Excon will use
|
256
|
+
NOTE: Excon will use `HTTP_PROXY` and `HTTPS_PROXY` environment variables. If set they will take precedence over any :proxy option specified in code. If "HTTPS_PROXY" is not set, "HTTP_PROXY" will be used for both HTTP and HTTPS connections. To disable this behavior, set the `NO_PROXY` environment variable and other environment variable proxy settings will be disregarded.
|
256
257
|
|
257
258
|
## Reusable ports
|
258
259
|
|
data/changelog.txt
CHANGED
@@ -1,3 +1,33 @@
|
|
1
|
+
0.63.0 2019-04-12
|
2
|
+
=================
|
3
|
+
|
4
|
+
allow setting min/max ssl versions
|
5
|
+
add additional nonblocking ruby error classes
|
6
|
+
set logger via datum, instead of class variables
|
7
|
+
misc test/travis fixes
|
8
|
+
consolidate binary encoding, avoid double encoding
|
9
|
+
error or CR/LF instead of substitute
|
10
|
+
guard against invalid header keys
|
11
|
+
also retry blocked connect with newer ruby errors
|
12
|
+
clarify that username and password should be escaped
|
13
|
+
better handling of warnings in tests
|
14
|
+
add stalebot
|
15
|
+
document NO_PROXY
|
16
|
+
validate parameter keys based on middleware stack
|
17
|
+
update default retry on error counts in readme
|
18
|
+
Sweet32, DES deprioritization fixes to cipher suite
|
19
|
+
allow overriding retry_errors count
|
20
|
+
fix for URI escaping in Ruby 2.6
|
21
|
+
update copyright notice
|
22
|
+
add metadata to gemspec
|
23
|
+
update certs
|
24
|
+
|
25
|
+
|
26
|
+
0.62.0 2018-03-27
|
27
|
+
=================
|
28
|
+
|
29
|
+
remove binmode call for StringIO objects
|
30
|
+
|
1
31
|
0.61.0 2018-03-16
|
2
32
|
=================
|
3
33
|
|