diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-05 03:53:12 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-05 03:53:12 -0700 |
commit | c09f94c6ffdb6a4126bf4526ac3a1163d03c4930 (patch) | |
tree | 237145a69742e23665546cf64ff00d2c2e68270a | |
parent | 145b65a5b0713125b75f62e1d7935ae7a997fe9e (diff) | |
download | rainbows-c09f94c6ffdb6a4126bf4526ac3a1163d03c4930.tar.gz |
-rw-r--r-- | Rakefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |