[Rubygems-developers] Status of disabling plugins except for command line?

Charles Oliver Nutter headius at headius.com
Thu Dec 23 14:22:07 EST 2010


On Thu, Dec 23, 2010 at 12:32 PM, Trans <transfire at gmail.com> wrote:
> Basically something like...
>
> rubygems/config_file.rb
>
>  # True if we want plugin loading to be limited to gem command
>  attr :command_plugins_only
>
> rubygems.rb
>
>  unless Gem.configuration.command_plugins_only
>    gem.load_plugins
>  end
>
> rubygems/gem_runner.rb
>
>  if Gem.configuration.command_plugins_only
>    gem.load_plugins
>  end

I also mocked up something like this in JRuby's repo (long since lost
now). I wouldn't be opposed to having a .gemrc or ENV var to turn
global plugin loading back on. It would be a cleaner workaround than
RUBYOPT requires of specific RubyGems files.

I don't think global plugin loading should be the norm, though, until
it doesn't incur a massive perf hit.

- Charlie


More information about the Rubygems-developers mailing list