nesquikcsv 0.1.7-java → 0.1.8-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbc244bfa0588d12fcfa0254677cb456884544f2
4
- data.tar.gz: d47f2aae0c71b27494df777ba41649c47666d1d6
3
+ metadata.gz: 3b9a2dfe12691374f43838a217c92b1bf9bbc8ca
4
+ data.tar.gz: 91d5598a28f14a549fb4875605afd2a0ebcd4d0b
5
5
  SHA512:
6
- metadata.gz: 9bb5895ae76a051b8740d6641190e00914181ada5701f51bcc80eb8a64ce11c6d597cfd1a43b20e14de1a6403dcf54d7a39b3c0d5277301114771f90d49bb302
7
- data.tar.gz: a621bcbe880b777d2edaa23b15dd76187ef1bac1bff38a555722e6a1f7226da0c585d32f349c29be02dc88bb8e7540c4c799f7bbfc979544846d8f7732b3b392
6
+ metadata.gz: f54cf668b2430e579f10a99020c4d4d14e89a9dd01e2eb7f6efa09d531c3574374cc73b8bf842fdde7ca35d1591e885e86e2a4adfa9658bc0ee4433c5ccf7144
7
+ data.tar.gz: d06db7ced1bbb2a7863453008d0ded5f5b8543de352caaba87fa26189515bf7fbfbe45aec8a99ad13203e06fe9faf5e6ea3cc64efb58f6fe0e4eb70b2ec1261d
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, falls back to standard library CSV parser for JRuby
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/csv_parser.jar CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  class NesquikCSV
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nesquikcsv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: java
6
6
  authors:
7
7
  - Juan Martty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-03 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: test-unit
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
14
20
  requirement: !ruby/object:Gem::Requirement
15
21
  requirements:
16
22
  - - '>='
17
23
  - !ruby/object:Gem::Version
18
24
  version: '0'
19
- name: test-unit
20
25
  prerelease: false
21
26
  type: :development
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake-compiler
22
29
  version_requirements: !ruby/object:Gem::Requirement
23
30
  requirements:
24
31
  - - '>='
25
32
  - !ruby/object:Gem::Version
26
33
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
36
  - - '>='
31
37
  - !ruby/object:Gem::Version
32
38
  version: '0'
33
- name: rake-compiler
34
39
  prerelease: false
35
40
  type: :development
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
41
  description: Fastest-CSV fork with encoding support
42
42
  email:
43
43
  - null.terminated.string@gmail.com