Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure RDoc::Task exists even if 'rdoc/task' was not required

  • Loading branch information...
commit 05adf524c6905eb5ac448e473cc64baa3571fd51 1 parent ee46bb7
@amatsuda amatsuda authored
View
7 Rakefile
@@ -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__)
View
2  railties/lib/rails/generators/rails/plugin_new/templates/Rakefile
@@ -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|
View
2  railties/lib/rails/tasks/documentation.rake
@@ -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
View
7 railties/test/railties/railtie_test.rb
@@ -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
View
6 railties/test/railties/shared_tests.rb
@@ -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

2 comments on commit 05adf52

@chopmo

@amatsuda I think this commit introduces a dependency to the rdoc gem - please see #1598

@amatsuda
Collaborator

@chopmo Argh! You're right. It seems I didn't imagine that case. Let me take a look...

Please sign in to comment.
Something went wrong with that request. Please try again.