From bf1d04f039ef1aadaf9d6f163056f866cb205bf6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 9 Oct 2013 21:41:15 -0500 Subject: Move checkout_name from AbstractDownloadStrategy to VCSDownloadStrategy --- Library/Homebrew/download_strategy.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Library/Homebrew/download_strategy.rb') 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 -- cgit v1.2.3