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

Ticket #4245 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

[PATCH] fix generators and rake tasks in symlinked plugins

Reported by: progrium@gmail.com Assigned to: David
Priority: normal Milestone:
Component: Railties Version: edge
Severity: normal Keywords:
Cc:

Description

I use symlinked plugins in my development environment, but the generator lookup code uses a glob pattern that apparently ignores symlinked directories.

By changing the glob pattern from /vendor/plugins/**/generators to /vendor/plugins/*/generators it seems to work just the same but with symlinked plugins getting their generators included in the lookup.

Let me know if this is a horrible idea.

Attachments

symlinked_plugin_generator_lookup_fix.diff (0.8 kB) - added by progrium@gmail.com on 03/15/06 01:24:36.
teh patch
symlinked_plugins.patch (2.0 kB) - added by brandon on 12/01/06 04:32:27.
pick up generators and rake tasks in symlinked plugins

Change History

03/15/06 01:24:36 changed by progrium@gmail.com

  • attachment symlinked_plugin_generator_lookup_fix.diff added.

teh patch

12/01/06 04:32:27 changed by brandon

  • attachment symlinked_plugins.patch added.

pick up generators and rake tasks in symlinked plugins

12/01/06 04:39:22 changed by brandon

  • version changed from 1.0.0 to edge.
  • type changed from enhancement to defect.
  • severity changed from trivial to normal.
  • summary changed from [PATCH] Symlinked plugin generator lookup fix to [PATCH] fix generators and rake tasks in symlinked plugins.

Symlinking plugins is very common. When you have plugins installed as svn:externals, it is very helpful to download them into a shared directory, and just symlink them into your projects so you don't have 50 copies of the same plugin spread throughout your filesystem. The attached patch fixes this for generators, rake tasks, and the test:plugins task running tests in the plugins. It changes the use of globs from '/**/' (which doesn't follow symlinks), to '/*/**/' which will follow one level of symlinks and has no adverse effects.

Since rails partially works with symlinked plugins (it loads them), these other features of plugins should work.

01/19/07 12:16:08 changed by mislav

Rails plugin loading mechanism supports nested paths. If there are tests with those that pass after this patch, I don't see a reason why this wouldn't be fixed.

I use symlinks extensively, also.

02/01/07 20:12:37 changed by bitsweat

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

(In [6101]) Plugins may be symlinked in vendor/plugins. Closes #4245.