aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-07-22 19:11:09 -0500
committerJack Nagel2014-07-22 19:14:30 -0500
commit49175cd2149e30755aaf2bb157d04752c090bdae (patch)
treed76c320e859f63430f578d1eb096a3b48a5c048a
parent29e119271a1c9c893f10cc62e1ab4c62eb054146 (diff)
downloadhomebrew-49175cd2149e30755aaf2bb157d04752c090bdae.tar.bz2
Hide the downloader implementation from the installer
-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)