capistrano-withrsync 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c06a09eefd4398b8cc06a739651d18c049355b3
4
- data.tar.gz: ecd3d02be2d33d59ba42e2ff9120dbaf096cd4fc
3
+ metadata.gz: 3e8c151fd99214df5060c613d05c3af309b0c2a2
4
+ data.tar.gz: 76716871baee9e64a1a4b968ae9e963802c7a847
5
5
  SHA512:
6
- metadata.gz: 5f581ebc4aed57ea904b0f36c46fa1da282c7ccd10e17e90b213b4de29ccfaa453711c74a38caa42f696e3dd2fd348175a6ca748f1d3582dbb1cf8383c3695ee
7
- data.tar.gz: 2bb49ce313e93dc824c2cc253d05d07f97e488eb4492e746bd8e61c85b803765787615020fca365730b9e63e6c798ec951a87bf24a33fa1f55cb9a41608f03c7
6
+ metadata.gz: a51844b6d82f5a202b6807dace1ba2463965ae51aa2b03206cad639d36e8b3bbbc873ad4028f091c2ecd8c3eda77384e121cdb6eb49d360f59cdf7876c6e1244
7
+ data.tar.gz: 9cf4633c5368dc9eab4cdfd1b968c1716a8da8be31958d481c905c753772275b0794dfc111ca2f5c3256b69e88490a8808b3bb9f73eb56a4570495fd550d87f1
@@ -83,16 +83,18 @@ namespace :rsync do
83
83
  desc 'Sync to deployment hosts from local'
84
84
  task sync: :'rsync:stage' do
85
85
  last_rsync_to = nil
86
- roles(:all).each do |role|
87
- run_locally do
88
- user = "#{role.user}@" if !role.user.nil?
89
- rsync_options = "#{fetch(:rsync_options).join(' ')}"
90
- rsync_from = "#{fetch(:rsync_src)}/"
91
- rsync_to = "#{user}#{role.hostname}:#{fetch(:rsync_dest_fullpath) || release_path}"
92
-
93
- unless rsync_to == last_rsync_to
94
- execute :rsync, rsync_options, rsync_from, rsync_to
95
- last_rsync_to = rsync_to
86
+ release_roles(:all).each do |role|
87
+ unless Capistrano::Configuration.env.filter(role).empty?
88
+ run_locally do
89
+ user = "#{role.user}@" if !role.user.nil?
90
+ rsync_options = "#{fetch(:rsync_options).join(' ')}"
91
+ rsync_from = "#{fetch(:rsync_src)}/"
92
+ rsync_to = "#{user}#{role.hostname}:#{fetch(:rsync_dest_fullpath) || release_path}"
93
+
94
+ unless rsync_to == last_rsync_to
95
+ execute :rsync, rsync_options, rsync_from, rsync_to
96
+ last_rsync_to = rsync_to
97
+ end
96
98
  end
97
99
  end
98
100
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Withrsync
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-withrsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - linyows
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-14 00:00:00.000000000 Z
11
+ date: 2015-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano