From 764c95488c28ed00221ccd68e8e09969fdfac027 Mon Sep 17 00:00:00 2001 From: elf Pavlik Date: Sat, 7 Jan 2017 09:27:37 -0600 Subject: [PATCH] made api key optional (google maps) --- app/views/layouts/darkswarm.html.haml | 2 +- config/application.yml.example | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/darkswarm.html.haml b/app/views/layouts/darkswarm.html.haml index 6998b99ed7..20a47be970 100644 --- a/app/views/layouts/darkswarm.html.haml +++ b/app/views/layouts/darkswarm.html.haml @@ -13,7 +13,7 @@ %link{href: "https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700", rel: "stylesheet", type: "text/css"} = yield :scripts - %script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry&key=#{ENV['GOOGLE_MAPS_API_KEY']}"} + %script{src: "//maps.googleapis.com/maps/api/js?libraries=places,geometry#{ ENV['GOOGLE_MAPS_API_KEY'] ? '&key=' + ENV['GOOGLE_MAPS_API_KEY'] : ''} "} = split_stylesheet_link_tag "darkswarm/all" = javascript_include_tag "darkswarm/all" diff --git a/config/application.yml.example b/config/application.yml.example index b3b21c39ad..5b38a6da60 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -22,4 +22,5 @@ CURRENCY: AUD # DISCOURSE_URL must be the URL of your Discourse instance. #DISCOURSE_URL: "https://noticeboard.openfoodnetwork.org.au" -GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +# see: https://developers.google.com/maps/documentation/javascript/get-api-key +# GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx