lilypad 0.1.3 → 0.1.4

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.3"
16
+ s.version = "0.1.4"
17
17
  end
data/lib/rack/lilypad.rb CHANGED
@@ -68,11 +68,11 @@ module Rack
68
68
  http.open_timeout = 2 # seconds
69
69
  response = begin
70
70
  http.post uri.path, xml(exception, env), headers
71
- env['hoptoad.notified'] = true
72
71
  rescue TimeoutError => e
73
72
  end
74
73
  case response
75
74
  when Net::HTTPSuccess then
75
+ env['hoptoad.notified'] = true
76
76
  log "Hoptoad Success: #{response.class}"
77
77
  else
78
78
  log "Hoptoad Failure: #{response.class}\n\n#{response.body if response.respond_to? :body}\n\n#{@@last_response}"
@@ -59,4 +59,10 @@ describe Rack::Lilypad do
59
59
  end
60
60
  errors.length.should == 0
61
61
  end
62
+
63
+ it "should not do anything if non-production environment" do
64
+ ENV['RACK_ENV'] = 'development'
65
+ @http.should_not_receive(:post)
66
+ get "/raise" rescue nil
67
+ end
62
68
  end
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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winton Welsh