Sha256: ca74841021b211059899b687757f9153f2429823a8c03c05d8e900d676728b35

Contents?: true

Size: 444 Bytes

Versions: 31

Compression:

Stored size: 444 Bytes

Contents

module Imap::Backup
  class Setup; end

  class Setup::ConnectionTester
    attr_reader :account

    def initialize(account)
      @account = account
    end

    def test
      connection.client
      "Connection successful"
    rescue Net::IMAP::NoResponseError
      "No response"
    rescue StandardError => e
      "Unexpected error: #{e}"
    end

    private

    def connection
      Account::Connection.new(account)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
imap-backup-9.3.2 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.4.0.pre1 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.3.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.3.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.2.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.1.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.1.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.0.2 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.0.1.rc1 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.0.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-9.0.0.rc1 lib/imap/backup/setup/connection_tester.rb
imap-backup-8.0.2 lib/imap/backup/setup/connection_tester.rb
imap-backup-8.0.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-8.0.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-8.0.0.rc1 lib/imap/backup/setup/connection_tester.rb
imap-backup-7.0.2 lib/imap/backup/setup/connection_tester.rb
imap-backup-7.0.0.rc1 lib/imap/backup/setup/connection_tester.rb
imap-backup-6.3.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-6.2.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-6.1.0 lib/imap/backup/setup/connection_tester.rb