mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:57:29 +08:00
Add Bullet gem to detect N+1 queries.
This commit is contained in:
parent
fc81209564
commit
9ed79d8ecd
1
Gemfile
1
Gemfile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user