summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-09-07 19:56:06 +0200
committerSamuel Giddins <segiddins@segiddins.me>2016-09-07 19:56:06 +0200
commit6d603e2316a8760ca4f636ba2e5a69d81907d615 (patch)
tree6dbca079f98ec732e5f75070e771dc83bfff195f
parent4818f415d07e547533f48d3f6c59dfda2b73c3fd (diff)
downloadbundler-seg-load-gem-plugins-on-install.tar.gz
[Installer] Load gem plugins when installingseg-load-gem-plugins-on-install
-rw-r--r--lib/bundler/cli/install.rb3
-rw-r--r--lib/bundler/cli/update.rb3
-rw-r--r--lib/bundler/installer.rb1
-rw-r--r--lib/bundler/rubygems_integration.rb4
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 c1bb6c7ab8..2fdf855aa5 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