Skip to content
Snippets Groups Projects
Commit 3861da95 authored by Luke Wendling's avatar Luke Wendling
Browse files

fix regexp match in yahoo lookup to use xml boundary instead of newlines....

fix regexp match in yahoo lookup to use xml boundary instead of newlines. fixes broken lookup unit test
parent b5d89488
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ module Geocoder::Lookup
if raw_data.match /^<\?xml/
if raw_data.include?("Rate Limit Exceeded")
raise_error(Geocoder::OverQueryLimitError) || warn("Over API query limit.")
elsif raw_data =~ /\n(.*Please provide valid credentials.*)\n/
elsif raw_data =~ /<yahoo:description>(Please provide valid credentials.*)<\/yahoo:description>/i
raise_error(Geocoder::InvalidApiKey) || warn("Invalid API key. Error response: #{$1}")
end
else
......
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