зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Little refactor to keep things consistent
https://github.com/rubygems/rubygems/commit/3934deb4e4
This commit is contained in:
Родитель
874a2bf17c
Коммит
00a040dda3
|
@ -1297,6 +1297,10 @@ Also, a list:
|
|||
$LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/rubygems.rb") }) }
|
||||
end
|
||||
|
||||
def bundler_path
|
||||
$LOAD_PATH.find {|p| p == File.dirname($LOADED_FEATURES.find {|f| f.end_with?("/bundler.rb") }) }
|
||||
end
|
||||
|
||||
def with_clean_path_to_ruby
|
||||
orig_ruby = Gem.ruby
|
||||
|
||||
|
|
|
@ -1676,8 +1676,6 @@ class TestGem < Gem::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
BUNDLER_LIB_PATH = File.expand_path $LOAD_PATH.find {|lp| File.file?(File.join(lp, "bundler.rb")) }
|
||||
|
||||
def add_bundler_full_name(names)
|
||||
names << "bundler-#{Bundler::VERSION}".freeze
|
||||
names.sort!
|
||||
|
@ -1708,7 +1706,7 @@ class TestGem < Gem::TestCase
|
|||
|
||||
with_rubygems_gemdeps("-") do
|
||||
new_PATH = [File.join(path, "bin"), ENV["PATH"]].join(File::PATH_SEPARATOR)
|
||||
new_RUBYOPT = "-I#{rubygems_path} -I#{BUNDLER_LIB_PATH}"
|
||||
new_RUBYOPT = "-I#{rubygems_path} -I#{bundler_path}"
|
||||
|
||||
path = File.join @tempdir, "gem.deps.rb"
|
||||
|
||||
|
@ -1759,7 +1757,7 @@ class TestGem < Gem::TestCase
|
|||
Dir.mkdir "sub1"
|
||||
|
||||
new_PATH = [File.join(path, "bin"), ENV["PATH"]].join(File::PATH_SEPARATOR)
|
||||
new_RUBYOPT = "-I#{rubygems_path} -I#{BUNDLER_LIB_PATH}"
|
||||
new_RUBYOPT = "-I#{rubygems_path} -I#{bundler_path}"
|
||||
|
||||
path = File.join @tempdir, "gem.deps.rb"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче