about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-05 03:53:12 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-05 03:53:12 -0700
commitc09f94c6ffdb6a4126bf4526ac3a1163d03c4930 (patch)
tree237145a69742e23665546cf64ff00d2c2e68270a /Rakefile
parent145b65a5b0713125b75f62e1d7935ae7a997fe9e (diff)
downloadrainbows-c09f94c6ffdb6a4126bf4526ac3a1163d03c4930.tar.gz
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index b9a89c3..19efea4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -101,3 +101,19 @@ task :release_notes do
   print "\nChanges:\n\n"
   puts body
 end
+
+desc "read news article from STDIN and post to rubyforge"
+task :publish_news do
+  require 'rubyforge'
+  IO.select([STDIN], nil, nil, 1) or abort "E: news must be read from stdin"
+  msg = STDIN.readlines
+  subject = msg.shift
+  blank = msg.shift
+  blank == "\n" or abort "no newline after subject!"
+  subject.strip!
+  body = msg.join("").strip!
+
+  rf = RubyForge.new.configure
+  rf.login
+  rf.post_news('rainbows', subject, body)
+end