Class: CurlApacheMirrorDownloadStrategy

Inherits:
CurlDownloadStrategy show all
Defined in:
brew/Library/Homebrew/download_strategy.rb

Overview

Detect and download from Apache Mirror.

Instance Attribute Summary

Attributes inherited from AbstractDownloadStrategy

#cache, #cached_location, #source_modified_time, #url

Instance Method Summary collapse

Methods inherited from CurlDownloadStrategy

#clear_cache, #fetch, #initialize

Methods inherited from AbstractFileDownloadStrategy

#basename, #cached_location, #symlink_location, #temporary_path

Methods inherited from AbstractDownloadStrategy

#basename, #clear_cache, #fetch, #initialize, #ohai, #puts, #shutup!, #stage

Constructor Details

This class inherits a constructor from CurlDownloadStrategy

Instance Method Details

#mirrorsObject



446
447
448
449
450
451
452
453
# File 'brew/Library/Homebrew/download_strategy.rb', line 446

def mirrors
  return @combined_mirrors if defined?(@combined_mirrors)

  backup_mirrors = apache_mirrors.fetch("backup", [])
                                 .map { |mirror| "#{mirror}#{apache_mirrors["path_info"]}" }

  @combined_mirrors = [*@mirrors, *backup_mirrors]
end