Sha256: 917a9c491051663fce02ecc5d9b985915c020ac2beffd58608caa9f6eb67630d
Contents?: true
Size: 658 Bytes
Versions: 9
Compression:
Stored size: 658 Bytes
Contents
module WebTranslateIt module Safe class Pgdump < Source def command ENV['PGPASSWORD'] = (config['password'] || nil) "pg_dump #{postgres_options} #{postgres_username} #{postgres_host} #{postgres_port} #{@id}" end def extension = '.sql' protected def postgres_options config[:options] end def postgres_host config['host'] && "--host='#{config['host']}'" end def postgres_port config['port'] && "--port='#{config['port']}'" end def postgres_username config['user'] && "--username='#{config['user']}'" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems