Enable the bullet_logger setting; enable raise in test environment

This commit is contained in:
Robert Speicher 2017-03-27 13:28:34 -04:00
parent c2b35320e0
commit f61ded8214
2 changed files with 10 additions and 5 deletions

View file

@ -260,7 +260,6 @@ group :development do
gem 'brakeman', '~> 3.6.0', require: false gem 'brakeman', '~> 3.6.0', require: false
gem 'letter_opener_web', '~> 1.3.0' gem 'letter_opener_web', '~> 1.3.0'
gem 'bullet', '~> 5.5.0', require: false
gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false gem 'rblineprof', '~> 0.3.6', platform: :mri, require: false
# Better errors handler # Better errors handler
@ -272,6 +271,7 @@ group :development do
end end
group :development, :test do group :development, :test do
gem 'bullet', '~> 5.5.0', require: !!ENV['ENABLE_BULLET']
gem 'pry-byebug', '~> 3.4.1', platform: :mri gem 'pry-byebug', '~> 3.4.1', platform: :mri
gem 'pry-rails', '~> 0.3.4' gem 'pry-rails', '~> 0.3.4'

View file

@ -1,6 +1,11 @@
if ENV['ENABLE_BULLET'] if defined?(Bullet) && ENV['ENABLE_BULLET']
require 'bullet' Rails.application.configure do
config.after_initialize do
Bullet.enable = true
Bullet.enable = true Bullet.bullet_logger = true
Bullet.console = true Bullet.console = true
Bullet.raise = Rails.env.test?
end
end
end end