Add support for configuring a MapQuest API key
authorTom Hughes <tom@compton.nu>
Mon, 28 Sep 2015 12:47:53 +0000 (13:47 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 28 Sep 2015 12:47:53 +0000 (13:47 +0100)
cookbooks/web/definitions/rails_port.rb
cookbooks/web/recipes/rails.rb

index 49d989f..4d47e31 100644 (file)
@@ -224,6 +224,10 @@ define :rails_port, :action => [:create, :enable] do
       line.gsub!(/^( *)#windowslive_auth_secret:.*$/, "\\1windowslive_auth_secret: \"#{params[:windowslive_auth_secret]}\"")
     end
 
+    if params[:mapquest_key]
+      line.gsub!(/^( *)#mapquest_key:.*$/, "\\1mapquest_key: \"#{params[:mapquest_key]}\"")
+    end
+
     line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true")
     line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true")
 
index f6236c8..5915d22 100644 (file)
@@ -76,6 +76,7 @@ rails_port "www.openstreetmap.org" do
   facebook_auth_secret web_passwords["facebook_auth_secret"]
   windowslive_auth_id "0000000040153C51"
   windowslive_auth_secret web_passwords["windowslive_auth_secret"]
+  mapquest_key web_passwords["mapquest_key"]
 end
 
 gem_package "apachelogregex"