infobar 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/VERSION +1 -1
- data/infobar.gemspec +3 -3
- data/lib/infobar/display.rb +2 -2
- data/lib/infobar/version.rb +1 -1
- data/lib/infobar.rb +10 -3
- 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: 0be5272638347ca61146d7e2896a77d93f255718
|
4
|
+
data.tar.gz: dece81f98dd6f4ebcc75018f8e2671ea1ee8aad1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30e7d15b2ebdc70f40736b486089edab521ce736edd8c6f430b7989c74c7ff0a1c2f89fd3dcf698a23523d75c3b908f9810914481b0dc986eb8c825480e16c3c
|
7
|
+
data.tar.gz: a3e2fd36c622f755a8e8210dae2cb73ca42a9630f4cbe7f7e12a6845d8ba08796c5b825b4846f90b2da4ad4351d6668d2e20d4a1670dc6f02d7504b0b207a352
|
data/README.md
CHANGED
@@ -21,6 +21,11 @@ Display progress of computations and additional information to the terminal.
|
|
21
21
|
|
22
22
|
## Changes
|
23
23
|
|
24
|
+
* 2017-05-24 Release 0.2.0
|
25
|
+
- Allow setting of input/output on initial call.
|
26
|
+
|
27
|
+
…
|
28
|
+
|
24
29
|
* 2017-03-24 Release 0.0.6
|
25
30
|
- Add busybar functionality via Infobar.busy { … } call
|
26
31
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/infobar.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: infobar 0.
|
2
|
+
# stub: infobar 0.2.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "infobar".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.2.0"
|
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-05-
|
11
|
+
s.date = "2017-05-24"
|
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/display.rb
CHANGED
data/lib/infobar/version.rb
CHANGED
data/lib/infobar.rb
CHANGED
@@ -53,6 +53,10 @@ class Infobar
|
|
53
53
|
|
54
54
|
delegate :as_styles=, to: :display
|
55
55
|
|
56
|
+
delegate :input=, to: :display
|
57
|
+
|
58
|
+
delegate :output=, to: :display
|
59
|
+
|
56
60
|
def call(
|
57
61
|
total:,
|
58
62
|
current: 0,
|
@@ -62,17 +66,20 @@ class Infobar
|
|
62
66
|
style: cc.infobar?&.style?&.to_h,
|
63
67
|
frequency: cc.infobar?&.frequency?,
|
64
68
|
update: false,
|
65
|
-
|
66
|
-
|
69
|
+
as_styles: nil,
|
70
|
+
input: $stdin,
|
71
|
+
output: $stdout
|
67
72
|
)
|
68
73
|
self.label = label
|
69
74
|
counter.reset(total: total, current: current)
|
70
|
-
display.reset
|
75
|
+
display.reset clear: false
|
71
76
|
@message = convert_to_message(message)
|
72
77
|
show.nil? or self.show = show
|
73
78
|
frequency.nil? or display.frequency = frequency
|
74
79
|
style.nil? or self.style = style
|
75
80
|
self.as_styles = as_styles
|
81
|
+
self.input = input
|
82
|
+
self.output = output
|
76
83
|
update and update(message: @message, force: true)
|
77
84
|
self
|
78
85
|
end
|
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.
|
4
|
+
version: 0.2.0
|
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-05-
|
11
|
+
date: 2017-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|