From 897df3779cc8c12b87f9c65ef12423ca47addd00 Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Wed, 17 Jun 2009 13:37:39 -0800 Subject: OOPS! generate_email def was inside define tasks def [git-p4: depot-paths = "//src/hoe/dev/": change = 5057] --- lib/hoe/publish.rb | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/hoe/publish.rb b/lib/hoe/publish.rb index 3158c7c..12e59ee 100644 --- a/lib/hoe/publish.rb +++ b/lib/hoe/publish.rb @@ -116,24 +116,6 @@ module Hoe::Publish end end - def generate_email full = nil - abort "No email 'to' entry. Run `rake config_hoe` to fix." unless - !full || email_to - - from_name, from_email = author.first, email.first - subject, title, body, urls = announcement - - [ - full && "From: #{from_name} <#{from_email}>", - full && "To: #{email_to.join(", ")}", - full && "Date: #{Time.now.rfc2822}", - "Subject: [ANN] #{subject}", - "", title, - "", urls, - "", body, - ].compact.join("\n") - end - desc 'Generate email announcement file.' task :debug_email do puts generate_email @@ -180,6 +162,24 @@ module Hoe::Publish task :announce => [:post_news, :post_blog, :publish_on_announce ] end + def generate_email full = nil + abort "No email 'to' entry. Run `rake config_hoe` to fix." unless + !full || email_to + + from_name, from_email = author.first, email.first + subject, title, body, urls = announcement + + [ + full && "From: #{from_name} <#{from_email}>", + full && "To: #{email_to.join(", ")}", + full && "Date: #{Time.now.rfc2822}", + "Subject: [ANN] #{subject}", + "", title, + "", urls, + "", body, + ].compact.join("\n") + end + def announcement # :nodoc: changes = self.changes.rdoc_to_markdown subject = "#{name} #{version} Released" -- cgit v1.2.1