apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

trying to understand what makes an address invalid #330

Closed tansaku closed 10 years ago

tansaku commented 11 years ago

We have gmap4rails working in our project - many thanks for providing it. However we occasionally have "invalid address" errors in our tests:

https://github.com/tansaku/LocalSupport/issues/7

We're trying to better understand what makes an address invalid vs valid. We've had a bit of a look through the codebase and are still not sure.

Is there some geocoding step that checks for address validity?

apneadiving commented 11 years ago

It happens here: https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/lib/gmaps4rails/model_handler.rb#L67

And I suspect network issues or overquota.

BTW, it's a bad idea to have your specs depend on external web requests. I suggest ou implement a stubbed geocoding as I do in my own specs: https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/spec/support/geocoding.rb#L28

tansaku commented 11 years ago

thanks! yes we were just talking about the need for stubbing if there was active geocoding going on :-)

apneadiving commented 11 years ago

i guess you can close the issue then?