Skip to content
Snippets Groups Projects
Commit 0eaf4bbc authored by Adam Vandenberg's avatar Adam Vandenberg Committed by Max Howell
Browse files

Factor out downloading from Formula


This patch adds a ArchiveDownloadStrategy that handles downloading
tarbarlls and decompressing them into the staging area ready for brewing.

Refactored safe_system and curl into utils.rb

Signed-off-by: default avatarMax Howell <max@methylblue.com>

Modifications to Adam's original patch:

I reverted objectification of checksum verification because I couldn't think
of any other download validation methods that might be useful to us in the
future, so allowing such flexibility had no advantages. If we ever need this
to be OO we can add it. But for now less complexity is preferable.

I removed the @svnurl class member. Instead download_strategy is autodetected
by examining the url. The user can override the download_strategy in case this
fails. Thus we already can easily add support for clones of git repositories.
parent 65e1419e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment