できた(というか切り出してきた)gemspec
http://github.com/satoko/prawn/tree/master/prawn.gemspec

forkしているprawnにはprawn.gemspecファイルがありません。
で、自分で適当にでっち上げようとしたのですが、どうやらgemspec(spec.files)の内容が正しくない様子で、動作するgemが作れません。いちいち使用するすべてのファイルを上げなければいけないのだけれど、どうしたら簡単にできるものか...と思ったら、project内のRakefileにgemspecがあった!というので、それを切りだしました。
そこに至るまでのポイントぽいものを挙げます。

gemspecで重要な属性

Important Attributes
name .. version .. platform .. summary .. require_paths .. files .. dependencies
http://docs.rubygems.org/read/chapter/20

spec.fileの便利な書き方:Dir.blog

(注意)githubの場合Dir.globはgem生成時にエラーになるようで(エラー通知メールが来てた)、irbでDir.blogして展開したものをgemspecにコピペするのが正解のようです。

   1  irb(main):001:0> Dir.glob("{examples,lib,spec,vendor,data}/**/**/*")

結果をspec.filesにコピペ。

   1  Gem::Specification.new do |spec|
   2    spec.name = "prawn"
   3    spec.files = ["copy & past the result of Dir.blog"]  +
   4                        ["Rakefile"]

gemspecでローカルで正しいgemが作れるかテストする

下記のコマンドで生成されたgemをインストールし、展開後のdirを見たりテストを実行したりして正しくgemが作られているかテストします。

   1  $ gem build prawn.gemspec

githubでgems.githum.comの一覧に入れてもらう手順

  1. prawn.gemspecというファイルを用意する
  2. コミット
       1  git push prawn.gemspec -m "add gemspec file"
    
  3. https://github.com/satoko/prawn/editRubyGemにチェックする
  4. gem searchで所望のgemが出てくるのを待つ(max 15分くらい?)
       1  $ gem search satoko-prawn -r
       2  *** REMOTE GEMS ***
       3  satoko-prawn (0.2.99.2)
    

(注意)一覧とはここです。

Refs

http://d.hatena.ne.jp/akm/20080621#1214036969
http://docs.rubygems.org/read/chapter/20
http://code.google.com/p/rubeus/source/browse/trunk/rubeus.gemspec#

posted by Png satoko on Thu 2 Oct 2008 at 10:09 with 1 comment
Contents
gemspecファイルの書き方
Comments
瀧内元気: MacOS版は以下にあります * [genki/ViMouse](https://githu... '23-1
KingofSmack: Here also good reads for this mobile applicatio... '14-5
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
dsjf: https://gist.github.com/6bf1bf2c3cbb5eb6e7a7 これ... '13-1
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ