smarter_csv 1.10.2 → 1.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/CHANGELOG.md +5 -0
- data/CONTRIBUTORS.md +1 -0
- data/README.md +2 -3
- data/lib/smarter_csv/options_processing.rb +4 -3
- data/lib/smarter_csv/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbc3d3e97a602c4b67a88a94eea6bb66feed23c061da6a1c07b04f84b820e8b0
|
4
|
+
data.tar.gz: be5eea03fa0baeec95557772aef9d2bfd6c3e200103e9b686078c05c392a0a74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb204a933e3f8ae93b626cd6c4c45e6296ece98f136b96389ae3d3459bb8826de3d128481faedb3e10fa85a547483568cce7fbb54de38ba6c8074b0276775123
|
7
|
+
data.tar.gz: 724279536101f6561299ffc619c12393395c019ed771cc1e7b37b376804a05bee22b179fbd30770f29f6a9c099864268ecb222a2af7497a254b43982942aec90
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
|
2
2
|
# SmarterCSV 1.x Change Log
|
3
3
|
|
4
|
+
## 1.10.3 (2024-03-10)
|
5
|
+
* fixed issue when frozen options are handed in (thanks to Daniel Pepper)
|
6
|
+
* cleaned-up rspec tests (thanks to Daniel Pepper)
|
7
|
+
* fixed link in README (issue #251)
|
8
|
+
|
4
9
|
## 1.10.2 (2024-02-11)
|
5
10
|
* improve error message for missing keys
|
6
11
|
|
data/CONTRIBUTORS.md
CHANGED
@@ -52,3 +52,4 @@ A Big Thank you to everyone who filed issues, sent comments, and who contributed
|
|
52
52
|
* [Alessandro Fazzi](https://github.com/pioneerskies)
|
53
53
|
* [JP Camara](https://github.com/jpcamara)
|
54
54
|
* [Kenton Hirowatari](https://github.com/hirowatari)
|
55
|
+
* [Daniel Pepper](https://github.com/dpep)
|
data/README.md
CHANGED
@@ -389,10 +389,9 @@ And header and data validations will also be supported in 2.x
|
|
389
389
|
* some CSV files use un-escaped quotation characters inside fields. This can cause the import to break. To get around this, use the `:force_simple_split => true` option in combination with `:strip_chars_from_headers => /[\-"]/` . This will also significantly speed up the import.
|
390
390
|
If you would force a different :quote_char instead (setting it to a non-used character), then the import would be up to 5-times slower than using `:force_simple_split`.
|
391
391
|
|
392
|
-
##
|
393
|
-
|
394
|
-
http://www.unixgods.org/~tilo/Ruby/process_csv_as_hashes.html
|
392
|
+
## The original post that started SmarterCSV:
|
395
393
|
|
394
|
+
http://www.unixgods.org/Ruby/process_csv_as_hashes.html
|
396
395
|
|
397
396
|
|
398
397
|
## Installation
|
@@ -42,11 +42,12 @@ module SmarterCSV
|
|
42
42
|
def process_options(given_options = {})
|
43
43
|
puts "User provided options:\n#{pp(given_options)}\n" if given_options[:verbose]
|
44
44
|
|
45
|
+
@options = DEFAULT_OPTIONS.dup.merge!(given_options)
|
46
|
+
|
45
47
|
# fix invalid input
|
46
|
-
|
48
|
+
@options[:invalid_byte_sequence] ||= ''
|
47
49
|
|
48
|
-
@options
|
49
|
-
puts "Computed options:\n#{pp(@options)}\n" if given_options[:verbose]
|
50
|
+
puts "Computed options:\n#{pp(@options)}\n" if @options[:verbose]
|
50
51
|
|
51
52
|
validate_options!(@options)
|
52
53
|
@options
|
data/lib/smarter_csv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smarter_csv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilo Sloboda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -104,6 +104,7 @@ extensions:
|
|
104
104
|
- ext/smarter_csv/extconf.rb
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
+
- ".rspec"
|
107
108
|
- ".rubocop.yml"
|
108
109
|
- ".rvmrc"
|
109
110
|
- CHANGELOG.md
|