Class: SiteInspector::Endpoint::Https
- Inherits:
-
Check
- Object
- Check
- SiteInspector::Endpoint::Https
show all
- Defined in:
- lib/site-inspector/checks/https.rb
Instance Attribute Summary
Attributes inherited from Check
#endpoint
Instance Method Summary
collapse
Methods inherited from Check
enabled=, enabled?, #host, #initialize, #name, name, #request, #response
Instance Method Details
#bad_chain? ⇒ Boolean
14
15
16
|
# File 'lib/site-inspector/checks/https.rb', line 14
def bad_chain?
scheme? && response && response.return_code == :ssl_cacert
end
|
#bad_name? ⇒ Boolean
18
19
20
|
# File 'lib/site-inspector/checks/https.rb', line 18
def bad_name?
scheme? && response && response.return_code == :peer_failed_verification
end
|
#inspect ⇒ Object
22
23
24
|
# File 'lib/site-inspector/checks/https.rb', line 22
def inspect
"#<SiteInspector::Endpoint::Https valid=#{valid?}>"
end
|
#scheme? ⇒ Boolean
6
7
8
|
# File 'lib/site-inspector/checks/https.rb', line 6
def scheme?
scheme == 'https'
end
|
#to_h ⇒ Object
26
27
28
29
30
31
|
# File 'lib/site-inspector/checks/https.rb', line 26
def to_h
{
valid: valid?,
return_code: response.return_code
}
end
|
#valid? ⇒ Boolean
10
11
12
|
# File 'lib/site-inspector/checks/https.rb', line 10
def valid?
scheme? && response && response.return_code == :ok
end
|