ztk 1.8.0 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ztk/ssh/download.rb +5 -1
- data/lib/ztk/ssh/upload.rb +5 -1
- data/lib/ztk/version.rb +1 -1
- metadata +3 -3
data/lib/ztk/ssh/download.rb
CHANGED
@@ -37,15 +37,19 @@ module ZTK
|
|
37
37
|
case event
|
38
38
|
when :open
|
39
39
|
options.ui.logger.debug { "download(#{args[0].remote} -> #{args[0].local})" }
|
40
|
+
options.on_progress.nil? or options.on_progress.call(:open, args)
|
40
41
|
when :close
|
41
42
|
options.ui.logger.debug { "close(#{args[0].local})" }
|
43
|
+
options.on_progress.nil? or options.on_progress.call(:close, args)
|
42
44
|
when :mkdir
|
43
45
|
options.ui.logger.debug { "mkdir(#{args[0]})" }
|
46
|
+
options.on_progress.nil? or options.on_progress.call(:mkdir, args)
|
44
47
|
when :get
|
45
48
|
options.ui.logger.debug { "get(#{args[0].remote}, size #{args[2].size} bytes, offset #{args[1]})" }
|
46
|
-
options.on_progress.nil? or options.on_progress.call(args)
|
49
|
+
options.on_progress.nil? or options.on_progress.call(:get, args)
|
47
50
|
when :finish
|
48
51
|
options.ui.logger.debug { "finish" }
|
52
|
+
options.on_progress.nil? or options.on_progress.call(:finish, args)
|
49
53
|
end
|
50
54
|
end
|
51
55
|
end
|
data/lib/ztk/ssh/upload.rb
CHANGED
@@ -32,15 +32,19 @@ module ZTK
|
|
32
32
|
case event
|
33
33
|
when :open
|
34
34
|
options.ui.logger.debug { "upload(#{args[0].local} -> #{args[0].remote})" }
|
35
|
+
options.on_progress.nil? or options.on_progress.call(:open, args)
|
35
36
|
when :close
|
36
37
|
options.ui.logger.debug { "close(#{args[0].remote})" }
|
38
|
+
options.on_progress.nil? or options.on_progress.call(:close, args)
|
37
39
|
when :mkdir
|
38
40
|
options.ui.logger.debug { "mkdir(#{args[0]})" }
|
41
|
+
options.on_progress.nil? or options.on_progress.call(:mkdir, args)
|
39
42
|
when :put
|
40
43
|
options.ui.logger.debug { "put(#{args[0].remote}, size #{args[2].size} bytes, offset #{args[1]})" }
|
41
|
-
options.on_progress.nil? or options.on_progress.call(args)
|
44
|
+
options.on_progress.nil? or options.on_progress.call(:put, args)
|
42
45
|
when :finish
|
43
46
|
options.ui.logger.debug { "finish" }
|
47
|
+
options.on_progress.nil? or options.on_progress.call(:finish, args)
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
data/lib/ztk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -275,7 +275,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
275
275
|
version: '0'
|
276
276
|
segments:
|
277
277
|
- 0
|
278
|
-
hash:
|
278
|
+
hash: 2100749939518044855
|
279
279
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
280
|
none: false
|
281
281
|
requirements:
|
@@ -284,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
284
284
|
version: '0'
|
285
285
|
segments:
|
286
286
|
- 0
|
287
|
-
hash:
|
287
|
+
hash: 2100749939518044855
|
288
288
|
requirements: []
|
289
289
|
rubyforge_project:
|
290
290
|
rubygems_version: 1.8.25
|