summaryrefslogtreecommitdiff
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-08-17 17:23:49 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-08-19 00:25:26 -0400
commit597d0b832aef22fb895c98bcb3606f2748565129 (patch)
tree25f0e65a2f48fd8c9a15a0aca1cf133895537825 /lib/bundler/source
parenta12410d52bc3190c16965dfdfbfc703d0776b2ca (diff)
downloadbundler-597d0b832aef22fb895c98bcb3606f2748565129.tar.gz
Move cached extensions to cache/extensionsseg-globally-cache-built-extensions
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/git.rb15
-rw-r--r--lib/bundler/source/path.rb4
-rw-r--r--lib/bundler/source/rubygems.rb6
3 files changed, 11 insertions, 14 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index ce9ffc9c3b..c66cbb17fb 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -209,8 +209,6 @@ module Bundler
# When using local git repos, this is set to the local repo.
def cache_path
@cache_path ||= begin
- git_scope = "#{base_name}-#{uri_hash}"
-
if Bundler.requires_sudo? || Bundler.feature_flag.global_gem_cache?
Bundler.user_cache
else
@@ -219,11 +217,6 @@ module Bundler
end
end
- def extension_cache_path(spec)
- return unless Bundler.feature_flag.global_gem_cache?
- cache_path.join("extensions", Bundler.ruby_scope, extension_dir_name)
- end
-
def app_cache_dirname
"#{base_name}-#{shortref_for_path(cached_revision || revision)}"
end
@@ -323,6 +316,14 @@ module Bundler
StubSpecification.from_stub(stub)
end
end
+
+ def git_scope
+ "#{base_name}-#{uri_hash}"
+ end
+
+ def extension_cache_slug(_)
+ extension_dir_name
+ end
end
end
end
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb
index 64d00e2ec6..afd8723168 100644
--- a/lib/bundler/source/path.rb
+++ b/lib/bundler/source/path.rb
@@ -244,10 +244,6 @@ module Bundler
Bundler.ui.warn "The validation message from RubyGems was:\n #{e.message}"
end
-
- def extension_cache_path(spec)
- nil
- end
end
end
end
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 7939e6db77..fa60bb0c84 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -500,9 +500,9 @@ module Bundler
Bundler.user_cache.join("gems", cache_slug, spec.file_name)
end
- def extension_cache_path(spec)
- return unless download_path = download_cache_path(spec)
- download_path.parent.join("extensions", Bundler.ruby_scope, spec.full_name)
+ def extension_cache_slug(spec)
+ return unless remote = spec.remote
+ remote.cache_slug
end
end
end