bullet 5.7.5 → 6.1.4
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.
- checksums.yaml +5 -5
- data/.travis.yml +22 -1
- data/CHANGELOG.md +49 -12
- data/Gemfile.mongoid-7.0 +15 -0
- data/Gemfile.rails-4.0 +1 -1
- data/Gemfile.rails-4.1 +1 -1
- data/Gemfile.rails-4.2 +1 -1
- data/Gemfile.rails-5.0 +1 -1
- data/Gemfile.rails-5.1 +1 -1
- data/Gemfile.rails-5.2 +2 -2
- data/Gemfile.rails-6.0 +15 -0
- data/Gemfile.rails-6.1 +15 -0
- data/README.md +38 -13
- data/Rakefile +1 -1
- data/bullet.gemspec +8 -3
- data/lib/bullet.rb +50 -22
- data/lib/bullet/active_job.rb +13 -0
- data/lib/bullet/active_record4.rb +12 -35
- data/lib/bullet/active_record41.rb +10 -30
- data/lib/bullet/active_record42.rb +12 -27
- data/lib/bullet/active_record5.rb +197 -177
- data/lib/bullet/active_record52.rb +191 -166
- data/lib/bullet/active_record60.rb +278 -0
- data/lib/bullet/active_record61.rb +278 -0
- data/lib/bullet/bullet_xhr.js +63 -0
- data/lib/bullet/dependency.rb +54 -34
- data/lib/bullet/detector/association.rb +26 -20
- data/lib/bullet/detector/base.rb +1 -2
- data/lib/bullet/detector/counter_cache.rb +14 -9
- data/lib/bullet/detector/n_plus_one_query.rb +27 -17
- data/lib/bullet/detector/unused_eager_loading.rb +7 -3
- data/lib/bullet/ext/object.rb +5 -3
- data/lib/bullet/ext/string.rb +1 -1
- data/lib/bullet/mongoid4x.rb +4 -7
- data/lib/bullet/mongoid5x.rb +4 -7
- data/lib/bullet/mongoid6x.rb +8 -11
- data/lib/bullet/mongoid7x.rb +57 -0
- data/lib/bullet/notification/base.rb +15 -19
- data/lib/bullet/notification/n_plus_one_query.rb +2 -4
- data/lib/bullet/notification/unused_eager_loading.rb +2 -4
- data/lib/bullet/rack.rb +54 -28
- data/lib/bullet/stack_trace_filter.rb +39 -30
- data/lib/bullet/version.rb +1 -1
- data/lib/generators/bullet/install_generator.rb +26 -26
- data/perf/benchmark.rb +8 -14
- data/spec/bullet/detector/counter_cache_spec.rb +6 -6
- data/spec/bullet/detector/n_plus_one_query_spec.rb +30 -3
- data/spec/bullet/detector/unused_eager_loading_spec.rb +19 -6
- data/spec/bullet/ext/object_spec.rb +9 -4
- data/spec/bullet/notification/base_spec.rb +1 -3
- data/spec/bullet/notification/n_plus_one_query_spec.rb +16 -3
- data/spec/bullet/notification/unused_eager_loading_spec.rb +5 -1
- data/spec/bullet/rack_spec.rb +140 -5
- data/spec/bullet/registry/association_spec.rb +2 -2
- data/spec/bullet/registry/base_spec.rb +1 -1
- data/spec/bullet_spec.rb +10 -29
- data/spec/integration/active_record/association_spec.rb +122 -118
- data/spec/integration/counter_cache_spec.rb +11 -31
- data/spec/integration/mongoid/association_spec.rb +18 -32
- data/spec/models/attachment.rb +5 -0
- data/spec/models/client.rb +2 -0
- data/spec/models/firm.rb +1 -0
- data/spec/models/folder.rb +1 -2
- data/spec/models/group.rb +3 -0
- data/spec/models/page.rb +1 -2
- data/spec/models/post.rb +15 -0
- data/spec/models/submission.rb +1 -0
- data/spec/models/user.rb +1 -0
- data/spec/models/writer.rb +1 -2
- data/spec/spec_helper.rb +6 -10
- data/spec/support/bullet_ext.rb +8 -9
- data/spec/support/mongo_seed.rb +2 -16
- data/spec/support/sqlite_seed.rb +17 -2
- data/test.sh +2 -0
- data/update.sh +1 -0
- metadata +24 -11
data/test.sh
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
#bundle update rails && bundle exec rspec spec
|
2
2
|
#BUNDLE_GEMFILE=Gemfile.mongoid bundle update mongoid && BUNDLE_GEMFILE=Gemfile.mongoid bundle exec rspec spec
|
3
|
+
BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle exec rspec spec
|
3
4
|
BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle exec rspec spec
|
4
5
|
BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle exec rspec spec
|
5
6
|
BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle exec rspec spec
|
6
7
|
BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle exec rspec spec
|
7
8
|
BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle exec rspec spec
|
8
9
|
BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle exec rspec spec
|
10
|
+
BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle exec rspec spec
|
9
11
|
BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle exec rspec spec
|
10
12
|
BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle exec rspec spec
|
11
13
|
BUNDLE_GEMFILE=Gemfile.mongoid-4.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-4.0 bundle exec rspec spec
|
data/update.sh
CHANGED
@@ -4,6 +4,7 @@ BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle update
|
|
4
4
|
BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle update
|
5
5
|
BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle update
|
6
6
|
BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle update
|
7
|
+
BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle update
|
7
8
|
BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle update
|
8
9
|
BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle update
|
9
10
|
BUNDLE_GEMFILE=Gemfile.mongoid-4.0 bundle update
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.11
|
33
|
+
version: '1.11'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.11
|
40
|
+
version: '1.11'
|
41
41
|
description: help to kill N+1 queries and unused eager loading.
|
42
42
|
email:
|
43
43
|
- flyerhzm@gmail.com
|
@@ -54,12 +54,15 @@ files:
|
|
54
54
|
- Gemfile.mongoid-4.0
|
55
55
|
- Gemfile.mongoid-5.0
|
56
56
|
- Gemfile.mongoid-6.0
|
57
|
+
- Gemfile.mongoid-7.0
|
57
58
|
- Gemfile.rails-4.0
|
58
59
|
- Gemfile.rails-4.1
|
59
60
|
- Gemfile.rails-4.2
|
60
61
|
- Gemfile.rails-5.0
|
61
62
|
- Gemfile.rails-5.1
|
62
63
|
- Gemfile.rails-5.2
|
64
|
+
- Gemfile.rails-6.0
|
65
|
+
- Gemfile.rails-6.1
|
63
66
|
- Guardfile
|
64
67
|
- Hacking.md
|
65
68
|
- MIT-LICENSE
|
@@ -67,11 +70,15 @@ files:
|
|
67
70
|
- Rakefile
|
68
71
|
- bullet.gemspec
|
69
72
|
- lib/bullet.rb
|
73
|
+
- lib/bullet/active_job.rb
|
70
74
|
- lib/bullet/active_record4.rb
|
71
75
|
- lib/bullet/active_record41.rb
|
72
76
|
- lib/bullet/active_record42.rb
|
73
77
|
- lib/bullet/active_record5.rb
|
74
78
|
- lib/bullet/active_record52.rb
|
79
|
+
- lib/bullet/active_record60.rb
|
80
|
+
- lib/bullet/active_record61.rb
|
81
|
+
- lib/bullet/bullet_xhr.js
|
75
82
|
- lib/bullet/dependency.rb
|
76
83
|
- lib/bullet/detector.rb
|
77
84
|
- lib/bullet/detector/association.rb
|
@@ -84,6 +91,7 @@ files:
|
|
84
91
|
- lib/bullet/mongoid4x.rb
|
85
92
|
- lib/bullet/mongoid5x.rb
|
86
93
|
- lib/bullet/mongoid6x.rb
|
94
|
+
- lib/bullet/mongoid7x.rb
|
87
95
|
- lib/bullet/notification.rb
|
88
96
|
- lib/bullet/notification/base.rb
|
89
97
|
- lib/bullet/notification/counter_cache.rb
|
@@ -121,6 +129,7 @@ files:
|
|
121
129
|
- spec/integration/counter_cache_spec.rb
|
122
130
|
- spec/integration/mongoid/association_spec.rb
|
123
131
|
- spec/models/address.rb
|
132
|
+
- spec/models/attachment.rb
|
124
133
|
- spec/models/author.rb
|
125
134
|
- spec/models/base_user.rb
|
126
135
|
- spec/models/category.rb
|
@@ -133,6 +142,7 @@ files:
|
|
133
142
|
- spec/models/entry.rb
|
134
143
|
- spec/models/firm.rb
|
135
144
|
- spec/models/folder.rb
|
145
|
+
- spec/models/group.rb
|
136
146
|
- spec/models/mongoid/address.rb
|
137
147
|
- spec/models/mongoid/category.rb
|
138
148
|
- spec/models/mongoid/comment.rb
|
@@ -163,8 +173,10 @@ files:
|
|
163
173
|
homepage: https://github.com/flyerhzm/bullet
|
164
174
|
licenses:
|
165
175
|
- MIT
|
166
|
-
metadata:
|
167
|
-
|
176
|
+
metadata:
|
177
|
+
changelog_uri: https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md
|
178
|
+
source_code_uri: https://github.com/flyerhzm/bullet
|
179
|
+
post_install_message:
|
168
180
|
rdoc_options: []
|
169
181
|
require_paths:
|
170
182
|
- lib
|
@@ -172,16 +184,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
184
|
requirements:
|
173
185
|
- - ">="
|
174
186
|
- !ruby/object:Gem::Version
|
175
|
-
version: '
|
187
|
+
version: '2.3'
|
176
188
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
189
|
requirements:
|
178
190
|
- - ">="
|
179
191
|
- !ruby/object:Gem::Version
|
180
192
|
version: 1.3.6
|
181
193
|
requirements: []
|
182
|
-
|
183
|
-
|
184
|
-
signing_key:
|
194
|
+
rubygems_version: 3.1.4
|
195
|
+
signing_key:
|
185
196
|
specification_version: 4
|
186
197
|
summary: help to kill N+1 queries and unused eager loading.
|
187
198
|
test_files:
|
@@ -206,6 +217,7 @@ test_files:
|
|
206
217
|
- spec/integration/counter_cache_spec.rb
|
207
218
|
- spec/integration/mongoid/association_spec.rb
|
208
219
|
- spec/models/address.rb
|
220
|
+
- spec/models/attachment.rb
|
209
221
|
- spec/models/author.rb
|
210
222
|
- spec/models/base_user.rb
|
211
223
|
- spec/models/category.rb
|
@@ -218,6 +230,7 @@ test_files:
|
|
218
230
|
- spec/models/entry.rb
|
219
231
|
- spec/models/firm.rb
|
220
232
|
- spec/models/folder.rb
|
233
|
+
- spec/models/group.rb
|
221
234
|
- spec/models/mongoid/address.rb
|
222
235
|
- spec/models/mongoid/category.rb
|
223
236
|
- spec/models/mongoid/comment.rb
|