From 87fe2ebf463b84fb9d7c49bffd8810f222ef0744 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 7 Jun 2015 00:25:05 +0200 Subject: [PATCH] Display Rugged infos in Config test tab --- .../_gitolite_config_test.html.haml | 11 +++++++++++ config/locales/settings/en.yml | 2 ++ config/locales/settings/fr.yml | 2 ++ lib/redmine_git_hosting/config/gitolite_infos.rb | 10 ++++++++++ 4 files changed, 25 insertions(+) diff --git a/app/views/settings/redmine_git_hosting/_gitolite_config_test.html.haml b/app/views/settings/redmine_git_hosting/_gitolite_config_test.html.haml index 82a9f360aa7..2a2df9994ac 100644 --- a/app/views/settings/redmine_git_hosting/_gitolite_config_test.html.haml +++ b/app/views/settings/redmine_git_hosting/_gitolite_config_test.html.haml @@ -52,6 +52,17 @@ %td %span{ class: 'label label-success' }= RedmineGitHosting::Config.gitolite_repository_count + %tr + %td= l(:label_gitolite_rugged_features) + %td + - RedmineGitHosting::Config.rugged_features.each do |feature| + %span{ class: 'label label-success' }= feature + + %tr + %td= l(:label_gitolite_libgit2_version) + %td + %span{ class: 'label label-success' }= RedmineGitHosting::Config.libgit2_version + %p %label= l(:label_gitolite_banner) diff --git a/config/locales/settings/en.yml b/config/locales/settings/en.yml index 89595c84540..a46673421b5 100644 --- a/config/locales/settings/en.yml +++ b/config/locales/settings/en.yml @@ -162,6 +162,8 @@ en: label_redmine_user: Redmine username label_git_version: Git version label_gitolite_repository_count: Count of physical repositories in Gitolite + label_gitolite_rugged_features: Rugged compiled features + label_gitolite_libgit2_version: libgit2 version # Recycle Bin label_tab_gitolite_recycle_bin: Recycle Bin diff --git a/config/locales/settings/fr.yml b/config/locales/settings/fr.yml index a7bc280ac51..b411c451f9f 100644 --- a/config/locales/settings/fr.yml +++ b/config/locales/settings/fr.yml @@ -162,6 +162,8 @@ fr: label_redmine_user: Nom d'utilisateur Redmine label_git_version: Version de Git label_gitolite_repository_count: Nombre de dépôts physiques dans Gitolite + label_gitolite_rugged_features: Fonctionnalités compilées dans Rugged + label_gitolite_libgit2_version: Version de libgit2 # Recycle Bin label_tab_gitolite_recycle_bin: Corbeille diff --git a/lib/redmine_git_hosting/config/gitolite_infos.rb b/lib/redmine_git_hosting/config/gitolite_infos.rb index aea3e31b4c8..3cc67945ec3 100644 --- a/lib/redmine_git_hosting/config/gitolite_infos.rb +++ b/lib/redmine_git_hosting/config/gitolite_infos.rb @@ -17,6 +17,16 @@ def included(receiver) module ClassMethods + def rugged_features + Rugged.features + end + + + def libgit2_version + Rugged.libgit2_version.join('.') + end + + def gitolite_infos begin RedmineGitHosting::Commands.gitolite_infos