lib/bullet.rb in bullet-6.1.2 vs lib/bullet.rb in bullet-6.1.3

- old
+ new

@@ -39,11 +39,11 @@ :stacktrace_excludes, :skip_html_injection attr_reader :whitelist attr_accessor :add_footer, :orm_patches_applied - available_notifiers = UniformNotifier::AVAILABLE_NOTIFIERS.map { |notifier| "#{notifier}=" } + available_notifiers = UniformNotifier::AVAILABLE_NOTIFIERS.select { |notifier| notifier != :raise }.map { |notifier| "#{notifier}=" } available_notifiers_options = { to: UniformNotifier } delegate(*available_notifiers, **available_notifiers_options) def raise=(should_raise) UniformNotifier.raise = (should_raise ? Notification::UnoptimizedQueryError : false) @@ -87,15 +87,15 @@ def counter_cache_enable? enable? && !!@counter_cache_enable end def stacktrace_includes - @stacktrace_includes || [] + @stacktrace_includes ||= [] end def stacktrace_excludes - @stacktrace_excludes || [] + @stacktrace_excludes ||= [] end def add_whitelist(options) reset_whitelist @whitelist[options[:type]][options[:class_name]] ||= [] @@ -239,10 +239,12 @@ def console_enabled? UniformNotifier.active_notifiers.include?(UniformNotifier::JavascriptConsole) end def inject_into_page? - !@skip_html_injection && (console_enabled? || add_footer) + return false if defined?(@skip_html_injection) && @skip_html_injection + + console_enabled? || add_footer end private def for_each_active_notifier_with_notification