Remove downloader from Formula

This commit is contained in:
Jack Nagel 2014-02-21 00:41:07 -05:00
parent 662560e40d
commit fb350bad0f
3 changed files with 3 additions and 7 deletions

View File

@ -119,16 +119,12 @@ class Formula
active_spec.requirements
end
def downloader
active_spec.downloader
end
def cached_download
downloader.cached_location
active_spec.cached_download
end
def clear_cache
downloader.clear_cache
active_spec.clear_cache
end
# if the dir is there, but it's empty we consider it not installed

View File

@ -15,6 +15,7 @@ class SoftwareSpec
def_delegators :@resource, :stage, :fetch
def_delegators :@resource, :download_strategy, :verify_download_integrity
def_delegators :@resource, :cached_download, :clear_cache
def_delegators :@resource, :checksum, :mirrors, :specs, :using, :downloader
def_delegators :@resource, :version, :mirror, *Checksum::TYPES

View File

@ -161,7 +161,6 @@ class FormulaTests < Test::Unit::TestCase
assert_equal 'http://example.com', f.homepage
assert_version_equal '0.1', f.version
assert_equal f.stable, f.active_spec
assert_instance_of CurlDownloadStrategy, f.downloader
assert_instance_of SoftwareSpec, f.stable
assert_instance_of Bottle, f.bottle