Provide VCSDownloadStrategy#head?

This commit is contained in:
Jack Nagel 2014-12-05 18:57:28 -05:00
parent 68a5268aef
commit 853399da44

View File

@ -66,6 +66,10 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
def clear_cache
cached_location.rmtree if cached_location.exist?
end
def head?
resource.version.head?
end
end
class CurlDownloadStrategy < AbstractDownloadStrategy
@ -350,7 +354,7 @@ end
class SubversionDownloadStrategy < VCSDownloadStrategy
def cache_tag
resource.version.head? ? "svn-HEAD" : "svn"
head? ? "svn-HEAD" : "svn"
end
def repo_valid?