geocoder 1.1.9 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (238) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +309 -0
  3. data/LICENSE +1 -1
  4. data/README.md +544 -540
  5. data/bin/console +13 -0
  6. data/examples/app_defined_lookup_services.rb +22 -0
  7. data/examples/reverse_geocode_job.rb +40 -0
  8. data/lib/easting_northing.rb +171 -0
  9. data/lib/generators/geocoder/config/templates/initializer.rb +22 -16
  10. data/lib/generators/geocoder/maxmind/geolite_city_generator.rb +30 -0
  11. data/lib/generators/geocoder/maxmind/geolite_country_generator.rb +30 -0
  12. data/lib/generators/geocoder/maxmind/templates/migration/geolite_city.rb +30 -0
  13. data/lib/generators/geocoder/maxmind/templates/migration/geolite_country.rb +17 -0
  14. data/lib/generators/geocoder/migration_version.rb +15 -0
  15. data/lib/geocoder/cache.rb +20 -32
  16. data/lib/geocoder/cache_stores/base.rb +40 -0
  17. data/lib/geocoder/cache_stores/generic.rb +35 -0
  18. data/lib/geocoder/cache_stores/redis.rb +34 -0
  19. data/lib/geocoder/calculations.rb +67 -36
  20. data/lib/geocoder/cli.rb +2 -2
  21. data/lib/geocoder/configuration.rb +33 -16
  22. data/lib/geocoder/configuration_hash.rb +4 -4
  23. data/lib/geocoder/esri_token.rb +38 -0
  24. data/lib/geocoder/exceptions.rb +19 -0
  25. data/lib/geocoder/ip_address.rb +33 -0
  26. data/lib/geocoder/kernel_logger.rb +25 -0
  27. data/lib/geocoder/logger.rb +47 -0
  28. data/lib/geocoder/lookup.rb +74 -11
  29. data/lib/geocoder/lookups/abstract_api.rb +46 -0
  30. data/lib/geocoder/lookups/amap.rb +63 -0
  31. data/lib/geocoder/lookups/amazon_location_service.rb +54 -0
  32. data/lib/geocoder/lookups/baidu.rb +24 -15
  33. data/lib/geocoder/lookups/baidu_ip.rb +30 -0
  34. data/lib/geocoder/lookups/ban_data_gouv_fr.rb +143 -0
  35. data/lib/geocoder/lookups/base.rb +109 -23
  36. data/lib/geocoder/lookups/bing.rb +45 -10
  37. data/lib/geocoder/lookups/db_ip_com.rb +52 -0
  38. data/lib/geocoder/lookups/dstk.rb +4 -2
  39. data/lib/geocoder/lookups/esri.rb +61 -8
  40. data/lib/geocoder/lookups/freegeoip.rb +25 -6
  41. data/lib/geocoder/lookups/geoapify.rb +72 -0
  42. data/lib/geocoder/lookups/geocoder_ca.rb +5 -6
  43. data/lib/geocoder/lookups/geocodio.rb +42 -0
  44. data/lib/geocoder/lookups/geoip2.rb +49 -0
  45. data/lib/geocoder/lookups/geoportail_lu.rb +65 -0
  46. data/lib/geocoder/lookups/google.rb +45 -12
  47. data/lib/geocoder/lookups/google_places_details.rb +64 -0
  48. data/lib/geocoder/lookups/google_places_search.rb +76 -0
  49. data/lib/geocoder/lookups/google_premier.rb +16 -2
  50. data/lib/geocoder/lookups/here.rb +73 -0
  51. data/lib/geocoder/lookups/ip2location.rb +71 -0
  52. data/lib/geocoder/lookups/ipapi_com.rb +82 -0
  53. data/lib/geocoder/lookups/ipdata_co.rb +62 -0
  54. data/lib/geocoder/lookups/ipgeolocation.rb +51 -0
  55. data/lib/geocoder/lookups/ipinfo_io.rb +44 -0
  56. data/lib/geocoder/lookups/ipqualityscore.rb +50 -0
  57. data/lib/geocoder/lookups/ipregistry.rb +68 -0
  58. data/lib/geocoder/lookups/ipstack.rb +63 -0
  59. data/lib/geocoder/lookups/latlon.rb +58 -0
  60. data/lib/geocoder/lookups/location_iq.rb +54 -0
  61. data/lib/geocoder/lookups/mapbox.rb +59 -0
  62. data/lib/geocoder/lookups/mapquest.rb +9 -10
  63. data/lib/geocoder/lookups/maxmind.rb +10 -8
  64. data/lib/geocoder/lookups/maxmind_geoip2.rb +70 -0
  65. data/lib/geocoder/lookups/maxmind_local.rb +71 -0
  66. data/lib/geocoder/lookups/melissa_street.rb +41 -0
  67. data/lib/geocoder/lookups/nationaal_georegister_nl.rb +38 -0
  68. data/lib/geocoder/lookups/nominatim.rb +26 -6
  69. data/lib/geocoder/lookups/opencagedata.rb +65 -0
  70. data/lib/geocoder/lookups/osmnames.rb +57 -0
  71. data/lib/geocoder/lookups/pelias.rb +63 -0
  72. data/lib/geocoder/lookups/photon.rb +89 -0
  73. data/lib/geocoder/lookups/pickpoint.rb +41 -0
  74. data/lib/geocoder/lookups/pointpin.rb +69 -0
  75. data/lib/geocoder/lookups/postcode_anywhere_uk.rb +50 -0
  76. data/lib/geocoder/lookups/postcodes_io.rb +31 -0
  77. data/lib/geocoder/lookups/smarty_streets.rb +68 -0
  78. data/lib/geocoder/lookups/telize.rb +75 -0
  79. data/lib/geocoder/lookups/tencent.rb +59 -0
  80. data/lib/geocoder/lookups/test.rb +4 -0
  81. data/lib/geocoder/lookups/twogis.rb +58 -0
  82. data/lib/geocoder/lookups/uk_ordnance_survey_names.rb +59 -0
  83. data/lib/geocoder/lookups/yandex.rb +18 -11
  84. data/lib/geocoder/models/active_record.rb +9 -4
  85. data/lib/geocoder/models/base.rb +1 -4
  86. data/lib/geocoder/models/mongo_base.rb +6 -4
  87. data/lib/geocoder/query.rb +23 -5
  88. data/lib/geocoder/railtie.rb +2 -2
  89. data/lib/geocoder/request.rb +102 -11
  90. data/lib/geocoder/results/abstract_api.rb +146 -0
  91. data/lib/geocoder/results/amap.rb +87 -0
  92. data/lib/geocoder/results/amazon_location_service.rb +57 -0
  93. data/lib/geocoder/results/baidu.rb +10 -14
  94. data/lib/geocoder/results/baidu_ip.rb +62 -0
  95. data/lib/geocoder/results/ban_data_gouv_fr.rb +282 -0
  96. data/lib/geocoder/results/base.rb +13 -1
  97. data/lib/geocoder/results/bing.rb +5 -1
  98. data/lib/geocoder/results/db_ip_com.rb +58 -0
  99. data/lib/geocoder/results/esri.rb +35 -8
  100. data/lib/geocoder/results/freegeoip.rb +2 -7
  101. data/lib/geocoder/results/geoapify.rb +179 -0
  102. data/lib/geocoder/results/geocoder_ca.rb +3 -3
  103. data/lib/geocoder/results/geocodio.rb +78 -0
  104. data/lib/geocoder/results/geoip2.rb +76 -0
  105. data/lib/geocoder/results/geoportail_lu.rb +71 -0
  106. data/lib/geocoder/results/google.rb +26 -0
  107. data/lib/geocoder/results/google_places_details.rb +39 -0
  108. data/lib/geocoder/results/google_places_search.rb +52 -0
  109. data/lib/geocoder/results/here.rb +77 -0
  110. data/lib/geocoder/results/ip2location.rb +22 -0
  111. data/lib/geocoder/results/ipapi_com.rb +45 -0
  112. data/lib/geocoder/results/ipdata_co.rb +40 -0
  113. data/lib/geocoder/results/ipgeolocation.rb +59 -0
  114. data/lib/geocoder/results/ipinfo_io.rb +48 -0
  115. data/lib/geocoder/results/ipqualityscore.rb +54 -0
  116. data/lib/geocoder/results/ipregistry.rb +304 -0
  117. data/lib/geocoder/results/ipstack.rb +60 -0
  118. data/lib/geocoder/results/latlon.rb +71 -0
  119. data/lib/geocoder/results/location_iq.rb +6 -0
  120. data/lib/geocoder/results/mapbox.rb +63 -0
  121. data/lib/geocoder/results/mapquest.rb +5 -8
  122. data/lib/geocoder/results/maxmind.rb +0 -5
  123. data/lib/geocoder/results/maxmind_geoip2.rb +9 -0
  124. data/lib/geocoder/results/maxmind_local.rb +44 -0
  125. data/lib/geocoder/results/melissa_street.rb +46 -0
  126. data/lib/geocoder/results/nationaal_georegister_nl.rb +62 -0
  127. data/lib/geocoder/results/nominatim.rb +41 -14
  128. data/lib/geocoder/results/opencagedata.rb +100 -0
  129. data/lib/geocoder/results/osmnames.rb +56 -0
  130. data/lib/geocoder/results/pelias.rb +58 -0
  131. data/lib/geocoder/results/photon.rb +119 -0
  132. data/lib/geocoder/results/pickpoint.rb +6 -0
  133. data/lib/geocoder/results/pointpin.rb +40 -0
  134. data/lib/geocoder/results/postcode_anywhere_uk.rb +42 -0
  135. data/lib/geocoder/results/postcodes_io.rb +40 -0
  136. data/lib/geocoder/results/smarty_streets.rb +142 -0
  137. data/lib/geocoder/results/telize.rb +40 -0
  138. data/lib/geocoder/results/tencent.rb +72 -0
  139. data/lib/geocoder/results/test.rb +20 -3
  140. data/lib/geocoder/results/twogis.rb +76 -0
  141. data/lib/geocoder/results/uk_ordnance_survey_names.rb +59 -0
  142. data/lib/geocoder/results/yandex.rb +244 -32
  143. data/lib/geocoder/sql.rb +25 -21
  144. data/lib/geocoder/stores/active_record.rb +82 -26
  145. data/lib/geocoder/stores/base.rb +9 -14
  146. data/lib/geocoder/stores/mongo_base.rb +0 -31
  147. data/lib/geocoder/util.rb +29 -0
  148. data/lib/geocoder/version.rb +1 -1
  149. data/lib/geocoder.rb +6 -13
  150. data/lib/maxmind_database.rb +109 -0
  151. data/lib/tasks/geocoder.rake +30 -3
  152. data/lib/tasks/maxmind.rake +73 -0
  153. metadata +115 -98
  154. data/.gitignore +0 -5
  155. data/.travis.yml +0 -27
  156. data/Rakefile +0 -25
  157. data/examples/autoexpire_cache_dalli.rb +0 -62
  158. data/examples/autoexpire_cache_redis.rb +0 -28
  159. data/gemfiles/Gemfile.mongoid-2.4.x +0 -15
  160. data/lib/geocoder/lookups/geocoder_us.rb +0 -39
  161. data/lib/geocoder/lookups/ovi.rb +0 -62
  162. data/lib/geocoder/lookups/yahoo.rb +0 -86
  163. data/lib/geocoder/results/geocoder_us.rb +0 -39
  164. data/lib/geocoder/results/ovi.rb +0 -62
  165. data/lib/geocoder/results/yahoo.rb +0 -55
  166. data/lib/hash_recursive_merge.rb +0 -74
  167. data/lib/oauth_util.rb +0 -112
  168. data/test/active_record_test.rb +0 -15
  169. data/test/cache_test.rb +0 -35
  170. data/test/calculations_test.rb +0 -211
  171. data/test/configuration_test.rb +0 -78
  172. data/test/custom_block_test.rb +0 -32
  173. data/test/error_handling_test.rb +0 -43
  174. data/test/fixtures/baidu_invalid_key +0 -1
  175. data/test/fixtures/baidu_no_results +0 -1
  176. data/test/fixtures/baidu_reverse +0 -1
  177. data/test/fixtures/baidu_shanghai_pearl_tower +0 -12
  178. data/test/fixtures/bing_invalid_key +0 -1
  179. data/test/fixtures/bing_madison_square_garden +0 -40
  180. data/test/fixtures/bing_no_results +0 -16
  181. data/test/fixtures/bing_reverse +0 -42
  182. data/test/fixtures/esri_madison_square_garden +0 -59
  183. data/test/fixtures/esri_no_results +0 -8
  184. data/test/fixtures/esri_reverse +0 -21
  185. data/test/fixtures/freegeoip_74_200_247_59 +0 -12
  186. data/test/fixtures/freegeoip_no_results +0 -1
  187. data/test/fixtures/geocoder_ca_madison_square_garden +0 -1
  188. data/test/fixtures/geocoder_ca_no_results +0 -1
  189. data/test/fixtures/geocoder_ca_reverse +0 -34
  190. data/test/fixtures/geocoder_us_madison_square_garden +0 -1
  191. data/test/fixtures/geocoder_us_no_results +0 -1
  192. data/test/fixtures/google_garbage +0 -456
  193. data/test/fixtures/google_madison_square_garden +0 -57
  194. data/test/fixtures/google_no_city_data +0 -44
  195. data/test/fixtures/google_no_locality +0 -51
  196. data/test/fixtures/google_no_results +0 -4
  197. data/test/fixtures/google_over_limit +0 -4
  198. data/test/fixtures/mapquest_error +0 -16
  199. data/test/fixtures/mapquest_invalid_api_key +0 -16
  200. data/test/fixtures/mapquest_invalid_request +0 -16
  201. data/test/fixtures/mapquest_madison_square_garden +0 -52
  202. data/test/fixtures/mapquest_no_results +0 -16
  203. data/test/fixtures/maxmind_24_24_24_21 +0 -1
  204. data/test/fixtures/maxmind_24_24_24_22 +0 -1
  205. data/test/fixtures/maxmind_24_24_24_23 +0 -1
  206. data/test/fixtures/maxmind_24_24_24_24 +0 -1
  207. data/test/fixtures/maxmind_74_200_247_59 +0 -1
  208. data/test/fixtures/maxmind_invalid_key +0 -1
  209. data/test/fixtures/maxmind_no_results +0 -1
  210. data/test/fixtures/nominatim_madison_square_garden +0 -150
  211. data/test/fixtures/nominatim_no_results +0 -1
  212. data/test/fixtures/ovi_madison_square_garden +0 -72
  213. data/test/fixtures/ovi_no_results +0 -8
  214. data/test/fixtures/yahoo_error +0 -1
  215. data/test/fixtures/yahoo_invalid_key +0 -2
  216. data/test/fixtures/yahoo_madison_square_garden +0 -52
  217. data/test/fixtures/yahoo_no_results +0 -10
  218. data/test/fixtures/yahoo_over_limit +0 -2
  219. data/test/fixtures/yandex_invalid_key +0 -1
  220. data/test/fixtures/yandex_kremlin +0 -48
  221. data/test/fixtures/yandex_no_city_and_town +0 -112
  222. data/test/fixtures/yandex_no_results +0 -16
  223. data/test/geocoder_test.rb +0 -59
  224. data/test/https_test.rb +0 -16
  225. data/test/integration/smoke_test.rb +0 -26
  226. data/test/lookup_test.rb +0 -117
  227. data/test/method_aliases_test.rb +0 -25
  228. data/test/mongoid_test.rb +0 -46
  229. data/test/mongoid_test_helper.rb +0 -43
  230. data/test/near_test.rb +0 -61
  231. data/test/oauth_util_test.rb +0 -30
  232. data/test/proxy_test.rb +0 -36
  233. data/test/query_test.rb +0 -52
  234. data/test/request_test.rb +0 -29
  235. data/test/result_test.rb +0 -42
  236. data/test/services_test.rb +0 -393
  237. data/test/test_helper.rb +0 -289
  238. data/test/test_mode_test.rb +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6e54ea93888b39c46a8ed298a9d3eca5c6a4533a
4
- data.tar.gz: 2b72dcae0e8cc61ba37fb831db4ef88b18543b56
2
+ SHA256:
3
+ metadata.gz: 3a0d33121c080f317bcfcad5c3547491676b1edcef61e33cb3a090e91cccdeee
4
+ data.tar.gz: 066ff69c5443b18d9f5b4e1af94481b588bf18560050e0da49129b3630f5047b
5
5
  SHA512:
6
- metadata.gz: b30e519cafc13d8e57c300f6249fdae8736e92503ef3f2bb03b2670eca83f956c3640ddff1f8567bfbb3b80b048ae80a4bebf8f08423a8a137a0d7f3dfa83e2b
7
- data.tar.gz: dbd472d124b0b795b797abbfe997a9591db207495880c84fbda1f9c2b07626f176be4aab78136e59d347c4492f3b55b41e8381e8e59b85d36945f6d0a18323e1
6
+ metadata.gz: 3e47b46a3c299023708b9a2444315d0e9b2788cf682e7e72e1d2ae8d0be40c9d6b7cf25793f20c946f6941662c6512d86bea29bd48e81485546facf00f9cdea3
7
+ data.tar.gz: 0bd121ae2aa3b8e2232e343d70557a7c9201f06dc47a8ae59d5b28e8610c8627ed6beefb251020537979de472e35d0174ab5fad20994e1414914a28f3d91ba1c
data/CHANGELOG.md CHANGED
@@ -3,6 +3,315 @@ 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.8.0 (2022 May 17)
7
+ -------------------
8
+ * Add support for 2GIS lookup (thanks github.com/ggrikgg).
9
+ * Change cache configuration structure and add an expiration option. Cache prefix is now set via {cache_options: {prefix: ...}} instead of {cache_prefix: ...}. See README for details.
10
+ * Add `:fields` parameter for :google_places_details and :google_places_search lookups. If you haven't been requesting specific fields, you may start getting different data (defaults are now the APIs' defaults). See for details: https://github.com/alexreisner/geocoder/pull/1572 (thanks github.com/czlee).
11
+ * Update :here lookup to use API version 7. Query options are different, API key must be a string (not an array). See API docs at https://developer.here.com/documentation/geocoding-search-api/api-reference-swagger.html (thanks github.com/Pritilender).
12
+
13
+ 1.7.5 (2022 Mar 14)
14
+ -------------------
15
+ * Avoid lookup naming collisions in some environments.
16
+
17
+ 1.7.4 (2022 Mar 14)
18
+ -------------------
19
+ * Add ability to use app-defined lookups (thanks github.com/januszm).
20
+ * Updates to LocationIQ and FreeGeoIP lookups.
21
+
22
+ 1.7.3 (2022 Jan 17)
23
+ -------------------
24
+ * Get rid of unnecessary cache_prefix deprecation warnings.
25
+
26
+ 1.7.2 (2022 Jan 2)
27
+ -------------------
28
+ * Fix uninitialized constant error (occurring on some systems with v1.7.1).
29
+
30
+ 1.7.1 (2022 Jan 1)
31
+ -------------------
32
+ * Various bugfixes and refactorings.
33
+
34
+ 1.7.0 (2021 Oct 11)
35
+ -------------------
36
+ * Add support for Geoapify and Photo lookups (thanks github.com/ahukkanen).
37
+ * Add support for IPQualityScore IP lookup (thanks github.com/jamesbebbington).
38
+ * Add support for Amazon Location Service lookup (thanks github.com/mplewis).
39
+ * Add support for Melissa lookup (thanks github.com/ALacker).
40
+ * Drop official support for Ruby 2.0.x and Rails 4.x.
41
+
42
+ 1.6.7 (2021 Apr 17)
43
+ -------------------
44
+ * Add support for Abstract API lookup (thanks github.com/randoum).
45
+
46
+ 1.6.6 (2021 Mar 4)
47
+ -------------------
48
+ * Rescue from exception on cache read/write error. Issue warning instead.
49
+
50
+ 1.6.5 (2021 Feb 10)
51
+ -------------------
52
+ * Fix backward coordinates bug in NationaalregisterNl lookup (thanks github.com/Marthyn).
53
+ * Allow removal of single stubs in test mode (thanks github.com/jmmastey).
54
+ * Improve results for :ban_data_gouv_fr lookup (thanks github.com/Intrepidd).
55
+
56
+ 1.6.4 (2020 Oct 6)
57
+ -------------------
58
+ * Various updates in response to geocoding API changes.
59
+ * Refactor of Google Places Search lookup (thanks github.com/maximilientyc).
60
+
61
+ 1.6.3 (2020 Apr 30)
62
+ -------------------
63
+ * Update URL for :telize lookup (thanks github.com/alexwalling).
64
+ * Fix bug parsing IPv6 with port (thanks github.com/gdomingu).
65
+
66
+ 1.6.2 (2020 Mar 16)
67
+ -------------------
68
+ * Add support for :nationaal_georegister_nl lookup (thanks github.com/opensourceame).
69
+ * Add support for :uk_ordnance_survey_names lookup (thanks github.com/pezholio).
70
+ * Refactor and fix bugs in Yandex lookup (thanks github.com/iarie and stereodenis).
71
+
72
+ 1.6.1 (2020 Jan 23)
73
+ -------------------
74
+ * Sanitize lat/lon values passed to within_bounding_box to prevent SQL injection.
75
+
76
+ 1.6.0 (2020 Jan 6)
77
+ -------------------
78
+ * Drop support for Rails 3.x.
79
+ * Add support for :osmnames lookup (thanks github.com/zacviandier).
80
+ * Add support for :ipgeolocation IP lookup (thanks github.com/ahsannawaz111).
81
+
82
+ 1.5.2 (2019 Oct 3)
83
+ -------------------
84
+ * Add support for :ipregistry lookup (thanks github.com/ipregistry).
85
+ * Various fixes for Yandex lookup.
86
+
87
+ 1.5.1 (2019 Jan 23)
88
+ -------------------
89
+ * Add support for :tencent lookup (thanks github.com/Anders-E).
90
+ * Add support for :smarty_streets international API (thanks github.com/ankane).
91
+ * Remove :mapzen lookup.
92
+
93
+ 1.5.0 (2018 Jul 31)
94
+ -------------------
95
+ * Drop support for Ruby <2.0.
96
+ * Change default street address lookup from :google to :nominatim.
97
+ * Cache keys no longer include API credentials. This means many entries in existing cache implementations will be invalidated.
98
+ * Test lookup fixtures should now return `coordinates` and NOT `latitude`/`longitude` attributes (see #1258). This may break some people's tests.
99
+ * Add support for :ip2location lookup (thanks github.com/ip2location).
100
+ * Remove :ovi and :okf lookups.
101
+
102
+ 1.4.9 (2018 May 27)
103
+ -------------------
104
+ * Fix regression in :geoip2 lookup.
105
+ * Add support for Postcodes.io lookup (thanks github.com/sledge909).
106
+
107
+ 1.4.8 (2018 May 21)
108
+ -------------------
109
+ * Change default IP address lookup from :freegeoip to :ipinfo_io.
110
+ * Add support for :ipstack lookup (thanks github.com/Heath101).
111
+ * Fix incompatibility with redis-rb gem v4.0.
112
+
113
+ 1.4.7 (2018 Mar 13)
114
+ -------------------
115
+ * Allow HTTP protocol for Nominatim.
116
+
117
+ 1.4.6 (2018 Feb 28)
118
+ -------------------
119
+ * Add support for :ipdata_co lookup (thanks github.com/roschaefer).
120
+ * Update for Rails 5.2 compatibility (thanks github.com/stevenharman).
121
+
122
+ 1.4.5 (2017 Nov 29)
123
+ -------------------
124
+ * Add support for :pickpoint lookup (thanks github.com/cylon-v).
125
+ * Add support for :db_ip_com lookup (thanks github.com/cv).
126
+ * Change FreeGeoIP host to freegeoip.net.
127
+ * Allow search radius to be a symbol representing a column in DB (thanks github.com/leonelgalan).
128
+ * Add support for new parameters and improved error handling for several lookups.
129
+ * Fix bug in SQL when searching for objects across 180th meridian.
130
+
131
+ 1.4.4 (2017 May 17)
132
+ -------------------
133
+ * Use HTTPS by default for :freegeoip (thanks github.com/mehanoid).
134
+ * Add support for :amap lookup (thanks github.com/pzgz).
135
+
136
+ 1.4.3 (2017 Feb 7)
137
+ -------------------
138
+ * Add :google_places_search lookup (thanks github.com/waruboy).
139
+
140
+ 1.4.2 (2017 Jan 31)
141
+ -------------------
142
+ * Fix bug that caused Model.near to return an incorrect query in some cases.
143
+
144
+ 1.4.1 (2016 Dec 2)
145
+ -------------------
146
+ * Add :location_iq lookup (thanks github.com/aleemuddin13 and glsignal).
147
+ * Add :ban_data_gouv_fr lookup (thanks github.com/JulianNacci).
148
+ * Fix :mapbox results when server returns no context (thanks github.com/jcmuller).
149
+ * Deprecate methods in Geocoder::Calculations: to_kilometers, to_miles, to_nautical_miles, mi_in_km, km_in_mi, km_in_nm, nm_in_km.
150
+
151
+ 1.4.0 (2016 Sep 8)
152
+ -------------------
153
+ * Only consider an object geocoded if both lat and lon are present (previously was sufficient to have only one of the two) (thanks github.com/mltsy).
154
+ * Add support in :geocodio lookup for Canadian addresses (thanks github.com/bolandrm).
155
+ * Add support for SQLite extensions, if present (thanks github.com/stevecj).
156
+ * Always include Geocoder in Rack::Request, if defined (thanks github.com/wjordan).
157
+
158
+ 1.3.7 (2016 Jun 9)
159
+ -------------------
160
+ * Fix Ruby 1.9, 2.0 incompatibility (thanks github.com/ebouchut).
161
+ * Update SmartyStreets zipcode API endpoint (thanks github.com/jeffects).
162
+ * Catch network errors (thanks github.com/sas1ni69).
163
+
164
+ 1.3.6 (2016 May 31)
165
+ -------------------
166
+ * Fix Sinatra support broken in 1.3.5.
167
+
168
+ 1.3.5 (2016 May 27)
169
+ -------------------
170
+ * Fix Rails 5 ActionDispatch include issue (thanks github.com/alepore).
171
+ * Fix bug that caused :esri lookup to ignore certain configured parameters (thanks github.com/aaronpk).
172
+ * Add reverse geocoding support to :pelias/:mapzen (thanks github.com/shinyaK14).
173
+ * Add support for custom host with :telize (thanks github.com/jwaldrip).
174
+ * Change the way :esri lookup generates cache keys for improved performance (thanks github.com/aaronpk).
175
+ * Improve HTTPS connections with :google (thanks github.com/jlhonora).
176
+
177
+ 1.3.4 (2016 Apr 14)
178
+ -------------------
179
+ * Update :freegeoip host (old one is down).
180
+ * Add IP lookup :ipapi_com (thanks github.com/piotrgorecki).
181
+
182
+ 1.3.3 (2016 Apr 4)
183
+ ------------------
184
+ * Fix incorrect gem version number.
185
+
186
+ 1.3.2 (2016 Apr 1)
187
+ ------------------
188
+ * Remove :yahoo lookup (service was discontinued Mar 31) (thanks github.com/galiat).
189
+ * Add support for LatLon.io service (thanks github.com/evanmarks).
190
+ * Add support for IpInfo.io service (thanks github.com/rehan, akostyuk).
191
+ * Add support for Pelias/Mapzen service (thanks github.com/RealScout).
192
+
193
+ 1.3.1 (2016 Feb 20)
194
+ -------------------
195
+ * Warn about upcoming discontinuation of :yahoo lookup (thanks github.com/galiat).
196
+ * Add #viewport method to results that return viewport data (thanks github.com/lime).
197
+
198
+ 1.3.0 (2016 Jan 31)
199
+ -------------------
200
+ * Lazy load lookups to reduce memory footprint (thanks github.com/TrangPham).
201
+ * Add :geoportail_lu lookup (Luxembourg only) (thanks github.com/mdebo).
202
+ * Maxmind local query performance improvement (thanks github.com/vojtad).
203
+ * Remove deprecated Mongo near query methods (please use Mongo-native methods instead).
204
+
205
+ 1.2.14 (2015 Dec 27)
206
+ --------------------
207
+ * Fix bug in :geoip2 lookup (thanks github.com/mromulus).
208
+
209
+ 1.2.13 (2015 Dec 15)
210
+ --------------------
211
+ * Update :telize IP lookup to reflect new URL (thanks github.com/jfredrickson).
212
+ * Add reverse geocode rake task (thanks github.com/FanaHOVA).
213
+ * Fix reversed coordinates array with Mapbox (thanks github.com/marcusat).
214
+ * Fix missing city name in some cases with ESRI (thanks github.com/roybotnik).
215
+ * Prevent re-opening of DB file on every read with :geoip2 (thanks github.com/oogali).
216
+
217
+ 1.2.12 (2015 Oct 29)
218
+ --------------------
219
+ * Fix Ruby 1.9.3 incompatibility (remove non-existent timeout classes) (thanks github.com/roychri).
220
+
221
+ 1.2.11 (2015 Sep 10)
222
+ --------------------
223
+ * Fix load issue on Ruby 1.9.3.
224
+
225
+ 1.2.10 (2015 Sep 7)
226
+ -------------------
227
+ * Force Yandex to use HTTPS (thanks github.com/donbobka).
228
+ * Force :google to use HTTPS if API key set.
229
+ * Fix out-of-the-box verbosity issues (GH #881).
230
+ * Improve timeout mechanism and add exception Geocoder::LookupTimeout (thanks github.com/ankane).
231
+ * Deprecate .near and #nearbys for MongoDB-backed models.
232
+
233
+ 1.2.9 (2015 Jun 12)
234
+ -------------------
235
+ * Don't cache unsuccessful responses from Bing (thanks github.com/peteb).
236
+ * Show API response when not valid JSON.
237
+ * Log each API request.
238
+ * Force all SmartyStreets requests to use HTTPS.
239
+
240
+ 1.2.8 (2015 Mar 21)
241
+ -------------------
242
+ * Add :maxmind_geoip2 lookup (thanks github.com/TrangPham).
243
+ * Add ability to force/specify query type (street or IP address) (thanks github.com/TrangPham).
244
+ * Add :basic_auth configuration (thanks github.com/TrangPham).
245
+ * Add `safe_location` method for Rails controllers (thanks github.com/edslocomb).
246
+ * Add :logger configuration (thanks github.com/TrangPham).
247
+ * Improve error condition handling with Bing (thanks github.com/TrangPham).
248
+
249
+ 1.2.7 (2015 Jan 24)
250
+ -------------------
251
+ * DROP SUPPORT for Ruby 1.9.2.
252
+ * Use UTF-8 encoding for maxmind_local results (thanks github.com/ellmo).
253
+ * Update freegeoip response handling (thanks github.com/hosamaly).
254
+ * Update nominatim response handling (thanks github.com/jsantos).
255
+ * Update yandex response handling (thanks github.com/wfleming).
256
+ * Update geocodio response handling (thanks github.com/getsidewalk).
257
+ * Add ability to raise exception when response parsing fails (thanks github.com/spiderpug).
258
+ * Fix double-loading of Railtie (thanks github.com/wfleming and zhouguangming).
259
+
260
+ 1.2.6 (2014 Nov 8)
261
+ ------------------
262
+ * Add :geoip2 lookup (thanks github.com/ChristianHoj).
263
+ * Add :okf lookup (thanks github.com/kakoni).
264
+ * Add :postcode_anywhere_uk lookup (thanks github.com/rob-murray).
265
+ * Properly detect IPv6 addresses (thanks github.com/sethherr and github.com/ignatiusreza).
266
+
267
+ 1.2.5 (2014 Sep 12)
268
+ -------------------
269
+ * Fix bugs in :opencagedata lookup (thanks github.com/duboff and kayakyakr).
270
+ * Allow language to be set in model configuration (thanks github.com/viniciusnz).
271
+ * Optimize lookup queries when using MaxMind Local (thanks github.com/gersmann).
272
+
273
+ 1.2.4 (2014 Aug 12)
274
+ -------------------
275
+ * Add ability to specify lat/lon column names with .near scope (thanks github.com/switzersc).
276
+ * Add OpenCageData geocoder (thanks github.com/mtmail).
277
+ * Remove CloudMade geocoder.
278
+
279
+ 1.2.3 (2014 Jul 11)
280
+ -------------------
281
+ * Add Telize IP address lookup (thanks github.com/lukeroberts1990).
282
+ * Fix bug in Bing reverse geocoding (thanks github.com/nickelser).
283
+
284
+ 1.2.2 (2014 Jun 12)
285
+ -------------------
286
+ * Add ability to specify language per query (thanks github.com/mkristian).
287
+ * Handle Errno::ECONNREFUSED exceptions like TimeoutError exceptions.
288
+ * Switch to 'unstructured' query format for Bing API (thanks github.com/lukewendling).
289
+
290
+ 1.2.1 (2014 May 12)
291
+ -------------------
292
+
293
+ * Fix: correctly handle encoding of MaxMind API responses (thanks github.com/hydrozen, gonzoyumo).
294
+ * Fixes to :maxmind_local database structure (thanks github.com/krakatoa).
295
+
296
+ 1.2.0 (2014 Apr 16)
297
+ -------------------
298
+
299
+ * DROP SUPPORT for Ruby 1.8.x.
300
+ * Add :here lookup (thanks github.com/christoph-buente).
301
+ * Add :cloudmade lookup (thanks github.com/spoptchev).
302
+ * Add :smarty_streets lookup (thanks github.com/drinks).
303
+ * Add :maxmind_local IP lookup (thanks github.com/fernandomm).
304
+ * Add :baidu_ip lookup (thanks github.com/yonggu).
305
+ * Add :geocodio lookup (thanks github.com/dblock).
306
+ * Add :lookup option to `Geocoder.search` and `geocoded_by` (thanks github.com/Bonias).
307
+ * Add support for :maxmind_local on JRuby via jgeoip gem (thanks github.com/gxbe).
308
+ * Add support for using :maxmind_local with an SQL database, including Rake tasks for downloading CSV data and populating a local DB.
309
+ * Add support for character encodings based on Content-type header (thanks github.com/timaro).
310
+ * Add :min_radius option to `near` scope (thanks github.com/phallstrom).
311
+ * Fix: Yandex city attribute caused exception with certain responses (thanks github.com/dblock).
312
+ * Change name of MapQuest config option from :licensed to :open and revert default behavior to be MapQuest data (not OpenStreetMaps).
313
+ * Reduce number of Ruby warnings (thanks github.com/exviva).
314
+
6
315
  1.1.9 (2013 Dec 11)
7
316
  -------------------
8
317
 
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-11 Alex Reisner
1
+ Copyright (c) 2009-2021 Alex Reisner
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the