From 473363e0faf829301295562aeda187a17f9ba08a Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 5 Jul 2016 11:10:42 +1000 Subject: [PATCH] only enable bullet on demand --- Gemfile | 2 +- config/environments/development.rb | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index dbea62d2a90..e23b919a510 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/config/environments/development.rb b/config/environments/development.rb index 992a231e8ee..a422173a670 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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 - Bullet.enable = true - Bullet.rails_logger = true + if ENV['BULLET'] + Bullet.enable = true + Bullet.rails_logger = true + end end end