From cfcf5640dfd4f192afac921a687459c071db400d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 4 Jul 2014 19:58:32 +0100 Subject: [PATCH] Switch web site to use MapQuest Nominatim for search --- 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 1d9179aa9..6b77fd441 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -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") diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 1a8ef4122..4731cc1e6 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -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 -- 2.43.2