diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-05-13 11:17:16 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-05-13 11:17:16 +0000 |
commit | f32a045ef41688859732abfcdc2a2030387be78f (patch) | |
tree | 883efa6fcf7d0eac100d7c07132400e1bcdfd4c3 /lib | |
parent | cb8f974b2126122ad22fd01301c576f14c69ed01 (diff) | |
parent | 0928c3ae04c8e708753705746e9eb74c62001dad (diff) | |
download | gitlab-ce-f32a045ef41688859732abfcdc2a2030387be78f.tar.gz |
Merge branch 'version-check' into 'master'
Version check
See merge request !1509
Diffstat (limited to 'lib')
-rw-r--r-- | lib/version_check.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/version_check.rb b/lib/version_check.rb new file mode 100644 index 00000000000..ea23344948c --- /dev/null +++ b/lib/version_check.rb @@ -0,0 +1,18 @@ +require "base64" + +# This class is used to build image URL to +# check if it is a new version for update +class VersionCheck + def data + { version: Gitlab::VERSION } + end + + def url + encoded_data = Base64.urlsafe_encode64(data.to_json) + "#{host}?gitlab_info=#{encoded_data}" + end + + def host + 'https://version.gitlab.com/check.png' + end +end |