infobar 0.0.6 → 0.0.7
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/infobar.gemspec +3 -3
- data/lib/infobar.rb +3 -3
- data/lib/infobar/version.rb +1 -1
- data/spec/infobar_spec.rb +13 -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: 9f6a434af8a03ac85dcd80652a14e8cdb2e94662
|
4
|
+
data.tar.gz: 5453eeb5f4d781111d841679fa89298e647878ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e78b1cb39709d08fa1747603c935bea95c7a25357289b672e8a272a0efa51265be223b74bf86ecc34a999b65745976bf824996b87bb2037361e57e972f0f0e0f
|
7
|
+
data.tar.gz: a42a5d228efa7ac73d97be14758b04843b71ec487d6060ef1d68035848e9e6bbeae3218f22cad69c74f576fb3be1289fc4ee3c563e9e90301f981bd9d1a0f5d3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/infobar.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: infobar 0.0.
|
2
|
+
# stub: infobar 0.0.7 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "infobar".freeze
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.7"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "2017-
|
11
|
+
s.date = "2017-04-13"
|
12
12
|
s.description = "This gem displays progress of computations and additional information to the terminal.".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
14
|
s.extra_rdoc_files = ["README.md".freeze, "lib/infobar.rb".freeze, "lib/infobar/counter.rb".freeze, "lib/infobar/display.rb".freeze, "lib/infobar/duration.rb".freeze, "lib/infobar/fancy_interface.rb".freeze, "lib/infobar/fifo.rb".freeze, "lib/infobar/frequency.rb".freeze, "lib/infobar/input_output.rb".freeze, "lib/infobar/message.rb".freeze, "lib/infobar/number.rb".freeze, "lib/infobar/rate.rb".freeze, "lib/infobar/spinner.rb".freeze, "lib/infobar/timer.rb".freeze, "lib/infobar/trend.rb".freeze, "lib/infobar/version.rb".freeze]
|
data/lib/infobar.rb
CHANGED
@@ -67,7 +67,7 @@ class Infobar
|
|
67
67
|
@message = convert_to_message(message)
|
68
68
|
show.nil? or self.show = show
|
69
69
|
if update
|
70
|
-
update(message: @message)
|
70
|
+
update(message: @message, force: true)
|
71
71
|
else
|
72
72
|
display.reset
|
73
73
|
end
|
@@ -103,9 +103,9 @@ class Infobar
|
|
103
103
|
self
|
104
104
|
end
|
105
105
|
|
106
|
-
def update(message: nil)
|
106
|
+
def update(message: nil, force: true)
|
107
107
|
@message = convert_to_message(message)
|
108
|
-
display.update(message: @message, progressed: counter.progressed)
|
108
|
+
display.update(message: @message, progressed: counter.progressed, force: force)
|
109
109
|
self
|
110
110
|
end
|
111
111
|
|
data/lib/infobar/version.rb
CHANGED
data/spec/infobar_spec.rb
CHANGED
@@ -19,10 +19,22 @@ describe Infobar do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'can be called and update instantly' do
|
22
|
-
expect(infobar).to receive(:update).
|
22
|
+
expect(infobar).to receive(:update).with(message: anything, force: true).
|
23
|
+
and_call_original
|
23
24
|
Infobar(total: 10, update: true)
|
24
25
|
end
|
25
26
|
|
27
|
+
it 'can be update display with force' do
|
28
|
+
Infobar(total: 10)
|
29
|
+
expect(infobar.display).to receive(:update).
|
30
|
+
with(
|
31
|
+
message: anything,
|
32
|
+
progressed: anything,
|
33
|
+
force: true
|
34
|
+
).and_call_original
|
35
|
+
infobar.update
|
36
|
+
end
|
37
|
+
|
26
38
|
it 'can be called via toplevel method' do
|
27
39
|
Infobar(total: 10)
|
28
40
|
expect(infobar.counter.total).to eq 10
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infobar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|