geokit 1.13.1 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +22 -0
  3. data/.hound.yml +1 -1
  4. data/.rubocop.yml +28 -20
  5. data/CHANGELOG.md +8 -0
  6. data/README.markdown +8 -9
  7. data/Rakefile +1 -1
  8. data/fixtures/vcr_cassettes/bing_full.yml +1 -1
  9. data/fixtures/vcr_cassettes/bing_full_au.yml +1 -1
  10. data/fixtures/vcr_cassettes/bing_full_de.yml +1 -1
  11. data/fixtures/vcr_cassettes/opencage_reverse_cerdanyola.yml +47 -0
  12. data/fixtures/vcr_cassettes/test_component_filtering_with_special_characters.yml +126 -0
  13. data/geokit.gemspec +4 -5
  14. data/lib/geokit/geo_loc.rb +8 -6
  15. data/lib/geokit/geocoders/bing.rb +1 -1
  16. data/lib/geokit/geocoders/ca_geocoder.rb +2 -1
  17. data/lib/geokit/geocoders/fcc.rb +1 -0
  18. data/lib/geokit/geocoders/google.rb +3 -1
  19. data/lib/geokit/geocoders/opencage.rb +4 -0
  20. data/lib/geokit/geocoders/openstreetmap.rb +1 -0
  21. data/lib/geokit/geocoders/yahoo.rb +4 -1
  22. data/lib/geokit/geocoders/yandex.rb +1 -1
  23. data/lib/geokit/geocoders.rb +12 -2
  24. data/lib/geokit/mappable.rb +13 -6
  25. data/lib/geokit/multi_geocoder.rb +1 -0
  26. data/lib/geokit/version.rb +1 -1
  27. data/test/coverage_loader.rb +1 -1
  28. data/test/helper.rb +1 -1
  29. data/test/test_bing_geocoder.rb +4 -4
  30. data/test/test_ca_geocoder.rb +8 -0
  31. data/test/test_fcc_geocoder.rb +1 -0
  32. data/test/{test_geoloc.rb → test_geo_loc.rb} +1 -0
  33. data/test/test_google_geocoder.rb +15 -1
  34. data/test/test_ip_api_geocoder.rb +1 -1
  35. data/test/test_ipstack_geocoder.rb +1 -1
  36. data/test/test_multi_geocoder.rb +7 -4
  37. data/test/test_multi_ip_geocoder.rb +3 -1
  38. data/test/test_opencage_geocoder.rb +34 -3
  39. data/test/test_openstreetmap_geocoder.rb +2 -0
  40. data/test/test_yandex_geocoder.rb +5 -5
  41. metadata +16 -19
  42. data/.travis.yml +0 -12
  43. data/fixtures/vcr_cassettes/free_geo_ip_geocode.yml +0 -36
  44. data/lib/geokit/geocoders/free_geo_ip.rb +0 -36
  45. data/test/test_free_geo_ip_geocoder.rb +0 -21
@@ -1,21 +0,0 @@
1
- require File.join(File.dirname(__FILE__), 'helper')
2
-
3
- class FreeGeoIpGeocoderTest < BaseGeocoderTest #:nodoc: all
4
- def setup
5
- super
6
- @ip = '74.125.237.209'
7
- end
8
-
9
- def assert_url(expected_url)
10
- assert_equal expected_url, TestHelper.last_url.gsub(/&oauth_[a-z_]+=[a-zA-Z0-9\-. %]+/, '').gsub('%20', '+')
11
- end
12
-
13
- def test_free_geo_ip_geocode
14
- url = "http://freegeoip.net/xml/#{@ip}"
15
- res = geocode(@ip, :free_geo_ip_geocode)
16
- assert_url url
17
- assert_equal res.city, 'Mountain View'
18
- assert_equal res.state, 'CA'
19
- assert_equal res.country_code, 'US'
20
- end
21
- end