Class: Capsum::Rsync
- Inherits:
-
Capistrano::SCM::Plugin
- Object
- Capistrano::SCM::Plugin
- Capsum::Rsync
- Defined in:
- lib/capsum/rsync.rb
Instance Method Summary collapse
Instance Method Details
#define_tasks ⇒ Object
22 23 24 |
# File 'lib/capsum/rsync.rb', line 22 def define_tasks eval_rakefile File.("../tasks/rsync.rake", __FILE__) end |
#register_hooks ⇒ Object
16 17 18 19 20 |
# File 'lib/capsum/rsync.rb', line 16 def register_hooks after "deploy:new_release_path", "rsync:create_release" before "deploy:check", "rsync:check" before "deploy:set_current_revision", "rsync:set_current_revision" end |
#set_defaults ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/capsum/rsync.rb', line 5 def set_defaults set_if_empty :rsync_options, %w(--links --recursive --delete --delete-excluded --exclude .git*) set_if_empty :rsync_copy, "rsync --archive --acls --xattrs" # Stage is used on your local machine for rsyncing from. set_if_empty :rsync_stage, File.join(Dir.tmpdir, "capsum", Dir.pwd) # Cache is used on the server to copy files to from to the release directory. set_if_empty :rsync_cache, "shared/deploy" end |