bullet 5.6.0 → 5.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Guardfile +2 -2
- data/Rakefile +16 -16
- data/bullet.gemspec +11 -11
- data/lib/bullet.rb +3 -3
- data/lib/bullet/detector/association.rb +2 -2
- data/lib/bullet/detector/counter_cache.rb +3 -3
- data/lib/bullet/detector/n_plus_one_query.rb +5 -5
- data/lib/bullet/detector/unused_eager_loading.rb +2 -2
- data/lib/bullet/ext/string.rb +1 -1
- data/lib/bullet/notification/base.rb +6 -6
- data/lib/bullet/notification/counter_cache.rb +1 -1
- data/lib/bullet/rack.rb +4 -4
- data/lib/bullet/stack_trace_filter.rb +2 -2
- data/lib/bullet/version.rb +2 -2
- data/lib/generators/bullet/install_generator.rb +5 -5
- data/perf/benchmark.rb +3 -3
- data/spec/bullet/detector/association_spec.rb +4 -4
- data/spec/bullet/detector/counter_cache_spec.rb +11 -11
- data/spec/bullet/detector/n_plus_one_query_spec.rb +33 -33
- data/spec/bullet/detector/unused_eager_loading_spec.rb +19 -19
- data/spec/bullet/ext/object_spec.rb +7 -7
- data/spec/bullet/ext/string_spec.rb +5 -5
- data/spec/bullet/notification/base_spec.rb +32 -32
- data/spec/bullet/notification/counter_cache_spec.rb +2 -2
- data/spec/bullet/notification/n_plus_one_query_spec.rb +2 -2
- data/spec/bullet/notification/unused_eager_loading_spec.rb +2 -2
- data/spec/bullet/notification_collector_spec.rb +10 -10
- data/spec/bullet/rack_spec.rb +46 -46
- data/spec/bullet/registry/association_spec.rb +10 -10
- data/spec/bullet/registry/base_spec.rb +20 -20
- data/spec/bullet/registry/object_spec.rb +4 -4
- data/spec/integration/active_record/association_spec.rb +101 -101
- data/spec/integration/counter_cache_spec.rb +12 -12
- data/spec/integration/mongoid/association_spec.rb +33 -33
- data/spec/models/comment.rb +1 -1
- data/spec/models/document.rb +2 -2
- data/spec/models/mongoid/address.rb +1 -1
- data/spec/models/mongoid/category.rb +2 -2
- data/spec/models/mongoid/comment.rb +1 -1
- data/spec/models/mongoid/company.rb +1 -1
- data/spec/models/mongoid/entry.rb +1 -1
- data/spec/models/mongoid/post.rb +3 -3
- data/spec/models/newspaper.rb +1 -1
- data/spec/spec_helper.rb +12 -12
- data/spec/support/mongo_seed.rb +6 -6
- data/spec/support/rack_double.rb +2 -2
- data/spec/support/sqlite_seed.rb +6 -6
- data/tasks/bullet_tasks.rake +2 -2
- metadata +2 -2
data/spec/support/mongo_seed.rb
CHANGED
@@ -16,8 +16,8 @@ module Support
|
|
16
16
|
comment2 = post1.comments.create(:name => 'first2')
|
17
17
|
comment3 = post1.comments.create(:name => 'first3')
|
18
18
|
comment4 = post1.comments.create(:name => 'second')
|
19
|
-
comment8 = post1a.comments.create(:name =>
|
20
|
-
comment9 = post1a.comments.create(:name =>
|
19
|
+
comment8 = post1a.comments.create(:name => 'like first 1')
|
20
|
+
comment9 = post1a.comments.create(:name => 'like first 2')
|
21
21
|
comment5 = post2.comments.create(:name => 'third')
|
22
22
|
comment6 = post2.comments.create(:name => 'fourth')
|
23
23
|
comment7 = post2.comments.create(:name => 'fourth')
|
@@ -38,8 +38,8 @@ module Support
|
|
38
38
|
config.load_configuration(
|
39
39
|
sessions: {
|
40
40
|
default: {
|
41
|
-
database:
|
42
|
-
hosts: [
|
41
|
+
database: 'bullet',
|
42
|
+
hosts: [ 'localhost:27017' ]
|
43
43
|
}
|
44
44
|
}
|
45
45
|
)
|
@@ -49,8 +49,8 @@ module Support
|
|
49
49
|
config.load_configuration(
|
50
50
|
clients: {
|
51
51
|
default: {
|
52
|
-
database:
|
53
|
-
hosts: [
|
52
|
+
database: 'bullet',
|
53
|
+
hosts: [ 'localhost:27017' ]
|
54
54
|
}
|
55
55
|
}
|
56
56
|
)
|
data/spec/support/rack_double.rb
CHANGED
@@ -14,7 +14,7 @@ module Support
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def headers
|
17
|
-
@headers ||= {
|
17
|
+
@headers ||= {'Content-Type' => 'text/html'}
|
18
18
|
@headers
|
19
19
|
end
|
20
20
|
|
@@ -38,7 +38,7 @@ module Support
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def body
|
41
|
-
@body ||=
|
41
|
+
@body ||= '<html><head></head><body></body></html>'
|
42
42
|
end
|
43
43
|
|
44
44
|
def body= body
|
data/spec/support/sqlite_seed.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Support
|
2
2
|
module SqliteSeed
|
3
3
|
def seed_db
|
4
|
-
newspaper1 = Newspaper.create(:name =>
|
5
|
-
newspaper2 = Newspaper.create(:name =>
|
4
|
+
newspaper1 = Newspaper.create(:name => 'First Newspaper')
|
5
|
+
newspaper2 = Newspaper.create(:name => 'Second Newspaper')
|
6
6
|
|
7
7
|
writer1 = Writer.create(:name => 'first', :newspaper => newspaper1)
|
8
8
|
writer2 = Writer.create(:name => 'second', :newspaper => newspaper2)
|
@@ -22,8 +22,8 @@ module Support
|
|
22
22
|
comment2 = post1.comments.create(:name => 'first2', :author => writer1)
|
23
23
|
comment3 = post1.comments.create(:name => 'first3', :author => writer1)
|
24
24
|
comment4 = post1.comments.create(:name => 'second', :author => writer2)
|
25
|
-
comment8 = post1a.comments.create(:name =>
|
26
|
-
comment9 = post1a.comments.create(:name =>
|
25
|
+
comment8 = post1a.comments.create(:name => 'like first 1', :author => writer1)
|
26
|
+
comment9 = post1a.comments.create(:name => 'like first 2', :author => writer2)
|
27
27
|
comment5 = post2.comments.create(:name => 'third', :author => user1)
|
28
28
|
comment6 = post2.comments.create(:name => 'fourth', :author => user2)
|
29
29
|
comment7 = post2.comments.create(:name => 'fourth', :author => writer1)
|
@@ -83,8 +83,8 @@ module Support
|
|
83
83
|
user1 = User.create(:name => 'user1', :category => category1)
|
84
84
|
user2 = User.create(:name => 'user2', :category => category1)
|
85
85
|
|
86
|
-
submission1 = user1.create_submission(:name =>
|
87
|
-
submission2 = user2.create_submission(:name =>
|
86
|
+
submission1 = user1.create_submission(:name => 'submission1')
|
87
|
+
submission2 = user2.create_submission(:name => 'submission2')
|
88
88
|
|
89
89
|
submission1.replies.create(:name => 'reply1')
|
90
90
|
submission1.replies.create(:name => 'reply2')
|
data/tasks/bullet_tasks.rake
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
namespace :bullet do
|
2
2
|
namespace :log do
|
3
|
-
desc
|
3
|
+
desc 'Truncates the bullet log file to zero bytes'
|
4
4
|
task :clear do
|
5
|
-
f = File.open(
|
5
|
+
f = File.open('log/bullet.log', 'w')
|
6
6
|
f.close
|
7
7
|
end
|
8
8
|
end
|
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: 5.6.
|
4
|
+
version: 5.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Huang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|