From 331327d3919a633679dd3f434d13173fa8df010f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 30 Mar 2010 01:33:51 +0200 Subject: Just inspect load paths to generate the documentation. --- railties/lib/rails/tasks/documentation.rake | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'railties') 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\"" -- cgit v1.2.3