Class: Dependabot::Bundler::UpdateChecker::ConflictingDependencyResolver
- Inherits:
-
Object
- Object
- Dependabot::Bundler::UpdateChecker::ConflictingDependencyResolver
- Extended by:
- T::Sig
- 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
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependency_files ⇒ Object
readonly
Returns the value of attribute dependency_files.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#repo_contents_path ⇒ Object
readonly
Returns the value of attribute repo_contents_path.
Instance Method Summary collapse
- #conflicting_dependencies(dependency:, target_version:) ⇒ Object
-
#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.
40 41 42 43 44 45 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 40 def initialize(dependency_files:, repo_contents_path:, credentials:, options:) @dependency_files = dependency_files @repo_contents_path = repo_contents_path @credentials = credentials = end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
23 24 25 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 23 def credentials @credentials end |
#dependency_files ⇒ Object (readonly)
Returns the value of attribute dependency_files.
26 27 28 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 26 def dependency_files @dependency_files end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
20 21 22 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 20 def end |
#repo_contents_path ⇒ Object (readonly)
Returns the value of attribute repo_contents_path.
29 30 31 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 29 def repo_contents_path @repo_contents_path end |
Instance Method Details
#conflicting_dependencies(dependency:, target_version:) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/dependabot/bundler/update_checker/conflicting_dependency_resolver.rb', line 63 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: T.must(lockfile).name } ) end end |