Sha256: aec536fbd4f841d83c543078ad089e64f1e976e2e73536d5f205b67254ecf628

Contents?: true

Size: 497 Bytes

Versions: 13

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

require 'dry/transaction/operation'
require 'pg_export/import'

class PgExport
  module Operations
    class DecryptDump
      include Dry::Transaction::Operation
      include Import['factories.cipher_factory']

      def call(dump:)
        dump.decrypt(cipher_factory: cipher_factory)
        Success(dump: dump)
      rescue OpenSSL::Cipher::CipherError => e
        Failure(message: "Problem decrypting dump file: #{e}. Try again.")
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc5 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-1.0.0.rc4 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-1.0.0.rc3 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-1.0.0.rc2 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-1.0.0.rc1 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.7 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.6 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.5 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.4 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.3 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.2 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.1 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb
pg_export-0.7.0 lib/pg_export/lib/pg_export/operations/decrypt_dump.rb