[Rubygems-developers] 0.4.0 bugfix release
jim at weirichhouse.org
Mon May 31 11:57:52 EDT 2004
Gavin Sinclair wrote:
> On Tuesday, June 1, 2004, 12:31:15 AM, Jim wrote:
>>I think we still need the ability to add RDoc files (and possibly
>>options) to the gem spec. Without this, the rake documentation
>>generated by the automatic rdoc generation option will be incomplete. I
>>don't think this has been added yet.
> Agreed. Can you give an example of how you would like the rake
> gemspec to look?
This would be great. The new options are listed below in the commented
spec = Gem::Specification.new do |s|
s.name = 'rake'
s.version = PKG_VERSION
s.summary = "Ruby based make-like utility."
s.description = <<-EOF
Rake is a Make-like program implemented in Ruby. Tasks
and dependencies are specified in standard Ruby syntax.
s.files = PKG_FILES.to_a
s.require_path = 'lib'
s.autorequire = 'rake'
s.bindir = "bin"
s.executables = ["rake"]
s.default_executable = "rake"
s.has_rdoc = true
# BEGIN NEW GEM SPEC OPTIONS ...
s.rdoc_options << '--title "Rake -- Ruby Make"'
s.rdoc_options << '--line-numbers' << '--inline-source'
s.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
# END NEW GEM SPEC OPTIONS
s.author = "Jim Weirich"
s.email = "jim at weirichhouse.org"
s.homepage = "http://http://onestepback.org"
s.rubyforge_project = "rake"
The above kinda assumes that a rakes-style FileList object is used for
the rdoc_files attribute. If we don't implement that, I would build the
file list in Rake (e.g. RDOC_FILES) and then just say:
s.rdoc_files = RDOC_FILES.to_a
in the Gem spec.
If rdoc_files is not explicitly specified, it should default to whatever
is included today (i.e. something like 'lib/**/*.rb').
-- Jim Weirich jim at weirichhouse.org http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
More information about the Rubygems-developers