Brazilian Rails é um conjunto de gems para serem usadas com Ruby e com o Ruby on Rails e tem como objetivo unir alguns recursos úteis para os desenvolvedores brasileiros.
Já tinha feito e testado esse código e estava 100% hoje rodei os testes da aplicação que dependiam disso e quebraram, fui ver no console as chamadas tão dando time-out.
Testei no meu 3G e outros CEP's... não adiantou.
BuscaEndereco.por_cep(70344080)
Errno::ETIMEDOUT: Operation timed out - connect(2)
from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in initialize' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:inopen'
from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in block in connect' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:44:intimeout'
from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:89:in timeout' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:inconnect'
from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:637:in do_start' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:626:instart'
from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:393:in get_response' from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/brcep-3.1.0/lib/brcep/busca_endereco.rb:58:inpor_cep'
from (irb):2
from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands/console.rb:47:in start' from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands/console.rb:8:instart'
from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands.rb:41:in <top (required)>' from script/rails:6:inrequire'
from script/rails:6:in `'
Caros,
Já tinha feito e testado esse código e estava 100% hoje rodei os testes da aplicação que dependiam disso e quebraram, fui ver no console as chamadas tão dando time-out. Testei no meu 3G e outros CEP's... não adiantou.
BuscaEndereco.por_cep(70344080) Errno::ETIMEDOUT: Operation timed out - connect(2) from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in'
initialize' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in
open' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:inblock in connect' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:44:in
timeout' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/timeout.rb:89:intimeout' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:644:in
connect' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:637:indo_start' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:626:in
start' from /Users/iangallina/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/net/http.rb:393:inget_response' from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/brcep-3.1.0/lib/brcep/busca_endereco.rb:58:in
por_cep' from (irb):2 from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands/console.rb:47:instart' from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands/console.rb:8:in
start' from /Users/iangallina/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.2.3/lib/rails/commands.rb:41:in<top (required)>' from script/rails:6:in
require' from script/rails:6:in `