diff options
| author | Jack Nagel | 2014-07-16 18:12:27 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-16 18:30:52 -0500 |
| commit | 93509e3fc7df28ef10191105eeeb93c3ddd4cb7e (patch) | |
| tree | f45dbc5502f14cf99a1b1a8b1cac74ee0cff6298 /Library/Homebrew/download_strategy.rb | |
| parent | 4ed79e03aa842a134b74d44c16bf70bada6bc16e (diff) | |
| download | homebrew-93509e3fc7df28ef10191105eeeb93c3ddd4cb7e.tar.bz2 | |
Remove dead code
Formula objects are always constructed with an explicit name, so we no
longer need to special case an empty name or the name "__UNKNOWN__".
Diffstat (limited to 'Library/Homebrew/download_strategy.rb')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 83317af04..0a025da1b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1,5 +1,4 @@ require 'utils/json' -require 'erb' class AbstractDownloadStrategy attr_reader :name, :resource @@ -53,11 +52,7 @@ class VCSDownloadStrategy < AbstractDownloadStrategy end def cache_filename(tag=cache_tag) - if name.empty? || name == '__UNKNOWN__' - "#{ERB::Util.url_encode(@url)}--#{tag}" - else - "#{name}--#{tag}" - end + "#{name}--#{tag}" end def cache_tag @@ -79,11 +74,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy end def tarball_path - @tarball_path ||= if name.empty? || name == '__UNKNOWN__' - Pathname.new("#{HOMEBREW_CACHE}/#{basename_without_params}") - else - Pathname.new("#{HOMEBREW_CACHE}/#{name}-#{resource.version}#{ext}") - end + @tarball_path ||= Pathname.new("#{HOMEBREW_CACHE}/#{name}-#{resource.version}#{ext}") end def temporary_path |
