Class: Aquatone::Detectors::Feedpress

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

Constant Summary collapse

CNAME_VALUE =
"redirect.feedpress.me".freeze
RESPONSE_FINGERPRINT =
"The feed has not been found.".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
# File 'lib/aquatone/detectors/feedpress.rb', line 14

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