Skip to content

Commit 5749b22

Browse files
st0012olleolleolle
andauthored
Align behaviour between bundle exec rdoc and rake rdoc (#1156)
* Align behaviour between `bundle exec rdoc` and `rake rdoc` By using `.rdoc_options` to specify the RDoc options, we can make most of the rake task options the in-repo defaults. This allows us to use the same options for both `bundle exec rdoc` and `rake rdoc` and get a consistent experience. * Apply suggestions from code review Co-authored-by: Olle Jonsson <[email protected]> --------- Co-authored-by: Olle Jonsson <[email protected]>
1 parent e47920d commit 5749b22

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.document

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
History.txt
22
LICENSE.txt
33
README.txt
4-
RI.txt
5-
RI.md
4+
*.md
5+
*.rdoc
66
lib
77
doc

.rdoc_options

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
exclude:
2+
- lib/rdoc/rd/block_parser.ry
3+
- lib/rdoc/rd/inline_parser.ry
4+
- lib/rdoc/markdown.kpeg
5+
- lib/rdoc/markdown/literals.kpeg
6+
op_dir: _site # for GitHub Pages and should match the config of RDoc task in Rakefile
7+
title: rdoc Documentation
8+
main_page: README.rdoc

Rakefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ task :default => :test
2121

2222
task rdoc: :generate
2323
RDoc::Task.new do |doc|
24-
doc.main = 'README.rdoc'
25-
doc.title = "rdoc #{RDoc::VERSION} Documentation"
26-
doc.rdoc_dir = '_site' # for github pages
27-
doc.rdoc_files = FileList.new %w[lib/**/*.rb *.rdoc *.md doc/rdoc/markup_reference.rb] - PARSER_FILES
24+
# RDoc task defaults to /html and overrides the op_dir option in .rdoc_options
25+
doc.rdoc_dir = "_site" # for GitHub Pages
2826
end
2927

3028
task "coverage" do

0 commit comments

Comments
 (0)