From e30be3144d549bafa8cff4d35ffaac6465c6aebe Mon Sep 17 00:00:00 2001 From: Josh Crews Date: Thu, 15 Jul 2010 08:00:34 -0500 Subject: [PATCH] return 0s if OVER_QUERY_LMIT --- lib/google_directions.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/google_directions.rb b/lib/google_directions.rb index 5688a7a..010fb17 100644 --- a/lib/google_directions.rb +++ b/lib/google_directions.rb @@ -31,7 +31,7 @@ def xml_call end def drive_time_in_minutes - if @status == "NOT_FOUND" + if @status == "NOT_FOUND" or @status == "OVER_QUERY_LIMIT" drive_time = 0 else doc = Nokogiri::XML(@xml) @@ -41,7 +41,7 @@ def drive_time_in_minutes end def distance_in_miles - if @status == "NOT_FOUND" + if @status == "NOT_FOUND" or @status == "OVER_QUERY_LIMIT" distance_in_miles = 0 else doc = Nokogiri::XML(@xml)