alexreisner/geocoder — pull request #746 by rob-murray (2014-11-09 14:02:05+00:00)
Title: Geocoder fallback

Hi alex,
I've had another go at implementing fallback options, as discussed in #661 and I have gone with your api - so you can configure fallbacks like this;

```ruby
:lookup => [
{
:name => :yandex,
:skip => ->(query) { !query.match(/russia/i) },
:failure => ->(results, exception) { exception.class == Geocoder::OverQueryLimitError }
},
{
:name => :google,
:skip => nil,
:failure => nil
}
]
```

If the fallback options arent specified, ie the `:lookup` is just the symbol then it works as before.

I am pretty much done, however I have only been testing locally and not in the real world whereas the changes I had in #661 have been used in real applications.

Anyway, welcome your thoughts so far.