1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] Remove duplicated method

afdacd62ac
This commit is contained in:
David Rodríguez 2019-08-03 14:06:58 +02:00 committed by Hiroshi SHIBATA
parent 7664b5cb65
commit ef2d415802
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
4 changed files with 4 additions and 8 deletions

View file

@ -299,7 +299,7 @@ RSpec.describe "bundle exec" do
G
rubylib = ENV["RUBYLIB"]
rubylib = rubylib.to_s.split(File::PATH_SEPARATOR).unshift bundler_path.to_s
rubylib = rubylib.to_s.split(File::PATH_SEPARATOR).unshift lib.to_s
rubylib = rubylib.uniq.join(File::PATH_SEPARATOR)
bundle "exec 'echo $RUBYLIB'"

View file

@ -11,7 +11,7 @@ RSpec.describe "require 'bundler/gem_tasks'" do
end
bundled_app("Rakefile").open("w") do |f|
f.write <<-RAKEFILE
$:.unshift("#{bundler_path}")
$:.unshift("#{lib}")
require "bundler/gem_tasks"
RAKEFILE
end
@ -19,7 +19,7 @@ RSpec.describe "require 'bundler/gem_tasks'" do
it "includes the relevant tasks" do
with_gem_path_as(Spec::Path.base_system_gems.to_s) do
sys_exec "#{rake} -T", "RUBYOPT" => "-I#{bundler_path}"
sys_exec "#{rake} -T", "RUBYOPT" => "-I#{lib}"
end
expect(err).to eq("")

View file

@ -114,7 +114,7 @@ RSpec.describe "Bundler.setup" do
def clean_load_path(lp)
without_bundler_load_path = ruby!("puts $LOAD_PATH").split("\n")
lp -= without_bundler_load_path
lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s, bundler_path.to_s}/i, "") }
lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s, lib.to_s}/i, "") }
end
it "puts loaded gems after -I and RUBYLIB", :ruby_repo do

View file

@ -104,10 +104,6 @@ module Spec
tmp("libs", *args)
end
def bundler_path
root.join("lib")
end
def global_plugin_gem(*args)
home ".bundle", "plugin", "gems", *args
end