Class: Dependabot::Composer::UpdateChecker::VersionResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/composer/update_checker/version_resolver.rb

Constant Summary collapse

VERSION_REGEX =
/[0-9]+(?:\.[A-Za-z0-9\-_]+)*/.freeze
SOURCE_TIMED_OUT_REGEX =
/The "(?<url>[^"]+packages\.json)".*timed out/.freeze

Instance Method Summary collapse

Constructor Details

#initialize(credentials:, dependency:, dependency_files:, requirements_to_unlock:, latest_allowable_version:) ⇒ VersionResolver

Returns a new instance of VersionResolver.


16
17
18
19
20
21
22
23
# File 'lib/dependabot/composer/update_checker/version_resolver.rb', line 16

def initialize(credentials:, dependency:, dependency_files:,
               requirements_to_unlock:, latest_allowable_version:)
  @credentials              = credentials
  @dependency               = dependency
  @dependency_files         = dependency_files
  @requirements_to_unlock   = requirements_to_unlock
  @latest_allowable_version = latest_allowable_version
end

Instance Method Details

#latest_resolvable_versionObject


25
26
27
# File 'lib/dependabot/composer/update_checker/version_resolver.rb', line 25

def latest_resolvable_version
  @latest_resolvable_version ||= fetch_latest_resolvable_version
end