nesquikcsv 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nesquikcsv.rb +9 -2
- data/lib/nesquikcsv/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 408085b1ae39ec691e65529b5dc5a88355cde84d
|
4
|
+
data.tar.gz: bfca5044d6f3a2ce25fb92edf7914dc3a7f4a197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3682a9aaba9cee9c6536c99a0acd00c82f15549126310f8ce4c3ef0b533071dc12f64acb60a5d9afa25b852009c444f6ae9fc315a52d7bf97e5dd446ff777e0
|
7
|
+
data.tar.gz: ed141d91d741474c5004c6d066b1de3d3ce2983bc8702eb5a574540203f491594a5f7c3df43ba8614022ef93178ae579ac011f35d075bc72dc9fe2d2cd7ee567
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Fork of the Fastest-CSV gem to support any encoding, using UTF-8 by default.
|
4
4
|
|
5
|
-
Uses native C code to parse CSV lines in MRI Ruby
|
5
|
+
Uses native C code to parse CSV lines in MRI Ruby and a pure Java extension when in JRuby.
|
6
6
|
|
7
7
|
Supports standard CSV according to RFC4180. Not the so-called "csv" from Excel.
|
8
8
|
|
data/lib/nesquikcsv.rb
CHANGED
@@ -59,7 +59,7 @@ class NesquikCSV
|
|
59
59
|
if RUBY_PLATFORM =~ /java/
|
60
60
|
line = line.force_encoding(encoding)
|
61
61
|
end
|
62
|
-
CsvParser.parse_line(line, encoding)
|
62
|
+
safe_to_a CsvParser.parse_line(line, encoding)
|
63
63
|
end
|
64
64
|
|
65
65
|
# Create new NesquikCSV wrapping the specified IO object
|
@@ -95,7 +95,7 @@ class NesquikCSV
|
|
95
95
|
# Read next line from the wrapped IO and return as array or nil at EOF
|
96
96
|
def shift(encoding='UTF-8')
|
97
97
|
if line = get_line_with_quotes
|
98
|
-
CsvParser.parse_line(line, encoding)
|
98
|
+
NesquikCSV.safe_to_a CsvParser.parse_line(line, encoding)
|
99
99
|
else
|
100
100
|
nil
|
101
101
|
end
|
@@ -124,5 +124,12 @@ class NesquikCSV
|
|
124
124
|
line
|
125
125
|
end
|
126
126
|
|
127
|
+
def self.safe_to_a(arg)
|
128
|
+
if arg.nil?
|
129
|
+
nil
|
130
|
+
else
|
131
|
+
arg.to_a
|
132
|
+
end
|
133
|
+
end
|
127
134
|
|
128
135
|
end
|
data/lib/nesquikcsv/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nesquikcsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Martty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake-compiler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Fastest-CSV fork with encoding support
|
@@ -46,7 +46,7 @@ extensions:
|
|
46
46
|
- ext/csv_parser/extconf.rb
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
-
|
49
|
+
- .gitignore
|
50
50
|
- Gemfile
|
51
51
|
- LICENSE
|
52
52
|
- README.md
|
@@ -69,17 +69,17 @@ require_paths:
|
|
69
69
|
- lib
|
70
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - '>='
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - '>='
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.
|
82
|
+
rubygems_version: 2.2.2
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Fastest-CSV fork with encoding support
|