diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 74f4aef2..4cc67139 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -46,7 +46,7 @@ class ApplicationController < ActionController::Base include Redmine::MenuManager::MenuController helper Redmine::MenuManager::MenuHelper - REDMINE_SUPPORTED_SCM.each do |scm| + Redmine::Scm::Base.all.each do |scm| require_dependency "repository/#{scm.underscore}" end diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 0e0f94c7..0c2a4480 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -126,7 +126,7 @@ module RepositoriesHelper def scm_select_tag(repository) scm_options = [["--- #{l(:actionview_instancetag_blank_option)} ---", '']] - REDMINE_SUPPORTED_SCM.each do |scm| + Redmine::Scm::Base.all.each do |scm| scm_options << ["Repository::#{scm}".constantize.scm_name, scm] if Setting.enabled_scm.include?(scm) || (repository && repository.class.name.demodulize == scm) end diff --git a/app/views/settings/_repositories.rhtml b/app/views/settings/_repositories.rhtml index 581ebf5f..198b8328 100644 --- a/app/views/settings/_repositories.rhtml +++ b/app/views/settings/_repositories.rhtml @@ -13,7 +13,7 @@ <%= link_to_function l(:label_generate_key), "if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
-<%= setting_multiselect(:enabled_scm, REDMINE_SUPPORTED_SCM) %>
+<%= setting_multiselect(:enabled_scm, Redmine::Scm::Base.all) %>
<%= setting_text_field :repositories_encodings, :size => 60 %>
<%= l(:text_comma_separated) %>