bullet 4.13.1 → 5.0.0

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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +57 -1
  3. data/CHANGELOG.md +57 -2
  4. data/Gemfile.mongoid +0 -2
  5. data/Gemfile.mongoid-2.4 +2 -4
  6. data/Gemfile.mongoid-2.5 +2 -4
  7. data/Gemfile.mongoid-2.6 +1 -3
  8. data/Gemfile.mongoid-2.7 +2 -4
  9. data/Gemfile.mongoid-2.8 +2 -4
  10. data/Gemfile.mongoid-3.0 +2 -4
  11. data/Gemfile.mongoid-3.1 +2 -4
  12. data/Gemfile.mongoid-4.0 +1 -3
  13. data/Gemfile.mongoid-5.0 +17 -0
  14. data/Gemfile.rails-3.0 +1 -3
  15. data/Gemfile.rails-3.1 +1 -3
  16. data/Gemfile.rails-3.2 +1 -3
  17. data/Gemfile.rails-4.0 +1 -3
  18. data/Gemfile.rails-4.1 +1 -3
  19. data/Gemfile.rails-4.2 +17 -0
  20. data/Gemfile.rails-5.0 +17 -0
  21. data/README.md +31 -2
  22. data/bullet.gemspec +1 -1
  23. data/lib/bullet/active_record3.rb +65 -35
  24. data/lib/bullet/active_record3x.rb +54 -32
  25. data/lib/bullet/active_record4.rb +62 -30
  26. data/lib/bullet/active_record41.rb +63 -32
  27. data/lib/bullet/active_record42.rb +214 -0
  28. data/lib/bullet/active_record5.rb +217 -0
  29. data/lib/bullet/dependency.rb +22 -0
  30. data/lib/bullet/detector/association.rb +16 -16
  31. data/lib/bullet/detector/counter_cache.rb +13 -13
  32. data/lib/bullet/detector/n_plus_one_query.rb +33 -24
  33. data/lib/bullet/detector/unused_eager_loading.rb +2 -2
  34. data/lib/bullet/ext/object.rb +4 -2
  35. data/lib/bullet/mongoid5x.rb +56 -0
  36. data/lib/bullet/notification/base.rb +7 -11
  37. data/lib/bullet/notification/n_plus_one_query.rb +6 -4
  38. data/lib/bullet/rack.rb +20 -13
  39. data/lib/bullet/version.rb +1 -1
  40. data/lib/bullet.rb +29 -12
  41. data/spec/bullet/detector/counter_cache_spec.rb +8 -8
  42. data/spec/bullet/detector/n_plus_one_query_spec.rb +42 -27
  43. data/spec/bullet/ext/object_spec.rb +6 -0
  44. data/spec/bullet/notification/base_spec.rb +4 -29
  45. data/spec/bullet/notification/n_plus_one_query_spec.rb +3 -3
  46. data/spec/bullet/notification/unused_eager_loading_spec.rb +1 -1
  47. data/spec/bullet/rack_spec.rb +3 -3
  48. data/spec/bullet_spec.rb +47 -0
  49. data/spec/integration/active_record3/association_spec.rb +11 -2
  50. data/spec/integration/active_record4/association_spec.rb +58 -3
  51. data/spec/integration/active_record5/association_spec.rb +715 -0
  52. data/spec/integration/counter_cache_spec.rb +17 -1
  53. data/spec/models/category.rb +4 -1
  54. data/spec/models/comment.rb +2 -0
  55. data/spec/models/post.rb +7 -2
  56. data/spec/models/reply.rb +3 -0
  57. data/spec/models/submission.rb +1 -1
  58. data/spec/spec_helper.rb +3 -2
  59. data/spec/support/mongo_seed.rb +13 -0
  60. data/spec/support/sqlite_seed.rb +14 -6
  61. data/test.sh +2 -0
  62. data/update.sh +15 -0
  63. metadata +18 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4c663f19d349dc9be3a82803ba5e5af344ed0e2
4
- data.tar.gz: f996a53cd2ce05eb85f11e55477b41d7b6f841f8
3
+ metadata.gz: d5439116cdedcd96dfad6dfd315eaf47ee815153
4
+ data.tar.gz: 9542679b93fa670fbf8b014fb0cbd3adb13a30d8
5
5
  SHA512:
6
- metadata.gz: 9fe6ad4a5e0b23c19815a121e8b3dec2989c04f2e81836eba4a096a06b68ae7b33c7c202c1a7a99e697a48bd5bd29711b7ad0a2b17e1d203e32cc964a0e95314
7
- data.tar.gz: 77e4bc950eaa4e0e87fd32beaa6f11a605e1e443b0de0f3fbea89798cd11721c3c6a4fa0c9f70bad5c3b7f65586a56b050e38265a21d57d57244e219ab0f8501
6
+ metadata.gz: 4704ead627526344ab065d5d0a9bd2f3516165f664d9ab97aca3dd576c55ecc75450636daceebe21d100562be45c5e9352296ea0cd5856b0a4205be2120751cb
7
+ data.tar.gz: 6b3d52be604e5188920592e6b3952d2a683364631739c097b619b151f9131b911454452eae824e13493a4866ff767eb9ba61da3a98097aa3042e498faf74bdd6
data/.travis.yml CHANGED
@@ -1,12 +1,20 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  rvm:
3
- - 2.1.2
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+ - 2.2.3
4
8
  gemfile:
9
+ - Gemfile.rails-5.0
10
+ - Gemfile.rails-4.2
5
11
  - Gemfile.rails-4.1
6
12
  - Gemfile.rails-4.0
7
13
  - Gemfile.rails-3.2
8
14
  - Gemfile.rails-3.1
9
15
  - Gemfile.rails-3.0
16
+ - Gemfile.mongoid-5.0
17
+ - Gemfile.mongoid-4.0
10
18
  - Gemfile.mongoid-3.1
11
19
  - Gemfile.mongoid-3.0
12
20
  - Gemfile.mongoid-2.8
@@ -18,3 +26,51 @@ env:
18
26
  - DB=sqlite
19
27
  services:
20
28
  - mongodb
29
+ matrix:
30
+ exclude:
31
+ - rvm: 2.0
32
+ gemfile: Gemfile.rails-5.0
33
+ - rvm: 2.1
34
+ gemfile: Gemfile.rails-5.0
35
+ - rvm: 2.2
36
+ gemfile: Gemfile.rails-5.0
37
+ - rvm: 2.2
38
+ gemfile: Gemfile.rails-3.0
39
+ - rvm: 2.2
40
+ gemfile: Gemfile.rails-3.1
41
+ - rvm: 2.2
42
+ gemfile: Gemfile.rails-3.2
43
+ - rvm: 2.2
44
+ gemfile: Gemfile.mongoid-3.1
45
+ - rvm: 2.2
46
+ gemfile: Gemfile.mongoid-3.0
47
+ - rvm: 2.2
48
+ gemfile: Gemfile.mongoid-2.8
49
+ - rvm: 2.2
50
+ gemfile: Gemfile.mongoid-2.7
51
+ - rvm: 2.2
52
+ gemfile: Gemfile.mongoid-2.6
53
+ - rvm: 2.2
54
+ gemfile: Gemfile.mongoid-2.5
55
+ - rvm: 2.2
56
+ gemfile: Gemfile.mongoid-2.4
57
+ - rvm: 2.2.3
58
+ gemfile: Gemfile.rails-3.0
59
+ - rvm: 2.2.3
60
+ gemfile: Gemfile.rails-3.1
61
+ - rvm: 2.2.3
62
+ gemfile: Gemfile.rails-3.2
63
+ - rvm: 2.2.3
64
+ gemfile: Gemfile.mongoid-3.1
65
+ - rvm: 2.2.3
66
+ gemfile: Gemfile.mongoid-3.0
67
+ - rvm: 2.2.3
68
+ gemfile: Gemfile.mongoid-2.8
69
+ - rvm: 2.2.3
70
+ gemfile: Gemfile.mongoid-2.7
71
+ - rvm: 2.2.3
72
+ gemfile: Gemfile.mongoid-2.6
73
+ - rvm: 2.2.3
74
+ gemfile: Gemfile.mongoid-2.5
75
+ - rvm: 2.2.3
76
+ gemfile: Gemfile.mongoid-2.4
data/CHANGELOG.md CHANGED
@@ -1,8 +1,63 @@
1
1
  # Next Release
2
2
 
3
- ## 4.13.1
3
+ ## 5.0.0 (01/06/2015)
4
4
 
5
- * Fix swallow exception issue
5
+ * Support Rails 5.0.0.beta1
6
+
7
+ ## 4.14.10
8
+
9
+ * Fix `has_many :through` infinite loop issue
10
+
11
+ ## 4.14.9
12
+
13
+ * Support mongoid 5.0.0
14
+ * Do not report association queries immediately after object creation to
15
+ require a preload
16
+ * Detect `counter_cache` for `has_many :through` association
17
+
18
+ ## 4.14.8
19
+
20
+ * compatible with `composite_primary_keys` gem
21
+
22
+ ## 4.14.7
23
+
24
+ * Fix AR 4.2 SingularAssociation#reader result can be nil
25
+ * `perform_out_of_channel_notifications` should always be triggered
26
+
27
+ ## 4.14.6
28
+
29
+ * Fix false positive with `belongs_to` -> `belongs_to` for active\_record 4.2
30
+ * Activate active\_record hacks only when Bullet already start
31
+
32
+ ## 4.14.5
33
+
34
+ * Don't execute query when running `to_sql`
35
+ * Send backtrace to `uniform_notifier`
36
+ * Fix sse response check
37
+ * Dynamically delegate available notifiers to UniformNotifier
38
+
39
+ ## 4.14.4
40
+
41
+ * Fix false N + 1 warnings on Rails 4.2
42
+
43
+ ## 4.14.3
44
+
45
+ * Fix false positive on create
46
+
47
+ ## 4.14.2
48
+
49
+ * Hotfix nil object when `add_impossible_object`
50
+
51
+ ## 4.14.1
52
+
53
+ * Fix `has_one` then `has_many` associations in rails 4.2
54
+ * Append js and dom to html body in proper position
55
+
56
+ ## 4.14.0 (10/03/2014)
57
+
58
+ * Support rails 4.2
59
+ * Polish notification output
60
+ * Fix warning: `*' interpreted as argument prefix
6
61
 
7
62
  ## 4.13.0 (07/19/2014)
8
63
 
data/Gemfile.mongoid CHANGED
@@ -8,7 +8,5 @@ gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'mongoid', github: 'mongoid/mongoid'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
data/Gemfile.mongoid-2.4 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 2.4.12'
8
+ gem 'mongoid', '~> 2.4.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-2.5 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 2.5.2'
8
+ gem 'mongoid', '~> 2.5.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-2.6 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'mongoid', '~> 2.6.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-2.7 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 2.7.1'
8
+ gem 'mongoid', '~> 2.7.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-2.8 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 2.8'
8
+ gem 'mongoid', '~> 2.8.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-3.0 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 3.0.23'
8
+ gem 'mongoid', '~> 3.0.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-3.1 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.16'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
- gem 'mongoid', '~> 3.1.6'
8
+ gem 'mongoid', '~> 3.1.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.mongoid-4.0 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 4.0.5'
5
+ gem 'rails', '~> 4.0.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'mongoid', '~> 4.0.0'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
@@ -0,0 +1,17 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '~> 4.0.0'
6
+ gem 'sqlite3', platforms: [:ruby]
7
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
+ gem 'mongoid', '~> 5.0.0.beta', github: 'mongoid'
9
+
10
+ gem "rspec"
11
+
12
+ gem 'coveralls', require: false
13
+
14
+ platforms :rbx do
15
+ gem 'rubysl', '~> 2.0'
16
+ gem 'rubinius-developer_tools'
17
+ end
data/Gemfile.rails-3.0 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.0.20'
5
+ gem 'rails', '~> 3.0.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'activerecord-import'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.rails-3.1 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.1.12'
5
+ gem 'rails', '~> 3.1.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'activerecord-import'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.rails-3.2 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 3.2.19'
5
+ gem 'rails', '~> 3.2.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'activerecord-import'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.rails-4.0 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 4.0.8'
5
+ gem 'rails', '~> 4.0.0'
6
6
  gem 'sqlite3', platforms: [:ruby]
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'activerecord-import'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.rails-4.1 CHANGED
@@ -2,14 +2,12 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 4.1.4'
5
+ gem 'rails', '~> 4.1.0'
6
6
  gem 'sqlite3'
7
7
  gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
8
  gem 'activerecord-import'
9
9
 
10
10
  gem "rspec"
11
- gem "guard"
12
- gem "guard-rspec"
13
11
 
14
12
  gem 'coveralls', require: false
15
13
 
data/Gemfile.rails-4.2 ADDED
@@ -0,0 +1,17 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '~> 4.2.0'
6
+ gem 'sqlite3'
7
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
+ gem 'activerecord-import'
9
+
10
+ gem "rspec"
11
+
12
+ gem 'coveralls', require: false
13
+
14
+ platforms :rbx do
15
+ gem 'rubysl', '~> 2.0'
16
+ gem 'rubinius-developer_tools'
17
+ end
data/Gemfile.rails-5.0 ADDED
@@ -0,0 +1,17 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
4
+
5
+ gem 'rails', '5.0.0.beta1'
6
+ gem 'sqlite3'
7
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
8
+ gem 'activerecord-import'
9
+
10
+ gem "rspec"
11
+
12
+ gem 'coveralls', require: false
13
+
14
+ platforms :rbx do
15
+ gem 'rubysl', '~> 2.0'
16
+ gem 'rubinius-developer_tools'
17
+ end
data/README.md CHANGED
@@ -36,6 +36,9 @@ or add it into a Gemfile (Bundler):
36
36
  gem "bullet", :group => "development"
37
37
  ```
38
38
 
39
+ **Note**: make sure `bullet` gem is added after activerecord (rails) and
40
+ mongoid.
41
+
39
42
  ## Configuration
40
43
 
41
44
  Bullet won't do ANYTHING unless you tell it to explicitly. Append to
@@ -53,10 +56,14 @@ config.after_initialize do
53
56
  :receiver => 'your_account@jabber.org',
54
57
  :show_online_status => true }
55
58
  Bullet.rails_logger = true
59
+ Bullet.honeybadger = true
56
60
  Bullet.bugsnag = true
57
61
  Bullet.airbrake = true
62
+ Bullet.rollbar = true
58
63
  Bullet.add_footer = true
59
64
  Bullet.stacktrace_includes = [ 'your_gem', 'your_middleware' ]
65
+ Bullet.stacktrace_excludes = [ 'their_gem', 'their_middleware' ]
66
+ Bullet.slack = { webhook_url: 'http://some.slack.url', foo: 'bar' }
60
67
  end
61
68
  ```
62
69
 
@@ -67,13 +74,18 @@ The code above will enable all seven of the Bullet notification systems:
67
74
  * `Bullet.alert`: pop up a JavaScript alert in the browser
68
75
  * `Bullet.bullet_logger`: log to the Bullet log file (Rails.root/log/bullet.log)
69
76
  * `Bullet.rails_logger`: add warnings directly to the Rails log
77
+ * `Bullet.honeybadger`: add notifications to Honeybadger
78
+ * `Bullet.bugsnag`: add notifications to bugsnag
70
79
  * `Bullet.airbrake`: add notifications to airbrake
80
+ * `Bullet.rollbar`: add notifications to rollbar
71
81
  * `Bullet.console`: log warnings to your browser's console.log (Safari/Webkit browsers or Firefox w/Firebug installed)
72
82
  * `Bullet.growl`: pop up Growl warnings if your system has Growl installed. Requires a little bit of configuration
73
83
  * `Bullet.xmpp`: send XMPP/Jabber notifications to the receiver indicated. Note that the code will currently not handle the adding of contacts, so you will need to make both accounts indicated know each other manually before you will receive any notifications. If you restart the development server frequently, the 'coming online' sound for the Bullet account may start to annoy - in this case set :show_online_status to false; you will still get notifications, but the Bullet account won't announce it's online status anymore.
74
84
  * `Bullet.raise`: raise errors, useful for making your specs fail unless they have optimized queries
75
85
  * `Bullet.add_footer`: adds the details in the bottom left corner of the page
76
86
  * `Bullet.stacktrace_includes`: include paths with any of these substrings in the stack trace, even if they are not in your main app
87
+ * `Bullet.stacktrace_excludes`: ignore paths with any of these substrings in the stack trace, even if they are not in your main app.
88
+ * `Bullet.slack`: add notifications to slack
77
89
 
78
90
  Bullet also allows you to disable any of its detectors.
79
91
 
@@ -102,6 +114,22 @@ Bullet.add_whitelist :type => :unused_eager_loading, :class_name => "Post", :ass
102
114
  Bullet.add_whitelist :type => :counter_cache, :class_name => "Country", :association => :cities
103
115
  ```
104
116
 
117
+ If you want to skip bullet in some specific controller actions, you can
118
+ do like
119
+
120
+ ```ruby
121
+ class ApplicationController < ActionController::Base
122
+ around_action :skip_bullet
123
+
124
+ def skip_bullet
125
+ Bullet.enable = false
126
+ yield
127
+ ensure
128
+ Bullet.enable = true
129
+ end
130
+ end
131
+ ```
132
+
105
133
  ## Log
106
134
 
107
135
  The Bullet log `log/bullet.log` will look something like this:
@@ -153,8 +181,9 @@ The Bullet gem uses rack middleware to profile requests. If you want to use Bull
153
181
  ```ruby
154
182
  Bullet.profile do
155
183
  # do anything
184
+
185
+ warnings = Bullet.warnings
156
186
  end
157
- warnings = Bullet.warnings
158
187
  ```
159
188
 
160
189
  ### Work with sinatra
@@ -429,4 +458,4 @@ Meanwhile, there's a line appended to `log/bullet.log`
429
458
  Post => [:comments]
430
459
  ```
431
460
 
432
- Copyright (c) 2009 - 2014 Richard Huang (flyerhzm@gmail.com), released under the MIT license
461
+ Copyright (c) 2009 - 2015 Richard Huang (flyerhzm@gmail.com), released under the MIT license
data/bullet.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.required_rubygems_version = ">= 1.3.6"
19
19
 
20
20
  s.add_runtime_dependency "activesupport", ">= 3.0.0"
21
- s.add_runtime_dependency "uniform_notifier", ">= 1.6.0"
21
+ s.add_runtime_dependency "uniform_notifier", "~> 1.9.0"
22
22
 
23
23
  s.files = `git ls-files`.split("\n")
24
24
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")