README.md in geocoder-1.2.6 vs README.md in geocoder-1.2.7
- old
+ new
@@ -5,11 +5,11 @@
Compatibility
-------------
-* Supports multiple Ruby versions: Ruby 1.9.2, 1.9.3, 2.0.0, 2.1.0, JRuby and Rubinius.
+* Supports multiple Ruby versions: Ruby 1.9.3, 2.0.x, 2.1.x, JRuby, and Rubinius.
* Supports multiple databases: MySQL, PostgreSQL, SQLite, and MongoDB (1.7.0 and higher).
* Supports Rails 3 and 4. If you need to use it with Rails 2 please see the `rails2` branch (no longer maintained, limited feature set).
* Works very well outside of Rails, you just need to install either the `json` (for MRI) or `json_pure` (for JRuby) gem.
@@ -26,11 +26,11 @@
gem install geocoder
Or, if you're using Rails/Bundler, add this to your Gemfile:
- gem "geocoder"
+ gem 'geocoder'
and run at the command prompt:
bundle install
@@ -137,12 +137,12 @@
-------------------------------
To find objects by location, use the following scopes:
Venue.near('Omaha, NE, US', 20) # venues within 20 miles of Omaha
- Venue.near([40.71, 100.23], 20) # venues within 20 miles of a point
- Venue.near([40.71, 100.23], 20, :units => :km)
+ Venue.near([40.71, -100.23], 20) # venues within 20 miles of a point
+ Venue.near([40.71, -100.23], 20, :units => :km)
# venues within 20 kilometres of a point
Venue.geocoded # venues with coordinates
Venue.not_geocoded # venues without coordinates
With geocoded objects you can do things like this:
@@ -688,11 +688,11 @@
Geocoder.configure(ip_lookup: :maxmind_local, maxmind_local: {package: :city})
You can generate ActiveRecord migrations and download and import data via provided rake tasks:
# generate migration to create tables
- rails generate geocoder:maxmind:geolite PACKAGE=city
+ rails generate geocoder:maxmind:geolite_city
# download, unpack, and import data
rake geocoder:maxmind:geolite:load PACKAGE=city
You can replace `city` with `country` in any of the above tasks, generators, and configurations.
@@ -731,11 +731,11 @@
)
You must add either the *[hive_geoip2](https://rubygems.org/gems/hive_geoip2)* gem (native extension that relies on libmaxminddb) or the *[maxminddb](http://rubygems.org/gems/maxminddb)* gem (pure Ruby implementation) to your Gemfile or have it installed in your system. The pure Ruby gem (maxminddb) will be used by default. To use `hive_geoip2`:
Geocoder.configure(
- ip_lookup: :geoip2,
+ ip_lookup: :geoip2,
geoip2: {
lib: 'hive_geoip2',
file: File.join('folder', 'GeoLite2-City.mmdb')
}
)
@@ -1032,14 +1032,15 @@
Reporting Issues
----------------
When reporting an issue, please list the version of Geocoder you are using and any relevant information about your application (Rails version, database type and version, etc). Also avoid vague language like "it doesn't work." Please describe as specifically as you can what behavior your are actually seeing (eg: an error message? a nil return value?).
+Please DO NOT use GitHub issues to ask questions about how to use Geocoder. Sites like StackOverflow are a better forum for such discussions.
-Known Issue
------------
+### Known Issue
+
You cannot use the `near` scope with another scope that provides an `includes` option because the `SELECT` clause generated by `near` will overwrite it (or vice versa).
Instead of using `includes` to reduce the number of database queries, try using `joins` with either the `:select` option or a call to `preload`. For example:
# Pass a :select option to the near scope to get the columns you want.
@@ -1062,10 +1063,9 @@
* Each pull request should implement ONE feature or bugfix. If you want to add or fix more than one thing, submit more than one pull request.
* Do not commit changes to files that are irrelevant to your feature or bugfix (eg: `.gitignore`).
* Do not add dependencies on other gems.
* Do not add unnecessary `require` statements which could cause LoadErrors on certain systems.
* Remember: Geocoder needs to run outside of Rails. Don't assume things like ActiveSupport are available.
-* Do not add to base configuration options; instead document required lookup-specific options in the README.
* Be willing to accept criticism and work on improving your code; Geocoder is used by thousands of developers and care must be taken not to introduce bugs.
* Be aware that the pull request review process is not immediate, and is generally proportional to the size of the pull request.
Copyright (c) 2009-12 Alex Reisner, released under the MIT license