lilypad 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +5 -4
- data/gemspec.rb +1 -1
- data/lib/rack/lilypad.rb +5 -5
- metadata +1 -1
data/README.markdown
CHANGED
@@ -15,21 +15,22 @@ Use it
|
|
15
15
|
|
16
16
|
<pre>
|
17
17
|
require 'rack/lilypad'
|
18
|
-
use Rack::Lilypad, '
|
18
|
+
use Rack::Lilypad, 'hoptoad_api_key_goes_here'
|
19
19
|
</pre>
|
20
20
|
|
21
21
|
To specify environment filters:
|
22
22
|
|
23
23
|
<pre>
|
24
|
-
use Rack::Lilypad, '
|
24
|
+
use Rack::Lilypad, 'hoptoad_api_key_goes_here' do |hoptoad|
|
25
25
|
hoptoad.filters << %w(AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY AWS_ACCOUNT SSH_AUTH_SOCK)
|
26
26
|
end
|
27
27
|
</pre>
|
28
28
|
|
29
|
-
In Rails, you
|
29
|
+
In Rails, you will need to do this in the <code>Rails::Initializer.run</code> block in environment.rb:
|
30
30
|
|
31
31
|
<pre>
|
32
32
|
ENV['RACK_ENV'] = ENV['RAILS_ENV']
|
33
|
+
config.middleware.use Rack::Lilypad, 'hoptoad_api_key_goes_here'
|
33
34
|
</pre>
|
34
35
|
|
35
36
|
Debug
|
@@ -38,7 +39,7 @@ Debug
|
|
38
39
|
Use the log option to see what is happening:
|
39
40
|
|
40
41
|
<pre>
|
41
|
-
use Rack::Lilypad, '
|
42
|
+
use Rack::Lilypad, 'hoptoad_api_key_goes_here' do |hoptoad|
|
42
43
|
hoptoad.log = '/var/www/log/hoptoad.log'
|
43
44
|
end
|
44
45
|
</pre>
|
data/gemspec.rb
CHANGED
data/lib/rack/lilypad.rb
CHANGED
@@ -52,10 +52,6 @@ module Rack
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
def to_string(obj)
|
56
|
-
obj.respond_to?(:strip) ? obj : obj.inspect
|
57
|
-
end
|
58
|
-
|
59
55
|
def log(msg)
|
60
56
|
::File.open(@log, 'a') { |f| f.write(msg) } if @log
|
61
57
|
end
|
@@ -88,6 +84,10 @@ module Rack
|
|
88
84
|
%w(staging production).include?(ENV['RACK_ENV'])
|
89
85
|
end
|
90
86
|
|
87
|
+
def to_string(obj)
|
88
|
+
obj.respond_to?(:strip) ? obj : obj.inspect
|
89
|
+
end
|
90
|
+
|
91
91
|
def xml(exception, env)
|
92
92
|
environment = filter(ENV.to_hash.merge(env))
|
93
93
|
request = Rack::Request.new(env)
|
@@ -100,7 +100,7 @@ module Rack
|
|
100
100
|
n.notifier do |n|
|
101
101
|
n.name 'Lilypad'
|
102
102
|
n.url 'http://github.com/winton/lilypad'
|
103
|
-
n.version '0.1.
|
103
|
+
n.version '0.1.7'
|
104
104
|
end
|
105
105
|
n.error do |e|
|
106
106
|
e.tag! 'class', exception.class.name
|