607 Commits

Author SHA1 Message Date
Mattia Giuffrida
f2e0e22442 Merge branch 'master' of https://github.com/lostisland/faraday into 1.0
# Conflicts:
#	.travis.yml
2018-01-21 09:44:34 +00:00
iMacTia
2f91e9da6e Version bump to 0.14.0 2018-01-19 17:41:05 +00:00
Mattia
e6311bd286
Allow overriding env proxy (#754)
* Allows to ignore env proxy by setting Faraday.ignore_env_proxy to true
* Improved readme adding a new Proxy section
2018-01-19 17:28:00 +00:00
Christian
397166eda0 Handle all connection timeout messages in Patron (#687)
* Include more of cURL's connection timeout messages
2017-12-13 18:56:13 +00:00
Mattia
8503baea4b
Changes the way adapters are managed (#750)
* Store adapter separately from other middleware
* Adapter can be set anywhere in the stack and will always be the last
* Use default adapter if no adapter set

fixes #47
fixes #121
2017-11-21 09:48:45 +00:00
iMacTia
5f8b09e843 Merge branch 'master' of https://github.com/lostisland/faraday into 1.0 2017-11-17 15:08:28 +00:00
Mattia
b302d708ea
External Typhoeus Adapter Compatibility (#748) 2017-11-17 09:54:24 +00:00
Érik Escobedo
53b5e087e9 Faraday::Adapter::Test stubs now support entire urls (with host) (#741) 2017-11-13 15:24:15 +00:00
Mattia Giuffrida
4ef728230c Merge branch 'master' of https://github.com/lostisland/faraday into 1.0
# Conflicts:
#	lib/faraday/adapter/typhoeus.rb
#	test/adapters/typhoeus_test.rb
2017-11-12 10:56:59 +00:00
Anthony Dmitriyev
936e57879b Warn about adapter being unset when making a request (#743) 2017-11-06 10:21:38 +00:00
Olle Jonsson
e63ef9b830 Remove Typhoeus adapter (#715) 2017-11-02 09:57:49 +00:00
Harald Sitter
2b580148fd Fixes the behaviour for Excon's open_timeout (not setting write_timeout anymore) (#731) 2017-10-30 11:36:43 +00:00
Mattia
4d1ddc130b
If proxy is manually provided, this takes priority over find_proxy (#724)
Fixes #723
2017-10-30 09:07:41 +00:00
Mattia Giuffrida
7acc82b6a5 Asks Travis to use Ubuntu Precise 2017-10-30 09:02:58 +00:00
Martin Mauch
ff94676369 Streaming requests for Net::HTTP (#604) 2017-08-30 08:12:01 +01:00
Mattia
29feeb92e3 Version bump (0.13.1) 2017-08-18 17:16:25 +01:00
Mattia
b09c6db315 Fixes an incompatibility with new proxy detection and Addressable::URI gem (#722)
fixes #721
2017-08-18 13:43:41 +01:00
Mattia
ead6e342f6 Version bump (0.13.0) 2017-08-15 10:54:52 +01:00
Mattia
d1b05653a5 Version bump (0.12.3) 2017-08-15 10:50:52 +01:00
Mattia
ad7a8e5e26 Fixes an edge-case issue with response headers parsing (missing HTTP header) (#719)
Fixes https://github.com/lostisland/faraday/pull/681#discussion_r129608099
2017-08-11 15:47:47 +01:00
Olle Jonsson
f8892b1301 Adapter support for Net::HTTP::Persistent v3.0.0 (#619) 2017-07-28 15:25:59 +01:00
Brandon Dunne
923f90558c Prefer #hostname over #host. (#714) 2017-07-26 15:40:46 +01:00
Mattia
d18cc04be5 Environment proxy refactoring (#712)
* Dynamically reloads the proxy when performing a request on an absolute domain
Fixes #701

* Removes `proxy` attr_reader to avoid warning. Reintroduce it when removing the `get/set proxy`

* Request proxy is set in `run_request` and not `build_request` anymore, as url is not available in `build_reqeust`, had to remove a test for this.

* Adds new tests to check proxy working with `Faraday.get`
2017-07-24 10:14:52 +01:00
Mattia
5ba7c30a7b Version bump (0.12.2) 2017-07-21 12:51:09 +01:00
Mattia
cf6f2b10ac Fixes an issue with Options.merge! and Faraday instrumentation middleware (#711)
Fixes #710
2017-07-19 18:34:34 +01:00
Mattia
4e6296a6ee Fixes an issue with Faraday.default_connection not using Faraday.default_connection_options (#707)
Fixes #698
2017-07-12 17:00:07 +01:00
Mattia
33547461d2 Fixes an issue with Options having a nil value (#706)
Fixes #694
2017-07-12 16:58:32 +01:00
Mattia
94097a7f66 Fixes YAML serialization/deserialization for Faraday::Utils::Headers (#705)
Fixes #690
2017-07-12 16:57:47 +01:00
Mattia
375ea71a9f fixes #702 (#703) 2017-06-25 15:23:21 +01:00
Christian
8049a5feb2 Do not use :insecure option by default in Patron (#691)
* Do not use :insecure option by default in Patron

The session.insecure option is set to true by default. This disables
the ssl verification of the host and, according to the Patron
documentation, one should "think twice before using this option".

See also
http://www.rubydoc.info/gems/patron/0.8.0/Patron%2FSession%3Ainsecure

* Add ca-certificates package to travis.yml

Inspired by https://github.com/travis-ci/travis-ci/issues/6142

* Support ssl-verify and ca-file option for Patron
2017-05-11 16:48:05 +01:00
Oliver Peate
067be864a6 Guard against invalid middleware configuration with warning (#685) 2017-04-28 18:14:00 +02:00
Andrew Roetker
b2e8bcc04f Parse headers from aggregated proxy requests/responses (#681) 2017-04-25 19:18:50 +02:00
Craig Day
81c72afd95 expose wrapped_exception in all client errors (#686) 2017-04-21 11:06:44 +02:00
Mattia Giuffrida
ecd8841f51 version bump (0.12.1) 2017-04-11 13:29:10 +01:00
Mattia Giuffrida
e29ec08545 fixes #683
fixes #684
2017-04-11 13:12:36 +01:00
Mattia
68e88a90b1 Update faraday.rb
Version bump to 0.12.0.1
2017-04-02 10:18:33 +01:00
Mattia Giuffrida
617c909c9c Adds support for context request options, including test coverage and Readme section.
Version bump 0.12.0
2017-03-21 10:51:02 +00:00
Narihiro Nakamura
3268aca539 Support no_proxy via URI::Generic#find_proxy (#670)
* Revert "Implement no_proxy feature (#658)"

This reverts commit dea7726423bb5823976db5d91700f5dd06c82035.

Conflicts:
	lib/faraday/options.rb

* Support no_proxy via URI::Generic#find_proxy

* remove `return`

* reintroduce all tests from 511a5b4
2017-03-15 13:13:47 +01:00
Hawk Newton
565b2a49af Make multipart boundary unique (#673)
* Make multipart boundary unique

* Use a distinct connection each time
2017-03-03 11:24:37 +01:00
Hawk Newton
4adc385c76 Rewind UploadIO's on retry (#669)
* Rewind UploadIOs on retry

* Test calling UploadIO.rewind() on retry

* Formatting
2017-03-03 10:59:30 +01:00
Mattia
fa54064ae3 Update retry.rb
Added missing coma in code example
2017-02-15 11:03:56 +00:00
Cohen Carlisle
378350d5c4 Options deep merge (#662)
* fixes an issue with options that was causing new options to override defaults ones unexpectedly
2017-02-09 17:45:01 +00:00
Peter C
dea7726423 Implement no_proxy feature (#658)
* Implement no_proxy feature

* Handle prefixed and subdomains by improving proxy_allowed?
2017-02-09 16:05:53 +00:00
Mattia
e74f24d852 version bump (0.11.0) 2017-01-13 14:45:25 +00:00
Mattia
f994b054f9 Support adapter customization (#651)
* add initializer on Faraday::Adapter that accept and store a block with custom configuration
use the `@ config_block ` block on `net_http` and `net_http_persistent` adapters
added tests

* fixes warning in tests
patron was supporting custom block already! Small refactoring to conform to other adapters

* added implementation for httpclient
excon and EM adapters now all support `connection_options` in the initializer

* additional test for httpclient adapter
2017-01-13 12:07:01 +00:00
Mattia
f58f251051 Ruby 2.4.0 and Minitest 6 support (#644)
* Add Ruby 2.4 to Travis matrix

* test against ruby 2.4.0-rc1

* use `Integer` in place of `Fixnum` to be ruby-2.4 compliant
use `assert_nil` in place of `assert_equal nil` to be MiniTest 6 compliant

* use ruby 2.4.0 final release on travis matrix
2017-01-13 11:35:33 +00:00
Peter Souter
04a6f3b759 Added filter method for logger middleware (#650)
Allows you to filter sensitive information with a regex, allowing a gsub with redaction.
2017-01-13 10:28:29 +00:00
Cavi
bc419bddc9 Remove the presence of \n on the authorization headers (#657)
fixes #372
2017-01-13 09:59:57 +00:00
Alex Ford
0e7089a8fb Default options appear overwritten once set on a Connection instance (#652)
* Connection initialize always uses ConnectionOptions.from

* Update options.rb

As suggested by @Cohen-Carlisle

Assert that the default is still correct when creating a Connection with a single string `url` argument
2017-01-13 09:58:38 +00:00
Mattia
389c503a39 version bump 0.10.1 2016-12-29 15:22:43 +00:00