Handle server_url being commented out in the example configuration
authorTom Hughes <tom@compton.nu>
Wed, 22 Mar 2017 17:17:47 +0000 (17:17 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 22 Mar 2017 17:17:47 +0000 (17:17 +0000)
cookbooks/web/definitions/rails_port.rb

index bbc3d60d92073235a967d078ef0495ff6d2ee6e5..8f277441fe3c8fdeed7ac391ec65ed5a81d487dd 100644 (file)
@@ -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]}\"")