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 | |
parent | c2b35320e05c5e0cb3bdc11fa1418ed5f3e5c76f (diff) | |
download | gitlab-ce-rs-bullet-raise.tar.gz |
Enable the `bullet_logger` setting; enable `raise` in test environmentrs-bullet-raise
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | config/initializers/bullet.rb | 13 |
2 files changed, 10 insertions, 5 deletions
@@ -260,7 +260,6 @@ group :development do gem 'brakeman', '~> 3.6.0', require: false gem 'letter_opener_web', '~> 1.3.0' - gem 'bullet', '~> 5.5.0', require: false gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false # Better errors handler @@ -272,6 +271,7 @@ group :development do end group :development, :test do + gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET'] gem 'pry-byebug', '~> 3.4.1', platform: :mri gem 'pry-rails', '~> 0.3.4' 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 |