bin/barometer in barometer-0.7.1 vs bin/barometer in barometer-0.7.2
- old
+ new
@@ -51,11 +51,11 @@
require 'date'
require 'yaml'
# file where API keys are stored
KEY_FILE = File.expand_path(File.join('~', '.barometer'))
-BAROMETER_VERSION = '0.7.1'
+BAROMETER_VERSION = '0.7.2'
class App
attr_reader :options
@@ -447,21 +447,10 @@
pretty_info(weather)
div("-")
end
end
-def geocode_google_key_message
- puts
- puts "MISSING KEYS !!!"
- puts "Please update the key_file '#{KEY_FILE}' with your google api key"
- puts "Get it here: http://code.google.com/apis/maps/signup.html"
- puts "Then, add this line to the file:"
- puts "google:"
- puts " geocode: YOUR_KEY_KERE"
- puts
-end
-
def weather_key_message
puts
puts "MISSING KEYS !!!"
puts "Please update the key_file '#{KEY_FILE}' with your weather api keys"
puts "Get it here: ???"
@@ -487,18 +476,11 @@
if File.exists?(KEY_FILE)
keys = YAML.load_file(KEY_FILE)
if keys["yahoo"] && keys["yahoo"]["app_id"]
Barometer.yahoo_placemaker_app_id = keys["yahoo"]["app_id"]
end
- if keys["google"] && keys["google"]["geocode"]
- Barometer.google_geocode_key = keys["google"]["geocode"]
- else
- geocode_google_key_message
- exit
- end
else
- File.open(KEY_FILE, 'w') {|f| f << "google: geocode: YOUR_KEY_KERE" }
- geocode_google_key_message
+ File.open(KEY_FILE, 'w') {|f| f << "yahoo: app_id: YOUR_KEY_KERE" }
exit
end
# Create and run the application
app = App.new(ARGV, STDIN)