mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Make __path methods private
This commit is contained in:
parent
54785bb8a0
commit
f43fe41423
@ -579,15 +579,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class CVSDownloadStrategy < VCSDownloadStrategy
|
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
|
def fetch
|
||||||
ohai "Checking out #{@url}"
|
ohai "Checking out #{@url}"
|
||||||
|
|
||||||
@ -624,17 +615,18 @@ class CVSDownloadStrategy < VCSDownloadStrategy
|
|||||||
url=parts.join(':')
|
url=parts.join(':')
|
||||||
[ mod, url ]
|
[ mod, url ]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
class MercurialDownloadStrategy < VCSDownloadStrategy
|
class MercurialDownloadStrategy < VCSDownloadStrategy
|
||||||
def hgpath
|
|
||||||
@path ||= %W[
|
|
||||||
#{which("hg")}
|
|
||||||
#{HOMEBREW_PREFIX}/bin/hg
|
|
||||||
#{HOMEBREW_PREFIX}/opt/mercurial/bin/hg
|
|
||||||
].find { |p| File.executable? p }
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Cloning #{@url}"
|
ohai "Cloning #{@url}"
|
||||||
|
|
||||||
@ -676,16 +668,17 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
|
|||||||
def cache_tag
|
def cache_tag
|
||||||
"hg"
|
"hg"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def hgpath
|
||||||
|
@path ||= %W[
|
||||||
|
#{which("hg")}
|
||||||
|
#{HOMEBREW_PREFIX}/bin/hg
|
||||||
|
#{HOMEBREW_PREFIX}/opt/mercurial/bin/hg
|
||||||
|
].find { |p| File.executable? p }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class BazaarDownloadStrategy < VCSDownloadStrategy
|
class BazaarDownloadStrategy < VCSDownloadStrategy
|
||||||
def bzrpath
|
|
||||||
@path ||= %W[
|
|
||||||
#{which("bzr")}
|
|
||||||
#{HOMEBREW_PREFIX}/bin/bzr
|
|
||||||
].find { |p| File.executable? p }
|
|
||||||
end
|
|
||||||
|
|
||||||
def repo_valid?
|
def repo_valid?
|
||||||
@clone.join(".bzr").directory?
|
@clone.join(".bzr").directory?
|
||||||
end
|
end
|
||||||
@ -723,16 +716,16 @@ class BazaarDownloadStrategy < VCSDownloadStrategy
|
|||||||
def cache_tag
|
def cache_tag
|
||||||
"bzr"
|
"bzr"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bzrpath
|
||||||
|
@path ||= %W[
|
||||||
|
#{which("bzr")}
|
||||||
|
#{HOMEBREW_PREFIX}/bin/bzr
|
||||||
|
].find { |p| File.executable? p }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class FossilDownloadStrategy < VCSDownloadStrategy
|
class FossilDownloadStrategy < VCSDownloadStrategy
|
||||||
def fossilpath
|
|
||||||
@path ||= %W[
|
|
||||||
#{which("fossil")}
|
|
||||||
#{HOMEBREW_PREFIX}/bin/fossil
|
|
||||||
].find { |p| File.executable? p }
|
|
||||||
end
|
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Cloning #{@url}"
|
ohai "Cloning #{@url}"
|
||||||
unless @clone.exist?
|
unless @clone.exist?
|
||||||
@ -758,6 +751,13 @@ class FossilDownloadStrategy < VCSDownloadStrategy
|
|||||||
def cache_tag
|
def cache_tag
|
||||||
"fossil"
|
"fossil"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def fossilpath
|
||||||
|
@path ||= %W[
|
||||||
|
#{which("fossil")}
|
||||||
|
#{HOMEBREW_PREFIX}/bin/fossil
|
||||||
|
].find { |p| File.executable? p }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class DownloadStrategyDetector
|
class DownloadStrategyDetector
|
||||||
|
Loading…
x
Reference in New Issue
Block a user