From 68e428ef64958b90274b3f6169413030631ce0ba Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 14 Nov 2012 22:49:54 +0000 Subject: Format the inside message more neatly --- lib/custodian/alerter.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/custodian') diff --git a/lib/custodian/alerter.rb b/lib/custodian/alerter.rb index ec6168d..69de28e 100644 --- a/lib/custodian/alerter.rb +++ b/lib/custodian/alerter.rb @@ -51,13 +51,17 @@ class Alerter return "" unless ( !resolved.nil? ) + if ( host =~ /^http/ ) + host = "#{host}" + end + # # Test trange # if ( BYTEMARK_RANGES.any?{|range| range.include?(IPAddr.new(resolved.to_s))} ) - return "

#{host} resolves to #{resolved} which is inside the Bytemark network.

" + return "

#{host} resolves to #{resolved} which is inside the Bytemark network.

" else - return "

#{host} resolves to #{resolved} which is not inside the Bytemark network.

" + return "

#{host} resolves to #{resolved} which is not inside the Bytemark network.

" end end -- cgit v1.2.1