lib/rudy/utils.rb in rudy-0.8.4 vs lib/rudy/utils.rb in rudy-0.8.5

- old
+ new

@@ -15,10 +15,10 @@ # Return the external IP address (the one seen by the internet) def external_ip_address ip = nil begin - %w{solutious.com/ip/ myip.dk/ whatismyip.com }.each do |sponge| # w/ backup + %w{solutious.heroku.com/ip}.each do |sponge| ipstr = Net::HTTP.get(URI.parse("http://#{sponge}")) || '' ip = /([0-9]{1,3}\.){3}[0-9]{1,3}/.match(ipstr).to_s break if ip && !ip.empty? end rescue SocketError, Errno::ETIMEDOUT => ex \ No newline at end of file