aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/plugin.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 12:49:40 +0300
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-09 12:44:10 +0900
commit8f37629519ad330032a38ac0e871b2912ed38a1b (patch)
treebb0529b77583d47993d8b0d608d68896aa3a5298 /lib/bundler/plugin.rb
parent66508992483ae5d77b56a98427c50c772341c0ac (diff)
downloadruby-8f37629519ad330032a38ac0e871b2912ed38a1b.tar.gz
Merge bundler master from upstream.
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
Diffstat (limited to 'lib/bundler/plugin.rb')
-rw-r--r--lib/bundler/plugin.rb17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index 996d29aafb..ffb3ee9883 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require "bundler/plugin/api"
+require_relative "plugin/api"
module Bundler
module Plugin
@@ -256,7 +256,7 @@ module Bundler
@hooks_by_event = Hash.new {|h, k| h[k] = [] }
load_paths = spec.load_paths
- add_to_load_path(load_paths)
+ Bundler.rubygems.add_to_load_path(load_paths)
path = Pathname.new spec.full_gem_path
begin
@@ -288,7 +288,7 @@ module Bundler
# done to avoid conflicts
path = index.plugin_path(name)
- add_to_load_path(index.load_paths(name))
+ Bundler.rubygems.add_to_load_path(index.load_paths(name))
load path.join(PLUGIN_FILE_NAME)
@@ -298,17 +298,8 @@ module Bundler
raise
end
- def add_to_load_path(load_paths)
- if insert_index = Bundler.rubygems.load_path_insert_index
- $LOAD_PATH.insert(insert_index, *load_paths)
- else
- $LOAD_PATH.unshift(*load_paths)
- end
- end
-
class << self
- private :load_plugin, :register_plugin, :save_plugins, :validate_plugin!,
- :add_to_load_path
+ private :load_plugin, :register_plugin, :save_plugins, :validate_plugin!
end
end
end