myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2244] branches/event_logging: Removed the "use_e


From: noreply
Subject: [myexperiment-hackers] [2244] branches/event_logging: Removed the "use_event_log" config parameter .
Date: Thu, 9 Jul 2009 12:35:30 -0400 (EDT)

Revision
2244
Author
dtm
Date
2009-07-09 12:35:30 -0400 (Thu, 09 Jul 2009)

Log Message

Removed the "use_event_log" config parameter.

Modified Paths

Diff

Modified: branches/event_logging/app/helpers/application_helper.rb (2243 => 2244)


--- branches/event_logging/app/helpers/application_helper.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/helpers/application_helper.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -588,9 +588,6 @@
   def news(news_for, restrict_contributor=true, before=Time.now, after=Time.now-Conf.news["default"]["timeframe"].days, limit=Conf.news["default"]["count"], current_viewer=nil, contributor_initiated_actions_only=false)
     hash = {}
     
-    # if event logging is switched off in "environment_private.rb" - no news can be generated
-    return hash unless Conf.news["use_event_log"]
-    
     # collect all activity log events and interpret them as news entries;
     # choose to display news feed type: 
     # * public news for anonymous viewers;

Modified: branches/event_logging/app/models/announcement.rb (2243 => 2244)


--- branches/event_logging/app/models/announcement.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/announcement.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -12,7 +12,7 @@
 
   before_save :check_admin
   
-  acts_as_activity_logged :models => { :culprit => { :model => :user } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :user } }
 
   def check_admin
     if !self.user_id.blank? and self.user.admin?

Modified: branches/event_logging/app/models/attribution.rb (2243 => 2244)


--- branches/event_logging/app/models/attribution.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/attribution.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -16,11 +16,9 @@
   # this variable is set in the appropriate actions in the controller
   attr_accessor :userid_initiating_action
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :attributable },
-                                          :referenced => { :model => :attributor } },
-                             :check_log_allowed => true)
-  end
+  acts_as_activity_logged(:models => { :culprit => { :model => :attributable },
+                                       :referenced => { :model => :attributor } },
+                          :check_log_allowed => true)
   
   # callback for "acts_as_activity_loggable"
   def log_allowed(action_name)

Modified: branches/event_logging/app/models/blob.rb (2243 => 2244)


--- branches/event_logging/app/models/blob.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/blob.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -29,7 +29,7 @@
                :boost => "search_boost",
                :include => [ :comments ]) if Conf.solr_enable
 
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
 
   belongs_to :content_blob
   belongs_to :content_type

Modified: branches/event_logging/app/models/blog.rb (2243 => 2244)


--- branches/event_logging/app/models/blog.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/blog.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -17,7 +17,7 @@
   acts_as_rateable
   acts_as_taggable
 
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
 
   has_many :posts,
            :class_name => "BlogPost",

Modified: branches/event_logging/app/models/bookmark.rb (2243 => 2244)


--- branches/event_logging/app/models/bookmark.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/bookmark.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -14,7 +14,7 @@
   belongs_to :user
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :bookmarkable } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :bookmarkable } }
 
   validates_presence_of :bookmarkable
   validates_presence_of :user

Modified: branches/event_logging/app/models/citation.rb (2243 => 2244)


--- branches/event_logging/app/models/citation.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/citation.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -15,6 +15,6 @@
   validates_length_of :issn, :is => 8, :if => Proc.new { |c| !(c.issn.nil? or c.issn.empty?) }
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :workflow } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :workflow } }
 
 end

Modified: branches/event_logging/app/models/comment.rb (2243 => 2244)


--- branches/event_logging/app/models/comment.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/comment.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -14,7 +14,7 @@
   belongs_to :user
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :commentable } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :commentable } }
   
   acts_as_solr :fields => [ :comment ] if Conf.solr_enable
   

Modified: branches/event_logging/app/models/creditation.rb (2243 => 2244)


--- branches/event_logging/app/models/creditation.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/creditation.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -16,11 +16,9 @@
   # this variable is set in the appropriate actions in the controller
   attr_accessor :userid_initiating_action
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :creditable },
-                                          :referenced => { :model => :creditor } },
-                             :check_log_allowed => true)
-  end
+  acts_as_activity_logged(:models => { :culprit => { :model => :creditable },
+                                       :referenced => { :model => :creditor } },
+                          :check_log_allowed => true)
   
   # callback for "acts_as_activity_logged"
   def log_allowed(action_name)

Modified: branches/event_logging/app/models/experiment.rb (2243 => 2244)


--- branches/event_logging/app/models/experiment.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/experiment.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -14,7 +14,7 @@
   
   validates_presence_of :title
   
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
 
   
   def self.default_title(user)

Modified: branches/event_logging/app/models/friendship.rb (2243 => 2244)


--- branches/event_logging/app/models/friendship.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/friendship.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -24,12 +24,9 @@
   # this variable is set in the appropriate actions in the controller
   attr_accessor :userid_initiating_action
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :user },
-                                          :referenced => { :model => :friend } },
-                             :check_log_allowed => true )
-  end
-
+  acts_as_activity_logged(:models => { :culprit => { :model => :user },
+                                       :referenced => { :model => :friend } },
+                          :check_log_allowed => true )
   
   # callback for "acts_as_activity_logged"
   def log_allowed(action_name)

Modified: branches/event_logging/app/models/group_announcement.rb (2243 => 2244)


--- branches/event_logging/app/models/group_announcement.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/group_announcement.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -11,7 +11,7 @@
   before_save :check_admin # this is done in addition to check in the controller
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :network } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :network } }
   
   def check_admin
     if !self.user_id.blank? and self.network.member?(self.user_id)

Modified: branches/event_logging/app/models/job.rb (2243 => 2244)


--- branches/event_logging/app/models/job.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/job.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -29,7 +29,7 @@
   serialize :inputs_data
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :experiment } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :experiment } }
 
 
   def self.default_title(user)

Modified: branches/event_logging/app/models/membership.rb (2243 => 2244)


--- branches/event_logging/app/models/membership.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/membership.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -23,11 +23,9 @@
   # this variable is set in the appropriate actions in the controller
   attr_accessor :userid_initiating_action
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :user },
-                                          :referenced => { :model => :network } },
-                             :check_log_allowed => true )
-  end
+  acts_as_activity_logged(:models => { :culprit => { :model => :user },
+                                       :referenced => { :model => :network } },
+                          :check_log_allowed => true )
   
   
   # callback for "acts_as_activity_logged"

Modified: branches/event_logging/app/models/message.rb (2243 => 2244)


--- branches/event_logging/app/models/message.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/message.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -27,11 +27,9 @@
            :foreign_key => :reply_id,
            :order => "created_at DESC"
            
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :u_from },
-                                         :referenced => { :model => :u_to } },
-                             :check_log_allowed => true)
-  end
+  acts_as_activity_logged(:models => { :culprit => { :model => :u_from },
+                                       :referenced => { :model => :u_to } },
+                          :check_log_allowed => true)
 
   # callback for "acts_as_activity_logged"
   def log_allowed(action_name)

Modified: branches/event_logging/app/models/network.rb (2243 => 2244)


--- branches/event_logging/app/models/network.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/network.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -24,9 +24,8 @@
                :include => [ :comments ]) if Conf.solr_enable
 
   format_attribute :description
-  
-  acts_as_activity_logged :models => { :culprit => { :model => :owner } } if Conf.news["use_event_log"]
 
+  acts_as_activity_logged :models => { :culprit => { :model => :owner } }
   
   def self.recently_created(limit=5)
     self.find(:all, :order => "created_at DESC", :limit => limit)

Modified: branches/event_logging/app/models/pack.rb (2243 => 2244)


--- branches/event_logging/app/models/pack.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/pack.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -26,7 +26,7 @@
   
   format_attribute :description
 
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
   
   acts_as_solr(:fields => [ :title, :description, :contributor_name, :tag_list ],
                :boost => "search_boost",

Modified: branches/event_logging/app/models/pack_contributable_entry.rb (2243 => 2244)


--- branches/event_logging/app/models/pack_contributable_entry.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/pack_contributable_entry.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -18,7 +18,7 @@
   before_save :check_version
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :pack } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :pack } }
 
   
   def check_unique

Modified: branches/event_logging/app/models/pack_remote_entry.rb (2243 => 2244)


--- branches/event_logging/app/models/pack_remote_entry.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/pack_remote_entry.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -16,7 +16,7 @@
   before_create :check_unique
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :pack } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :pack } }
 
 
   def check_unique

Modified: branches/event_logging/app/models/permission.rb (2243 => 2244)


--- branches/event_logging/app/models/permission.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/permission.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -21,11 +21,9 @@
   # this variable is set in the appropriate actions in the controller
   attr_accessor :userid_initiating_action
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged(:models => { :culprit => { :model => :contributor },
-                                         :referenced => { :model => :policy } },
-                            :check_log_allowed => true)
-  end
+  acts_as_activity_logged(:models => { :culprit => { :model => :contributor },
+                                       :referenced => { :model => :policy } },
+                          :check_log_allowed => true)
   
   def log_allowed(action_name)
     case action_name.downcase

Modified: branches/event_logging/app/models/picture.rb (2243 => 2244)


--- branches/event_logging/app/models/picture.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/picture.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -20,7 +20,7 @@
   has_many :picture_selections,
            :dependent => :destroy
            
-  acts_as_activity_logged :models => { :culprit => { :model => :owner } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :owner } }
 
            
   def select!

Modified: branches/event_logging/app/models/picture_selection.rb (2243 => 2244)


--- branches/event_logging/app/models/picture_selection.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/picture_selection.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -3,6 +3,6 @@
   belongs_to :user
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :picture } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :picture } }
 
 end

Modified: branches/event_logging/app/models/profile.rb (2243 => 2244)


--- branches/event_logging/app/models/profile.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/profile.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -50,9 +50,7 @@
                             :interests,
                             :contact_details ] if Conf.solr_enable
   
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged :models => { :culprit => { :model => :owner } }
-  end
+  acts_as_activity_logged :models => { :culprit => { :model => :owner } }
   
   def avatar?
     not (picture_id.nil? or picture_id.zero?)

Modified: branches/event_logging/app/models/rating.rb (2243 => 2244)


--- branches/event_logging/app/models/rating.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/rating.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -10,7 +10,7 @@
   belongs_to :user
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :rateable } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :rateable } }
 
   
   # Helper class method to lookup all ratings assigned

Modified: branches/event_logging/app/models/review.rb (2243 => 2244)


--- branches/event_logging/app/models/review.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/review.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -13,7 +13,7 @@
   before_create :check_multiple
   
   acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                       :referenced => { :model => :reviewable } } if Conf.news["use_event_log"]
+                                       :referenced => { :model => :reviewable } }
 
   acts_as_solr :fields => [ :title, :review ] if Conf.solr_enable
   

Modified: branches/event_logging/app/models/taverna_enactor.rb (2243 => 2244)


--- branches/event_logging/app/models/taverna_enactor.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/taverna_enactor.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -22,7 +22,7 @@
   
   encrypts :password, :mode => :symmetric, :key => Conf.sym_encryption_key
   
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
 
   
   def self.find_by_contributor(contributor_type, contributor_id)

Modified: branches/event_logging/app/models/user.rb (2243 => 2244)


--- branches/event_logging/app/models/user.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/user.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -26,7 +26,7 @@
               :conditions => ["contributor_type = ?", "User"]
               
               
-  acts_as_activity_logged if Conf.news["use_event_log"]
+  acts_as_activity_logged
   
   
 

Modified: branches/event_logging/app/models/workflow.rb (2243 => 2244)


--- branches/event_logging/app/models/workflow.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/app/models/workflow.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -50,7 +50,7 @@
   
   acts_as_reviewable
 
-  acts_as_activity_logged :models => { :culprit => { :model => :contributor } } if Conf.news["use_event_log"]
+  acts_as_activity_logged :models => { :culprit => { :model => :contributor } }
 
   explicit_versioning(:version_column => "current_version", 
                       :file_columns => ["image", "svg"], 

Modified: branches/event_logging/config/default_settings.yml (2243 => 2244)


--- branches/event_logging/config/default_settings.yml	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/config/default_settings.yml	2009-07-09 16:35:30 UTC (rev 2244)
@@ -355,8 +355,6 @@
 
 news:
 
-# Switch event logging on or off
-  use_event_log: true
 # News feeds have timed caches. This is duration of caching a fragment
 # of news feeds (in SECONDS)
   cache_timeout: 300

Modified: branches/event_logging/config/system_initializers.rb (2243 => 2244)


--- branches/event_logging/config/system_initializers.rb	2009-07-08 11:55:38 UTC (rev 2243)
+++ branches/event_logging/config/system_initializers.rb	2009-07-09 16:35:30 UTC (rev 2244)
@@ -1,9 +1,7 @@
 # modify the "acts_as_taggable" plugin to make use of activity logging
 Tagging.class_eval do
-  if Conf.news["use_event_log"]
-    acts_as_activity_logged :models => { :culprit => { :model => :user },
-                                         :referenced => { :model => :taggable } }
-  end
+  acts_as_activity_logged :models => { :culprit => { :model => :user },
+                                       :referenced => { :model => :taggable } }
 end
   
   

reply via email to

[Prev in Thread] Current Thread [Next in Thread]