diff options
author | elijah <elijah@riseup.net> | 2016-06-27 14:09:11 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-06-27 16:58:04 -0700 |
commit | e8de57c6309daeb5e25e1b0973adb8214255077f (patch) | |
tree | 101edba8252037bb5fc2ebbe197ec734a132495c /lib/leap_cli/remote/rsync_plugin.rb | |
parent | e46c4c64128621c2e84233e27b63040c027be88f (diff) |
remove capistrano, switch to sshkit
Diffstat (limited to 'lib/leap_cli/remote/rsync_plugin.rb')
-rw-r--r-- | lib/leap_cli/remote/rsync_plugin.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/leap_cli/remote/rsync_plugin.rb b/lib/leap_cli/remote/rsync_plugin.rb deleted file mode 100644 index a6708f4..0000000 --- a/lib/leap_cli/remote/rsync_plugin.rb +++ /dev/null @@ -1,35 +0,0 @@ -# -# these methods are made available in capistrano tasks as 'rsync.method_name' -# (see RemoteCommand::new_capistrano) -# - -autoload :RsyncCommand, 'rsync_command' - -module LeapCli; module Remote; module RsyncPlugin - - # - # takes a block, yielded a server, that should return a hash with various rsync options. - # supported options include: - # - # {:source => '', :dest => '', :flags => '', :includes => [], :excludes => []} - # - def update - rsync = RsyncCommand.new(:logger => logger) - rsync.asynchronously(find_servers) do |server| - options = yield server - next unless options - remote_user = server.user || fetch(:user, ENV['USER']) - src = options[:source] - dest = {:user => remote_user, :host => server.host, :path => options[:dest]} - options[:ssh] = ssh_options.merge(server.options[:ssh_options]||{}) - options[:chdir] ||= Path.provider - rsync.exec(src, dest, options) - end - if rsync.failed? - LeapCli::Util.bail! do - LeapCli::Util.log :failed, "to rsync to #{rsync.failures.map{|f|f[:dest][:host]}.join(' ')}" - end - end - end - -end; end; end |