ruby-progressbar 1.7.1 → 1.7.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby-progressbar/calculators/length.rb +2 -2
- data/lib/ruby-progressbar/components/time.rb +2 -2
- data/lib/ruby-progressbar/outputs/non_tty.rb +1 -1
- data/lib/ruby-progressbar/progress.rb +5 -4
- data/lib/ruby-progressbar/version.rb +1 -1
- data/spec/fixtures/benchmark.rb +1 -1
- data/spec/ruby-progressbar/base_spec.rb +2 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaa7c9d09b31699a0a0c691ff78cd1ad04a0d713
|
4
|
+
data.tar.gz: 78cf941aaf62befd7ba3c78bddb928e565f758ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b86096eca7c31d2a85692000180440289b56abda2ab04044ae488c44ceddf6fc662bb1894eab7633717df0f5c5d7d1605b8daac4c5f8d9dddf91bbbfa7fa6582
|
7
|
+
data.tar.gz: 5fe2dca98cf016eb5455a3e5496f068b36c41978024315558bc4a6703e6329cfd9b2536fce47895f2478d84e91fd4a419f7d321b193b9fc7321d9eda121069c0
|
@@ -6,9 +6,10 @@ class Progress
|
|
6
6
|
DEFAULT_BEGINNING_POSITION = 0
|
7
7
|
DEFAULT_SMOOTHING = 0.1
|
8
8
|
|
9
|
-
|
10
|
-
:progress
|
11
|
-
|
9
|
+
attr_reader :total,
|
10
|
+
:progress
|
11
|
+
|
12
|
+
attr_accessor :starting_position,
|
12
13
|
:running_average,
|
13
14
|
:smoothing
|
14
15
|
|
@@ -100,7 +101,7 @@ class Progress
|
|
100
101
|
return 100.0 if total == 0
|
101
102
|
return 0.0 if total.nil?
|
102
103
|
|
103
|
-
|
104
|
+
'%5.2f' % [(progress.to_f * 100.0 / total * 100.0).floor / 100.0]
|
104
105
|
end
|
105
106
|
|
106
107
|
def absolute
|
data/spec/fixtures/benchmark.rb
CHANGED
@@ -2,6 +2,7 @@ require 'spec_helper'
|
|
2
2
|
require 'support/time'
|
3
3
|
require 'stringio'
|
4
4
|
|
5
|
+
# rubocop:disable Metrics/LineLength
|
5
6
|
describe ProgressBar::Base do
|
6
7
|
let(:output) do
|
7
8
|
StringIO.new('', 'w+').tap do |io|
|
@@ -945,3 +946,4 @@ describe ProgressBar::Base do
|
|
945
946
|
end
|
946
947
|
end
|
947
948
|
end
|
949
|
+
# rubocop:enable Metrics/LineLength
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-progressbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thekompanee
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-03-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.4.6
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: Ruby/ProgressBar is a flexible text progress bar library for Ruby.
|
@@ -196,4 +196,3 @@ test_files:
|
|
196
196
|
- spec/ruby-progressbar/timer_spec.rb
|
197
197
|
- spec/spec_helper.rb
|
198
198
|
- spec/support/time.rb
|
199
|
-
has_rdoc:
|