aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-30 01:33:51 +0200
committerJosé Valim <jose.valim@gmail.com>2010-03-30 01:34:06 +0200
commit331327d3919a633679dd3f434d13173fa8df010f (patch)
treeec0d7bdad65a973bbd9a49bb1037ba6d4f5e2331
parent56bed512f92050f95701eca4f918086a8f1cda1e (diff)
downloadrails-331327d3919a633679dd3f434d13173fa8df010f.tar.gz
rails-331327d3919a633679dd3f434d13173fa8df010f.tar.bz2
rails-331327d3919a633679dd3f434d13173fa8df010f.zip
Just inspect load paths to generate the documentation.
-rw-r--r--railties/lib/rails/tasks/documentation.rake7
1 files changed, 1 insertions, 6 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake
index ff66b71dad..eadf7afc52 100644
--- a/railties/lib/rails/tasks/documentation.rake
+++ b/railties/lib/rails/tasks/documentation.rake
@@ -1,11 +1,6 @@
namespace :doc do
def gem_path(gem_name)
- if defined? Bundler
- @specs ||= Bundler.load.specs
- @specs.find{|s| s.name == gem_name}.full_gem_path
- else
- "#{ENV['RAILS_PATH']}/#{gem_name}"
- end
+ File.dirname($LOAD_PATH.grep(/#{gem_name}[\w\-\.]*\/lib$/).first)
end
desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""