From: John Dong Date: Thu, 16 Aug 2007 20:33:40 +0000 (-0400) Subject: Add ability to parse RIPE WHOIS too X-Git-Url: https://projects.mako.cc/source/selectricity/commitdiff_plain/05b5b421b24810c17b05c7aaca08a93c4ececad5 Add ability to parse RIPE WHOIS too --- diff --git a/app/views/quickvote/results.rhtml b/app/views/quickvote/results.rhtml index a2b1206..b82d5e3 100644 --- a/app/views/quickvote/results.rhtml +++ b/app/views/quickvote/results.rhtml @@ -160,8 +160,9 @@ by several other names.

<% w= Whois::Whois.new(IPAddr.new(voter.ipaddress).to_s,true)%> <%=(w.host == nil or w.host.empty?) ? "Unknown voter" : w.host%> - - <%= w.search_whois.grep(/^OrgName/)[0].sub(/^OrgName\:/,'').strip %> + + <%w.search_whois%> + <%= (w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip -%> - <%= (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> <% rescue ArgumentError => err %> <%= err %>