Permalink
Browse files

Only load rake tasks from tasks/**/*.rake and lib/tasks/**/*.rake in …

…plugins

Previously, it was **/tasks/**/*.rake, and that loaded some paths that shouldn't be like:

  * vendor/plugins/admin_assistant/test_rails_app/lib/tasks/rspec.rake
  * vendor/plugins/will_paginate/test/tasks.rake

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
1 parent 58f1443 commit 0f14d7b6d37940a93c12c373e6e92e88f2dc96d7 @brynary brynary committed with NZKoz Aug 24, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 railties/lib/tasks/rails.rb
@@ -4,5 +4,6 @@
Dir["#{File.dirname(__FILE__)}/*.rake"].each { |ext| load ext }
# Load any custom rakefile extensions
-Dir["#{RAILS_ROOT}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
+Dir["#{RAILS_ROOT}/vendor/plugins/*/tasks/**/*.rake"].sort.each { |ext| load ext }
+Dir["#{RAILS_ROOT}/vendor/plugins/*/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
Dir["#{RAILS_ROOT}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }

1 comment on commit 0f14d7b

Contributor

fesplugas commented on 0f14d7b Oct 7, 2009

Does make sense to load tasks from gems?

Please sign in to comment.