six-rsync 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/six/rsync/lib.rb +32 -16
- data/lib/six/rsync.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/six/rsync/lib.rb
CHANGED
@@ -127,27 +127,43 @@ module Six
|
|
127
127
|
raise RsyncError
|
128
128
|
end
|
129
129
|
|
130
|
-
|
130
|
+
hosts = config[:hosts].clone
|
131
131
|
|
132
132
|
# FIXME: This does not work when not forced, as host is sampled in comparesums :)
|
133
|
-
host =
|
133
|
+
host = hosts.sample
|
134
134
|
|
135
135
|
if opts[:force]
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
arr_opts << esc(pack_path)
|
136
|
+
done = false
|
137
|
+
b = false
|
138
|
+
verbose = @verbose
|
139
|
+
@verbose = false
|
140
|
+
while hosts.size > 0 && !done do
|
141
|
+
# FIXME: Nasty
|
142
|
+
host = hosts.sample if b
|
143
|
+
b = true
|
144
|
+
hosts -= [host]
|
145
|
+
@logger.info "Trying #{host}"
|
147
146
|
|
148
|
-
|
149
|
-
|
150
|
-
|
147
|
+
begin
|
148
|
+
arr_opts = []
|
149
|
+
arr_opts << PARAMS
|
150
|
+
arr_opts += x_opts
|
151
|
+
if host[/\A(\w)*\@/]
|
152
|
+
arr_opts << RSH#"-e ssh"
|
153
|
+
end
|
154
|
+
# TODO: UNCLUSTERFUCK
|
155
|
+
arr_opts << esc(File.join(host, '.pack/.'))
|
156
|
+
arr_opts << esc(pack_path)
|
157
|
+
command(cmd, arr_opts)
|
158
|
+
calc
|
159
|
+
save_repos
|
160
|
+
done = true
|
161
|
+
rescue
|
162
|
+
@logger.debug "#{$!}"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
@verbose = verbose
|
166
|
+
raise RsyncError if !done
|
151
167
|
else
|
152
168
|
#reset(:hard => true)
|
153
169
|
calc
|
data/lib/six/rsync.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: six-rsync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sickboy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-06 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|