tabreader 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +2 -2
- data/{test/data → datasets}/empty.tab +0 -0
- data/{test/data → datasets}/test.tab +0 -0
- data/lib/tabreader.rb +2 -2
- data/lib/tabreader/reader.rb +9 -2
- data/lib/tabreader/version.rb +1 -1
- data/test/helper.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbeb7c1c562cd485a9d3e0f6c13830030c6392ea
|
4
|
+
data.tar.gz: ffae690f9fc3386f5a85ba898456393a7660909b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 673e7a4ec3947d34db19848e14130db77c1638ff7101d5372b8d59b836c44149b20c52a09455925959ab4133bf9e52c25d7a4242e5f028785cd2fb2ff35483db
|
7
|
+
data.tar.gz: 2c52cea47febd5f42b49d8cb52f4ac192ad77cf516bddca7c92975d3aa05068b5940d2a36ca564aedc32400cc0aa5184ebe84c8c381cc8433a246e6112a735a4
|
data/Manifest.txt
CHANGED
@@ -3,12 +3,12 @@ LICENSE.md
|
|
3
3
|
Manifest.txt
|
4
4
|
README.md
|
5
5
|
Rakefile
|
6
|
+
datasets/empty.tab
|
7
|
+
datasets/test.tab
|
6
8
|
lib/tabreader.rb
|
7
9
|
lib/tabreader/reader.rb
|
8
10
|
lib/tabreader/reader_hash.rb
|
9
11
|
lib/tabreader/version.rb
|
10
|
-
test/data/empty.tab
|
11
|
-
test/data/test.tab
|
12
12
|
test/helper.rb
|
13
13
|
test/test_reader.rb
|
14
14
|
test/test_reader_hash.rb
|
File without changes
|
File without changes
|
data/lib/tabreader.rb
CHANGED
data/lib/tabreader/reader.rb
CHANGED
@@ -33,7 +33,7 @@ def logger() self.class.logger; end
|
|
33
33
|
|
34
34
|
|
35
35
|
|
36
|
-
def self.parse_line( line )
|
36
|
+
def self.parse_line( line, sep: "\t" )
|
37
37
|
## check - can handle comments and blank lines too - why? why not?
|
38
38
|
## remove trailing newlines
|
39
39
|
|
@@ -60,7 +60,14 @@ def self.parse_line( line )
|
|
60
60
|
# next
|
61
61
|
# end
|
62
62
|
|
63
|
-
|
63
|
+
|
64
|
+
# note: trailing empty fields get (auto-)trimmed by split !!!!!!!
|
65
|
+
# Solution!! change split( "\t" ) to split( "\t", -1 )
|
66
|
+
# If the limit parameter is omitted, trailing null fields are suppressed.
|
67
|
+
# If limit is a positive number, at most that number of fields will be returned
|
68
|
+
# (if limit is 1, the entire string is returned as the only entry in an array).
|
69
|
+
# If negative, there is no limit to the number of fields returned, and trailing null fields are not suppressed.
|
70
|
+
values = line.split( sep, -1 )
|
64
71
|
logger.debug values.pretty_inspect if logger.debug?
|
65
72
|
|
66
73
|
values
|
data/lib/tabreader/version.rb
CHANGED
data/test/helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabreader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -53,12 +53,12 @@ files:
|
|
53
53
|
- Manifest.txt
|
54
54
|
- README.md
|
55
55
|
- Rakefile
|
56
|
+
- datasets/empty.tab
|
57
|
+
- datasets/test.tab
|
56
58
|
- lib/tabreader.rb
|
57
59
|
- lib/tabreader/reader.rb
|
58
60
|
- lib/tabreader/reader_hash.rb
|
59
61
|
- lib/tabreader/version.rb
|
60
|
-
- test/data/empty.tab
|
61
|
-
- test/data/test.tab
|
62
62
|
- test/helper.rb
|
63
63
|
- test/test_reader.rb
|
64
64
|
- test/test_reader_hash.rb
|