smarter_csv 1.6.1 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +133 -0
  3. data/CHANGELOG.md +22 -1
  4. data/CONTRIBUTORS.md +3 -0
  5. data/Gemfile +7 -4
  6. data/README.md +8 -6
  7. data/Rakefile +15 -13
  8. data/ext/smarter_csv/extconf.rb +14 -0
  9. data/ext/smarter_csv/smarter_csv.c +86 -0
  10. data/lib/extensions/hash.rb +4 -2
  11. data/lib/smarter_csv/version.rb +3 -1
  12. data/lib/smarter_csv.rb +519 -10
  13. data/smarter_csv.gemspec +22 -7
  14. metadata +54 -176
  15. data/.gitignore +0 -10
  16. data/.rspec +0 -2
  17. data/.travis.yml +0 -27
  18. data/lib/smarter_csv/smarter_csv.rb +0 -461
  19. data/spec/fixtures/additional_separator.csv +0 -6
  20. data/spec/fixtures/basic.csv +0 -8
  21. data/spec/fixtures/binary.csv +0 -1
  22. data/spec/fixtures/carriage_returns_n.csv +0 -18
  23. data/spec/fixtures/carriage_returns_quoted.csv +0 -3
  24. data/spec/fixtures/carriage_returns_r.csv +0 -1
  25. data/spec/fixtures/carriage_returns_rn.csv +0 -18
  26. data/spec/fixtures/chunk_cornercase.csv +0 -10
  27. data/spec/fixtures/duplicate_headers.csv +0 -3
  28. data/spec/fixtures/empty.csv +0 -5
  29. data/spec/fixtures/empty_columns_1.csv +0 -2
  30. data/spec/fixtures/empty_columns_2.csv +0 -2
  31. data/spec/fixtures/hard_sample.csv +0 -2
  32. data/spec/fixtures/ignore_comments.csv +0 -11
  33. data/spec/fixtures/ignore_comments2.csv +0 -3
  34. data/spec/fixtures/key_mapping.csv +0 -2
  35. data/spec/fixtures/line_endings_n.csv +0 -4
  36. data/spec/fixtures/line_endings_r.csv +0 -1
  37. data/spec/fixtures/line_endings_rn.csv +0 -4
  38. data/spec/fixtures/lots_of_columns.csv +0 -2
  39. data/spec/fixtures/malformed.csv +0 -3
  40. data/spec/fixtures/malformed_header.csv +0 -3
  41. data/spec/fixtures/money.csv +0 -3
  42. data/spec/fixtures/no_header.csv +0 -7
  43. data/spec/fixtures/numeric.csv +0 -5
  44. data/spec/fixtures/pets.csv +0 -5
  45. data/spec/fixtures/problematic.csv +0 -8
  46. data/spec/fixtures/quote_char.csv +0 -9
  47. data/spec/fixtures/quoted.csv +0 -5
  48. data/spec/fixtures/quoted2.csv +0 -4
  49. data/spec/fixtures/separator_colon.csv +0 -4
  50. data/spec/fixtures/separator_comma.csv +0 -4
  51. data/spec/fixtures/separator_pipe.csv +0 -4
  52. data/spec/fixtures/separator_semi.csv +0 -4
  53. data/spec/fixtures/separator_tab.csv +0 -4
  54. data/spec/fixtures/skip_lines.csv +0 -8
  55. data/spec/fixtures/trading.csv +0 -3
  56. data/spec/fixtures/user_import.csv +0 -3
  57. data/spec/fixtures/valid_unicode.csv +0 -5
  58. data/spec/fixtures/with_dashes.csv +0 -8
  59. data/spec/fixtures/with_dates.csv +0 -4
  60. data/spec/smarter_csv/additional_separator_spec.rb +0 -45
  61. data/spec/smarter_csv/binary_file2_spec.rb +0 -24
  62. data/spec/smarter_csv/binary_file_spec.rb +0 -22
  63. data/spec/smarter_csv/blank_spec.rb +0 -55
  64. data/spec/smarter_csv/carriage_return_spec.rb +0 -190
  65. data/spec/smarter_csv/chunked_reading_spec.rb +0 -14
  66. data/spec/smarter_csv/close_file_spec.rb +0 -15
  67. data/spec/smarter_csv/column_separator_spec.rb +0 -95
  68. data/spec/smarter_csv/convert_values_to_numeric_spec.rb +0 -48
  69. data/spec/smarter_csv/duplicate_headers_spec.rb +0 -76
  70. data/spec/smarter_csv/empty_columns_spec.rb +0 -74
  71. data/spec/smarter_csv/extenstions_spec.rb +0 -17
  72. data/spec/smarter_csv/hard_sample_spec.rb +0 -24
  73. data/spec/smarter_csv/header_transformation_spec.rb +0 -21
  74. data/spec/smarter_csv/ignore_comments_spec.rb +0 -45
  75. data/spec/smarter_csv/invalid_headers_spec.rb +0 -38
  76. data/spec/smarter_csv/keep_headers_spec.rb +0 -24
  77. data/spec/smarter_csv/key_mapping_spec.rb +0 -56
  78. data/spec/smarter_csv/line_ending_spec.rb +0 -43
  79. data/spec/smarter_csv/load_basic_spec.rb +0 -20
  80. data/spec/smarter_csv/malformed_spec.rb +0 -25
  81. data/spec/smarter_csv/no_header_spec.rb +0 -29
  82. data/spec/smarter_csv/not_downcase_header_spec.rb +0 -24
  83. data/spec/smarter_csv/parse/column_separator_spec.rb +0 -61
  84. data/spec/smarter_csv/parse/old_csv_library_spec.rb +0 -74
  85. data/spec/smarter_csv/parse/rfc4180_and_more_spec.rb +0 -170
  86. data/spec/smarter_csv/problematic.rb +0 -34
  87. data/spec/smarter_csv/quoted_spec.rb +0 -52
  88. data/spec/smarter_csv/remove_empty_values_spec.rb +0 -13
  89. data/spec/smarter_csv/remove_keys_from_hashes_spec.rb +0 -25
  90. data/spec/smarter_csv/remove_not_mapped_keys_spec.rb +0 -35
  91. data/spec/smarter_csv/remove_values_matching_spec.rb +0 -26
  92. data/spec/smarter_csv/remove_zero_values_spec.rb +0 -25
  93. data/spec/smarter_csv/skip_lines_spec.rb +0 -29
  94. data/spec/smarter_csv/strings_as_keys_spec.rb +0 -24
  95. data/spec/smarter_csv/strip_chars_from_headers_spec.rb +0 -24
  96. data/spec/smarter_csv/trading_spec.rb +0 -25
  97. data/spec/smarter_csv/valid_unicode_spec.rb +0 -94
  98. data/spec/smarter_csv/value_converters_spec.rb +0 -52
  99. data/spec/spec/spec_helper.rb +0 -17
  100. data/spec/spec.opts +0 -2
  101. data/spec/spec_helper.rb +0 -21
metadata CHANGED
@@ -1,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarter_csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Sloboda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-06 00:00:00.000000000 Z
11
+ date: 2022-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: awesome_print
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: codecov
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
13
55
  - !ruby/object:Gem::Dependency
14
56
  name: rspec
15
57
  requirement: !ruby/object:Gem::Requirement
@@ -25,7 +67,7 @@ dependencies:
25
67
  - !ruby/object:Gem::Version
26
68
  version: '0'
27
69
  - !ruby/object:Gem::Dependency
28
- name: simplecov
70
+ name: rubocop
29
71
  requirement: !ruby/object:Gem::Requirement
30
72
  requirements:
31
73
  - - ">="
@@ -39,7 +81,7 @@ dependencies:
39
81
  - !ruby/object:Gem::Version
40
82
  version: '0'
41
83
  - !ruby/object:Gem::Dependency
42
- name: awesome_print
84
+ name: simplecov
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
87
  - - ">="
@@ -58,112 +100,31 @@ description: Ruby Gem for smarter importing of CSV Files as Array(s) of Hashes,
58
100
  email:
59
101
  - tilo.sloboda@gmail.com
60
102
  executables: []
61
- extensions: []
103
+ extensions:
104
+ - ext/smarter_csv/extconf.rb
62
105
  extra_rdoc_files: []
63
106
  files:
64
- - ".gitignore"
65
- - ".rspec"
107
+ - ".rubocop.yml"
66
108
  - ".rvmrc"
67
- - ".travis.yml"
68
109
  - CHANGELOG.md
69
110
  - CONTRIBUTORS.md
70
111
  - Gemfile
71
112
  - LICENSE.txt
72
113
  - README.md
73
114
  - Rakefile
115
+ - ext/smarter_csv/extconf.rb
116
+ - ext/smarter_csv/smarter_csv.c
74
117
  - lib/extensions/hash.rb
75
118
  - lib/smarter_csv.rb
76
- - lib/smarter_csv/smarter_csv.rb
77
119
  - lib/smarter_csv/version.rb
78
120
  - smarter_csv.gemspec
79
- - spec/fixtures/additional_separator.csv
80
- - spec/fixtures/basic.csv
81
- - spec/fixtures/binary.csv
82
- - spec/fixtures/carriage_returns_n.csv
83
- - spec/fixtures/carriage_returns_quoted.csv
84
- - spec/fixtures/carriage_returns_r.csv
85
- - spec/fixtures/carriage_returns_rn.csv
86
- - spec/fixtures/chunk_cornercase.csv
87
- - spec/fixtures/duplicate_headers.csv
88
- - spec/fixtures/empty.csv
89
- - spec/fixtures/empty_columns_1.csv
90
- - spec/fixtures/empty_columns_2.csv
91
- - spec/fixtures/hard_sample.csv
92
- - spec/fixtures/ignore_comments.csv
93
- - spec/fixtures/ignore_comments2.csv
94
- - spec/fixtures/key_mapping.csv
95
- - spec/fixtures/line_endings_n.csv
96
- - spec/fixtures/line_endings_r.csv
97
- - spec/fixtures/line_endings_rn.csv
98
- - spec/fixtures/lots_of_columns.csv
99
- - spec/fixtures/malformed.csv
100
- - spec/fixtures/malformed_header.csv
101
- - spec/fixtures/money.csv
102
- - spec/fixtures/no_header.csv
103
- - spec/fixtures/numeric.csv
104
- - spec/fixtures/pets.csv
105
- - spec/fixtures/problematic.csv
106
- - spec/fixtures/quote_char.csv
107
- - spec/fixtures/quoted.csv
108
- - spec/fixtures/quoted2.csv
109
- - spec/fixtures/separator_colon.csv
110
- - spec/fixtures/separator_comma.csv
111
- - spec/fixtures/separator_pipe.csv
112
- - spec/fixtures/separator_semi.csv
113
- - spec/fixtures/separator_tab.csv
114
- - spec/fixtures/skip_lines.csv
115
- - spec/fixtures/trading.csv
116
- - spec/fixtures/user_import.csv
117
- - spec/fixtures/valid_unicode.csv
118
- - spec/fixtures/with_dashes.csv
119
- - spec/fixtures/with_dates.csv
120
- - spec/smarter_csv/additional_separator_spec.rb
121
- - spec/smarter_csv/binary_file2_spec.rb
122
- - spec/smarter_csv/binary_file_spec.rb
123
- - spec/smarter_csv/blank_spec.rb
124
- - spec/smarter_csv/carriage_return_spec.rb
125
- - spec/smarter_csv/chunked_reading_spec.rb
126
- - spec/smarter_csv/close_file_spec.rb
127
- - spec/smarter_csv/column_separator_spec.rb
128
- - spec/smarter_csv/convert_values_to_numeric_spec.rb
129
- - spec/smarter_csv/duplicate_headers_spec.rb
130
- - spec/smarter_csv/empty_columns_spec.rb
131
- - spec/smarter_csv/extenstions_spec.rb
132
- - spec/smarter_csv/hard_sample_spec.rb
133
- - spec/smarter_csv/header_transformation_spec.rb
134
- - spec/smarter_csv/ignore_comments_spec.rb
135
- - spec/smarter_csv/invalid_headers_spec.rb
136
- - spec/smarter_csv/keep_headers_spec.rb
137
- - spec/smarter_csv/key_mapping_spec.rb
138
- - spec/smarter_csv/line_ending_spec.rb
139
- - spec/smarter_csv/load_basic_spec.rb
140
- - spec/smarter_csv/malformed_spec.rb
141
- - spec/smarter_csv/no_header_spec.rb
142
- - spec/smarter_csv/not_downcase_header_spec.rb
143
- - spec/smarter_csv/parse/column_separator_spec.rb
144
- - spec/smarter_csv/parse/old_csv_library_spec.rb
145
- - spec/smarter_csv/parse/rfc4180_and_more_spec.rb
146
- - spec/smarter_csv/problematic.rb
147
- - spec/smarter_csv/quoted_spec.rb
148
- - spec/smarter_csv/remove_empty_values_spec.rb
149
- - spec/smarter_csv/remove_keys_from_hashes_spec.rb
150
- - spec/smarter_csv/remove_not_mapped_keys_spec.rb
151
- - spec/smarter_csv/remove_values_matching_spec.rb
152
- - spec/smarter_csv/remove_zero_values_spec.rb
153
- - spec/smarter_csv/skip_lines_spec.rb
154
- - spec/smarter_csv/strings_as_keys_spec.rb
155
- - spec/smarter_csv/strip_chars_from_headers_spec.rb
156
- - spec/smarter_csv/trading_spec.rb
157
- - spec/smarter_csv/valid_unicode_spec.rb
158
- - spec/smarter_csv/value_converters_spec.rb
159
- - spec/spec.opts
160
- - spec/spec/spec_helper.rb
161
- - spec/spec_helper.rb
162
121
  homepage: https://github.com/tilo/smarter_csv
163
122
  licenses:
164
123
  - MIT
165
124
  metadata:
166
125
  homepage_uri: https://github.com/tilo/smarter_csv
126
+ source_code_uri: https://github.com/tilo/smarter_csv
127
+ changelog_uri: https://github.com/tilo/smarter_csv/blob/main/CHANGELOG.md
167
128
  post_install_message:
168
129
  rdoc_options: []
169
130
  require_paths:
@@ -184,87 +145,4 @@ signing_key:
184
145
  specification_version: 4
185
146
  summary: Ruby Gem for smarter importing of CSV Files (and CSV-like files), with lots
186
147
  of optional features, e.g. chunked processing for huge CSV files
187
- test_files:
188
- - spec/fixtures/additional_separator.csv
189
- - spec/fixtures/basic.csv
190
- - spec/fixtures/binary.csv
191
- - spec/fixtures/carriage_returns_n.csv
192
- - spec/fixtures/carriage_returns_quoted.csv
193
- - spec/fixtures/carriage_returns_r.csv
194
- - spec/fixtures/carriage_returns_rn.csv
195
- - spec/fixtures/chunk_cornercase.csv
196
- - spec/fixtures/duplicate_headers.csv
197
- - spec/fixtures/empty.csv
198
- - spec/fixtures/empty_columns_1.csv
199
- - spec/fixtures/empty_columns_2.csv
200
- - spec/fixtures/hard_sample.csv
201
- - spec/fixtures/ignore_comments.csv
202
- - spec/fixtures/ignore_comments2.csv
203
- - spec/fixtures/key_mapping.csv
204
- - spec/fixtures/line_endings_n.csv
205
- - spec/fixtures/line_endings_r.csv
206
- - spec/fixtures/line_endings_rn.csv
207
- - spec/fixtures/lots_of_columns.csv
208
- - spec/fixtures/malformed.csv
209
- - spec/fixtures/malformed_header.csv
210
- - spec/fixtures/money.csv
211
- - spec/fixtures/no_header.csv
212
- - spec/fixtures/numeric.csv
213
- - spec/fixtures/pets.csv
214
- - spec/fixtures/problematic.csv
215
- - spec/fixtures/quote_char.csv
216
- - spec/fixtures/quoted.csv
217
- - spec/fixtures/quoted2.csv
218
- - spec/fixtures/separator_colon.csv
219
- - spec/fixtures/separator_comma.csv
220
- - spec/fixtures/separator_pipe.csv
221
- - spec/fixtures/separator_semi.csv
222
- - spec/fixtures/separator_tab.csv
223
- - spec/fixtures/skip_lines.csv
224
- - spec/fixtures/trading.csv
225
- - spec/fixtures/user_import.csv
226
- - spec/fixtures/valid_unicode.csv
227
- - spec/fixtures/with_dashes.csv
228
- - spec/fixtures/with_dates.csv
229
- - spec/smarter_csv/additional_separator_spec.rb
230
- - spec/smarter_csv/binary_file2_spec.rb
231
- - spec/smarter_csv/binary_file_spec.rb
232
- - spec/smarter_csv/blank_spec.rb
233
- - spec/smarter_csv/carriage_return_spec.rb
234
- - spec/smarter_csv/chunked_reading_spec.rb
235
- - spec/smarter_csv/close_file_spec.rb
236
- - spec/smarter_csv/column_separator_spec.rb
237
- - spec/smarter_csv/convert_values_to_numeric_spec.rb
238
- - spec/smarter_csv/duplicate_headers_spec.rb
239
- - spec/smarter_csv/empty_columns_spec.rb
240
- - spec/smarter_csv/extenstions_spec.rb
241
- - spec/smarter_csv/hard_sample_spec.rb
242
- - spec/smarter_csv/header_transformation_spec.rb
243
- - spec/smarter_csv/ignore_comments_spec.rb
244
- - spec/smarter_csv/invalid_headers_spec.rb
245
- - spec/smarter_csv/keep_headers_spec.rb
246
- - spec/smarter_csv/key_mapping_spec.rb
247
- - spec/smarter_csv/line_ending_spec.rb
248
- - spec/smarter_csv/load_basic_spec.rb
249
- - spec/smarter_csv/malformed_spec.rb
250
- - spec/smarter_csv/no_header_spec.rb
251
- - spec/smarter_csv/not_downcase_header_spec.rb
252
- - spec/smarter_csv/parse/column_separator_spec.rb
253
- - spec/smarter_csv/parse/old_csv_library_spec.rb
254
- - spec/smarter_csv/parse/rfc4180_and_more_spec.rb
255
- - spec/smarter_csv/problematic.rb
256
- - spec/smarter_csv/quoted_spec.rb
257
- - spec/smarter_csv/remove_empty_values_spec.rb
258
- - spec/smarter_csv/remove_keys_from_hashes_spec.rb
259
- - spec/smarter_csv/remove_not_mapped_keys_spec.rb
260
- - spec/smarter_csv/remove_values_matching_spec.rb
261
- - spec/smarter_csv/remove_zero_values_spec.rb
262
- - spec/smarter_csv/skip_lines_spec.rb
263
- - spec/smarter_csv/strings_as_keys_spec.rb
264
- - spec/smarter_csv/strip_chars_from_headers_spec.rb
265
- - spec/smarter_csv/trading_spec.rb
266
- - spec/smarter_csv/valid_unicode_spec.rb
267
- - spec/smarter_csv/value_converters_spec.rb
268
- - spec/spec.opts
269
- - spec/spec/spec_helper.rb
270
- - spec/spec_helper.rb
148
+ test_files: []
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- *~
2
- #*#
3
- *old
4
- *.bak
5
- *.gem
6
- .bundle
7
- Gemfile.lock
8
- pkg/*
9
- coverage/*
10
- .DS_Store
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format documentation
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- bundler_args: --without development
3
- before_install:
4
- - gem install bundler
5
- - gem update --system
6
-
7
- matrix:
8
- include:
9
- - rvm: 2.2.10
10
- - rvm: 2.3.8
11
- - rvm: 2.4.10
12
- - rvm: 2.5.8
13
- - rvm: 2.6.9
14
- - rvm: 2.7.5
15
- - rvm: 3.0.3
16
- - rvm: 3.1.0
17
- - rvm: jruby-9.2.19.0
18
- - rvm: jruby-9.3.3.0
19
- env:
20
- - JRUBY_OPTS="--server -Xcompile.invokedynamic=false -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify -J-Xms512m -J-Xmx1024m"
21
- - rvm: ruby-head
22
-
23
- branches:
24
- only:
25
- - master
26
- - 1.2-stable
27
- - 2.0-develop