From: Chad Fowler Date: 2004-10-08T04:14:24+09:00 Subject: Re: Gem packaging... On Fri, 8 Oct 2004 03:49:45 +0900, GGarramuno wrote: > After I got my copy of the ruby book and went thru the rubygems packaging, I > tried repackaging my getopt-declare library as a gem. Great! Thanks! Very cool library, too. > It worked fine, but I did run into a stumbling block, when it came to the ri > documentation. Currently, due to its length, I keep the rdoc documentation in > a separate file. > > My gemspec looks like: > > require 'rubygems' > > spec = Gem::Specification.new do |s| > s.name = 'getopt-declare' > s.version = "1.09.7" > s.author = "Gonzalo Garramuno" > s.email = "GGarramuno@aol.com" > s.homepage = "http://getoptdeclare.rubyforge.org/" > s.platform = Gem::Platform::RUBY > s.summary = "Comprehensive and easy to use command-line parser library using > regular expressions (port of Perl's module)." > s.files = Dir.glob("{samples,tests,lib,docs}/**/*").delete_if {|item| > item.include?("CVS") || item.include?("rdoc")} > s.require_path = 'lib' > end > > if $0==__FILE__ > Gem::manage_gems > Gem::Builder.new(spec).build > end > > and the documentation is in a file inside the docs directory as > docs/Declare.rdoc. > I've tried also adding the s.extra_rdocs_files and listing in there without > success. > > Whenever I install, I get: > WARNING: Generating RDoc on .gem that may not have RDoc. > This is something that I think we'll probably get rid of. We have an attribute in the gemspec called "has_rdoc?" which you need to set to true to explicitly declare that you have rdoc'd the library. The idea was that all ruby libraries can be run through rdoc, but the ones that have actually be documented in the source are the ones that are going to really be valuable documentation-wise. Nobody really uses this though, so you almost always see this warning. ;) > and obviously 'ri' remains unaware of the new module(s). > Yea, we haven't sorted the "ri" integration out yet. We'll make that one of our focuses for RubyGems 0.9.0. Thanks for the feedback! Chad