about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-01-06 17:32:07 -0800
committerEric Wong <normalperson@yhbt.net>2010-01-06 17:32:07 -0800
commitf8f05dc199a0553bbcd03deb990f220d57278cc9 (patch)
treee79773254e45a08dd6eec89f3545ab778995124d /Rakefile
parent684a9d6083a7f95a3010e7a1291df7ab6de0f394 (diff)
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index ff739a8..8997170 100644
--- a/Rakefile
+++ b/Rakefile
@@ -117,3 +117,41 @@ task :release_notes do
   print "\nChanges:\n\n"
   puts body
 end
+
+desc "post to RAA"
+task :raa_update do
+  require 'rubygems'
+  require 'net/http'
+  require 'net/netrc'
+  rc = Net::Netrc.locate('clogger-raa') or abort "~/.netrc not found"
+  password = rc.password
+
+  s = Gem::Specification.load('clogger.gemspec')
+  desc = [ s.description.strip ]
+  desc << ""
+  desc << "* #{s.email}"
+  desc << "* #{git_url}"
+  desc << "* #{cgit_url}"
+  desc = desc.join("\n")
+  uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
+  form = {
+    :name => s.name,
+    :short_description => s.summary,
+    :version => s.version.to_s,
+    :status => 'experimental',
+    :owner => s.authors.first,
+    :email => s.email,
+    :category_major => 'Library',
+    :category_minor => 'Rack',
+    :url => s.homepage,
+    :download => 'http://rubyforge.org/frs/?group_id=8896',
+    :license => 'LGPLv3',
+    :description_style => 'Plain',
+    :description => desc,
+    :pass => password,
+    :submit => 'Update',
+  }
+  res = Net::HTTP.post_form(uri, form)
+  p res
+  puts res.body
+end