ztk 1.4.18 → 1.4.19
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ztk/spinner.rb +4 -2
- data/lib/ztk/version.rb +1 -1
- metadata +4 -4
data/lib/ztk/spinner.rb
CHANGED
@@ -46,16 +46,18 @@ module ZTK
|
|
46
46
|
!block_given? and Base.log_and_raise(options.ui.logger, SpinnerError, "You must supply a block!")
|
47
47
|
|
48
48
|
count = 0
|
49
|
+
|
49
50
|
spinner = Thread.new do
|
50
|
-
while count do
|
51
|
+
while (count >= 0) do
|
51
52
|
options.ui.stdout.print(CHARSET[(count += 1) % CHARSET.length])
|
52
53
|
options.ui.stdout.print("\b")
|
53
54
|
options.ui.stdout.respond_to?(:flush) and options.ui.stdout.flush
|
54
55
|
sleep(options.step)
|
55
56
|
end
|
56
57
|
end
|
58
|
+
|
57
59
|
yield.tap do
|
58
|
-
count =
|
60
|
+
count = -100
|
59
61
|
spinner.join
|
60
62
|
end
|
61
63
|
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.
|
4
|
+
version: 1.4.19
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: erubis
|
@@ -265,7 +265,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
265
265
|
version: '0'
|
266
266
|
segments:
|
267
267
|
- 0
|
268
|
-
hash:
|
268
|
+
hash: 2819603724192962944
|
269
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
270
270
|
none: false
|
271
271
|
requirements:
|
@@ -274,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
274
274
|
version: '0'
|
275
275
|
segments:
|
276
276
|
- 0
|
277
|
-
hash:
|
277
|
+
hash: 2819603724192962944
|
278
278
|
requirements: []
|
279
279
|
rubyforge_project:
|
280
280
|
rubygems_version: 1.8.25
|