summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-20 13:41:41 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-20 13:41:41 +0200
commitb07c02eb13fca5f991575bb0955373d54f1a2d9d (patch)
treeb2a7dd1dbd74d857710991f6a613932e6f53dcf1 /lib
parente3a718574c1c862a1b806b8bb04fa1f4b10a2d37 (diff)
downloadgitlab-ce-b07c02eb13fca5f991575bb0955373d54f1a2d9d.tar.gz
Add more info to admin dashboard
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell.rb9
-rw-r--r--lib/tasks/gitlab/check.rake5
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index c819ce56ac9..5020fa1f991 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -196,6 +196,15 @@ module Gitlab
Gitlab.config.gitlab_shell.ssh_path_prefix + "#{path}.git"
end
+ # Return GitLab shell version
+ def version
+ gitlab_shell_version_file = "#{gitlab_shell_user_home}/gitlab-shell/VERSION"
+
+ if File.readable?(gitlab_shell_version_file)
+ File.read(gitlab_shell_version_file)
+ end
+ end
+
protected
def gitlab_shell_user_home
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 4ee24d1cc2b..f2349ca8c13 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -611,10 +611,7 @@ namespace :gitlab do
end
def gitlab_shell_version
- gitlab_shell_version_file = "#{gitlab_shell_user_home}/gitlab-shell/VERSION"
- if File.readable?(gitlab_shell_version_file)
- File.read(gitlab_shell_version_file)
- end
+ Gitlab::Shell.new.version
end
def has_gitlab_shell3?