Class: Blitzcrank::Rsync
Class Method Summary collapse
Class Method Details
.sync(video) ⇒ Object
3 4 5 6 |
# File 'lib/blitzcrank/rsync.rb', line 3 def self.sync(video) command = "rsync -avz #{ '--bwlimit=' + Blitzcrank.config.bwlimit if Blitzcrank.config.respond_to?(:bwlimit) } --progress --rsh='ssh' \"#{Blitzcrank.config.remote_user}@#{Blitzcrank.config.remote_host}:#{Blitzcrank.config.remote_base_dir}#{video.remote_path.gsub(' ', '\\ ').gsub("'", %q(\\\'))}\" \"#{video.local_path}\"" system(command) end |