Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

EmailNotifier plugin's Net::SMTP monkey patch is broken under Ruby 1.8.7 #2

Closed
xeger opened this issue Jan 9, 2010 · 1 comment
Closed
Assignees
Milestone

Comments

@xeger
Copy link

xeger commented Jan 9, 2010

In short, the check_auth_args method has changed arity and the monkey patch is still using the old arity (three args instead of two). Ruby 1.8.7 uses two separate methods, check_auth_method and check_auth_args, to accomplish the same thing.

The following patch illustrates the problem and the solution:

diff -rau cruisecontrol.rb/lib/smtp_tls.rb current/lib/smtp_tls.rb
--- cruisecontrol.rb/lib/smtp_tls.rb    2010-01-08 17:45:34.000000000 -0800
+++ current/lib/smtp_tls.rb 2010-01-08 17:27:25.000000000 -0800
@@ -4,7 +4,10 @@
   private
   def do_start(helodomain, user, secret, authtype)
     raise IOError, 'SMTP session already started' if @started
-    check_auth_args user, secret, authtype if user or secret
+    if user or secret
+      check_auth_method(authtype || DEFAULT_AUTH_TYPE)
+      check_auth_args user, secret
+    end

     open_conversation(helodomain)
@ghost ghost assigned bguthrie May 31, 2011
@bguthrie
Copy link
Contributor

Many apologies for the ridiculously late resolution to this. This has been solved, and the monkey-patch eliminated, as part of the upgrade to Rails 3.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants