switch to wrongdoc, no more JavaScript!
[metropolis.git] / Rakefile
blob35e37e4aa8cbeaaf13ffc91b144ade79da6f2abb
1 # -*- encoding: binary -*-
2 autoload :Gem, 'rubygems'
3 cgit_url = "http://git.bogomips.org/cgit/metropolis.git"
4 git_url = 'git://git.bogomips.org/metropolis.git'
6 desc "post to RAA"
7 task :raa_update do
8   require 'net/http'
9   require 'net/netrc'
10   rc = Net::Netrc.locate('metropolis-raa') or abort "~/.netrc not found"
11   password = rc.password
13   s = Gem::Specification.load('metropolis.gemspec')
14   desc = [ s.description.strip ]
15   desc << ""
16   desc << "Metropolis is licensed under the terms of the AGPLv3, " \
17           "but RAA doesn't have a field for it"
18   desc << ""
19   desc << "* #{s.email}"
20   desc << "* #{git_url}"
21   desc << "* #{cgit_url}"
22   desc = desc.join("\n")
23   uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
24   form = {
25     :name => s.name,
26     :short_description => s.summary,
27     :version => s.version.to_s,
28     :status => 'experimental',
29     :owner => s.authors.first,
30     :email => s.email,
31     :category_major => 'Library',
32     :category_minor => 'Web',
33     :url => s.homepage,
34     :download => "http://rubyforge.org/frs/?group_id=8977",
35     :license => "OpenSource", # AGPLv3, actually
36     :description_style => 'Plain',
37     :description => desc,
38     :pass => password,
39     :submit => "Update",
40   }
41   res = Net::HTTP.post_form(uri, form)
42   p res
43   puts res.body
44 end