Sha256: a34145d82f506da17c273edda36705e57d69c696367e725b6e001ee50365ab17

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 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[:value][: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 lib/pg_export/listeners/interactive/remove_old_dumps.rb
pg_export-1.0.0.rc8 lib/pg_export/listeners/interactive/remove_old_dumps.rb
pg_export-1.0.0.rc6 lib/pg_export/lib/pg_export/listeners/interactive/remove_old_dumps.rb