Stop exposing the download strategy from Formula
This commit is contained in:
parent
320356236d
commit
adceeb52f6
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user