John-Mason P. Shackelford
2006-Jun-16 20:26 UTC
rubygems support for rails plugins (patch)
Rails committers, (feedback from others welcome) Would you accept a patch--in principle, obviously the implementation matters--that would: 1. allow Rails to load a plugin from gem 2. permit the plugin script to install them 3. give the plugin generator''s default Rake file the ability to package and publish a gem 4. introduce freeze/unfreeze for plugins Why? - RubyGems''s handling of dependencies and updates is mature. - When I am writing my own plugin I want the source in my project, but when I am using other people''s code I want to express that as an application dependency. - Some Rails plugins have a life outside of Rails, e.g. models that get used by non Rails apps. Thanks, (BTW please forgive the cross-post. Jamis suggested that the rails list was not the best place for this.) -- John-Mason Shackelford Software Developer Pearson Educational Measurement 2510 North Dodge St. Iowa City, IA 52245 ph. 319-354-9200x6214 john-mason.shackelford@pearson.com http://pearsonedmeasurement.com
On Jun 16, 2006, at 1:26 PM, John-Mason P. Shackelford wrote:> Rails committers, (feedback from others welcome) > > Would you accept a patch--in principle, obviously the implementation > matters--that would:Yes. Gems are a great fit and the reason we''ve pushed back on proposals such as dependency management (wheel redux).> 1. allow Rails to load a plugin from gemHow does this look? Is there a manifest of gem plugins + versions in vendor plugins? A ''stub'' plugin per gem?> 2. permit the plugin script to install themHow can the script distinguish rails plugin gems? script/generate looks for a _generator suffix -- brittle and ugly. Gems could use richer metadata here (even as simple as tags.) Another way is to host a plugins-only gemserver at plugins.rubyonrails.org> 3. give the plugin generator''s default Rake file the ability to > package and publish a gem > 4. introduce freeze/unfreeze for pluginsCool.> Why? > > - RubyGems''s handling of dependencies and updates is mature. > - When I am writing my own plugin I want the source in my project, but > when I am using other people''s code I want to express that as an > application dependency. > - Some Rails plugins have a life outside of Rails, e.g. models that > get used by non Rails apps.I agree. I''m interested to see how RubyGems manages the task. Best, jeremy