diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-03-27 13:28:34 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-04-03 17:15:09 -0400 |
commit | f61ded8214f47870ed9a644fe83bd9978aa3afa6 (patch) | |
tree | 2127680f1c788108933cb24a6309ba8347899180 /config | |
parent | c2b35320e05c5e0cb3bdc11fa1418ed5f3e5c76f (diff) | |
download | gitlab-ce-f61ded8214f47870ed9a644fe83bd9978aa3afa6.tar.gz |
Enable the `bullet_logger` setting; enable `raise` in test environmentrs-bullet-raise
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/bullet.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/config/initializers/bullet.rb b/config/initializers/bullet.rb index 95e82966c7a..0ade7109420 100644 --- a/config/initializers/bullet.rb +++ b/config/initializers/bullet.rb @@ -1,6 +1,11 @@ -if ENV['ENABLE_BULLET'] - require 'bullet' +if defined?(Bullet) && ENV['ENABLE_BULLET'] + Rails.application.configure do + config.after_initialize do + Bullet.enable = true - Bullet.enable = true - Bullet.console = true + Bullet.bullet_logger = true + Bullet.console = true + Bullet.raise = Rails.env.test? + end + end end |