Skip to content

Commit c3fa6b3

Browse files
committed
[Misc #21350] [DOC] Include docs of bundled gems
1 parent 93ce95d commit c3fa6b3

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

.rdoc_options

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ rdoc_include:
1111
exclude:
1212
- \Alib/irb
1313
- \.gemspec\z
14+
- \.java\z
15+
- \.rbs\z
16+
- \.re\z
17+
- \.yaml\z
18+
- /depend\z
19+
- /bin/console\z
20+
- /bin/setup\z
1421

1522
autolink_excluded_words:
1623
- Class

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ LIBRUBY_EXTS = ./.libruby-with-ext.time
6565
REVISION_H = ./.revision.time
6666
PLATFORM_D = $(TIMESTAMPDIR)/.$(PLATFORM_DIR).time
6767
ENC_TRANS_D = $(TIMESTAMPDIR)/.enc-trans.time
68-
RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir"
68+
RDOC = $(XRUBY) "$(tooldir)/rdoc-srcdir" --bundled-gems gems/bundled_gems .bundle/gems
6969
RDOCOUT = $(EXTOUT)/rdoc
7070
HTMLOUT = $(EXTOUT)/html
7171
CAPIOUT = doc/capi

tool/rdoc-srcdir

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ options.title = options.title.sub(/Ruby \K.*version/) {
1717
.sort # "MAJOR" < "MINOR", fortunately
1818
.to_h.values.join(".")
1919
}
20+
21+
if ARGV.first == "--bundled-gems"
22+
_, gems_list, gems_dir = ARGV.shift(3)
23+
bundles = File.read(gems_list)
24+
bundles.scan(/^([^#\s]+)\s+([^#\s]+)/) do |g, v|
25+
d = "#{gems_dir}/#{g}-#{v}/"
26+
ARGV << d if Dir.exist?(d)
27+
end
28+
end
29+
2030
options.parse ARGV
2131

2232
options.singleton_class.define_method(:finish) do

0 commit comments

Comments
 (0)