Skip to content
Snippets Groups Projects
Commit 31f9afba authored by Alex Reisner's avatar Alex Reisner
Browse files

Prepare for release of gem version 1.1.2.

parent 3e0beeec
No related branches found
Tags 1.1.2
No related merge requests found
......@@ -2,6 +2,17 @@
Per-release changes to Geocoder.
== 1.1.2 (2012 May 24)
* Add ability to specify default units and distance calculation method (thanks github.com/abravalheri).
* Add new (optional) configuration syntax (thanks github.com/abravalheri).
* Add support for cache stores that provide :get and :set methods.
* Add support for custom HTTP request headers (thanks github.com/robotmay).
* Add Result#cache_hit attribute (thanks github.com/s01ipsist).
* Fix: rake geocode:all wasn't properly loading namespaced classes.
* Fix: properly recognize IP addresses with ::ffff: prefix (thanks github.com/brian-ewell).
* Fix: avoid exception during calculations when coordinates not known (thanks github.com/flori).
== 1.1.1 (2012 Feb 16)
* Add distance_from_sql class method to geocoded class (thanks github.com/dwilkie).
......
......@@ -198,7 +198,7 @@ If your model has +street+, +city+, +state+, and +country+ attributes you might
For reverse geocoding you can also specify an alternate name attribute where the address will be stored, for example:
reverse_geocoded_by :latitude, :longitude, :address => :location # ActiveRecord
reverse_geocoded_by :coordinates, :address => :loc # MongoDB
reverse_geocoded_by :coordinates, :address => :loc # MongoDB
== Advanced Geocoding
......@@ -232,32 +232,30 @@ If you're familiar with the results returned by the geocoding service you're usi
== Geocoding Services
By default Geocoder uses Google's geocoding API to fetch coordinates and street addresses (FreeGeoIP is used for IP address info). However there are several other APIs supported, as well as a variety of settings. Please see the listing and comparison below for details on specific geocoding services (not all settings are supported by all services). The configuration options are:
By default Geocoder uses Google's geocoding API to fetch coordinates and street addresses (FreeGeoIP is used for IP address info). However there are several other APIs supported, as well as a variety of settings. Please see the listing and comparison below for details on specific geocoding services (not all settings are supported by all services). Some common configuration options are:
# config/initializers/geocoder.rb
Geocoder.configure do |config|
# geocoding service (see below for supported options):
Geocoder::Configuration.lookup = :yahoo
# geocoding service (see below for supported options):
config.lookup = :yahoo
# to use an API key:
Geocoder::Configuration.api_key = "..."
# to use an API key:
config.api_key = "..."
# geocoding service request timeout, in seconds (default 3):
Geocoder::Configuration.timeout = 5
# geocoding service request timeout, in seconds (default 3):
config.timeout = 5
# use HTTPS for geocoding service connections:
Geocoder::Configuration.use_https = true
# set default units to kilometers:
config.units = :km
# language to use (for search queries and reverse geocoding):
Geocoder::Configuration.language = :de
# caching (see below for details):
config.cache = Redis.new
config.cache_prefix = "..."
# use a proxy to access the service:
Geocoder::Configuration.http_proxy = "127.4.4.1"
Geocoder::Configuration.https_proxy = "127.4.4.2" # only if HTTPS is needed
end
# caching (see below for details)
Geocoder::Configuration.cache = Redis.new
Geocoder::Configuration.cache_prefix = "..."
Please see lib/geocoder/configuration.rb for a complete list of configuration options.
=== Listing and Comparison
......@@ -498,4 +496,4 @@ You cannot use the +near+ scope with another scope that provides an +includes+ o
If anyone has a more elegant solution to this problem I am very interested in seeing it.
Copyright (c) 2009-11 Alex Reisner, released under the MIT license
Copyright (c) 2009-12 Alex Reisner, released under the MIT license
module Geocoder
VERSION = "1.1.1"
VERSION = "1.1.2"
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment