Skip to content

Commit d182cd6

Browse files
committed
Add rdoc options
Specify the main page and the page directory. Also in Rakefile, extract and use the same options from the gemspec file.
1 parent ed28355 commit d182cd6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ end
1616
task :default => :test
1717

1818
task :rdoc do
19-
sh("rdoc", "--op", "rdoc")
19+
sh("rdoc", *Bundler::GemHelper.instance.gemspec.rdoc_options, ".")
2020
end

optparse.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Gem::Specification.new do |spec|
2323
spec.metadata["source_code_uri"] = spec.homepage
2424

2525
spec.files = Dir["{doc,lib,misc}/**/*"] + %w[README.md ChangeLog COPYING]
26+
spec.rdoc_options = ["--main=README.md", "--op=rdoc", "--page-dir=doc"]
2627
spec.bindir = "exe"
2728
spec.executables = []
2829
spec.require_paths = ["lib"]

0 commit comments

Comments
 (0)