tb 0.9 → 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README +13 -11
  3. data/lib/tb.rb +14 -6
  4. data/lib/tb/catreader.rb +2 -2
  5. data/lib/tb/cmd_consecutive.rb +6 -2
  6. data/lib/tb/cmd_crop.rb +22 -3
  7. data/lib/tb/cmd_cross.rb +24 -0
  8. data/lib/tb/cmd_cut.rb +20 -10
  9. data/lib/tb/cmd_git.rb +20 -7
  10. data/lib/tb/cmd_group.rb +32 -0
  11. data/lib/tb/cmd_gsub.rb +21 -0
  12. data/lib/tb/cmd_join.rb +28 -0
  13. data/lib/tb/cmd_ls.rb +9 -0
  14. data/lib/tb/cmd_melt.rb +15 -0
  15. data/lib/tb/cmd_mheader.rb +15 -0
  16. data/lib/tb/cmd_nest.rb +27 -6
  17. data/lib/tb/cmd_newfield.rb +19 -2
  18. data/lib/tb/cmd_rename.rb +20 -0
  19. data/lib/tb/{cmd_grep.rb → cmd_search.rb} +37 -23
  20. data/lib/tb/cmd_shape.rb +69 -25
  21. data/lib/tb/cmd_sort.rb +20 -0
  22. data/lib/tb/cmd_tar.rb +38 -0
  23. data/lib/tb/cmd_to_json.rb +2 -2
  24. data/lib/tb/cmd_to_ltsv.rb +3 -3
  25. data/lib/tb/cmd_to_pnm.rb +3 -3
  26. data/lib/tb/cmd_to_tsv.rb +3 -3
  27. data/lib/tb/cmd_to_yaml.rb +3 -3
  28. data/lib/tb/cmd_unmelt.rb +15 -0
  29. data/lib/tb/cmd_unnest.rb +31 -7
  30. data/lib/tb/cmdmain.rb +2 -0
  31. data/lib/tb/cmdtop.rb +1 -1
  32. data/lib/tb/cmdutil.rb +9 -62
  33. data/lib/tb/csv.rb +21 -79
  34. data/lib/tb/enumerable.rb +42 -68
  35. data/lib/tb/enumerator.rb +15 -7
  36. data/lib/tb/{fieldset.rb → hashreader.rb} +37 -56
  37. data/lib/tb/hashwriter.rb +54 -0
  38. data/lib/tb/headerreader.rb +108 -0
  39. data/lib/tb/headerwriter.rb +116 -0
  40. data/lib/tb/json.rb +17 -15
  41. data/lib/tb/ltsv.rb +35 -96
  42. data/lib/tb/ndjson.rb +63 -0
  43. data/lib/tb/numericreader.rb +66 -0
  44. data/lib/tb/numericwriter.rb +61 -0
  45. data/lib/tb/pnm.rb +206 -200
  46. data/lib/tb/ropen.rb +54 -59
  47. data/lib/tb/tsv.rb +39 -71
  48. data/sample/excel2csv +24 -25
  49. data/sample/poi-xls2csv.rb +13 -14
  50. data/tb.gemspec +154 -0
  51. data/test/test_cmd_cat.rb +28 -6
  52. data/test/test_cmd_consecutive.rb +8 -3
  53. data/test/test_cmd_cut.rb +14 -4
  54. data/test/test_cmd_git_log.rb +50 -50
  55. data/test/test_cmd_grep.rb +6 -6
  56. data/test/test_cmd_gsub.rb +7 -2
  57. data/test/test_cmd_ls.rb +70 -62
  58. data/test/test_cmd_shape.rb +43 -6
  59. data/test/test_cmd_svn_log.rb +26 -27
  60. data/test/test_cmd_to_csv.rb +10 -5
  61. data/test/test_cmd_to_json.rb +16 -0
  62. data/test/test_cmd_to_ltsv.rb +2 -2
  63. data/test/test_cmd_to_pp.rb +7 -2
  64. data/test/test_csv.rb +74 -62
  65. data/test/test_ex_enumerable.rb +0 -1
  66. data/test/test_fileenumerator.rb +3 -3
  67. data/test/test_headercsv.rb +43 -0
  68. data/test/test_json.rb +2 -2
  69. data/test/test_ltsv.rb +22 -17
  70. data/test/test_ndjson.rb +62 -0
  71. data/test/test_numericcsv.rb +36 -0
  72. data/test/test_pnm.rb +69 -70
  73. data/test/test_reader.rb +27 -124
  74. data/test/test_tbenum.rb +18 -18
  75. data/test/test_tsv.rb +21 -32
  76. data/test/util_tbtest.rb +12 -0
  77. metadata +41 -19
  78. data/lib/tb/basic.rb +0 -1070
  79. data/lib/tb/reader.rb +0 -106
  80. data/lib/tb/record.rb +0 -158
  81. data/test/test_basic.rb +0 -403
  82. data/test/test_fieldset.rb +0 -42
  83. data/test/test_record.rb +0 -61
@@ -3,92 +3,44 @@ require 'test/unit'
3
3
  require 'tmpdir'
4
4
 
5
5
  class TestTbReader < Test::Unit::TestCase
6
- def test_load_csv
6
+ def test_open_prefix_csv
7
7
  Dir.mktmpdir {|d|
8
- open(i="#{d}/i.csv", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
8
+ open(ic="#{d}/c", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
9
9
  a,b
10
10
  1,3
11
- 2,4
12
- End
13
- t = Tb.load_csv(i)
14
- records = []
15
- t.each_record {|record| records << record.to_h }
16
- assert_equal(
17
- [{"a"=>"1", "b"=>"3"},
18
- {"a"=>"2", "b"=>"4"}],
19
- records)
20
- }
21
- end
22
-
23
- def test_load_tsv
24
- Dir.mktmpdir {|d|
25
- open(i="#{d}/i.tsv", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
26
- a\tb
27
- 1\t3
28
- 2\t4
29
11
  End
30
- t = Tb.load_tsv(i)
31
- records = []
32
- t.each_record {|record| records << record.to_h }
33
- assert_equal(
34
- [{"a"=>"1", "b"=>"3"},
35
- {"a"=>"2", "b"=>"4"}],
36
- records)
37
- }
38
- end
39
-
40
- def test_parse_csv
41
- csv = <<-'End'.gsub(/^[ \t]+/, '')
42
- 1,2
43
- 3,4
44
- End
45
- t = Tb.parse_csv(csv, 'a', 'b')
46
- records = []
47
- t.each_record {|record|
48
- records << record.to_h
49
- }
50
- assert_equal(
51
- [{"a"=>"1", "b"=>"2"},
52
- {"a"=>"3", "b"=>"4"}],
53
- records)
54
- end
55
-
56
- def test_parse_tsv
57
- csv = <<-"End".gsub(/^[ \t]+/, '')
58
- 1\t2
59
- 3\t4
60
- End
61
- t = Tb.parse_tsv(csv, 'a', 'b')
62
- records = []
63
- t.each_record {|record|
64
- records << record.to_h
12
+ Tb.open_reader("csv:#{ic}") {|r|
13
+ header = nil
14
+ all = []
15
+ r.with_header {|h| header = h}.each {|pairs| all << pairs.map {|f, v| v } }
16
+ assert_equal(%w[a b], header)
17
+ assert_equal([%w[1 3]], all)
18
+ }
65
19
  }
66
- assert_equal(
67
- [{"a"=>"1", "b"=>"2"},
68
- {"a"=>"3", "b"=>"4"}],
69
- records)
70
20
  end
71
21
 
72
- def test_open
22
+ def test_open_no_prefix_suffix_csv
73
23
  Dir.mktmpdir {|d|
74
24
  open(ic="#{d}/c", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
75
25
  a,b
76
26
  1,3
77
27
  End
78
- open(it="#{d}/t", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
79
- a\tb
80
- 1\t3
81
- End
82
- open(ij="#{d}/j", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
83
- [{"a":1,"b":3}]
84
- End
85
- Tb.open_reader("csv:#{ic}") {|r|
28
+ Tb.open_reader(ic) {|r|
86
29
  header = nil
87
30
  all = []
88
31
  r.with_header {|h| header = h}.each {|pairs| all << pairs.map {|f, v| v } }
89
32
  assert_equal(%w[a b], header)
90
33
  assert_equal([%w[1 3]], all)
91
34
  }
35
+ }
36
+ end
37
+
38
+ def test_open_prefix_tsv
39
+ Dir.mktmpdir {|d|
40
+ open(it="#{d}/t", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
41
+ a\tb
42
+ 1\t3
43
+ End
92
44
  Tb.open_reader("tsv:#{it}") {|r|
93
45
  header = nil
94
46
  all = []
@@ -96,74 +48,25 @@ class TestTbReader < Test::Unit::TestCase
96
48
  assert_equal(%w[a b], header)
97
49
  assert_equal([%w[1 3]], all)
98
50
  }
99
- Tb.open_reader("json:#{ij}") {|r|
100
- header = nil
101
- all = []
102
- r.with_header {|h| header = h}.each {|pairs| all << pairs.map {|f, v| v } }
103
- assert_equal(nil, header)
104
- assert_equal([[1, 3]], all)
105
- }
106
- Tb.open_reader(ic) {|r|
107
- header = nil
108
- all = []
109
- r.with_header {|h| header = h}.each {|pairs| all << pairs.map {|f, v| v } }
110
- assert_equal(%w[a b], header)
111
- assert_equal([%w[1 3]], all)
112
- }
113
- assert_raise(ArgumentError) { Tb.open_reader(Object.new) }
114
51
  }
115
52
  end
116
53
 
117
- def test_field_index
54
+ def test_open_prefix_json
118
55
  Dir.mktmpdir {|d|
119
- open(i="#{d}/i.csv", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
120
- a,b
121
- 1,3
56
+ open(ij="#{d}/j", "w") {|f| f << <<-"End".gsub(/^[ \t]+/, '') }
57
+ [{"a":1,"b":3}]
122
58
  End
123
- Tb.open_reader(i) {|r|
59
+ Tb.open_reader("json:#{ij}") {|r|
124
60
  header = nil
125
61
  all = []
126
62
  r.with_header {|h| header = h}.each {|pairs| all << pairs.map {|f, v| v } }
127
63
  assert_equal(%w[a b], header)
128
- assert_equal([%w[1 3]], all)
129
- assert_equal("a", r.field_from_index(0))
130
- assert_equal("b", r.field_from_index(1))
131
- assert_raise(ArgumentError) { r.field_from_index(2) }
132
- assert_equal(0, r.index_from_field("a"))
133
- assert_equal(1, r.index_from_field("b"))
134
- assert_raise(ArgumentError) { r.index_from_field("c") }
135
- assert_raise(ArgumentError) { r.index_from_field("2") }
136
- assert_equal("1", r.field_from_index_ex(2))
137
- assert_equal(3, r.index_from_field_ex("2"))
64
+ assert_equal([[1, 3]], all)
138
65
  }
139
66
  }
140
67
  end
141
68
 
142
- def test_header_ignore_empty
143
- csv = "\n" + <<-'End'.gsub(/^[ \t]+/, '')
144
- a,b
145
- 1,2
146
- 3,4
147
- End
148
- t = Tb.parse_csv(csv)
149
- records = []
150
- t.each_record {|record|
151
- records << record.to_h
152
- }
153
- assert_equal(
154
- [{"a"=>"1", "b"=>"2"},
155
- {"a"=>"3", "b"=>"4"}],
156
- records)
69
+ def test_open_nonstring
70
+ assert_raise(ArgumentError) { Tb.open_reader(Object.new) }
157
71
  end
158
-
159
- def test_header_empty_only
160
- csv = "\n"
161
- t = Tb.parse_csv(csv)
162
- records = []
163
- t.each_record {|record|
164
- records << record.to_h
165
- }
166
- assert_equal([], records)
167
- end
168
-
169
72
  end
@@ -4,14 +4,14 @@ require 'tmpdir'
4
4
 
5
5
  class TestTbEnum < Test::Unit::TestCase
6
6
  def test_cat_without_block
7
- t1 = Tb.new(%w[a b], [1, 2], [3, 4])
8
- t2 = Tb.new(%w[c d], [5, 6], [7, 8])
7
+ t1 = Tb::Enumerator.from_header_and_values(%w[a b], [1, 2], [3, 4])
8
+ t2 = Tb::Enumerator.from_header_and_values(%w[c d], [5, 6], [7, 8])
9
9
  e = t1.cat(t2)
10
10
  result = []
11
11
  e.with_header {|header|
12
12
  result << [:header, header]
13
13
  }.each {|x|
14
- assert_kind_of(Tb::Record, x)
14
+ assert_kind_of(Hash, x)
15
15
  result << [x.to_a]
16
16
  }
17
17
  assert_equal(
@@ -24,11 +24,11 @@ class TestTbEnum < Test::Unit::TestCase
24
24
  end
25
25
 
26
26
  def test_cat_with_block
27
- t1 = Tb.new(%w[a b], [1, 2], [3, 4])
28
- t2 = Tb.new(%w[c d], [5, 6], [7, 8])
27
+ t1 = Tb::Enumerator.from_header_and_values(%w[a b], [1, 2], [3, 4])
28
+ t2 = Tb::Enumerator.from_header_and_values(%w[c d], [5, 6], [7, 8])
29
29
  result = []
30
30
  t1.cat(t2) {|x|
31
- assert_kind_of(Tb::Record, x)
31
+ assert_kind_of(Hash, x)
32
32
  result << x.to_a
33
33
  }
34
34
  assert_equal(
@@ -41,9 +41,9 @@ class TestTbEnum < Test::Unit::TestCase
41
41
 
42
42
  def test_write_to_csv_basic
43
43
  obj = [
44
- [['a', 0], ['b', 1], ['c', 2]],
45
- [['a', 3], ['b', 4], ['c', 5]],
46
- [['a', 6], ['b', 7], ['c', 8]],
44
+ {'a' => 0, 'b' => 1, 'c' => 2},
45
+ {'a' => 3, 'b' => 4, 'c' => 5},
46
+ {'a' => 6, 'b' => 7, 'c' => 8},
47
47
  ]
48
48
  def obj.header_and_each(header_proc, &block)
49
49
  header_proc.call(nil) if header_proc
@@ -65,9 +65,9 @@ class TestTbEnum < Test::Unit::TestCase
65
65
 
66
66
  def test_write_to_csv_header_extension
67
67
  obj = [
68
- [['a', 0]],
69
- [['b', 1]],
70
- [['c', 2]],
68
+ {'a' => 0},
69
+ {'b' => 1},
70
+ {'c' => 2},
71
71
  ]
72
72
  def obj.header_and_each(header_proc, &block)
73
73
  header_proc.call(nil) if header_proc
@@ -89,9 +89,9 @@ class TestTbEnum < Test::Unit::TestCase
89
89
 
90
90
  def test_write_to_csv_without_header
91
91
  obj = [
92
- [['a', 0]],
93
- [['b', 1]],
94
- [['c', 2]],
92
+ {'1' => "x"},
93
+ {'2' => "y"},
94
+ {'3' => "z"},
95
95
  ]
96
96
  def obj.header_and_each(header_proc, &block)
97
97
  header_proc.call(nil) if header_proc
@@ -103,9 +103,9 @@ class TestTbEnum < Test::Unit::TestCase
103
103
  obj.write_to_csv(f, false)
104
104
  }
105
105
  assert_equal(<<-'End'.gsub(/^\s*/, ''), File.read("#{d}/foo.csv"))
106
- 0
107
- ,1
108
- ,,2
106
+ x
107
+ ,y
108
+ ,,z
109
109
  End
110
110
  }
111
111
  end
@@ -2,47 +2,36 @@ require 'tb'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestTbTSV < Test::Unit::TestCase
5
+ def parse_tsv(tsv)
6
+ Tb::HeaderTSVReader.new(StringIO.new(tsv)).to_a
7
+ end
8
+
9
+ def generate_tsv(ary)
10
+ writer = Tb::HeaderTSVWriter.new(out = '')
11
+ ary.each {|h| writer.put_hash h }
12
+ writer.finish
13
+ out
14
+ end
15
+
5
16
  def test_parse
6
17
  tsv = "a\tb\n1\t2\n"
7
- t = Tb.parse_tsv(tsv)
8
- records = []
9
- t.each_record {|record|
10
- records << record.to_h_with_reserved
11
- }
18
+ ary = parse_tsv(tsv)
12
19
  assert_equal(
13
- [{"_recordid"=>0, "a"=>"1", "b"=>"2"}],
14
- records)
20
+ [{"a"=>"1", "b"=>"2"}],
21
+ ary)
15
22
  end
16
23
 
17
- def test_parse_conv
18
- tsv = "foo\na\tb\n1\t2\n"
19
- t = Tb.parse_tsv(tsv) {|aa|
20
- assert_equal([%w[foo],
21
- %w[a b],
22
- %w[1 2]],
23
- aa)
24
- aa.shift
25
- aa
26
- }
27
- records = []
28
- t.each_record {|record|
29
- records << record.to_h_with_reserved
30
- }
24
+ def test_parse2
25
+ tsv = "a\tb\n" + "1\t2\n" + "3\t4\n"
26
+ ary = parse_tsv(tsv)
31
27
  assert_equal(
32
- [{"_recordid"=>0, "a"=>"1", "b"=>"2"}],
33
- records)
28
+ [{"a"=>"1", "b"=>"2"}, {"a"=>"3", "b"=>"4"}],
29
+ ary)
34
30
  end
35
31
 
36
32
  def test_generate_tsv
37
- tbl = Tb.new %w[a b], %w[foo bar]
38
- tbl.generate_tsv(out="")
39
- assert_equal("a\tb\nfoo\tbar\n", out)
40
- end
41
-
42
- def test_generate_tsv_with_block
43
- tbl = Tb.new %w[a b], %w[foo bar], %w[q w]
44
- tbl.generate_tsv(out="") {|recids| recids.reverse }
45
- assert_equal("a\tb\nq\tw\nfoo\tbar\n", out)
33
+ t = [{'a' => 'foo', 'b' => 'bar'}]
34
+ assert_equal("a\tb\nfoo\tbar\n", generate_tsv(t))
46
35
  end
47
36
 
48
37
  end
@@ -0,0 +1,12 @@
1
+ require 'stringio'
2
+
3
+ def capture_stderr
4
+ begin
5
+ save_stderr = $stderr
6
+ $stderr = StringIO.new(stderr='')
7
+ yield
8
+ ensure
9
+ $stderr = save_stderr
10
+ end
11
+ stderr
12
+ end
metadata CHANGED
@@ -1,24 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tb
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanaka Akira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-29 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: test-unit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.5.5
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.5.5
13
27
  description: |
14
- tb is a manipulation tool for table: CSV, TSV, LTSV, JSON, etc.
28
+ tb is a manipulation tool for tables.
15
29
 
16
30
  tb provides a command and a library for manipulating tables:
17
- Unix filter like operations (grep, sort, cat, cut, ls, etc.),
31
+ Unix filter like operations (sort, cat, cut, ls, etc.),
18
32
  SQL like operations (join, group, etc.),
19
- other table operations (gsub, rename, cross, melt, unmelt, etc.),
33
+ other table operations (search, gsub, rename, cross, melt, unmelt, etc.),
20
34
  information extractions (git, svn, tar),
21
35
  and more.
36
+
37
+ tb supports various table formats: CSV, TSV, JSON, NDJSON, LTSV, etc.
22
38
  email: akr@fsij.org
23
39
  executables:
24
40
  - tb
@@ -28,7 +44,6 @@ files:
28
44
  - README
29
45
  - bin/tb
30
46
  - lib/tb.rb
31
- - lib/tb/basic.rb
32
47
  - lib/tb/catreader.rb
33
48
  - lib/tb/cmd_cat.rb
34
49
  - lib/tb/cmd_consecutive.rb
@@ -36,7 +51,6 @@ files:
36
51
  - lib/tb/cmd_cross.rb
37
52
  - lib/tb/cmd_cut.rb
38
53
  - lib/tb/cmd_git.rb
39
- - lib/tb/cmd_grep.rb
40
54
  - lib/tb/cmd_group.rb
41
55
  - lib/tb/cmd_gsub.rb
42
56
  - lib/tb/cmd_help.rb
@@ -47,6 +61,7 @@ files:
47
61
  - lib/tb/cmd_nest.rb
48
62
  - lib/tb/cmd_newfield.rb
49
63
  - lib/tb/cmd_rename.rb
64
+ - lib/tb/cmd_search.rb
50
65
  - lib/tb/cmd_shape.rb
51
66
  - lib/tb/cmd_sort.rb
52
67
  - lib/tb/cmd_svn.rb
@@ -70,15 +85,19 @@ files:
70
85
  - lib/tb/enumerator.rb
71
86
  - lib/tb/ex_enumerable.rb
72
87
  - lib/tb/ex_enumerator.rb
73
- - lib/tb/fieldset.rb
74
88
  - lib/tb/fileenumerator.rb
75
89
  - lib/tb/func.rb
90
+ - lib/tb/hashreader.rb
91
+ - lib/tb/hashwriter.rb
92
+ - lib/tb/headerreader.rb
93
+ - lib/tb/headerwriter.rb
76
94
  - lib/tb/json.rb
77
95
  - lib/tb/ltsv.rb
96
+ - lib/tb/ndjson.rb
97
+ - lib/tb/numericreader.rb
98
+ - lib/tb/numericwriter.rb
78
99
  - lib/tb/pager.rb
79
100
  - lib/tb/pnm.rb
80
- - lib/tb/reader.rb
81
- - lib/tb/record.rb
82
101
  - lib/tb/revcmp.rb
83
102
  - lib/tb/ropen.rb
84
103
  - lib/tb/search.rb
@@ -91,9 +110,9 @@ files:
91
110
  - sample/poi-xls2csv.rb
92
111
  - sample/poi-xls2csv.sh
93
112
  - sample/tbplot
113
+ - tb.gemspec
94
114
  - test-all-cov.rb
95
115
  - test-all.rb
96
- - test/test_basic.rb
97
116
  - test/test_catreader.rb
98
117
  - test/test_cmd_cat.rb
99
118
  - test/test_cmd_consecutive.rb
@@ -131,19 +150,21 @@ files:
131
150
  - test/test_customcmp.rb
132
151
  - test/test_customeq.rb
133
152
  - test/test_ex_enumerable.rb
134
- - test/test_fieldset.rb
135
153
  - test/test_fileenumerator.rb
154
+ - test/test_headercsv.rb
136
155
  - test/test_json.rb
137
156
  - test/test_ltsv.rb
157
+ - test/test_ndjson.rb
158
+ - test/test_numericcsv.rb
138
159
  - test/test_pager.rb
139
160
  - test/test_pnm.rb
140
161
  - test/test_reader.rb
141
- - test/test_record.rb
142
162
  - test/test_revcmp.rb
143
163
  - test/test_search.rb
144
164
  - test/test_tbenum.rb
145
165
  - test/test_tsv.rb
146
166
  - test/test_zipper.rb
167
+ - test/util_tbtest.rb
147
168
  homepage: https://github.com/akr/tb
148
169
  licenses: []
149
170
  metadata: {}
@@ -163,12 +184,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
184
  version: '0'
164
185
  requirements: []
165
186
  rubyforge_project:
166
- rubygems_version: 2.2.2
187
+ rubygems_version: 2.4.2
167
188
  signing_key:
168
189
  specification_version: 4
169
- summary: 'manipulation tool for tables: CSV, TSV, LTSV, JSON, etc.'
190
+ summary: 'manipulation tool for tables: CSV, TSV, LTSV, JSON, NDJSON, etc.'
170
191
  test_files:
171
- - test/test_basic.rb
172
192
  - test/test_catreader.rb
173
193
  - test/test_cmd_cat.rb
174
194
  - test/test_cmd_consecutive.rb
@@ -206,16 +226,18 @@ test_files:
206
226
  - test/test_customcmp.rb
207
227
  - test/test_customeq.rb
208
228
  - test/test_ex_enumerable.rb
209
- - test/test_fieldset.rb
210
229
  - test/test_fileenumerator.rb
230
+ - test/test_headercsv.rb
211
231
  - test/test_json.rb
212
232
  - test/test_ltsv.rb
233
+ - test/test_ndjson.rb
234
+ - test/test_numericcsv.rb
213
235
  - test/test_pager.rb
214
236
  - test/test_pnm.rb
215
237
  - test/test_reader.rb
216
- - test/test_record.rb
217
238
  - test/test_revcmp.rb
218
239
  - test/test_search.rb
219
240
  - test/test_tbenum.rb
220
241
  - test/test_tsv.rb
221
242
  - test/test_zipper.rb
243
+ - test/util_tbtest.rb