mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/rubygems_hook.rb: Updated for (upcoming) RubyGems 2
import. * test/rdoc/test_rdoc_rubygems_hook.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1eac1cb21e
commit
cb581e2059
3 changed files with 54 additions and 38 deletions
|
@ -109,8 +109,10 @@ class RDoc::RubygemsHook
|
|||
options.op_dir = destination
|
||||
options.finish
|
||||
|
||||
generator = options.generator.new @rdoc.store, options
|
||||
|
||||
@rdoc.options = options
|
||||
@rdoc.generator = options.generator.new options
|
||||
@rdoc.generator = generator
|
||||
|
||||
say "Installing #{generator} documentation for #{@spec.full_name}"
|
||||
|
||||
|
@ -134,8 +136,6 @@ class RDoc::RubygemsHook
|
|||
|
||||
setup
|
||||
|
||||
::RDoc::RDoc.reset
|
||||
|
||||
options = ::RDoc::Options.new
|
||||
options.default_title = "#{@spec.full_name} Documentation"
|
||||
options.files = []
|
||||
|
@ -158,6 +158,14 @@ class RDoc::RubygemsHook
|
|||
@rdoc = new_rdoc
|
||||
@rdoc.options = options
|
||||
|
||||
store = RDoc::Store.new
|
||||
store.encoding = options.encoding if options.respond_to? :encoding
|
||||
store.dry_run = options.dry_run
|
||||
store.main = options.main_page
|
||||
store.title = options.title
|
||||
|
||||
@rdoc.store = RDoc::Store.new
|
||||
|
||||
Dir.chdir @spec.full_gem_path do
|
||||
@rdoc.parse_files options.files
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue