aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/download_strategy.rb
diff options
context:
space:
mode:
authorJack Nagel2013-10-09 21:41:15 -0500
committerJack Nagel2013-10-09 21:41:15 -0500
commitbf1d04f039ef1aadaf9d6f163056f866cb205bf6 (patch)
tree3acd3ccba0218a4a894f232f5b4e43829a233efd /Library/Homebrew/download_strategy.rb
parent3cda2158817c8d0f62dcc659388de12d834c067c (diff)
downloadbrew-bf1d04f039ef1aadaf9d6f163056f866cb205bf6.tar.bz2
Move checkout_name from AbstractDownloadStrategy to VCSDownloadStrategy
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
-rw-r--r--Library/Homebrew/download_strategy.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 09530d280..54fde77e3 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -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