geocoder 1.5.1 → 1.7.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +65 -0
  3. data/LICENSE +1 -1
  4. data/README.md +333 -238
  5. data/bin/console +13 -0
  6. data/lib/easting_northing.rb +171 -0
  7. data/lib/generators/geocoder/config/templates/initializer.rb +7 -1
  8. data/lib/geocoder/cache.rb +16 -33
  9. data/lib/geocoder/cache_stores/base.rb +40 -0
  10. data/lib/geocoder/cache_stores/generic.rb +35 -0
  11. data/lib/geocoder/cache_stores/redis.rb +34 -0
  12. data/lib/geocoder/configuration.rb +11 -4
  13. data/lib/geocoder/configuration_hash.rb +4 -4
  14. data/lib/geocoder/ip_address.rb +8 -1
  15. data/lib/geocoder/lookup.rb +21 -3
  16. data/lib/geocoder/lookups/abstract_api.rb +46 -0
  17. data/lib/geocoder/lookups/amazon_location_service.rb +54 -0
  18. data/lib/geocoder/lookups/ban_data_gouv_fr.rb +14 -1
  19. data/lib/geocoder/lookups/base.rb +10 -2
  20. data/lib/geocoder/lookups/bing.rb +1 -1
  21. data/lib/geocoder/lookups/esri.rb +6 -0
  22. data/lib/geocoder/lookups/freegeoip.rb +4 -4
  23. data/lib/geocoder/lookups/geoapify.rb +72 -0
  24. data/lib/geocoder/lookups/geocodio.rb +1 -1
  25. data/lib/geocoder/lookups/geoip2.rb +4 -0
  26. data/lib/geocoder/lookups/google.rb +7 -2
  27. data/lib/geocoder/lookups/google_places_details.rb +8 -14
  28. data/lib/geocoder/lookups/google_places_search.rb +28 -2
  29. data/lib/geocoder/lookups/google_premier.rb +4 -0
  30. data/lib/geocoder/lookups/here.rb +7 -16
  31. data/lib/geocoder/lookups/ip2location.rb +10 -14
  32. data/lib/geocoder/lookups/ipdata_co.rb +1 -1
  33. data/lib/geocoder/lookups/ipgeolocation.rb +51 -0
  34. data/lib/geocoder/lookups/ipqualityscore.rb +50 -0
  35. data/lib/geocoder/lookups/ipregistry.rb +68 -0
  36. data/lib/geocoder/lookups/latlon.rb +1 -2
  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/nationaal_georegister_nl.rb +38 -0
  40. data/lib/geocoder/lookups/osmnames.rb +57 -0
  41. data/lib/geocoder/lookups/photon.rb +89 -0
  42. data/lib/geocoder/lookups/pickpoint.rb +1 -1
  43. data/lib/geocoder/lookups/smarty_streets.rb +6 -1
  44. data/lib/geocoder/lookups/telize.rb +1 -1
  45. data/lib/geocoder/lookups/tencent.rb +9 -9
  46. data/lib/geocoder/lookups/test.rb +4 -0
  47. data/lib/geocoder/lookups/uk_ordnance_survey_names.rb +59 -0
  48. data/lib/geocoder/lookups/yandex.rb +3 -4
  49. data/lib/geocoder/results/abstract_api.rb +146 -0
  50. data/lib/geocoder/results/amazon_location_service.rb +57 -0
  51. data/lib/geocoder/results/baidu.rb +0 -4
  52. data/lib/geocoder/results/ban_data_gouv_fr.rb +27 -2
  53. data/lib/geocoder/results/db_ip_com.rb +1 -1
  54. data/lib/geocoder/results/esri.rb +5 -2
  55. data/lib/geocoder/results/geoapify.rb +179 -0
  56. data/lib/geocoder/results/here.rb +4 -1
  57. data/lib/geocoder/results/ipgeolocation.rb +59 -0
  58. data/lib/geocoder/results/ipqualityscore.rb +54 -0
  59. data/lib/geocoder/results/ipregistry.rb +304 -0
  60. data/lib/geocoder/results/mapbox.rb +10 -4
  61. data/lib/geocoder/results/melissa_street.rb +46 -0
  62. data/lib/geocoder/results/nationaal_georegister_nl.rb +62 -0
  63. data/lib/geocoder/results/nominatim.rb +27 -15
  64. data/lib/geocoder/results/osmnames.rb +56 -0
  65. data/lib/geocoder/results/photon.rb +119 -0
  66. data/lib/geocoder/results/uk_ordnance_survey_names.rb +59 -0
  67. data/lib/geocoder/results/yandex.rb +217 -59
  68. data/lib/geocoder/sql.rb +4 -4
  69. data/lib/geocoder/util.rb +29 -0
  70. data/lib/geocoder/version.rb +1 -1
  71. data/lib/maxmind_database.rb +3 -3
  72. metadata +35 -18
  73. data/examples/autoexpire_cache_dalli.rb +0 -62
  74. data/examples/autoexpire_cache_redis.rb +0 -28
  75. data/lib/geocoder/lookups/geocoder_us.rb +0 -51
  76. data/lib/geocoder/results/geocoder_us.rb +0 -39
  77. data/lib/hash_recursive_merge.rb +0 -74
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e556ddf944bdad35735def9028fafebcf61ee294
4
- data.tar.gz: a64476b63f73c13f24e385bc090193422bb92faa
2
+ SHA256:
3
+ metadata.gz: 1dab5b671e230411d805a864ef61517f45eb01d4b83091a3eb5b84693dbbc06a
4
+ data.tar.gz: 39fcd37053a8c6cdb3270cd6d4daaa8ee025d0ed74c534b3a7c62bf6743013b7
5
5
  SHA512:
6
- metadata.gz: '08394b88099374e31e32306a418865b2ffecc4df707044e277072b99d9cadc6f92e1acd70fc18884128f381e28c2c42571f66eb3968a983e214a5a1ca89cf839'
7
- data.tar.gz: 87dadf53fe66e26c2f3eec8bfc671b9cebaf76f50bd08f815ae8b08592bd2c87aab8fa1812ef07b282805383b81e93f9777d5224b5c86ebe412f6261fb9fe943
6
+ metadata.gz: 2b25a577d6d1522b831eb78fb6d6d9af85f1e4d592cd16e2202b8e473376fdf69a87de56c52152a6d7eddf506f6635cf887bb4766680cb8f697ab12c50fab624
7
+ data.tar.gz: f8901d2a0187cbb81483a0a94334b32222ae254f08b97c0b1c1f58f39d53148871083b839a2a2e661ba94eb0783a4a399990306e7633a1cc6d3424861cd21408
data/CHANGELOG.md CHANGED
@@ -3,6 +3,71 @@ 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.7.3 (2022 Jan 17)
7
+ -------------------
8
+ * Get rid of unnecessary cache_prefix deprecation warnings.
9
+
10
+ 1.7.2 (2022 Jan 2)
11
+ -------------------
12
+ * Fix uninitialized constant error (occurring on some systems with v1.7.1).
13
+
14
+ 1.7.1 (2022 Jan 1)
15
+ -------------------
16
+ * Various bugfixes and refactorings.
17
+
18
+ 1.7.0 (2021 Oct 11)
19
+ -------------------
20
+ * Add support for Geoapify and Photo lookups (thanks github.com/ahukkanen).
21
+ * Add support for IPQualityScore IP lookup (thanks github.com/jamesbebbington).
22
+ * Add support for Amazon Location Service lookup (thanks github.com/mplewis).
23
+ * Add support for Melissa lookup (thanks github.com/ALacker).
24
+ * Drop official support for Ruby 2.0.x and Rails 4.x.
25
+
26
+ 1.6.7 (2021 Apr 17)
27
+ -------------------
28
+ * Add support for Abstract API lookup (thanks github.com/randoum).
29
+
30
+ 1.6.6 (2021 Mar 4)
31
+ -------------------
32
+ * Rescue from exception on cache read/write error. Issue warning instead.
33
+
34
+ 1.6.5 (2021 Feb 10)
35
+ -------------------
36
+ * Fix backward coordinates bug in NationaalregisterNl lookup (thanks github.com/Marthyn).
37
+ * Allow removal of single stubs in test mode (thanks github.com/jmmastey).
38
+ * Improve results for :ban_data_gouv_fr lookup (thanks github.com/Intrepidd).
39
+
40
+ 1.6.4 (2020 Oct 6)
41
+ -------------------
42
+ * Various updates in response to geocoding API changes.
43
+ * Refactor of Google Places Search lookup (thanks github.com/maximilientyc).
44
+
45
+ 1.6.3 (2020 Apr 30)
46
+ -------------------
47
+ * Update URL for :telize lookup (thanks github.com/alexwalling).
48
+ * Fix bug parsing IPv6 with port (thanks github.com/gdomingu).
49
+
50
+ 1.6.2 (2020 Mar 16)
51
+ -------------------
52
+ * Add support for :nationaal_georegister_nl lookup (thanks github.com/opensourceame).
53
+ * Add support for :uk_ordnance_survey_names lookup (thanks github.com/pezholio).
54
+ * Refactor and fix bugs in Yandex lookup (thanks github.com/iarie and stereodenis).
55
+
56
+ 1.6.1 (2020 Jan 23)
57
+ -------------------
58
+ * Sanitize lat/lon values passed to within_bounding_box to prevent SQL injection.
59
+
60
+ 1.6.0 (2020 Jan 6)
61
+ -------------------
62
+ * Drop support for Rails 3.x.
63
+ * Add support for :osmnames lookup (thanks github.com/zacviandier).
64
+ * Add support for :ipgeolocation IP lookup (thanks github.com/ahsannawaz111).
65
+
66
+ 1.5.2 (2019 Oct 3)
67
+ -------------------
68
+ * Add support for :ipregistry lookup (thanks github.com/ipregistry).
69
+ * Various fixes for Yandex lookup.
70
+
6
71
  1.5.1 (2019 Jan 23)
7
72
  -------------------
8
73
  * Add support for :tencent lookup (thanks github.com/Anders-E).
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