Class: Aquatone::Detectors::Cargo
- Inherits:
-
Aquatone::Detector
- Object
- Aquatone::Detector
- Aquatone::Detectors::Cargo
- Defined in:
- lib/aquatone/detectors/cargo.rb
Constant Summary collapse
- APEX_VALUE =
"173.203.204.123".freeze
- CNAME_VALUE =
"cargocollective.com".freeze
- RESPONSE_FINGERPRINT =
"Use a personal domain name".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
15 16 17 18 19 20 21 22 |
# File 'lib/aquatone/detectors/cargo.rb', line 15 def run if apex_resource? return false unless resource_value == APEX_VALUE elsif cname_resource? return false unless resource_value == CNAME_VALUE end get_request("http://#{host}/").body.include?(RESPONSE_FINGERPRINT) end |