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 1d9179aa9ea5819a8cf052d648389f67703b9396..6b77fd441b5b6ab700676e1ba644a5caf99d90ea 100644 (file)
@@ -203,6 +203,10 @@ define :rails_port, :action => [ :create, :enable ] do
       line.gsub!(/^( *)#oauth_key:.*$/, "\\1oauth_key: \"#{params[:oauth_key]}\"")
     end
 
       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")
 
     line.gsub!(/^( *)require_terms_seen:.*$/, "\\1require_terms_seen: true")
     line.gsub!(/^( *)require_terms_agreed:.*$/, "\\1require_terms_agreed: true")
 
index 1a8ef4122989c1861ba6cddc61e52b6142c65255..4731cc1e67e8bc17335ea6ca7a11e8501c7f0a09 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
   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
 end