Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Location Service adapter does not store raw response in @data #1621

Open
woodhull opened this issue Jun 29, 2023 · 1 comment
Open

AWS Location Service adapter does not store raw response in @data #1621

woodhull opened this issue Jun 29, 2023 · 1 comment

Comments

@woodhull
Copy link

Expected behavior

While using AWS Location Service adapter, it should be possible to access the data property of responses using the data accessor.

Actual behavior

Geocoder::Result::AmazonLocationService stores the response in a @place variable while the base class expects the variable to be named @data

https://github.com/alexreisner/geocoder/blob/master/lib/geocoder/results/amazon_location_service.rb
vs
https://github.com/alexreisner/geocoder/blob/master/lib/geocoder/results/base.rb#L6

Steps to reproduce

Geocode results from AWS Location service are correct for the common attributes, but calling data always returns nil.

Environment info

  • Geocoder version:
  • Rails version:
  • Database (if applicable):
  • Lookup (if applicable):
@alexreisner
Copy link
Owner

Whoops! Thanks for this. The Result class should not define an initialize method. Open to a pull request. (cc @mplewis)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants