only enable bullet on demand

This commit is contained in:
Sam 2016-07-05 11:10:42 +10:00
parent c182836709
commit 473363e0fa
2 changed files with 6 additions and 3 deletions

View file

@ -144,10 +144,10 @@ group :test, :development do
gem 'spork-rails'
gem 'pry-nav'
gem 'byebug', require: ENV['RM_INFO'].nil?
gem 'bullet'
end
group :development do
gem 'bullet', require: !!ENV['BULLET']
gem 'better_errors'
gem 'binding_of_caller'
gem 'librarian', '>= 0.0.25', require: false

View file

@ -1,4 +1,5 @@
Discourse::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
@ -53,7 +54,9 @@ Discourse::Application.configure do
end
config.after_initialize do
if ENV['BULLET']
Bullet.enable = true
Bullet.rails_logger = true
end
end
end