diff options
| author | Jack Nagel | 2013-09-13 20:28:02 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-09-13 22:33:46 -0500 |
| commit | adceeb52f69c5eab33d2419305c571a9ca86b743 (patch) | |
| tree | 271ab941f87dbf289fa0def83da880d9f32e95d6 /Library | |
| parent | 320356236dfcb5517bd8f8ebd5d2e3a47252b671 (diff) | |
| download | brew-adceeb52f69c5eab33d2419305c571a9ca86b743.tar.bz2 | |
Stop exposing the download strategy from Formula
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 739322191..ecae17544 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index f6e1e9dd9..037a8f9be 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -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 |
