Remove downloader from Formula
This commit is contained in:
parent
662560e40d
commit
fb350bad0f
@ -119,16 +119,12 @@ class Formula
|
|||||||
active_spec.requirements
|
active_spec.requirements
|
||||||
end
|
end
|
||||||
|
|
||||||
def downloader
|
|
||||||
active_spec.downloader
|
|
||||||
end
|
|
||||||
|
|
||||||
def cached_download
|
def cached_download
|
||||||
downloader.cached_location
|
active_spec.cached_download
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_cache
|
def clear_cache
|
||||||
downloader.clear_cache
|
active_spec.clear_cache
|
||||||
end
|
end
|
||||||
|
|
||||||
# if the dir is there, but it's empty we consider it not installed
|
# if the dir is there, but it's empty we consider it not installed
|
||||||
|
@ -15,6 +15,7 @@ class SoftwareSpec
|
|||||||
|
|
||||||
def_delegators :@resource, :stage, :fetch
|
def_delegators :@resource, :stage, :fetch
|
||||||
def_delegators :@resource, :download_strategy, :verify_download_integrity
|
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, :checksum, :mirrors, :specs, :using, :downloader
|
||||||
def_delegators :@resource, :version, :mirror, *Checksum::TYPES
|
def_delegators :@resource, :version, :mirror, *Checksum::TYPES
|
||||||
|
|
||||||
|
@ -161,7 +161,6 @@ class FormulaTests < Test::Unit::TestCase
|
|||||||
assert_equal 'http://example.com', f.homepage
|
assert_equal 'http://example.com', f.homepage
|
||||||
assert_version_equal '0.1', f.version
|
assert_version_equal '0.1', f.version
|
||||||
assert_equal f.stable, f.active_spec
|
assert_equal f.stable, f.active_spec
|
||||||
assert_instance_of CurlDownloadStrategy, f.downloader
|
|
||||||
|
|
||||||
assert_instance_of SoftwareSpec, f.stable
|
assert_instance_of SoftwareSpec, f.stable
|
||||||
assert_instance_of Bottle, f.bottle
|
assert_instance_of Bottle, f.bottle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user