bullet 6.1.0 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +82 -0
  3. data/CHANGELOG.md +45 -0
  4. data/Gemfile.rails-6.0 +1 -1
  5. data/Gemfile.rails-6.1 +15 -0
  6. data/Gemfile.rails-7.0 +10 -0
  7. data/README.md +37 -25
  8. data/lib/bullet/active_job.rb +5 -1
  9. data/lib/bullet/active_record41.rb +1 -0
  10. data/lib/bullet/active_record42.rb +1 -0
  11. data/lib/bullet/active_record5.rb +1 -1
  12. data/lib/bullet/active_record52.rb +23 -18
  13. data/lib/bullet/active_record60.rb +23 -18
  14. data/lib/bullet/active_record61.rb +272 -0
  15. data/lib/bullet/active_record70.rb +275 -0
  16. data/lib/bullet/bullet_xhr.js +18 -17
  17. data/lib/bullet/dependency.rb +16 -0
  18. data/lib/bullet/detector/base.rb +2 -1
  19. data/lib/bullet/detector/counter_cache.rb +2 -2
  20. data/lib/bullet/detector/n_plus_one_query.rb +5 -5
  21. data/lib/bullet/detector/unused_eager_loading.rb +2 -2
  22. data/lib/bullet/mongoid4x.rb +1 -1
  23. data/lib/bullet/mongoid5x.rb +1 -1
  24. data/lib/bullet/mongoid6x.rb +1 -1
  25. data/lib/bullet/mongoid7x.rb +24 -7
  26. data/lib/bullet/notification.rb +2 -1
  27. data/lib/bullet/rack.rb +28 -19
  28. data/lib/bullet/stack_trace_filter.rb +7 -9
  29. data/lib/bullet/version.rb +1 -1
  30. data/lib/bullet.rb +29 -28
  31. data/lib/generators/bullet/install_generator.rb +22 -25
  32. data/perf/benchmark.rb +4 -1
  33. data/spec/bullet/detector/counter_cache_spec.rb +1 -1
  34. data/spec/bullet/detector/n_plus_one_query_spec.rb +1 -1
  35. data/spec/bullet/detector/unused_eager_loading_spec.rb +10 -10
  36. data/spec/bullet/ext/object_spec.rb +1 -1
  37. data/spec/bullet/notification/base_spec.rb +4 -4
  38. data/spec/bullet/notification/n_plus_one_query_spec.rb +1 -3
  39. data/spec/bullet/rack_spec.rb +135 -9
  40. data/spec/bullet_spec.rb +15 -15
  41. data/spec/integration/active_record/association_spec.rb +64 -10
  42. data/spec/integration/counter_cache_spec.rb +4 -4
  43. data/spec/integration/mongoid/association_spec.rb +4 -4
  44. data/spec/models/attachment.rb +5 -0
  45. data/spec/models/deal.rb +5 -0
  46. data/spec/models/folder.rb +2 -1
  47. data/spec/models/group.rb +2 -1
  48. data/spec/models/page.rb +2 -1
  49. data/spec/models/post.rb +2 -0
  50. data/spec/models/role.rb +7 -0
  51. data/spec/models/submission.rb +1 -0
  52. data/spec/models/user.rb +2 -0
  53. data/spec/models/writer.rb +2 -1
  54. data/spec/spec_helper.rb +0 -2
  55. data/spec/support/mongo_seed.rb +1 -0
  56. data/spec/support/sqlite_seed.rb +38 -0
  57. data/test.sh +2 -0
  58. metadata +17 -7
  59. data/.travis.yml +0 -33
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: 6.1.0
4
+ version: 7.0.3
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: 2019-12-28 00:00:00.000000000 Z
11
+ date: 2022-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -45,9 +45,9 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".github/workflows/main.yml"
48
49
  - ".gitignore"
49
50
  - ".rspec"
50
- - ".travis.yml"
51
51
  - CHANGELOG.md
52
52
  - Gemfile
53
53
  - Gemfile.mongoid
@@ -62,6 +62,8 @@ files:
62
62
  - Gemfile.rails-5.1
63
63
  - Gemfile.rails-5.2
64
64
  - Gemfile.rails-6.0
65
+ - Gemfile.rails-6.1
66
+ - Gemfile.rails-7.0
65
67
  - Guardfile
66
68
  - Hacking.md
67
69
  - MIT-LICENSE
@@ -76,6 +78,8 @@ files:
76
78
  - lib/bullet/active_record5.rb
77
79
  - lib/bullet/active_record52.rb
78
80
  - lib/bullet/active_record60.rb
81
+ - lib/bullet/active_record61.rb
82
+ - lib/bullet/active_record70.rb
79
83
  - lib/bullet/bullet_xhr.js
80
84
  - lib/bullet/dependency.rb
81
85
  - lib/bullet/detector.rb
@@ -127,6 +131,7 @@ files:
127
131
  - spec/integration/counter_cache_spec.rb
128
132
  - spec/integration/mongoid/association_spec.rb
129
133
  - spec/models/address.rb
134
+ - spec/models/attachment.rb
130
135
  - spec/models/author.rb
131
136
  - spec/models/base_user.rb
132
137
  - spec/models/category.rb
@@ -135,6 +140,7 @@ files:
135
140
  - spec/models/comment.rb
136
141
  - spec/models/company.rb
137
142
  - spec/models/country.rb
143
+ - spec/models/deal.rb
138
144
  - spec/models/document.rb
139
145
  - spec/models/entry.rb
140
146
  - spec/models/firm.rb
@@ -154,6 +160,7 @@ files:
154
160
  - spec/models/post.rb
155
161
  - spec/models/relationship.rb
156
162
  - spec/models/reply.rb
163
+ - spec/models/role.rb
157
164
  - spec/models/student.rb
158
165
  - spec/models/submission.rb
159
166
  - spec/models/teacher.rb
@@ -173,7 +180,7 @@ licenses:
173
180
  metadata:
174
181
  changelog_uri: https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md
175
182
  source_code_uri: https://github.com/flyerhzm/bullet
176
- post_install_message:
183
+ post_install_message:
177
184
  rdoc_options: []
178
185
  require_paths:
179
186
  - lib
@@ -188,8 +195,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
195
  - !ruby/object:Gem::Version
189
196
  version: 1.3.6
190
197
  requirements: []
191
- rubygems_version: 3.0.3
192
- signing_key:
198
+ rubygems_version: 3.3.7
199
+ signing_key:
193
200
  specification_version: 4
194
201
  summary: help to kill N+1 queries and unused eager loading.
195
202
  test_files:
@@ -214,6 +221,7 @@ test_files:
214
221
  - spec/integration/counter_cache_spec.rb
215
222
  - spec/integration/mongoid/association_spec.rb
216
223
  - spec/models/address.rb
224
+ - spec/models/attachment.rb
217
225
  - spec/models/author.rb
218
226
  - spec/models/base_user.rb
219
227
  - spec/models/category.rb
@@ -222,6 +230,7 @@ test_files:
222
230
  - spec/models/comment.rb
223
231
  - spec/models/company.rb
224
232
  - spec/models/country.rb
233
+ - spec/models/deal.rb
225
234
  - spec/models/document.rb
226
235
  - spec/models/entry.rb
227
236
  - spec/models/firm.rb
@@ -241,6 +250,7 @@ test_files:
241
250
  - spec/models/post.rb
242
251
  - spec/models/relationship.rb
243
252
  - spec/models/reply.rb
253
+ - spec/models/role.rb
244
254
  - spec/models/student.rb
245
255
  - spec/models/submission.rb
246
256
  - spec/models/teacher.rb
data/.travis.yml DELETED
@@ -1,33 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.0
4
- - 2.6.0
5
- gemfile:
6
- - Gemfile.rails-6.0
7
- - Gemfile.rails-5.2
8
- - Gemfile.rails-5.1
9
- - Gemfile.rails-5.0
10
- - Gemfile.rails-4.2
11
- - Gemfile.rails-4.1
12
- - Gemfile.rails-4.0
13
- matrix:
14
- exclude:
15
- - rvm: 2.3.0
16
- gemfile: Gemfile.rails-6.0
17
- - rvm: 2.6.0
18
- gemfile: Gemfile.rails-5.2
19
- - rvm: 2.6.0
20
- gemfile: Gemfile.rails-5.1
21
- - rvm: 2.6.0
22
- gemfile: Gemfile.rails-5.0
23
- - rvm: 2.6.0
24
- gemfile: Gemfile.rails-4.2
25
- - rvm: 2.6.0
26
- gemfile: Gemfile.rails-4.1
27
- - rvm: 2.6.0
28
- gemfile: Gemfile.rails-4.0
29
- env:
30
- - DB=sqlite
31
- before_install:
32
- - "find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete"
33
- - gem install bundler -v '< 2'