diff options
author | Xavier Noria <fxn@hashref.com> | 2011-05-25 08:26:09 -0700 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-05-25 08:26:09 -0700 |
commit | ee46bb73d44338b7dfb8976cc59d742b9394148a (patch) | |
tree | 7b7c78f4f734106b0979ce8ef106479cfb8560ad /railties/lib/rails | |
parent | f116a4835bef4dcfb3a2cfcc915d5cf8681cdf6b (diff) | |
parent | 24b28a2a0c6a58e177b07ce3ccf56dc975541780 (diff) | |
download | rails-ee46bb73d44338b7dfb8976cc59d742b9394148a.tar.gz rails-ee46bb73d44338b7dfb8976cc59d742b9394148a.tar.bz2 rails-ee46bb73d44338b7dfb8976cc59d742b9394148a.zip |
Merge pull request #1301 from amatsuda/require_rdoc_task_fail
require 'rake/rdoctask' if failed to require 'rdoc/task'
Diffstat (limited to 'railties/lib/rails')
-rwxr-xr-x | railties/lib/rails/generators/rails/plugin_new/templates/Rakefile | 7 | ||||
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile index 1bf9c8c831..0e4c712acb 100755 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile @@ -4,8 +4,11 @@ begin rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end - -require 'rdoc/task' +begin + require 'rdoc/task' +rescue LoadError + require 'rake/rdoctask' +end RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index c8b4040151..59305322b7 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -1,4 +1,8 @@ -require 'rdoc/task' +begin + require 'rdoc/task' +rescue LoadError + require 'rake/rdoctask' +end # Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise class RDocTaskWithoutDescriptions < RDoc::Task |