Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] Fixed bug with messages not being signed.
@ 2011-01-30 22:57 Hamish
  0 siblings, 0 replies; only message in thread
From: Hamish @ 2011-01-30 22:57 UTC (permalink / raw)
  To: sup-devel

Found the bug that stopped people signing email. Needed to use merge! 
rather than merge. Real slap on head moment.

I've committed it to the (existing) gpgme branch and to next.

Hamish Downer



Full patch is:

commit 42149329b37af5e3fc0183367521999c479b7881
Author: Hamish Downer <dmishd@gmail.com>
Date:   Sun Jan 30 22:44:05 2011 +0000

    Fixed the bug that stopped emails being signed.
    
    Schoolboy error - needed merge! rather than merge

diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index e532261..5f1b730 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -57,7 +57,7 @@ EOS
     return unknown_status(cant_find_gpgme) unless @gpgme_present
 
     gpg_opts = {:protocol => GPGME::PROTOCOL_OpenPGP, :armor => true, :textmode => true}
-    gpg_opts.merge(gen_sign_user_opts(from))
+    gpg_opts.merge!(gen_sign_user_opts(from))
     gpg_opts = HookManager.run("gpg-options", 
                                {:operation => "sign", :options => gpg_opts}) || gpg_opts
 
@@ -82,8 +82,8 @@ EOS
 
     gpg_opts = {:protocol => GPGME::PROTOCOL_OpenPGP, :armor => true, :textmode => true}
     if sign
-      gpg_opts.merge(gen_sign_user_opts(from)) 
-      gpg_opts.merge({:sign => true})
+      gpg_opts.merge!(gen_sign_user_opts(from)) 
+      gpg_opts.merge!({:sign => true})
     end
     gpg_opts = HookManager.run("gpg-options", 
                                {:operation => "encrypt", :options => gpg_opts}) || gpg_opts
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-30 23:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-30 22:57 [sup-devel] Fixed bug with messages not being signed Hamish

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox