diff options
author | Homu <homu@barosl.com> | 2016-10-03 14:29:47 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-10-03 14:29:47 +0900 |
commit | e11639f1540a815ba305b2887120bfe41c813754 (patch) | |
tree | 5f4e8bdc55229591255a4ce5b0f80949afd92094 | |
parent | b16fe03ae1d5f6986a604d110060f3a3ac7db542 (diff) | |
parent | 6d603e2316a8760ca4f636ba2e5a69d81907d615 (diff) | |
download | bundler-e11639f1540a815ba305b2887120bfe41c813754.tar.gz |
Auto merge of #4954 - bundler:seg-load-gem-plugins-on-install, r=indirect
[Installer] Load gem plugins when installing
Closes #2824 I think
-rw-r--r-- | lib/bundler/cli/install.rb | 3 | ||||
-rw-r--r-- | lib/bundler/cli/update.rb | 3 | ||||
-rw-r--r-- | lib/bundler/installer.rb | 1 | ||||
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index f1632c9ee2..f66716b39d 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -60,9 +60,6 @@ module Bundler "the --binstubs option will be removed in favor of `bundle binstubs`" end - # rubygems plugins sometimes hook into the gem install process - Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) - Plugin.gemfile_install(Bundler.default_gemfile) if Bundler.feature_flag.plugins? definition = Bundler.definition diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb index 5aac47bd09..a8724f6a13 100644 --- a/lib/bundler/cli/update.rb +++ b/lib/bundler/cli/update.rb @@ -54,9 +54,6 @@ module Bundler Bundler.settings[:jobs] = opts["jobs"] if opts["jobs"] - # rubygems plugins sometimes hook into the gem install process - Gem.load_env_plugins if Gem.respond_to?(:load_env_plugins) - Bundler.definition.validate_runtime! Installer.install Bundler.root, Bundler.definition, opts Bundler.load.cache if Bundler.app_cache.exist? diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb index 824b1a45cd..c4892ff186 100644 --- a/lib/bundler/installer.rb +++ b/lib/bundler/installer.rb @@ -159,6 +159,7 @@ module Bundler # that said, it's a rare situation (other than rake), and parallel # installation is SO MUCH FASTER. so we let people opt in. def install(options) + Bundler.rubygems.load_plugins force = options["force"] jobs = 1 jobs = [Bundler.settings[:jobs].to_i - 1, 1].max if can_install_in_parallel? diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 1c44ef3ddd..bfabd96643 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -194,6 +194,10 @@ module Bundler end end + def load_plugins + Gem.load_plugins + end + def ui=(obj) Gem::DefaultUserInteraction.ui = obj end |