geocoder 1.1.9 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of geocoder might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +157 -0
- data/README.md +467 -70
- data/examples/reverse_geocode_job.rb +40 -0
- data/lib/generators/geocoder/config/templates/initializer.rb +16 -16
- data/lib/generators/geocoder/maxmind/geolite_city_generator.rb +28 -0
- data/lib/generators/geocoder/maxmind/geolite_country_generator.rb +28 -0
- data/lib/generators/geocoder/maxmind/templates/migration/geolite_city.rb +30 -0
- data/lib/generators/geocoder/maxmind/templates/migration/geolite_country.rb +17 -0
- data/lib/geocoder/cache.rb +3 -2
- data/lib/geocoder/calculations.rb +44 -2
- data/lib/geocoder/configuration.rb +17 -10
- data/lib/geocoder/esri_token.rb +38 -0
- data/lib/geocoder/exceptions.rb +19 -0
- data/lib/geocoder/ip_address.rb +13 -0
- data/lib/geocoder/kernel_logger.rb +25 -0
- data/lib/geocoder/logger.rb +47 -0
- data/lib/geocoder/lookup.rb +32 -8
- data/lib/geocoder/lookups/baidu.rb +18 -13
- data/lib/geocoder/lookups/baidu_ip.rb +59 -0
- data/lib/geocoder/lookups/base.rb +81 -19
- data/lib/geocoder/lookups/bing.rb +40 -7
- data/lib/geocoder/lookups/esri.rb +42 -5
- data/lib/geocoder/lookups/freegeoip.rb +9 -1
- data/lib/geocoder/lookups/geocoder_ca.rb +1 -2
- data/lib/geocoder/lookups/geocoder_us.rb +6 -2
- data/lib/geocoder/lookups/geocodio.rb +42 -0
- data/lib/geocoder/lookups/geoip2.rb +45 -0
- data/lib/geocoder/lookups/geoportail_lu.rb +65 -0
- data/lib/geocoder/lookups/google.rb +29 -5
- data/lib/geocoder/lookups/google_places_details.rb +50 -0
- data/lib/geocoder/lookups/google_premier.rb +1 -1
- data/lib/geocoder/lookups/here.rb +62 -0
- data/lib/geocoder/lookups/ipapi_com.rb +86 -0
- data/lib/geocoder/lookups/ipinfo_io.rb +55 -0
- data/lib/geocoder/lookups/latlon.rb +59 -0
- data/lib/geocoder/lookups/mapbox.rb +53 -0
- data/lib/geocoder/lookups/mapquest.rb +6 -6
- data/lib/geocoder/lookups/mapzen.rb +15 -0
- data/lib/geocoder/lookups/maxmind.rb +4 -2
- data/lib/geocoder/lookups/maxmind_geoip2.rb +69 -0
- data/lib/geocoder/lookups/maxmind_local.rb +65 -0
- data/lib/geocoder/lookups/nominatim.rb +9 -1
- data/lib/geocoder/lookups/okf.rb +44 -0
- data/lib/geocoder/lookups/opencagedata.rb +58 -0
- data/lib/geocoder/lookups/pelias.rb +64 -0
- data/lib/geocoder/lookups/pointpin.rb +68 -0
- data/lib/geocoder/lookups/postcode_anywhere_uk.rb +51 -0
- data/lib/geocoder/lookups/smarty_streets.rb +53 -0
- data/lib/geocoder/lookups/telize.rb +55 -0
- data/lib/geocoder/lookups/yandex.rb +8 -4
- data/lib/geocoder/models/active_record.rb +7 -3
- data/lib/geocoder/models/base.rb +1 -4
- data/lib/geocoder/models/mongo_base.rb +6 -4
- data/lib/geocoder/query.rb +9 -5
- data/lib/geocoder/railtie.rb +1 -1
- data/lib/geocoder/request.rb +74 -12
- data/lib/geocoder/results/baidu_ip.rb +62 -0
- data/lib/geocoder/results/bing.rb +4 -0
- data/lib/geocoder/results/esri.rb +30 -6
- data/lib/geocoder/results/freegeoip.rb +2 -2
- data/lib/geocoder/results/geocodio.rb +70 -0
- data/lib/geocoder/results/geoip2.rb +62 -0
- data/lib/geocoder/results/geoportail_lu.rb +69 -0
- data/lib/geocoder/results/google.rb +15 -0
- data/lib/geocoder/results/google_places_details.rb +35 -0
- data/lib/geocoder/results/here.rb +71 -0
- data/lib/geocoder/results/ipapi_com.rb +45 -0
- data/lib/geocoder/results/ipinfo_io.rb +48 -0
- data/lib/geocoder/results/latlon.rb +71 -0
- data/lib/geocoder/results/mapbox.rb +47 -0
- data/lib/geocoder/results/mapquest.rb +5 -8
- data/lib/geocoder/results/mapzen.rb +5 -0
- data/lib/geocoder/results/maxmind_geoip2.rb +9 -0
- data/lib/geocoder/results/maxmind_local.rb +49 -0
- data/lib/geocoder/results/nominatim.rb +6 -1
- data/lib/geocoder/results/okf.rb +106 -0
- data/lib/geocoder/results/opencagedata.rb +90 -0
- data/lib/geocoder/results/ovi.rb +9 -0
- data/lib/geocoder/results/pelias.rb +58 -0
- data/lib/geocoder/results/pointpin.rb +40 -0
- data/lib/geocoder/results/postcode_anywhere_uk.rb +42 -0
- data/lib/geocoder/results/smarty_streets.rb +106 -0
- data/lib/geocoder/results/telize.rb +45 -0
- data/lib/geocoder/results/test.rb +20 -3
- data/lib/geocoder/results/yandex.rb +18 -6
- data/lib/geocoder/sql.rb +16 -15
- data/lib/geocoder/stores/active_record.rb +51 -18
- data/lib/geocoder/stores/base.rb +8 -12
- data/lib/geocoder/stores/mongo_base.rb +0 -31
- data/lib/geocoder/version.rb +1 -1
- data/lib/geocoder.rb +6 -13
- data/lib/maxmind_database.rb +109 -0
- data/lib/tasks/geocoder.rake +14 -3
- data/lib/tasks/maxmind.rake +73 -0
- metadata +59 -85
- data/.gitignore +0 -5
- data/.travis.yml +0 -27
- data/Rakefile +0 -25
- data/gemfiles/Gemfile.mongoid-2.4.x +0 -15
- data/lib/geocoder/lookups/yahoo.rb +0 -86
- data/lib/geocoder/results/yahoo.rb +0 -55
- data/lib/oauth_util.rb +0 -112
- data/test/active_record_test.rb +0 -15
- data/test/cache_test.rb +0 -35
- data/test/calculations_test.rb +0 -211
- data/test/configuration_test.rb +0 -78
- data/test/custom_block_test.rb +0 -32
- data/test/error_handling_test.rb +0 -43
- data/test/fixtures/baidu_invalid_key +0 -1
- data/test/fixtures/baidu_no_results +0 -1
- data/test/fixtures/baidu_reverse +0 -1
- data/test/fixtures/baidu_shanghai_pearl_tower +0 -12
- data/test/fixtures/bing_invalid_key +0 -1
- data/test/fixtures/bing_madison_square_garden +0 -40
- data/test/fixtures/bing_no_results +0 -16
- data/test/fixtures/bing_reverse +0 -42
- data/test/fixtures/esri_madison_square_garden +0 -59
- data/test/fixtures/esri_no_results +0 -8
- data/test/fixtures/esri_reverse +0 -21
- data/test/fixtures/freegeoip_74_200_247_59 +0 -12
- data/test/fixtures/freegeoip_no_results +0 -1
- data/test/fixtures/geocoder_ca_madison_square_garden +0 -1
- data/test/fixtures/geocoder_ca_no_results +0 -1
- data/test/fixtures/geocoder_ca_reverse +0 -34
- data/test/fixtures/geocoder_us_madison_square_garden +0 -1
- data/test/fixtures/geocoder_us_no_results +0 -1
- data/test/fixtures/google_garbage +0 -456
- data/test/fixtures/google_madison_square_garden +0 -57
- data/test/fixtures/google_no_city_data +0 -44
- data/test/fixtures/google_no_locality +0 -51
- data/test/fixtures/google_no_results +0 -4
- data/test/fixtures/google_over_limit +0 -4
- data/test/fixtures/mapquest_error +0 -16
- data/test/fixtures/mapquest_invalid_api_key +0 -16
- data/test/fixtures/mapquest_invalid_request +0 -16
- data/test/fixtures/mapquest_madison_square_garden +0 -52
- data/test/fixtures/mapquest_no_results +0 -16
- data/test/fixtures/maxmind_24_24_24_21 +0 -1
- data/test/fixtures/maxmind_24_24_24_22 +0 -1
- data/test/fixtures/maxmind_24_24_24_23 +0 -1
- data/test/fixtures/maxmind_24_24_24_24 +0 -1
- data/test/fixtures/maxmind_74_200_247_59 +0 -1
- data/test/fixtures/maxmind_invalid_key +0 -1
- data/test/fixtures/maxmind_no_results +0 -1
- data/test/fixtures/nominatim_madison_square_garden +0 -150
- data/test/fixtures/nominatim_no_results +0 -1
- data/test/fixtures/ovi_madison_square_garden +0 -72
- data/test/fixtures/ovi_no_results +0 -8
- data/test/fixtures/yahoo_error +0 -1
- data/test/fixtures/yahoo_invalid_key +0 -2
- data/test/fixtures/yahoo_madison_square_garden +0 -52
- data/test/fixtures/yahoo_no_results +0 -10
- data/test/fixtures/yahoo_over_limit +0 -2
- data/test/fixtures/yandex_invalid_key +0 -1
- data/test/fixtures/yandex_kremlin +0 -48
- data/test/fixtures/yandex_no_city_and_town +0 -112
- data/test/fixtures/yandex_no_results +0 -16
- data/test/geocoder_test.rb +0 -59
- data/test/https_test.rb +0 -16
- data/test/integration/smoke_test.rb +0 -26
- data/test/lookup_test.rb +0 -117
- data/test/method_aliases_test.rb +0 -25
- data/test/mongoid_test.rb +0 -46
- data/test/mongoid_test_helper.rb +0 -43
- data/test/near_test.rb +0 -61
- data/test/oauth_util_test.rb +0 -30
- data/test/proxy_test.rb +0 -36
- data/test/query_test.rb +0 -52
- data/test/request_test.rb +0 -29
- data/test/result_test.rb +0 -42
- data/test/services_test.rb +0 -393
- data/test/test_helper.rb +0 -289
- data/test/test_mode_test.rb +0 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3ba97fb2510ac5e0f739b4f7a11825f9d9bf277
|
4
|
+
data.tar.gz: d69a73fd1c4a6536170ac28563475def5ffed69e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09fa3752902e9422511ea4b30b038e8b91f6a6c6ad37aad0d979864ca610b0c5e5ab80fc9b0aff94dca4bcf493056e8d84a9d1433abc3b4a6385fd1fced6ea5
|
7
|
+
data.tar.gz: 77e358b416b3862952f8210f9a5752e0b1e11dc8247ed3f13966fe79c64af98fd7ef31a2b5310fb9fc36bfc98bde3330cf96baca1949229e99d159d724807856
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,163 @@ Changelog
|
|
3
3
|
|
4
4
|
Major changes to Geocoder for each release. Please see the Git log for complete list of changes.
|
5
5
|
|
6
|
+
1.3.7 (2016 Jun 9)
|
7
|
+
-------------------
|
8
|
+
* Fix Ruby 1.9, 2.0 incompatibility (thanks github.com/ebouchut).
|
9
|
+
* Update SmartyStreets zipcode API endpoint (thanks github.com/jeffects).
|
10
|
+
* Catch network errors (thanks github.com/sas1ni69).
|
11
|
+
|
12
|
+
1.3.6 (2016 May 31)
|
13
|
+
-------------------
|
14
|
+
* Fix Sinatra support broken in 1.3.5.
|
15
|
+
|
16
|
+
1.3.5 (2016 May 27)
|
17
|
+
-------------------
|
18
|
+
* Fix Rails 5 ActionDispatch include issue (thanks github.com/alepore).
|
19
|
+
* Fix bug that caused :esri lookup to ignore certain configured parameters (thanks github.com/aaronpk).
|
20
|
+
* Add reverse geocoding support to :pelias/:mapzen (thanks github.com/shinyaK14).
|
21
|
+
* Add support for custom host with :telize (thanks github.com/jwaldrip).
|
22
|
+
* Change the way :esri lookup generates cache keys for improved performance (thanks github.com/aaronpk).
|
23
|
+
* Improve HTTPS connections with :google (thanks github.com/jlhonora).
|
24
|
+
|
25
|
+
1.3.4 (2016 Apr 14)
|
26
|
+
-------------------
|
27
|
+
* Update :freegeoip host (old one is down).
|
28
|
+
* Add IP lookup :ipapi_com (thanks github.com/piotrgorecki).
|
29
|
+
|
30
|
+
1.3.3 (2016 Apr 4)
|
31
|
+
------------------
|
32
|
+
* Fix incorrect gem version number.
|
33
|
+
|
34
|
+
1.3.2 (2016 Apr 1)
|
35
|
+
------------------
|
36
|
+
* Remove :yahoo lookup (service was discontinued Mar 31) (thanks github.com/galiat).
|
37
|
+
* Add support for LatLon.io service (thanks github.com/evanmarks).
|
38
|
+
* Add support for IpInfo.io service (thanks github.com/rehan, akostyuk).
|
39
|
+
* Add support for Pelias/Mapzen service (thanks github.com/RealScout).
|
40
|
+
|
41
|
+
1.3.1 (2016 Feb 20)
|
42
|
+
-------------------
|
43
|
+
* Warn about upcoming discontinuation of :yahoo lookup (thanks github.com/galiat).
|
44
|
+
* Add #viewport method to results that return viewport data (thanks github.com/lime).
|
45
|
+
|
46
|
+
1.3.0 (2016 Jan 31)
|
47
|
+
-------------------
|
48
|
+
* Lazy load lookups to reduce memory footprint (thanks github.com/TrangPham).
|
49
|
+
* Add :geoportail_lu lookup (Luxembourg only) (thanks github.com/mdebo).
|
50
|
+
* Maxmind local query performance improvement (thanks github.com/vojtad).
|
51
|
+
* Remove deprecated Mongo near query methods (please use Mongo-native methods instead).
|
52
|
+
|
53
|
+
1.2.14 (2015 Dec 27)
|
54
|
+
--------------------
|
55
|
+
* Fix bug in :geoip2 lookup (thanks github.com/mromulus).
|
56
|
+
|
57
|
+
1.2.13 (2015 Dec 15)
|
58
|
+
--------------------
|
59
|
+
* Update :telize IP lookup to reflect new URL (thanks github.com/jfredrickson).
|
60
|
+
* Add reverse geocode rake task (thanks github.com/FanaHOVA).
|
61
|
+
* Fix reversed coordinates array with Mapbox (thanks github.com/marcusat).
|
62
|
+
* Fix missing city name in some cases with ESRI (thanks github.com/roybotnik).
|
63
|
+
* Prevent re-opening of DB file on every read with :geoip2 (thanks github.com/oogali).
|
64
|
+
|
65
|
+
1.2.12 (2015 Oct 29)
|
66
|
+
--------------------
|
67
|
+
* Fix Ruby 1.9.3 incompatibility (remove non-existent timeout classes) (thanks github.com/roychri).
|
68
|
+
|
69
|
+
1.2.11 (2015 Sep 10)
|
70
|
+
--------------------
|
71
|
+
* Fix load issue on Ruby 1.9.3.
|
72
|
+
|
73
|
+
1.2.10 (2015 Sep 7)
|
74
|
+
-------------------
|
75
|
+
* Force Yandex to use HTTPS (thanks github.com/donbobka).
|
76
|
+
* Force :google to use HTTPS if API key set.
|
77
|
+
* Fix out-of-the-box verbosity issues (GH #881).
|
78
|
+
* Improve timeout mechanism and add exception Geocoder::LookupTimeout (thanks github.com/ankane).
|
79
|
+
* Deprecate .near and #nearbys for MongoDB-backed models.
|
80
|
+
|
81
|
+
1.2.9 (2015 Jun 12)
|
82
|
+
-------------------
|
83
|
+
* Don't cache unsuccessful responses from Bing (thanks github.com/peteb).
|
84
|
+
* Show API response when not valid JSON.
|
85
|
+
* Log each API request.
|
86
|
+
* Force all SmartyStreets requests to use HTTPS.
|
87
|
+
|
88
|
+
1.2.8 (2015 Mar 21)
|
89
|
+
-------------------
|
90
|
+
* Add :maxmind_geoip2 lookup (thanks github.com/TrangPham).
|
91
|
+
* Add ability to force/specify query type (street or IP address) (thanks github.com/TrangPham).
|
92
|
+
* Add :basic_auth configuration (thanks github.com/TrangPham).
|
93
|
+
* Add `safe_location` method for Rails controllers (thanks github.com/edslocomb).
|
94
|
+
* Add :logger configuration (thanks github.com/TrangPham).
|
95
|
+
* Improve error condition handling with Bing (thanks github.com/TrangPham).
|
96
|
+
|
97
|
+
1.2.7 (2015 Jan 24)
|
98
|
+
-------------------
|
99
|
+
* DROP SUPPORT for Ruby 1.9.2.
|
100
|
+
* Use UTF-8 encoding for maxmind_local results (thanks github.com/ellmo).
|
101
|
+
* Update freegeoip response handling (thanks github.com/hosamaly).
|
102
|
+
* Update nominatim response handling (thanks github.com/jsantos).
|
103
|
+
* Update yandex response handling (thanks github.com/wfleming).
|
104
|
+
* Update geocodio response handling (thanks github.com/getsidewalk).
|
105
|
+
* Add ability to raise exception when response parsing fails (thanks github.com/spiderpug).
|
106
|
+
* Fix double-loading of Railtie (thanks github.com/wfleming and zhouguangming).
|
107
|
+
|
108
|
+
1.2.6 (2014 Nov 8)
|
109
|
+
------------------
|
110
|
+
* Add :geoip2 lookup (thanks github.com/ChristianHoj).
|
111
|
+
* Add :okf lookup (thanks github.com/kakoni).
|
112
|
+
* Add :postcode_anywhere_uk lookup (thanks github.com/rob-murray).
|
113
|
+
* Properly detect IPv6 addresses (thanks github.com/sethherr and github.com/ignatiusreza).
|
114
|
+
|
115
|
+
1.2.5 (2014 Sep 12)
|
116
|
+
-------------------
|
117
|
+
* Fix bugs in :opencagedata lookup (thanks github.com/duboff and kayakyakr).
|
118
|
+
* Allow language to be set in model configuration (thanks github.com/viniciusnz).
|
119
|
+
* Optimize lookup queries when using MaxMind Local (thanks github.com/gersmann).
|
120
|
+
|
121
|
+
1.2.4 (2014 Aug 12)
|
122
|
+
-------------------
|
123
|
+
* Add ability to specify lat/lon column names with .near scope (thanks github.com/switzersc).
|
124
|
+
* Add OpenCageData geocoder (thanks github.com/mtmail).
|
125
|
+
* Remove CloudMade geocoder.
|
126
|
+
|
127
|
+
1.2.3 (2014 Jul 11)
|
128
|
+
-------------------
|
129
|
+
* Add Telize IP address lookup (thanks github.com/lukeroberts1990).
|
130
|
+
* Fix bug in Bing reverse geocoding (thanks github.com/nickelser).
|
131
|
+
|
132
|
+
1.2.2 (2014 Jun 12)
|
133
|
+
-------------------
|
134
|
+
* Add ability to specify language per query (thanks github.com/mkristian).
|
135
|
+
* Handle Errno::ECONNREFUSED exceptions like TimeoutError exceptions.
|
136
|
+
* Switch to 'unstructured' query format for Bing API (thanks github.com/lukewendling).
|
137
|
+
|
138
|
+
1.2.1 (2014 May 12)
|
139
|
+
-------------------
|
140
|
+
|
141
|
+
* Fix: correctly handle encoding of MaxMind API responses (thanks github.com/hydrozen, gonzoyumo).
|
142
|
+
* Fixes to :maxmind_local database structure (thanks github.com/krakatoa).
|
143
|
+
|
144
|
+
1.2.0 (2014 Apr 16)
|
145
|
+
-------------------
|
146
|
+
|
147
|
+
* DROP SUPPORT for Ruby 1.8.x.
|
148
|
+
* Add :here lookup (thanks github.com/christoph-buente).
|
149
|
+
* Add :cloudmade lookup (thanks github.com/spoptchev).
|
150
|
+
* Add :smarty_streets lookup (thanks github.com/drinks).
|
151
|
+
* Add :maxmind_local IP lookup (thanks github.com/fernandomm).
|
152
|
+
* Add :baidu_ip lookup (thanks github.com/yonggu).
|
153
|
+
* Add :geocodio lookup (thanks github.com/dblock).
|
154
|
+
* Add :lookup option to `Geocoder.search` and `geocoded_by` (thanks github.com/Bonias).
|
155
|
+
* Add support for :maxmind_local on JRuby via jgeoip gem (thanks github.com/gxbe).
|
156
|
+
* Add support for using :maxmind_local with an SQL database, including Rake tasks for downloading CSV data and populating a local DB.
|
157
|
+
* Add support for character encodings based on Content-type header (thanks github.com/timaro).
|
158
|
+
* Add :min_radius option to `near` scope (thanks github.com/phallstrom).
|
159
|
+
* Fix: Yandex city attribute caused exception with certain responses (thanks github.com/dblock).
|
160
|
+
* Change name of MapQuest config option from :licensed to :open and revert default behavior to be MapQuest data (not OpenStreetMaps).
|
161
|
+
* Reduce number of Ruby warnings (thanks github.com/exviva).
|
162
|
+
|
6
163
|
1.1.9 (2013 Dec 11)
|
7
164
|
-------------------
|
8
165
|
|