Make cache_tag private
This commit is contained in:
parent
6a56c45fbf
commit
54785bb8a0
@ -352,10 +352,6 @@ class S3DownloadStrategy < CurlDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class SubversionDownloadStrategy < VCSDownloadStrategy
|
class SubversionDownloadStrategy < VCSDownloadStrategy
|
||||||
def cache_tag
|
|
||||||
head? ? "svn-HEAD" : "svn"
|
|
||||||
end
|
|
||||||
|
|
||||||
def repo_valid?
|
def repo_valid?
|
||||||
@clone.join(".svn").directory?
|
@clone.join(".svn").directory?
|
||||||
end
|
end
|
||||||
@ -426,6 +422,12 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
args << '--ignore-externals' if ignore_externals
|
args << '--ignore-externals' if ignore_externals
|
||||||
quiet_safe_system(*args)
|
quiet_safe_system(*args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
head? ? "svn-HEAD" : "svn"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
StrictSubversionDownloadStrategy = SubversionDownloadStrategy
|
StrictSubversionDownloadStrategy = SubversionDownloadStrategy
|
||||||
@ -452,8 +454,6 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
@shallow = resource.specs.fetch(:shallow) { true }
|
@shallow = resource.specs.fetch(:shallow) { true }
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_tag; "git" end
|
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Cloning #@url"
|
ohai "Cloning #@url"
|
||||||
|
|
||||||
@ -487,6 +487,10 @@ class GitDownloadStrategy < VCSDownloadStrategy
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
"git"
|
||||||
|
end
|
||||||
|
|
||||||
def shallow_clone?
|
def shallow_clone?
|
||||||
@shallow && support_depth?
|
@shallow && support_depth?
|
||||||
end
|
end
|
||||||
@ -584,8 +588,6 @@ class CVSDownloadStrategy < VCSDownloadStrategy
|
|||||||
].find { |p| File.executable? p }
|
].find { |p| File.executable? p }
|
||||||
end
|
end
|
||||||
|
|
||||||
def cache_tag; "cvs" end
|
|
||||||
|
|
||||||
def fetch
|
def fetch
|
||||||
ohai "Checking out #{@url}"
|
ohai "Checking out #{@url}"
|
||||||
|
|
||||||
@ -612,6 +614,10 @@ class CVSDownloadStrategy < VCSDownloadStrategy
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
"cvs"
|
||||||
|
end
|
||||||
|
|
||||||
def split_url(in_url)
|
def split_url(in_url)
|
||||||
parts=in_url.sub(%r[^cvs://], '').split(/:/)
|
parts=in_url.sub(%r[^cvs://], '').split(/:/)
|
||||||
mod=parts.pop
|
mod=parts.pop
|
||||||
@ -621,8 +627,6 @@ class CVSDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
|
|
||||||
class MercurialDownloadStrategy < VCSDownloadStrategy
|
class MercurialDownloadStrategy < VCSDownloadStrategy
|
||||||
def cache_tag; "hg" end
|
|
||||||
|
|
||||||
def hgpath
|
def hgpath
|
||||||
@path ||= %W[
|
@path ||= %W[
|
||||||
#{which("hg")}
|
#{which("hg")}
|
||||||
@ -666,11 +670,15 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
"hg"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class BazaarDownloadStrategy < VCSDownloadStrategy
|
class BazaarDownloadStrategy < VCSDownloadStrategy
|
||||||
def cache_tag; "bzr" end
|
|
||||||
|
|
||||||
def bzrpath
|
def bzrpath
|
||||||
@path ||= %W[
|
@path ||= %W[
|
||||||
#{which("bzr")}
|
#{which("bzr")}
|
||||||
@ -709,11 +717,15 @@ class BazaarDownloadStrategy < VCSDownloadStrategy
|
|||||||
FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd
|
FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd
|
||||||
FileUtils.rm_r ".bzr"
|
FileUtils.rm_r ".bzr"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
"bzr"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class FossilDownloadStrategy < VCSDownloadStrategy
|
class FossilDownloadStrategy < VCSDownloadStrategy
|
||||||
def cache_tag; "fossil" end
|
|
||||||
|
|
||||||
def fossilpath
|
def fossilpath
|
||||||
@path ||= %W[
|
@path ||= %W[
|
||||||
#{which("fossil")}
|
#{which("fossil")}
|
||||||
@ -740,6 +752,12 @@ class FossilDownloadStrategy < VCSDownloadStrategy
|
|||||||
safe_system fossilpath, 'checkout', @ref
|
safe_system fossilpath, 'checkout', @ref
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def cache_tag
|
||||||
|
"fossil"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class DownloadStrategyDetector
|
class DownloadStrategyDetector
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user