summaryrefslogtreecommitdiff
path: root/lib/rubygems/path_support.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/path_support.rb')
-rw-r--r--lib/rubygems/path_support.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/rubygems/path_support.rb b/lib/rubygems/path_support.rb
index 7195b322ef..5a16d7a6df 100644
--- a/lib/rubygems/path_support.rb
+++ b/lib/rubygems/path_support.rb
@@ -13,6 +13,10 @@ class Gem::PathSupport
attr_reader :path
##
+ # Directory with spec cache
+ attr_reader :spec_cache_dir # :nodoc:
+
+ ##
#
# Constructor. Takes a single argument which is to be treated like a
# hashtable, or defaults to ENV, the system environment.
@@ -28,6 +32,10 @@ class Gem::PathSupport
end
self.path = env["GEM_PATH"] || ENV["GEM_PATH"]
+
+ @spec_cache_dir =
+ env["GEM_SPEC_CACHE"] || ENV["GEM_SPEC_CACHE"] ||
+ Gem.default_spec_cache_dir
end
private