Rakefile in upr-0.2.0 vs Rakefile in upr-0.3.0

- old
+ new

@@ -22,10 +22,11 @@ end end.compact.sort { |a,b| b[:time] <=> a[:time] } end cgit_url = "http://git.bogomips.org/cgit/upr.git" +git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/upr.git' desc 'prints news as an Atom feed' task :news_atom do require 'nokogiri' new_tags = tags[0,10] @@ -86,12 +87,10 @@ desc "print release notes for Rubyforge" task :release_notes do require 'rubygems' - git_url = ENV['GIT_URL'] || 'git://git.bogomips.org/upr.git' - spec = Gem::Specification.load('upr.gemspec') puts spec.description.strip puts "" puts "* #{spec.homepage}" puts "* #{spec.email}" @@ -114,6 +113,46 @@ body = msg.join("").strip! rf = RubyForge.new.configure rf.login rf.post_news('rainbows', subject, body) +end + +desc "post to RAA" +task :raa_update do + require 'rubygems' + require 'net/http' + require 'net/netrc' + rc = Net::Netrc.locate('upr-raa') or abort "~/.netrc not found" + password = rc.password + p password + + s = Gem::Specification.load('upr.gemspec') + desc = [ s.description.strip ] + desc << "" + desc << "* #{s.homepage}" + desc << "* #{s.email}" + desc << "* #{git_url}" + desc << "* http://upr-demo.bogomips.org/" + 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, + :status => 'beta', + :owner => s.authors.first, + :email => 'upr@bogomips.org', + :category_major => 'Library', + :category_minor => 'Rack', + :url => s.homepage, + :download => "http://rubyforge.org/frs/?group_id=8977", + :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