summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2009-06-17 13:37:39 -0800
committerRyan Davis <ryand@zenspider.com>2009-06-17 13:37:39 -0800
commit897df3779cc8c12b87f9c65ef12423ca47addd00 (patch)
treee9db784a5ff928e5a56a8fc883a7074a06989224
parent1990e37d8ca0efddfe4e323dbb86bbf093319d37 (diff)
downloadhoe-897df3779cc8c12b87f9c65ef12423ca47addd00.tar.gz
OOPS! generate_email def was inside define tasks def
[git-p4: depot-paths = "//src/hoe/dev/": change = 5057]
-rw-r--r--lib/hoe/publish.rb36
1 files 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"