You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2011/09/13 17:55:29 UTC

svn commit: r1170217 - /incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb

Author: mfojtik
Date: Tue Sep 13 15:55:29 2011
New Revision: 1170217

URL: http://svn.apache.org/viewvc?rev=1170217&view=rev
Log:
Fixed RegEx that wasn't recognize correctly the ipv4

Signed-off-by: Francesco Vollero <fv...@redhat.com>

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb?rev=1170217&r1=1170216&r2=1170217&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/helpers/application_helper.rb Tue Sep 13 15:55:29 2011
@@ -258,7 +258,7 @@ module ApplicationHelper
   def address_type(address)
     case address
       when /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/; :ipv4
-      when /^.*:([\-\d]+)$/; :vnc
+      when /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:[\-\d]+)$/; :vnc
       when /^(\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2}:\S{1,2})?$/; :mac
       else :hostname
     end