Add Bullet gem to detect N+1 queries.

This commit is contained in:
Guo Xiang Tan 2016-06-28 09:29:42 +08:00
parent fc81209564
commit 9ed79d8ecd
No known key found for this signature in database
GPG Key ID: 19C321C8952B0F72
3 changed files with 12 additions and 0 deletions

View File

@ -144,6 +144,7 @@ group :test, :development do
gem 'spork-rails'
gem 'pry-nav'
gem 'byebug', require: ENV['RM_INFO'].nil?
gem 'bullet'
end
group :development do

View File

@ -62,6 +62,9 @@ GEM
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
bullet (5.0.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.9.0)
byebug (8.2.1)
certified (1.0.0)
coderay (1.1.0)
@ -395,6 +398,7 @@ GEM
unicorn (5.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
uniform_notifier (1.9.0)
PLATFORMS
ruby
@ -407,6 +411,7 @@ DEPENDENCIES
barber
better_errors
binding_of_caller
bullet
byebug
certified
discourse-qunit-rails

View File

@ -52,4 +52,10 @@ Discourse::Application.configure do
config.developer_emails = emails.split(",").map(&:downcase).map(&:strip)
end
config.after_initialize do
Bullet.enable = true
Bullet.alert = true
Bullet.console = true
Bullet.rails_logger = true
end
end