|
1 |
| -## Redmine Permissions |
| 1 | +# Redmine Permissions |
2 | 2 | require 'redmine_permissions'
|
3 | 3 |
|
4 |
| -## Redmine Menus |
5 |
| -Redmine::MenuManager.map :admin_menu do |menu| |
6 |
| - menu.push :redmine_git_hosting, { controller: 'settings', action: 'plugin', id: 'redmine_git_hosting' }, caption: :redmine_git_hosting |
7 |
| -end |
| 4 | +# Redmine Menus |
| 5 | +require 'redmine_menus' |
8 | 6 |
|
9 |
| -Redmine::MenuManager.map :top_menu do |menu| |
10 |
| - menu.push :archived_repositories, { controller: '/archived_repositories', action: 'index' }, caption: :label_archived_repositories, after: :administration, |
11 |
| - if: Proc.new { User.current.logged? && User.current.admin? } |
12 |
| -end |
| 7 | +# Redmine Views Hooks |
| 8 | +require 'redmine_view_hooks' |
13 | 9 |
|
14 |
| -## Redmine SCM |
| 10 | +# Redmine SCM |
15 | 11 | Redmine::Scm::Base.add 'Xitolite'
|
16 | 12 |
|
17 |
| -## Redmine Views Hooks |
18 |
| -require 'redmine_git_hosting/hooks/add_plugin_icon' |
19 |
| -require 'redmine_git_hosting/hooks/add_public_keys_link' |
20 |
| -require 'redmine_git_hosting/hooks/display_git_urls_on_project' |
21 |
| -require 'redmine_git_hosting/hooks/display_git_urls_on_repository_edit' |
22 |
| -require 'redmine_git_hosting/hooks/display_git_urls_on_repository_show' |
23 |
| -require 'redmine_git_hosting/hooks/display_repository_extras' |
24 |
| -require 'redmine_git_hosting/hooks/display_repository_readme' |
25 |
| -require 'redmine_git_hosting/hooks/display_repository_sidebar' |
26 |
| - |
27 |
| -## Redmine Plugin Loader |
28 |
| -require 'redmine_git_hosting/redmine_plugin_loader' |
29 |
| - |
30 | 13 | module RedmineGitHosting
|
31 | 14 | extend self
|
| 15 | + |
| 16 | + # Load RedminePluginLoader |
| 17 | + require 'redmine_git_hosting/redmine_plugin_loader' |
32 | 18 | extend RedminePluginLoader
|
33 | 19 |
|
34 | 20 | Haml::Template.options[:attr_wrapper] = '"'
|
@@ -71,23 +57,23 @@ def loglevel
|
71 | 57 | end
|
72 | 58 |
|
73 | 59 |
|
74 |
| -## Set up autoload of patches |
| 60 | +# Set up autoload of patches |
75 | 61 | Rails.configuration.to_prepare do
|
76 |
| - ## Redmine Git Hosting Libs and Patches |
| 62 | + # Redmine Git Hosting Libs and Patches |
77 | 63 | RedmineGitHosting.load_plugin!
|
78 | 64 |
|
79 |
| - ## Redmine SCM adapter |
| 65 | + # Redmine SCM adapter |
80 | 66 | require_dependency 'redmine/scm/adapters/xitolite_adapter'
|
81 | 67 |
|
82 |
| - ## Gitlab Grack for Git SmartHTTP |
| 68 | + # Gitlab Grack for Git SmartHTTP |
83 | 69 | require_dependency 'grack/auth_patch'
|
84 | 70 | require_dependency 'grack/server_patch'
|
85 | 71 |
|
86 |
| - ## Hrack for Git Hooks |
| 72 | + # Hrack for Git Hooks |
87 | 73 | require 'hrack/init'
|
88 | 74 |
|
89 |
| - ## Extensions for Faker |
90 |
| - if !Rails.env.production? |
| 75 | + # Extensions for Faker |
| 76 | + unless Rails.env.production? |
91 | 77 | require_dependency 'core_ext/faker/git'
|
92 | 78 | require_dependency 'core_ext/faker/ssh'
|
93 | 79 | end
|
|
0 commit comments