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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0219682a1b64a05b1310b3fb288d6ac69f2af7702308160d4fa808dcbaaa1243'
4
- data.tar.gz: 5fced0b9dd9334842aa7bad61073e0a90048dc0e6ba0ac30df59fe4187d9a58d
3
+ metadata.gz: dbc3d3e97a602c4b67a88a94eea6bb66feed23c061da6a1c07b04f84b820e8b0
4
+ data.tar.gz: be5eea03fa0baeec95557772aef9d2bfd6c3e200103e9b686078c05c392a0a74
5
5
  SHA512:
6
- metadata.gz: 2ecc95c635c6d8eff39355f4af85422aebd05ca8a599085854e976073ca450f71bd49c498619593d455bd2cb9e4c6c705bc37900d012b5759fdc2077fceb893a
7
- data.tar.gz: d3b3d7f062c9f2f5838ef2099e1d5a7fedca4061d4f6c7d8e91ecb55b61d73a18efda8b5f00aa68c96452b4385e062d439cc04dd7df8e89395fab94e472e9ab7
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
- ## See also:
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
- given_options[:invalid_byte_sequence] = '' if given_options[:invalid_byte_sequence].nil?
48
+ @options[:invalid_byte_sequence] ||= ''
47
49
 
48
- @options = DEFAULT_OPTIONS.dup.merge!(given_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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmarterCSV
4
- VERSION = "1.10.2"
4
+ VERSION = "1.10.3"
5
5
  end
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.2
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-02-11 00:00:00.000000000 Z
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