gitlab-org--gitlab-foss/lib/version_check.rb

22 lines
400 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require "base64"
# This class is used to build image URL to
2015-02-13 04:31:55 +00:00
# check if it is a new version for update
class VersionCheck
def self.data
{ version: Gitlab::VERSION }
2015-02-13 04:31:55 +00:00
end
def self.url
encoded_data = Base64.urlsafe_encode64(data.to_json)
"#{host}?gitlab_info=#{encoded_data}"
2015-02-13 04:31:55 +00:00
end
def self.host
2015-12-30 01:23:07 +00:00
'https://version.gitlab.com/check.svg'
2015-02-13 04:31:55 +00:00
end
end