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

[Installer] Load gem plugins when installing #4954

Merged
merged 1 commit into from
Oct 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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