chore: add binstubs

This commit is contained in:
Nelson Jovel 2023-12-20 12:30:29 -08:00
parent f6853a2781
commit abcd187733
53 changed files with 169 additions and 322 deletions

View file

@ -41,7 +41,7 @@ m = Module.new do
gemfile = ENV["BUNDLE_GEMFILE"]
return gemfile if gemfile && !gemfile.empty?
File.expand_path("../../Gemfile", __FILE__)
File.expand_path("../Gemfile", __dir__)
end
def lockfile
@ -62,8 +62,9 @@ m = Module.new do
def bundler_requirement
@bundler_requirement ||=
env_var_version || cli_arg_version ||
bundler_requirement_for(lockfile_version)
env_var_version ||
cli_arg_version ||
bundler_requirement_for(lockfile_version)
end
def bundler_requirement_for(version)
@ -71,13 +72,7 @@ m = Module.new do
bundler_gem_version = Gem::Version.new(version)
requirement = bundler_gem_version.approximate_recommendation
return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")
requirement += ".a" if bundler_gem_version.prerelease?
requirement
bundler_gem_version.approximate_recommendation
end
def load_bundler!