Permalink
Browse files

Fix single check lookup

* didn't check for the 'check' result, only 'checks'
  • Loading branch information...
1 parent 44100ed commit 110a04911a0509d4c18750b4e3a736f6d4f87bac @mtodd committed Mar 1, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/pingdom/check.rb
View
@@ -3,7 +3,8 @@ module Pingdom
# {"name"=>"Autocomplete", "id"=>259103, "type"=>"http", "lastresponsetime"=>203173, "status"=>"up", "lasttesttime"=>1298102416}
class Check < Base
def self.parse(client, response)
- super[:checks].map do |check|
+ checks = super
+ Array.wrap(checks[:checks] || checks[:check]).map do |check|
new(client, response, check)
end
end

0 comments on commit 110a049

Please sign in to comment.