Per-release changes to Geocoder. Note that only major changes are summarized here. Please see the Git log for all changes.
- Require API key for MapQuest (thanks github.com/robdiciuccio).
- Add support for Data Science Toolkit lookup (thanks github.com/ejhayes).
- Fix: #nearbys method with Mongoid (thanks github.com/pascalbetz).
- Fix: bug in FreeGeoIp lookup that was preventing exception from being raised when configured cache was unavailable.
- Fix bug in ESRI lookup that caused an exception on load in environments without rack/utils.
- Add support for Ovi/Nokia API (thanks github.com/datenimperator).
- Add support for ESRI API (thanks github.com/rpepato).
- Add ability to omit distance and bearing from SQL select clause (thanks github.com/nicolasdespres).
- Add support for caches that use read/write methods (thanks github.com/eskil).
- Add support for nautical miles (thanks github.com/vanboom).
- Fix: bug in parsing of MaxMind responses.
- Fix: bugs in query regular expressions (thanks github.com/boone).
- Fix: various bugs in MaxMind implementation.
- Fix: don't require a key for MapQuest.
- Fix: bug in handling of HTTP_X_FORWARDED_FOR header (thanks github.com/robdimarco).
- Major changes to configuration syntax which allow for API-specific config options. Old config syntax is now DEPRECATED.
- Add support for MaxMind API (thanks github.com/gonzoyumo).
- Add optional Geocoder::InvalidApiKey exception for bad API credentials (Yahoo, Yandex, Bing, and Maxmind). Warn when bad key and exception not set in Geocoder.configure(:always_raise => [...]).
- Add support for X-Real-IP and X-Forwarded-For headers (thanks github.com/konsti).
- Add support for custom Nominatim host config: Geocoder.configure(:nominatim => {:host => "..."}).
- Raise exception when required API key is missing or incorrect format.
- Add support for Google's :region and :components parameters (thanks to github.com/tomlion).
- Fix: string escaping bug in OAuth lib (thanks github.com/m0thman).
- Fix: configured units were not always respected in SQL queries.
- Fix: in #nearbys, don't try to exclude self if not yet persisted.
- Fix: bug with cache stores that provided #delete but not #del.
- Change #nearbys so that it returns nil instead of [] when object is not geocoded.
- Replace support for old Yahoo Placefinder with Yahoo BOSS (thanks github.com/pwoltman).
- Add support for actual Mapquest API (was previously just a proxy for Nominatim), including the paid service (thanks github.com/jedschneider).
- Add support for :select => :id_only option to near scope.
- Treat a given query as blank (don't do a lookup) if coordinates are given but latitude or longitude is nil.
- Speed up 'near' queries by adding bounding box condition (thanks github.com/mlandauer).
- Fix: don't redefine Object#hash in Yahoo result object (thanks github.com/m0thman).
- Deprecate Geocoder::Result::Nominatim#class and #type methods. Use #place_class and #place_type instead.
- Add support for setting arbitrary parameters in geocoding request URL.
- Add support for Google's :bounds parameter (thanks to github.com/rosscooperman and github.com/peterjm for submitting suggestions).
- Add support for :select => :geo_only option to near scope (thanks github.com/gugl).
- Add ability to omit ORDER BY clause from .near scope (pass option :order => false).
- Fix: error on Yahoo lookup due to API change (thanks github.com/kynesun).
- Fix: problem with Mongoid field aliases not being respected.
- Fix: :exclude option to .near scope when primary key != :id (thanks github.com/smisml).
- Much code refactoring (added Geocoder::Query class and Geocoder::Sql module).
- Add support for Mapquest geocoding service (thanks github.com/razorinc).
- Add :test lookup for easy testing of apps using Geocoder (thanks github.com/mguterl).
- Add #precision method to Yandex results (thanks github.com/gemaker).
- Add support for raising :all exceptions (thanks github.com/andyvb).
- Add exceptions for certain Google geocoder responses (thanks github.com/andyvb).
- Add Travis-CI integration (thanks github.com/petergoldstein).
- Fix: unit config was not working with SQLite (thanks github.com/balvig).
- Fix: get tests to pass under Jruby (thanks github.com/petergoldstein).
- Fix: bug in distance_from_sql method (error occurred when coordinates not found).
- Fix: incompatibility with Mongoid 3.0.x (thanks github.com/petergoldstein).
- 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).
- Add distance_from_sql class method to geocoded class (thanks github.com/dwilkie).
- Add OverQueryLimitError and raise when relevant for Google lookup.
- Fix: don't cache API data if response indicates an error.
- Fix: within_bounding_box now uses correct lat/lon DB columns (thanks github.com/kongo).
- Fix: error accessing city in some cases with Yandex result (thanks github.com/kor6n and sld).
- A block passed to geocoded_by is now always executed, even if the geocoding service returns no results. This means you need to make sure you have results before trying to assign data to your object.
- Fix issues with joins and row counts (issues #49, 86, and 108) by not using GROUP BY clause with ActiveRecord scopes.
- Fix incorrect object ID when join used (fixes issue #140).
- Fix calculation of bounding box which spans 180th meridian (thanks github.com/hwuethrich).
- Add within_bounding_box scope for ActiveRecord-based models (thanks github.com/gavinhughes and dbloete).
- Add option to raise Geocoder::OverQueryLimitError for Google geocoding service.
- Add support for Nominatim geocoding service (thanks github.com/wranglerdriver).
- Add support for API key to Geocoder.ca geocoding service (thanks github.com/ryanLonac).
- Add support for state to Yandex results (thanks github.com/tipugin).
- Fix error with
rake assets:precompile
(thanks github.com/Sush). - Fix HTTPS support (thanks github.com/rsanheim).
- Improve cache interface.
- Remove klass method from rake task, which could conflict with app methods (thanks github.com/mguterl).
- Add support for Google Premier geocoding service (thanks github.com/steveh).
- Update Google API URL (thanks github.com/soorajb).
- Allow rescue from timeout with FreeGeoIP (thanks github.com/lukeledet).
- Fix: rake assets:precompile (Rails 3.1) not working in some situations.
- Fix: stop double-adjusting units when using kilometers (thanks github.com/hairyheron).
- Add support for MongoMapper (thanks github.com/spagalloco).
- Fix: user-specified coordinates field wasn't working with Mongoid (thanks github.com/thisduck).
- Fix: invalid location given to near scope was returning all results (Active Record) or error (Mongoid) (thanks github.com/ogennadi).
- Add option to not rescue from certain exceptions (thanks github.com/ahmedrb).
- Fix STI child/parent geocoding bug (thanks github.com/ogennadi).
- Other bugfixes.
- Add command line interface.
- Add support for local proxy (thanks github.com/Olivier).
- Add support for Yandex.ru geocoding service.
- Add support for Bing geocoding service (thanks github.com/astevens).
- Fix single table inheritance bug (reported by github.com/enrico).
- Fix bug when Google result supplies no city (thanks github.com/jkeen).
- Fix "can't find special index: 2d" error when using Mongoid with Ruby 1.8.
- Add support for Mongoid.
- Add bearing_to/from methods to geocoded objects.
- Improve SQLite's distance calculation heuristic.
- Fix: Geocoder::Calculations.geographic_center was modifying its argument in-place (reported by github.com/joelmats).
- Fix: sort 'near' query results by distance when using SQLite.
- Clean up input: search for coordinates as a string with space after comma yields zero results from Google. Now we get rid of any such space before sending the query.
- DEPRECATION: Geocoder.near should not take :limit or :offset options.
- DEPRECATION: Change argument format of all methods that take lat/lon as separate arguments. Now you must pass the coordinates as an array [lat,lon], but you may alternatively pass a address string (will look up coordinates) or a geocoded object (or any object that implements a to_coordinates method which returns a [lat,lon] array).
- Add support for result caching.
- Add support for Geocoder.ca geocoding service.
- Add +bearing+ attribute to objects returned by geo-aware queries (thanks github.com/matellis).
- Add config setting: language.
- Add config settings: +use_https+, +google_api_key+ (thanks github.com/svesely).
- DEPRECATION: Geocoder.search now returns an array instead of a single result.
- DEPRECATION: obj.nearbys second argument is now an options hash (instead of units). Please change obj.nearbys(20, :km) to: obj.nearbys(20, :units => :km).
- Fix broken scopes (github.com/mikepinde).
- Fix broken Ruby 1.9 and JRuby compatibility (don't require json gem).
- Add support for IP address geocoding via FreeGeoIp.net.
- Add support for Yahoo PlaceFinder geocoding API.
- Add support for custom geocoder data handling by passing a block to geocoded_by or reverse_geocoded_by.
- Add Rack::Request#location method for geocoding user's IP address.
- Change gem name to geocoder (no more rails-geocoder).
- Gem now works outside of Rails.
- DEPRECATION: +fetch_coordinates+ no longer takes an argument.
- DEPRECATION: +fetch_address+ no longer takes an argument.
- DEPRECATION: Geocoder.search now returns a single result instead of an array.
- DEPRECATION: fetch_coordinates! has been superceded by +geocode+ (then save your object manually).
- DEPRECATION: fetch_address! has been superceded by +reverse_geocode+ (then save your object manually).
- Fix: don't die when trying to get coordinates with a nil address (github.com/zmack).
- Include geocode:all Rake task in gem (was missing!).
- Add Geocoder.search for access to Google's full response.
- Add ability to configure Google connection timeout.
- Emit warnings on Google connection problems and errors.
- Refactor: insert Geocoder into ActiveRecord via Railtie.
- Add reverse geocoding (+reverse_geocoded_by+).
- Prevent exception (uninitialized constant Geocoder::Net) when net/http not already required (github.com/sleepycat).
- Refactor: split monolithic Geocoder module into several smaller ones.
- Fix incompatibility with will_paginate gem.
- Include table names in GROUP BY clause of nearby scope to avoid ambiguity in joins (github.com/matchu).
- Fix broken PostgreSQL compatibility (now 100% compatible).
- Switch from Google's XML to JSON geocoding API.
- Separate Rails 2 and Rails 3-compatible branches.
- Don't allow :conditions hash in 'options' argument to 'nearbys' method (was deprecated in 0.9.3).
- Google Maps API key no longer required (uses geocoder v3).
- Fix incompatibility with Rails 3 RC 1.
- Deprecate 'options' argument to 'nearbys' method.
- Allow inclusion of 'nearbys' in Arel method chains.
- Fix LIMIT clause bug in PostgreSQL (reported by github.com/kenzie).
- Use scope instead of named_scope in Rails 3.
- Fix bug in PostgreSQL support (caused "PGError: ERROR: column "distance" does not exist"), reported by github.com/developish.
- Add Rails 3 compatibility.
- Avoid querying Google when query would be an empty string.
- Automatically select a less accurate but compatible distance algorithm when SQLite database detected (fixes SQLite incompatibility).
- Added Geocoder.geographic_center method.
- Replaced _get_coordinates class method with read_coordinates instance method.
- The fetch_coordinates method now assigns coordinates to attributes (behaves like fetch_coordinates! used to) and fetch_coordinates! both assigns and saves the attributes.
- Added geocode:all rake task.
- Avoid calling deprecated method from within Geocoder itself.
- Deprecate find_near class method in favor of +near+ named scope.
- Update Google URL query string parameter to reflect recent changes in Google's API.
- Allow a model's geocoder search string method to be something other than an ActiveRecord attribute.
- Clean up documentation.
- Extract XML-fetching code from Geocoder.search and place in Geocoder._fetch_xml (for ease of mocking).
- Add tests for coordinate-fetching instance methods.
First release.