comma 4.9.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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/copilot-instructions.md +56 -0
  3. data/.github/workflows/build.yml +12 -3
  4. data/.rubocop_todo.yml +5 -4
  5. data/Appraisals +20 -22
  6. data/Gemfile.lock +36 -25
  7. data/README.md +161 -9
  8. data/comma.gemspec +7 -2
  9. data/gemfiles/{active6.0.6.gemfile → active7.1.6.gemfile} +2 -2
  10. data/gemfiles/active7.1.6.gemfile.lock +183 -0
  11. data/gemfiles/{active7.0.8.gemfile → active7.2.3.2.gemfile} +2 -2
  12. data/gemfiles/active7.2.3.2.gemfile.lock +182 -0
  13. data/gemfiles/{active6.1.7.6.gemfile → active8.0.5.1.gemfile} +2 -2
  14. data/gemfiles/active8.0.5.1.gemfile.lock +183 -0
  15. data/gemfiles/{active7.1.3.gemfile → active8.1.3.1.gemfile} +2 -2
  16. data/gemfiles/active8.1.3.1.gemfile.lock +183 -0
  17. data/gemfiles/{rails7.0.8.gemfile → rails7.1.6.gemfile} +1 -1
  18. data/gemfiles/rails7.1.6.gemfile.lock +326 -0
  19. data/gemfiles/{rails7.1.3.gemfile → rails7.2.3.2.gemfile} +1 -1
  20. data/gemfiles/rails7.2.3.2.gemfile.lock +321 -0
  21. data/gemfiles/{rails6.0.6.gemfile → rails8.0.5.1.gemfile} +1 -2
  22. data/gemfiles/rails8.0.5.1.gemfile.lock +319 -0
  23. data/gemfiles/{rails6.1.7.6.gemfile → rails8.1.3.1.gemfile} +1 -2
  24. data/gemfiles/rails8.1.3.1.gemfile.lock +322 -0
  25. data/lib/comma/array.rb +1 -3
  26. data/lib/comma/collection_export.rb +9 -0
  27. data/lib/comma/data_extractor.rb +16 -20
  28. data/lib/comma/data_mapper_collection.rb +1 -3
  29. data/lib/comma/extractor.rb +33 -2
  30. data/lib/comma/generator.rb +4 -8
  31. data/lib/comma/header_extractor.rb +10 -19
  32. data/lib/comma/mongoid.rb +1 -3
  33. data/lib/comma/object.rb +37 -11
  34. data/lib/comma/options.rb +18 -0
  35. data/lib/comma/rails/renderer.rb +21 -0
  36. data/lib/comma/rails.rb +16 -0
  37. data/lib/comma/version.rb +1 -1
  38. data/lib/comma.rb +4 -43
  39. data/spec/comma/comma_spec.rb +93 -34
  40. data/spec/comma/data_extractor_spec.rb +3 -3
  41. data/spec/comma/header_extractor_spec.rb +1 -1
  42. data/spec/comma/options_spec.rb +63 -0
  43. data/spec/comma/rails/active_record_spec.rb +0 -1
  44. data/spec/controllers/users_controller_spec.rb +13 -28
  45. data/spec/gemspec_spec.rb +11 -0
  46. data/spec/support/comma_class_helper.rb +12 -0
  47. data/spec/support/csv_expectation_helper.rb +14 -0
  48. metadata +92 -23
  49. data/gemfiles/active6.0.6.gemfile.lock +0 -136
  50. data/gemfiles/active6.1.7.6.gemfile.lock +0 -135
  51. data/gemfiles/active7.0.8.gemfile.lock +0 -133
  52. data/gemfiles/active7.1.3.gemfile.lock +0 -139
  53. data/gemfiles/rails6.0.6.gemfile.lock +0 -268
  54. data/gemfiles/rails6.1.7.6.gemfile.lock +0 -271
  55. data/gemfiles/rails7.0.8.gemfile.lock +0 -266
  56. data/gemfiles/rails7.1.3.gemfile.lock +0 -289
@@ -0,0 +1,183 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (5.1.0)
5
+ activesupport (>= 4.2.0)
6
+ csv (>= 3.3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (8.1.3.1)
12
+ activesupport (= 8.1.3.1)
13
+ activerecord (8.1.3.1)
14
+ activemodel (= 8.1.3.1)
15
+ activesupport (= 8.1.3.1)
16
+ timeout (>= 0.4.0)
17
+ activesupport (8.1.3.1)
18
+ base64
19
+ bigdecimal
20
+ concurrent-ruby (~> 1.0, >= 1.3.1)
21
+ connection_pool (>= 2.2.5)
22
+ drb
23
+ i18n (>= 1.6, < 2)
24
+ json
25
+ logger (>= 1.4.2)
26
+ minitest (>= 5.1)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
29
+ uri (>= 0.13.1)
30
+ appraisal (1.0.3)
31
+ bundler
32
+ rake
33
+ thor (>= 0.14.0)
34
+ ast (2.4.3)
35
+ base64 (0.3.0)
36
+ benchmark (0.5.0)
37
+ bigdecimal (4.1.2)
38
+ cgi (0.5.2)
39
+ concurrent-ruby (1.3.8)
40
+ connection_pool (3.0.2)
41
+ coveralls (0.8.23)
42
+ json (>= 1.8, < 3)
43
+ simplecov (~> 0.16.1)
44
+ term-ansicolor (~> 1.3)
45
+ thor (>= 0.19.4, < 2.0)
46
+ tins (~> 1.6)
47
+ csv (3.3.6)
48
+ diff-lcs (1.6.2)
49
+ docile (1.4.1)
50
+ drb (2.2.3)
51
+ erb (6.0.7)
52
+ i18n (1.15.2)
53
+ concurrent-ruby (~> 1.0)
54
+ io-console (0.9.2)
55
+ irb (1.18.0)
56
+ pp (>= 0.6.0)
57
+ prism (>= 1.3.0)
58
+ rdoc (>= 4.0.0)
59
+ reline (>= 0.4.2)
60
+ json (2.21.2)
61
+ logger (1.7.0)
62
+ mini_portile2 (2.8.9)
63
+ minitest (5.27.0)
64
+ mize (0.6.1)
65
+ mutex_m (0.3.0)
66
+ ostruct (0.6.3)
67
+ parallel (1.28.0)
68
+ parser (3.3.12.0)
69
+ ast (~> 2.4.1)
70
+ racc
71
+ pp (0.6.4)
72
+ prettyprint
73
+ prettyprint (0.2.0)
74
+ prism (1.9.0)
75
+ racc (1.8.1)
76
+ rainbow (3.1.1)
77
+ rake (13.0.6)
78
+ rbs (4.1.3)
79
+ logger
80
+ prism (>= 1.6.0)
81
+ tsort
82
+ rdoc (8.0.0)
83
+ erb
84
+ prism (>= 1.6.0)
85
+ rbs (>= 4.0.0)
86
+ tsort
87
+ readline (0.0.4)
88
+ reline
89
+ regexp_parser (2.12.0)
90
+ reline (0.7.0)
91
+ io-console (~> 0.5)
92
+ rexml (3.4.4)
93
+ rspec (3.13.2)
94
+ rspec-core (~> 3.13.0)
95
+ rspec-expectations (~> 3.13.0)
96
+ rspec-mocks (~> 3.13.0)
97
+ rspec-activemodel-mocks (1.3.0)
98
+ activemodel (>= 3.0)
99
+ activesupport (>= 3.0)
100
+ rspec-mocks (>= 2.99, < 4.0)
101
+ rspec-core (3.13.6)
102
+ rspec-support (~> 3.13.0)
103
+ rspec-expectations (3.13.5)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.13.0)
106
+ rspec-its (2.0.0)
107
+ rspec-core (>= 3.13.0)
108
+ rspec-expectations (>= 3.13.0)
109
+ rspec-mocks (3.13.8)
110
+ diff-lcs (>= 1.2.0, < 2.0)
111
+ rspec-support (~> 3.13.0)
112
+ rspec-support (3.13.7)
113
+ rubocop (1.30.1)
114
+ parallel (~> 1.10)
115
+ parser (>= 3.1.0.0)
116
+ rainbow (>= 2.2.2, < 4.0)
117
+ regexp_parser (>= 1.8, < 3.0)
118
+ rexml (>= 3.2.5, < 4.0)
119
+ rubocop-ast (>= 1.18.0, < 2.0)
120
+ ruby-progressbar (~> 1.7)
121
+ unicode-display_width (>= 1.4.0, < 3.0)
122
+ rubocop-ast (1.50.0)
123
+ parser (>= 3.3.7.2)
124
+ prism (~> 1.7)
125
+ rubocop-performance (1.19.1)
126
+ rubocop (>= 1.7.0, < 2.0)
127
+ rubocop-ast (>= 0.4.0)
128
+ ruby-progressbar (1.13.0)
129
+ securerandom (0.4.1)
130
+ simplecov (0.16.1)
131
+ docile (~> 1.1)
132
+ json (>= 1.8, < 3)
133
+ simplecov-html (~> 0.10.0)
134
+ simplecov-html (0.10.2)
135
+ sqlite3 (2.9.6)
136
+ mini_portile2 (~> 2.8.0)
137
+ sqlite3 (2.9.6-x86_64-linux-gnu)
138
+ sync (0.5.0)
139
+ term-ansicolor (1.11.3)
140
+ tins (~> 1)
141
+ thor (1.5.0)
142
+ timeout (0.6.1)
143
+ tins (1.56.0)
144
+ bigdecimal
145
+ irb
146
+ mize (~> 0.6)
147
+ readline
148
+ sync
149
+ tsort (0.2.0)
150
+ tzinfo (2.0.6)
151
+ concurrent-ruby (~> 1.0)
152
+ unicode-display_width (2.6.0)
153
+ uri (1.1.1)
154
+
155
+ PLATFORMS
156
+ ruby
157
+ x86_64-linux
158
+
159
+ DEPENDENCIES
160
+ activerecord (= 8.1.3.1)
161
+ activesupport (= 8.1.3.1)
162
+ appraisal (~> 1.0.0)
163
+ base64
164
+ benchmark
165
+ bigdecimal
166
+ cgi
167
+ comma!
168
+ coveralls
169
+ drb
170
+ logger
171
+ minitest (= 5.27.0)
172
+ mutex_m
173
+ ostruct
174
+ rake (~> 13.0.1)
175
+ rspec (~> 3.13)
176
+ rspec-activemodel-mocks
177
+ rspec-its
178
+ rubocop (~> 1.30.0)
179
+ rubocop-performance
180
+ sqlite3
181
+
182
+ BUNDLED WITH
183
+ 2.5.5
@@ -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.0.8"
9
+ gem "rails", "7.1.6"
10
10
  gem "rspec-rails"
11
11
 
12
12
  gemspec :path => "../"
@@ -0,0 +1,326 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (5.1.0)
5
+ activesupport (>= 4.2.0)
6
+ csv (>= 3.3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actioncable (7.1.6)
12
+ actionpack (= 7.1.6)
13
+ activesupport (= 7.1.6)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ zeitwerk (~> 2.6)
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
+ mail (>= 2.7.1)
24
+ net-imap
25
+ net-pop
26
+ net-smtp
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
+ mail (~> 2.5, >= 2.5.4)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
36
+ rails-dom-testing (~> 2.2)
37
+ actionpack (7.1.6)
38
+ actionview (= 7.1.6)
39
+ activesupport (= 7.1.6)
40
+ cgi
41
+ nokogiri (>= 1.8.5)
42
+ racc
43
+ rack (>= 2.2.4)
44
+ rack-session (>= 1.0.1)
45
+ rack-test (>= 0.6.3)
46
+ rails-dom-testing (~> 2.2)
47
+ rails-html-sanitizer (~> 1.6)
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)
53
+ globalid (>= 0.6.0)
54
+ nokogiri (>= 1.8.5)
55
+ actionview (7.1.6)
56
+ activesupport (= 7.1.6)
57
+ builder (~> 3.1)
58
+ cgi
59
+ erubi (~> 1.11)
60
+ rails-dom-testing (~> 2.2)
61
+ rails-html-sanitizer (~> 1.6)
62
+ activejob (7.1.6)
63
+ activesupport (= 7.1.6)
64
+ globalid (>= 0.3.6)
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)
70
+ timeout (>= 0.4.0)
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)
76
+ marcel (~> 1.0)
77
+ activesupport (7.1.6)
78
+ base64
79
+ benchmark (>= 0.3)
80
+ bigdecimal
81
+ concurrent-ruby (~> 1.0, >= 1.0.2)
82
+ connection_pool (>= 2.2.5)
83
+ drb
84
+ i18n (>= 1.6, < 2)
85
+ logger (>= 1.4.2)
86
+ minitest (>= 5.1)
87
+ mutex_m
88
+ securerandom (>= 0.3)
89
+ tzinfo (~> 2.0)
90
+ appraisal (1.0.3)
91
+ bundler
92
+ rake
93
+ thor (>= 0.14.0)
94
+ ast (2.4.3)
95
+ base64 (0.3.0)
96
+ benchmark (0.5.0)
97
+ bigdecimal (4.1.2)
98
+ builder (3.3.0)
99
+ cgi (0.5.2)
100
+ concurrent-ruby (1.3.8)
101
+ connection_pool (2.5.5)
102
+ coveralls (0.8.23)
103
+ json (>= 1.8, < 3)
104
+ simplecov (~> 0.16.1)
105
+ term-ansicolor (~> 1.3)
106
+ thor (>= 0.19.4, < 2.0)
107
+ tins (~> 1.6)
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)
113
+ drb (2.2.3)
114
+ erb (4.0.4.1)
115
+ cgi (>= 0.3.3)
116
+ erubi (1.13.1)
117
+ globalid (1.4.0)
118
+ activesupport (>= 6.1)
119
+ i18n (1.15.2)
120
+ concurrent-ruby (~> 1.0)
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)
126
+ reline (>= 0.4.2)
127
+ json (2.21.2)
128
+ logger (1.7.0)
129
+ loofah (2.25.2)
130
+ crass (~> 1.0.2)
131
+ nokogiri (>= 1.12.0)
132
+ mail (2.9.1)
133
+ logger
134
+ mini_mime (>= 0.1.1)
135
+ net-imap
136
+ net-pop
137
+ net-smtp
138
+ marcel (1.2.1)
139
+ mini_mime (1.1.5)
140
+ mini_portile2 (2.8.9)
141
+ minitest (5.27.0)
142
+ mize (0.6.1)
143
+ mutex_m (0.3.0)
144
+ net-imap (0.5.15)
145
+ date
146
+ net-protocol
147
+ net-pop (0.1.2)
148
+ net-protocol
149
+ net-protocol (0.3.0)
150
+ timeout
151
+ net-smtp (0.5.1)
152
+ net-protocol
153
+ nio4r (2.7.5)
154
+ nokogiri (1.18.10)
155
+ mini_portile2 (~> 2.8.2)
156
+ racc (~> 1.4)
157
+ nokogiri (1.18.10-x86_64-linux-gnu)
158
+ racc (~> 1.4)
159
+ ostruct (0.6.3)
160
+ parallel (1.28.0)
161
+ parser (3.3.12.0)
162
+ ast (~> 2.4.1)
163
+ racc
164
+ pp (0.6.4)
165
+ prettyprint
166
+ prettyprint (0.2.0)
167
+ prism (1.9.0)
168
+ psych (5.5.0)
169
+ date
170
+ stringio
171
+ racc (1.8.1)
172
+ rack (3.2.7)
173
+ rack-session (2.1.2)
174
+ base64 (>= 0.1.0)
175
+ rack (>= 3.0.0)
176
+ rack-test (2.2.0)
177
+ rack (>= 1.3)
178
+ rackup (2.3.1)
179
+ rack (>= 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)
192
+ bundler (>= 1.15.0)
193
+ railties (= 7.1.6)
194
+ rails-dom-testing (2.3.0)
195
+ activesupport (>= 5.0.0)
196
+ minitest
197
+ nokogiri (>= 1.6)
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
205
+ irb
206
+ rackup (>= 1.0.0)
207
+ rake (>= 12.2)
208
+ thor (~> 1.0, >= 1.2.2)
209
+ tsort (>= 0.2)
210
+ zeitwerk (~> 2.6)
211
+ rainbow (3.1.1)
212
+ rake (13.0.6)
213
+ rdoc (7.2.0)
214
+ erb
215
+ psych (>= 4.0.0)
216
+ tsort
217
+ readline (0.0.4)
218
+ reline
219
+ regexp_parser (2.12.0)
220
+ reline (0.7.0)
221
+ io-console (~> 0.5)
222
+ rexml (3.4.4)
223
+ rspec (3.13.2)
224
+ rspec-core (~> 3.13.0)
225
+ rspec-expectations (~> 3.13.0)
226
+ rspec-mocks (~> 3.13.0)
227
+ rspec-activemodel-mocks (1.3.0)
228
+ activemodel (>= 3.0)
229
+ activesupport (>= 3.0)
230
+ rspec-mocks (>= 2.99, < 4.0)
231
+ rspec-core (3.13.6)
232
+ rspec-support (~> 3.13.0)
233
+ rspec-expectations (3.13.5)
234
+ diff-lcs (>= 1.2.0, < 2.0)
235
+ rspec-support (~> 3.13.0)
236
+ rspec-its (2.0.0)
237
+ rspec-core (>= 3.13.0)
238
+ rspec-expectations (>= 3.13.0)
239
+ rspec-mocks (3.13.8)
240
+ diff-lcs (>= 1.2.0, < 2.0)
241
+ rspec-support (~> 3.13.0)
242
+ rspec-rails (7.1.1)
243
+ actionpack (>= 7.0)
244
+ activesupport (>= 7.0)
245
+ railties (>= 7.0)
246
+ rspec-core (~> 3.13)
247
+ rspec-expectations (~> 3.13)
248
+ rspec-mocks (~> 3.13)
249
+ rspec-support (~> 3.13)
250
+ rspec-support (3.13.7)
251
+ rubocop (1.30.1)
252
+ parallel (~> 1.10)
253
+ parser (>= 3.1.0.0)
254
+ rainbow (>= 2.2.2, < 4.0)
255
+ regexp_parser (>= 1.8, < 3.0)
256
+ rexml (>= 3.2.5, < 4.0)
257
+ rubocop-ast (>= 1.18.0, < 2.0)
258
+ ruby-progressbar (~> 1.7)
259
+ unicode-display_width (>= 1.4.0, < 3.0)
260
+ rubocop-ast (1.50.0)
261
+ parser (>= 3.3.7.2)
262
+ prism (~> 1.7)
263
+ rubocop-performance (1.19.1)
264
+ rubocop (>= 1.7.0, < 2.0)
265
+ rubocop-ast (>= 0.4.0)
266
+ ruby-progressbar (1.13.0)
267
+ securerandom (0.4.1)
268
+ simplecov (0.16.1)
269
+ docile (~> 1.1)
270
+ json (>= 1.8, < 3)
271
+ simplecov-html (~> 0.10.0)
272
+ simplecov-html (0.10.2)
273
+ sqlite3 (2.8.1)
274
+ mini_portile2 (~> 2.8.0)
275
+ sqlite3 (2.8.1-x86_64-linux-gnu)
276
+ stringio (3.2.0)
277
+ sync (0.5.0)
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
287
+ sync
288
+ tsort (0.2.0)
289
+ tzinfo (2.0.6)
290
+ concurrent-ruby (~> 1.0)
291
+ unicode-display_width (2.6.0)
292
+ websocket-driver (0.8.2)
293
+ base64
294
+ websocket-extensions (>= 0.1.0)
295
+ websocket-extensions (0.1.5)
296
+ zeitwerk (2.6.18)
297
+
298
+ PLATFORMS
299
+ ruby
300
+ x86_64-linux
301
+
302
+ DEPENDENCIES
303
+ appraisal (~> 1.0.0)
304
+ base64
305
+ benchmark
306
+ bigdecimal
307
+ cgi
308
+ comma!
309
+ coveralls
310
+ drb
311
+ logger
312
+ minitest (= 5.27.0)
313
+ mutex_m
314
+ ostruct
315
+ rails (= 7.1.6)
316
+ rake (~> 13.0.1)
317
+ rspec (~> 3.13)
318
+ rspec-activemodel-mocks
319
+ rspec-its
320
+ rspec-rails
321
+ rubocop (~> 1.30.0)
322
+ rubocop-performance
323
+ sqlite3
324
+
325
+ BUNDLED WITH
326
+ 2.5.5
@@ -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 => "../"