]> git.openstreetmap.org Git - chef.git/commitdiff
Use mail gem instead of pony
authorTom Hughes <tom@compton.nu>
Thu, 16 Nov 2017 21:30:59 +0000 (21:30 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 16 Nov 2017 21:30:59 +0000 (21:30 +0000)
It seems pony hasn't been updated for a while and has broken
with the latest release of mail so just use mail directly.

cookbooks/chef/metadata.rb
cookbooks/chef/templates/default/report.rb.erb

index 57172dafe8a40ddff875068151dde3c0902f760f..5823fa6d608fe0e32411d5ddc3c9f1fbf802062a 100644 (file)
@@ -12,4 +12,4 @@ depends           "git"
 depends           "ohai"
 depends           "munin"
 depends           "systemd"
-gem               "pony"
+gem               "mail"
index 6b8ec5b9c027cd23df9b9a602bb2139c2b2b228b..518ec13837734ef1d5ea998876479cda9b46e9e3 100644 (file)
@@ -26,10 +26,14 @@ class Chef
 
         message << Array(backtrace).join("\n")
 
-        require "pony"
+        require "mail"
 
-        Pony.mail(:to => @config[:to], :from => @config[:from],
-                  :subject => subject, :body => message, :via => :smtp)
+        Mail.deliver do
+          to @config[:to]
+          from @config[:from]
+          subject subject
+          body message
+        end
       end
     end
   end