d598e4fd93
Enables frozen for the following: * lib/*.rb * lib/banzai/**/*.rb * lib/bitbucket/**/*.rb * lib/constraints/**/*.rb * lib/container_registry/**/*.rb * lib/declarative_policy/**/*.rb Partially addresses #47424.
20 lines
384 B
Ruby
20 lines
384 B
Ruby
# frozen_string_literal: true
|
|
|
|
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.svg'
|
|
end
|
|
end
|