Sha256: fbda1d9052185627e58efd14b2f969e9c3fda37e6dfffe8b21f69293b8682617
Contents?: true
Size: 523 Bytes
Versions: 3
Compression:
Stored size: 523 Bytes
Contents
module Cloner::RSync extend ActiveSupport::Concern def rsync(from, to) cmd = "rsync -e ssh -zutvr --checksum #{ssh_user}@#{ssh_host}:#{from}/ #{to}/" puts "Running RSync: #{cmd}" pipe = IO.popen(cmd) while (line = pipe.gets) print line if verbose? end pipe.close ret = $?.to_i if ret != 0 puts "Error: local command exited with #{ret}" end end def rsync_public(folder) rsync("#{remote_app_path}/public/#{folder}", Rails.root.join("public/#{folder}")) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cloner-0.3.1 | lib/cloner/rsync.rb |
cloner-0.3.0 | lib/cloner/rsync.rb |
cloner-0.2.0 | lib/cloner/rsync.rb |