Rework expand_path paths
This commit is contained in:
Родитель
1070bf3764
Коммит
8bd140f0cf
|
@ -5,9 +5,9 @@ require "bundler/setup"
|
|||
|
||||
# Note that contracts.ruby has two specific ruby-version specific libraries, which we have vendored into lib/
|
||||
if (Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0")) # ruby3
|
||||
$LOAD_PATH.unshift(File.join(__dir__, File.expand_path("../lib/contracts-ruby3/lib")))
|
||||
$LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../lib/contracts-ruby3/lib")))
|
||||
else # ruby2
|
||||
$LOAD_PATH.unshift(File.join(__dir__, File.expand_path("../lib/contracts-ruby2/lib")))
|
||||
$LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../lib/contracts-ruby2/lib")))
|
||||
end
|
||||
|
||||
# We don't need Contract outside of normal development
|
||||
|
|
|
@ -24,9 +24,9 @@ require "concurrent"
|
|||
# Note that contracts.ruby has two specific ruby-version specific libraries, which we have vendored into lib/
|
||||
# :nocov:
|
||||
if Entitlements.ruby_version2?
|
||||
$LOAD_PATH.unshift(File.join(__dir__, File.expand_path("../contracts-ruby2/lib")))
|
||||
$LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../contracts-ruby2/lib")))
|
||||
else
|
||||
$LOAD_PATH.unshift(File.join(__dir__, File.expand_path("../contracts-ruby3/lib")))
|
||||
$LOAD_PATH.unshift(File.expand_path(File.join(__dir__, "../contracts-ruby3/lib")))
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче