Browse files

Merge pull request #1278 from vijaydev/rake-doctask-warning-fix

Fixes Rake::RDocTask deprecation warnings from Rake 0.9.0
  • Loading branch information...
2 parents 36991f1 + b921679 commit 806d6009f3e931adb44460c0bae05fbba2d3c4cf @josevalim josevalim committed May 24, 2011
View
6 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
+end
View
4 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'
View
4 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
View
4 railties/test/railties/railtie_test.rb
@@ -97,7 +97,7 @@ class MyTie < Rails::Railtie
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 @@ class MyTie < Rails::Railtie
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")
View
2 railties/test/railties/shared_tests.rb
@@ -237,7 +237,7 @@ def test_rake_tasks_lib_tasks_are_loaded
boot_rails
require 'rake'
- require 'rake/rdoctask'
+ require 'rdoc/task'
require 'rake/testtask'
Rails.application.load_tasks
Rake::Task[:foo].invoke

0 comments on commit 806d600

Please sign in to comment.