Sha256: e5cce272e95987bf699466cb2a14b11e1b777eafd597bace53bed488b53227a4
Contents?: true
Size: 554 Bytes
Versions: 12
Compression:
Stored size: 554 Bytes
Contents
module Storey class Utils def self.db_command_line_switches_from(db_config={}, extra_config={}) switches = {} if db_config.has_key?(:host) switches[:host] = db_config[:host] end switches[:dbname] = db_config[:database] switches[:username] = db_config[:username] command_line_switches_from switches.merge(extra_config) end def self.command_line_switches_from(hash={}) hash.map do |k, v| arg = "--#{k}" arg << "=#{v}" if v arg end.join(' ') end end end
Version data entries
12 entries across 12 versions & 1 rubygems