nesquikcsv 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e532ff04c08281fe68ca8a75fffd5ff666a4a810
4
- data.tar.gz: a73bda5b01d8565662e40fac5a242b79d4f5c474
3
+ metadata.gz: 408085b1ae39ec691e65529b5dc5a88355cde84d
4
+ data.tar.gz: bfca5044d6f3a2ce25fb92edf7914dc3a7f4a197
5
5
  SHA512:
6
- metadata.gz: ec2b915c11e3ecff94696ec99b9c662218e556cc5caf4784a49afbf65fbfd2faa7fa568b466887f6d261d5fe63b0dc21f151bc8494c1308ef23c447a17d102df
7
- data.tar.gz: 4fc060f7a7847f6ebfb5017ede5a2e3fe61ed26dbef1aafe781ad6c37002a9dcc32963fa05f8004d7fd1e097c540f3f4274d412fb8e30ddd2e31c1993c0a05b6
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, 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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  class NesquikCSV
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
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.7
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-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
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
- - ".gitignore"
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.5.1
82
+ rubygems_version: 2.2.2
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Fastest-CSV fork with encoding support