mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-25 23:21:29 +03:00
L #-: Minor linting corrections
This commit is contained in:
parent
0a7b1be152
commit
973ff0d4f7
@ -257,6 +257,7 @@ get '/support/check/version' do
|
||||
if validate_time < 86400
|
||||
return [200, JSON.pretty_generate(:version => $conf[:one_last_version])]
|
||||
end
|
||||
|
||||
begin
|
||||
http = Curl.get(GITHUB_TAGS_URL) do |request|
|
||||
if !$conf[:proxy].nil? && !$conf[:proxy].empty?
|
||||
@ -277,22 +278,22 @@ get '/support/check/version' do
|
||||
tag['name'].start_with?(find)
|
||||
|
||||
version = tag['name'].tr(find, '')
|
||||
split_version = version.split(".")
|
||||
split_version = version.split('.')
|
||||
next unless split_version &&
|
||||
split_version[1] &&
|
||||
split_version[1].to_i &&
|
||||
split_version[1].to_i.even?
|
||||
|
||||
memory_version = $conf[:one_last_version]
|
||||
minor_version =
|
||||
version.slice(version.rindex('.').to_i + 1..-1).to_i
|
||||
|
||||
minor_version =
|
||||
version.slice(version.rindex('.').to_i + 1..-1).to_i
|
||||
|
||||
if version.to_f > memory_version.to_f
|
||||
$conf[:one_last_version] = version
|
||||
end
|
||||
|
||||
memory_version_index = memory_version.rindex('.').to_i
|
||||
minor_memory_version =
|
||||
minor_memory_version =
|
||||
memory_version.slice(memory_version_index.to_i + 1..-1).to_i
|
||||
|
||||
if version.to_f == memory_version.to_f &&
|
||||
|
Loading…
Reference in New Issue
Block a user