1 # -*- encoding: binary -*-
3 cgit_url = Wrongdoc.config[:cgit_url]
4 git_url = Wrongdoc.config[:git_url]
6 desc "post news article to rubyforge"
9 spec = Gem::Specification.load('io_splice.gemspec')
10 tmp = Tempfile.new('rf-news')
11 _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
14 tmp.puts spec.description.strip
16 tmp.puts "* #{spec.homepage}"
17 tmp.puts "* #{spec.email}"
18 tmp.puts "* #{git_url}"
19 tmp.print "\nChanges:\n\n"
22 system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
23 msg = File.readlines(tmp.path)
26 blank == "\n" or abort "no newline after subject!"
28 body = msg.join("").strip!
30 rf = RubyForge.new.configure
32 rf.post_news('qrp', subject, body)