aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorJack Nagel2013-10-10 11:24:36 -0500
committerJack Nagel2013-10-10 11:24:36 -0500
commitdd719e7ca62cb52d749614f1fde663bf1ac1bf14 (patch)
treef9386dc2a1ab30a9f5c7b07e1884f0aa912b751d /Library/Homebrew/download_strategy.rb
parent1626282c45cfb8dfa0fc236ac8c1631961d4e2dc (diff)
downloadbrew-dd719e7ca62cb52d749614f1fde663bf1ac1bf14.tar.bz2
Move cached_location up to VCSDownloadStrategy
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb20
1 files changed, 4 insertions, 16 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index d33e413c1..f637f42f8 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -55,6 +55,10 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
"#{name}--#{tag}"
end
end
+
+ def cached_location
+ @clone
+ end
end
class CurlDownloadStrategy < AbstractDownloadStrategy
@@ -323,10 +327,6 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
end
end
- def cached_location
- @clone
- end
-
def repo_valid?
@clone.join(".svn").directory?
end
@@ -430,10 +430,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("git")}")
end
- def cached_location
- @clone
- end
-
def fetch
ohai "Cloning #@url"
@@ -577,8 +573,6 @@ class CVSDownloadStrategy < VCSDownloadStrategy
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("cvs")}")
end
- def cached_location; @clone; end
-
def fetch
ohai "Checking out #{@url}"
@@ -627,8 +621,6 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("hg")}")
end
- def cached_location; @clone; end
-
def hgpath
# #{HOMEBREW_PREFIX}/share/python/hg is deprecated, but we levae it in for a while
@path ||= %W[
@@ -682,8 +674,6 @@ class BazaarDownloadStrategy < VCSDownloadStrategy
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("bzr")}")
end
- def cached_location; @clone; end
-
def bzrpath
@path ||= %W[
#{which("bzr")}
@@ -730,8 +720,6 @@ class FossilDownloadStrategy < VCSDownloadStrategy
@clone = Pathname.new("#{HOMEBREW_CACHE}/#{checkout_name("fossil")}")
end
- def cached_location; @clone; end
-
def fossilpath
@path ||= %W[
#{which("fossil")}