bullet 4.6.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +10 -4
  6. data/Gemfile +4 -5
  7. data/Gemfile.lock +160 -0
  8. data/Gemfile.mongoid +15 -0
  9. data/Gemfile.mongoid-2.4.12 +15 -0
  10. data/Gemfile.mongoid-2.4.12.lock +163 -0
  11. data/Gemfile.mongoid-2.5.2 +15 -0
  12. data/Gemfile.mongoid-2.5.2.lock +163 -0
  13. data/Gemfile.mongoid-2.6.0 +15 -0
  14. data/Gemfile.mongoid-2.6.0.lock +163 -0
  15. data/Gemfile.mongoid-2.7.1 +15 -0
  16. data/Gemfile.mongoid-2.7.1.lock +163 -0
  17. data/Gemfile.mongoid-2.8.1 +15 -0
  18. data/Gemfile.mongoid-2.8.1.lock +166 -0
  19. data/Gemfile.mongoid-3.0.23 +15 -0
  20. data/Gemfile.mongoid-3.0.23.lock +163 -0
  21. data/Gemfile.mongoid-3.1.5 +15 -0
  22. data/Gemfile.mongoid-3.1.5.lock +163 -0
  23. data/Gemfile.mongoid.lock +167 -0
  24. data/Gemfile.rails-3.0.20 +3 -4
  25. data/Gemfile.rails-3.0.20.lock +147 -0
  26. data/Gemfile.rails-3.1.12 +14 -0
  27. data/Gemfile.rails-3.1.12.lock +157 -0
  28. data/Gemfile.rails-3.2.15 +14 -0
  29. data/Gemfile.rails-3.2.15.lock +155 -0
  30. data/Gemfile.rails-4.0.1 +14 -0
  31. data/Gemfile.rails-4.0.1.lock +150 -0
  32. data/README.md +16 -16
  33. data/bullet.gemspec +2 -1
  34. data/lib/bullet.rb +26 -2
  35. data/lib/bullet/dependency.rb +14 -23
  36. data/lib/bullet/mongoid4x.rb +55 -0
  37. data/lib/bullet/notification.rb +2 -0
  38. data/lib/bullet/notification/base.rb +4 -0
  39. data/lib/bullet/rack.rb +24 -3
  40. data/lib/bullet/version.rb +1 -1
  41. data/spec/bullet/detector/unused_eager_loading_spec.rb +1 -1
  42. data/spec/bullet/notification/base_spec.rb +2 -2
  43. data/spec/bullet/rack_spec.rb +9 -9
  44. data/spec/integration/{association_spec.rb → active_record3/association_spec.rb} +1 -1
  45. data/spec/integration/active_record4/association_spec.rb +698 -0
  46. data/spec/integration/mongoid/association_spec.rb +10 -7
  47. data/spec/models/client.rb +1 -1
  48. data/spec/models/comment.rb +2 -2
  49. data/spec/models/document.rb +2 -2
  50. data/spec/models/firm.rb +1 -1
  51. data/spec/models/mongoid/address.rb +2 -0
  52. data/spec/models/mongoid/category.rb +2 -0
  53. data/spec/models/mongoid/comment.rb +2 -0
  54. data/spec/models/mongoid/company.rb +2 -0
  55. data/spec/models/mongoid/entry.rb +2 -0
  56. data/spec/models/mongoid/post.rb +2 -0
  57. data/spec/models/mongoid/user.rb +2 -0
  58. data/spec/models/newspaper.rb +1 -1
  59. data/spec/models/pet.rb +1 -1
  60. data/spec/models/post.rb +3 -5
  61. data/spec/spec_helper.rb +21 -0
  62. data/spec/support/mongo_seed.rb +13 -1
  63. data/test.sh +12 -4
  64. metadata +49 -11
  65. data/.rvmrc +0 -2
  66. data/.rvmrc.example +0 -2
  67. data/Gemfile.rails-3.1.11 +0 -16
  68. data/Gemfile.rails-3.2.12 +0 -16
  69. data/Gemfile.rails-4-beta +0 -14
@@ -0,0 +1,15 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails'
6
+ gem 'sqlite3'
7
+ gem 'mysql2'
8
+ gem 'activerecord-import'
9
+ gem 'mongoid', '3.0.23'
10
+
11
+ gem "rspec"
12
+ gem "guard"
13
+ gem "guard-rspec"
14
+
15
+ gem 'coveralls', require: false
@@ -0,0 +1,163 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bullet (4.7.0)
5
+ activesupport
6
+ uniform_notifier (>= 1.3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.14)
12
+ actionpack (= 3.2.14)
13
+ mail (~> 2.5.4)
14
+ actionpack (3.2.14)
15
+ activemodel (= 3.2.14)
16
+ activesupport (= 3.2.14)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.4)
20
+ rack (~> 1.4.5)
21
+ rack-cache (~> 1.2)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.2.1)
24
+ activemodel (3.2.14)
25
+ activesupport (= 3.2.14)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.14)
28
+ activemodel (= 3.2.14)
29
+ activesupport (= 3.2.14)
30
+ arel (~> 3.0.2)
31
+ tzinfo (~> 0.3.29)
32
+ activerecord-import (0.4.1)
33
+ activerecord (>= 3.0)
34
+ activeresource (3.2.14)
35
+ activemodel (= 3.2.14)
36
+ activesupport (= 3.2.14)
37
+ activesupport (3.2.14)
38
+ i18n (~> 0.6, >= 0.6.4)
39
+ multi_json (~> 1.0)
40
+ arel (3.0.2)
41
+ builder (3.0.4)
42
+ coderay (1.0.9)
43
+ colorize (0.5.8)
44
+ coveralls (0.6.7)
45
+ colorize
46
+ multi_json (~> 1.3)
47
+ rest-client
48
+ simplecov (>= 0.7)
49
+ thor
50
+ diff-lcs (1.2.4)
51
+ erubis (2.7.0)
52
+ ffi (1.9.0)
53
+ formatador (0.2.4)
54
+ guard (1.8.2)
55
+ formatador (>= 0.2.4)
56
+ listen (>= 1.0.0)
57
+ lumberjack (>= 1.0.2)
58
+ pry (>= 0.9.10)
59
+ thor (>= 0.14.6)
60
+ guard-rspec (3.0.2)
61
+ guard (>= 1.8)
62
+ rspec (~> 2.13)
63
+ hike (1.2.3)
64
+ i18n (0.6.5)
65
+ journey (1.0.4)
66
+ json (1.8.0)
67
+ listen (1.3.0)
68
+ rb-fsevent (>= 0.9.3)
69
+ rb-inotify (>= 0.9)
70
+ rb-kqueue (>= 0.2)
71
+ lumberjack (1.0.4)
72
+ mail (2.5.4)
73
+ mime-types (~> 1.16)
74
+ treetop (~> 1.4.8)
75
+ method_source (0.8.2)
76
+ mime-types (1.24)
77
+ mongoid (3.0.23)
78
+ activemodel (~> 3.1)
79
+ moped (~> 1.2)
80
+ origin (~> 1.0)
81
+ tzinfo (~> 0.3.22)
82
+ moped (1.5.1)
83
+ multi_json (1.7.9)
84
+ mysql2 (0.3.13)
85
+ origin (1.1.0)
86
+ polyglot (0.3.3)
87
+ pry (0.9.12.2)
88
+ coderay (~> 1.0.5)
89
+ method_source (~> 0.8)
90
+ slop (~> 3.4)
91
+ rack (1.4.5)
92
+ rack-cache (1.2)
93
+ rack (>= 0.4)
94
+ rack-ssl (1.3.3)
95
+ rack
96
+ rack-test (0.6.2)
97
+ rack (>= 1.0)
98
+ rails (3.2.14)
99
+ actionmailer (= 3.2.14)
100
+ actionpack (= 3.2.14)
101
+ activerecord (= 3.2.14)
102
+ activeresource (= 3.2.14)
103
+ activesupport (= 3.2.14)
104
+ bundler (~> 1.0)
105
+ railties (= 3.2.14)
106
+ railties (3.2.14)
107
+ actionpack (= 3.2.14)
108
+ activesupport (= 3.2.14)
109
+ rack-ssl (~> 1.3.2)
110
+ rake (>= 0.8.7)
111
+ rdoc (~> 3.4)
112
+ thor (>= 0.14.6, < 2.0)
113
+ rake (10.1.0)
114
+ rb-fsevent (0.9.3)
115
+ rb-inotify (0.9.1)
116
+ ffi (>= 0.5.0)
117
+ rb-kqueue (0.2.0)
118
+ ffi (>= 0.5.0)
119
+ rdoc (3.12.2)
120
+ json (~> 1.4)
121
+ rest-client (1.6.7)
122
+ mime-types (>= 1.16)
123
+ rspec (2.14.1)
124
+ rspec-core (~> 2.14.0)
125
+ rspec-expectations (~> 2.14.0)
126
+ rspec-mocks (~> 2.14.0)
127
+ rspec-core (2.14.5)
128
+ rspec-expectations (2.14.2)
129
+ diff-lcs (>= 1.1.3, < 2.0)
130
+ rspec-mocks (2.14.3)
131
+ simplecov (0.7.1)
132
+ multi_json (~> 1.0)
133
+ simplecov-html (~> 0.7.1)
134
+ simplecov-html (0.7.1)
135
+ slop (3.4.6)
136
+ sprockets (2.2.2)
137
+ hike (~> 1.2)
138
+ multi_json (~> 1.0)
139
+ rack (~> 1.0)
140
+ tilt (~> 1.1, != 1.3.0)
141
+ sqlite3 (1.3.8)
142
+ thor (0.18.1)
143
+ tilt (1.4.1)
144
+ treetop (1.4.15)
145
+ polyglot
146
+ polyglot (>= 0.3.1)
147
+ tzinfo (0.3.37)
148
+ uniform_notifier (1.3.0)
149
+
150
+ PLATFORMS
151
+ ruby
152
+
153
+ DEPENDENCIES
154
+ activerecord-import
155
+ bullet!
156
+ coveralls
157
+ guard
158
+ guard-rspec
159
+ mongoid (= 3.0.23)
160
+ mysql2
161
+ rails
162
+ rspec
163
+ sqlite3
@@ -0,0 +1,15 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails'
6
+ gem 'sqlite3'
7
+ gem 'mysql2'
8
+ gem 'activerecord-import'
9
+ gem 'mongoid', '3.1.5'
10
+
11
+ gem "rspec"
12
+ gem "guard"
13
+ gem "guard-rspec"
14
+
15
+ gem 'coveralls', require: false
@@ -0,0 +1,163 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bullet (4.7.0)
5
+ activesupport
6
+ uniform_notifier (>= 1.3.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionmailer (3.2.14)
12
+ actionpack (= 3.2.14)
13
+ mail (~> 2.5.4)
14
+ actionpack (3.2.14)
15
+ activemodel (= 3.2.14)
16
+ activesupport (= 3.2.14)
17
+ builder (~> 3.0.0)
18
+ erubis (~> 2.7.0)
19
+ journey (~> 1.0.4)
20
+ rack (~> 1.4.5)
21
+ rack-cache (~> 1.2)
22
+ rack-test (~> 0.6.1)
23
+ sprockets (~> 2.2.1)
24
+ activemodel (3.2.14)
25
+ activesupport (= 3.2.14)
26
+ builder (~> 3.0.0)
27
+ activerecord (3.2.14)
28
+ activemodel (= 3.2.14)
29
+ activesupport (= 3.2.14)
30
+ arel (~> 3.0.2)
31
+ tzinfo (~> 0.3.29)
32
+ activerecord-import (0.4.1)
33
+ activerecord (>= 3.0)
34
+ activeresource (3.2.14)
35
+ activemodel (= 3.2.14)
36
+ activesupport (= 3.2.14)
37
+ activesupport (3.2.14)
38
+ i18n (~> 0.6, >= 0.6.4)
39
+ multi_json (~> 1.0)
40
+ arel (3.0.2)
41
+ builder (3.0.4)
42
+ coderay (1.0.9)
43
+ colorize (0.5.8)
44
+ coveralls (0.6.7)
45
+ colorize
46
+ multi_json (~> 1.3)
47
+ rest-client
48
+ simplecov (>= 0.7)
49
+ thor
50
+ diff-lcs (1.2.4)
51
+ erubis (2.7.0)
52
+ ffi (1.9.0)
53
+ formatador (0.2.4)
54
+ guard (1.8.2)
55
+ formatador (>= 0.2.4)
56
+ listen (>= 1.0.0)
57
+ lumberjack (>= 1.0.2)
58
+ pry (>= 0.9.10)
59
+ thor (>= 0.14.6)
60
+ guard-rspec (3.0.2)
61
+ guard (>= 1.8)
62
+ rspec (~> 2.13)
63
+ hike (1.2.3)
64
+ i18n (0.6.5)
65
+ journey (1.0.4)
66
+ json (1.8.0)
67
+ listen (1.3.0)
68
+ rb-fsevent (>= 0.9.3)
69
+ rb-inotify (>= 0.9)
70
+ rb-kqueue (>= 0.2)
71
+ lumberjack (1.0.4)
72
+ mail (2.5.4)
73
+ mime-types (~> 1.16)
74
+ treetop (~> 1.4.8)
75
+ method_source (0.8.2)
76
+ mime-types (1.24)
77
+ mongoid (3.1.5)
78
+ activemodel (~> 3.2)
79
+ moped (~> 1.4)
80
+ origin (~> 1.0)
81
+ tzinfo (~> 0.3.29)
82
+ moped (1.5.1)
83
+ multi_json (1.7.9)
84
+ mysql2 (0.3.13)
85
+ origin (1.1.0)
86
+ polyglot (0.3.3)
87
+ pry (0.9.12.2)
88
+ coderay (~> 1.0.5)
89
+ method_source (~> 0.8)
90
+ slop (~> 3.4)
91
+ rack (1.4.5)
92
+ rack-cache (1.2)
93
+ rack (>= 0.4)
94
+ rack-ssl (1.3.3)
95
+ rack
96
+ rack-test (0.6.2)
97
+ rack (>= 1.0)
98
+ rails (3.2.14)
99
+ actionmailer (= 3.2.14)
100
+ actionpack (= 3.2.14)
101
+ activerecord (= 3.2.14)
102
+ activeresource (= 3.2.14)
103
+ activesupport (= 3.2.14)
104
+ bundler (~> 1.0)
105
+ railties (= 3.2.14)
106
+ railties (3.2.14)
107
+ actionpack (= 3.2.14)
108
+ activesupport (= 3.2.14)
109
+ rack-ssl (~> 1.3.2)
110
+ rake (>= 0.8.7)
111
+ rdoc (~> 3.4)
112
+ thor (>= 0.14.6, < 2.0)
113
+ rake (10.1.0)
114
+ rb-fsevent (0.9.3)
115
+ rb-inotify (0.9.1)
116
+ ffi (>= 0.5.0)
117
+ rb-kqueue (0.2.0)
118
+ ffi (>= 0.5.0)
119
+ rdoc (3.12.2)
120
+ json (~> 1.4)
121
+ rest-client (1.6.7)
122
+ mime-types (>= 1.16)
123
+ rspec (2.14.1)
124
+ rspec-core (~> 2.14.0)
125
+ rspec-expectations (~> 2.14.0)
126
+ rspec-mocks (~> 2.14.0)
127
+ rspec-core (2.14.5)
128
+ rspec-expectations (2.14.2)
129
+ diff-lcs (>= 1.1.3, < 2.0)
130
+ rspec-mocks (2.14.3)
131
+ simplecov (0.7.1)
132
+ multi_json (~> 1.0)
133
+ simplecov-html (~> 0.7.1)
134
+ simplecov-html (0.7.1)
135
+ slop (3.4.6)
136
+ sprockets (2.2.2)
137
+ hike (~> 1.2)
138
+ multi_json (~> 1.0)
139
+ rack (~> 1.0)
140
+ tilt (~> 1.1, != 1.3.0)
141
+ sqlite3 (1.3.8)
142
+ thor (0.18.1)
143
+ tilt (1.4.1)
144
+ treetop (1.4.15)
145
+ polyglot
146
+ polyglot (>= 0.3.1)
147
+ tzinfo (0.3.37)
148
+ uniform_notifier (1.3.0)
149
+
150
+ PLATFORMS
151
+ ruby
152
+
153
+ DEPENDENCIES
154
+ activerecord-import
155
+ bullet!
156
+ coveralls
157
+ guard
158
+ guard-rspec
159
+ mongoid (= 3.1.5)
160
+ mysql2
161
+ rails
162
+ rspec
163
+ sqlite3
@@ -0,0 +1,167 @@
1
+ GIT
2
+ remote: git://github.com/mongoid/mongoid.git
3
+ revision: 9b3bc1264032209b7a6c0e82d0ca656f401e476b
4
+ specs:
5
+ mongoid (4.0.0)
6
+ activemodel (~> 4.0.0)
7
+ moped (~> 2.0.beta3)
8
+ origin (~> 1.0)
9
+ tzinfo (~> 0.3.37)
10
+
11
+ PATH
12
+ remote: .
13
+ specs:
14
+ bullet (4.7.0)
15
+ activesupport
16
+ uniform_notifier (>= 1.3.0)
17
+
18
+ GEM
19
+ remote: https://rubygems.org/
20
+ specs:
21
+ actionmailer (4.0.0)
22
+ actionpack (= 4.0.0)
23
+ mail (~> 2.5.3)
24
+ actionpack (4.0.0)
25
+ activesupport (= 4.0.0)
26
+ builder (~> 3.1.0)
27
+ erubis (~> 2.7.0)
28
+ rack (~> 1.5.2)
29
+ rack-test (~> 0.6.2)
30
+ activemodel (4.0.0)
31
+ activesupport (= 4.0.0)
32
+ builder (~> 3.1.0)
33
+ activerecord (4.0.0)
34
+ activemodel (= 4.0.0)
35
+ activerecord-deprecated_finders (~> 1.0.2)
36
+ activesupport (= 4.0.0)
37
+ arel (~> 4.0.0)
38
+ activerecord-deprecated_finders (1.0.3)
39
+ activerecord-import (0.4.1)
40
+ activerecord (>= 3.0)
41
+ activesupport (4.0.0)
42
+ i18n (~> 0.6, >= 0.6.4)
43
+ minitest (~> 4.2)
44
+ multi_json (~> 1.3)
45
+ thread_safe (~> 0.1)
46
+ tzinfo (~> 0.3.37)
47
+ arel (4.0.0)
48
+ atomic (1.1.14)
49
+ bson (2.0.0.rc3)
50
+ builder (3.1.4)
51
+ coderay (1.0.9)
52
+ colorize (0.5.8)
53
+ coveralls (0.6.7)
54
+ colorize
55
+ multi_json (~> 1.3)
56
+ rest-client
57
+ simplecov (>= 0.7)
58
+ thor
59
+ diff-lcs (1.2.4)
60
+ erubis (2.7.0)
61
+ ffi (1.9.0)
62
+ formatador (0.2.4)
63
+ guard (1.8.2)
64
+ formatador (>= 0.2.4)
65
+ listen (>= 1.0.0)
66
+ lumberjack (>= 1.0.2)
67
+ pry (>= 0.9.10)
68
+ thor (>= 0.14.6)
69
+ guard-rspec (3.0.2)
70
+ guard (>= 1.8)
71
+ rspec (~> 2.13)
72
+ hike (1.2.3)
73
+ i18n (0.6.5)
74
+ listen (1.3.1)
75
+ rb-fsevent (>= 0.9.3)
76
+ rb-inotify (>= 0.9)
77
+ rb-kqueue (>= 0.2)
78
+ lumberjack (1.0.4)
79
+ mail (2.5.4)
80
+ mime-types (~> 1.16)
81
+ treetop (~> 1.4.8)
82
+ method_source (0.8.2)
83
+ mime-types (1.25)
84
+ minitest (4.7.5)
85
+ moped (2.0.0.beta3)
86
+ bson (~> 2.0.0.rc3)
87
+ optionable (~> 0.1.1)
88
+ multi_json (1.8.2)
89
+ mysql2 (0.3.13)
90
+ optionable (0.1.1)
91
+ origin (1.1.0)
92
+ polyglot (0.3.3)
93
+ pry (0.9.12.2)
94
+ coderay (~> 1.0.5)
95
+ method_source (~> 0.8)
96
+ slop (~> 3.4)
97
+ rack (1.5.2)
98
+ rack-test (0.6.2)
99
+ rack (>= 1.0)
100
+ rails (4.0.0)
101
+ actionmailer (= 4.0.0)
102
+ actionpack (= 4.0.0)
103
+ activerecord (= 4.0.0)
104
+ activesupport (= 4.0.0)
105
+ bundler (>= 1.3.0, < 2.0)
106
+ railties (= 4.0.0)
107
+ sprockets-rails (~> 2.0.0)
108
+ railties (4.0.0)
109
+ actionpack (= 4.0.0)
110
+ activesupport (= 4.0.0)
111
+ rake (>= 0.8.7)
112
+ thor (>= 0.18.1, < 2.0)
113
+ rake (10.1.0)
114
+ rb-fsevent (0.9.3)
115
+ rb-inotify (0.9.1)
116
+ ffi (>= 0.5.0)
117
+ rb-kqueue (0.2.0)
118
+ ffi (>= 0.5.0)
119
+ rest-client (1.6.7)
120
+ mime-types (>= 1.16)
121
+ rspec (2.14.1)
122
+ rspec-core (~> 2.14.0)
123
+ rspec-expectations (~> 2.14.0)
124
+ rspec-mocks (~> 2.14.0)
125
+ rspec-core (2.14.5)
126
+ rspec-expectations (2.14.2)
127
+ diff-lcs (>= 1.1.3, < 2.0)
128
+ rspec-mocks (2.14.3)
129
+ simplecov (0.7.1)
130
+ multi_json (~> 1.0)
131
+ simplecov-html (~> 0.7.1)
132
+ simplecov-html (0.7.1)
133
+ slop (3.4.6)
134
+ sprockets (2.10.0)
135
+ hike (~> 1.2)
136
+ multi_json (~> 1.0)
137
+ rack (~> 1.0)
138
+ tilt (~> 1.1, != 1.3.0)
139
+ sprockets-rails (2.0.0)
140
+ actionpack (>= 3.0)
141
+ activesupport (>= 3.0)
142
+ sprockets (~> 2.8)
143
+ sqlite3 (1.3.8)
144
+ thor (0.18.1)
145
+ thread_safe (0.1.3)
146
+ atomic
147
+ tilt (1.4.1)
148
+ treetop (1.4.15)
149
+ polyglot
150
+ polyglot (>= 0.3.1)
151
+ tzinfo (0.3.38)
152
+ uniform_notifier (1.3.0)
153
+
154
+ PLATFORMS
155
+ ruby
156
+
157
+ DEPENDENCIES
158
+ activerecord-import
159
+ bullet!
160
+ coveralls
161
+ guard
162
+ guard-rspec
163
+ mongoid!
164
+ mysql2
165
+ rails
166
+ rspec
167
+ sqlite3