diff --git a/railties/lib/rails/generators/rails/plugin/templates/Rakefile.tt b/railties/lib/rails/generators/rails/plugin/templates/Rakefile.tt index 77149ae351..c5afe79b86 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/Rakefile.tt +++ b/railties/lib/rails/generators/rails/plugin/templates/Rakefile.tt @@ -1,6 +1,6 @@ #!/usr/bin/env rake require 'rake/testtask' -require 'rake/rdoctask' +require 'rdoc/task' desc 'Default: run unit tests.' task :default => :test @@ -14,10 +14,10 @@ Rake::TestTask.new(:test) do |t| end desc 'Generate documentation for the <%= file_name %> plugin.' -Rake::RDocTask.new(:rdoc) do |rdoc| +RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = '<%= class_name %>' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README') rdoc.rdoc_files.include('lib/**/*.rb') -end \ No newline at end of file +end diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile index 5704e75a29..1bf9c8c831 100755 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile @@ -5,9 +5,9 @@ rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end -require 'rake/rdoctask' +require 'rdoc/task' -Rake::RDocTask.new(:rdoc) do |rdoc| +RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = '<%= camelized %>' rdoc.options << '--line-numbers' << '--inline-source' diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index edd716d7d0..c8b4040151 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -1,7 +1,7 @@ -require 'rake/rdoctask' +require 'rdoc/task' # Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise -class RDocTaskWithoutDescriptions < Rake::RDocTask +class RDocTaskWithoutDescriptions < RDoc::Task def define task rdoc_task_name diff --git a/railties/test/railties/railtie_test.rb b/railties/test/railties/railtie_test.rb index 7ea8364ae9..18fdf59fe3 100644 --- a/railties/test/railties/railtie_test.rb +++ b/railties/test/railties/railtie_test.rb @@ -97,7 +97,7 @@ module RailtiesTest assert !$ran_block require 'rake' require 'rake/testtask' - require 'rake/rdoctask' + require 'rdoc/task' AppTemplate::Application.load_tasks assert $ran_block @@ -121,7 +121,7 @@ module RailtiesTest assert_equal [], $ran_block require 'rake' require 'rake/testtask' - require 'rake/rdoctask' + require 'rdoc/task' AppTemplate::Application.load_tasks assert $ran_block.include?("my_tie") diff --git a/railties/test/railties/shared_tests.rb b/railties/test/railties/shared_tests.rb index e5debf29ae..659551d08a 100644 --- a/railties/test/railties/shared_tests.rb +++ b/railties/test/railties/shared_tests.rb @@ -237,7 +237,7 @@ module RailtiesTest boot_rails require 'rake' - require 'rake/rdoctask' + require 'rdoc/task' require 'rake/testtask' Rails.application.load_tasks Rake::Task[:foo].invoke