2020-06-23 00:09:42 +05:30
|
|
|
def bullet_enabled?
|
|
|
|
Gitlab::Utils.to_boolean(ENV['ENABLE_BULLET'].to_s)
|
|
|
|
end
|
|
|
|
|
|
|
|
if defined?(Bullet) && (bullet_enabled? || Rails.env.development?)
|
2017-08-17 22:00:37 +05:30
|
|
|
Rails.application.configure do
|
|
|
|
config.after_initialize do
|
|
|
|
Bullet.enable = true
|
2015-10-24 18:46:33 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
Bullet.bullet_logger = bullet_enabled?
|
|
|
|
Bullet.console = bullet_enabled?
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
Bullet.raise = Rails.env.test?
|
|
|
|
end
|
|
|
|
end
|
2015-10-24 18:46:33 +05:30
|
|
|
end
|