Class: Aquatone::Detectors::Surveygizmo

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

Constant Summary collapse

CNAME_VALUES =
%w(privatedomain.sgizmo.com privatedomain.surveygizmo.eu privatedomain.sgizmoca.com).freeze
RESPONSE_FINGERPRINT =
'data-html-name="Header Logo Link"'.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
19
20
21
22
# File 'lib/aquatone/detectors/surveygizmo.rb', line 14

def run
  return false unless cname_resource?
  CNAME_VALUES.each do |cname_value|
    if resource_value == cname_value
      return get_request("http://#{host}/").body.include?(RESPONSE_FINGERPRINT)
    end
  end
  false
end