class Dependabot::Bundler::UpdateChecker::ConflictingDependencyResolver
Attributes
options[R]
Public Class Methods
new(dependency_files:, repo_contents_path:, credentials:, options:)
click to toggle source
# File lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb, line 17 def initialize(dependency_files:, repo_contents_path:, credentials:, options:) @dependency_files = dependency_files @repo_contents_path = repo_contents_path @credentials = credentials @options = options end
Public Instance Methods
conflicting_dependencies(dependency:, target_version:)
click to toggle source
Finds any dependencies in the lockfile that have a subdependency on the given dependency that does not satisfly the target_version.
@param dependency [Dependabot::Dependency] the dependency to check @param target_version [String] the version to check @return [Array<Hash{String => String}]
* name [String] the blocking dependencies name * version [String] the version of the blocking dependency * requirement [String] the requirement on the target_dependency
# File lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb, line 33 def conflicting_dependencies(dependency:, target_version:) in_a_native_bundler_context(error_handling: false) do |tmp_dir| NativeHelpers.run_bundler_subprocess( bundler_version: bundler_version, function: "conflicting_dependencies", args: { dir: tmp_dir, dependency_name: dependency.name, target_version: target_version, credentials: credentials, lockfile_name: lockfile.name } ) end end
Private Instance Methods
bundler_version()
click to toggle source
# File lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb, line 51 def bundler_version @bundler_version ||= Helpers.bundler_version(lockfile) end