begin

require "capistrano/ext/multistage"
require "bundler/capistrano"
require "easy/deployment/capistrano"

rescue LoadError => e

$stderr.puts "couldn't load deployment gems, try `bundle install` and running again with `bundle exec cap <stage> deploy`"
$stderr.puts e.message
exit(1)

end

# Deployment tools <% unless options %>require “bugsnag/capistrano”<% end %> <% unless options %>require “new_relic/recipes” after “deploy:update”, “newrelic:notice_deployment” <% end %><% unless options %># Backup to S3 (read more github.com/AbleTech/easy-deployment/wiki/Backup) require “easy/deployment/backup” require “whenever/capistrano” set :whenever_command, “#{fetch(:bundle_cmd, ”bundle“)} exec whenever” <% end %>

set :stages, %w(staging production) set :default_stage, “staging”

set :application, “<%= application_name %>” set :deploy_to, “/var/apps/#{application}”

# set :repository, “git@github.com:AbleTech/easy-deployment.git” # TODO: fill in git repo set :scm, :git set :deploy_via, :remote_cache set :git_shallow_clone, 1 # easy-deployment sets the branch to deploy to the current local branch by default.

set :user, “deploy” set :runner, “deploy”

# Optional feature: apache restarts - read more at github.com/AbleTech/easy-deployment/wiki/Apache # require “easy/deployment/apache” # set :apachectl_bin, “/usr/sbin/apachectl” # recommended: set the full path which requires sudo privileges # set :apache_dir, “/etc/apache2” # optional to set. default value “/etc/apache2” - set this if your platform has a different path

# Optional feature: configure log rotation - read more at github.com/AbleTech/easy-deployment/wiki/Logrotate # require “easy/deployment/logrotate”

# Optional feature: db reference data. Requires [easy_reference_data gem](github.com/AbleTech/easy_reference_data) # require “easy/deployment/dbreference”

# Optional feature: capistrano performance report. Timings for slow deploys # require “easy/deployment/performance”