Sha256: 875361ac5ef76caaaefe19aa9813e484d52020cac06f090dc2ecdefe7e0bab13

Contents?: true

Size: 621 Bytes

Versions: 6

Compression:

Stored size: 621 Bytes

Contents

Capistrano::Configuration.instance.load do
  namespace :local do
    desc 'Synchronize your local assets using remote assets'
    task :sync do
      if Util.prompt "Are you sure you want to erase your local assets with server assets"
        servers = find_servers :roles => :app
        [assets_dir].flatten.each do |dir|
          system("rsync -a --del --progress --rsh='ssh -p #{fetch(:ssh_port, 22)}' #{user}@#{servers.first}:#{shared_path}/#{dir}/ #{local_assets_dir}")
        end
      end
    end
  end

  desc 'Synchronize your local assets using remote assets'
  task :pull do
    assets.local.sync
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
caploy-2.0.0 lib/caploy/recipes/assets.rb
caploy-1.0.4 lib/caploy/recipes/assets.rb
caploy-1.0.3 lib/caploy/recipes/assets.rb
caploy-1.0.2 lib/caploy/recipes/assets.rb
caploy-1.0.1 lib/caploy/recipes/assets.rb
caploy-1.0.0 lib/caploy/recipes/assets.rb