Add support for configuring a Mapzen Valhalla API key
authorTom Hughes <tom@compton.nu>
Wed, 30 Sep 2015 12:48:13 +0000 (13:48 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 30 Sep 2015 12:48:13 +0000 (13:48 +0100)
cookbooks/web/definitions/rails_port.rb
cookbooks/web/recipes/rails.rb

index 4d47e31..23c98cb 100644 (file)
@@ -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")
 
index 5915d22..dd05cf7 100644 (file)
@@ -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"