Sha256: b7dec853a12fd19bc9a03db1ebac53e652a660530f8bb3ab6da45526cf8fe1f1

Contents?: true

Size: 906 Bytes

Versions: 4

Compression:

Stored size: 906 Bytes

Contents

# -*- encoding: binary -*-
cgit_url = "http://bogomips.org/kgio.git"
git_url = 'git://bogomips.org/kgio.git'

desc "post news article to rubyforge"
task :publish_news do
  require 'rubyforge'
  spec = Gem::Specification.load('kgio.gemspec')
  tmp = Tempfile.new('rf-news')
  _, subject, body = `git cat-file tag v#{spec.version}`.split(/\n\n/, 3)
  tmp.puts subject
  tmp.puts
  tmp.puts spec.description.strip
  tmp.puts ""
  tmp.puts "* #{spec.homepage}"
  tmp.puts "* #{spec.email}"
  tmp.puts "* #{git_url}"
  tmp.print "\nChanges:\n\n"
  tmp.puts body
  tmp.flush
  system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
  msg = File.readlines(tmp.path)
  subject = msg.shift
  blank = msg.shift
  blank == "\n" or abort "no newline after subject!"
  subject.strip!
  body = msg.join("").strip!

  rf = RubyForge.new.configure
  rf.login
  rf.post_news('rainbows', subject, body)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kgio-2.9.2 Rakefile
kgio-2.9.1 Rakefile
kgio-2.9.0.2.gf33a Rakefile
kgio-2.9.0 Rakefile