failbot 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/failbot.rb +9 -0
- data/lib/failbot/exception_format/haystack.rb +10 -0
- data/lib/failbot/exception_format/structured.rb +10 -0
- data/lib/failbot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8b0cb0e395a797b15f920bf62da3a4bc56a92545000e12f7195ac72e3df7288
|
4
|
+
data.tar.gz: 68dc6a523edceecc6b15f45799cabd380927f24d934b6c876c2d7f0726c55241
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa5282763cef5946b344467cc0f8a568e7b364cc682b038bff2abcc0f807a5e86de4f454e76a70dd2c17e60c017a6a13d82e34099d0297b8b5c77c5ba41dd01f
|
7
|
+
data.tar.gz: cac6f6bf0d01b2266d3c3b41507a84274bfaa9f1f9bc2d1f8b2780a1bd7c3ac51f32b4dba98541b9e6f374010559afb9769f500ee8df9cf423c6cc7e3fecc014
|
data/lib/failbot.rb
CHANGED
@@ -74,6 +74,15 @@ module Failbot
|
|
74
74
|
# apps opt in to the newer version.
|
75
75
|
self.exception_format = :haystack
|
76
76
|
|
77
|
+
# Helpers needed to parse hashes included in e.g. Failbot.reports.
|
78
|
+
def self.exception_message_from_hash(hash)
|
79
|
+
@exception_formatter.exception_message_from_hash(hash)
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.exception_classname_from_hash(hash)
|
83
|
+
@exception_formatter.exception_classname_from_hash(hash)
|
84
|
+
end
|
85
|
+
|
77
86
|
# Public: Setup the backend for reporting exceptions.
|
78
87
|
def setup(settings={}, default_context={})
|
79
88
|
deprecated_settings = %w[
|
@@ -20,6 +20,16 @@ module Failbot
|
|
20
20
|
res
|
21
21
|
end
|
22
22
|
|
23
|
+
# given a hash generated by this class, return the exception message.
|
24
|
+
def self.exception_message_from_hash(hash)
|
25
|
+
hash["message"]
|
26
|
+
end
|
27
|
+
|
28
|
+
# given a hash generated by this class, return the exception class name.
|
29
|
+
def self.exception_classname_from_hash(hash)
|
30
|
+
hash["class"]
|
31
|
+
end
|
32
|
+
|
23
33
|
# We'll include this many nested Exception#cause objects in the needle
|
24
34
|
# context. We limit the number of objects to prevent excessive recursion and
|
25
35
|
# large needle contexts.
|
@@ -32,6 +32,16 @@ module Failbot
|
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
35
|
+
# given a hash generated by this class, return the exception message.
|
36
|
+
def self.exception_message_from_hash(hash)
|
37
|
+
hash.dig("exception_detail", 0, "value")
|
38
|
+
end
|
39
|
+
|
40
|
+
# given a hash generated by this class, return the exception class name.
|
41
|
+
def self.exception_classname_from_hash(hash)
|
42
|
+
hash.dig("exception_detail", 0, "type")
|
43
|
+
end
|
44
|
+
|
35
45
|
def self.formatted_backtrace(e)
|
36
46
|
if e.backtrace
|
37
47
|
Backtrace.parse(e.backtrace).frames.reverse.map do |line|
|
data/lib/failbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: failbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "@rtomayko"
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-03-
|
13
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|