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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8e3227748461c02d74abab7629613f81b573329a
4
- data.tar.gz: d506cbe77093832a1d0f7c0f0819cbbd46b408b1
3
+ metadata.gz: 9f6a434af8a03ac85dcd80652a14e8cdb2e94662
4
+ data.tar.gz: 5453eeb5f4d781111d841679fa89298e647878ae
5
5
  SHA512:
6
- metadata.gz: a8f14234acd42a2f1e17d74e3884b8712ce5a2f0138399a3075a49f51d40186c59dd56d41aab3bb31fb4448682de559b41e6186c1b7ac3d8ab414047d115a079
7
- data.tar.gz: 5055eb206b181521df6e0bb7fa7ccd405a943456dbfab2c05bcefe18d5b954cfa3490f04eab0f9327d15dea99aba4230bb93a601eb6540af27874a94c75ea1a4
6
+ metadata.gz: e78b1cb39709d08fa1747603c935bea95c7a25357289b672e8a272a0efa51265be223b74bf86ecc34a999b65745976bf824996b87bb2037361e57e972f0f0e0f
7
+ data.tar.gz: a42a5d228efa7ac73d97be14758b04843b71ec487d6060ef1d68035848e9e6bbeae3218f22cad69c74f576fb3be1289fc4ee3c563e9e90301f981bd9d1a0f5d3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.0.6 ruby lib
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"
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-03-24"
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]
@@ -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
 
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -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).and_call_original
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.6
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-03-24 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar