зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Keep Gem.install_extension_in_lib for compatibility
https://github.com/rubygems/rubygems/commit/b2bf239147
This commit is contained in:
Родитель
f2d453347f
Коммит
f75b9dbf7d
|
@ -47,6 +47,7 @@ class Gem::ConfigFile
|
||||||
DEFAULT_CONCURRENT_DOWNLOADS = 8
|
DEFAULT_CONCURRENT_DOWNLOADS = 8
|
||||||
DEFAULT_CERT_EXPIRATION_LENGTH_DAYS = 365
|
DEFAULT_CERT_EXPIRATION_LENGTH_DAYS = 365
|
||||||
DEFAULT_IPV4_FALLBACK_ENABLED = false
|
DEFAULT_IPV4_FALLBACK_ENABLED = false
|
||||||
|
# TODO: Use false as default value for this option in RubyGems 4.0
|
||||||
DEFAULT_INSTALL_EXTENSION_IN_LIB = true
|
DEFAULT_INSTALL_EXTENSION_IN_LIB = true
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -247,6 +247,13 @@ module Gem
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Install extensions into lib as well as into the extension directory.
|
||||||
|
|
||||||
|
def self.install_extension_in_lib # :nodoc:
|
||||||
|
Gem.configuration.install_extension_in_lib
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Directory where vendor gems are installed.
|
# Directory where vendor gems are installed.
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Gem::Ext::CargoBuilder < Gem::Ext::Builder
|
||||||
|
|
||||||
nesting = extension_nesting(extension)
|
nesting = extension_nesting(extension)
|
||||||
|
|
||||||
if Gem.configuration.install_extension_in_lib && lib_dir
|
if Gem.install_extension_in_lib && lib_dir
|
||||||
nested_lib_dir = File.join(lib_dir, nesting)
|
nested_lib_dir = File.join(lib_dir, nesting)
|
||||||
FileUtils.mkdir_p nested_lib_dir
|
FileUtils.mkdir_p nested_lib_dir
|
||||||
FileUtils.cp_r dlext_path, nested_lib_dir, remove_destination: true
|
FileUtils.cp_r dlext_path, nested_lib_dir, remove_destination: true
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Gem::Ext::ExtConfBuilder < Gem::Ext::Builder
|
||||||
|
|
||||||
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
full_tmp_dest = File.join(extension_dir, tmp_dest_relative)
|
||||||
|
|
||||||
if Gem.configuration.install_extension_in_lib && lib_dir
|
if Gem.install_extension_in_lib && lib_dir
|
||||||
FileUtils.mkdir_p lib_dir
|
FileUtils.mkdir_p lib_dir
|
||||||
entries = Dir.entries(full_tmp_dest) - %w[. ..]
|
entries = Dir.entries(full_tmp_dest) - %w[. ..]
|
||||||
entries = entries.map {|entry| File.join full_tmp_dest, entry }
|
entries = entries.map {|entry| File.join full_tmp_dest, entry }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче