From bda3b4d91e9dc1cdafb09486e768b45bd444d5dc Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 4 Jan 2015 15:33:25 -0500 Subject: [PATCH] Decouple LocalBottleDownloadStrategy from CurlDownloadStrategy --- Library/Homebrew/download_strategy.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 553e991295..f2e87a8258 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -376,10 +376,12 @@ class CurlBottleDownloadStrategy < CurlDownloadStrategy end # This strategy extracts local binary packages. -class LocalBottleDownloadStrategy < CurlDownloadStrategy - def initialize formula - super formula.name, formula.active_spec - @tarball_path = formula.local_bottle_path +class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy + attr_reader :cached_location + + def initialize(formula) + @name = name + @cached_location = formula.local_bottle_path end def stage