faraday 0.13.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +496 -0
  3. data/LICENSE.md +1 -1
  4. data/README.md +28 -328
  5. data/Rakefile +7 -0
  6. data/examples/client_spec.rb +97 -0
  7. data/examples/client_test.rb +118 -0
  8. data/lib/faraday/adapter/test.rb +127 -68
  9. data/lib/faraday/adapter.rb +71 -22
  10. data/lib/faraday/adapter_registry.rb +30 -0
  11. data/lib/faraday/connection.rb +314 -226
  12. data/lib/faraday/encoders/flat_params_encoder.rb +105 -0
  13. data/lib/faraday/encoders/nested_params_encoder.rb +176 -0
  14. data/lib/faraday/error.rb +121 -37
  15. data/lib/faraday/logging/formatter.rb +106 -0
  16. data/lib/faraday/methods.rb +6 -0
  17. data/lib/faraday/middleware.rb +18 -25
  18. data/lib/faraday/middleware_registry.rb +65 -0
  19. data/lib/faraday/options/connection_options.rb +22 -0
  20. data/lib/faraday/options/env.rb +181 -0
  21. data/lib/faraday/options/proxy_options.rb +32 -0
  22. data/lib/faraday/options/request_options.rb +22 -0
  23. data/lib/faraday/options/ssl_options.rb +59 -0
  24. data/lib/faraday/options.rb +41 -195
  25. data/lib/faraday/parameters.rb +4 -196
  26. data/lib/faraday/rack_builder.rb +91 -74
  27. data/lib/faraday/request/authorization.rb +37 -29
  28. data/lib/faraday/request/instrumentation.rb +47 -27
  29. data/lib/faraday/request/json.rb +55 -0
  30. data/lib/faraday/request/url_encoded.rb +45 -23
  31. data/lib/faraday/request.rb +74 -32
  32. data/lib/faraday/response/json.rb +54 -0
  33. data/lib/faraday/response/logger.rb +22 -69
  34. data/lib/faraday/response/raise_error.rb +57 -14
  35. data/lib/faraday/response.rb +26 -33
  36. data/lib/faraday/utils/headers.rb +139 -0
  37. data/lib/faraday/utils/params_hash.rb +61 -0
  38. data/lib/faraday/utils.rb +47 -251
  39. data/lib/faraday/version.rb +5 -0
  40. data/lib/faraday.rb +104 -197
  41. data/spec/external_adapters/faraday_specs_setup.rb +14 -0
  42. data/spec/faraday/adapter/test_spec.rb +377 -0
  43. data/spec/faraday/adapter_registry_spec.rb +28 -0
  44. data/spec/faraday/adapter_spec.rb +55 -0
  45. data/spec/faraday/connection_spec.rb +787 -0
  46. data/spec/faraday/error_spec.rb +60 -0
  47. data/spec/faraday/middleware_spec.rb +52 -0
  48. data/spec/faraday/options/env_spec.rb +70 -0
  49. data/spec/faraday/options/options_spec.rb +297 -0
  50. data/spec/faraday/options/proxy_options_spec.rb +44 -0
  51. data/spec/faraday/options/request_options_spec.rb +19 -0
  52. data/spec/faraday/params_encoders/flat_spec.rb +42 -0
  53. data/spec/faraday/params_encoders/nested_spec.rb +142 -0
  54. data/spec/faraday/rack_builder_spec.rb +302 -0
  55. data/spec/faraday/request/authorization_spec.rb +83 -0
  56. data/spec/faraday/request/instrumentation_spec.rb +74 -0
  57. data/spec/faraday/request/json_spec.rb +111 -0
  58. data/spec/faraday/request/url_encoded_spec.rb +82 -0
  59. data/spec/faraday/request_spec.rb +109 -0
  60. data/spec/faraday/response/json_spec.rb +117 -0
  61. data/spec/faraday/response/logger_spec.rb +220 -0
  62. data/spec/faraday/response/raise_error_spec.rb +172 -0
  63. data/spec/faraday/response_spec.rb +75 -0
  64. data/spec/faraday/utils/headers_spec.rb +82 -0
  65. data/spec/faraday/utils_spec.rb +117 -0
  66. data/spec/faraday_spec.rb +37 -0
  67. data/spec/spec_helper.rb +132 -0
  68. data/spec/support/disabling_stub.rb +14 -0
  69. data/spec/support/fake_safe_buffer.rb +15 -0
  70. data/spec/support/helper_methods.rb +96 -0
  71. data/spec/support/shared_examples/adapter.rb +104 -0
  72. data/spec/support/shared_examples/params_encoder.rb +18 -0
  73. data/spec/support/shared_examples/request_method.rb +249 -0
  74. data/spec/support/streaming_response_checker.rb +35 -0
  75. metadata +71 -34
  76. data/lib/faraday/adapter/em_http.rb +0 -243
  77. data/lib/faraday/adapter/em_http_ssl_patch.rb +0 -56
  78. data/lib/faraday/adapter/em_synchrony/parallel_manager.rb +0 -66
  79. data/lib/faraday/adapter/em_synchrony.rb +0 -106
  80. data/lib/faraday/adapter/excon.rb +0 -80
  81. data/lib/faraday/adapter/httpclient.rb +0 -128
  82. data/lib/faraday/adapter/net_http.rb +0 -135
  83. data/lib/faraday/adapter/net_http_persistent.rb +0 -54
  84. data/lib/faraday/adapter/patron.rb +0 -83
  85. data/lib/faraday/adapter/rack.rb +0 -58
  86. data/lib/faraday/adapter/typhoeus.rb +0 -123
  87. data/lib/faraday/autoload.rb +0 -84
  88. data/lib/faraday/request/basic_authentication.rb +0 -13
  89. data/lib/faraday/request/multipart.rb +0 -68
  90. data/lib/faraday/request/retry.rb +0 -164
  91. data/lib/faraday/request/token_authentication.rb +0 -15
  92. data/lib/faraday/upload_io.rb +0 -67
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 35295b9b568c043b6a43f3074c811fb901f16476
4
- data.tar.gz: 379f16be0a414f7d18b3012a83a204c53de0ac29
2
+ SHA256:
3
+ metadata.gz: 367d509be94da297eac6ece76f5561772218a5982696eba047ef8599d0ff05e1
4
+ data.tar.gz: 779c66227b778b17661428c17ab65567e23f13ea2824b92251eba67cd32c6280
5
5
  SHA512:
6
- metadata.gz: 7273cd3b89bea73f73ad25804cd275035db74ceec823102816a6ba9710f4dbb43e9a5a5aa4c6367cdfe33a6eb029f3634bfedbe49f9f427a01bae3a008bc70ab
7
- data.tar.gz: a3e0d40b1c36a8d03d39f46f0cccc76df5d6554f76a2c1179ae8ff19e49d8ef7f69e9ff0cd6d15a221370f168ca7a1cc47d430a1841135f91fdb76ceed219d96
6
+ metadata.gz: 73d405ce87ac4a0917806b16ab11693b68966334656689a95bc06764501c44965832b08fa7bf36beeb71c2144a6661775df4f22b18e8281f664a0605fc2ece49
7
+ data.tar.gz: 22701db3eb1bb1668aaf6429e711acad05099577b39ccc792d32c42a82043f628483973a993c5ce91acd4207a9f0a01f47a51d6bffc4212047e4150fbb63e1e1
data/CHANGELOG.md ADDED
@@ -0,0 +1,496 @@
1
+ # Faraday Changelog
2
+
3
+ ## [1.8.0](https://github.com/lostisland/faraday/releases/tag/v1.8.0) (2021-09-18)
4
+
5
+ ### Features
6
+
7
+ * Backport authorization procs (#1322, @jarl-dk)
8
+
9
+ ## [v1.7.0](https://github.com/lostisland/faraday/releases/tag/v1.7.0) (2021-08-09)
10
+
11
+ ### Features
12
+
13
+ * Add strict_mode to Test::Stubs (#1298, @yykamei)
14
+
15
+ ## [v1.6.0](https://github.com/lostisland/faraday/releases/tag/v1.6.0) (2021-08-01)
16
+
17
+ ### Misc
18
+
19
+ * Use external Rack adapter (#1296, @iMacTia)
20
+
21
+ ## [v1.5.1](https://github.com/lostisland/faraday/releases/tag/v1.5.1) (2021-07-11)
22
+
23
+ ### Fixes
24
+
25
+ * Fix JRuby incompatibility after moving out EM adapters (#1294, @ahorek)
26
+
27
+ ### Documentation
28
+
29
+ * Update YARD to follow RackBuilder (#1292, @kachick)
30
+
31
+ ## [v1.5.0](https://github.com/lostisland/faraday/releases/tag/v1.5.0) (2021-07-04)
32
+
33
+ ### Misc
34
+
35
+ * Use external httpclient adapter (#1289, @iMacTia)
36
+ * Use external patron adapter (#1290, @iMacTia)
37
+
38
+ ## [v1.4.3](https://github.com/lostisland/faraday/releases/tag/v1.4.3) (2021-06-24)
39
+
40
+ ### Fixes
41
+
42
+ * Silence warning (#1286, @gurgeous)
43
+ * Always dup url_prefix in Connection#build_exclusive_url (#1288, @alexeyds)
44
+
45
+ ## [v1.4.2](https://github.com/lostisland/faraday/releases/tag/v1.4.2) (2021-05-22)
46
+
47
+ ### Fixes
48
+ * Add proxy setting when url_prefix is changed (#1276, @ci)
49
+ * Default proxy scheme to http:// if necessary, fixes #1282 (#1283, @gurgeous)
50
+
51
+ ### Documentation
52
+ * Improve introduction page (#1273, @gurgeous)
53
+ * Docs: add more middleware examples (#1277, @gurgeous)
54
+
55
+ ### Misc
56
+ * Use external `em_http` and `em_synchrony` adapters (#1274, @iMacTia)
57
+
58
+ ## [v1.4.1](https://github.com/lostisland/faraday/releases/tag/v1.4.1) (2021-04-18)
59
+
60
+ ### Fixes
61
+
62
+ * Fix dependencies from external adapter gems (#1269, @iMacTia)
63
+
64
+ ## [v1.4.0](https://github.com/lostisland/faraday/releases/tag/v1.4.0) (2021-04-16)
65
+
66
+ ### Highlights
67
+
68
+ With this release, we continue the work of gradually moving out adapters into their own gems 🎉
69
+ Thanks to @MikeRogers0 for helping the Faraday team in progressing with this quest 👏
70
+
71
+ And thanks to @olleolleolle efforts, Faraday is becoming more inclusive than ever 🤗
72
+ Faraday's `master` branch has been renamed into `main`, we have an official policy on inclusive language and even a rubocop plugin to check for non-inclusive words ❤️!
73
+ Checkout the "Misc" section below for more details 🙌 !
74
+
75
+ ### Fixes
76
+
77
+ * Fix NoMethodError undefined method 'coverage' (#1255, @Maroo-b)
78
+
79
+ ### Documentation
80
+
81
+ * Some docs on EventMachine adapters. (#1232, @damau)
82
+ * CONTRIBUTING: Fix grammar and layout (#1261, @olleolleolle)
83
+
84
+ ### Misc
85
+
86
+ * Replacing Net::HTTP::Persistent with faraday-net_http_persistent (#1250, @MikeRogers0)
87
+ * CI: Configure the regenerated Coveralls token (#1256, @olleolleolle)
88
+ * Replace Excon adapter with Faraday::Excon gem, and fix autoloading issue with Faraday::NetHttpPersistent (#1257, @iMacTia)
89
+ * Drop CodeClimate (#1259, @olleolleolle)
90
+ * CI: Rename default branch to main (#1263, @olleolleolle)
91
+ * Drop RDoc support file .document (#1264, @olleolleolle, @iMacTia)
92
+ * CONTRIBUTING: add a policy on inclusive language (#1262, @olleolleolle)
93
+ * Add rubocop-inclusivity (#1267, @olleolleolle, @iMacTia)
94
+
95
+ ## [v1.3.1](https://github.com/lostisland/faraday/releases/tag/v1.3.1) (2021-04-16)
96
+
97
+ ### Fixes
98
+
99
+ * Escape colon in path segment (#1237, @yarafan)
100
+ * Handle IPv6 address String on Faraday::Connection#proxy_from_env (#1252, @cosmo0920)
101
+
102
+ ### Documentation
103
+
104
+ * Fix broken Rubydoc.info links (#1236, @nickcampbell18)
105
+ * Add httpx to list of external adapters (#1246, @HoneyryderChuck)
106
+
107
+ ### Misc
108
+
109
+ * Refactor CI to remove duplicated line (#1230, @tricknotes)
110
+ * Gemspec: Pick a good ruby2_keywords release (#1241, @olleolleolle)
111
+
112
+ ## [v1.3.0](https://github.com/lostisland/faraday/releases/tag/v1.3.0) (2020-12-31)
113
+
114
+ ### Highlights
115
+ Faraday v1.3.0 is the first release to officially support Ruby 3.0 in the CI pipeline 🎉 🍾!
116
+
117
+ This is also the first release with a previously "included" adapter (Net::HTTP) being isolated into a [separate gem](https://github.com/lostisland/faraday-net_http) 🎊!
118
+ The new adapter is added to Faraday as a dependency for now, so that means full backwards-compatibility, but just to be safe be careful when upgrading!
119
+
120
+ This is a huge step towards are Faraday v2.0 objective of pushing adapters and middleware into separate gems.
121
+ Many thanks to the Faraday Team, @JanDintel and everyone who attended the [ROSS Conf remote event](https://www.rossconf.io/event/remote/)
122
+
123
+ ### Features
124
+
125
+ * Improves consistency with Faraday::Error and Faraday::RaiseError (#1229, @qsona, @iMacTia)
126
+
127
+ ### Fixes
128
+
129
+ * Don't assign to global ::Timer (#1227, @bpo)
130
+
131
+ ### Documentation
132
+
133
+ * CHANGELOG: add releases after 1.0 (#1225, @olleolleolle)
134
+ * Improves retry middleware documentation. (#1228, @iMacTia)
135
+
136
+ ### Misc
137
+
138
+ * Move out Net::HTTP adapter (#1222, @JanDintel, @iMacTia)
139
+ * Adds Ruby 3.0 to CI Matrix (#1226, @iMacTia)
140
+
141
+
142
+ ## [v1.2.0](https://github.com/lostisland/faraday/releases/tag/v1.2.0) (2020-12-23)
143
+
144
+ ### Features
145
+
146
+ * Introduces `on_request` and `on_complete` methods in `Faraday::Middleware`. (#1194, @iMacTia)
147
+
148
+ ### Fixes
149
+
150
+ * Require 'date' to avoid retry exception (#1206, @rustygeldmacher)
151
+ * Fix rdebug recursion issue (#1205, @native-api)
152
+ * Update call to `em_http_ssl_patch` (#1202, @kylekeesling)
153
+ * `EmHttp` adapter: drop superfluous loaded? check (#1213, @olleolleolle)
154
+ * Avoid 1 use of keyword hackery (#1211, @grosser)
155
+ * Fix #1219 `Net::HTTP` still uses env proxy (#1221, @iMacTia)
156
+
157
+ ### Documentation
158
+
159
+ * Add comment in gemspec to explain exposure of `examples` and `spec` folders. (#1192, @iMacTia)
160
+ * Adapters, how to create them (#1193, @olleolleolle)
161
+ * Update documentation on using the logger (#1196, @tijmenb)
162
+ * Adjust the retry documentation and spec to align with implementation (#1198, @nbeyer)
163
+
164
+ ### Misc
165
+
166
+ * Test against ruby head (#1208, @grosser)
167
+
168
+ ## [v1.1.0](https://github.com/lostisland/faraday/releases/tag/v1.1.0) (2020-10-17)
169
+
170
+ ### Features
171
+
172
+ * Makes parameters sorting configurable (#1162 @wishdev)
173
+ * Introduces `flat_encode` option for multipart adapter. (#1163 @iMacTia)
174
+ * Include request info in exceptions raised by RaiseError Middleware (#1181 @SandroDamilano)
175
+
176
+ ### Fixes
177
+
178
+ * Avoid `last arg as keyword param` warning when building user middleware on Ruby 2.7 (#1153 @dgholz)
179
+ * Limits net-http-persistent version to < 4.0 (#1156 @iMacTia)
180
+ * Update `typhoeus` to new stable version (`1.4`) (#1159 @AlexWayfer)
181
+ * Properly fix test failure with Rack 2.1+. (#1171 @voxik)
182
+
183
+ ### Documentation
184
+
185
+ * Improves documentation on how to contribute to the site by using Docker. (#1175 @iMacTia)
186
+ * Remove retry_change_requests from documentation (#1185 @stim371)
187
+
188
+ ### Misc
189
+
190
+ * Link from GitHub Actions badge to CI workflow (#1141 @olleolleolle)
191
+ * Return tests of `Test` adapter (#1147 @AlexWayfer)
192
+ * Add 1.0 release to wording in CONTRIBUTING (#1155 @olleolleolle)
193
+ * Fix linting bumping Rubocop to 0.90.0 (#1182 @iMacTia)
194
+ * Drop `git ls-files` in gemspec (#1183 @utkarsh2102)
195
+ * Upgrade CI to ruby/setup-ruby (#1187 @gogainda)
196
+
197
+ ## [v1.0.1](https://github.com/lostisland/faraday/releases/tag/v1.0.1) (2020-03-29)
198
+
199
+ ### Fixes
200
+
201
+ * Use Net::HTTP#start(&block) to ensure closed TCP connections (#1117)
202
+ * Fully qualify constants to be checked (#1122)
203
+ * Allows `parse` method to be private/protected in response middleware (#1123)
204
+ * Encode Spaces in Query Strings as '%20' Instead of '+' (#1125)
205
+ * Limits rack to v2.0.x (#1127)
206
+ * Adapter Registry reads also use mutex (#1136)
207
+
208
+ ### Documentation
209
+
210
+ * Retry middleware documentation fix (#1109)
211
+ * Docs(retry): precise usage of retry-after (#1111)
212
+ * README: Link the logo to the website (#1112)
213
+ * Website: add search bar (#1116)
214
+ * Fix request/response mix-up in docs text (#1132)
215
+
216
+ ## [v1.0](https://github.com/lostisland/faraday/releases/tag/v1.0.0) (2020-01-22)
217
+
218
+ Features:
219
+
220
+ * Add #trace support to Faraday::Connection #861 (@technoweenie)
221
+ * Add the log formatter that is easy to override and safe to inherit #889 (@prikha)
222
+ * Support standalone adapters #941 (@iMacTia)
223
+ * Introduce Faraday::ConflictError for 409 response code #979 (@lucasmoreno)
224
+ * Add support for setting `read_timeout` option separately #1003 (@springerigor)
225
+ * Refactor and cleanup timeout settings across adapters #1022 (@technoweenie)
226
+ * Create ParamPart class to allow multipart posts with JSON content and file upload at the same time #1017 (@jeremy-israel)
227
+ * Copy UploadIO const -> FilePart for consistency with ParamPart #1018, #1021 (@technoweenie)
228
+ * Implement streaming responses in the Excon adapter #1026 (@technoweenie)
229
+ * Add default implementation of `Middleware#close`. #1069 (@ioquatix)
230
+ * Add `Adapter#close` so that derived classes can call super. #1091 (@ioquatix)
231
+ * Add log_level option to logger default formatter #1079 (@amrrbakry)
232
+ * Fix empty array for FlatParamsEncoder `{key: []} -> "key="` #1084 (@mrexox)
233
+
234
+ Bugs:
235
+
236
+ * Explicitly require date for DateTime library in Retry middleware #844 (@nickpresta)
237
+ * Refactor Adapter as final endpoints #846 (@iMacTia)
238
+ * Separate Request and Response bodies in Faraday::Env #847 (@iMacTia)
239
+ * Implement Faraday::Connection#options to make HTTP requests with the OPTIONS verb. #857 (@technoweenie)
240
+ * Multipart: Drop Ruby 1.8 String behavior compat #892 (@olleolleolle)
241
+ * Fix Ruby warnings in Faraday::Options.memoized #962 (@technoweenie)
242
+ * Allow setting min/max SSL version for a Net::HTTP::Persistent connection #972, #973 (@bdewater, @olleolleolle)
243
+ * Fix instances of frozen empty string literals #1040 (@BobbyMcWho)
244
+ * remove temp_proxy and improve proxy tests #1063 (@technoweenie)
245
+ * improve error initializer consistency #1095 (@technoweenie)
246
+
247
+ Misc:
248
+
249
+ * Convert minitest suite to RSpec #832 (@iMacTia, with help from @gaynetdinov, @Insti, @technoweenie)
250
+ * Major effort to update code to RuboCop standards. #854 (@olleolleolle, @iMacTia, @technoweenie, @htwroclau, @jherdman, @Drenmi, @Insti)
251
+ * Rubocop #1044, #1047 (@BobbyMcWho, @olleolleolle)
252
+ * Documentation tweaks (@adsteel, @Hubro, @iMacTia, @olleolleolle, @technoweenie)
253
+ * Update license year #981 (@Kevin-Kawai)
254
+ * Configure Jekyll plugin jekyll-remote-theme to support Docker usage #999 (@Lewiscowles1986)
255
+ * Fix Ruby 2.7 warnings #1009 (@tenderlove)
256
+ * Cleanup adapter connections #1023 (@technoweenie)
257
+ * Describe clearing cached stubs #1045 (@viraptor)
258
+ * Add project metadata to the gemspec #1046 (@orien)
259
+
260
+ ## v0.17.4
261
+
262
+ Fixes:
263
+
264
+ * NetHttp adapter: wrap Errno::EADDRNOTAVAIL (#1114, @embs)
265
+ * Fix === for subclasses of deprecated classes (#1243, @mervync)
266
+
267
+ ## v0.17.3
268
+
269
+ Fixes:
270
+
271
+ * Reverts changes in error classes hierarchy. #1092 (@iMacTia)
272
+ * Fix Ruby 1.9 syntax errors and improve Error class testing #1094 (@BanzaiMan,
273
+ @mrexox, @technoweenie)
274
+
275
+ Misc:
276
+
277
+ * Stops using `&Proc.new` for block forwarding. #1083 (@olleolleolle)
278
+ * Update CI to test against ruby 2.0-2.7 #1087, #1099 (@iMacTia, @olleolleolle,
279
+ @technoweenie)
280
+ * require FARADAY_DEPRECATE=warn to show Faraday v1.0 deprecation warnings
281
+ #1098 (@technoweenie)
282
+
283
+ ## v0.17.1
284
+
285
+ Final release before Faraday v1.0, with important fixes for Ruby 2.7.
286
+
287
+ Fixes:
288
+
289
+ * RaiseError response middleware raises exception if HTTP client returns a nil
290
+ status. #1042 (@jonnyom, @BobbyMcWho)
291
+
292
+ Misc:
293
+
294
+ * Fix Ruby 2.7 warnings (#1009)
295
+ * Add `Faraday::Deprecate` to warn about upcoming v1.0 changes. (#1054, #1059,
296
+ #1076, #1077)
297
+ * Add release notes up to current in CHANGELOG.md (#1066)
298
+ * Port minimal rspec suite from main branch to run backported tests. (#1058)
299
+
300
+ ## v0.17.0
301
+
302
+ This release is the same as v0.15.4. It was pushed to cover up releases
303
+ v0.16.0-v0.16.2.
304
+
305
+ ## v0.15.4
306
+
307
+ * Expose `pool_size` as a option for the NetHttpPersistent adapter (#834)
308
+
309
+ ## v0.15.3
310
+
311
+ * Make Faraday::Request serialisable with Marshal. (#803)
312
+ * Add DEFAULT_EXCEPTIONS constant to Request::Retry (#814)
313
+ * Add support for Ruby 2.6 Net::HTTP write_timeout (#824)
314
+
315
+ ## v0.15.2
316
+
317
+ * Prevents `Net::HTTP` adapters to retry request internally by setting `max_retries` to 0 if available (Ruby 2.5+). (#799)
318
+ * Fixes `NestedParamsEncoder` handling of empty array values (#801)
319
+
320
+ ## v0.15.1
321
+
322
+ * NetHttpPersistent adapter better reuse of SSL connections (#793)
323
+ * Refactor: inline cached_connection (#797)
324
+ * Logger middleware: use $stdout instead of STDOUT (#794)
325
+ * Fix: do not memoize/reuse Patron session (#796)
326
+
327
+ Also in this release:
328
+
329
+ * Allow setting min/max ssl version for Net::HTTP (#792)
330
+ * Allow setting min/max ssl version for Excon (#795)
331
+
332
+ ## v0.15.0
333
+
334
+ Features:
335
+
336
+ * Added retry block option to retry middleware. (#770)
337
+ * Retry middleware improvements (honour Retry-After header, retry statuses) (#773)
338
+ * Improve response logger middleware output (#784)
339
+
340
+ Fixes:
341
+
342
+ * Remove unused class error (#767)
343
+ * Fix minor typo in README (#760)
344
+ * Reuse persistent connections when using net-http-persistent (#778)
345
+ * Fix Retry middleware documentation (#781)
346
+ * Returns the http response when giving up on retrying by status (#783)
347
+
348
+ ## v0.14.0
349
+
350
+ Features:
351
+
352
+ * Allow overriding env proxy #754 (@iMacTia)
353
+ * Remove legacy Typhoeus adapter #715 (@olleolleolle)
354
+ * External Typhoeus Adapter Compatibility #748 (@iMacTia)
355
+ * Warn about missing adapter when making a request #743 (@antstorm)
356
+ * Faraday::Adapter::Test stubs now support entire urls (with host) #741 (@erik-escobedo)
357
+
358
+ Fixes:
359
+
360
+ * If proxy is manually provided, this takes priority over `find_proxy` #724 (@iMacTia)
361
+ * Fixes the behaviour for Excon's open_timeout (not setting write_timeout anymore) #731 (@apachelogger)
362
+ * Handle all connection timeout messages in Patron #687 (@stayhero)
363
+
364
+ ## v0.13.1
365
+
366
+ * Fixes an incompatibility with Addressable::URI being used as uri_parser
367
+
368
+ ## v0.13.0
369
+
370
+ Features:
371
+
372
+ * Dynamically reloads the proxy when performing a request on an absolute domain (#701)
373
+ * Adapter support for Net::HTTP::Persistent v3.0.0 (#619)
374
+
375
+ Fixes:
376
+
377
+ * Prefer #hostname over #host. (#714)
378
+ * Fixes an edge-case issue with response headers parsing (missing HTTP header) (#719)
379
+
380
+ ## v0.12.2
381
+
382
+ * Parse headers from aggregated proxy requests/responses (#681)
383
+ * Guard against invalid middleware configuration with warning (#685)
384
+ * Do not use :insecure option by default in Patron (#691)
385
+ * Fixes an issue with HTTPClient not raising a `Faraday::ConnectionFailed` (#702)
386
+ * Fixes YAML serialization/deserialization for `Faraday::Utils::Headers` (#690)
387
+ * Fixes an issue with Options having a nil value (#694)
388
+ * Fixes an issue with Faraday.default_connection not using Faraday.default_connection_options (#698)
389
+ * Fixes an issue with Options.merge! and Faraday instrumentation middleware (#710)
390
+
391
+ ## v0.12.1
392
+
393
+ * Fix an issue with Patron tests failing on jruby
394
+ * Fix an issue with new `rewind_files` feature that was causing an exception when the body was not an Hash
395
+ * Expose wrapped_exception in all client errors
396
+ * Add Authentication Section to the ReadMe
397
+
398
+ ## v0.12.0.1
399
+
400
+ * Hotfix release to address an issue with TravisCI deploy on Rubygems
401
+
402
+ ## v0.12.0
403
+
404
+ Features:
405
+
406
+ * Proxy feature now relies on Ruby `URI::Generic#find_proxy` and can use `no_proxy` ENV variable (not compatible with ruby < 2.0)
407
+ * Adds support for `context` request option to pass arbitrary information to middlewares
408
+
409
+ Fixes:
410
+
411
+ * Fix an issue with options that was causing new options to override defaults ones unexpectedly
412
+ * Rewind `UploadIO`s on retry to fix a compatibility issue
413
+ * Make multipart boundary unique
414
+ * Improvements in `README.md`
415
+
416
+ ## v0.11.0
417
+
418
+ Features:
419
+
420
+ * Add `filter` method to Logger middleware
421
+ * Add support for Ruby2.4 and Minitest 6
422
+ * Introduce block syntax to customise the adapter
423
+
424
+ Fixes:
425
+
426
+ * Fix an issue that was allowing to override `default_connection_options` from a connection instance
427
+ * Fix a bug that was causing newline escape characters ("\n") to be used when building the Authorization header
428
+
429
+ ## v0.10.1
430
+
431
+ - Fix an issue with HTTPClient adapter that was causing the SSL to be reset on every request
432
+ - Rescue `IOError` instead of specific subclass
433
+ - `Faraday::Utils::Headers` can now be successfully serialised in YAML
434
+ - Handle `default_connection_options` set with hash
435
+
436
+ ## v0.10.0
437
+
438
+ Breaking changes:
439
+ - Drop support for Ruby 1.8
440
+
441
+ Features:
442
+ - Include wrapped exception/reponse in ClientErrors
443
+ - Add `response.reason_phrase`
444
+ - Provide option to selectively skip logging request/response headers
445
+ - Add regex support for pattern matching in `test` adapter
446
+
447
+ Fixes:
448
+ - Add `Faraday.respond_to?` to find methods managed by `method_missing`
449
+ - em-http: `request.host` instead of `connection.host` should be taken for SSL validations
450
+ - Allow `default_connection_options` to be merged when options are passed as url parameter
451
+ - Improve splitting key-value pairs in raw HTTP headers
452
+
453
+ ## v0.9.2
454
+
455
+ Adapters:
456
+ - Enable gzip compression for httpclient
457
+ - Fixes default certificate store for httpclient not having default paths.
458
+ - Make excon adapter compatible with 0.44 excon version
459
+ - Add compatibility with Patron 0.4.20
460
+ - Determine default port numbers in Net::HTTP adapters (Addressable compatibility)
461
+ - em-http: wrap "connection closed by server" as ConnectionFailed type
462
+ - Wrap Errno::ETIMEDOUT in Faraday::Error::TimeoutError
463
+
464
+ Utils:
465
+ - Add Rack-compatible support for parsing `a[][b]=c` nested queries
466
+ - Encode nil values in queries different than empty strings. Before: `a=`; now: `a`.
467
+ - Have `Faraday::Utils::Headers#replace` clear internal key cache
468
+ - Dup the internal key cache when a Headers hash is copied
469
+
470
+ Env and middleware:
471
+ - Ensure `env` stored on middleware response has reference to the response
472
+ - Ensure that Response properties are initialized during `on_complete` (VCR compatibility)
473
+ - Copy request options in Faraday::Connection#dup
474
+ - Env custom members should be copied by Env.from(env)
475
+ - Honour per-request `request.options.params_encoder`
476
+ - Fix `interval_randomness` data type for Retry middleware
477
+ - Add maximum interval option for Retry middleware
478
+
479
+ ## v0.9.1
480
+
481
+ * Refactor Net:HTTP adapter so that with_net_http_connection can be overridden to allow pooled connections. (@Ben-M)
482
+ * Add configurable methods that bypass `retry_if` in the Retry request middleware. (@mike-bourgeous)
483
+
484
+ ## v0.9.0
485
+
486
+ * Add HTTPClient adapter (@hakanensari)
487
+ * Improve Retry handler (@mislav)
488
+ * Remove autoloading by default (@technoweenie)
489
+ * Improve internal docs (@technoweenie, @mislav)
490
+ * Respect user/password in http proxy string (@mislav)
491
+ * Adapter options are structs. Reinforces consistent options across adapters
492
+ (@technoweenie)
493
+ * Stop stripping trailing / off base URLs in a Faraday::Connection. (@technoweenie)
494
+ * Add a configurable URI parser. (@technoweenie)
495
+ * Remove need to manually autoload when using the authorization header helpers on `Faraday::Connection`. (@technoweenie)
496
+ * `Faraday::Adapter::Test` respects the `Faraday::RequestOptions#params_encoder` option. (@technoweenie)
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2017 Rick Olson, Zack Hobson
1
+ Copyright (c) 2009-2020 Rick Olson, Zack Hobson
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the