-
Notifications
You must be signed in to change notification settings - Fork 11
/
init.rb
executable file
·37 lines (27 loc) · 1.23 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'redmine'
require 'rubygems'
require 'yaml'
require 'xmpp4r'
require 'xmpp4r/roster/helper/roster'
require_dependency 'redmine_messenger/messenger'
require_dependency 'redmine_messenger/messengers/mock_messenger'
require_dependency 'redmine_messenger/messengers/xmpp4r_messenger'
require_dependency 'redmine_messenger/base'
require_dependency 'redmine_messenger/command'
require_dependency 'app/models/mailer'
require_dependency 'redmine_messenger/mailer'
Dir[File.join(File.dirname(__FILE__), "app/messengers/*.rb")].each do |file|
require_dependency file
end
Redmine::Plugin.register :redmine_messenger do
name 'Messenger Plugin'
author 'Maciej Szczytowski'
description 'Messenger is a plugin to allow users to communicate with Redmine via Instant Messenger.'
version '0.0.8'
# Minimum version of Redmine.
requires_redmine :version_or_higher => '0.8.0'
# Configuring permissions for plugin's controller.
permission :user_messenger, {"user_messenger".to_sym => [:index]}, :public => true
# Creating menu entry.
menu :account_menu, :user_messenger, { :controller => 'user_messenger', :action => 'index' }, :caption => :messenger_menu_label, :after => :my_account, :if => Proc.new { User.current.logged? }
end