mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:03:22 +08:00
only enable bullet on demand
This commit is contained in:
parent
c182836709
commit
473363e0fa
2
Gemfile
2
Gemfile
|
@ -144,10 +144,10 @@ 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
|
||||||
|
gem 'bullet', require: !!ENV['BULLET']
|
||||||
gem 'better_errors'
|
gem 'better_errors'
|
||||||
gem 'binding_of_caller'
|
gem 'binding_of_caller'
|
||||||
gem 'librarian', '>= 0.0.25', require: false
|
gem 'librarian', '>= 0.0.25', require: false
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Discourse::Application.configure do
|
Discourse::Application.configure do
|
||||||
|
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
@ -53,7 +54,9 @@ Discourse::Application.configure do
|
||||||
end
|
end
|
||||||
|
|
||||||
config.after_initialize do
|
config.after_initialize do
|
||||||
Bullet.enable = true
|
if ENV['BULLET']
|
||||||
Bullet.rails_logger = true
|
Bullet.enable = true
|
||||||
|
Bullet.rails_logger = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user