lilypad 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/gemspec.rb +1 -1
- data/lib/rack/lilypad.rb +4 -2
- data/spec/rack/lilypad_spec.rb +1 -1
- metadata +2 -2
data/gemspec.rb
CHANGED
data/lib/rack/lilypad.rb
CHANGED
@@ -53,7 +53,8 @@ module Rack
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def log(*msg)
|
56
|
-
|
56
|
+
msg = msg.compact.join("\n\n") + "\n\n"
|
57
|
+
::File.open(@log, 'a') { |f| f.write(msg) } if @log
|
57
58
|
end
|
58
59
|
|
59
60
|
def post(exception, env)
|
@@ -70,7 +71,8 @@ module Rack
|
|
70
71
|
http.post uri.path, xml(exception, env), headers
|
71
72
|
rescue TimeoutError => e
|
72
73
|
end
|
73
|
-
|
74
|
+
case response
|
75
|
+
when Net::HTTPSuccess
|
74
76
|
env['hoptoad.notified'] = true
|
75
77
|
log "Hoptoad Success: #{response.class}"
|
76
78
|
else
|
data/spec/rack/lilypad_spec.rb
CHANGED
@@ -15,7 +15,7 @@ describe Rack::Lilypad do
|
|
15
15
|
@http = mock(:http)
|
16
16
|
@http.stub!(:read_timeout=)
|
17
17
|
@http.stub!(:open_timeout=)
|
18
|
-
@http.stub!(:post).and_return Net::
|
18
|
+
@http.stub!(:post).and_return Net::HTTPOK.new(nil, nil, nil)
|
19
19
|
Net::HTTP.stub!(:start).and_yield(@http)
|
20
20
|
end
|
21
21
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lilypad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-02 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|