lib/bullet.rb in bullet-4.11.3 vs lib/bullet.rb in bullet-4.12.0

- old
+ new

@@ -94,21 +94,22 @@ UniformNotifier.customized_logger = bullet_log_file end end def debug(title, message) - puts "[Bullet][#{title}] #{message}" if ENV['DEBUG'] == 'true' + puts "[Bullet][#{title}] #{message}" if ENV['BULLET_DEBUG'] == 'true' end def start_request Thread.current[:bullet_start] = true Thread.current[:bullet_notification_collector] = Bullet::NotificationCollector.new Thread.current[:bullet_object_associations] = Bullet::Registry::Base.new Thread.current[:bullet_call_object_associations] = Bullet::Registry::Base.new Thread.current[:bullet_possible_objects] = Bullet::Registry::Object.new Thread.current[:bullet_impossible_objects] = Bullet::Registry::Object.new + Thread.current[:bullet_inversed_objects] = Bullet::Registry::Base.new Thread.current[:bullet_eager_loadings] = Bullet::Registry::Association.new Thread.current[:bullet_counter_possible_objects] ||= Bullet::Registry::Object.new Thread.current[:bullet_counter_impossible_objects] ||= Bullet::Registry::Object.new end @@ -116,12 +117,13 @@ def end_request Thread.current[:bullet_start] = nil Thread.current[:bullet_notification_collector] = nil Thread.current[:bullet_object_associations] = nil + Thread.current[:bullet_call_object_associations] = nil Thread.current[:bullet_possible_objects] = nil Thread.current[:bullet_impossible_objects] = nil - Thread.current[:bullet_call_object_associations] = nil + Thread.current[:bullet_inversed_objects] = nil Thread.current[:bullet_eager_loadings] = nil Thread.current[:bullet_counter_possible_objects] = nil Thread.current[:bullet_counter_impossible_objects] = nil end