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,81 +1,115 @@
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
- activemodel (6.1.7.6)
12
- activesupport (= 6.1.7.6)
13
- activerecord (6.1.7.6)
14
- activemodel (= 6.1.7.6)
15
- activesupport (= 6.1.7.6)
16
- activesupport (6.1.7.6)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ activemodel (8.0.5.1)
12
+ activesupport (= 8.0.5.1)
13
+ activerecord (8.0.5.1)
14
+ activemodel (= 8.0.5.1)
15
+ activesupport (= 8.0.5.1)
16
+ timeout (>= 0.4.0)
17
+ activesupport (8.0.5.1)
18
+ base64
19
+ benchmark (>= 0.3)
20
+ bigdecimal
21
+ concurrent-ruby (~> 1.0, >= 1.3.1)
22
+ connection_pool (>= 2.2.5)
23
+ drb
18
24
  i18n (>= 1.6, < 2)
25
+ logger (>= 1.4.2)
19
26
  minitest (>= 5.1)
20
- tzinfo (~> 2.0)
21
- zeitwerk (~> 2.3)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
29
+ uri (>= 0.13.1)
22
30
  appraisal (1.0.3)
23
31
  bundler
24
32
  rake
25
33
  thor (>= 0.14.0)
26
- ast (2.4.2)
34
+ ast (2.4.3)
27
35
  base64 (0.3.0)
28
36
  benchmark (0.5.0)
29
37
  bigdecimal (4.1.2)
30
- cgi (0.3.6)
31
- concurrent-ruby (1.3.6)
38
+ cgi (0.5.2)
39
+ concurrent-ruby (1.3.8)
40
+ connection_pool (3.0.2)
32
41
  coveralls (0.8.23)
33
42
  json (>= 1.8, < 3)
34
43
  simplecov (~> 0.16.1)
35
44
  term-ansicolor (~> 1.3)
36
45
  thor (>= 0.19.4, < 2.0)
37
46
  tins (~> 1.6)
38
- csv (3.3.5)
39
- diff-lcs (1.5.0)
40
- docile (1.4.0)
47
+ csv (3.3.6)
48
+ diff-lcs (1.6.2)
49
+ docile (1.4.1)
41
50
  drb (2.2.3)
42
- i18n (1.14.8)
51
+ erb (6.0.7)
52
+ i18n (1.15.2)
43
53
  concurrent-ruby (~> 1.0)
44
- json (2.7.1)
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)
45
61
  logger (1.7.0)
46
62
  mini_portile2 (2.8.9)
47
63
  minitest (5.27.0)
64
+ mize (0.6.1)
48
65
  mutex_m (0.3.0)
49
- ostruct (0.5.2)
50
- parallel (1.24.0)
51
- parser (3.3.0.4)
66
+ ostruct (0.6.3)
67
+ parallel (1.28.0)
68
+ parser (3.3.12.0)
52
69
  ast (~> 2.4.1)
53
70
  racc
54
- racc (1.7.3)
71
+ pp (0.6.4)
72
+ prettyprint
73
+ prettyprint (0.2.0)
74
+ prism (1.9.0)
75
+ racc (1.8.1)
55
76
  rainbow (3.1.1)
56
77
  rake (13.0.6)
57
- regexp_parser (2.9.0)
58
- rexml (3.2.6)
59
- rspec (3.13.0)
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)
60
94
  rspec-core (~> 3.13.0)
61
95
  rspec-expectations (~> 3.13.0)
62
96
  rspec-mocks (~> 3.13.0)
63
- rspec-activemodel-mocks (1.2.0)
97
+ rspec-activemodel-mocks (1.3.0)
64
98
  activemodel (>= 3.0)
65
99
  activesupport (>= 3.0)
66
100
  rspec-mocks (>= 2.99, < 4.0)
67
- rspec-core (3.13.1)
101
+ rspec-core (3.13.6)
68
102
  rspec-support (~> 3.13.0)
69
- rspec-expectations (3.13.3)
103
+ rspec-expectations (3.13.5)
70
104
  diff-lcs (>= 1.2.0, < 2.0)
71
105
  rspec-support (~> 3.13.0)
72
- rspec-its (1.3.0)
73
- rspec-core (>= 3.0.0)
74
- rspec-expectations (>= 3.0.0)
75
- rspec-mocks (3.13.1)
106
+ rspec-its (2.0.0)
107
+ rspec-core (>= 3.13.0)
108
+ rspec-expectations (>= 3.13.0)
109
+ rspec-mocks (3.13.8)
76
110
  diff-lcs (>= 1.2.0, < 2.0)
77
111
  rspec-support (~> 3.13.0)
78
- rspec-support (3.13.1)
112
+ rspec-support (3.13.7)
79
113
  rubocop (1.30.1)
80
114
  parallel (~> 1.10)
81
115
  parser (>= 3.1.0.0)
@@ -85,40 +119,46 @@ GEM
85
119
  rubocop-ast (>= 1.18.0, < 2.0)
86
120
  ruby-progressbar (~> 1.7)
87
121
  unicode-display_width (>= 1.4.0, < 3.0)
88
- rubocop-ast (1.30.0)
89
- parser (>= 3.2.1.0)
122
+ rubocop-ast (1.50.0)
123
+ parser (>= 3.3.7.2)
124
+ prism (~> 1.7)
90
125
  rubocop-performance (1.19.1)
91
126
  rubocop (>= 1.7.0, < 2.0)
92
127
  rubocop-ast (>= 0.4.0)
93
128
  ruby-progressbar (1.13.0)
129
+ securerandom (0.4.1)
94
130
  simplecov (0.16.1)
95
131
  docile (~> 1.1)
96
132
  json (>= 1.8, < 3)
97
133
  simplecov-html (~> 0.10.0)
98
134
  simplecov-html (0.10.2)
99
- sqlite3 (1.7.0)
135
+ sqlite3 (2.9.6)
100
136
  mini_portile2 (~> 2.8.0)
101
- sqlite3 (1.7.0-x86_64-darwin)
102
- sqlite3 (1.7.0-x86_64-linux)
137
+ sqlite3 (2.9.6-x86_64-linux-gnu)
103
138
  sync (0.5.0)
104
- term-ansicolor (1.7.1)
105
- tins (~> 1.0)
106
- thor (1.3.0)
107
- tins (1.32.1)
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
108
148
  sync
149
+ tsort (0.2.0)
109
150
  tzinfo (2.0.6)
110
151
  concurrent-ruby (~> 1.0)
111
- unicode-display_width (2.5.0)
112
- zeitwerk (2.6.18)
152
+ unicode-display_width (2.6.0)
153
+ uri (1.1.1)
113
154
 
114
155
  PLATFORMS
115
156
  ruby
116
- x86_64-darwin-23
117
157
  x86_64-linux
118
158
 
119
159
  DEPENDENCIES
120
- activerecord (= 6.1.7.6)
121
- activesupport (= 6.1.7.6)
160
+ activerecord (= 8.0.5.1)
161
+ activesupport (= 8.0.5.1)
122
162
  appraisal (~> 1.0.0)
123
163
  base64
124
164
  benchmark
@@ -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 "activesupport", "7.1.3"
10
- gem "activerecord", "7.1.3"
9
+ gem "activesupport", "8.1.3.1"
10
+ gem "activerecord", "8.1.3.1"
11
11
 
12
12
  gemspec :path => "../"
@@ -1,80 +1,115 @@
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
- activemodel (7.0.8)
12
- activesupport (= 7.0.8)
13
- activerecord (7.0.8)
14
- activemodel (= 7.0.8)
15
- activesupport (= 7.0.8)
16
- activesupport (7.0.8)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
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
18
23
  i18n (>= 1.6, < 2)
24
+ json
25
+ logger (>= 1.4.2)
19
26
  minitest (>= 5.1)
20
- tzinfo (~> 2.0)
27
+ securerandom (>= 0.3)
28
+ tzinfo (~> 2.0, >= 2.0.5)
29
+ uri (>= 0.13.1)
21
30
  appraisal (1.0.3)
22
31
  bundler
23
32
  rake
24
33
  thor (>= 0.14.0)
25
- ast (2.4.2)
34
+ ast (2.4.3)
26
35
  base64 (0.3.0)
27
36
  benchmark (0.5.0)
28
37
  bigdecimal (4.1.2)
29
- cgi (0.3.6)
30
- concurrent-ruby (1.3.6)
38
+ cgi (0.5.2)
39
+ concurrent-ruby (1.3.8)
40
+ connection_pool (3.0.2)
31
41
  coveralls (0.8.23)
32
42
  json (>= 1.8, < 3)
33
43
  simplecov (~> 0.16.1)
34
44
  term-ansicolor (~> 1.3)
35
45
  thor (>= 0.19.4, < 2.0)
36
46
  tins (~> 1.6)
37
- csv (3.3.5)
38
- diff-lcs (1.5.0)
39
- docile (1.4.0)
47
+ csv (3.3.6)
48
+ diff-lcs (1.6.2)
49
+ docile (1.4.1)
40
50
  drb (2.2.3)
41
- i18n (1.14.8)
51
+ erb (6.0.7)
52
+ i18n (1.15.2)
42
53
  concurrent-ruby (~> 1.0)
43
- json (2.7.1)
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)
44
61
  logger (1.7.0)
45
62
  mini_portile2 (2.8.9)
46
63
  minitest (5.27.0)
64
+ mize (0.6.1)
47
65
  mutex_m (0.3.0)
48
- ostruct (0.5.2)
49
- parallel (1.24.0)
50
- parser (3.3.0.4)
66
+ ostruct (0.6.3)
67
+ parallel (1.28.0)
68
+ parser (3.3.12.0)
51
69
  ast (~> 2.4.1)
52
70
  racc
53
- racc (1.7.3)
71
+ pp (0.6.4)
72
+ prettyprint
73
+ prettyprint (0.2.0)
74
+ prism (1.9.0)
75
+ racc (1.8.1)
54
76
  rainbow (3.1.1)
55
77
  rake (13.0.6)
56
- regexp_parser (2.9.0)
57
- rexml (3.2.6)
58
- rspec (3.13.0)
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)
59
94
  rspec-core (~> 3.13.0)
60
95
  rspec-expectations (~> 3.13.0)
61
96
  rspec-mocks (~> 3.13.0)
62
- rspec-activemodel-mocks (1.2.0)
97
+ rspec-activemodel-mocks (1.3.0)
63
98
  activemodel (>= 3.0)
64
99
  activesupport (>= 3.0)
65
100
  rspec-mocks (>= 2.99, < 4.0)
66
- rspec-core (3.13.1)
101
+ rspec-core (3.13.6)
67
102
  rspec-support (~> 3.13.0)
68
- rspec-expectations (3.13.3)
103
+ rspec-expectations (3.13.5)
69
104
  diff-lcs (>= 1.2.0, < 2.0)
70
105
  rspec-support (~> 3.13.0)
71
- rspec-its (1.3.0)
72
- rspec-core (>= 3.0.0)
73
- rspec-expectations (>= 3.0.0)
74
- rspec-mocks (3.13.1)
106
+ rspec-its (2.0.0)
107
+ rspec-core (>= 3.13.0)
108
+ rspec-expectations (>= 3.13.0)
109
+ rspec-mocks (3.13.8)
75
110
  diff-lcs (>= 1.2.0, < 2.0)
76
111
  rspec-support (~> 3.13.0)
77
- rspec-support (3.13.1)
112
+ rspec-support (3.13.7)
78
113
  rubocop (1.30.1)
79
114
  parallel (~> 1.10)
80
115
  parser (>= 3.1.0.0)
@@ -84,39 +119,46 @@ GEM
84
119
  rubocop-ast (>= 1.18.0, < 2.0)
85
120
  ruby-progressbar (~> 1.7)
86
121
  unicode-display_width (>= 1.4.0, < 3.0)
87
- rubocop-ast (1.30.0)
88
- parser (>= 3.2.1.0)
122
+ rubocop-ast (1.50.0)
123
+ parser (>= 3.3.7.2)
124
+ prism (~> 1.7)
89
125
  rubocop-performance (1.19.1)
90
126
  rubocop (>= 1.7.0, < 2.0)
91
127
  rubocop-ast (>= 0.4.0)
92
128
  ruby-progressbar (1.13.0)
129
+ securerandom (0.4.1)
93
130
  simplecov (0.16.1)
94
131
  docile (~> 1.1)
95
132
  json (>= 1.8, < 3)
96
133
  simplecov-html (~> 0.10.0)
97
134
  simplecov-html (0.10.2)
98
- sqlite3 (1.7.0)
135
+ sqlite3 (2.9.6)
99
136
  mini_portile2 (~> 2.8.0)
100
- sqlite3 (1.7.0-x86_64-darwin)
101
- sqlite3 (1.7.0-x86_64-linux)
137
+ sqlite3 (2.9.6-x86_64-linux-gnu)
102
138
  sync (0.5.0)
103
- term-ansicolor (1.7.1)
104
- tins (~> 1.0)
105
- thor (1.3.0)
106
- tins (1.32.1)
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
107
148
  sync
149
+ tsort (0.2.0)
108
150
  tzinfo (2.0.6)
109
151
  concurrent-ruby (~> 1.0)
110
- unicode-display_width (2.5.0)
152
+ unicode-display_width (2.6.0)
153
+ uri (1.1.1)
111
154
 
112
155
  PLATFORMS
113
156
  ruby
114
- x86_64-darwin-23
115
157
  x86_64-linux
116
158
 
117
159
  DEPENDENCIES
118
- activerecord (= 7.0.8)
119
- activesupport (= 7.0.8)
160
+ activerecord (= 8.1.3.1)
161
+ activesupport (= 8.1.3.1)
120
162
  appraisal (~> 1.0.0)
121
163
  base64
122
164
  benchmark
@@ -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 => "../"