31 Commits

Author SHA1 Message Date
Mattia
b427091f0e chore: RuboCop: Support Frozen String Literals (#868) 2019-02-24 20:35:12 +01:00
Mattia
f1b2657523
Feature/#762 rspec (#832) 2018-11-26 17:11:35 +00:00
iMacTia
5ee253a9a3 Merge branch 'master' of https://github.com/lostisland/faraday into 1.0
# Conflicts:
#	lib/faraday/adapter/patron.rb
2018-05-10 10:09:43 +01:00
Julik Tarkhanov
ac661139fe Fix: do not memoize/reuse Patron session (#796) 2018-05-10 10:07:37 +01:00
Martin Mauch
ff94676369 Streaming requests for Net::HTTP (#604) 2017-08-30 08:12:01 +01: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
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
Olle Jonsson
1b9e16e53a Integration test: raise error when no live server is configured (#635)
* Integration: point to CONTRIBUTING in warnings

* Integration: change live_server check
2016-11-23 15:14:19 +00:00
Leon Miller-Out
a38ba7a13b Adds reason phrase support (#547)
* Adds a `#reason_phrase` method to the Response class
Implements the reason phrase for the Net::Http adapter ONLY

* Reason phrase support for the Excon adapter

This assumes that the reason phrase is also implemented into the
Excon project

* Implement reason phrase for patron, httpclient, em_http, em_synchrony adapters.

* Don't test for reason phrase with Rack adapter, which doesn't make it available.

* Don't test for reason phrase support in Typhoeus adapter.

* Make reason_phrase nil in adapters that don't support it (instead of "")
2016-08-24 17:43:19 +01:00
Mislav Marohnić
ab9a0fb4ad Skip proxy auth test for EM due to em-socksify bug 2015-10-02 01:03:46 +02:00
Alexander Pepper
c877521697 httpclient: Enable gzip compression.
Motivation: httpclient support gzip compression since late 2010 (see https://github.com/nahi/httpclient/issues/42 ).
2015-01-14 15:27:00 +01:00
Mislav Marohnić
4ac193943b wrap OpenSSL exceptions in Faraday's own SSLError class 2013-07-27 14:38:20 +02:00
Mislav Marohnić
7380ffc137 bump multipart-post dependency for Ruby 2.0 compatibility 2013-07-27 00:29:46 +02:00
Mislav Marohnić
0a1deaf173 add integration tests for HTTP proxy support
Spins up a proxy server in a separate process, runs a few requests
through it with each adapter to verify that both proxy support and basic
authentication take effect.
2013-07-27 00:29:44 +02:00
Mislav Marohnić
f28bf056cf ensure consistent handling of connection failures
All adapters should now raise Faraday::Error::ConnectionFailed
2013-07-27 00:29:41 +02:00
Mislav Marohnić
a23124ea7b avoid ruby syntax warnings 2013-06-25 04:11:31 +02:00
Erik Michaels-Ober
faab1b08cd Replace test-unit with minitest 2012-12-16 20:22:03 -08:00
technoweenie
223b160954 shove ruby autoloading to 'faraday/autoload' 2012-10-20 17:38:48 -06:00
Mislav Marohnić
79022619ac add jruby?, ssl_mode? test helpers 2012-08-16 18:21:04 +02:00
Mislav Marohnić
9b3923f62c move WEBrick SSL config to script/test 2012-08-16 18:21:00 +02:00
Jerry Cheung
cc918842fb enable test suite in SSL mode 2012-08-16 18:20:23 +02:00
Mislav Marohnić
049ff25ddc all adapters return string for empty responses now 2012-08-12 15:59:45 +02:00
Myron Marston
f41ffaabb7 Ensure empty body responses are consistently returned as empty strings.
Zero-byte response bodies can be represented as either nil or '' in ruby.
Most ruby HTTP clients use '' (which, conveniently, allows clients
to assume the body is always a string), but Net::HTTP, for whatever
reason, uses nil.

This change makes it so that all faraday adapters consistently return
'' for zero-byte response bodies.
2012-08-12 13:49:20 +02:00
Mislav Marohnić
e6787c144b script/test spins up test server, runs test suite 2012-06-19 11:15:11 +02:00
Mislav Marohnić
a019a11946 cleanup Net::HTTP-specific tests 2012-04-15 14:33:21 +02:00
Mislav Marohnić
1dcfad746d ruby 1.8 compat 2012-04-15 12:25:27 +02:00
Mislav Marohnić
5d7a50cf0a refactor integration tests to be cleaner and use fewer endpoints 2012-04-14 23:02:11 +02:00
Mislav Marohnić
96490b351d test that adapters can set the User-Agent string 2012-04-14 23:02:11 +02:00
Mislav Marohnić
9c49b0b4c4 properly skip adapter tests if LIVE env variable isn't configured 2012-04-14 23:02:10 +02:00
Jerry Cheung
265c02e771 refactor adapter tests to use modules for shared tests 2012-04-14 23:00:45 +02:00
Jerry Cheung
e0bdfd2803 add Faraday::Adapter::Rack 2012-04-14 23:00:45 +02:00