Skip to content
Snippets Groups Projects
Commit 0678ae8f authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix -u and -j CLI options.

Were not returning correct results for reverse or IP address geocoding.
parent ce6b4b0a
No related branches found
No related tags found
No related merge requests found
......@@ -64,12 +64,16 @@ module Geocoder
end
if show_url
out << Geocoder.send(:lookup).send(:query_url, query) + "\n"
lookup = Geocoder.send(:lookup, query)
reverse = lookup.send(:coordinates?, query)
out << lookup.send(:query_url, query, reverse) + "\n"
exit 0
end
if show_json
out << Geocoder.send(:lookup).send(:fetch_raw_data, query) + "\n"
lookup = Geocoder.send(:lookup, query)
reverse = lookup.send(:coordinates?, query)
out << lookup.send(:fetch_raw_data, query, reverse) + "\n"
exit 0
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment