mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems master ec8ed22. Notable changes
include: * Renamed extension_install_dir to extension_dir (backwards compatible). * Fixed creation of gem.deps.rb.lock file from TestGemRequestSet#test_install_from_gemdeps_install_dir * Fixed a typo and some documentation. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d36a129d7b
commit
d6a5fe709e
17 changed files with 77 additions and 69 deletions
|
@ -12,7 +12,7 @@ class Gem::BasicSpecification
|
|||
##
|
||||
# Sets the directory where extensions for this gem will be installed.
|
||||
|
||||
attr_writer :extension_install_dir # :nodoc:
|
||||
attr_writer :extension_dir # :nodoc:
|
||||
|
||||
##
|
||||
# The path this gemspec was loaded from. This attribute is not persisted.
|
||||
|
@ -69,16 +69,10 @@ class Gem::BasicSpecification
|
|||
end
|
||||
|
||||
##
|
||||
# The directory the named +extension+ was installed into after being built.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# spec.extensions.each do |ext|
|
||||
# puts spec.extension_install_dir ext
|
||||
# end
|
||||
# Returns full path to the directory where gem's extensions are installed.
|
||||
|
||||
def extension_install_dir
|
||||
@extension_install_dir ||=
|
||||
def extension_dir
|
||||
@extension_dir ||=
|
||||
File.join base_dir, 'extensions', Gem::Platform.local.to_s,
|
||||
Gem.extension_api_version, full_name
|
||||
end
|
||||
|
@ -123,7 +117,7 @@ class Gem::BasicSpecification
|
|||
File.join full_gem_path, path
|
||||
end
|
||||
|
||||
full_paths.unshift extension_install_dir unless @extensions.empty?
|
||||
full_paths.unshift extension_dir unless @extensions.empty?
|
||||
|
||||
full_paths
|
||||
end
|
||||
|
@ -152,7 +146,7 @@ class Gem::BasicSpecification
|
|||
def loaded_from= path
|
||||
@loaded_from = path && path.to_s
|
||||
|
||||
@extension_install_dir = nil
|
||||
@extension_dir = nil
|
||||
@full_gem_path = nil
|
||||
@gems_dir = nil
|
||||
@base_dir = nil
|
||||
|
@ -196,11 +190,11 @@ class Gem::BasicSpecification
|
|||
def require_paths
|
||||
return @require_paths if @extensions.empty?
|
||||
|
||||
relative_extension_install_dir =
|
||||
relative_extension_dir =
|
||||
File.join '..', '..', 'extensions', Gem::Platform.local.to_s,
|
||||
Gem.extension_api_version, full_name
|
||||
|
||||
[relative_extension_install_dir].concat @require_paths
|
||||
[relative_extension_dir].concat @require_paths
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue