Move checkout_name from AbstractDownloadStrategy to VCSDownloadStrategy
This commit is contained in:
parent
3cda215881
commit
bf1d04f039
@ -32,14 +32,6 @@ class AbstractDownloadStrategy
|
||||
safe_system(*expand_safe_system_args(args))
|
||||
end
|
||||
|
||||
def checkout_name(tag)
|
||||
if name.empty? || name == '__UNKNOWN__'
|
||||
"#{ERB::Util.url_encode(@url)}--#{tag}"
|
||||
else
|
||||
"#{name}--#{tag}"
|
||||
end
|
||||
end
|
||||
|
||||
# All download strategies are expected to implement these methods
|
||||
def fetch; end
|
||||
def stage; end
|
||||
@ -55,6 +47,14 @@ class VCSDownloadStrategy < AbstractDownloadStrategy
|
||||
def destructure_spec_hash(spec)
|
||||
spec.each { |o| return o }
|
||||
end
|
||||
|
||||
def checkout_name(tag)
|
||||
if name.empty? || name == '__UNKNOWN__'
|
||||
"#{ERB::Util.url_encode(@url)}--#{tag}"
|
||||
else
|
||||
"#{name}--#{tag}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class CurlDownloadStrategy < AbstractDownloadStrategy
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user