diff --git a/announcement.gemspec b/announcement.gemspec index c0114e0..4051c3b 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -245,25 +245,25 @@ if bundle_update_flag r.each do |mode,v1| v1.each do |clients,d| d.each do |k,v| - if v["username"].present? - if !v["options"].present? + if !v["username"].nil? + if v["options"].nil? v["options"] = {} end v["options"]["user"] = v["username"] v.delete "username" end - if v["password"].present? - if !v["options"].present? + if !v["password"].nil? + if !v["options"].nil? v["options"] = {} end v["options"]["password"] = v["password"] v.delete "password" end - if v["options"].present? && v["options"]["pool_size"].present? + if !v["options"].nil? && !v["options"]["pool_size"].nil? v["options"]["max_pool_size"] = v["options"]["pool_size"] v["options"].delete "pool_size" end - if v["options"].present? && v["options"]["read"].class == String + if !v["options"].nil? && v["options"]["read"].class == String v["options"]["read"] = {mode: v["options"]["read"]} end end