[Rubygems-developers] Idea: more detailed file and rdoc specification

Chad Fowler chad at chadfowler.com
Sat Dec 6 07:16:32 EST 2003


On Sat, 6 Dec 2003, Gavin Sinclair wrote:

# Folks,
# 
# I was halfway towards implementing this idea when I thought it would
# be good to raise it for discussion.  Take a look at the (invalid)
# specification below.  The things to notice are in their own paragraph.
# 
#   require 'rubygems'
#   require 'rake'
# 
#   spec = Gem::Specification.new do |s|
#     s.name = 'extensions'
#     s.version = File.read("VERSION").strip
#     s.platform = Gem::Platform::RUBY
#     s.summary = "Ruby/Extensions adds commonly-used extensions to core classes."
# 
#     s.files = Gem::Specification::Files.new do |gf|
#       gf.lib = FileList["lib/**/*.rb"]
#       gf.bin = FileList["bin/*"]
#       gf.doc = FileList[%w{README README.1st ChangeLog HISTORY}]
#     end
# 
#     s.rdocspec = Gem::Specification::RDocSpec.new do |rs|
#       rs.files = s.files.lib + "README"
#       rs.title = "Ruby/Extensions API Documentation"
#       rs.main = "README"
#     end
# 
#     s.require_path = 'lib'
#     s.autorequire = 'extensions/all'
#     s.author = "Gavin Sinclair"
#     s.email = "gsinclair at soyabean.com.au"
#     s.rubyforge_project = "extensions"
#     s.homepage = "http://extensions.rubyforge.org"
#   end
# 
#   if $0 == __FILE__
#     Gem::Builder.new(spec).build
#   end
# 


I like it.  I don't know if I've worked through all of the consequences, 
but on first pass it looks like a good idea.

I would like to preserve the current rdoc behavior for people who don't 
care to specify any details (accepting the default behavior).

Chad



More information about the Rubygems-developers mailing list