six-rsync 0.4.12 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/six/rsync/lib.rb +13 -12
- data/lib/six/rsync.rb +1 -1
- metadata +3 -3
data/Rakefile
CHANGED
data/lib/six/rsync/lib.rb
CHANGED
@@ -135,14 +135,14 @@ module Six
|
|
135
135
|
arr_opts << "-I" if opts[:force]
|
136
136
|
begin
|
137
137
|
update('', arr_opts)
|
138
|
-
rescue RsyncError
|
139
|
-
@logger.error "Unable to sucessfully update, aborting..."
|
140
|
-
@logger.debug "
|
138
|
+
rescue RsyncError => e
|
139
|
+
@logger.error "Unable to sucessfully update, aborting... (#{e.class}: #{e.message})"
|
140
|
+
@logger.debug e.backtrace.join("\n")
|
141
141
|
FileUtils.rm_rf @rsync_work_dir if File.exists?(@rsync_work_dir)
|
142
142
|
end
|
143
|
-
rescue RsyncError
|
144
|
-
@logger.error "Unable to initialize"
|
145
|
-
@logger.debug "
|
143
|
+
rescue RsyncError => e
|
144
|
+
@logger.error "Unable to initialize (#{e.class}: #{e.message})"
|
145
|
+
@logger.debug e.backtrace.join("\n")
|
146
146
|
end
|
147
147
|
|
148
148
|
opts[:bare] ? {:repository => @rsync_work_dir} : {:working_directory => @rsync_work_dir}
|
@@ -178,7 +178,6 @@ module Six
|
|
178
178
|
b = true
|
179
179
|
hosts -= [host]
|
180
180
|
@logger.info "Trying #{host}"
|
181
|
-
|
182
181
|
begin
|
183
182
|
arr_opts = []
|
184
183
|
arr_opts << PARAMS
|
@@ -192,8 +191,9 @@ module Six
|
|
192
191
|
calc
|
193
192
|
save_repos
|
194
193
|
done = true
|
195
|
-
rescue
|
196
|
-
@logger.
|
194
|
+
rescue => e
|
195
|
+
@logger.warn "#{e.class}: #{e.message}"
|
196
|
+
@logger.debug e.backtrace.join("\n")
|
197
197
|
end
|
198
198
|
end
|
199
199
|
@verbose = verbose
|
@@ -505,8 +505,9 @@ module Six
|
|
505
505
|
raise RsyncError
|
506
506
|
end
|
507
507
|
done = true
|
508
|
-
rescue
|
509
|
-
@logger.
|
508
|
+
rescue => e
|
509
|
+
@logger.warn "#{e.class}: #{e.message}"
|
510
|
+
@logger.debug e.backtrace.join("\n")
|
510
511
|
ensure
|
511
512
|
FileUtils.rm(rsync_path(".repository-pack.yml"))
|
512
513
|
end
|
@@ -790,7 +791,7 @@ module Six
|
|
790
791
|
end
|
791
792
|
|
792
793
|
out[/rsync error: .* \(code ([0-9]*)\)/]
|
793
|
-
status = $1 ? $1 : 0
|
794
|
+
status = $1 ? $1.to_i : 0
|
794
795
|
|
795
796
|
if status > 0
|
796
797
|
return '' if status == 1 && out == ''
|
data/lib/six/rsync.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 13
|
9
|
+
version: 0.4.13
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sickboy
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-27 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|