aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorJack Nagel2014-12-06 12:29:15 -0500
committerJack Nagel2014-12-06 15:02:48 -0500
commit07ca45c7befa780d8ef56cd8c28b82eb52069335 (patch)
treef6f6420e4cd974699748a6805778279bc470c64a /Library/Homebrew/download_strategy.rb
parent05b42a5dcbf25eb2f268dd0ae9bd4de1cad14cfe (diff)
downloadhomebrew-07ca45c7befa780d8ef56cd8c28b82eb52069335.tar.bz2
Make __path methods private
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb50
1 files changed, 25 insertions, 25 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 188bd786b..ad2cb0e15 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -579,15 +579,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
end
class CVSDownloadStrategy < VCSDownloadStrategy
- def cvspath
- @path ||= %W[
- /usr/bin/cvs
- #{HOMEBREW_PREFIX}/bin/cvs
- #{HOMEBREW_PREFIX}/opt/cvs/bin/cvs
- #{which("cvs")}
- ].find { |p| File.executable? p }
- end
-
def fetch
ohai "Checking out #{@url}"
@@ -624,17 +615,18 @@ class CVSDownloadStrategy < VCSDownloadStrategy
url=parts.join(':')
[ mod, url ]
end
-end
-class MercurialDownloadStrategy < VCSDownloadStrategy
- def hgpath
+ def cvspath
@path ||= %W[
- #{which("hg")}
- #{HOMEBREW_PREFIX}/bin/hg
- #{HOMEBREW_PREFIX}/opt/mercurial/bin/hg
+ /usr/bin/cvs
+ #{HOMEBREW_PREFIX}/bin/cvs
+ #{HOMEBREW_PREFIX}/opt/cvs/bin/cvs
+ #{which("cvs")}
].find { |p| File.executable? p }
end
+end
+class MercurialDownloadStrategy < VCSDownloadStrategy
def fetch
ohai "Cloning #{@url}"
@@ -676,16 +668,17 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
def cache_tag
"hg"
end
-end
-class BazaarDownloadStrategy < VCSDownloadStrategy
- def bzrpath
+ def hgpath
@path ||= %W[
- #{which("bzr")}
- #{HOMEBREW_PREFIX}/bin/bzr
+ #{which("hg")}
+ #{HOMEBREW_PREFIX}/bin/hg
+ #{HOMEBREW_PREFIX}/opt/mercurial/bin/hg
].find { |p| File.executable? p }
end
+end
+class BazaarDownloadStrategy < VCSDownloadStrategy
def repo_valid?
@clone.join(".bzr").directory?
end
@@ -723,16 +716,16 @@ class BazaarDownloadStrategy < VCSDownloadStrategy
def cache_tag
"bzr"
end
-end
-class FossilDownloadStrategy < VCSDownloadStrategy
- def fossilpath
+ def bzrpath
@path ||= %W[
- #{which("fossil")}
- #{HOMEBREW_PREFIX}/bin/fossil
+ #{which("bzr")}
+ #{HOMEBREW_PREFIX}/bin/bzr
].find { |p| File.executable? p }
end
+end
+class FossilDownloadStrategy < VCSDownloadStrategy
def fetch
ohai "Cloning #{@url}"
unless @clone.exist?
@@ -758,6 +751,13 @@ class FossilDownloadStrategy < VCSDownloadStrategy
def cache_tag
"fossil"
end
+
+ def fossilpath
+ @path ||= %W[
+ #{which("fossil")}
+ #{HOMEBREW_PREFIX}/bin/fossil
+ ].find { |p| File.executable? p }
+ end
end
class DownloadStrategyDetector