Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

The doc:app task should include all .rdoc files #11903

Closed
bitaxis opened this Issue · 3 comments

3 participants

@bitaxis

Rails 4.0.0's doc:app task should process all .rdoc files found at the top level of an app, and not just README.rdoc. Making the following changes to the railties-4.0.0/lib/rails/tasks/documentation.rake file will make it a snap to add a new page, say, CHANGES.rdoc, for example, to the generated HTML output:

RDocTaskWithoutDescriptions.new("app") { |rdoc|
  rdoc.rdoc_dir = 'doc/app'
  rdoc.template = ENV['template'] if ENV['template']
  rdoc.title    = ENV['title'] || "Rails Application Documentation"
  rdoc.options << '--line-numbers'
  rdoc.options << '--charset' << 'utf-8'
  # include all .rdoc files as pages in the HTML output
  # rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('*.rdoc')
  rdoc.rdoc_files.include('app/**/*.rb')
  rdoc.rdoc_files.include('lib/**/*.rb')
}
@robin850
Collaborator

Could you please send a pull request with this change and maybe a test-case? It would be great!

@bitaxis

Pull request #11913 created.

@steveklabnik
Collaborator

Yup, since this is a feature, not a bug, the PR is good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.