Switch web site to use MapQuest Nominatim for search
authorTom Hughes <tom@compton.nu>
Fri, 4 Jul 2014 18:58:32 +0000 (19:58 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 4 Jul 2014 21:44:49 +0000 (22:44 +0100)
cookbooks/web/definitions/rails_port.rb
cookbooks/web/recipes/rails.rb

index 1d9179a..6b77fd4 100644 (file)
@@ -203,6 +203,10 @@ define :rails_port, :action => [ :create, :enable ] do
       line.gsub!(/^( *)#oauth_key:.*$/, "\\1oauth_key: \"#{params[:oauth_key]}\"")
     end
 
+    if params[:nominatim_url]
+      line.gsub!(/^( *)nominatim_url:.*$/, "\\1nominatim_url: \"#{params[:nominatim_url]}\"")
+    end
+
     line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true")
     line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true")
 
index 1a8ef41..4731cc1 100644 (file)
@@ -67,4 +67,5 @@ rails_port "www.openstreetmap.org" do
   id_key web_passwords["id_key"]
   oauth_key web_passwords["oauth_key"]
   piwik_configuration piwik_configuration
+  nominatim_url "http://open.mapquestapi.com/nominatim/v1/"
 end