Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #4954 - bundler:seg-load-gem-plugins-on-install, r=indi…
Browse files Browse the repository at this point in the history
…rect

[Installer] Load gem plugins when installing

Closes #2824 I think
  • Loading branch information
homu committed Oct 3, 2016
2 parents b16fe03 + 6d603e2 commit e11639f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions lib/bundler/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def run
"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
Expand Down
3 changes: 0 additions & 3 deletions lib/bundler/cli/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ def run

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?
Expand Down
1 change: 1 addition & 0 deletions lib/bundler/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def generate_standalone_bundler_executable_stubs(spec)
# 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?
Expand Down
4 changes: 4 additions & 0 deletions lib/bundler/rubygems_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def loaded_gem_paths
end
end

def load_plugins
Gem.load_plugins
end

def ui=(obj)
Gem::DefaultUserInteraction.ui = obj
end
Expand Down

0 comments on commit e11639f

Please sign in to comment.