progress 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/progress.rb +4 -3
- data/spec/progress_spec.rb +6 -0
- metadata +2 -2
data/History.txt
CHANGED
data/lib/progress.rb
CHANGED
@@ -4,7 +4,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
4
4
|
require 'singleton'
|
5
5
|
|
6
6
|
class Progress
|
7
|
-
VERSION = '0.0.
|
7
|
+
VERSION = '0.0.5'
|
8
8
|
|
9
9
|
include Singleton
|
10
10
|
|
@@ -29,12 +29,13 @@ class Progress
|
|
29
29
|
# sleep(0.001)
|
30
30
|
# end
|
31
31
|
# end
|
32
|
-
def self.start(name, total =
|
32
|
+
def self.start(name, total = 1)
|
33
33
|
levels << new(name, total, levels.length)
|
34
34
|
print_message
|
35
35
|
if block_given?
|
36
|
-
yield
|
36
|
+
result = yield
|
37
37
|
stop
|
38
|
+
result
|
38
39
|
end
|
39
40
|
end
|
40
41
|
|
data/spec/progress_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: progress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- toy
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-07 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|