bumbler 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/bumbler.rb +1 -1
  2. data/lib/bumbler/progress.rb +1 -1
  3. metadata +1 -1
@@ -1,6 +1,6 @@
1
1
  module Bumbler
2
2
  # We can be required twice due to the command line require
3
- VERSION = '0.1.3' unless self.const_defined? :VERSION
3
+ VERSION = '0.1.4' unless self.const_defined? :VERSION
4
4
 
5
5
  autoload :Bundler, 'bumbler/bundler'
6
6
  autoload :Hooks, 'bumbler/hooks'
@@ -48,7 +48,7 @@ module Bumbler
48
48
  def bar(width)
49
49
  inner_size = width - 2
50
50
 
51
- fill_size = ((@loaded_items.to_f / @item_count.to_f) * inner_size).to_i
51
+ fill_size = [((@loaded_items.to_f / @item_count.to_f) * inner_size).to_i, inner_size].min
52
52
  fill = '#' * fill_size
53
53
  empty = ' ' * (inner_size - fill_size)
54
54
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bumbler
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.3
5
+ version: 0.1.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ian MacLeod