lib/rda/nginx.rb in rda-0.0.3 vs lib/rda/nginx.rb in rda-0.0.4

- old
+ new

@@ -18,21 +18,21 @@ include_sites_enabled template("templates/nginx", "#{conf_path}/sites-available/#{hostname}") link_file("#{conf_path}/sites-available/#{hostname}", "#{conf_path}/sites-enabled/#{hostname}") - append_file "/etc/hosts", "#{hostname} 127.0.0.1" + append_file "/etc/hosts", "127.0.0.1 #{hostname}" end desc "Discard", "Remove the Nginx setting of rails application" def discard return unless installed? %W(enabled available).each do |n| remove_file "#{conf_path}/sites-#{n}/#{hostname}" end - gsub_file("/etc/hosts", "#{hostname} 127.0.0.1", '') + gsub_file("/etc/hosts", "127.0.0.1 #{hostname}", '') remove_file "#{::Rails.root}/config/setup_load_paths.rb" end private def installed?