2 require 'rake/extensiontask'
3 Rake::ExtensionTask.new('clogger_ext')
5 warn "rake-compiler not available, cross compiling disabled"
8 cgit_url = "http://bogomips.org/clogger.git"
9 git_url = 'git://bogomips.org/clogger.git'
11 desc "post news article to rubyforge"
14 spec = Gem::Specification.load('clogger.gemspec')
15 tmp = Tempfile.new('rf-news')
16 _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
19 tmp.puts spec.description.strip
21 tmp.puts "* #{spec.homepage}"
22 tmp.puts "* #{spec.email}"
23 tmp.puts "* #{git_url}"
24 tmp.print "\nChanges:\n\n"
27 system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
28 msg = File.readlines(tmp.path)
31 blank == "\n" or abort "no newline after subject!"
33 body = msg.join("").strip!
35 rf = RubyForge.new.configure
37 rf.post_news('clogger', subject, body)
45 rc = Net::Netrc.locate('clogger-raa') or abort "~/.netrc not found"
46 password = rc.password
48 s = Gem::Specification.load('clogger.gemspec')
49 desc = [ s.description.strip ]
51 desc << "* #{s.email}"
52 desc << "* #{git_url}"
53 desc << "* #{cgit_url}"
54 desc = desc.join("\n")
55 uri = URI.parse('http://raa.ruby-lang.org/regist.rhtml')
58 :short_description => s.summary,
59 :version => s.version.to_s,
60 :status => 'experimental',
61 :owner => s.authors.first,
63 :category_major => 'Library',
64 :category_minor => 'Rack',
66 :download => 'http://rubyforge.org/frs/?group_id=8896',
68 :description_style => 'Plain',
73 res = Net::HTTP.post_form(uri, form)