mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fixes Rake::RDocTask deprecation warnings from rake 0.9.0
This commit is contained in:
parent
36991f195b
commit
b921679d0d
5 changed files with 10 additions and 10 deletions
|
@ -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 @@ 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")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue