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)
34 rc = Net::Netrc.locate('raindrops-raa') or abort "~/.netrc not found"
35 password = rc.password
37 s = Gem::Specification.load('raindrops.gemspec')
38 desc = [ s.description.strip ]
40 desc << "* #{s.email}"
41 desc << "* #{git_url}"
42 desc << "* #{cgit_url}"
43 desc = desc.join("\n")
44 uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
47 :short_description => s.summary,
48 :version => s.version.to_s,
49 :status => 'experimental',
50 :owner => s.authors.first,
52 :category_major => 'Library',
53 :category_minor => 'Rack',
55 :download => 'http://rubyforge.org/frs/?group_id=8977',
56 :license => 'LGPL', # LGPLv3, actually, but RAA is ancient...
57 :description_style => 'Plain',
62 res = Net::HTTP.post_form(uri, form)