diff options
| author | Jack Nagel | 2013-10-10 11:24:36 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-10-10 11:24:36 -0500 |
| commit | 4149b8b7b1bd4f53fa1205fe3d258e1cdb699f9b (patch) | |
| tree | 06c532c87adc04a40f1fd09d973bfa324a9c0665 /Library | |
| parent | fa0adb60eb6794fb7ec0a433012b1bee534fe4ca (diff) | |
| download | homebrew-4149b8b7b1bd4f53fa1205fe3d258e1cdb699f9b.tar.bz2 | |
Move cached_location up to VCSDownloadStrategy
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 20 |
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")} |
