console_progress_bar 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console_progress_bar/extras.rb +3 -3
- data/lib/console_progress_bar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f48a7102c0e93d310a83526c231097e7707fe7a
|
4
|
+
data.tar.gz: a4d9137310e651b69d0957bb491345aa10f71ed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6c407af56bc709ff644bdfb6f24ff522bcb1ad2f4e5efefc9074858d7e6e438960496315fe4a4b68af7af61d9a51c848313c1bedf21869efb210f6a46d171b4
|
7
|
+
data.tar.gz: '0478051d37ce8a303506720a7e21bb0989930beb49bdc13e71cae9c094030d9bbbf7b78f973d0871348e87f091ef632168c6668bfc6c6fd0bf8314acac41c87e'
|
@@ -21,13 +21,13 @@ module ConsoleProgressBar
|
|
21
21
|
|
22
22
|
def calculate_remaining_time
|
23
23
|
tmp = Time.now - @prev_time
|
24
|
-
@avarage_inceament_time = (@avarage_inceament_time + tmp) /
|
24
|
+
@avarage_inceament_time = (@current * @avarage_inceament_time + tmp) / (@current + 1.0)
|
25
25
|
minutes, seconds = (@avarage_inceament_time * (@total - @current)).divmod(60)
|
26
26
|
hours, minutes = minutes.divmod(60)
|
27
27
|
@prev_time = Time.now
|
28
28
|
" Time Remaining = %02d:%02d:%02d" % [hours, minutes, seconds]
|
29
29
|
end
|
30
30
|
|
31
|
-
end
|
31
|
+
end
|
32
32
|
|
33
|
-
end
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console_progress_bar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mehmet Emin İNAÇ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|