infobar 0.0.4 → 0.0.5

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: dab0ec47cdbdde2fee658bb4662109eee7f3bc6f
4
- data.tar.gz: f73eee664a775487de0b4597b6dc8f5d64feca3f
3
+ metadata.gz: 6ec671d94461ee9698441c4d24f67957ebcd5c9a
4
+ data.tar.gz: 862abaf7cb6c9c56707c5cafbc97cca03643e172
5
5
  SHA512:
6
- metadata.gz: c8dc3ae766fb7b9d838f06cca6983e10494bf86e3f53a97cb51a4d8f52cda5ac6afec59f4e79848f67ae4dcd6466e431a62aa1dec05d939fd891d5df921f79c2
7
- data.tar.gz: 6a194c44199685bfa8cefa571a860aa33b3468d34c3c5506419c6db39d9da8365d812899d775a7e7fa5eaa8e3a741ffd701bbe7e60223a125e2d3d3f92b8cf15
6
+ metadata.gz: 41de04b72a0c254c67796c0a437dce3c7dd0a57d42f3305ae7125a664b0c5ea288aa2919b37baa8ca55ea641cd25cce94142bee562f7f414cb4ec7b720e90a0e
7
+ data.tar.gz: fb93a67f2e710dcac96bf4926c322a35f9e3e2531b761c7265ccafe5e8718df4da743ca02e74059b2d5642a2804b82660a8918ef5ee661c80da7d3254e31840c
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
+ - Always provide a default unit for rate display, 'i/s' for "items per second".
26
+
24
27
  * 2017-03-10 Release 0.0.4
25
28
  - Fix problem b/c at the beginning there might not be a valid rate.
26
29
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/infobar.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: infobar 0.0.4 ruby lib
2
+ # stub: infobar 0.0.5 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "infobar".freeze
6
- s.version = "0.0.4"
6
+ s.version = "0.0.5"
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]
@@ -89,7 +89,7 @@ class Infobar::Message
89
89
  end
90
90
 
91
91
  # rate with or without units
92
- register('%r', unit: nil, prefix: 1000, format: '%.3f%U%t') do |directive, opts|
92
+ register('%r', unit: 'i/s', prefix: 1000, format: '%.3f%U%t') do |directive, opts|
93
93
  Infobar::Rate.new(Infobar.counter.rate, Infobar.counter.fifo_rate, **opts)
94
94
  end
95
95
 
data/lib/infobar/rate.rb CHANGED
@@ -2,6 +2,7 @@ require 'infobar/trend'
2
2
 
3
3
  class Infobar::Rate
4
4
  def initialize(value, fifo_values = [], **opts)
5
+ opts[:format] ||= '%.3f%U%t'
5
6
  opts[:format] = add_trend(opts[:format], fifo_values)
6
7
  @string = value.full? do
7
8
  if opts[:format].include?('%U')
@@ -1,6 +1,6 @@
1
1
  class Infobar
2
2
  # Infobar version
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
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:
@@ -33,7 +33,7 @@ describe Infobar::Message do
33
33
  it 'can be interpolated' do
34
34
  Time.dummy(now) do
35
35
  expect(message.to_str).to eq(
36
- "23 42 19 Test 0.55 0.452 54.76 45.24 00:00:02 00:00:21 00:00:19 11:11:30 1.000→ 00:01.000000 – %"
36
+ "23 42 19 Test 0.55 0.452 54.76 45.24 00:00:02 00:00:21 00:00:19 11:11:30 1.000i/s→ 00:01.000000 – %"
37
37
  )
38
38
  end
39
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infobar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank