acsv-p 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: c166ac5fe7e88938a2ed9e95823d8c826adeb53beea927075f6105feea6c2e7a
4
- data.tar.gz: 0e96a37108e13846f3ea5f41b9f142df1a9e24b01c4cc768573b555698165fb8
3
+ metadata.gz: 91c1d0ecc9d74058749134fd1053518687d391fcafe7ed9cc0ab5ec4c9bfaaac
4
+ data.tar.gz: 8ecca24358ed636c7913b4ef72310715dcf7d95ff52fcb3faee8210d6282bc5e
5
5
  SHA512:
6
- metadata.gz: 38b5148f5a6c6f7b1dbbe057d3964b29e112ea25893bb94197dcb89e193feee92100095cc4d48b76fdc676ff91002ce9c8f904811a3e05650440401821f263af
7
- data.tar.gz: 8ca9488af41e5997cf3441605dcf0d79583fc9ba1ad444e1dd7dbcc9703d993f777008212baff13c614246a4bd2adeb7caf41678f2742abc72ff946be38198ca
6
+ metadata.gz: 8aa50c0dc0d8a56ce92dccffb0f61fd8be4d292cddb9485b0e0333e8dfe81a83890e45890db51232ec4ff2d6e260bd65675c17619ad6c0168d56b6f024014b84
7
+ data.tar.gz: e754abf636e17eba38d98070578bbf286d5b0985f16e14f3646f3ac5a6b470fce706b10c049b2626f31ac7f8fde7abb310c0320fdf400c955c30ee9d777bdeff
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 << options
62
- super(*args)
61
+ super(args[0], args[1], **options)
63
62
  end
64
63
  end
65
64
  end
@@ -1,3 +1,3 @@
1
1
  module ACSV
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wvengen