Browse files

Rename Notice to Notification Part 2

  • Loading branch information...
1 parent c3eeb0d commit 5efb45f80bc1339e631dbcc2e407c60232ff1c95 Sven Riedel committed Jun 14, 2010
View
1 lib/bullet.rb
@@ -13,7 +13,6 @@ module Bullet
autoload :BulletLogger, 'bullet/logger'
autoload :Notification, 'bullet/notification'
autoload :Presenter, 'bullet/presenter'
- autoload :Notice, 'bullet/notice'
class <<self
attr_accessor :enable, :alert, :console, :growl, :growl_password, :rails_logger, :bullet_logger, :logger, :logger_file, :disable_browser_cache
View
7 lib/bullet/detector/counter.rb
@@ -8,15 +8,10 @@ def self.clear
def self.add_counter_cache(object, associations)
klazz = object.class
- Rails.logger.debug "Possible objects does #{"not" unless possible_objects[klazz]} contain #{klazz}"
- Rails.logger.debug "Impossible objects does #{"not" unless impossible_objects[klazz]} contain #{klazz}"
if (!possible_objects[klazz].nil? and possible_objects[klazz].include?(object)) and
(impossible_objects[klazz].nil? or !impossible_objects[klazz].include?(object))
- notice = Bullet::Notice::CounterCache.new klazz, associations
+ notice = Bullet::Notification::CounterCache.new klazz, associations
Bullet.add_notification notice
- Rails.logger.debug "Notice generated"
- else
- Rails.logger.debug "No notice generated"
end
end
View
2 lib/bullet/detector/n_plus_one_query.rb
@@ -2,7 +2,7 @@ module Bullet
module Detector
class NPlusOneQuery < Association
def self.add_unpreload_associations(klazz, associations)
- notice = Bullet::Notice::NPlusOneQuery.new( callers, klazz, associations )
+ notice = Bullet::Notification::NPlusOneQuery.new( callers, klazz, associations )
Bullet.add_notification( notice )
end
View
2 lib/bullet/detector/unused_eager_association.rb
@@ -2,7 +2,7 @@ module Bullet
module Detector
class UnusedEagerAssociation < Association
def self.add_unused_preload_associations(klazz, associations)
- notice = Bullet::Notice::UnusedEagerLoading.new( callers, klazz, associations )
+ notice = Bullet::Notification::UnusedEagerLoading.new( callers, klazz, associations )
Bullet.add_notification( notice )
end
View
10 lib/bullet/notification.rb
@@ -1,8 +1,8 @@
module Bullet
- module Notice
- autoload :Base, 'bullet/notice/base'
- autoload :UnusedEagerLoading, 'bullet/notice/unused_eager_loading'
- autoload :NPlusOneQuery, 'bullet/notice/n_plus_one_query'
- autoload :CounterCache, 'bullet/notice/counter_cache'
+ module Notification
+ autoload :Base, 'bullet/notification/base'
+ autoload :UnusedEagerLoading, 'bullet/notification/unused_eager_loading'
+ autoload :NPlusOneQuery, 'bullet/notification/n_plus_one_query'
+ autoload :CounterCache, 'bullet/notification/counter_cache'
end
end
View
2 lib/bullet/notification/base.rb
@@ -1,5 +1,5 @@
module Bullet
- module Notice
+ module Notification
class Base
attr_accessor :presenter
View
2 lib/bullet/notification/counter_cache.rb
@@ -1,5 +1,5 @@
module Bullet
- module Notice
+ module Notification
class CounterCache < Base
def body
klazz_associations_str
View
2 lib/bullet/notification/n_plus_one_query.rb
@@ -1,5 +1,5 @@
module Bullet
- module Notice
+ module Notification
class NPlusOneQuery < Base
def initialize( callers, base_class, associations, path = nil )
super( base_class, associations, path )
View
2 lib/bullet/notification/unused_eager_loading.rb
@@ -1,5 +1,5 @@
module Bullet
- module Notice
+ module Notification
class UnusedEagerLoading < Base
def body
"#{klazz_associations_str}\n Remove from your finder: #{associations_str}"

0 comments on commit 5efb45f

Please sign in to comment.