Skip to content

Commit

Permalink
Removed old drive reference.
Browse files Browse the repository at this point in the history
Concat local rdoc options on the end.
Added configured_args as a place to store local rdoc configuration.


git-svn-id: http://rubygems.rubyforge.org/svn/trunk@381 3d4018f9-ac1a-0410-99e9-8a154d859a19
  • Loading branch information
jimweirich committed Jul 3, 2004
1 parent d823263 commit 95c9803
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion rubygems/lib/rubygems/doc_manager.rb
Expand Up @@ -46,12 +46,12 @@ def generate_rdoc
say "WARNING: Generating RDoc on .gem that may not have RDoc." unless @spec.has_rdoc?
rdoc_dir = File.join(@doc_dir, "rdoc")
begin
drive = nil
source_dirs = @spec.require_paths.clone.concat(@spec.extra_rdoc_files)
current_dir = Dir.pwd
Dir.chdir(@spec.full_gem_path)
begin
@rdoc_args = rdoc_args_from_spec(@rdoc_args)
@rdoc_args.concat(DocManager.configured_args)
r = RDoc::RDoc.new
r.document(['--op', rdoc_dir, '--template', 'kilmer'] + @rdoc_args.flatten + source_dirs)
ensure
Expand All @@ -66,6 +66,21 @@ def uninstall_doc
doc_dir = File.join(@spec.installation_path, "doc", @spec.full_name)
FileUtils.rm_rf doc_dir
end

class << self
def configured_args
@configured_args ||= []
end

def configured_args=(args)
case args
when Array
@configured_args = args
when String
@configured_args = args.split
end
end
end

end
end

0 comments on commit 95c9803

Please sign in to comment.