Sha256: 34d14cbed0f42f83e66af9459018eb89113beb0aeba59f5e452c58f630868d41

Contents?: true

Size: 668 Bytes

Versions: 2

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

require_relative '../interactive_listener'

class PgExport
  module Listeners
    class Interactive
      class RemoveOldDumps < 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

2 entries across 2 versions & 1 rubygems

Version Path
pg_export-1.0.0.rc5 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps.rb
pg_export-1.0.0.rc4 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps.rb