Sha256: 634300075a0ab4e0b5a42e393e05facb9820013d4f791879603786f039c4fa95
Contents?: true
Size: 585 Bytes
Versions: 3
Compression:
Stored size: 585 Bytes
Contents
module Cloner::RSync extend ActiveSupport::Concern def rsync(from, to) port = ssh_opts[:port] || 22 cmd = "rsync -e ssh -zutvr --checksum -e \"ssh -p #{port}\" #{e ssh_user}@#{e ssh_host}:#{e from}/ #{e 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.7.0 | lib/cloner/rsync.rb |
cloner-0.6.1 | lib/cloner/rsync.rb |
cloner-0.6.0 | lib/cloner/rsync.rb |