# File lib/rudy/utils.rb, line 17 17: def external_ip_address 18: ip = nil 19: begin 20: %w{solutious.heroku.com/ip}.each do |sponge| 21: ipstr = Net::HTTP.get(URI.parse("http://#{sponge}")) || '' 22: ip = /([0-9]{1,3}\.){3}[0-9]{1,3}/.match(ipstr).to_s 23: break if ip && !ip.empty? 24: end 25: rescue SocketError, Errno::ETIMEDOUT => ex 26: Rudy::Huxtable.le "Connection Error. Check your internets!" 27: end 28: ip 29: end