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
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "coveralls", :require => false
6
- gem "rubocop", :require => false
7
- gem "activesupport", "4.0.13"
8
- gem "activerecord", "4.0.13"
9
-
10
- gemspec :path => "../"
@@ -1,107 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- comma (4.0.1)
5
- activesupport (>= 4.0.0, < 5.1)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.0.13)
11
- activesupport (= 4.0.13)
12
- builder (~> 3.1.0)
13
- activerecord (4.0.13)
14
- activemodel (= 4.0.13)
15
- activerecord-deprecated_finders (~> 1.0.2)
16
- activesupport (= 4.0.13)
17
- arel (~> 4.0.0)
18
- activerecord-deprecated_finders (1.0.4)
19
- activesupport (4.0.13)
20
- i18n (~> 0.6, >= 0.6.9)
21
- minitest (~> 4.2)
22
- multi_json (~> 1.3)
23
- thread_safe (~> 0.1)
24
- tzinfo (~> 0.3.37)
25
- appraisal (1.0.3)
26
- bundler
27
- rake
28
- thor (>= 0.14.0)
29
- arel (4.0.2)
30
- ast (2.3.0)
31
- builder (3.1.4)
32
- coveralls (0.8.14)
33
- json (>= 1.8, < 3)
34
- simplecov (~> 0.12.0)
35
- term-ansicolor (~> 1.3)
36
- thor (~> 0.19.1)
37
- tins (~> 1.6.0)
38
- diff-lcs (1.2.5)
39
- docile (1.1.5)
40
- i18n (0.7.0)
41
- json (2.0.1)
42
- minitest (4.7.5)
43
- multi_json (1.12.1)
44
- parser (2.3.1.4)
45
- ast (~> 2.2)
46
- powerpack (0.1.1)
47
- rainbow (2.1.0)
48
- rake (10.5.0)
49
- rspec (3.5.0)
50
- rspec-core (~> 3.5.0)
51
- rspec-expectations (~> 3.5.0)
52
- rspec-mocks (~> 3.5.0)
53
- rspec-activemodel-mocks (1.0.3)
54
- activemodel (>= 3.0)
55
- activesupport (>= 3.0)
56
- rspec-mocks (>= 2.99, < 4.0)
57
- rspec-core (3.5.2)
58
- rspec-support (~> 3.5.0)
59
- rspec-expectations (3.5.0)
60
- diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.5.0)
62
- rspec-its (1.2.0)
63
- rspec-core (>= 3.0.0)
64
- rspec-expectations (>= 3.0.0)
65
- rspec-mocks (3.5.0)
66
- diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.5.0)
68
- rspec-support (3.5.0)
69
- rubocop (0.43.0)
70
- parser (>= 2.3.1.1, < 3.0)
71
- powerpack (~> 0.1)
72
- rainbow (>= 1.99.1, < 3.0)
73
- ruby-progressbar (~> 1.7)
74
- unicode-display_width (~> 1.0, >= 1.0.1)
75
- ruby-progressbar (1.8.1)
76
- simplecov (0.12.0)
77
- docile (~> 1.1.0)
78
- json (>= 1.8, < 3)
79
- simplecov-html (~> 0.10.0)
80
- simplecov-html (0.10.0)
81
- sqlite3 (1.3.11)
82
- term-ansicolor (1.3.2)
83
- tins (~> 1.0)
84
- thor (0.19.1)
85
- thread_safe (0.3.5)
86
- tins (1.6.0)
87
- tzinfo (0.3.51)
88
- unicode-display_width (1.1.1)
89
-
90
- PLATFORMS
91
- ruby
92
-
93
- DEPENDENCIES
94
- activerecord (= 4.0.13)
95
- activesupport (= 4.0.13)
96
- appraisal (~> 1.0.0)
97
- comma!
98
- coveralls
99
- rake (~> 10.5.0)
100
- rspec (~> 3.5.0)
101
- rspec-activemodel-mocks
102
- rspec-its
103
- rubocop
104
- sqlite3 (~> 1.3.11)
105
-
106
- BUNDLED WITH
107
- 1.13.2
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "coveralls", :require => false
6
- gem "rubocop", :require => false
7
- gem "activesupport", "4.1.16"
8
- gem "activerecord", "4.1.16"
9
-
10
- gemspec :path => "../"
@@ -1,106 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.1.16)
11
- activesupport (= 4.1.16)
12
- builder (~> 3.1)
13
- activerecord (4.1.16)
14
- activemodel (= 4.1.16)
15
- activesupport (= 4.1.16)
16
- arel (~> 5.0.0)
17
- activesupport (4.1.16)
18
- i18n (~> 0.6, >= 0.6.9)
19
- json (~> 1.7, >= 1.7.7)
20
- minitest (~> 5.1)
21
- thread_safe (~> 0.1)
22
- tzinfo (~> 1.1)
23
- appraisal (1.0.3)
24
- bundler
25
- rake
26
- thor (>= 0.14.0)
27
- arel (5.0.1.20140414130214)
28
- ast (2.3.0)
29
- builder (3.2.2)
30
- coveralls (0.8.15)
31
- json (>= 1.8, < 3)
32
- simplecov (~> 0.12.0)
33
- term-ansicolor (~> 1.3)
34
- thor (~> 0.19.1)
35
- tins (>= 1.6.0, < 2)
36
- diff-lcs (1.2.5)
37
- docile (1.1.5)
38
- i18n (0.7.0)
39
- json (1.8.3)
40
- minitest (5.9.0)
41
- parser (2.4.0.0)
42
- ast (~> 2.2)
43
- powerpack (0.1.1)
44
- rainbow (2.2.2)
45
- rake
46
- rake (10.5.0)
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.0.3)
52
- activemodel (>= 3.0)
53
- activesupport (>= 3.0)
54
- rspec-mocks (>= 2.99, < 4.0)
55
- rspec-core (3.5.2)
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.2.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.48.1)
68
- parser (>= 2.3.3.1, < 3.0)
69
- powerpack (~> 0.1)
70
- rainbow (>= 1.99.1, < 3.0)
71
- ruby-progressbar (~> 1.7)
72
- unicode-display_width (~> 1.0, >= 1.0.1)
73
- ruby-progressbar (1.8.1)
74
- simplecov (0.12.0)
75
- docile (~> 1.1.0)
76
- json (>= 1.8, < 3)
77
- simplecov-html (~> 0.10.0)
78
- simplecov-html (0.10.0)
79
- sqlite3 (1.3.11)
80
- term-ansicolor (1.3.2)
81
- tins (~> 1.0)
82
- thor (0.19.1)
83
- thread_safe (0.3.5)
84
- tins (1.12.0)
85
- tzinfo (1.2.2)
86
- thread_safe (~> 0.1)
87
- unicode-display_width (1.2.1)
88
-
89
- PLATFORMS
90
- ruby
91
-
92
- DEPENDENCIES
93
- activerecord (= 4.1.16)
94
- activesupport (= 4.1.16)
95
- appraisal (~> 1.0.0)
96
- comma!
97
- coveralls
98
- rake (~> 10.5.0)
99
- rspec (~> 3.5.0)
100
- rspec-activemodel-mocks
101
- rspec-its
102
- rubocop
103
- sqlite3 (~> 1.3.11)
104
-
105
- BUNDLED WITH
106
- 1.14.6
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "coveralls", :require => false
6
- gem "rubocop", :require => false
7
- gem "activesupport", "4.2.8"
8
- gem "activerecord", "4.2.8"
9
-
10
- gemspec :path => "../"
@@ -1,105 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (4.2.8)
11
- activesupport (= 4.2.8)
12
- builder (~> 3.1)
13
- activerecord (4.2.8)
14
- activemodel (= 4.2.8)
15
- activesupport (= 4.2.8)
16
- arel (~> 6.0)
17
- activesupport (4.2.8)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- thread_safe (~> 0.3, >= 0.3.4)
21
- tzinfo (~> 1.1)
22
- appraisal (1.0.3)
23
- bundler
24
- rake
25
- thor (>= 0.14.0)
26
- arel (6.0.4)
27
- ast (2.3.0)
28
- builder (3.2.3)
29
- coveralls (0.8.21)
30
- json (>= 1.8, < 3)
31
- simplecov (~> 0.14.1)
32
- term-ansicolor (~> 1.3)
33
- thor (~> 0.19.4)
34
- tins (~> 1.6)
35
- diff-lcs (1.3)
36
- docile (1.1.5)
37
- i18n (0.8.1)
38
- json (2.1.0)
39
- minitest (5.10.1)
40
- parser (2.4.0.0)
41
- ast (~> 2.2)
42
- powerpack (0.1.1)
43
- rainbow (2.2.2)
44
- rake
45
- rake (10.5.0)
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.0.3)
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.2.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.48.1)
67
- parser (>= 2.3.3.1, < 3.0)
68
- powerpack (~> 0.1)
69
- rainbow (>= 1.99.1, < 3.0)
70
- ruby-progressbar (~> 1.7)
71
- unicode-display_width (~> 1.0, >= 1.0.1)
72
- ruby-progressbar (1.8.1)
73
- simplecov (0.14.1)
74
- docile (~> 1.1.0)
75
- json (>= 1.8, < 3)
76
- simplecov-html (~> 0.10.0)
77
- simplecov-html (0.10.0)
78
- sqlite3 (1.3.13)
79
- term-ansicolor (1.6.0)
80
- tins (~> 1.0)
81
- thor (0.19.4)
82
- thread_safe (0.3.6)
83
- tins (1.13.2)
84
- tzinfo (1.2.3)
85
- thread_safe (~> 0.1)
86
- unicode-display_width (1.2.1)
87
-
88
- PLATFORMS
89
- ruby
90
-
91
- DEPENDENCIES
92
- activerecord (= 4.2.8)
93
- activesupport (= 4.2.8)
94
- appraisal (~> 1.0.0)
95
- comma!
96
- coveralls
97
- rake (~> 10.5.0)
98
- rspec (~> 3.5.0)
99
- rspec-activemodel-mocks
100
- rspec-its
101
- rubocop
102
- sqlite3 (~> 1.3.11)
103
-
104
- BUNDLED WITH
105
- 1.14.6
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "coveralls", :require => false
6
- gem "rubocop", :require => false
7
- gem "activesupport", "5.0.1"
8
- gem "activerecord", "5.0.1"
9
-
10
- gemspec :path => "../"
@@ -1,104 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- comma (4.1.0)
5
- activesupport (>= 4.0.0, < 5.2)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- activemodel (5.0.1)
11
- activesupport (= 5.0.1)
12
- activerecord (5.0.1)
13
- activemodel (= 5.0.1)
14
- activesupport (= 5.0.1)
15
- arel (~> 7.0)
16
- activesupport (5.0.1)
17
- concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (~> 0.7)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- appraisal (1.0.3)
22
- bundler
23
- rake
24
- thor (>= 0.14.0)
25
- arel (7.1.4)
26
- ast (2.3.0)
27
- concurrent-ruby (1.0.5)
28
- coveralls (0.8.21)
29
- json (>= 1.8, < 3)
30
- simplecov (~> 0.14.1)
31
- term-ansicolor (~> 1.3)
32
- thor (~> 0.19.4)
33
- tins (~> 1.6)
34
- diff-lcs (1.3)
35
- docile (1.1.5)
36
- i18n (0.8.1)
37
- json (2.1.0)
38
- minitest (5.10.1)
39
- parser (2.4.0.0)
40
- ast (~> 2.2)
41
- powerpack (0.1.1)
42
- rainbow (2.2.2)
43
- rake
44
- rake (10.5.0)
45
- rspec (3.5.0)
46
- rspec-core (~> 3.5.0)
47
- rspec-expectations (~> 3.5.0)
48
- rspec-mocks (~> 3.5.0)
49
- rspec-activemodel-mocks (1.0.3)
50
- activemodel (>= 3.0)
51
- activesupport (>= 3.0)
52
- rspec-mocks (>= 2.99, < 4.0)
53
- rspec-core (3.5.4)
54
- rspec-support (~> 3.5.0)
55
- rspec-expectations (3.5.0)
56
- diff-lcs (>= 1.2.0, < 2.0)
57
- rspec-support (~> 3.5.0)
58
- rspec-its (1.2.0)
59
- rspec-core (>= 3.0.0)
60
- rspec-expectations (>= 3.0.0)
61
- rspec-mocks (3.5.0)
62
- diff-lcs (>= 1.2.0, < 2.0)
63
- rspec-support (~> 3.5.0)
64
- rspec-support (3.5.0)
65
- rubocop (0.48.1)
66
- parser (>= 2.3.3.1, < 3.0)
67
- powerpack (~> 0.1)
68
- rainbow (>= 1.99.1, < 3.0)
69
- ruby-progressbar (~> 1.7)
70
- unicode-display_width (~> 1.0, >= 1.0.1)
71
- ruby-progressbar (1.8.1)
72
- simplecov (0.14.1)
73
- docile (~> 1.1.0)
74
- json (>= 1.8, < 3)
75
- simplecov-html (~> 0.10.0)
76
- simplecov-html (0.10.0)
77
- sqlite3 (1.3.13)
78
- term-ansicolor (1.6.0)
79
- tins (~> 1.0)
80
- thor (0.19.4)
81
- thread_safe (0.3.6)
82
- tins (1.13.2)
83
- tzinfo (1.2.3)
84
- thread_safe (~> 0.1)
85
- unicode-display_width (1.2.1)
86
-
87
- PLATFORMS
88
- ruby
89
-
90
- DEPENDENCIES
91
- activerecord (= 5.0.1)
92
- activesupport (= 5.0.1)
93
- appraisal (~> 1.0.0)
94
- comma!
95
- coveralls
96
- rake (~> 10.5.0)
97
- rspec (~> 3.5.0)
98
- rspec-activemodel-mocks
99
- rspec-its
100
- rubocop
101
- sqlite3 (~> 1.3.11)
102
-
103
- BUNDLED WITH
104
- 1.14.6