Sha256: d07a09699ca93899503cbf5c6a4cfbfcd8de507e8fc89419028a4c2ac37b5fe3

Contents?: true

Size: 405 Bytes

Versions: 8

Compression:

Stored size: 405 Bytes

Contents

require "net/imap"

module Imap; end

module Imap::Backup
  class Setup; end

  class Setup::ConnectionTester
    attr_reader :account

    def initialize(account)
      @account = account
    end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
imap-backup-14.4.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.4.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.3.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.2.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.1.1 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.1.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-14.0.0 lib/imap/backup/setup/connection_tester.rb
imap-backup-13.4.0 lib/imap/backup/setup/connection_tester.rb