summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-28 20:19:55 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-28 20:19:55 +0000
commit244e94de80751091f3ef0208dfb6b8502a6c13eb (patch)
tree81985b3bd29f2649c265ef61ee6a3b39c55c4884 /lib
parent582ed86d828bb957a7844832c627b425884d0716 (diff)
downloadredmine-244e94de80751091f3ef0208dfb6b8502a6c13eb.tar.gz
redmine-244e94de80751091f3ef0208dfb6b8502a6c13eb.zip
Refactor the hardcoded event actions (notifiables) to use a class
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4220 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine.rb1
-rw-r--r--lib/redmine/notifiable.rb19
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/redmine.rb b/lib/redmine.rb
index eac459c2f..9d9b0e408 100644
--- a/lib/redmine.rb
+++ b/lib/redmine.rb
@@ -8,6 +8,7 @@ require 'redmine/core_ext'
require 'redmine/themes'
require 'redmine/hook'
require 'redmine/plugin'
+require 'redmine/notifiable'
require 'redmine/wiki_formatting'
require 'redmine/scm/base'
diff --git a/lib/redmine/notifiable.rb b/lib/redmine/notifiable.rb
new file mode 100644
index 000000000..fa192ab25
--- /dev/null
+++ b/lib/redmine/notifiable.rb
@@ -0,0 +1,19 @@
+module Redmine
+ class Notifiable
+ CoreNotifications = [
+ 'issue_added',
+ 'issue_updated',
+ 'news_added',
+ 'document_added',
+ 'file_added',
+ 'message_posted',
+ 'wiki_content_added',
+ 'wiki_content_updated'
+ ]
+
+ # TODO: Plugin API for adding a new notification?
+ def self.all
+ CoreNotifications
+ end
+ end
+end