Stop exposing the download strategy from Formula

This commit is contained in:
Jack Nagel 2013-09-13 20:28:02 -05:00
parent 320356236d
commit adceeb52f6
2 changed files with 1 additions and 6 deletions

View File

@ -48,7 +48,7 @@ class Formula
@active_spec = determine_active_spec
validate_attributes :url, :name, :version
@downloader = download_strategy.new(name, active_spec)
@downloader = active_spec.download_strategy.new(name, active_spec)
# Combine DSL `option` and `def options`
options.each do |opt, desc|
@ -181,10 +181,6 @@ class Formula
Pathname.new("#{HOMEBREW_PREFIX}/opt/#{name}")
end
def download_strategy
active_spec.download_strategy
end
def cached_download
downloader.cached_location
end

View File

@ -175,7 +175,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_equal CurlDownloadStrategy, f.download_strategy
assert_instance_of CurlDownloadStrategy, f.downloader
assert_instance_of SoftwareSpec, f.stable