lib/itrigga/cap_deploy/hooks.rb in itrigga-cap_deploy-0.0.2 vs lib/itrigga/cap_deploy/hooks.rb in itrigga-cap_deploy-0.0.3
- old
+ new
@@ -1,7 +1,13 @@
-after "deploy:setup", :chown_entire_project_dir
-after "deploy:symlink", :symlink_init_d_script
-after "deploy:symlink", :symlink_log_dirs
-after "deploy:symlink", :symlink_pid_dirs
-after "deploy:symlink", :symlink_site_cache_dir
-# only keep the last 5 releases (otherwise diskspace balloons)
-after "deploy:update", "deploy:cleanup"
+configuration = Capistrano::Configuration.respond_to?(:instance) ?
+ Capistrano::Configuration.instance(:must_exist) :
+ Capistrano.configuration(:must_exist)
+
+configuration.load do
+ after "deploy:setup", :chown_entire_project_dir
+ after "deploy:symlink", :symlink_init_d_script
+ after "deploy:symlink", :symlink_log_dirs
+ after "deploy:symlink", :symlink_pid_dirs
+ after "deploy:symlink", :symlink_site_cache_dir
+ # only keep the last 5 releases (otherwise diskspace balloons)
+ after "deploy:update", "deploy:cleanup"
+end
\ No newline at end of file