Sha256: 77268a87abbb8ee0ec5422daa5255075e4a5b07ae2446ea2640d070b4782305c
Contents?: true
Size: 732 Bytes
Versions: 2
Compression:
Stored size: 732 Bytes
Contents
module Asset extend self def remote_to_local(cap) servers = cap.find_servers :roles => :app port = cap.port rescue 22 [cap.assets_dir].flatten.each do |dir| system("rsync -a --del -L -K -vv --progress --rsh='ssh -p #{port}' #{cap.user}@#{servers.first}:#{cap.current_path}/#{dir} #{cap.local_assets_dir}") end end def local_to_remote(cap) servers = cap.find_servers :roles => :app port = cap.port rescue 22 [cap.assets_dir].flatten.each do |dir| system("rsync -a --del -L -K -vv --progress --rsh='ssh -p #{port}' ./#{dir} #{cap.user}@#{servers.first}:#{cap.current_path}/#{cap.local_assets_dir}") end end def to_string(cap) [cap.assets_dir].flatten.join(" ") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano-db-tasks-0.2.1 | lib/capistrano-db-tasks/asset.rb |
capistrano-db-tasks-0.2 | lib/capistrano-db-tasks/asset.rb |