Skip to content

Commit

Permalink
Removing geocoder.us. Changing api_key to key for IP-API, similar to …
Browse files Browse the repository at this point in the history
…other geocoders.
  • Loading branch information
ryankopf committed Feb 2, 2023
1 parent f91a537 commit 6078af7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ Style/Documentation:
- 'lib/geokit/geocoders/fcc.rb'
- 'lib/geokit/geocoders/geocodio.rb'
- 'lib/geokit/geocoders/google.rb'
- 'lib/geokit/geocoders/us_geocoder.rb'
- 'lib/geokit/geocoders/yahoo.rb'
- 'lib/geokit/inflectors.rb'
- 'lib/geokit/lat_lng.rb'
Expand Down Expand Up @@ -182,7 +181,6 @@ Layout/ExtraSpacing:
- 'lib/geokit/geocoders/yahoo.rb'
- 'test/test_mappable.rb'
- 'test/test_opencage_geocoder.rb'
- 'test/test_us_geocoder.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
Expand Down Expand Up @@ -239,7 +237,6 @@ Style/MutableConstant:
- 'test/test_geo_plugin_geocoder.rb'
- 'test/test_ipgeocoder.rb'
- 'test/test_net_adapter.rb'
- 'test/test_us_geocoder.rb'

# Offense count: 10
# Cop supports --auto-correct.
Expand Down
5 changes: 0 additions & 5 deletions test/test_multi_geocoder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ def test_failover
def test_double_failover
Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@failure)
Geokit::Geocoders::BingGeocoder.expects(:geocode).with(@address).returns(@failure)
Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address).returns(@success)
assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@address)
end

def test_failure
Geokit::Geocoders::GoogleGeocoder.expects(:geocode).with(@address).returns(@failure)
Geokit::Geocoders::BingGeocoder.expects(:geocode).with(@address).returns(@failure)
Geokit::Geocoders::UsGeocoder.expects(:geocode).with(@address).returns(@failure)
assert_equal @failure, Geokit::Geocoders::MultiGeocoder.geocode(@address)
end

Expand Down Expand Up @@ -66,14 +64,12 @@ def test_reverse_geocode_failover
def test_reverse_geocode_double_failover
Geokit::Geocoders::GoogleGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
Geokit::Geocoders::BingGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
Geokit::Geocoders::UsGeocoder.expects(:reverse_geocode).with(@latlng).returns(@success)
assert_equal @success, Geokit::Geocoders::MultiGeocoder.reverse_geocode(@latlng)
end

def test_reverse_geocode_failure
Geokit::Geocoders::GoogleGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
Geokit::Geocoders::BingGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
Geokit::Geocoders::UsGeocoder.expects(:reverse_geocode).with(@latlng).returns(@failure)
assert_equal @failure, Geokit::Geocoders::MultiGeocoder.reverse_geocode(@latlng)
end

Expand All @@ -97,7 +93,6 @@ def test_reverse_geocode_with_blank_latlng
def test_custom_provider_order
Geokit::Geocoders::YahooGeocoder.expects(:geocode).with(@address, {}).returns(@success)
Geokit::Geocoders::GoogleGeocoder.expects(:geocode).never
Geokit::Geocoders::UsGeocoder.expects(:geocode).never
assert_equal @success, Geokit::Geocoders::MultiGeocoder.geocode(@address, provider_order: [:yahoo, :google, :us])
end

Expand Down

0 comments on commit 6078af7

Please sign in to comment.