infobar 0.0.3 → 0.0.4

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: 44d1aecb104b7a5f45453165333a97693ff3196c
4
- data.tar.gz: a08b831cb9dc98aa9b03b5ec7d77bd114fa3ff0f
3
+ metadata.gz: dab0ec47cdbdde2fee658bb4662109eee7f3bc6f
4
+ data.tar.gz: f73eee664a775487de0b4597b6dc8f5d64feca3f
5
5
  SHA512:
6
- metadata.gz: 1f8479408dca9b8f469e16dd811abaa8544d70f95b3921ed8bf6612201f6c0804cf4f8b95556bc653f0dfdf6c3f7e9df10c8db892746bca064c8fcd19a86de73
7
- data.tar.gz: f27a81a467c5d654e6351e59d332bf7e4ed8b2d286bb28f47ef10ec78b5dd7d9be7266f27a17215394112746bcd2ed28dd1f3383186683f6acc3d6aea33d4424
6
+ metadata.gz: c8dc3ae766fb7b9d838f06cca6983e10494bf86e3f53a97cb51a4d8f52cda5ac6afec59f4e79848f67ae4dcd6466e431a62aa1dec05d939fd891d5df921f79c2
7
+ data.tar.gz: 6a194c44199685bfa8cefa571a860aa33b3468d34c3c5506419c6db39d9da8365d812899d775a7e7fa5eaa8e3a741ffd701bbe7e60223a125e2d3d3f92b8cf15
data/README.md CHANGED
@@ -21,6 +21,9 @@ Display progress of computations and additional information to the terminal.
21
21
 
22
22
  ## Changes
23
23
 
24
+ * 2017-03-10 Release 0.0.4
25
+ - Fix problem b/c at the beginning there might not be a valid rate.
26
+
24
27
  * 2017-03-09 Release 0.0.3
25
28
  - Reset frequency after calling clear. This means after calling output methods
26
29
  the next update will be forced.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.0.3 ruby lib
2
+ # stub: infobar 0.0.4 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.0.3"
6
+ s.version = "0.0.4"
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-09"
11
+ s.date = "2017-03-10"
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]
@@ -3,12 +3,13 @@ require 'infobar/trend'
3
3
  class Infobar::Rate
4
4
  def initialize(value, fifo_values = [], **opts)
5
5
  opts[:format] = add_trend(opts[:format], fifo_values)
6
- @string =
6
+ @string = value.full? do
7
7
  if opts[:format].include?('%U')
8
8
  Tins::Unit.format(value, **opts)
9
9
  else
10
10
  opts[:format] % value
11
11
  end
12
+ end.to_s
12
13
  end
13
14
 
14
15
  def to_s
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
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.0.3
4
+ version: 0.0.4
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-09 00:00:00.000000000 Z
11
+ date: 2017-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar