From 65775e43180964a3a3067ddbca15d59f1bd29c46 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 16 May 2013 15:25:09 -0500 Subject: [PATCH] CurlDownloadStrategy: remove "tarball_path" accessor This information is already exposed as "cached_location", which is common to all download strategies. --- Library/Contributions/cmd/brew-mirror-check.rb | 7 +++---- Library/Homebrew/download_strategy.rb | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Contributions/cmd/brew-mirror-check.rb b/Library/Contributions/cmd/brew-mirror-check.rb index ed8e5364f6..4fa0defa01 100755 --- a/Library/Contributions/cmd/brew-mirror-check.rb +++ b/Library/Contributions/cmd/brew-mirror-check.rb @@ -9,14 +9,13 @@ class Formula # Force the downloader to attempt the download by removing the tarball if # it is allready cached. - tarball_path = downloader.tarball_path - tarball_path.unlink if tarball_path.exist? + cached_download.unlink if cached_download.exist? - fetched = downloader.fetch + downloader.fetch rescue StandardError opoo "Failed to fetch from URL: #{url}" else - verify_download_integrity fetched if fetched.kind_of? Pathname + verify_download_integrity(cached_download) if cached_download.file? end end diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 67261af2a9..589de6e89b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -31,7 +31,6 @@ class AbstractDownloadStrategy end class CurlDownloadStrategy < AbstractDownloadStrategy - attr_reader :tarball_path attr_accessor :local_bottle_path def initialize name, package