comma 5.0.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +10 -1
  3. data/.rubocop_todo.yml +5 -4
  4. data/Appraisals +20 -22
  5. data/Gemfile.lock +1 -1
  6. data/README.md +75 -3
  7. data/gemfiles/{active6.0.6.gemfile → active7.1.6.gemfile} +2 -2
  8. data/gemfiles/{active7.1.3.gemfile.lock → active7.1.6.gemfile.lock} +79 -43
  9. data/gemfiles/{active7.0.8.gemfile → active7.2.3.2.gemfile} +2 -2
  10. data/gemfiles/active7.2.3.2.gemfile.lock +182 -0
  11. data/gemfiles/{active6.1.7.6.gemfile → active8.0.5.1.gemfile} +2 -2
  12. data/gemfiles/{active6.1.7.6.gemfile.lock → active8.0.5.1.gemfile.lock} +87 -47
  13. data/gemfiles/{active7.1.3.gemfile → active8.1.3.1.gemfile} +2 -2
  14. data/gemfiles/{active7.0.8.gemfile.lock → active8.1.3.1.gemfile.lock} +87 -45
  15. data/gemfiles/{rails7.0.8.gemfile → rails7.1.6.gemfile} +1 -1
  16. data/gemfiles/{rails7.1.3.gemfile.lock → rails7.1.6.gemfile.lock} +155 -126
  17. data/gemfiles/{rails7.1.3.gemfile → rails7.2.3.2.gemfile} +1 -1
  18. data/gemfiles/rails7.2.3.2.gemfile.lock +321 -0
  19. data/gemfiles/{rails6.0.6.gemfile → rails8.0.5.1.gemfile} +1 -2
  20. data/gemfiles/rails8.0.5.1.gemfile.lock +319 -0
  21. data/gemfiles/{rails6.1.7.6.gemfile → rails8.1.3.1.gemfile} +1 -2
  22. data/gemfiles/rails8.1.3.1.gemfile.lock +322 -0
  23. data/lib/comma/array.rb +1 -3
  24. data/lib/comma/collection_export.rb +9 -0
  25. data/lib/comma/data_extractor.rb +16 -20
  26. data/lib/comma/data_mapper_collection.rb +1 -3
  27. data/lib/comma/extractor.rb +33 -2
  28. data/lib/comma/generator.rb +4 -8
  29. data/lib/comma/header_extractor.rb +10 -19
  30. data/lib/comma/mongoid.rb +1 -3
  31. data/lib/comma/object.rb +37 -11
  32. data/lib/comma/options.rb +18 -0
  33. data/lib/comma/rails/renderer.rb +21 -0
  34. data/lib/comma/rails.rb +16 -0
  35. data/lib/comma/version.rb +1 -1
  36. data/lib/comma.rb +4 -43
  37. data/spec/comma/comma_spec.rb +93 -34
  38. data/spec/comma/data_extractor_spec.rb +3 -3
  39. data/spec/comma/header_extractor_spec.rb +1 -1
  40. data/spec/comma/options_spec.rb +63 -0
  41. data/spec/comma/rails/active_record_spec.rb +0 -1
  42. data/spec/controllers/users_controller_spec.rb +13 -28
  43. data/spec/support/comma_class_helper.rb +12 -0
  44. data/spec/support/csv_expectation_helper.rb +14 -0
  45. metadata +28 -18
  46. data/gemfiles/active6.0.6.gemfile.lock +0 -144
  47. data/gemfiles/rails6.0.6.gemfile.lock +0 -276
  48. data/gemfiles/rails6.1.7.6.gemfile.lock +0 -279
  49. data/gemfiles/rails7.0.8.gemfile.lock +0 -274
@@ -1,42 +1,43 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- comma (5.0.0)
4
+ comma (5.1.0)
5
5
  activesupport (>= 4.2.0)
6
6
  csv (>= 3.3)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (7.1.3)
12
- actionpack (= 7.1.3)
13
- activesupport (= 7.1.3)
11
+ actioncable (7.1.6)
12
+ actionpack (= 7.1.6)
13
+ activesupport (= 7.1.6)
14
14
  nio4r (~> 2.0)
15
15
  websocket-driver (>= 0.6.1)
16
16
  zeitwerk (~> 2.6)
17
- actionmailbox (7.1.3)
18
- actionpack (= 7.1.3)
19
- activejob (= 7.1.3)
20
- activerecord (= 7.1.3)
21
- activestorage (= 7.1.3)
22
- activesupport (= 7.1.3)
17
+ actionmailbox (7.1.6)
18
+ actionpack (= 7.1.6)
19
+ activejob (= 7.1.6)
20
+ activerecord (= 7.1.6)
21
+ activestorage (= 7.1.6)
22
+ activesupport (= 7.1.6)
23
23
  mail (>= 2.7.1)
24
24
  net-imap
25
25
  net-pop
26
26
  net-smtp
27
- actionmailer (7.1.3)
28
- actionpack (= 7.1.3)
29
- actionview (= 7.1.3)
30
- activejob (= 7.1.3)
31
- activesupport (= 7.1.3)
27
+ actionmailer (7.1.6)
28
+ actionpack (= 7.1.6)
29
+ actionview (= 7.1.6)
30
+ activejob (= 7.1.6)
31
+ activesupport (= 7.1.6)
32
32
  mail (~> 2.5, >= 2.5.4)
33
33
  net-imap
34
34
  net-pop
35
35
  net-smtp
36
36
  rails-dom-testing (~> 2.2)
37
- actionpack (7.1.3)
38
- actionview (= 7.1.3)
39
- activesupport (= 7.1.3)
37
+ actionpack (7.1.6)
38
+ actionview (= 7.1.6)
39
+ activesupport (= 7.1.6)
40
+ cgi
40
41
  nokogiri (>= 1.8.5)
41
42
  racc
42
43
  rack (>= 2.2.4)
@@ -44,55 +45,59 @@ GEM
44
45
  rack-test (>= 0.6.3)
45
46
  rails-dom-testing (~> 2.2)
46
47
  rails-html-sanitizer (~> 1.6)
47
- actiontext (7.1.3)
48
- actionpack (= 7.1.3)
49
- activerecord (= 7.1.3)
50
- activestorage (= 7.1.3)
51
- activesupport (= 7.1.3)
48
+ actiontext (7.1.6)
49
+ actionpack (= 7.1.6)
50
+ activerecord (= 7.1.6)
51
+ activestorage (= 7.1.6)
52
+ activesupport (= 7.1.6)
52
53
  globalid (>= 0.6.0)
53
54
  nokogiri (>= 1.8.5)
54
- actionview (7.1.3)
55
- activesupport (= 7.1.3)
55
+ actionview (7.1.6)
56
+ activesupport (= 7.1.6)
56
57
  builder (~> 3.1)
58
+ cgi
57
59
  erubi (~> 1.11)
58
60
  rails-dom-testing (~> 2.2)
59
61
  rails-html-sanitizer (~> 1.6)
60
- activejob (7.1.3)
61
- activesupport (= 7.1.3)
62
+ activejob (7.1.6)
63
+ activesupport (= 7.1.6)
62
64
  globalid (>= 0.3.6)
63
- activemodel (7.1.3)
64
- activesupport (= 7.1.3)
65
- activerecord (7.1.3)
66
- activemodel (= 7.1.3)
67
- activesupport (= 7.1.3)
65
+ activemodel (7.1.6)
66
+ activesupport (= 7.1.6)
67
+ activerecord (7.1.6)
68
+ activemodel (= 7.1.6)
69
+ activesupport (= 7.1.6)
68
70
  timeout (>= 0.4.0)
69
- activestorage (7.1.3)
70
- actionpack (= 7.1.3)
71
- activejob (= 7.1.3)
72
- activerecord (= 7.1.3)
73
- activesupport (= 7.1.3)
71
+ activestorage (7.1.6)
72
+ actionpack (= 7.1.6)
73
+ activejob (= 7.1.6)
74
+ activerecord (= 7.1.6)
75
+ activesupport (= 7.1.6)
74
76
  marcel (~> 1.0)
75
- activesupport (7.1.3)
77
+ activesupport (7.1.6)
76
78
  base64
79
+ benchmark (>= 0.3)
77
80
  bigdecimal
78
81
  concurrent-ruby (~> 1.0, >= 1.0.2)
79
82
  connection_pool (>= 2.2.5)
80
83
  drb
81
84
  i18n (>= 1.6, < 2)
85
+ logger (>= 1.4.2)
82
86
  minitest (>= 5.1)
83
87
  mutex_m
88
+ securerandom (>= 0.3)
84
89
  tzinfo (~> 2.0)
85
90
  appraisal (1.0.3)
86
91
  bundler
87
92
  rake
88
93
  thor (>= 0.14.0)
89
- ast (2.4.2)
94
+ ast (2.4.3)
90
95
  base64 (0.3.0)
91
96
  benchmark (0.5.0)
92
97
  bigdecimal (4.1.2)
93
- builder (3.2.4)
94
- cgi (0.3.6)
95
- concurrent-ruby (1.3.6)
98
+ builder (3.3.0)
99
+ cgi (0.5.2)
100
+ concurrent-ruby (1.3.8)
96
101
  connection_pool (2.5.5)
97
102
  coveralls (0.8.23)
98
103
  json (>= 1.8, < 3)
@@ -100,132 +105,149 @@ GEM
100
105
  term-ansicolor (~> 1.3)
101
106
  thor (>= 0.19.4, < 2.0)
102
107
  tins (~> 1.6)
103
- crass (1.0.6)
104
- csv (3.3.5)
105
- date (3.3.4)
106
- diff-lcs (1.5.0)
107
- docile (1.4.0)
108
+ crass (1.0.7)
109
+ csv (3.3.6)
110
+ date (3.5.1)
111
+ diff-lcs (1.6.2)
112
+ docile (1.4.1)
108
113
  drb (2.2.3)
109
- erubi (1.12.0)
110
- globalid (1.2.1)
114
+ erb (4.0.4.1)
115
+ cgi (>= 0.3.3)
116
+ erubi (1.13.1)
117
+ globalid (1.4.0)
111
118
  activesupport (>= 6.1)
112
- i18n (1.14.8)
119
+ i18n (1.15.2)
113
120
  concurrent-ruby (~> 1.0)
114
- io-console (0.7.2)
115
- irb (1.11.1)
116
- rdoc
121
+ io-console (0.9.2)
122
+ irb (1.18.0)
123
+ pp (>= 0.6.0)
124
+ prism (>= 1.3.0)
125
+ rdoc (>= 4.0.0)
117
126
  reline (>= 0.4.2)
118
- json (2.7.1)
127
+ json (2.21.2)
119
128
  logger (1.7.0)
120
- loofah (2.22.0)
129
+ loofah (2.25.2)
121
130
  crass (~> 1.0.2)
122
131
  nokogiri (>= 1.12.0)
123
- mail (2.8.1)
132
+ mail (2.9.1)
133
+ logger
124
134
  mini_mime (>= 0.1.1)
125
135
  net-imap
126
136
  net-pop
127
137
  net-smtp
128
- marcel (1.0.2)
138
+ marcel (1.2.1)
129
139
  mini_mime (1.1.5)
130
- mini_portile2 (2.8.5)
140
+ mini_portile2 (2.8.9)
131
141
  minitest (5.27.0)
142
+ mize (0.6.1)
132
143
  mutex_m (0.3.0)
133
- net-imap (0.4.9.1)
144
+ net-imap (0.5.15)
134
145
  date
135
146
  net-protocol
136
147
  net-pop (0.1.2)
137
148
  net-protocol
138
- net-protocol (0.2.2)
149
+ net-protocol (0.3.0)
139
150
  timeout
140
- net-smtp (0.4.0.1)
151
+ net-smtp (0.5.1)
141
152
  net-protocol
142
- nio4r (2.7.0)
143
- nokogiri (1.16.0)
153
+ nio4r (2.7.5)
154
+ nokogiri (1.18.10)
144
155
  mini_portile2 (~> 2.8.2)
145
156
  racc (~> 1.4)
146
- nokogiri (1.16.0-x86_64-linux)
157
+ nokogiri (1.18.10-x86_64-linux-gnu)
147
158
  racc (~> 1.4)
148
- ostruct (0.5.2)
149
- parallel (1.24.0)
150
- parser (3.3.0.4)
159
+ ostruct (0.6.3)
160
+ parallel (1.28.0)
161
+ parser (3.3.12.0)
151
162
  ast (~> 2.4.1)
152
163
  racc
153
- psych (5.1.2)
164
+ pp (0.6.4)
165
+ prettyprint
166
+ prettyprint (0.2.0)
167
+ prism (1.9.0)
168
+ psych (5.5.0)
169
+ date
154
170
  stringio
155
- racc (1.7.3)
156
- rack (3.0.8)
157
- rack-session (2.0.0)
171
+ racc (1.8.1)
172
+ rack (3.2.7)
173
+ rack-session (2.1.2)
174
+ base64 (>= 0.1.0)
158
175
  rack (>= 3.0.0)
159
- rack-test (2.1.0)
176
+ rack-test (2.2.0)
160
177
  rack (>= 1.3)
161
- rackup (2.1.0)
178
+ rackup (2.3.1)
162
179
  rack (>= 3)
163
- webrick (~> 1.8)
164
- rails (7.1.3)
165
- actioncable (= 7.1.3)
166
- actionmailbox (= 7.1.3)
167
- actionmailer (= 7.1.3)
168
- actionpack (= 7.1.3)
169
- actiontext (= 7.1.3)
170
- actionview (= 7.1.3)
171
- activejob (= 7.1.3)
172
- activemodel (= 7.1.3)
173
- activerecord (= 7.1.3)
174
- activestorage (= 7.1.3)
175
- activesupport (= 7.1.3)
180
+ rails (7.1.6)
181
+ actioncable (= 7.1.6)
182
+ actionmailbox (= 7.1.6)
183
+ actionmailer (= 7.1.6)
184
+ actionpack (= 7.1.6)
185
+ actiontext (= 7.1.6)
186
+ actionview (= 7.1.6)
187
+ activejob (= 7.1.6)
188
+ activemodel (= 7.1.6)
189
+ activerecord (= 7.1.6)
190
+ activestorage (= 7.1.6)
191
+ activesupport (= 7.1.6)
176
192
  bundler (>= 1.15.0)
177
- railties (= 7.1.3)
178
- rails-dom-testing (2.2.0)
193
+ railties (= 7.1.6)
194
+ rails-dom-testing (2.3.0)
179
195
  activesupport (>= 5.0.0)
180
196
  minitest
181
197
  nokogiri (>= 1.6)
182
- rails-html-sanitizer (1.6.0)
183
- loofah (~> 2.21)
184
- nokogiri (~> 1.14)
185
- railties (7.1.3)
186
- actionpack (= 7.1.3)
187
- activesupport (= 7.1.3)
198
+ rails-html-sanitizer (1.7.1)
199
+ loofah (~> 2.25, >= 2.25.2)
200
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
201
+ railties (7.1.6)
202
+ actionpack (= 7.1.6)
203
+ activesupport (= 7.1.6)
204
+ cgi
188
205
  irb
189
206
  rackup (>= 1.0.0)
190
207
  rake (>= 12.2)
191
208
  thor (~> 1.0, >= 1.2.2)
209
+ tsort (>= 0.2)
192
210
  zeitwerk (~> 2.6)
193
211
  rainbow (3.1.1)
194
212
  rake (13.0.6)
195
- rdoc (6.6.2)
213
+ rdoc (7.2.0)
214
+ erb
196
215
  psych (>= 4.0.0)
197
- regexp_parser (2.9.0)
198
- reline (0.4.2)
216
+ tsort
217
+ readline (0.0.4)
218
+ reline
219
+ regexp_parser (2.12.0)
220
+ reline (0.7.0)
199
221
  io-console (~> 0.5)
200
- rexml (3.2.6)
201
- rspec (3.13.0)
222
+ rexml (3.4.4)
223
+ rspec (3.13.2)
202
224
  rspec-core (~> 3.13.0)
203
225
  rspec-expectations (~> 3.13.0)
204
226
  rspec-mocks (~> 3.13.0)
205
- rspec-activemodel-mocks (1.2.0)
227
+ rspec-activemodel-mocks (1.3.0)
206
228
  activemodel (>= 3.0)
207
229
  activesupport (>= 3.0)
208
230
  rspec-mocks (>= 2.99, < 4.0)
209
- rspec-core (3.13.1)
231
+ rspec-core (3.13.6)
210
232
  rspec-support (~> 3.13.0)
211
- rspec-expectations (3.13.3)
233
+ rspec-expectations (3.13.5)
212
234
  diff-lcs (>= 1.2.0, < 2.0)
213
235
  rspec-support (~> 3.13.0)
214
- rspec-its (1.3.0)
215
- rspec-core (>= 3.0.0)
216
- rspec-expectations (>= 3.0.0)
217
- rspec-mocks (3.13.1)
236
+ rspec-its (2.0.0)
237
+ rspec-core (>= 3.13.0)
238
+ rspec-expectations (>= 3.13.0)
239
+ rspec-mocks (3.13.8)
218
240
  diff-lcs (>= 1.2.0, < 2.0)
219
241
  rspec-support (~> 3.13.0)
220
- rspec-rails (6.1.5)
221
- actionpack (>= 6.1)
222
- activesupport (>= 6.1)
223
- railties (>= 6.1)
242
+ rspec-rails (7.1.1)
243
+ actionpack (>= 7.0)
244
+ activesupport (>= 7.0)
245
+ railties (>= 7.0)
224
246
  rspec-core (~> 3.13)
225
247
  rspec-expectations (~> 3.13)
226
248
  rspec-mocks (~> 3.13)
227
249
  rspec-support (~> 3.13)
228
- rspec-support (3.13.1)
250
+ rspec-support (3.13.7)
229
251
  rubocop (1.30.1)
230
252
  parallel (~> 1.10)
231
253
  parser (>= 3.1.0.0)
@@ -235,36 +257,43 @@ GEM
235
257
  rubocop-ast (>= 1.18.0, < 2.0)
236
258
  ruby-progressbar (~> 1.7)
237
259
  unicode-display_width (>= 1.4.0, < 3.0)
238
- rubocop-ast (1.30.0)
239
- parser (>= 3.2.1.0)
260
+ rubocop-ast (1.50.0)
261
+ parser (>= 3.3.7.2)
262
+ prism (~> 1.7)
240
263
  rubocop-performance (1.19.1)
241
264
  rubocop (>= 1.7.0, < 2.0)
242
265
  rubocop-ast (>= 0.4.0)
243
266
  ruby-progressbar (1.13.0)
267
+ securerandom (0.4.1)
244
268
  simplecov (0.16.1)
245
269
  docile (~> 1.1)
246
270
  json (>= 1.8, < 3)
247
271
  simplecov-html (~> 0.10.0)
248
272
  simplecov-html (0.10.2)
249
- sqlite3 (1.7.0)
273
+ sqlite3 (2.8.1)
250
274
  mini_portile2 (~> 2.8.0)
251
- sqlite3 (1.7.0-x86_64-linux)
252
- stringio (3.1.0)
275
+ sqlite3 (2.8.1-x86_64-linux-gnu)
276
+ stringio (3.2.0)
253
277
  sync (0.5.0)
254
- term-ansicolor (1.7.1)
255
- tins (~> 1.0)
256
- thor (1.3.0)
257
- timeout (0.4.1)
258
- tins (1.32.1)
278
+ term-ansicolor (1.11.3)
279
+ tins (~> 1)
280
+ thor (1.5.0)
281
+ timeout (0.6.1)
282
+ tins (1.56.0)
283
+ bigdecimal
284
+ irb
285
+ mize (~> 0.6)
286
+ readline
259
287
  sync
288
+ tsort (0.2.0)
260
289
  tzinfo (2.0.6)
261
290
  concurrent-ruby (~> 1.0)
262
- unicode-display_width (2.5.0)
263
- webrick (1.8.1)
264
- websocket-driver (0.7.6)
291
+ unicode-display_width (2.6.0)
292
+ websocket-driver (0.8.2)
293
+ base64
265
294
  websocket-extensions (>= 0.1.0)
266
295
  websocket-extensions (0.1.5)
267
- zeitwerk (2.6.12)
296
+ zeitwerk (2.6.18)
268
297
 
269
298
  PLATFORMS
270
299
  ruby
@@ -283,7 +312,7 @@ DEPENDENCIES
283
312
  minitest (= 5.27.0)
284
313
  mutex_m
285
314
  ostruct
286
- rails (= 7.1.3)
315
+ rails (= 7.1.6)
287
316
  rake (~> 13.0.1)
288
317
  rspec (~> 3.13)
289
318
  rspec-activemodel-mocks
@@ -6,7 +6,7 @@ gem "coveralls", :require => false
6
6
  gem "rubocop", "~> 1.30.0", :require => false
7
7
  gem "rubocop-performance", :require => false
8
8
  gem "sqlite3"
9
- gem "rails", "7.1.3"
9
+ gem "rails", "7.2.3.2"
10
10
  gem "rspec-rails"
11
11
 
12
12
  gemspec :path => "../"