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
12
13
14
|
# File 'lib/site-inspector/checks/https.rb', line 12
def bad_chain?
scheme? && response && response.return_code == :ssl_cacert
end
|
#bad_name? ⇒ Boolean
16
17
18
|
# File 'lib/site-inspector/checks/https.rb', line 16
def bad_name?
scheme? && response && response.return_code == :peer_failed_verification
end
|
#inspect ⇒ Object
20
21
22
|
# File 'lib/site-inspector/checks/https.rb', line 20
def inspect
"#<SiteInspector::Endpoint::Https valid=#{valid?}>"
end
|
#scheme? ⇒ Boolean
4
5
6
|
# File 'lib/site-inspector/checks/https.rb', line 4
def scheme?
scheme == 'https'
end
|
#to_h ⇒ Object
24
25
26
27
28
29
|
# File 'lib/site-inspector/checks/https.rb', line 24
def to_h
{
valid: valid?,
return_code: response.return_code
}
end
|
#valid? ⇒ Boolean
8
9
10
|
# File 'lib/site-inspector/checks/https.rb', line 8
def valid?
scheme? && response && response.return_code == :ok
end
|