summaryrefslogtreecommitdiff
path: root/lib/rubygems/basic_specification.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 23:27:52 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-30 23:27:52 +0000
commit73fc703f7cbb2e6dfd50897d26b37fe8e76064e3 (patch)
tree0296426c8ac01331f2d33dde54fd9f1e183ea974 /lib/rubygems/basic_specification.rb
parent6727297dfecddaef6b1166a7f442db2a22929c65 (diff)
* lib/rubygems: Update to RubyGems master 66e5c39. Notable changes:
Implement gem.deps.rb (Gemfile) .lock support Fixed `gem uninstall` for a relative directory in GEM_HOME. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/basic_specification.rb')
-rw-r--r--lib/rubygems/basic_specification.rb22
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb
index cfbfbdde92..bb4fa281a0 100644
--- a/lib/rubygems/basic_specification.rb
+++ b/lib/rubygems/basic_specification.rb
@@ -5,6 +5,16 @@
class Gem::BasicSpecification
##
+ # Allows installation of extensions for git: gems.
+
+ attr_writer :base_dir # :nodoc:
+
+ ##
+ # Sets the directory where extensions for this gem will be installed.
+
+ attr_writer :extension_install_dir # :nodoc:
+
+ ##
# The path this gemspec was loaded from. This attribute is not persisted.
attr_reader :loaded_from
@@ -68,8 +78,9 @@ class Gem::BasicSpecification
# end
def extension_install_dir
- File.join base_dir, 'extensions', Gem::Platform.local.to_s,
- Gem.extension_api_version, full_name
+ @extension_install_dir ||=
+ File.join base_dir, 'extensions', Gem::Platform.local.to_s,
+ Gem.extension_api_version, full_name
end
def find_full_gem_path # :nodoc:
@@ -141,9 +152,10 @@ class Gem::BasicSpecification
def loaded_from= path
@loaded_from = path && path.to_s
- @full_gem_path = nil
- @gems_dir = nil
- @base_dir = nil
+ @extension_install_dir = nil
+ @full_gem_path = nil
+ @gems_dir = nil
+ @base_dir = nil
end
##