bullet 5.6.0 → 5.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Guardfile +2 -2
  4. data/Rakefile +16 -16
  5. data/bullet.gemspec +11 -11
  6. data/lib/bullet.rb +3 -3
  7. data/lib/bullet/detector/association.rb +2 -2
  8. data/lib/bullet/detector/counter_cache.rb +3 -3
  9. data/lib/bullet/detector/n_plus_one_query.rb +5 -5
  10. data/lib/bullet/detector/unused_eager_loading.rb +2 -2
  11. data/lib/bullet/ext/string.rb +1 -1
  12. data/lib/bullet/notification/base.rb +6 -6
  13. data/lib/bullet/notification/counter_cache.rb +1 -1
  14. data/lib/bullet/rack.rb +4 -4
  15. data/lib/bullet/stack_trace_filter.rb +2 -2
  16. data/lib/bullet/version.rb +2 -2
  17. data/lib/generators/bullet/install_generator.rb +5 -5
  18. data/perf/benchmark.rb +3 -3
  19. data/spec/bullet/detector/association_spec.rb +4 -4
  20. data/spec/bullet/detector/counter_cache_spec.rb +11 -11
  21. data/spec/bullet/detector/n_plus_one_query_spec.rb +33 -33
  22. data/spec/bullet/detector/unused_eager_loading_spec.rb +19 -19
  23. data/spec/bullet/ext/object_spec.rb +7 -7
  24. data/spec/bullet/ext/string_spec.rb +5 -5
  25. data/spec/bullet/notification/base_spec.rb +32 -32
  26. data/spec/bullet/notification/counter_cache_spec.rb +2 -2
  27. data/spec/bullet/notification/n_plus_one_query_spec.rb +2 -2
  28. data/spec/bullet/notification/unused_eager_loading_spec.rb +2 -2
  29. data/spec/bullet/notification_collector_spec.rb +10 -10
  30. data/spec/bullet/rack_spec.rb +46 -46
  31. data/spec/bullet/registry/association_spec.rb +10 -10
  32. data/spec/bullet/registry/base_spec.rb +20 -20
  33. data/spec/bullet/registry/object_spec.rb +4 -4
  34. data/spec/integration/active_record/association_spec.rb +101 -101
  35. data/spec/integration/counter_cache_spec.rb +12 -12
  36. data/spec/integration/mongoid/association_spec.rb +33 -33
  37. data/spec/models/comment.rb +1 -1
  38. data/spec/models/document.rb +2 -2
  39. data/spec/models/mongoid/address.rb +1 -1
  40. data/spec/models/mongoid/category.rb +2 -2
  41. data/spec/models/mongoid/comment.rb +1 -1
  42. data/spec/models/mongoid/company.rb +1 -1
  43. data/spec/models/mongoid/entry.rb +1 -1
  44. data/spec/models/mongoid/post.rb +3 -3
  45. data/spec/models/newspaper.rb +1 -1
  46. data/spec/spec_helper.rb +12 -12
  47. data/spec/support/mongo_seed.rb +6 -6
  48. data/spec/support/rack_double.rb +2 -2
  49. data/spec/support/sqlite_seed.rb +6 -6
  50. data/tasks/bullet_tasks.rake +2 -2
  51. metadata +2 -2
@@ -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 => "like first 1")
20
- comment9 = post1a.comments.create(:name => "like first 2")
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: "bullet",
42
- hosts: [ "localhost:27017" ]
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: "bullet",
53
- hosts: [ "localhost:27017" ]
52
+ database: 'bullet',
53
+ hosts: [ 'localhost:27017' ]
54
54
  }
55
55
  }
56
56
  )
@@ -14,7 +14,7 @@ module Support
14
14
  end
15
15
 
16
16
  def headers
17
- @headers ||= {"Content-Type" => "text/html"}
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 ||= "<html><head></head><body></body></html>"
41
+ @body ||= '<html><head></head><body></body></html>'
42
42
  end
43
43
 
44
44
  def body= body
@@ -1,8 +1,8 @@
1
1
  module Support
2
2
  module SqliteSeed
3
3
  def seed_db
4
- newspaper1 = Newspaper.create(:name => "First Newspaper")
5
- newspaper2 = Newspaper.create(:name => "Second Newspaper")
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 => "like first 1", :author => writer1)
26
- comment9 = post1a.comments.create(:name => "like first 2", :author => writer2)
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 => "submission1")
87
- submission2 = user2.create_submission(:name => "submission2")
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')
@@ -1,8 +1,8 @@
1
1
  namespace :bullet do
2
2
  namespace :log do
3
- desc "Truncates the bullet log file to zero bytes"
3
+ desc 'Truncates the bullet log file to zero bytes'
4
4
  task :clear do
5
- f = File.open("log/bullet.log", "w")
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.0
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-07-16 00:00:00.000000000 Z
11
+ date: 2017-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport