bars 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bars +4 -11
- 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
|
-
|
9
|
-
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert Fletcher
|