vll 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/vl +8 -10
  2. metadata +10 -9
  3. checksums.yaml +0 -7
data/bin/vl CHANGED
@@ -5,15 +5,21 @@ require 'optparse'
5
5
  require 'csv'
6
6
 
7
7
  $options = {
8
- :separator => "",
9
8
  :padding => 1,
10
9
  :skip => 0,
11
10
  :comment => /^#/,
12
11
  :probe_lines => 100,
13
12
  :justify => 'l',
14
- :quote => "\x00"
15
13
  }
16
14
 
15
+ if ARGF.filename =~ /.*\.csv/
16
+ $options[:separator] = ','
17
+ $options[:quote] = '"'
18
+ else
19
+ $options[:separator] = "\t"
20
+ $options[:quote] = "\x00"
21
+ end
22
+
17
23
 
18
24
  opts = OptionParser.new do |opts|
19
25
  opts.program_name = '(V)iew (L)arge table'
@@ -90,14 +96,6 @@ end
90
96
 
91
97
  opts.parse!
92
98
 
93
- #default separator
94
- if $options[:separator] == ''
95
- if ARGF.filename =~ /.*\.csv/
96
- $options[:separator] = ','
97
- else
98
- $options[:separator] = "\t"
99
- end
100
- end
101
99
 
102
100
  #------#
103
101
  # Main #
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vll
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ prerelease:
5
+ version: 0.0.9
5
6
  platform: ruby
6
7
  authors:
7
8
  - xzhu
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-04-02 00:00:00.000000000 Z
12
+ date: 2015-07-07 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: Nicely format columns of a large CSV/TSV file according to their content
14
15
  width, using first few lines as estimation thus extremely fast. Customizable.
@@ -25,26 +26,26 @@ files:
25
26
  homepage:
26
27
  licenses:
27
28
  - MIT
28
- metadata: {}
29
29
  post_install_message:
30
30
  rdoc_options: []
31
31
  require_paths:
32
32
  - lib
33
33
  required_ruby_version: !ruby/object:Gem::Requirement
34
+ none: false
34
35
  requirements:
35
- - - ">="
36
+ - - ! '>='
36
37
  - !ruby/object:Gem::Version
37
38
  version: '0'
38
39
  required_rubygems_version: !ruby/object:Gem::Requirement
40
+ none: false
39
41
  requirements:
40
- - - ">="
42
+ - - ! '>='
41
43
  - !ruby/object:Gem::Version
42
44
  version: '0'
43
45
  requirements: []
44
46
  rubyforge_project:
45
- rubygems_version: 2.4.2
47
+ rubygems_version: 1.8.23.2
46
48
  signing_key:
47
- specification_version: 4
48
- summary: "(V)iew (L)arge table. Format large table in a split of a second"
49
+ specification_version: 3
50
+ summary: (V)iew (L)arge table. Format large table in a split of a second
49
51
  test_files: []
50
- has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 5cb56c09c20fadfd3f71c5926ea6aec4a67afcb7
4
- data.tar.gz: 990492ae4fb68696da57acbd6c4e373878da56cc
5
- SHA512:
6
- metadata.gz: 4a78efe92d103820f71c023c7a365fe86687a752d0c5c1f88ce245abb30733386fc0281eae7e4dbdd701668edf15efc5fcebfb15a561d3c90c7a6cf2299f757a
7
- data.tar.gz: edb224eee0b5a299acd103c32d6b18566f9819750846aa71b9e19307b6772eaeb751eb7b8216a3217d0d78d182bf586b61859aaf1b9533daa740f4d4feb765b0