From 9013d2807ba641803a4e0ff289601bebd685347e Mon Sep 17 00:00:00 2001 From: Laurent Arnoud Date: Mon, 1 Aug 2011 16:00:10 +0200 Subject: [PATCH] GOOGLE_MAPS_API_KEY is not needed https://code.google.com/intl/fr/apis/maps/documentation/directions/ Note: The Google Directions API does not require a Maps API key! Signed-off-by: Laurent Arnoud --- lib/google_directions.rb | 1 - test/test_helper.rb | 3 --- 2 files changed, 4 deletions(-) diff --git a/lib/google_directions.rb b/lib/google_directions.rb index b594cf9..b15cc39 100644 --- a/lib/google_directions.rb +++ b/lib/google_directions.rb @@ -9,7 +9,6 @@ def initialize(location_1, location_2) @location_1 = location_1 @location_2 = location_2 options = "origin=#{transcribe(@location_1)}&destination=#{transcribe(@location_2)}" - options += "&key=#{GOOGLE_MAPS_API_KEY}" if defined?(GOOGLE_MAPS_API_KEY) @xml_call = @base_url + options @status = find_status end diff --git a/test/test_helper.rb b/test/test_helper.rb index decab25..8521d9a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,6 +4,3 @@ $:.unshift File.expand_path('../lib', __FILE__) require 'google_directions' - -GOOGLE_MAPS_API_KEY = "afakeapithatworksanyway" -