Class: Dependabot::Composer::UpdateChecker::VersionResolver
- Inherits:
-
Object
- Object
- Dependabot::Composer::UpdateChecker::VersionResolver
- Defined in:
- lib/dependabot/composer/update_checker/version_resolver.rb
Overview
rubocop:disable Metrics/ClassLength
Defined Under Namespace
Classes: MissingExtensions
Constant Summary collapse
- MISSING_EXPLICIT_PLATFORM_REQ_REGEX =
%r{ (?<=PHP\sextension\s)ext\-[^\s\/]+\s.*?\s(?=is|but)| (?<=requires\s)php(?:\-[^\s\/]+)?\s.*?\s(?=but) }x
- MISSING_IMPLICIT_PLATFORM_REQ_REGEX =
%r{ (?<!with|for|by)\sext\-[^\s\/]+\s.*?\s(?=->)| (?<=requires\s)php(?:\-[^\s\/]+)?\s.*?\s(?=->)| # composer v1 (?<=require\s)php(?:\-[^\s\/]+)?\s.*?\s(?=->) # composer v2 }x
- VERSION_REGEX =
/[0-9]+(?:\.[A-Za-z0-9\-_]+)*/
- SOURCE_TIMED_OUT_REGEX =
/The "(?<url>[^"]+packages\.json)".*timed out/
Instance Method Summary collapse
-
#initialize(credentials:, dependency:, dependency_files:, requirements_to_unlock:, latest_allowable_version:) ⇒ VersionResolver
constructor
A new instance of VersionResolver.
- #latest_resolvable_version ⇒ Object
Constructor Details
#initialize(credentials:, dependency:, dependency_files:, requirements_to_unlock:, latest_allowable_version:) ⇒ VersionResolver
Returns a new instance of VersionResolver.
44 45 46 47 48 49 50 51 52 |
# File 'lib/dependabot/composer/update_checker/version_resolver.rb', line 44 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 @composer_platform_extensions = initial_platform end |
Instance Method Details
#latest_resolvable_version ⇒ Object
54 55 56 |
# File 'lib/dependabot/composer/update_checker/version_resolver.rb', line 54 def latest_resolvable_version @latest_resolvable_version ||= fetch_latest_resolvable_version end |