wat_catcher 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wat_catcher/report.rb +9 -4
- data/lib/wat_catcher/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: ab29e85d48aa8ea536b68124ca2f285a26d4d617
|
4
|
+
data.tar.gz: 2fa10b8ab4d1fcf8a12143733b2219d1206bb5be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a49d04b607ae6a28420aff014f0fb6137d4b4a1b7fa0ecad5c1d1eb6480af47cea759b9489169f7196cdd75615fc12a02e1947f7468dad17890d2c85b3b2eeb3
|
7
|
+
data.tar.gz: d46e836aeb376a1652e86a782965f84cbb459146ac3e379dc1519c24fd9d9eb7d538ed27a8112528445a063ed0619cbf191c9a95483fb46c6a484d3349c6479d
|
data/lib/wat_catcher/report.rb
CHANGED
@@ -14,7 +14,7 @@ module WatCatcher
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def params
|
17
|
-
{ wat: exception_description.merge(request_description).merge(worker_description).merge(param_exception_description) }
|
17
|
+
{ wat: base_description.merge(exception_description).merge(request_description).merge(worker_description).merge(param_exception_description) }
|
18
18
|
end
|
19
19
|
|
20
20
|
def param_exception_description
|
@@ -27,14 +27,19 @@ module WatCatcher
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
|
30
|
+
def base_description
|
31
|
+
{
|
32
|
+
app_env: ::Rails.env.to_s,
|
33
|
+
app_name: ::Rails.application.class.parent_name
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
30
37
|
def exception_description
|
31
38
|
return {} unless exception
|
32
39
|
{
|
33
40
|
backtrace: exception.backtrace.to_a,
|
34
41
|
message: exception.message,
|
35
42
|
error_class: exception.class.to_s,
|
36
|
-
app_env: ::Rails.env.to_s,
|
37
|
-
app_name: ::Rails.application.class.parent_name
|
38
43
|
}
|
39
44
|
end
|
40
45
|
|
@@ -53,7 +58,7 @@ module WatCatcher
|
|
53
58
|
end
|
54
59
|
|
55
60
|
def headers
|
56
|
-
Hash[*request.headers.select { |x|
|
61
|
+
Hash[*request.headers.select { |x, y| y.instance_of? String }.sort_by(&:first).flatten]
|
57
62
|
end
|
58
63
|
|
59
64
|
def worker_description
|
data/lib/wat_catcher/version.rb
CHANGED