vll 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/vl +4 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0766ce538b26d289709ce114d0f2154ded2039e
4
- data.tar.gz: 279510634defee1efc43073263869533a2cc96f8
3
+ metadata.gz: af3c8bb2d4eb2d7322c8a9a98ae15ea6e48ba627
4
+ data.tar.gz: 09581799f0f12ab56fd190856197acb376420bdc
5
5
  SHA512:
6
- metadata.gz: a435f6867143065722a603c2cfd758e25739327864e136fe43b4d7a9881a5e89c4e81830bb6070c3e745dddc3247d81fcd08d0105482b8ca52fd986e10f363df
7
- data.tar.gz: 3d0e91ab7137c83c7061cabf4e87801292f3d6636914a79fb0764f7fd81c700b9408abfd586a647d053df5d95be2e109662c2f444a394dc31db278e218b8fdcf
6
+ metadata.gz: 2b80bcc383b0dec5ecddf30e3d6b79e456fbdb5b0b92c682419ca9d918bd0f32d6569b50d3bccd85ee5490ff8391e309398fc9ba5e63d8171e5762d5b1c3d274
7
+ data.tar.gz: 0cf567a18c1e39efef67193097d8c5053eef3b05216a33e0ef6b211a01cb157e44d13482ef2a6491f81e54cdc451222f79f3d31a729ab2ae449015111332aa2b
data/bin/vl CHANGED
@@ -31,10 +31,10 @@ opts = OptionParser.new do |opts|
31
31
  'char or string to match the separator',
32
32
  ' default: "," (if csv, "\t")') do |s|
33
33
  begin
34
- options[:separator] = Regexp.new(s)
34
+ $options[:separator] = s
35
35
  rescue
36
36
  puts 'Warning: Problems encountered when processing the regex.'
37
- puts "Warning: Default value \"#{$options[:separator].source}\" is used."
37
+ puts "Warning: Default value \"#{$options[:separator]}\" is used."
38
38
  end
39
39
  end
40
40
 
@@ -75,8 +75,8 @@ opts = OptionParser.new do |opts|
75
75
  begin
76
76
  $options[:comment] = Regexp.new(c)
77
77
  rescue
78
- puts 'Warning: Problems encountered when processing the regex.'
79
- puts "Warning: Default value \"#{$options[:comment].source}\" is used."
78
+ STDERR.puts 'Warning: Problems encountered when processing the regex.'
79
+ STDERR.puts "Warning: Default value \"#{$options[:comment].source}\" is used."
80
80
  end
81
81
  end
82
82
  end
@@ -92,8 +92,6 @@ if $options[:separator] == ''
92
92
  end
93
93
  end
94
94
 
95
-
96
-
97
95
  #------#
98
96
  # Main #
99
97
  #------#
@@ -101,7 +99,6 @@ end
101
99
 
102
100
  $max_widths = []
103
101
 
104
-
105
102
  #==== line caching ====#
106
103
  cached_lines = []
107
104
  ARGF.each_line.with_index.reduce 0 do |pnum, (line, lnum)|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - xzhu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-14 00:00:00.000000000 Z
11
+ date: 2015-02-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Nicely format columns of a large CSV/TSV file according to their content
14
14
  width, using first few lines as estimation thus extremely fast. Customizable.