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

Ticket #7292 (new defect)

Opened 1 year ago

Last modified 10 months ago

[PATCH] Fix plugin folder naming

Reported by: jeremymcanally Assigned to: core
Priority: low Milestone: 1.2.7
Component: ActiveRecord Version: edge
Severity: minor Keywords: plugin script
Cc:

Description

As noted in #3054, if a plugin has an oddball naming scheme or alternate version, script/plugin doesn't name the folder right (e.g., svn://www.myname.com/svn/project/tags/alternate makes the folder name alternate).

This patch switches from using File.basename to using a regex to grab the directory name, and if it's svn, then it skips to the next element (which should, in theory, be the project name). This still isn't perfect, but it addresses the issue in the ticket.

Attachments

allow_odd_names_for_plugin_directories.diff (0.6 kB) - added by jeremymcanally on 01/22/07 05:39:07.
set_plugin_name.diff (375 bytes) - added by josh on 04/21/07 01:33:43.

Change History

01/22/07 05:39:07 changed by jeremymcanally

  • attachment allow_odd_names_for_plugin_directories.diff added.

04/21/07 01:33:43 changed by josh

  • attachment set_plugin_name.diff added.

04/21/07 01:35:49 changed by josh

  • keywords changed from plugin, script to plugin, script, unverified.

Instead of making guess_url solve the worlds problem, just allow people to set their own plugin name. It looks like this was the intent of the name arg in Plugin.initialize but was never set.

06/27/07 14:32:48 changed by aizatto

What would it take to get this included? I have gone through rails edge trying to get a test written for this, but the problem seems that when you include the 'plugin.rb' file. The file expects some arguments, due to the last line:

Commands::Plugin.parse!

07/19/07 23:31:48 changed by lifofifo

  • keywords changed from plugin, script, unverified to plugin script.