Skip to content

Commit

Permalink
Remove obsolete Authenticator implementations
Browse files Browse the repository at this point in the history
The versions from `net-imap` are more full-featured.  E.g: they support
`authzid` and print deprecation warnings for MD5 authenticators.
  • Loading branch information
nevans committed Sep 28, 2023
1 parent a9e10b0 commit 150e2b8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 78 deletions.
48 changes: 0 additions & 48 deletions lib/net/smtp/auth_cram_md5.rb

This file was deleted.

11 changes: 0 additions & 11 deletions lib/net/smtp/auth_login.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/net/smtp/auth_plain.rb

This file was deleted.

10 changes: 0 additions & 10 deletions test/net/smtp/test_smtp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -503,16 +503,6 @@ def test_start_auth_cram_md5
assert_raise Net::SMTPAuthenticationError do
Net::SMTP.start('localhost', port, user: 'account', password: 'password', authtype: :cram_md5){}
end

port = fake_server_start(auth: 'CRAM-MD5')
smtp = Net::SMTP.new('localhost', port)
auth_cram_md5 = Net::SMTP::AuthCramMD5.new(smtp)
auth_cram_md5.define_singleton_method(:digest_class) { raise '"openssl" or "digest" library is required' }
Net::SMTP::AuthCramMD5.define_singleton_method(:new) { |_| auth_cram_md5 }
e = assert_raise RuntimeError do
smtp.start(user: 'account', password: 'password', authtype: :cram_md5){}
end
assert_equal('"openssl" or "digest" library is required', e.message)
end

def test_start_instance
Expand Down

0 comments on commit 150e2b8

Please sign in to comment.