gitlab-org--gitlab-foss/lib/version_check.rb
Dmitriy Zaporozhets b3f5c679b6
Replace host with real one
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-05-11 18:21:45 +03:00

18 lines
353 B
Ruby

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