From 4f745d06c1d93398437caaa2bc88ab7fb86ebe96 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 30 Sep 2015 13:48:13 +0100 Subject: [PATCH] Add support for configuring a Mapzen Valhalla API key --- cookbooks/web/definitions/rails_port.rb | 4 ++++ cookbooks/web/recipes/rails.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index 4d47e3106..23c98cbaf 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -228,6 +228,10 @@ define :rails_port, :action => [:create, :enable] do line.gsub!(/^( *)#mapquest_key:.*$/, "\\1mapquest_key: \"#{params[:mapquest_key]}\"") end + if params[:mapzen_valhalla_key] + line.gsub!(/^( *)#mapzen_valhalla_key:.*$/, "\\1mapzen_valhalla_key: \"#{params[:mapzen_valhalla_key]}\"") + end + line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true") line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true") diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 5915d2285..dd05cf73f 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -77,6 +77,7 @@ rails_port "www.openstreetmap.org" do windowslive_auth_id "0000000040153C51" windowslive_auth_secret web_passwords["windowslive_auth_secret"] mapquest_key web_passwords["mapquest_key"] + mapzen_valhalla_key web_passwords["mapzen_valhalla_key"] end gem_package "apachelogregex" -- 2.39.5