parent
f1cdc129d4
commit
bbe56a6437
Notes:
git
2022-12-12 01:50:02 +00:00
@ -29,8 +29,8 @@ Gem::Specification.new do |s|
|
|||||||
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
|
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
|
||||||
}
|
}
|
||||||
|
|
||||||
s.required_ruby_version = ">= 2.3.0"
|
s.required_ruby_version = ">= 2.6.0"
|
||||||
s.required_rubygems_version = ">= 2.5.2"
|
s.required_rubygems_version = ">= 3.0.1"
|
||||||
|
|
||||||
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
s.files = Dir.glob("lib/bundler{.rb,/**/*}", File::FNM_DOTMATCH).reject {|f| File.directory?(f) }
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ module Bundler
|
|||||||
raise InvalidOption, "Please specify gems to add." if gems.empty?
|
raise InvalidOption, "Please specify gems to add." if gems.empty?
|
||||||
|
|
||||||
version.to_a.each do |v|
|
version.to_a.each do |v|
|
||||||
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN =~ v.to_s
|
raise InvalidOption, "Invalid gem requirement pattern '#{v}'" unless Gem::Requirement::PATTERN.match?(v.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -73,12 +73,10 @@ module Bundler
|
|||||||
definition.specs.each do |spec|
|
definition.specs.each do |spec|
|
||||||
bundles_for_gem(spec).each do |bundle|
|
bundles_for_gem(spec).each do |bundle|
|
||||||
bad_paths = dylibs(bundle).select do |f|
|
bad_paths = dylibs(bundle).select do |f|
|
||||||
begin
|
Fiddle.dlopen(f)
|
||||||
Fiddle.dlopen(f)
|
false
|
||||||
false
|
rescue Fiddle::DLError
|
||||||
rescue Fiddle::DLError
|
true
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if bad_paths.any?
|
if bad_paths.any?
|
||||||
broken_links[spec] ||= []
|
broken_links[spec] ||= []
|
||||||
|
@ -270,7 +270,7 @@ module Bundler
|
|||||||
Bundler.ui.info hint_text("test")
|
Bundler.ui.info hint_text("test")
|
||||||
|
|
||||||
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
|
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
|
||||||
if result =~ /rspec|minitest|test-unit/
|
if /rspec|minitest|test-unit/.match?(result)
|
||||||
test_framework = result
|
test_framework = result
|
||||||
else
|
else
|
||||||
test_framework = false
|
test_framework = false
|
||||||
@ -311,7 +311,7 @@ module Bundler
|
|||||||
Bundler.ui.info hint_text("ci")
|
Bundler.ui.info hint_text("ci")
|
||||||
|
|
||||||
result = Bundler.ui.ask "Enter a CI service. github/travis/gitlab/circle/(none):"
|
result = Bundler.ui.ask "Enter a CI service. github/travis/gitlab/circle/(none):"
|
||||||
if result =~ /github|travis|gitlab|circle/
|
if /github|travis|gitlab|circle/.match?(result)
|
||||||
ci_template = result
|
ci_template = result
|
||||||
else
|
else
|
||||||
ci_template = false
|
ci_template = false
|
||||||
@ -342,7 +342,7 @@ module Bundler
|
|||||||
Bundler.ui.info hint_text("linter")
|
Bundler.ui.info hint_text("linter")
|
||||||
|
|
||||||
result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
|
result = Bundler.ui.ask "Enter a linter. rubocop/standard/(none):"
|
||||||
if result =~ /rubocop|standard/
|
if /rubocop|standard/.match?(result)
|
||||||
linter_template = result
|
linter_template = result
|
||||||
else
|
else
|
||||||
linter_template = false
|
linter_template = false
|
||||||
@ -389,7 +389,7 @@ module Bundler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def ensure_safe_gem_name(name, constant_array)
|
def ensure_safe_gem_name(name, constant_array)
|
||||||
if name =~ /^\d/
|
if /^\d/.match?(name)
|
||||||
Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
|
Bundler.ui.error "Invalid gem name #{name} Please give a name which does not start with numbers."
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
@ -416,28 +416,15 @@ module Bundler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def required_ruby_version
|
def required_ruby_version
|
||||||
if Gem.ruby_version < Gem::Version.new("2.4.a") then "2.3.0"
|
"2.6.0"
|
||||||
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "2.4.0"
|
|
||||||
elsif Gem.ruby_version < Gem::Version.new("2.6.a") then "2.5.0"
|
|
||||||
else
|
|
||||||
"2.6.0"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def rubocop_version
|
def rubocop_version
|
||||||
if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.81.0"
|
"1.21"
|
||||||
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.12"
|
|
||||||
else
|
|
||||||
"1.21"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def standard_version
|
def standard_version
|
||||||
if Gem.ruby_version < Gem::Version.new("2.4.a") then "0.2.5"
|
"1.3"
|
||||||
elsif Gem.ruby_version < Gem::Version.new("2.5.a") then "1.0"
|
|
||||||
else
|
|
||||||
"1.3"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -68,7 +68,7 @@ module Bundler
|
|||||||
|
|
||||||
def info_path(name)
|
def info_path(name)
|
||||||
name = name.to_s
|
name = name.to_s
|
||||||
if name =~ /[^a-z0-9_-]/
|
if /[^a-z0-9_-]/.match?(name)
|
||||||
name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}"
|
name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}"
|
||||||
info_roots.last.join(name)
|
info_roots.last.join(name)
|
||||||
else
|
else
|
||||||
|
@ -20,63 +20,64 @@ module Bundler
|
|||||||
|
|
||||||
def initialize(fetcher)
|
def initialize(fetcher)
|
||||||
@fetcher = fetcher
|
@fetcher = fetcher
|
||||||
require_relative "../vendored_tmpdir"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update(local_path, remote_path, retrying = nil)
|
def update(local_path, remote_path, retrying = nil)
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
Bundler::Dir.mktmpdir("bundler-compact-index-") do |local_temp_dir|
|
local_temp_path = local_path.sub(/$/, ".#{$$}")
|
||||||
local_temp_path = Pathname.new(local_temp_dir).join(local_path.basename)
|
local_temp_path = local_temp_path.sub(/$/, ".retrying") if retrying
|
||||||
|
local_temp_path = local_temp_path.sub(/$/, ".tmp")
|
||||||
|
|
||||||
# first try to fetch any new bytes on the existing file
|
# first try to fetch any new bytes on the existing file
|
||||||
if retrying.nil? && local_path.file?
|
if retrying.nil? && local_path.file?
|
||||||
copy_file local_path, local_temp_path
|
copy_file local_path, local_temp_path
|
||||||
|
|
||||||
headers["If-None-Match"] = etag_for(local_temp_path)
|
headers["If-None-Match"] = etag_for(local_temp_path)
|
||||||
headers["Range"] =
|
headers["Range"] =
|
||||||
if local_temp_path.size.nonzero?
|
if local_temp_path.size.nonzero?
|
||||||
# Subtract a byte to ensure the range won't be empty.
|
# Subtract a byte to ensure the range won't be empty.
|
||||||
# Avoids 416 (Range Not Satisfiable) responses.
|
# Avoids 416 (Range Not Satisfiable) responses.
|
||||||
"bytes=#{local_temp_path.size - 1}-"
|
"bytes=#{local_temp_path.size - 1}-"
|
||||||
else
|
|
||||||
"bytes=#{local_temp_path.size}-"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
response = @fetcher.call(remote_path, headers)
|
|
||||||
return nil if response.is_a?(Net::HTTPNotModified)
|
|
||||||
|
|
||||||
content = response.body
|
|
||||||
|
|
||||||
etag = (response["ETag"] || "").gsub(%r{\AW/}, "")
|
|
||||||
correct_response = SharedHelpers.filesystem_access(local_temp_path) do
|
|
||||||
if response.is_a?(Net::HTTPPartialContent) && local_temp_path.size.nonzero?
|
|
||||||
local_temp_path.open("a") {|f| f << slice_body(content, 1..-1) }
|
|
||||||
|
|
||||||
etag_for(local_temp_path) == etag
|
|
||||||
else
|
else
|
||||||
local_temp_path.open("wb") {|f| f << content }
|
"bytes=#{local_temp_path.size}-"
|
||||||
|
|
||||||
etag.length.zero? || etag_for(local_temp_path) == etag
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if correct_response
|
|
||||||
SharedHelpers.filesystem_access(local_path) do
|
|
||||||
FileUtils.mv(local_temp_path, local_path)
|
|
||||||
end
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
if retrying
|
|
||||||
raise MisMatchedChecksumError.new(remote_path, etag, etag_for(local_temp_path))
|
|
||||||
end
|
|
||||||
|
|
||||||
update(local_path, remote_path, :retrying)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
response = @fetcher.call(remote_path, headers)
|
||||||
|
return nil if response.is_a?(Net::HTTPNotModified)
|
||||||
|
|
||||||
|
content = response.body
|
||||||
|
|
||||||
|
etag = (response["ETag"] || "").gsub(%r{\AW/}, "")
|
||||||
|
correct_response = SharedHelpers.filesystem_access(local_temp_path) do
|
||||||
|
if response.is_a?(Net::HTTPPartialContent) && local_temp_path.size.nonzero?
|
||||||
|
local_temp_path.open("a") {|f| f << slice_body(content, 1..-1) }
|
||||||
|
|
||||||
|
etag_for(local_temp_path) == etag
|
||||||
|
else
|
||||||
|
local_temp_path.open("wb") {|f| f << content }
|
||||||
|
|
||||||
|
etag.length.zero? || etag_for(local_temp_path) == etag
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if correct_response
|
||||||
|
SharedHelpers.filesystem_access(local_path) do
|
||||||
|
FileUtils.mv(local_temp_path, local_path)
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if retrying
|
||||||
|
raise MisMatchedChecksumError.new(remote_path, etag, etag_for(local_temp_path))
|
||||||
|
end
|
||||||
|
|
||||||
|
update(local_path, remote_path, :retrying)
|
||||||
rescue Zlib::GzipFile::Error
|
rescue Zlib::GzipFile::Error
|
||||||
raise Bundler::HTTPError
|
raise Bundler::HTTPError
|
||||||
|
ensure
|
||||||
|
FileUtils.remove_file(local_temp_path) if File.exist?(local_temp_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def etag_for(path)
|
def etag_for(path)
|
||||||
|
@ -295,7 +295,7 @@ module Bundler
|
|||||||
|
|
||||||
# Convert to \r\n if the existing lock has them
|
# Convert to \r\n if the existing lock has them
|
||||||
# i.e., Windows with `git config core.autocrlf=true`
|
# i.e., Windows with `git config core.autocrlf=true`
|
||||||
contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match("\r\n")
|
contents.gsub!(/\n/, "\r\n") if @lockfile_contents.match?("\r\n")
|
||||||
|
|
||||||
if @locked_bundler_version
|
if @locked_bundler_version
|
||||||
locked_major = @locked_bundler_version.segments.first
|
locked_major = @locked_bundler_version.segments.first
|
||||||
|
@ -324,7 +324,7 @@ module Bundler
|
|||||||
if name.is_a?(Symbol)
|
if name.is_a?(Symbol)
|
||||||
raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead)
|
raise GemfileError, %(You need to specify gem names as Strings. Use 'gem "#{name}"' instead)
|
||||||
end
|
end
|
||||||
if name =~ /\s/
|
if /\s/.match?(name)
|
||||||
raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
|
raise GemfileError, %('#{name}' is not a valid gem name because it contains whitespace)
|
||||||
end
|
end
|
||||||
raise GemfileError, %(an empty gem name is not valid) if name.empty?
|
raise GemfileError, %(an empty gem name is not valid) if name.empty?
|
||||||
|
@ -12,17 +12,15 @@ module Bundler
|
|||||||
method = instance_method(method_name)
|
method = instance_method(method_name)
|
||||||
undef_method(method_name)
|
undef_method(method_name)
|
||||||
define_method(method_name) do |*args, &blk|
|
define_method(method_name) do |*args, &blk|
|
||||||
begin
|
method.bind(self).call(*args, &blk)
|
||||||
method.bind(self).call(*args, &blk)
|
rescue NetworkDownError, CompactIndexClient::Updater::MisMatchedChecksumError => e
|
||||||
rescue NetworkDownError, CompactIndexClient::Updater::MisMatchedChecksumError => e
|
raise HTTPError, e.message
|
||||||
raise HTTPError, e.message
|
rescue AuthenticationRequiredError
|
||||||
rescue AuthenticationRequiredError
|
# Fail since we got a 401 from the server.
|
||||||
# Fail since we got a 401 from the server.
|
raise
|
||||||
raise
|
rescue HTTPError => e
|
||||||
rescue HTTPError => e
|
Bundler.ui.trace(e)
|
||||||
Bundler.ui.trace(e)
|
nil
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ module Bundler
|
|||||||
private
|
private
|
||||||
|
|
||||||
def validate_uri_scheme!(uri)
|
def validate_uri_scheme!(uri)
|
||||||
return if uri.scheme =~ /\Ahttps?\z/
|
return if /\Ahttps?\z/.match?(uri.scheme)
|
||||||
raise InvalidOption,
|
raise InvalidOption,
|
||||||
"The request uri `#{uri}` has an invalid scheme (`#{uri.scheme}`). " \
|
"The request uri `#{uri}` has an invalid scheme (`#{uri.scheme}`). " \
|
||||||
"Did you mean `http` or `https`?"
|
"Did you mean `http` or `https`?"
|
||||||
|
@ -37,7 +37,7 @@ module Bundler
|
|||||||
when Thor::Error
|
when Thor::Error
|
||||||
Bundler.ui.error error.message
|
Bundler.ui.error error.message
|
||||||
when LoadError
|
when LoadError
|
||||||
raise error unless error.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
|
raise error unless /cannot load such file -- openssl|openssl.so|libcrypto.so/.match?(error.message)
|
||||||
Bundler.ui.error "\nCould not load OpenSSL. #{error.class}: #{error}\n#{error.backtrace.join("\n ")}"
|
Bundler.ui.error "\nCould not load OpenSSL. #{error.class}: #{error}\n#{error.backtrace.join("\n ")}"
|
||||||
when Interrupt
|
when Interrupt
|
||||||
Bundler.ui.error "\nQuitting..."
|
Bundler.ui.error "\nQuitting..."
|
||||||
|
@ -235,7 +235,7 @@ module Bundler
|
|||||||
|
|
||||||
gemfile.each_with_index do |line, index|
|
gemfile.each_with_index do |line, index|
|
||||||
next unless !line.nil? && line.strip.start_with?(block_name)
|
next unless !line.nil? && line.strip.start_with?(block_name)
|
||||||
if gemfile[index + 1] =~ /^\s*end\s*$/
|
if /^\s*end\s*$/.match?(gemfile[index + 1])
|
||||||
gemfile[index] = nil
|
gemfile[index] = nil
|
||||||
gemfile[index + 1] = nil
|
gemfile[index + 1] = nil
|
||||||
end
|
end
|
||||||
|
@ -136,11 +136,7 @@ module Bundler
|
|||||||
|
|
||||||
mode = Gem.win_platform? ? "wb:UTF-8" : "w"
|
mode = Gem.win_platform? ? "wb:UTF-8" : "w"
|
||||||
require "erb"
|
require "erb"
|
||||||
content = if RUBY_VERSION >= "2.6"
|
content = ERB.new(template, :trim_mode => "-").result(binding)
|
||||||
ERB.new(template, :trim_mode => "-").result(binding)
|
|
||||||
else
|
|
||||||
ERB.new(template, nil, "-").result(binding)
|
|
||||||
end
|
|
||||||
|
|
||||||
File.write(binstub_path, content, :mode => mode, :perm => 0o777 & ~File.umask)
|
File.write(binstub_path, content, :mode => mode, :perm => 0o777 & ~File.umask)
|
||||||
if Gem.win_platform? || options[:all_platforms]
|
if Gem.win_platform? || options[:all_platforms]
|
||||||
@ -183,11 +179,7 @@ module Bundler
|
|||||||
|
|
||||||
mode = Gem.win_platform? ? "wb:UTF-8" : "w"
|
mode = Gem.win_platform? ? "wb:UTF-8" : "w"
|
||||||
require "erb"
|
require "erb"
|
||||||
content = if RUBY_VERSION >= "2.6"
|
content = ERB.new(template, :trim_mode => "-").result(binding)
|
||||||
ERB.new(template, :trim_mode => "-").result(binding)
|
|
||||||
else
|
|
||||||
ERB.new(template, nil, "-").result(binding)
|
|
||||||
end
|
|
||||||
|
|
||||||
File.write("#{bin_path}/#{executable}", content, :mode => mode, :perm => 0o755)
|
File.write("#{bin_path}/#{executable}", content, :mode => mode, :perm => 0o755)
|
||||||
if Gem.win_platform? || options[:all_platforms]
|
if Gem.win_platform? || options[:all_platforms]
|
||||||
@ -226,12 +218,10 @@ module Bundler
|
|||||||
|
|
||||||
requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
|
requested_path_gems = @definition.requested_specs.select {|s| s.source.is_a?(Source::Path) }
|
||||||
path_plugin_files = requested_path_gems.map do |spec|
|
path_plugin_files = requested_path_gems.map do |spec|
|
||||||
begin
|
Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
|
||||||
Bundler.rubygems.spec_matches_for_glob(spec, "rubygems_plugin#{Bundler.rubygems.suffix_pattern}")
|
rescue TypeError
|
||||||
rescue TypeError
|
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
||||||
error_message = "#{spec.name} #{spec.version} has an invalid gemspec"
|
raise Gem::InvalidSpecificationException, error_message
|
||||||
raise Gem::InvalidSpecificationException, error_message
|
|
||||||
end
|
|
||||||
end.flatten
|
end.flatten
|
||||||
Bundler.rubygems.load_plugin_files(path_plugin_files)
|
Bundler.rubygems.load_plugin_files(path_plugin_files)
|
||||||
Bundler.rubygems.load_env_plugins
|
Bundler.rubygems.load_env_plugins
|
||||||
|
@ -63,7 +63,7 @@ module Bundler
|
|||||||
@state = nil
|
@state = nil
|
||||||
@specs = {}
|
@specs = {}
|
||||||
|
|
||||||
if lockfile.match(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
|
if lockfile.match?(/<<<<<<<|=======|>>>>>>>|\|\|\|\|\|\|\|/)
|
||||||
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
|
raise LockfileError, "Your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} contains merge conflicts.\n" \
|
||||||
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
|
"Run `git checkout HEAD -- #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}` first to get a clean lock."
|
||||||
end
|
end
|
||||||
@ -80,7 +80,7 @@ module Bundler
|
|||||||
@state = :ruby
|
@state = :ruby
|
||||||
elsif line == BUNDLED
|
elsif line == BUNDLED
|
||||||
@state = :bundled_with
|
@state = :bundled_with
|
||||||
elsif line =~ /^[^\s]/
|
elsif /^[^\s]/.match?(line)
|
||||||
@state = nil
|
@state = nil
|
||||||
elsif @state
|
elsif @state
|
||||||
send("parse_#{@state}", line)
|
send("parse_#{@state}", line)
|
||||||
|
@ -148,13 +148,11 @@ module Bundler
|
|||||||
class TCPSocketProbe
|
class TCPSocketProbe
|
||||||
def replies?(mirror)
|
def replies?(mirror)
|
||||||
MirrorSockets.new(mirror).any? do |socket, address, timeout|
|
MirrorSockets.new(mirror).any? do |socket, address, timeout|
|
||||||
begin
|
socket.connect_nonblock(address)
|
||||||
socket.connect_nonblock(address)
|
rescue Errno::EINPROGRESS
|
||||||
rescue Errno::EINPROGRESS
|
wait_for_writtable_socket(socket, address, timeout)
|
||||||
wait_for_writtable_socket(socket, address, timeout)
|
rescue RuntimeError # Connection failed somehow, again
|
||||||
rescue RuntimeError # Connection failed somehow, again
|
false
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -338,11 +338,7 @@ module Gem
|
|||||||
end
|
end
|
||||||
|
|
||||||
def glob_files_in_dir(glob, base_path)
|
def glob_files_in_dir(glob, base_path)
|
||||||
if RUBY_VERSION >= "2.5"
|
Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) }
|
||||||
Dir.glob(glob, :base => base_path).map! {|f| File.expand_path(f, base_path) }
|
|
||||||
else
|
|
||||||
Dir.glob(File.join(base_path.to_s.gsub(/[\[\]]/, '\\\\\\&'), glob)).map! {|f| File.expand_path(f) }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -64,7 +64,7 @@ module Bundler
|
|||||||
at = if local?
|
at = if local?
|
||||||
path
|
path
|
||||||
elsif user_ref = options["ref"]
|
elsif user_ref = options["ref"]
|
||||||
if ref =~ /\A[a-z0-9]{4,}\z/i
|
if /\A[a-z0-9]{4,}\z/i.match?(ref)
|
||||||
shortref_for_display(user_ref)
|
shortref_for_display(user_ref)
|
||||||
else
|
else
|
||||||
user_ref
|
user_ref
|
||||||
@ -295,7 +295,7 @@ module Bundler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uri_hash
|
def uri_hash
|
||||||
if uri =~ %r{^\w+://(\w+@)?}
|
if %r{^\w+://(\w+@)?}.match?(uri)
|
||||||
# Downcase the domain component of the URI
|
# Downcase the domain component of the URI
|
||||||
# and strip off a trailing slash, if one is present
|
# and strip off a trailing slash, if one is present
|
||||||
input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
|
input = Bundler::URI.parse(uri).normalize.to_s.sub(%r{/$}, "")
|
||||||
|
@ -250,7 +250,7 @@ module Bundler
|
|||||||
|
|
||||||
# Adds credentials to the URI
|
# Adds credentials to the URI
|
||||||
def configured_uri
|
def configured_uri
|
||||||
if /https?:/ =~ uri
|
if /https?:/.match?(uri)
|
||||||
remote = Bundler::URI(uri)
|
remote = Bundler::URI(uri)
|
||||||
config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
|
config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
|
||||||
remote.userinfo ||= config_auth
|
remote.userinfo ||= config_auth
|
||||||
|
@ -224,13 +224,13 @@ module Bundler
|
|||||||
|
|
||||||
# Some gem authors put absolute paths in their gemspec
|
# Some gem authors put absolute paths in their gemspec
|
||||||
# and we have to save them from themselves
|
# and we have to save them from themselves
|
||||||
spec.files = spec.files.map do |p|
|
spec.files = spec.files.map do |path|
|
||||||
next p unless p =~ /\A#{Pathname::SEPARATOR_PAT}/
|
next path unless /\A#{Pathname::SEPARATOR_PAT}/.match?(path)
|
||||||
next if File.directory?(p)
|
next if File.directory?(path)
|
||||||
begin
|
begin
|
||||||
Pathname.new(p).relative_path_from(gem_dir).to_s
|
Pathname.new(path).relative_path_from(gem_dir).to_s
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
p
|
path
|
||||||
end
|
end
|
||||||
end.compact
|
end.compact
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ module Bundler
|
|||||||
end
|
end
|
||||||
|
|
||||||
if installed?(spec) && !force
|
if installed?(spec) && !force
|
||||||
print_using_message "Using #{version_message(spec)}"
|
print_using_message "Using #{version_message(spec, options[:previous_spec])}"
|
||||||
return nil # no post-install message
|
return nil # no post-install message
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -163,8 +163,6 @@ module Bundler
|
|||||||
install_path = rubygems_dir
|
install_path = rubygems_dir
|
||||||
bin_path = Bundler.system_bindir
|
bin_path = Bundler.system_bindir
|
||||||
|
|
||||||
Bundler.mkdir_p bin_path unless spec.executables.empty? || Bundler.rubygems.provides?(">= 2.7.5")
|
|
||||||
|
|
||||||
require_relative "../rubygems_gem_installer"
|
require_relative "../rubygems_gem_installer"
|
||||||
|
|
||||||
installer = Bundler::RubyGemsGemInstaller.at(
|
installer = Bundler::RubyGemsGemInstaller.at(
|
||||||
@ -340,7 +338,7 @@ module Bundler
|
|||||||
|
|
||||||
def normalize_uri(uri)
|
def normalize_uri(uri)
|
||||||
uri = uri.to_s
|
uri = uri.to_s
|
||||||
uri = "#{uri}/" unless uri =~ %r{/$}
|
uri = "#{uri}/" unless %r{/$}.match?(uri)
|
||||||
require_relative "../vendored_uri"
|
require_relative "../vendored_uri"
|
||||||
uri = Bundler::URI(uri)
|
uri = Bundler::URI(uri)
|
||||||
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
|
raise ArgumentError, "The source must be an absolute URI. For example:\n" \
|
||||||
@ -383,7 +381,7 @@ module Bundler
|
|||||||
idx = @allow_local ? installed_specs.dup : Index.new
|
idx = @allow_local ? installed_specs.dup : Index.new
|
||||||
|
|
||||||
Dir["#{cache_path}/*.gem"].each do |gemfile|
|
Dir["#{cache_path}/*.gem"].each do |gemfile|
|
||||||
next if gemfile =~ /^bundler\-[\d\.]+?\.gem/
|
next if /^bundler\-[\d\.]+?\.gem/.match?(gemfile)
|
||||||
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
||||||
s.source = self
|
s.source = self
|
||||||
idx << s
|
idx << s
|
||||||
|
@ -206,7 +206,7 @@ module Bundler
|
|||||||
def warn_on_git_protocol(source)
|
def warn_on_git_protocol(source)
|
||||||
return if Bundler.settings["git.allow_insecure"]
|
return if Bundler.settings["git.allow_insecure"]
|
||||||
|
|
||||||
if source.uri =~ /^git\:/
|
if /^git\:/.match?(source.uri)
|
||||||
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
|
Bundler.ui.warn "The git source `#{source.uri}` uses the `git` protocol, " \
|
||||||
"which transmits data without encryption. Disable this warning with " \
|
"which transmits data without encryption. Disable this warning with " \
|
||||||
"`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
|
"`bundle config set --local git.allow_insecure true`, or switch to the `https` " \
|
||||||
|
@ -72,13 +72,7 @@ m = Module.new do
|
|||||||
|
|
||||||
bundler_gem_version = Gem::Version.new(version)
|
bundler_gem_version = Gem::Version.new(version)
|
||||||
|
|
||||||
requirement = bundler_gem_version.approximate_recommendation
|
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
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_bundler!
|
def load_bundler!
|
||||||
|
154
lib/bundler/vendor/tmpdir/lib/tmpdir.rb
vendored
154
lib/bundler/vendor/tmpdir/lib/tmpdir.rb
vendored
@ -1,154 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
#
|
|
||||||
# tmpdir - retrieve temporary directory path
|
|
||||||
#
|
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
|
|
||||||
require_relative '../../fileutils/lib/fileutils'
|
|
||||||
begin
|
|
||||||
require 'etc.so'
|
|
||||||
rescue LoadError # rescue LoadError for miniruby
|
|
||||||
end
|
|
||||||
|
|
||||||
class Bundler::Dir < Dir
|
|
||||||
|
|
||||||
@systmpdir ||= defined?(Etc.systmpdir) ? Etc.systmpdir : '/tmp'
|
|
||||||
|
|
||||||
##
|
|
||||||
# Returns the operating system's temporary file path.
|
|
||||||
|
|
||||||
def self.tmpdir
|
|
||||||
tmp = nil
|
|
||||||
['TMPDIR', 'TMP', 'TEMP', ['system temporary path', @systmpdir], ['/tmp']*2, ['.']*2].each do |name, dir = ENV[name]|
|
|
||||||
next if !dir
|
|
||||||
dir = File.expand_path(dir)
|
|
||||||
stat = File.stat(dir) rescue next
|
|
||||||
case
|
|
||||||
when !stat.directory?
|
|
||||||
warn "#{name} is not a directory: #{dir}"
|
|
||||||
when !stat.writable?
|
|
||||||
warn "#{name} is not writable: #{dir}"
|
|
||||||
when stat.world_writable? && !stat.sticky?
|
|
||||||
warn "#{name} is world-writable: #{dir}"
|
|
||||||
else
|
|
||||||
tmp = dir
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
raise ArgumentError, "could not find a temporary directory" unless tmp
|
|
||||||
tmp
|
|
||||||
end
|
|
||||||
|
|
||||||
# Bundler::Dir.mktmpdir creates a temporary directory.
|
|
||||||
#
|
|
||||||
# The directory is created with 0700 permission.
|
|
||||||
# Application should not change the permission to make the temporary directory accessible from other users.
|
|
||||||
#
|
|
||||||
# The prefix and suffix of the name of the directory is specified by
|
|
||||||
# the optional first argument, <i>prefix_suffix</i>.
|
|
||||||
# - If it is not specified or nil, "d" is used as the prefix and no suffix is used.
|
|
||||||
# - If it is a string, it is used as the prefix and no suffix is used.
|
|
||||||
# - If it is an array, first element is used as the prefix and second element is used as a suffix.
|
|
||||||
#
|
|
||||||
# Bundler::Dir.mktmpdir {|dir| dir is ".../d..." }
|
|
||||||
# Bundler::Dir.mktmpdir("foo") {|dir| dir is ".../foo..." }
|
|
||||||
# Bundler::Dir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" }
|
|
||||||
#
|
|
||||||
# The directory is created under Bundler::Dir.tmpdir or
|
|
||||||
# the optional second argument <i>tmpdir</i> if non-nil value is given.
|
|
||||||
#
|
|
||||||
# Bundler::Dir.mktmpdir {|dir| dir is "#{Bundler::Dir.tmpdir}/d..." }
|
|
||||||
# Bundler::Dir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." }
|
|
||||||
#
|
|
||||||
# If a block is given,
|
|
||||||
# it is yielded with the path of the directory.
|
|
||||||
# The directory and its contents are removed
|
|
||||||
# using Bundler::FileUtils.remove_entry before Bundler::Dir.mktmpdir returns.
|
|
||||||
# The value of the block is returned.
|
|
||||||
#
|
|
||||||
# Bundler::Dir.mktmpdir {|dir|
|
|
||||||
# # use the directory...
|
|
||||||
# open("#{dir}/foo", "w") { ... }
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# If a block is not given,
|
|
||||||
# The path of the directory is returned.
|
|
||||||
# In this case, Bundler::Dir.mktmpdir doesn't remove the directory.
|
|
||||||
#
|
|
||||||
# dir = Bundler::Dir.mktmpdir
|
|
||||||
# begin
|
|
||||||
# # use the directory...
|
|
||||||
# open("#{dir}/foo", "w") { ... }
|
|
||||||
# ensure
|
|
||||||
# # remove the directory.
|
|
||||||
# Bundler::FileUtils.remove_entry dir
|
|
||||||
# end
|
|
||||||
#
|
|
||||||
def self.mktmpdir(prefix_suffix=nil, *rest, **options)
|
|
||||||
base = nil
|
|
||||||
path = Tmpname.create(prefix_suffix || "d", *rest, **options) {|p, _, _, d|
|
|
||||||
base = d
|
|
||||||
mkdir(p, 0700)
|
|
||||||
}
|
|
||||||
if block_given?
|
|
||||||
begin
|
|
||||||
yield path.dup
|
|
||||||
ensure
|
|
||||||
unless base
|
|
||||||
stat = File.stat(File.dirname(path))
|
|
||||||
if stat.world_writable? and !stat.sticky?
|
|
||||||
raise ArgumentError, "parent directory is world writable but not sticky"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Bundler::FileUtils.remove_entry path
|
|
||||||
end
|
|
||||||
else
|
|
||||||
path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module Tmpname # :nodoc:
|
|
||||||
module_function
|
|
||||||
|
|
||||||
def tmpdir
|
|
||||||
Bundler::Dir.tmpdir
|
|
||||||
end
|
|
||||||
|
|
||||||
UNUSABLE_CHARS = "^,-.0-9A-Z_a-z~"
|
|
||||||
|
|
||||||
class << (RANDOM = Random.new)
|
|
||||||
MAX = 36**6 # < 0x100000000
|
|
||||||
def next
|
|
||||||
rand(MAX).to_s(36)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
private_constant :RANDOM
|
|
||||||
|
|
||||||
def create(basename, tmpdir=nil, max_try: nil, **opts)
|
|
||||||
origdir = tmpdir
|
|
||||||
tmpdir ||= tmpdir()
|
|
||||||
n = nil
|
|
||||||
prefix, suffix = basename
|
|
||||||
prefix = (String.try_convert(prefix) or
|
|
||||||
raise ArgumentError, "unexpected prefix: #{prefix.inspect}")
|
|
||||||
prefix = prefix.delete(UNUSABLE_CHARS)
|
|
||||||
suffix &&= (String.try_convert(suffix) or
|
|
||||||
raise ArgumentError, "unexpected suffix: #{suffix.inspect}")
|
|
||||||
suffix &&= suffix.delete(UNUSABLE_CHARS)
|
|
||||||
begin
|
|
||||||
t = Time.now.strftime("%Y%m%d")
|
|
||||||
path = "#{prefix}#{t}-#{$$}-#{RANDOM.next}"\
|
|
||||||
"#{n ? %[-#{n}] : ''}#{suffix||''}"
|
|
||||||
path = File.join(tmpdir, path)
|
|
||||||
yield(path, n, opts, origdir)
|
|
||||||
rescue Errno::EEXIST
|
|
||||||
n ||= 0
|
|
||||||
n += 1
|
|
||||||
retry if !max_try or n < max_try
|
|
||||||
raise "cannot generate temporary name using `#{basename}' under `#{tmpdir}'"
|
|
||||||
end
|
|
||||||
path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,4 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module Bundler; end
|
|
||||||
require_relative "vendor/tmpdir/lib/tmpdir"
|
|
@ -87,14 +87,12 @@ module Bundler
|
|||||||
creation_errors = []
|
creation_errors = []
|
||||||
|
|
||||||
@threads = Array.new(@size) do |i|
|
@threads = Array.new(@size) do |i|
|
||||||
begin
|
Thread.start { process_queue(i) }.tap do |thread|
|
||||||
Thread.start { process_queue(i) }.tap do |thread|
|
thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
|
||||||
thread.name = "#{name} Worker ##{i}" if thread.respond_to?(:name=)
|
|
||||||
end
|
|
||||||
rescue ThreadError => e
|
|
||||||
creation_errors << e
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
|
rescue ThreadError => e
|
||||||
|
creation_errors << e
|
||||||
|
nil
|
||||||
end.compact
|
end.compact
|
||||||
|
|
||||||
add_interrupt_handler unless @threads.empty?
|
add_interrupt_handler unless @threads.empty?
|
||||||
|
@ -107,7 +107,7 @@ class Gem::Commands::SetupCommand < Gem::Command
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_ruby_version
|
def check_ruby_version
|
||||||
required_version = Gem::Requirement.new ">= 2.3.0"
|
required_version = Gem::Requirement.new ">= 2.6.0"
|
||||||
|
|
||||||
unless required_version.satisfied_by? Gem.ruby_version
|
unless required_version.satisfied_by? Gem.ruby_version
|
||||||
alert_error "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
|
alert_error "Expected Ruby version #{required_version}, is #{Gem.ruby_version}"
|
||||||
|
@ -329,14 +329,8 @@ command to remove old versions.
|
|||||||
Gem::Version.new("3.2.3")
|
Gem::Version.new("3.2.3")
|
||||||
elsif Gem.ruby_version > Gem::Version.new("2.7.a")
|
elsif Gem.ruby_version > Gem::Version.new("2.7.a")
|
||||||
Gem::Version.new("3.1.2")
|
Gem::Version.new("3.1.2")
|
||||||
elsif Gem.ruby_version > Gem::Version.new("2.6.a")
|
|
||||||
Gem::Version.new("3.0.1")
|
|
||||||
elsif Gem.ruby_version > Gem::Version.new("2.5.a")
|
|
||||||
Gem::Version.new("2.7.3")
|
|
||||||
elsif Gem.ruby_version > Gem::Version.new("2.4.a")
|
|
||||||
Gem::Version.new("2.6.8")
|
|
||||||
else
|
else
|
||||||
Gem::Version.new("2.5.2")
|
Gem::Version.new("3.0.1")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# `uplevel` keyword argument of Kernel#warn is available since ruby 2.5.
|
if !Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES
|
||||||
if RUBY_VERSION >= "2.5" && !Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES
|
|
||||||
|
|
||||||
module Kernel
|
module Kernel
|
||||||
rubygems_path = "#{__dir__}/" # Frames to be skipped start with this path.
|
rubygems_path = "#{__dir__}/" # Frames to be skipped start with this path.
|
||||||
|
@ -433,13 +433,6 @@ module Gem::Security
|
|||||||
ec_key
|
ec_key
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
|
||||||
# In Ruby 2.3 EC doesn't implement the private_key? but not the private? method
|
|
||||||
|
|
||||||
if defined?(OpenSSL::PKey::EC) && Gem::Version.new(String.new(RUBY_VERSION)) < Gem::Version.new("2.4.0")
|
|
||||||
OpenSSL::PKey::EC.send(:alias_method, :private?, :private_key?)
|
|
||||||
end
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Creates a self-signed certificate with an issuer and subject from +email+,
|
# Creates a self-signed certificate with an issuer and subject from +email+,
|
||||||
# a subject alternative name of +email+ and the given +extensions+ for the
|
# a subject alternative name of +email+ and the given +extensions+ for the
|
||||||
@ -492,13 +485,7 @@ module Gem::Security
|
|||||||
when "rsa"
|
when "rsa"
|
||||||
OpenSSL::PKey::RSA.new(RSA_DSA_KEY_LENGTH)
|
OpenSSL::PKey::RSA.new(RSA_DSA_KEY_LENGTH)
|
||||||
when "ec"
|
when "ec"
|
||||||
if RUBY_VERSION >= "2.4.0"
|
OpenSSL::PKey::EC.generate(EC_NAME)
|
||||||
OpenSSL::PKey::EC.generate(EC_NAME)
|
|
||||||
else
|
|
||||||
domain_key = OpenSSL::PKey::EC.new(EC_NAME)
|
|
||||||
domain_key.generate_key
|
|
||||||
domain_key
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
raise Gem::Security::Exception,
|
raise Gem::Security::Exception,
|
||||||
"#{algorithm} algorithm not found. RSA, DSA, and EC algorithms are supported."
|
"#{algorithm} algorithm not found. RSA, DSA, and EC algorithms are supported."
|
||||||
|
@ -97,11 +97,7 @@ module Gem::Util
|
|||||||
# returning absolute paths to the matching files.
|
# returning absolute paths to the matching files.
|
||||||
|
|
||||||
def self.glob_files_in_dir(glob, base_path)
|
def self.glob_files_in_dir(glob, base_path)
|
||||||
if RUBY_VERSION >= "2.5"
|
Dir.glob(glob, base: base_path).map! {|f| File.expand_path(f, base_path) }
|
||||||
Dir.glob(glob, base: base_path).map! {|f| File.expand_path(f, base_path) }
|
|
||||||
else
|
|
||||||
Dir.glob(File.expand_path(glob, base_path))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -15,10 +15,7 @@ else
|
|||||||
require "bundler"
|
require "bundler"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Workaround for non-activated bundler spec due to missing https://github.com/rubygems/rubygems/commit/4e306d7bcdee924b8d80ca9db6125aa59ee4e5a3
|
if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("3.0.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
|
||||||
gem "bundler", Bundler::VERSION if Gem.rubygems_version < Gem::Version.new("2.6.2")
|
|
||||||
|
|
||||||
if Gem.rubygems_version < Gem::Version.new("3.2.3") && Gem.ruby_version < Gem::Version.new("2.6.a") && !ENV["BUNDLER_NO_OLD_RUBYGEMS_WARNING"]
|
|
||||||
Bundler.ui.warn \
|
Bundler.ui.warn \
|
||||||
"Your RubyGems version (#{Gem::VERSION}) has a bug that prevents " \
|
"Your RubyGems version (#{Gem::VERSION}) has a bug that prevents " \
|
||||||
"`required_ruby_version` from working for Bundler. Any scripts that use " \
|
"`required_ruby_version` from working for Bundler. Any scripts that use " \
|
||||||
|
@ -34,8 +34,6 @@ RSpec.describe Bundler::Env do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "prints user home" do
|
it "prints user home" do
|
||||||
skip "needs to use a valid HOME" if Gem.win_platform? && RUBY_VERSION < "2.6.0"
|
|
||||||
|
|
||||||
with_clear_paths("HOME", "/a/b/c") do
|
with_clear_paths("HOME", "/a/b/c") do
|
||||||
out = described_class.report
|
out = described_class.report
|
||||||
expect(out).to include("User Home /a/b/c")
|
expect(out).to include("User Home /a/b/c")
|
||||||
@ -43,8 +41,6 @@ RSpec.describe Bundler::Env do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "prints user path" do
|
it "prints user path" do
|
||||||
skip "needs to use a valid HOME" if Gem.win_platform? && RUBY_VERSION < "2.6.0"
|
|
||||||
|
|
||||||
with_clear_paths("HOME", "/a/b/c") do
|
with_clear_paths("HOME", "/a/b/c") do
|
||||||
allow(File).to receive(:exist?)
|
allow(File).to receive(:exist?)
|
||||||
allow(File).to receive(:exist?).with("/a/b/c/.gem").and_return(true)
|
allow(File).to receive(:exist?).with("/a/b/c/.gem").and_return(true)
|
||||||
|
@ -143,17 +143,15 @@ RSpec.describe ".bundle/config" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "has lower precedence than env" do
|
it "has lower precedence than env" do
|
||||||
begin
|
ENV["BUNDLE_FOO"] = "env"
|
||||||
ENV["BUNDLE_FOO"] = "env"
|
|
||||||
|
|
||||||
bundle "config set --global foo global"
|
bundle "config set --global foo global"
|
||||||
expect(out).to match(/You have a bundler environment variable for foo set to "env"/)
|
expect(out).to match(/You have a bundler environment variable for foo set to "env"/)
|
||||||
|
|
||||||
run "puts Bundler.settings[:foo]"
|
run "puts Bundler.settings[:foo]"
|
||||||
expect(out).to eq("env")
|
expect(out).to eq("env")
|
||||||
ensure
|
ensure
|
||||||
ENV.delete("BUNDLE_FOO")
|
ENV.delete("BUNDLE_FOO")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can be deleted" do
|
it "can be deleted" do
|
||||||
@ -221,15 +219,13 @@ RSpec.describe ".bundle/config" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "has higher precedence than env" do
|
it "has higher precedence than env" do
|
||||||
begin
|
ENV["BUNDLE_FOO"] = "env"
|
||||||
ENV["BUNDLE_FOO"] = "env"
|
bundle "config set --local foo local"
|
||||||
bundle "config set --local foo local"
|
|
||||||
|
|
||||||
run "puts Bundler.settings[:foo]"
|
run "puts Bundler.settings[:foo]"
|
||||||
expect(out).to eq("local")
|
expect(out).to eq("local")
|
||||||
ensure
|
ensure
|
||||||
ENV.delete("BUNDLE_FOO")
|
ENV.delete("BUNDLE_FOO")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can be deleted" do
|
it "can be deleted" do
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do
|
RSpec.describe "bundle viz", :bundler => "< 3", :if => Bundler.which("dot") do
|
||||||
before do
|
before do
|
||||||
graphviz_version = RUBY_VERSION >= "2.4" ? "1.2.5" : "1.2.4"
|
realworld_system_gems "ruby-graphviz --version 1.2.5"
|
||||||
|
|
||||||
realworld_system_gems "ruby-graphviz --version #{graphviz_version}"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "graphs gems from the Gemfile" do
|
it "graphs gems from the Gemfile" do
|
||||||
|
@ -210,6 +210,33 @@ RSpec.describe "bundle install" do
|
|||||||
expect(err).to be_empty
|
expect(err).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "prints the previous version when switching to a previously downloaded gem" do
|
||||||
|
build_repo4 do
|
||||||
|
build_gem "rails", "7.0.3"
|
||||||
|
build_gem "rails", "7.0.4"
|
||||||
|
end
|
||||||
|
|
||||||
|
bundle "config set path.system true"
|
||||||
|
|
||||||
|
install_gemfile <<-G
|
||||||
|
source "#{file_uri_for(gem_repo4)}"
|
||||||
|
gem 'rails', "7.0.4"
|
||||||
|
G
|
||||||
|
|
||||||
|
install_gemfile <<-G
|
||||||
|
source "#{file_uri_for(gem_repo4)}"
|
||||||
|
gem 'rails', "7.0.3"
|
||||||
|
G
|
||||||
|
|
||||||
|
install_gemfile <<-G
|
||||||
|
source "#{file_uri_for(gem_repo4)}"
|
||||||
|
gem 'rails', "7.0.4"
|
||||||
|
G
|
||||||
|
|
||||||
|
expect(out).to include("Using rails 7.0.4 (was 7.0.3)")
|
||||||
|
expect(err).to be_empty
|
||||||
|
end
|
||||||
|
|
||||||
it "can install dependencies with newer bundler version with system gems" do
|
it "can install dependencies with newer bundler version with system gems" do
|
||||||
bundle "config set path.system true"
|
bundle "config set path.system true"
|
||||||
|
|
||||||
|
@ -1237,7 +1237,7 @@ RSpec.describe "bundle install with git sources" do
|
|||||||
s.extensions = ["ext/extconf.rb"]
|
s.extensions = ["ext/extconf.rb"]
|
||||||
s.write "ext/extconf.rb", <<-RUBY
|
s.write "ext/extconf.rb", <<-RUBY
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
create_makefile("foo")
|
create_makefile("foo")
|
||||||
RUBY
|
RUBY
|
||||||
s.write "ext/foo.c", "void Init_foo() {}"
|
s.write "ext/foo.c", "void Init_foo() {}"
|
||||||
|
@ -7,7 +7,7 @@ RSpec.describe "installing a gem with native extensions" do
|
|||||||
s.extensions = ["ext/extconf.rb"]
|
s.extensions = ["ext/extconf.rb"]
|
||||||
s.write "ext/extconf.rb", <<-E
|
s.write "ext/extconf.rb", <<-E
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
name = "c_extension_bundle"
|
name = "c_extension_bundle"
|
||||||
dir_config(name)
|
dir_config(name)
|
||||||
raise "OMG" unless with_config("c_extension") == "hello"
|
raise "OMG" unless with_config("c_extension") == "hello"
|
||||||
@ -52,7 +52,7 @@ RSpec.describe "installing a gem with native extensions" do
|
|||||||
s.extensions = ["ext/extconf.rb"]
|
s.extensions = ["ext/extconf.rb"]
|
||||||
s.write "ext/extconf.rb", <<-E
|
s.write "ext/extconf.rb", <<-E
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
name = "c_extension_bundle"
|
name = "c_extension_bundle"
|
||||||
dir_config(name)
|
dir_config(name)
|
||||||
raise "OMG" unless with_config("c_extension") == "hello"
|
raise "OMG" unless with_config("c_extension") == "hello"
|
||||||
@ -97,7 +97,7 @@ RSpec.describe "installing a gem with native extensions" do
|
|||||||
s.extensions = ["ext/extconf.rb"]
|
s.extensions = ["ext/extconf.rb"]
|
||||||
s.write "ext/extconf.rb", <<-E
|
s.write "ext/extconf.rb", <<-E
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
name = "c_extension_bundle_#{n}"
|
name = "c_extension_bundle_#{n}"
|
||||||
dir_config(name)
|
dir_config(name)
|
||||||
raise "OMG" unless with_config("c_extension_#{n}") == "#{n}"
|
raise "OMG" unless with_config("c_extension_#{n}") == "#{n}"
|
||||||
@ -150,7 +150,7 @@ RSpec.describe "installing a gem with native extensions" do
|
|||||||
s.extensions = ["ext/extconf.rb"]
|
s.extensions = ["ext/extconf.rb"]
|
||||||
s.write "ext/extconf.rb", <<-E
|
s.write "ext/extconf.rb", <<-E
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
name = "c_extension_bundle"
|
name = "c_extension_bundle"
|
||||||
dir_config(name)
|
dir_config(name)
|
||||||
raise "OMG" unless with_config("c_extension") == "hello" && with_config("c_extension_bundle-dir") == "hola"
|
raise "OMG" unless with_config("c_extension") == "hello" && with_config("c_extension_bundle-dir") == "hola"
|
||||||
|
@ -589,8 +589,7 @@ RSpec.describe "major deprecations" do
|
|||||||
|
|
||||||
context "bundle viz" do
|
context "bundle viz" do
|
||||||
before do
|
before do
|
||||||
graphviz_version = RUBY_VERSION >= "2.4" ? "1.2.5" : "1.2.4"
|
realworld_system_gems "ruby-graphviz --version 1.2.5"
|
||||||
realworld_system_gems "ruby-graphviz --version #{graphviz_version}"
|
|
||||||
create_file "gems.rb", "source \"#{file_uri_for(gem_repo1)}\""
|
create_file "gems.rb", "source \"#{file_uri_for(gem_repo1)}\""
|
||||||
bundle "viz"
|
bundle "viz"
|
||||||
end
|
end
|
||||||
|
@ -41,7 +41,7 @@ RSpec.describe "La biblioteca si misma" do
|
|||||||
included = /ronn/
|
included = /ronn/
|
||||||
error_messages = []
|
error_messages = []
|
||||||
man_tracked_files.each do |filename|
|
man_tracked_files.each do |filename|
|
||||||
next unless filename =~ included
|
next unless filename&.match?(included)
|
||||||
error_messages << check_for_expendable_words(filename)
|
error_messages << check_for_expendable_words(filename)
|
||||||
error_messages << check_for_specific_pronouns(filename)
|
error_messages << check_for_specific_pronouns(filename)
|
||||||
end
|
end
|
||||||
@ -52,7 +52,7 @@ RSpec.describe "La biblioteca si misma" do
|
|||||||
error_messages = []
|
error_messages = []
|
||||||
exempt = /vendor/
|
exempt = /vendor/
|
||||||
lib_tracked_files.each do |filename|
|
lib_tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
error_messages << check_for_expendable_words(filename)
|
error_messages << check_for_expendable_words(filename)
|
||||||
error_messages << check_for_specific_pronouns(filename)
|
error_messages << check_for_specific_pronouns(filename)
|
||||||
end
|
end
|
||||||
|
@ -12,7 +12,7 @@ RSpec.describe "The library itself" do
|
|||||||
|
|
||||||
failing_lines = []
|
failing_lines = []
|
||||||
each_line(filename) do |line, number|
|
each_line(filename) do |line, number|
|
||||||
failing_lines << number + 1 if line =~ merge_conflicts_regex
|
failing_lines << number + 1 if line&.match?(merge_conflicts_regex)
|
||||||
end
|
end
|
||||||
|
|
||||||
return if failing_lines.empty?
|
return if failing_lines.empty?
|
||||||
@ -32,8 +32,8 @@ RSpec.describe "The library itself" do
|
|||||||
def check_for_extra_spaces(filename)
|
def check_for_extra_spaces(filename)
|
||||||
failing_lines = []
|
failing_lines = []
|
||||||
each_line(filename) do |line, number|
|
each_line(filename) do |line, number|
|
||||||
next if line =~ /^\s+#.*\s+\n$/
|
next if /^\s+#.*\s+\n$/.match?(line)
|
||||||
failing_lines << number + 1 if line =~ /\s+\n$/
|
failing_lines << number + 1 if /\s+\n$/.match?(line)
|
||||||
end
|
end
|
||||||
|
|
||||||
return if failing_lines.empty?
|
return if failing_lines.empty?
|
||||||
@ -45,7 +45,7 @@ RSpec.describe "The library itself" do
|
|||||||
|
|
||||||
failing_lines = []
|
failing_lines = []
|
||||||
each_line(filename) do |line, number|
|
each_line(filename) do |line, number|
|
||||||
failing_lines << number + 1 if line =~ /’/
|
failing_lines << number + 1 if /’/.match?(line)
|
||||||
end
|
end
|
||||||
|
|
||||||
return if failing_lines.empty?
|
return if failing_lines.empty?
|
||||||
@ -89,7 +89,7 @@ RSpec.describe "The library itself" do
|
|||||||
exempt = /\.gitmodules|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|index\.txt$/
|
exempt = /\.gitmodules|fixtures|vendor|LICENSE|vcr_cassettes|rbreadline\.diff|index\.txt$/
|
||||||
error_messages = []
|
error_messages = []
|
||||||
tracked_files.each do |filename|
|
tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
error_messages << check_for_tab_characters(filename)
|
error_messages << check_for_tab_characters(filename)
|
||||||
error_messages << check_for_extra_spaces(filename)
|
error_messages << check_for_extra_spaces(filename)
|
||||||
end
|
end
|
||||||
@ -100,7 +100,7 @@ RSpec.describe "The library itself" do
|
|||||||
exempt = /vendor|vcr_cassettes|LICENSE|rbreadline\.diff/
|
exempt = /vendor|vcr_cassettes|LICENSE|rbreadline\.diff/
|
||||||
error_messages = []
|
error_messages = []
|
||||||
tracked_files.each do |filename|
|
tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
error_messages << check_for_straneous_quotes(filename)
|
error_messages << check_for_straneous_quotes(filename)
|
||||||
end
|
end
|
||||||
expect(error_messages.compact).to be_well_formed
|
expect(error_messages.compact).to be_well_formed
|
||||||
@ -110,7 +110,7 @@ RSpec.describe "The library itself" do
|
|||||||
error_messages = []
|
error_messages = []
|
||||||
exempt = %r{lock/lockfile_spec|quality_spec|vcr_cassettes|\.ronn|lockfile_parser\.rb}
|
exempt = %r{lock/lockfile_spec|quality_spec|vcr_cassettes|\.ronn|lockfile_parser\.rb}
|
||||||
tracked_files.each do |filename|
|
tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
error_messages << check_for_git_merge_conflicts(filename)
|
error_messages << check_for_git_merge_conflicts(filename)
|
||||||
end
|
end
|
||||||
expect(error_messages.compact).to be_well_formed
|
expect(error_messages.compact).to be_well_formed
|
||||||
@ -120,7 +120,7 @@ RSpec.describe "The library itself" do
|
|||||||
included = /ronn/
|
included = /ronn/
|
||||||
error_messages = []
|
error_messages = []
|
||||||
man_tracked_files.each do |filename|
|
man_tracked_files.each do |filename|
|
||||||
next unless filename =~ included
|
next unless filename&.match?(included)
|
||||||
error_messages << check_for_expendable_words(filename)
|
error_messages << check_for_expendable_words(filename)
|
||||||
error_messages << check_for_specific_pronouns(filename)
|
error_messages << check_for_specific_pronouns(filename)
|
||||||
end
|
end
|
||||||
@ -131,7 +131,7 @@ RSpec.describe "The library itself" do
|
|||||||
error_messages = []
|
error_messages = []
|
||||||
exempt = /vendor|vcr_cassettes|CODE_OF_CONDUCT/
|
exempt = /vendor|vcr_cassettes|CODE_OF_CONDUCT/
|
||||||
lib_tracked_files.each do |filename|
|
lib_tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
error_messages << check_for_expendable_words(filename)
|
error_messages << check_for_expendable_words(filename)
|
||||||
error_messages << check_for_specific_pronouns(filename)
|
error_messages << check_for_specific_pronouns(filename)
|
||||||
end
|
end
|
||||||
@ -229,7 +229,7 @@ RSpec.describe "The library itself" do
|
|||||||
exempt = %r{templates/|\.5|\.1|vendor/}
|
exempt = %r{templates/|\.5|\.1|vendor/}
|
||||||
all_bad_requires = []
|
all_bad_requires = []
|
||||||
lib_tracked_files.each do |filename|
|
lib_tracked_files.each do |filename|
|
||||||
next if filename =~ exempt
|
next if filename&.match?(exempt)
|
||||||
each_line(filename) do |line, number|
|
each_line(filename) do |line, number|
|
||||||
line.scan(/^ *require "bundler/).each { all_bad_requires << "#{filename}:#{number.succ}" }
|
line.scan(/^ *require "bundler/).each { all_bad_requires << "#{filename}:#{number.succ}" }
|
||||||
end
|
end
|
||||||
|
@ -1304,11 +1304,7 @@ end
|
|||||||
|
|
||||||
describe "default gem activation" do
|
describe "default gem activation" do
|
||||||
let(:exemptions) do
|
let(:exemptions) do
|
||||||
exempts = if Gem.rubygems_version >= Gem::Version.new("2.7")
|
exempts = %w[did_you_mean bundler]
|
||||||
%w[did_you_mean]
|
|
||||||
else
|
|
||||||
%w[io-console openssl]
|
|
||||||
end << "bundler"
|
|
||||||
exempts << "uri" if Gem.ruby_version >= Gem::Version.new("2.7")
|
exempts << "uri" if Gem.ruby_version >= Gem::Version.new("2.7")
|
||||||
exempts << "pathname" if Gem.ruby_version >= Gem::Version.new("3.0")
|
exempts << "pathname" if Gem.ruby_version >= Gem::Version.new("3.0")
|
||||||
exempts << "set" unless Gem.rubygems_version >= Gem::Version.new("3.2.6")
|
exempts << "set" unless Gem.rubygems_version >= Gem::Version.new("3.2.6")
|
||||||
|
@ -96,23 +96,21 @@ RSpec.configure do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
config.around :each do |example|
|
config.around :each do |example|
|
||||||
begin
|
FileUtils.cp_r pristine_system_gem_path, system_gem_path
|
||||||
FileUtils.cp_r pristine_system_gem_path, system_gem_path
|
|
||||||
|
|
||||||
with_gem_path_as(system_gem_path) do
|
with_gem_path_as(system_gem_path) do
|
||||||
Bundler.ui.silence { example.run }
|
Bundler.ui.silence { example.run }
|
||||||
|
|
||||||
all_output = all_commands_output
|
all_output = all_commands_output
|
||||||
if example.exception && !all_output.empty?
|
if example.exception && !all_output.empty?
|
||||||
message = all_output + "\n" + example.exception.message
|
message = all_output + "\n" + example.exception.message
|
||||||
(class << example.exception; self; end).send(:define_method, :message) do
|
(class << example.exception; self; end).send(:define_method, :message) do
|
||||||
message
|
message
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ensure
|
|
||||||
reset!
|
|
||||||
end
|
end
|
||||||
|
ensure
|
||||||
|
reset!
|
||||||
end
|
end
|
||||||
|
|
||||||
config.after :suite do
|
config.after :suite do
|
||||||
|
@ -456,7 +456,7 @@ module Spec
|
|||||||
write "ext/extconf.rb", <<-RUBY
|
write "ext/extconf.rb", <<-RUBY
|
||||||
require "mkmf"
|
require "mkmf"
|
||||||
|
|
||||||
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"] unless RUBY_VERSION < "2.4"
|
$extout = "$(topdir)/" + RbConfig::CONFIG["EXTOUT"]
|
||||||
|
|
||||||
extension_name = "#{name}_c"
|
extension_name = "#{name}_c"
|
||||||
if extra_lib_dir = with_config("ext-lib")
|
if extra_lib_dir = with_config("ext-lib")
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rubygems"
|
require "rubygems"
|
||||||
|
Gem.instance_variable_set(:@ruby, ENV["RUBY"]) if ENV["RUBY"]
|
||||||
|
|
||||||
require_relative "path"
|
require_relative "path"
|
||||||
bundler_gemspec = Spec::Path.loaded_gemspec
|
bundler_gemspec = Spec::Path.loaded_gemspec
|
||||||
bundler_gemspec.instance_variable_set(:@full_gem_path, Spec::Path.source_root)
|
bundler_gemspec.instance_variable_set(:@full_gem_path, Spec::Path.source_root)
|
||||||
|
@ -33,11 +33,4 @@ module Gem
|
|||||||
if ENV["BUNDLER_SPEC_GEM_SOURCES"]
|
if ENV["BUNDLER_SPEC_GEM_SOURCES"]
|
||||||
self.sources = [ENV["BUNDLER_SPEC_GEM_SOURCES"]]
|
self.sources = [ENV["BUNDLER_SPEC_GEM_SOURCES"]]
|
||||||
end
|
end
|
||||||
|
|
||||||
# We only need this hack for rubygems versions without the BundlerVersionFinder
|
|
||||||
if Gem.rubygems_version < Gem::Version.new("2.7.0")
|
|
||||||
@path_to_default_spec_map.delete_if do |_path, spec|
|
|
||||||
spec.name == "bundler"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -290,7 +290,7 @@ module Spec
|
|||||||
if gem_name.start_with?("bundler")
|
if gem_name.start_with?("bundler")
|
||||||
version = gem_name.match(/\Abundler-(?<version>.*)\z/)[:version] if gem_name != "bundler"
|
version = gem_name.match(/\Abundler-(?<version>.*)\z/)[:version] if gem_name != "bundler"
|
||||||
with_built_bundler(version) {|gem_path| install_gem(gem_path, default) }
|
with_built_bundler(version) {|gem_path| install_gem(gem_path, default) }
|
||||||
elsif gem_name =~ %r{\A(?:[a-zA-Z]:)?/.*\.gem\z}
|
elsif %r{\A(?:[a-zA-Z]:)?/.*\.gem\z}.match?(gem_name)
|
||||||
install_gem(gem_name, default)
|
install_gem(gem_name, default)
|
||||||
else
|
else
|
||||||
install_gem("#{gem_repo}/gems/#{gem_name}.gem", default)
|
install_gem("#{gem_repo}/gems/#{gem_name}.gem", default)
|
||||||
@ -486,10 +486,10 @@ module Spec
|
|||||||
Gem.ruby_version.segments[0..1].map.with_index {|s, i| i == 1 ? s + 1 : s }.join(".")
|
Gem.ruby_version.segments[0..1].map.with_index {|s, i| i == 1 ? s + 1 : s }.join(".")
|
||||||
end
|
end
|
||||||
|
|
||||||
# versions providing a bundler version finder but not including
|
# versions not including
|
||||||
# https://github.com/rubygems/rubygems/commit/929e92d752baad3a08f3ac92eaec162cb96aedd1
|
# https://github.com/rubygems/rubygems/commit/929e92d752baad3a08f3ac92eaec162cb96aedd1
|
||||||
def rubygems_version_failing_to_activate_bundler_prereleases
|
def rubygems_version_failing_to_activate_bundler_prereleases
|
||||||
Gem.rubygems_version < Gem::Version.new("3.1.0.pre.1") && Gem.rubygems_version >= Gem::Version.new("2.7.0")
|
Gem.rubygems_version < Gem::Version.new("3.1.0.pre.1")
|
||||||
end
|
end
|
||||||
|
|
||||||
def revision_for(path)
|
def revision_for(path)
|
||||||
|
@ -126,7 +126,7 @@ module Spec
|
|||||||
next if version == v("1.4.2.1") && platform != pl("x86-mswin32")
|
next if version == v("1.4.2.1") && platform != pl("x86-mswin32")
|
||||||
next if version == v("1.4.2") && platform == pl("x86-mswin32")
|
next if version == v("1.4.2") && platform == pl("x86-mswin32")
|
||||||
gem "nokogiri", version, platform do
|
gem "nokogiri", version, platform do
|
||||||
dep "weakling", ">= 0.0.3" if platform =~ pl("java")
|
dep "weakling", ">= 0.0.3" if platform =~ pl("java") # rubocop:disable Performance/RegexpMatch
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -295,25 +295,11 @@ module Spec
|
|||||||
end
|
end
|
||||||
|
|
||||||
def rubocop_gemfile_basename
|
def rubocop_gemfile_basename
|
||||||
filename = if RUBY_VERSION.start_with?("2.3")
|
source_root.join("tool/bundler/rubocop_gems.rb")
|
||||||
"rubocop23_gems"
|
|
||||||
elsif RUBY_VERSION.start_with?("2.4")
|
|
||||||
"rubocop24_gems"
|
|
||||||
else
|
|
||||||
"rubocop_gems"
|
|
||||||
end
|
|
||||||
tool_dir.join("#{filename}.rb")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def standard_gemfile_basename
|
def standard_gemfile_basename
|
||||||
filename = if RUBY_VERSION.start_with?("2.3")
|
source_root.join("tool/bundler/standard_gems.rb")
|
||||||
"standard23_gems"
|
|
||||||
elsif RUBY_VERSION.start_with?("2.4")
|
|
||||||
"standard24_gems"
|
|
||||||
else
|
|
||||||
"standard_gems"
|
|
||||||
end
|
|
||||||
tool_dir.join("#{filename}.rb")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def tool_dir
|
def tool_dir
|
||||||
|
@ -113,7 +113,7 @@ class RubygemsVersionManager
|
|||||||
end
|
end
|
||||||
|
|
||||||
def resolve_target_tag
|
def resolve_target_tag
|
||||||
return "v#{@source}" if @source.match(/^\d/)
|
return "v#{@source}" if @source.match?(/^\d/)
|
||||||
|
|
||||||
@source
|
@source
|
||||||
end
|
end
|
||||||
|
@ -2061,13 +2061,8 @@ You may need to `bundle install` to install missing gems
|
|||||||
end
|
end
|
||||||
|
|
||||||
def redefine_method(base, method, new_result)
|
def redefine_method(base, method, new_result)
|
||||||
if RUBY_VERSION >= "2.5"
|
base.alias_method(method, method)
|
||||||
base.alias_method(method, method)
|
base.define_method(method) { new_result }
|
||||||
base.define_method(method) { new_result }
|
|
||||||
else
|
|
||||||
base.send(:alias_method, method, method)
|
|
||||||
base.send(:define_method, method) { new_result }
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_plugin(path)
|
def with_plugin(path)
|
||||||
|
@ -76,7 +76,7 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
|
|
||||||
message = "Unknown command pish".dup
|
message = "Unknown command pish".dup
|
||||||
|
|
||||||
if RUBY_VERSION >= "2.4" && defined?(DidYouMean::SPELL_CHECKERS) && defined?(DidYouMean::Correctable)
|
if defined?(DidYouMean::SPELL_CHECKERS) && defined?(DidYouMean::Correctable)
|
||||||
message << "\nDid you mean? \"push\""
|
message << "\nDid you mean? \"push\""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ class TestGemRequirement < Gem::TestCase
|
|||||||
Gem::Requirement.parse(Gem::Version.new("2"))
|
Gem::Requirement.parse(Gem::Version.new("2"))
|
||||||
end
|
end
|
||||||
|
|
||||||
if RUBY_VERSION >= "2.5" && !(Gem.java_platform? && ENV["JRUBY_OPTS"].to_s.include?("--debug"))
|
if !(Gem.java_platform? && ENV["JRUBY_OPTS"].to_s.include?("--debug"))
|
||||||
def test_parse_deduplication
|
def test_parse_deduplication
|
||||||
assert_same "~>", Gem::Requirement.parse("~> 1").first
|
assert_same "~>", Gem::Requirement.parse("~> 1").first
|
||||||
end
|
end
|
||||||
|
@ -596,77 +596,74 @@ class TestGemRequire < Gem::TestCase
|
|||||||
assert_empty unresolved_names
|
assert_empty unresolved_names
|
||||||
end
|
end
|
||||||
|
|
||||||
# uplevel is 2.5+ only
|
["", "Kernel."].each do |prefix|
|
||||||
if RUBY_VERSION >= "2.5"
|
define_method "test_no_kernel_require_in_#{prefix.tr(".", "_")}warn_with_uplevel" do
|
||||||
["", "Kernel."].each do |prefix|
|
|
||||||
define_method "test_no_kernel_require_in_#{prefix.tr(".", "_")}warn_with_uplevel" do
|
|
||||||
Dir.mktmpdir("warn_test") do |dir|
|
|
||||||
File.write(dir + "/sub.rb", "#{prefix}warn 'uplevel', 'test', uplevel: 1\n")
|
|
||||||
File.write(dir + "/main.rb", "require 'sub'\n")
|
|
||||||
_, err = capture_subprocess_io do
|
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
|
||||||
_, err = capture_subprocess_io do
|
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
define_method "test_no_other_behavioral_changes_with_#{prefix.tr(".", "_")}warn" do
|
|
||||||
Dir.mktmpdir("warn_test") do |dir|
|
|
||||||
File.write(dir + "/main.rb", "#{prefix}warn({x:1}, {y:2}, [])\n")
|
|
||||||
_, err = capture_subprocess_io do
|
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
|
|
||||||
_, err = capture_subprocess_io do
|
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_no_crash_when_overriding_warn_with_warning_module
|
|
||||||
Dir.mktmpdir("warn_test") do |dir|
|
Dir.mktmpdir("warn_test") do |dir|
|
||||||
File.write(dir + "/main.rb", "module Warning; def warn(str); super; end; end; warn 'Foo Bar'")
|
File.write(dir + "/sub.rb", "#{prefix}warn 'uplevel', 'test', uplevel: 1\n")
|
||||||
_, err = capture_subprocess_io do
|
File.write(dir + "/main.rb", "require 'sub'\n")
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/Foo Bar\n$/, err)
|
|
||||||
_, err = capture_subprocess_io do
|
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "main.rb")
|
|
||||||
end
|
|
||||||
assert_match(/Foo Bar\n$/, err)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_expected_backtrace_location_when_inheriting_from_basic_object_and_including_kernel
|
|
||||||
Dir.mktmpdir("warn_test") do |dir|
|
|
||||||
File.write(dir + "/main.rb", "\nrequire 'sub'\n")
|
|
||||||
File.write(dir + "/sub.rb", <<-'RUBY')
|
|
||||||
require 'rubygems'
|
|
||||||
class C < BasicObject
|
|
||||||
include ::Kernel
|
|
||||||
def deprecated
|
|
||||||
warn "This is a deprecated method", uplevel: 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
C.new.deprecated
|
|
||||||
RUBY
|
|
||||||
|
|
||||||
_, err = capture_subprocess_io do
|
_, err = capture_subprocess_io do
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I", dir, "main.rb")
|
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||||
end
|
end
|
||||||
assert_match(/main\.rb:2: warning: This is a deprecated method$/, err)
|
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
||||||
_, err = capture_subprocess_io do
|
_, err = capture_subprocess_io do
|
||||||
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I", dir, "main.rb")
|
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||||
end
|
end
|
||||||
assert_match(/main\.rb:2: warning: This is a deprecated method$/, err)
|
assert_match(/main\.rb:1: warning: uplevel\ntest\n$/, err)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
define_method "test_no_other_behavioral_changes_with_#{prefix.tr(".", "_")}warn" do
|
||||||
|
Dir.mktmpdir("warn_test") do |dir|
|
||||||
|
File.write(dir + "/main.rb", "#{prefix}warn({x:1}, {y:2}, [])\n")
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/{:x=>1}\n{:y=>2}\n$/, err)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_no_crash_when_overriding_warn_with_warning_module
|
||||||
|
Dir.mktmpdir("warn_test") do |dir|
|
||||||
|
File.write(dir + "/main.rb", "module Warning; def warn(str); super; end; end; warn 'Foo Bar'")
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/Foo Bar\n$/, err)
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/Foo Bar\n$/, err)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_expected_backtrace_location_when_inheriting_from_basic_object_and_including_kernel
|
||||||
|
Dir.mktmpdir("warn_test") do |dir|
|
||||||
|
File.write(dir + "/main.rb", "\nrequire 'sub'\n")
|
||||||
|
File.write(dir + "/sub.rb", <<-'RUBY')
|
||||||
|
require 'rubygems'
|
||||||
|
class C < BasicObject
|
||||||
|
include ::Kernel
|
||||||
|
def deprecated
|
||||||
|
warn "This is a deprecated method", uplevel: 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
C.new.deprecated
|
||||||
|
RUBY
|
||||||
|
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--disable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/main\.rb:2: warning: This is a deprecated method$/, err)
|
||||||
|
_, err = capture_subprocess_io do
|
||||||
|
system(*ruby_with_rubygems_in_load_path, "-w", "--enable=gems", "-C", dir, "-I", dir, "main.rb")
|
||||||
|
end
|
||||||
|
assert_match(/main\.rb:2: warning: This is a deprecated method$/, err)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
@ -2,17 +2,16 @@
|
|||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "rdoc", "6.2.0" # 6.2.1 is required > Ruby 2.3
|
|
||||||
gem "test-unit", "~> 3.0"
|
gem "test-unit", "~> 3.0"
|
||||||
gem "rake", "~> 13.0"
|
gem "rake", "~> 13.0"
|
||||||
|
|
||||||
gem "webrick", "~> 1.6"
|
gem "webrick", "~> 1.6"
|
||||||
gem "parallel_tests", "~> 2.29"
|
gem "parallel_tests", "~> 2.29"
|
||||||
gem "parallel", "1.19.2" # 1.20+ is required > Ruby 2.3
|
gem "parallel", "~> 1.19"
|
||||||
gem "rspec-core", "~> 3.12"
|
gem "rspec-core", "~> 3.12"
|
||||||
gem "rspec-expectations", "~> 3.12"
|
gem "rspec-expectations", "~> 3.12"
|
||||||
gem "rspec-mocks", "~> 3.12"
|
gem "rspec-mocks", "~> 3.12"
|
||||||
gem "uri", "~> 0.10.1"
|
gem "uri", "~> 0.12.0"
|
||||||
|
|
||||||
group :doc do
|
group :doc do
|
||||||
gem "ronn", "~> 0.7.3", :platform => :ruby
|
gem "ronn", "~> 0.7.3", :platform => :ruby
|
||||||
|
@ -5,13 +5,12 @@ GEM
|
|||||||
hpricot (0.8.6)
|
hpricot (0.8.6)
|
||||||
hpricot (0.8.6-java)
|
hpricot (0.8.6-java)
|
||||||
mustache (1.1.1)
|
mustache (1.1.1)
|
||||||
parallel (1.19.2)
|
parallel (1.22.1)
|
||||||
parallel_tests (2.32.0)
|
parallel_tests (2.32.0)
|
||||||
parallel
|
parallel
|
||||||
power_assert (2.0.1)
|
power_assert (2.0.2)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rdiscount (2.2.0.2)
|
rdiscount (2.2.7)
|
||||||
rdoc (6.2.0)
|
|
||||||
ronn (0.7.3)
|
ronn (0.7.3)
|
||||||
hpricot (>= 0.8.2)
|
hpricot (>= 0.8.2)
|
||||||
mustache (>= 0.7.0)
|
mustache (>= 0.7.0)
|
||||||
@ -21,13 +20,13 @@ GEM
|
|||||||
rspec-expectations (3.12.0)
|
rspec-expectations (3.12.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.12.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-mocks (3.12.0)
|
rspec-mocks (3.12.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.12.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-support (3.12.0)
|
rspec-support (3.12.0)
|
||||||
test-unit (3.5.3)
|
test-unit (3.5.5)
|
||||||
power_assert
|
power_assert
|
||||||
uri (0.10.1)
|
uri (0.12.0)
|
||||||
webrick (1.7.0)
|
webrick (1.7.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@ -41,16 +40,15 @@ PLATFORMS
|
|||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
parallel (= 1.19.2)
|
parallel (~> 1.19)
|
||||||
parallel_tests (~> 2.29)
|
parallel_tests (~> 2.29)
|
||||||
rake (~> 13.0)
|
rake (~> 13.0)
|
||||||
rdoc (= 6.2.0)
|
|
||||||
ronn (~> 0.7.3)
|
ronn (~> 0.7.3)
|
||||||
rspec-core (~> 3.12)
|
rspec-core (~> 3.12)
|
||||||
rspec-expectations (~> 3.12)
|
rspec-expectations (~> 3.12)
|
||||||
rspec-mocks (~> 3.12)
|
rspec-mocks (~> 3.12)
|
||||||
test-unit (~> 3.0)
|
test-unit (~> 3.0)
|
||||||
uri (~> 0.10.1)
|
uri (~> 0.12.0)
|
||||||
webrick (~> 1.6)
|
webrick (~> 1.6)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
|
@ -3,45 +3,48 @@ GEM
|
|||||||
specs:
|
specs:
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
minitest (5.15.0)
|
json (2.6.3)
|
||||||
parallel (1.21.0)
|
json (2.6.3-java)
|
||||||
parser (3.1.0.0)
|
minitest (5.16.3)
|
||||||
|
parallel (1.22.1)
|
||||||
|
parser (3.1.3.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
power_assert (2.0.1)
|
power_assert (2.0.2)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rake-compiler (1.1.7)
|
rake-compiler (1.2.0)
|
||||||
rake
|
rake
|
||||||
regexp_parser (2.2.0)
|
regexp_parser (2.6.1)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rspec (3.10.0)
|
rspec (3.12.0)
|
||||||
rspec-core (~> 3.10.0)
|
rspec-core (~> 3.12.0)
|
||||||
rspec-expectations (~> 3.10.0)
|
rspec-expectations (~> 3.12.0)
|
||||||
rspec-mocks (~> 3.10.0)
|
rspec-mocks (~> 3.12.0)
|
||||||
rspec-core (3.10.2)
|
rspec-core (3.12.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-expectations (3.10.2)
|
rspec-expectations (3.12.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-mocks (3.10.3)
|
rspec-mocks (3.12.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-support (3.10.3)
|
rspec-support (3.12.0)
|
||||||
rubocop (1.24.1)
|
rubocop (1.40.0)
|
||||||
|
json (~> 2.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.1.2.1)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.15.1, < 2.0)
|
rubocop-ast (>= 1.23.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.15.1)
|
rubocop-ast (1.24.0)
|
||||||
parser (>= 3.0.1.1)
|
parser (>= 3.1.1.0)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
test-unit (3.5.3)
|
test-unit (3.5.5)
|
||||||
power_assert
|
power_assert
|
||||||
unicode-display_width (2.1.0)
|
unicode-display_width (2.3.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux
|
||||||
|
@ -3,51 +3,56 @@ GEM
|
|||||||
specs:
|
specs:
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
minitest (5.15.0)
|
json (2.6.3)
|
||||||
parallel (1.21.0)
|
json (2.6.3-java)
|
||||||
parser (3.1.0.0)
|
language_server-protocol (3.17.0.2)
|
||||||
|
minitest (5.16.3)
|
||||||
|
parallel (1.22.1)
|
||||||
|
parser (3.1.3.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
power_assert (2.0.1)
|
power_assert (2.0.2)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rake-compiler (1.1.7)
|
rake-compiler (1.2.0)
|
||||||
rake
|
rake
|
||||||
regexp_parser (2.2.0)
|
regexp_parser (2.6.1)
|
||||||
rexml (3.2.5)
|
rexml (3.2.5)
|
||||||
rspec (3.10.0)
|
rspec (3.12.0)
|
||||||
rspec-core (~> 3.10.0)
|
rspec-core (~> 3.12.0)
|
||||||
rspec-expectations (~> 3.10.0)
|
rspec-expectations (~> 3.12.0)
|
||||||
rspec-mocks (~> 3.10.0)
|
rspec-mocks (~> 3.12.0)
|
||||||
rspec-core (3.10.2)
|
rspec-core (3.12.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-expectations (3.10.2)
|
rspec-expectations (3.12.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-mocks (3.10.3)
|
rspec-mocks (3.12.1)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.12.0)
|
||||||
rspec-support (3.10.3)
|
rspec-support (3.12.0)
|
||||||
rubocop (1.24.1)
|
rubocop (1.39.0)
|
||||||
|
json (~> 2.3)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
parser (>= 3.0.0.0)
|
parser (>= 3.1.2.1)
|
||||||
rainbow (>= 2.2.2, < 4.0)
|
rainbow (>= 2.2.2, < 4.0)
|
||||||
regexp_parser (>= 1.8, < 3.0)
|
regexp_parser (>= 1.8, < 3.0)
|
||||||
rexml
|
rexml (>= 3.2.5, < 4.0)
|
||||||
rubocop-ast (>= 1.15.1, < 2.0)
|
rubocop-ast (>= 1.23.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.15.1)
|
rubocop-ast (1.24.0)
|
||||||
parser (>= 3.0.1.1)
|
parser (>= 3.1.1.0)
|
||||||
rubocop-performance (1.13.1)
|
rubocop-performance (1.15.1)
|
||||||
rubocop (>= 1.7.0, < 2.0)
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
rubocop-ast (>= 0.4.0)
|
rubocop-ast (>= 0.4.0)
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
standard (1.6.0)
|
standard (1.19.1)
|
||||||
rubocop (= 1.24.1)
|
language_server-protocol (~> 3.17.0.2)
|
||||||
rubocop-performance (= 1.13.1)
|
rubocop (= 1.39.0)
|
||||||
test-unit (3.5.3)
|
rubocop-performance (= 1.15.1)
|
||||||
|
test-unit (3.5.5)
|
||||||
power_assert
|
power_assert
|
||||||
unicode-display_width (2.1.0)
|
unicode-display_width (2.3.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
aarch64-linux
|
aarch64-linux
|
||||||
|
@ -5,7 +5,7 @@ GEM
|
|||||||
rack-test
|
rack-test
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
compact_index (0.13.0)
|
compact_index (0.13.0)
|
||||||
mustermann (1.1.1)
|
mustermann (1.1.2)
|
||||||
ruby2_keywords (~> 0.0.1)
|
ruby2_keywords (~> 0.0.1)
|
||||||
rack (2.0.8)
|
rack (2.0.8)
|
||||||
rack-protection (2.0.8.1)
|
rack-protection (2.0.8.1)
|
||||||
@ -19,7 +19,7 @@ GEM
|
|||||||
rack (~> 2.0)
|
rack (~> 2.0)
|
||||||
rack-protection (= 2.0.8.1)
|
rack-protection (= 2.0.8.1)
|
||||||
tilt (~> 2.0)
|
tilt (~> 2.0)
|
||||||
tilt (2.0.10)
|
tilt (2.0.11)
|
||||||
webrick (1.7.0)
|
webrick (1.7.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user