1 desc "read news article from STDIN and post to rubyforge"
4 spec = Gem::Specification.load('raindrops.gemspec')
5 tmp = Tempfile.new('rf-news')
6 _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
9 tmp.puts spec.description.strip
11 tmp.puts "* #{spec.homepage}"
12 tmp.puts "* #{spec.email}"
13 tmp.puts "* #{git_url}"
14 tmp.print "\nChanges:\n\n"
17 system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
18 msg = File.readlines(tmp.path)
21 blank == "\n" or abort "no newline after subject!"
23 body = msg.join("").strip!
25 rf = RubyForge.new.configure
27 rf.post_news('rainbows', subject, body)