capistrano-improved-rsync-with-remote-cache 1.1.1 → 1.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bcb8f234c16577b9f57629c9ca0c2dfdc9d6edf
|
4
|
+
data.tar.gz: 689dfcc2b6918ae5bbd46d4e1720ffec4d553f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d42de8a5976fbb087f1126a40dd660d808a93d698be406484546a17146bb5243e5d091a1dd4581ba428ee51e0cda5af0edf9723cb8458a276034f79035e5b6e1
|
7
|
+
data.tar.gz: 6edf2e5017699343d9bdcd8325184215c2b2e54991b1954d0ee61f90e33f3759a5c289e850a84040f89bdb4d443af65d5e98a8f4b04ded8dede83eed75411c07
|
data/README.rdoc
CHANGED
@@ -25,6 +25,16 @@ To use this deployment strategy, add this line to your <tt>deploy.rb</tt> file:
|
|
25
25
|
|
26
26
|
set :deploy_via, :improved_rsync_with_remote_cache
|
27
27
|
|
28
|
+
If you want to enable the parallel deployment:
|
29
|
+
|
30
|
+
set :rsync_in_parallel, true
|
31
|
+
|
32
|
+
If you want to tune the number of threads:
|
33
|
+
|
34
|
+
set :rsync_concurrency, 8
|
35
|
+
|
36
|
+
By default, the deployments spawns 8 threads.
|
37
|
+
|
28
38
|
== Under the Hood
|
29
39
|
|
30
40
|
This strategy maintains two cache directories:
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "capistrano-improved-rsync-with-remote-cache"
|
5
|
-
gem.version = "1.1.
|
5
|
+
gem.version = "1.1.2"
|
6
6
|
gem.authors = ["Carlos Buenosvinos"]
|
7
7
|
gem.email = ["carlos.buenosvinos@gmail.com"]
|
8
8
|
gem.homepage = "https://github.com/carlosbuenosvinos/capistrano_improved_rsync_with_remote_cache"
|
@@ -8,6 +8,8 @@ module Capistrano
|
|
8
8
|
class RsyncWithRemoteCache < Remote
|
9
9
|
|
10
10
|
class InvalidCacheError < Exception; end
|
11
|
+
class RsyncFailedError < Exception; end
|
12
|
+
class LocalCacheUpdateFailedError < Exception; end
|
11
13
|
|
12
14
|
def self.default_attribute(attribute, default_value)
|
13
15
|
define_method(attribute) { configuration[attribute] || default_value }
|
@@ -24,7 +26,8 @@ module Capistrano
|
|
24
26
|
default_attribute :local_cache, '.rsync_cache'
|
25
27
|
default_attribute :repository_cache, 'cached-copy'
|
26
28
|
default_attribute :rsync_concurrency, 8
|
27
|
-
default_attribute :rsync_in_parallel,
|
29
|
+
default_attribute :rsync_in_parallel, false
|
30
|
+
default_attribute :rsync_ssh_options, '-o PasswordAuthentication=no -o StrictHostKeyChecking=no'
|
28
31
|
|
29
32
|
def deploy!
|
30
33
|
update_local_cache
|
@@ -57,7 +60,7 @@ module Capistrano
|
|
57
60
|
end
|
58
61
|
|
59
62
|
def rsync_command_for(server)
|
60
|
-
"rsync #{rsync_options} --rsh='ssh -p #{ssh_port(server)}' #{local_cache_path}/ #{rsync_host(server)}:#{repository_cache_path}/"
|
63
|
+
"rsync #{rsync_options} --rsh='ssh -p #{ssh_port(server)} #{rsync_ssh_options}' '#{local_cache_path}/' #{rsync_host(server)}:#{repository_cache_path}/"
|
61
64
|
end
|
62
65
|
|
63
66
|
def mark_local_cache
|