Sha256: 0c58c67e75cbfcf4c572c13c5573da65f0669320989493ef49682321490693a8
Contents?: true
Size: 649 Bytes
Versions: 1
Compression:
Stored size: 649 Bytes
Contents
module HerokuPgBackupsArchive class Backup def self.create backup_output = ToolbeltHelper.capture_backup new(backup_output) end attr_reader :id def initialize(backup_output) @id = extract_id(backup_output) end def url @url ||= ToolbeltHelper.fetch_backup_public_url(id).chomp end def finished_at @finished_at ||= begin info = ToolbeltHelper.fetch_backup_info(id) Time.parse(info.match(/Finished:\s*(.*)\n/)[1]) end end private def extract_id(backup_output) backup_output.match(/Backing up DATABASE to (.*)... done\n/)[1] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heroku_pg_backups_archive-0.3.1 | lib/heroku_pg_backups_archive/backup.rb |