Sha256: 595e0772444fc6e2be9e7e0035d8d4e2271110327372063202bbcfe7c792383e

Contents?: true

Size: 675 Bytes

Versions: 3

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

require_relative '../interactive_listener'

class PgExport
  module Listeners
    class Interactive
      class RemoveOldDumpsFromFtp < InteractiveListener
        def on_step(event)
          @spinner = build_spinner("Checking for old dumps on #{event[:args].first[:gateway]}")
        end

        def on_step_succeeded(event)
          if event[:value][:removed_dumps].any?
            @spinner.success([success, event[:value][:removed_dumps].map { |filename| "    #{filename} removed" }].join("\n"))
          else
            @spinner.success([success, 'nothing to remove'].join(' '))
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc3 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps_from_ftp.rb
pg_export-1.0.0.rc2 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps_from_ftp.rb
pg_export-1.0.0.rc1 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps_from_ftp.rb