Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6410 (closed enhancement: duplicate)

Opened 2 years ago

Last modified 1 year ago

[PATCH] rake tasks in /vendor/gems/[gem-name]/**/*.rake loaded

Reported by: nicwilliams Assigned to: David
Priority: normal Milestone: 1.2.4
Component: Railties Version: edge
Severity: trivial Keywords: gems rake tasks
Cc:

Description

Summary: Any *.rake tasks in the /vendor/gems/[gem-name]/ folders will be loaded by Rake

This patch is important, and will not break any existing applications (unless they found a use for the /vendor/gems folder in their apps), and only involves a one-line change to the railties/lib/tasks/rails.rb file to load up rake files.

Why this small patch is needed NOW: In the future, gems will be included/frozen into rails applications under the /vendor/gems/ folder (e.g. /vendor/gems/[gem-name]), in a manner similar to plugins now.

THIS IS NOT THAT TICKET (see discussion on Rails:Core forum)

That work will continue outside of rails-trac until something functional and useful is ready (with unit tests akin to current plugins).

This ticket is to provide Rakefile-loading support for rake tasks in the gems folders.

Effects on rails & its users: This is harmless to anyone not working on gems support for rails (unless they found a use for the /vendor/gems folder privately).

Attachments

vendor-gems-tasks-loader.diff (0.6 kB) - added by nicwilliams on 10/16/06 11:58:09.
Patch for railties/lib/tasks/rails.rb so Rake loads rake tasks in /vendor/gems/[gem-name]/**/tasks/**/*.rake files

Change History

10/16/06 11:58:09 changed by nicwilliams

  • attachment vendor-gems-tasks-loader.diff added.

Patch for railties/lib/tasks/rails.rb so Rake loads rake tasks in /vendor/gems/[gem-name]/**/tasks/**/*.rake files

10/16/06 11:59:09 changed by nicwilliams

The patch now restricts *.rake loading to files within tasks folders (or subfolders)

04/21/07 18:34:36 changed by josh

  • status changed from new to closed.
  • resolution set to duplicate.

Rolled into #8087.