summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2017-03-27 13:28:34 -0400
committerRobert Speicher <rspeicher@gmail.com>2017-04-03 17:15:09 -0400
commitf61ded8214f47870ed9a644fe83bd9978aa3afa6 (patch)
tree2127680f1c788108933cb24a6309ba8347899180 /config
parentc2b35320e05c5e0cb3bdc11fa1418ed5f3e5c76f (diff)
downloadgitlab-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.rb13
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