mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 19:31:03 +08:00
Add Bullet gem to detect N+1 queries.
This commit is contained in:
1
Gemfile
1
Gemfile
@ -144,6 +144,7 @@ group :test, :development do
|
|||||||
gem 'spork-rails'
|
gem 'spork-rails'
|
||||||
gem 'pry-nav'
|
gem 'pry-nav'
|
||||||
gem 'byebug', require: ENV['RM_INFO'].nil?
|
gem 'byebug', require: ENV['RM_INFO'].nil?
|
||||||
|
gem 'bullet'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
@ -62,6 +62,9 @@ GEM
|
|||||||
binding_of_caller (0.7.2)
|
binding_of_caller (0.7.2)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
|
bullet (5.0.0)
|
||||||
|
activesupport (>= 3.0.0)
|
||||||
|
uniform_notifier (~> 1.9.0)
|
||||||
byebug (8.2.1)
|
byebug (8.2.1)
|
||||||
certified (1.0.0)
|
certified (1.0.0)
|
||||||
coderay (1.1.0)
|
coderay (1.1.0)
|
||||||
@ -395,6 +398,7 @@ GEM
|
|||||||
unicorn (5.1.0)
|
unicorn (5.1.0)
|
||||||
kgio (~> 2.6)
|
kgio (~> 2.6)
|
||||||
raindrops (~> 0.7)
|
raindrops (~> 0.7)
|
||||||
|
uniform_notifier (1.9.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@ -407,6 +411,7 @@ DEPENDENCIES
|
|||||||
barber
|
barber
|
||||||
better_errors
|
better_errors
|
||||||
binding_of_caller
|
binding_of_caller
|
||||||
|
bullet
|
||||||
byebug
|
byebug
|
||||||
certified
|
certified
|
||||||
discourse-qunit-rails
|
discourse-qunit-rails
|
||||||
|
@ -52,4 +52,10 @@ Discourse::Application.configure do
|
|||||||
config.developer_emails = emails.split(",").map(&:downcase).map(&:strip)
|
config.developer_emails = emails.split(",").map(&:downcase).map(&:strip)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
config.after_initialize do
|
||||||
|
Bullet.enable = true
|
||||||
|
Bullet.alert = true
|
||||||
|
Bullet.console = true
|
||||||
|
Bullet.rails_logger = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user