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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '080ae1c7c6cba7f7271f373667ee6720f6b7052e'
4
- data.tar.gz: ea37b74623cb948a6cf03a3b1540baa457a35c6c
3
+ metadata.gz: 4f48a7102c0e93d310a83526c231097e7707fe7a
4
+ data.tar.gz: a4d9137310e651b69d0957bb491345aa10f71ed0
5
5
  SHA512:
6
- metadata.gz: 3d693e1cc61d876e58d9d9428633408c065001a2204abdbe5526bce287ef2cc10493f571d2d235ca940448cad7315822f974fc77ccec7be07956d6bf48ee5505
7
- data.tar.gz: 7e21f7f1b925fa093a9dc797155c96e86363a850a6cb594bcee8ec259a6f45266afbee8c30c600572d97a3e90e9b7a8ec3e9cf6a53bb1a5c470c1d78b30ad977
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) / 2.0
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
@@ -1,3 +1,3 @@
1
1
  module ConsoleProgressBar
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  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.0
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: 2017-03-02 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler