Sha256: c518936575b6a3020e3786ffdbf2a02b44617c16ec5e13f5a1aca15d973177aa
Contents?: true
Size: 1.25 KB
Versions: 1
Compression:
Stored size: 1.25 KB
Contents
Capistrano::Configuration.instance(:must_exist).load do namespace :local do desc <<-DESC Rsyncs the your production content (identified by the :shared_content and :content_directories properties) from a deployable environment (RAILS_ENV) to the local filesystem. DESC task :rsync_content do from = ENV['FROM'] || 'production' if exists?(:domain) remote_domain = fetch(:domain) end if exists?(:rsync_domain) remote_domain = fetch(:rsync_domain) end system("rsync -avz -e ssh '#{user}@#{remote_domain}:#{content_path}' '#{rails_root}/tmp/'") end desc <<-DESC Creates a symlink to public/system from tmp/system DESC task :rsync_restore_content do # from = ENV['FROM'] || 'production' print "\033[1;45m Linking Assets to public directory \033[0m\n" system "ln -nfs #{rails_root}/tmp/system #{rails_root}/public/system" end desc <<-DESC Wrapper for local:rsync_content and local:rsync_restore_content $> cap local:rsync RAILS_ENV=production DESC task :rsync do transaction do rsync_content rsync_restore_content end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blavosync-0.2.1 | lib/blavosync/recipes/content_rsync.rb |