diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-07 12:06:19 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-07 12:06:48 -0800 |
commit | ee580d0cc3794ecb4c6e259d2573695c60a422b4 (patch) | |
tree | 8875166a3d65b22968901eec30e36e8eadbb9181 /railties/lib | |
parent | e00bc711d8780d9c7018dec8a794cb0772cd3ad5 (diff) | |
download | rails-ee580d0cc3794ecb4c6e259d2573695c60a422b4.tar.gz rails-ee580d0cc3794ecb4c6e259d2573695c60a422b4.tar.bz2 rails-ee580d0cc3794ecb4c6e259d2573695c60a422b4.zip |
rake doc:rails complains loudly if there's no path to generate docs from
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index 1f4067d29e..b36adb2961 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -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'] |