bullet 6.1.0 → 7.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +82 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile.rails-6.0 +1 -1
- data/Gemfile.rails-6.1 +15 -0
- data/Gemfile.rails-7.0 +10 -0
- data/MIT-LICENSE +1 -1
- data/README.md +41 -27
- data/lib/bullet/active_job.rb +5 -1
- data/lib/bullet/active_record41.rb +1 -0
- data/lib/bullet/active_record42.rb +1 -0
- data/lib/bullet/active_record5.rb +10 -8
- data/lib/bullet/active_record52.rb +32 -25
- data/lib/bullet/active_record60.rb +30 -23
- data/lib/bullet/active_record61.rb +274 -0
- data/lib/bullet/active_record70.rb +284 -0
- data/lib/bullet/bullet_xhr.js +18 -17
- data/lib/bullet/dependency.rb +16 -0
- data/lib/bullet/detector/association.rb +8 -0
- data/lib/bullet/detector/base.rb +2 -1
- data/lib/bullet/detector/counter_cache.rb +2 -2
- data/lib/bullet/detector/n_plus_one_query.rb +24 -13
- data/lib/bullet/detector/unused_eager_loading.rb +3 -3
- data/lib/bullet/mongoid4x.rb +1 -1
- data/lib/bullet/mongoid5x.rb +1 -1
- data/lib/bullet/mongoid6x.rb +1 -1
- data/lib/bullet/mongoid7x.rb +32 -17
- data/lib/bullet/notification.rb +2 -1
- data/lib/bullet/rack.rb +64 -23
- data/lib/bullet/registry/call_stack.rb +12 -0
- data/lib/bullet/registry.rb +1 -0
- data/lib/bullet/stack_trace_filter.rb +15 -15
- data/lib/bullet/version.rb +1 -1
- data/lib/bullet.rb +35 -29
- data/lib/generators/bullet/install_generator.rb +22 -25
- data/perf/benchmark.rb +4 -1
- data/spec/bullet/detector/counter_cache_spec.rb +1 -1
- data/spec/bullet/detector/n_plus_one_query_spec.rb +1 -33
- data/spec/bullet/detector/unused_eager_loading_spec.rb +15 -10
- data/spec/bullet/ext/object_spec.rb +1 -1
- data/spec/bullet/notification/base_spec.rb +4 -4
- data/spec/bullet/notification/n_plus_one_query_spec.rb +1 -3
- data/spec/bullet/rack_spec.rb +152 -9
- data/spec/bullet/stack_trace_filter_spec.rb +26 -0
- data/spec/bullet_spec.rb +15 -15
- data/spec/integration/active_record/association_spec.rb +95 -12
- data/spec/integration/counter_cache_spec.rb +4 -4
- data/spec/integration/mongoid/association_spec.rb +4 -4
- data/spec/models/attachment.rb +5 -0
- data/spec/models/deal.rb +5 -0
- data/spec/models/folder.rb +2 -1
- data/spec/models/group.rb +2 -1
- data/spec/models/page.rb +2 -1
- data/spec/models/post.rb +2 -0
- data/spec/models/role.rb +7 -0
- data/spec/models/submission.rb +1 -0
- data/spec/models/user.rb +2 -0
- data/spec/models/writer.rb +2 -1
- data/spec/spec_helper.rb +0 -2
- data/spec/support/mongo_seed.rb +1 -0
- data/spec/support/sqlite_seed.rb +38 -0
- data/test.sh +2 -0
- metadata +20 -7
- data/.travis.yml +0 -33
@@ -58,6 +58,19 @@ if active_record?
|
|
58
58
|
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
59
59
|
end
|
60
60
|
|
61
|
+
it 'should detect non preload comment => post with inverse_of from a query' do
|
62
|
+
Post.first.comments.find_each do |comment|
|
63
|
+
comment.name
|
64
|
+
comment.post.name
|
65
|
+
end
|
66
|
+
|
67
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
68
|
+
expect(Post.first.comments.count).not_to eq(0)
|
69
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
70
|
+
|
71
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
72
|
+
end
|
73
|
+
|
61
74
|
it 'should detect non preload post => comments with empty?' do
|
62
75
|
Post.all.each { |post| post.comments.empty? }
|
63
76
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
@@ -129,7 +142,7 @@ if active_record?
|
|
129
142
|
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
130
143
|
end
|
131
144
|
|
132
|
-
it 'should detect unused preload with post =>
|
145
|
+
it 'should detect unused preload with post => comments, no category => posts' do
|
133
146
|
Category.includes(posts: :comments).each { |category| category.posts.map(&:name) }
|
134
147
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
135
148
|
expect(Bullet::Detector::Association).to be_unused_preload_associations_for(Post, :comments)
|
@@ -202,7 +215,7 @@ if active_record?
|
|
202
215
|
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
203
216
|
end
|
204
217
|
|
205
|
-
it 'should detect preload with post =>
|
218
|
+
it 'should detect preload with post => comments' do
|
206
219
|
Post.first.comments.map(&:name)
|
207
220
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
208
221
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
@@ -377,8 +390,7 @@ if active_record?
|
|
377
390
|
it 'should detect unused preload with comment => author' do
|
378
391
|
Comment.includes([:author, { post: :writer }]).where(['base_users.id = ?', BaseUser.first]).references(
|
379
392
|
:base_users
|
380
|
-
)
|
381
|
-
.each { |comment| comment.post.writer.name }
|
393
|
+
).each { |comment| comment.post.writer.name }
|
382
394
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
383
395
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
384
396
|
|
@@ -402,6 +414,15 @@ if active_record?
|
|
402
414
|
end
|
403
415
|
|
404
416
|
describe Bullet::Detector::Association, 'has_and_belongs_to_many' do
|
417
|
+
context 'posts <=> deals' do
|
418
|
+
it 'should detect preload associations with join tables that have identifier' do
|
419
|
+
Post.includes(:deals).each { |post| post.deals.map(&:name) }
|
420
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
421
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
422
|
+
|
423
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
424
|
+
end
|
425
|
+
end
|
405
426
|
context 'students <=> teachers' do
|
406
427
|
it 'should detect non preload associations' do
|
407
428
|
Student.all.each { |student| student.teachers.map(&:name) }
|
@@ -443,6 +464,16 @@ if active_record?
|
|
443
464
|
expect(Bullet::Detector::Association).to be_detecting_unpreloaded_association_for(Student, :teachers)
|
444
465
|
end
|
445
466
|
end
|
467
|
+
|
468
|
+
context 'user => roles' do
|
469
|
+
it 'should detect preload associations' do
|
470
|
+
User.first.roles.includes(:resource).each { |role| role.resource }
|
471
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
472
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
473
|
+
|
474
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
475
|
+
end
|
476
|
+
end
|
446
477
|
end
|
447
478
|
|
448
479
|
describe Bullet::Detector::Association, 'has_many :through' do
|
@@ -456,7 +487,15 @@ if active_record?
|
|
456
487
|
end
|
457
488
|
|
458
489
|
it 'should detect preload associations' do
|
459
|
-
Firm.
|
490
|
+
Firm.preload(:clients).each { |firm| firm.clients.map(&:name) }
|
491
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
492
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
493
|
+
|
494
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
495
|
+
end
|
496
|
+
|
497
|
+
it 'should detect eager load association' do
|
498
|
+
Firm.eager_load(:clients).each { |firm| firm.clients.map(&:name) }
|
460
499
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
461
500
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
462
501
|
|
@@ -490,7 +529,15 @@ if active_record?
|
|
490
529
|
end
|
491
530
|
|
492
531
|
it 'should detect preload associations' do
|
493
|
-
Firm.
|
532
|
+
Firm.preload(:groups).each { |firm| firm.groups.map(&:name) }
|
533
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
534
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
535
|
+
|
536
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
537
|
+
end
|
538
|
+
|
539
|
+
it 'should detect eager load associations' do
|
540
|
+
Firm.eager_load(:groups).each { |firm| firm.groups.map(&:name) }
|
494
541
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
495
542
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
496
543
|
|
@@ -562,6 +609,42 @@ if active_record?
|
|
562
609
|
end
|
563
610
|
end
|
564
611
|
|
612
|
+
describe Bullet::Detector::Association, 'has_one :through' do
|
613
|
+
context 'user => attachment' do
|
614
|
+
it 'should detect non preload associations' do
|
615
|
+
User.all.each { |user| user.submission_attachment.file_name }
|
616
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
617
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
618
|
+
|
619
|
+
expect(Bullet::Detector::Association).to be_detecting_unpreloaded_association_for(User, :submission_attachment)
|
620
|
+
end
|
621
|
+
|
622
|
+
it 'should detect preload associations' do
|
623
|
+
User.includes(:submission_attachment).each { |user| user.submission_attachment.file_name }
|
624
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
625
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
626
|
+
|
627
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
628
|
+
end
|
629
|
+
|
630
|
+
it 'should not detect preload associations' do
|
631
|
+
User.all.map(&:name)
|
632
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
633
|
+
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
634
|
+
|
635
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
636
|
+
end
|
637
|
+
|
638
|
+
it 'should detect unused preload associations' do
|
639
|
+
User.includes(:submission_attachment).map(&:name)
|
640
|
+
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
641
|
+
expect(Bullet::Detector::Association).to be_unused_preload_associations_for(User, :submission_attachment)
|
642
|
+
|
643
|
+
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
644
|
+
end
|
645
|
+
end
|
646
|
+
end
|
647
|
+
|
565
648
|
describe Bullet::Detector::Association, 'call one association that in possible objects' do
|
566
649
|
it 'should not detect preload association' do
|
567
650
|
Post.all
|
@@ -694,9 +777,9 @@ if active_record?
|
|
694
777
|
end
|
695
778
|
end
|
696
779
|
|
697
|
-
context '
|
698
|
-
before { Bullet.
|
699
|
-
after { Bullet.
|
780
|
+
context 'add n plus one query to safelist' do
|
781
|
+
before { Bullet.add_safelist type: :n_plus_one_query, class_name: 'Post', association: :comments }
|
782
|
+
after { Bullet.clear_safelist }
|
700
783
|
|
701
784
|
it 'should not detect n plus one query' do
|
702
785
|
Post.all.each { |post| post.comments.map(&:name) }
|
@@ -715,9 +798,9 @@ if active_record?
|
|
715
798
|
end
|
716
799
|
end
|
717
800
|
|
718
|
-
context '
|
719
|
-
before { Bullet.
|
720
|
-
after { Bullet.
|
801
|
+
context 'add unused eager loading to safelist' do
|
802
|
+
before { Bullet.add_safelist type: :unused_eager_loading, class_name: 'Post', association: :comments }
|
803
|
+
after { Bullet.clear_safelist }
|
721
804
|
|
722
805
|
it 'should not detect unused eager loading' do
|
723
806
|
Post.includes(:comments).map(&:name)
|
@@ -28,7 +28,7 @@ if !mongoid? && active_record?
|
|
28
28
|
expect(Bullet.collected_counter_cache_notifications).to be_empty
|
29
29
|
end
|
30
30
|
|
31
|
-
if
|
31
|
+
if ActiveRecord::VERSION::MAJOR > 4
|
32
32
|
it 'should not need counter cache for has_many through' do
|
33
33
|
Client.all.each { |client| client.firms.size }
|
34
34
|
expect(Bullet.collected_counter_cache_notifications).to be_empty
|
@@ -55,9 +55,9 @@ if !mongoid? && active_record?
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
context '
|
59
|
-
before { Bullet.
|
60
|
-
after { Bullet.
|
58
|
+
context 'safelist' do
|
59
|
+
before { Bullet.add_safelist type: :counter_cache, class_name: 'Country', association: :cities }
|
60
|
+
after { Bullet.clear_safelist }
|
61
61
|
|
62
62
|
it 'should not detect counter cache' do
|
63
63
|
Country.all.each { |country| country.cities.size }
|
@@ -73,9 +73,9 @@ if mongoid?
|
|
73
73
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
74
74
|
|
75
75
|
expect(Bullet::Detector::Association).not_to be_detecting_unpreloaded_association_for(
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
Mongoid::Category,
|
77
|
+
:posts
|
78
|
+
)
|
79
79
|
expect(Bullet::Detector::Association).to be_detecting_unpreloaded_association_for(Mongoid::Category, :entries)
|
80
80
|
end
|
81
81
|
|
@@ -118,7 +118,7 @@ if mongoid?
|
|
118
118
|
expect(Bullet::Detector::Association).to be_completely_preloading_associations
|
119
119
|
end
|
120
120
|
|
121
|
-
it 'should detect preload with post =>
|
121
|
+
it 'should detect preload with post => comments' do
|
122
122
|
Mongoid::Post.first.comments.map(&:name)
|
123
123
|
Bullet::Detector::UnusedEagerLoading.check_unused_preload_associations
|
124
124
|
expect(Bullet::Detector::Association).not_to be_has_unused_preload_associations
|
data/spec/models/deal.rb
ADDED
data/spec/models/folder.rb
CHANGED
data/spec/models/group.rb
CHANGED
data/spec/models/page.rb
CHANGED
data/spec/models/post.rb
CHANGED
@@ -4,6 +4,7 @@ class Post < ActiveRecord::Base
|
|
4
4
|
belongs_to :category, inverse_of: :posts
|
5
5
|
belongs_to :writer
|
6
6
|
has_many :comments, inverse_of: :post
|
7
|
+
has_and_belongs_to_many :deals
|
7
8
|
|
8
9
|
validates :category, presence: true
|
9
10
|
|
@@ -21,6 +22,7 @@ class Post < ActiveRecord::Base
|
|
21
22
|
next unless trigger_after_save
|
22
23
|
|
23
24
|
temp_comment = Comment.new(post: self)
|
25
|
+
|
24
26
|
# this triggers self to be "possible", even though it's
|
25
27
|
# not saved yet
|
26
28
|
temp_comment.post
|
data/spec/models/role.rb
ADDED
data/spec/models/submission.rb
CHANGED
data/spec/models/user.rb
CHANGED
data/spec/models/writer.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/support/mongo_seed.rb
CHANGED
@@ -45,6 +45,7 @@ module Support
|
|
45
45
|
Mongoid.configure do |config|
|
46
46
|
config.load_configuration(clients: { default: { database: 'bullet', hosts: %w[localhost:27017] } })
|
47
47
|
end
|
48
|
+
|
48
49
|
# Increase the level from DEBUG in order to avoid excessive logging to the screen
|
49
50
|
Mongo::Logger.logger.level = Logger::WARN
|
50
51
|
end
|
data/spec/support/sqlite_seed.rb
CHANGED
@@ -21,6 +21,13 @@ module Support
|
|
21
21
|
post2 = category2.posts.create(name: 'second', writer: writer2)
|
22
22
|
post3 = category2.posts.create(name: 'third', writer: writer2)
|
23
23
|
|
24
|
+
deal1 = Deal.new(name: 'Deal 1')
|
25
|
+
deal1.posts << post1
|
26
|
+
deal1.posts << post2
|
27
|
+
deal2 = Deal.new(name: 'Deal 2')
|
28
|
+
post1.deals << deal1
|
29
|
+
post1.deals << deal2
|
30
|
+
|
24
31
|
comment1 = post1.comments.create(name: 'first', author: writer1)
|
25
32
|
comment2 = post1.comments.create(name: 'first2', author: writer1)
|
26
33
|
comment3 = post1.comments.create(name: 'first3', author: writer1)
|
@@ -85,9 +92,16 @@ module Support
|
|
85
92
|
page3 = Page.create(name: 'page3', parent_id: folder2.id, author_id: author2.id)
|
86
93
|
page4 = Page.create(name: 'page4', parent_id: folder2.id, author_id: author2.id)
|
87
94
|
|
95
|
+
role1 = Role.create(name: 'Admin')
|
96
|
+
role2 = Role.create(name: 'User')
|
97
|
+
|
88
98
|
user1 = User.create(name: 'user1', category: category1)
|
89
99
|
user2 = User.create(name: 'user2', category: category1)
|
90
100
|
|
101
|
+
user1.roles << role1
|
102
|
+
user1.roles << role2
|
103
|
+
user2.roles << role2
|
104
|
+
|
91
105
|
submission1 = user1.create_submission(name: 'submission1')
|
92
106
|
submission2 = user2.create_submission(name: 'submission2')
|
93
107
|
|
@@ -95,6 +109,9 @@ module Support
|
|
95
109
|
submission1.replies.create(name: 'reply2')
|
96
110
|
submission2.replies.create(name: 'reply3')
|
97
111
|
submission2.replies.create(name: 'reply4')
|
112
|
+
|
113
|
+
submission1.create_attachment(file_name: 'submission1 file')
|
114
|
+
submission2.create_attachment(file_name: 'submission2 file')
|
98
115
|
end
|
99
116
|
|
100
117
|
def setup_db
|
@@ -153,6 +170,11 @@ module Support
|
|
153
170
|
t.column :hotel_id, :integer
|
154
171
|
end
|
155
172
|
|
173
|
+
create_table :deals_posts do |t|
|
174
|
+
t.column :deal_id, :integer
|
175
|
+
t.column :post_id, :integer
|
176
|
+
end
|
177
|
+
|
156
178
|
create_table :documents do |t|
|
157
179
|
t.string :name
|
158
180
|
t.string :type
|
@@ -231,6 +253,17 @@ module Support
|
|
231
253
|
t.column :submission_id, :integer
|
232
254
|
end
|
233
255
|
|
256
|
+
create_table :roles do |t|
|
257
|
+
t.column :name, :string
|
258
|
+
t.column :resource_id, :integer
|
259
|
+
t.column :resource_type, :string
|
260
|
+
end
|
261
|
+
|
262
|
+
create_table :roles_users do |t|
|
263
|
+
t.column :role_id, :integer
|
264
|
+
t.column :user_id, :integer
|
265
|
+
end
|
266
|
+
|
234
267
|
create_table :submissions do |t|
|
235
268
|
t.column :name, :string
|
236
269
|
t.column :user_id, :integer
|
@@ -240,6 +273,11 @@ module Support
|
|
240
273
|
t.column :name, :string
|
241
274
|
t.column :category_id, :integer
|
242
275
|
end
|
276
|
+
|
277
|
+
create_table :attachments do |t|
|
278
|
+
t.column :file_name, :string
|
279
|
+
t.column :submission_id, :integer
|
280
|
+
end
|
243
281
|
end
|
244
282
|
end
|
245
283
|
end
|
data/test.sh
CHANGED
@@ -1,5 +1,7 @@
|
|
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-7.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-7.0 bundle exec rspec spec
|
4
|
+
BUNDLE_GEMFILE=Gemfile.rails-6.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-6.1 bundle exec rspec spec
|
3
5
|
BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle exec rspec spec
|
4
6
|
BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle exec rspec spec
|
5
7
|
BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle exec rspec spec
|
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: 7.0.7
|
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: 2023-01-03 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
|
@@ -100,6 +104,7 @@ files:
|
|
100
104
|
- lib/bullet/registry.rb
|
101
105
|
- lib/bullet/registry/association.rb
|
102
106
|
- lib/bullet/registry/base.rb
|
107
|
+
- lib/bullet/registry/call_stack.rb
|
103
108
|
- lib/bullet/registry/object.rb
|
104
109
|
- lib/bullet/stack_trace_filter.rb
|
105
110
|
- lib/bullet/version.rb
|
@@ -122,11 +127,13 @@ files:
|
|
122
127
|
- spec/bullet/registry/association_spec.rb
|
123
128
|
- spec/bullet/registry/base_spec.rb
|
124
129
|
- spec/bullet/registry/object_spec.rb
|
130
|
+
- spec/bullet/stack_trace_filter_spec.rb
|
125
131
|
- spec/bullet_spec.rb
|
126
132
|
- spec/integration/active_record/association_spec.rb
|
127
133
|
- spec/integration/counter_cache_spec.rb
|
128
134
|
- spec/integration/mongoid/association_spec.rb
|
129
135
|
- spec/models/address.rb
|
136
|
+
- spec/models/attachment.rb
|
130
137
|
- spec/models/author.rb
|
131
138
|
- spec/models/base_user.rb
|
132
139
|
- spec/models/category.rb
|
@@ -135,6 +142,7 @@ files:
|
|
135
142
|
- spec/models/comment.rb
|
136
143
|
- spec/models/company.rb
|
137
144
|
- spec/models/country.rb
|
145
|
+
- spec/models/deal.rb
|
138
146
|
- spec/models/document.rb
|
139
147
|
- spec/models/entry.rb
|
140
148
|
- spec/models/firm.rb
|
@@ -154,6 +162,7 @@ files:
|
|
154
162
|
- spec/models/post.rb
|
155
163
|
- spec/models/relationship.rb
|
156
164
|
- spec/models/reply.rb
|
165
|
+
- spec/models/role.rb
|
157
166
|
- spec/models/student.rb
|
158
167
|
- spec/models/submission.rb
|
159
168
|
- spec/models/teacher.rb
|
@@ -173,7 +182,7 @@ licenses:
|
|
173
182
|
metadata:
|
174
183
|
changelog_uri: https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md
|
175
184
|
source_code_uri: https://github.com/flyerhzm/bullet
|
176
|
-
post_install_message:
|
185
|
+
post_install_message:
|
177
186
|
rdoc_options: []
|
178
187
|
require_paths:
|
179
188
|
- lib
|
@@ -188,8 +197,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
197
|
- !ruby/object:Gem::Version
|
189
198
|
version: 1.3.6
|
190
199
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
192
|
-
signing_key:
|
200
|
+
rubygems_version: 3.4.1
|
201
|
+
signing_key:
|
193
202
|
specification_version: 4
|
194
203
|
summary: help to kill N+1 queries and unused eager loading.
|
195
204
|
test_files:
|
@@ -209,11 +218,13 @@ test_files:
|
|
209
218
|
- spec/bullet/registry/association_spec.rb
|
210
219
|
- spec/bullet/registry/base_spec.rb
|
211
220
|
- spec/bullet/registry/object_spec.rb
|
221
|
+
- spec/bullet/stack_trace_filter_spec.rb
|
212
222
|
- spec/bullet_spec.rb
|
213
223
|
- spec/integration/active_record/association_spec.rb
|
214
224
|
- spec/integration/counter_cache_spec.rb
|
215
225
|
- spec/integration/mongoid/association_spec.rb
|
216
226
|
- spec/models/address.rb
|
227
|
+
- spec/models/attachment.rb
|
217
228
|
- spec/models/author.rb
|
218
229
|
- spec/models/base_user.rb
|
219
230
|
- spec/models/category.rb
|
@@ -222,6 +233,7 @@ test_files:
|
|
222
233
|
- spec/models/comment.rb
|
223
234
|
- spec/models/company.rb
|
224
235
|
- spec/models/country.rb
|
236
|
+
- spec/models/deal.rb
|
225
237
|
- spec/models/document.rb
|
226
238
|
- spec/models/entry.rb
|
227
239
|
- spec/models/firm.rb
|
@@ -241,6 +253,7 @@ test_files:
|
|
241
253
|
- spec/models/post.rb
|
242
254
|
- spec/models/relationship.rb
|
243
255
|
- spec/models/reply.rb
|
256
|
+
- spec/models/role.rb
|
244
257
|
- spec/models/student.rb
|
245
258
|
- spec/models/submission.rb
|
246
259
|
- 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'
|