Skip to content

Commit

Permalink
Fix single check lookup
Browse files Browse the repository at this point in the history
* didn't check for the 'check' result, only 'checks'
  • Loading branch information
mtodd committed Mar 1, 2011
1 parent 44100ed commit 110a049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pingdom/check.rb
Expand Up @@ -3,7 +3,8 @@ module Pingdom
# {"name"=>"Autocomplete", "id"=>259103, "type"=>"http", "lastresponsetime"=>203173, "status"=>"up", "lasttesttime"=>1298102416} # {"name"=>"Autocomplete", "id"=>259103, "type"=>"http", "lastresponsetime"=>203173, "status"=>"up", "lasttesttime"=>1298102416}
class Check < Base class Check < Base
def self.parse(client, response) 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) new(client, response, check)
end end
end end
Expand Down

0 comments on commit 110a049

Please sign in to comment.