-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit.rb
37 lines (30 loc) · 1.31 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_dependency 'creator/scm_creator'
require_dependency 'creator/subversion_creator'
require_dependency 'creator/mercurial_creator'
require_dependency 'creator/git_creator'
require_dependency 'creator/bazaar_creator'
require_dependency 'scm_config'
require_dependency 'scm_hook'
require_dependency File.expand_path(File.join(File.dirname(__FILE__), 'app/models/repository_observer'))
Rails.logger.info 'Starting SCM Creator Plugin for Redmine'
ActiveRecord::Base.observers << RepositoryObserver
Rails.configuration.to_prepare do
unless Project.included_modules.include?(ScmProjectPatch)
Project.send(:include, ScmProjectPatch)
end
unless RepositoriesHelper.included_modules.include?(ScmRepositoriesHelperPatch)
RepositoriesHelper.send(:include, ScmRepositoriesHelperPatch)
end
unless RepositoriesController.included_modules.include?(ScmRepositoriesControllerPatch)
RepositoriesController.send(:include, ScmRepositoriesControllerPatch)
end
end
Redmine::Plugin.register :redmine_scm do
name 'SCM Creator'
author 'Andriy Lesyuk'
author_url 'http://www.andriylesyuk.com/'
description 'Allows creating Subversion, Git, Mercurial and Bazaar repositories using Redmine.'
url 'http://projects.andriylesyuk.com/projects/redmine-svn'
version '0.4.1'
end