Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1511 from vijaydev/rake_rdoc_fixes_cherry_picks_3_0

Rake rdoc fixes cherry picks for 3-0-stable
  • Loading branch information...
commit d55cf3038352807756eae6d73a1e5bce4c75b4bc 2 parents 6512af2 + bbfd652
@tenderlove tenderlove authored
View
4 actionmailer/Rakefile
@@ -1,7 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
desc "Default Task"
task :default => [ :test ]
@@ -24,7 +24,7 @@ end
spec = eval(File.read('actionmailer.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 actionpack/Rakefile
@@ -1,7 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
desc "Default Task"
task :default => :test
@@ -35,7 +35,7 @@ end
spec = eval(File.read('actionpack.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 activemodel/Rakefile
@@ -20,11 +20,11 @@ namespace :test do
end
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
spec = eval(File.read("#{dir}/activemodel.gemspec"))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 activerecord/Rakefile
@@ -1,7 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
require File.expand_path(File.dirname(__FILE__)) + "/test/config"
@@ -160,7 +160,7 @@ task :rebuild_frontbase_databases => 'frontbase:rebuild_databases'
spec = eval(File.read('activerecord.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 activeresource/Rakefile
@@ -1,7 +1,7 @@
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
desc "Default Task"
task :default => [ :test ]
@@ -26,7 +26,7 @@ end
spec = eval(File.read('activeresource.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 activesupport/Rakefile
@@ -1,5 +1,5 @@
require 'rake/testtask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
task :default => :test
Rake::TestTask.new do |t|
@@ -20,7 +20,7 @@ dist_dirs = [ "lib", "test"]
spec = eval(File.read('activesupport.gemspec'))
-Rake::GemPackageTask.new(spec) do |p|
+Gem::PackageTask.new(spec) do |p|
p.gem_spec = spec
end
View
4 railties/Rakefile
@@ -1,6 +1,6 @@
require 'rake'
require 'rake/testtask'
-require 'rake/gempackagetask'
+require 'rubygems/package_task'
require 'date'
require 'rbconfig'
@@ -59,7 +59,7 @@ end
spec = eval(File.read('railties.gemspec'))
-Rake::GemPackageTask.new(spec) do |pkg|
+Gem::PackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
View
6 railties/lib/rails/generators/rails/plugin/templates/Rakefile.tt
@@ -1,6 +1,6 @@
require '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
10 railties/lib/rails/tasks/documentation.rake
@@ -1,7 +1,13 @@
-require 'rake/rdoctask'
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
# 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
2  railties/test/railties/railtie_test.rb
@@ -85,7 +85,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
View
2  railties/test/railties/shared_tests.rb
@@ -170,7 +170,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
Please sign in to comment.
Something went wrong with that request. Please try again.