diff --git a/config.ru b/config.ru index 14b2ecf..496e30e 100755 --- a/config.ru +++ b/config.ru @@ -1,2 +1,3 @@ +# config.ru require './main' -run Sinatra::Application +run BaseApp \ No newline at end of file diff --git a/crazy.rb b/crazy.rb deleted file mode 100644 index fc25fa3..0000000 --- a/crazy.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'httparty' -def call_google_places_api(url) - - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) -end - -details_url = "https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJV0NDSTZaQIgR6LAM3obIkpI&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" -details_result = call_google_places_api(details_url) - -puts (details_result['result']['opening_hours']['periods'])[0] - diff --git a/dataaccess.rb b/dataaccess.rb deleted file mode 100644 index b1155a4..0000000 --- a/dataaccess.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'aws-sdk-core/dynamodb' - -class Dataaccess - - attr_reader :restaurantName - - def initialize(restaurantName) - restaurantName = restaurantName - end - - # dynamo_db = Aws::DynamoDB.new(); - #dynamo_db - # dynamo_db = Aws::DynamoDB.new( - # :access_key_id => '', - # :secret_access_key => ''); - # # DB = DynamoDB.new - # TABLES = {} - # - # { - # "restaurants" => { - # hash_key: {timeline_id: :string}, - # range_key: {created_at: :number} - # }, - # "users" => { - # hash_key: {id: :string} - # } - # }.each_pair do |table_name, schema| - # begin - # TABLES[table_name] = DB.tables[table_name].load_schema - # rescue ResourceNotFoundException - # table = DB.tables.create(table_name, 10, 5, schema) - # print "Creating table #{table_name}..." - # sleep 1 while table.status == :creating - # print "done!\n" - # TABLES[table_name] = table.load_schema - # end - # end - -end - -get '/dataaccess' do - # @restaurant = params[:restaurant] - dataaccess = Dataaccess.new(params[:restaurant]); - # "Hello World" -end diff --git a/db.rb b/db.rb deleted file mode 100644 index f472ade..0000000 --- a/db.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'data_mapper' - -#DataMapper.setup(:default, 'mysql://user:password@hostname/database') -DataMapper.setup(:default, "mysql://" + ENV['RDS_USERNAME'] + ":" + ENV['RDS_PASSWORD'] + "@" + ENV['RDS_HOSTNAME'] + "/" + ENV['RDS_DB_NAME']) - - -class DataStuff - - include DataMapper::Resource - property :id, Serial - property :name, String - -end - -DataMapper.finalize - -get '/db' do - DataStuff.auto_migrate! - - d = DataStuff.new - d.save -end \ No newline at end of file diff --git a/main.rb b/main.rb index 11158d7..41c3ca4 100755 --- a/main.rb +++ b/main.rb @@ -1,38 +1,33 @@ require 'sinatra' #require 'sinatra/reloader' if development? -#require 'json' require 'httparty' -require './places' -require './maps' -require './weathers' require 'pp' -# require './db' +require 'json' + + +require_relative 'routes/maps' +require_relative 'routes/places' +require_relative 'routes/weathers' + +class BaseApp < Sinatra::Base + configure do + set :sessions, true + use Rack::Session::Cookie, :key => 'rack.session', + :domain => 'localhost', + :path => '/', + :expire_after => 2592000, + :secret => 'M3ga8yt3 5tuff', + :old_secret => 'M3ga8yt3 5tuff' + set :views, 'views' + set :public_folder, 'public/app' + set :root, File.dirname(__FILE__) + end + + # Print out what you are running + puts "You are currently running: " + ENV['RACK_ENV'] + + register Sinatra::Routing::Places + register Sinatra::Routing::Maps + register Sinatra::Routing::Weathers -configure do - set :root, File.dirname(__FILE__) - set :public_folder, "public/app" -end - -get '/' do - -File.read("public/app/index.html") - -end - -get "/.well-known/acme-challenge/:id" do -"CqD-ZW-Uqkj3u0HwalQnMURLuymOXJXPLpGCqreyl3I.-UoHTrge-mXXavQ8aYtOhEYdvB2ZXHoqKXfHqlwppnc" -end - - - -get '/environment' do - if development? - "development" - elsif production? - "production" - elsif test? - "test" - else - "I don't know where the hell you are!" - end end diff --git a/maps.rb b/maps.rb deleted file mode 100755 index 470344e..0000000 --- a/maps.rb +++ /dev/null @@ -1,120 +0,0 @@ -class Maps - - attr_reader :lat, :lon - - def initialize(query) - @query = query - - #get_location - end - - def call_google_places_api(url) - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) - end - - def get_position - @query.gsub!(' ','%20') - puts @query - - url = "https://maps.googleapis.com/maps/api/geocode/json?address="+@query+"" - - parsed_result = call_google_places_api(url) - #pp parsed_result - - #pp parsed_result - parsed_result['results'].each do |result| - x = result['geometry']['location'] - @lat = x['lat'] - @lon = x['lng'] - # puts @lat - # puts @lon - end - end -end - -# class Weathers - -# attr_reader :lat, :lon, :weatherStatus - -# def initialize(lat, lon) -# @lat = lat -# @lon = lon - -# display_weather -# end - -# def call_open_weather_api(url) -# json_response = HTTParty.get(url).body -# return JSON.parse( json_response ) -# end - -# def display_weather - -# # url = "http://api.openweathermap.org/data/2.5/weather?lat="+@lat+"&lon="+@lon -# url = "http://api.openweathermap.org/data/2.5/weather?lat="+@lat+"&lon="+@lon+"&type=like&units=imperial" - -# parsed_weather_result = call_open_weather_api(url) - -# parsed_weather_result['weather'].each do |result| -# @description = result['description'] -# end - -# temp = parsed_weather_result['main']['temp'] - -# @weatherStatus = "It is currently #{temp} and #{@description} outside." - -# end -# end - - -# post '/maps' do -# @query = params[:locationinput] -# @mile = params[:radius] -# #@button = params[:button] -# -# settings = Maps.new(@query, @mile) -# -# @lat = settings.lat.to_s -# @lon = settings.lon.to_s -# -# place = Places.new(@lat, @lon) -# -# @address = place.address -# @phone_number = place.phone_number -# @name = place.name -# @rating = place.rating -# @placeid = place.placeid -# @addressformat = @address.gsub(' ','+') -# @open_now = place.open_now -# -# # weather = Weathers.new(@lat, @lon) -# -# # @weatherStatus = weather.weatherStatus -# -# erb :restaurant -# puts "IN MAPS!!!!!" -# pp params -# puts "leaving maps!!!" -# end -# -# get '/places' do -# @lat = params[:lat] -# @lon = params[:lon] -# -# place = Places.new(@lat, @lon) -# -# @address = place.address -# @phone_number = place.phone_number -# @name = place.name -# @rating = place.rating -# @placeid = place.placeid -# @addressformat = @address.gsub(' ','+') -# @open_now = place.open_now -# -# # weather = Weathers.new(@lat, @lon) -# -# # @weatherStatus = weather.weatherStatus -# -# erb :restaurant -# end diff --git a/maps.rb.orig b/maps.rb.orig deleted file mode 100755 index 852e608..0000000 --- a/maps.rb.orig +++ /dev/null @@ -1,209 +0,0 @@ -<<<<<<< HEAD -======= -class Places - - attr_reader :address, :phone_number, :name, :rating, :placeid, :open_now, :periods - - def initialize(lat, lon) - @lat = lat - @lon = lon - - parse_nearby_restaurants - - end - - def call_google_places_api(url) - - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) - end - - def parse_nearby_restaurants - - restaurants = Hash.new() - - #do a places search to get the name of restaurants and their place_id within a given radius - #search_url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="+ @lat + "," + @lon + "&radius=1000&types=food&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - search_url = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants&location="+ @lat + "," + @lon + "&radius=1000&types=restaurant&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - - - parsed_result = call_google_places_api(search_url) - - pp parsed_result - - parsed_result['results'].each do |result| - - restaurants[result['name']] = result['place_id'] - - end - - place_id = restaurants[restaurants.keys.sample] - - #do a details search to retrieve details about the selected location - details_url = "https://maps.googleapis.com/maps/api/place/details/json?placeid=" + place_id + "&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - - details_result = call_google_places_api(details_url) - - if details_result['result']['formatted_address'] != nil - @address = details_result['result']['formatted_address'] - end - - if details_result['result']['place_id'] != nil - @placeid = details_result['result']['place_id'] - end - - if details_result['result']['formatted_phone_number'] != nil - @phone_number = details_result['result']['formatted_phone_number'] - end - - if details_result['result']['name'] != nil - @name = details_result['result']['name'] - end - - if details_result['result']['rating'] != nil - @rating = details_result['result']['rating'] - end - - if details_result['result']['opening_hours']['open_now'] != nil - if details_result['result']['opening_hours']['open_now'] == true - @open_now = "Open now" - else - @open_now = "Closed" - end - else - @open_now = "No data" - end - - if details_result['result']['opening_hours']['periods'][Time.now.wday] != nil - @periods = details_result['result']['opening_hours']['periods'][Time.now.wday] - @periods = Time.parse(@periods['open']['time'].insert(2,":")).strftime("%I:%M%p")+ " - " + Time.parse(@periods['close']['time'].insert(2,":")).strftime("%I:%M%p") - end - - end -end - - ->>>>>>> ddb6b7f16d21fa96cd69879127d29139cc4797be -class Maps - - attr_reader :lat, :lon - - def initialize(query) - @query = query - - get_location - end - - def call_google_places_api(url) - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) - end - - def get_location - @query.gsub!(' ','%20') - puts @query - - url = "https://maps.googleapis.com/maps/api/geocode/json?address="+@query+"" - - parsed_result = call_google_places_api(url) - #pp parsed_result - - #pp parsed_result - parsed_result['results'].each do |result| - x = result['geometry']['location'] - @lat = x['lat'] - @lon = x['lng'] - # puts @lat - # puts @lon - end - end -end - -class Weathers - - attr_reader :lat, :lon, :weatherStatus - - def initialize(lat, lon) - @lat = lat - @lon = lon - - display_weather - end - - def call_open_weather_api(url) - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) - end - - def display_weather - - # url = "http://api.openweathermap.org/data/2.5/weather?lat="+@lat+"&lon="+@lon - url = "http://api.openweathermap.org/data/2.5/weather?lat="+@lat+"&lon="+@lon+"&type=like&units=imperial" - - parsed_weather_result = call_open_weather_api(url) - - parsed_weather_result['weather'].each do |result| - @description = result['description'] - end - - temp = parsed_weather_result['main']['temp'] - - @weatherStatus = "It is currently #{temp} and #{@description} outside." - - end -end - - -post '/maps' do - @query = params[:locationinput] - @mile = params[:radius] - #@button = params[:button] - - settings = Maps.new(@query, @mile) - - @lat = settings.lat.to_s - @lon = settings.lon.to_s - - place = Places.new(@lat, @lon) -# weather = Weather.new(@lat, @lon) - -# @weather = - @address = place.address - @phone_number = place.phone_number - @name = place.name - @rating = place.rating - @placeid = place.placeid - @addressformat = @address.gsub(' ','+') - @open_now = place.open_now - @periods = place.periods - - weather = Weathers.new(@lat, @lon) - - @weatherStatus = weather.weatherStatus - erb :restaurant - puts "IN MAPS!!!!!" - pp params - puts "leaving maps!!!" -end - -get '/places' do - @lat = params[:lat] - @lon = params[:lon] - - place = Places.new(@lat, @lon) - - @address = place.address - @phone_number = place.phone_number - @name = place.name - @rating = place.rating - @placeid = place.placeid - @addressformat = @address.gsub(' ','+') - @open_now = place.open_now - - weather = Weathers.new(@lat, @lon) - - @weatherStatus = weather.weatherStatus - - erb :restaurant -end - diff --git a/places.rb.orig b/places.rb.orig deleted file mode 100755 index c3623ad..0000000 --- a/places.rb.orig +++ /dev/null @@ -1,136 +0,0 @@ -class Places - - attr_reader :lat, :lon, :address, :phone_number, :name, :rating, :placeid, :open_now, :periods - - def initialize(lat, lon, radius=1600) - @lat = lat - @lon = lon - @radius = radius - - parse_nearby_restaurants - - end - - def call_google_places_api(url) - - json_response = HTTParty.get(url).body - return JSON.parse( json_response ) - end - - def parse_nearby_restaurants - - restaurants = Hash.new() - - #do a places search to get the name of restaurants and their place_id within a given radius - #search_url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location="+ @lat + "," + @lon + "&radius=1000&types=food&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - search_url = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants&location=" + @lat.to_s + "," + @lon.to_s + "&radius=" + @radius.to_s + "&types=restaurant&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - - - parsed_result = call_google_places_api(search_url) - - #pp parsed_result - - parsed_result['results'].each do |result| - - restaurants[result['name']] = result['place_id'] - - end - - place_id = restaurants[restaurants.keys.sample] - - #do a details search to retrieve details about the selected location - details_url = "https://maps.googleapis.com/maps/api/place/details/json?placeid=" + place_id + "&key=AIzaSyB3xKb4v0cK805_F1ApSX0Os0KS-XzDoO4" - - details_result = call_google_places_api(details_url) - - if details_result['result']['formatted_address'] != nil - @address = details_result['result']['formatted_address'] - end - - if details_result['result']['place_id'] != nil - @placeid = details_result['result']['place_id'] - end - - if details_result['result']['formatted_phone_number'] != nil - @phone_number = details_result['result']['formatted_phone_number'] - end - - if details_result['result']['name'] != nil - @name = details_result['result']['name'] - end - - if details_result['result']['rating'] != nil - @rating = details_result['result']['rating'] - end - - if details_result['result']['opening_hours']['open_now'] != nil - if details_result['result']['opening_hours']['open_now'] == true - @open_now = "Open now" - else - @open_now = "Closed" - end - else - @open_now = "No data" - end - - if details_result['result']['opening_hours']['periods'][Time.now.wday] != nil - @periods = details_result['result']['opening_hours']['periods'][Time.now.wday] - @periods = Time.parse(@periods['open']['time'].insert(2,":")).strftime("%I:%M%p")+ " - " + Time.parse(@periods['close']['time'].insert(2,":")).strftime("%I:%M%p") - end - end -end - - - -get '/places' do - lat = params[:lat] - lon = params[:lon] - - - @place = Places.new(lat, lon) - - # @address = place.address - # @phone_number = place.phone_number - # @name = place.name - # @rating = place.rating - # @placeid = place.placeid - # @addressformat = @address.gsub(' ','+') - # @open_now = place.open_now - erb :restaurant -end - -post '/places' do - query = params[:locationinput] - radius = params[:radius] - - - settings = Maps.new(query) - - - @place = Places.new(settings.lat, settings.lon, radius) - - erb :restaurant - -end - - -get '/places' do - @lat = params[:lat] - @lon = params[:lon] - - place = Places.new(@lat, @lon) - @address = place.address - @phone_number = place.phone_number - @name = place.name - @rating = place.rating - - erb :restaurant - - open_now = "" - - if result.include? "opening_hours" - result['opening_hours']['open_now'] == true ? open_now = "Open" : open_now = "Closed" - end - - @restaurant[result['name']] = open_now; -end diff --git a/routes/maps.rb b/routes/maps.rb new file mode 100755 index 0000000..b9af669 --- /dev/null +++ b/routes/maps.rb @@ -0,0 +1,43 @@ + +module Sinatra + module Routing + module Maps + +class Maps + + attr_reader :lat, :lon + + def initialize(query) + @query = query + + #get_location + end + + def call_google_places_api(url) + json_response = HTTParty.get(url).body + return JSON.parse( json_response ) + end + + def get_position + @query.gsub!(' ','%20') + puts @query + + url = "https://maps.googleapis.com/maps/api/geocode/json?address="+@query+"" + + parsed_result = call_google_places_api(url) + #pp parsed_result + + #pp parsed_result + parsed_result['results'].each do |result| + x = result['geometry']['location'] + @lat = x['lat'] + @lon = x['lng'] + # puts @lat + # puts @lon + end + end +end + + end + end +end \ No newline at end of file diff --git a/places.rb b/routes/places.rb similarity index 93% rename from places.rb rename to routes/places.rb index 39bd65b..264d933 100755 --- a/places.rb +++ b/routes/places.rb @@ -1,7 +1,7 @@ -require './weathers' -require 'json' - +module Sinatra + module Routing + module Places class Places attr_reader :lat, :lon, :address, :phone_number, :name, :rating, :placeid, :price_level, :open_now, :periods, :radius, :weekday_text @@ -106,7 +106,17 @@ def has_error end end -get '/places/:error' do +def self.registered(app) + +app.get '/' do + File.read("public/app/index.html") +end + +app.get "/.well-known/acme-challenge/:id" do + "CqD-ZW-Uqkj3u0HwalQnMURLuymOXJXPLpGCqreyl3I.-UoHTrge-mXXavQ8aYtOhEYdvB2ZXHoqKXfHqlwppnc" +end + +app.get '/places/:error' do @error = params[:error] @@ -114,7 +124,7 @@ def has_error end -get '/places' do +app.get '/places' do lat = params[:lat] lon = params[:lon] @@ -151,7 +161,7 @@ def has_error h.to_json end -post '/places' do +app.post '/places' do @json = JSON.parse(request.body.read) puts "IN PLACES" @@ -203,3 +213,12 @@ def has_error h.to_json end + + + + +end + + end + end +end \ No newline at end of file diff --git a/weathers.rb b/routes/weathers.rb similarity index 84% rename from weathers.rb rename to routes/weathers.rb index 069583c..be68ea4 100644 --- a/weathers.rb +++ b/routes/weathers.rb @@ -1,3 +1,6 @@ +module Sinatra + module Routing + module Weathers class Weathers attr_reader :lat, :lon, :description, :temperature @@ -38,14 +41,6 @@ def display_weather end end - -# #get '/weather' do -# @lat = params[:lat] -# @lon = params[:lon] -# -# weather = Weathers.new(@lat, @lon) -# @weatherStatus = weather.weatherStatus -# -# erb :weather -# -# end \ No newline at end of file + end + end +end diff --git a/test-json.bak b/test-json.bak deleted file mode 100644 index 62680d2..0000000 --- a/test-json.bak +++ /dev/null @@ -1 +0,0 @@ -{"html_attributions"=>[], "next_page_token"=>"CpQCBwEAAKwkVEvuBSm_FAsgdWKxAxI76Got9iD_k1C3iGl_jEN7DXB5DEvxvlpslQh8XNA_C-bQV-fjL3FnXXbNYhoVpokW9feS4co-LRwqLuipF4bX89R19k8FPL28gg6YWw4pL1vJurA9UKrtJHCwHAML1J28_O8knN0NmooDw4tS3W2xfbSdy6Vcju9C4wZ2juUZtbwnoxOoBJjlV3-FTwIaHJ9kXOks7CcQnOR988J54qEyMyyVbfyD_Di4BGFYon0hCPkiWFG4kHxjUb3WBf5_f-yNThU7j83IHfOLRmhMsme6nLHPjX_EN07NhW0atDLesXth2U-aJk5gM_XnbTR9nIVrCN-ANYEomKQgy8MUNwYZEhAQeQaYjBwOqs0cOBU90hMVGhSmupIAZc6ARIgwnFO64YidXZeqig", "results"=>[{"formatted_address"=>"2960 N Shoreline Blvd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.430402, "lng"=>-122.086137}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"ddddc3eaeb17ed9e160bc130c0934397ddfd67bb", "name"=>"Michaels At Shoreline", "opening_hours"=>{"open_now"=>false, "weekday_text"=>[]}, "photos"=>[{"height"=>1024, "html_attributions"=>["From a Google User"], "photo_reference"=>"CoQBdwAAAKgAHKVgwTeDP-9x3zlrNcYrAFC9qqxxVY09FbFNbzhdLOL0vZLKVbsaxMqq6wn3BqzTF3NQb5PvE4oh_4zasLhbsn3knAkeRrA4-Cqg9YQszn7Ts8fCsdT_qtwiLy11iMgLK-G-SxWWxrTPhUJxzSBJdq-cUUAPu02P6kjbrIvnEhC_2swapRUea8x4Sa-fcrFRGhREhIh5LP-aThBfxYP74jP11m37UQ", "width"=>768}], "place_id"=>"ChIJc8T8eAO6j4ARR1AWdP3Iyi8", "price_level"=>2, "rating"=>3.3, "reference"=>"CoQBdwAAAKIF-09WDGKpmAdtL4E0M9jlxgRzWUpUKkduCNvsXrmTwbLukudExJKjKeL6n_Ls8wfT6vWWUBEN4Uwv4V4qqC1T3SMaQn4hEtP4W7woGNIuCSdlvgROFxFOWQIcm7Agt9GjTapIVt487Gw7Ibd8Nbs5O-guOqA_w6oTWe4IlgdYEhDcUnarxWE-XAV6A5ILz7aPGhTcBIL_hCbmhonUExWZYaXlWXQtCA", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1159 N Rengstorff Ave, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.420956, "lng"=>-122.093343}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"0bcc1b956fb24beae439eccdc5db92ac3e2e87e6", "name"=>"In-N-Out Burger", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>250, "html_attributions"=>[], "photo_reference"=>"CnRnAAAA0Pq7F4iiTAgsy74C0V9YTc7lidODda9i31IrkBi1mJ9TJZFroh-ydfIzQ8KLUcxDeycmOnGe2-YCIfPclIqcaSSf63bG7o4c2SqIhrlabPWiQLjN79b7MZ6tQ16dj50zo-52ExK4CnpaZ9OvmekAKhIQaLTYxdghLQC4eOUlWy9gahoUYfp36LTPPjVRyCTlNJfn72_N4xQ", "width"=>250}], "place_id"=>"ChIJ5V-QXKiwj4ARv5e-BSB9fiA", "price_level"=>1, "rating"=>4.1, "reference"=>"CoQBcQAAANCH6xi-QFsA-v-F2-9gBd4ifW2RIV9R3HvDGsd6ilKqHy_MA04DFwOPhd1h1nlj3jD6y_VkcM-kvRTepjCMekNrId-aEzJDAJBVaaZvk-lP9gIOwtNmRQI_34TJraJEeHE7GbXrAphxHyFmBf5JKhnSzpCPTMFkSx2WULWPd2nAEhBFTUdjvpB6RaZPcNRvbrFVGhTzruYTdSQldXZSmQk3ReWcSLARHA", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"1477 Plymouth St, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.416192, "lng"=>-122.079516}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"215b193ed89625a4191f3f536cc6318753dcac9a", "name"=>"Sunny Bowl", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1224, "html_attributions"=>["Ryan Constantino"], "photo_reference"=>"CnRoAAAABwehaQqUdHIPR6bFd8aHNe2Q6ASkFtp9SRVx4RFvObBitUoXw9FuX4R2ujmA2L4ylBimom3JteBTTz0scxHzl6ICPTGCv5n1Jk0SNcmvd4Gi2KBtlRQVVmmTMETcY98SZxgNgszwwa7OgybhiPNPMRIQtzEeh_eVU2JgI82k5ywi3xoUwOnIO5QxRDy4EsgpusgoLO8K-7s", "width"=>1632}], "place_id"=>"ChIJDV-FJ_65j4ARkv4P3h176_E", "price_level"=>1, "rating"=>4.1, "reference"=>"CnRtAAAAQLVeUKL16EcG_yWHQ5sQ_HQa22whYTNure8BvDlnHn6Z4_TReqq6IO0K5n6fRJ-Ka0vagHFGHEr9YqpPwrEBaNhPK3gUtZ6-G1Mu0f5aGUEipAPJ29r64ql86XSFb28dI2b92amU0wUuosV-zA404BIQIWzx4v1aKHSq-RjY5chq_RoUyK9tsazKmV0CivxKwGOcWXu03fw", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"43 Amphitheatre Pkwy, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.42172, "lng"=>-122.084938}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"c5425dd8c484a295d36d0f55c8d3d01dc18e35a4", "name"=>"Go! Cafe", "place_id"=>"ChIJh8lHZgK6j4ARzsQzXj46ITI", "rating"=>4.3, "reference"=>"CnRqAAAAT7Vg8sQpLkzu_FF0uXfMEt2sRsdO7drvJO_LhGXyi6SzgOBzN7ZCqNjswdl1Kin4sbzx52JNqBTdb1YA6qlvShcpoallbFcxP7-RgKzluzLuTtfxykke1HubwTxbndJEI7keXlTDIR5K5-_3raMnxBIQPeJZnzfYuku5ml0SnxjudRoUd5PcrTR06xj1QZYyKLCVAHBdqu4", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"2000 Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.422654, "lng"=>-122.088655}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"5e8b5c12216d05f69673f742a02bdb0317761c12", "name"=>"Long Life Cafe", "opening_hours"=>{"open_now"=>false, "weekday_text"=>[]}, "photos"=>[{"height"=>2448, "html_attributions"=>["Haruko Ishikawa"], "photo_reference"=>"CoQBdQAAAK0G8ZtZoDlBGNX8fmZ2Z0ZSoztQH0mcNW53LDVh7PjsSjYjOe1-ExVEKQngBwVrjj9i4MYHCct877cONUaWAA7486WVFlAT9lyETanvr_5htG6P-_Nd9XH3Nwmgok0GHCU9Jfr4Sz4m3lBWnOPYGw8VWBl-h79oDNht2EukO1UBEhD31UYm9a0Ma_yaWTvZdujtGhRRKwLJIn1K32Cm29zKEWzkaLfFNQ", "width"=>3264}], "place_id"=>"ChIJ6xS7RAO6j4ARbjFzE2toxSo", "rating"=>4.6, "reference"=>"CnRwAAAA7FVXJcQzoFB_Ei2NHRq3n93DFmXXdMqyzn4lFwxJUhPuyhlDQKIXAEF37EESMhy-VrCEy6_rw0FYTUuVLPqnQSzr7nkkbVqNvtVRVtMDWNARsusMaXrWE7XS39zkSl7-d2Jpqsdw3V9Vzq1GGYF6EhIQ3yHyCxesrT7fGq_faiU22xoUFk90lVIWBaVxeJ3B93P--s8CzUo", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1060 N Rengstorff Ave, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.419367, "lng"=>-122.093553}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"ee0f1db6d5eb1b5188d6961d119f4f72ad2713bc", "name"=>"McDonald's", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1600, "html_attributions"=>[], "photo_reference"=>"CnRnAAAAbo7-_vFptKwalpuFo5SpM96Bgz4qjS_HAfIY_as17m4RtnxTwmPENDWpwWGnZItjIrffIYjighATnM-ThglbDTZltNYQ-TC3-WPw9jfCMOnfOrBlxsvdZE_Lftm9iqYR811qaP6INuH_6iQ-q-j8vBIQYzaUU3wEAJu7159fw63PaRoUryG-QYzgQO51O-wfZiXw-k9No-8", "width"=>2400}], "place_id"=>"ChIJExCjcwW6j4ARUQSvgDSrlJs", "rating"=>3.4, "reference"=>"CnRtAAAAS0-4lMYOPpboIzja2Whowl5GbpGg_wZ0oqEhNw7E0_VazIZp3Hlqy4Exhagm4vaAJhBmaZoQQNwa-nqzyzf4MOB4Mw4ni2H-XW1W93N4Jc8paWdXWtkr0qh31PH-pjdd532EtzG2WCMTbO7B9STYlxIQTYc82_ma3GcpmLe5zSwfxRoU_8VsBN7B28GHGicDgcOgtBtmNN0", "types"=>["meal_takeaway", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1477 Plymouth St, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.416192, "lng"=>-122.079528}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"94374ee08fe61222ca6596e68675891e2a2867fd", "name"=>"Falafel & Kebab", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>480, "html_attributions"=>[], "photo_reference"=>"CnRvAAAAmH_vo3lr54pH_PiRWRkAcbNw7fWR4bdS6JUO9sdLGMa2_Fuw1YAEd7cIu7FTLkzelVXF1ftFQijYytQY4gDeig4q8upo-poVEs8g5EuuWHmAKmH-bVzZoG4KUt6hxgUG1XmlvaPzEFEVSg4Jx3gDpxIQHNUVKhk3gNv0GPrH5xK7VxoUo5sARLyu0lcmAED7X85RRZPBxcQ", "width"=>481}], "place_id"=>"ChIJFQmgjFW3j4ARxNT5qklJ998", "rating"=>3.5, "reference"=>"CoQBcgAAAPsVUUL43p12JEpHEh9kw-wh54Sa1K6VDWEiHkdDt5pBdV_VXHiiYeZELJn0bPq2dD8og5beIrFNmy_HzRxvDUpcD_lbGsjNAplH8NG9HBdg1Qckt2j2hEO0-rMo4uCSvI26duzNWtsVDXRwq_eoCTOZASBUu1fDDgV4K9gNJ-2eEhAP197aymH-55zg7daGZE0BGhSMylUGuIYyf3Fb5-TrXfK21Bst0g", "types"=>["restaurant", "meal_delivery", "food", "establishment"]}, {"formatted_address"=>"1477 Plymouth St, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.416219, "lng"=>-122.079542}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"864b1a8f01d483cde18d3dadd0fc2dc227ab2bfa", "name"=>"Subway", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1600, "html_attributions"=>[], "photo_reference"=>"CnRnAAAALEmnI1AlN3AVoiIzZeW4HnX-5i_lATiaf5jtPoJGVZG1LpihnY3zIVE-ExbTcfACpDlwMicLsTp2sKJDKyZUwHdqEl753ZOPtb3dl31Nx6_98jPTu9j7B78NQD_hnjt3JYsugDTrILQodp6tB1uZLRIQUW1logkt2gYRDJ-d3oWNjhoUKbYyLkXD_D9yjEwXsj97vrpBQ7A", "width"=>2400}], "place_id"=>"ChIJVxRE8VW3j4ARMggIiLi-e0A", "price_level"=>1, "rating"=>3.2, "reference"=>"CnRoAAAAOWI5WJj0D-3LmHUm6eP77ATyILkoyppglNTxvY4tKwDBAZIJYN95gcIIB62yPymZjTNWyktxdsa0XQQRS1_eErTSlPjhf9LYdkRlVAXNyaiH4mUucCe5DiEu4dX446TFR9xXbjxgX4d6DlzkZ8hEnRIQNjfCoR3pNuu72-Dn8em90RoUoK4d-dgvZ4dZO3O4yE4e3xKRQ3A", "types"=>["meal_takeaway", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1900 Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.422781, "lng"=>-122.08756}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"b325465784b1bc438a6c9c087753e879157f1e01", "name"=>"Big Table Cafe", "photos"=>[{"height"=>3264, "html_attributions"=>["Naydia Chantar"], "photo_reference"=>"CqQBkQAAADknWVCkG7ecIvsbx1csJS0xXEerUMIMMLEDPyr02tMngaYri6B9_qgomIWYk4Yh0UzDnFxs0YOy8nJu41_gYZFI_CON7eaRkZi5FIocnrNSYVphAskM3lhzq7GVfqA7kDJGf9mnc7j0ayeX6WjQ3wpXGthQ6Gr8aHoC-g3wILlH6WrXkQJ6st0Ar3Yjdzh887Y3uhaiauZVxnW1WkhCOo4SEA4WF3QFcDBVBNYViO6ePWEaFDJ6NOE5WSHi7hVD47V74dAM-TYN", "width"=>2448}], "place_id"=>"ChIJrUmuPQO6j4ARYeGtbzgY8Es", "rating"=>4.2, "reference"=>"CnRwAAAAMVrG2BQua3f_giUfm3CVa5DFf6QPxrDh1AI0yLV_iEu1UjGmrwsX5MagtqwbgYut_ZshvKGUoqcq0FLtmcmQa2JY3C6tSNmcVydVlYeVCogPxBfd1Te4sQdUEDA6fRhWo0TCuK0hDmveXTcT7hWooxIQmlMH91Hmmld-UZ7AhWMp9RoUa_pa745EFsCxVIua6p_Zb80KjRE", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1390 Pear Ave, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.415984, "lng"=>-122.077539}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/bar-71.png", "id"=>"0af22593a0631b2fcb10608e98a43eb47ed00f1d", "name"=>"Cucina Venti", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1023, "html_attributions"=>[], "photo_reference"=>"CnRoAAAAbpSCHEtkKIZndez1tcSdOZjWgExElC1vu14yKaLF7zcZ1-cIqbLTir_tH9nYaZPd_RKFdelfghPMteVtFfPQhCgf0Qo6QR0ibOxKL5BVNw-oBwvmtOlx5u_1FWto0_IpQAJbjCmGme0JGW8mY0h_lhIQpVysbfZztLXoRli9QmZHZRoUIeutYXCmgHg98gj8_HvB1hdxFwo", "width"=>1023}], "place_id"=>"ChIJC_3cdla3j4ARMgf4Pw8Irek", "price_level"=>2, "rating"=>3.5, "reference"=>"CnRvAAAAucNiFsLiBHI-5pXREDdXrTY5Cs04gvNccqLKvnswiJSXQ8cruZ8tug0mWCNeIWqyPB6WLF2DOydnK4PzXGqG3g8NQ3xJkEDasad1k-SomPEL-AOiFEt_VRORMs-cYebdaQ9XwVPUus9Z62Hj7yYBMxIQPb0oPKeh0M1pQ7NXpVj2EhoUCzq8fU6zppw_6NJLdjViKq3MrCM", "types"=>["bar", "restaurant", "food", "establishment"]}, {"formatted_address"=>"3160 N Shoreline Blvd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.432709, "lng"=>-122.088128}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"1ccf4c435b36b8f7c4aa3e764bad86be4feea4a2", "name"=>"Shoreline Lake Aquatic Center & Café", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1601, "html_attributions"=>[], "photo_reference"=>"CnRnAAAA8DZE37Yd1bSPEpESD-A_SI0JnmJJIF3QhOms67adCljp6T6B09qG7EF9C_IiXjl0wovTSUVl6lBJuHwXE0W9MJQiQWwQ9SLegxLcwPD85B4yuQ_D_MSpw4FsdhpO16AFGRxKuMMMvkbPJmO1HLUFpxIQJOIbi74JYr84ONE9vNPKSxoUuXzXqZb-3S4DdByxQTMlbWbI_xQ", "width"=>2048}], "place_id"=>"ChIJXZ90qR-6j4ARpoybjcul7w4", "rating"=>4.5, "reference"=>"CpQBhwAAAA5oKeiNSxXayvqm8qRErezSwvt0ubjjrD_gaG3nNlx0Fltom9kcrciWNaFNvVO8E_ROI9jsLcYj4WuiPiGQgud74OpzG8d00VKX-nFdkcnZdXWkrt6DwR2EOwHY1fdV9LENu8k3A8Sr0L-VUUFFVgg5nA3SBWm0i5JPEPNzFra56pTfcTEMTNMvk2IbjUT_IhIQFWSg8Cn5D_6vul9mhNiYJhoUEYVMtL9qsTQGCh1oxofHzrP5F8I", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"2400 Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.421914, "lng"=>-122.096525}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"0946a0883f1dea7fb2ba1d3707ad9e3a9799a45a", "name"=>"Chipotle Mexican Grill", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>113, "html_attributions"=>[], "photo_reference"=>"CnRlAAAAlXa80CUrq2XHZm9FNa7ATdEuDDex4WUHMCR3h7DzkNrdurFDYR7f5jq0zR-omOfusUQKBFKy5gyH2d3JLrChVv9qatI0nsdrP-6ZZHhuNft0oAsmbQCWxyHLhY7EALYi1Ng64n7G0iIo_cN2xJbc6RIQZ0CAs3pDQu23AXPIV_668BoUVgtY4_vCMyy2JvOvk0uiKJeNUt8", "width"=>113}], "place_id"=>"ChIJY1FiPRC6j4ARzhKBypjO7eg", "price_level"=>1, "rating"=>3.9, "reference"=>"CoQBeQAAAPMHiw2f2UMoh1d6GkpM1Q88lSwLzCcWLwIqfeqT4EkCIsb3yOgzlG9EsxjxTjBcZYcDtIGnkFmGyy3e7CYPdr9Foz6Qym43jlV_St9xNKKkkrbtTGRsB3LSHP0RNdAXMmq-upJ4eWAw0XCijV62b-sObMNKM9CAJen32aJZZ_PyEhDkv5CqPmCa_-Uck0ZzP39KGhQpK4kIX00WjvJUzprE1LNtsLpAtQ", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"1585 Charleston, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.420063, "lng"=>-122.082307}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"a256623993ce6b8f33add6a029e8ae1ffb93e1a2", "name"=>"Cafe Moma", "photos"=>[{"height"=>1077, "html_attributions"=>["Nikala Hatfield"], "photo_reference"=>"CpQBjQAAAMiTmfedBD0nmyzAx-5tHYs8sSLzRJhm7rCsT8DvGBa4EGc89ISSDdzNpVjMWloQaOZxIBP9pSRBQYGBPOlbPH6Q29LV2gs0naMoTPmSONccs6VLgApAkGiUC7klnUrDoAl8_EgkaB1MYauLs4tM1Fnq0DHTjAaCQScwUUHOooGYd25WnZ2j3YLMSdb-3GpINRIQBGblG92HkDLlk75MNYy5wxoU10s6c6FZQabalbDjB5tP4o1csRY", "width"=>1643}], "place_id"=>"ChIJOYz8N_-5j4ARGju9G_lCIk8", "rating"=>4.4, "reference"=>"CnRrAAAAg3Dee8EAHqX3Uao1wR_cBoZ4uOC05mu8xDH9JIuOkNGZwvpG7ugyjSbJH8k2KCmwvPmr7YynVf081eWL65KbnL2rYLsr3rdXTvc_VUthmmmCjUsk7HxR-yVPeKZUxJn9xPKNB0LW3FSoSX1o4f4t-xIQIyKyeG153Kj9_SRWBGbzJRoU6M1lM-4vZmplMaGuyXW2RwTeSuk", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1020 N Rengstorff Ave, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.419886, "lng"=>-122.096088}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"006e33904b2f6da68180ea0ded29b7649c8fdf90", "name"=>"Rengstorff Pho, LLC", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>2432, "html_attributions"=>["Sarah Chan"], "photo_reference"=>"CoQBfAAAAJDHvNce68PSw-xxQJ9uLHymBeB4vpc_jIxISeitAMRKpdWzH5pk2_4OsmbwvyZJxr2xhx1B6nLggXdK10Irm3Y_0ulEisp6rKvthasz5GEVNQ-XyN27EIgoS_VTwSuSHgQ0ZWwJlFZLS-V48rB10MmquJWiCG9CoaCWGYvddpmuEhAj5fGcQaeF5H2BFddtJWFLGhSvDVfRbvAjuZv_E9wq0ytv8wzo4A", "width"=>4320}], "place_id"=>"ChIJadRvowW6j4ARbxi9kS64cxM", "rating"=>3.8, "reference"=>"CoQBdQAAALSuQNCJOVx8GiRJJFl8r9MsRAATsZI0KC4GfqoZL1E4MaXr9pvYRXoF29byHZLqrVf8DDwbCG5YS3mgmpec3M4pFPz2Qe_tAt4waJN0p3L5SxS9iD7APbBh6abh7xjUxfV8ja61GaVzI6-h4k-R0M1Hfz9nXyx3LEN5pNPYvhhfEhCckoFHKvM6_v64YAapeB90GhRA09UFBM2fhGaFWj9PlhlyuKwekQ", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"2105 Old Middlefield Way, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.414099, "lng"=>-122.093407}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"78a8c9e8b47d595036dc4dabbac3345c8856df30", "name"=>"Los Altos Taqueria", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "place_id"=>"ChIJhzHBsAe6j4ARvq9oi8u-bqQ", "price_level"=>1, "rating"=>4.3, "reference"=>"CoQBdQAAADjya6m-1byxzcas_Wf_7YiDwthYtCVOXz5AVboHWudB3TucWkNXHjjEPV5-UcbneeEEh7-s_VDOxHNns7OjsqPHpbjPVEZDCMXnGKW5QNitGJ5osJM3Ual4Y6VbTGecvpET1DDgyp-8nVbB6Xv3mf0_WeSqmFu2RofB__udRaa8EhBzZBHbb708gii3ggUJEC-qGhQpUoFlFSokfMkjp-Y-2JBMjWWj9w", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"1477 Plymouth St, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.416307, "lng"=>-122.079524}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"29bd32f44bbee9933dfe0c15ecf6897f8368e169", "name"=>"Hon Sushi", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>2432, "html_attributions"=>["Sarah Chan"], "photo_reference"=>"CoQBeAAAAI90AYM0WKKkw0x3IUwIdaVYe3CJt14lsD9bnViFgMqh1ZPRHK8UIGNtQl1fVuiQhw084XPV88gTLDujFpW2uY06bEjvBPMaKwpg13s6eyhsd11_oWXASe8pNcaxI39ibZavdk55lBS7Nf_F-8QOMw3cCfpMUoIDU5lQl62cE-74EhDctwEAmzfo5FtLLSTUdUo4GhQJcGr-RiUZWy3W2qrwmzmY6ERRqQ", "width"=>4320}], "place_id"=>"ChIJDV-FJ_65j4ARa9tOzKfWKJk", "price_level"=>2, "rating"=>3.9, "reference"=>"CnRsAAAAgvioTdBNcXPj2L6sboB793_pJDSNWD5osdiu2ypW5i3RpnOkj7Szy1Z3KPzMJuu7yYVeL05CRy3uXctvaVHEf8Rpa_Bl7QHyvIuaP0ZTumJEwgTVNV63xJePYcnxmtsUTSgrUIEnM2QXOnfqLuuAJxIQ1_at1JutxaAma6NksBpsGBoUjlW0wmhuPtEO_YaXsfzPVeSYvEU", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"1020 N Rengstorff Ave, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.419905, "lng"=>-122.096086}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"b32d4e058eb4091ccc4867f7606be768957a3df3", "name"=>"Goldilocks", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "place_id"=>"ChIJ3cW1CgW6j4ARiZE5cJrU2h4", "price_level"=>1, "rating"=>3.5, "reference"=>"CnRsAAAA-9Vm7pwsOf1z5WBVaJar3GIFd6ZuyB9wWC4HnonP0DBzjduxeoEjNStPjAoeHx9c3vdO5SuprGMV4cfL62zzRMFxFHHTbiEBPQiv2uecXFD-0A3V8f9kVOM4TiK6ZbRvij6LcZGrqRnvXHMG7UxS3RIQeY3mTJI72KZhaPCQSlh-dxoUIWjlTmnkWoBiGXaNQLy6GSILUrY", "types"=>["bakery", "store", "restaurant", "food", "establishment"]}, {"formatted_address"=>"1625 Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.419938, "lng"=>-122.083479}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"e50ddd83b2c62b548085b243ebe95c6405239e0f", "name"=>"Tetsuwan Atom Café", "opening_hours"=>{"open_now"=>false, "weekday_text"=>[]}, "photos"=>[{"height"=>750, "html_attributions"=>["Baokui Yang"], "photo_reference"=>"CnRoAAAApW8-Tf-jxWgScc5kqk_gXRRCMApOSWSTE25dV-OQBzvIpYjOfFAVGn3e41QK3EaT7VmEdFe9kCQh8kBBYeYJxJC43IsMHWwR6fxR_aElFH_qD4k4tEzWxp8F4rp2GIbpc77P7hXZy2wvz13riRIl3RIQRx_dt_69d20yk2ZmM55zDBoUhhEfyEGIVUC7D3v-luMQYqbOxGg", "width"=>1000}], "place_id"=>"ChIJ160fVP-5j4ARzzHudWlllZY", "rating"=>4.6, "reference"=>"CoQBdgAAALSJOZrVn4pu7uVWwzbJvEcSrOefkqF1lnd8rpzeEdX8wrUXVmRMNMHyfKYZWLWCq9K_WV4qfVTmxQUYkNOoKeGcWfEhHqTBBsdbGhrTrUM87qCC2DszW6V0EGYAcgeTNvo0_KbewPjymXpYGjS4jwuWFWEHmKVJkCdqLYtQiqbPEhBRcSp4csXpwOUpzM4z6Ay1GhTYnhNg26h6RjTbPX9m27CDwLOolg", "types"=>["restaurant", "food", "establishment"]}, {"formatted_address"=>"1545 Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.419378, "lng"=>-122.081112}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/cafe-71.png", "id"=>"01960fd7c537964e3c39bea67f56a4d948fe36c4", "name"=>"Jia Cafe", "photos"=>[{"height"=>530, "html_attributions"=>["Baokui Yang"], "photo_reference"=>"CnRoAAAAgJ8kXupQ6w9aNKaRris2m1hQ6LZwkpimKRIoNwFcxHMnlHYLk3pM3revW10J6HKOwtWOIrzJNt7XGzD-I743OI-W78Iz96ZRZgvfOrEln4utHwxVWv4yWhw9_OmdwgoiEtouRId_nCgvH6RI3gC9XBIQoGo13AQEfaMLFVjqMvemYBoUztQxH8_HKSWtrHdhRkSogFperAo", "width"=>800}], "place_id"=>"ChIJf_b7HP-5j4AR11f_cfC6EOE", "reference"=>"CnRrAAAA7HM17wjlfj2GwaAriVNYMpKnY2ZF33Wk6bukGGIhHqIq5vcoy48QGrhzd0g_vQq_3QuXT16Elg1Ip9IBX_PGWso71sz_MVARDZRnfs5OteZ8k0dTgtoB87pcuSzYPt63_7OZrdzHl-8kxYZMHSONHBIQ22DCIgFaE1sqLuN7ESrCFxoURfHY247Kxsuk7AHzUWkjpF642OU", "types"=>["cafe", "restaurant", "food", "establishment"]}, {"formatted_address"=>"2430 E Charleston Rd, Mountain View, CA 94043, United States", "geometry"=>{"location"=>{"lat"=>37.422085, "lng"=>-122.096509}}, "icon"=>"http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png", "id"=>"c607f7414e7877f52deee5d475861226859d5184", "name"=>"L&L", "opening_hours"=>{"open_now"=>true, "weekday_text"=>[]}, "photos"=>[{"height"=>1600, "html_attributions"=>[], "photo_reference"=>"CnRnAAAApwgHWH5RJvXjZtoUENYG3pYBB92dT1rqNB8UduotASaQWyAASEohXYnz-5xAEKYVzjLRU4ZTZjUNLn4PtPAwDlQZngAiNRzNhanBfeXJb8v9ixb3Kk9JfCdDpAvLtSsTwzKt_y4Iu8fxQoFAOQC54RIQq-bdPq1N8YxZW8e7G2di-xoU-0B5ix4O5y1mX7-VJ3daj3rXpuw", "width"=>2400}], "place_id"=>"ChIJfa51MBC6j4ARdScWiQPQXWI", "price_level"=>2, "rating"=>3.6, "reference"=>"CnRlAAAA4KGtEn-iJjgP9R7ENZhLtkH77wrFte1_waJykNjIFVrwVJXftvEic2ryEeVeAmoxzar-JsRw6Q07gDJUIeP9gsKyzcX9EqVzMmiYoZz2anEIm2gyzl8TKK3x_lCucoYG6mTbtFwRze3sC2sY6Jo9jhIQO-psrnQUoLJ3VRZW8Bh3UhoUvpslsjCRbGJoE0tS4KC5yfmb5iU", "types"=>["restaurant", "food", "establishment"]}], "status"=>"OK"}{"results"=>[{"address_components"=>[{"long_name"=>"45231", "short_name"=>"45231", "types"=>["postal_code"]}, {"long_name"=>"Cincinnati", "short_name"=>"Cincinnati", "types"=>["locality", "political"]}, {"long_name"=>"Hamilton County", "short_name"=>"Hamilton County", "types"=>["administrative_area_level_2", "political"]}, {"long_name"=>"Ohio", "short_name"=>"OH", "types"=>["administrative_area_level_1", "political"]}, {"long_name"=>"United States", "short_name"=>"US", "types"=>["country", "political"]}], "formatted_address"=>"Cincinnati, OH 45231, USA", "geometry"=>{"bounds"=>{"northeast"=>{"lat"=>39.3080789, "lng"=>-84.4842608}, "southwest"=>{"lat"=>39.1176619, "lng"=>-84.5767829}}, "location"=>{"lat"=>39.2444348, "lng"=>-84.5327038}, "location_type"=>"APPROXIMATE", "viewport"=>{"northeast"=>{"lat"=>39.3080789, "lng"=>-84.48715589999999}, "southwest"=>{"lat"=>39.2081579, "lng"=>-84.5767829}}}, "postcode_localities"=>["Cincinnati", "Mount Healthy", "Wyoming"], "types"=>["postal_code"]}], "status"=>"OK"} \ No newline at end of file diff --git a/views/home.erb b/views/home.erb deleted file mode 100755 index 01b27eb..0000000 --- a/views/home.erb +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/views/layout.erb b/views/layout.erb deleted file mode 100755 index c2ec7df..0000000 --- a/views/layout.erb +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Meal Dictator - - - - - - - Skip to main content - - -
- - <%= yield %> - -
- - - diff --git a/views/restaurant.erb b/views/restaurant.erb deleted file mode 100644 index bc4814b..0000000 --- a/views/restaurant.erb +++ /dev/null @@ -1,75 +0,0 @@ -
-
- <% if !@error %> -

- You're going to eat at: <%= @place.name %>
- Rating: <%= @place.rating %> / 5
- Phone number: <%= @place.phone_number %>
- Address: <%= @place.address %>
- - <% if @place.open_now.eql?("Open now") %> - <%= @place.periods %>
- Open now
- <% elsif @place.open_now.eql?("Closed") %> - Closed
- <% end %> -

- - - -
- -
- <% else %> -

You denied us access to your location! Select one from right ->

- <% end %> - -
- - -
-
-

Current Weather conditions

-

- Temperature: <%= @weather.temperature.to_s %>°F
- Current Conditions: <%= @weather.description %> -

-
- -
-

Redefine your loaction

- -
-
- - - - - - - - - -
-
- -
-
-
-
-<% if !@error %> -

Your location is: Lat: <%= @place.lat %> Lon: <%= @place.lon %>

-<% else %> -<% end %> -
-
-
-
- -
-
- - - diff --git a/views/restaurant.erb.orig b/views/restaurant.erb.orig deleted file mode 100644 index ff89705..0000000 --- a/views/restaurant.erb.orig +++ /dev/null @@ -1,81 +0,0 @@ -
-
- <% if !@error %> -

- You're going to eat at: <%= @place.name %>
- Rating: <%= @place.rating %> / 5
- Phone number: <%= @place.phone_number %>
- Address: <%= @place.address %>
- - <% if @place.open_now.eql?("Open now") %> - <%= @place.periods %>
- Open now
- <% elsif @place.open_now.eql?("Closed") %> - Closed
- <% end %> - -

- -<<<<<<< HEAD -
- -======= - - -

- It is currently <%= @weather.temperature.to_s %>°F and <%= @weather.description %> outside. -

- - -
- -
- <% else %> -

You denied us access to your location! Select one from right ->

- <% end %> - -
- - -
- -

Define your loaction

- - -
-

Manualy enter location

- -
-
- - -<<<<<<< HEAD - - - -======= - - ->>>>>>> 720feb5886159049bbe568c8a36c077238eb7a63 - - - - -
-
- -
-
-
-
-<% if !@error %> -

Your location is: Lat: <%= @place.lat %> Lon: <%= @place.lon %>

-<% else %> -<% end %> -
-
- - diff --git a/views/weather.erb b/views/weather.erb deleted file mode 100644 index 0611cdb..0000000 --- a/views/weather.erb +++ /dev/null @@ -1,3 +0,0 @@ -

- <%= @weatherStatus %> -