Sha256: 8cbf6ca22e5c9914f94281f44ee47d77eca92f369f7a31f12fe4e2e112a53427
Contents?: true
Size: 710 Bytes
Versions: 21
Compression:
Stored size: 710 Bytes
Contents
module FlydataCore module Oracle class Config def self.build_oci_uri(db_conf) db_opts = [:uri, :host, :port, :username, :password, :database, ].inject({}) { |h, sym| if db_conf.has_key?(sym) h[sym] = db_conf[sym] elsif db_conf[sym.to_s] h[sym] = db_conf[sym.to_s] end h } db_opts[:uri] || "#{db_opts[:username]}/#{db_opts[:password]}@#{db_opts[:host]}:#{db_opts[:port]}/#{db_opts[:database]}" end end end end
Version data entries
21 entries across 21 versions & 1 rubygems