From 82afa94b6ebd86efa9b9bcd8dca2c948957a7cf6 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 14 Dec 2016 11:04:51 -0800 Subject: [PATCH] Properly check for large pool size requests --- lib/vmfloaty.rb | 2 +- lib/vmfloaty/version.rb | 2 +- vmfloaty.gemspec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index 5e0621c..9c878ff 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -49,7 +49,7 @@ class Vmfloaty max_pool_request = 5 large_pool_requests = os_types.select{|k,v| v > max_pool_request} - if ! large_pool_requests.nil? and ! force + if ! large_pool_requests.empty? and ! force STDERR.puts "Requesting vms over #{max_pool_request} requires a --force flag." STDERR.puts "Try again with `floaty get --force`" exit 1 diff --git a/lib/vmfloaty/version.rb b/lib/vmfloaty/version.rb index b9425a3..604d18e 100644 --- a/lib/vmfloaty/version.rb +++ b/lib/vmfloaty/version.rb @@ -1,6 +1,6 @@ class Version - @version = '0.7.6' + @version = '0.7.7' def self.get @version diff --git a/vmfloaty.gemspec b/vmfloaty.gemspec index 34b416d..b192220 100644 --- a/vmfloaty.gemspec +++ b/vmfloaty.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'vmfloaty' - s.version = '0.7.6' + s.version = '0.7.7' s.authors = ['Brian Cain'] s.email = ['brian.cain@puppetlabs.com'] s.license = 'Apache'