ruby_posix_mq.git  about / heads / tags
POSIX message queues for Ruby
blob af1ad34cd7a5b9226352ab08bb4e909ada602cfd 916 bytes (raw)
$ git show v2.1.0:Rakefile	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
 
# -*- 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('posix_mq.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

git clone https://yhbt.net/ruby_posix_mq.git