mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
Merge RubyGems-3.1.7
This commit is contained in:
parent
cc51cfabfd
commit
6673b60f3d
6 changed files with 12 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
|
||||||
module Gem
|
module Gem
|
||||||
VERSION = "3.2.6".freeze
|
VERSION = "3.2.7".freeze
|
||||||
end
|
end
|
||||||
|
|
||||||
# Must be first since it unloads the prelude from 1.9.2
|
# Must be first since it unloads the prelude from 1.9.2
|
||||||
|
|
|
@ -6,11 +6,16 @@
|
||||||
module Gem::InstallerUninstallerUtils
|
module Gem::InstallerUninstallerUtils
|
||||||
|
|
||||||
def regenerate_plugins_for(spec, plugins_dir)
|
def regenerate_plugins_for(spec, plugins_dir)
|
||||||
|
plugins = spec.plugins
|
||||||
|
return if plugins.empty?
|
||||||
|
|
||||||
|
require 'pathname'
|
||||||
|
|
||||||
spec.plugins.each do |plugin|
|
spec.plugins.each do |plugin|
|
||||||
plugin_script_path = File.join plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}"
|
plugin_script_path = File.join plugins_dir, "#{spec.name}_plugin#{File.extname(plugin)}"
|
||||||
|
|
||||||
File.open plugin_script_path, 'wb' do |file|
|
File.open plugin_script_path, 'wb' do |file|
|
||||||
file.puts "require '#{plugin}'"
|
file.puts "require_relative '#{Pathname.new(plugin).relative_path_from(Pathname.new(plugins_dir))}'"
|
||||||
end
|
end
|
||||||
|
|
||||||
verbose plugin_script_path
|
verbose plugin_script_path
|
||||||
|
|
|
@ -128,7 +128,7 @@ module Gem::Resolver::Molinillo
|
||||||
|
|
||||||
# Is there a path from `self` to `other` following edges in the
|
# Is there a path from `self` to `other` following edges in the
|
||||||
# dependency graph?
|
# dependency graph?
|
||||||
# @return true iff there is a path following edges within this {#graph}
|
# @return whether there is a path following edges within this {#graph}
|
||||||
def path_to?(other)
|
def path_to?(other)
|
||||||
_path_to?(other)
|
_path_to?(other)
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,7 @@ module Gem::Resolver::Molinillo
|
||||||
|
|
||||||
# An error caused by attempting to fulfil a dependency that was circular
|
# An error caused by attempting to fulfil a dependency that was circular
|
||||||
#
|
#
|
||||||
# @note This exception will be thrown iff a {Vertex} is added to a
|
# @note This exception will be thrown if and only if a {Vertex} is added to a
|
||||||
# {DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an
|
# {DependencyGraph} that has a {DependencyGraph::Vertex#path_to?} an
|
||||||
# existing {DependencyGraph::Vertex}
|
# existing {DependencyGraph::Vertex}
|
||||||
class CircularDependencyError < ResolverError
|
class CircularDependencyError < ResolverError
|
||||||
|
|
|
@ -821,6 +821,8 @@ gem 'other', version
|
||||||
|
|
||||||
assert !File.exist?(system_path), 'plugin written incorrect written to system plugins_dir'
|
assert !File.exist?(system_path), 'plugin written incorrect written to system plugins_dir'
|
||||||
assert File.exist?(build_root_path), 'plugin not written to build_root'
|
assert File.exist?(build_root_path), 'plugin not written to build_root'
|
||||||
|
|
||||||
|
refute_includes File.read(build_root_path), build_root
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_keeps_plugins_up_to_date
|
def test_keeps_plugins_up_to_date
|
||||||
|
|
|
@ -5,7 +5,7 @@ require 'timeout'
|
||||||
|
|
||||||
class TestGemStreamUI < Gem::TestCase
|
class TestGemStreamUI < Gem::TestCase
|
||||||
# increase timeout with MJIT for --jit-wait testing
|
# increase timeout with MJIT for --jit-wait testing
|
||||||
mjit_enabled = defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
|
mjit_enabled = defined?(RubyVM::JIT) ? RubyVM::JIT.enabled? : defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
|
||||||
SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !mjit_enabled) ? 0.1 : 1.0
|
SHORT_TIMEOUT = (RUBY_ENGINE == "ruby" && !mjit_enabled) ? 0.1 : 1.0
|
||||||
|
|
||||||
module IsTty
|
module IsTty
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue