From d6a5fe709ec4b04589684074d901b1ec21e812dc Mon Sep 17 00:00:00 2001 From: drbrain Date: Tue, 10 Dec 2013 19:54:19 +0000 Subject: * 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 --- lib/rubygems/basic_specification.rb | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'lib/rubygems/basic_specification.rb') diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index bb4fa281a0..6cc13bb539 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -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 ## -- cgit v1.2.3