Permalink
Browse files

Merge pull request #1364 from tpope/bundler

---

My use case is [gem-ctags](https://github.com/tpope/gem-ctags), my own gem which automatically invokes [ctags](http://ctags.sourceforge.net/) on installed gems. It works great on `gem install`, but doesnt fire on `bundle install`, and the difference is that Bundler skips loading RubyGems plugins.

My strategy here is to invoke `Gem.load_plugins` inside `bundler/cli`, which is basically equivalent to where RubyGems itself does it: `rubygems/gem_runner`. I dont claim to fully understand the implications of doing it here (or, indeed, doing it all), but it seems benign enough. `Bundler.setup` never loads this file, so theres no risk of accidentally tainting the pristine environment with additional gems.

Conflicts:
	lib/bundler/cli.rb
  • Loading branch information...
indirect committed Sep 17, 2011
2 parents 8cf9a6d + 7b4bd9e commit 93942d7a8c76c43ab434895ba667a961ed859e66
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/bundler/cli.rb
View
@@ -209,7 +209,7 @@ def install
Bundler.ui.be_quiet! if opts[:quiet]
Bundler::Fetcher.disable_endpoint = opts["full-index"]
-
+ Gem.load_plugins # rubygems plugins can hook into the gem install process
Installer.install(Bundler.root, Bundler.definition, opts)
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"]
@@ -255,6 +255,7 @@ def update(*gems)
end
opts = {"update" => true, "local" => options[:local]}
+ Gem.load_plugins # rubygems plugins can hook into the gem install process
Installer.install Bundler.root, Bundler.definition, opts
Bundler.load.cache if Bundler.root.join("vendor/cache").exist?
Bundler.ui.confirm "Your bundle is updated! " +

0 comments on commit 93942d7

Please sign in to comment.