bullet 5.5.0 → 6.1.5
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/.github/workflows/main.yml +66 -0
- data/CHANGELOG.md +83 -1
- data/Gemfile +6 -1
- 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 +2 -2
- data/Gemfile.rails-5.1 +15 -0
- data/Gemfile.rails-5.2 +15 -0
- data/Gemfile.rails-6.0 +15 -0
- data/Gemfile.rails-6.1 +15 -0
- data/Guardfile +2 -2
- data/Hacking.md +1 -1
- data/README.md +58 -37
- data/Rakefile +20 -21
- data/bullet.gemspec +21 -15
- data/lib/bullet/active_job.rb +13 -0
- data/lib/bullet/active_record4.rb +15 -34
- data/lib/bullet/active_record41.rb +14 -31
- data/lib/bullet/active_record42.rb +23 -36
- data/lib/bullet/active_record5.rb +178 -158
- data/lib/bullet/active_record52.rb +251 -0
- data/lib/bullet/active_record60.rb +278 -0
- data/lib/bullet/active_record61.rb +278 -0
- data/lib/bullet/bullet_xhr.js +64 -0
- data/lib/bullet/dependency.rb +60 -32
- data/lib/bullet/detector/association.rb +41 -32
- data/lib/bullet/detector/base.rb +2 -0
- data/lib/bullet/detector/counter_cache.rb +25 -17
- data/lib/bullet/detector/n_plus_one_query.rb +38 -24
- data/lib/bullet/detector/unused_eager_loading.rb +35 -26
- data/lib/bullet/detector.rb +2 -0
- data/lib/bullet/ext/object.rb +9 -5
- data/lib/bullet/ext/string.rb +3 -1
- data/lib/bullet/mongoid4x.rb +9 -8
- data/lib/bullet/mongoid5x.rb +9 -8
- data/lib/bullet/mongoid6x.rb +13 -12
- data/lib/bullet/mongoid7x.rb +57 -0
- data/lib/bullet/notification/base.rb +28 -25
- data/lib/bullet/notification/counter_cache.rb +3 -1
- data/lib/bullet/notification/n_plus_one_query.rb +8 -7
- data/lib/bullet/notification/unused_eager_loading.rb +8 -7
- data/lib/bullet/notification.rb +4 -1
- data/lib/bullet/notification_collector.rb +2 -1
- data/lib/bullet/rack.rb +66 -35
- data/lib/bullet/registry/association.rb +2 -0
- data/lib/bullet/registry/base.rb +2 -0
- data/lib/bullet/registry/object.rb +2 -0
- data/lib/bullet/registry.rb +2 -0
- data/lib/bullet/stack_trace_filter.rb +50 -20
- data/lib/bullet/version.rb +3 -2
- data/lib/bullet.rb +136 -55
- data/lib/generators/bullet/install_generator.rb +48 -0
- data/perf/benchmark.rb +19 -22
- data/rails/init.rb +2 -0
- data/spec/bullet/detector/association_spec.rb +6 -4
- data/spec/bullet/detector/base_spec.rb +2 -0
- data/spec/bullet/detector/counter_cache_spec.rb +17 -15
- data/spec/bullet/detector/n_plus_one_query_spec.rb +75 -46
- data/spec/bullet/detector/unused_eager_loading_spec.rb +45 -26
- data/spec/bullet/ext/object_spec.rb +18 -11
- data/spec/bullet/ext/string_spec.rb +7 -5
- data/spec/bullet/notification/base_spec.rb +38 -39
- data/spec/bullet/notification/counter_cache_spec.rb +5 -3
- data/spec/bullet/notification/n_plus_one_query_spec.rb +20 -5
- data/spec/bullet/notification/unused_eager_loading_spec.rb +9 -3
- data/spec/bullet/notification_collector_spec.rb +12 -10
- data/spec/bullet/rack_spec.rb +200 -48
- data/spec/bullet/registry/association_spec.rb +12 -10
- data/spec/bullet/registry/base_spec.rb +22 -20
- data/spec/bullet/registry/object_spec.rb +6 -4
- data/spec/bullet_spec.rb +64 -33
- data/spec/integration/{active_record4 → active_record}/association_spec.rb +238 -223
- data/spec/integration/counter_cache_spec.rb +26 -44
- data/spec/integration/mongoid/association_spec.rb +53 -65
- data/spec/models/address.rb +2 -0
- data/spec/models/attachment.rb +5 -0
- data/spec/models/author.rb +2 -0
- data/spec/models/base_user.rb +2 -0
- data/spec/models/category.rb +2 -0
- data/spec/models/city.rb +2 -0
- data/spec/models/client.rb +4 -0
- data/spec/models/comment.rb +3 -1
- data/spec/models/company.rb +2 -0
- data/spec/models/country.rb +2 -0
- data/spec/models/deal.rb +5 -0
- data/spec/models/document.rb +4 -2
- data/spec/models/entry.rb +2 -0
- data/spec/models/firm.rb +3 -0
- data/spec/models/folder.rb +2 -0
- data/spec/models/group.rb +4 -0
- data/spec/models/mongoid/address.rb +3 -1
- data/spec/models/mongoid/category.rb +4 -2
- data/spec/models/mongoid/comment.rb +3 -1
- data/spec/models/mongoid/company.rb +3 -1
- data/spec/models/mongoid/entry.rb +3 -1
- data/spec/models/mongoid/post.rb +6 -4
- data/spec/models/mongoid/user.rb +2 -0
- data/spec/models/newspaper.rb +3 -1
- data/spec/models/page.rb +2 -0
- data/spec/models/person.rb +2 -0
- data/spec/models/pet.rb +2 -0
- data/spec/models/post.rb +19 -0
- data/spec/models/relationship.rb +2 -0
- data/spec/models/reply.rb +2 -0
- data/spec/models/student.rb +2 -0
- data/spec/models/submission.rb +3 -0
- data/spec/models/teacher.rb +2 -0
- data/spec/models/user.rb +3 -0
- data/spec/models/writer.rb +2 -0
- data/spec/spec_helper.rb +19 -23
- data/spec/support/bullet_ext.rb +10 -9
- data/spec/support/mongo_seed.rb +38 -57
- data/spec/support/rack_double.rb +13 -19
- data/spec/support/sqlite_seed.rb +104 -76
- data/tasks/bullet_tasks.rake +4 -2
- data/test.sh +5 -0
- data/update.sh +3 -0
- metadata +34 -17
- data/.travis.yml +0 -16
- data/spec/integration/active_record5/association_spec.rb +0 -768
data/spec/support/sqlite_seed.rb
CHANGED
|
@@ -1,101 +1,116 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Support
|
|
2
4
|
module SqliteSeed
|
|
5
|
+
module_function
|
|
6
|
+
|
|
3
7
|
def seed_db
|
|
4
|
-
newspaper1 = Newspaper.create(:
|
|
5
|
-
newspaper2 = Newspaper.create(:
|
|
6
|
-
|
|
7
|
-
writer1 = Writer.create(:
|
|
8
|
-
writer2 = Writer.create(:
|
|
9
|
-
user1 = BaseUser.create(:
|
|
10
|
-
user2 = BaseUser.create(:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
8
|
+
newspaper1 = Newspaper.create(name: 'First Newspaper')
|
|
9
|
+
newspaper2 = Newspaper.create(name: 'Second Newspaper')
|
|
10
|
+
|
|
11
|
+
writer1 = Writer.create(name: 'first', newspaper: newspaper1)
|
|
12
|
+
writer2 = Writer.create(name: 'second', newspaper: newspaper2)
|
|
13
|
+
user1 = BaseUser.create(name: 'third', newspaper: newspaper1)
|
|
14
|
+
user2 = BaseUser.create(name: 'fourth', newspaper: newspaper2)
|
|
15
|
+
|
|
16
|
+
category1 = Category.create(name: 'first')
|
|
17
|
+
category2 = Category.create(name: 'second')
|
|
18
|
+
|
|
19
|
+
post1 = category1.posts.create(name: 'first', writer: writer1)
|
|
20
|
+
post1a = category1.posts.create(name: 'like first', writer: writer2, active: false)
|
|
21
|
+
post2 = category2.posts.create(name: 'second', writer: writer2)
|
|
22
|
+
post3 = category2.posts.create(name: 'third', writer: writer2)
|
|
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
|
+
|
|
31
|
+
comment1 = post1.comments.create(name: 'first', author: writer1)
|
|
32
|
+
comment2 = post1.comments.create(name: 'first2', author: writer1)
|
|
33
|
+
comment3 = post1.comments.create(name: 'first3', author: writer1)
|
|
34
|
+
comment4 = post1.comments.create(name: 'second', author: writer2)
|
|
35
|
+
comment8 = post1a.comments.create(name: 'like first 1', author: writer1)
|
|
36
|
+
comment9 = post1a.comments.create(name: 'like first 2', author: writer2)
|
|
37
|
+
comment5 = post2.comments.create(name: 'third', author: user1)
|
|
38
|
+
comment6 = post2.comments.create(name: 'fourth', author: user2)
|
|
39
|
+
comment7 = post2.comments.create(name: 'fourth', author: writer1)
|
|
40
|
+
|
|
41
|
+
entry1 = category1.entries.create(name: 'first')
|
|
42
|
+
entry2 = category1.entries.create(name: 'second')
|
|
43
|
+
|
|
44
|
+
student1 = Student.create(name: 'first')
|
|
45
|
+
student2 = Student.create(name: 'second')
|
|
46
|
+
teacher1 = Teacher.create(name: 'first')
|
|
47
|
+
teacher2 = Teacher.create(name: 'second')
|
|
38
48
|
student1.teachers = [teacher1, teacher2]
|
|
39
49
|
student2.teachers = [teacher1, teacher2]
|
|
40
50
|
teacher1.students << student1
|
|
41
51
|
teacher2.students << student2
|
|
42
52
|
|
|
43
|
-
firm1 = Firm.create(:
|
|
44
|
-
firm2 = Firm.create(:
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
firm1 = Firm.create(name: 'first')
|
|
54
|
+
firm2 = Firm.create(name: 'second')
|
|
55
|
+
group1 = Group.create(name: 'first')
|
|
56
|
+
group2 = Group.create(name: 'second')
|
|
57
|
+
client1 = Client.create(name: 'first', group: group1)
|
|
58
|
+
client2 = Client.create(name: 'second', group: group2)
|
|
47
59
|
firm1.clients = [client1, client2]
|
|
48
60
|
firm2.clients = [client1, client2]
|
|
49
61
|
client1.firms << firm1
|
|
50
62
|
client2.firms << firm2
|
|
51
63
|
|
|
52
|
-
company1 = Company.create(:
|
|
53
|
-
company2 = Company.create(:
|
|
64
|
+
company1 = Company.create(name: 'first')
|
|
65
|
+
company2 = Company.create(name: 'second')
|
|
54
66
|
|
|
55
|
-
Address.create(:
|
|
56
|
-
Address.create(:
|
|
67
|
+
Address.create(name: 'first', company: company1)
|
|
68
|
+
Address.create(name: 'second', company: company2)
|
|
57
69
|
|
|
58
|
-
country1 = Country.create(:
|
|
59
|
-
country2 = Country.create(:
|
|
70
|
+
country1 = Country.create(name: 'first')
|
|
71
|
+
country2 = Country.create(name: 'second')
|
|
60
72
|
|
|
61
|
-
country1.cities.create(:
|
|
62
|
-
country1.cities.create(:
|
|
63
|
-
country2.cities.create(:
|
|
64
|
-
country2.cities.create(:
|
|
73
|
+
country1.cities.create(name: 'first')
|
|
74
|
+
country1.cities.create(name: 'second')
|
|
75
|
+
country2.cities.create(name: 'third')
|
|
76
|
+
country2.cities.create(name: 'fourth')
|
|
65
77
|
|
|
66
|
-
person1 = Person.create(:
|
|
67
|
-
person2 = Person.create(:
|
|
78
|
+
person1 = Person.create(name: 'first')
|
|
79
|
+
person2 = Person.create(name: 'second')
|
|
68
80
|
|
|
69
|
-
person1.pets.create(:
|
|
70
|
-
person1.pets.create(:
|
|
71
|
-
person2.pets.create(:
|
|
72
|
-
person2.pets.create(:
|
|
81
|
+
person1.pets.create(name: 'first')
|
|
82
|
+
person1.pets.create(name: 'second')
|
|
83
|
+
person2.pets.create(name: 'third')
|
|
84
|
+
person2.pets.create(name: 'fourth')
|
|
73
85
|
|
|
74
|
-
author1 = Author.create(:
|
|
75
|
-
author2 = Author.create(:
|
|
76
|
-
folder1 = Folder.create(:
|
|
77
|
-
folder2 = Folder.create(:
|
|
78
|
-
page1 = Page.create(:
|
|
79
|
-
page2 = Page.create(:
|
|
80
|
-
page3 = Page.create(:
|
|
81
|
-
page4 = Page.create(:
|
|
86
|
+
author1 = Author.create(name: 'author1')
|
|
87
|
+
author2 = Author.create(name: 'author2')
|
|
88
|
+
folder1 = Folder.create(name: 'folder1', author_id: author1.id)
|
|
89
|
+
folder2 = Folder.create(name: 'folder2', author_id: author2.id)
|
|
90
|
+
page1 = Page.create(name: 'page1', parent_id: folder1.id, author_id: author1.id)
|
|
91
|
+
page2 = Page.create(name: 'page2', parent_id: folder1.id, author_id: author1.id)
|
|
92
|
+
page3 = Page.create(name: 'page3', parent_id: folder2.id, author_id: author2.id)
|
|
93
|
+
page4 = Page.create(name: 'page4', parent_id: folder2.id, author_id: author2.id)
|
|
82
94
|
|
|
83
|
-
user1 = User.create(:
|
|
84
|
-
user2 = User.create(:
|
|
95
|
+
user1 = User.create(name: 'user1', category: category1)
|
|
96
|
+
user2 = User.create(name: 'user2', category: category1)
|
|
85
97
|
|
|
86
|
-
submission1 = user1.create_submission(:
|
|
87
|
-
submission2 = user2.create_submission(:
|
|
98
|
+
submission1 = user1.create_submission(name: 'submission1')
|
|
99
|
+
submission2 = user2.create_submission(name: 'submission2')
|
|
88
100
|
|
|
89
|
-
submission1.replies.create(:
|
|
90
|
-
submission1.replies.create(:
|
|
91
|
-
submission2.replies.create(:
|
|
92
|
-
submission2.replies.create(:
|
|
101
|
+
submission1.replies.create(name: 'reply1')
|
|
102
|
+
submission1.replies.create(name: 'reply2')
|
|
103
|
+
submission2.replies.create(name: 'reply3')
|
|
104
|
+
submission2.replies.create(name: 'reply4')
|
|
105
|
+
|
|
106
|
+
submission1.create_attachment(file_name: 'submission1 file')
|
|
107
|
+
submission2.create_attachment(file_name: 'submission2 file')
|
|
93
108
|
end
|
|
94
109
|
|
|
95
110
|
def setup_db
|
|
96
|
-
ActiveRecord::Base.establish_connection(:
|
|
111
|
+
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
|
|
97
112
|
|
|
98
|
-
ActiveRecord::Schema.define(:
|
|
113
|
+
ActiveRecord::Schema.define(version: 1) do
|
|
99
114
|
create_table :addresses do |t|
|
|
100
115
|
t.column :name, :string
|
|
101
116
|
t.column :company_id, :integer
|
|
@@ -122,6 +137,7 @@ module Support
|
|
|
122
137
|
|
|
123
138
|
create_table :clients do |t|
|
|
124
139
|
t.column :name, :string
|
|
140
|
+
t.column :group_id, :integer
|
|
125
141
|
end
|
|
126
142
|
|
|
127
143
|
create_table :comments do |t|
|
|
@@ -147,6 +163,11 @@ module Support
|
|
|
147
163
|
t.column :hotel_id, :integer
|
|
148
164
|
end
|
|
149
165
|
|
|
166
|
+
create_table :deals_posts do |t|
|
|
167
|
+
t.column :deal_id, :integer
|
|
168
|
+
t.column :post_id, :integer
|
|
169
|
+
end
|
|
170
|
+
|
|
150
171
|
create_table :documents do |t|
|
|
151
172
|
t.string :name
|
|
152
173
|
t.string :type
|
|
@@ -168,6 +189,10 @@ module Support
|
|
|
168
189
|
t.column :name, :string
|
|
169
190
|
end
|
|
170
191
|
|
|
192
|
+
create_table :groups do |t|
|
|
193
|
+
t.column :name, :string
|
|
194
|
+
end
|
|
195
|
+
|
|
171
196
|
create_table :hotels do |t|
|
|
172
197
|
t.column :name, :string
|
|
173
198
|
t.column :location_id, :integer
|
|
@@ -195,7 +220,7 @@ module Support
|
|
|
195
220
|
t.column :name, :string
|
|
196
221
|
t.column :category_id, :integer
|
|
197
222
|
t.column :writer_id, :integer
|
|
198
|
-
t.column :active, :boolean, :
|
|
223
|
+
t.column :active, :boolean, default: true
|
|
199
224
|
end
|
|
200
225
|
|
|
201
226
|
create_table :relationships do |t|
|
|
@@ -207,7 +232,7 @@ module Support
|
|
|
207
232
|
t.column :name, :string
|
|
208
233
|
end
|
|
209
234
|
|
|
210
|
-
create_table :students_teachers, :
|
|
235
|
+
create_table :students_teachers, id: false do |t|
|
|
211
236
|
t.column :student_id, :integer
|
|
212
237
|
t.column :teacher_id, :integer
|
|
213
238
|
end
|
|
@@ -230,9 +255,12 @@ module Support
|
|
|
230
255
|
t.column :name, :string
|
|
231
256
|
t.column :category_id, :integer
|
|
232
257
|
end
|
|
258
|
+
|
|
259
|
+
create_table :attachments do |t|
|
|
260
|
+
t.column :file_name, :string
|
|
261
|
+
t.column :submission_id, :integer
|
|
262
|
+
end
|
|
233
263
|
end
|
|
234
264
|
end
|
|
235
|
-
|
|
236
|
-
extend self
|
|
237
265
|
end
|
|
238
266
|
end
|
data/tasks/bullet_tasks.rake
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
namespace :bullet do
|
|
2
4
|
namespace :log do
|
|
3
|
-
desc
|
|
5
|
+
desc 'Truncates the bullet log file to zero bytes'
|
|
4
6
|
task :clear do
|
|
5
|
-
f = File.open(
|
|
7
|
+
f = File.open('log/bullet.log', 'w')
|
|
6
8
|
f.close
|
|
7
9
|
end
|
|
8
10
|
end
|
data/test.sh
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
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.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-6.1 bundle exec rspec spec
|
|
4
|
+
BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-6.0 bundle exec rspec spec
|
|
5
|
+
BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle exec rspec spec
|
|
6
|
+
BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle exec rspec spec
|
|
3
7
|
BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle exec rspec spec
|
|
4
8
|
BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle exec rspec spec
|
|
5
9
|
BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle exec rspec spec
|
|
6
10
|
BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle exec rspec spec
|
|
11
|
+
BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle exec rspec spec
|
|
7
12
|
BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle exec rspec spec
|
|
8
13
|
BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle exec rspec spec
|
|
9
14
|
BUNDLE_GEMFILE=Gemfile.mongoid-4.0 bundle && BUNDLE_GEMFILE=Gemfile.mongoid-4.0 bundle exec rspec spec
|
data/update.sh
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
BUNDLE_GEMFILE=Gemfile.rails-5.2 bundle update
|
|
2
|
+
BUNDLE_GEMFILE=Gemfile.rails-5.1 bundle update
|
|
1
3
|
BUNDLE_GEMFILE=Gemfile.rails-5.0 bundle update
|
|
2
4
|
BUNDLE_GEMFILE=Gemfile.rails-4.2 bundle update
|
|
3
5
|
BUNDLE_GEMFILE=Gemfile.rails-4.1 bundle update
|
|
4
6
|
BUNDLE_GEMFILE=Gemfile.rails-4.0 bundle update
|
|
7
|
+
BUNDLE_GEMFILE=Gemfile.mongoid-7.0 bundle update
|
|
5
8
|
BUNDLE_GEMFILE=Gemfile.mongoid-6.0 bundle update
|
|
6
9
|
BUNDLE_GEMFILE=Gemfile.mongoid-5.0 bundle update
|
|
7
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.5
|
|
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-08-16 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.
|
|
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.
|
|
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
|
|
@@ -45,19 +45,24 @@ 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
|
|
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
|
|
62
|
+
- Gemfile.rails-5.1
|
|
63
|
+
- Gemfile.rails-5.2
|
|
64
|
+
- Gemfile.rails-6.0
|
|
65
|
+
- Gemfile.rails-6.1
|
|
61
66
|
- Guardfile
|
|
62
67
|
- Hacking.md
|
|
63
68
|
- MIT-LICENSE
|
|
@@ -65,10 +70,15 @@ files:
|
|
|
65
70
|
- Rakefile
|
|
66
71
|
- bullet.gemspec
|
|
67
72
|
- lib/bullet.rb
|
|
73
|
+
- lib/bullet/active_job.rb
|
|
68
74
|
- lib/bullet/active_record4.rb
|
|
69
75
|
- lib/bullet/active_record41.rb
|
|
70
76
|
- lib/bullet/active_record42.rb
|
|
71
77
|
- lib/bullet/active_record5.rb
|
|
78
|
+
- lib/bullet/active_record52.rb
|
|
79
|
+
- lib/bullet/active_record60.rb
|
|
80
|
+
- lib/bullet/active_record61.rb
|
|
81
|
+
- lib/bullet/bullet_xhr.js
|
|
72
82
|
- lib/bullet/dependency.rb
|
|
73
83
|
- lib/bullet/detector.rb
|
|
74
84
|
- lib/bullet/detector/association.rb
|
|
@@ -81,6 +91,7 @@ files:
|
|
|
81
91
|
- lib/bullet/mongoid4x.rb
|
|
82
92
|
- lib/bullet/mongoid5x.rb
|
|
83
93
|
- lib/bullet/mongoid6x.rb
|
|
94
|
+
- lib/bullet/mongoid7x.rb
|
|
84
95
|
- lib/bullet/notification.rb
|
|
85
96
|
- lib/bullet/notification/base.rb
|
|
86
97
|
- lib/bullet/notification/counter_cache.rb
|
|
@@ -94,6 +105,7 @@ files:
|
|
|
94
105
|
- lib/bullet/registry/object.rb
|
|
95
106
|
- lib/bullet/stack_trace_filter.rb
|
|
96
107
|
- lib/bullet/version.rb
|
|
108
|
+
- lib/generators/bullet/install_generator.rb
|
|
97
109
|
- perf/benchmark.rb
|
|
98
110
|
- rails/init.rb
|
|
99
111
|
- spec/bullet/detector/association_spec.rb
|
|
@@ -113,11 +125,11 @@ files:
|
|
|
113
125
|
- spec/bullet/registry/base_spec.rb
|
|
114
126
|
- spec/bullet/registry/object_spec.rb
|
|
115
127
|
- spec/bullet_spec.rb
|
|
116
|
-
- spec/integration/
|
|
117
|
-
- spec/integration/active_record5/association_spec.rb
|
|
128
|
+
- spec/integration/active_record/association_spec.rb
|
|
118
129
|
- spec/integration/counter_cache_spec.rb
|
|
119
130
|
- spec/integration/mongoid/association_spec.rb
|
|
120
131
|
- spec/models/address.rb
|
|
132
|
+
- spec/models/attachment.rb
|
|
121
133
|
- spec/models/author.rb
|
|
122
134
|
- spec/models/base_user.rb
|
|
123
135
|
- spec/models/category.rb
|
|
@@ -126,10 +138,12 @@ files:
|
|
|
126
138
|
- spec/models/comment.rb
|
|
127
139
|
- spec/models/company.rb
|
|
128
140
|
- spec/models/country.rb
|
|
141
|
+
- spec/models/deal.rb
|
|
129
142
|
- spec/models/document.rb
|
|
130
143
|
- spec/models/entry.rb
|
|
131
144
|
- spec/models/firm.rb
|
|
132
145
|
- spec/models/folder.rb
|
|
146
|
+
- spec/models/group.rb
|
|
133
147
|
- spec/models/mongoid/address.rb
|
|
134
148
|
- spec/models/mongoid/category.rb
|
|
135
149
|
- spec/models/mongoid/comment.rb
|
|
@@ -157,11 +171,13 @@ files:
|
|
|
157
171
|
- tasks/bullet_tasks.rake
|
|
158
172
|
- test.sh
|
|
159
173
|
- update.sh
|
|
160
|
-
homepage:
|
|
174
|
+
homepage: https://github.com/flyerhzm/bullet
|
|
161
175
|
licenses:
|
|
162
176
|
- MIT
|
|
163
|
-
metadata:
|
|
164
|
-
|
|
177
|
+
metadata:
|
|
178
|
+
changelog_uri: https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md
|
|
179
|
+
source_code_uri: https://github.com/flyerhzm/bullet
|
|
180
|
+
post_install_message:
|
|
165
181
|
rdoc_options: []
|
|
166
182
|
require_paths:
|
|
167
183
|
- lib
|
|
@@ -169,16 +185,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
169
185
|
requirements:
|
|
170
186
|
- - ">="
|
|
171
187
|
- !ruby/object:Gem::Version
|
|
172
|
-
version: '
|
|
188
|
+
version: '2.3'
|
|
173
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
190
|
requirements:
|
|
175
191
|
- - ">="
|
|
176
192
|
- !ruby/object:Gem::Version
|
|
177
193
|
version: 1.3.6
|
|
178
194
|
requirements: []
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
signing_key:
|
|
195
|
+
rubygems_version: 3.2.22
|
|
196
|
+
signing_key:
|
|
182
197
|
specification_version: 4
|
|
183
198
|
summary: help to kill N+1 queries and unused eager loading.
|
|
184
199
|
test_files:
|
|
@@ -199,11 +214,11 @@ test_files:
|
|
|
199
214
|
- spec/bullet/registry/base_spec.rb
|
|
200
215
|
- spec/bullet/registry/object_spec.rb
|
|
201
216
|
- spec/bullet_spec.rb
|
|
202
|
-
- spec/integration/
|
|
203
|
-
- spec/integration/active_record5/association_spec.rb
|
|
217
|
+
- spec/integration/active_record/association_spec.rb
|
|
204
218
|
- spec/integration/counter_cache_spec.rb
|
|
205
219
|
- spec/integration/mongoid/association_spec.rb
|
|
206
220
|
- spec/models/address.rb
|
|
221
|
+
- spec/models/attachment.rb
|
|
207
222
|
- spec/models/author.rb
|
|
208
223
|
- spec/models/base_user.rb
|
|
209
224
|
- spec/models/category.rb
|
|
@@ -212,10 +227,12 @@ test_files:
|
|
|
212
227
|
- spec/models/comment.rb
|
|
213
228
|
- spec/models/company.rb
|
|
214
229
|
- spec/models/country.rb
|
|
230
|
+
- spec/models/deal.rb
|
|
215
231
|
- spec/models/document.rb
|
|
216
232
|
- spec/models/entry.rb
|
|
217
233
|
- spec/models/firm.rb
|
|
218
234
|
- spec/models/folder.rb
|
|
235
|
+
- spec/models/group.rb
|
|
219
236
|
- spec/models/mongoid/address.rb
|
|
220
237
|
- spec/models/mongoid/category.rb
|
|
221
238
|
- spec/models/mongoid/comment.rb
|
data/.travis.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
sudo: false
|
|
2
|
-
language: ruby
|
|
3
|
-
rvm:
|
|
4
|
-
- 2.3.0
|
|
5
|
-
gemfile:
|
|
6
|
-
- Gemfile.rails-5.0
|
|
7
|
-
- Gemfile.rails-4.2
|
|
8
|
-
- Gemfile.rails-4.1
|
|
9
|
-
- Gemfile.rails-4.0
|
|
10
|
-
- Gemfile.mongoid-6.0
|
|
11
|
-
- Gemfile.mongoid-5.0
|
|
12
|
-
- Gemfile.mongoid-4.0
|
|
13
|
-
env:
|
|
14
|
-
- DB=sqlite
|
|
15
|
-
services:
|
|
16
|
-
- mongodb
|