From 79f764560d7e18e2a5d1f1008b5117dfe540b5be Mon Sep 17 00:00:00 2001 From: Tim Sharpe Date: Sun, 3 Feb 2019 11:06:05 +1100 Subject: [PATCH] (rubocop) Fix Style/AndOr --- lib/vmfloaty.rb | 4 ++-- lib/vmfloaty/http.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index 11bc196..2d587e2 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -52,7 +52,7 @@ class Vmfloaty max_pool_request = 5 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 'Try again with `floaty get --force`' exit 1 @@ -144,7 +144,7 @@ class Vmfloaty hostname = args[0] modify_all = options.all - if hostname.nil? and !modify_all + if hostname.nil? && !modify_all STDERR.puts 'ERROR: Provide a hostname or specify --all.' exit 1 end diff --git a/lib/vmfloaty/http.rb b/lib/vmfloaty/http.rb index 33e4f19..bb7636e 100644 --- a/lib/vmfloaty/http.rb +++ b/lib/vmfloaty/http.rb @@ -11,7 +11,7 @@ class Http 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 end