Class: VersionCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/version_check.rb

Overview

This class is used to build image URL to check if it is a new version for update

Instance Method Summary collapse

Instance Method Details

#dataObject


6
7
8
# File 'lib/version_check.rb', line 6

def data
  { version: Gitlab::VERSION }
end

#hostObject


15
16
17
# File 'lib/version_check.rb', line 15

def host
  'https://version.gitlab.com/check.svg'
end

#urlObject


10
11
12
13
# File 'lib/version_check.rb', line 10

def url
  encoded_data = Base64.urlsafe_encode64(data.to_json)
  "#{host}?gitlab_info=#{encoded_data}"
end