1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

L #-: Adjustments for rubocop 0.77.0

(cherry picked from commit 5ead940b167e592319617b775e37a17fa43a4e78)
This commit is contained in:
Tino Vazquez 2019-12-05 19:22:35 +01:00
parent 9128a58ede
commit 28fdde55a0
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE
4 changed files with 10 additions and 15 deletions

View File

@ -607,7 +607,7 @@ Layout/EmptyLinesAroundModuleBody:
Layout/EmptyLineAfterGuardClause:
Enabled: true
Layout/AlignHash:
Layout/HashAlignment:
Enabled: false
Layout/SpaceAroundOperators:
@ -727,12 +727,12 @@ Lint/DuplicateCaseCondition:
Lint/DuplicateMethods:
Enabled: true
Lint/DuplicatedKey:
Lint/DuplicateHashKey:
Enabled: true
##
# check empty exceptions
Lint/HandleExceptions:
Lint/SuppressedException:
Enabled: true
# check matching parameters in format
@ -798,7 +798,7 @@ Naming/ConstantName:
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/UncommunicativeMethodParamName:
Naming/MethodParameterName:
Enabled: false
###

View File

@ -708,12 +708,7 @@ CommandParser::CmdParser.new(ARGV) do
auth_string = "#{user['NAME']}:#{token}"
auth_file = helper.auth_file(auth_string)
# rubocop:disable Lint/HandleExceptions
begin
FileUtils.mkdir_p(File.dirname(auth_file))
rescue Errno::EEXIST
end
# rubocop:enable Lint/HandleExceptions
FileUtils.mkdir_p(File.dirname(auth_file)) rescue Errno::EEXIST
file = File.open(auth_file, 'w')
file.write(auth_string)
@ -776,13 +771,13 @@ CommandParser::CmdParser.new(ARGV) do
auth_string = "#{user['NAME']}:#{token}"
auth_file = helper.auth_file(auth_string)
# rubocop:disable Lint/HandleExceptions
# rubocop:disable Lint/SuppressedException
begin
File.unlink(auth_file)
puts "Removing #{auth_file}"
rescue Errno::ENOENT
end
# rubocop:enable Lint/HandleExceptions
# rubocop:enable Lint/SuppressedException
0
end

View File

@ -202,7 +202,7 @@ module HEMHook
''
end
rescue StandardError
return ''
''
end
end

View File

@ -98,11 +98,11 @@ module OneProvision
Utils.exception(@pool.info)
if id
return @pool.select do |resource|
@pool.select do |resource|
resource['TEMPLATE/PROVISION/PROVISION_ID'] == id
end
else
return @pool.reject do |resource|
@pool.reject do |resource|
resource['TEMPLATE/PROVISION/PROVISION_ID'].nil?
end
end