Permalink
Browse files

Merge branch 'hotfix/0.0.4'

  • Loading branch information...
2 parents 1cb9daa + e153318 commit 9fa1b73955cb699b98b606bca5cd9ddf907fd759 @towerhe committed Jan 31, 2012
Showing with 6 additions and 6 deletions.
  1. +1 −1 Gemfile.lock
  2. +2 −2 lib/rda/nginx.rb
  3. +1 −1 lib/rda/version.rb
  4. +2 −2 spec/lib/rda/nginx_spec.rb
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- rda (0.0.2)
+ rda (0.0.4)
confstruct
rails (>= 3.1)
thor
View
@@ -20,7 +20,7 @@ def setup
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"
@@ -31,7 +31,7 @@ def discard
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
View
@@ -1,3 +1,3 @@
module Rda
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
@@ -100,7 +100,7 @@
subject.should_receive(:link_file).with("#{dummy_path}/sites-available/dummy.local", "#{dummy_path}/sites-enabled/dummy.local")
# creates a local hostname for the rails application
- subject.should_receive(:append_file).with("/etc/hosts", "dummy.local 127.0.0.1")
+ subject.should_receive(:append_file).with("/etc/hosts", "127.0.0.1 dummy.local")
subject.setup
end
@@ -124,7 +124,7 @@
end
it 'discards the settings' do
- subject.should_receive(:gsub_file).with("/etc/hosts", "dummy.local 127.0.0.1", '')
+ subject.should_receive(:gsub_file).with("/etc/hosts", "127.0.0.1 dummy.local", '')
%W(enabled available).each do |n|
subject.should_receive(:remove_file).with("#{dummy_path}/sites-#{n}/dummy.local")
end

0 comments on commit 9fa1b73

Please sign in to comment.