Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1305 from amatsuda/require_rdoc_task_fail2

Ensure RDoc::Task exists even if 'rdoc/task' was not required
  • Loading branch information...
commit d25b7c2eeefff3a0abf7b532c10ce25a71d0fba2 2 parents 89d06ea + 05adf52
José Valim josevalim authored
7 Rakefile
View
@@ -1,11 +1,6 @@
#!/usr/bin/env rake
-
-begin
- require 'rdoc/task'
-rescue LoadError
- require 'rake/rdoctask'
-end
+require 'rdoc/task'
require 'net/http'
$:.unshift File.expand_path('..', __FILE__)
2  railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
View
@@ -7,7 +7,9 @@ end
begin
require 'rdoc/task'
rescue LoadError
+ require 'rdoc/rdoc'
require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
end
RDoc::Task.new(:rdoc) do |rdoc|
2  railties/lib/rails/tasks/documentation.rake
View
@@ -1,7 +1,9 @@
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
7 railties/test/railties/railtie_test.rb
View
@@ -97,12 +97,7 @@ class MyTie < Rails::Railtie
assert !$ran_block
require 'rake'
require 'rake/testtask'
- begin
- require 'rdoc/task'
- rescue LoadError
- require 'rake/rdoctask'
- end
-
+ require 'rdoc/task'
AppTemplate::Application.load_tasks
assert $ran_block
6 railties/test/railties/shared_tests.rb
View
@@ -237,11 +237,7 @@ def test_rake_tasks_lib_tasks_are_loaded
boot_rails
require 'rake'
- begin
- require 'rdoc/task'
- rescue LoadError
- require 'rake/rdoctask'
- end
+ 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.