flyingmachine-merb_whoops_notifier 1.0.1 → 1.0.2
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.
- data/README +10 -23
- data/lib/merb_whoops_notifier/whoops_notifier.rb +1 -1
- metadata +1 -1
data/README
CHANGED
@@ -1,31 +1,18 @@
|
|
1
1
|
merb_whoops_notifier
|
2
2
|
---------------------------------------------
|
3
|
-
This is merb plugin for exception notification with
|
3
|
+
This is merb plugin for exception notification with Whoops. It should work with
|
4
4
|
any merb app that's based on merb 1.0 and higher
|
5
5
|
|
6
|
-
This plugin: http://github.com/
|
7
|
-
The original: http://github.com/
|
6
|
+
This plugin: http://github.com/flyingmachine/merb_whoops_notifier/tree/master
|
7
|
+
The original: http://github.com/atmos/merb_hoptoad_notifier/tree/master
|
8
8
|
|
9
9
|
Usage:
|
10
10
|
|
11
|
-
1) Get
|
11
|
+
1) Get Whoops (http://github.com/flyingmachine/whoops/tree/master) and set it up
|
12
12
|
|
13
|
-
2)
|
14
|
-
---
|
15
|
-
:development: &defaults
|
16
|
-
:api_key: ZOMGLOLROFLMAO
|
13
|
+
2) Copy whoops.yml.example to the config directory of your merb app and modify it
|
17
14
|
|
18
|
-
|
19
|
-
<<: *defaults
|
20
|
-
|
21
|
-
:test:
|
22
|
-
<<: *defaults
|
23
|
-
|
24
|
-
:production:
|
25
|
-
:api_key: UBERSECRETSHIT
|
26
|
-
|
27
|
-
|
28
|
-
3) Require whoops in init.rb
|
15
|
+
3) Require this gem in dependencies.rb
|
29
16
|
require 'merb_whoops_notifier'
|
30
17
|
|
31
18
|
4) Add the following method to your Exceptions controller. Depending on your merb version you'll need to use the exceptions,standard_error, or internal_server error as the action name. Kinda weak, but the API changed a lot in 0.9.x
|
@@ -39,11 +26,12 @@ class Exceptions < Merb::Controller
|
|
39
26
|
end
|
40
27
|
end
|
41
28
|
|
42
|
-
5) Restart the server, trigger an error(in staging or prod) and check that it arrived at
|
29
|
+
5) Restart the server, trigger an error (in staging or prod) and check that it arrived at your Whoops server :)
|
43
30
|
|
44
31
|
|
45
32
|
Filtersing your post environment
|
46
33
|
--------------------------------
|
34
|
+
# This feature hasn't been tested
|
47
35
|
If you have environmental variables set in your ruby process that should not be sent to whoops,
|
48
36
|
there's a mechanism for filtering those attributes now. Throw something like this in
|
49
37
|
config/init.rb
|
@@ -54,6 +42,5 @@ end
|
|
54
42
|
|
55
43
|
Each of these words will be compiled into a regex so you should be able to use anchors if needed.
|
56
44
|
|
57
|
-
|
58
|
-
|
59
|
-
joakimk, fairchild and cv.
|
45
|
+
--------------------------------
|
46
|
+
Thanks to atmos for the original merb_hoptoad_notifier plugin
|
@@ -36,7 +36,7 @@ module WhoopsNotifier
|
|
36
36
|
}
|
37
37
|
|
38
38
|
data[:environment] = clean_whoops_environment(ENV.to_hash.merge(request.env))
|
39
|
-
data[:environment][:
|
39
|
+
data[:environment][:app_env] = Merb.env
|
40
40
|
|
41
41
|
data[:session] = {
|
42
42
|
:key => session.instance_variable_get("@session_id"),
|