diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index faa1b96db..af3e089ad 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -1,3 +1,6 @@ +require 'open-uri' +require 'vendor/multi_json' + class AbstractDownloadStrategy def initialize name, package @url = package.url @@ -153,9 +156,6 @@ end # Detect and download from Apache Mirror class CurlApacheMirrorDownloadStrategy < CurlDownloadStrategy def _fetch - require 'open-uri' - require 'vendor/multi_json' - mirrors = MultiJson.decode(open("#{@url}&asjson=1").read) url = mirrors.fetch('preferred') + mirrors.fetch('path_info') |
