ruby_posix_mq.git  about / heads / tags
POSIX message queues for Ruby
blob 5882d803a393ac7a554d7d6d08a9e5b7106e015b 1609 bytes (raw)
$ git show v0.6.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
# -*- encoding: binary -*-
cgit_url = "http://git.bogomips.org/cgit/ruby_posix_mq.git"
git_url = 'git://git.bogomips.org/ruby_posix_mq.git'

desc "read news article from STDIN and post to rubyforge"
task :publish_news do
  require 'rubyforge'
  IO.select([STDIN], nil, nil, 1) or abort "E: news must be read from stdin"
  msg = STDIN.readlines
  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

desc "post to RAA"
task :raa_update do
  require 'rubygems'
  require 'net/http'
  require 'net/netrc'
  rc = Net::Netrc.locate('posix_mq-raa') or abort "~/.netrc not found"
  password = rc.password

  s = Gem::Specification.load('posix_mq.gemspec')
  desc = [ s.description.strip ]
  desc << ""
  desc << "* #{s.email}"
  desc << "* #{git_url}"
  desc << "* #{cgit_url}"
  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.to_s,
    :status => 'experimental',
    :owner => s.authors.first,
    :email => s.email,
    :category_major => 'Library',
    :category_minor => 'System',
    :url => s.homepage,
    :download => 'http://rubyforge.org/frs/?group_id=5626',
    :license => 'LGPL', # LGPLv3, actually, but RAA is ancient...
    :description_style => 'Plain',
    :description => desc,
    :pass => password,
    :submit => 'Update',
  }
  res = Net::HTTP.post_form(uri, form)
  p res
  puts res.body
end

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