Subject: Re: [sup-talk] Tilde expansion in signature path

From: Matthias Vallentin <[email-masked]>
Date: Mon, 03 Jan 2011 12:15:46 -0800

Better: this tweak supports account configurations with lacking
:signature: fields.

+    @signature = File.expand_path h[:signature] if h[:signature]

    Matthias
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Matthias Vallentin <[email-masked]>
Date: Mon, 03 Jan 2011 04:09:10 -0800

Is there a specific reason why a tilde in the :signature: path is not
expanded? If not, this patch will enable it:

diff --git a/lib/sup/account.rb b/lib/sup/account.rb
index 1718d94..6e078cf 100644
--- a/lib/sup/account.rb
+++ b/lib/sup/account.rb
@@ -8,7 +8,7 @@ class Account < Person
     raise ArgumentError, "no email for account" unless h[:email]
     super h[:name], h[:email]
     @sendmail = h[:sendmail]
-    @signature = h[:signature]
+    @signature = File.expand_path h[:signature]
     @gpgkey = h[:gpgkey]
   end

    Matthias