-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from loftwah/dl/geocoder-offline-fix
restore old way
- Loading branch information
Showing
6 changed files
with
56 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Geocoder.configure( | ||
# Geocoding options | ||
timeout: 5, # geocoding service timeout (secs) | ||
lookup: :google, # name of geocoding service (symbol) | ||
ip_lookup: :ipinfo_io, # name of IP address geocoding service (you can choose a service) | ||
language: :en, # ISO-639 language code | ||
|
||
# Use HTTPS for lookup requests | ||
use_https: true, | ||
|
||
# API key for geocoding service | ||
api_key: ENV['GEOCODER_API_KEY'], # Geocoder API key from environment variable | ||
|
||
# Caching | ||
cache: Redis.new, # cache object (e.g. Redis.new) | ||
cache_prefix: "geocoder:", # prefix for cache keys | ||
|
||
# Exceptions that should not be rescued by default | ||
# (if you want to handle them yourself) | ||
always_raise: [ | ||
Geocoder::OverQueryLimitError, | ||
Geocoder::RequestDenied, | ||
Geocoder::InvalidRequest, | ||
Geocoder::InvalidApiKey | ||
], | ||
|
||
# Calculation options | ||
units: :km, # :km for kilometers or :mi for miles | ||
distances: :linear # :spherical or :linear | ||
) |
This file was deleted.
Oops, something went wrong.