Skip to content

Commit 735ede7

Browse files
committed
Add autodiscovery of extensions via rdoc/discover.rb in third-party gems
1 parent 7047ce1 commit 735ede7

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

History.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
=== ? / 200?-??-??
22

33
* X Major Enhancements
4+
* RDoc now automatically loads rdoc/discover.rb files from installed gems.
45

56
* Y Minor Enhancements
6-
* Added a space after the commas in ri class method lists (rubyforge
7-
enhancement 22182).
7+
* Added a space after the commas in ri class method lists. RubyForge
8+
enhancement #22182.
89
* Converted to minitest.
910

1011
* Z Bug Fixes
1112
* Fix missing superclass in ri output.
1213
* Fix an rdoc crash when told to parse an empty file.
13-
14+
1415
=== 2.2.1 / 2008-09-24
1516
This version provides some minor fixes and enhancements to 2.2.0 intended
1617
to polish RDoc for Ruby 1.9.1.

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Hoe.new "rdoc", RDoc::VERSION do |rdoc|
1111
rdoc.remote_rdoc_dir = ''
1212

1313
rdoc.extra_dev_deps << ['minitest', '~> 1.3']
14+
rdoc.spec_extras['required_rubygems_version'] = '>= 1.3'
1415
end
1516

1617
# These tasks expect to have the following directory structure:

lib/rdoc/rdoc.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,15 @@ def document(argv)
291291
end
292292
end
293293

294+
if Gem.respond_to? :find_files then
295+
rdoc_extensions = Gem.find_files 'rdoc/discover'
296+
297+
rdoc_extensions.each do |extension|
298+
begin
299+
load extension
300+
rescue => e
301+
warn "error loading #{extension.inspect}: #{e.message} (#{e.class})"
302+
end
303+
end
304+
end
305+

0 commit comments

Comments
 (0)