rack_hoptoad 0.0.1 → 0.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.md +7 -4
- data/Rakefile +1 -1
- data/lib/rack/hoptoad_notifier.rb +4 -2
- data/lib/rack_hoptoad.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -9,9 +9,12 @@ Throw something like this in your config.ru to enable notifications.
|
|
9
9
|
|
10
10
|
require 'rack_hoptoad'
|
11
11
|
|
12
|
-
ENV['RACK_ENV'] = 'production'
|
13
|
-
|
14
12
|
use Rack::HoptoadNotifier, 'fd48c7d26f724503a0280f808f44b339fc65fab8'
|
15
13
|
|
16
|
-
If your RACK_ENV variable is set to production it'll actually post
|
17
|
-
It won't process in the other environments.
|
14
|
+
If your RACK_ENV variable is set to production or staging it'll actually post
|
15
|
+
to hoptoad. It won't process in the other environments.
|
16
|
+
|
17
|
+
Installation
|
18
|
+
============
|
19
|
+
|
20
|
+
% sudo gem install rack_hoptoad
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ module Rack
|
|
16
16
|
status, headers, body =
|
17
17
|
begin
|
18
18
|
@app.call(env)
|
19
|
-
rescue => boom
|
19
|
+
rescue StandardError, LoadError, SyntaxError => boom
|
20
20
|
# TODO don't allow exceptions from send_notification to
|
21
21
|
# propogate
|
22
22
|
send_notification boom, env
|
@@ -40,8 +40,10 @@ module Rack
|
|
40
40
|
:environment => env.to_hash
|
41
41
|
}
|
42
42
|
|
43
|
+
bad_request = Rack::Request.new(env)
|
44
|
+
|
43
45
|
data[:request] = {
|
44
|
-
:params =>
|
46
|
+
:params => {'request.path' => bad_request.path}.merge(bad_request.params)
|
45
47
|
}
|
46
48
|
|
47
49
|
data[:environment] = clean_hoptoad_environment(ENV.to_hash.merge(env))
|
data/lib/rack_hoptoad.rb
CHANGED