Class: Middleman::PreviewServer::Checks::RequiresBindAddressIfServerNameIsGiven
- Inherits:
-
BasicCheck
- Object
- BasicCheck
- Middleman::PreviewServer::Checks::RequiresBindAddressIfServerNameIsGiven
- Defined in:
- middleman-core/lib/middleman-core/preview_server/checks.rb
Overview
This one requires a bind address if the user entered a server name
If the bind_address
is blank this check will fail
Instance Method Summary collapse
Instance Method Details
#validate(information) ⇒ Object
70 71 72 73 74 75 76 77 78 |
# File 'middleman-core/lib/middleman-core/preview_server/checks.rb', line 70 def validate(information) return unless information.bind_address.blank? information.valid = false information.reason = format( 'Server name "%<name>s" does not resolve to an ip address', name: information.server_name ) end |