aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-10-09 21:41:15 -0500
committerJack Nagel2013-10-09 21:41:15 -0500
commit940fd79ef73e5775f9d87da002320f3bb429a9e8 (patch)
treec8d1db68231c8de5ec0e38875e2205e088feb432 /Library
parent0233def5452aca0a3213e657dc4d4d5efd75b064 (diff)
downloadhomebrew-940fd79ef73e5775f9d87da002320f3bb429a9e8.tar.bz2
Move checkout_name from AbstractDownloadStrategy to VCSDownloadStrategy
Diffstat (limited to 'Library')
-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