geocoder 1.6.3 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +61 -0
  3. data/LICENSE +1 -1
  4. data/README.md +329 -233
  5. data/examples/app_defined_lookup_services.rb +22 -0
  6. data/lib/generators/geocoder/config/templates/initializer.rb +6 -1
  7. data/lib/geocoder/cache.rb +16 -33
  8. data/lib/geocoder/cache_stores/base.rb +40 -0
  9. data/lib/geocoder/cache_stores/generic.rb +35 -0
  10. data/lib/geocoder/cache_stores/redis.rb +34 -0
  11. data/lib/geocoder/configuration.rb +19 -5
  12. data/lib/geocoder/configuration_hash.rb +4 -4
  13. data/lib/geocoder/ip_address.rb +6 -0
  14. data/lib/geocoder/lookup.rb +32 -4
  15. data/lib/geocoder/lookups/abstract_api.rb +46 -0
  16. data/lib/geocoder/lookups/amap.rb +2 -2
  17. data/lib/geocoder/lookups/amazon_location_service.rb +54 -0
  18. data/lib/geocoder/lookups/ban_data_gouv_fr.rb +1 -1
  19. data/lib/geocoder/lookups/base.rb +2 -1
  20. data/lib/geocoder/lookups/bing.rb +1 -1
  21. data/lib/geocoder/lookups/esri.rb +4 -0
  22. data/lib/geocoder/lookups/freegeoip.rb +8 -6
  23. data/lib/geocoder/lookups/geoapify.rb +78 -0
  24. data/lib/geocoder/lookups/geocodio.rb +1 -1
  25. data/lib/geocoder/lookups/geoip2.rb +4 -0
  26. data/lib/geocoder/lookups/geoportail_lu.rb +1 -1
  27. data/lib/geocoder/lookups/google.rb +7 -2
  28. data/lib/geocoder/lookups/google_places_details.rb +26 -12
  29. data/lib/geocoder/lookups/google_places_search.rb +45 -2
  30. data/lib/geocoder/lookups/google_premier.rb +4 -0
  31. data/lib/geocoder/lookups/here.rb +25 -20
  32. data/lib/geocoder/lookups/ip2location.rb +10 -6
  33. data/lib/geocoder/lookups/ipbase.rb +49 -0
  34. data/lib/geocoder/lookups/ipdata_co.rb +1 -1
  35. data/lib/geocoder/lookups/ipqualityscore.rb +50 -0
  36. data/lib/geocoder/lookups/location_iq.rb +5 -1
  37. data/lib/geocoder/lookups/maxmind_local.rb +7 -1
  38. data/lib/geocoder/lookups/melissa_street.rb +41 -0
  39. data/lib/geocoder/lookups/photon.rb +89 -0
  40. data/lib/geocoder/lookups/test.rb +5 -0
  41. data/lib/geocoder/lookups/twogis.rb +58 -0
  42. data/lib/geocoder/lookups/uk_ordnance_survey_names.rb +1 -1
  43. data/lib/geocoder/lookups/yandex.rb +3 -3
  44. data/lib/geocoder/results/abstract_api.rb +146 -0
  45. data/lib/geocoder/results/amazon_location_service.rb +57 -0
  46. data/lib/geocoder/results/ban_data_gouv_fr.rb +26 -1
  47. data/lib/geocoder/results/db_ip_com.rb +1 -1
  48. data/lib/geocoder/results/esri.rb +5 -2
  49. data/lib/geocoder/results/geoapify.rb +179 -0
  50. data/lib/geocoder/results/here.rb +20 -25
  51. data/lib/geocoder/results/ipbase.rb +40 -0
  52. data/lib/geocoder/results/ipqualityscore.rb +54 -0
  53. data/lib/geocoder/results/ipregistry.rb +4 -8
  54. data/lib/geocoder/results/mapbox.rb +10 -4
  55. data/lib/geocoder/results/melissa_street.rb +46 -0
  56. data/lib/geocoder/results/nationaal_georegister_nl.rb +1 -1
  57. data/lib/geocoder/results/nominatim.rb +27 -15
  58. data/lib/geocoder/results/photon.rb +119 -0
  59. data/lib/geocoder/results/twogis.rb +76 -0
  60. data/lib/geocoder/util.rb +29 -0
  61. data/lib/geocoder/version.rb +1 -1
  62. metadata +24 -6
  63. data/examples/autoexpire_cache_dalli.rb +0 -62
  64. data/examples/autoexpire_cache_redis.rb +0 -30
  65. data/lib/hash_recursive_merge.rb +0 -73
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8ab5b6c482a72aa85d0594577eb88c912ae9304254f006b9f7a37818318c94b
4
- data.tar.gz: d2a71cc1cd294237c006ade75db89a99a2a01e31515eefc825aa833cb136acaa
3
+ metadata.gz: 35c6a6d57b8ff3818e9d1b616558a8bbdc3b4b51db2b2c7dadb720eccafd27b4
4
+ data.tar.gz: 8e8fe1ba7cb9da58131a965d3d85589084f4d5dd70409990f49b89b83923f4e3
5
5
  SHA512:
6
- metadata.gz: 1badbbf1f2633044d3f9a3ce56cf89f1573538795128c945102c02141f76304dc6c3ef98fef8befe0b9865871beec1cd98109290f05c28cbc042162d084af3a9
7
- data.tar.gz: 3edf26f306e5a72a764a0def55a74eeff0652e90956b3cba26d44e7c51a5746df01a6ae09639ea61773768b0ffd58be888bca687a3427f2e1e5cec202c12aa02
6
+ metadata.gz: 0bbf04cc8488a533038783e2d250706fb2d2439de8ea1e5bf4b89950d1dd51d5e9393454540a23cb4e7fbc33b58f54fec1c71c14c98d6fbe8bb8e5caad786989
7
+ data.tar.gz: 92b8f5933a421b47cdededea9c8e8df8d2ec6f45cb25c8726b343a773b315929529fe821cae08868576ae2e8c5cdbc5fd1782bd2bfc8c56f36afdc1514f52b58
data/CHANGELOG.md CHANGED
@@ -3,6 +3,67 @@ 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.1 (2022 Sep 23)
7
+ -------------------
8
+ * Add support for IPBase lookup (thanks github.com/jonallured).
9
+ * Test cleanup (thanks github.com/jonallured).
10
+ * Prevent errors when existing constant name shadows a lookup class (thanks github.com/avram-twitch).
11
+
12
+ 1.8.0 (2022 May 17)
13
+ -------------------
14
+ * Add support for 2GIS lookup (thanks github.com/ggrikgg).
15
+ * 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.
16
+ * 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).
17
+ * 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).
18
+
19
+ 1.7.5 (2022 Mar 14)
20
+ -------------------
21
+ * Avoid lookup naming collisions in some environments.
22
+
23
+ 1.7.4 (2022 Mar 14)
24
+ -------------------
25
+ * Add ability to use app-defined lookups (thanks github.com/januszm).
26
+ * Updates to LocationIQ and FreeGeoIP lookups.
27
+
28
+ 1.7.3 (2022 Jan 17)
29
+ -------------------
30
+ * Get rid of unnecessary cache_prefix deprecation warnings.
31
+
32
+ 1.7.2 (2022 Jan 2)
33
+ -------------------
34
+ * Fix uninitialized constant error (occurring on some systems with v1.7.1).
35
+
36
+ 1.7.1 (2022 Jan 1)
37
+ -------------------
38
+ * Various bugfixes and refactorings.
39
+
40
+ 1.7.0 (2021 Oct 11)
41
+ -------------------
42
+ * Add support for Geoapify and Photo lookups (thanks github.com/ahukkanen).
43
+ * Add support for IPQualityScore IP lookup (thanks github.com/jamesbebbington).
44
+ * Add support for Amazon Location Service lookup (thanks github.com/mplewis).
45
+ * Add support for Melissa lookup (thanks github.com/ALacker).
46
+ * Drop official support for Ruby 2.0.x and Rails 4.x.
47
+
48
+ 1.6.7 (2021 Apr 17)
49
+ -------------------
50
+ * Add support for Abstract API lookup (thanks github.com/randoum).
51
+
52
+ 1.6.6 (2021 Mar 4)
53
+ -------------------
54
+ * Rescue from exception on cache read/write error. Issue warning instead.
55
+
56
+ 1.6.5 (2021 Feb 10)
57
+ -------------------
58
+ * Fix backward coordinates bug in NationaalregisterNl lookup (thanks github.com/Marthyn).
59
+ * Allow removal of single stubs in test mode (thanks github.com/jmmastey).
60
+ * Improve results for :ban_data_gouv_fr lookup (thanks github.com/Intrepidd).
61
+
62
+ 1.6.4 (2020 Oct 6)
63
+ -------------------
64
+ * Various updates in response to geocoding API changes.
65
+ * Refactor of Google Places Search lookup (thanks github.com/maximilientyc).
66
+
6
67
  1.6.3 (2020 Apr 30)
7
68
  -------------------
8
69
  * Update URL for :telize lookup (thanks github.com/alexwalling).
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2020 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