faraday 2.7.7 → 2.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/faraday/logging/formatter.rb +2 -0
- data/lib/faraday/version.rb +1 -1
- data/spec/faraday/response/logger_spec.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc827983d5e95a84b94d70dc8d06579e55c782037d238f39960a8017c15170da
|
4
|
+
data.tar.gz: cf3f9bc02d1781ca10e38056726f7d50dc410936c2d6ac0c666aedbdce3fa555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 511c0853544f2a044d1ebe1f4b491742b029113688208ec4ba5a96c992e1d8422c7d0188f7923d2a9a778985f227dd91d3f740b3752caab430a27c82443a81ce
|
7
|
+
data.tar.gz: d9f685f4cbe3a91afd41e4490fee3171605fafdb28211fca0d3daa29deaea75acac80f126754591e9bfd75af299d7acc37f8b9793107faedebdf8845f9d125c5
|
data/lib/faraday/version.rb
CHANGED
@@ -25,6 +25,7 @@ RSpec.describe Faraday::Response::Logger do
|
|
25
25
|
stubs.get('/filtered_headers') { [200, { 'Content-Type' => 'text/html' }, 'headers response'] }
|
26
26
|
stubs.get('/filtered_params') { [200, { 'Content-Type' => 'text/html' }, 'params response'] }
|
27
27
|
stubs.get('/filtered_url') { [200, { 'Content-Type' => 'text/html' }, 'url response'] }
|
28
|
+
stubs.get('/connection_failed') { raise Faraday::ConnectionFailed, 'Failed to open TCP connection' }
|
28
29
|
end
|
29
30
|
end
|
30
31
|
end
|
@@ -216,6 +217,15 @@ RSpec.describe Faraday::Response::Logger do
|
|
216
217
|
end
|
217
218
|
end
|
218
219
|
|
220
|
+
context 'when logging headers and errors' do
|
221
|
+
let(:logger_options) { { headers: true, errors: true } }
|
222
|
+
|
223
|
+
it 'logs error message' do
|
224
|
+
expect { conn.get '/connection_failed' }.to raise_error(Faraday::ConnectionFailed)
|
225
|
+
expect(string_io.string).to match(%(Failed to open TCP connection))
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
219
229
|
context 'when using log_level' do
|
220
230
|
let(:logger_options) { { bodies: true, log_level: :debug } }
|
221
231
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faraday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "@technoweenie"
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-06-
|
13
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday-net_http
|
@@ -131,7 +131,7 @@ licenses:
|
|
131
131
|
- MIT
|
132
132
|
metadata:
|
133
133
|
homepage_uri: https://lostisland.github.io/faraday
|
134
|
-
changelog_uri: https://github.com/lostisland/faraday/releases/tag/v2.7.
|
134
|
+
changelog_uri: https://github.com/lostisland/faraday/releases/tag/v2.7.8
|
135
135
|
source_code_uri: https://github.com/lostisland/faraday
|
136
136
|
bug_tracker_uri: https://github.com/lostisland/faraday/issues
|
137
137
|
post_install_message:
|