lib/capistrano/bundle_rsync/config.rb in capistrano-bundle_rsync-0.2.4 vs lib/capistrano/bundle_rsync/config.rb in capistrano-bundle_rsync-0.2.5

- old
+ new

@@ -23,10 +23,15 @@ def self.config_files return nil unless config_files = fetch(:bundle_rsync_config_files) config_files.is_a?(Array) ? config_files : [config_files] end + def self.shared_dirs + return nil unless shared_dirs = fetch(:bundle_rsync_shared_dirs) + shared_dirs.is_a?(Array) ? shared_dirs : [shared_dirs] + end + # Build ssh command options for rsync # # First, search available user and keys configurations for each role: # # role :app, ['hostname'], { @@ -80,9 +85,14 @@ end def self.rsync_options bwlimit = fetch(:bundle_rsync_rsync_bwlimit) ? " --bwlimit #{fetch(:bundle_rsync_rsync_bwlimit)}" : "" fetch(:bundle_rsync_rsync_options) || "-az --delete#{bwlimit}" + end + + def self.shared_rsync_options + bwlimit = fetch(:bundle_rsync_rsync_bwlimit) ? " --bwlimit #{fetch(:bundle_rsync_rsync_bwlimit)}" : "" + fetch(:bundle_rsync_shared_sync_options) || "-az#{bwlimit}" end def self.skip_bundle fetch(:bundle_rsync_skip_bundle) end