wat_catcher 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fb2129c1a2999ffff9869cd6803a44160f2016a
4
- data.tar.gz: 4b2cfcbce4bf60f45ae5f0ac1b74e946e1cb9168
3
+ metadata.gz: ab29e85d48aa8ea536b68124ca2f285a26d4d617
4
+ data.tar.gz: 2fa10b8ab4d1fcf8a12143733b2219d1206bb5be
5
5
  SHA512:
6
- metadata.gz: 2ebe816f36becb10568d1f2282a13df1eb609d157555dbed7cd42ac39780cd5baf25fd1830f2c3bf94b904c772b3397d16ba610c014f838d1751027d05cd6c09
7
- data.tar.gz: 50e29d28ff2bb387eaa07cef80cc2d5d2c8f63cde8b39232be25503a6aacf3f4326050a21a868633e9b24acef8da040d00239481e7bd2d3d17d5d7ed7e3a2463
6
+ metadata.gz: a49d04b607ae6a28420aff014f0fb6137d4b4a1b7fa0ecad5c1d1eb6480af47cea759b9489169f7196cdd75615fc12a02e1947f7468dad17890d2c85b3b2eeb3
7
+ data.tar.gz: d46e836aeb376a1652e86a782965f84cbb459146ac3e379dc1519c24fd9d9eb7d538ed27a8112528445a063ed0619cbf191c9a95483fb46c6a484d3349c6479d
@@ -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| x.first !~ /\./ }.sort_by(&:first).flatten]
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
@@ -1,3 +1,3 @@
1
1
  module WatCatcher
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wat_catcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Constantine