vll 0.1.16 → 0.1.17

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/vl +11 -1
  2. metadata +2 -2
data/bin/vl CHANGED
@@ -18,6 +18,8 @@ $options = {
18
18
  :chop_length => 1024,
19
19
  :max_n_cols => 200,
20
20
  :return_char => ["\n", "\r", "\r\n"],
21
+ :color_1 => :yellow,
22
+ :color_2 => :blue,
21
23
  }
22
24
 
23
25
 
@@ -86,6 +88,14 @@ opts = OptionParser.new do |opts|
86
88
  $options[:chop_length] = l.to_i
87
89
  end
88
90
 
91
+ opts.on('--color-1 <INT>', 'color #1 in the color palette [yellow]') do |c|
92
+ $options[:color_1] = c.to_sym
93
+ end
94
+
95
+ opts.on('--color-2 <INT>', 'color #2 in the color palette [blue]') do |c|
96
+ $options[:color_2] = c.to_sym
97
+ end
98
+
89
99
  opts.separator ''
90
100
  opts.separator '\==============================================================================/'
91
101
  opts.separator ''
@@ -143,7 +153,7 @@ def print_row(row)
143
153
  end
144
154
 
145
155
  if $options[:alternate_color] then
146
- c = c.colorize([:yellow, :blue][i % 2])
156
+ c = c.colorize([$options[:color_1], $options[:color_2]][i % 2])
147
157
  end
148
158
 
149
159
  print c
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: vll
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.16
5
+ version: 0.1.17
6
6
  platform: ruby
7
7
  authors:
8
8
  - xzhu
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-05 00:00:00.000000000 Z
12
+ date: 2016-10-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime