1 # -*- encoding: binary -*-
2 cgit_url = "http://bogomips.org/kgio.git"
3 git_url = 'git://bogomips.org/kgio.git'
5 desc "post news article to rubyforge"
8 spec = Gem::Specification.load('kgio.gemspec')
9 tmp = Tempfile.new('rf-news')
10 _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
13 tmp.puts spec.description.strip
15 tmp.puts "* #{spec.homepage}"
16 tmp.puts "* #{spec.email}"
17 tmp.puts "* #{git_url}"
18 tmp.print "\nChanges:\n\n"
21 system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
22 msg = File.readlines(tmp.path)
25 blank == "\n" or abort "no newline after subject!"
27 body = msg.join("").strip!
29 rf = RubyForge.new.configure
31 rf.post_news('rainbows', subject, body)