diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index e4628511a2..0a80b8344b 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -808,29 +808,30 @@ class DownloadStrategyDetector def self.detect_from_url(url) case url - # We use a special URL pattern for cvs - when %r[^cvs://] then CVSDownloadStrategy - # Standard URLs - when %r[^bzr://] then BazaarDownloadStrategy - when %r[^git://] then GitDownloadStrategy - when %r[^https?://.+\.git$] then GitDownloadStrategy - when %r[^hg://] then MercurialDownloadStrategy - when %r[^svn://] then SubversionDownloadStrategy - when %r[^svn\+http://] then SubversionDownloadStrategy - when %r[^fossil://] then FossilDownloadStrategy - # Some well-known source hosts - when %r[^https?://(.+?\.)?googlecode\.com/hg] then MercurialDownloadStrategy - when %r[^https?://(.+?\.)?googlecode\.com/svn] then SubversionDownloadStrategy - when %r[^https?://(.+?\.)?sourceforge\.net/svnroot/] then SubversionDownloadStrategy - when %r[^https?://(.+?\.)?sourceforge\.net/hgweb/] then MercurialDownloadStrategy - when %r[^http://svn.apache.org/repos/] then SubversionDownloadStrategy - when %r[^http://www.apache.org/dyn/closer.cgi] then CurlApacheMirrorDownloadStrategy - # Common URL patterns - when %r[^https?://svn\.] then SubversionDownloadStrategy + when %r[^https?://.+\.git$], %r[^git://] + GitDownloadStrategy + when %r[^http://www\.apache\.org/dyn/closer\.cgi] + CurlApacheMirrorDownloadStrategy + when %r[^https?://(.+?\.)?googlecode\.com/svn], %r[^https?://svn\.], %r[^svn://], %r[^https?://(.+?\.)?sourceforge\.net/svnroot/] + SubversionDownloadStrategy + when %r[^cvs://] + CVSDownloadStrategy + when %r[^https?://(.+?\.)?googlecode\.com/hg] + MercurialDownloadStrategy + when %r[^hg://] + MercurialDownloadStrategy + when %r[^bzr://] + BazaarDownloadStrategy + when %r[^fossil://] + FossilDownloadStrategy + when %r[^http://svn\.apache\.org/repos/], %r[^svn\+http://] + SubversionDownloadStrategy + when %r[^https?://(.+?\.)?sourceforge\.net/hgweb/] + MercurialDownloadStrategy when bottle_native_regex, bottle_regex CurlBottleDownloadStrategy - # Otherwise just try to download - else CurlDownloadStrategy + else + CurlDownloadStrategy end end