bars 0.0.3 → 0.0.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 (2) hide show
  1. data/bin/bars +4 -11
  2. metadata +3 -3
data/bin/bars CHANGED
@@ -3,18 +3,11 @@
3
3
  # Read your ~/bars.yaml file and output the results
4
4
 
5
5
  require 'bars'
6
+ require 'trollop'
6
7
 
7
- options = {}
8
- ARGV.each_with_index do |arg, index|
9
- if arg == '-p'
10
- options[:print_mode] = :percentage
11
- elsif arg == '-n'
12
- if ARGV[index+1]
13
- options[:bar_size] = ARGV[index+1]
14
- else
15
- raise "you need to enter a number"
16
- end
17
- end
8
+ options = Trollop::options do
9
+ opt :percent, "Percentage output", :short => 'q'
10
+ opt :bar_size, "Set bar size", :short => 'b', :type => :int
18
11
  end
19
12
 
20
13
  bars = Bars.new(options)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bars
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Robert Fletcher