Substitue whitespace in name

This commit is contained in:
Dennis Günnewig 2015-07-21 10:28:11 +02:00 committed by Thomas Reynolds
parent c69099c451
commit 63e9cd9b5f

View file

@ -3,7 +3,7 @@ module Middleman
class ServerHostname class ServerHostname
class ServerFullHostname < SimpleDelegator class ServerFullHostname < SimpleDelegator
def to_s def to_s
__getobj__ __getobj__.gsub(/\s/, '+')
end end
def self.match?(*) def self.match?(*)
@ -15,7 +15,7 @@ module Middleman
class ServerPlainHostname < SimpleDelegator class ServerPlainHostname < SimpleDelegator
def to_s def to_s
__getobj__ + '.local' __getobj__.gsub(/\s/, '+') + '.local'
end end
def self.match?(name) def self.match?(name)