Class: PyPIDownloadStrategy

Inherits:
CurlDownloadStrategy show all
Defined in:
download_strategy/pypi_download_strategy.rb

Overview

Strategy for downloading files from PyPI.

Constant Summary

Constants inherited from CurlDownloadStrategy

CurlDownloadStrategy::URLMetadata

Instance Attribute Summary

Attributes inherited from CurlDownloadStrategy

#mirrors

Attributes inherited from AbstractDownloadStrategy

#cache, #url

Instance Method Summary collapse

Methods inherited from CurlDownloadStrategy

#clear_cache, #fetch, #initialize, #resolved_time_file_size, #total_size

Methods included from Utils::Curl

clear_path_cache, curl, curl_args, curl_check_http_content, curl_download, curl_executable, curl_headers, curl_http_content_headers_and_checksum, curl_output, curl_path, curl_response_follow_redirections, curl_response_last_location, curl_supports_fail_with_body?, curl_supports_tls13?, curl_version, curl_with_workarounds, http_status_ok?, parse_curl_output, parse_curl_response, url_protected_by_cloudflare?, url_protected_by_incapsula?

Methods included from SystemCommand::Mixin

#system_command, #system_command!

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #pretty_upgradable

Methods inherited from AbstractFileDownloadStrategy

#basename, #cached_location, #create_symlink_to_cached_download, #fetched_size, #symlink_location, #temporary_path

Methods inherited from AbstractDownloadStrategy

#basename, #cached_location, #clear_cache, #fetch, #fetched_size, #initialize, #ohai, #quiet!, #quiet?, #source_revision, #stage, #total_size

Methods included from Context

current, current=, #debug?, #quiet?, #verbose?, #with_context

Constructor Details

This class inherits a constructor from CurlDownloadStrategy

Instance Method Details

#source_modified_timeTime

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns:



9
10
11
12
13
14
15
# File 'download_strategy/pypi_download_strategy.rb', line 9

def source_modified_time
  last_modified = @last_modified
  source_modified_time = super
  return source_modified_time if last_modified.nil? || source_modified_time > last_modified

  last_modified
end