progress-bar 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/progress-bar.rb +2 -2
- data/progress-bar.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d84afa26a056994f06ba50439069f59144179337
|
4
|
+
data.tar.gz: 69d20b0c3bc1c093f494c9697616689925e91734
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ec03604e40ceffc44db6bd57f02391181a5ab6101a8f13861cafcc5c1893be6247e2193c7a84faf7755c705b7b3634d05525e660835bdbed860b891b458bf10
|
7
|
+
data.tar.gz: 54706f0356cb2101eeaeab2263032cf5dc76243127816870b2faa8ee9b93ee440005dd472ed15df74f92a7cc4780e64119fbcdd24dba19412215f268a8bdb098
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/progress-bar.rb
CHANGED
@@ -33,7 +33,7 @@ class ProgressBar::Base
|
|
33
33
|
alias to_i i
|
34
34
|
alias inc! increment!
|
35
35
|
def done_rel() 100.0*i/max end
|
36
|
-
def done_dur()
|
36
|
+
def done_dur() Time.now-@start end
|
37
37
|
|
38
38
|
def total_dur
|
39
39
|
done_dur * max / i
|
@@ -63,7 +63,7 @@ class ProgressBar::Console < ProgressBar::Base
|
|
63
63
|
|
64
64
|
def format_time t
|
65
65
|
if t.finite?
|
66
|
-
sprintf "%02d:%02d:%02d", t/
|
66
|
+
sprintf "%02d:%02d:%02d", t/3600, t/60 % 3600, t % 60
|
67
67
|
else
|
68
68
|
"--:--:--"
|
69
69
|
end
|
data/progress-bar.gemspec
CHANGED