From: Tom Hughes Date: Wed, 22 Mar 2017 17:17:47 +0000 (+0000) Subject: Handle server_url being commented out in the example configuration X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/d2d7922d1e3a80d48c78717397236f471a5be506 Handle server_url being commented out in the example configuration --- diff --git a/cookbooks/web/definitions/rails_port.rb b/cookbooks/web/definitions/rails_port.rb index bbc3d60d9..8f277441f 100644 --- a/cookbooks/web/definitions/rails_port.rb +++ b/cookbooks/web/definitions/rails_port.rb @@ -109,7 +109,7 @@ define :rails_port, :action => [:create, :enable] do end application_yml = edit_file "#{rails_directory}/config/example.application.yml" do |line| - line.gsub!(/^( *)server_url:.*$/, "\\1server_url: \"#{name}\"") + line.gsub!(/^( *)#?server_url:.*$/, "\\1server_url: \"#{name}\"") if params[:email_from] line.gsub!(/^( *)email_from:.*$/, "\\1email_from: \"#{params[:email_from]}\"")