diff options
author | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-07-18 13:58:08 +0200 |
---|---|---|
committer | Katarzyna Kobierska <kkobierska@gmail.com> | 2016-07-23 06:56:32 +0200 |
commit | 10d9df28ec3b494361abcee27ffddece580bbf3a (patch) | |
tree | 4036e82af3d29532a6d4392b500d1126ed49b581 /lib/gitlab/workhorse.rb | |
parent | 46a17ffd5a200b4d2aca914ef5bafe46db1cb9bf (diff) | |
download | gitlab-ce-10d9df28ec3b494361abcee27ffddece580bbf3a.tar.gz |
Add gitlab-workhorse version to admin dashboard
Test for showing GitLab Workhorse version on Admin Dashboard
Refactoring
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r-- | lib/gitlab/workhorse.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 6aeb49c0219..97610b1f962 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -4,6 +4,7 @@ require 'json' module Gitlab class Workhorse SEND_DATA_HEADER = 'Gitlab-Workhorse-Send-Data' + VERSION_FILE = 'GITLAB_WORKHORSE_VERSION' class << self def git_http_ok(repository, user) @@ -75,6 +76,12 @@ module Gitlab ] end + def version + if File.readable?(File.join(Rails.root, VERSION_FILE)) + File.read(File.join(Rails.root, VERSION_FILE)) + end + end + protected def encode(hash) |