Sha256: 42214c60f33a38b2d2e9d45dead92f7cf3985f1b8cab67b934ee772c7d33e0e6
Contents?: true
Size: 917 Bytes
Versions: 8
Compression:
Stored size: 917 Bytes
Contents
module Storey class BuildsLoadCommand easy_class_to_instance def initialize(options={}) @options = options end def execute switches = {} if @options[:file].present? switches[:file] = Shellwords.escape(@options[:file]) end switches[:dbname] = @options[:database] switches[:username] = @options[:username] if @options[:username].present? switches[:host] = @options[:host] if @options[:host].present? switches[:port] = @options[:port] if @options[:port].present? if @options[:password].present? switches[:password] = @options[:password] else switches['no-password'] = nil end switches[:command] = %Q("#{@options[:command]}") if @options[:command].present? command_parts = ['psql', Utils.command_line_switches_from(switches)] command_parts.join(' ') end end end
Version data entries
8 entries across 8 versions & 1 rubygems