Permalink
Browse files

fixes Rake::RDocTask deprecation warnings from rake 0.9.0

  • Loading branch information...
1 parent a81c2ec commit b6040f4e84995ce2bdf7b3e20c17efa201685dc5 @vijaydev vijaydev committed with arunagw May 24, 2011
@@ -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
@@ -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'
@@ -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
@@ -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")
@@ -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 b6040f4

Please sign in to comment.