Skip to content

Commit

Permalink
Remove references to legacy Google Places Search fields (#1629)
Browse files Browse the repository at this point in the history
Don't send legacy Google Places Search fields
  • Loading branch information
BytewaveMLP authored Aug 17, 2023
1 parent b895195 commit dea7aa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/geocoder/lookups/google_places_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ def fields(query)
end

def default_fields
legacy = %w[id reference]
basic = %w[business_status formatted_address geometry icon name
photos place_id plus_code types]
contact = %w[opening_hours]
atmosphere = %W[price_level rating user_ratings_total]
format_fields(legacy, basic, contact, atmosphere)
format_fields(basic, contact, atmosphere)
end

def format_fields(*fields)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/lookups/google_places_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_google_places_search_query_url_always_uses_https

def test_google_places_search_query_url_contains_every_field_available_by_default
url = lookup.query_url(Geocoder::Query.new("some-address"))
fields = %w[id reference business_status formatted_address geometry icon name
fields = %w[business_status formatted_address geometry icon name
photos place_id plus_code types opening_hours price_level rating
user_ratings_total]
assert_match(/fields=#{fields.join('%2C')}/, url)
Expand Down

0 comments on commit dea7aa8

Please sign in to comment.