comma 4.1.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +12 -1
  3. data/.rubocop_todo.yml +3 -364
  4. data/.travis.yml +20 -38
  5. data/Appraisals +20 -1
  6. data/Gemfile +5 -1
  7. data/Gemfile.lock +54 -36
  8. data/README.md +59 -0
  9. data/Rakefile +2 -0
  10. data/comma.gemspec +12 -15
  11. data/gemfiles/active5.0.7.2.gemfile +12 -0
  12. data/gemfiles/active5.0.7.2.gemfile.lock +113 -0
  13. data/gemfiles/active5.1.7.gemfile +12 -0
  14. data/gemfiles/active5.1.7.gemfile.lock +113 -0
  15. data/gemfiles/active5.2.4.3.gemfile +12 -0
  16. data/gemfiles/active5.2.4.3.gemfile.lock +113 -0
  17. data/gemfiles/active6.0.3.1.gemfile +12 -0
  18. data/gemfiles/active6.0.3.1.gemfile.lock +113 -0
  19. data/gemfiles/{rails4.2.8.gemfile → rails5.0.7.2.gemfile} +5 -2
  20. data/gemfiles/rails5.0.7.2.gemfile.lock +204 -0
  21. data/gemfiles/{rails4.1.16.gemfile → rails5.1.7.gemfile} +5 -2
  22. data/gemfiles/rails5.1.7.gemfile.lock +204 -0
  23. data/gemfiles/{rails5.0.1.gemfile → rails5.2.4.3.gemfile} +5 -2
  24. data/gemfiles/rails5.2.4.3.gemfile.lock +212 -0
  25. data/gemfiles/{rails4.0.13.gemfile → rails6.0.3.1.gemfile} +4 -2
  26. data/gemfiles/rails6.0.3.1.gemfile.lock +227 -0
  27. data/init.rb +2 -0
  28. data/lib/comma.rb +26 -36
  29. data/lib/comma/array.rb +2 -0
  30. data/lib/comma/data_extractor.rb +7 -9
  31. data/lib/comma/data_mapper_collection.rb +8 -4
  32. data/lib/comma/extractor.rb +2 -6
  33. data/lib/comma/generator.rb +12 -13
  34. data/lib/comma/header_extractor.rb +19 -15
  35. data/lib/comma/mongoid.rb +10 -7
  36. data/lib/comma/object.rb +5 -2
  37. data/lib/comma/relation.rb +16 -10
  38. data/lib/comma/version.rb +3 -1
  39. data/spec/comma/comma_spec.rb +71 -50
  40. data/spec/comma/data_extractor_spec.rb +13 -18
  41. data/spec/comma/header_extractor_spec.rb +8 -15
  42. data/spec/comma/rails/active_record_spec.rb +34 -34
  43. data/spec/comma/rails/data_mapper_collection_spec.rb +4 -4
  44. data/spec/comma/rails/mongoid_spec.rb +8 -8
  45. data/spec/controllers/users_controller_spec.rb +83 -70
  46. data/spec/non_rails_app/ruby_classes.rb +13 -6
  47. data/spec/rails_app/active_record/config.rb +2 -2
  48. data/spec/rails_app/active_record/models.rb +3 -3
  49. data/spec/rails_app/data_mapper/config.rb +1 -1
  50. data/spec/rails_app/mongoid/config.rb +3 -3
  51. data/spec/rails_app/rails_app.rb +13 -13
  52. data/spec/rails_app/tmp/.gitkeep +0 -0
  53. data/spec/spec_helper.rb +21 -5
  54. metadata +29 -46
  55. data/README.markdown +0 -353
  56. data/gemfiles/active4.0.13.gemfile +0 -10
  57. data/gemfiles/active4.0.13.gemfile.lock +0 -107
  58. data/gemfiles/active4.1.16.gemfile +0 -10
  59. data/gemfiles/active4.1.16.gemfile.lock +0 -106
  60. data/gemfiles/active4.2.8.gemfile +0 -10
  61. data/gemfiles/active4.2.8.gemfile.lock +0 -105
  62. data/gemfiles/active5.0.1.gemfile +0 -10
  63. data/gemfiles/active5.0.1.gemfile.lock +0 -104
  64. data/gemfiles/active5.1.0.gemfile +0 -10
  65. data/gemfiles/active5.1.0.gemfile.lock +0 -104
  66. data/gemfiles/rails4.0.13.gemfile.lock +0 -158
  67. data/gemfiles/rails4.1.16.gemfile.lock +0 -163
  68. data/gemfiles/rails4.2.8.gemfile.lock +0 -187
  69. data/gemfiles/rails5.0.1.gemfile.lock +0 -194
  70. data/gemfiles/rails5.1.0.gemfile +0 -11
  71. data/gemfiles/rails5.1.0.gemfile.lock +0 -194
@@ -0,0 +1,12 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "coveralls", :require => false
6
+ gem "rubocop", "~> 0.67.2", :require => false
7
+ gem "rubocop-performance", :require => false
8
+ gem "sqlite3"
9
+ gem "activesupport", "5.2.4.3"
10
+ gem "activerecord", "5.2.4.3"
11
+
12
+ gemspec :path => "../"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (4.4.0)
5
+ activesupport (>= 4.2.0, < 6.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (5.2.4.3)
11
+ activesupport (= 5.2.4.3)
12
+ activerecord (5.2.4.3)
13
+ activemodel (= 5.2.4.3)
14
+ activesupport (= 5.2.4.3)
15
+ arel (>= 9.0)
16
+ activesupport (5.2.4.3)
17
+ concurrent-ruby (~> 1.0, >= 1.0.2)
18
+ i18n (>= 0.7, < 2)
19
+ minitest (~> 5.1)
20
+ tzinfo (~> 1.1)
21
+ appraisal (1.0.3)
22
+ bundler
23
+ rake
24
+ thor (>= 0.14.0)
25
+ arel (9.0.0)
26
+ ast (2.4.1)
27
+ concurrent-ruby (1.1.6)
28
+ coveralls (0.8.23)
29
+ json (>= 1.8, < 3)
30
+ simplecov (~> 0.16.1)
31
+ term-ansicolor (~> 1.3)
32
+ thor (>= 0.19.4, < 2.0)
33
+ tins (~> 1.6)
34
+ diff-lcs (1.3)
35
+ docile (1.3.2)
36
+ i18n (1.8.3)
37
+ concurrent-ruby (~> 1.0)
38
+ jaro_winkler (1.5.4)
39
+ json (2.3.0)
40
+ minitest (5.14.1)
41
+ parallel (1.19.1)
42
+ parser (2.7.1.3)
43
+ ast (~> 2.4.0)
44
+ psych (3.1.0)
45
+ rainbow (3.0.0)
46
+ rake (13.0.1)
47
+ rspec (3.5.0)
48
+ rspec-core (~> 3.5.0)
49
+ rspec-expectations (~> 3.5.0)
50
+ rspec-mocks (~> 3.5.0)
51
+ rspec-activemodel-mocks (1.1.0)
52
+ activemodel (>= 3.0)
53
+ activesupport (>= 3.0)
54
+ rspec-mocks (>= 2.99, < 4.0)
55
+ rspec-core (3.5.4)
56
+ rspec-support (~> 3.5.0)
57
+ rspec-expectations (3.5.0)
58
+ diff-lcs (>= 1.2.0, < 2.0)
59
+ rspec-support (~> 3.5.0)
60
+ rspec-its (1.3.0)
61
+ rspec-core (>= 3.0.0)
62
+ rspec-expectations (>= 3.0.0)
63
+ rspec-mocks (3.5.0)
64
+ diff-lcs (>= 1.2.0, < 2.0)
65
+ rspec-support (~> 3.5.0)
66
+ rspec-support (3.5.0)
67
+ rubocop (0.67.2)
68
+ jaro_winkler (~> 1.5.1)
69
+ parallel (~> 1.10)
70
+ parser (>= 2.5, != 2.5.1.1)
71
+ psych (>= 3.1.0)
72
+ rainbow (>= 2.2.2, < 4.0)
73
+ ruby-progressbar (~> 1.7)
74
+ unicode-display_width (>= 1.4.0, < 1.6)
75
+ rubocop-performance (1.1.0)
76
+ rubocop (>= 0.67.0)
77
+ ruby-progressbar (1.10.1)
78
+ simplecov (0.16.1)
79
+ docile (~> 1.1)
80
+ json (>= 1.8, < 3)
81
+ simplecov-html (~> 0.10.0)
82
+ simplecov-html (0.10.2)
83
+ sqlite3 (1.3.13)
84
+ sync (0.5.0)
85
+ term-ansicolor (1.7.1)
86
+ tins (~> 1.0)
87
+ thor (1.0.1)
88
+ thread_safe (0.3.6)
89
+ tins (1.25.0)
90
+ sync
91
+ tzinfo (1.2.7)
92
+ thread_safe (~> 0.1)
93
+ unicode-display_width (1.5.0)
94
+
95
+ PLATFORMS
96
+ ruby
97
+
98
+ DEPENDENCIES
99
+ activerecord (= 5.2.4.3)
100
+ activesupport (= 5.2.4.3)
101
+ appraisal (~> 1.0.0)
102
+ comma!
103
+ coveralls
104
+ rake (~> 13.0.1)
105
+ rspec (~> 3.5.0)
106
+ rspec-activemodel-mocks
107
+ rspec-its
108
+ rubocop (~> 0.67.2)
109
+ rubocop-performance
110
+ sqlite3
111
+
112
+ BUNDLED WITH
113
+ 1.17.3
@@ -0,0 +1,12 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "coveralls", :require => false
6
+ gem "rubocop", "~> 0.67.2", :require => false
7
+ gem "rubocop-performance", :require => false
8
+ gem "sqlite3"
9
+ gem "activesupport", "6.0.3.1"
10
+ gem "activerecord", "6.0.3.1"
11
+
12
+ gemspec :path => "../"
@@ -0,0 +1,113 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (4.4.0)
5
+ activesupport (>= 4.2.0, < 6.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (6.0.3.1)
11
+ activesupport (= 6.0.3.1)
12
+ activerecord (6.0.3.1)
13
+ activemodel (= 6.0.3.1)
14
+ activesupport (= 6.0.3.1)
15
+ activesupport (6.0.3.1)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 0.7, < 2)
18
+ minitest (~> 5.1)
19
+ tzinfo (~> 1.1)
20
+ zeitwerk (~> 2.2, >= 2.2.2)
21
+ appraisal (1.0.3)
22
+ bundler
23
+ rake
24
+ thor (>= 0.14.0)
25
+ ast (2.4.1)
26
+ concurrent-ruby (1.1.6)
27
+ coveralls (0.8.23)
28
+ json (>= 1.8, < 3)
29
+ simplecov (~> 0.16.1)
30
+ term-ansicolor (~> 1.3)
31
+ thor (>= 0.19.4, < 2.0)
32
+ tins (~> 1.6)
33
+ diff-lcs (1.3)
34
+ docile (1.3.2)
35
+ i18n (1.8.3)
36
+ concurrent-ruby (~> 1.0)
37
+ jaro_winkler (1.5.4)
38
+ json (2.3.0)
39
+ minitest (5.14.1)
40
+ parallel (1.19.1)
41
+ parser (2.7.1.3)
42
+ ast (~> 2.4.0)
43
+ psych (3.1.0)
44
+ rainbow (3.0.0)
45
+ rake (13.0.1)
46
+ rspec (3.5.0)
47
+ rspec-core (~> 3.5.0)
48
+ rspec-expectations (~> 3.5.0)
49
+ rspec-mocks (~> 3.5.0)
50
+ rspec-activemodel-mocks (1.1.0)
51
+ activemodel (>= 3.0)
52
+ activesupport (>= 3.0)
53
+ rspec-mocks (>= 2.99, < 4.0)
54
+ rspec-core (3.5.4)
55
+ rspec-support (~> 3.5.0)
56
+ rspec-expectations (3.5.0)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.5.0)
59
+ rspec-its (1.3.0)
60
+ rspec-core (>= 3.0.0)
61
+ rspec-expectations (>= 3.0.0)
62
+ rspec-mocks (3.5.0)
63
+ diff-lcs (>= 1.2.0, < 2.0)
64
+ rspec-support (~> 3.5.0)
65
+ rspec-support (3.5.0)
66
+ rubocop (0.67.2)
67
+ jaro_winkler (~> 1.5.1)
68
+ parallel (~> 1.10)
69
+ parser (>= 2.5, != 2.5.1.1)
70
+ psych (>= 3.1.0)
71
+ rainbow (>= 2.2.2, < 4.0)
72
+ ruby-progressbar (~> 1.7)
73
+ unicode-display_width (>= 1.4.0, < 1.6)
74
+ rubocop-performance (1.1.0)
75
+ rubocop (>= 0.67.0)
76
+ ruby-progressbar (1.10.1)
77
+ simplecov (0.16.1)
78
+ docile (~> 1.1)
79
+ json (>= 1.8, < 3)
80
+ simplecov-html (~> 0.10.0)
81
+ simplecov-html (0.10.2)
82
+ sqlite3 (1.4.2)
83
+ sync (0.5.0)
84
+ term-ansicolor (1.7.1)
85
+ tins (~> 1.0)
86
+ thor (1.0.1)
87
+ thread_safe (0.3.6)
88
+ tins (1.25.0)
89
+ sync
90
+ tzinfo (1.2.7)
91
+ thread_safe (~> 0.1)
92
+ unicode-display_width (1.5.0)
93
+ zeitwerk (2.3.0)
94
+
95
+ PLATFORMS
96
+ ruby
97
+
98
+ DEPENDENCIES
99
+ activerecord (= 6.0.3.1)
100
+ activesupport (= 6.0.3.1)
101
+ appraisal (~> 1.0.0)
102
+ comma!
103
+ coveralls
104
+ rake (~> 13.0.1)
105
+ rspec (~> 3.5.0)
106
+ rspec-activemodel-mocks
107
+ rspec-its
108
+ rubocop (~> 0.67.2)
109
+ rubocop-performance
110
+ sqlite3
111
+
112
+ BUNDLED WITH
113
+ 1.17.3
@@ -3,9 +3,12 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "coveralls", :require => false
6
- gem "rubocop", :require => false
7
- gem "rails", "4.2.8"
6
+ gem "rubocop", "~> 0.67.2", :require => false
7
+ gem "rubocop-performance", :require => false
8
+ gem "sqlite3", "~> 1.3.11"
9
+ gem "rails", "5.0.7.2"
8
10
  gem "rspec-rails"
11
+ gem "sprockets", "< 4"
9
12
  gem "test-unit"
10
13
 
11
14
  gemspec :path => "../"
@@ -0,0 +1,204 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ comma (4.4.0)
5
+ activesupport (>= 4.2.0, < 6.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (5.0.7.2)
11
+ actionpack (= 5.0.7.2)
12
+ nio4r (>= 1.2, < 3.0)
13
+ websocket-driver (~> 0.6.1)
14
+ actionmailer (5.0.7.2)
15
+ actionpack (= 5.0.7.2)
16
+ actionview (= 5.0.7.2)
17
+ activejob (= 5.0.7.2)
18
+ mail (~> 2.5, >= 2.5.4)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.0.7.2)
21
+ actionview (= 5.0.7.2)
22
+ activesupport (= 5.0.7.2)
23
+ rack (~> 2.0)
24
+ rack-test (~> 0.6.3)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (5.0.7.2)
28
+ activesupport (= 5.0.7.2)
29
+ builder (~> 3.1)
30
+ erubis (~> 2.7.0)
31
+ rails-dom-testing (~> 2.0)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.0.7.2)
34
+ activesupport (= 5.0.7.2)
35
+ globalid (>= 0.3.6)
36
+ activemodel (5.0.7.2)
37
+ activesupport (= 5.0.7.2)
38
+ activerecord (5.0.7.2)
39
+ activemodel (= 5.0.7.2)
40
+ activesupport (= 5.0.7.2)
41
+ arel (~> 7.0)
42
+ activesupport (5.0.7.2)
43
+ concurrent-ruby (~> 1.0, >= 1.0.2)
44
+ i18n (>= 0.7, < 2)
45
+ minitest (~> 5.1)
46
+ tzinfo (~> 1.1)
47
+ appraisal (1.0.3)
48
+ bundler
49
+ rake
50
+ thor (>= 0.14.0)
51
+ arel (7.1.4)
52
+ ast (2.4.1)
53
+ builder (3.2.4)
54
+ concurrent-ruby (1.1.6)
55
+ coveralls (0.8.23)
56
+ json (>= 1.8, < 3)
57
+ simplecov (~> 0.16.1)
58
+ term-ansicolor (~> 1.3)
59
+ thor (>= 0.19.4, < 2.0)
60
+ tins (~> 1.6)
61
+ crass (1.0.6)
62
+ diff-lcs (1.3)
63
+ docile (1.3.2)
64
+ erubis (2.7.0)
65
+ globalid (0.4.2)
66
+ activesupport (>= 4.2.0)
67
+ i18n (1.8.3)
68
+ concurrent-ruby (~> 1.0)
69
+ jaro_winkler (1.5.4)
70
+ json (2.3.0)
71
+ loofah (2.5.0)
72
+ crass (~> 1.0.2)
73
+ nokogiri (>= 1.5.9)
74
+ mail (2.7.1)
75
+ mini_mime (>= 0.1.1)
76
+ method_source (1.0.0)
77
+ mini_mime (1.0.2)
78
+ mini_portile2 (2.4.0)
79
+ minitest (5.14.1)
80
+ nio4r (2.5.2)
81
+ nokogiri (1.10.9)
82
+ mini_portile2 (~> 2.4.0)
83
+ parallel (1.19.1)
84
+ parser (2.7.1.3)
85
+ ast (~> 2.4.0)
86
+ power_assert (1.2.0)
87
+ psych (3.1.0)
88
+ rack (2.2.3)
89
+ rack-test (0.6.3)
90
+ rack (>= 1.0)
91
+ rails (5.0.7.2)
92
+ actioncable (= 5.0.7.2)
93
+ actionmailer (= 5.0.7.2)
94
+ actionpack (= 5.0.7.2)
95
+ actionview (= 5.0.7.2)
96
+ activejob (= 5.0.7.2)
97
+ activemodel (= 5.0.7.2)
98
+ activerecord (= 5.0.7.2)
99
+ activesupport (= 5.0.7.2)
100
+ bundler (>= 1.3.0)
101
+ railties (= 5.0.7.2)
102
+ sprockets-rails (>= 2.0.0)
103
+ rails-dom-testing (2.0.3)
104
+ activesupport (>= 4.2.0)
105
+ nokogiri (>= 1.6)
106
+ rails-html-sanitizer (1.3.0)
107
+ loofah (~> 2.3)
108
+ railties (5.0.7.2)
109
+ actionpack (= 5.0.7.2)
110
+ activesupport (= 5.0.7.2)
111
+ method_source
112
+ rake (>= 0.8.7)
113
+ thor (>= 0.18.1, < 2.0)
114
+ rainbow (3.0.0)
115
+ rake (13.0.1)
116
+ rspec (3.5.0)
117
+ rspec-core (~> 3.5.0)
118
+ rspec-expectations (~> 3.5.0)
119
+ rspec-mocks (~> 3.5.0)
120
+ rspec-activemodel-mocks (1.1.0)
121
+ activemodel (>= 3.0)
122
+ activesupport (>= 3.0)
123
+ rspec-mocks (>= 2.99, < 4.0)
124
+ rspec-core (3.5.4)
125
+ rspec-support (~> 3.5.0)
126
+ rspec-expectations (3.5.0)
127
+ diff-lcs (>= 1.2.0, < 2.0)
128
+ rspec-support (~> 3.5.0)
129
+ rspec-its (1.3.0)
130
+ rspec-core (>= 3.0.0)
131
+ rspec-expectations (>= 3.0.0)
132
+ rspec-mocks (3.5.0)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.5.0)
135
+ rspec-rails (3.5.2)
136
+ actionpack (>= 3.0)
137
+ activesupport (>= 3.0)
138
+ railties (>= 3.0)
139
+ rspec-core (~> 3.5.0)
140
+ rspec-expectations (~> 3.5.0)
141
+ rspec-mocks (~> 3.5.0)
142
+ rspec-support (~> 3.5.0)
143
+ rspec-support (3.5.0)
144
+ rubocop (0.67.2)
145
+ jaro_winkler (~> 1.5.1)
146
+ parallel (~> 1.10)
147
+ parser (>= 2.5, != 2.5.1.1)
148
+ psych (>= 3.1.0)
149
+ rainbow (>= 2.2.2, < 4.0)
150
+ ruby-progressbar (~> 1.7)
151
+ unicode-display_width (>= 1.4.0, < 1.6)
152
+ rubocop-performance (1.1.0)
153
+ rubocop (>= 0.67.0)
154
+ ruby-progressbar (1.10.1)
155
+ simplecov (0.16.1)
156
+ docile (~> 1.1)
157
+ json (>= 1.8, < 3)
158
+ simplecov-html (~> 0.10.0)
159
+ simplecov-html (0.10.2)
160
+ sprockets (3.7.2)
161
+ concurrent-ruby (~> 1.0)
162
+ rack (> 1, < 3)
163
+ sprockets-rails (3.2.1)
164
+ actionpack (>= 4.0)
165
+ activesupport (>= 4.0)
166
+ sprockets (>= 3.0.0)
167
+ sqlite3 (1.3.13)
168
+ sync (0.5.0)
169
+ term-ansicolor (1.7.1)
170
+ tins (~> 1.0)
171
+ test-unit (3.3.6)
172
+ power_assert
173
+ thor (1.0.1)
174
+ thread_safe (0.3.6)
175
+ tins (1.25.0)
176
+ sync
177
+ tzinfo (1.2.7)
178
+ thread_safe (~> 0.1)
179
+ unicode-display_width (1.5.0)
180
+ websocket-driver (0.6.5)
181
+ websocket-extensions (>= 0.1.0)
182
+ websocket-extensions (0.1.5)
183
+
184
+ PLATFORMS
185
+ ruby
186
+
187
+ DEPENDENCIES
188
+ appraisal (~> 1.0.0)
189
+ comma!
190
+ coveralls
191
+ rails (= 5.0.7.2)
192
+ rake (~> 13.0.1)
193
+ rspec (~> 3.5.0)
194
+ rspec-activemodel-mocks
195
+ rspec-its
196
+ rspec-rails
197
+ rubocop (~> 0.67.2)
198
+ rubocop-performance
199
+ sprockets (< 4)
200
+ sqlite3 (~> 1.3.11)
201
+ test-unit
202
+
203
+ BUNDLED WITH
204
+ 1.17.3