about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-15 14:00:47 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-15 14:12:40 -0800
commita1321e72bea710270d1091a5616f0bbd1e2bbad4 (patch)
tree7cef31bd5d906c7eaa671fae116d1b2e59432806 /Rakefile
parent54ab41af8430e00acba87ae6eac455574cdb3838 (diff)
downloadunicorn-a1321e72bea710270d1091a5616f0bbd1e2bbad4.tar.gz
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile41
1 files changed, 39 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 2d4386a..67534f2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -33,6 +33,7 @@ def tags
 end
 
 cgit_url = "http://git.bogomips.org/cgit/unicorn.git"
+git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/unicorn.git'
 
 desc 'prints news as an Atom feed'
 task :news_atom do
@@ -93,8 +94,6 @@ desc "print release notes for Rubyforge"
 task :release_notes do
   require 'rubygems'
 
-  git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/unicorn.git'
-
   spec = Gem::Specification.load('unicorn.gemspec')
   puts spec.description.strip
   puts ""
@@ -106,3 +105,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('unicorn-raa') or abort "~/.netrc not found"
+  password = rc.password
+
+  s = Gem::Specification.load('unicorn.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 => 'stable',
+    :owner => s.authors.first,
+    :email => s.email,
+    :category_major => 'Library',
+    :category_minor => 'Web',
+    :url => s.homepage,
+    :download => "http://rubyforge.org/frs/?group_id=1306",
+    :license => "Ruby's",
+    :description_style => 'Plain',
+    :description => desc,
+    :pass => password,
+    :submit => "Update",
+  }
+  res = Net::HTTP.post_form(uri, form)
+  p res
+  puts res.body
+end