Permalink
Browse files

Integrate capistrano-relevance gem

Update Rails integration test to use capistrano-relevance.
  • Loading branch information...
1 parent e161f9f commit b8e819435fd1cf4491163bc9537dda6b8f64391d @yokolet yokolet committed with jasonrudolph Oct 4, 2012
View
@@ -1,3 +1,4 @@
/.vagrant
+.idea
pkg
provision
@@ -1,35 +1,11 @@
require 'bundler/capistrano'
-
-default_run_options[:pty] = true
+require 'capistrano/relevance/all'
set :application, "elzar_nightly_app"
set :repository, "/tmp/elzar_nightly_app" # TODO Find a way not to duplicate this path here and inside the spec. Pass as env arg?
-set :user, 'deploy'
-set :use_sudo, false
-set :scm, :git
-set :deploy_via, :copy
-set(:deploy_to) { "/var/www/apps/#{application}" }
set(:server_ip) { ENV['SERVER_IP'] || raise("You must supply SERVER_IP") }
role :web, server_ip
role :app, server_ip
role :db, server_ip, :primary => true
-
-
-after 'deploy:update_code', 'deploy:symlink_configs'
-after 'deploy:update_code', 'deploy:migrate'
-
-namespace :deploy do
- task :start do ; end
- task :stop do ; end
- task :restart, :roles => :app, :except => { :no_release => true } do
- run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
- end
-
- task :symlink_configs do
- shared_configs = File.join(shared_path,'config')
- release_configs = File.join(release_path,'config')
- run("ln -nfs #{shared_configs}/database.yml #{release_configs}/database.yml")
- end
-end
@@ -1,7 +1,10 @@
TemplateRoot = File.expand_path '..', __FILE__
-gem 'capistrano', :group => 'development'
+gem 'capistrano', :group => 'deployment', :git => 'git://github.com/capistrano/capistrano', :ref => 'b31e2f5'
@sumbach

sumbach Oct 22, 2012

Contributor

Why peg to a commit instead of a released version of the gem? Is there a particular bug fix that is not part of Capistrano 2.13.4?

@jasonrudolph

jasonrudolph via email Oct 22, 2012

Contributor
+gem 'capistrano-relevance', :group => 'deployment'
+
gem 'therubyracer', :group => 'assets', :platforms => :ruby
+
run 'bundle install'
run 'bundle exec capify .'

0 comments on commit b8e8194

Please sign in to comment.