do 0.2.0.f → 0.2.0.g
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/do/server.rb +9 -8
- data/lib/do/version.rb +1 -1
- metadata +4 -4
data/lib/do/server.rb
CHANGED
@@ -140,11 +140,11 @@ module DO
|
|
140
140
|
sftp.upload!(from, to, options) do |event, uploader, *args|
|
141
141
|
case event
|
142
142
|
when :put
|
143
|
-
DO_LOGGER.print("\r"
|
143
|
+
DO_LOGGER.print("\r" + DO_LOGGER_FORMAT % [user, name, "writing: #{args[0].local} (#{(args[1].to_f * 100 / args[0].size.to_f).to_i}%)"]); DO_LOGGER.flush
|
144
144
|
when :finish
|
145
|
-
DO_LOGGER.puts("\r"
|
146
|
-
when :mkdir
|
147
|
-
|
145
|
+
DO_LOGGER.puts("\r" + DO_LOGGER_FORMAT % [user, name, "writing: #{to} (100%)"]); DO_LOGGER.flush
|
146
|
+
# when :mkdir
|
147
|
+
# log "creating directory #{args[0]}"
|
148
148
|
end
|
149
149
|
end
|
150
150
|
end
|
@@ -164,11 +164,12 @@ module DO
|
|
164
164
|
sftp.download!(from, to, options) do |event, downloader, *args|
|
165
165
|
case event
|
166
166
|
when :get
|
167
|
-
|
167
|
+
size = args[0].size ? args[0].size : sftp.stat!(from).size
|
168
|
+
DO_LOGGER.print("\r" + DO_LOGGER_FORMAT % [user, name, "sending: #{args[0].remote} (#{(args[1].to_f * 100 / size.to_f).to_i}%)"]); DO_LOGGER.flush
|
168
169
|
when :finish
|
169
|
-
DO_LOGGER.puts("\r"
|
170
|
-
when :mkdir
|
171
|
-
|
170
|
+
DO_LOGGER.puts("\r" + DO_LOGGER_FORMAT % [user, name, "sending: #{from} (100%)"]); DO_LOGGER.flush
|
171
|
+
# when :mkdir
|
172
|
+
# log "creating directory #{args[0]}"
|
172
173
|
end
|
173
174
|
end
|
174
175
|
end
|
data/lib/do/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: do
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 52
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 0.2.0.
|
10
|
+
- g
|
11
|
+
version: 0.2.0.g
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Davide D'Agostino
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2012-01-11 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|