Sha256: c9ef7843bbe02dd873e52ee4f5313cef42ad5667e1243671b2fef27c75f3f3c7

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 Bytes

Contents

# -*- encoding: binary -*-
require 'wrongdoc'
cgit_url = Wrongdoc.config[:cgit_url]
git_url = Wrongdoc.config[:git_url]

desc "post news article to rubyforge"
task :publish_news do
  require 'rubyforge'
  spec = Gem::Specification.load('io_splice.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('qrp', subject, body)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
io_splice-4.3.0 Rakefile