"Unsafe" rubocop fixes

Adds the remaining "unsafe" fixes that aren't included in #359
This commit is contained in:
Brandon High 2020-03-05 11:16:43 -08:00
parent 252a2c2344
commit f22a84f26f
No known key found for this signature in database
GPG key ID: 270079C784FCAFDE
19 changed files with 46 additions and 9 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'vmpooler/providers'
require 'spicy-proton'
@ -54,7 +56,7 @@ module Vmpooler
pool_keys.each do |k|
to_set[k] = pool[k]
end
to_set['alias'] = pool['alias'].join(',') if to_set.has_key?('alias')
to_set['alias'] = pool['alias'].join(',') if to_set.key?('alias')
$redis.hmset("vmpooler__pool__#{pool['name']}", to_set.to_a.flatten) unless to_set.empty?
end
previously_configured_pools.each do |pool|