提交 ee580d0c 编写于 作者: J Jeremy Kemper

rake doc:rails complains loudly if there's no path to generate docs from

上级 e00bc711
......@@ -11,9 +11,11 @@ namespace :doc do
rdoc.rdoc_files.include('lib/**/*.rb')
}
desc 'Generate documentation for the Rails framework. Specify path with PATH="/path/to/rails"'
desc 'Generate documentation for the Rails framework. Specify path with RAILS_PATH="/path/to/rails"'
Rake::RDocTask.new("rails") { |rdoc|
path = ENV['RAILS_PATH'] || 'vendor/gems/gems'
raise "Missing Rails directory at #{path}" unless File.directory?(path)
version = "-#{Rails::VERSION::STRING}" unless ENV['RAILS_PATH']
rdoc.rdoc_dir = 'doc/api'
rdoc.template = "#{ENV['template']}.rb" if ENV['template']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册