Skip to content

Commit

Permalink
Align behaviour between bundle exec rdoc and rake rdoc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
st0012 committed Aug 20, 2024
1 parent b8c2bcd commit e60ea35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .document
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
History.txt
LICENSE.txt
README.txt
RI.txt
RI.md
*.md
*.rdoc
lib
doc
8 changes: 8 additions & 0 deletions .rdoc_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exclude:
- lib/rdoc/rd/block_parser.ry
- lib/rdoc/rd/inline_parser.ry
- lib/rdoc/markdown.kpeg
- lib/rdoc/markdown/literals.kpeg
op_dir: _site # for GH pages and should match the config of RDoc task in Rakefile
title: rdoc Documentation
main_page: README.rdoc
6 changes: 2 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ task :default => :test

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

task "coverage" do
Expand Down

0 comments on commit e60ea35

Please sign in to comment.