Class: Aquatone::Detectors::Uservoice
- Inherits:
-
Aquatone::Detector
- Object
- Aquatone::Detector
- Aquatone::Detectors::Uservoice
- Defined in:
- lib/aquatone/detectors/uservoice.rb
Constant Summary collapse
- CNAME_VALUE =
".uservoice.com".freeze
- RESPONSE_FINGERPRINTS =
[ "The page you have requested does not exist.", "This UserVoice subdomain is currently available!" ].freeze
Instance Attribute Summary
Attributes inherited from Aquatone::Detector
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
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/aquatone/detectors/uservoice.rb', line 17 def run return false unless cname_resource? if resource_value.end_with?(CNAME_VALUE) response = get_request("http://#{host}/") RESPONSE_FINGERPRINTS.each do |fingerprint| return true if response.body.include?(fingerprint) end end false end |