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 CHANGED
@@ -13,5 +13,5 @@ GEM_SPEC = Gem::Specification.new do |s|
13
13
  s.name = GEM_NAME
14
14
  s.platform = Gem::Platform::RUBY
15
15
  s.require_path = "lib"
16
- s.version = "0.1.8"
16
+ s.version = "0.1.9"
17
17
  end
data/lib/rack/lilypad.rb CHANGED
@@ -53,7 +53,8 @@ module Rack
53
53
  end
54
54
 
55
55
  def log(*msg)
56
- ::File.open(@log, 'a') { |f| f.write(msg.compact.join("\n\n")) } if @log
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
- if response == Net::HTTPSuccess
74
+ case response
75
+ when Net::HTTPSuccess
74
76
  env['hoptoad.notified'] = true
75
77
  log "Hoptoad Success: #{response.class}"
76
78
  else
@@ -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::HTTPSuccess
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.8
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-01 00:00:00 -08:00
12
+ date: 2009-12-02 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15