165 Commits

Author SHA1 Message Date
Mattia Giuffrida
85dfdf824c Re-add register middleware w/ Symbol, String, Proc
Reintroduce the possibility to register middleware with symbols, strings or procs.

Fixes #1389
2022-02-02 20:24:49 +01:00
José Augusto
816d824bc1
Removing all sushi.com references and change to httpbingo.org (#1384)
Fixes #1164
2022-01-18 16:43:36 +00:00
Yuki Hirasawa
7f004913eb
Add default adapter options (#1382) 2022-01-15 14:32:39 +00:00
Mattia Giuffrida
cb47eca810 Remove multipart middleware and all its documentation and tests. 2022-01-03 09:40:52 +01:00
Matt
93a693b9ef
* Remove retry middleware and all its documentation and tests. (#1356) 2022-01-02 10:19:15 +00:00
Matt
c9b8490bb7
Remove default Faraday.default_adapter value and add exception message with link to usage documentation. (#1354) 2021-12-30 15:38:49 +00:00
Jonathan Rochkind
b1165eac65
Don't call retry_block if retry won't happen due to max_interval and retry_after (#1350) 2021-12-23 10:30:50 +00:00
Simon Schmid
9ef407a028
Callable authorizers (#1345) 2021-12-15 15:21:05 +00:00
Mattia Giuffrida
65b8d3904f Fix Faraday.default_connection_options deep-merge tests 2021-11-30 10:00:43 +00:00
xkwd
746ab737b5
Replace Hash#merge with Utils#deep_merge for connection options (#1343) 2021-11-30 09:37:13 +00:00
Matt
c010031269
Remove net-http adapter and update docs (#1336) 2021-10-25 11:17:11 +01:00
willianzocolau
ceeaa7476f
Improve request info in exceptions raised by RaiseError Middleware (#1335) 2021-10-16 10:31:49 +02:00
Jonathan Rochkind
1d567df2ee
Retry middleware, exceptions option should handle string exception class name consistently (#1334) 2021-10-12 16:16:52 +02:00
Matt
506e97afe6
Fix passing a URL with embedded basic auth (#1324) 2021-09-13 16:36:26 +01:00
Yutaka Kamei
0f9626c48d Respect the params_encoder in Faraday::Adapter::Test (#1316) 2021-08-30 09:35:26 +01:00
Olle Jonsson
120c56988e Lint: skip Performance/StringInclude
We are after the side-effect of setting something in the last match,
from this "useless" RegExp.
2021-08-17 08:44:04 +02:00
Olle Jonsson
f1f36be663 Lint: Style/PerlBackrefs 2021-08-17 08:44:04 +02:00
Olle Jonsson
babfdeaf04 Lint: Avoid an issue with numeric suffix 2021-08-17 08:44:04 +02:00
Olle Jonsson
c0d97cefa5 Lint: Layout/EmptyLineBetweenDefs 2021-08-17 08:44:04 +02:00
Olle Jonsson
33235f482e Lint: Layout/LineEndStringConcatenationIndentation 2021-08-17 08:44:04 +02:00
Olle Jonsson
b183095c52 Lint: Style/HashConversion 2021-08-17 08:44:04 +02:00
Olle Jonsson
e640be9866 Lint Style/RedundantBegin 2021-08-17 08:44:04 +02:00
Matt
fe600c72ad
Drop deprecated auth helpers from Connection. (#1308)
Merge Authentication middleware.
Add possibility of passing a proc.
Update documentation.
2021-08-15 10:28:49 +02:00
Matt
ce0fdf8bca
Remove deprecated Faraday::UploadIO (#1307) 2021-08-14 09:48:16 +01:00
Olle Jonsson
456191715a
Remove deprecated Faraday::Request#method (#1303) 2021-08-09 15:30:37 +02:00
Matt
4b6162d364
Move json middleware (request and response) from faraday_middleware (#1300) 2021-08-09 08:52:02 +01:00
Matt
08b7d4d3b7
Autoloading, dependency loading and middleware registry cleanup (#1301) 2021-08-09 08:25:02 +01:00
Matt
ca37a9420e Merge branch '1.x' of https://github.com/lostisland/faraday 2021-08-01 18:08:32 +01:00
Yutaka Kamei
a1ee375bcd
Add strict_mode to Test::Stubs (#1298) 2021-08-01 17:45:32 +01:00
Matt
6333b73d13
Begin v2 release (#1297)
* Update UPGRADING.md to highlight adapters being moved out
* Cleanup tests
* Cleanup Gemfile
* Update CI
2021-08-01 17:09:03 +01:00
Pavel Rosický
6ed220cabf
Fix jruby incompatibility after moving out EM adapters (#1294) 2021-07-11 11:02:52 +01:00
Alexey D
4dd36897af
Always dup url_prefix in Connection#build_exclusive_url (#1288) 2021-06-24 16:09:26 +01:00
Adam Doppelt
1f496a7f17
Default proxy scheme to http:// if necessary, fixes #1282 (#1283) 2021-05-22 09:27:06 +01:00
Catalin
53e4baedc7
Add proxy setting when url_prefix is changed (#1276)
* Add proxy setting when url_prefix is changed

Without this setting, setting the url_prefix after
a Faraday::Connection is initialized results in no_proxy
settings ignored when using relative paths.

* Increase Rubocop Metrics/ClassLength
2021-04-28 15:54:08 +02:00
Mike Rogers
14d0dd70c4
Replacing Net::HTTP::Persistent with faraday-net_http_persistent (#1250) 2021-03-26 08:00:05 +00:00
Hiroshi Hatake
850155eb41
Handle IPv6 address String on Faraday::Connection#proxy_from_env (#1252) 2021-03-22 11:30:22 +00:00
yarafan
0ed6480f6e
escape colon in path segment (#1237) 2021-01-18 16:18:21 +00:00
Matt
023cc41335
Improves consistency with Faraday::Error and Faraday::RaiseError (#1229) 2020-12-31 13:07:21 +00:00
Matt
97a3bc2386
Fix #1219 Net::HTTP still uses env proxy (#1221) 2020-12-23 14:00:45 +00:00
Nathan Beyer
01c25e880c
Adjust the retry documentation and spec to align with implementation (#1197) (#1198) 2020-10-27 06:11:38 +01:00
Matt
d56742a174
Introduces on_request and on_complete methods in Faraday::Middleware. (#1194) 2020-10-22 15:04:46 +01:00
Sandro Damilano
8ee406d788
Include request info in exceptions raised by RaiseError Middleware (#1181) 2020-09-17 16:45:25 +02:00
Matt
868fe9bb18
Fix linting bumping Rubocop to 0.90.0 (#1182) 2020-09-17 16:02:47 +02:00
Vít Ondruch
6521a1606e Properly fix test failure with Rack 2.1+.
Rack is not to blame, just naive test case which was enough so far.

Fixes #1119
2020-07-25 01:51:43 +02:00
Mattia
5acab36239
Introduces flat_encode option for multipart adapter. (#1163)
Fixes #1157
2020-07-09 10:43:09 +01:00
John W Higgins
e02a8c1009
Makes parameters sorting configurable (#1162) 2020-07-07 10:02:50 +01:00
Olle Jonsson
90b4564cec
Rubocop linting with 0.84.0 (#1160) 2020-05-27 17:26:31 +01:00
Daniel George Holz
722821fab7
Avoid 'last arg as keyword param' warning when building user middleware on Ruby 2.7 (#1153) 2020-05-15 15:32:38 +01:00
Alexander Popov
87ecaf9682 Return tests of Test adapter 2020-04-20 08:27:04 +02:00
Alexander Popov
c26df87b86 Update RuboCop
Require its specific version in `Gemfile`.

Fix it's installation in CI.

Enable new cops.

Resolve new offenses.

Drop support of Ruby 2.3
(it's not supported by RuboCop and by MRI:https://www.ruby-lang.org/en/news/2019/03/31/support-of-ruby-2-3-has-ended/)

Deprecate `Faraday::Request#method`, replace it with `#http_method`.
2020-04-19 17:44:07 +02:00