(rubocop) Fix Style/AndOr

This commit is contained in:
Tim Sharpe 2019-02-03 11:06:05 +11:00
parent 874a6e7cf6
commit 79f764560d
2 changed files with 3 additions and 3 deletions

View file

@ -52,7 +52,7 @@ class Vmfloaty
max_pool_request = 5 max_pool_request = 5
large_pool_requests = os_types.select{|_,v| v > max_pool_request} large_pool_requests = os_types.select{|_,v| v > max_pool_request}
if ! large_pool_requests.empty? and ! force if ! large_pool_requests.empty? && ! force
STDERR.puts "Requesting vms over #{max_pool_request} requires a --force flag." STDERR.puts "Requesting vms over #{max_pool_request} requires a --force flag."
STDERR.puts 'Try again with `floaty get --force`' STDERR.puts 'Try again with `floaty get --force`'
exit 1 exit 1
@ -144,7 +144,7 @@ class Vmfloaty
hostname = args[0] hostname = args[0]
modify_all = options.all modify_all = options.all
if hostname.nil? and !modify_all if hostname.nil? && !modify_all
STDERR.puts 'ERROR: Provide a hostname or specify --all.' STDERR.puts 'ERROR: Provide a hostname or specify --all.'
exit 1 exit 1
end end

View file

@ -11,7 +11,7 @@ class Http
uri = URI.parse(url) uri = URI.parse(url)
if uri.is_a?(URI::HTTP) or uri.is_a?(URI::HTTPS) if uri.is_a?(URI::HTTP) || uri.is_a?(URI::HTTPS)
return true return true
end end