[Rubygems-developers] Feature Request: RubyGems namespace

Dae San Hwang daesan at gmail.com
Wed Nov 29 07:49:32 EST 2006


On Nov 29, 2006, at 7:44 PM, TRANS wrote:

> On 11/28/06, Dae San Hwang <daesan at gmail.com> wrote:
>>
>> Recently, I was thinking about a better way of implementing Rails  
>> plugin
>> system. There are two things that I don't particularly like about  
>> Rails
>> plugin system. One is the code duplication. You have to install  
>> same plugin
>> codes over and over for all of your Rails applications. The other  
>> problem is
>> that you have to learn to use yet another utility(script/plugin)  
>> and its
>> repository is not centrally managed.
>>
>> So, I was thinking if RubyGems have a namespace built in, we could  
>> make all
>> Rails Plugins into gems under 'rails' namespace.
>>
>> To install 'active_form' Rails plugin on the system, you could  
>> simply use
>> 'gem' utility like 'gem install rails/active_form'. To use this  
>> plugin in a
>> rails application, you could just turn on the plugin in
>> 'config/environment.rb' file by setting 'config.plugins = [:ujs,
>> :active_form]'.
>>
>> I think namespace functionality can be useful for other ruby
>> applications/libraries like 'rake', as well. Can this be  
>> considered? :)
>
> But isn't "copy" reusability one of the points of plugins so that they
> can be modifed per app if need be? Otherwise what's really the
> difference between a plugin and a normal library?

The way I think of plugins is that plugins are used to modify/extend  
the existing classes provided by Rails. Libraries are used for  
providing new classes but I don't see why RubyGems can't be used for  
both libraries and plugins. If the need for customizing a plugin for  
an application arises, maybe we can just unpack the plugin gem and  
modify it in place?

Dae San Hwang
daesan at gmail.com


More information about the Rubygems-developers mailing list