Sha256: aa57418ce6b518e2f60c803ed75e5b688514c075337902751cb5d5abbcfdc677
Contents?: true
Size: 555 Bytes
Versions: 2
Compression:
Stored size: 555 Bytes
Contents
# frozen_string_literal: true require 'open3' require 'tempfile' require 'pg_export/entities/dump' class PgExport module Factories class DumpFactory def plain(database:, file:) Entities::Dump.new( name: [database, timestamp].join('_'), database: database, file: file, type: :plain ) end private TIMESTAMP_FORMAT = '%Y%m%d_%H%M%S' private_constant :TIMESTAMP_FORMAT def timestamp Time.now.strftime(TIMESTAMP_FORMAT) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pg_export-1.0.0 | lib/pg_export/factories/dump_factory.rb |
pg_export-1.0.0.rc8 | lib/pg_export/factories/dump_factory.rb |