Sha256: 2630ff7c57dca98b643639532b47e41253fbe98b6dad69f15ba49480655f2a58
Contents?: true
Size: 531 Bytes
Versions: 4
Compression:
Stored size: 531 Bytes
Contents
module Cloner::RSync extend ActiveSupport::Concern def rsync(from, to) cmd = "rsync -e ssh -zutvr --checksum #{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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
cloner-0.5.1 | lib/cloner/rsync.rb |
cloner-0.5.0 | lib/cloner/rsync.rb |
cloner-0.4.1 | lib/cloner/rsync.rb |
cloner-0.4.0 | lib/cloner/rsync.rb |