acsv-p 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/acsv-p/csv.rb +3 -4
- data/lib/acsv-p/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2d8cd5cb2a46d392f0df02ca64e29b932af3d4ecb7876f1dc1d9ab693aed888
|
4
|
+
data.tar.gz: 73812532181dcefe4e10dd68ddca3660f41c5bbc4df352a82744ceb7482fdebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ec49aa4cc5f855f1f9a6c1a59adff4f54d58740c928374bf4deb282cc8c9938080b9bb1850a431c708c099ad1c003d00605a81ff46d5799432d1e9f023a80fa
|
7
|
+
data.tar.gz: 1d4b67dcd838ecdbc0e73b1cd7b56de82fe9fdeb2776d0217e50b8d01fd77199d966fdec58224f80b2f0b237bb185931e21ed8cc65eefc2306a5f76b53b8dd42
|
data/lib/acsv-p/csv.rb
CHANGED
@@ -15,7 +15,7 @@ module ACSV
|
|
15
15
|
# @see http://www.ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html#method-c-new
|
16
16
|
def initialize(data, options = Hash.new)
|
17
17
|
options[:col_sep] ||= ACSV::Detect.separator(data)
|
18
|
-
super(data, options)
|
18
|
+
super(data, **options)
|
19
19
|
end
|
20
20
|
|
21
21
|
# This method opens an IO object, and wraps that with CSV. For reading, separator
|
@@ -39,7 +39,7 @@ module ACSV
|
|
39
39
|
mode, ext_enc, int_enc = full_mode.split(':')
|
40
40
|
if (ext_enc.nil? || ext_enc=='') && options[:encoding].nil? && options[:external_encoding].nil?
|
41
41
|
# try to detect encoding
|
42
|
-
if ext_enc = ACSV::Detect.encoding(File.open(args[0], mode, options), options)
|
42
|
+
if ext_enc = ACSV::Detect.encoding(File.open(args[0], mode, **options), options)
|
43
43
|
# workaround for http://stackoverflow.com/a/20723346
|
44
44
|
ext_enc = "BOM|#{ext_enc}" if ext_enc =~ /UTF/
|
45
45
|
# create new mode specification if there was one, else store in option
|
@@ -58,8 +58,7 @@ module ACSV
|
|
58
58
|
options.delete :confidence
|
59
59
|
options.delete :method
|
60
60
|
# to superclass
|
61
|
-
args
|
62
|
-
super(*args)
|
61
|
+
super(args[0], args[1], **options)
|
63
62
|
end
|
64
63
|
end
|
65
64
|
end
|
data/lib/acsv-p/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acsv-p
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wvengen
|
@@ -10,6 +10,20 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2014-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: csv
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rake
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
100
|
- !ruby/object:Gem::Version
|
87
101
|
version: '0'
|
88
102
|
requirements: []
|
89
|
-
rubygems_version: 3.
|
103
|
+
rubygems_version: 3.5.3
|
90
104
|
signing_key:
|
91
105
|
specification_version: 4
|
92
106
|
summary: Read CSV files without configuration
|