aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-22 19:11:09 -0500
committerJack Nagel2014-07-22 19:14:30 -0500
commitd99379bc631b060b6c6453b3b9babf3310a2c02b (patch)
treeaeae00c2d3c62b4c05355ebb07b5fed7177c8fe6 /Library
parent2b1b7ef0e4aa1d9fad62cce6032166a3c23984ae (diff)
downloadbrew-d99379bc631b060b6c6453b3b9babf3310a2c02b.tar.bz2
Hide the downloader implementation from the installer
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb5
-rw-r--r--Library/Homebrew/software_spec.rb4
2 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index bf49d45de..d1d991795 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -634,9 +634,8 @@ class FormulaInstaller
if f.local_bottle_path
downloader = LocalBottleDownloadStrategy.new(f)
else
- bottle = f.bottle
- downloader = bottle.downloader
- bottle.verify_download_integrity(bottle.fetch)
+ downloader = f.bottle
+ downloader.verify_download_integrity(downloader.fetch)
end
HOMEBREW_CELLAR.cd do
downloader.stage
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 7b8a09e46..6a5efe3ee 100644
--- a/Library/Homebrew/software_spec.rb
+++ b/Library/Homebrew/software_spec.rb
@@ -170,6 +170,10 @@ class Bottle
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
end
+ def stage
+ resource.downloader.stage
+ end
+
private
def build_url(root_url, filename)