Class: Aquatone::Detectors::Pingdom

Inherits:
Aquatone::Detector show all
Defined in:
lib/aquatone/detectors/pingdom.rb

Constant Summary collapse

CNAME_VALUE =
"stats.pingdom.com".freeze
RESPONSE_FINGERPRINT =
"Sorry, couldn’t find the status page".freeze

Instance Attribute Summary

Attributes inherited from Aquatone::Detector

#host, #resource

Instance Method Summary collapse

Methods inherited from Aquatone::Detector

descendants, #initialize, meta, meta=, #positive?, sluggified_name

Constructor Details

This class inherits a constructor from Aquatone::Detector

Instance Method Details

#runObject



14
15
16
17
18
# File 'lib/aquatone/detectors/pingdom.rb', line 14

def run
  return false unless cname_resource?
  return false unless resource_value == CNAME_VALUE
  get_request("http://#{host}/").body.include?(RESPONSE_FINGERPRINT)
end