Class: Dependabot::Bundler::UpdateChecker::ConflictingDependencyResolver
- Inherits:
-
Object
- Object
- Dependabot::Bundler::UpdateChecker::ConflictingDependencyResolver
- Includes:
- SharedBundlerHelpers
- Defined in:
- lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb
Constant Summary
Constants included from SharedBundlerHelpers
SharedBundlerHelpers::GIT_REF_REGEX, SharedBundlerHelpers::GIT_REGEX, SharedBundlerHelpers::PATH_REGEX, SharedBundlerHelpers::RETRYABLE_ERRORS, SharedBundlerHelpers::RETRYABLE_PRIVATE_REGISTRY_ERRORS
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Attributes included from SharedBundlerHelpers
#credentials, #dependency_files, #repo_contents_path
Instance Method Summary collapse
-
#conflicting_dependencies(dependency:, target_version:) ⇒ 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
Finds any dependencies in the lockfile that have a subdependency on the given dependency that does not satisfly the target_version.
-
#initialize(dependency_files:, repo_contents_path:, credentials:, options:) ⇒ ConflictingDependencyResolver
constructor
A new instance of ConflictingDependencyResolver.
Methods included from SharedBundlerHelpers
#base_directory, #gemfile, #handle_bundler_errors, #in_a_native_bundler_context, #inaccessible_git_dependencies, #jfrog_source, #lockfile, #private_registry_credentials, #retryable_error?, #write_temporary_dependency_files
Constructor Details
#initialize(dependency_files:, repo_contents_path:, credentials:, options:) ⇒ ConflictingDependencyResolver
Returns a new instance of ConflictingDependencyResolver.
18 19 20 21 22 23 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 18 def initialize(dependency_files:, repo_contents_path:, credentials:, options:) @dependency_files = dependency_files @repo_contents_path = repo_contents_path @credentials = credentials @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
16 17 18 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 16 def @options end |
Instance Method Details
#conflicting_dependencies(dependency:, target_version:) ⇒ 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
Finds any dependencies in the lockfile that have a subdependency on the given dependency that does not satisfly the target_version.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 34 def conflicting_dependencies(dependency:, target_version:) return [] if lockfile.nil? in_a_native_bundler_context(error_handling: false) do |tmp_dir| NativeHelpers.run_bundler_subprocess( bundler_version: bundler_version, function: "conflicting_dependencies", options: , args: { dir: tmp_dir, dependency_name: dependency.name, target_version: target_version, credentials: credentials, lockfile_name: lockfile.name } ) end end |