http_event_logger 0.1.0.rc3 → 0.1.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_event_logger/event/response.rb +6 -6
- data/lib/http_event_logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b72946022e914339544c26d5023c306d3f4ca36
|
4
|
+
data.tar.gz: 07ee6922e997f6772cb153b322c24780c46e75bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d97a397a87801a98cdb9c9437627463329f71283167f28770297228082d50e84c5afa7d3215c2f5b9444fff32cbe958259c5828d49671cfd7a9ab88b76cabaec
|
7
|
+
data.tar.gz: 9dc6c15f52a4c89adfd6d957b0ac385d91a98be2e44b101f8533f589d83c795a13c19a71c2e6ba499536ab55d73cfe79224d38e42918a583fb9cc4b12ec25a52
|
@@ -16,12 +16,6 @@ module HttpEventLogger
|
|
16
16
|
HttpEventLogger::Event::Observer.observe(:received, self)
|
17
17
|
end
|
18
18
|
|
19
|
-
def body_with_formatting
|
20
|
-
body.include?("\n") ? "\n#{body}" : body
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
19
|
def body
|
26
20
|
if body_read_deferred?
|
27
21
|
"[not available]"
|
@@ -32,6 +26,12 @@ module HttpEventLogger
|
|
32
26
|
end
|
33
27
|
end
|
34
28
|
|
29
|
+
def body_with_formatting
|
30
|
+
body.include?("\n") ? "\n#{body}" : body
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
35
|
# open-uri wraps the response in a Net::ReadAdapter, so the response body is not available yet
|
36
36
|
def body_read_deferred?
|
37
37
|
@raw_body.is_a?(Net::ReadAdapter)
|