mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
don't build docs for auxiliary modules
This commit is contained in:
parent
6014b44f67
commit
db984c336e
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@ task(:test => :spec)
|
|||
namespace :doc do
|
||||
task :readmes do
|
||||
Dir.glob 'lib/sinatra/*.rb' do |file|
|
||||
next if file == 'lib/sinatra/contrib.rb'
|
||||
excluded_files = %w[lib/sinatra/contrib.rb lib/sinatra/capture.rb lib/sinatra/engine_tracking.rb]
|
||||
next if excluded_files.include?(file)
|
||||
doc = File.read(file)[/^module Sinatra\n( #[^\n]*\n)*/m].scan(/^ *#(?!#) ?(.*)\n/).join("\n")
|
||||
file = "doc/#{file[4..-4].tr("/_", "-")}.rdoc"
|
||||
Dir.mkdir "doc" unless File.directory? "doc"
|
||||
|
|
Loading…
Add table
Reference in a new issue