infobar 0.6.0 → 0.6.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
  SHA256:
3
- metadata.gz: 80b49251df4d88a23dad1fc63b3098cbc4cbfa1e621fd52fbb59f3425d277a38
4
- data.tar.gz: c997c2b5c5a10ce7bd9a4c15fe9d964ce897fe0497ab5bd262b8b29aa283c403
3
+ metadata.gz: 9d2d29560764c1120e4663b0ee3df655c67acf6184dd9ca81c56079f687d2b13
4
+ data.tar.gz: 758e95f1214445e94c24f4c4cf20f930a41b81ebd786901d9d8a79236a66d971
5
5
  SHA512:
6
- metadata.gz: ecfaedb518237aa4d19c5ae349cfae5f8424ee6630c0674366acaaa900655249d4eb9bf817cd5699eaa6a4ea543ed8a6f497d98f8b6aee78a38b5f8f4ba653bf
7
- data.tar.gz: d487777c25896417f4cbc0a0414d379b9cfb0fd5b4b8234870645a926bae2db7ae9ca33edaabea0f49c6d9c719ca233384f4831e028911f3fd32df405c6dbd1c
6
+ metadata.gz: 5b1b2cef210f4fce3a3bbe590ec1010b40695323e739d98bbd7dd31a3da69e8cc0506654ebc79ee71298076c94b69832b0c029e8b5d502319eab3310036ffe86
7
+ data.tar.gz: 505a369077eff5ad5e805cbbd623033a83327abe4a9253fed7d14b43d6f80a74eb72f20cd8140d0c4bb2ea6bd8f5f7b92700d3bbe6a3359376cddd721559d33d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.6.0 ruby lib
2
+ # stub: infobar 0.6.1 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.6.0"
6
+ s.version = "0.6.1"
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 = "2019-01-31"
11
+ s.date = "2019-04-11"
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]
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.homepage = "http://flori.github.com/infobar".freeze
17
17
  s.rdoc_options = ["--title".freeze, "Infobar".freeze, "--main".freeze, "README.md".freeze]
18
18
  s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
19
- s.rubygems_version = "3.0.1".freeze
19
+ s.rubygems_version = "3.0.3".freeze
20
20
  s.summary = "Gem to display information about computations.".freeze
21
21
  s.test_files = ["spec/infobar/config_spec.rb".freeze, "spec/infobar/counter_spec.rb".freeze, "spec/infobar/display_spec.rb".freeze, "spec/infobar/duration_spec.rb".freeze, "spec/infobar/fifo_spec.rb".freeze, "spec/infobar/frequency_spec.rb".freeze, "spec/infobar/input_output_spec.rb".freeze, "spec/infobar/message_spec.rb".freeze, "spec/infobar/number_spec.rb".freeze, "spec/infobar/rate_spec.rb".freeze, "spec/infobar/spinner_spec.rb".freeze, "spec/infobar/timer_spec.rb".freeze, "spec/infobar/trend_spec.rb".freeze, "spec/infobar_spec.rb".freeze, "spec/spec_helper.rb".freeze]
22
22
 
@@ -105,4 +105,10 @@ class Infobar::Counter
105
105
  @current / @total.to_f
106
106
  end
107
107
  end
108
+
109
+ def to_s
110
+ n = -> k { k.nil? ? 'default' : k.to_s }
111
+ width = -@as.keys.map(&n).max_by(&:size).to_i
112
+ @as.map { |key, value| "%#{width}s: %d" % [ n.(key), value ] }.join(?\n)
113
+ end
108
114
  end
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
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:
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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-31 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0'
217
217
  requirements: []
218
- rubygems_version: 3.0.1
218
+ rubygems_version: 3.0.3
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Gem to display information about computations.