summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/recipes/check.rb13
-rw-r--r--config/recipes/rbenv.rb9
2 files changed, 7 insertions, 15 deletions
diff --git a/config/recipes/check.rb b/config/recipes/check.rb
deleted file mode 100644
index 45a6e1f..0000000
--- a/config/recipes/check.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace :check do
- desc "Make sure local git is in sync with remote."
- task :revision, roles: :web do
- unless `git rev-parse HEAD` == `git rev-parse origin/#{branch}`
- puts "WARNING: HEAD is not the same as origin/#{branch}"
- puts "Run `git push` to sync changes."
- exit
- end
- end
- before "deploy", "check:revision"
- before "deploy:migrations", "check:revision"
- before "deploy:cold", "check:revision"
-end
diff --git a/config/recipes/rbenv.rb b/config/recipes/rbenv.rb
index b84adc8..0c4d905 100644
--- a/config/recipes/rbenv.rb
+++ b/config/recipes/rbenv.rb
@@ -1,7 +1,7 @@
set_default :ruby_version, "2.0.0-p247"
namespace :rbenv do
- desc "Install rbenv, Ruby, and the Bundler gem"
+ desc "Install rbenv"
task :install, roles: :app do
# Install development tools:
run "#{sudo} apt-get -y install build-essential"
@@ -26,10 +26,15 @@ BASHRC
run "mv ~/.bashrc.tmp ~/.bashrc"
run %q{export PATH="$HOME/.rbenv/bin:$PATH"}
run %q{eval "$(rbenv init -)"}
+ end
+ after "deploy:install", "rbenv:install"
+
+ desc "Setup rbenv with ruby and bundler"
+ task :setup, roles: :web do
run "rbenv install #{ruby_version}"
run "rbenv global #{ruby_version}"
run "gem install bundler --no-ri --no-rdoc"
run "rbenv rehash"
end
- after "deploy:install", "rbenv:install"
+ after "deploy:setup", "rbenv:setup"
end