Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for defaults options overwriting settings #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions lib/capistrano/rsync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@
# private API and internals of Capistrano::Rsync. If you think something should
# be public for extending and hooking, please let me know!

set :rsync_options, []
set :rsync_copy, "rsync --archive --acls --xattrs"
fetch(:rsync_options) do
set :rsync_options, []
end

fetch(:rsync_copy) do
set :rsync_copy, "rsync --archive --acls --xattrs"
end

# Stage is used on your local machine for rsyncing from.
set :rsync_stage, "tmp/deploy"
fetch(:rsync_stage) do
set :rsync_stage, "tmp/deploy"
end

# Cache is used on the server to copy files to from to the release directory.
# Saves you rsyncing your whole app folder each time. If you nil rsync_cache,
# Capistrano::Rsync will sync straight to the release path.
set :rsync_cache, "shared/deploy"
fetch(:rsync_cache) do
set :rsync_cache, "shared/deploy"
end

rsync_cache = lambda do
cache = fetch(:rsync_cache)
Expand Down